Browse Source

修改保密等级

tengmingxue 1 year ago
parent
commit
044f44057f

+ 8 - 0
evn.setting.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2022-05-11 19:15:37
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2023-04-27 16:13:07
+ * @FilePath: \kxc_web\evn.setting.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 const dev = 'dev' // 开发环境
 const pro = 'pro' // 生产环境
 const staging = 'staging' // 测试环境

+ 39 - 39
package-lock.json

@@ -1227,7 +1227,7 @@
       "dependencies": {
         "commander": {
           "version": "2.17.1",
-          "resolved": "https://registry.npmmirror.com/commander/-/commander-2.17.1.tgz",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
           "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
         },
         "ol": {
@@ -1242,7 +1242,7 @@
         },
         "proj4": {
           "version": "2.6.3",
-          "resolved": "https://registry.npmmirror.com/proj4/-/proj4-2.6.3.tgz",
+          "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.6.3.tgz",
           "integrity": "sha512-XRqnLmHWlvi7jqKNTqaOUrVy72JEtOUrnlLki99yZUOSvcSeBaZ1I/EGnQ2LzplSbjSrebGAdikqCLeCxC/YEg==",
           "requires": {
             "mgrs": "1.0.0",
@@ -1264,7 +1264,7 @@
         },
         "xlsx": {
           "version": "0.16.9",
-          "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.16.9.tgz",
+          "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.16.9.tgz",
           "integrity": "sha512-gxi1I3EasYvgCX1vN9pGyq920Ron4NO8PNfhuoA3Hpq6Y8f0ECXiy4OLrK4QZBnj1jx3QD+8Fq5YZ/3mPZ5iXw==",
           "requires": {
             "adler-32": "~1.2.0",
@@ -2569,7 +2569,7 @@
     },
     "@types/file-saver": {
       "version": "2.0.5",
-      "resolved": "https://registry.npmmirror.com/@types/file-saver/-/file-saver-2.0.5.tgz",
+      "resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.5.tgz",
       "integrity": "sha512-zv9kNf3keYegP5oThGLaPk8E081DFDuwfqjtiTzm6PoxChdJ1raSuADf2YGCVIyrSynLrgc8JWv296s7Q7pQSQ==",
       "dev": true
     },
@@ -3864,7 +3864,7 @@
     },
     "autosize": {
       "version": "4.0.4",
-      "resolved": "https://registry.npmmirror.com/autosize/-/autosize-4.0.4.tgz",
+      "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.4.tgz",
       "integrity": "sha512-5yxLQ22O0fCRGoxGfeLSNt3J8LB1v+umtpMnPW6XjkTWXKoN0AmXAIhelJcDtFT/Y/wYWmfE+oqU10Q0b8FhaQ=="
     },
     "aws-sign2": {
@@ -5135,7 +5135,7 @@
     },
     "btoa": {
       "version": "1.2.1",
-      "resolved": "https://registry.npmmirror.com/btoa/-/btoa-1.2.1.tgz",
+      "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
       "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
     },
     "buffer": {
@@ -5461,7 +5461,7 @@
     },
     "cfb": {
       "version": "1.2.2",
-      "resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz",
+      "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
       "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
       "requires": {
         "adler-32": "~1.3.0",
@@ -5470,7 +5470,7 @@
       "dependencies": {
         "adler-32": {
           "version": "1.3.1",
-          "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz",
+          "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
           "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A=="
         }
       }
@@ -6459,7 +6459,7 @@
     },
     "crc-32": {
       "version": "1.2.2",
-      "resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz",
+      "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
       "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
     },
     "create-ecdh": {
@@ -7632,7 +7632,7 @@
     },
     "element-resize-detector": {
       "version": "1.2.4",
-      "resolved": "https://registry.npmmirror.com/element-resize-detector/-/element-resize-detector-1.2.4.tgz",
+      "resolved": "https://registry.npmjs.org/element-resize-detector/-/element-resize-detector-1.2.4.tgz",
       "integrity": "sha512-Fl5Ftk6WwXE0wqCgNoseKWndjzZlDCwuPTcoVZfCP9R3EHQF8qUtr3YUPNETegRBOKqQKPW3n4kiIWngGi8tKg==",
       "requires": {
         "batch-processor": "1.0.0"
@@ -8415,7 +8415,7 @@
     },
     "exit-on-epipe": {
       "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
+      "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
       "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
     },
     "expand-brackets": {
@@ -8838,7 +8838,7 @@
     },
     "fflate": {
       "version": "0.3.11",
-      "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.3.11.tgz",
+      "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.3.11.tgz",
       "integrity": "sha512-Rr5QlUeGN1mbOHlaqcSYMKVpPbgLy0AWT/W0EHxA6NGI12yO1jpoui2zBBvU2G824ltM6Ut8BFgfHSBGfkmS0A=="
     },
     "figgy-pudding": {
@@ -8892,7 +8892,7 @@
     },
     "file-saver": {
       "version": "2.0.5",
-      "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
+      "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
       "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
     },
     "file-type": {
@@ -9123,7 +9123,7 @@
     },
     "frac": {
       "version": "1.1.2",
-      "resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz",
+      "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
       "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
     },
     "fragment-cache": {
@@ -12552,7 +12552,7 @@
     },
     "jspdf": {
       "version": "2.5.1",
-      "resolved": "https://registry.npmmirror.com/jspdf/-/jspdf-2.5.1.tgz",
+      "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.1.tgz",
       "integrity": "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA==",
       "requires": {
         "@babel/runtime": "^7.14.0",
@@ -12581,12 +12581,12 @@
         },
         "fflate": {
           "version": "0.4.8",
-          "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.4.8.tgz",
+          "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
           "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="
         },
         "regenerator-runtime": {
           "version": "0.13.9",
-          "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
           "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
         }
       }
@@ -14120,7 +14120,7 @@
     },
     "observable-emit": {
       "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/observable-emit/-/observable-emit-1.0.1.tgz",
+      "resolved": "https://registry.npmjs.org/observable-emit/-/observable-emit-1.0.1.tgz",
       "integrity": "sha512-mkFYYxEl/8zsm7XhVufUUWjlZwyOgRHdEPSDDavbkavR9QzfbOxIBo0eQhgcEJ+W1czqEN2bO2a1BxmjrzZ1Gw=="
     },
     "obuf": {
@@ -14176,7 +14176,7 @@
     },
     "ol-plot": {
       "version": "3.0.0",
-      "resolved": "https://registry.npmmirror.com/ol-plot/-/ol-plot-3.0.0.tgz",
+      "resolved": "https://registry.npmjs.org/ol-plot/-/ol-plot-3.0.0.tgz",
       "integrity": "sha512-EiTgl3YU1FdBaC0ecprJLelWx2Exlfo1hIlDKKnkxHRB90l5TXXLiayzbS2HqOCbNMcSJOKdOSOPkLHoRGRGgQ==",
       "requires": {
         "autosize": "^4.0.0",
@@ -14661,7 +14661,7 @@
     },
     "pdfjs-dist": {
       "version": "2.6.347",
-      "resolved": "https://registry.npmmirror.com/pdfjs-dist/-/pdfjs-dist-2.6.347.tgz",
+      "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.6.347.tgz",
       "integrity": "sha512-QC+h7hG2su9v/nU1wEI3SnpPIrqJODL7GTDFvR74ANKGq1AFJW16PH8VWnhpiTi9YcLSFV9xLeWSgq+ckHLdVQ=="
     },
     "pend": {
@@ -15621,7 +15621,7 @@
     },
     "printj": {
       "version": "1.1.2",
-      "resolved": "https://registry.npmmirror.com/printj/-/printj-1.1.2.tgz",
+      "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
       "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
     },
     "private": {
@@ -15650,7 +15650,7 @@
     },
     "proj4": {
       "version": "2.8.0",
-      "resolved": "https://registry.npmmirror.com/proj4/-/proj4-2.8.0.tgz",
+      "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.8.0.tgz",
       "integrity": "sha512-baC+YcD4xsSqJ+CpCZljj2gcQDhlKb+J+Zjv/2KSBwWNjk4M0pafgQsE+mWurd84tflMIsP+7j7mtIpFDHzQfQ==",
       "requires": {
         "mgrs": "1.0.0",
@@ -17626,7 +17626,7 @@
     },
     "ssf": {
       "version": "0.11.2",
-      "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz",
+      "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
       "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
       "requires": {
         "frac": "~1.1.2"
@@ -19408,7 +19408,7 @@
     },
     "vue-json-excel": {
       "version": "0.3.0",
-      "resolved": "https://registry.npmmirror.com/vue-json-excel/-/vue-json-excel-0.3.0.tgz",
+      "resolved": "https://registry.npmjs.org/vue-json-excel/-/vue-json-excel-0.3.0.tgz",
       "integrity": "sha512-FrSh0tVUpw4K+ilLO8g0Qp52eFJw/hkk3rZPTEKo9qVkJgVfQtZwzj3UWc5ACYxA3jLk9HtjK+f9xKHCN4Kgag==",
       "requires": {
         "downloadjs": "^1.4.7"
@@ -19477,7 +19477,7 @@
     },
     "vue-pdf": {
       "version": "4.3.0",
-      "resolved": "https://registry.npmmirror.com/vue-pdf/-/vue-pdf-4.3.0.tgz",
+      "resolved": "https://registry.npmjs.org/vue-pdf/-/vue-pdf-4.3.0.tgz",
       "integrity": "sha512-zd3lJj6CbtrawgaaDDciTDjkJMUKiLWtbEmBg5CvFn9Noe9oAO/GNy/fc5c59qGuFCJ14ibIV1baw4S07e5bSQ==",
       "requires": {
         "babel-plugin-syntax-dynamic-import": "^6.18.0",
@@ -19490,12 +19490,12 @@
       "dependencies": {
         "@types/json-schema": {
           "version": "7.0.11",
-          "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
+          "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
           "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
         },
         "ajv": {
           "version": "6.12.6",
-          "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
           "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
           "requires": {
             "fast-deep-equal": "^3.1.1",
@@ -19506,12 +19506,12 @@
         },
         "json5": {
           "version": "2.2.1",
-          "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
           "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
         },
         "raw-loader": {
           "version": "4.0.2",
-          "resolved": "https://registry.npmmirror.com/raw-loader/-/raw-loader-4.0.2.tgz",
+          "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
           "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
           "requires": {
             "loader-utils": "^2.0.0",
@@ -19520,7 +19520,7 @@
           "dependencies": {
             "loader-utils": {
               "version": "2.0.2",
-              "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
+              "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
               "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
               "requires": {
                 "big.js": "^5.2.2",
@@ -19532,7 +19532,7 @@
         },
         "schema-utils": {
           "version": "3.1.1",
-          "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.1.1.tgz",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
           "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
           "requires": {
             "@types/json-schema": "^7.0.8",
@@ -19544,7 +19544,7 @@
     },
     "vue-resize-sensor": {
       "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/vue-resize-sensor/-/vue-resize-sensor-2.0.0.tgz",
+      "resolved": "https://registry.npmjs.org/vue-resize-sensor/-/vue-resize-sensor-2.0.0.tgz",
       "integrity": "sha512-W+y2EAI/BxS4Vlcca9scQv8ifeBFck56DRtSwWJ2H4Cw1GLNUYxiZxUHHkuzuI5JPW/cYtL1bPO5xPyEXx4LmQ=="
     },
     "vue-router": {
@@ -20417,17 +20417,17 @@
     },
     "wkt-parser": {
       "version": "1.3.2",
-      "resolved": "https://registry.npmmirror.com/wkt-parser/-/wkt-parser-1.3.2.tgz",
+      "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.3.2.tgz",
       "integrity": "sha512-A26BOOo7sHAagyxG7iuRhnKMO7Q3mEOiOT4oGUmohtN/Li5wameeU4S6f8vWw6NADTVKljBs8bzA8JPQgSEMVQ=="
     },
     "wmf": {
       "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz",
+      "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
       "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
     },
     "word": {
       "version": "0.3.0",
-      "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz",
+      "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
       "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
     },
     "word-wrap": {
@@ -20453,7 +20453,7 @@
     },
     "worker-loader": {
       "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/worker-loader/-/worker-loader-2.0.0.tgz",
+      "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-2.0.0.tgz",
       "integrity": "sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==",
       "requires": {
         "loader-utils": "^1.0.0",
@@ -20462,7 +20462,7 @@
       "dependencies": {
         "schema-utils": {
           "version": "0.4.7",
-          "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-0.4.7.tgz",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
           "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
           "requires": {
             "ajv": "^6.1.0",
@@ -20556,7 +20556,7 @@
     },
     "xlsx": {
       "version": "0.17.5",
-      "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.17.5.tgz",
+      "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.17.5.tgz",
       "integrity": "sha512-lXNU0TuYsvElzvtI6O7WIVb9Zar1XYw7Xb3VAx2wn8N/n0whBYrCnHMxtFyIiUU1Wjf09WzmLALDfBO5PqTb1g==",
       "requires": {
         "adler-32": "~1.2.0",
@@ -20570,7 +20570,7 @@
       "dependencies": {
         "codepage": {
           "version": "1.15.0",
-          "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz",
+          "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
           "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="
         }
       }

+ 1 - 0
src/layout/components/TagsView/index.vue

@@ -255,6 +255,7 @@ export default {
   // border-bottom: 1px solid #d8dce5;
   // box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
   .tags-view-wrapper {
+    span:nth-of-type(1){ display: none; }
     .tags-view-item {
       display: inline-block;
       position: relative;

+ 14 - 2
src/store/modules/permission.js

@@ -16,7 +16,9 @@ const state = {
   sysDics: null,
   addRoutes: [],
   mapConfig: [], // 地图服务配置
-  systemEnv:'J'
+  systemEnv:'J',
+  mapLayers:[], //图层列表
+  showMapTool:true,
 }
 
 const mutations = {
@@ -55,7 +57,14 @@ const mutations = {
   },
   SET_MAP_CONFIG: (state, data) => {
     state.mapConfig = data
-  }
+  },
+  SET_MAP_LAYERS: (state, data) => {
+    state.mapLayers = data
+  },
+
+  SET_MAPTOOLS_SHOW: (state, data) => {
+    state.showMapTool = data
+  },
 }
 
 const actions = {
@@ -77,6 +86,8 @@ const actions = {
   getMenuRouter({ commit, dispatch }, data) {
     return new Promise((resolve, reject) => {
       getMenuRouter(data).then((res) => {
+        const showMapTool =  res.result.menus.find(menu =>menu.type.indexOf('gis') > -1)
+        commit('SET_MAPTOOLS_SHOW', showMapTool ? true : false);
         const addRouter = packageRouters(res.result.menus);
         commit('SET_ROUTES', addRouter)
         resolve(addRouter)
@@ -107,6 +118,7 @@ const actions = {
     return new Promise((resolve,reject)=>{
       getMapConfig(data).then(res=>{
         if (res.code == 1) {
+          commit('SET_MAP_LAYERS', res.result);
           const dics = buildMapConfig(res.result);
           commit('SET_MAP_CONFIG', dics);
           // console.log('服务列表',res.result)

+ 204 - 79
src/views/MapView/index.vue

@@ -1,13 +1,34 @@
 <template>
   <div id="viewDiv" class="viewDiv">
-    <tf-dialog :show.sync="params.tfDialog.Show" :hide.sync="params.tfDialog.Hide" :set-size.sync="params.tfDialog.setSize" />
-    <el-container style="height: 100%; width: 100%;">
-      <el-container :style="{ height: 'calc(100% - ' + footer_height + ')', width: '100%' }">
+    <tf-dialog
+      :show.sync="params.tfDialog.Show"
+      :hide.sync="params.tfDialog.Hide"
+      :set-size.sync="params.tfDialog.setSize"
+    />
+    <el-container style="height: 100%; width: 100%">
+      <el-container
+        :style="{ height: 'calc(100% - ' + footer_height + ')', width: '100%' }"
+      >
         <el-main>
-          <div id="antherPanel" style="display: none;width: 50%;height: 100%;float: left;border-right: 3px solid #ccc;" />
+          <div
+            id="antherPanel"
+            style="
+              display: none;
+              width: 50%;
+              height: 100%;
+              float: left;
+              border-right: 3px solid #ccc;
+            "
+          />
 
           <!-- 三维视图 -->
-          <div id="sceneView" ref="sceneView" class="sceneView" v-show="false" :style="{ width: '0'}">
+          <div
+            id="sceneView"
+            ref="sceneView"
+            class="sceneView"
+            v-show="false"
+            :style="{ width: '0' }"
+          >
             <!-- 23D视图切换 -->
             <viewChange />
             <measureMent3D v-if="viewer" :viewer="viewer" />
@@ -17,22 +38,37 @@
           </div>
 
           <!-- 二维视图 -->
-          <div id="mapView" ref="mapView" class="mapView" :style="{ marginRight:'0', height: '100%' }">
+          <div
+            v-if="showMapTool"
+            id="mapView"
+            ref="mapView"
+            class="mapView"
+            :style="{ marginRight: '0', height: '100%' }"
+          >
             <div v-show="labelShow" id="mapLabel">
               <img src="./images/mapLabel.png" />
             </div>
-            <div v-show="themShow" id="them" style="position: absolute;left: calc(50% - 250px);top: calc(50% - 150px);">
-              <img style="width: 500px; height: 300px;" :src="themSrc" />
+            <div
+              v-show="themShow"
+              id="them"
+              style="
+                position: absolute;
+                left: calc(50% - 250px);
+                top: calc(50% - 150px);
+              "
+            >
+              <img style="width: 500px; height: 300px" :src="themSrc" />
             </div>
 
             <!-- 地图查询 -->
-            <div class="tmap-map-query">
+            <div class="tmap-map-query" v-if="showMapTool">
               <MapQueryTool v-if="map" :map="map" />
             </div>
             <!-- 放大缩小 -->
-            <MapZoom v-if="map" :map="map" />
+            <MapZoom v-if="map&&showMapTool" :map="map" />
+            <div class="secrecy-type" v-if="showMapTool">{{ secrecy }}</div>
             <!-- 工具条 -->
-            <div class="tmap-tools">
+            <div class="tmap-tools" v-if="showMapTool">
               <!-- 数据维护 -->
               <!-- <div class="tool-item">
                 <FeatureEdit v-if="map" :map="map" :mapConfig='config'/>
@@ -40,6 +76,9 @@
               <div class="tool-item">
                 <LayerControl v-if="map" :map="map" />
               </div>
+              <div class="tool-item">
+                <LayerControl v-if="map" :map="map" />
+              </div>
               <div class="tool-item">
                 <MeasureMent v-if="map" :map="map" />
               </div>
@@ -48,39 +87,82 @@
               </div>
             </div>
             <!-- 指北针 -->
-            <MapCompass v-if="map" :map="map" />
+            <MapCompass v-if="map && showMapTool" :map="map" />
             <!-- 23D视图切换 -->
-            <viewChange />
+            <viewChange v-if="showMapTool" />
             <!-- 默认范围 -->
-            <div ref="tmap-map-reset" class="tmap-map-resetMap iconfont icon-fang" title="默认范围" @click="ResetMap" />
+            <div v-if="showMapTool"
+              ref="tmap-map-reset"
+              class="tmap-map-resetMap iconfont icon-fang"
+              title="默认范围"
+              @click="ResetMap"
+            />
 
             <!-- 图例 -->
-            <mapLegend />
+            <mapLegend v-if="showMapTool"/>
 
             <!-- 鹰眼 -->
-            <div ref="tmap-map-OverviewMap" class="tmap-map-OverviewMap" />
+            <div ref="tmap-map-OverviewMap" class="tmap-map-OverviewMap" v-if="showMapTool"/>
 
             <!-- 比例尺 -->
-            <div class="tmap-map-ScaleLine">
+            <div class="tmap-map-ScaleLine" v-if="showMapTool">
               <span>比例尺:</span>
               <div ref="tmap-map-ScaleLine" />
             </div>
             <!-- 鼠标坐标 -->
-            <div ref="tmap-map-MousePosition" class="tmap-map-MousePosition" />
+            <div ref="tmap-map-MousePosition" class="tmap-map-MousePosition" v-if="showMapTool" />
             <!-- 气泡弹窗 -->
             <popupWindow v-if="map" ref="popupWindow" :map="map"></popupWindow>
           </div>
 
-          <float-panels v-if="this.view" :panels="FloatPanels" :data="params" :panel-visible.sync="floatpanel_visible" @handelClose="handelClose" />
-          <right-half-panals v-if="this.view" :panels="RightHalfPanals" :data="params" :panel-visible.sync="rightpanel_visible" @handelClose="handelClose" />
+          <float-panels
+            v-if="this.view"
+            :panels="FloatPanels"
+            :data="params"
+            :panel-visible.sync="floatpanel_visible"
+            @handelClose="handelClose"
+          />
+          <right-half-panals
+            v-if="this.view"
+            :panels="RightHalfPanals"
+            :data="params"
+            :panel-visible.sync="rightpanel_visible"
+            @handelClose="handelClose"
+          />
         </el-main>
         <el-aside :style="{ width: side_width, height: '100%' }">
-          <side-panels v-if="this.view" :panels="Panels" :data="params" :side-width.sync="side_width" :panel-visible.sync="sidepanel_visible" @handelClose="handelClose" />
+          <side-panels
+            v-if="this.view"
+            :panels="Panels"
+            :data="params"
+            :side-width.sync="side_width"
+            :panel-visible.sync="sidepanel_visible"
+            @handelClose="handelClose"
+          />
         </el-aside>
       </el-container>
-      <el-footer :style="{ height: footer_height, width: '100%', padding: '0px' }">
-        <half-panels v-if="this.view" :panels="HalfPanels" :data="params" :footer-height.sync="footer_height" :default-height="halfpanel_defaultHeight" :panel-visible.sync="halfpanel_visible" :fullpanel-visible.sync="fullpanel_visible" @handelClose="handelClose" />
-        <full-panels v-if="this.view" :panels="FullPanels" :data="params" :footer-height.sync="footer_height" :panel-visible.sync="fullpanel_visible" :halfpanel-visible.sync="halfpanel_visible" @handelClose="handelClose" />
+      <el-footer
+        :style="{ height: footer_height, width: '100%', padding: '0px' }"
+      >
+        <half-panels
+          v-if="this.view"
+          :panels="HalfPanels"
+          :data="params"
+          :footer-height.sync="footer_height"
+          :default-height="halfpanel_defaultHeight"
+          :panel-visible.sync="halfpanel_visible"
+          :fullpanel-visible.sync="fullpanel_visible"
+          @handelClose="handelClose"
+        />
+        <full-panels
+          v-if="this.view"
+          :panels="FullPanels"
+          :data="params"
+          :footer-height.sync="footer_height"
+          :panel-visible.sync="fullpanel_visible"
+          :halfpanel-visible.sync="halfpanel_visible"
+          @handelClose="handelClose"
+        />
       </el-footer>
     </el-container>
   </div>
@@ -96,7 +178,7 @@ import {
   FullPanels,
   FloatPanels,
   SidePanels,
-  RightHalfPanals
+  RightHalfPanals,
 } from '@/layout/components/index'
 import { esriConfig } from 'staticPub/config'
 import { loadCss } from '@/utils/loadResources'
@@ -106,7 +188,7 @@ import { Polygon, Point, LineString, MultiLineString } from 'ol/geom'
 import {
   Image as ImageLayer,
   Vector as VectorLayer,
-  Tile as TileLayer
+  Tile as TileLayer,
 } from 'ol/layer'
 import { OSM, XYZ, ImageWMS, Vector as VectorSource } from 'ol/source'
 import { Style, Fill, Stroke, Icon, Text, Circle } from 'ol/style'
@@ -118,7 +200,7 @@ import {
   defaults,
   MousePosition,
   FullScreen,
-  Zoom
+  Zoom,
 } from 'ol/control'
 import MapQueryTool from './mapViewTools/mapQuery'
 import { Select, Draw } from 'ol/interaction'
@@ -134,7 +216,7 @@ import {
   Logo,
   TileSuperMapRest,
   SuperMap,
-  FeatureService
+  FeatureService,
 } from '@supermap/iclient-ol'
 // 投影
 import {
@@ -142,7 +224,7 @@ import {
   addProjection,
   get as getProjection,
   fromLonLat,
-  transform
+  transform,
 } from 'ol/proj'
 import { register as olRegisterProj } from 'ol/proj/proj4'
 import proj4 from 'proj4'
@@ -190,7 +272,7 @@ export default {
     sceneFly,
     viewerStatusBar,
     popupWindow,
-    mapLegend
+    mapLegend,
   },
   data() {
     return {
@@ -223,8 +305,8 @@ export default {
         tfDialog: {
           Show: null,
           Hide: null,
-          setSize: null
-        }
+          setSize: null,
+        },
       },
       // 图例控制
       legend: false,
@@ -236,10 +318,12 @@ export default {
       // 点击查询
       queryByClick: {
         querying: false,
-        resultInfo: null
+        resultInfo: null,
       },
       popupInfo: null, // 点击选中的要素,
-      isqueryClick: true // 是否打开点击查询
+      isqueryClick: true, // 是否打开点击查询
+      secrecy: '公开',
+      showMapTool:true,
     }
   },
   computed: {
@@ -257,19 +341,19 @@ export default {
     },
     RightHalfPanals() {
       return this.$store.state.map.rightHalfPanels
-    }
+    },
   },
   watch: {
     FullPanels() {
       this.show = true
-    }
+    },
   },
-  created: function() {},
+  created: function () {},
 
-  mounted: function() {
+  mounted: function () {
     loadCss(esriConfig.baseCssUrl) // 本地css资源
     const _this = this
-    this.$nextTick(function() {
+    this.$nextTick(function () {
       _this.getProj() // 定义坐标系cgcs2000
       _this.initMap()
       _this.addIserverLayers()
@@ -279,9 +363,10 @@ export default {
     this.getPipeFields()
 
     // 监听地图容器大小变化,更新地图
-    this.$erd.listenTo(this.$refs.mapView, element => {
+    this.$erd.listenTo(this.$refs.mapView, (element) => {
       this.map.updateSize()
     })
+    this.setSecrecy()
   },
 
   methods: {
@@ -295,7 +380,7 @@ export default {
         code: 'EPSG:4490',
         extent: [-180, -90, 180, 90],
         worldExtent: [-180, -90, 180, 90],
-        units: 'degrees'
+        units: 'degrees',
       })
       addProjection(this.projection)
     },
@@ -307,7 +392,7 @@ export default {
         target: 'mapView',
         layers: this.layers,
         view: this.view,
-        controls: this.controls
+        controls: this.controls,
       })
       // this.map.on('pointermove', e => {
       //   var pixel = this.map.getEventPixel(e.originalEvent);
@@ -323,13 +408,13 @@ export default {
       //     this.map_extentChangeHandler()
       // })
       // 二维地图视图改变监听
-      this.map.on('moveend', evt => {
+      this.map.on('moveend', (evt) => {
         // console.log("地图级别", this.map.getView().getZoom())
         this.map_extentChangeHandler()
       })
 
       // 地图点击事件,点击查询
-      this.map.on('click', async event => {
+      this.map.on('click', async (event) => {
         let pipelineDataServer = mapConfig.iServerUrl.pipelineDataServer // 管线数据服务
         await this.clickQuery(event.coordinate, pipelineDataServer)
       })
@@ -350,7 +435,7 @@ export default {
     getMap(options) {
       if (!options) return
       // 获取鹰眼图层
-      let viewTileLayer = options.iServerUrl.baseMapLayers.filter(item => {
+      let viewTileLayer = options.iServerUrl.baseMapLayers.filter((item) => {
         return item.name == '电子地图'
       })
       if (viewTileLayer.length > 0) {
@@ -358,9 +443,9 @@ export default {
           new TileLayer({
             source: new TileSuperMapRest({
               url: viewTileLayer[0].url,
-              crossOrigin: 'anonymous'
-            })
-          })
+              crossOrigin: 'anonymous',
+            }),
+          }),
         ]
       }
 
@@ -371,7 +456,7 @@ export default {
         zoom: 15,
         maxZoom: 23,
         minZoom: 15,
-        constrainResolution: true
+        constrainResolution: true,
       })
       this.params.mapView = this.view
     },
@@ -385,17 +470,17 @@ export default {
       arrControls.push(
         new ScaleLine({
           units: 'metric',
-          target: this.$refs['tmap-map-ScaleLine']
+          target: this.$refs['tmap-map-ScaleLine'],
         })
       )
 
       // 添加鼠标位置
       arrControls.push(
         new MousePosition({
-          coordinateFormat: coordinate => {
+          coordinateFormat: (coordinate) => {
             return format(coordinate, '经度:{x}  纬度:{y}', 6)
           }, // 保留6位小数位
-          target: this.$refs['tmap-map-MousePosition']
+          target: this.$refs['tmap-map-MousePosition'],
         })
       )
 
@@ -407,7 +492,7 @@ export default {
           collapseLabel: '',
           label: '',
           collapsed: true,
-          tipLabel: '鹰眼'
+          tipLabel: '鹰眼',
         })
       )
 
@@ -415,7 +500,7 @@ export default {
         this.controls = defaults({
           attribution: false,
           zoom: false,
-          rotate: false
+          rotate: false,
         }).extend(arrControls)
       }
     },
@@ -427,25 +512,25 @@ export default {
       this.view.setZoom(15)
       this.view.animate({
         center: [104.753586, 31.52135],
-        duration: 600
+        duration: 600,
       })
     },
     /**
      * 加载iserver服务图层
      */
     loadiServerLayers(LAYERS) {
-      LAYERS.forEach(item => {
+      LAYERS.forEach((item) => {
         this.map.addLayer(
           new TileLayer({
             source: new TileSuperMapRest({
               url: item.url,
               wrapX: true,
-              crossOrigin: 'anonymous'
+              crossOrigin: 'anonymous',
             }),
             name: item.name,
             type: item.type,
             securityClass: item.securityClass ? item.securityClass : 0,
-            visible: item.visible
+            visible: item.visible,
           })
         )
       })
@@ -463,7 +548,7 @@ export default {
         //   format: 'tiles',
         //   maximumLevel: 18
         // }),
-        infoBox: false
+        infoBox: false,
       })
       /**
        * 三维相机变化监听
@@ -479,7 +564,7 @@ export default {
             cameraExtent.west * (180 / Math.PI),
             cameraExtent.south * (180 / Math.PI),
             cameraExtent.east * (180 / Math.PI),
-            cameraExtent.north * (180 / Math.PI)
+            cameraExtent.north * (180 / Math.PI),
           ]
           this.map
             .getView()
@@ -488,15 +573,14 @@ export default {
       })
 
       // 加载地形影像和倾斜摄影
-      this.config.iServerUrl.tiles3D.forEach(item => {
+      this.config.iServerUrl.tiles3D.forEach((item) => {
         let scene3D = this.viewer.scene.open(item)
 
-        Cesium.when.all(scene3D, layers => {
+        Cesium.when.all(scene3D, (layers) => {
           for (let i = 0; i < layers.length; i++) {
             // console.log('图层三维三维', layers[i])
-            layers[i].transparentBackColor = Cesium.Color.fromCssColorString(
-              '#FFFFFF'
-            )
+            layers[i].transparentBackColor =
+              Cesium.Color.fromCssColorString('#FFFFFF')
             layers[i].transparentBackColorTolerance = Number(0.1) //去白边
           }
         })
@@ -504,7 +588,7 @@ export default {
 
       // 加载管线三维图层
       let s3mArray = this.config.iServerUrl.sceneService
-      s3mArray.forEach(item => {
+      s3mArray.forEach((item) => {
         this.viewer.scene.addS3MTilesLayerByScp(item.url, { name: item.name })
       })
     },
@@ -521,7 +605,7 @@ export default {
             viewExtent[1],
             viewExtent[2],
             viewExtent[3]
-          )
+          ),
         })
       } else {
         this.viewChangeStep = 2
@@ -557,7 +641,7 @@ export default {
       if (zoom >= 20) dis = 5 / 10000
       if (zoom >= 23) dis = 3 / 10000
       let bufferPoint = turf.buffer(turf.point(position), dis, {
-        units: 'kilometers'
+        units: 'kilometers',
       }) // 缓冲
       // console.log("级别:", zoom, "缓冲:", dis * 1000)
       let resultArray = []
@@ -567,13 +651,13 @@ export default {
           toIndex: -1,
           maxFeatures: 10,
           datasetNames: [
-            DataServer.dataSource + ':' + DataServer.dataSetInfo[i].name
+            DataServer.dataSource + ':' + DataServer.dataSetInfo[i].name,
           ],
           geometry: new GeoJSON().readFeature(bufferPoint).getGeometry(),
-          spatialQueryMode: 'INTERSECT' // 相交空间查询模式
+          spatialQueryMode: 'INTERSECT', // 相交空间查询模式
         })
 
-        await this.doClickQuery(DataServer.url, geometryParam).then(res => {
+        await this.doClickQuery(DataServer.url, geometryParam).then((res) => {
           if (res && res.result.features.features.length > 0) {
             let feature = res.result.features.features[0]
             feature['dataType'] = DataServer.dataSetInfo[i]
@@ -595,11 +679,11 @@ export default {
      * 执行点击查询
      */
     doClickQuery(url, geometryParam) {
-      return new Promise(resolve => {
+      return new Promise((resolve) => {
         //向服务器发送请求,并对返回的结果进行处理
         new FeatureService(url).getFeaturesByGeometry(
           geometryParam,
-          serviceResult => {
+          (serviceResult) => {
             if (serviceResult.type == 'processFailed') {
               resolve(null)
             } else {
@@ -623,20 +707,45 @@ export default {
     },
     /**获取管线的中文字段存放在本地 */
     getPipeFields() {
-      getFields(1).then(res => {
+      getFields(1).then((res) => {
         this.$store.dispatch('common/setPipeLineFields', res.result)
       }) // 获取管线字段名称
-      getFields(2).then(res => {
+      getFields(2).then((res) => {
         this.$store.dispatch('common/setPipePointFields', res.result)
       }) // 获取管点字段名称
-      getFields(3).then(res => {
+      getFields(3).then((res) => {
         this.$store.dispatch('common/setGroundFields', res.result)
       }) // 获取管点字段名称
-      getFields(4).then(res => {
+      getFields(4).then((res) => {
         this.$store.dispatch('common/setBuildingFields', res.result)
       }) // 获取管点字段名称
-    }
-  }
+    },
+
+    /**
+     * 设置密级
+     */
+    setSecrecy() {
+      let mapLayers = this.$store.state.permission.mapLayers
+      this.showMapTool = this.$store.state.permission.showMapTool
+      let descSort = mapLayers.sort((a, b) => b.securityClass - a.securityClass)
+      if (descSort.length === 0) return
+      const maxSecrecy = parseInt(descSort[0].securityClass)
+      switch (maxSecrecy) {
+        case 1:
+          this.secrecy = '公开'
+          break;
+        case 2:
+          this.secrecy = '内部'
+          break;
+        case 3:
+          this.secrecy = '秘密'
+          break;
+        case 4:
+          this.secrecy = '机密'
+          break;
+      }
+    },
+  },
 }
 </script>
 
@@ -750,6 +859,22 @@ export default {
         // background-color: rgba(255, 255, 255, 0.9);
       }
     }
+
+    .secrecy-type {
+      position: absolute;
+      z-index: 999;
+      text-align: center;
+      left: 50%;
+      height: 30px;
+      line-height: 30px;
+      width: 48px;
+      // background: #fff;
+      top: 10px;
+      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
+      font-size: 18px;
+      font-weight: bold;
+      color: #e64340;
+    }
     .tmap-map-MousePosition {
       position: absolute;
       width: 400px;

+ 10 - 1
src/views/kxcSystem/pipelineSystem/bufferQuery/bufferQueryResult/widget.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2022-05-11 19:15:38
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2023-04-28 16:24:43
+ * @FilePath: \kxc_web\src\views\kxcSystem\pipelineSystem\bufferQuery\bufferQueryResult\widget.vue
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
 <template>
   <div style="width:100%;height:100%">
     <queryResult v-if="param" :param="param" :data="data"></queryResult>
@@ -34,7 +42,8 @@ export default {
         if (item.com === 'bufferQueryResult') {
           let dataType = item.param.dataType
           let features = item.param.features
-          this.param = { dataType: dataType, allFeatures: features }
+          let targetDataset = item.param.targetDataset
+          this.param = { dataType: dataType, allFeatures: features,targetDataset:targetDataset }
           break
         }
       }

+ 1 - 1
src/views/kxcSystem/pipelineSystem/bufferQuery/widget.vue

@@ -389,7 +389,7 @@ export default {
           ),
         label: '缓冲查询结果',
         meta: { title: '缓冲结果' },
-        param: { dataType: this.selectLayer.type, features: this.resFeatures }
+        param: { dataType: this.selectLayer.type, features: this.resFeatures,targetDataset:this.selectLayer }
       }
       this.$store.dispatch('map/delHalfPanels', 'bufferQueryResult')
       this.$store.dispatch('map/changeMethod', info)

+ 10 - 1
src/views/kxcSystem/pipelineSystem/facilitiesQuery/facilitiesQueryResult/widget.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2022-05-11 19:15:38
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2023-04-28 16:21:21
+ * @FilePath: \kxc_web\src\views\kxcSystem\pipelineSystem\facilitiesQuery\facilitiesQueryResult\widget.vue
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
 <template>
   <div style="width:100%;height:100%">
     <queryResult v-if="param" :param="param" :data="data"></queryResult>
@@ -35,7 +43,8 @@ export default {
           // console.log('站点:', item)
           let dataType = item.param.dataType
           let features = item.param.features
-          this.param = { dataType: dataType, allFeatures: features }
+          let targetDataset = item.param.targetDataset
+          this.param = { dataType: dataType, allFeatures: features,targetDataset:targetDataset }
           break
         }
       }

+ 2 - 1
src/views/kxcSystem/pipelineSystem/facilitiesQuery/widget.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- 综合查询 -->
   <div class="query-container">
     <div class="query-box">
       <el-row>
@@ -648,7 +649,7 @@ export default {
           ),
         label: '查询结果',
         meta: { title: '查询结果' },
-        param: { dataType: this.targetDataset.type, features: this.resFeatures }
+        param: { dataType: this.targetDataset.type, features: this.resFeatures,targetDataset:this.targetDataset }
       }
       this.$store.dispatch('map/delHalfPanels', 'facilitiesQueryResult')
       this.$store.dispatch('map/changeMethod', info)

+ 115 - 43
src/views/kxcSystem/pipelineSystem/queryResult/widget.vue

@@ -2,35 +2,57 @@
   <div class="result-table">
     <!-- 数据表格 -->
     <div class="table-box">
-      <el-table :data="tableData" stripe :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}"
-                style="width: 100%" height="100%" @row-click="rowClick">
-        <el-table-column v-for="(item,index) in fieldKeys" :key="index" :prop="item.pipelineKey" :label="item.pipelineVal" align="center"
-                         show-overflow-tooltip>
+      <el-table
+        :data="tableData"
+        stripe
+        :header-cell-style="{
+          fontSize: '14px',
+          fontWeight: '600',
+          background: '#eaf1fd',
+          color: '#909399',
+        }"
+        style="width: 100%"
+        height="100%"
+        @row-click="rowClick"
+      >
+        <el-table-column
+          v-for="(item, index) in fieldKeys"
+          :key="index"
+          :prop="item.pipelineKey"
+          :label="item.pipelineVal"
+          align="center"
+          show-overflow-tooltip
+        >
         </el-table-column>
       </el-table>
     </div>
     <!-- 表格分页 -->
     <div class="table-pagination">
-      <el-pagination :current-page="pagination.current" :page-sizes="[20, 50, 100, 200]" :page-size="pagination.size"
-                     layout="total, sizes, prev, pager, next" :total="pagination.total" @size-change="sizeChange"
-                     @current-change="currentChange">
+      <el-pagination
+        :current-page="pagination.current"
+        :page-sizes="[20, 50, 100, 200]"
+        :page-size="pagination.size"
+        layout="total, sizes, prev, pager, next"
+        :total="pagination.total"
+        @size-change="sizeChange"
+        @current-change="currentChange"
+      >
       </el-pagination>
     </div>
-
   </div>
 </template>
 
 <script>
-import 'ol/ol.css';
-import { fromLonLat } from 'ol/proj';
-import { Vector as VectorSource } from 'ol/source';
-import { Vector as VectorLayer } from 'ol/layer';
-import * as olExtent from 'ol/extent';
-import { GeoJSON, WFS } from 'ol/format';
-import Feature from 'ol/Feature';
-import { Point, LineString, Polygon } from 'ol/geom';
-import { Style, Circle, Icon, Fill, RegularShape, Stroke, Text } from 'ol/style';
-import { getCenter } from 'ol/extent';
+import 'ol/ol.css'
+import { fromLonLat } from 'ol/proj'
+import { Vector as VectorSource } from 'ol/source'
+import { Vector as VectorLayer } from 'ol/layer'
+import * as olExtent from 'ol/extent'
+import { GeoJSON, WFS } from 'ol/format'
+import Feature from 'ol/Feature'
+import { Point, LineString, Polygon } from 'ol/geom'
+import { Style, Circle, Icon, Fill, RegularShape, Stroke, Text } from 'ol/style'
+import { getCenter } from 'ol/extent'
 export default {
   props: ['data', 'param'],
   data() {
@@ -38,20 +60,20 @@ export default {
       allFeatures: [], // 所有数据
       tableData: [],
       fieldKeys: [],
-      vecLayer: null,// 查询显示图层 
-      pageNum: 0,//总页数
+      vecLayer: null, // 查询显示图层
+      pageNum: 0, //总页数
       totalPageData: [],
       pagination: {
         current: 1,
         total: 0,
-        size: 20
-      }
+        size: 20,
+      },
     }
   },
   watch: {
     '$store.state.map.halfPanels': function () {
       this.loadData()
-    }
+    },
   },
   mounted() {
     this.loadData()
@@ -65,19 +87,64 @@ export default {
      */
     loadData() {
       this.allFeatures = this.param.allFeatures
-
+      let targetDataset = Object.hasOwnProperty.call(
+        this.param,
+        'targetDataset'
+      )
+        ? this.param.targetDataset
+        : null
+      let securityClass = ''
+      if (targetDataset) {
+        switch (parseInt(targetDataset.securityClass)) {
+          case 1:
+            securityClass = '公开'
+            break
+          case 2:
+            securityClass = '内部'
+            break
+          case 3:
+            securityClass = '秘密'
+            break
+          case 4:
+            securityClass = '机密'
+            break
+        }
+      }
+      //SECURITY  密级字段
       if (this.param.hasOwnProperty('fieldKeys')) {
         this.fieldKeys = this.param.fieldKeys
-      }
-      else {
+      } else {
         // 根据数据类型获取管线或管点中文字段
-        if (this.param.dataType == 'line') this.fieldKeys = this.$store.state.common.PipeLineFields
+        if (this.param.dataType == 'line')
+          this.fieldKeys = this.$store.state.common.PipeLineFields
         else this.fieldKeys = this.$store.state.common.PipePointFields
       }
+      //判断是否存在密级字段
+      let flag = false
+      let firstObj = this.fieldKeys.find((item, index) => index === 0)
+      this.fieldKeys.forEach((item) => {
+        if (item.pipelineKey === 'SECURITY') {
+          item.pipelineVal = '密级'
+          flag = true
+        }
+      })
+      //如果不存在密级字段
+      if (!flag && firstObj) {
+        firstObj.id = 999
+        firstObj.pipelineKey = 'SECURITY'
+        firstObj.pipelineVal = '密级'
+        this.fieldKeys.push(firstObj)
+      }
 
-
-
-      this.pagination = { current: 1, size: 20, total: this.param.allFeatures.length }
+      this.pagination = {
+        current: 1,
+        size: 20,
+        total: this.param.allFeatures.length,
+      }
+      //密级字段全部赋值
+      this.allFeatures.forEach((item) => {
+         item['SECURITY'] = item['SECURITY'] === '' ? securityClass : item['SECURITY']
+      })
       // 表格加载
       this.calcPageData()
     },
@@ -91,20 +158,21 @@ export default {
       let infoObject = {
         properties: row,
         dataType: { label: '' },
-        geometry: row.geometry
+        geometry: row.geometry,
       }
 
       let feature = new Feature({ geometry: geometry })
       if (geometry.getType() == 'LineString')
         popupPosition = getCenter(geometry.getExtent())
-      else
-        popupPosition = geometry.getCoordinates()
+      else popupPosition = geometry.getCoordinates()
       infoObject.dataType.label = row.TYPENAME
       // 弹窗显示
       this.data.that.popupWindowShow(popupPosition, infoObject)
       setTimeout(() => {
-        this.data.that.map.getView().fit(feature.getGeometry().getExtent(), { duration: 600 })
-      }, 200);
+        this.data.that.map
+          .getView()
+          .fit(feature.getGeometry().getExtent(), { duration: 600 })
+      }, 200)
     },
     /**
      * 计算页数
@@ -112,36 +180,40 @@ export default {
     calcPageData() {
       // 计算页数(根据后台数据的条数和每页显示数量算出一共几页,得0时设为1)
       if (this.allFeatures.length >= 1) {
-        this.pageNum = Math.ceil(this.allFeatures.length / this.pagination.size) || 1;
+        this.pageNum =
+          Math.ceil(this.allFeatures.length / this.pagination.size) || 1
         // console.log('总页数:', this.pageNum);
       }
       // 数据分组
       for (let i = 0; i < this.pageNum; i++) {
         // 每一页都是一个数组 形如 [['第一页的数据'],['第二页的数据'],['第三页数据']]
         // 根据每页显示数量 将后台的数据分割到 每一页,假设pageSize为5, 则第一页是1-5条,即slice(0,5),第二页是6-10条,即slice(5,10)...
-        this.totalPageData[i] = this.allFeatures.slice(this.pagination.size * i, this.pagination.size * (i + 1));
+        this.totalPageData[i] = this.allFeatures.slice(
+          this.pagination.size * i,
+          this.pagination.size * (i + 1)
+        )
       }
       // 获取到数据后显示第一页内容,数组下标是从0开始的,这里一定要减去1,不然会丢失一组数据
-      this.tableData = this.totalPageData[this.pagination.current - 1];
+      this.tableData = this.totalPageData[this.pagination.current - 1]
       // console.log(this.tableData);
     },
     /**
      * 改变当前页
      */
     currentChange(current) {
-      this.pagination.current = current;
+      this.pagination.current = current
       // 这里仍然不要忘记减去1
-      this.tableData = this.totalPageData[current - 1];
+      this.tableData = this.totalPageData[current - 1]
     },
     /**
      * 改变每页数量
      */
     sizeChange(size) {
-      this.pagination.size = size;
+      this.pagination.size = size
       // 重新计算页数并分组
       this.calcPageData()
-    }
-  }
+    },
+  },
 }
 </script>
 

+ 258 - 103
src/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/widget.vue

@@ -2,43 +2,65 @@
   <!-- 爆管分析 -->
   <div class="panel-container">
     <div class="op-box">
-      <el-button type="primary" size="small" style="width:100%" @click="mapSelect" :loading="loading">选择爆管管线</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        style="width: 100%"
+        @click="mapSelect"
+        :loading="loading"
+        >选择爆管管线</el-button
+      >
     </div>
 
     <!-- 分析结果 -->
     <div class="result-box">
       <div class="item-head">
         爆管管线
-        <el-tooltip class="item" effect="dark" content="选择一根管线进行分析" placement="top">
+        <el-tooltip
+          class="item"
+          effect="dark"
+          content="选择一根管线进行分析"
+          placement="top"
+        >
           <span class="el-icon-info"></span>
         </el-tooltip>
       </div>
       <div class="result-description">
-        <div class="result-title" v-cloak>{{burstInfo.description}}</div>
+        <div class="result-title" v-cloak>{{ burstInfo.description }}</div>
         <!-- <div v-cloak style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{burstInfo.addr}}</div> -->
-        <div v-cloak>{{burstInfo.lonlat}}</div>
+        <div v-cloak>{{ burstInfo.lonlat }}</div>
       </div>
     </div>
     <div class="op-box">
-      <el-button type="primary" size="small" style="width:100%" @click="executeBurst" :loading="doLoading">开始分析</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        style="width: 100%"
+        @click="executeBurst"
+        :loading="doLoading"
+        >开始分析</el-button
+      >
     </div>
     <div class="result-total">
       <div class="panel-item">
         <div>必关阀门</div>
         <div>
-          <span>{{burstInfo.valveArray.length}}</span>个
+          <span>{{ burstInfo.valveArray.length }}</span
+          >个
         </div>
       </div>
       <div class="panel-item">
         <div>受影响管线</div>
         <div>
-          <span>{{burstInfo.pipeLength}}</span>m
+          <span>{{ burstInfo.pipeLength }}</span
+          >m
         </div>
       </div>
       <div class="panel-item">
         <div>受影响设施</div>
         <div>
-          <span>{{burstInfo.facilities.length}}</span>个
+          <span>{{ burstInfo.facilities.length }}</span
+          >个
         </div>
       </div>
     </div>
@@ -46,18 +68,62 @@
     <div class="table-chart">
       <div class="item-head">
         受影响阀门(
-        <span>{{burstInfo.valveArray.length}}</span>个)
-        <el-button type="primary" size="mini" style="margin-left:10px" @click="reExecuteBurst">二次分析</el-button>
-        <el-tooltip class="item" effect="dark" content="可设置失效阀门,进行二次分析" placement="top">
+        <span>{{ burstInfo.valveArray.length }}</span
+        >个)
+        <el-button
+          type="primary"
+          size="mini"
+          style="margin-left: 10px"
+          @click="reExecuteBurst"
+          >二次分析</el-button
+        >
+        <el-tooltip
+          class="item"
+          effect="dark"
+          content="可设置失效阀门,进行二次分析"
+          placement="top"
+        >
           <span class="el-icon-info"></span>
         </el-tooltip>
       </div>
       <div class="table-container">
-        <el-table ref="valvesTable" :data="burstInfo.valveArray" stripe max-height="200" @row-click="tableRowLook" :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}" style="width: 100%">
-          <el-table-column type="selection" align="center" width="50"></el-table-column>
-          <el-table-column prop="SID" label="编号" align="center" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="ADJUNCT" label="附属物" align="center" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="SPEC" label="规格" align="center" show-overflow-tooltip></el-table-column>
+        <el-table
+          ref="valvesTable"
+          :data="burstInfo.valveArray"
+          stripe
+          max-height="200"
+          @row-click="tableRowLook"
+          :header-cell-style="{
+            fontSize: '14px',
+            fontWeight: '600',
+            background: '#eaf1fd',
+            color: '#909399',
+          }"
+          style="width: 100%"
+        >
+          <el-table-column
+            type="selection"
+            align="center"
+            width="50"
+          ></el-table-column>
+          <el-table-column
+            prop="SID"
+            label="编号"
+            align="center"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            prop="ADJUNCT"
+            label="附属物"
+            align="center"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            prop="SPEC"
+            label="规格"
+            align="center"
+            show-overflow-tooltip
+          ></el-table-column>
           <!-- <el-table-column label="操作" align="center">
             <template slot-scope="scope">
               <el-button type="text" @click="tableRowLook(scope)">查看</el-button>
@@ -69,21 +135,56 @@
     <div class="table-chart">
       <div class="item-head">
         所有结果
-        <el-button type="text" size="middle" style="margin-left:10px" @click="viewDetails">查看详情</el-button>
+        <el-button
+          type="text"
+          size="middle"
+          style="margin-left: 10px"
+          @click="viewDetails"
+          >查看详情</el-button
+        >
       </div>
       <div class="table-container">
-        <el-table :data="totalResultTable" stripe max-height="200" :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}" style="width: 100%">
+        <el-table
+          :data="totalResultTable"
+          stripe
+          max-height="200"
+          :header-cell-style="{
+            fontSize: '14px',
+            fontWeight: '600',
+            background: '#eaf1fd',
+            color: '#909399',
+          }"
+          style="width: 100%"
+        >
           <el-table-column label="序号" align="center">
             <template slot-scope="scope">
-              <span>{{scope.$index+1}}</span>
+              <span>{{ scope.$index + 1 }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip></el-table-column>
-          <el-table-column prop="num" label="数量" align="center" show-overflow-tooltip></el-table-column>
+          <el-table-column
+            prop="name"
+            label="名称"
+            align="center"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            prop="num"
+            label="数量"
+            align="center"
+            show-overflow-tooltip
+          ></el-table-column>
           <el-table-column align="center" label="操作">
-            <template slot-scope="{row}">
-              <download-excel style="display: inline-block;" :data="row.data" :fields="row.fields" type="xls" :name="getFileName(row.name)">
-                <el-button type="text" @click="beforeExport(row)">导出</el-button>
+            <template slot-scope="{ row }">
+              <download-excel
+                style="display: inline-block"
+                :data="row.data"
+                :fields="row.fields"
+                type="xls"
+                :name="getFileName(row.name)"
+              >
+                <el-button type="text" @click="beforeExport(row)"
+                  >导出</el-button
+                >
               </download-excel>
             </template>
           </el-table-column>
@@ -91,7 +192,13 @@
       </div>
     </div>
     <div class="op-box">
-      <el-button type="danger" size="small" style="width:100%" @click="clearBurstResult">清除结果</el-button>
+      <el-button
+        type="danger"
+        size="small"
+        style="width: 100%"
+        @click="clearBurstResult"
+        >清除结果</el-button
+      >
     </div>
   </div>
 </template>
@@ -128,9 +235,9 @@ export default {
         valveArray: [],
         pipeArray: [],
         pipeLength: 0,
-        facilities: []
+        facilities: [],
       },
-      totalResultTable: []
+      totalResultTable: [],
     }
   },
   computed: {
@@ -145,7 +252,7 @@ export default {
     // 获取点击查询结果
     resultInfo() {
       return this.data.that.queryByClick.resultInfo
-    }
+    },
   },
   watch: {
     // 监听面板是否被改变
@@ -180,7 +287,7 @@ export default {
           }
         }
       }
-    }
+    },
   },
   mounted() {
     this.pipeDataSet = mapConfig.iServerUrl.netWorkConfig // 获取所有管道爆管分析配置
@@ -190,19 +297,19 @@ export default {
       style: new Style({
         stroke: new Stroke({
           width: 5,
-          color: '#F40'
+          color: '#F40',
         }),
         image: new Circle({
           radius: 7,
           stroke: new Stroke({
             width: 3,
-            color: '#ffce44'
+            color: '#ffce44',
           }),
           fill: new Fill({
-            color: '#F40'
-          })
-        })
-      })
+            color: '#F40',
+          }),
+        }),
+      }),
     })
     this.data.that.map.addLayer(this.vectorLayer)
   },
@@ -231,7 +338,7 @@ export default {
       this.$store.dispatch('gis/writeLog', {
         operateModule: '爆管分析',
         operateContent: `导出${row.name},共导出数据${row.data.length}条`,
-        operateParams: ''
+        operateParams: '',
       })
     },
     /**
@@ -243,18 +350,18 @@ export default {
       /**先查询阀门的ID */
       let queryParam = new SuperMap.FilterParameter({
         name: this.selectPipeConfig.netWorkNodeLayer, // 网络数据集图层名称
-        attributeFilter: "ADJUNCT LIKE '%阀%'"
+        attributeFilter: "ADJUNCT LIKE '%阀%'",
       })
       let queryBySQLParams = new SuperMap.QueryBySQLParameters({
-        queryParams: [queryParam]
+        queryParams: [queryParam],
       })
       let queryBySQLService = new SuperMap.QueryBySQLService(
         this.selectPipeConfig.mapUrl,
         {
           eventListeners: {
             processCompleted: this.queryValveCompleted,
-            processFailed: this.processFailed
-          }
+            processFailed: this.processFailed,
+          },
         }
       )
       queryBySQLService.processAsync(queryBySQLParams)
@@ -272,7 +379,7 @@ export default {
       // console.log("阀门查询结果", res)
       let valves = res.result.recordsets[0].features.features
       let valveIDs = []
-      valves.forEach(item => {
+      valves.forEach((item) => {
         valveIDs.push(item.properties.SmID)
       })
       this.valveIDs = valveIDs // 保存阀门数据
@@ -285,12 +392,12 @@ export default {
     reExecuteBurst() {
       this.doLoading = true // 执行状态
       let currentSelect = this.$refs.valvesTable.selection
-      let IDs = currentSelect.map(item => {
+      let IDs = currentSelect.map((item) => {
         return item.SmID
       })
       let differenceIDs = this.tempValveIDs
         .concat(IDs)
-        .filter(v => this.valveIDs.includes(v) && !IDs.includes(v)) // 排查失效阀门
+        .filter((v) => this.valveIDs.includes(v) && !IDs.includes(v)) // 排查失效阀门
       this.tempValveIDs = differenceIDs
       // 再次执行分析
       this.BurstPipelineAnalyst(differenceIDs)
@@ -300,7 +407,7 @@ export default {
      */
     getNetWorkConfig(selectInfo) {
       let netWorkConfig = null
-      this.pipeDataSet.forEach(item => {
+      this.pipeDataSet.forEach((item) => {
         if (
           item.name == selectInfo.feature.dataType.label &&
           item.burstAnalysis
@@ -331,13 +438,13 @@ export default {
     showBurstPoint() {
       this.vectorLayer.getSource().clear() // 清空显示
       let burstPoint = new Feature({
-        geometry: this.burstPoint
+        geometry: this.burstPoint,
       })
       burstPoint.setStyle(
         new Style({
           image: new Icon({
-            src: require('@/assets/images/burst.png')
-          })
+            src: require('@/assets/images/burst.png'),
+          }),
         })
       )
       this.data.that.popupWindowClose() // 清除地图视图点击选择的要素,关闭弹窗
@@ -364,18 +471,19 @@ export default {
         sourceNodeIDs: valvesArray, //设施点ID数组
         edgeID: this.burstSegmentID, //爆管弧段ID,既查询弧段内容
         nodeID: null, //爆管结点ID (注:edgeID 与 nodeID 不能同时使用)
-        isUncertainDirectionValid: true //指定不确定流向是否有效
+        isUncertainDirectionValid: true, //指定不确定流向是否有效
       })
 
-      var burstPipelineAnalystService = new SuperMap.BurstPipelineAnalystService(
-        this.selectPipeConfig.netWorkServiceurl,
-        {
-          eventListeners: {
-            processCompleted: this.BurstPipelineAnalyst_processCompleted,
-            processFailed: this.processFailed
+      var burstPipelineAnalystService =
+        new SuperMap.BurstPipelineAnalystService(
+          this.selectPipeConfig.netWorkServiceurl,
+          {
+            eventListeners: {
+              processCompleted: this.BurstPipelineAnalyst_processCompleted,
+              processFailed: this.processFailed,
+            },
           }
-        }
-      )
+        )
       burstPipelineAnalystService.processAsync(parameter)
     },
     /**
@@ -399,7 +507,7 @@ export default {
     queryBySQL(criticalNodes, edgeID) {
       let queryParam = new SuperMap.FilterParameter({
         name: this.selectPipeConfig.netWorkNodeLayer, // 网络数据集结点图层名称
-        attributeFilter: 'SmNodeID in (' + criticalNodes + ')'
+        attributeFilter: 'SmNodeID in (' + criticalNodes + ')',
       })
       let str = '('
       for (var i = 0; i < edgeID.length; i++) {
@@ -408,10 +516,10 @@ export default {
       }
       let queryParam2 = new SuperMap.FilterParameter({
         name: this.selectPipeConfig.netWorkLayerName, // 网络数据集图层名称
-        attributeFilter: 'SMID in ' + str
+        attributeFilter: 'SMID in ' + str,
       })
       let queryBySQLParams = new SuperMap.QueryBySQLParameters({
-        queryParams: [queryParam, queryParam2]
+        queryParams: [queryParam, queryParam2],
       })
 
       let queryBySQLService = new SuperMap.QueryBySQLService(
@@ -419,8 +527,8 @@ export default {
         {
           eventListeners: {
             processCompleted: this.processCompleted,
-            processFailed: this.processFailed
-          }
+            processFailed: this.processFailed,
+          },
         }
       )
       queryBySQLService.processAsync(queryBySQLParams)
@@ -430,7 +538,7 @@ export default {
      */
     getFileName(layerName) {
       let securities = this.$store.state.permission.sysDics.serviceLevel
-      let securityClass = securities.find(item => {
+      let securityClass = securities.find((item) => {
         return (
           item.code.toString() == this.selectPipeConfig.securityClass.toString()
         )
@@ -447,19 +555,42 @@ export default {
       this.burstInfo.valveArray = []
       this.burstInfo.pipeArray = []
       this.totalResultTable = []
+      let mapLayers = this.$store.state.permission.mapLayers
 
-      recordsets.forEach(item => {
+      recordsets.forEach((item) => {
         let features = item.features.features
+        const objLayer = mapLayers.find(
+          (layer) => layer.datasetsNodeLayer === item.datasetName  || layer.datasetsNetLayer === item.datasetName
+        )
+        let securityClass = ''
+        if (objLayer) {
+          switch (parseInt(objLayer.securityClass)) {
+            case 1:
+              securityClass = '公开'
+              break
+            case 2:
+              securityClass = '内部'
+              break
+            case 3:
+              securityClass = '秘密'
+              break
+            case 4:
+              securityClass = '机密'
+              break
+          }
+        }
         let pipeLength = new Number()
         if (features.length > 0)
           if (features[0].geometry.type == 'Point') {
-            features.forEach(pointFeature => {
+            features.forEach((pointFeature) => {
               pointFeature.properties['geometry'] = pointFeature.geometry
-              this.burstInfo.valveArray.push(pointFeature.properties)
+              let properties = pointFeature.properties
+              properties['SECURITY'] = securityClass
+              this.burstInfo.valveArray.push(properties)
               // 显示设施
               this.vectorLayer.getSource().addFeature(
                 new Feature({
-                  geometry: new GeoJSON().readGeometry(pointFeature.geometry)
+                  geometry: new GeoJSON().readGeometry(pointFeature.geometry),
                 })
               )
             })
@@ -467,11 +598,12 @@ export default {
               name: '受影响阀门',
               num: this.burstInfo.valveArray.length + '个',
               data: this.burstInfo.valveArray,
-              fields: this.getFields('point')
+              fields: this.getFields('point'),
             })
           } else {
-            features.forEach(LineFeature => {
+            features.forEach((LineFeature) => {
               LineFeature.properties['geometry'] = LineFeature.geometry
+              LineFeature.properties['SECURITY'] = securityClass
               this.burstInfo.pipeArray.push(LineFeature.properties)
               pipeLength += parseFloat(LineFeature.properties.SmLength)
               let edgeGeometry = new GeoJSON().readGeometry(
@@ -480,7 +612,7 @@ export default {
               // 显示管道
               this.vectorLayer.getSource().addFeature(
                 new Feature({
-                  geometry: edgeGeometry
+                  geometry: edgeGeometry,
                 })
               )
             })
@@ -494,7 +626,7 @@ export default {
                 this.burstInfo.pipeLength +
                 'm',
               data: this.burstInfo.pipeArray,
-              fields: this.getFields('line')
+              fields: this.getFields('line'),
             })
             // 查询受影响设施
             this.queryPoint(features)
@@ -503,7 +635,7 @@ export default {
             this.$store.dispatch('gis/writeLog', {
               operateModule: '爆管分析',
               operateContent: `对${this.burstInfo.burstPipe}进行爆管分析;`,
-              operateParams: JSON.stringify({ lonLat: this.burstInfo.lonlat })
+              operateParams: JSON.stringify({ lonLat: this.burstInfo.lonlat }),
             })
           }
       })
@@ -525,34 +657,53 @@ export default {
         toIndex: -1,
         maxFeatures: 10000000,
         datasetNames: [this.selectPipeConfig.facilitiesDatasetName],
-        queryParameter: { attributeFilter: 'SID in ' + str }
+        queryParameter: { attributeFilter: 'SID in ' + str },
       })
+      let securityClass = ''
+      switch (parseInt(this.selectPipeConfig.securityClass)) {
+        case 1:
+          securityClass = '公开'
+          break
+        case 2:
+          securityClass = '内部'
+          break
+        case 3:
+          securityClass = '秘密'
+          break
+        case 4:
+          securityClass = '机密'
+          break
+      }
       let url = mapConfig.iServerUrl.pipelineDataServer.url
       //向服务器发送请求,并对返回的结果进行处理
-      new FeatureService(url).getFeaturesBySQL(sqlQueryParam, serviceResult => {
-        if (serviceResult.type == 'processFailed') {
-          this.$message.error(
-            `查询受影响设施失败,${serviceResult.error.errorMsg}!`
-          )
+      new FeatureService(url).getFeaturesBySQL(
+        sqlQueryParam,
+        (serviceResult) => {
+          if (serviceResult.type == 'processFailed') {
+            this.$message.error(
+              `查询受影响设施失败,${serviceResult.error.errorMsg}!`
+            )
+            this.doLoading = false // 关闭执行状态
+            return
+          }
+          let features = serviceResult.result.features.features
+          if (features.length == 0) return
+          else {
+            features.forEach((pointFeature) => {
+              pointFeature.properties['geometry'] = pointFeature.geometry
+              pointFeature.properties['SECURITY'] = securityClass
+              this.burstInfo.facilities.push(pointFeature.properties)
+            })
+            this.totalResultTable.push({
+              name: '受影响设施',
+              num: this.burstInfo.facilities.length + '个',
+              data: this.burstInfo.facilities,
+              fields: this.getFields('point'),
+            })
+          }
           this.doLoading = false // 关闭执行状态
-          return
-        }
-        let features = serviceResult.result.features.features
-        if (features.length == 0) return
-        else {
-          features.forEach(pointFeature => {
-            pointFeature.properties['geometry'] = pointFeature.geometry
-            this.burstInfo.facilities.push(pointFeature.properties)
-          })
-          this.totalResultTable.push({
-            name: '受影响设施',
-            num: this.burstInfo.facilities.length + '个',
-            data: this.burstInfo.facilities,
-            fields: this.getFields('point')
-          })
         }
-        this.doLoading = false // 关闭执行状态
-      })
+      )
     },
     /**
      * 获取字段,Excel导出时使用
@@ -560,11 +711,11 @@ export default {
     getFields(type) {
       let fields = {}
       if (type == 'line')
-        this.$store.state.common.PipeLineFields.forEach(item => {
+        this.$store.state.common.PipeLineFields.forEach((item) => {
           fields[item.pipelineVal] = item.pipelineKey
         })
       else {
-        this.$store.state.common.PipePointFields.forEach(item => {
+        this.$store.state.common.PipePointFields.forEach((item) => {
           fields[item.pipelineVal] = item.pipelineKey
         })
       }
@@ -580,11 +731,11 @@ export default {
       let infoObject = {
         properties: row,
         dataType: { label: '' },
-        geometry: row.geometry
+        geometry: row.geometry,
       }
 
       let feature = new Feature({
-        geometry: geometry
+        geometry: geometry,
       })
       if (geometry.getType() == 'LineString') {
         popupPosition = getCenter(geometry.getExtent())
@@ -616,7 +767,7 @@ export default {
         valveArray: [],
         pipeArray: [],
         pipeLength: 0,
-        facilities: []
+        facilities: [],
       }
       this.burstSegmentID = []
       this.selectPipeConfig = {}
@@ -648,16 +799,20 @@ export default {
           pathId: pid,
           widgetid: 'HalfPanel',
           type: 'gis',
-          component: () => Promise.resolve(require(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/${pid}/widget`).default),
+          component: () =>
+            Promise.resolve(
+              require(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/${pid}/widget`)
+                .default
+            ),
           label: this.totalResultTable[i].name,
           meta: { title: this.totalResultTable[i].name },
-          param: { dataType: dataType, features: features }
+          param: { dataType: dataType, features: features },
         }
         this.$store.dispatch('map/delHalfPanels', pid)
         this.$store.dispatch('map/changeMethod', panel)
       }
-    }
-  }
+    },
+  },
 }
 </script>
 

+ 10 - 1
src/views/kxcSystem/pipelineSystem/sqlQuery/sqlQueryResult/widget.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2022-05-11 19:15:38
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2023-04-28 15:48:23
+ * @FilePath: \kxc_web\src\views\kxcSystem\pipelineSystem\sqlQuery\sqlQueryResult\widget.vue
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
 <template>
   <div style="width:100%;height:100%">
     <queryResult v-if="param" :param="param" :data="data"></queryResult>
@@ -35,7 +43,8 @@ export default {
           // console.log('站点:', item)
           let dataType = item.param.dataType
           let features = item.param.features
-          this.param = { dataType: dataType, allFeatures: features }
+          let targetDataset = item.param.targetDataset
+          this.param = { dataType: dataType, allFeatures: features,targetDataset:targetDataset }
           break
         }
       }

+ 2 - 1
src/views/kxcSystem/pipelineSystem/sqlQuery/widget.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- sql查询 -->
   <div class="query-container">
     <div class="query-box">
       <el-row>
@@ -395,7 +396,7 @@ export default {
           ),
         label: 'SQL查询',
         meta: { title: 'SQL查询' },
-        param: { dataType: this.targetDataset.type, features: this.resFeatures }
+        param: { dataType: this.targetDataset.type, features: this.resFeatures,targetDataset:this.targetDataset }
       }
       this.$store.dispatch('map/delHalfPanels', 'sqlQueryResult')
       this.$store.dispatch('map/changeMethod', info)