Hwf 6 月之前
父節點
當前提交
92fd712c01

+ 3 - 3
src/api/globalMap/index.ts

@@ -82,9 +82,9 @@ export const getEmergencyExpertNameLike = (params) => {
 // 全局模糊搜索
 export const getPointInfoComprehensiveSearch = (params) => {
   return request({
-    url: '/api/gateway/v1/get_point_info_comprehensive_search',
-    method: 'post',
-    data: params
+    url: '/api/comprehensive/search/info',
+    method: 'get',
+    params: params
   });
 };
 

+ 13 - 13
src/permission.ts

@@ -19,10 +19,10 @@ router.beforeEach(async (to, from, next) => {
     /* has token*/
     if (to.path === '/login') {
       next({ path: '/' });
-      usePermissionStore().setMenu(to);
+      // usePermissionStore().setMenu(to);
       NProgress.done();
     } else if (whiteList.indexOf(to.path as string) !== -1) {
-      usePermissionStore().setMenu(to);
+      // usePermissionStore().setMenu(to);
       next();
     } else {
       if (useUserStore().roles.length === 0) {
@@ -33,21 +33,21 @@ router.beforeEach(async (to, from, next) => {
           await useUserStore().logout();
           ElMessage.error(err);
           next({ path: '/' });
-          usePermissionStore().setMenu(to);
+          // usePermissionStore().setMenu(to);
         } else {
           isRelogin.show = false;
-          const accessRoutes = await usePermissionStore().generateRoutes();
-          // 根据roles权限生成可访问的路由表
-          accessRoutes.forEach((route) => {
-            if (!isHttp(route.path)) {
-              router.addRoute(route); // 动态添加可访问路由表
-            }
-          });
-          usePermissionStore().setMenu(to);
+          // const accessRoutes = await usePermissionStore().generateRoutes();
+          // // 根据roles权限生成可访问的路由表
+          // accessRoutes.forEach((route) => {
+          //   if (!isHttp(route.path)) {
+          //     router.addRoute(route); // 动态添加可访问路由表
+          //   }
+          // });
+          // usePermissionStore().setMenu(to);
           next({ path: to.path, replace: true, params: to.params, query: to.query, hash: to.hash, name: to.name as string }); // hack方法 确保addRoutes已完成
         }
       } else {
-        usePermissionStore().setMenu(to);
+        // usePermissionStore().setMenu(to);
         next();
       }
     }
@@ -55,7 +55,7 @@ router.beforeEach(async (to, from, next) => {
     // 没有token
     if (whiteList.indexOf(to.path as string) !== -1) {
       // 在免登录白名单,直接进入
-      usePermissionStore().setMenu(to);
+      // usePermissionStore().setMenu(to);
       next();
     } else {
       const redirect = encodeURIComponent(to.fullPath || '/');

+ 8 - 41
src/views/globalMap/LeftMenu.vue

@@ -37,7 +37,7 @@
                 style="margin-top: 5px"
                 @click="selectSearchMarker(item)"
               >
-                <div class="tag">{{ item.tag }}</div>
+                <div class="tag">{{ item.dict_label }}</div>
                 <div class="text1" :title="item.name">{{ item.name }}</div>
               </div>
               <div v-show="searchState.showList && searchState.layerList.length === 0" style="text-align: center">无数据</div>
@@ -157,47 +157,12 @@ const changeSearchText = () => {
   } else {
     console.log('搜索值:', searchState.searchText);
     getPointInfoComprehensiveSearch({
-      page: 1,
-      limit: 10,
-      keywords: searchState.searchText
+      keyword: searchState.searchText
     }).then((res) => {
       searchState.showList = true;
-      searchState.resultList = res.data.list;
-      searchState.layerList = res.data.layerList;
-      searchState.videoList = res.data.videoList;
-      // searchState.layerList = [
-      //   {
-      //     'name': '茂名市石化医院',
-      //     'id': '3',
-      //     'dataType': 6,
-      //     'longitude': '110.820184',
-      //     'latitude': '21.60546',
-      //     'type': '2',
-      //     tag: '医院'
-      //   },
-      //   {
-      //     'name': '茂名市人民医院',
-      //     'id': '1',
-      //     'dataType': 6,
-      //     'longitude': '110.838689',
-      //     'latitude': '21.56834',
-      //     'type': '2',
-      //     tag: '医院'
-      //   }
-      // ];
-      // searchState.videoList = [
-      //   {
-      //     'name': '01083.159乡道石鳌塘村交汇路口.X320',
-      //     'address': '44092251001320000110',
-      //     'area': '茂名市视频数据共享管理平台/茂名市公安局/1市局直属/官渡派出所',
-      //     'area_name': '市辖区',
-      //     'longitude': 110.92495,
-      //     'latitude': 21.67629167,
-      //     'status': '在线',
-      //     'video_code': '44092251001320000110',
-      //     tags: [{ name: '路网视频' }, { name: '森林防火' }]
-      //   }
-      // ];
+      searchState.resultList = res.data.add_data;
+      searchState.layerList = res.data.point_data;
+      searchState.videoList = res.data.video_data;
     });
   }
 };
@@ -287,7 +252,9 @@ const setChild = (data, item, flag) => {
 const handleShowDialog = (row) => {
   showDialog.value = false;
   nextTick(() => {
-    videoMonitorData.value = row;
+    const data = deepClone(row);
+    data.video_code = data.id;
+    videoMonitorData.value = data;
     showDialog.value = true;
   });
 };

+ 6 - 1
src/views/globalMap/RightMenu/OnlinePlotting/index.vue

@@ -9,7 +9,8 @@
       </div>
       <div class="btn-box">
         <div v-show="!collaboration" class="btn2" @click="handleShare('1')">协同标绘</div>
-        <div v-show="collaboration" class="btn2" @click="handleCloseCollaboration">关闭协同</div>
+        <div v-show="collaboration" class="btn2" @click="handleShowLayer">查看图层</div>
+        <div v-show="collaboration" class="btn2" style="margin-left: 20px" @click="handleCloseCollaboration">关闭协同</div>
         <div v-show="collaboration" class="btn2" style="margin-left: 20px">保存</div>
       </div>
     </div>
@@ -804,6 +805,10 @@ const handleScreenshot = () => {
   }
 };
 
+let showLayer = ref(false);
+let handleShowLayer = () => {
+  showLayer.value = true;
+};
 onMounted(() => {
   getList();
 });