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