gemercheung 7 місяців тому
батько
коміт
9fe1658364
1 змінених файлів з 30 додано та 37 видалено
  1. 30 37
      src/app/map/App.vue

+ 30 - 37
src/app/map/App.vue

@@ -17,25 +17,14 @@
     </div> -->
     <div class="left">
       <el-form-item label="" class="filter">
-        <com-company
-          v-model="state.deptId"
-          :id="state.caseId"
-          hideAll
-        />
+        <com-company v-model="state.deptId" :id="state.caseId" hideAll />
       </el-form-item>
       <el-form-item label="" class="filter">
-        <el-input
-          v-model:modelValue="keywordSearch"
-          placeholder="输入关键字"
-        ></el-input>
+        <el-input v-model:modelValue="keywordSearch" placeholder="输入关键字"></el-input>
       </el-form-item>
     </div>
     <div class="right">
-      <el-select
-        style="width: 100px"
-        v-model:modelValue="currentMaptype"
-        v-if="currentType(0)"
-      >
+      <el-select style="width: 100px" v-model:modelValue="currentMaptype" v-if="currentType(0)">
         <el-option key="2d" label="矢量图" :value="0" />
         <el-option key="state" label="卫星图" :value="1" />
       </el-select>
@@ -48,20 +37,10 @@
   <div ref="mapEl" class="map-container" v-show="currentType(0)"></div>
   <div class="card-container" v-show="currentType(1)">
     <div class="card-list">
-      <template
-        v-for="item of keywordSearch ? searchList : list"
-        v-if="keywordSearch ? searchList.length > 0 : list.length > 0"
-      >
-        <el-card
-          class="card"
-          shadow="hover"
-          @click="handCardClick(item.caseId)"
-        >
-          <img
-            class="cover"
-            :src="item.cover ? item.cover : emptyCover"
-            style="width: 100%"
-          />
+      <template v-for="item of keywordSearch ? searchList : list"
+        v-if="keywordSearch ? searchList.length > 0 : list.length > 0">
+        <el-card class="card" shadow="hover" @click="handCardClick(item.caseId)">
+          <img class="cover" :src="item.cover ? item.cover : emptyCover" style="width: 100%" />
           <div class="label-list">
             <span>
               项目:
@@ -81,8 +60,7 @@
                     ? item.projectAddress.substr(0, 20) + "..."
                     : item.projectAddress
                 }}
-              </el-tooltip></span
-            >
+              </el-tooltip></span>
             <!-- <span> 类别: {{ item.projectSite }}</span> -->
           </div>
         </el-card>
@@ -151,8 +129,7 @@ const getQuery = (
   share: boolean = false,
   single: boolean = false
 ) =>
-  `${getFuseCodeLink(caseId, true)}${share ? "&share=1" : ""}${
-    single ? "&single=1" : ""
+  `${getFuseCodeLink(caseId, true)}${share ? "&share=1" : ""}${single ? "&single=1" : ""
   }#show/summary`;
 
 const request = axios.create({
@@ -166,12 +143,12 @@ const request = axios.create({
 const mapEl = ref<HTMLDivElement>();
 let AMap, map;
 const domain = location.protocol + "//" + location.host;
-let queryURL =''
-
-if(String(location.pathname).includes('criminal')){
+let queryURL = ''
+const isCriminal = String(location.pathname).includes('criminal')
+if (isCriminal) {
   queryURL = `${domain}/fusion/case/list`;
 
-}else{
+} else {
   queryURL = `${domain}/fusion/web/fireProject/queryProject`;
 }
 
@@ -193,7 +170,16 @@ const getDataQuest = () => {
     });
     console.log("res.data", res);
     if (res.status === 200 && res.data.code === 0) {
-      reslove(res.data.data.list);
+      if (isCriminal) {
+        reslove(res.data.data.list.map(item => {
+          item.projectName = item.caseTitle
+          item.projectAddress = item.mapUrl
+          return item
+        }));
+      } else {
+        reslove(res.data.data.list);
+      }
+
     } else {
       reslove([]);
     }
@@ -433,15 +419,18 @@ body {
   flex-direction: row;
   gap: 0 20px;
 }
+
 .tabbar .left {
   gap: 0 10px;
 }
+
 .tabbar .nav {
   display: flex;
   /* background: white; */
   justify-content: center;
   align-items: center;
 }
+
 .el-form-item {
   margin-bottom: 0px !important;
 }
@@ -484,6 +473,7 @@ body {
   width: 382px;
   border-radius: 10px 10px 10px 10px;
 }
+
 .label-list {
   display: inline-flex;
   flex-direction: column;
@@ -504,6 +494,7 @@ body {
 .amap-ctrl-list-layer {
   z-index: 100000;
 }
+
 .no-data {
   width: 100%;
   height: 100%;
@@ -514,9 +505,11 @@ body {
   align-items: center;
   flex-direction: column;
 }
+
 .no-data span {
   color: #999;
 }
+
 .amap-maptype {
   display: none;
 }