yang1998 10 months ago
parent
commit
995f0db5d7

+ 3 - 1
.env.production

@@ -8,6 +8,8 @@ VITE_APP_BASE_API = 'http://10.244.107.145:8081/cmnw_server_dev/api'
 
 VITE_APP_BASE_ADDR = 'http://10.244.107.145:8081'
 
-VITE_APP_MAP_SERVICE = 'http://10.244.107.145:8083'
+#VITE_APP_MAP_SERVICE = 'http://10.244.107.145:8083'
+VITE_APP_MAP_SERVICE = 'http://10.244.107.145:9080'
+
 VITE_APP_MAP_SERVICE2 = 'http://10.244.107.145:8081'
 VITE_APP_MAP_RICE_MB = 'http://10.244.107.145:8081/res/muban.xlsx'

+ 2 - 2
src/App.vue

@@ -19,12 +19,12 @@ getAllRootFun().then(res => {
   console.log('所有的权限啊 ',res.data)
 })
 
-if (import.meta.env.VITE_APP_MODE === 'prod') {
+// if (import.meta.env.VITE_APP_MODE === 'prod') {
   getQxsyToken().then(res => {
     console.log(res);
     setCookie("layer_token",res.data,3)
   })
-}
+// }
 
 </script>
 

+ 18 - 0
src/utils/data/all-layer-info.js

@@ -446,6 +446,24 @@ export var allLayerInfo = [
 				name: '卫星影像',
 				layer: 2,
 				children: [
+          {
+            name: '2023年第四季度',
+            layer: 3,
+            url: 'http://10.244.107.145:9080/ags_tile_svc/sat_2023q4/MapServer',
+            type: 'tile',
+            id: '2023-four',
+            title: '2023-four',
+            isProd: true
+          },
+          {
+            name: '2023年第三季度',
+            layer: 3,
+            url: 'http://10.244.107.145:9080/ags_tile_svc/sat_2023q3/MapServer',
+            type: 'tile',
+            id: '2023-three',
+            title: '2023-three',
+            isProd: true
+          },
 					{
 						name: '2023年第二季度',
 						layer: 3,

+ 4 - 2
src/utils/map/AddLayer.js

@@ -66,8 +66,8 @@ export function addLayer(layer, visible = true, opacity = 1, mapID = 'map', rend
     token_type,
     mapID,
     where,
-    token: import.meta.env.VITE_APP_MODE === 'prod' ? "jwt" : null,
-    jwt: import.meta.env.VITE_APP_MODE === 'prod' ? getCookie("layer_token") : null
+    token: import.meta.env.VITE_APP_MODE === 'prod' || layer.isProd ? "jwt" : null,
+    jwt: import.meta.env.VITE_APP_MODE === 'prod' || layer.isProd ? getCookie("layer_token") : null
   }
   //正式环境需要token
 
@@ -117,6 +117,8 @@ export function layerQueryGet(queryUrl, where, is_draw = true, is_clear = true,
         'width': 4
       }
     },
+    token: import.meta.env.VITE_APP_MODE === 'prod' ? "jwt" : null,
+    jwt: import.meta.env.VITE_APP_MODE === 'prod' ? getCookie("layer_token") : null
   })
 }
 export function layerControlNew(layerID, visible, opacity = 1, where) {

+ 4 - 4
src/views/tdlzsp/intAttractInvPlot/DrawMap.vue

@@ -377,10 +377,10 @@ function createMap() {
         case "ViewComplete":
           locateCM()
             let status = [
-              { name: '意向招商审核中', color: '#ff6961', borderColor: '#ff6961' },
-              { name: '待招商', color: 'rgba(0,255,10,1)', borderColor: 'rgba(0,255,10,1)' },
-              { name: '流转审批中', color: 'rgba(252,230,0,1)', borderColor: 'rgba(252,230,0,1)' },
-              { name: '已流转', color: 'rgba(127,255,212,1)', borderColor: 'rgba(127,255,212,1)' },
+              { name: '意向招商审核中', color: 'rgba(205,105,97,0.5)', borderColor: '#ff6961' },
+              { name: '待招商', color: 'rgba(0,255,10,0.5)', borderColor: 'rgba(0,255,10,1)' },
+              { name: '流转审批中', color: 'rgba(252,230,0,0.5)', borderColor: 'rgba(252,230,0,1)' },
+              { name: '已流转', color: 'rgba(127,255,212,0.5)', borderColor: 'rgba(127,255,212,1)' },
             ]
           getYxzsdkhGenson().then(res => {
             let genson = []

+ 1 - 1
src/views/tdlzsp/landTransferApp/Add.vue

@@ -14,7 +14,7 @@
           <el-form-item label="意向招商地块" prop="yxdkids">
             <el-input v-model="formData.yxdkids" placeholder="请选择意向招商地块" clearable :disabled="route.params.type !== 'add'">
               <template #append>
-                <el-button type="primary" class="btn-default" @click="handleDraw">选择</el-button>
+                <el-button type="primary" class="btn-default" @click="handleDraw" :disabled="route.params.type !== 'add'">选择</el-button>
               </template>
             </el-input>
           </el-form-item>

+ 19 - 6
src/views/tdlzsp/landTransferApp/DrawMap.vue

@@ -408,10 +408,10 @@ function createMap() {
         case "ViewComplete":
           locateCM()
           let status = [
-            { name: '意向招商审核中', color: '#ff6961', borderColor: '#ff6961' },
-            { name: '待招商', color: 'rgba(0,255,10,1)', borderColor: 'rgba(0,255,10,1)' },
-            { name: '流转审批中', color: 'rgba(252,230,0,1)', borderColor: 'rgba(252,230,0,1)' },
-            { name: '已流转', color: 'rgba(127,255,212,1)', borderColor: 'rgba(127,255,212,1)' },
+            { name: '意向招商审核中', color: 'rgba(205,105,97,0.5)', borderColor: 'rgba(205,105,97,1)' },
+            { name: '待招商', color: 'rgba(0,255,10,0.5)', borderColor: 'rgba(0,255,10,1)' },
+            { name: '流转审批中', color: 'rgba(252,230,0,0.5)', borderColor: 'rgba(252,230,0,1)' },
+            { name: '已流转', color: 'rgba(127,255,212,0.5)', borderColor: 'rgba(127,255,212,1)' },
           ]
           getYxzsdkhGenson().then(res => {
             gensonRes.value =res.data
@@ -421,7 +421,10 @@ function createMap() {
               genson.push({
                 rings:JSON.parse(i.geojson)?.coordinates,
                 id:i.yxzsId,
-                attributes:{'yxzsId':i.yxzsId},
+                attributes:{
+                  'yxzsId':i.yxzsId,
+                  'mc':i.mc
+                },
 
                 symbol:{
                   'type': 'simple-fill',
@@ -466,6 +469,7 @@ function createMap() {
             console.log('findI',findI)
             if (!findI){
               clearMap(true,true,true)
+              return
             }
             // clearMap(true, false, false)
             resData = []
@@ -473,7 +477,15 @@ function createMap() {
             // pickedLands.value = pickedLands.value.filter(i => 'id' in i)
             // if (pickedLands.value.find(i => i.id === arg.data[0].data.objectid)) { return }
             // pickedLands.value.push({ id: arg.data[0].data.objectid, area: arg.data[0].data.areamu, type: 'Polygon', coordinates: arg.data[0].geometry.rings })
-            pickedLands.value = [{ id: arg.data[0].data.objectid, yxzs_id: arg.data[0].data.yxzs_id, area: arg.data[0].data.areamu, type: 'Polygon', coordinates: arg.data[0].geometry.rings }]
+            pickedLands.value = [{
+              // id: arg.data[0].data.objectid,
+              yxzs_id: arg.data[0].data.yxzsId,
+              mc: arg.data[0].data.mc,
+              // area: arg.data[0].data.areamu,
+              type: 'Polygon',
+              coordinates: arg.data[0].geometry.rings
+            }]
+
 
             drawRings()
           }
@@ -581,6 +593,7 @@ function delPickedLand(item) {
   } else {
     pickedLands.value = []
   }
+  clearMap(true,true,true)
   drawRings()
 }