From 42efdf6ceff21573049f161c1089bfce4d2d80db Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 27 Oct 2021 20:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/student-tree/src/tree-node.vue | 2 +- src/pages/project/add/index.vue | 4 +++ src/pages/student/list/index.vue | 35 ++++++++++++++----- src/pages/system/list/staff.vue | 8 ++--- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/components/student-tree/src/tree-node.vue b/src/components/student-tree/src/tree-node.vue index 3c922db..4b816b2 100644 --- a/src/components/student-tree/src/tree-node.vue +++ b/src/components/student-tree/src/tree-node.vue @@ -35,7 +35,7 @@ > { e.sort = i + 1; }); + this.$nextTick(() => { + this.$refs.main.scrollTop = 0; + }); }).catch(err => { console.log(err); }); diff --git a/src/pages/student/list/index.vue b/src/pages/student/list/index.vue index 47b5913..f20f15f 100644 --- a/src/pages/student/list/index.vue +++ b/src/pages/student/list/index.vue @@ -179,7 +179,13 @@ -
+ + +
@@ -198,13 +205,14 @@ 自定义 + icon="el-icon-circle-plus-outline" + @click="() => handleAdd(node, data)">
- +

提示:需创建班级后才可以勾选

@@ -364,6 +372,8 @@ export default { emailRepeat: false, showTree: true, // 是否显示所在班级树 defaultCheckedKeys: [], + filterText: "", // 通过关键字过滤树节点 + importVisible: false, uploadList: [], @@ -389,6 +399,9 @@ export default { } }, 500); + }, + filterText(val) { + this.$refs.classTree.filter(val); } }, methods: { @@ -688,9 +701,9 @@ export default { if (this.form.account) { let url = ""; if (this.isAdd) { - url = `${this.api.checkWorkNumOrAccount}?account=${this.form.account}&workNumber=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&account=${this.form.account}&workNumber=`; } else { - url = `${this.api.checkWorkNumOrAccount}?accountId=${this.form.accountId}&account=${this.form.account}&workNumber=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&accountId=${this.form.accountId}&account=${this.form.account}&workNumber=`; } this.$post(url).then(res => { if (res.status === 200) { @@ -705,9 +718,9 @@ export default { if (this.form.workNumber) { let url = ""; if (this.isAdd) { - url = `${this.api.checkWorkNumOrAccount}?workNumber=${this.form.workNumber}&account=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&workNumber=${this.form.workNumber}&account=`; } else { - url = `${this.api.checkWorkNumOrAccount}?accountId=${this.form.accountId}&workNumber=${this.form.workNumber}&account=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&accountId=${this.form.accountId}&workNumber=${this.form.workNumber}&account=`; } this.$post(url).then(res => { if (res.status === 200) { @@ -754,6 +767,10 @@ export default { }); } }, + filterNode(value, data) { + if (!value) return true; + return data.organizationName.indexOf(value) !== -1; + }, loadClassTree(node, resolve) { // 懒加载所在班级树结构 let level = 1; let parentId = ""; @@ -785,10 +802,12 @@ export default { if (this.form.classId) { this.defaultCheckedKeys = this.form.classId.split(",").map(i => Number(i)); } + i.showCheckbox = true; } else { i.leaf = false; + i.showCheckbox = false; } - // console.log(JSON.stringify(i)); + console.log(JSON.stringify(i)); result.push(i); }); return resolve(result); diff --git a/src/pages/system/list/staff.vue b/src/pages/system/list/staff.vue index d6353d0..4d02751 100644 --- a/src/pages/system/list/staff.vue +++ b/src/pages/system/list/staff.vue @@ -353,9 +353,9 @@ export default { if (this.teacherForm.account) { let url = ""; if (this.isAdd) { - url = `${this.api.checkWorkNumOrAccount}?account=${this.teacherForm.account}&workNumber=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&account=${this.teacherForm.account}&workNumber=`; } else { - url = `${this.api.checkWorkNumOrAccount}?accountId=${this.teacherForm.accountId}&account=${this.teacherForm.account}&workNumber=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&accountId=${this.teacherForm.accountId}&account=${this.teacherForm.account}&workNumber=`; } this.$post(url).then(res => { if (res.status === 200) { @@ -370,9 +370,9 @@ export default { if (this.teacherForm.workNumber) { let url = ""; if (this.isAdd) { - url = `${this.api.checkWorkNumOrAccount}?workNumber=${this.teacherForm.workNumber}&account=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&workNumber=${this.teacherForm.workNumber}&account=`; } else { - url = `${this.api.checkWorkNumOrAccount}?accountId=${this.teacherForm.accountId}&workNumber=${this.teacherForm.workNumber}&account=`; + url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=${Setting.platformType}&accountId=${this.teacherForm.accountId}&workNumber=${this.teacherForm.workNumber}&account=`; } this.$post(url).then(res => { if (res.status === 200) {