fix: 角色字段对齐,部门树接口

main
wx-jincw 3 weeks ago
parent ffe793facc
commit d1c381bdd2

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询部门树
export function deptTreeSelect() {
return request({
url: '/autogencode/sysdept/tree',
method: 'get'
})
}

@ -1,5 +0,0 @@
function deptTreeSelect() {
}

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

@ -207,7 +207,7 @@
import { detailProcess } from '@/api/workflow/process'
import Parser from '@/utils/generator/parser'
import { complete, delegate, transfer, rejectTask, returnList, returnTask } from '@/api/workflow/task'
import { selectUser, deptTreeSelect } from '@/api/system/user'
import { deptTreeSelect } from '@/api/dept'
import { adminList } from "@/api/systemadmin";
import ProcessViewer from '@/components/ProcessViewer'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -331,9 +331,9 @@ export default {
},
/** 查询部门下拉树结构 */
getTreeSelect() {
// deptTreeSelect().then(response => {
// this.deptOptions = response.data;
// });
deptTreeSelect().then(response => {
this.deptOptions = response;
});
},
/** 查询用户列表 */
getList() {

Loading…
Cancel
Save