|
|
|
@ -22,9 +22,9 @@
|
|
|
|
<el-select v-model="roleIds" multiple size="mini" placeholder="请选择 角色" @change="changeSelectRoles">
|
|
|
|
<el-select v-model="roleIds" multiple size="mini" placeholder="请选择 角色" @change="changeSelectRoles">
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in roleOptions"
|
|
|
|
v-for="item in roleOptions"
|
|
|
|
:key="item.roleId"
|
|
|
|
:key="item.id"
|
|
|
|
:label="item.roleName"
|
|
|
|
:label="item.roleName"
|
|
|
|
:value="`ROLE${item.roleId}`"
|
|
|
|
:value="`ROLE${item.id}`"
|
|
|
|
:disabled="item.status === 1">
|
|
|
|
:disabled="item.status === 1">
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
@ -120,7 +120,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { deptTreeSelect } from "@/api/system/user";
|
|
|
|
import { deptTreeSelect } from "@/api/dept";
|
|
|
|
// import { listRole } from "@/api/system/role";
|
|
|
|
// import { listRole } from "@/api/system/role";
|
|
|
|
import { adminList as listUser, } from "@/api/systemadmin";
|
|
|
|
import { adminList as listUser, } from "@/api/systemadmin";
|
|
|
|
import { getRoleList as listRole } from "@/api/role";
|
|
|
|
import { getRoleList as listRole } from "@/api/role";
|
|
|
|
@ -252,12 +252,11 @@ export default {
|
|
|
|
getDeptOptions() {
|
|
|
|
getDeptOptions() {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
if (!this.deptOptions || this.deptOptions.length <= 0) {
|
|
|
|
if (!this.deptOptions || this.deptOptions.length <= 0) {
|
|
|
|
// deptTreeSelect().then(response => {
|
|
|
|
deptTreeSelect().then(response => {
|
|
|
|
// this.deptTempOptions = response.data;
|
|
|
|
this.deptTempOptions = response;
|
|
|
|
// this.deptOptions = response.data;
|
|
|
|
this.deptOptions = response;
|
|
|
|
// resolve()
|
|
|
|
resolve()
|
|
|
|
// })
|
|
|
|
})
|
|
|
|
reject()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
reject()
|
|
|
|
reject()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -294,13 +293,13 @@ export default {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
getRoleOptions() {
|
|
|
|
getRoleOptions() {
|
|
|
|
if (!this.roleOptions || this.roleOptions.length <= 0) {
|
|
|
|
if (!this.roleOptions || this.roleOptions.length <= 0) {
|
|
|
|
listRole().then(response => this.roleOptions = response.rows);
|
|
|
|
listRole({}).then(response => this.roleOptions = response.list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 查询用户列表 */
|
|
|
|
/** 查询用户列表 */
|
|
|
|
getUserList() {
|
|
|
|
getUserList() {
|
|
|
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
|
listUser(this.addDateRange(this.queryParams, this.dateRange).params).then(response => {
|
|
|
|
this.userTableList = response.rows;
|
|
|
|
this.userTableList = response.list;
|
|
|
|
this.userTotal = response.total;
|
|
|
|
this.userTotal = response.total;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -359,7 +358,7 @@ export default {
|
|
|
|
if (val && val.length > 0) {
|
|
|
|
if (val && val.length > 0) {
|
|
|
|
userTaskForm.dataType = 'ROLES';
|
|
|
|
userTaskForm.dataType = 'ROLES';
|
|
|
|
groups = val.join() || null;
|
|
|
|
groups = val.join() || null;
|
|
|
|
let textArr = this.roleOptions.filter(k => val.indexOf(`ROLE${k.roleId}`) >= 0);
|
|
|
|
let textArr = this.roleOptions.filter(k => val.indexOf(`ROLE${k.id}`) >= 0);
|
|
|
|
text = textArr?.map(k => k.roleName).join() || null;
|
|
|
|
text = textArr?.map(k => k.roleName).join() || null;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
userTaskForm.dataType = null;
|
|
|
|
userTaskForm.dataType = null;
|
|
|
|
@ -426,7 +425,7 @@ export default {
|
|
|
|
this.getRoleOptions();
|
|
|
|
this.getRoleOptions();
|
|
|
|
if (this.roleIds && this.roleIds.length > 0) {
|
|
|
|
if (this.roleIds && this.roleIds.length > 0) {
|
|
|
|
userTaskForm.candidateGroups = this.roleIds.join() || null;
|
|
|
|
userTaskForm.candidateGroups = this.roleIds.join() || null;
|
|
|
|
let textArr = this.roleOptions.filter(k => this.roleIds.indexOf(`ROLE${k.roleId}`) >= 0);
|
|
|
|
let textArr = this.roleOptions.filter(k => this.roleIds.indexOf(`ROLE${k.id}`) >= 0);
|
|
|
|
userTaskForm.text = textArr?.map(k => k.roleName).join() || null;
|
|
|
|
userTaskForm.text = textArr?.map(k => k.roleName).join() || null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (val === 'DEPTS') {
|
|
|
|
} else if (val === 'DEPTS') {
|
|
|
|
|