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> </span>
<el-checkbox <el-checkbox
v-if="showCheckbox" v-if="showCheckbox && node.data.showCheckbox"
v-model="node.checked" v-model="node.checked"
:indeterminate="node.indeterminate" :indeterminate="node.indeterminate"
:disabled="!!node.disabled" :disabled="!!node.disabled"

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

@ -179,7 +179,13 @@
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item prop="classId" label="所在班级"> <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 <student-tree
v-if="showTree" v-if="showTree"
ref="classTree" ref="classTree"
@ -190,6 +196,7 @@
:load="loadClassTree" :load="loadClassTree"
:default-expand-all="!isAdd" :default-expand-all="!isAdd"
:default-checked-keys="defaultCheckedKeys" :default-checked-keys="defaultCheckedKeys"
:filter-node-method="filterNode"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}" :props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
@ -198,13 +205,14 @@
<el-button <el-button
v-if="auth('学生组织架构添加')&&node.level < 3" v-if="auth('学生组织架构添加')&&node.level < 3"
type="text" type="text"
@click="() => handleAdd(node, data)">自定义 icon="el-icon-circle-plus-outline"
@click="() => handleAdd(node, data)">
</el-button> </el-button>
</span> </span>
</span> </span>
</student-tree> </student-tree>
</div> </div>
<p style="color: #C0C4CC;">提示需创建班级后才可以勾选</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -364,6 +372,8 @@ export default {
emailRepeat: false, emailRepeat: false,
showTree: true, // showTree: true, //
defaultCheckedKeys: [], defaultCheckedKeys: [],
filterText: "", //
importVisible: false, importVisible: false,
uploadList: [], uploadList: [],
@ -389,6 +399,9 @@ export default {
} }
}, 500); }, 500);
},
filterText(val) {
this.$refs.classTree.filter(val);
} }
}, },
methods: { methods: {
@ -688,9 +701,9 @@ export default {
if (this.form.account) { if (this.form.account) {
let url = ""; let url = "";
if (this.isAdd) { 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 { } 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 => { this.$post(url).then(res => {
if (res.status === 200) { if (res.status === 200) {
@ -705,9 +718,9 @@ export default {
if (this.form.workNumber) { if (this.form.workNumber) {
let url = ""; let url = "";
if (this.isAdd) { 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 { } 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 => { this.$post(url).then(res => {
if (res.status === 200) { 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) { // loadClassTree(node, resolve) { //
let level = 1; let level = 1;
let parentId = ""; let parentId = "";
@ -785,10 +802,12 @@ export default {
if (this.form.classId) { if (this.form.classId) {
this.defaultCheckedKeys = this.form.classId.split(",").map(i => Number(i)); this.defaultCheckedKeys = this.form.classId.split(",").map(i => Number(i));
} }
i.showCheckbox = true;
} else { } else {
i.leaf = false; i.leaf = false;
i.showCheckbox = false;
} }
// console.log(JSON.stringify(i)); console.log(JSON.stringify(i));
result.push(i); result.push(i);
}); });
return resolve(result); return resolve(result);

@ -353,9 +353,9 @@ export default {
if (this.teacherForm.account) { if (this.teacherForm.account) {
let url = ""; let url = "";
if (this.isAdd) { 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 { } 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 => { this.$post(url).then(res => {
if (res.status === 200) { if (res.status === 200) {
@ -370,9 +370,9 @@ export default {
if (this.teacherForm.workNumber) { if (this.teacherForm.workNumber) {
let url = ""; let url = "";
if (this.isAdd) { 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 { } 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 => { this.$post(url).then(res => {
if (res.status === 200) { if (res.status === 200) {

Loading…
Cancel
Save