人事优化
This commit is contained in:
@@ -717,7 +717,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<!-- 新增时可编辑 编辑时不可编辑 -->
|
<!-- 新增时可编辑 编辑时不可编辑 -->
|
||||||
<el-form-item label="部门">
|
<el-form-item label="部门" prop="professionalStationRelation.deptCodeList">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
:disabled="!isAdd"
|
:disabled="!isAdd"
|
||||||
v-model="form.professionalStationRelation.deptCodeList"
|
v-model="form.professionalStationRelation.deptCodeList"
|
||||||
@@ -1672,6 +1672,19 @@
|
|||||||
],
|
],
|
||||||
entrySchoolDate: [
|
entrySchoolDate: [
|
||||||
{required: true, message: '请选进校时间', trigger: 'blur'},
|
{required: true, message: '请选进校时间', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
deptCodeList: [
|
||||||
|
{required: true, message: '请选择部门', trigger: 'change'},
|
||||||
|
{
|
||||||
|
validator: (rule: any, value: any, callback: any) => {
|
||||||
|
if (!value || !Array.isArray(value) || value.length === 0) {
|
||||||
|
callback(new Error('请选择部门'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
const rules = {
|
const rules = {
|
||||||
@@ -2072,7 +2085,14 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 两个子标签页都验证通过,执行保存
|
// 两个子标签页都验证通过,处理数据并执行保存
|
||||||
|
// 将 deptCodeList 数组的最后一项赋值给 form.baseInfo.deptCode
|
||||||
|
if (form.professionalStationRelation.deptCodeList &&
|
||||||
|
Array.isArray(form.professionalStationRelation.deptCodeList) &&
|
||||||
|
form.professionalStationRelation.deptCodeList.length > 0) {
|
||||||
|
form.baseInfo.deptCode = form.professionalStationRelation.deptCodeList[form.professionalStationRelation.deptCodeList.length - 1]
|
||||||
|
}
|
||||||
|
|
||||||
addInformation(form).then((response: any) => {
|
addInformation(form).then((response: any) => {
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
message.success('保存成功')
|
message.success('保存成功')
|
||||||
@@ -2332,6 +2352,10 @@
|
|||||||
proData.value = [];
|
proData.value = [];
|
||||||
workData.value = [];
|
workData.value = [];
|
||||||
dialogFromVisible.value = true;
|
dialogFromVisible.value = true;
|
||||||
|
// 清除表单验证提示
|
||||||
|
nextTick(() => {
|
||||||
|
baseForm.value?.clearValidate()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (row: any, index: any) => {
|
const handleEdit = (row: any, index: any) => {
|
||||||
@@ -2456,9 +2480,17 @@
|
|||||||
form.professionalStationRelation.deptCodeList[1] = dept.deptCode
|
form.professionalStationRelation.deptCodeList[1] = dept.deptCode
|
||||||
}
|
}
|
||||||
dialogFromVisible.value = true
|
dialogFromVisible.value = true
|
||||||
|
// 清除表单验证提示
|
||||||
|
nextTick(() => {
|
||||||
|
baseForm.value?.clearValidate()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
dialogFromVisible.value = true
|
dialogFromVisible.value = true
|
||||||
|
// 清除表单验证提示
|
||||||
|
nextTick(() => {
|
||||||
|
baseForm.value?.clearValidate()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,12 +56,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="岗位类别" prop="stationTypeId">
|
<el-form-item label="岗位级别" prop="stationTypeId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="search.stationTypeId"
|
v-model="search.stationTypeId"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择岗位类别"
|
placeholder="请选择岗位级别"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationLevelList"
|
v-for="item in stationLevelList"
|
||||||
@@ -241,7 +241,9 @@ const search = reactive({
|
|||||||
idCard: '',
|
idCard: '',
|
||||||
nf: '',
|
nf: '',
|
||||||
yf: '',
|
yf: '',
|
||||||
stationTypeId: ''
|
stationTypeId: '',
|
||||||
|
canSearch: 0,
|
||||||
|
selectList:[]
|
||||||
})
|
})
|
||||||
|
|
||||||
// 配置 useTable
|
// 配置 useTable
|
||||||
@@ -346,19 +348,14 @@ const delbatch = () => {
|
|||||||
|
|
||||||
// 设置可查询/不可查询
|
// 设置可查询/不可查询
|
||||||
const canSearch = (val: number) => {
|
const canSearch = (val: number) => {
|
||||||
if (selectList.value.length === 0) {
|
|
||||||
message.warning("请至少选择一名人员")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const params = {
|
|
||||||
canSearch: val,
|
search.canSearch=val
|
||||||
selectList: selectList.value
|
search.selectList=selectList.value
|
||||||
}
|
|
||||||
|
|
||||||
messageBox.confirm('确认设置?').then(async () => {
|
messageBox.confirm('确认设置?').then(async () => {
|
||||||
try {
|
try {
|
||||||
await setCanSearch(params)
|
await setCanSearch(search)
|
||||||
message.success("设置成功")
|
message.success("设置成功")
|
||||||
getDataList(false) // 设置后保持当前页
|
getDataList(false) // 设置后保持当前页
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
@@ -61,12 +61,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="岗位类别" prop="stationTypeId">
|
<el-form-item label="岗位级别" prop="stationTypeId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="search.stationTypeId"
|
v-model="search.stationTypeId"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择岗位类别"
|
placeholder="请选择岗位级别"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -264,7 +264,9 @@ const search = reactive({
|
|||||||
idCard: '',
|
idCard: '',
|
||||||
nf: '',
|
nf: '',
|
||||||
yf: '',
|
yf: '',
|
||||||
stationTypeId: ''
|
stationTypeId: '',
|
||||||
|
canSearch: 0,
|
||||||
|
selectList:[]
|
||||||
})
|
})
|
||||||
|
|
||||||
// 配置 useTable
|
// 配置 useTable
|
||||||
@@ -379,19 +381,18 @@ const delbatch = () => {
|
|||||||
|
|
||||||
// 设置可查询/不可查询
|
// 设置可查询/不可查询
|
||||||
const canSearch = (val: number) => {
|
const canSearch = (val: number) => {
|
||||||
if (selectList.value.length === 0) {
|
// if (selectList.value.length === 0) {
|
||||||
message.warning("请至少选择一名人员")
|
// message.warning("请至少选择一名人员")
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
search.canSearch=val
|
||||||
|
search.selectList=selectList.value
|
||||||
|
|
||||||
|
|
||||||
const params = {
|
|
||||||
canSearch: val,
|
|
||||||
selectList: selectList.value
|
|
||||||
}
|
|
||||||
|
|
||||||
messageBox.confirm('确认设置?').then(async () => {
|
messageBox.confirm('确认设置?').then(async () => {
|
||||||
try {
|
try {
|
||||||
await setCanSearch(params)
|
await setCanSearch(search)
|
||||||
message.success("设置成功")
|
message.success("设置成功")
|
||||||
getDataList(false) // 设置后保持当前页
|
getDataList(false) // 设置后保持当前页
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user