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