Authored by 王涛

Merge branch 'master-joke' into 'master'

乙方运维页面优化

乙方运维页面优化

See merge request !1017
@@ -21,7 +21,8 @@ @@ -21,7 +21,8 @@
21 } 21 }
22 22
23 .yfyw-user .form-class { 23 .yfyw-user .form-class {
24 - margin-bottom: 0px !important; 24 + /*margin-bottom: 0px !important;*/
  25 + margin: 5px; !important;
25 } 26 }
26 27
27 .yfyw-user .el-form--label-top .el-form-item__label { 28 .yfyw-user .el-form--label-top .el-form-item__label {
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <i class="iconfont icon-icon--yingbing" /> 人员基本信息 17 <i class="iconfont icon-icon--yingbing" /> 人员基本信息
18 </div> 18 </div>
19 <div style="padding-left: 40px;margin-bottom: 6px"> 19 <div style="padding-left: 40px;margin-bottom: 6px">
20 - <el-form :rules="rules" ref="rule" :model="ruleForm" label-width="120px" :size="$global.elementSize" label-position="top" > 20 + <el-form :rules="rules" ref="rule" :model="ruleForm" label-width="120px" :size="$global.elementSize" label-position="right" >
21 <el-row :gutter="5"> 21 <el-row :gutter="5">
22 <el-col :span="8"> 22 <el-col :span="8">
23 <el-form-item label="姓名" prop="nickname" class="form-class"> 23 <el-form-item label="姓名" prop="nickname" class="form-class">
@@ -91,9 +91,44 @@ @@ -91,9 +91,44 @@
91 </el-form-item> 91 </el-form-item>
92 </el-col> 92 </el-col>
93 </el-row> 93 </el-row>
94 -  
95 <el-row :gutter="5"> 94 <el-row :gutter="5">
96 <el-col :span="8"> 95 <el-col :span="8">
  96 + <el-form-item label="出生日期" prop="birthday" class="form-class">
  97 + <el-date-picker
  98 + v-model="ruleForm.birthday"
  99 + format="YYYY-MM-DD"
  100 + value-format="YYYY-MM-DD"
  101 + :readonly="isAdmin()"
  102 + type="date"
  103 + placeholder="选择日期">
  104 + </el-date-picker>
  105 + </el-form-item>
  106 + </el-col>
  107 + <el-col :span="8">
  108 + <el-form-item label="犯罪记录证明" prop="hasProof" class="form-class">
  109 + <el-input v-model="ruleForm.hasProof" :readonly="isAdmin()"></el-input>
  110 + </el-form-item>
  111 + </el-col>
  112 + <el-col :span="8">
  113 + <el-form-item label="籍贯" prop="nativePlace" class="form-class">
  114 + <el-input v-model="ruleForm.nativePlace" :readonly="isAdmin()"></el-input>
  115 + </el-form-item>
  116 + </el-col>
  117 + </el-row>
  118 + <el-row :gutter="5">
  119 + <el-col :span="8">
  120 + <el-form-item label="入党时间" prop="partyDate" class="form-class">
  121 + <el-date-picker
  122 + v-model="ruleForm.partyDate"
  123 + format="YYYY-MM-DD"
  124 + value-format="YYYY-MM-DD"
  125 + :readonly="isAdmin()"
  126 + type="date"
  127 + placeholder="选择日期">
  128 + </el-date-picker>
  129 + </el-form-item>
  130 + </el-col>
  131 + <el-col :span="8">
97 <el-form-item label="政治面貌" prop="politicsStatus" class="form-class"> 132 <el-form-item label="政治面貌" prop="politicsStatus" class="form-class">
98 <el-input v-model="ruleForm.politicsStatus" :readonly="isAdmin()"></el-input> 133 <el-input v-model="ruleForm.politicsStatus" :readonly="isAdmin()"></el-input>
99 </el-form-item> 134 </el-form-item>
@@ -108,24 +143,73 @@ @@ -108,24 +143,73 @@
108 </el-col> 143 </el-col>
109 </el-row> 144 </el-row>
110 145
111 - <el-row :gutter="5">  
112 - <el-col :span="24">  
113 - <el-form-item label="获得证书" prop="post" class="form-textarea">  
114 - <el-input v-model="ruleForm.certificate" type="textarea" :readonly="isAdmin()"></el-input> 146 + <el-row :gutter="">
  147 + <el-col :span="12">
  148 + <el-form-item label="获得证书" prop="post">
  149 + <el-input v-model="ruleForm.certificate" :readonly="isAdmin()"></el-input>
115 </el-form-item> 150 </el-form-item>
116 </el-col> 151 </el-col>
117 - </el-row>  
118 - <el-row :gutter="5">  
119 - <el-col :span="24">  
120 - <el-form-item label="家庭住址" prop="post" class="form-textarea">  
121 - <el-input v-model="ruleForm.post" type="textarea" :readonly="isAdmin()"></el-input> 152 + <el-col :span="12">
  153 + <el-form-item label="家庭住址" prop="post">
  154 + <el-input v-model="ruleForm.post" :readonly="isAdmin()"></el-input>
122 </el-form-item> 155 </el-form-item>
123 </el-col> 156 </el-col>
  157 +
124 </el-row> 158 </el-row>
125 <div style="text-align: center;padding-top: 10px" v-if="!isAdmin()"> 159 <div style="text-align: center;padding-top: 10px" v-if="!isAdmin()">
126 <el-button type="primary" size="mini" @click="saveUser()">保存基本信息</el-button> 160 <el-button type="primary" size="mini" @click="saveUser()">保存基本信息</el-button>
127 </div> 161 </div>
128 </el-form> 162 </el-form>
  163 +
  164 +
  165 +
  166 + <!--工作简历表格-->
  167 + <div class="title" style="padding-left: 0px">
  168 + <i class="iconfont icon-icon--yingbing" /> 工作简历信息 <el-button v-show="!isAdmin()" type="primary" size="small" @click="addFamilyInfo('新增','work')" plain>新增</el-button>
  169 + </div>
  170 + <el-table border :data="workInfoTableData" stripe style="width: 100%" >
  171 + <el-table-column label="序号" type="index" width="100" align="center"/>
  172 + <el-table-column prop="place" align="center" label="工作单位" />
  173 + <el-table-column prop="position" align="center" label="职位" />
  174 + <el-table-column prop="startDate" align="center" label="入职日期" />
  175 + <el-table-column prop="endDate" align="center" label="离职日期" />
  176 + <el-table-column v-if="!isAdmin()" prop="address" align="center" label="操作" width="100" >
  177 + <template #default="scope">
  178 + <div class="list-handle">
  179 + <span class="icon-bg">
  180 + <i class="el-icon-delete" title="删除" @click="deleteByType(scope.row,'work')"></i>
  181 + </span>
  182 + <span class="icon-bg">
  183 + <i class="el-icon-edit-outline" title="修改" @click="updateFamilyOrWorkInfo(scope.row,'work')"></i>
  184 + </span>
  185 + </div>
  186 + </template>
  187 + </el-table-column>
  188 + </el-table>
  189 +
  190 + <!--家庭成员表格-->
  191 + <div class="title" style="margin-top: 10px;padding-left: 0px">
  192 + <i class="iconfont icon-icon--yingbing" /> 家庭成员信息 <el-button v-show="!isAdmin()" type="primary" size="small" @click="addFamilyInfo('新增','family')" plain>新增</el-button>
  193 + </div>
  194 + <el-table border :data="familyInfoTableData" stripe style="width: 100%" >
  195 + <el-table-column label="序号" type="index" width="100" align="center"/>
  196 + <el-table-column prop="name" align="center" label="成员姓名" />
  197 + <el-table-column prop="appellation" align="center" label="称谓" />
  198 + <el-table-column prop="place" align="center" label="工作单位" />
  199 + <el-table-column prop="position" align="center" label="职位" />
  200 + <el-table-column v-if="!isAdmin()" prop="address" align="center" label="操作" width="100" >
  201 + <template #default="scope">
  202 + <div class="list-handle">
  203 + <span class="icon-bg">
  204 + <i class="el-icon-delete" title="删除" @click="deleteByType(scope.row,'family')"></i>
  205 + </span>
  206 + <span class="icon-bg">
  207 + <i class="el-icon-edit-outline" title="修改" @click="updateFamilyOrWorkInfo(scope.row,'family')"></i>
  208 + </span>
  209 + </div>
  210 + </template>
  211 + </el-table-column>
  212 + </el-table>
129 </div> 213 </div>
130 <!--资产信息--> 214 <!--资产信息-->
131 <div class="title"> 215 <div class="title">
@@ -199,5 +283,93 @@ @@ -199,5 +283,93 @@
199 </template> 283 </template>
200 </cm-dialog> 284 </cm-dialog>
201 285
  286 + <!--家庭人员信息弹框-->
  287 + <cm-dialog :title="familyDiaTitle" width="60%" :showDialogVisible="familyDiaShow" @hidedialog="showDiaByType(false,'family')" :showFooter="true" @okfunc="saveOrUpdateByType('family',familyInfoFormRef)">
  288 + <template v-slot style="padding: 10px">
  289 + <el-form ref="familyInfoFormRef" :rules="familyOrWorkRules" :model="familyInfoForm" label-width="120px" :size="$global.elementSize" label-position="right" >
  290 + <el-row :gutter="5">
  291 + <el-col :span="12">
  292 + <el-form-item label="id" prop="id" v-show="false" >
  293 + <el-input v-model="familyInfoForm.id" :readonly="true"></el-input>
  294 + </el-form-item>
  295 + <el-form-item label="personId" prop="personId" v-show="false" >
  296 + <el-input v-model="familyInfoForm.personId" :readonly="true"></el-input>
  297 + </el-form-item>
  298 + <el-form-item label="姓名" prop="name" class="form-class">
  299 + <el-input v-model="familyInfoForm.name"></el-input>
  300 + </el-form-item>
  301 + </el-col>
  302 + <el-col :span="12">
  303 + <el-form-item label="称谓" prop="appellation" class="form-class">
  304 + <el-input v-model="familyInfoForm.appellation"></el-input>
  305 + </el-form-item>
  306 + </el-col>
  307 + </el-row>
  308 + <el-row :gutter="5">
  309 + <el-col :span="12">
  310 + <el-form-item label="工作单位" prop="place" class="form-class">
  311 + <el-input v-model="familyInfoForm.place"></el-input>
  312 + </el-form-item>
  313 + </el-col>
  314 + <el-col :span="12">
  315 + <el-form-item label="职位" prop="position" class="form-class">
  316 + <el-input v-model="familyInfoForm.position"></el-input>
  317 + </el-form-item>
  318 + </el-col>
  319 + </el-row>
  320 + </el-form>
  321 + </template>
  322 + </cm-dialog>
  323 +
  324 + <!--工作简历弹框-->
  325 + <cm-dialog :title="workDiaTitle" width="60%" :showDialogVisible="workDiaShow" @hidedialog="showDiaByType(false,'work')" :showFooter="true" @okfunc="saveOrUpdateByType('work',familyInfoFormRef)">
  326 + <template v-slot style="padding: 10px">
  327 + <el-form ref="familyInfoFormRef" :rules="familyOrWorkRules" :model="workInfoForm" label-width="120px" :size="$global.elementSize" label-position="right" >
  328 + <el-row :gutter="5">
  329 + <el-col :span="12">
  330 + <el-form-item label="id" prop="id" v-show="false" >
  331 + <el-input v-model="workInfoForm.id" :readonly="true"></el-input>
  332 + </el-form-item>
  333 + <el-form-item label="personId" prop="personId" v-show="false" >
  334 + <el-input v-model="workInfoForm.personId" :readonly="true"></el-input>
  335 + </el-form-item>
  336 + <el-form-item label="工作单位" prop="place" class="form-class">
  337 + <el-input v-model="workInfoForm.place"></el-input>
  338 + </el-form-item>
  339 + </el-col>
  340 + <el-col :span="12">
  341 + <el-form-item label="职位" prop="position" class="form-class">
  342 + <el-input v-model="workInfoForm.position"></el-input>
  343 + </el-form-item>
  344 + </el-col>
  345 + </el-row>
  346 + <el-row :gutter="5">
  347 + <el-col :span="12">
  348 + <el-form-item label="入职日期" prop="startDate" class="form-class">
  349 + <el-date-picker
  350 + v-model="workInfoForm.startDate"
  351 + format="YYYY-MM-DD"
  352 + value-format="YYYY-MM-DD"
  353 + type="date"
  354 + placeholder="选择日期">
  355 + </el-date-picker>
  356 + </el-form-item>
  357 + </el-col>
  358 +
  359 + <el-col :span="12">
  360 + <el-form-item label="离职日期" prop="endDate" class="form-class">
  361 + <el-date-picker
  362 + v-model="workInfoForm.endDate"
  363 + format="YYYY-MM-DD"
  364 + value-format="YYYY-MM-DD"
  365 + type="date"
  366 + placeholder="选择日期">
  367 + </el-date-picker>
  368 + </el-form-item>
  369 + </el-col>
  370 + </el-row>
  371 + </el-form>
  372 + </template>
  373 + </cm-dialog>
202 374
203 </div> 375 </div>
@@ -243,7 +243,16 @@ export default { @@ -243,7 +243,16 @@ export default {
243 243
244 const {proxy} = Vue.getCurrentInstance(); 244 const {proxy} = Vue.getCurrentInstance();
245 let imageUrl = Vue.ref(''); 245 let imageUrl = Vue.ref('');
246 - 246 + const familyInfoTableData=Vue.ref([]);
  247 + // 家庭成员信息弹框显示标识
  248 + let familyDiaShow = Vue.ref(false);
  249 + //家庭成员信息弹框标题
  250 + let familyDiaTitle = Vue.ref('');
  251 + const workInfoTableData=Vue.ref([]);
  252 + // 简历信息弹框显示标识
  253 + let workDiaShow = Vue.ref(false);
  254 + //简历信息弹框标题
  255 + let workDiaTitle = Vue.ref('');
247 256
248 let ruleForm = Vue.ref({ 257 let ruleForm = Vue.ref({
249 nickname: '', 258 nickname: '',
@@ -260,7 +269,32 @@ export default { @@ -260,7 +269,32 @@ export default {
260 quitTime: '', 269 quitTime: '',
261 state: '', 270 state: '',
262 idcard:'', 271 idcard:'',
263 - politicsStatus:'' 272 + politicsStatus:'',
  273 + hasProof:'', //是否有无犯罪证明 joke add 20221012
  274 + nativePlace:'', //籍贯 joke add 20221012
  275 + birthday:'', //出生日期 joke add 20221012
  276 + partyDate:'', //入党日期 joke add 20221012
  277 + responsibility:'' //岗位职责 joke add 20221012
  278 + })
  279 +
  280 + let familyInfoForm = Vue.ref({
  281 + id:'',
  282 + personId:props.parentNode.id, //用户id
  283 + name: '', //家庭成员姓名
  284 + appellation: '', //家庭成员称谓
  285 + place: '', //家庭成员工作单位
  286 + position: '', //家庭成员职位
  287 + })
  288 +
  289 + let familyInfoFormRef = Vue.ref('');
  290 +
  291 + let workInfoForm = Vue.ref({
  292 + id:'',
  293 + personId:props.parentNode.id, //用户id
  294 + place: '', //工作单位
  295 + position: '', //职位
  296 + startDate: '', //入职日期
  297 + endDate: '', //离职日期
264 }) 298 })
265 299
266 300
@@ -273,6 +307,8 @@ export default { @@ -273,6 +307,8 @@ export default {
273 }, function (res) { 307 }, function (res) {
274 if (res && res.object) { 308 if (res && res.object) {
275 ruleForm.value = res.object 309 ruleForm.value = res.object
  310 + proxy.familyInfoTableData = res.object.familyInfoList;
  311 + proxy.workInfoTableData = res.object.workExperienceList;
276 } else { 312 } else {
277 ruleForm.value = res.object 313 ruleForm.value = res.object
278 } 314 }
@@ -282,6 +318,74 @@ export default { @@ -282,6 +318,74 @@ export default {
282 imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}` 318 imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}`
283 } 319 }
284 320
  321 + //点击家庭成员信息的新增按钮事件
  322 + let showDiaByType = (flg,type) =>{
  323 + if (type === 'family'){
  324 + //展示新增或编辑页面
  325 + familyDiaShow.value = flg;
  326 + if (flg === false){
  327 + familyInfoForm.value = {
  328 + id:'',
  329 + personId:props.parentNode.id, //用户id
  330 + name: '', //家庭成员姓名
  331 + appellation: '', //家庭成员称谓
  332 + place: '', //家庭成员工作单位
  333 + position: '', //家庭成员职位
  334 + }
  335 + }
  336 + }else if (type === 'work'){
  337 + //展示新增或编辑页面
  338 + workDiaShow.value = flg;
  339 + if (flg === false){
  340 + workInfoForm.value = {
  341 + id:'',
  342 + personId:props.parentNode.id, //用户id
  343 + place: '', //工作单位
  344 + position: '', //职位
  345 + startDate: '', //入职日期
  346 + endDate: '', //离职日期
  347 + }
  348 + }
  349 + }
  350 + }
  351 +
  352 + let seTitleByType = (name,type) => {
  353 + if (type === 'family'){
  354 + familyDiaTitle.value = name + '家庭成员';
  355 + }else if (type === 'work'){
  356 + workDiaTitle.value = name + '工作经历';
  357 + }
  358 + }
  359 +
  360 + //点击家庭成员新增按钮
  361 + let addFamilyInfo = (name,type) => {
  362 + showDiaByType(true,type);
  363 + seTitleByType(name,type);
  364 + }
  365 + //点击修改按钮
  366 + let updateFamilyOrWorkInfo = (row,type) => {
  367 + //获取数据
  368 + if (type === 'family'){
  369 + familyInfoForm.value = {
  370 + id:row.id,
  371 + personId:props.parentNode.id, //用户id
  372 + name: row.name, //家庭成员姓名
  373 + appellation: row.appellation, //家庭成员称谓
  374 + place: row.place, //家庭成员工作单位
  375 + position: row.position, //家庭成员职位
  376 + }
  377 + }else if (type === 'work'){
  378 + workInfoForm.value = {
  379 + id:row.id,
  380 + personId:props.parentNode.id, //用户id
  381 + place: row.place, //工作单位
  382 + position: row.position, //职位
  383 + startDate: row.startDate, //入职日期
  384 + endDate: row.endDate, //离职日期
  385 + }
  386 + }
  387 + addFamilyInfo('编辑',type);
  388 + }
285 389
286 /** 390 /**
287 * @Author LH 391 * @Author LH
@@ -324,6 +428,10 @@ export default { @@ -324,6 +428,10 @@ export default {
324 } 428 }
325 } 429 }
326 430
  431 + const validatorDate = (rule, value, callback) => {
  432 + return value !== '' ? callback() : callback(new Error(rule.message));
  433 + };
  434 +
327 /** 435 /**
328 * @author LH 436 * @author LH
329 * 表单规则校验 437 * 表单规则校验
@@ -343,6 +451,33 @@ export default { @@ -343,6 +451,33 @@ export default {
343 ] 451 ]
344 }); 452 });
345 453
  454 + let familyOrWorkRules = Vue.ref({
  455 + name: [
  456 + { required: true, message: '请输入姓名' },
  457 + { message: '请输入姓名', trigger: 'blur' }
  458 + ],
  459 + appellation: [
  460 + { required: true, message: '请输入称谓' },
  461 + { message: '请输入称谓', trigger: 'blur' }
  462 + ],
  463 + place: [
  464 + { required: true, message: '请输入工作单位' },
  465 + { message: '请输入工作单位', trigger: 'blur' }
  466 + ],
  467 + position: [
  468 + { required: true, message: '请输入职位' },
  469 + { message: '请输入职位', trigger: 'blur' }
  470 + ],
  471 + startDate: [
  472 + { required: true, message: '请选择入职日期' },
  473 + { validator:validatorDate,message:'请选择入职日期', trigger: 'blur'}
  474 + ],
  475 + endDate: [
  476 + { required: true, message: '请选择离职日期' },
  477 + { validator:validatorDate,message:'请选择离职日期', trigger: 'blur'}
  478 + ],
  479 + });
  480 +
346 481
347 /** 482 /**
348 * @EDITOR LH 483 * @EDITOR LH
@@ -366,6 +501,42 @@ export default { @@ -366,6 +501,42 @@ export default {
366 501
367 } 502 }
368 503
  504 + let saveOrUpdateByType = (type,rules) => {
  505 + let msg = '新增';
  506 + var data = {};
  507 + if (type === 'family'){
  508 + if (familyDiaTitle.value.indexOf('新增') == -1){ //表示编辑
  509 + msg = '编辑';
  510 + }
  511 + data = familyInfoForm.value;
  512 + }else if (type === 'work'){
  513 + if (workDiaTitle.value.indexOf('新增') == -1){ //表示编辑
  514 + msg = '编辑';
  515 + }
  516 + data = workInfoForm.value;
  517 + }
  518 + rules.validate((valid) => {
  519 + if (valid){
  520 + proxy.$http.post("/api-web/bOpsPerson/saveOrUpdateByType?type="+type, data, function (res) {
  521 + if (res && res.success == true) {
  522 + proxy.$global.showMsg(msg +'成功!');
  523 + showDiaByType(false,type);
  524 + getPage();
  525 + }
  526 + });
  527 + }
  528 + })
  529 + }
  530 + //删除
  531 + let deleteByType = (row,type) => {
  532 + proxy.$http.post("/api-web/bOpsPerson/deleteByType?type="+type+"&ids="+row.id, {}, function (res) {
  533 + if (res && res.success == true) {
  534 + proxy.$global.showMsg('删除成功!');
  535 + getPage();
  536 + }
  537 + });
  538 + }
  539 +
369 540
370 let getFile = (param) => { 541 let getFile = (param) => {
371 let fileObj = param.file 542 let fileObj = param.file
@@ -447,6 +618,21 @@ export default { @@ -447,6 +618,21 @@ export default {
447 // 资产属性 618 // 资产属性
448 icon, 619 icon,
449 rules, 620 rules,
  621 + familyInfoTableData,
  622 + addFamilyInfo,
  623 + showDiaByType,
  624 + seTitleByType,
  625 + saveOrUpdateByType,
  626 + familyDiaShow,
  627 + familyDiaTitle,
  628 + familyInfoForm,
  629 + deleteByType,
  630 + workDiaShow,
  631 + workDiaTitle,
  632 + workInfoForm,
  633 + updateFamilyOrWorkInfo,
  634 + familyOrWorkRules,
  635 + familyInfoFormRef
450 } 636 }
451 } 637 }
452 } 638 }