Authored by 王涛

Merge branch 'master-500-dev-xwx' into 'master-500-dev'

乙方运维在职状态修改为必填项,录入时头像设置为添加用户成功之后添加



See merge request !583
@@ -180,7 +180,7 @@ export default { @@ -180,7 +180,7 @@ export default {
180 let total = Vue.ref(0); 180 let total = Vue.ref(0);
181 181
182 let add=()=>{ 182 let add=()=>{
183 - title.value = "运维人员录入"; 183 + title.value = "个人信息录入";
184 componentName.value = "USER"; 184 componentName.value = "USER";
185 isAdd.value = true; 185 isAdd.value = true;
186 showDialog(true); 186 showDialog(true);
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 </el-form-item> 99 </el-form-item>
100 </el-col> 100 </el-col>
101 <el-col :span="8"> 101 <el-col :span="8">
102 - <el-form-item label="在职状态" prop="certificate" :readonly="true" class="form-class"> 102 + <el-form-item label="在职状态" prop="state" :readonly="true" class="form-class">
103 <el-radio-group v-model="ruleForm.state" :disabled="whether"> 103 <el-radio-group v-model="ruleForm.state" :disabled="whether">
104 <el-radio :label="1">在职</el-radio> 104 <el-radio :label="1">在职</el-radio>
105 <el-radio :label="2">离职</el-radio> 105 <el-radio :label="2">离职</el-radio>
@@ -187,8 +187,10 @@ const assets = (props, {attrs, slots, emit}) => { @@ -187,8 +187,10 @@ const assets = (props, {attrs, slots, emit}) => {
187 let showDialog = (flg) => { 187 let showDialog = (flg) => {
188 if (!props.isAdd){ 188 if (!props.isAdd){
189 op.value = flg; 189 op.value = flg;
  190 + }else {
  191 + proxy.$global.showMsg("请先添加用户!","error");
190 } 192 }
191 - proxy.$global.showMsg("请先添加用户!","error"); 193 +
192 } 194 }
193 195
194 let okFunc = () => { 196 let okFunc = () => {
@@ -350,6 +352,9 @@ export default { @@ -350,6 +352,9 @@ export default {
350 ], 352 ],
351 entryTime: [ 353 entryTime: [
352 { required: true,message:'请选择入职时间', trigger: 'blur'} 354 { required: true,message:'请选择入职时间', trigger: 'blur'}
  355 + ],
  356 + state: [
  357 + { required: true,message:'请选择在职状态', trigger: 'blur'}
353 ] 358 ]
354 }); 359 });
355 360
@@ -380,18 +385,23 @@ export default { @@ -380,18 +385,23 @@ export default {
380 385
381 386
382 let getFile = (param) => { 387 let getFile = (param) => {
383 - let fileObj = param.file  
384 - let params = {  
385 - file: fileObj,  
386 - id: props.parentNode.id  
387 - }  
388 - // 上传文件  
389 - proxy.$http.uploadFile("/api-web/bOpsPerson/uploadFile", params, function (res) {  
390 - if (res && res.success) {  
391 - proxy.$global.showMsg("上传成功!"); 388 + if (!props.isAdd){
  389 + let fileObj = param.file
  390 + let params = {
  391 + file: fileObj,
  392 + id: props.parentNode.id
392 } 393 }
393 - })  
394 - imageUrl.value = URL.createObjectURL(fileObj); 394 + // 上传文件
  395 + proxy.$http.uploadFile("/api-web/bOpsPerson/uploadFile", params, function (res) {
  396 + if (res && res.success) {
  397 + proxy.$global.showMsg("上传成功!");
  398 + }
  399 + })
  400 + imageUrl.value = URL.createObjectURL(fileObj);
  401 + }else {
  402 + proxy.$global.showMsg("请先添加用户!","error");
  403 + }
  404 +
395 } 405 }
396 406
397 let beforeAvatarUpload = (file) => { 407 let beforeAvatarUpload = (file) => {