Sfoglia il codice sorgente

1.疑点数据添加数据来源; 2. 法律法规字段调整

Bella 2 anni fa
parent
commit
8c05baf07e

+ 2 - 1
package.json

@@ -15,11 +15,12 @@
     "deep-clone": "^3.0.3",
     "docx-preview": "^0.1.4",
     "echarts": "^5.4.0",
-    "element-ui": "^2.15.10",
+    "element-ui": "^2.15.13",
     "html2canvas": "^1.4.1",
     "jquery": "^3.6.1",
     "jszip": "^3.10.1",
     "proj4": "^2.8.1",
+    "shapefile": "^0.6.6",
     "shpjs": "^4.0.4",
     "svg-sprite-loader": "^6.0.11",
     "vue": "^2.6.14",

+ 40 - 20
public/static/config/config.js

@@ -6,30 +6,38 @@
  */
 var systemConfig = {
   // 经度偏移矫正值 -- WGS84转上海2000
-  lonCorrectParams:0,
-  // lonCorrectParams: 0.192,
+  // lonCorrectParams: 0,
+  lonCorrectParams: 0.19195,
   // 纬度偏移校正值 -- WGS84转上海2000
-  latCorrectParams:0,
-  // latCorrectParams: -0.00018,
+  // latCorrectParams: 0,
+  latCorrectParams: -0.00011,
   assetsUrl: "http://localhost:2013",
   mapViewer: {
     center: [31.14785322514787, 121.50195320451814],
     zoom: 1,
   },
   terrainMap: {
-    url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/dlg-fullcolor/proxy",
+    url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/dlg-fullcolor/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
   },
   // 暂时无法使用
   // token: "65463DEE-620A-0ED5-2385-17ECD07CD351", //公共地图资源token
   // mapService: "http://121.43.55.7:10011/proxy/", //地图服务,
   blueBlackMap: {
     crs: "",
-    // 政务图--无法查看
-    // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/basemap-as/proxy",
-    // 地形图 -- 无法看
-    // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/dlg-fullcolor/proxy",
+    // 上海市政务图--暗绿色 0--9分级
+    // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/basemap-as/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+    // 地形图
+    // 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://10.242.181.28:8080/OneMapServer/rest/services/shmap_anhei/MapServer?token=xvdp5nmSa6UoSQf20x7sk4l2DDQNicrUHaVrvm40k9cf-Iy8Z_rHGAMty2ZFIqH_",
+    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,
@@ -38,15 +46,26 @@ var systemConfig = {
   imageryLayer: {
     crs: "",
     url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/sat-2022s2/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+    // 按照宝石蓝底图分辨率
+    // resolutions: [
+    //   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,
+    // minZoom: 0,
+    // maxZoom: 14,
   },
   imageryLayerSat2022s2: {
     crs: "",
@@ -120,6 +139,7 @@ var targetColor = [
 
 // 疑点,非疑点下的图斑颜色设置
 var caseColorChange = {
-  "isPointColor":[0, 230, 255],
-  "notPointColor":[0, 100, 240],
-}
+  isPointColor: [0, 230, 255],
+  notPointColor: [0, 100, 240],
+};
+

+ 2 - 2
src/components/common/BottomForm/SameScreenComparison.vue

@@ -173,7 +173,7 @@ export default {
       let params = new FormData();
       params.append("columnId", 35);
       params.append("states", 3);
-      params.append("pageSize", 30);
+      params.append("pageSize", 100);
       params.append("page", 0);
       let sortparam = [{ field: "c_year", orderByType: 1 }];
       params.append("orderBy", JSON.stringify(sortparam));
@@ -189,7 +189,7 @@ export default {
               active: v.c_defined_show ? v.c_defined_show : false,
               basemapType: v.basemap,
               year: v.c_year,
-              abbr:v.c_abbr
+              abbr: v.c_abbr,
             });
           });
           this.mapList = map2DViewer.baseMapCollection.map((v) => {

+ 153 - 115
src/components/common/BottomForm/UploadingDataShp.vue

@@ -13,27 +13,20 @@
       </div>
     </template>
     <div id="uploadingBox">
-      <!-- <el-upload
+      <el-upload
         class="upload-demo"
+        ref="upload"
         drag
-        action="https://jsonplaceholder.typicode.com/posts/"
-        :on-preview="handlePreview"
-        :on-remove="handleRemove"
-        :on-success="handleSuccess"
-        :before-remove="beforeRemove"
-        :before-upload="beforeAvatarUpload"
-        accept="shp"
-        multiple
-        :on-exceed="handleExceed"
-        :file-list="fileList"
+        :http-request="uploadSectionFile"
+        action="#"
+        :limit="1"
+        :show-file-list="false"
+        accept=".zip,.shp"
       >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-        <div class="el-upload__tip" slot="tip">
-          *仅支持Geojson格式文件,且不超过5MB
-        </div>
-      </el-upload> -->
-      <el-upload
+      </el-upload>
+      <!-- <el-upload
         class="upload-demo"
         drag
         action="https://jsonplaceholder.typicode.com/posts/"
@@ -42,7 +35,6 @@
         :on-success="handleSuccess"
         :before-remove="beforeRemove"
         :before-upload="beforeAvatarUpload"
-        accept="shp"
         multiple
         :on-exceed="handleExceed"
         :file-list="fileList"
@@ -52,7 +44,7 @@
         <div class="el-upload__tip" slot="tip">
           *仅支持Geojson格式文件,且不超过5MB
         </div>
-      </el-upload>
+      </el-upload> -->
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button @click="clearDialogVisible()">取 消</el-button>
@@ -63,17 +55,20 @@
 
 <script>
 /**
- * 上传数据功能 -- 支持shp
+ * 底部菜单(上传数据)组件
  * @author: LiuMengxiang
- * @Date: 2023年2月27
+ * @Date: 2022年11月21-25
  */
 import shp from "shpjs";
+import JsZip from "jszip";
 export default {
-  name: "UploadingDataShp",
+  name: "UploadingData",
   components: {},
   data() {
     return {
       // 文件目标路径
+      upName: null,
+      shpFile: null,
       filePath: "",
       // 上传文件列表
       fileList: [],
@@ -123,110 +118,153 @@ export default {
       // 修改父级菜单变量(弹窗显示状态和显示底部菜单)
       this.$emit("changeShowBottomMenusStatus", true);
     },
-    // 上传数据表单提交
-    subMitDialogVisible() {
-      let fileDataList = this.fileDataList;
-      for (let key in fileDataList) {
-        console.log(fileDataList[key],"上传");
-        const dataJson = JSON.parse(fileDataList[key]);
-        console.log(dataJson);
-        // this.uploadRENDER(dataJson);
+    // 上传判断
+    uploadSectionFile(params) {
+      const file = params.file;
+      const fileName = file.name;
+      const isZip = fileName.indexOf("zip") !== -1;
+      const isShp = fileName.indexOf("shp") !== -1;
+      this.upName = fileName; //项目中需要传文件名字,所以这里保存下来
+      if (!(isZip || isShp)) {
+        this.$message.error("只能上传zip、shp格式!");
+        this.abortLoad(); //因为手动上传,所以这里是取消上传
+        return false;
+      } else {
+        isZip ? this.openZip(file) : this.toGeo(file);
       }
-      // setTimeout(() => {
-      //   if (map2DViewer.analysisGroups[`upload_layer_unique`]) {
-      //     this.$message.success("数据上传成功!");
-      //     map2DViewer.map.fitBounds(
-      //       map2DViewer.analysisGroups[`upload_layer_unique`].getBounds()
-      //     );
-      //   }
-      //   let options = {
-      //     id: "upload_layer_unique",
-      //     label: "我的图层1",
-      //   };
-      //   this.$bus.$emit("addUploadLayerEvent", options);
-      // }, 1000);
-
-      this.clearDialogVisible();
     },
-    // 文件列表移除文件时
-    handleRemove(file, fileList) {
-      this.fileList = fileList;
-      delete this.fileDataList[file.uid];
+    // 为zip时,读取压缩包,选取shp文件
+    openZip(data) {
+      let newZip = new JsZip();
+      newZip.loadAsync(data).then((file) => {
+        // 压缩包里的内容file,files
+        const fileList = Object.keys(file.files);
+        const pattern = new RegExp(/\S\.shp$/);
+        this.shpFile = fileList.find((i) => pattern.test(i));
+        newZip
+          .file(this.shpFile)
+          .async("arraybuffer")
+          .then((content) => {
+            // 文件中的内容
+            this.shapefileOpen(content);
+          })
+          .catch((err) => {
+            // 是否是合法的zip包,解决rar包改后缀zip
+            console.log(err);
+            this.$message.error("请上传正确格式的文件!");
+          });
+      });
     },
+    // 转ArrayBuffer
+    toGeo(data) {
+        const reader = new FileReader()
+        reader.readAsArrayBuffer(data)
+        reader.onload = (e) =>{
+            this.shapefileOpen(this.result)
+        }
+    },
+    shapefileOpen(content){
+        // open(content).then()
+    }
+    // 上传数据表单提交
+    // subMitDialogVisible() {
+    //   let fileDataList = this.fileDataList;
+    //   for (let key in fileDataList) {
+    //     const dataJson = JSON.parse(fileDataList[key]);
+    //     this.uploadRENDER(dataJson);
+    //   }
+    //   setTimeout(() => {
+    //     if (map2DViewer.analysisGroups[`upload_layer_unique`]) {
+    //       this.$message.success("数据上传成功!");
+    //       map2DViewer.map.fitBounds(
+    //         map2DViewer.analysisGroups[`upload_layer_unique`].getBounds()
+    //       );
+    //     }
+    //     let options = {
+    //       id: "upload_layer_unique",
+    //       label: "我的图层1",
+    //     };
+    //     this.$bus.$emit("addUploadLayerEvent", options);
+    //   }, 1000);
+
+    //   this.clearDialogVisible();
+    // },
+    // 文件列表移除文件时
+    // handleRemove(file, fileList) {
+    //   this.fileList = fileList;
+    //   delete this.fileDataList[file.uid];
+    // },
     // 点击文件列表中已上传的文件时
-    handlePreview(file) {},
+    // handlePreview(file) {},
     // 文件超出个数限制时
-    handleExceed(files, fileList) {
-      // this.$message.warning(
-      //   `当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
-      //     files.length + fileList.length
-      //   } 个文件`
-      // );
-    },
+    // handleExceed(files, fileList) {
+    // this.$message.warning(
+    //   `当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
+    //     files.length + fileList.length
+    //   } 个文件`
+    // );
+    // },
     // 删除文件之前
-    beforeRemove(file, fileList) {
-      this.$message.success(`文件${file.name}移除成功!`);
-      return true;
-    },
+    // beforeRemove(file, fileList) {
+    //   this.$message.success(`文件${file.name}移除成功!`);
+    //   return true;
+    // },
     // 文件上传成功时
-    handleSuccess(response, file, fileList) {
-      console.log(file,"handleSuccess");
-      this.getActionData(file);
-    },
+    // handleSuccess(response, file, fileList) {
+    //   this.getActionData(file);
+    // },
     // 根据上传的文件渲染到地图中
-    uploadRENDER(geoJson) {
-      // 呈现数据已经成功
-      let firstPolygon = JSON.parse(JSON.stringify(geoJson));
-      // let uniqueId = firstPolygon.name;
-      let uniqueId = `upload_layer_unique`;
-      if (!map2DViewer.analysisGroups[uniqueId]) {
-        map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
-        map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
-        if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
-          this.$store.state.selectSelectDataMap["singlePolygon"] = [];
-        }
+    // uploadRENDER(geoJson) {
+    //   // 呈现数据已经成功
+    //   let firstPolygon = JSON.parse(JSON.stringify(geoJson));
+    //   // let uniqueId = firstPolygon.name;
+    //   let uniqueId = `upload_layer_unique`;
+    //   if (!map2DViewer.analysisGroups[uniqueId]) {
+    //     map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
+    //     map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
+    //     if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
+    //       this.$store.state.selectSelectDataMap["singlePolygon"] = [];
+    //     }
 
-        console.log("上传文件读取到的数据", firstPolygon);
-        firstPolygon.features.forEach((ele, index) => {
-          let cid = `myLayer_${index}`;
-          let geometry = JSON.stringify(ele);
-          this.$store.state.mapMethodsCollection
-            .get("RENDER")
-            .addSinglePolygon(
-              geometry,
-              cid,
-              "rgb(0,255,255)",
-              uniqueId,
-              "我的图层",
-              "土地资源"
-            );
-        });
-      }
-    },
-    // 读取file对象内容
-    getActionData(file) {
-      console.log(file,"检测上传的数据");
-      const __this = this;
-      var reader = new FileReader(); // 新建一个FileReader
-      reader.readAsText(file.raw, "UTF-8"); // 读取文件
-      reader.onload = function (evt) {
-        __this.fileList.push(file);
-        __this.fileDataList[file.uid] = evt.target.result;
-      };
-    },
+    //     console.log("上传文件读取到的数据", firstPolygon);
+    //     firstPolygon.features.forEach((ele, index) => {
+    //       let cid = `myLayer_${index}`;
+    //       let geometry = JSON.stringify(ele);
+    //       this.$store.state.mapMethodsCollection
+    //         .get("RENDER")
+    //         .addSinglePolygon(
+    //           geometry,
+    //           cid,
+    //           "rgb(0,255,255)",
+    //           uniqueId,
+    //           "我的图层",
+    //           "土地资源"
+    //         );
+    //     });
+    //   }
+    // },
+    // // 读取file对象内容
+    // getActionData(file) {
+    //   const __this = this;
+    //   var reader = new FileReader(); // 新建一个FileReader
+    //   reader.readAsText(file.raw, "UTF-8"); // 读取文件
+    //   reader.onload = function (evt) {
+    //     __this.fileList.push(file);
+    //     __this.fileDataList[file.uid] = evt.target.result;
+    //   };
+    // },
     // 上传文件之前
-    beforeAvatarUpload(file) {
-      // const isJPG = file.name.indexOf(".geojson") === file.name.length - 8;
-      const isShp = file.name.indexOf(".zip") === file.name.length - 4
-      const isLt10M = file.size / 1024 / 1024 < 10;
-      if (!isShp) {
-        this.$message.error("仅支持shp格式的压缩包!");
-      }
-      if (!isLt10M) {
-        this.$message.error("上传文件大小不能超过 10MB!");
-      }
-      return isShp && isLt10M;
-    },
+    // beforeAvatarUpload(file) {
+    //   const isJPG = file.name.indexOf(".geojson") === file.name.length - 8;
+    //   const isLt5M = file.size / 1024 / 1024 < 5;
+    //   if (!isJPG) {
+    //     this.$message.error("仅支持Geojson格式文件!");
+    //   }
+    //   if (!isLt5M) {
+    //     this.$message.error("上传文件大小不能超过 5MB!");
+    //   }
+    //   return isJPG && isLt5M;
+    // },
   },
   watch: {},
 };

+ 1 - 2
src/components/map/Map.vue

@@ -53,8 +53,7 @@ export default {
                 let geometry = v.geometry;
                 // 经纬度等上海2000转为经纬度坐标后再重新修改
                 let coord = JSON.parse(geometry).geometry.coordinates[0];
-                let correctCoord = publicFun.latLngsCorrection(coord);
-                let coordinates = publicFun.latLngsToReverse(correctCoord);
+                let coordinates = publicFun.latLngsToReverse(coord);
                 let polygon = L.polygon(coordinates, {
                   color: v.color,
                   weight: 3,

+ 176 - 99
src/components/map/MapHolder.vue

@@ -1,9 +1,18 @@
 <template>
   <div id="map2DViewer">
     <!-- 特殊地图属性弹窗 -- 有审计功能 -->
-    <CaseAuditPopup v-show="auditPopupShow" :tableObj="auditRefTableObj" :defaultStatus="defaultStatus" ref="auditRef" />
+    <CaseAuditPopup
+      v-show="auditPopupShow"
+      :tableObj="auditRefTableObj"
+      :defaultStatus="defaultStatus"
+      ref="auditRef"
+    />
     <!-- 通用地图属性弹窗 -- 无审计功能 -->
-    <NormalAttrPopup v-show="normalAttrPopupShow" :tableObj="tableObj" ref="normalRef" />
+    <NormalAttrPopup
+      v-show="normalAttrPopupShow"
+      :tableObj="tableObj"
+      ref="normalRef"
+    />
     <LabelCasePopup v-show="labelDetailsPopupShow" ref="labelRef" />
   </div>
 </template>
@@ -22,7 +31,7 @@ export default {
   components: {
     CaseAuditPopup,
     NormalAttrPopup,
-    LabelCasePopup
+    LabelCasePopup,
   },
   data() {
     return {
@@ -50,15 +59,15 @@ export default {
         镇域名称: "--",
         "面积(平方米)": "--",
         土地类型: "--",
-        图斑编号: "--"
+        图斑编号: "--",
       },
       auditRefTableObj: {
         镇域名称: "--",
         "面积(平方米)": "--",
         图层构成: "--",
-        性质: "--"
+        性质: "--",
       },
-      defaultStatus: "未标记"
+      defaultStatus: "未标记",
     };
   },
   created() {},
@@ -91,7 +100,7 @@ export default {
       deleteGroupFromMap: this.deleteGroupFromMap,
       drawGeometry: this.drawGeometry,
       deleteGeometry: this.deleteGeometry,
-      addTiledMapLayer: this.addTiledMapLayer
+      addTiledMapLayer: this.addTiledMapLayer,
     });
   },
   beforeDestroyed() {
@@ -112,7 +121,7 @@ export default {
     // 监听当前菜单
     getCurrentMenu() {
       return this.$store.state.navSelect;
-    }
+    },
   },
   watch: {
     getLabelCaseBtnStatus(val) {
@@ -155,11 +164,23 @@ export default {
         this.$nextTick(() => {
           this.getJSonData();
         });
-      }
+      },
       // immediate: true
-    }
+    },
   },
   methods: {
+    // 测试宝石蓝底图
+    addDarkmap(url) {
+      let layer = L.esri.tiledMapLayer({
+        tileSize: 512,
+        url: url,
+        minZoom: 0,
+        minNativeZoom: 3,
+        maxNativeZoom: 7,
+        maxZoom: 14,
+      });
+      return layer;
+    },
     // 添加tiledMapLayer图层 -- 针对arcgis rest services
     addTiledMapLayer(url) {
       let layer = L.esri.tiledMapLayer({
@@ -168,7 +189,7 @@ export default {
         minZoom: 0,
         minNativeZoom: 0,
         maxNativeZoom: 7,
-        maxZoom: 14
+        maxZoom: 14,
       });
       return layer;
     },
@@ -180,7 +201,7 @@ export default {
     stopLabelCase() {
       if (map2DViewer.measureTool) {
         map2DViewer.setDrawTool({
-          action: "remove"
+          action: "remove",
         });
       }
     },
@@ -211,13 +232,13 @@ export default {
             if ($(`#${str}_id a`)) {
               $(`#${str}_id a`)
                 .eq(0)
-                .click(e => {
+                .click((e) => {
                   this.$store.state.lawPopupShow = true;
                   this.$store.state.lawSourceType = sourceType;
                 });
               $(`#${str}_id a`)
                 .eq(1)
-                .click(e => {
+                .click((e) => {
                   // 触发综合分析右侧面板点击事件
                   this.$bus.$emit("viewDetailsPopup", geojsonData);
                 });
@@ -272,11 +293,17 @@ export default {
           // 下拉框内容
           if ($(`#${str}_id .center-table-item-special select`)) {
             if (this.caseStatusMap.has(str)) {
-              $(`#${str}_id .center-table-item-special select`).val(this.caseStatusMap.get(str));
+              $(`#${str}_id .center-table-item-special select`).val(
+                this.caseStatusMap.get(str)
+              );
               let inputStatus = "";
               if (this.caseStatusMap.has(str)) {
-                this.caseStatusMap.get(str) === "isTrue" && $(`#${str}_id .center-table-item-special input`).val("疑点");
-                !this.caseStatusMap.get(str) === "isTrue" && $(`#${str}_id .center-table-item-special input`).val("非疑点");
+                this.caseStatusMap.get(str) === "isTrue" &&
+                  $(`#${str}_id .center-table-item-special input`).val("疑点");
+                !this.caseStatusMap.get(str) === "isTrue" &&
+                  $(`#${str}_id .center-table-item-special input`).val(
+                    "非疑点"
+                  );
               }
             }
           }
@@ -285,13 +312,13 @@ export default {
           if ($(`#${str}_id a`)) {
             $(`#${str}_id a`)
               .eq(0)
-              .click(e => {
+              .click((e) => {
                 this.$store.state.lawPopupShow = true;
                 this.$store.state.lawSourceType = sourceType;
               });
             $(`#${str}_id a`)
               .eq(1)
-              .click(e => {
+              .click((e) => {
                 // 触发综合分析右侧面板点击事件
 
                 this.$bus.$emit("viewDetailsPopup", geojsonData);
@@ -299,7 +326,7 @@ export default {
           }
           // input添加点击事件
           if ($(`#${str}_id input`)[1]) {
-            $(`#${str}_id input`).click(e => {
+            $(`#${str}_id input`).click((e) => {
               switch (e.target.defaultValue) {
                 case "取消":
                   this.cancelBtnEvent();
@@ -334,7 +361,7 @@ export default {
           console.log($(`#${str}_id textarea`).val(), "textarea");
           $(`#${str}_id`).css("height", "100%");
 
-          $(`#${str}_id input`).click(e => {
+          $(`#${str}_id input`).click((e) => {
             console.log(e.target.defaultValue);
             switch (e.target.defaultValue) {
               case "取消":
@@ -361,12 +388,12 @@ export default {
       if (selectVal === "isTrue") {
         map2DViewer.polygons[str].setStyle({
           color: `rgb(${caseColorChange["isPointColor"][0]},${caseColorChange["isPointColor"][1]},${caseColorChange["isPointColor"][2]})`,
-          weight: 4
+          weight: 4,
         });
       } else {
         map2DViewer.polygons[str].setStyle({
           color: `rgb(${caseColorChange["notPointColor"][0]},${caseColorChange["notPointColor"][1]},${caseColorChange["notPointColor"][2]})`,
-          weight: 4
+          weight: 4,
         });
       }
       console.log(map2DViewer.polygons[str]);
@@ -379,32 +406,42 @@ export default {
         // 修改人员名称
         c_editor_name: localStorage.getItem("USER_NAME"),
         // 修改人员ID
-        c_editorid: localStorage.getItem("USER_ID")
+        c_editorid: localStorage.getItem("USER_ID"),
       };
 
       let modifyParams = new FormData();
       modifyParams = {
         columnId: columnId,
         modelId: modelId,
-        content: JSON.stringify(obj)
+        content: JSON.stringify(obj),
       };
-      this.$Post(this.urlsCollection.updateContent, modifyParams).then(res => {
-        if (res.code === 200) {
-          this.$message.success("数据修改成功");
-          map2DViewer.map.closePopup();
+      this.$Post(this.urlsCollection.updateContent, modifyParams).then(
+        (res) => {
+          if (res.code === 200) {
+            this.$message.success("数据修改成功");
+            map2DViewer.map.closePopup();
 
-          switch (selectVal) {
-            case "isTrue":
-              this.$store.state.mapMethodsCollection.get("METHODS").changeCaseBoolean(str, "疑点");
-              this.$store.state.mapMethodsCollection.get("METHODS").changeSortMethod("疑点");
-              break;
-            case "isFalse":
-              this.$store.state.mapMethodsCollection.get("METHODS").changeCaseBoolean(str, "非疑点");
-              this.$store.state.mapMethodsCollection.get("METHODS").changeSortMethod("非疑点");
-              break;
+            switch (selectVal) {
+              case "isTrue":
+                this.$store.state.mapMethodsCollection
+                  .get("METHODS")
+                  .changeCaseBoolean(str, "疑点");
+                this.$store.state.mapMethodsCollection
+                  .get("METHODS")
+                  .changeSortMethod("疑点");
+                break;
+              case "isFalse":
+                this.$store.state.mapMethodsCollection
+                  .get("METHODS")
+                  .changeCaseBoolean(str, "非疑点");
+                this.$store.state.mapMethodsCollection
+                  .get("METHODS")
+                  .changeSortMethod("非疑点");
+                break;
+            }
           }
         }
-      });
+      );
     },
     cancelBtnEvent() {
       map2DViewer.map.closePopup();
@@ -429,7 +466,13 @@ export default {
         } else {
           geoName = $(`#${str}_id input`).eq(0).val();
           let coordinates = [data.points];
-          let geometry = publicFun.generateGeoJSON(title, des, geoType, coordinates, geoName);
+          let geometry = publicFun.generateGeoJSON(
+            title,
+            des,
+            geoType,
+            coordinates,
+            geoName
+          );
           let params = new FormData();
           let newGeojson = JSON.stringify(geometry);
           myLabelNameMap.set(geoName, newGeojson);
@@ -437,11 +480,11 @@ export default {
             geojson: newGeojson,
             type: geoType,
             userId: Number(localStorage.getItem("USER_ID")),
-            sourceId: 0
+            sourceId: 0,
           };
 
           this.$Post(this.urlsCollection.addConllection, params).then(
-            res => {
+            (res) => {
               if (res.code == 200) {
                 // 标记成功后删除保存的原有名称
                 myLabelNameMap.delete(geoName);
@@ -451,33 +494,36 @@ export default {
                 paramData = {
                   userId: Number(localStorage.getItem("USER_ID")),
                   sourceId: 0,
-                  pageSize: 10
+                  pageSize: 10,
                 };
                 // 暂存map中刚刚保存的数据
-                this.$Post(this.urlsCollection.selectByUser, paramData).then(userRes => {
-                  if (userRes.code === 200) {
-                    if (userRes.content.length > 0) {
-                      this.$store.state.myLabelPointsArr = [];
-                      this.$store.state.myLabelPointsArr = userRes.content.map(v => {
-                        if (JSON.stringify(geometry) === v.geojson) {
-                          sessionStorage.setItem("myLabelPointsId", v.id);
-                        }
-                        return {
-                          id: v.id,
-                          geojson: v.geojson,
-                          type: v.type
-                        };
-                      });
-                      // 判断刚刚暂存的数据,并调用小眼睛的方法
+                this.$Post(this.urlsCollection.selectByUser, paramData).then(
+                  (userRes) => {
+                    if (userRes.code === 200) {
+                      if (userRes.content.length > 0) {
+                        this.$store.state.myLabelPointsArr = [];
+                        this.$store.state.myLabelPointsArr =
+                          userRes.content.map((v) => {
+                            if (JSON.stringify(geometry) === v.geojson) {
+                              sessionStorage.setItem("myLabelPointsId", v.id);
+                            }
+                            return {
+                              id: v.id,
+                              geojson: v.geojson,
+                              type: v.type,
+                            };
+                          });
+                        // 判断刚刚暂存的数据,并调用小眼睛的方法
+                      }
                     }
+                    // 更新时调用一次搜索接口
                   }
-                  // 更新时调用一次搜索接口
-                });
+                );
               }
               // 保存后需要删除地图上的标记
               this.reStartLabelCase();
             },
-            error => {
+            (error) => {
               console.log("标记疑点保存失败!", error);
               this.reStartLabelCase();
             }
@@ -492,9 +538,13 @@ export default {
         // map2DViewer.jlMap = L.tileLayer(
         //   "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d"
         // ).addTo(map2DViewer.map);
-        map2DViewer.jlMap = this.addTiledMapLayer(systemConfig.imageryLayerSat2022s2.url).addTo(map2DViewer.map);
+        map2DViewer.jlMap = this.addTiledMapLayer(
+          systemConfig.imageryLayerSat2022s2.url
+        ).addTo(map2DViewer.map);
 
-        map2DViewer.jlControl = L.control.sideBySide(map2DViewer.map, map2DViewer.jlMap).addTo(map2DViewer.map);
+        map2DViewer.jlControl = L.control
+          .sideBySide(map2DViewer.map, map2DViewer.jlMap)
+          .addTo(map2DViewer.map);
       } else if (map2DViewer.map.hasLayer(map2DViewer.jlMap)) {
         map2DViewer.map.removeControl(map2DViewer.jlControl);
         map2DViewer.map.removeLayer(map2DViewer.jlMap);
@@ -532,7 +582,7 @@ export default {
     initDraw() {
       if (!map2DViewer.measureTool) {
         // 引入疑点标记绘制方法
-        map2DViewer.drawToolFire = data => {
+        map2DViewer.drawToolFire = (data) => {
           // 纬经度
           if (data && data.points.length >= 1) {
             let geoType = null;
@@ -571,20 +621,20 @@ export default {
           color: "red",
           font_size: "14px",
           closeButton: true,
-          iconUrl: "../../static/plugins/draw-plugin/images/marker-icon.png"
+          iconUrl: "../../static/plugins/draw-plugin/images/marker-icon.png",
         });
       }
     },
 
     mapInit: function () {
-      // 遥感影像图层crs
+      // 遥感影像图层crs -- original
       let crs = new L.Proj.CRS(
         "EPSG:0986",
         "+proj=tmerc +lat_0=0 +lon_0=121.2751921 +k=1 +x_0=0 +y_0=-3457147.81 +ellps=krass +units=m +no_defs",
         {
           resolutions: systemConfig.imageryLayer.resolutions,
           origin: [-66000, 75000],
-          bounds: L.bounds([-65000, -76000], [75000, 72000])
+          bounds: L.bounds([-65000, -76000], [75000, 72000]),
         }
       );
 
@@ -594,13 +644,15 @@ export default {
         minZoom: systemConfig.imageryLayer.minZoom,
         maxZoom: systemConfig.imageryLayer.maxZoom,
         attributionControl: false,
-        zoomControl: false
+        zoomControl: false,
         // preferCanvas: true,
       }).setView(systemConfig.mapViewer.center, systemConfig.mapViewer.zoom);
 
       //添加默认图层
       let guid = publicFun.buildGuid("baseLayer");
-      let layer = this.addTiledMapLayer(systemConfig.blueBlackMap.url).addTo(map2DViewer.map);
+      let layer = this.addTiledMapLayer(systemConfig.blueBlackMap.url).addTo(
+        map2DViewer.map
+      );
       map2DViewer.layers["darkmap"] = layer;
 
       let imageryLayer = this.addTiledMapLayer(systemConfig.imageryLayer.url);
@@ -614,14 +666,16 @@ export default {
         map2DViewer.groups["浦东新区_polygon"].remove();
       }
       // 请求并渲染新的区域图层
-      get("./static/json/simplified_pdgeojson.json", "").then(geoJson => {
+      get("./static/json/simplified_pdgeojson.json", "").then((geoJson) => {
         // 存放所有的面数据
         map2DViewer.groups["浦东新区_polygon"] = L.featureGroup();
         map2DViewer.groups["浦东新区_label"] = L.featureGroup();
         map2DViewer.groups["浦东新区_polygon"].addTo(map2DViewer.map);
         map2DViewer.groups["浦东新区_label"].addTo(map2DViewer.map);
-        geoJson.features.map(feature => {
-          let correctCordArr = JSON.parse(JSON.stringify(feature.geometry.coordinates));
+        geoJson.features.map((feature) => {
+          let correctCordArr = JSON.parse(
+            JSON.stringify(feature.geometry.coordinates)
+          );
           let newCorrectCoordArr = publicFun.latLngsCorrection(correctCordArr);
           feature.geometry.coordinates = newCorrectCoordArr;
           // if (
@@ -662,7 +716,10 @@ export default {
         this.getJSonDataToStreet("", "");
         // 切换到首页时需定位到当前图层
         if (this.$store.state.homeSpecialTown === "全部") {
-          this.setView(townLocationMap.get(this.$store.state.homeSpecialTown), 0);
+          this.setView(
+            townLocationMap.get(this.$store.state.homeSpecialTown),
+            0
+          );
         } else {
           let polygon = townPolygonMap.get(this.$store.state.homeSpecialTown);
           map2DViewer.map.fitBounds(polygon.getBounds());
@@ -677,7 +734,6 @@ export default {
       }
     },
     setView: function (coord, zoom) {
-      // coord = publicFun.latLngsCorrection(coord);
       let center = L.latLng(coord[0], coord[1]);
       map2DViewer.map.setView(center, zoom);
     },
@@ -694,7 +750,7 @@ export default {
         weight: 3,
         fillColor: this.getColor(name),
         opacity: 1,
-        fillOpacity: 0.4
+        fillOpacity: 0.4,
       }).addTo(map2DViewer.groups["浦东新区_polygon"]);
 
       center = JSON.parse(JSON.stringify(center)).geometry.coordinates;
@@ -707,25 +763,25 @@ export default {
           radius: 10,
           weight: 1,
           fillOpacity: 0,
-          color: "#e6d273"
+          color: "#e6d273",
         });
         wmarker.bindLabel(feature.properties.NAME, {
           noHide: true,
           clickable: true,
-          offset: [-25, 10]
+          offset: [-25, 10],
         });
         wmarker.addTo(map2DViewer.groups["浦东新区_label"]);
         let circle1 = L.circleMarker(center, {
           radius: 8,
           weight: 1,
           fillOpacity: 0,
-          color: "#e6d273"
+          color: "#e6d273",
         }).addTo(map2DViewer.groups["浦东新区_polygon"]);
         let circle2 = L.circleMarker(center, {
           radius: 5,
           weight: 1,
           fillOpacity: 1,
-          color: "#e6d273"
+          color: "#e6d273",
         }).addTo(map2DViewer.groups["浦东新区_polygon"]);
       }
     },
@@ -764,37 +820,48 @@ export default {
      * @modelId -- modelId
      * @columnId -- columnId
      */
-    addSinglePolygon(geometry, cid, color, uniqueId, mainType, sourceType, defaultStatus, modelId, columnId) {
+    addSinglePolygon(
+      geometry,
+      cid,
+      color,
+      uniqueId,
+      mainType,
+      sourceType,
+      defaultStatus,
+      modelId,
+      columnId
+    ) {
       let uniqueIdList = [];
       if (this.$store.state.selectSelectDataMap["singlePolygon"][uniqueId]) {
-        uniqueIdList = this.$store.state.selectSelectDataMap["singlePolygon"][uniqueId];
+        uniqueIdList =
+          this.$store.state.selectSelectDataMap["singlePolygon"][uniqueId];
       }
 
       let singlePolygonItem = {
         uniqueId: uniqueId,
         geometry: geometry,
         cid: cid,
-        color: color
+        color: color,
       };
       uniqueIdList.push(singlePolygonItem);
-      this.$store.state.selectSelectDataMap["singlePolygon"][uniqueId] = uniqueIdList;
+      this.$store.state.selectSelectDataMap["singlePolygon"][uniqueId] =
+        uniqueIdList;
       // 当前数据坐标系为WGS84
       let targetGeometry = JSON.parse(geometry).geometry;
       // 预设模型与所有图层层级不同
       let coord = targetGeometry.coordinates;
-      let correctCoord = publicFun.latLngsCorrection(coord);
-      let coordinates = publicFun.latLngsToReverse(correctCoord);
+      let coordinates = publicFun.latLngsToReverse(coord);
       let polygon = L.polygon(coordinates, {
         color: color,
         weight: 3,
         fillColor: color,
         opacity: 1,
-        fillOpacity: 0
+        fillOpacity: 0,
       }).addTo(map2DViewer.analysisGroups[uniqueId]);
 
       map2DViewer.polygons[cid] = polygon;
 
-      polygon.on("click", e => {
+      polygon.on("click", (e) => {
         console.log(this.defaultValue, "点击面后显示默认的标记状态");
         let geojsonData = geometry;
         // 所有图层下的疑点图层 -- 常规展示
@@ -805,7 +872,7 @@ export default {
               镇域名称: geoProperties["镇域名称"] || "--",
               "面积(平方米)": geoProperties["面积"] || "--",
               图层构成: geoProperties["图层构成"] || "--",
-              性质: geoProperties["性质"] || "--"
+              性质: geoProperties["性质"] || "--",
             };
             this.defaultStatus = defaultStatus;
 
@@ -815,9 +882,17 @@ export default {
               this.currentSourceType = sourceType;
               this.currentModelId = modelId;
               this.currentColumnId = columnId;
-              let domItem = this.createAuditDiv(cid, geojsonData, sourceType, modelId, columnId);
+              let domItem = this.createAuditDiv(
+                cid,
+                geojsonData,
+                sourceType,
+                modelId,
+                columnId
+              );
               this.auditPopupShow = true;
-              this.popup = L.popup({ maxWidth: 700, maxHeight: 600 }).setLatLng(e.latlng).setContent(domItem);
+              this.popup = L.popup({ maxWidth: 700, maxHeight: 600 })
+                .setLatLng(e.latlng)
+                .setContent(domItem);
               this.auditPopupShow = false;
               this.popup.openOn(map2DViewer.map);
             });
@@ -827,13 +902,15 @@ export default {
               镇域名称: geoProperties["镇域名称"] || "--",
               "面积(平方米)": geoProperties["面积"] || "--",
               土地类型: geoProperties["土地类型"] || "--",
-              图斑编号: geoProperties["图斑编号"] || "--"
+              图斑编号: geoProperties["图斑编号"] || "--",
             };
 
             this.$refs.normalRef.$nextTick(() => {
               let domItem = this.createNormalDiv(cid, geojsonData, sourceType);
               this.normalAttrPopupShow = true;
-              this.normalPopup = L.popup({ maxWidth: 700, maxHeight: 600 }).setLatLng(e.latlng).setContent(domItem);
+              this.normalPopup = L.popup({ maxWidth: 700, maxHeight: 600 })
+                .setLatLng(e.latlng)
+                .setContent(domItem);
               this.normalAttrPopupShow = false;
               this.normalPopup.openOn(map2DViewer.map);
             });
@@ -854,7 +931,7 @@ export default {
     //综合分析 - 标记疑点 - 删除面
     deletePolygonLayer(layer) {
       console.log(layer, "layer");
-      map2DViewer.polygons[layer].forEach(polygon => {
+      map2DViewer.polygons[layer].forEach((polygon) => {
         map2DViewer.map.removeLayer(polygon);
       });
     },
@@ -862,7 +939,7 @@ export default {
     drawPoints(data) {
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
         let point = L.marker(data.coord, {
-          opacity: 1
+          opacity: 1,
         }).addTo(map2DViewer.groups["我的标记图层组"]);
         map2DViewer.myLabels[`label_${data.id}`] = point;
       }
@@ -875,7 +952,7 @@ export default {
           weight: 3,
           fillOpacity: color,
           opacity: 1,
-          fillOpacity: 0.4
+          fillOpacity: 0.4,
         }).addTo(map2DViewer.groups["我的标记图层组"]);
         // zoom the map to the polyline
         map2DViewer.myLabels[`label_${data.id}`] = polyline;
@@ -889,7 +966,7 @@ export default {
           weight: 3,
           fillOpacity: color,
           opacity: 1,
-          fillOpacity: 0.4
+          fillOpacity: 0.4,
         }).addTo(map2DViewer.groups["我的标记图层组"]);
 
         map2DViewer.myLabels[`label_${data.id}`] = polygon;
@@ -911,7 +988,7 @@ export default {
             fillOpacity: color,
             opacity: 1,
             fillOpacity: 0.4,
-            radius: Number(distance)
+            radius: Number(distance),
           }).addTo(map2DViewer.groups["我的标记图层组"]);
           map2DViewer.myLabels[`label_${data.id}`] = circle;
         }
@@ -942,8 +1019,8 @@ export default {
       if (geometry) {
         geometry.removeFrom(map2DViewer.map);
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>

+ 28 - 27
src/components/popup/LawPopup.vue

@@ -77,7 +77,7 @@ export default {
       classDictMap: {},
       lawBaseUrl: "/dms",
       searchInput: "",
-      timeSelectVal: "",
+      timeSelectVal: "不限",
       timeOptions: [],
       tableData: [],
       dateSortArr: [],
@@ -112,12 +112,16 @@ export default {
   created() {
     this.timeOptions = [];
     // 时间选择
-    for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
+    for (let i = 1980; i <= 2020; i++) {
       this.timeOptions.unshift({
         value: i,
         label: i,
       });
     }
+    this.timeOptions.unshift({
+      value: "不限",
+      label: "不限",
+    });
     // this.getTableData(1);
   },
   mounted() {
@@ -161,13 +165,11 @@ export default {
           this.classDictMap["审计法律类别"].has(this.$store.state.lawSourceType)
         ) {
           let paramType = {
-            field: "sh_law_type",
-            // 等值查询
-            searchType: "1",
+            field: "c_c_third_level",
+            // 模糊查询
+            searchType: "2",
             content: {
-              value: this.classDictMap["审计法律类别"].get(
-                this.$store.state.lawSourceType
-              ),
+              value: this.$store.state.lawSourceType,
             },
           };
           searchParam.push(paramType);
@@ -175,7 +177,7 @@ export default {
 
         if (this.searchInput) {
           let paramSearch = {
-            field: "c_name",
+            field: "c_c_name",
             // 模糊查询
             searchType: "2",
             content: {
@@ -186,9 +188,9 @@ export default {
         }
 
         // 年份查询
-        if (this.timeSelectVal) {
+        if (this.timeSelectVal && this.timeSelectVal != "不限") {
           let paramTime = {
-            field: "c_new_date",
+            field: "c_c_execute_date",
             // field: "c_date_time",
             // 模糊查询
             searchType: "2",
@@ -199,13 +201,11 @@ export default {
           searchParam.push(paramTime);
         }
         let params = new FormData();
-        params = {
-          columnId: 23,
-          states: 3,
-          pageSize: this.currentPageSize,
-          page: val - 1,
-          search: JSON.stringify(searchParam),
-        };
+        params.append("columnId", 1396);
+        params.append("states", "0,1,2,3");
+        params.append("pageSize", this.currentPageSize);
+        params.append("page", val - 1);
+        params.append("search", JSON.stringify(searchParam));
 
         this.$Post(this.urlsCollection.selectContentList, params).then(
           (res) => {
@@ -215,17 +215,18 @@ export default {
               this.tableData = res.content.data.map((v) => {
                 return {
                   id: v.id || "",
-                  title: v.c_name || "--",
-                  date: this.$dayjs(v.c_date_time).format("YYYY-MM-DD") || "--",
-                  address: v.c_pdf || "",
-                };
-              });
-              this.dateSortArr = res.content.data.map((v) => {
-                return {
-                  text: v.c_new_date,
-                  value: v.c_date_time,
+                  title: v.c_c_name || "--",
+                  date: v.c_c_execute_date || "--",
+                  address: v.c_c_pdf || "",
                 };
               });
+              // 暂时无法根据日期排序 -- 日后可添加字段
+              // this.dateSortArr = res.content.data.map((v) => {
+              //   return {
+              //     text: v.c_new_date,
+              //     value: v.c_date_time,
+              //   };
+              // });
             }
           },
           (error) => {

+ 3 - 3
src/config/common.js

@@ -53,13 +53,13 @@ export const streetLocation = {
  * 审计法律类别
  */
 export const lawType = {
-  水资源: "水资源",
+  水资源: "2-水资源",
   林业资源: "林业资源",
-  生态保护与治理: "生态保护与治理",
+  生态资源: "生态资源",
   大气: "大气",
   农业资源: "农业资源",
   其他: "其他",
-  土地资源: "土地资源",
+  "土地资源":"1-土地资源(已)",
 };
 
 /**

File diff suppressed because it is too large
+ 317 - 124
src/views/ComprehensiveAnalysis.vue


+ 106 - 60
src/views/LawView.vue

@@ -19,6 +19,7 @@
               v-model="typeSelectVal"
               :options="typeOptions"
               :value="typeSelectVal"
+              :isClear="true"
             />
           </div>
           <div>
@@ -30,6 +31,7 @@
               v-model="timeSelectVal"
               :options="timeOptions"
               :value="timeSelectVal"
+              :isClear="true"
             />
           </div>
           <div style="position: relative">
@@ -51,17 +53,49 @@
         >
           <el-table-column type="index" width="150" label="序号" align="center">
           </el-table-column>
-          <el-table-column prop="type" label="类别" align="center">
-          </el-table-column>
+          <!-- <el-table-column prop="type" label="类别" align="center">
+          </el-table-column> -->
           <el-table-column
             prop="title"
-            label="文件名称"
+            label="标题"
             align="center"
             width="250"
             sortable
           >
           </el-table-column>
-          <el-table-column prop="class" label="等级" align="center">
+          <el-table-column
+            prop="code"
+            label="文号"
+            align="center"
+            sortable
+          ></el-table-column>
+          <el-table-column
+            prop="firstClass"
+            label="一级分类"
+            align="center"
+            sortable
+          >
+          </el-table-column>
+          <el-table-column
+            prop="secondClass"
+            label="二级分类"
+            align="center"
+            sortable
+          >
+          </el-table-column>
+          <el-table-column
+            prop="thirdClass"
+            label="三级分类"
+            align="center"
+            sortable
+          >
+          </el-table-column>
+          <el-table-column
+            prop="fourthClass"
+            label="四级分类"
+            align="center"
+            sortable
+          >
           </el-table-column>
           <el-table-column prop="date" label="日期" align="center" sortable>
           </el-table-column>
@@ -96,7 +130,7 @@ export default {
       typeSelectVal: "",
       typeOptions: [],
       timePlaceholder: "请选择年份",
-      timeSelectVal: "",
+      timeSelectVal: "不限",
       timeOptions: [],
       tableData: [],
       currentPageSize: 10,
@@ -121,13 +155,18 @@ export default {
     this.timeOptions = [];
     this.typeOptions = [];
     // 时间选择
-    for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
+    for (let i = 1980; i <= 2020; i++) {
       this.timeOptions.unshift({
         value: i,
         label: i,
       });
     }
 
+    this.timeOptions.unshift({
+      value: "不限",
+      label: "不限",
+    });
+
     // 审计等级
     this.classDictQuery("0", "sj_class", "审计等级");
     // 审计类别
@@ -169,35 +208,34 @@ export default {
     resetEvent() {
       console.log("重置");
       this.typeSelectVal = "";
-      this.timeSelectVal = "";
+      this.timeSelectVal = "不限";
       this.searchInput = "";
       this.$refs.lawTypeRef.imgValue = "";
       this.$refs.lawYearRef.imgValue = "";
       this.getTableData(this.currentPage);
     },
-    // 切换页
+    // 切换页 -- 新法律法规
     getTableData(val) {
       this.tableData = [];
-
       let searchParam = [];
-      // 类别
+      // 三级分类 -- 资源分类
       if (this.typeSelectVal) {
+        console.log(this.classDictMap["审计法律类别"].get(this.typeSelectVal));
         let paramType = {
-          field: "sh_law_type",
+          field: "c_c_third_level",
           // 等值查询
-          searchType: "1",
+          searchType: "2",
           content: {
-            value: this.typeSelectVal,
+            value:
+              this.classDictMap["审计法律类别"].get(this.typeSelectVal) || "--",
           },
         };
         searchParam.push(paramType);
       }
-
       // 年份查询
-      if (this.timeSelectVal) {
+      if (this.timeSelectVal && this.timeSelectVal != "不限") {
         let paramTime = {
-          field: "c_new_date",
-          // field: "c_date_time",
+          field: "c_c_execute_date",
           // 模糊查询
           searchType: "2",
           content: {
@@ -206,10 +244,10 @@ export default {
         };
         searchParam.push(paramTime);
       }
-
+      // 标题查询
       if (this.searchInput) {
         let paramSearch = {
-          field: "c_name",
+          field: "c_c_name",
           // 模糊查询
           searchType: "2",
           content: {
@@ -218,40 +256,40 @@ export default {
         };
         searchParam.push(paramSearch);
       }
-
       let params = new FormData();
-      params = {
-        columnId: 23,
-        states: 3,
-        pageSize: this.currentPageSize,
-        page: val - 1,
-        search: JSON.stringify(searchParam),
-      };
-
-      this.$Post(this.urlsCollection.selectContentList, params).then(
-        (res) => {
-          if (res.code === 200 && res.content.data.length > 0) {
-            // console.log(res.content, "查询到的法律法规相关的数据");
-            this.paginationData.currentPage = val;
-            this.paginationData.total = res.content.count;
-            this.tableData = res.content.data.map((v) => {
-              return {
-                id: v.id || "",
-                title: v.c_name || "--",
-                type:
-                  this.classDictMap["审计法律类别"].get(v.sh_law_type) || "--",
-                class: this.classDictMap["审计等级"].get(v.sj_class) || "--",
-                // date: v.c_new_date || "--",
-                date: this.$dayjs(v.c_date_time).format("YYYY-MM-DD") || "--",
-                address: v.c_pdf || "",
-              };
-            });
-          }
-        },
-        (error) => {
-          console.log(error);
+      params.append("columnId", 1396);
+      params.append("states", "0,1,2,3");
+      params.append("pageSize", this.currentPageSize);
+      params.append("page", val - 1);
+      params.append("search", JSON.stringify(searchParam));
+      this.$Post(this.urlsCollection.selectContentList, params).then((res) => {
+        if (res.code === 200 && res.content.data.length > 0) {
+          this.paginationData.currentPage = val;
+          this.paginationData.total = res.content.count;
+          this.tableData = res.content.data.map((v) => {
+            return {
+              id: v.id || "--",
+              title: v.c_c_name || "--",
+              // 文件
+              address: v.c_c_pdf || "--",
+              // 实施日期
+              date: v.c_c_execute_date || "--",
+              // 文号
+              code: v.c_c_code || "--",
+              // 一级分类
+              firstClass: v.c_c_first_level || "--",
+              // 二级分类
+              secondClass: v.c_c_second_level || "--",
+              // 三级分类
+              thirdClass: v.c_c_third_level || "--",
+              // 四级分类
+              fourthClass: v.c_c_fourth_level || "--",
+              // 五级分类
+              fifthClass: v.c_c_fifth_level,
+            };
+          });
         }
-      );
+      });
     },
     // 切换条数
     handleSizeChange(val) {
@@ -261,15 +299,23 @@ export default {
     },
     // 开启弹窗
     handleClick(row) {
-      console.log(row.address, "--address");
-      this.$refs.lawRef.title = row.title;
-      this.$refs.lawRef.time = row.date;
-      this.$refs.lawRef.lawDetailsPopupShow = true;
-      this.$nextTick(() => {
-        if (this.$refs.lawFilePreview) {
-          this.$refs.lawFilePreview.showView(this.lawBaseUrl + row.address);
-        }
-      });
+      if (row.title) {
+        this.$refs.lawRef.title = row.title;
+      }
+      if (row.date) {
+        this.$refs.lawRef.time = row.date;
+      }
+
+      if (!row.address) {
+        this.$$message.info("暂无文件");
+      } else {
+        this.$refs.lawRef.lawDetailsPopupShow = true;
+        this.$nextTick(() => {
+          if (this.$refs.lawFilePreview) {
+            this.$refs.lawFilePreview.showView(this.lawBaseUrl + row.address);
+          }
+        });
+      }
     },
     // 关闭弹窗
     lawDetailsClose() {

+ 6 - 4
vue.config.js

@@ -11,16 +11,18 @@ module.exports = {
   filenameHashing: false,
   // 打包配置
   configureWebpack: {
-    output: { // 输出重构 打包编译后的js文件名称,添加时间戳.
+    output: {
+      // 输出重构 打包编译后的js文件名称,添加时间戳.
       filename: `js/js[name].${timeStamp}.js`,
       chunkFilename: `js/chunk.[id].${timeStamp}.js`,
-    }
+    },
   },
   css: {
-    extract: { // 打包后css文件名称添加时间戳
+    extract: {
+      // 打包后css文件名称添加时间戳
       filename: `css/[name].${timeStamp}.css`,
       chunkFilename: `css/chunk.[id].${timeStamp}.css`,
-    }
+    },
   },
   chainWebpack: (config) => {
     config.resolve.alias

Some files were not shown because too many files changed in this diff