企标制修订计划管控-重新起草-企标类别 回显
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
</div>
|
||||
<div class="content" v-show="active === '1'">
|
||||
<div style="flex: auto; overflow: auto">
|
||||
<process-title v-if="showFlag">
|
||||
<!-- <process-title v-if="showFlag">-->
|
||||
<process-title>
|
||||
<template slot="title">基础信息</template>
|
||||
</process-title>
|
||||
<el-form
|
||||
v-if="showFlag"
|
||||
class="label-input-form prc-content-border"
|
||||
label-width="150px"
|
||||
>
|
||||
@@ -36,7 +36,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<component ref="childForm" :message="qbfsForm" :is="comName"></component>
|
||||
<component ref="childForm" v-if="isTrue" :message="JSON.parse(JSON.stringify(qbfsForm))" :is="comName"></component>
|
||||
</div>
|
||||
<div>
|
||||
<el-collapse accordion>
|
||||
@@ -282,6 +282,7 @@ export default {
|
||||
commentText: "",
|
||||
comName: "establish",
|
||||
qbfsForm: {},
|
||||
isTrue:true,
|
||||
formLoading: false,
|
||||
approvalFlag: false,
|
||||
showFlag: true,
|
||||
@@ -378,12 +379,29 @@ export default {
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
const processForm = JSON.parse(res.mesg)
|
||||
this.getFormFieldList(processForm)
|
||||
this.getFormFieldList(JSON.parse(JSON.stringify(processForm)))
|
||||
}
|
||||
}).catch(e => {
|
||||
})
|
||||
})
|
||||
},
|
||||
deepClone(orig) {
|
||||
var copy = Object.create(Object.getPrototypeOf(orig))
|
||||
this.copyOwnPropertiesFrom(copy,orig);
|
||||
return copy;
|
||||
},
|
||||
copyOwnPropertiesFrom(target, source) {
|
||||
Object.getOwnPropertyNames(source)
|
||||
.forEach(ele =>{
|
||||
// 获取到每个属性的所有描述,然后重新定义对象的属性并返回此对象。
|
||||
var desc = Object.getOwnPropertyDescriptor(source,ele);
|
||||
Object.defineProperty(target,ele,desc)
|
||||
});
|
||||
return target;
|
||||
},
|
||||
getType(target){
|
||||
return Object.prototype.toString.call(target).toLowerCase().slice(8,-1)
|
||||
},
|
||||
/**
|
||||
* @description: 动态表单读取
|
||||
*/
|
||||
@@ -408,25 +426,30 @@ export default {
|
||||
this.comName = "establish"
|
||||
break
|
||||
}
|
||||
this.qbfsForm = item.qbfsForm || item;
|
||||
if (this.qbfsForm.bussSort) {
|
||||
if(this.qbfsForm.bussSort instanceof Array){
|
||||
this.qbfsForm.bussSort = this.qbfsForm.bussSort[0]
|
||||
}else {
|
||||
let val = this.qbfsForm.bussSort.replace('//',"").replace('["',"").replace('"]',"").toString()
|
||||
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
|
||||
if (val instanceof Array) {
|
||||
this.qbfsForm.bussSort = this.form.bussSort.join(",")[0];
|
||||
} else {
|
||||
this.qbfsForm.bussSort = val
|
||||
}
|
||||
} else if (val === '') {
|
||||
this.qbfsForm.bussSort = ""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.qbfsForm.bussSort = ""
|
||||
}
|
||||
this.qbfsForm = item.qbfsForm || JSON.parse(JSON.stringify(item));
|
||||
this.isTrue = false
|
||||
this.$nextTick(()=>{
|
||||
this.isTrue = true
|
||||
})
|
||||
// if (this.qbfsForm.bussSort){
|
||||
// if(this.qbfsForm.bussSort instanceof Array){
|
||||
// // if(this.getType(this.qbfsForm.bussSort) === 'array'){
|
||||
// this.qbfsForm.bussSort = this.qbfsForm.bussSort[0]
|
||||
// }else {
|
||||
// let val = this.qbfsForm.bussSort.replace('//',"").replace('["',"").replace('"]',"").toString()
|
||||
// if (val !== '' && val !== null && typeof (val) !== 'undefined') {
|
||||
// if (val instanceof Array) {
|
||||
// this.qbfsForm.bussSort = this.form.bussSort.join(",")[0];
|
||||
// } else {
|
||||
// this.qbfsForm.bussSort = val
|
||||
// }
|
||||
// } else if (val === '') {
|
||||
// this.qbfsForm.bussSort = ""
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// this.qbfsForm.bussSort = ""
|
||||
// }
|
||||
this.formLoading = false;
|
||||
// this.commentText = item.commentText
|
||||
this.roleForm.dockUser = item.dockUser || item.roleForm.dockUser;
|
||||
|
||||
Reference in New Issue
Block a user