Browse Source

bug修改

wandequan 3 years ago
parent
commit
ed2b6d5d8a
36 changed files with 589 additions and 331 deletions
  1. 1 1
      src/components/Currency/DataTable/MetadataListContainer.vue
  2. 5 11
      src/components/Currency/DataTable/MetadataListContainer/FileImport.vue
  3. 175 55
      src/components/Currency/DataTable/MetadataListContainer/MetadataList.vue
  4. 6 17
      src/components/Currency/DataTable/MetadataListContainer/SingleData.vue
  5. 2 2
      src/components/Currency/ListContainer.vue
  6. 2 2
      src/components/DataAccess/DataLog.vue
  7. 2 2
      src/components/DataAccess/Feedback.vue
  8. 1 3
      src/components/DataDisplay/LayerDisplay/Buffer.vue
  9. 1 7
      src/components/DataDisplay/LayerDisplay/Map.vue
  10. 2 14
      src/components/DataDisplay/LayerDisplay/Menu.vue
  11. 18 2
      src/components/DataLayer/Icon.vue
  12. 12 3
      src/components/DataLayer/IconLibraryManagement.vue
  13. 4 16
      src/components/DataLayer/LayerDetail.vue
  14. 3 3
      src/components/DataLayer/LayerManagement.vue
  15. 114 26
      src/components/DataQualityInspection/Process/ExcelQualityInspection.vue
  16. 21 10
      src/components/DataQualityInspection/Process/GeojsonQualityInspection.vue
  17. 22 11
      src/components/DataQualityInspection/Process/ShapefileQualityInspection.vue
  18. 1 1
      src/components/DataQualityInspection/Rules/DataIntegrityCheck.vue
  19. 6 6
      src/components/DataQualityInspection/Rules/ImportExcelQualityInspectionRules.vue
  20. 1 1
      src/components/DataQualityInspection/Rules/ImportGeojsonQualityInspectionRules.vue
  21. 1 1
      src/components/DataQualityInspection/Rules/ImportShapefileQualityInspectionRules.vue
  22. 2 2
      src/components/DataQualityInspection/Rules/LayerQualityInspectionRules.vue
  23. 4 4
      src/components/DataQualityInspection/Rules/SingleDataQualityInspectionRules.vue
  24. 2 2
      src/components/DataServices/ServiceMonitoring.vue
  25. 12 6
      src/components/SecondaryDevelopment/GraphicsDrawingTool.vue
  26. 3 3
      src/components/SecondaryDevelopment/ManualDrawingTool.vue
  27. 72 43
      src/components/SystemManagement/RoleManagement.vue
  28. 3 3
      src/components/SystemManagement/UserManagement.vue
  29. 1 7
      src/components/Utilities/AddressTranslationTool.vue
  30. 23 4
      src/components/Utilities/CoordinateConversionTool.vue
  31. 1 7
      src/components/Utilities/MeasureTool/Map.vue
  32. 2 36
      src/main.js
  33. 9 2
      src/router/index.js
  34. 7 0
      src/views/ComprehensiveDisplay.vue
  35. 29 0
      src/views/Error.vue
  36. 19 18
      src/views/Home.vue

+ 1 - 1
src/components/Currency/DataTable/MetadataListContainer.vue

@@ -246,7 +246,7 @@ export default {
             });
           } else {
             // 提示接口访问失败
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
             that.tableData = [];
             that.dataTotal = 0;
             that.tableLoading = false;

+ 5 - 11
src/components/Currency/DataTable/MetadataListContainer/FileImport.vue

@@ -97,7 +97,7 @@
             </template>
           </el-table-column>
 
-          <el-table-column :align="$elDatePickerAlign">
+          <el-table-column :align="'right'">
             <template slot="header">
               <el-button size="mini" @click="addAdvancedOptionsRow()">
                 <i class="el-icon-plus"></i>
@@ -266,13 +266,7 @@ export default {
     uploadData(file) {
       let that = this;
       // 上传loading
-      const loading = that.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "数据新增中,请勿刷新!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("数据新增中,请勿刷新!")
       switch (this.fileType) {
         case "GeoJSON":
           this.uploadGeoJSONFile(this.file, loading);
@@ -299,7 +293,7 @@ export default {
               message: "文件上传成功!",
             });
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -324,7 +318,7 @@ export default {
               message: "文件上传成功!",
             });
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -349,7 +343,7 @@ export default {
               message: "文件上传成功!",
             });
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {

+ 175 - 55
src/components/Currency/DataTable/MetadataListContainer/MetadataList.vue

@@ -1,21 +1,31 @@
 <template>
   <div class="metadata-list">
-    <SingleData v-bind="{
-      isShow: isShowAddSingleDataDialog,
-      edit: edit,
-      title: title,
-      beforeClose: beforeCloseAddSingleDataDialog,
-      updateData: updateData,
-      modelParams: modelParams,
-      formData: formData,
-    }"></SingleData>
+    <SingleData
+      v-bind="{
+        isShow: isShowAddSingleDataDialog,
+        edit: edit,
+        title: title,
+        beforeClose: beforeCloseAddSingleDataDialog,
+        updateData: updateData,
+        modelParams: modelParams,
+        formData: formData,
+      }"
+    ></SingleData>
     <div class="data_list" :ref="'MetadataList'">
       <!-- <div class="data_selected" v-show="selectedNum > 0">
         已选择 <span>{{ selectedNum }}</span> 项
       </div>-->
       <div class="table_part">
-        <el-table v-loading="tableLoading" ref="multipleTable" :data="renderData" tooltip-effect="dark"
-          style="width: 100%" :max-height="tableMaxHeight" :row-key="getRowKeys" v-if="type != 0 && type != 3">
+        <el-table
+          v-loading="tableLoading"
+          ref="multipleTable"
+          :data="renderData"
+          tooltip-effect="dark"
+          style="width: 100%"
+          :max-height="tableMaxHeight"
+          :row-key="getRowKeys"
+          v-if="type != 0 && type != 3"
+        >
           <!-- <el-table-column
             type="selection"
             :reserve-selection="true"
@@ -40,22 +50,40 @@
           </el-table-column>
           <el-table-column label="名称" width="200" align="center">
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.title">{{ scope.row.title }}</div>
+              <div class="limit_width" :title="scope.row.title">
+                {{ scope.row.title }}
+              </div>
             </template>
           </el-table-column>
           <el-table-column label="描述" width="300" align="center">
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.content">{{ scope.row.content }}</div>
+              <div class="limit_width" :title="scope.row.content">
+                {{ scope.row.content }}
+              </div>
             </template>
           </el-table-column>
-          <el-table-column label="经度" width="150" align="center" v-if="modelParams.geotype == 0">
+          <el-table-column
+            label="经度"
+            width="150"
+            align="center"
+            v-if="modelParams.geotype == 0"
+          >
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.centerLon">{{ Number(scope.row.centerLon).toFixed(4) }}</div>
+              <div class="limit_width" :title="scope.row.centerLon">
+                {{ Number(scope.row.centerLon).toFixed(4) }}
+              </div>
             </template>
           </el-table-column>
-          <el-table-column label="纬度" width="150" align="center" v-if="modelParams.geotype == 0">
+          <el-table-column
+            label="纬度"
+            width="150"
+            align="center"
+            v-if="modelParams.geotype == 0"
+          >
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.centerLat">{{ Number(scope.row.centerLat).toFixed(4) }}</div>
+              <div class="limit_width" :title="scope.row.centerLat">
+                {{ Number(scope.row.centerLat).toFixed(4) }}
+              </div>
             </template>
           </el-table-column>
           <el-table-column label="类型" width="150" align="center">
@@ -69,38 +97,93 @@
             </template>
           </el-table-column>
 
-          <el-table-column label min-width="10" align="center"></el-table-column>
-          <el-table-column prop="address" label="查看" width="90" align="center">
+          <el-table-column
+            label
+            min-width="10"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            prop="address"
+            label="查看"
+            width="90"
+            align="center"
+          >
             <template slot-scope="scope">
-              <el-button icon="el-icon-view iconfont" :style="{ color: '#04CC6C' }"
-                @click="lookData(scope.$index, scope.row)" circle></el-button>
+              <el-button
+                icon="el-icon-view iconfont"
+                :style="{ color: '#04CC6C' }"
+                @click="lookData(scope.$index, scope.row)"
+                circle
+              ></el-button>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="编辑" width="90" align="center">
+          <el-table-column
+            prop="address"
+            label="编辑"
+            width="90"
+            align="center"
+          >
             <template slot-scope="scope">
-              <el-button icon="el-icon-edit iconfont" :style="{ color: '#7440E4' }"
-                @click="editData(scope.$index, scope.row)" circle></el-button>
+              <el-button
+                icon="el-icon-edit iconfont"
+                :style="{ color: '#7440E4' }"
+                @click="editData(scope.$index, scope.row)"
+                circle
+              ></el-button>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="删除" width="70" align="center">
+          <el-table-column
+            prop="address"
+            label="删除"
+            width="70"
+            align="center"
+          >
             <template slot-scope="scope">
-              <el-popover placement="top-end" width="160" :ref="`popover-${scope.$index}`">
+              <el-popover
+                placement="top-end"
+                width="160"
+                trigger="hover"
+                :ref="`popover-${scope.$index}`"
+              >
                 <p style="padding: 10px 0">确定要删除此数据吗?</p>
                 <div style="text-align: right; margin: 0">
-                  <el-button size="mini" type="text" @click="
-                    scope._self.$refs[`popover-${scope.$index}`].doClose()
-                  ">取消</el-button>
-                  <el-button type="primary" size="mini" @click="dataDelete(scope.$index, scope.row)">确定</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    @click="
+                      scope._self.$refs[`popover-${scope.$index}`].doClose()
+                    "
+                    >取消</el-button
+                  >
+                  <el-button
+                    type="primary"
+                    size="mini"
+                    @click="dataDelete(scope.$index, scope.row, scope)"
+                    >确定</el-button
+                  >
                 </div>
-                <el-button slot="reference" icon="el-icon-delete iconfont" :style="{ color: '#999999' }" size="medium"
-                  circle></el-button>
+                <el-button
+                  slot="reference"
+                  icon="el-icon-delete iconfont"
+                  :style="{ color: '#999999' }"
+                  size="medium"
+                  circle
+                ></el-button>
               </el-popover>
             </template>
           </el-table-column>
         </el-table>
 
-        <el-table v-loading="tableLoading" ref="multipleTable" :data="renderData" tooltip-effect="dark"
-          style="width: 100%" :max-height="tableMaxHeight" :row-key="getRowKeys" v-else>
+        <el-table
+          v-loading="tableLoading"
+          ref="multipleTable"
+          :data="renderData"
+          tooltip-effect="dark"
+          style="width: 100%"
+          :max-height="tableMaxHeight"
+          :row-key="getRowKeys"
+          v-else
+        >
           <!-- <el-table-column
             type="selection"
             :reserve-selection="true"
@@ -125,22 +208,40 @@
           </el-table-column>
           <el-table-column label="名称" width="200" align="center">
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.title">{{ scope.row.title }}</div>
+              <div class="limit_width" :title="scope.row.title">
+                {{ scope.row.title }}
+              </div>
             </template>
           </el-table-column>
           <el-table-column label="描述" width="300" align="center">
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.content">{{ scope.row.content }}</div>
+              <div class="limit_width" :title="scope.row.content">
+                {{ scope.row.content }}
+              </div>
             </template>
           </el-table-column>
-          <el-table-column label="经度" width="150" align="center" v-if="modelParams.geotype == 0">
+          <el-table-column
+            label="经度"
+            width="150"
+            align="center"
+            v-if="modelParams.geotype == 0"
+          >
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.centerLon">{{ Number(scope.row.centerLon).toFixed(4) }}</div>
+              <div class="limit_width" :title="scope.row.centerLon">
+                {{ Number(scope.row.centerLon).toFixed(4) }}
+              </div>
             </template>
           </el-table-column>
-          <el-table-column label="纬度" width="150" align="center" v-if="modelParams.geotype == 0">
+          <el-table-column
+            label="纬度"
+            width="150"
+            align="center"
+            v-if="modelParams.geotype == 0"
+          >
             <template slot-scope="scope">
-              <div class="limit_width" :title="scope.row.centerLat">{{ Number(scope.row.centerLat).toFixed(4) }}</div>
+              <div class="limit_width" :title="scope.row.centerLat">
+                {{ Number(scope.row.centerLat).toFixed(4) }}
+              </div>
             </template>
           </el-table-column>
           <el-table-column label="类型" width="150" align="center">
@@ -154,20 +255,39 @@
             </template>
           </el-table-column>
 
-          <el-table-column label min-width="10" align="center"></el-table-column>
-          <el-table-column prop="address" label="查看" width="90" align="center">
+          <el-table-column
+            label
+            min-width="10"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            prop="address"
+            label="查看"
+            width="90"
+            align="center"
+          >
             <template slot-scope="scope">
-              <el-button icon="el-icon-view iconfont" :style="{ color: '#04CC6C' }"
-                @click="lookData(scope.$index, scope.row)" circle></el-button>
+              <el-button
+                icon="el-icon-view iconfont"
+                :style="{ color: '#04CC6C' }"
+                @click="lookData(scope.$index, scope.row)"
+                circle
+              ></el-button>
             </template>
           </el-table-column>
         </el-table>
       </div>
 
       <div class="footer">
-        <el-pagination background @current-change="handleCurrentChange" @size-change="handlePagesizeChange"
-          :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next, sizes, jumper"
-          :total="dataTotal"></el-pagination>
+        <el-pagination
+          background
+          @current-change="handleCurrentChange"
+          @size-change="handlePagesizeChange"
+          :current-page.sync="currentPage"
+          :page-size="pageSize"
+          layout="prev, pager, next, sizes, jumper"
+          :total="dataTotal"
+        ></el-pagination>
       </div>
     </div>
   </div>
@@ -220,7 +340,7 @@ export default {
       selectedNum: 0,
     };
   },
-  created() { 
+  created() {
     // console.log(this.type)
   },
   mounted() {
@@ -252,7 +372,7 @@ export default {
     },
 
     // 删除数据集记录
-    dataDelete(index, data) {
+    dataDelete(index, data, scope) {
       let that = this;
       api
         .delSingleData({
@@ -266,9 +386,11 @@ export default {
               message: "删除数据成功!",
               type: "success",
             });
+            scope._self.$refs["popover-" + scope.$index].doClose();
             that.updateData();
           } else {
-            this.$checkRequestCode(result);
+            scope._self.$refs["popover-" + scope.$index].doClose();
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -280,7 +402,7 @@ export default {
     },
 
     // 批量删除
-    batchDelete() { },
+    batchDelete() {},
 
     // 获取单条数据全部内容
     getSingleAllContent(data) {
@@ -295,7 +417,7 @@ export default {
             that.formData = result.content;
             that.isShowAddSingleDataDialog = true;
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -343,9 +465,7 @@ export default {
     },
   },
 
-  filters: {
-
-  },
+  filters: {},
 
   computed: {
     preparingRenderedData() {

+ 6 - 17
src/components/Currency/DataTable/MetadataListContainer/SingleData.vue

@@ -128,7 +128,7 @@
             </template>
           </el-table-column>
 
-          <el-table-column :align="$elDatePickerAlign" v-if="edit">
+          <el-table-column :align="'right'" v-if="edit">
             <template slot="header">
               <el-button size="mini" @click="addAdvancedOptionsRow()">
                 <i class="el-icon-plus"></i>
@@ -363,13 +363,7 @@ export default {
     addSingleData(data) {
       let that = this;
       // 上传loading
-      const loading = that.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "数据新增中,请勿刷新!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("数据新增中,请勿刷新!")
       api
         .addSingleData(data)
         .then((result) => {
@@ -382,7 +376,7 @@ export default {
             if (that.updateData) that.updateData();
             that.dialogBeforeClose();
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -398,13 +392,7 @@ export default {
     updateSingleData(data) {
       let that = this;
       // 上传loading
-      const loading = that.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "数据更新中,请勿刷新!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("数据更新中,请勿刷新!")
       api
         .updateSingleData(data)
         .then((result) => {
@@ -417,10 +405,11 @@ export default {
             if (that.updateData) that.updateData();
             that.dialogBeforeClose();
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
+          loading.close();
           that.$message({
             type: "error",
             message: err,

+ 2 - 2
src/components/Currency/ListContainer.vue

@@ -26,8 +26,8 @@
                     <el-col v-for="(item_, index_) in listField" :key="index_" :span="item_.span">
                         <div
                             v-if="item_.name.toLowerCase().indexOf('time') >= 0"
-                            :title="dateFormat(item[item_.name], 'yyyy-MM-DD hh:mm:ss')"
-                        >{{ dateFormat(item[item_.name], 'yyyy-MM-DD hh:mm:ss') }}</div>
+                            :title="transDateFormat(item[item_.name], 'yyyy-MM-DD hh:mm:ss')"
+                        >{{ transDateFormat(item[item_.name], 'yyyy-MM-DD hh:mm:ss') }}</div>
                         <!-- <div
                             v-else-if="item_.name.toLowerCase().indexOf('request') >= 0"
                             :title="item[item_.name]"

+ 2 - 2
src/components/DataAccess/DataLog.vue

@@ -15,7 +15,7 @@
                 range-separator="至"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
-                :align="$elDatePickerAlign"
+                :align="'right'"
               ></el-date-picker>
               <el-button type="primary" @click="search">查询</el-button>
             </div>
@@ -158,7 +158,7 @@ export default {
                 ? []
                 : result.content;
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {

+ 2 - 2
src/components/DataAccess/Feedback.vue

@@ -15,7 +15,7 @@
                 range-separator="至"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
-                :align="$elDatePickerAlign"
+                :align="'right'"
               ></el-date-picker>
               <el-button type="primary" @click="search">查询</el-button>
             </div>
@@ -163,7 +163,7 @@ export default {
                 ? []
                 : result.content;
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {

+ 1 - 3
src/components/DataDisplay/LayerDisplay/Buffer.vue

@@ -315,8 +315,6 @@ export default {
   position: absolute;
   top: -60px;
   left: calc(100% - 70px - 400px);
-}
-.bufferContent {
   border-radius: 4px;
   width: 400px;
   height: fit-content;
@@ -399,7 +397,7 @@ export default {
       }
     }
     .content {
-      max-height: 300px;
+      max-height: 230px;
       overflow: hidden;
       overflow-y: auto;
       padding: 0 20px;

+ 1 - 7
src/components/DataDisplay/LayerDisplay/Map.vue

@@ -577,13 +577,7 @@ export default {
     searchData(content, layerType) {
       let that = this;
       // 上传loading
-      const loading = this.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "数据获取中,请稍后!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("数据获取中,请稍后!")
       getLayerData(content, this.setPopup, loading)
         .then((result) => {
           let source = new VectorSource();

+ 2 - 14
src/components/DataDisplay/LayerDisplay/Menu.vue

@@ -188,13 +188,7 @@ export default {
       this.clearChartHighLight();
       let label = node.label;
       let data = node.data;
-      const loading = this.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "统计数据分析获取中,请稍后!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("统计数据分析获取中,请稍后!")
       this.searchStatisticalData(data.id, 2)
         .then((result) => {
           loading.close();
@@ -368,13 +362,7 @@ export default {
         this.layerInfos[item.id].source == null
       ) {
         // 上传loading
-        const loading = this.$loading({
-          customClass: "allPageLoading",
-          lock: true,
-          text: "数据获取中,请稍后!",
-          spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
-        });
+        const loading = this.$createLoading("数据获取中,请稍后!")
         getLayerData(item, this.extendFunc, loading)
           .then((result) => {
             that.layerInfos[item.id].source = new VectorSource();

+ 18 - 2
src/components/DataLayer/Icon.vue

@@ -23,7 +23,7 @@
             upload_file == null ? "上传图片" : "修改图片"
           }}</el-button>
         </el-upload>
-
+        <div class="tips">注:图片存储大小应小于1M</div>
         <div class="img_block">
           <el-image
             v-if="iconInfo.url.indexOf('http') > -1 && uploadIconSrc == ''"
@@ -114,7 +114,18 @@ export default {
     // icon 上传
     beforeUploadIcon(files) {
       let that = this;
+
+      let limitSize = 1024 * 1024; // 1M
+      if (files.size >= limitSize) {
+        this.$message({
+          type: "warning",
+          message: "图片大小超过1M,请改变尺寸后重新上传!",
+        });
+        return;
+      }
+
       let filedata = new FormData();
+
       filedata.append("file", files);
       this.upload_file = filedata;
       // 获取上传图片信息
@@ -189,7 +200,7 @@ export default {
             that.upload_file = null;
             that.beforeClose();
           });
-        }); 
+        });
       }
     },
   },
@@ -211,6 +222,11 @@ export default {
   /deep/ .el-form-item__content {
     margin-left: 100px !important;
   }
+  .tips {
+    font-size: 14px;
+    color: #d9d9d9;
+    line-height: normal;
+  }
   .img_block {
     margin-top: 20px;
     width: 420px;

+ 12 - 3
src/components/DataLayer/IconLibraryManagement.vue

@@ -109,19 +109,22 @@ export default {
     addNewIcon(params) {
       let that = this;
       // 添加图标后更新列表 getIcon()
+      const loading = this.$createLoading("图标上传增加中,请稍后!")
       return new Promise((resolve, reject) => {
         iconApi
           .addNewIcon(params)
           .then((result) => {
+            loading.close();
             if (result.code == 200) {
               getIcon(); // icon 更新
               resolve();
             } else {
-              // checkRequestCode
+              that.$checkRequestCode(result);
               reject();
             }
           })
           .catch((err) => {
+            loading.close();
             that.$message({
               type: "warning",
               message: "上传失败,请稍后重试!",
@@ -139,16 +142,19 @@ export default {
       })
         .then(() => {
           // 调用删除图标接口 更新列表 getIcon()
+          const loading = that.$createLoading("图标删除中,请稍后!")
           iconApi
             .delIcon({ id: item.id })
             .then((result) => {
+              loading.close();
               if (result.code == 200) {
                 getIcon(); // icon 更新
               } else {
-                // checkRequestCode
+                that.$checkRequestCode(result);
               }
             })
             .catch((err) => {
+              loading.close();
               that.$message({
                 type: "warning",
                 message: "更新失败,请稍后重试!",
@@ -165,19 +171,22 @@ export default {
     updateIcon(params) {
       let that = this;
       // 更新图标后更新列表 getIcon()
+      const loading = this.$createLoading("图标信息更新中,请稍后!")
       return new Promise((resolve, reject) => {
         iconApi
           .updateIcon(params)
           .then((result) => {
+            loading.close();
             if (result.code == 200) {
               getIcon(); // icon 更新
               resolve();
             } else {
-              // checkRequestCode
+              that.$checkRequestCode(result);
               reject();
             }
           })
           .catch((err) => {
+            loading.close();
             that.$message({
               type: "warning",
               message: "更新失败,请稍后重试!",

+ 4 - 16
src/components/DataLayer/LayerDetail.vue

@@ -349,13 +349,7 @@ export default {
     addModel(data) {
       let that = this;
       // 上传loading
-      const loading = that.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "图层新增中,请勿刷新!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("图层新增中,请勿刷新!")
       api
         .addModel(data)
         .then((result) => {
@@ -369,7 +363,7 @@ export default {
             that.dialogBeforeClose();
           } else {
             loading.close();
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -383,13 +377,7 @@ export default {
     updateModel(data) {
       let that = this;
       // 上传loading
-      const loading = that.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "图层更新中,请勿刷新!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("图层更新中,请勿刷新!")
       api
         .updateModel(data)
         .then((result) => {
@@ -402,7 +390,7 @@ export default {
             that.updateData();
             that.dialogBeforeClose();
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {

+ 3 - 3
src/components/DataLayer/LayerManagement.vue

@@ -146,7 +146,7 @@ export default {
             that.edit = false;
             that.isShowAddModelDetailDialog = true;
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -172,7 +172,7 @@ export default {
             that.edit = true;
             that.isShowAddModelDetailDialog = true;
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -200,7 +200,7 @@ export default {
               if (response.code == 200) {
                 that.$message({ type: "success", message: "删除成功!" });
               } else {
-                this.$checkRequestCode(result);
+                that.$checkRequestCode(result);
               }
               that.getMenu();
             })

+ 114 - 26
src/components/DataQualityInspection/Process/ExcelQualityInspection.vue

@@ -83,7 +83,9 @@
         :limit="1"
         :before-upload="uploadFile"
       >
-        <el-button type="primary" class="add-item">上传文件</el-button>
+        <el-button type="primary" class="add-item" @click="beforeUploadFile"
+          >上传文件</el-button
+        >
       </el-upload>
     </el-row>
   </el-container>
@@ -141,7 +143,7 @@ export default {
           checkContent: "县级行政区划编码检查",
           checkDescribe: '验证是否是以"13"开头的纯数字且至少6位的行政区划编码',
           fieldName: "",
-          type: "countryCode",
+          type: "countyCode",
           delBtn: false,
         },
         {
@@ -174,7 +176,7 @@ export default {
           checkDescribe:
             "检查经纬度点位是否在行政区划范围内部,例:经纬度为116.4,39.9的位置是否在石家庄范围内",
           fieldName: "",
-          type: "areaLocation",
+          type: "areaLatlon",
           delBtn: false,
           children: [
             {
@@ -234,9 +236,70 @@ export default {
         return item;
       });
     },
+    beforeUploadFile(e) {
+      let that = this;
+      if (!jy()) e.stopPropagation();
+      function jy() {
+        for (let i = 0; i < that.checkDetail.length; i++) {
+          let param = that.checkDetail[i];
+          if (param.isCheck) {
+            if (!param.children) {
+              switch (param.type) {
+                case "dataIntegrality":
+                  if (that.webMessage(param.fieldName, param.checkContent))
+                    return false;
+                  break;
+                case "provinceCode":
+                case "cityCode":
+                case "countyCode":
+                  if (that.webMessage(param.fieldName, param.checkContent))
+                    return false;
+                  break;
+                default:
+                  break;
+              }
+            } else {
+              switch (param.type) {
+                case "latlon":
+                  let judge1 = that.webMessage(
+                    param.children[0].fieldName,
+                    param.checkContent
+                  );
+                  if (judge1) return false;
+                  let judge2 = that.webMessage(
+                    param.children[1].fieldName,
+                    param.checkContent
+                  );
+                  if (judge2) return false;
+                  break;
+                case "areaLatlon":
+                  let judge3 = that.webMessage(
+                    param.children[0].fieldName,
+                    param.checkContent
+                  );
+                  if (judge3) return false;
+                  let judge4 = that.webMessage(
+                    param.children[1].fieldName,
+                    param.checkContent
+                  );
+                  if (judge4) return false;
+                  let judge5 = that.webMessage(
+                    param.children[2].fieldName,
+                    param.checkContent
+                  );
+                  if (judge5) return false;
+                  break;
+                default:
+                  break;
+              }
+            }
+          }
+        }
+        return true;
+      }
+    },
     uploadFile(file) {
       let that = this;
-      // let ceshiObj = {};
       let obj = new FormData();
       let completeArr = [];
       for (let i = 0; i < this.checkDetail.length; i++) {
@@ -245,50 +308,75 @@ export default {
           if (!param.children) {
             switch (param.type) {
               case "dataIntegrality":
-                if (that.webMessage(param.fieldName, param.checkContent))
-                  return;
                 completeArr.push(param.fieldName);
                 break;
-              default:
-                if (that.webMessage(param.fieldName, param.checkContent))
-                  return;
+              case "provinceCode":
+              case "cityCode":
+              case "countyCode":
                 obj.append(param.type, param.fieldName);
-                // ceshiObj[param.type] = param.fieldName;
+                break;
+              default:
                 break;
             }
           } else {
-            let arr = [];
-            for (let k = 0; k < param.children.length; k++) {
-              const item = param.children[k];
-              if (that.webMessage(item.fieldName, item.checkContent)) return;
-              arr.push(item.fieldName);
+            switch (param.type) {
+              case "latlon":
+                obj.append(
+                  param.type,
+                  // {
+                  //   check: true,
+                  //   lonlat: [
+                  //     param.children[0].fieldName,
+                  //     param.children[1].fieldName,
+                  //   ],
+                  // }
+                  [param.children[0].fieldName, param.children[1].fieldName]
+                );
+                break;
+              case "areaLatlon":
+                obj.append(param.type, [
+                  param.children[0].fieldName,
+                  param.children[1].fieldName,
+                  param.children[2].fieldName,
+                ]);
+                break;
+              default:
+                break;
             }
-            obj.append(param.type, arr);
-            // ceshiObj[param.type] = arr;
           }
         }
       }
       if (completeArr.length > 0) {
         obj.append("dataIntegrality", completeArr);
-        // ceshiObj["dataIntegrality"] = completeArr;
       }
       obj.append("file", file);
+      const loading = this.$createLoading("数据质检中,请稍后!");
       qualityApi
         .uploadInspectionFile(obj)
         .then((result) => {
+          loading.close();
           if (result.code == 200) {
-            that.$message({
-              type: "success",
-              message: result.content,
-            });
+            that
+              .$confirm(result.content, "质检结果", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "success",
+              })
+              .then(() => {})
+              .catch(() => {});
           } else {
-            that.$message({
-              type: "error",
-              message: result.content,
-            });
+            that
+              .$confirm(result.content, "质检结果", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "error",
+              })
+              .then(() => {})
+              .catch(() => {});
           }
         })
         .catch((err) => {
+          loading.close();
           that.$message({
             type: "error",
             message: err,

+ 21 - 10
src/components/DataQualityInspection/Process/GeojsonQualityInspection.vue

@@ -141,7 +141,7 @@ export default {
           checkContent: "县级行政区划编码检查",
           checkDescribe: '验证是否是以"13"开头的纯数字且至少6位的行政区划编码',
           fieldName: "",
-          type: "countryCode",
+          type: "countyCode",
           delBtn: false,
         },
         {
@@ -174,7 +174,7 @@ export default {
           checkDescribe:
             "检查经纬度点位是否在行政区划范围内部,例:经纬度为116.4,39.9的位置是否在石家庄范围内",
           fieldName: "",
-          type: "areaLocation",
+          type: "areaLatlon",
           delBtn: false,
           children: [
             {
@@ -272,23 +272,34 @@ export default {
         obj.append("dataIntegrality", completeArr);
         // ceshiObj["dataIntegrality"] = completeArr;
       }
+      const loading = this.$createLoading("数据质检中,请稍后!");
       obj.append("file", file);
       qualityApi
         .uploadInspectionFile(obj)
         .then((result) => {
+          loading.close();
           if (result.code == 200) {
-            that.$message({
-              type: "success",
-              message: result.content,
-            });
+            that
+              .$confirm(result.content, "质检结果", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "success",
+              })
+              .then(() => {})
+              .catch(() => {});
           } else {
-            that.$message({
-              type: "error",
-              message: result.content,
-            });
+            that
+              .$confirm(result.content, "质检结果", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "error",
+              })
+              .then(() => {})
+              .catch(() => {});
           }
         })
         .catch((err) => {
+          loading.close();
           that.$message({
             type: "error",
             message: err,

+ 22 - 11
src/components/DataQualityInspection/Process/ShapefileQualityInspection.vue

@@ -109,7 +109,7 @@ export default {
       checkDefaultDetail: [
         {
           index: 1,
-         isCheck: 1,
+          isCheck: 1,
           checkContent: "数据完整性",
           checkDescribe:
             "检查所填字段数据是否完整(可填写多个字段,会动态扩展行数)",
@@ -141,7 +141,7 @@ export default {
           checkContent: "县级行政区划编码检查",
           checkDescribe: '验证是否是以"13"开头的纯数字且至少6位的行政区划编码',
           fieldName: "",
-          type: "countryCode",
+          type: "countyCode",
           delBtn: false,
         },
         {
@@ -174,7 +174,7 @@ export default {
           checkDescribe:
             "检查经纬度点位是否在行政区划范围内部,例:经纬度为116.4,39.9的位置是否在石家庄范围内",
           fieldName: "",
-          type: "areaLocation",
+          type: "areaLatlon",
           delBtn: false,
           children: [
             {
@@ -273,22 +273,33 @@ export default {
         // ceshiObj["dataIntegrality"] = completeArr;
       }
       obj.append("file", file);
+      const loading = this.$createLoading("数据质检中,请稍后!");
       qualityApi
         .uploadInspectionFile(obj)
         .then((result) => {
+          loading.close();
           if (result.code == 200) {
-            that.$message({
-              type: "success",
-              message: result.content,
-            });
+            that
+              .$confirm(result.content, "质检结果", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "success",
+              })
+              .then(() => {})
+              .catch(() => {});
           } else {
-            that.$message({
-              type: "error",
-              message: result.content,
-            });
+            that
+              .$confirm(result.content, "质检结果", {
+                showConfirmButton: false,
+                cancelButtonText: "关闭",
+                type: "error",
+              })
+              .then(() => {})
+              .catch(() => {});
           }
         })
         .catch((err) => {
+          loading.close();
           that.$message({
             type: "error",
             message: err,

+ 1 - 1
src/components/DataQualityInspection/Rules/DataIntegrityCheck.vue

@@ -58,7 +58,7 @@ export default {
   }
   .el-image {
     width: 62.5%;
-    height: 100%;
+    // height: 100%;
     margin: 0 auto;
     display: block;
   }

+ 6 - 6
src/components/DataQualityInspection/Rules/ImportExcelQualityInspectionRules.vue

@@ -22,23 +22,23 @@ export default {
       srcList: [showImg],
       textArr: [
         "标题字段不能为空,且导入附件中包含该字段,字段内容不为空。",
-        "经度字段不能为空,且导入附件中包含该字段,字段内容不为空,符合度标准。",
-        "纬度字段不能为空,且导入附件中包含该字段,字段内容不为空,符合度标准。",
+        "经度字段不能为空,且导入附件中包含该字段,字段内容不为空,符合度标准。",
+        "纬度字段不能为空,且导入附件中包含该字段,字段内容不为空,符合度标准。",
         "描述字段不能为空,且导入附件中包含该字段,字段内容不为空。",
         "内容描述字段可以为空,导入附件中包含内容描述对应字段,字段内容不为空。",
       ],
       downloadExampleFileType: "Excel",
-      downloadExampleFileUrl: "./static/package/quality/excel.xlsx",
+      downloadExampleFileUrl: "./static/package/quality/excel.xls",
     };
   },
   components: {},
   methods: {
     download() {
       const elink = document.createElement("a");
-      elink.href = this.textObj.downloadExampleFileUrl;
+      elink.href = this.downloadExampleFileUrl;
       elink.setAttribute(
         "download",
-        this.textObj.downloadExampleFileType + "示例文件.xlsx"
+        this.downloadExampleFileType + "示例文件.xlsx"
       );
       elink.style.display = "none";
       document.body.appendChild(elink);
@@ -81,7 +81,7 @@ export default {
   }
   .el-image {
     width: 62.5%;
-    height: 100%;
+    // height: 100%;
     margin: 0 auto;
     display: block;
   }

+ 1 - 1
src/components/DataQualityInspection/Rules/ImportGeojsonQualityInspectionRules.vue

@@ -146,7 +146,7 @@ export default {
   }
   .el-image {
     width: 62.5%;
-    height: 100%;
+    // height: 100%;
     margin: 0 auto;
     display: block;
   }

+ 1 - 1
src/components/DataQualityInspection/Rules/ImportShapefileQualityInspectionRules.vue

@@ -146,7 +146,7 @@ export default {
   }
   .el-image {
     width: 62.5%;
-    height: 100%;
+    // height: 100%;
     margin: 0 auto;
     display: block;
   }

+ 2 - 2
src/components/DataQualityInspection/Rules/LayerQualityInspectionRules.vue

@@ -20,7 +20,7 @@ export default {
         "第三方表名(TABLE_NAME)不能为空,长度100字符。",
         "标题(TITLE)不能为空,长度20个字符。",
         "描述(CONTENT)不能为空,长度100个字符。",
-        "内容描述(JSON_STR)可以为空,长度64KB。",
+        "内容描述(JSON_STR)可以为空,长度64字符。",
         "几何类型不能为空。",
       ],
     };
@@ -60,7 +60,7 @@ export default {
   }
   .el-image {
     width: 62.5%;
-    height: 100%;
+    // height: 100%;
     margin: 0 auto;
     display: block;
   }

+ 4 - 4
src/components/DataQualityInspection/Rules/SingleDataQualityInspectionRules.vue

@@ -23,9 +23,9 @@ export default {
         "中心点经度(CENTER_LON)不能为空,长度20字符,经度范围-180至180。",
         "中心点纬度(CENTER_LAT)不能为空,长度20字符,纬度范围-85至85。",
         "描述(CONTENT)不能为空,长度100字符。",
-        "内容描述(JSON_STR)可以为空,长度64KB,用来展示业务数据。",
-        "geometry数据(locations)可以为空,长度64KB,必须是WKT格式数据,支持多种几何类型。",
-        "行政区划代码(AREA_CODE)可以为空,长度20。", 
+        "内容描述(JSON_STR)可以为空,长度64字符,用来展示业务数据。",
+        "geometry数据(locations)可以为空,长度64字符,必须是WKT格式数据,支持多种几何类型。",
+        "行政区划代码(AREA_CODE)可以为空,长度20字符。", 
       ],
     };
   },
@@ -64,7 +64,7 @@ export default {
   }
   .el-image {
     width: 62.5%;
-    height: 100%;
+    // height: 100%;
     margin: 0 auto;
     display: block;
   }

+ 2 - 2
src/components/DataServices/ServiceMonitoring.vue

@@ -15,7 +15,7 @@
                 range-separator="至"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
-                :align="$elDatePickerAlign"
+                :align="'right'"
               ></el-date-picker>
               <el-button type="primary" @click="search">查询</el-button>
             </div>
@@ -146,7 +146,7 @@ export default {
                 ? []
                 : result.content;
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {

+ 12 - 6
src/components/SecondaryDevelopment/GraphicsDrawingTool.vue

@@ -4,14 +4,14 @@
     <el-row
       class="first_text"
       v-for="(item, index) in content.way"
-      :key="index"
+      :key="index + 'way'"
     >
       <el-col class="text"> {{ index + 1 }}. {{ item.text }} </el-col>
       <div v-if="item.children">
         <el-row
           class="second_text"
           v-for="(item_, index_) in item.children"
-          :key="index_"
+          :key="index_ + 'text'"
         >
           <el-col class="text"> {{ index_ + 1 }}). {{ item_ }} </el-col>
         </el-row>
@@ -22,7 +22,10 @@
     <el-row>
       <el-col class="text"> {{ content.methods.text }} </el-col>
     </el-row>
-    <div v-for="(item, index) in content.methods.methods" :key="index">
+    <div
+      v-for="(item, index) in content.methods.methods"
+      :key="index + 'method'"
+    >
       <el-row class="text">{{ index + 1 }}. {{ item.text }} </el-row>
       <el-row v-if="item.param != undefined">
         <el-row class="text">参数说明:</el-row>
@@ -38,7 +41,7 @@
         <el-row
           class="text second_text"
           v-for="(str1, index1) in item.example.arr"
-          :key="index1"
+          :key="index1 + 'example_text'"
           >{{ index1 + 1 }}). {{ str1 }}</el-row
         >
       </el-row>
@@ -55,12 +58,15 @@
       </el-row>
     </div>
     <el-row class="first_level_title">注意事项</el-row>
-    <el-row v-for="(str, index) in content.attention" :key="index">
+    <el-row
+      v-for="(str, index) in content.attention"
+      :key="index + 'attention'"
+    >
       <el-col class="text"> {{ index + 1 }}. {{ str }} </el-col>
     </el-row>
     <el-row class="first_level_title">效果展示</el-row>
     <el-carousel height="550px">
-      <el-carousel-item v-for="(item, index) in imageArr" :key="index">
+      <el-carousel-item v-for="(item, index) in imageArr" :key="index + 'img'">
         <el-image :src="item.image" :preview-src-list="item.srcList"></el-image>
       </el-carousel-item>
     </el-carousel>

+ 3 - 3
src/components/SecondaryDevelopment/ManualDrawingTool.vue

@@ -10,10 +10,10 @@
       <div v-if="item.children">
         <el-row
           class="second_text"
-          v-for="(item_, index_) in item.children"
-          :key="index_"
+          v-for="(item1, index1) in item.children"
+          :key="index1"
         >
-          <el-col class="text"> {{ index_ + 1 }}). {{ item_ }} </el-col>
+          <el-col class="text"> {{ index1 + 1 }}). {{ item1 }} </el-col>
         </el-row>
       </div>
     </el-row>

+ 72 - 43
src/components/SystemManagement/RoleManagement.vue

@@ -10,7 +10,7 @@
         </el-row>
       </div>
       <div class="list_container authList" v-show="nowRole != null">
-        <el-row v-for="(item, index) in authList" :key="index">
+        <!-- <el-row v-for="(item, index) in authList" :key="index">
           <div
             :class="{
               first_level: Number(item.noteStr) % 10 == 0,
@@ -24,13 +24,24 @@
               {{ item.permissionName }}
             </el-checkbox>
           </div>
-        </el-row>
+        </el-row> -->
+
+        <el-tree
+          ref="authTree"
+          :data="authList"
+          show-checkbox
+          node-key="id"
+          :props="defaultProps"
+          :default-expanded-keys="defaultExpandedKeys"
+          :default-checked-keys="defaultCheckedKeys"
+        ></el-tree>
+        <!-- defaultExpandedKeys -->
+        <!-- defaultCheckedKeys -->
       </div>
     </div>
     <div class="footer">
       <div>
         <el-button @click="save">保存设置</el-button>
-        <!-- <el-button @click="cancal">取消设置</el-button> -->
       </div>
     </div>
   </div>
@@ -74,7 +85,9 @@ export default {
     changeRole(item) {
       let that = this;
       this.nowRole = Object.assign({}, item);
-      this.authList = [].concat(this.authDefaultList);
+      this.authList = [].concat(
+        JSON.parse(JSON.stringify(this.authDefaultList))
+      );
       api
         .getAllPermissionOnRole({
           roleId: item.id,
@@ -82,13 +95,13 @@ export default {
         .then((result) => {
           if (result.code) {
             if (result.code == 200) {
-              let arr = result.content.map(function (item) {
+              that.defaultCheckedKeys = result.content.map(function (item) {
                 return item.id;
               });
-              that.authList = that.authList.map(function (item) {
-                item.active = arr.indexOf(item.id) > -1;
-                return item;
-              });
+              // that.authList = that.authList.map(function (item) {
+              //   item.active = arr.indexOf(item.id) > -1;
+              //   return item;
+              // });
             } else {
               that.$checkRequestCode(result);
             }
@@ -103,19 +116,19 @@ export default {
           });
         });
     },
-    // 改变权限从而改变UI
-    changeAuth(status, item) {
-      if (!status) {
-        if (Number(item.noteStr) % 10 == 0) {
-          let t = Math.floor(Number(item.noteStr) / 10);
-          this.authList = this.authList.map(function (item_) {
-            let d = Math.floor(Number(item_.noteStr) / 10);
-            if (t == d) item_.active = false;
-            return item_;
-          });
-        }
-      }
-    },
+    // // 改变权限从而改变UI
+    // changeAuth(status, item) {
+    //   if (!status) {
+    //     if (Number(item.noteStr) % 10 == 0) {
+    //       let t = Math.floor(Number(item.noteStr) / 10);
+    //       this.authList = this.authList.map(function (item_) {
+    //         let d = Math.floor(Number(item_.noteStr) / 10);
+    //         if (t == d) item_.active = false;
+    //         return item_;
+    //       });
+    //     }
+    //   }
+    // },
 
     // 获取所有权限
     getAllAuthList() {
@@ -173,10 +186,25 @@ export default {
 
     // 权限整理
     authArrange(list) {
-      this.authDefaultList = list.map(function (item) {
-        item.active = false;
-        return item;
-      });
+      // this.authDefaultList = list.map(function (item) {
+      //   item.active = false;
+      //   return item;
+      // });
+      this.defaultExpandedKeys = [];
+      let arr = [];
+      for (let i = 0; i < list.length; i++) {
+        const element = list[i];
+        element.active = false;
+        if (Number(element.noteStr) % 10 == 0) {
+          element.children = [];
+          this.defaultExpandedKeys.push(element.id);
+          if (element.noteStr == "10") delete element.children;
+          arr.push(element);
+        } else {
+          arr[arr.length - 1].children.push(element);
+        }
+      }
+      this.authDefaultList = arr;
     },
     // 角色整理
     roleArrange(list) {
@@ -189,32 +217,33 @@ export default {
     save() {
       let that = this;
       if (this.nowRole == null) {
+        this.$message({
+          type:"warning",
+          message:"当前未设置角色权限!"
+        })
         return;
       }
-      let arr = this.authList
-        .filter(function (item) {
-          return item.active;
-        })
-        .map(function (item) {
-          return item.id;
-        });
+      // let arr = this.authList
+      //   .filter(function (item) {
+      //     return item.active;
+      //   })
+      //   .map(function (item) {
+      //     return item.id;
+      //   });
+      let arr = this.$refs.authTree.getCheckedKeys();
       api
         .updateRoleAuth({
           roleId: this.nowRole.id,
           permissionId: arr.join(","),
         })
         .then((result) => {
-          if (result.code) {
-            if (result.code == 200) {
-              that.$message({
-                type: "success",
-                message: "权限更新成功!",
-              });
-            } else {
-              that.$checkRequestCode(result);
-            }
+          if (result.code == 200) {
+            that.$message({
+              type: "success",
+              message: "权限更新成功!",
+            });
           } else {
-            that.roleList = result;
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {

+ 3 - 3
src/components/SystemManagement/UserManagement.vue

@@ -166,7 +166,7 @@ export default {
             });
             that.userList = [].concat(that.userList, d);
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -187,7 +187,7 @@ export default {
             if (result.code == 200) {
               resolve(result.content);
             } else {
-              this.$checkRequestCode(result);
+              that.$checkRequestCode(result);
               reject();
             }
           })
@@ -224,7 +224,7 @@ export default {
               });
               resolve(result.content);
             } else {
-              this.$checkRequestCode(result);
+              that.$checkRequestCode(result);
               reject();
             }
           })

+ 1 - 7
src/components/Utilities/AddressTranslationTool.vue

@@ -118,13 +118,7 @@ export default {
         outputFormat: "application/json",
         filter: filter,
       });
-      const loading = this.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "地址查询中,请勿刷新!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("地址查询中,请勿刷新!")
       fetch("/proxy_geoserver/geoserver/wfs", {
         //geoserver wfs地址如localhost:8080/geoserver/wfs
         method: "POST",

+ 23 - 4
src/components/Utilities/CoordinateConversionTool.vue

@@ -35,11 +35,11 @@
       <el-row>
         <el-col class="second_level_title_1" :span="8">
           转换前经度(或x):
-          <el-input v-model="beforeX"></el-input>
+          <el-input v-model="beforeX" type="number"></el-input>
         </el-col>
         <el-col class="second_level_title_1" :span="8">
           转换前纬度(或y):
-          <el-input v-model="beforeY"></el-input>
+          <el-input v-model="beforeY" type="number"></el-input>
         </el-col>
         <el-col :span="8">
           <el-button class="change_address" type="primary" @click="transform">
@@ -55,15 +55,18 @@
           </el-button>
         </el-col>
       </el-row>
+      <el-row class="tips">
+        <el-col> 注:转换前的经纬度(或x y)的值应为数字 </el-col>
+      </el-row>
     </div>
     <div class="afterTransformOption">
       <el-row class="first_level_title"> 转换结果 </el-row>
       <el-row>
         <el-col class="second_level_title_2" :span="8">
-          转换经度(或x):{{ afterX }}
+          转换经度(或x):{{ afterX }}
         </el-col>
         <el-col class="second_level_title_2" :span="8">
-          转换纬度(或y):{{ afterY }}
+          转换纬度(或y):{{ afterY }}
         </el-col>
         <el-col :span="8" style="min-heigth: 1px"></el-col>
       </el-row>
@@ -265,6 +268,15 @@ export default {
     .el-input {
       width: fit-content;
     }
+    .tips {
+      margin-bottom: 0px !important;
+      line-height: 30px;
+      font-size: 14px;
+      text-indent: 42px;
+      color: #c3c3c3;
+      overflow: hidden;
+      text-align: left;
+    }
   }
   .afterTransformOption {
     height: calc(100% - 172px);
@@ -309,5 +321,12 @@ export default {
   .change_address {
     margin-left: 20px;
   }
+  ::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>

+ 1 - 7
src/components/Utilities/MeasureTool/Map.vue

@@ -577,13 +577,7 @@ export default {
     searchData(content, layerType) {
       let that = this;
       // 上传loading
-      const loading = this.$loading({
-        customClass: "allPageLoading",
-        lock: true,
-        text: "数据获取中,请稍后!",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      const loading = this.$createLoading("数据获取中,请稍后!")
       getLayerData(content, this.setPopup, loading)
         .then((result) => {
           let source = new VectorSource();

+ 2 - 36
src/main.js

@@ -18,48 +18,14 @@ import JsonViewer from 'vue-json-viewer'
 // Import JsonViewer as a Vue.js plugin
 Vue.use(JsonViewer)
 
-Vue.config.productionTip = false;
-Vue.prototype.$elDatePickerAlign = "right";
-Vue.prototype.$checkRequestCode = (result) => {
-  let requestCode = systemConfig.requestCode;
-  return new Promise((resolve, reject) => {
-    if (result.code == 212) {
-      let obj = this.getParams();
-      let autologin1 = obj.autologin;
-      let autologin2 = localStorage.getItem("autologin");
-      if (
-        autologin1 == 1 ||
-        autologin2 != null ||
-        autologin2 != undefined
-      ) {
-        this.loginFunc();
-      } else {
-        this.$store.commit("setToken", "");
-        this.$store.commit("setUserState", false);
-      }
-    } else {
-      let code = requestCode[result.code];
-      if (code == 206 || code == 207 || code == 208) {
-        this.$router.push({
-          path: "/error",
-        });
-      } else {
-        ElementUI.Message({
-          type: "warning",
-          message: requestCode[result.code],
-        });
-      }
-    }
-  });
-}
+Vue.config.productionTip = false; 
 
 // 时间格式化
-Vue.prototype.dateFormat = function (value, fmt) {
+Vue.prototype.transDateFormat = function (value, fmt) {
   // "YYYY-MM-DD HH:mm:ss"
   return moment(value).format(fmt);
 }
 
-
 new Vue({
   data() { return {} },
   router,

+ 9 - 2
src/router/index.js

@@ -11,8 +11,15 @@ const routes = [
     // this generates a separate chunk (home.[hash].js) for this route
     // which is lazy-loaded when the route is visited.
     component: () => import(/* webpackChunkName: "home" */ '@/views/Home.vue')
-  }
-
+  },
+  {
+    path: '/error',
+    name: 'Error',
+    // route level code-splitting
+    // this generates a separate chunk (home.[hash].js) for this route
+    // which is lazy-loaded when the route is visited.
+    component: () => import(/* webpackChunkName: "home" */ '@/views/Error.vue')
+  },
 ]
 
 const router = new VueRouter({

+ 7 - 0
src/views/ComprehensiveDisplay.vue

@@ -215,6 +215,13 @@ export default {
       window.open(jumpUrl);
     },
     undefinedFunction(key) {
+      if (!this.$store.getters.getUserState) {
+        this.$message({
+          type: "warning",
+          message: "系统未登录,无法跳转!",
+        });
+        return;
+      }
       switch (key) {
         case 1:
           jumpModule("2", 22); // 跳转图层管理(数据管理)

+ 29 - 0
src/views/Error.vue

@@ -0,0 +1,29 @@
+<template>
+  <div>
+    <h1>发生错误!</h1>
+    <p class="text1">抱歉,您使用的用户无法访问的页面。</p>
+    <p class="text2">请联系系统管理员解决!</p>
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="less" scoped>
+div {
+  padding: 30px 30px;
+  box-sizing: border-box;
+}
+h1 {
+  font-size: 50px;
+}
+.text1 {
+  font-size: 20px;
+  margin-top: 20px;
+}
+.text2 {
+  font-size: 20px;
+  margin-top: 20px;
+}
+</style>

+ 19 - 18
src/views/Home.vue

@@ -123,7 +123,7 @@ export default {
       loginStatus: false,
       userInfo: null,
       requestCode: systemConfig.requestCode,
-      permissionUnlogin: [10, 20, 30, 31, 50, 60, 70, 71, 72, 73, 74, 75],
+      permissionUnlogin: [10, 30, 31, 70, 71, 72, 73, 74, 75],
       funcArr: null,
       showMenuIndex: "1",
       showIndex: "1",
@@ -165,6 +165,8 @@ export default {
     window.getMenu = this.getMenu;
     window.getIcon = this.getIcon;
     window.jumpModule = this.jumpModule;
+    this.$root.__proto__.$checkRequestCode = this.checkRequestCode;
+    this.$root.__proto__.$createLoading = this.createLoading;
 
     let that = this;
     if (this.$store.getters.getUserState) {
@@ -274,23 +276,12 @@ export default {
       let that = this;
       return new Promise((resolve, reject) => {
         if (result.code == 212) {
-          let obj = that.getParams();
-          let autologin1 = obj.autologin;
-          let autologin2 = localStorage.getItem("autologin");
-          if (
-            autologin1 == 1 ||
-            autologin2 != null ||
-            autologin2 != undefined
-          ) {
-            that.loginFunc();
-          } else {
-            that.$store.commit("setToken", "");
-            that.$store.commit("setUserState", false);
-          }
+          // 无效token 页面刷新,去除登录时存储的信息
+          that.logoutFunc();
         } else {
           let code = that.requestCode[result.code];
           if (code == 206 || code == 207 || code == 208) {
-            this.$router.push({
+            that.$router.push({
               path: "/error",
             });
           } else {
@@ -320,7 +311,7 @@ export default {
           if (result.code == 200) {
             that.$store.commit("setLayerList", result.content);
           } else {
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -341,7 +332,7 @@ export default {
             that.$store.commit("setIconList", result.content);
           } else {
             result.message = "标注图片获取失败,请重试!";
-            this.$checkRequestCode(result);
+            that.$checkRequestCode(result);
           }
         })
         .catch((err) => {
@@ -360,7 +351,17 @@ export default {
       // jumpModule("2",22) // 跳转图层管理(数据管理)
       // jumpModule("6",61) // 跳转数据发布(专题发布)
       // jumpModule("5",52) // 跳转GIS图层管理(数据可视化)
-     
+    },
+
+    // 创建loading
+    createLoading(text, options) {
+      return this.$loading({
+        customClass: "allPageLoading",
+        lock: true,
+        text: text,
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
     },
   },
   computed: {