From 9d7c389ca14e7d39ce5d365822bf89dba3855ff4 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Thu, 31 Oct 2024 18:48:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E7=AE=A1=E5=91=98=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ma/typeConfigKeeper.js | 2 +- src/views/material/basic/bmUnit/people.vue | 3 +-- .../material/ma/typeConfigKeeper/index.vue | 22 +++++++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/api/ma/typeConfigKeeper.js b/src/api/ma/typeConfigKeeper.js index c1c1175d..9c40e821 100644 --- a/src/api/ma/typeConfigKeeper.js +++ b/src/api/ma/typeConfigKeeper.js @@ -12,7 +12,7 @@ export function getMatConfigList(query) { //组织人员树类型管理列表 export function getListByMatConfig(query) { return request({ - url: '/material/ma_type/list', + url: '/material/ma_type/listNoPage', method: 'get', params: query, }) diff --git a/src/views/material/basic/bmUnit/people.vue b/src/views/material/basic/bmUnit/people.vue index 694fca07..61185e99 100644 --- a/src/views/material/basic/bmUnit/people.vue +++ b/src/views/material/basic/bmUnit/people.vue @@ -509,9 +509,8 @@ export default { methods: { renderConent(h, { node }) { let iconClass = ''; - console.log('node',node) // 根据 node 的类型判断图标 - if (node.level == 4) { + if (node.data.level == 3) { iconClass = 'el-icon-user-solid'; } // else if (node.type === 'file') { diff --git a/src/views/material/ma/typeConfigKeeper/index.vue b/src/views/material/ma/typeConfigKeeper/index.vue index 556c9f7f..01d2823d 100644 --- a/src/views/material/ma/typeConfigKeeper/index.vue +++ b/src/views/material/ma/typeConfigKeeper/index.vue @@ -288,12 +288,11 @@ export default { children: "children", label: "label", }, + userList:[], userIdTemp: -1, typeIdTemp: -1, // 查询参数 queryParams: { - pageNum: 1, - pageSize: 10, typeName: undefined, level: 0, // phonenumber: undefined, @@ -335,7 +334,7 @@ export default { renderConent(h, { node }) { let iconClass = ''; // 根据 node 的类型判断图标 - if (node.level == 4) { + if (node.data.level == 3) { iconClass = 'el-icon-user-solid'; } // else if (node.type === 'file') { @@ -402,7 +401,7 @@ export default { this.loading = true; getListByMatConfig(this.queryParams).then((response) => { // this.total = response.total; - this.typeList = this.handleTree(response.rows, "typeId"); + this.typeList = this.handleTree(response.data, "typeId"); this.loading = false; }); }, @@ -455,11 +454,17 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { + this.userList=[]; this.selectionRows = selection, 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.multiple = !selection.length; - console.log('ids---------',this.ids) + }, handleSelect(selection, row) { this.toggleSelection(selection, row); @@ -535,12 +540,11 @@ export default { } else { const ids = this.ids.join(","); } - bindKeeper({ - typeId: 3, - userId: this.userIdTemp, - }).then((response) => { + console.log('userList',this.userList) + bindKeeper(this.userList).then((response) => { this.$modal.msgSuccess("绑定成功"); this.ids = null; + this.userList = null; this.getTreeData(); this.getList(); this.$refs.multipleTable.clearSelection();