|
|
@ -235,23 +235,26 @@ export default { |
|
|
label: 'template.dj.dj003.cyd', |
|
|
label: 'template.dj.dj003.cyd', |
|
|
prop: "cyd", |
|
|
prop: "cyd", |
|
|
bodyType: 'input', |
|
|
bodyType: 'input', |
|
|
bodyFillType: 'actFill' |
|
|
|
|
|
|
|
|
bodyFillType: 'actFill', |
|
|
|
|
|
width: 180, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: 'template.dj.dj003.dwbh', |
|
|
label: 'template.dj.dj003.dwbh', |
|
|
prop: "dwbh", |
|
|
prop: "dwbh", |
|
|
bodyType: 'input', |
|
|
bodyType: 'input', |
|
|
bodyFillType: 'actFill' |
|
|
|
|
|
|
|
|
bodyFillType: 'actFill', |
|
|
|
|
|
width: 180, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: 'template.dj.dj003.ypmc', |
|
|
label: 'template.dj.dj003.ypmc', |
|
|
prop: "ypmcTa", |
|
|
prop: "ypmcTa", |
|
|
bodyType: 'checkboxTree', |
|
|
bodyType: 'checkboxTree', |
|
|
bodyFillType: 'actFill', |
|
|
bodyFillType: 'actFill', |
|
|
bodyOptions: [ |
|
|
|
|
|
{value:1,label:'正常'}, |
|
|
|
|
|
{value:0,label:'偏离'}, |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
width: 280, |
|
|
|
|
|
bodyLayout: 'horizontal',//水平 |
|
|
|
|
|
optionCode:"ypmcTaOptions", |
|
|
|
|
|
noBorder: true, |
|
|
|
|
|
bodyOptions: this.ypmcTaOptions, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: 'template.dj.dj003.cysj', |
|
|
label: 'template.dj.dj003.cysj', |
|
|
@ -268,13 +271,15 @@ export default { |
|
|
{value:1,label:'正常'}, |
|
|
{value:1,label:'正常'}, |
|
|
{value:0,label:'偏离'}, |
|
|
{value:0,label:'偏离'}, |
|
|
], |
|
|
], |
|
|
bodyFillType: 'actFill' |
|
|
|
|
|
|
|
|
bodyFillType: 'actFill', |
|
|
|
|
|
width: 180, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: 'template.dj.dj003.yps', |
|
|
label: 'template.dj.dj003.yps', |
|
|
prop: "yps", |
|
|
prop: "yps", |
|
|
bodyType: 'inputNumber', |
|
|
bodyType: 'inputNumber', |
|
|
bodyFillType: 'actFill' |
|
|
|
|
|
|
|
|
bodyFillType: 'actFill', |
|
|
|
|
|
width: 180, |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
@ -308,7 +313,14 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
formData: {}, |
|
|
formData: {}, |
|
|
refConf |
|
|
|
|
|
|
|
|
refConf, |
|
|
|
|
|
ypmcTaOptions: [], |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
|
|
|
if(this.fillType === "actFill"){ |
|
|
|
|
|
console.log(this.formData, "this.formData") |
|
|
|
|
|
this.ypmcTaOptions = this.formData.ypmcTaOptions || [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@ -319,11 +331,25 @@ export default { |
|
|
|
|
|
|
|
|
// 获取已填写的表单数据 |
|
|
// 获取已填写的表单数据 |
|
|
getFilledFormData() { |
|
|
getFilledFormData() { |
|
|
return this.getFilledFormDataByRefs(refNames) |
|
|
|
|
|
|
|
|
const filledData = this.getFilledFormDataByRefs(refNames); |
|
|
|
|
|
if(this.formData.ypmcTaOptions){ |
|
|
|
|
|
filledData.ypmcTaOptions = this.formData.ypmcTaOptions |
|
|
|
|
|
} |
|
|
|
|
|
return filledData |
|
|
}, |
|
|
}, |
|
|
// 获取填写完成的表单数据 |
|
|
// 获取填写完成的表单数据 |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
return await this.validFormFields(refNames) |
|
|
|
|
|
|
|
|
const formData = await this.validFields(); |
|
|
|
|
|
if(this.fillType === "preFill" && !!formData){ |
|
|
|
|
|
const filledData = this.getFilledFormData(); |
|
|
|
|
|
const {stepTableFormData_1 = []} = filledData; |
|
|
|
|
|
const options = stepTableFormData_1.map(item => ({ |
|
|
|
|
|
value: item.ypmc, |
|
|
|
|
|
label: item.ypmc, |
|
|
|
|
|
})) |
|
|
|
|
|
formData.ypmcTaOptions = options |
|
|
|
|
|
} |
|
|
|
|
|
return formData |
|
|
}, |
|
|
}, |
|
|
// 只做校验 |
|
|
// 只做校验 |
|
|
async validFields() { |
|
|
async validFields() { |
|
|
|