...
|
...
|
@@ -243,7 +243,16 @@ export default { |
|
|
|
|
|
const {proxy} = Vue.getCurrentInstance();
|
|
|
let imageUrl = Vue.ref('');
|
|
|
|
|
|
const familyInfoTableData=Vue.ref([]);
|
|
|
// 家庭成员信息弹框显示标识
|
|
|
let familyDiaShow = Vue.ref(false);
|
|
|
//家庭成员信息弹框标题
|
|
|
let familyDiaTitle = Vue.ref('');
|
|
|
const workInfoTableData=Vue.ref([]);
|
|
|
// 简历信息弹框显示标识
|
|
|
let workDiaShow = Vue.ref(false);
|
|
|
//简历信息弹框标题
|
|
|
let workDiaTitle = Vue.ref('');
|
|
|
|
|
|
let ruleForm = Vue.ref({
|
|
|
nickname: '',
|
...
|
...
|
@@ -260,7 +269,32 @@ export default { |
|
|
quitTime: '',
|
|
|
state: '',
|
|
|
idcard:'',
|
|
|
politicsStatus:''
|
|
|
politicsStatus:'',
|
|
|
hasProof:'', //是否有无犯罪证明 joke add 20221012
|
|
|
nativePlace:'', //籍贯 joke add 20221012
|
|
|
birthday:'', //出生日期 joke add 20221012
|
|
|
partyDate:'', //入党日期 joke add 20221012
|
|
|
responsibility:'' //岗位职责 joke add 20221012
|
|
|
})
|
|
|
|
|
|
let familyInfoForm = Vue.ref({
|
|
|
id:'',
|
|
|
personId:props.parentNode.id, //用户id
|
|
|
name: '', //家庭成员姓名
|
|
|
appellation: '', //家庭成员称谓
|
|
|
place: '', //家庭成员工作单位
|
|
|
position: '', //家庭成员职位
|
|
|
})
|
|
|
|
|
|
let familyInfoFormRef = Vue.ref('');
|
|
|
|
|
|
let workInfoForm = Vue.ref({
|
|
|
id:'',
|
|
|
personId:props.parentNode.id, //用户id
|
|
|
place: '', //工作单位
|
|
|
position: '', //职位
|
|
|
startDate: '', //入职日期
|
|
|
endDate: '', //离职日期
|
|
|
})
|
|
|
|
|
|
|
...
|
...
|
@@ -273,6 +307,8 @@ export default { |
|
|
}, function (res) {
|
|
|
if (res && res.object) {
|
|
|
ruleForm.value = res.object
|
|
|
proxy.familyInfoTableData = res.object.familyInfoList;
|
|
|
proxy.workInfoTableData = res.object.workExperienceList;
|
|
|
} else {
|
|
|
ruleForm.value = res.object
|
|
|
}
|
...
|
...
|
@@ -282,6 +318,74 @@ export default { |
|
|
imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}`
|
|
|
}
|
|
|
|
|
|
//点击家庭成员信息的新增按钮事件
|
|
|
let showDiaByType = (flg,type) =>{
|
|
|
if (type === 'family'){
|
|
|
//展示新增或编辑页面
|
|
|
familyDiaShow.value = flg;
|
|
|
if (flg === false){
|
|
|
familyInfoForm.value = {
|
|
|
id:'',
|
|
|
personId:props.parentNode.id, //用户id
|
|
|
name: '', //家庭成员姓名
|
|
|
appellation: '', //家庭成员称谓
|
|
|
place: '', //家庭成员工作单位
|
|
|
position: '', //家庭成员职位
|
|
|
}
|
|
|
}
|
|
|
}else if (type === 'work'){
|
|
|
//展示新增或编辑页面
|
|
|
workDiaShow.value = flg;
|
|
|
if (flg === false){
|
|
|
workInfoForm.value = {
|
|
|
id:'',
|
|
|
personId:props.parentNode.id, //用户id
|
|
|
place: '', //工作单位
|
|
|
position: '', //职位
|
|
|
startDate: '', //入职日期
|
|
|
endDate: '', //离职日期
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let seTitleByType = (name,type) => {
|
|
|
if (type === 'family'){
|
|
|
familyDiaTitle.value = name + '家庭成员';
|
|
|
}else if (type === 'work'){
|
|
|
workDiaTitle.value = name + '工作经历';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//点击家庭成员新增按钮
|
|
|
let addFamilyInfo = (name,type) => {
|
|
|
showDiaByType(true,type);
|
|
|
seTitleByType(name,type);
|
|
|
}
|
|
|
//点击修改按钮
|
|
|
let updateFamilyOrWorkInfo = (row,type) => {
|
|
|
//获取数据
|
|
|
if (type === 'family'){
|
|
|
familyInfoForm.value = {
|
|
|
id:row.id,
|
|
|
personId:props.parentNode.id, //用户id
|
|
|
name: row.name, //家庭成员姓名
|
|
|
appellation: row.appellation, //家庭成员称谓
|
|
|
place: row.place, //家庭成员工作单位
|
|
|
position: row.position, //家庭成员职位
|
|
|
}
|
|
|
}else if (type === 'work'){
|
|
|
workInfoForm.value = {
|
|
|
id:row.id,
|
|
|
personId:props.parentNode.id, //用户id
|
|
|
place: row.place, //工作单位
|
|
|
position: row.position, //职位
|
|
|
startDate: row.startDate, //入职日期
|
|
|
endDate: row.endDate, //离职日期
|
|
|
}
|
|
|
}
|
|
|
addFamilyInfo('编辑',type);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @Author LH
|
...
|
...
|
@@ -324,6 +428,10 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
const validatorDate = (rule, value, callback) => {
|
|
|
return value !== '' ? callback() : callback(new Error(rule.message));
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* @author LH
|
|
|
* 表单规则校验
|
...
|
...
|
@@ -343,6 +451,33 @@ export default { |
|
|
]
|
|
|
});
|
|
|
|
|
|
let familyOrWorkRules = Vue.ref({
|
|
|
name: [
|
|
|
{ required: true, message: '请输入姓名' },
|
|
|
{ message: '请输入姓名', trigger: 'blur' }
|
|
|
],
|
|
|
appellation: [
|
|
|
{ required: true, message: '请输入称谓' },
|
|
|
{ message: '请输入称谓', trigger: 'blur' }
|
|
|
],
|
|
|
place: [
|
|
|
{ required: true, message: '请输入工作单位' },
|
|
|
{ message: '请输入工作单位', trigger: 'blur' }
|
|
|
],
|
|
|
position: [
|
|
|
{ required: true, message: '请输入职位' },
|
|
|
{ message: '请输入职位', trigger: 'blur' }
|
|
|
],
|
|
|
startDate: [
|
|
|
{ required: true, message: '请选择入职日期' },
|
|
|
{ validator:validatorDate,message:'请选择入职日期', trigger: 'blur'}
|
|
|
],
|
|
|
endDate: [
|
|
|
{ required: true, message: '请选择离职日期' },
|
|
|
{ validator:validatorDate,message:'请选择离职日期', trigger: 'blur'}
|
|
|
],
|
|
|
});
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @EDITOR LH
|
...
|
...
|
@@ -366,6 +501,42 @@ export default { |
|
|
|
|
|
}
|
|
|
|
|
|
let saveOrUpdateByType = (type,rules) => {
|
|
|
let msg = '新增';
|
|
|
var data = {};
|
|
|
if (type === 'family'){
|
|
|
if (familyDiaTitle.value.indexOf('新增') == -1){ //表示编辑
|
|
|
msg = '编辑';
|
|
|
}
|
|
|
data = familyInfoForm.value;
|
|
|
}else if (type === 'work'){
|
|
|
if (workDiaTitle.value.indexOf('新增') == -1){ //表示编辑
|
|
|
msg = '编辑';
|
|
|
}
|
|
|
data = workInfoForm.value;
|
|
|
}
|
|
|
rules.validate((valid) => {
|
|
|
if (valid){
|
|
|
proxy.$http.post("/api-web/bOpsPerson/saveOrUpdateByType?type="+type, data, function (res) {
|
|
|
if (res && res.success == true) {
|
|
|
proxy.$global.showMsg(msg +'成功!');
|
|
|
showDiaByType(false,type);
|
|
|
getPage();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
//删除
|
|
|
let deleteByType = (row,type) => {
|
|
|
proxy.$http.post("/api-web/bOpsPerson/deleteByType?type="+type+"&ids="+row.id, {}, function (res) {
|
|
|
if (res && res.success == true) {
|
|
|
proxy.$global.showMsg('删除成功!');
|
|
|
getPage();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
let getFile = (param) => {
|
|
|
let fileObj = param.file
|
...
|
...
|
@@ -447,6 +618,21 @@ export default { |
|
|
// 资产属性
|
|
|
icon,
|
|
|
rules,
|
|
|
familyInfoTableData,
|
|
|
addFamilyInfo,
|
|
|
showDiaByType,
|
|
|
seTitleByType,
|
|
|
saveOrUpdateByType,
|
|
|
familyDiaShow,
|
|
|
familyDiaTitle,
|
|
|
familyInfoForm,
|
|
|
deleteByType,
|
|
|
workDiaShow,
|
|
|
workDiaTitle,
|
|
|
workInfoForm,
|
|
|
updateFamilyOrWorkInfo,
|
|
|
familyOrWorkRules,
|
|
|
familyInfoFormRef
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|