From f5e57324d3f957376894ad63fb9a50c9424aeeef Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Wed, 5 Jun 2024 22:46:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E6=84=9F=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- src/api/modules/video.ts | 4 ++-- .../commandScreen/commandCenter/centerTop.vue | 13 +++++++----- .../commandScreen/commandCenter/rightAll.vue | 21 +++++++++++-------- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.env.development b/.env.development index 34f756f..a2dde07 100644 --- a/.env.development +++ b/.env.development @@ -4,8 +4,8 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) # 后端本地 # VITE_API_URL = 'http://192.168.34.221:19111' -VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地 -# VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程 +# VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地 +VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程 # VITE_API_URL = 'http://192.168.34.221:28889' # VITE_API_URL = 'http://121.196.214.246/api' # VITE_API_URL = 'http://jxj.zhgdyun.com:100' diff --git a/src/api/modules/video.ts b/src/api/modules/video.ts index b5019e4..4e15077 100644 --- a/src/api/modules/video.ts +++ b/src/api/modules/video.ts @@ -20,6 +20,6 @@ export const getSafeHatSessionApi = (params: {}) => { }; // 现场视频 -export const selectLiveVideoListApi = (params: {}) => { - return http.get(BASEURL + `/xmgl/project/getProjectExtendInfo`, params, { headers: { noLoading: true }}); +export const selectLiveVideoListApi = (params: {}, showLoading: boolean) => { + return http.get(BASEURL + `/xmgl/project/getProjectExtendInfo`, params, { headers: { noLoading: showLoading } }); }; diff --git a/src/views/commandScreen/commandCenter/centerTop.vue b/src/views/commandScreen/commandCenter/centerTop.vue index 48a3b05..56f4ad2 100644 --- a/src/views/commandScreen/commandCenter/centerTop.vue +++ b/src/views/commandScreen/commandCenter/centerTop.vue @@ -150,10 +150,13 @@ let topText = ref([ { id: 2, title: "宣传视频", isActive: false }, { id: 3, title: "效果图", isActive: false } ]); -const getVideoList = async () => { - let res: any = await selectLiveVideoListApi({ - projectSn: store.sn - }); +const getVideoList = async (showLoading: boolean) => { + let res: any = await selectLiveVideoListApi( + { + projectSn: store.sn + }, + showLoading + ); console.log(res, "445566"); if (res.result && res.result.extend1) { videoList.value = JSON.parse(res.result.extend1).result.videoList; @@ -270,7 +273,7 @@ defineExpose({ getQueryBySnData }); const setIntervalFn = (showLoading: boolean) => { - getVideoList(); + getVideoList(showLoading); getQueryBySnData(showLoading); getStatsDirectorateBigScreen(showLoading); getStatScore(showLoading); diff --git a/src/views/commandScreen/commandCenter/rightAll.vue b/src/views/commandScreen/commandCenter/rightAll.vue index 8ee50e5..3331eb9 100644 --- a/src/views/commandScreen/commandCenter/rightAll.vue +++ b/src/views/commandScreen/commandCenter/rightAll.vue @@ -1020,12 +1020,15 @@ const getSafeInfo = async (showLoading: boolean) => { // majorDangerRate.value = result.result.percent; console.log("1111111111111", dataList.value); - const res: any = await getCountDangerLevelApi({ - projectSn: store.sn, - isOverdueRectification: 1, - inspectStartTime: dateRange.value[0], - inspectEndTime: dateRange.value[1] - }); + const res: any = await getCountDangerLevelApi( + { + projectSn: store.sn, + isOverdueRectification: 1, + inspectStartTime: dateRange.value[0], + inspectEndTime: dateRange.value[1] + }, + showLoading + ); // dataList.value = res.result.data.map((item: any, index: number) => { // return { // ...item, @@ -1386,12 +1389,12 @@ const getNoticeList = async (showLoading: boolean) => { watch( dateRange, - async () => { + () => { if (dateRange.value == null) { dateRange.value = []; } - await getSafeInfo(true); - await qualityInfo(true); + getSafeInfo(true); + qualityInfo(true); // await getSelectQualityStatisticsNum(); }, { deep: true }