Selaa lähdekoodia

解决bug;
首页增加数据统计展示;
增加数据库导入功能;
增加数据库之间模块;
数据录入中增加线录入;

wandequan 2 vuotta sitten
vanhempi
commit
8d7de892ed
52 muutettua tiedostoa jossa 1927 lisäystä ja 138 poistoa
  1. 53 0
      package-lock.json
  2. 1 0
      package.json
  3. 2 2
      public/index.html
  4. 2 1
      public/static/config/config.js
  5. 1 0
      public/static/package/updateLocations/css/chunk-8743374a.daad7004.css
  6. 0 0
      public/static/package/updateLocations/css/chunk-fa0760ee.b697442f.css
  7. BIN
      public/static/package/updateLocations/css/chunk-fa0760ee.b697442f.css.gz
  8. 0 0
      public/static/package/updateLocations/css/chunk-vendors.b1f8464b.css
  9. 1 0
      public/static/package/updateLocations/css/index.1779ea4e.css
  10. BIN
      public/static/package/updateLocations/favicon.ico
  11. 1 0
      public/static/package/updateLocations/index.html
  12. 0 0
      public/static/package/updateLocations/js/chunk-59124080.d63685d8.js
  13. 0 0
      public/static/package/updateLocations/js/chunk-6859c856.054a6894.js
  14. BIN
      public/static/package/updateLocations/js/chunk-6859c856.054a6894.js.gz
  15. 0 0
      public/static/package/updateLocations/js/chunk-8743374a.bcf4376f.js
  16. BIN
      public/static/package/updateLocations/js/chunk-8743374a.bcf4376f.js.gz
  17. 0 0
      public/static/package/updateLocations/js/chunk-fa0760ee.08ec3794.js
  18. BIN
      public/static/package/updateLocations/js/chunk-fa0760ee.08ec3794.js.gz
  19. 0 0
      public/static/package/updateLocations/js/chunk-vendors.10e58eab.js
  20. BIN
      public/static/package/updateLocations/js/chunk-vendors.10e58eab.js.gz
  21. 0 0
      public/static/package/updateLocations/js/index.da97c14b.js
  22. 9 0
      public/static/package/updateLocations/static/config/config.js
  23. 1 0
      public/static/package/updateLocations/static/config/globalVariable.js
  24. 14 0
      src/api/common.js
  25. 14 1
      src/api/content.js
  26. BIN
      src/assets/images/firstPage/1.png
  27. BIN
      src/assets/images/firstPage/2.png
  28. BIN
      src/assets/images/firstPage/3.png
  29. BIN
      src/assets/images/firstPage/4.png
  30. BIN
      src/assets/images/firstPage/5.png
  31. BIN
      src/assets/images/firstPage/6.png
  32. BIN
      src/assets/images/firstPage/mingxi.png
  33. BIN
      src/assets/images/firstPage/wendangguanlixitong-wendangguanlixitongtubiao.png
  34. BIN
      src/assets/images/layerZJImage/DBImport.jpg
  35. 549 0
      src/components/Currency/DataTable/DBImport.vue
  36. 9 3
      src/components/Currency/DataTable/DataTable.vue
  37. 57 0
      src/components/Currency/DataTable/MetadataListContainer.vue
  38. 169 0
      src/components/Currency/DataTable/MetadataListContainer/Locations.vue
  39. 3 0
      src/components/Currency/DataTable/MetadataListContainer/MetadataList.vue
  40. 29 23
      src/components/Currency/DataTable/MetadataListContainer/SingleData.vue
  41. 17 2
      src/components/DataDisplay/LayerDisplay.vue
  42. 1 1
      src/components/DataDisplay/LayerDisplay/ContentList.vue
  43. 125 72
      src/components/DataDisplay/LayerDisplay/Menu.vue
  44. 1 1
      src/components/DataDisplay/LayerDisplay/PlaceList.vue
  45. 8 8
      src/components/DataLayer/LayerDetail.vue
  46. 439 0
      src/components/DataQualityInspection/Process/DBQualityInspection.vue
  47. 96 0
      src/components/DataQualityInspection/Rules/ImportDBQualityInspectionRules.vue
  48. 57 1
      src/components/Utilities/CoordinateConversionTool.vue
  49. 8 0
      src/store/index.js
  50. 229 3
      src/views/ComprehensiveDisplay.vue
  51. 28 13
      src/views/DataQualityInspection.vue
  52. 3 7
      vue.config.js

+ 53 - 0
package-lock.json

@@ -16,6 +16,7 @@
         "element-ui": "^2.15.1",
         "ol": "^6.9.0",
         "qs": "^6.10.3",
+        "terraformer-wkt-parser": "^1.2.1",
         "vue": "^2.6.11",
         "vue-cli-plugin-style-resources-loader": "^0.1.5",
         "vue-codemirror": "^4.0.0",
@@ -2001,6 +2002,11 @@
         "@types/range-parser": "*"
       }
     },
+    "node_modules/@types/geojson": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-1.0.6.tgz",
+      "integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w=="
+    },
     "node_modules/@types/glob": {
       "version": "7.2.0",
       "resolved": "https://registry.npmmirror.com/@types/glob/-/glob-7.2.0.tgz",
@@ -13444,6 +13450,31 @@
         "node": ">=6"
       }
     },
+    "node_modules/terraformer": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmmirror.com/terraformer/-/terraformer-1.0.12.tgz",
+      "integrity": "sha512-MokUp0+MFal4CmJDVL6VAO1bKegeXcBM2RnPVfqcFIp2IIv8EbPAjG0j/vEy/vuKB8NVMMSF2vfpVS/QLe4DBg==",
+      "deprecated": "terraformer is deprecated and no longer supported. Please use @terraformer/arcgis.",
+      "engines": {
+        "node": ">=4.2.6"
+      },
+      "optionalDependencies": {
+        "@types/geojson": "^7946.0.0 || ^1.0.0"
+      }
+    },
+    "node_modules/terraformer-wkt-parser": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmmirror.com/terraformer-wkt-parser/-/terraformer-wkt-parser-1.2.1.tgz",
+      "integrity": "sha512-+CJyNLWb3lJ9RsZMTM66BY0MT3yIo4l4l22Jd9CrZuwzk54fsu4Sc7zejuS9fCITTuTQy3p06d4MZMVI7v5wSg==",
+      "deprecated": "terraformer-wkt-parser is deprecated and no longer supported. Please use @terraformer/wkt.",
+      "dependencies": {
+        "@types/geojson": "^1.0.0",
+        "terraformer": "~1.0.5"
+      },
+      "engines": {
+        "node": ">=4.2.6"
+      }
+    },
     "node_modules/terser": {
       "version": "4.8.0",
       "resolved": "https://registry.npmmirror.com/terser/-/terser-4.8.0.tgz",
@@ -17209,6 +17240,11 @@
         "@types/range-parser": "*"
       }
     },
+    "@types/geojson": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-1.0.6.tgz",
+      "integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w=="
+    },
     "@types/glob": {
       "version": "7.2.0",
       "resolved": "https://registry.npmmirror.com/@types/glob/-/glob-7.2.0.tgz",
@@ -26798,6 +26834,23 @@
       "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
       "dev": true
     },
+    "terraformer": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmmirror.com/terraformer/-/terraformer-1.0.12.tgz",
+      "integrity": "sha512-MokUp0+MFal4CmJDVL6VAO1bKegeXcBM2RnPVfqcFIp2IIv8EbPAjG0j/vEy/vuKB8NVMMSF2vfpVS/QLe4DBg==",
+      "requires": {
+        "@types/geojson": "^7946.0.0 || ^1.0.0"
+      }
+    },
+    "terraformer-wkt-parser": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmmirror.com/terraformer-wkt-parser/-/terraformer-wkt-parser-1.2.1.tgz",
+      "integrity": "sha512-+CJyNLWb3lJ9RsZMTM66BY0MT3yIo4l4l22Jd9CrZuwzk54fsu4Sc7zejuS9fCITTuTQy3p06d4MZMVI7v5wSg==",
+      "requires": {
+        "@types/geojson": "^1.0.0",
+        "terraformer": "~1.0.5"
+      }
+    },
     "terser": {
       "version": "4.8.0",
       "resolved": "https://registry.npmmirror.com/terser/-/terser-4.8.0.tgz",

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "element-ui": "^2.15.1",
     "ol": "^6.9.0",
     "qs": "^6.10.3",
+    "terraformer-wkt-parser": "^1.2.1",
     "vue": "^2.6.11",
     "vue-cli-plugin-style-resources-loader": "^0.1.5",
     "vue-codemirror": "^4.0.0",

+ 2 - 2
public/index.html

@@ -26,8 +26,8 @@
   <div id="app"></div>
   <script type="text/javascript" src="./static/plugins/js/jquery/jquery3.4.1.js"></script>
   <script type="text/javascript" src="./static/plugins/js/moment/moment.js"></script>
-  <!-- <script type="text/javascript" src="./static/plugins/js/wkt/terraformer.js"></script>
-  <script type="text/javascript" src="./static/plugins/js/wkt/terraformer-wkt-parser.min.js"></script> -->
+  <script type="text/javascript" src="./static/plugins/js/wkt/terraformer.js"></script>
+  <script type="text/javascript" src="./static/plugins/js/wkt/terraformer-wkt-parser.min.js"></script> 
   <script type="text/javascript" src="./static/plugins/js/turf/turf.min.js"></script>
   <script type="text/javascript" src="./static/plugins/js/proj4js/proj4.js"></script>
   <!-- built files will be auto injected -->

+ 2 - 1
public/static/config/config.js

@@ -24,7 +24,8 @@ var systemConfig = {
   },
 
   // 数据地址
-  dataUrl: "/proxy_data/metadata",
+  dataUrl: "/proxy_data/metadata", // 线上
+  // dataUrl: "/proxy_data", // 本地
 
   // // 标注地址
   // markUrl: "/proxy_mark/conllection/conllection",

+ 1 - 0
public/static/package/updateLocations/css/chunk-8743374a.daad7004.css

@@ -0,0 +1 @@
+#map[data-v-50b980b5]{width:100%;height:100%;position:absolute}#map[data-v-50b980b5] .ol-zoom{top:inherit;left:inherit;bottom:60px;right:20px}#map[data-v-50b980b5] .ol-zoom .ol-zoom-in,#map[data-v-50b980b5] .ol-zoom .ol-zoom-out{width:30px;height:30px;font-size:24px}#map[data-v-50b980b5] .ol-scale-line{top:unset;left:unset;left:20px}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/css/chunk-fa0760ee.b697442f.css


BIN
public/static/package/updateLocations/css/chunk-fa0760ee.b697442f.css.gz


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/css/chunk-vendors.b1f8464b.css


+ 1 - 0
public/static/package/updateLocations/css/index.1779ea4e.css

@@ -0,0 +1 @@
+*{font-family:Microsoft YaHei;margin:0 0;padding:0 0}#app,body,html{height:100%;width:100%}

BIN
public/static/package/updateLocations/favicon.ico


+ 1 - 0
public/static/package/updateLocations/index.html

@@ -0,0 +1 @@
+<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>绘制</title><script src="./static/config/config.js"></script><script src="./static/config/globalVariable.js"></script><link href="css/chunk-8743374a.daad7004.css" rel="prefetch"><link href="css/chunk-fa0760ee.b697442f.css" rel="prefetch"><link href="js/chunk-59124080.d63685d8.js" rel="prefetch"><link href="js/chunk-6859c856.054a6894.js" rel="prefetch"><link href="js/chunk-8743374a.bcf4376f.js" rel="prefetch"><link href="js/chunk-fa0760ee.08ec3794.js" rel="prefetch"><link href="css/chunk-vendors.b1f8464b.css" rel="preload" as="style"><link href="css/index.1779ea4e.css" rel="preload" as="style"><link href="js/chunk-vendors.10e58eab.js" rel="preload" as="script"><link href="js/index.da97c14b.js" rel="preload" as="script"><link href="css/chunk-vendors.b1f8464b.css" rel="stylesheet"><link href="css/index.1779ea4e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but 绘制 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.10e58eab.js"></script><script src="js/index.da97c14b.js"></script></body></html>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/js/chunk-59124080.d63685d8.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/js/chunk-6859c856.054a6894.js


BIN
public/static/package/updateLocations/js/chunk-6859c856.054a6894.js.gz


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/js/chunk-8743374a.bcf4376f.js


BIN
public/static/package/updateLocations/js/chunk-8743374a.bcf4376f.js.gz


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/js/chunk-fa0760ee.08ec3794.js


BIN
public/static/package/updateLocations/js/chunk-fa0760ee.08ec3794.js.gz


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/js/chunk-vendors.10e58eab.js


BIN
public/static/package/updateLocations/js/chunk-vendors.10e58eab.js.gz


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/static/package/updateLocations/js/index.da97c14b.js


+ 9 - 0
public/static/package/updateLocations/static/config/config.js

@@ -0,0 +1,9 @@
+const systemConfig = {
+  mapDefault: {
+    center: {
+      lon: 116.334228, // 地图中心点经度
+      lat: 39.072511 // 地图中心点纬度
+    },
+    zoom: 7 // 地图缩放级别(1 - 19)
+  },
+}

+ 1 - 0
public/static/package/updateLocations/static/config/globalVariable.js

@@ -0,0 +1 @@
+let globalVariable={}

+ 14 - 0
src/api/common.js

@@ -0,0 +1,14 @@
+import { 
+    post, 
+  } from '../utils/request'
+  
+  
+  // 根据tableName获取内容数据
+  const getStatisticsData = () => {
+    return post(systemConfig.dataUrl + '/common/getInfoData');
+  }
+  
+  export default {
+    getStatisticsData, 
+  }
+  

+ 14 - 1
src/api/content.js

@@ -60,6 +60,17 @@ const getContentForTitle = (params) => {
   return post(systemConfig.dataUrl + '/content/selectByTitleAPage?' + str)
 }
 
+
+// 获取数据库导入配置
+const getDBConfigforModelID = (params) => {
+  let str = splicingParam(params)
+  return post(systemConfig.dataUrl + '/content/getDBInfoByModelId?' + str)
+}
+// 上传数据库导入配置
+const uploadDBConfigforModelID = (params) => {
+  return postform(systemConfig.dataUrl + '/qc/qcDBData', params)
+}
+
 export default {
   getContentListById,
   getContentListByModelId,
@@ -70,5 +81,7 @@ export default {
   uploadGeojsonFile,
   uploadExcelFile,
   uploadShapeFile,
-  getContentForTitle
+  getContentForTitle,
+  getDBConfigforModelID,
+  uploadDBConfigforModelID,
 }

BIN
src/assets/images/firstPage/1.png


BIN
src/assets/images/firstPage/2.png


BIN
src/assets/images/firstPage/3.png


BIN
src/assets/images/firstPage/4.png


BIN
src/assets/images/firstPage/5.png


BIN
src/assets/images/firstPage/6.png


BIN
src/assets/images/firstPage/mingxi.png


BIN
src/assets/images/firstPage/wendangguanlixitong-wendangguanlixitongtubiao.png


BIN
src/assets/images/layerZJImage/DBImport.jpg


+ 549 - 0
src/components/Currency/DataTable/DBImport.vue

@@ -0,0 +1,549 @@
+<template>
+  <el-dialog
+    :class="'singleDataDialog'"
+    :visible.sync="isShow"
+    width="700px"
+    top="7%"
+    :close-on-click-modal="false"
+    :before-close="dialogBeforeClose"
+  >
+    <el-form
+      :model="fromDataRender"
+      class="singledata"
+      ref="single_form"
+      label-width="80px"
+      :rules="rules"
+    >
+      <el-row>
+        <el-col :span="11">
+          <el-form-item label="标题字段" prop="content.titlePara">
+            <el-input
+              v-model="fromDataRender.content.titlePara"
+              :readonly="!edit"
+            ></el-input>
+            <!-- maxlength="20"
+              show-word-limit -->
+          </el-form-item>
+        </el-col>
+        <el-col :span="11">
+          <el-form-item label="行政区划编码字段">
+            <el-input
+              v-model="fromDataRender.content.areaCodePara"
+              :readonly="!edit"
+              show-word-limit
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="11">
+          <el-form-item label="第三方ID字段" prop="content.threeIdPara">
+            <el-input
+              v-model="fromDataRender.content.threeIdPara"
+              :readonly="!edit"
+              show-word-limit
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="11">
+          <el-form-item label="第三方表名" prop="tableName">
+            <el-input
+              v-model="fromDataRender.tableName"
+              :readonly="!edit"
+              show-word-limit
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="11">
+          <el-form-item label="中心经度字段" prop="content.lonPara">
+            <el-input
+              v-model="fromDataRender.content.lonPara"
+              :readonly="!edit"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="11">
+          <el-form-item label="中心纬度字段" prop="content.latPara">
+            <el-input
+              v-model="fromDataRender.content.latPara"
+              :readonly="!edit"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row v-if="modelParams.geotype != 0">
+        <el-col :span="22">
+          <el-form-item label="点集字段" prop="content.locationsPara">
+            <!-- :readonly="!edit" -->
+            <el-input
+              v-model="fromDataRender.content.locationsPara"
+              placeholder="实际字段值应为WKT格式数据,其余类型不支持"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="11">
+          <el-form-item label="描述字段" prop="content.contentPara">
+            <el-input
+              v-model="fromDataRender.content.contentPara"
+              :readonly="!edit"
+            ></el-input>
+            <!-- maxlength="100" -->
+            <!-- show-word-limit -->
+          </el-form-item>
+        </el-col>
+        <el-col :span="11">
+          <el-form-item label="更新字段" prop="updatePara">
+            <el-input
+              v-model="fromDataRender.updatePara"
+              :readonly="!edit"
+            ></el-input>
+            <!-- maxlength="100" -->
+            <!-- show-word-limit -->
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-button
+          type="text"
+          style="float: right"
+          @click="changeAdvancedOptionsStatue()"
+        >
+          高级选项
+          <i
+            v-show="!advancedOptionsShow"
+            class="el-icon-caret-bottom el-icon--right"
+          ></i>
+          <i
+            v-show="advancedOptionsShow"
+            class="el-icon-caret-top el-icon--right"
+          ></i>
+        </el-button>
+        <!-- el-icon-caret-bottom -->
+        <!-- el-icon-caret-top -->
+      </el-row>
+      <!-- 高级选项 table -->
+      <div v-if="advancedOptionsShow">
+        <el-table
+          :data="listData"
+          :class="['advanceOptionsTable']"
+          max-height="250"
+        >
+          <el-table-column label="字段名称">
+            <template slot-scope="scope">
+              <el-input
+                placeholder="例:CITYID"
+                v-model="scope.row.paraName"
+                :readonly="!edit"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="名称">
+            <template slot-scope="scope">
+              <el-input
+                placeholder="例:建筑金额"
+                v-model="scope.row.name"
+                :readonly="!edit"
+              ></el-input>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="单位">
+            <template slot-scope="scope">
+              <el-input
+                placeholder="例:万元"
+                v-model="scope.row.unit"
+                :readonly="!edit"
+              ></el-input>
+            </template>
+          </el-table-column>
+
+          <el-table-column :align="'right'" v-if="edit">
+            <template slot="header">
+              <el-button size="mini" @click="addAdvancedOptionsRow()">
+                <i class="el-icon-plus"></i>
+              </el-button>
+            </template>
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                @click="deleteAdvancedOptionsRow(scope.$index, scope)"
+              >
+                <i class="el-icon-minus"></i>
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!-- 高级选项 table end -->
+    </el-form>
+    <!-- centerPoint: centerPoint, -->
+
+    <span slot="title" class="dialog-title">
+      <div class="title">
+        <span>{{ title }}</span>
+      </div>
+    </span>
+    <span slot="footer" class="dialog-footer" v-if="edit">
+      <el-button @click="dialogBeforeClose()">取 消</el-button>
+      <el-button type="primary" @click="sure">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import api from "@/api/content";
+export default {
+  components: {},
+  props: {
+    isShow: {
+      type: Boolean,
+      default: false,
+    },
+    edit: {
+      type: Boolean,
+      default: false,
+    },
+    type: {
+      type: Number,
+      default: 1, //1 新增 2 修改
+    },
+    title: {
+      type: String,
+      default: "",
+    },
+    beforeClose: {
+      type: Function,
+    },
+    modelParams: {
+      type: Object,
+      default: null,
+    },
+    formData: {
+      type: Object,
+      default: function () {
+        return {
+          content: {
+            areaCodePara: "",
+            contentPara: "",
+            jsonStrPara: [],
+            latPara: "",
+            lonPara: "",
+            locationsPara: "",
+            threeIdPara: "",
+            titlePara: "",
+          },
+          modelId: "",
+          tableName: "",
+          updatePara: "",
+          updateTime: 0,
+          updateUrl: "http://121.43.55.7:10086/metadata/test/",
+        };
+      },
+    },
+  },
+  data() {
+    return {
+      fromDataRender: {
+        content: {
+          areaCodePara: "",
+          contentPara: "",
+          jsonStrPara: [],
+          latPara: "",
+          lonPara: "",
+          locationsPara: "",
+          threeIdPara: "",
+          titlePara: "",
+        },
+        modelId: "",
+        tableName: "",
+        updatePara: "",
+        updateTime: 0,
+        updateUrl: "http://121.43.55.7:10086/metadata/test/",
+      },
+      listData: [],
+      rules: {
+        "content.titlePara": [
+          {
+            required: true,
+            message: "请输入标题字段的字段名",
+            trigger: "blur",
+          },
+        ],
+        // areaCodePara: [
+        //   { required: true, message: "请输入名称", trigger: "blur" },
+        // ],
+        "content.threeIdPara": [
+          {
+            required: true,
+            message: "请输入第三方ID的字段名",
+            trigger: "blur",
+          },
+        ],
+        tableName: [
+          { required: true, message: "请输入第三方表名", trigger: "blur" },
+        ],
+        "content.lonPara": [
+          {
+            required: true,
+            message: "请填写中心点经度的字段名",
+            trigger: "blur",
+          },
+        ],
+        "content.latPara": [
+          {
+            required: true,
+            message: "请填写中心点纬度的字段名",
+            trigger: "blur",
+          },
+        ],
+        "content.locationsPara": [
+          { required: true, message: "请填写点集的字段名", trigger: "blur" },
+        ],
+        "content.contentPara": [
+          { required: true, message: "请填写描述的字段名", trigger: "blur" },
+        ],
+        updatePara: [
+          {
+            required: true,
+            message: "请填写更新字段的字段名",
+            trigger: "blur",
+          },
+        ],
+      },
+      isShowUpdateCenterDialog: false,
+      centerPoint: [],
+      tableData: [{}],
+      advancedOptionsShow: false,
+
+      isShowUpdateGeometryDialog: false,
+      geometry: null,
+    };
+  },
+  methods: {
+    // 创建
+    sure() {
+      let that = this;
+      if (this.listData.length > 0) {
+        let judge = this.listData.every(function (item) {
+          return item.name != "" && item.paraName != ""; // && item.unit;
+        });
+        if (!judge) {
+          this.$message({
+            type: "error",
+            message: "高级选项相关内容未填写完整,请完善后重新提交!",
+          });
+          return;
+        }
+      }
+
+      this.$refs["single_form"].validate((valid) => {
+        if (valid) {
+          var obj = Object.assign({}, that.fromDataRender);
+          obj.content.jsonStrPara = Object.assign({}, that.listData);
+          obj.modelId = that.modelParams.modelId;
+          // 开始导入
+          that.upload(obj);
+        } else {
+          that.$message({
+            type: "error",
+            message: "信息填写有误,请修改后提交",
+          });
+          return false;
+        }
+      });
+    },
+
+    // 创建
+    upload(obj) {
+      let that = this;
+      // 上传loading
+      const loading =
+        this.$createLoading("数据库导入功能配置上传中,请勿刷新!");
+      api
+        .uploadDBConfigforModelID({ type: 2, dbInfo: JSON.stringify(obj) })
+        .then((result) => {
+          loading.close();
+          if (result.code == 200) {
+            that
+              .$confirm(result.content, "", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "success",
+              })
+              .then(() => {})
+              .catch(() => {});
+          }
+        })
+        .catch((err) => {
+          loading.close();
+          that.$message({
+            type: "error",
+            message: err,
+          });
+        });
+    },
+
+    // 更新
+    updateSingleData(data) {
+      let that = this;
+      // 上传loading
+      const loading = this.$createLoading("数据更新中,请勿刷新!");
+      api
+        .updateSingleData(data)
+        .then((result) => {
+          if (result.code == 200) {
+            loading.close();
+            that.$message({
+              type: "success",
+              message: "数据更新成功!",
+            });
+            if (that.updateData) that.updateData();
+            that.dialogBeforeClose();
+          } else {
+            // that.$checkRequestCode(result);
+            that.$message({
+              type: "error",
+              message: result.message,
+            });
+          }
+        })
+        .catch((err) => {
+          loading.close();
+          that.$message({
+            type: "error",
+            message: err,
+          });
+        });
+    },
+
+    // 创建数据集窗口关闭前
+    dialogBeforeClose() {
+      this.fromDataRender = {
+        content: {
+          areaCodePara: "",
+          contentPara: "",
+          jsonStrPara: [],
+          latPara: "",
+          lonPara: "",
+          locationsPara: "",
+          threeIdPara: "",
+          titlePara: "",
+        },
+        modelId: "",
+        tableName: "",
+        updatePara: "",
+        updateTime: 0,
+        updateUrl: "http://121.43.55.7:10086/metadata/test/",
+      };
+      this.advancedOptionsShow = false;
+      this.clearAdvancedOptions();
+      this.beforeClose();
+      this.$refs.single_form.clearValidate();
+    },
+
+    // 更改高级选项显示状态
+    changeAdvancedOptionsStatue() {
+      this.advancedOptionsShow = !this.advancedOptionsShow;
+    },
+
+    // 添加 高级选项input 按钮
+    addAdvancedOptionsRow() {
+      this.listData.push({
+        name: "",
+        paraName: "",
+        unit: "",
+      });
+    },
+    // 删除 高级选项input 按钮
+    deleteAdvancedOptionsRow(index) {
+      this.listData.splice(index, 1);
+    },
+
+    // 清空高级选项
+    clearAdvancedOptions() {
+      this.listData = [];
+    },
+  },
+
+  watch: {
+    isShow(newVal, oldVal) {
+      if (newVal) {
+        this.fromDataRender = Object.assign({}, this.formData);
+        if (this.formData.content.jsonStrPara.length != 0) {
+          this.advancedOptionsShow = true;
+          this.listData = this.formData.content.jsonStrPara;
+        } else {
+          this.advancedOptionsShow = false;
+        }
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.singleDataDialog {
+  /deep/ .el-dialog__header {
+    border-bottom: 1px solid #e8e8e8;
+    padding: 15px;
+  }
+
+  .title {
+    height: 30px;
+    line-height: 30px;
+    font-size: 20px;
+    font-weight: bold;
+  }
+
+  /deep/ .el-dialog__body {
+    padding-top: 20px;
+    padding-bottom: 20px;
+  }
+
+  /deep/ .el-dialog__footer {
+    border-top: 1px solid #eeeeee;
+    padding: 10px 20px;
+  }
+
+  .el-form-item {
+    /deep/ .el-form-item__label {
+      width: 140px !important;
+    }
+
+    /deep/ .el-form-item__content {
+      margin-left: 140px !important;
+    }
+  }
+
+  .advanceOptionsTable {
+    border: 1px solid #eeeeee;
+    border-bottom: 0px solid #eeeeee;
+    margin-top: 20px;
+  }
+
+  /deep/
+    .el-form-item.is-required:not(.is-no-asterisk)
+    > .el-form-item__label:before {
+    content: " ";
+    width: 0px;
+    margin-right: 0px;
+  }
+
+  .is-required /deep/.el-form-item__label:after {
+    content: " *";
+    color: #3f9dfe;
+    font-size: 150%;
+  }
+  ::v-deep input::-webkit-outer-spin-button,
+  ::v-deep input::-webkit-inner-spin-button {
+    -webkit-appearance: none !important;
+  }
+  ::v-deep input[type="number"] {
+    -moz-appearance: textfield !important;
+  }
+}
+</style>

+ 9 - 3
src/components/Currency/DataTable/DataTable.vue

@@ -50,8 +50,14 @@ export default {
       listContainerIsShow: false,
       geometryType: {
         Point: 0,
+
+        LineString: 1,
         Polyline: 1,
+        MultiPolyline: 1,
+        MultiLineString: 1,
+
         Polygon: 2,
+        MultiPolygon: 2,
       },
     };
   },
@@ -90,9 +96,9 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.data_table {
-  // padding-left: 20px;
-}
+// .data_table {
+//   // padding-left: 20px;
+// }
 .el-main {
   padding: 0 0;
 }

+ 57 - 0
src/components/Currency/DataTable/MetadataListContainer.vue

@@ -46,6 +46,13 @@
         >
           <el-button type="primary" class="add-item">Shapefile</el-button>
         </el-upload>
+        <el-button
+          style="margin-left: 20px"
+          type="primary"
+          @click="openDBConfig"
+        >
+          数据库导入
+        </el-button>
       </div>
       <el-button type="primary" v-if="type == 3" @click="openShareData">
         数据发布
@@ -87,6 +94,17 @@
         file: upload_file,
       }"
     ></FileImport>
+    <DBImport
+      v-bind="{
+        isShow: isShowDBImportDialog,
+        edit: true,
+        type: 1,
+        title: '数据库导入配置',
+        beforeClose: beforeCloseDBImportDialog,
+        modelParams: params,
+        formData: DBConfigData,
+      }"
+    ></DBImport>
     <el-dialog
       :class="'interfaceList'"
       title="数据分享"
@@ -173,6 +191,10 @@ export default {
   data() {
     return {
       isShowAddSingleDataDialog: false,
+
+      isShowDBImportDialog: false,
+      DBConfigData: null,
+
       isShowFileImportDialog: false,
       upload_file: null,
       fileType: "",
@@ -213,6 +235,7 @@ export default {
     SingleData: () => import("./MetadataListContainer/SingleData.vue"),
     FileImport: () => import("./MetadataListContainer/FileImport.vue"),
     MetadataList: () => import("./MetadataListContainer/MetadataList.vue"),
+    DBImport: () => import("./DBImport.vue"),
   },
   created() {
     let that = this;
@@ -435,6 +458,40 @@ ${element.cityName}${element.countyName}:
       link.click();
       document.body.removeChild(link);
     },
+    // 打开数据库导入配置
+    openDBConfig() {
+      let that = this;
+      this.getDBConfig()
+        .then((result) => {
+          if (JSON.stringify(result.content) == "[]") {
+            that.DBConfigData = undefined;
+          } else {
+            that.DBConfigData = result.content;
+          }
+          that.isShowDBImportDialog = true;
+        })
+        .catch((err) => {});
+    },
+    // 关闭数据库导入
+    beforeCloseDBImportDialog() {
+      this.isShowDBImportDialog = false;
+    },
+    // 获取数据导入配置
+    getDBConfig() {
+      let that = this;
+      return new Promise((resolve, reject) => {
+        api
+          .getDBConfigforModelID({
+            modelId: that.params.modelId,
+          })
+          .then((result) => {
+            resolve(result);
+          })
+          .catch((err) => {
+            reject();
+          });
+      });
+    },
   },
   computed: {
     now_userState() {

+ 169 - 0
src/components/Currency/DataTable/MetadataListContainer/Locations.vue

@@ -0,0 +1,169 @@
+<template>
+  <el-dialog
+    :class="'updateLocationsDialog'"
+    :visible.sync="isShow"
+    width="75%"
+    :close-on-click-modal="false"
+    :before-close="dialogBeforeClose"
+    append-to-body
+  >
+    <iframe class="editlocations" :src="url" frameborder="0"></iframe>
+    <span slot="title" class="dialog-title">
+      <div class="title">
+        <span>{{ title }}</span>
+      </div>
+    </span>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogBeforeClose"> 取 消 </el-button>
+      <el-button type="primary" @click="sure">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+// import WKT from "terraformer-wkt-parser";
+export default {
+  props: {
+    isShow: {
+      type: Boolean,
+      default: function () {
+        return false;
+      },
+    },
+    title: {
+      type: String,
+    },
+    modelParams: {
+      type: Object,
+    },
+
+    beforeClose: {
+      type: Function,
+    },
+    updateData: {
+      type: Function,
+    },
+    geometry: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      url: "./static/package/updateLocations/index.html",
+      drawType: {
+        1: "LineString",
+        2: "Polygon",
+      },
+      wktGeoType: "",
+
+      pluginsParam: {
+        Point: 1,
+        MultiPoint: 2,
+        LineString: 3,
+        MultiLineString: 4,
+        Polygon: 5,
+        MultiPolygon: 6,
+      },
+    };
+  },
+  mounted() {
+    let that = this;
+    this.url = this.url + "?type=" + this.drawType[this.modelParams.geotype];
+    // WKT.convert(); // 转成WKT
+    // WKT.parse(); // 转成geojson
+    if (this.geometry != "") {
+      let geojson = Terraformer.WKT.parse(this.geometry);
+      this.wktGeoType = geojson.type;
+      setTimeout(() => {
+        document
+          .getElementsByClassName("editlocations")[0]
+          .contentWindow.showCoordinates(
+            that.pluginsParam[geojson.type],
+            geojson.coordinates
+          );
+      }, 500);
+    }
+  },
+  methods: {
+    sure() {
+      let coorObj = document
+        .getElementsByClassName("editlocations")[0]
+        .contentWindow.getCoordinates();
+      let wkt_str = null;
+      let center = null;
+
+      switch (this.drawType[this.modelParams.geotype]) {
+        case "LineString":
+          let geoLine = {
+            type: "MultiLineString",
+            coordinates: coorObj.LineString,
+          };
+          wkt_str = Terraformer.WKT.convert(geoLine);
+          center = turf.center(geoLine);
+          break;
+        case "Polygon":
+          let geoPolygon = {
+            type: "MultiPolygon",
+            coordinates: coorObj.Polygon,
+          };
+          wkt_str = Terraformer.WKT.convert(geoPolygon);
+          center = turf.center(geoPolygon);
+          break;
+        default:
+          break;
+      } 
+      this.updateDataIt(wkt_str, center.geometry.coordinates);
+    },
+    dialogBeforeClose() {
+      document.getElementsByClassName("editlocations")[0].contentWindow.clear();
+      this.beforeClose();
+    },
+    updateDataIt(wkt_str, center) {
+      document.getElementsByClassName("editlocations")[0].contentWindow.clear();
+      this.updateData(wkt_str, center);
+      this.beforeClose();
+    },
+  },
+};
+</script>
+
+ 
+<style lang="less" scoped>
+.updateLocationsDialog {
+  /deep/ .el-dialog__header {
+    border-bottom: 1px solid #e8e8e8;
+    padding: 15px;
+  }
+
+  .title {
+    height: 30px;
+    line-height: 30px;
+    font-size: 20px;
+    font-weight: bold;
+  }
+
+  /deep/ .el-dialog__body {
+    padding: 0 0;
+  }
+
+  /deep/ .el-dialog__footer {
+    border-top: 1px solid #eeeeee;
+    padding: 10px 20px;
+  }
+
+  .el-form-item {
+    /deep/ .el-form-item__label {
+      width: 100px !important;
+    }
+
+    /deep/ .el-form-item__content {
+      margin-left: 100px !important;
+    }
+  }
+
+  iframe {
+    height: 500px;
+    width: 100%;
+  }
+}
+</style> 

+ 3 - 0
src/components/Currency/DataTable/MetadataListContainer/MetadataList.vue

@@ -94,6 +94,9 @@
                 <span v-if="scope.row.type == 0">点</span>
                 <span v-else-if="scope.row.type == 1">线</span>
                 <span v-else-if="scope.row.type == 2">面</span>
+                <span v-else-if="scope.row.type == 3">点</span>
+                <span v-else-if="scope.row.type == 4">线</span>
+                <span v-else-if="scope.row.type == 5">面</span>
               </div>
             </template>
           </el-table-column>

+ 29 - 23
src/components/Currency/DataTable/MetadataListContainer/SingleData.vue

@@ -79,6 +79,7 @@
               v-model="fromDataRender.centerLon"
               type="number"
               :readonly="!edit"
+              :disabled="modelParams.geotype != 0"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -88,12 +89,13 @@
               v-model="fromDataRender.centerLat"
               type="number"
               :readonly="!edit"
+              :disabled="modelParams.geotype != 0"
             ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="2">
           <el-button
-            v-if="edit"
+            v-if="edit && modelParams.geotype == 0"
             :style="{
               fontSize: '23px',
               padding: '7px',
@@ -115,8 +117,8 @@
             <!-- :readonly="!edit" -->
             <el-input
               v-model="fromDataRender.locations"
-              readonly="false"
-              disabled="false"
+              :readonly="true"
+              :disabled="true"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -235,7 +237,7 @@
       <!-- 高级选项 table end -->
     </el-form>
     <!-- centerPoint: centerPoint, -->
-    <CenterLocation1
+    <CenterLocation
       v-if="isShowUpdateCenterDialog"
       v-bind="{
         isShow: isShowUpdateCenterDialog,
@@ -244,19 +246,19 @@
         beforeClose: beforeCloseUpdateCenterDialog,
         updateData: updateDataCenterLocation,
       }"
-    ></CenterLocation1>
+    ></CenterLocation>
 
-    <CenterLocation2
+    <Locations
       v-if="isShowUpdateGeometryDialog"
       v-bind="{
         isShow: isShowUpdateGeometryDialog,
-        title: '点集',
-        geometry: geometry,
-        drawType: modelParams.geotype,
+        title: '编辑点集',
         beforeClose: beforeCloseUpdateGeometryDialog,
         updateData: updateDataGeometryLocation,
+        modelParams: modelParams,
+        geometry: geometry,
       }"
-    ></CenterLocation2>
+    ></Locations>
 
     <span slot="title" class="dialog-title">
       <div class="title">
@@ -274,8 +276,8 @@
 import api from "@/api/content";
 export default {
   components: {
-    CenterLocation1: () => import("./CenterLocation.vue"),
-    CenterLocation2: () => import("./CenterLocation.vue"),
+    CenterLocation: () => import("./CenterLocation.vue"),
+    Locations: () => import("./Locations.vue"),
   },
   props: {
     isShow: {
@@ -436,11 +438,13 @@ export default {
         if (valid) {
           let data;
           if (that.type == 1) {
-            data = Object.assign({}, that.fromDataRender, that.modelParams);
+            data = Object.assign({}, that.fromDataRender);
             data.jsonStr = JSON.stringify(that.listData);
-            if (data.type == 0)
-              data.locations =
-                "POINT (" + data.centerLon + " " + data.centerLat + ")";
+            data.type = that.modelParams.geotype;
+            data.modelId = that.modelParams.modelId;
+            // if (data.type == 0)
+            //   data.locations =
+            //     "POINT (" + data.centerLon + " " + data.centerLat + ")";
             that.addSingleData(data);
           } else {
             data = Object.assign({}, that.fromDataRender);
@@ -575,17 +579,19 @@ export default {
     // 打开 更新/新建 点集 面板
     openGeometryLocation(item) {
       this.geometry = item.locations;
-      this.isShowUpdateCenterDialog = true;
+      this.isShowUpdateGeometryDialog = true;
     },
 
-    // 更新 点集
-    updateDataGeometryLocation(item) {
-      this.fromDataRender.locations = item;
+    // 更新 点集 中心点位置
+    updateDataGeometryLocation(wkt_str, center) {
+      this.fromDataRender.locations = wkt_str;
+      this.fromDataRender.centerLon = center[0];
+      this.fromDataRender.centerLat = center[1];
     },
 
-    // 关闭 点集修改
+    // 关闭 点集 修改
     beforeCloseUpdateGeometryDialog() {
-      this.isShowUpdateCenterDialog = false;
+      this.isShowUpdateGeometryDialog = false;
     },
 
     // 更改高级选项显示状态
@@ -615,7 +621,7 @@ export default {
   watch: {
     isShow(newVal, oldVal) {
       if (newVal) {
-        this.fromDataRender = this.formData;
+        this.fromDataRender = JSON.parse(JSON.stringify(this.formData));
         if (this.formData.jsonStr.length != 0) {
           this.advancedOptionsShow = true;
           this.listData = JSON.parse(this.formData.jsonStr);

+ 17 - 2
src/components/DataDisplay/LayerDisplay.vue

@@ -28,8 +28,16 @@
             ></el-button>
           </el-input>
           <Menu ref="menu" :menuIsShow="menuIsShow" :keyword="keyword"></Menu>
-          <PlaceList ref="placelist" :keyword="keyword"></PlaceList>
-          <ContentList ref="contentlist" :keyword="keyword"></ContentList>
+          <PlaceList
+            ref="placelist"
+            :placeIsShow="placeIsShow"
+            :keyword="keyword"
+          ></PlaceList>
+          <ContentList
+            ref="contentlist"
+            :contentIsShow="contentIsShow"
+            :keyword="keyword"
+          ></ContentList>
         </div>
       </div>
     </div>
@@ -69,6 +77,8 @@ export default {
   data() {
     return {
       menuIsShow: false,
+      placeIsShow: false,
+      contentIsShow: false,
       searchTypeArr: [
         {
           id: 1,
@@ -292,4 +302,9 @@ export default {
   width: 500px;
   height: 400px;
 }
+/deep/ #pie {
+  position: relative;
+  width: 500px;
+  height: 400px;
+}
 </style>

+ 1 - 1
src/components/DataDisplay/LayerDisplay/ContentList.vue

@@ -284,7 +284,7 @@ export default {
     width: 100%;
     margin-top: 5px;
     .result_list {
-      max-height: 300px;
+      max-height: 200px;
       overflow: hidden;
       overflow-y: auto;
       li {

+ 125 - 72
src/components/DataDisplay/LayerDisplay/Menu.vue

@@ -15,15 +15,16 @@
                 :class="['title', { tongji_active: data.chartIsShow }]"
                 :title="node.label"
                 @click="openStatisticalChart(node, data)"
-              >{{ node.label }}</span>
-              <span style="float: right">
+                >{{ node.label }}</span
+              >
+              <span style="float: right" v-if="data.geoType == 0">
                 <el-button
                   :class="[
                     'singlepoint',
                     {
                       active:
                         data.singlepoint == undefined ||
-                          data.singlepoint == false
+                        data.singlepoint == false
                           ? false
                           : true,
                     },
@@ -40,7 +41,7 @@
                     {
                       active:
                         data.aggregation == undefined ||
-                          data.aggregation == false
+                        data.aggregation == false
                           ? false
                           : true,
                     },
@@ -68,6 +69,25 @@
                   @click="() => searchData(data, 'heatmap', node)"
                 ></el-button>
               </span>
+              <span style="float: right" v-if="data.geoType == 1">
+                <el-button
+                  :class="[
+                    'singlepoint',
+                    {
+                      active:
+                        data.singlepoint == undefined ||
+                        data.singlepoint == false
+                          ? false
+                          : true,
+                    },
+                  ]"
+                  :title="'线数据加载'"
+                  type="text"
+                  size="mini"
+                  circle
+                  @click="() => searchData(data, 'lineString', node)"
+                ></el-button>
+              </span>
             </div>
             <div v-else>
               <span class="title">{{ node.label }}</span>
@@ -125,7 +145,7 @@ export default {
       window.countryJson = result;
     });
   },
-  mounted() { },
+  mounted() {},
   methods: {
     openVideo() {
       this.isVideoShow = true;
@@ -133,40 +153,6 @@ export default {
     closeVideo() {
       this.isVideoShow = false;
     },
-    getMenu() {
-      let that = this;
-      // if (this.list.length != 0) return;
-      return new Promise((resolve, reject) => {
-        api
-          .getMenu()
-          .then((result) => {
-            if (result.code == 200) {
-              let arr = result.content.map(function (item, index) {
-                item.title = item.name;
-                item.models.map(function (item_, index) {
-                  item_.chartIsShow = false;
-                });
-                return item;
-              });
-              that.list = arr;
-              resolve();
-            } else {
-              that.$message({
-                type: "warning",
-                message: result.message,
-              });
-              reject();
-            }
-          })
-          .catch((err) => {
-            that.$message({
-              type: "warning",
-              message: err,
-            });
-            reject();
-          });
-      });
-    },
 
     // 清空chartSource
     clearChartSource() {
@@ -188,10 +174,11 @@ export default {
     openStatisticalChart(node) {
       let that = this;
       if (node.data.chartIsShow) return;
+      this.$store.commit("setChartIsShow", false);
       this.clearChartHighLight();
       let label = node.label;
       let data = node.data;
-      const loading = this.$createLoading("统计数据分析获取中,请稍后!")
+      const loading = this.$createLoading("统计数据分析获取中,请稍后!");
       this.searchStatisticalData(data.id, 2)
         .then((result) => {
           loading.close();
@@ -242,7 +229,14 @@ export default {
     setChart(result, label) {
       let that = this;
       this.$store.commit("setChartIsShow", true);
+
       this.$nextTick(function () {
+        var _div = document.getElementById("pie");
+        _div.parentNode.removeChild(_div);
+
+        var oDiv = document.createElement("div");
+        oDiv.setAttribute("id", "pie");
+        document.querySelector("#echart_main .container").appendChild(oDiv);
         let chartDom = document.querySelector("#pie");
         let myChart = echarts.init(chartDom);
         let option = {
@@ -270,6 +264,33 @@ export default {
             {
               type: "pie",
               radius: [50, 100],
+              itemStyle: {
+                color: function () {
+                  var color = "#";
+                  var randomArr = [
+                    "0",
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "a",
+                    "b",
+                    "c",
+                    "d",
+                    "e",
+                    "f",
+                  ]; //这是颜色构成的所有情况
+                  for (var i = 0; i < 6; i++) {
+                    color += randomArr[parseInt(Math.random() * 15)];
+                  }
+                  return color;
+                },
+              },
               center: ["50%", "50%"],
               data: result,
               label: {
@@ -365,7 +386,7 @@ export default {
         this.layerInfos[item.id].source == null
       ) {
         // 上传loading
-        const loading = this.$createLoading("数据获取中,请稍后!")
+        const loading = this.$createLoading("数据获取中,请稍后!");
         getLayerData(item, this.extendFunc, loading)
           .then((result) => {
             that.layerInfos[item.id].source = new VectorSource();
@@ -527,42 +548,45 @@ export default {
     isShowChart() {
       return this.$store.state.isShowChart;
     },
+    layerData() {
+      return this.$store.state.layerList;
+    },
   },
   watch: {
     menuIsShow(newVal) {
       let that = this;
       if (newVal) {
-        this.getMenu()
-          .then(() => {
-            that.list = that.list.map(function (item) {
-              item.show = true;
-              item.open = false;
-              item.chartIsShow = false;
-              return item;
-            });
-            that.activeNames = [];
-            that.nowKeyword = "";
-            that.$root.popup.setPosition(undefined);
-            that.clearFilter();
-            if (!that.chartSource) {
-              that.chartSource = new VectorSource();
-              that.chartLayer = new VectorLayer({
-                source: that.chartSource,
-                zIndex: 3,
-                style: new Style({
-                  stroke: new Stroke({
-                    color: "#ff9900",
-                    width: 3,
-                  }),
-                  fill: new Fill({
-                    color: "rgb(255 153 0 / 60%)",
-                  }),
-                }),
-              });
-              globalVariable.map.addLayer(that.chartLayer);
-            }
-          })
-          .catch((err) => { });
+        // this.getMenu()
+        //   .then(() => {
+        // that.list = that.list.map(function (item) {
+        //   item.show = true;
+        //   item.open = false;
+        //   item.chartIsShow = false;
+        //   return item;
+        // });
+        that.activeNames = [];
+        that.nowKeyword = "";
+        that.$root.popup.setPosition(undefined);
+        that.clearFilter();
+        if (!that.chartSource) {
+          that.chartSource = new VectorSource();
+          that.chartLayer = new VectorLayer({
+            source: that.chartSource,
+            zIndex: 3,
+            style: new Style({
+              stroke: new Stroke({
+                color: "#ff9900",
+                width: 3,
+              }),
+              fill: new Fill({
+                color: "rgb(255 153 0 / 60%)",
+              }),
+            }),
+          });
+          globalVariable.map.addLayer(that.chartLayer);
+        }
+        // })
+        // .catch((err) => {});
       } else {
       }
     },
@@ -572,6 +596,35 @@ export default {
         this.clearChartHighLight();
       }
     },
+    layerData: {
+      immediate: true,
+      handler(newVal, oldName) {
+        this.list = newVal;
+        this.list = this.list.map(function (item) {
+          item.title = item.name;
+          item.show = true;
+          item.open = false;
+          item.models.map(function (item_, index) {
+            item_.chartIsShow = false;
+            switch (item_.geometryType) {
+              case "Point":
+                item_.geoType = 0;
+                break;
+              case "LineString":
+                item_.geoType = 1;
+                break;
+              case "Polygon":
+                item_.geoType = 2;
+                break;
+
+              default:
+                break;
+            }
+          });
+          return item;
+        });
+      },
+    },
   },
 };
 </script>

+ 1 - 1
src/components/DataDisplay/LayerDisplay/PlaceList.vue

@@ -262,7 +262,7 @@ export default {
     width: 100%;
     margin-top: 5px;
     .result_list {
-      max-height: 300px;
+      max-height: 200px;
       overflow: hidden;
       overflow-y: auto;
       li {

+ 8 - 8
src/components/DataLayer/LayerDetail.vue

@@ -278,14 +278,14 @@ export default {
           name: "点",
           value: "Point",
         },
-        // {
-        //   name: "线",
-        //   value: "LineString",
-        // },
-        // {
-        //   name: "面",
-        //   value: "Polygon",
-        // },
+         {
+          name: "线",
+          value: "LineString",
+        },
+        {
+          name: "面",
+          value: "Polygon",
+        },
       ],
       rules: {
         title: [{ required: true, message: "请输入名称", trigger: "blur" }],

+ 439 - 0
src/components/DataQualityInspection/Process/DBQualityInspection.vue

@@ -0,0 +1,439 @@
+<template>
+  <el-container>
+    <el-row class="header">
+      图层选择:
+      <el-cascader
+        ref="layer_cascder"
+        v-model="cascaderModel"
+        :options="layerList"
+        :props="{
+          value: 'title',
+          label: 'title',
+          children: 'models',
+          expandTrigger: 'hover',
+        }"
+        @change="handleChange"
+      ></el-cascader>
+    </el-row>
+
+    <div class="condition">
+      <el-form
+        :model="fromDataRender"
+        class="singledata"
+        ref="single_form"
+        label-width="80px"
+        :rules="rules"
+      >
+        <el-row>
+          <el-col :span="11">
+            <el-form-item label="标题字段" prop="content.titlePara">
+              <el-input v-model="fromDataRender.content.titlePara"></el-input>
+              <!-- maxlength="20"
+              show-word-limit -->
+            </el-form-item>
+          </el-col>
+          <el-col :span="11">
+            <el-form-item label="行政区划编码字段">
+              <el-input
+                v-model="fromDataRender.content.areaCodePara"
+                show-word-limit
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="11">
+            <el-form-item label="第三方ID字段" prop="content.threeIdPara">
+              <el-input
+                v-model="fromDataRender.content.threeIdPara"
+                show-word-limit
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="11">
+            <el-form-item label="第三方表名" prop="tableName">
+              <el-input
+                v-model="fromDataRender.tableName"
+                show-word-limit
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="11">
+            <el-form-item label="中心经度字段" prop="content.lonPara">
+              <el-input v-model="fromDataRender.content.lonPara"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="11">
+            <el-form-item label="中心纬度字段" prop="content.latPara">
+              <el-input v-model="fromDataRender.content.latPara"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="geotype != 0">
+          <el-col :span="22">
+            <el-form-item label="点集字段" prop="content.locationsPara">
+              <el-input
+                v-model="fromDataRender.content.locationsPara"
+                placeholder="实际的字段值应为WKT格式数据,其余类型不支持"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="11">
+            <el-form-item label="描述字段" prop="content.contentPara">
+              <el-input v-model="fromDataRender.content.contentPara"></el-input>
+              <!-- maxlength="100" -->
+              <!-- show-word-limit -->
+            </el-form-item>
+          </el-col>
+          <el-col :span="11">
+            <el-form-item label="更新字段" prop="updatePara">
+              <el-input v-model="fromDataRender.updatePara"></el-input>
+              <!-- maxlength="100" -->
+              <!-- show-word-limit -->
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-button
+            type="text"
+            style="float: right"
+            @click="changeAdvancedOptionsStatue()"
+          >
+            高级选项
+            <i
+              v-show="!advancedOptionsShow"
+              class="el-icon-caret-bottom el-icon--right"
+            ></i>
+            <i
+              v-show="advancedOptionsShow"
+              class="el-icon-caret-top el-icon--right"
+            ></i>
+          </el-button>
+          <!-- el-icon-caret-bottom -->
+          <!-- el-icon-caret-top -->
+        </el-row>
+        <!-- 高级选项 table -->
+        <div v-if="advancedOptionsShow">
+          <el-table
+            :data="listData"
+            :class="['advanceOptionsTable']"
+            max-height="230"
+          >
+            <el-table-column label="字段名称">
+              <template slot-scope="scope">
+                <el-input
+                  placeholder="例:CITYID"
+                  v-model="scope.row.paraName"
+                ></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column label="名称">
+              <template slot-scope="scope">
+                <el-input
+                  placeholder="例:建筑金额"
+                  v-model="scope.row.name"
+                ></el-input>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="单位">
+              <template slot-scope="scope">
+                <el-input
+                  placeholder="例:万元"
+                  v-model="scope.row.unit"
+                ></el-input>
+              </template>
+            </el-table-column>
+
+            <el-table-column :align="'right'">
+              <template slot="header">
+                <el-button size="mini" @click="addAdvancedOptionsRow()">
+                  <i class="el-icon-plus"></i>
+                </el-button>
+              </template>
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  @click="deleteAdvancedOptionsRow(scope.$index, scope)"
+                >
+                  <i class="el-icon-minus"></i>
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 高级选项 table end -->
+      </el-form>
+    </div>
+
+    <div class="footer">
+      <el-button @click="start">开始质检</el-button>
+    </div>
+  </el-container>
+</template>
+
+<script>
+import api from "@/api/content";
+export default {
+  data() {
+    return {
+      cascaderModel: [],
+      layerList: [],
+      nowSelectedLayer: null,
+
+      geotype: 0,
+      fromDataRender: {
+        content: {
+          areaCodePara: "REGIONID",
+          contentPara: "PRJ_NAME",
+          jsonStrPara: [],
+          latPara: "LOCATION_Y",
+          lonPara: "LOCATION_X",
+          locationsPara: "",
+          threeIdPara: "ID",
+          titlePara: "PRJ_NAME",
+        },
+        modelId: 121,
+        tableName: "SYSDBA.sheet2",
+        updatePara: "last_update_time",
+        updateTime: 0,
+        updateUrl: "http://121.43.55.7:10086/metadata/test/",
+      },
+      rules: {
+        "content.titlePara": [
+          {
+            // validator: validateTitle,
+            required: true,
+            message: "请输入标题字段的字段名",
+            trigger: "blur",
+          },
+        ],
+        // areaCodePara: [
+        //   { required: true, message: "请输入名称", trigger: "blur" },
+        // ],
+        "content.threeIdPara": [
+          {
+            required: true,
+            message: "请输入第三方ID的字段名",
+            trigger: "blur",
+          },
+        ],
+        tableName: [
+          { required: true, message: "请输入第三方表名", trigger: "blur" },
+        ],
+        "content.lonPara": [
+          {
+            required: true,
+            message: "请填写中心点经度的字段名",
+            trigger: "blur",
+          },
+        ],
+        "content.latPara": [
+          {
+            required: true,
+            message: "请填写中心点纬度的字段名",
+            trigger: "blur",
+          },
+        ],
+        "content.locationsPara": [
+          { required: true, message: "请填写点集的字段名", trigger: "blur" },
+        ],
+        "content.contentPara": [
+          { required: true, message: "请填写描述的字段名", trigger: "blur" },
+        ],
+        updatePara: [
+          {
+            required: true,
+            message: "请填写更新字段的字段名",
+            trigger: "blur",
+          },
+        ],
+      },
+
+      advancedOptionsShow: false,
+
+      listData: [],
+    };
+  },
+  components: {},
+  mounted() {},
+  methods: {
+    // 渲染列表前数据整理
+    handleMenuDataBeforeRenderUI(data) {
+      if (data)
+        return data.map(function (item) {
+          item.title = item.name;
+          item.models = item.models.map(function (params) {
+            params.isLeaf = true;
+            return params;
+          });
+          return item;
+        });
+    },
+    handleChange() {
+      this.nowSelectedLayer =
+        this.$refs.layer_cascder.getCheckedNodes()[0].data;
+      if (this.nowSelectedLayer.geometryType == "Point") {
+        this.geotype = 0;
+      } else {
+        this.geotype = 1;
+      }
+    },
+
+    // 更改高级选项显示状态
+    changeAdvancedOptionsStatue() {
+      this.advancedOptionsShow = !this.advancedOptionsShow;
+    },
+
+    // 添加 高级选项input 按钮
+    addAdvancedOptionsRow() {
+      this.listData.push({
+        name: "",
+        paraName: "",
+        unit: "",
+      });
+    },
+    // 删除 高级选项input 按钮
+    deleteAdvancedOptionsRow(index) {
+      this.listData.splice(index, 1);
+    },
+
+    // 清空高级选项
+    clearAdvancedOptions() {
+      this.listData = [];
+    },
+    // 开始质检
+    start() {
+      let that = this;
+      if (this.cascaderModel.length == 0) {
+        that.$message({
+          type: "error",
+          message: "请选择质检数据的图层",
+        });
+        return false;
+      }
+      this.$refs["single_form"].validate((valid) => {
+        if (valid) {
+          if (
+            !that.listData.every(function (item) {
+              return item.name != "" && item.paraName != "";
+            })
+          ) {
+            that.$message({
+              type: "error",
+              message: "高级选项相关内容未填写完整,请完善后重新提交!",
+            });
+          } else {
+            var obj = JSON.parse(JSON.stringify(that.fromDataRender));
+            obj.content.jsonStrPara = JSON.parse(JSON.stringify(that.listData));
+            obj.modelId = that.nowSelectedLayer.id;
+            // 开始质检
+            that.upload(obj);
+          }
+        } else {
+          that.$message({
+            type: "error",
+            message: "信息填写有误,请修改后提交",
+          });
+          return false;
+        }
+      });
+    },
+
+    upload(obj) {
+      let that = this;
+      const loading = this.$createLoading("数据质检中,请勿刷新!");
+      console.log(obj);
+      api
+        .uploadDBConfigforModelID({
+          type: 1,
+          dbInfo: JSON.stringify(obj),
+        })
+        .then((result) => {
+          loading.close();
+          let resultType = "success";
+          if (result.code == 200) {
+            resultType = "success";
+          } else {
+            resultType = "error";
+          }
+          that
+            .$confirm(result.content, "质检结果", {
+              showConfirmButton: false,
+              cancelButtonText: "关闭",
+              type: resultType,
+            })
+            .then(() => {})
+            .catch(() => {});
+        })
+        .catch((err) => {
+          loading.close();
+          that.$message({
+            type: "error",
+            message: err,
+          });
+        });
+    },
+  },
+  computed: {
+    layerData() {
+      return this.$store.state.layerList;
+    },
+  },
+  watch: {
+    layerData: {
+      immediate: true,
+      handler(newVal, oldName) {
+        if (newVal) this.layerList = this.handleMenuDataBeforeRenderUI(newVal);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.el-container {
+  display: block;
+  width: 100%;
+  padding: 10px 20px;
+  box-sizing: border-box;
+  background: #ffffff;
+  overflow: hidden;
+  overflow-y: auto;
+  .el-row {
+    line-height: 40px;
+    &::before {
+      display: unset;
+    }
+  }
+  .header {
+    margin-bottom: 10px;
+    font-size: 16px;
+  }
+  .el-form-item {
+    /deep/ .el-form-item__label {
+      width: 140px !important;
+    }
+
+    /deep/ .el-form-item__content {
+      margin-left: 140px !important;
+    }
+  }
+  .condition {
+    height: calc(100% - 102px);
+    overflow: hidden;
+  }
+  .footer {
+    height: 40px;
+    margin-top: 10px;
+    overflow: hidden;
+    .el-button {
+      float: right;
+    }
+  }
+}
+</style>

+ 96 - 0
src/components/DataQualityInspection/Rules/ImportDBQualityInspectionRules.vue

@@ -0,0 +1,96 @@
+<template>
+  <el-container>
+    <el-row class="first_level_title">字段限制</el-row>
+    <el-row
+      class="main_body"
+      v-for="(str, index) in textObj.textArr"
+      :key="index"
+    >
+      {{ index + 1 }}. {{ str }}
+    </el-row>
+    <!-- <el-row class="must_tips">{{ textObj.attention }}</el-row> -->
+    <!-- <json-viewer
+      :value="textObj.exampleData"
+      :expand-depth="5"
+      :copyable="{ copyText: '复制', copiedText: '复制成功', timeout: 1000 }"
+      theme="my-awesome-json-theme"
+    ></json-viewer> -->
+    <el-image :src="showImg" :preview-src-list="srcList"></el-image>
+  </el-container>
+</template>
+
+<script>
+import showImg from "@/assets/images/layerZJImage/DBImport.jpg";
+export default {
+  data() {
+    return {
+      showImg: showImg,
+      srcList: [showImg],
+      textObj: {
+        textArr: [
+          "标题字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          "行政区划编码字段字段可选填,但当填写时应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          "第三方ID字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          '第三方表名不能为空,且格式应符合"模式名"."表名"的格式,例如:"CXJSGL"."T_ZTQ_CXJSGL_VIEW_JCSJ_XIAOQU";',
+          "中心经度字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          "中心纬度字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          "当当前图层数据类型为线类型时,展示点集字段;此时点集字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空。注:点集数据应符合WKT格式;",
+          "描述字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          "更新字段不能为空,且应与数据库中相关字段名称保持一致,字段对应数据的内容不能为空;",
+          "高级选择中填写的为需要展示的数据字段,其中字段名称须填写数据库中需要展示的字段名,名称则指其中文释义,单位即为具体数值型字段提供的标准量的名称。其中需要展示的字段增加时字段名称和名称必填,单位非必填,且字段名称应与数据库中相关字段名称保持一致。",
+        ],
+      },
+    };
+  },
+  components: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.el-container {
+  display: block;
+  width: 100%;
+  padding: 10px 20px;
+  box-sizing: border-box;
+  background: #ffffff;
+  overflow: hidden;
+  overflow-y: auto;
+  .el-row {
+    // margin-bottom: 10px;
+    line-height: 40px;
+    &:last-child {
+      // margin-bottom: 10px;
+    }
+    &::before {
+      display: unset;
+    }
+  }
+  .first_level_title {
+    font-size: 18px;
+    font-weight: bold;
+  }
+  .main_body {
+    display: block;
+    font-size: 16px;
+    text-indent: 25px;
+  }
+  .el-image {
+    width: 62.5%;
+    // height: 100%;
+    margin: 0 auto;
+    display: block;
+  }
+  .must_tips {
+    font-size: 14px;
+    color: #ff0000;
+  }
+  .jv-container {
+    font-size: 14px;
+    /deep/ .jv-code {
+      padding: 0px 20px 30px 20px;
+      line-height: 20px;
+    }
+  }
+}
+</style>

+ 57 - 1
src/components/Utilities/CoordinateConversionTool.vue

@@ -71,6 +71,11 @@
         <el-col :span="8" style="min-heigth: 1px"></el-col>
       </el-row>
       <div id="transform_map"></div>
+      <div class="footer_content">
+        中心经度:<span>{{ lon }}</span> ,中心纬度:<span>{{ lat }}</span>
+        当前地图缩放级别:<span>{{ zoom }}</span>
+        <span class="fuzhi">复制</span>
+      </div>
       <el-row class="third_level_title">
         注:当转换后的坐标系为 WGS84 或 Web Mercator 时,结果将在地图上展示
       </el-row>
@@ -110,6 +115,10 @@ export default {
       beforeY: "",
       afterX: "",
       afterY: "",
+
+      lon: 0,
+      lat: 0,
+      zoom: 0,
     };
   },
   created() {
@@ -125,6 +134,7 @@ export default {
     this.changeAfterTransformOptions(this.beforeTransformOption);
   },
   mounted() {
+    let that = this;
     let center = transform(
       [systemConfig.mapDefault.center.lng, systemConfig.mapDefault.center.lat],
       "EPSG:4326",
@@ -147,6 +157,25 @@ export default {
       view: view,
     });
 
+    // 监听地图变化时,缩放级别
+    this.map.getView().on("change:center", function (e) {
+      let lonlat = transform(
+        that.map.getView().getCenter(),
+        "EPSG:3857",
+        "EPSG:4326"
+      );
+      that.lon = Number(lonlat[0].toFixed(6));
+      that.lat = Number(lonlat[1].toFixed(6));
+      // that.$store.commit("setMouseLocation", [
+      //   Number(lonlat[0].toFixed(6)),
+      //   Number(lonlat[1].toFixed(6)),
+      // ]);
+    });
+    this.map.getView().on("change", function (e) {
+      that.zoom = e.target.getZoom();
+      // that.$store.commit("setZoom", e.target.getZoom());
+    });
+
     let urlvec =
       systemConfig.tdt_url +
       "/vec_w/wmts?tk=" +
@@ -279,11 +308,14 @@ export default {
     }
   }
   .afterTransformOption {
-    height: calc(100% - 172px);
+    height: calc(100% - 202px);
     position: relative;
     .el-row {
       margin-bottom: 10px;
       line-height: 40px;
+      &:last-child {
+        margin-bottom: 0px;
+      }
     }
     // .el-main {
     //   height: calc(100% - 50px);
@@ -328,5 +360,29 @@ export default {
   ::v-deep input[type="number"] {
     -moz-appearance: textfield !important;
   }
+
+  .footer_content {
+    position: absolute;
+    height: 36px;
+    bottom: 50px;
+    right: 0px;
+    padding: 0 20px;
+    background: #ffffff4d;
+    color: #003662;
+    font-size: 16px;
+    font-weight: bold;
+    line-height: 36px;
+    text-align: center;
+    border-radius: 4px;
+    .fuzhi {
+      display: inline-block;
+      margin-left: 20px;
+      cursor: pointer;
+      color: #32a4dc;
+      &:hover {
+        text-decoration: underline;
+      }
+    }
+  }
 }
 </style>

+ 8 - 0
src/store/index.js

@@ -74,6 +74,10 @@ export default new Vuex.Store({
                       label: "Geojson导入规则",
                       index: "3",
                     },
+                    {
+                      label: "数据库导入规则",
+                      index: "4",
+                    },
                   ]
                 },
                 {
@@ -118,6 +122,10 @@ export default new Vuex.Store({
                       label: "Geojson质检",
                       index: "3",
                     },
+                    {
+                      label: "数据库质检",
+                      index: "4",
+                    },
                   ],
                 },
               ]

+ 229 - 3
src/views/ComprehensiveDisplay.vue

@@ -186,10 +186,63 @@
         </div>
       </div>
     </el-card>
+    <div class="dataStatistics" v-if="statisticsShow">
+      <el-card class="dataNumber">
+        <div slot="header" class="clearfix userSelect_None">
+          <span class="clearfix_title">
+            <i class="elIcon el-icon-s-fold"></i>系统概览
+          </span>
+          <span class="clearfix_titleEn" type="text">System overview</span>
+        </div>
+        <div class="dataNumberContainer" v-if="statisticsData != null">
+          <el-row>
+            <el-col :span="3"> <p></p> </el-col>
+            <el-col :span="6">图层总量:</el-col>
+            <el-col :span="15"
+              >{{ statisticsData.modelCount }} <span>条</span>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="3"><p></p></el-col>
+            <el-col :span="6">数据总量:</el-col>
+            <el-col :span="15"
+              >{{ statisticsData.modelDataCount }} <span>条</span>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="3"><p></p></el-col>
+            <el-col :span="6">导入数据:</el-col>
+            <el-col :span="15"
+              >{{ statisticsData.importDataNumber }} <span>条</span>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="3"><p></p></el-col>
+            <el-col :span="6">接口调用:</el-col>
+            <el-col :span="15"
+              >{{ statisticsData.callInterNumber }} <span>次</span>
+            </el-col>
+          </el-row>
+        </div>
+      </el-card>
+      <el-card class="dataEChart">
+        <div slot="header" class="clearfix userSelect_None">
+          <span class="clearfix_title">
+            <i class="elIcon el-icon-s-grid"></i>
+            数据明细
+          </span>
+          <span class="clearfix_titleEn" type="text">Data Details</span>
+        </div>
+
+        <div id="echart_main"></div>
+      </el-card>
+    </div>
   </div>
 </template>
 
 <script>
+import * as echarts from "echarts";
+import api from "@/api/common";
 export default {
   name: "ComprehensiveDisplay",
   components: {},
@@ -197,6 +250,8 @@ export default {
     //   后续可调用后端接口动态显示
     return {
       content: null,
+      statisticsShow: true,
+      statisticsData: null,
     };
   },
   computed: {},
@@ -209,7 +264,9 @@ export default {
       }
     );
   },
-  mounted() {},
+  mounted() {
+    this.getStatisticsData();
+  },
   methods: {
     Jump(jumpUrl) {
       window.open(jumpUrl);
@@ -239,6 +296,104 @@ export default {
           break;
       }
     },
+
+    getStatisticsData() {
+      let that = this;
+      api
+        .getStatisticsData()
+        .then((result) => {
+          if (result.code == 200) {
+            that.statisticsShow = true;
+            let content = result.content;
+            let layerObj = that.jiexiLayer(content.classifyList);
+            that.setEchart(layerObj.x, layerObj.y);
+            that.statisticsData = {
+              callInterNumber: content.callInterNumber, //图层总量
+              importDataNumber: content.importDataNumber, //数据总量
+              modelCount: content.modelCount, //导入数据
+              modelDataCount: content.modelDataCount, //接口调用
+            };
+          } else {
+            that.statisticsShow = false;
+          }
+        })
+        .catch((err) => {
+          that.statisticsShow = false;
+        });
+    },
+
+    jiexiLayer(list) {
+      let arr = [];
+      list.map(function (item) {
+        arr = arr.concat(item.models);
+      });
+      let xArr = [];
+      let yArr = [];
+      arr.map(function (item) {
+        xArr.push(item.title);
+        yArr.push(item.count);
+      });
+      return {
+        x: xArr,
+        y: yArr,
+      };
+    },
+
+    setEchart(xData, yData) {
+      // 基于准备好的dom,初始化echarts实例
+      var myChart = echarts.init(document.getElementById("echart_main"));
+      var options = {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+            label: {
+              show: true,
+            },
+          },
+        },
+        calculable: true,
+        grid: {
+          top: "12%",
+          left: "6%",
+          right: "10%",
+          containLabel: true,
+        },
+        xAxis: [
+          {
+            type: "category",
+            data: xData,
+          },
+        ],
+        yAxis: [
+          {
+            type: "value",
+            name: "数据量(条)",
+          },
+        ],
+        dataZoom: [
+          {
+            show: true,
+            start: 0,
+            end: 100,
+          },
+          {
+            type: "inside",
+            start: 0,
+            end: 100,
+          },
+        ],
+        series: [
+          {
+            name: "数据条数",
+            type: "bar",
+            data: yData,
+          },
+        ],
+      };
+      // 绘制图表
+      myChart.setOption(options);
+    },
   },
 };
 </script>
@@ -442,11 +597,11 @@ export default {
   .clearfix {
     height: 30px;
     &_title {
-      font-size: 30px;
+      font-size: 27px;
       font-family: Microsoft YaHei;
       font-weight: bold;
       color: #258df5;
-      line-height: 40px;
+      // line-height: 40px;
     }
     &_titleEn {
       float: right;
@@ -465,5 +620,76 @@ export default {
     -ms-user-select: none;
     user-select: none;
   }
+
+  .dataStatistics {
+    width: 100%;
+    height: 390px;
+    margin-top: 15px;
+    margin-bottom: 30px;
+    .el-card {
+      height: 100%;
+      display: inline-block;
+      &:nth-child(1) {
+        width: 32%;
+        /deep/ .el-card__body {
+          height: calc(100% - 100px);
+          display: block;
+          position: relative;
+        }
+        .dataNumberContainer {
+          font-size: 16px;
+          width: calc(100% - 120px);
+          margin: 0 auto;
+          display: block;
+          margin-top: 50px;
+          .el-row {
+            line-height: 40px;
+            .el-col:nth-child(1) {
+              p {
+                width: 30px;
+                height: 30px;
+                margin-top: 5px;
+              }
+            }
+            .el-col:nth-child(3) {
+              text-align: right;
+              span {
+                display: inline-block;
+                margin-left: 20px;
+              }
+            }
+            &:nth-child(1) p {
+              background: url(~@/assets/images/firstPage/1.png) center
+                center/100% 100% no-repeat;
+            }
+            &:nth-child(2) p {
+              background: url(~@/assets/images/firstPage/2.png) center
+                center/100% 100% no-repeat;
+            }
+            &:nth-child(3) p {
+              background: url(~@/assets/images/firstPage/6.png) center
+                center/100% 100% no-repeat;
+            }
+            &:nth-child(4) p {
+              background: url(~@/assets/images/firstPage/4.png) center
+                center/100% 100% no-repeat;
+            }
+          }
+        }
+      }
+      &:nth-child(2) {
+        width: calc(68% - 32px);
+        float: right;
+        /deep/ .el-card__body {
+          height: calc(100% - 100px);
+          display: block;
+        }
+        #echart_main {
+          width: 100%;
+          height: 100%;
+        }
+      }
+    }
+  }
 }
 </style>

+ 28 - 13
src/views/DataQualityInspection.vue

@@ -25,6 +25,8 @@
         <ImportGeojsonQualityInspectionRules
           v-show="showIndex == '1-3-3'"
         ></ImportGeojsonQualityInspectionRules>
+        <ImportDBQualityInspectionRules v-show="showIndex == '1-3-4'">
+        </ImportDBQualityInspectionRules>
         <DataIntegrityCheck v-show="showIndex == '1-4'"></DataIntegrityCheck>
         <InterfaceAccessDiagram
           v-show="showIndex == '2-1-1'"
@@ -39,6 +41,9 @@
         <GeojsonQualityInspection
           v-if="showIndex == '2-2-3'"
         ></GeojsonQualityInspection>
+        <DBQualityInspection
+          v-if="showIndex == '2-2-4'"
+        ></DBQualityInspection>
       </el-main>
     </el-container>
   </div>
@@ -80,26 +85,35 @@ export default {
       import(
         "@/components/DataQualityInspection/Rules/ImportGeojsonQualityInspectionRules.vue"
       ),
+    ImportDBQualityInspectionRules: () =>
+      import(
+        "@/components/DataQualityInspection/Rules/ImportDBQualityInspectionRules.vue"
+      ),
     DataIntegrityCheck: () =>
       import("@/components/DataQualityInspection/Rules/DataIntegrityCheck.vue"),
 
-
-
-
-
-
     InterfaceAccessDiagram: () =>
-      import("@/components/DataQualityInspection/Process/InterfaceAccessDiagram.vue"),
+      import(
+        "@/components/DataQualityInspection/Process/InterfaceAccessDiagram.vue"
+      ),
     AccessoryDiagram: () =>
       import("@/components/DataQualityInspection/Process/AccessoryDiagram.vue"),
     ExcelQualityInspection: () =>
-      import("@/components/DataQualityInspection/Process/ExcelQualityInspection.vue"),
+      import(
+        "@/components/DataQualityInspection/Process/ExcelQualityInspection.vue"
+      ),
     ShapefileQualityInspection: () =>
       import(
         "@/components/DataQualityInspection/Process/ShapefileQualityInspection.vue"
       ),
     GeojsonQualityInspection: () =>
-      import("@/components/DataQualityInspection/Process/GeojsonQualityInspection.vue"),
+      import(
+        "@/components/DataQualityInspection/Process/GeojsonQualityInspection.vue"
+      ),
+    DBQualityInspection: () =>
+      import(
+        "@/components/DataQualityInspection/Process/DBQualityInspection.vue"
+      ),
   },
 
   created() {
@@ -117,10 +131,11 @@ export default {
     //   "2-2-3",
     // ];
     let that = this;
-    this.menuList =
-      this.$store.getters.getMenuListTotal.filter(function (item) {
-      return item.permission == that.permission
-    })[0].children ;
+    this.menuList = this.$store.getters.getMenuListTotal.filter(function (
+      item
+    ) {
+      return item.permission == that.permission;
+    })[0].children;
     if (this.menuList.length == 0) return;
     t("", this.menuList);
     function t(beforeindex, arr) {
@@ -153,7 +168,7 @@ export default {
     height: 100%;
     .el-main {
       padding: 0 0;
-      margin-left: 20px; 
+      margin-left: 20px;
     }
   }
 }

+ 3 - 7
vue.config.js

@@ -70,18 +70,13 @@ module.exports = {
 
       '/proxy_data/': {
         target: 'http://121.43.55.7:10087',
+        // target: 'http://192.168.1.61:10087',
         changeOrigin: true,
         pathRewrite: {
           '^/proxy_data': ''
         }
       },
-      // '/proxy_mark/': {
-      //   target: 'http://121.43.55.7:10088',
-      //   changeOrigin: true,
-      //   pathRewrite: {
-      //     '^/proxy_mark': ''
-      //   }
-      // },
+
       '/proxy_icon/': {
         target: 'http://121.43.55.7:10085',
         changeOrigin: true,
@@ -89,6 +84,7 @@ module.exports = {
           '^/proxy_icon': ''
         }
       },
+
       '/proxy_geoserver/': {
         target: 'http://121.43.55.7:8889',
         changeOrigin: true,

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä