库管员配置

This commit is contained in:
jjLv 2024-10-31 18:48:31 +08:00
parent 6ad52f4107
commit 9d7c389ca1
3 changed files with 15 additions and 12 deletions

View File

@ -12,7 +12,7 @@ export function getMatConfigList(query) {
//组织人员树类型管理列表 //组织人员树类型管理列表
export function getListByMatConfig(query) { export function getListByMatConfig(query) {
return request({ return request({
url: '/material/ma_type/list', url: '/material/ma_type/listNoPage',
method: 'get', method: 'get',
params: query, params: query,
}) })

View File

@ -509,9 +509,8 @@ export default {
methods: { methods: {
renderConent(h, { node }) { renderConent(h, { node }) {
let iconClass = ''; let iconClass = '';
console.log('node',node)
// node // node
if (node.level == 4) { if (node.data.level == 3) {
iconClass = 'el-icon-user-solid'; iconClass = 'el-icon-user-solid';
} }
// else if (node.type === 'file') { // else if (node.type === 'file') {

View File

@ -288,12 +288,11 @@ export default {
children: "children", children: "children",
label: "label", label: "label",
}, },
userList:[],
userIdTemp: -1, userIdTemp: -1,
typeIdTemp: -1, typeIdTemp: -1,
// //
queryParams: { queryParams: {
pageNum: 1,
pageSize: 10,
typeName: undefined, typeName: undefined,
level: 0, level: 0,
// phonenumber: undefined, // phonenumber: undefined,
@ -335,7 +334,7 @@ export default {
renderConent(h, { node }) { renderConent(h, { node }) {
let iconClass = ''; let iconClass = '';
// node // node
if (node.level == 4) { if (node.data.level == 3) {
iconClass = 'el-icon-user-solid'; iconClass = 'el-icon-user-solid';
} }
// else if (node.type === 'file') { // else if (node.type === 'file') {
@ -402,7 +401,7 @@ export default {
this.loading = true; this.loading = true;
getListByMatConfig(this.queryParams).then((response) => { getListByMatConfig(this.queryParams).then((response) => {
// this.total = response.total; // this.total = response.total;
this.typeList = this.handleTree(response.rows, "typeId"); this.typeList = this.handleTree(response.data, "typeId");
this.loading = false; this.loading = false;
}); });
}, },
@ -455,11 +454,17 @@ export default {
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.userList=[];
this.selectionRows = selection, this.selectionRows = selection,
this.ids = selection.map((item) =>item.typeId); this.ids = selection.map((item) =>item.typeId);
selection.forEach(item=>{
this.userList.push({'typeId':item.typeId,'userId':this.userIdTemp})
})
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
console.log('ids---------',this.ids)
}, },
handleSelect(selection, row) { handleSelect(selection, row) {
this.toggleSelection(selection, row); this.toggleSelection(selection, row);
@ -535,12 +540,11 @@ export default {
} else { } else {
const ids = this.ids.join(","); const ids = this.ids.join(",");
} }
bindKeeper({ console.log('userList',this.userList)
typeId: 3, bindKeeper(this.userList).then((response) => {
userId: this.userIdTemp,
}).then((response) => {
this.$modal.msgSuccess("绑定成功"); this.$modal.msgSuccess("绑定成功");
this.ids = null; this.ids = null;
this.userList = null;
this.getTreeData(); this.getTreeData();
this.getList(); this.getList();
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();