dev_2022-05-11
yujialong 3 years ago
parent 6821b9d69a
commit 42efdf6cef
  1. 2
      src/components/student-tree/src/tree-node.vue
  2. 4
      src/pages/project/add/index.vue
  3. 35
      src/pages/student/list/index.vue
  4. 8
      src/pages/system/list/staff.vue

@ -35,7 +35,7 @@
>
</span>
<el-checkbox
v-if="showCheckbox"
v-if="showCheckbox && node.data.showCheckbox"
v-model="node.checked"
:indeterminate="node.indeterminate"
:disabled="!!node.disabled"

@ -279,6 +279,7 @@ export default {
this.projectJudgmentData = projectJudgmentData;
}
this.rowDrop();
this.$refs.main.scrollTop = 0;
},
beforeDestroy() {
if (!this.isToPoint) {
@ -314,6 +315,9 @@ export default {
this.projectJudgmentData.forEach((e, i) => {
e.sort = i + 1;
});
this.$nextTick(() => {
this.$refs.main.scrollTop = 0;
});
}).catch(err => {
console.log(err);
});

@ -179,7 +179,13 @@
</el-col>
<el-col :span="10">
<el-form-item prop="classId" label="所在班级">
<div style="height: 400px; max-height: 400px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 10px 10px 10px 0px; overflow: auto">
<el-input
placeholder="输入关键字进行过滤"
v-model="filterText"
style="margin-bottom: 10px"
>
</el-input>
<div style="height: 300px; max-height: 300px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 10px 10px 10px 0px; overflow: auto">
<student-tree
v-if="showTree"
ref="classTree"
@ -190,6 +196,7 @@
:load="loadClassTree"
:default-expand-all="!isAdd"
:default-checked-keys="defaultCheckedKeys"
:filter-node-method="filterNode"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
@ -198,13 +205,14 @@
<el-button
v-if="auth('学生组织架构添加')&&node.level < 3"
type="text"
@click="() => handleAdd(node, data)">自定义
icon="el-icon-circle-plus-outline"
@click="() => handleAdd(node, data)">
</el-button>
</span>
</span>
</student-tree>
</div>
<p style="color: #C0C4CC;">提示需创建班级后才可以勾选</p>
</el-form-item>
</el-col>
</el-row>
@ -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);

@ -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) {

Loading…
Cancel
Save