林倩 3 anni fa
parent
commit
916b62a243

+ 5 - 2
src/components/search-bar/index.vue

@@ -76,6 +76,7 @@
 <script>
 import selectOrgTree from '@/components/select-org-tree';
 import selectApp from '@/components/select-app';
+import _ from 'lodash';
 export default {
   props: {
     conditionForm: {
@@ -120,7 +121,8 @@ export default {
     },
     handleReset() {
       const vm = this;
-      this.form.forEach((item) => {
+      let form = _.cloneDeep(this.form);
+      form.forEach((item) => {
         if (item.component) {
           item.value = '';
           if (item.component == 'SelectOrgTree') {
@@ -130,6 +132,7 @@ export default {
           }
         }
       });
+      this.form = form;
     },
     // 获取机构树选中值
     getOrgTreeValue(val, key = 'id') {
@@ -138,7 +141,7 @@ export default {
     },
     getOrgRootValue(val, key) {
       this.getOrgTreeValue(val, key);
-       this.$emit('submitDefaultSearch', this.setCondition());
+      this.$emit('submitDefaultSearch', this.setCondition());
     },
     // 获取应用系统选中值
     getAppValue(val, name) {

+ 10 - 7
src/pages/appfun-auth-manage/role-auth-manage/persionView.vue

@@ -105,10 +105,11 @@ export default {
           state: [{ label: '长期有效', value: null }]
         }
       ],
-      roleConditon: {
+      roleCondition: {
         appName: '',
         roleName: '',
-        userId: ''
+        userId: '',
+        orgId: ''
       },
       tableData: [],
       selections: [],
@@ -137,12 +138,13 @@ export default {
     },
     // 人员列表行点击
     handleRowClick(row) {
-      this.roleConditon.userId = row.id;
+      this.roleCondition.userId = row.id;
+      this.roleCondition.orgId = row.orgId;
       this.handleSearchRoleList();
     },
     receiveRoleSearch(val) {
       for (const key in val) {
-        this.roleConditon[key] = val[key].value;
+        this.roleCondition[key] = val[key].value;
       }
       this.handleSearchRoleList();
     },
@@ -151,11 +153,11 @@ export default {
     },
     handleSearchRoleList() {
       const that = this;
-      const { roleConditon } = that;
+      const { roleCondition } = that;
       this.tableData = [];
       this.selections = [];
       this.deleteIds = [];
-      roleAuthInfoApi.getStaffRoleList(roleConditon).then((res) => {
+      roleAuthInfoApi.getStaffRoleList(roleCondition).then((res) => {
         that.tableData = res;
         that.$nextTick(() => {
           res.forEach((row) => {
@@ -197,7 +199,8 @@ export default {
       const queryParams = {
         saveIds: this.selections,
         deleteIds: this.deleteIds,
-        userId: this.roleConditon.userId
+        userId: this.roleCondition.userId,
+        orgId: this.roleCondition.orgId
       };
       roleAuthInfoApi
         .saveRoleStaff(queryParams)

+ 4 - 1
src/pages/appfun-auth-manage/role-auth-manage/roleView.vue

@@ -49,7 +49,9 @@
           <!-- <dg-table-column type="index" label="序号" width="70"></dg-table-column> -->
           <dg-table-column prop="name" align="center" width="120" label="姓名"></dg-table-column>
           <dg-table-column prop="idcard" align="center" label="身份证号码"></dg-table-column>
-          <dg-table-column prop="orgName" align="center" label="单位名称"></dg-table-column>
+          <!-- <dg-table-column prop="orgName" align="center" label="单位名称"></dg-table-column> -->
+          <dg-table-column prop="userType" align="center" label="用户类型" enum='UserTypeEnum'></dg-table-column>
+
           <dg-table-column prop="policeCategory" align="center" code="T_MD_POLICE_TYPE" label="警种"></dg-table-column>
           <dg-table-column prop="policeBusiness" align="center" label="业务域标签"></dg-table-column>
           <dg-table-column label="权限有效期" width="120" align="center">
@@ -216,6 +218,7 @@ export default {
     async handleRoleRowClick({ id, appId }) {
       this.saveRoleAuthParams.roleId = this.userCondition.roleId.value = id;
       this.saveRoleAuthParams.appId = appId;
+      this.$refs.userTable.clearAll();
       await this.getUserChecked();
       this.loadUserTable();
     },

+ 7 - 7
src/pages/auth-object-manage/object-prop-manage/add-dialog.vue

@@ -20,6 +20,7 @@
         :tableUrl="tableUrl"
         :condition="condition"
         v-if="type !== 'service'"
+        lazyLoad
       >
       </new-table>
     </dg-row>
@@ -88,15 +89,14 @@ export default {
       });
     }
   },
-  created() {
-  },
+  created() {},
   mounted() {
-     getRelateIds(this.otherParams).then((res) => {
-       this.$nextTick(() => {
-         this.$refs.table.newChooseArr = res.data.content;
-       })
+    getRelateIds(this.otherParams).then((res) => {
+      this.$nextTick(() => {
+        this.$refs.table.newChooseArr = res.data.content;
+        this.$refs.table.handleSearch();
+      });
     });
-
   }
 };
 </script>

+ 11 - 11
src/pages/auth-object-manage/service-resource-manage/DataConfig.js

@@ -13,17 +13,17 @@ const conditionForm = [
       placeholder: '请输入服务资源名称'
     }
   },
-  {
-    label: '服务提供方式',
-    name: 'serviceProvideWay',
-    op: '=',
-    value: '',
-    component: 'DgSelect',
-    attr: {
-      placeholder: '请选择服务提供方式',
-      enum: 'ServiceProvideWayEnum'
-    }
-  },
+  // {
+  //   label: '服务提供方式',
+  //   name: 'serviceProvideWay',
+  //   op: '=',
+  //   value: '',
+  //   component: 'DgSelect',
+  //   attr: {
+  //     placeholder: '请选择服务提供方式',
+  //     enum: 'ServiceProvideWayEnum'
+  //   }
+  // },
   {
     label: '服务提供应用系统名称',
     name: 'appName',

+ 0 - 1
src/pages/auth-subject-manage/DataConfig.js

@@ -65,7 +65,6 @@ const UserTableData = [
   // },
   {
     label: '单位名称',
-    custom: true,
     prop: 'orgName'
   },
   {

+ 2 - 2
src/pages/auth-subject-manage/user-prop-manage/index.vue

@@ -14,10 +14,10 @@
     <!-- 表格 -->
     <new-table ref="table" :tableUrl="tableUrl" :tableHeader="UserTableData" :condition="condition">
       <!-- 单位名称 -->
-      <template #orgName="{ row }">
+      <!-- <template #orgName="{ row }">
         <span v-if="row.userType + '' === '30'"></span>
         <span v-else>{{ row.orgName }}</span>
-      </template>
+      </template> -->
       <!-- 人员类型 -->
       <template #manType="slotProps">
         <!-- 辅警 20 -->

+ 2 - 2
src/pages/statistics-manage/auth-behavior-statistic/index.vue

@@ -69,8 +69,8 @@ export default {
   computed: {},
   methods: {},
   created() {
-    const startTime = this.$moment().subtract('1', 'year').format('YYYYMMDDHHmmss');
-    const endTime = this.$moment().format('YYYYMMDDHHmmss');
+    const startTime = this.$moment().subtract('1', 'year').format('YYYYMMDD') + '000000';
+    const endTime = this.$moment().format('YYYYMMDD') + '235959';
     this.conditionForm[0].value = [startTime, endTime];
   },
   mounted() {

+ 2 - 2
src/router/index.js

@@ -101,13 +101,13 @@ export const asyncRouterMap = [
   {
     path: '/service-auth-manage',
     component: Layout,
-    meta: { title: '服务授权管理', icon: 'icon-fwsqgl', noCache: true, permission: ['QXGL_SQGL_SJSQGL_RYSQ'] },
+    meta: { title: '服务授权管理', icon: 'icon-fwsqgl', noCache: true, permission: ['QXGL_SQGL_FWSQGL'] },
     children: [
       {
         path: 'init',
         component: () => import('@/pages/service-auth-manage'),
         name: 'service-auth-manage',
-        meta: { title: '服务授权管理', noCache: true, permission: ['QXGL_SQGL_SJSQGL_RYSQ'] }
+        meta: { title: '服务授权管理', noCache: true, permission: ['QXGL_SQGL_FWSQGL'] }
       }
     ]
   },

+ 112 - 112
src/utils/regular.js

@@ -1,4 +1,4 @@
-import _ from "lodash";
+import _ from 'lodash';
 
 // 手机
 export const phone = /^((13[0-9])|(14[0-9])|(15[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$/;
@@ -35,76 +35,76 @@ export const checkEmail = val => email.test(val);
 export const checkIDCard = val => IDCard.test(val);
 // 校验15或18位
 export function checkIDCard2(val) {
-    const city = {
-        11: "北京",
-        12: "天津",
-        13: "河北",
-        14: "山西",
-        15: "内蒙古",
-        21: "辽宁",
-        22: "吉林",
-        23: "黑龙江 ",
-        31: "上海",
-        32: "江苏",
-        33: "浙江",
-        34: "安徽",
-        35: "福建",
-        36: "江西",
-        37: "山东",
-        41: "河南",
-        42: "湖北 ",
-        43: "湖南",
-        44: "广东",
-        45: "广西",
-        46: "海南",
-        50: "重庆",
-        51: "四川",
-        52: "贵州",
-        53: "云南",
-        54: "西藏 ",
-        61: "陕西",
-        62: "甘肃",
-        63: "青海",
-        64: "宁夏",
-        65: "新疆",
-        71: "台湾",
-        81: "香港",
-        82: "澳门",
-        91: "国外 "
-    };
-    let pass = true;
-
-    if (!val || !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(val)) {
-        //身份证号格式错误
+  const city = {
+    11: '北京',
+    12: '天津',
+    13: '河北',
+    14: '山西',
+    15: '内蒙古',
+    21: '辽宁',
+    22: '吉林',
+    23: '黑龙江 ',
+    31: '上海',
+    32: '江苏',
+    33: '浙江',
+    34: '安徽',
+    35: '福建',
+    36: '江西',
+    37: '山东',
+    41: '河南',
+    42: '湖北 ',
+    43: '湖南',
+    44: '广东',
+    45: '广西',
+    46: '海南',
+    50: '重庆',
+    51: '四川',
+    52: '贵州',
+    53: '云南',
+    54: '西藏 ',
+    61: '陕西',
+    62: '甘肃',
+    63: '青海',
+    64: '宁夏',
+    65: '新疆',
+    71: '台湾',
+    81: '香港',
+    82: '澳门',
+    91: '国外 '
+  };
+  let pass = true;
+
+  if (!val || !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(val)) {
+    //身份证号格式错误
+    pass = false;
+  } else if (!city[val.substr(0, 2)]) {
+    //地址编码错误
+    pass = false;
+  } else {
+    //18位身份证需要验证最后一位校验位
+    if (val.length == 18) {
+      // idcard = val.split('');
+      //∑(ai×Wi)(mod 11)
+      //加权因子
+      const factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+      //校验位
+      const parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
+      let sum = 0;
+      let ai = 0;
+      let wi = 0;
+      for (let i = 0; i < 17; i++) {
+        ai = val[i];
+        wi = factor[i];
+        sum += ai * wi;
+      }
+      let last = parity[sum % 11];
+      if (parity[sum % 11] != val[17]) {
+        //校验位错误
         pass = false;
-    } else if (!city[val.substr(0, 2)]) {
-        //地址编码错误
-        pass = false;
-    } else {
-        //18位身份证需要验证最后一位校验位
-        if (val.length == 18) {
-            // idcard = val.split('');
-            //∑(ai×Wi)(mod 11)
-            //加权因子
-            const factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
-            //校验位
-            const parity = [1, 0, "X", 9, 8, 7, 6, 5, 4, 3, 2];
-            let sum = 0;
-            let ai = 0;
-            let wi = 0;
-            for (let i = 0; i < 17; i++) {
-                ai = val[i];
-                wi = factor[i];
-                sum += ai * wi;
-            }
-            let last = parity[sum % 11];
-            if (parity[sum % 11] != val[17]) {
-                //校验位错误
-                pass = false;
-            }
-        }
+      }
     }
-    return pass;
+  }
+  return pass;
 }
 // qq号
 export const checkQq = val => qq.test(val);
@@ -126,17 +126,17 @@ export const checkChinese = val => chineseReq.test(val);
 
 // 身份证中获取出生日期
 export const getBirthdayFromIdCard = idCard => {
-    if (_.isEmpty(idCard) || !checkIDCard(idCard)) {
-        return;
-    }
-    let birthday = "";
-    if (idCard.length === 15) {
-        birthday = "19" + idCard.slice(6, 12);
-    } else if (idCard.length === 18) {
-        birthday = idCard.slice(6, 14);
-    }
-    birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
-    return birthday;
+  if (_.isEmpty(idCard) || !checkIDCard(idCard)) {
+    return;
+  }
+  let birthday = '';
+  if (idCard.length === 15) {
+    birthday = '19' + idCard.slice(6, 12);
+  } else if (idCard.length === 18) {
+    birthday = idCard.slice(6, 14);
+  }
+  birthday = birthday.replace(/(.{4})(.{2})/, '$1-$2-');
+  return birthday;
 };
 
 /**
@@ -146,11 +146,11 @@ export const getBirthdayFromIdCard = idCard => {
  * @returns {any} 默认返回数字 1: 男、0: 女
  */
 export const getSexFromIdCard = (idCard, dd) => {
-    if (_.isEmpty(idCard) || !checkIDCard(idCard)) {
-        return;
-    }
-    const val = parseInt(idCard.splice(-2, -1)) % 2;
-    return dd ? dd[val] : val;
+  if (_.isEmpty(idCard) || !checkIDCard(idCard)) {
+    return;
+  }
+  const val = parseInt(idCard.splice(-2, -1)) % 2;
+  return dd ? dd[val] : val;
 };
 
 /**
@@ -160,37 +160,37 @@ export const getSexFromIdCard = (idCard, dd) => {
  * idCard.validate
  */
 export class SplitIdCard {
-    static Reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+  static Reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
 
-    constructor(idCard) {
-        this.idCard = idCard;
-    }
+  constructor(idCard) {
+    this.idCard = idCard;
+  }
 
-    get validate() {
-        const { idCard } = this;
-        return idCard && SplitIdCard.Reg.test(idCard);
-    }
+  get validate() {
+    const { idCard } = this;
+    return idCard && SplitIdCard.Reg.test(idCard);
+  }
 
-    get sex() {
-        const { validate, idCard } = this;
-        if (!validate) {
-            return "";
-        }
-        return parseInt(idCard.slice(-2, -1)) % 2;
+  get sex() {
+    const { validate, idCard } = this;
+    if (!validate) {
+      return '';
     }
+    return parseInt(idCard.slice(-2, -1)) % 2;
+  }
 
-    get birthday() {
-        const { validate, idCard } = this;
-        if (!validate) {
-            return "";
-        }
-        let birthday = "";
-        if (idCard.length === 15) {
-            birthday = "19" + idCard.slice(6, 12);
-        } else if (idCard.length === 18) {
-            birthday = idCard.slice(6, 14);
-        }
-        birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
-        return birthday;
+  get birthday() {
+    const { validate, idCard } = this;
+    if (!validate) {
+      return '';
+    }
+    let birthday = '';
+    if (idCard.length === 15) {
+      birthday = '19' + idCard.slice(6, 12);
+    } else if (idCard.length === 18) {
+      birthday = idCard.slice(6, 14);
     }
+    birthday = birthday.replace(/(.{4})(.{2})/, '$1-$2-');
+    return birthday;
+  }
 }