|
@@ -27,12 +27,23 @@
|
|
|
<dg-col :span="12">
|
|
|
<dg-card shadow="never" header="人员列表">
|
|
|
<!-- 角色搜索栏 -->
|
|
|
- <search-bar :conditionForm="userConditionForm" @submitSearch="receiveUserSearch"></search-bar>
|
|
|
+ <search-bar
|
|
|
+ :conditionForm="userConditionForm"
|
|
|
+ @submitSearch="receiveUserSearch"
|
|
|
+ @submitDefaultSearch="receiveUserDefaultCondition"
|
|
|
+ ></search-bar>
|
|
|
<!-- 角色操作栏 -->
|
|
|
<operate-bar :pageOptList="userOptList" @submitPageOpt="receviceOpt"></operate-bar>
|
|
|
<!-- 角色列表 -->
|
|
|
- <dg-table ref="userConditionTable" :data="persionListData" row-key="id" @selection-change="handleSelectChange">
|
|
|
+ <dg-table
|
|
|
+ ref="userConditionTable"
|
|
|
+ :data="persionListData"
|
|
|
+ :pagination="false"
|
|
|
+ row-key="id"
|
|
|
+ @selection-change="handleSelectChange"
|
|
|
+ >
|
|
|
<dg-table-column type="selection" width="50"></dg-table-column>
|
|
|
+ <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>
|
|
@@ -96,12 +107,35 @@ export default {
|
|
|
roleTableHeader: [
|
|
|
{ label: '角色名称', prop: 'name' },
|
|
|
{ label: '角色层级', prop: 'roleLevel', code: 'DM_ROLE_LEVEL' },
|
|
|
- { label: '应用系统名称', prop: '' },
|
|
|
+ { label: '应用系统名称', prop: 'appName' },
|
|
|
{ label: '警种', prop: 'policeCategory', code: 'T_MD_POLICE_TYPE' },
|
|
|
{ label: '业务域标签', prop: 'roleBusiness', code: 'DM_POLICE_BUSINESS' }
|
|
|
],
|
|
|
roleTableUrl: roleAuthApi.getRoleListByAppid,
|
|
|
- userConditionForm,
|
|
|
+ userConditionForm: [
|
|
|
+ {
|
|
|
+ label: '单位名称',
|
|
|
+ name: 'orgId',
|
|
|
+ op: '=',
|
|
|
+ value: '',
|
|
|
+ apiName: 'getTree',
|
|
|
+ nodeKey: 'id',
|
|
|
+ type: 'APP',
|
|
|
+ component: 'SelectOrgTree',
|
|
|
+ placeholder: '请选择单位名称',
|
|
|
+ defaultSelectRoot: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '姓名',
|
|
|
+ name: 'name',
|
|
|
+ op: 'like',
|
|
|
+ value: '',
|
|
|
+ component: 'ElInput',
|
|
|
+ attr: {
|
|
|
+ style: 'width: 130px'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
userOptList: ['保存'],
|
|
|
persionListData: [],
|
|
|
userCondition: {
|
|
@@ -132,7 +166,8 @@ export default {
|
|
|
delStaffJson: ''
|
|
|
},
|
|
|
page: 0,
|
|
|
- size: 10
|
|
|
+ size: 10,
|
|
|
+ total: 0
|
|
|
};
|
|
|
},
|
|
|
// 计算属性
|
|
@@ -153,6 +188,12 @@ export default {
|
|
|
this.saveRoleAuthParams.appOrgId = this.currentAppItem.appOrgId;
|
|
|
this.saveRoleAuthParams.appId = this.currentAppItem.id;
|
|
|
},
|
|
|
+ receiveUserDefaultCondition(val) {
|
|
|
+ for (const key in val) {
|
|
|
+ this.userCondition[key].value = val[key].value;
|
|
|
+ }
|
|
|
+ this.saveRoleAuthParams.orgId = this.userCondition.orgId.value;
|
|
|
+ },
|
|
|
receiveUserSearch(val) {
|
|
|
for (const key in val) {
|
|
|
this.userCondition[key].value = val[key].value;
|
|
@@ -160,9 +201,9 @@ export default {
|
|
|
this.saveRoleAuthParams.orgId = this.userCondition.orgId.value;
|
|
|
this.handleUserSearch();
|
|
|
},
|
|
|
-
|
|
|
- handleRoleRowClick({ id }) {
|
|
|
+ handleRoleRowClick({ id, appId }) {
|
|
|
this.saveRoleAuthParams.roleId = this.userCondition.roleId.value = id;
|
|
|
+ this.saveRoleAuthParams.appId = appId;
|
|
|
// 如果选择机构
|
|
|
if (this.saveRoleAuthParams.orgId) {
|
|
|
this.handleUserSearch(); // 人员列表查询
|
|
@@ -209,7 +250,9 @@ export default {
|
|
|
Promise.all([roleAuthApi.persionListByOrgRole(userParams), roleAuthApi.getChecked(queryCheckedParams)]).then(
|
|
|
(res) => {
|
|
|
// console.log(res);
|
|
|
- that.persionListData = res[0].data.content;
|
|
|
+ const { content, totalElements } = res[0].data;
|
|
|
+ that.persionListData = content;
|
|
|
+ that.total = totalElements;
|
|
|
that.persionListData.map((item) => {
|
|
|
that.$set(item, 'activeTime', '长期');
|
|
|
// item["activeTime"] = "长期"; //列表一开始写死
|