|
@@ -230,13 +230,13 @@
|
|
|
placeholder="选择日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="通讯地址"
|
|
|
+ <el-form-item label="通讯地址"
|
|
|
prop="contactAddress"
|
|
|
:label-width="formLabelWidth">
|
|
|
<el-input v-model.trim="form.contactAddress"
|
|
|
autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="邮政编码"
|
|
|
+ <el-form-item label="邮政编码"
|
|
|
prop="postalCode"
|
|
|
:label-width="formLabelWidth">
|
|
|
<el-input v-model.trim="form.postalCode"
|
|
@@ -250,12 +250,48 @@
|
|
|
type="primary">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="教务交接"
|
|
|
+ width="400px"
|
|
|
+ destroy-on-close
|
|
|
+ close-on-click-modal
|
|
|
+ :visible.sync="educationViseble">
|
|
|
+ <el-form :model="educationForm"
|
|
|
+ :inline="true"
|
|
|
+ ref="educationForm">
|
|
|
+ <el-form-item label="教务老师"
|
|
|
+ :rules="[{
|
|
|
+ required:
|
|
|
+ true,
|
|
|
+ message: '请选择教务老师'
|
|
|
+ ,
|
|
|
+ trigger: 'blur'
|
|
|
+ }]">
|
|
|
+ <el-select v-model.trim="
|
|
|
+ educationForm.targetUserId"
|
|
|
+ clearable
|
|
|
+ filterable>
|
|
|
+ <el-option v-for="item in educationList"
|
|
|
+ :key="item.userId"
|
|
|
+ :label="item.userName"
|
|
|
+ :value="item.userId"></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer"
|
|
|
+ class="dialog-footer">
|
|
|
+ <el-button @click="educationViseble = false">取 消</el-button>
|
|
|
+ <el-button @click="submitEducation"
|
|
|
+ type="primary">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from '@/components/Pagination/index'
|
|
|
-import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate } from '@/api/systemManage'
|
|
|
+import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate, hasCourseGroupRelation } from '@/api/systemManage'
|
|
|
import { branchQueryPage } from '@/api/specialSetting'
|
|
|
+import { findEducationUsers } from '@/api/buildTeam'
|
|
|
import store from '@/store'
|
|
|
import { isvalidPhone } from '@/utils/validate'
|
|
|
let validPhone = (rule, value, callback) => {
|
|
@@ -273,6 +309,12 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
tableList: [],
|
|
|
+ educationList: [],
|
|
|
+ educationForm: {
|
|
|
+ targetUserId: ''
|
|
|
+ },
|
|
|
+ educationViseble: false,
|
|
|
+ activeRow: null,
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -297,13 +339,13 @@ export default {
|
|
|
organIdLists: [],
|
|
|
jobNature: null,
|
|
|
entryDate: null,
|
|
|
- contactAddress:null,
|
|
|
- postalCode:null
|
|
|
+ contactAddress: null,
|
|
|
+ postalCode: null
|
|
|
},
|
|
|
rules: {
|
|
|
realName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
|
|
gender: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
|
|
- phone: [{ type: 'number', required: true, validator: validPhone, trigger: 'blur' },{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号',trigger: 'blur' }],
|
|
|
+ phone: [{ type: 'number', required: true, validator: validPhone, trigger: 'blur' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
|
|
|
roleIds: [{ type: 'array', required: true, message: '请选择分类', trigger: 'change' }],
|
|
|
organIdLists: [{ type: 'array', required: true, message: '请选择所属部门', trigger: 'change' }],
|
|
|
jobNature: [{ required: true, message: '请选择工作类型', trigger: 'change' }],
|
|
@@ -319,14 +361,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
+
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
this.getList()
|
|
|
this.getRoleList()
|
|
|
-
|
|
|
-
|
|
|
+ this.getEducationUsers()
|
|
|
},
|
|
|
methods: {
|
|
|
+ submitEducation () {
|
|
|
+ console.log('来了')
|
|
|
+ },
|
|
|
+ getEducationUsers () {
|
|
|
+ findEducationUsers().then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.educationList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
onBranchCheckAll () {
|
|
|
this.form.organIdLists = []
|
|
|
+
|
|
|
this.branchList.forEach(item => {
|
|
|
this.form.organIdLists.push(item.value)
|
|
|
})
|
|
@@ -383,6 +438,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getRoleList () { // 获取角色
|
|
|
+ this.roleList = []
|
|
|
+ this.branchList = []
|
|
|
getUserRole({ delFlag: 0, rows: 9999 }).then(res => {
|
|
|
let result = res.data
|
|
|
if (res.code == 200 && result && result.rows.length > 0) {
|
|
@@ -423,8 +480,8 @@ export default {
|
|
|
organIdLists: data.organIdList ? data.organIdList : [],
|
|
|
jobNature: data.jobNature,
|
|
|
entryDate: data.entryDate,
|
|
|
- contactAddress:data.contactAddress,
|
|
|
- postalCode:data.postalCode
|
|
|
+ contactAddress: data.contactAddress,
|
|
|
+ postalCode: data.postalCode
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -448,7 +505,22 @@ export default {
|
|
|
return reuslt[row.lockFlag]
|
|
|
}
|
|
|
},
|
|
|
- onStaffOperation (type, data) {
|
|
|
+ async onStaffOperation (type, data) {
|
|
|
+ if (type === 'DEMISSION' && !data.demissionDate) {
|
|
|
+ this.activeRow = data;
|
|
|
+ // 1.点击的是离职按钮
|
|
|
+ // 2.判断该考级是否存在教务老师
|
|
|
+ await hasCourseGroupRelation({ employeeId: data.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (res.deta === 0) {
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.educationViseble = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
employeeOperate({
|
|
|
employeeId: data.id,
|
|
|
operate: type
|
|
@@ -462,6 +534,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ educationViseble (val) {
|
|
|
+ if (!val) {
|
|
|
+ this.educationForm.targetUserId = ''
|
|
|
+ this.$refs['educationForm'].resetFields()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|