|
|
@ -68,15 +68,18 @@ |
|
|
|
<el-form-item prop="workNumber" label="工号"> |
|
|
|
<el-form-item prop="workNumber" label="工号"> |
|
|
|
<el-input v-model.trim="teacherForm.workNumber" placeholder="请输入职工工号"></el-input> |
|
|
|
<el-input v-model.trim="teacherForm.workNumber" placeholder="请输入职工工号"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<template v-for="item in teacherForm.roleAndDeptList"> |
|
|
|
<el-form-item v-for="item in teacherForm.roleAndDeptList" :label="`${item.roleName}所属部门`" :rules="{ |
|
|
|
<el-form-item :label="`${item.roleName}所属部门`"> |
|
|
|
required: true, message: '请选择', trigger: 'change' |
|
|
|
|
|
|
|
}"> |
|
|
|
<el-cascader |
|
|
|
<el-cascader |
|
|
|
v-model="item.cascaderValue" |
|
|
|
v-model="item.cascaderValue" |
|
|
|
:options="majorList" |
|
|
|
:options="majorList" |
|
|
|
style="width: 100%" |
|
|
|
style="width: 100%" |
|
|
|
></el-cascader> |
|
|
|
></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
<!-- <template v-for="item in teacherForm.roleAndDeptList">--> |
|
|
|
|
|
|
|
<!-- --> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item prop="phone" label="手机号"> |
|
|
|
<el-form-item prop="phone" label="手机号"> |
|
|
|
<el-input v-model.trim="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @blur="phoneChange"></el-input> |
|
|
|
<el-input v-model.trim="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @blur="phoneChange"></el-input> |
|
|
@ -471,10 +474,15 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
roleRemove(value) { // 处理移除角色 |
|
|
|
roleRemove(value) { // 处理移除角色 |
|
|
|
let index = this.teacherForm.roleAndDeptList.findIndex(i => i.roleName === value); |
|
|
|
let list = []; |
|
|
|
if (index !== -1) { |
|
|
|
for(var i=0;i<this.teacherForm.roleAndDeptList.length;i++){ |
|
|
|
this.teacherForm.roleAndDeptList.splice(index, 1); |
|
|
|
if (this.teacherForm.roleAndDeptList[i].roleId == value){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
list.push(this.teacherForm.roleAndDeptList[i]) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.teacherForm.roleAndDeptList = list |
|
|
|
}, |
|
|
|
}, |
|
|
|
async saveSure(teacherForm) { |
|
|
|
async saveSure(teacherForm) { |
|
|
|
this.$refs[teacherForm].validate((valid) => { |
|
|
|
this.$refs[teacherForm].validate((valid) => { |
|
|
|