Browse Source

1. 安装x2js解析包,实现地名地址搜索功能;2. 首页镇域调整为中心

Bella 2 năm trước cách đây
mục cha
commit
a9f0f291d2
7 tập tin đã thay đổi với 429 bổ sung124 xóa
  1. 2 1
      package.json
  2. 13 10
      public/static/config/config.js
  3. 3 1
      src/api/url.js
  4. 2 1
      src/main.js
  5. 31 0
      src/utils/request.js
  6. 374 111
      src/views/ComprehensiveAnalysis.vue
  7. 4 0
      vue.config.js

+ 2 - 1
package.json

@@ -28,7 +28,8 @@
     "vue-pdf": "^4.3.0",
     "vue-router": "^3.5.1",
     "vue-seamless-scroll": "^1.1.23",
-    "vuex": "^3.6.2"
+    "vuex": "^3.6.2",
+    "x2js": "^3.4.4"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~5.0.0",

+ 13 - 10
public/static/config/config.js

@@ -30,14 +30,19 @@ var systemConfig = {
     // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/dlg-fullcolor/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
     // 上海市标准底图
     // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/basemap-shanghai-normal-sh2000/mapserver?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+
     // 上海宝石蓝图
     // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/basemap-shanghai-gem-blue-sh2000/mapserver?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
     // 行政区图
     // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/admin-pudong-sh2k-district/mapserver?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
     // 淡雅蓝
     // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/basemap-shanghai-white-blue-sh2000/mapserver?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+
+    // 遥感影像图测试
+    // url:"http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/sat-2018s2/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM"
     // 调用了测绘院底图
     url: "http://10.242.181.28:8080/OneMapServer/rest/services/shmap_anhei/MapServer?token=HL2a2mO-uVdVvkeeX25BUL5cFIc2Q_FFlowrNYTWcBWOlJNoZWhUUOSQN0e6LG6S",
+
     // url:"http://aimap.pudong.sh:5236/maps/rest/services/darkmap-f/proxy",
     // minZoom: 1,
     // maxZoom: 12,
@@ -45,24 +50,23 @@ var systemConfig = {
   // 遥感影像图的相关配置项
   imageryLayer: {
     crs: "",
-    url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/sat-2022s2/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+    url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/air-2022/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
     // 按照宝石蓝底图分辨率
     // resolutions: [
-    //   132.29166666666666, 52.916666666666664, 26.458333333333332,
+    //   529.1666666666666,264.5833333333333,132.29166666666666, 52.916666666666664, 26.458333333333332,
     //   13.229166666666666, 5.291666666666666, 2.645833333333333,
     //   1.3229166666666665, 0.5291666666666666, 0.2645833333333333,
     //   0.13229166666666664,
     // ],
-    //
+    // //
     //529.167725002116, 264.583862501058
     // 按照测绘院分辨率虚拟的
     resolutions: [
-      132.2919312505292, 52.91677250021167,
-      26.458386250105836, 13.229193125052918, 5.291677250021167,
-      2.6458386250105836, 1.3229193125052918, 0.5291677250021167,
-      0.26458386250105836, 0.13229193125052918, 0.0529167725002,
-      0.0264583862501, 0.0132291931251, 0.00529167725, 0.002645838625,
-      0.0013229193125,
+      132.2919312505292, 52.91677250021167, 26.458386250105836,
+      13.229193125052918, 5.291677250021167, 2.6458386250105836,
+      1.3229193125052918, 0.5291677250021167, 0.26458386250105836,
+      0.13229193125052918, 0.0529167725002, 0.0264583862501, 0.0132291931251,
+      0.00529167725, 0.002645838625, 0.0013229193125,
     ],
     // minZoom: 0,
     // maxZoom: 14,
@@ -142,4 +146,3 @@ var caseColorChange = {
   isPointColor: [0, 230, 255],
   notPointColor: [0, 100, 240],
 };
-

+ 3 - 1
src/api/url.js

@@ -40,5 +40,7 @@ export default {
   // 动态查询条件
   getContentInfoWhere: "/audit/audit/getContentInfoWhere",
   // 文件上传
-  proxyDmsFileUploadFile: "/dms/file/uploadFile"
+  proxyDmsFileUploadFile: "/dms/file/uploadFile",
+  // 大数据中心地名地址服务
+  getAddressService:"/operation"
 };

+ 2 - 1
src/main.js

@@ -12,7 +12,7 @@ import "./assets/global.css";
 import SvgIcon from "@/components/SvgIcon";
 Vue.component("svg-icon", SvgIcon);
 import { drag } from "./directives/drag";
-import { get, post, postform, getFile } from "./utils/request.js";
+import { get, post, postform, getFile,getAddressService } from "./utils/request.js";
 import urls from "./api/url";
 import CryptoJS from "./utils/publicFunction.js";
 // 引入dayjs库
@@ -25,6 +25,7 @@ Vue.directive("drag", drag);
 Vue.prototype.$CryptoJS = CryptoJS;
 Vue.prototype.$Post = post;
 Vue.prototype.$Get = get;
+Vue.prototype.$GetAddress = getAddressService
 Vue.prototype.$GetFile = getFile;
 Vue.prototype.$Echarts = echarts;
 Vue.prototype.$dayjs = dayjs;

+ 31 - 0
src/utils/request.js

@@ -86,6 +86,36 @@ function get(url, params) {
   });
 }
 
+/**
+ * 调用大数据中心地名地址服务方法
+ */
+function getAddressService(url, params) {
+  return new Promise((resolve, reject) => {
+    service({
+      method: "GET",
+      url,
+      params: params,
+      headers: {
+        "Content-Type": "text/plain;charset=UTF-8",
+        // token: localStorage.getItem("TOKEN"),
+        APPID: "00d494ff5d7b27fae263410627ba52bd",
+        AUTHKEY: "Mbz2oAxXb8J8RyB5",
+        ClientId: "com.pudong.002456271.00d494ff5d7b27fae263410627ba52bd",
+        OperationCode:
+          "com.pudong.esb.catalog.08455183847545f58e1cbf745fb5fb73.operation",
+        AccessKey:
+          "lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+      },
+    })
+      .then((res) => {
+        resolve(res);
+      })
+      .catch((err) => {
+        reject(err);
+      });
+  });
+}
+
 function getFile(url) {
   return new Promise((resolve, reject) => {
     fileService({
@@ -254,4 +284,5 @@ export {
   delform,
   postFile,
   getFile,
+  getAddressService,
 };

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 374 - 111
src/views/ComprehensiveAnalysis.vue


+ 4 - 0
vue.config.js

@@ -112,6 +112,10 @@ module.exports = {
         target: "http://10.220.106.75:10014",
         changeOrigin: true, // 允许跨域
       },
+      "/operation": {
+        target: "http://10.220.106.75:10021",
+        changeOrigin: true, // 允许跨域
+      },
     },
   },
 };

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác