Browse Source

字典值字典名称修改

zxh 2 years ago
parent
commit
46b1df5cc7

+ 1 - 1
public/config.json

@@ -12,6 +12,6 @@
     "staging":{
         "name":"测试环境",
         "BASE_URL": "http://117.174.10.73:1115",
-        "ISERVER_BASE_URL": "http://192.168.87.128:8090/"
+        "ISERVER_BASE_URL": "http://117.174.10.73:8090/"
     }
 }

+ 9 - 0
src/api/base.js

@@ -499,3 +499,12 @@ export function getLogRoleTypes(params) {
   })
 }
 
+// 轮询校验token
+export function tokenAccess(data) {
+  return request({
+    url: '/base/tokenLog/tokenAccess',
+    method: 'post',
+    data
+  })
+}
+

+ 29 - 0
src/assets/style/customStyle.scss

@@ -0,0 +1,29 @@
+// 地址搜索弹窗气泡样式
+.markDiv {
+    min-width: 100px;
+    max-width: 440px;
+    padding: 10px 10px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
+    // text-align: center;
+    font-size: 12px;
+    color: #4c4c4c;
+    background-color: #fff;
+    position: relative;
+    top: -40px;
+    // font-weight: 600;
+    line-height: 1.5em;
+    h3 {
+        margin-bottom: 10px;
+    }
+    .corner {
+        border-style: solid;
+        border-width: 10px 10px 10px 10px;
+        border-color: #fff transparent transparent transparent;
+        width: 0px;
+        height: 0px;
+        position: absolute;
+        bottom: -20px;
+        left: 50%;
+        transform: translate(-50%, 0);
+    }
+}

+ 20 - 81
src/layout/components/Header/index.vue

@@ -24,73 +24,19 @@
 
       <div class="sysNav">
         <i class="el-icon-caret-left" @click="scrollPrev" />
-        <el-menu
-          ref="navScroll"
-          :default-active="defaultActiveIndex"
-          class="el-menu-demo"
-          mode="horizontal"
-          background-color="transparent"
-          text-color="#fff"
-          active-text-color="transparent"
-          :router="false"
-          active-text-background="#2D74E7"
-        >
-          <el-menu-item
-            v-for="item in menu"
-            :key="item.menuId"
-            :index="item.menuId"
-            @click="handleSys(item.menuId)"
-          >
+        <el-menu ref="navScroll" :default-active="defaultActiveIndex" class="el-menu-demo" mode="horizontal" background-color="transparent" text-color="#fff" active-text-color="transparent" :router="false" active-text-background="#2D74E7">
+          <el-menu-item v-for="item in menu" :key="item.menuId" :index="item.menuId" @click="handleSys(item.menuId)">
             <div>{{ item.menuName }}</div>
           </el-menu-item>
         </el-menu>
         <i class="el-icon-caret-right" @click="scrollNext" />
       </div>
 
-      <el-dialog
-        title="修改密码"
-        :visible.sync="passWord"
-        width="400px"
-        :append-to-body="true"
-        :modal-append-to-body="false"
-      >
+      <el-dialog title="修改密码" :visible.sync="passWord" width="400px" :append-to-body="true" :modal-append-to-body="false">
         <!-- <span>修改密码</span> -->
-        <input-item
-          type="password"
-          placeholder="请输入原始密码"
-          title="原密码:"
-          nominate="originalPassword"
-          custom-style="width: 320px;line-height:32px;"
-          :value="originalPassword"
-          :max-length="50"
-          :disabled="false"
-          :required="true"
-          @changeValue="onInput"
-        />
-        <input-item
-          type="password"
-          placeholder="请输入新密码"
-          title="新密码:"
-          nominate="newPassword"
-          custom-style="width: 320px;line-height:32px; margin: 20px 0"
-          :value="newPassword"
-          :max-length="50"
-          :disabled="false"
-          :required="true"
-          @changeValue="onInput"
-        />
-        <input-item
-          type="password"
-          placeholder="请确认密码"
-          title="确认密码:"
-          nominate="confirmPassword"
-          custom-style="width: 320px;line-height:32px;"
-          :value="confirmPassword"
-          :max-length="50"
-          :disabled="false"
-          :required="true"
-          @changeValue="onInput"
-        />
+        <input-item type="password" placeholder="请输入原始密码" title="原密码:" nominate="originalPassword" custom-style="width: 320px;line-height:32px;" :value="originalPassword" :max-length="50" :disabled="false" :required="true" @changeValue="onInput" />
+        <input-item type="password" placeholder="请输入新密码" title="新密码:" nominate="newPassword" custom-style="width: 320px;line-height:32px; margin: 20px 0" :value="newPassword" :max-length="50" :disabled="false" :required="true" @changeValue="onInput" />
+        <input-item type="password" placeholder="请确认密码" title="确认密码:" nominate="confirmPassword" custom-style="width: 320px;line-height:32px;" :value="confirmPassword" :max-length="50" :disabled="false" :required="true" @changeValue="onInput" />
         <span slot="footer" class="dialog-footer">
           <el-button @click="passWord = false">取 消</el-button>
           <el-button type="primary" @click="confirmModifyPassWord">确 定</el-button>
@@ -110,7 +56,7 @@
 
 <script>
 import { mapGetters } from 'vuex'
-import { changePassword } from '@/api/base'
+import { changePassword, tokenAccess } from '@/api/base'
 import InputItem from '@/components/FormItem/Input'
 import { verification } from '@/utils/index'
 import { geteSessionStorage, Cookyget } from '@/utils/auth'
@@ -141,7 +87,7 @@ export default {
       navOffset: 0,
       menu: [],
       fullscreen: false,
-      interval: null,
+      timer: null,
       secend: 1
     }
   },
@@ -175,34 +121,27 @@ export default {
     })
 
     this.checkOverdue()
-    this.initDocumentMousemove()
+    // this.initDocumentMousemove()
   },
   destroyed() {
-    if (this.interval) clearInterval(this.interval)
+    window.clearInterval(this.timer)
   },
   methods: {
-    initDocumentMousemove() {
-      document.addEventListener('mousemove', () => {
-        this.secend = 0
-        this.checkOverdue()
-      })
-    },
+    // initDocumentMousemove() {
+    //   document.addEventListener('mousemove', () => {
+    //     this.secend = 0
+    //     this.checkOverdue()
+    //   })
+    // },
     /**
      * 检查10分钟无操作过期
      */
     checkOverdue() {
-      if (this.interval) clearInterval(this.interval)
+      if (this.timer) window.clearInterval(this.timer)
       // 10分钟无操作验证机制
-      this.interval = setInterval(() => {
-        if (this.secend == 600) {
-          clearInterval(this.interval)
-          this.$store.dispatch('user/resetToken').then(() => {
-            location.reload()
-          })
-        } else {
-          this.secend += 1
-        }
-      }, 1000)
+      this.timer = window.setInterval(() => {
+        tokenAccess({})
+      }, 600000)
     },
 
     // 打开或关闭左侧菜单

+ 2 - 0
src/main.js

@@ -8,6 +8,8 @@ import '../theme/index.css'
 import './directives.js'
 import '@/styles/index.scss'
 
+import '@/assets/style/customStyle.scss'
+
 import App from './App'
 import store from './store'
 import router from './router'

File diff suppressed because it is too large
+ 754 - 783
src/router/router.config.js


+ 79 - 64
src/views/MapView/mapViewTools/mapQuery.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="map-control">
-    <el-autocomplete ref="autocomplete" class="inline-input input-with-select" v-model="inputInfo" :fetch-suggestions="querySearch"
-                     :placeholder="placeholder" :trigger-on-focus="false" @select="handleSelect" clearable @clear="clearInput"
-                     :popper-append-to-body="false" :popper-class="suggestionClass">
+    <el-autocomplete ref="autocomplete" class="inline-input input-with-select" v-model="inputInfo" :fetch-suggestions="querySearch" :placeholder="placeholder" :trigger-on-focus="false" @select="handleSelect" clearable @clear="clearInput" :popper-append-to-body="false" :popper-class="suggestionClass">
       <el-select v-model="selectType" slot="prepend" class="select-type" @change="changeSelect">
         <el-option label="地名搜索" value="address"></el-option>
         <el-option label="坐标定位" value="coord"></el-option>
@@ -17,16 +15,20 @@
 
 <script>
 import { Feature, Overlay } from 'ol'
-import { Vector as VectorSource } from 'ol/source';
-import { Vector as VectorLayer } from 'ol/layer';
-import Point from 'ol/geom/Point';
-import { Style, Stroke, Icon } from 'ol/style';
-import { GeoJSON } from 'ol/format';
-import { Select } from "ol/interaction";
-import Intersects from 'ol/format/filter/Intersects';
-import { mapConfig } from '../map.config';
-import * as olExtent from 'ol/extent';
-import { SuperMap, TileSuperMapRest, FeatureService } from '@supermap/iclient-ol';
+import { Vector as VectorSource } from 'ol/source'
+import { Vector as VectorLayer } from 'ol/layer'
+import Point from 'ol/geom/Point'
+import { Style, Stroke, Icon } from 'ol/style'
+import { GeoJSON } from 'ol/format'
+import { Select } from 'ol/interaction'
+import Intersects from 'ol/format/filter/Intersects'
+import { mapConfig } from '../map.config'
+import * as olExtent from 'ol/extent'
+import {
+  SuperMap,
+  TileSuperMapRest,
+  FeatureService
+} from '@supermap/iclient-ol'
 export default {
   props: ['map'],
   data() {
@@ -41,17 +43,16 @@ export default {
       markDiv: null, // 提示弹窗
       txtSpan: null, // 提示文字
       suggestionClass: ''
-    };
+    }
   },
   methods: {
-
     /**
      * @description 选择查询的类型
      */
     changeSelect(val) {
       switch (val) {
         case 'address':
-          this.placeholder = '请输入地名';
+          this.placeholder = '请输入地名'
           this.suggestionClass = ''
           break
         case 'coord':
@@ -61,11 +62,10 @@ export default {
       }
     },
     querySearch(queryString, cb) {
-      this.sqlQueryu(queryString);
+      this.sqlQueryu(queryString)
       setTimeout(() => {
         cb(this.featuresRes.features)
-      }, 500);
-
+      }, 500)
     },
     /**
      *@description 点击提示事件
@@ -85,7 +85,7 @@ export default {
           center: option.geometry.coordinates,
           duration: 600
         })
-      }, 200);
+      }, 200)
     },
     /**
      *@description 清除显示图层
@@ -94,7 +94,7 @@ export default {
       if (this.vecLayer) {
         this.vecLayer.getSource().clear()
         this.map.removeLayer(this.vecLayer)
-        this.map.removeOverlay(this.map.getOverlayById("markOverlay")) // 移除提示框
+        this.map.removeOverlay(this.map.getOverlayById('markOverlay')) // 移除提示框
       }
     },
     /**
@@ -110,23 +110,26 @@ export default {
       if (this.selectType == 'address') {
         this.clearLayer()
         // 显示模糊匹配的所有结果
-        this.showResult(new GeoJSON().readFeatures(JSON.stringify(this.featuresRes)))
-        this.map.getView().fit(this.vecLayer.getSource().getExtent(), this.map.getSize(), { duration: 1000 })
-      }
-      else if (this.selectType == 'coord') {
-        let coordInfo = this.checkCoord(this.inputInfo);
+        this.showResult(
+          new GeoJSON().readFeatures(JSON.stringify(this.featuresRes))
+        )
+        this.map
+          .getView()
+          .fit(this.vecLayer.getSource().getExtent(), this.map.getSize(), {
+            duration: 1000
+          })
+      } else if (this.selectType == 'coord') {
+        let coordInfo = this.checkCoord(this.inputInfo)
         if (coordInfo[0] == true) {
           let _feature = new Feature({
             //几何信息
             geometry: new Point(coordInfo[1]),
             NAME: '坐标:' + this.inputInfo
-          });
+          })
           this.showResult([_feature])
-          let view = this.map.getView();
-          view.setZoom(16);
-          view.setCenter(
-            olExtent.getCenter(_feature.getGeometry().getExtent())
-          );
+          let view = this.map.getView()
+          view.setZoom(16)
+          view.setCenter(olExtent.getCenter(_feature.getGeometry().getExtent()))
         }
       }
     },
@@ -140,8 +143,10 @@ export default {
       let datasetNames = []
       // 指定查询的数据集
       mapConfig.iServerUrl.basicGISDataServer.dataSet.forEach(item => {
-        datasetNames.push(mapConfig.iServerUrl.basicGISDataServer.dataSource + ":" + item)
-      });
+        datasetNames.push(
+          mapConfig.iServerUrl.basicGISDataServer.dataSource + ':' + item
+        )
+      })
       //指定SQL查询服务参数
       let sqlParam = new SuperMap.GetFeaturesBySQLParameters({
         queryParameter: {
@@ -149,14 +154,14 @@ export default {
           attributeFilter: "name like '%" + str + "%'"
         },
         datasetNames: datasetNames
-      });
+      })
       //向服务器发送请求,并对返回的结果进行处理
       new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
         //获取返回的features数据
-        let features = serviceResult.result.features;
+        let features = serviceResult.result.features
         // console.log("查询结果::::", features)
         this.featuresRes = features
-      });
+      })
     },
     /**
      * 设置点图标样式
@@ -179,22 +184,26 @@ export default {
      */
     showMark(coordinates, txt) {
       if (this.markDiv == null) {
-        this.markDiv = document.createElement('div');
-        this.markDiv.style = "min-width:100px;max-width:140px;padding:10px 10px;box-shadow:0 2px 12px 0 rgba(0,0,0,0.3);text-align:center;font-size:12px;color:#4c4c4c;background-color:#fff;position:relative;top:-40px;font-weight:600;line-height:1.5em;"
-        this.txtSpan = document.createElement('span');
+        this.markDiv = document.createElement('div')
+        this.markDiv.className = 'markDiv'
+        this.txtSpan = document.createElement('span')
         this.markDiv.appendChild(this.txtSpan)
         let corner = document.createElement('div')
-        corner.style = "border-style: solid;border-width: 10px 10px 10px 10px;border-color: #fff transparent transparent transparent;width: 0px;height: 0px;position: absolute; bottom: -20px;left: 50%;transform: translate(-50%, 0);"
+        corner.className = 'corner'
         this.markDiv.appendChild(corner)
       }
-      this.txtSpan.innerHTML = txt
+      this.txtSpan.innerHTML = `
+        <h3>${txt}</h3>
+        <p>地址:四川省绵阳市涪城区涪城路14号</p>
+        <p>电话:(0816)2224469</p>
+      `
       let overlay = new Overlay({
         element: this.markDiv,
         autoPan: false,
-        positioning: "bottom-center",
+        positioning: 'bottom-center',
         id: 'markOverlay',
         stopEvent: false
-      });
+      })
       this.map.addOverlay(overlay)
       overlay.setPosition(coordinates)
     },
@@ -206,7 +215,9 @@ export default {
       if (this.vecLayer == null) {
         this.vecLayer = new VectorLayer({
           source: new VectorSource(),
-          style: this.setPointStyle(require('../../../../public/images/kxc/gkdm.png'))
+          style: this.setPointStyle(
+            require('../../../../public/images/kxc/gkdm.png')
+          )
         })
       }
       this.vecLayer.getSource().addFeatures(featuresArray)
@@ -218,14 +229,19 @@ export default {
       if (this.select == null) {
         this.select = new Select({
           layers: [this.vecLayer],
-          style: this.setPointStyle(require('../../../../public/images/kxc/gkdm2.png'))
+          style: this.setPointStyle(
+            require('../../../../public/images/kxc/gkdm2.png')
+          )
         })
         this.map.addInteraction(this.select)
       }
       // 要素选择事件
       this.select.on('select', feature => {
         if (feature.selected.length > 0) {
-          this.showMark(feature.selected[0].getGeometry().getCoordinates(), feature.selected[0].get('NAME'))
+          this.showMark(
+            feature.selected[0].getGeometry().getCoordinates(),
+            feature.selected[0].get('NAME')
+          )
           // 地图动画,,,异步
           setTimeout(() => {
             this.map.getView().setZoom(15)
@@ -233,10 +249,9 @@ export default {
               center: feature.selected[0].getGeometry().getCoordinates(),
               duration: 600
             })
-          }, 200);
-        }
-        else {
-          this.map.removeOverlay(this.map.getOverlayById("markOverlay"))
+          }, 200)
+        } else {
+          this.map.removeOverlay(this.map.getOverlayById('markOverlay'))
         }
       })
     },
@@ -245,12 +260,12 @@ export default {
      * @description 输入的经纬度判断是否合法
      */
     checkCoord(lonlat) {
-      let flag;
+      let flag
       // let lonScope = [97.3661, 108.5329]; // 四川经度范围
       // let latScope = [26.0661, 34.3203]; // 四川纬度范围
-      let lonScope = [-180, 180]; // 经度范围
-      let latScope = [-90, 90]; // 纬度范围
-      let strRes = lonlat.split(',');
+      let lonScope = [-180, 180] // 经度范围
+      let latScope = [-90, 90] // 纬度范围
+      let strRes = lonlat.split(',')
       if (strRes.length == 2) {
         if (
           parseFloat(strRes[0]) >= lonScope[0] &&
@@ -260,32 +275,32 @@ export default {
             parseFloat(strRes[1]) >= latScope[0] &&
             parseFloat(strRes[1]) <= latScope[1]
           ) {
-            flag = true;
+            flag = true
           } else {
             this.$message({
               message: '纬度范围为-90-90!',
               type: 'warning'
-            });
-            flag = false;
+            })
+            flag = false
           }
         } else {
           this.$message({
             message: '经度范围为-180-180!',
             type: 'warning'
-          });
-          flag = false;
+          })
+          flag = false
         }
       } else {
         this.$message({
           message: '经纬度坐标格式错误!',
           type: 'warning'
-        });
-        flag = false;
+        })
+        flag = false
       }
-      return [flag, [parseFloat(strRes[0]), parseFloat(strRes[1])]];
+      return [flag, [parseFloat(strRes[0]), parseFloat(strRes[1])]]
     }
   }
-};
+}
 </script>
 
 <style lang="scss" scoped>

+ 12 - 10
src/views/currentSystem/authorityManagement/dictManagement/index.vue

@@ -63,7 +63,7 @@
                   <span>{{scope.$index+1}}</span>
                 </template>
               </el-table-column>
-              <el-table-column prop="key" label="字典编码" show-overflow-tooltip align="center"></el-table-column>
+              <el-table-column prop="codeKey" label="字典编码" show-overflow-tooltip align="center"></el-table-column>
               <el-table-column prop="codeRemark" label="字典名称" show-overflow-tooltip align="center"></el-table-column>
               <!-- <el-table-column prop="createUser" label="创建人" show-overflow-tooltip align="center"></el-table-column>
               <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip align="center"></el-table-column>  
@@ -97,9 +97,9 @@
       <el-form ref="formData" :model="formData" :rules="rules" label-width="120px" label-position="right" class="demo-form-inline">
         <el-row class="row-form-height">
           <el-col :span="12">
-            <el-form-item label="字典编码:" prop="key">
+            <el-form-item label="字典编码:" prop="codeKey">
               <!-- onkeyup="this.value=this.value.replace(/[^a-zA-Z]/g,'')" -->
-              <el-input type="text" v-model="formData.key" :readonly="readonly"></el-input>
+              <el-input type="text" v-model="formData.codeKey" :readonly="readonly"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -163,7 +163,7 @@ export default {
       dialogTitle: "新增字典",
       dialogVisible: false,
       formData: {
-        key: '',
+        codeKey: '',
         ulevel: 1,
         creater: '',
         createTime: '',
@@ -176,7 +176,7 @@ export default {
       multipleSelection: [],
       user: null,
       rules: {
-        key: [
+        codeKey: [
           { required: true, message: '请输入字典编号', trigger: 'blur' },
           { pattern: '^[a-zA-Z\$_][a-zA-Z0-9_$]*$', message: '字典编号不合法' }
         ],
@@ -204,7 +204,7 @@ export default {
     */
     queryDictTypeList() {
       let param = Object.assign({ ulevel: 1 }, this.pagination);
-      if (this.dictCode != '') param['key'] = this.dictCode;
+      if (this.dictCode != '') param['codeKey'] = this.dictCode;
       if (this.dictName != '') param['codeRemark'] = this.dictName;
       getKeyPage(param).then(res => {
         if (res.code == 1) {
@@ -214,9 +214,10 @@ export default {
             this.$nextTick(() => {
               this.$refs.multipleTable.setCurrentRow(this.tableData[0], true)
               this.dicType = {
-                key: this.tableData[0].key,
+                codeKey: this.tableData[0].codeKey,
                 codeRemark: this.tableData[0].codeRemark,
               };
+              console.log('dictType',this,dicType);
             })
           }
         } else {
@@ -330,13 +331,13 @@ export default {
     handleAdded() {
       this.dialogTitle = "新增字典";
       this.dialogVisible = true;
-      // this.formData.key = '';
+      // this.formData.codeKey = '';
       this.formData.createTime = this.getTime();
       this.formData.creater = this.user.hasOwnProperty('username') ? this.user.username : "";
       this.formData.discription = '';
        this.formData.ulevel=1
       // this.formData={
-      //   key:'',
+      //   codeKey:'',
       //   createTime:this.getTime(),
       //   creater:this.user.hasOwnProperty('username') ? this.user.username : "",
       //   discription:""
@@ -348,9 +349,10 @@ export default {
     */
     rowClick(row, column, event) {
       this.dicType = {
-        key: row.key,
+        codeKey: row.codeKey,
         codeRemark: row.codeRemark,
       };
+      console.log('this.dicType',this.dicType );
     },
 
     getTime() {

+ 12 - 11
src/views/currentSystem/authorityManagement/dictManagement/widgets/dicValue.vue

@@ -50,7 +50,7 @@
         <el-row class="row-form-height">
           <el-col :span="12">
             <el-form-item label="字典类型编码:">
-              <el-input v-model="formData.key" placeholder="" :disabled="true" />
+              <el-input v-model="formData.codeKey" placeholder="" :disabled="true" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -125,7 +125,7 @@ export default {
       currentOp: 'add',
       dialogVisible: false,
       formData: {
-        key: '',
+        codeKey: '',
         codeRemark: '',
         ulevel: 2,
         codeValue: '0',
@@ -151,9 +151,9 @@ export default {
      * 监测字典类型改变
     */
     dicType(newValue, oldValue) {
-      this.formData.key = newValue.key;
+      this.formData.codeKey = newValue.codeKey;
       this.formData.codeRemark = newValue.codeRemark;
-      this.getValueListByKeys(newValue.key);
+      this.getValueListByKeys(newValue.codeKey);
     },
   },
   computed: {},
@@ -172,6 +172,7 @@ export default {
      * 根据字典key值查询value
     */
     getValueListByKeys(dictName) {
+      console.log('底朝天Name:::',dictName);
       let param = null;
       if (dictName != '') {
         param = {
@@ -180,8 +181,8 @@ export default {
       }
       getDicValueByKeys(param).then(res => {
         if (res.code == 1) {
-          if (res.result.hasOwnProperty(this.dicType.key)) {
-            this.tableData = res.result[this.dicType.key];
+          if (res.result.hasOwnProperty(this.dicType.codeKey)) {
+            this.tableData = res.result[this.dicType.codeKey];
           } else {
             this.tableData = [];
           }
@@ -195,7 +196,7 @@ export default {
      * 提交数据
     */
     submitForm() {
-      if (!this.formData.key) {
+      if (!this.formData.codeKey) {
         return null;
       }
       this.$refs.formData.validate((valid) => {
@@ -203,7 +204,7 @@ export default {
           if (this.dialogTitle == "新增字典值") {
             addDictionary(this.formData).then(res => {
               if (res.code == 1) {
-                this.getValueListByKeys(this.dicType.key);
+                this.getValueListByKeys(this.dicType.codeKey);
                 this.dialogVisible = false;
               } else {
                 this.$message({
@@ -217,7 +218,7 @@ export default {
           if (this.dialogTitle == "编辑字典值") {
             editDictionary(this.formData).then(res => {
               if (res.code == 1) {
-                this.getValueListByKeys(this.dicType.key);
+                this.getValueListByKeys(this.dicType.codeKey);
                 this.dialogVisible = false;
               } else {
                 this.$message({
@@ -260,7 +261,7 @@ export default {
       }).then(() => {
         deleteDictionary(id).then(res => {
           if (res.code == 1) {
-            this.getValueListByKeys(this.dicType.key);
+            this.getValueListByKeys(this.dicType.codeKey);
             this.$message({
               type: 'success',
               message: '删除成功!'
@@ -292,7 +293,7 @@ export default {
 
     handleAdded() {
       this.formData = {
-        key: this.dicType.key,
+        codeKey: this.dicType.codeKey,
         codeRemark: this.dicType.codeRemark,
         creater: 'admin',
         ulevel: 2,

+ 27 - 15
src/views/kxcSystem/mapPrint/widget.vue

@@ -19,9 +19,9 @@
         <el-form-item label="标题">
           <el-input v-model="mapPrintPraram.title" size="small" placeholder="输入地图标题"></el-input>
         </el-form-item>
-        <el-form-item label="副标题">
+        <!-- <el-form-item label="副标题">
           <el-input v-model="mapPrintPraram.subTitle" size="small" placeholder="输入地图副标题"></el-input>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="版权信息">
           <el-input v-model="mapPrintPraram.copyrightInfo" size="small" placeholder="输入版权信息"></el-input>
         </el-form-item>
@@ -214,12 +214,24 @@ export default {
         return
       }
 
+      let securityClass = ''
+      let serviceLevel = this.$store.state.permission.sysDics.serviceLevel
+      // 获取选择的图层的最高密级
+      let selectLevel = this.selectLayers.map(item => {
+        return item.securityClass
+      })
+      let maxLevel = Math.max(...selectLevel)
+      let printLevel = serviceLevel.find(item => {
+        return item.code == maxLevel.toString()
+      }) // 打印密级
+      securityClass = printLevel ? printLevel.value + '★' : ''
+
       this.printStatus = true // 执行状态
       let params = new SuperMap.WebPrintingJobParameters({
         layoutOptions: {
           templateName: this.mapPrintPraram.template,
-          title: this.mapPrintPraram.title,
-          subTitle: this.mapPrintPraram.subTitle,
+          title: `${securityClass}长期  ${this.mapPrintPraram.title}`,
+          subTitle: this.mapPrintPraram.subTitle, //this.mapPrintPraram.subTitle,
           author: this.mapPrintPraram.author,
           copyright: this.mapPrintPraram.copyrightInfo,
           northArrowOptions: {
@@ -269,17 +281,17 @@ export default {
 
       //校验参数
       this.filterEmptyData(params)
-      let securityClass = ''
-      let serviceLevel = this.$store.state.permission.sysDics.serviceLevel
-      // 获取选择的图层的最高密级
-      let selectLevel = this.selectLayers.map(item => {
-        return item.securityClass
-      })
-      let maxLevel = Math.max(...selectLevel)
-      let printLevel = serviceLevel.find(item => {
-        return item.code == maxLevel.toString()
-      }) // 打印密级
-      securityClass = printLevel ? printLevel.value + '★' : ''
+      // let securityClass = ''
+      // let serviceLevel = this.$store.state.permission.sysDics.serviceLevel
+      // // 获取选择的图层的最高密级
+      // let selectLevel = this.selectLayers.map(item => {
+      //   return item.securityClass
+      // })
+      // let maxLevel = Math.max(...selectLevel)
+      // let printLevel = serviceLevel.find(item => {
+      //   return item.code == maxLevel.toString()
+      // }) // 打印密级
+      // securityClass = printLevel ? printLevel.value + '★' : ''
       this.webPrintingJobService.createWebPrintingJob(params, e => {
         if (e.result && e.result[0] && e.result[0].path) {
           this.webPrintingJobService.getPrintingJob(