Ver código fonte

修改(正式环境服务加密)

yang1998 10 meses atrás
pai
commit
0919dcefd4

+ 2 - 1
.env.production

@@ -13,5 +13,6 @@ VUE_APP_NYNCW_API = 'https://ydjguat.nyncw.sh.gov.cn/nwApi'
 VUE_APP_SNKD_TOKEN_API = 'http://10.244.107.145:8081/cmnw_trans'
 VUE_APP_SNKD_API = 'http://gov.snkoudai.com/api'
 
-VUE_APP_MAP_SERVICE = 'http://10.244.107.145:8083/'
+#VUE_APP_MAP_SERVICE = 'http://10.244.107.145:8083/'
+VUE_APP_MAP_SERVICE = 'http://10.244.107.145:9080'
 VUE_APP_MAP_SERVICE_NET = 'http://10.244.107.145:8081/cmnw_trans'

+ 2 - 2
src/App.vue

@@ -12,12 +12,12 @@ export default {
   name: 'App',
   components: { RouterView },
   mounted() {
-    if (process.env.NODE_ENV === 'production') {
+    // if (process.env.NODE_ENV === 'production') {
       getQxsyToken().then(res => {
         console.log(res);
         setCookie("layer_token",res.data,3)
       })
-    }
+    // }
   }
 }
 </script>

+ 1 - 1
src/components/MapLegend.vue

@@ -175,7 +175,7 @@ export default {
           { name: '乡镇畜牧兽医站', color: '#800080' },
         ],
         'cwzs': [
-          { name: '宠物诊所', color: '#ffb6c1' },
+          { name: '宠物诊所', color: '#fc921f' },
         ],
         'gczqyfb': [
           { name: '核心区域', color: 'rgba(0, 255, 0, 0.2)',borderColor:'rgba(0, 255, 0, 0.8)' },

+ 14 - 1
src/components/PointSearch.vue

@@ -46,6 +46,7 @@ import { apiPost } from "@/services/out-service";
 import MyTable from "@/components/MyTable.vue";
 import { getAllTownMy } from "@/services/common";
 import {getSnkdZypz} from "@/services/znfx";
+import {getYxzsdkhInfo} from "@/services/zhcj";
 
 
 export default {
@@ -239,7 +240,7 @@ export default {
       if(params.title === "temp"){
         params.title = "农用地现状"
       }
-     if(params.title === "农用地现状"){
+      if(params.title === "农用地现状"){
        await getSnkdZypz(params.data.dkid).then(res => {
          // console.log(res);
          params.data = {
@@ -250,6 +251,18 @@ export default {
          // console.log(params.data);
        })
       }
+      if(params.title === "yxzsdk"){
+        params.title = "意向招商地块"
+       await getYxzsdkhInfo(params.data.yxzsId).then(res => {
+         // console.log(res);
+         params.data = {
+           ...params.data,
+           ...res.data
+           // ...res.obj[0]
+         }
+         // console.log(params.data);
+       })
+      }
       let temp = []
       if (params.title === 'dsxm') {
         if (!params.data['dsxmId']) return

+ 10 - 0
src/services/zhcj.js

@@ -152,6 +152,16 @@ export function getYxzsdkhGenson() {
     }
   })
 }
+//查询意向招商地块信息
+export function getYxzsdkhInfo(dkid) {
+  return request({
+    url: `/yxzsdk/info`,
+    method: "get",
+    params: {
+      dkid
+    }
+  })
+}
 export function getProductAllyInfoData(jtjc){
   return request({
     url:'/tscy/get_cylhtjs_list',

+ 21 - 4
src/services/znfx.js

@@ -395,23 +395,40 @@ export function GetScclyc() {
 }
 
 //蔬菜销售上市统计--经营主体
-export function GetScxlFarm() {
+export function GetScxlFarm(beginDate,endDate) {
   return requestSnkd({
     url: '/archive/gov/archiveSellGroupDay/listFarm',
     method: 'post',
     data: {
-      "areaId":["310230"],"farmAreaType":3,"keywords":"","beginDate":"2023-09-01","endDate":"2023-09-04","pageNo":1,"pageSize":999,"sortDirection":0,"sortField":1,"cropSubjectId":1,"cropCategoryId":3,"cropGroupId":null,"sellType":null,"sellTypeId":null
+      "areaId":["310230"],
+      "farmAreaType":3,
+      "keywords":"",
+      "beginDate":beginDate,
+      "endDate":endDate,
+      "pageNo":1,
+      "pageSize":999,
+      "sortDirection":0,
+      "sortField":1,
+      "cropSubjectId":1,
+      "cropCategoryId":3,"cropGroupId":null,"sellType":null,"sellTypeId":null
     }
   })
 }
 
 //蔬菜销售上市统计--作物
-export function GetScxlCrop() {
+export function GetScxlCrop(beginDate,endDate) {
   return requestSnkd({
     url: '/archive/gov/archiveSellGroupDay/listCropGroup',
     method: 'post',
     data: {
-      "areaId":["310230"],"farmAreaType":3,"cropSubjectId":1,"cropCategoryId":3,"cropGroupId":null,"beginDate":"2023-09-01","endDate":"2023-09-04","keywords":"","pageNo":1,"pageSize":999,"sortDirection":0,"sortField":1,"sellType":null,"sellTypeId":null
+      "areaId":["310230"],
+      "farmAreaType":3,
+      "cropSubjectId":1,
+      "cropCategoryId":3,
+      "cropGroupId":null,
+      "beginDate":beginDate,
+      "endDate":endDate,
+      "keywords":"","pageNo":1,"pageSize":999,"sortDirection":0,"sortField":1,"sellType":null,"sellTypeId":null
     }
   })
 }

+ 28 - 3
src/utils/data/all-layer-info.js

@@ -6,7 +6,8 @@ export var allLayerInfo = [
 			{
 				name: '养殖水域滩涂规划',
 				// url: 'http://10.121.226.95:8081/OneMapServer/rest/services/tidalflat_shanghai/MapServer',
-    url:  process.env.VUE_APP_MAP_SERVICE +'/ags_feature_svc/nygh/FeatureServer/0/query',
+        // url:  process.env.VUE_APP_MAP_SERVICE +'/ags_feature_svc/nygh/FeatureServer/0/query', //为啥要加个query
+        url:  process.env.VUE_APP_MAP_SERVICE +'/ags_feature_svc/nygh/FeatureServer/0',
 				title: 'yzsyttgh',
 				id: 'yzsyttgh',
 				layer: 2,
@@ -354,9 +355,11 @@ export var allLayerInfo = [
             layer: 3,
             // url: 'http://10.108.3.5' + '/i3s_svc/qxsy_test_3/SceneServer',
             url: 'http://10.244.107.145:9080/i3s_svc/qxsy_xhz2/SceneServer',
+            url2: 'http://10.244.107.145:9080/i3s_svc/qxsy_xhz1/SceneServer',
             type: 'mesh',
             id: 'qxsy_xhz2',
-            title: 'qxsy_xhz2'
+            title: 'qxsy_xhz2',
+            isProd: true
           },
           {
             name: "新建村",
@@ -576,6 +579,26 @@ export var allLayerInfo = [
 				name: '卫星影像',
 				layer: 2,
 				children: [
+					{
+						name: '2023年第四季度',
+						layer: 3,
+						// url: process.env.VUE_APP_MAP_SERVICE + '/ags_tile_svc/sat_2023q4/MapServer',
+						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: process.env.VUE_APP_MAP_SERVICE + '/ags_tile_svc/sat_2023q3/MapServer',
+						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,
@@ -676,8 +699,10 @@ export var allLayerInfo = [
 				layer: 2,
 				// url: 'http://10.108.3.5/i3s_svc/qxsy_test_3/SceneServer',
 				url: 'http://10.244.107.145:9080/i3s_svc/qxsy_xhz2/SceneServer',
+        url2: 'http://10.244.107.145:9080/i3s_svc/qxsy_xhz1/SceneServer',
 				type: 'mesh',
-        token: "jwt"
+        token: "jwt",
+        isProd: true
 			},
 		]
 	},

+ 19 - 3
src/utils/map/AddLayer.js

@@ -229,8 +229,8 @@ export function addLayer(layer, visible = true, opacity = 1, mapID = 'map', wher
     token_type,
     mapID,
     where,
-    token: process.env.NODE_ENV === 'production' ? "jwt" : null,
-    jwt: process.env.NODE_ENV === 'production' ? getCookie("layer_token") : null
+    token: process.env.NODE_ENV === 'production' || layer.isProd ? "jwt" : null,
+    jwt: process.env.NODE_ENV === 'production' || layer.isProd ? getCookie("layer_token") : null
   }
   if (layer.sublayers) {
     params['sublayers'] = layer.sublayers
@@ -264,6 +264,15 @@ export function addLayer(layer, visible = true, opacity = 1, mapID = 'map', wher
   if (layer.url_slice) {
     addLayer({ url: layer.url_slice, id: layer.id + '_slice', name: layer.name, type: 'vector' }, visible, opacity)
   }
+  if (layer.url2) {
+    let layer2 = {
+      ...layer,
+      url: layer.url2,
+      id: layer.id + "_2",
+      url2: null
+    }
+    addLayer(layer2, visible, opacity)
+  }
   invokeParams('AddLayer', params)
   if (layer?.geo === 'point') {
     // 点图层重渲染点尺寸
@@ -298,7 +307,9 @@ export function layerQueryGet(queryUrl, where, is_draw = true, is_clear = true,
     scale,
     is_return:is_return,
     is_temp,
-    layerID
+    layerID,
+    token: process.env.NODE_ENV === 'production' ? "jwt" : null,
+    jwt: process.env.NODE_ENV === 'production' ? getCookie("layer_token") : null
   }
   if (isSymbol){
     params.symbol = symbol
@@ -404,3 +415,8 @@ export function toolUploadSheepFileMap(shapeType,shapeData){
     shapeData:shapeData
   })
 }
+export function setScale(scale) {
+  invokeParams('SetScale', {
+    "scale": scale
+  })
+}

+ 2 - 1
src/views/deck/IndexPage.vue

@@ -326,7 +326,7 @@ import {
   locateCM,
   addLayer,
   clearMap,
-  layerQueryGet, changeViewType, clearTownAndVillageMap, toolUploadSheepFileMap, layerControlNew,
+  layerQueryGet, changeViewType, clearTownAndVillageMap, toolUploadSheepFileMap, layerControlNew, setScale,
 
 } from "@/utils/map/AddLayer";
 import { GetDsxmLocation } from '@/services/others'
@@ -1058,6 +1058,7 @@ export default {
               }else {
                 layerQueryGet(getLayerByName('镇界线').url, "name='新河镇'", true, true, true, 10000,[255,0,0,1],3)
               }
+              setScale(n.name === '新建村'?30000:50000)
             },1000)
           }
 

+ 4 - 0
src/views/deck/pages/zhcj_sub/ZhcjLtqy.vue

@@ -505,4 +505,8 @@ export default {
   }
 }
 
+.select-div{
+  text-align: right;
+}
+
 </style>

+ 22 - 15
src/views/deck/pages/zhcj_sub/ZhcjXczx.vue

@@ -141,8 +141,8 @@
 
 <script>
 import { setLnsfc, setCylht, setNyhzs, setCyzcz, setCyjgfx } from '@/echarts/options'
-import {getQxsyToken, GetXczxDetail, GetXczxList, GetXczxStat, GetYearStat} from "@/services/zhcj";
-import { addLayer, layerQueryGet, clearMap, layerControl, changeViewType } from "@/utils/map/AddLayer";
+import {GetXczxDetail, GetXczxList, GetXczxStat, GetYearStat} from "@/services/zhcj";
+import {addLayer, layerQueryGet, clearMap, layerControl, changeViewType, setScale} from "@/utils/map/AddLayer";
 import { getLayerByName } from "@/utils/data/all-layer-info";
 import { myBridge } from '@/utils/map/map'
 
@@ -275,22 +275,29 @@ export default {
         if (i.name === item.xz) {
           changeViewType('3D')
           layerControl('xczxymlxcsfc', false)
-          // addLayer(this.layer_qxsy.find(i => i.name === item.xz))
-
-          getQxsyToken().then(res => {
-            console.log(res);
-            i = {
-              ...i,
-              jwt: res.data
-            }
-            addLayer(i)
-          })
+
+          if(item.village !== '新建村'){
+            addLayer(this.layer_qxsy.find(i => i.name === item.xz))
+          }else{
+            addLayer(getLayerByName("新建村"))
+          }
+
+
+          // getQxsyToken().then(res => {
+          //   console.log(res);
+          //   i = {
+          //     ...i,
+          //     jwt: res.data
+          //   }
+          //   addLayer(i)
+          // })
           if (item.village !== '新建村'){
-            layerQueryGet(this.layer_xczx.url, `name='${item.village}'`, true, true, true, 10000, this.outlinecolor, 3)
+            layerQueryGet(this.layer_xczx.url, `name='${item.village}'`, true, true, true, 5000, this.outlinecolor, 3)
           }else {
-            layerQueryGet(process.env.VUE_APP_MAP_SERVICE +'/i3s_svc/qxsy_test_3/SceneServer', `name='${item.village}'`, true, true, true, 10000, this.outlinecolor, 3)
+            // layerQueryGet(process.env.VUE_APP_MAP_SERVICE +'/i3s_svc/qxsy_test_3/SceneServer', `name='${item.village}'`, true, true, true, 10000, this.outlinecolor, 3)
+            layerQueryGet('http://10.108.3.5/ags_feature_svc/nfgl/FeatureServer/0', "name='新建村'", true, true, true, 5000,this.outlinecolor,3)
           }
-
+          setScale(30000)
         }
         else {
           changeViewType('2D')

+ 4 - 3
src/views/deck/pages/zhcj_sub/ZhcjZdxm.vue

@@ -26,7 +26,7 @@
             <el-option v-for="item in xmTypeArr" :key="item.title" :label="item.title" :value="item.value"></el-option>
           </el-select>
           <el-select v-model="sort_xmqd.sj" placeholder="年度" class="select-default" popper-class="select-default-popper">
-            <el-option   label="全部" value=""></el-option>
+            <el-option   label="全部时间" value=""></el-option>
             <el-option v-for="item in yearArr" :key="item" :label="item+'年'" :value="item"></el-option>
           </el-select>
           <el-select v-model="sort_xmqd.xz" placeholder="乡镇" class="select-default" popper-class="select-default-popper">
@@ -157,7 +157,7 @@ export default {
       XZArr,
       yearArr: [],
       xmTypeArr: [
-        {title: '全部',value: 0},
+        {title: '全部类型',value: 0},
         {title: '重点项目',value: 2},
         {title: '都市项目',value: 1},
       ],
@@ -201,7 +201,8 @@ export default {
       }
       myBridge.bridgeContent.addEventListener(listen, this)
       addLayer(this.layer_zdxm)
-      this.$store.commit('changeToolLayers', [this.layer_zdxm])
+      this.addDsxmLayer(true)
+      this.$store.commit('changeToolLayers', [this.layer_zdxm,this.layer_dsxm])
     },
     showXmList(){
       GetXmList(this.sort_xmqd).then(res => {

+ 31 - 3
src/views/deck/pages/znfx_sub/ZnfxNcpcl.vue

@@ -129,7 +129,7 @@
       <div class="cr-b1">
         <div class="r1-sort">
           <el-date-picker
-            @change="getVegeExpect"
+            @change="changeYearMonth"
             v-model="sort_scbz.yearMonth"
             type="month"
             placeholder="选择月"
@@ -657,6 +657,11 @@ export default {
       list_jyzt: [],
       list_jyzt_total: 0,
       clqs: [],
+
+      scxl_time: {
+        startTime: "",
+        endTime: "",
+      }
     };
   },
   mounted() {
@@ -784,6 +789,18 @@ export default {
         new Date(today.valueOf() - 30 * 24 * 3600 * 1000),
         "yyyy-MM-dd"
       );
+
+      const thisYear = today.getFullYear();
+      const thisMonth = today.getMonth();
+      let lastMonth = thisMonth - 1;
+      const lastYear = lastMonth === -1 ? thisYear - 1 : thisYear;
+      lastMonth = lastMonth === -1 ? 12 : lastMonth
+      console.log(lastYear,lastMonth);
+
+      const firstDayOfLastMonth = new Date(lastYear, lastMonth, 1); // 获取上个月的第一天
+      const lastDayOfLastMonth = new Date(firstDayOfLastMonth.getTime() - 86400000); // 获取上个月的最后一天
+      this.scxl_time.startTime = lastYear + "-" + lastMonth + "-01"
+      this.scxl_time.endTime = formatDate(lastDayOfLastMonth,"yyyy-MM-dd")
     },
     getAllTownList(){
       getSnkdcAllTown().then(res => {
@@ -819,6 +836,17 @@ export default {
         this.tableData_vegeInOut = res.obj.list || [];
       });
     },
+    changeYearMonth(){
+      this.getVegeExpect()
+
+      let yearMonth = formatDate(new Date(this.sort_scbz.yearMonth),'yyyy-MM')
+      let firstDayOfLastMonth = new Date(yearMonth.split("-")[0], yearMonth.split("-")[1], 1);
+      let lastDayOfLastMonth = new Date(firstDayOfLastMonth.getTime() - 86400000);
+      this.scxl_time.startTime = yearMonth + "-01"
+      this.scxl_time.endTime = formatDate(lastDayOfLastMonth,"yyyy-MM-dd")
+      console.log(this.scxl_time);
+      this.getData_crb3(this.tab_crb3)
+    },
     getVegeExpect() {
       // this.sort_scbz.yearMonth
       getClfxScTableData(this.sort_scbz.townId || '',this.sort_scbz.yearMonth?formatDate(new Date(this.sort_scbz.yearMonth),'yyyy年MM月'):'').then(res => {
@@ -923,7 +951,7 @@ export default {
     },
     getData_crb3(val) {
       if (val === 1) {
-        GetScxlFarm().then((res) => {
+        GetScxlFarm(this.scxl_time.startTime,this.scxl_time.endTime).then((res) => {
           if (res?.obj?.list.length > 0) {
             res.obj.list.forEach(
               (row) => (row.totalSales = setDecimal(row.totalSales / 1000))
@@ -934,7 +962,7 @@ export default {
           }
         });
       } else if (val === 2) {
-        GetScxlCrop().then((res) => {
+        GetScxlCrop(this.scxl_time.startTime,this.scxl_time.endTime).then((res) => {
           if (res?.obj?.list.length > 0) {
             res.obj.list.forEach(
               (row) => (row.totalSales = setDecimal(row.totalSales / 1000))

+ 16 - 1
src/views/deck/pages/znfx_sub/ZnfxNzjy.vue

@@ -317,6 +317,7 @@ export default {
 							let temp = [];
 							arg.data.result.forEach(i => {
 								temp.push({
+                  ...i.attributes,
 									name: i.attributes.name,
 									x: i.attributes.x,
 									y: i.attributes.y
@@ -354,6 +355,12 @@ export default {
 			this.$store.commit('changeToolLayers', [this.layer_nymd])
 		},
 		handleLocate(item) {
+      console.log(item);
+      let pointSearchData = {
+        data: item,
+        title: "农药门店"
+      }
+      this.$store.commit('map/changePointSearchInfo',pointSearchData)
 			positionByPoint(item.x, item.y, true);
 		},
 		getMonthArr() {
@@ -417,13 +424,21 @@ export default {
 		},
 		getNymdSta() {
 			GetNymdSta(this.sort_mdtj).then(res => {
-				this.data_mdtj = res.data || [];
+        console.log(res);
+        this.data_mdtj = res.data || [];
 			});
 		},
 		handlePickMd(row) {
 			console.log(row)
 			if('x' in row) {
 				positionByPoint(row.x, row.y, true);
+        // console.log(this.data_nymd.filter(i => i.name === row.name));
+        let item = this.data_nymd.filter(i => i.name === row.name)[0]
+        let pointSearchData = {
+          data: item,
+          title: "农药门店"
+        }
+        this.$store.commit('map/changePointSearchInfo',pointSearchData)
 				this.detailShow = false
 			} else if(row.name) {
 				const {x,y} = this.data_nymd.find(i=>i.name===row.name)