@@ -939,6 +939,13 @@ export default {
item.disabled = false;
}
}
+ if(col.noBorder){
+ item.noBorder = true;
+ }
+ if(col.bodyLayout){
+ item.layout = col.bodyLayout;
+ }
+
return item
},
getBodyButtonItem(col,) {
diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue
index 00ed563..995c957 100644
--- a/src/components/Template/HandleFormItem.vue
+++ b/src/components/Template/HandleFormItem.vue
@@ -37,7 +37,7 @@
+ :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '') + (error ? ' form-error-border' : '') + (item.noBorder ? ' no-border' : '') + (item.layout === 'horizontal' ? ' flex' : '')">
\ No newline at end of file
diff --git a/src/views/business/comps/template/comps/bl/BL001.vue b/src/views/business/comps/template/comps/bl/BL001.vue
index 77bdb90..418b1bf 100644
--- a/src/views/business/comps/template/comps/bl/BL001.vue
+++ b/src/views/business/comps/template/comps/bl/BL001.vue
@@ -235,23 +235,26 @@ export default {
label: 'template.dj.dj003.cyd',
prop: "cyd",
bodyType: 'input',
- bodyFillType: 'actFill'
+ bodyFillType: 'actFill',
+ width: 180,
},
{
label: 'template.dj.dj003.dwbh',
prop: "dwbh",
bodyType: 'input',
- bodyFillType: 'actFill'
+ bodyFillType: 'actFill',
+ width: 180,
},
{
label: 'template.dj.dj003.ypmc',
prop: "ypmcTa",
bodyType: 'checkboxTree',
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',
@@ -268,13 +271,15 @@ export default {
{value:1,label:'正常'},
{value:0,label:'偏离'},
],
- bodyFillType: 'actFill'
+ bodyFillType: 'actFill',
+ width: 180,
},
{
label: 'template.dj.dj003.yps',
prop: "yps",
bodyType: 'inputNumber',
- bodyFillType: 'actFill'
+ bodyFillType: 'actFill',
+ width: 180,
},
]
@@ -308,7 +313,14 @@ export default {
data() {
return {
formData: {},
- refConf
+ refConf,
+ ypmcTaOptions: [],
+ }
+ },
+ mounted() {
+ if(this.fillType === "actFill"){
+ console.log(this.formData, "this.formData")
+ this.ypmcTaOptions = this.formData.ypmcTaOptions || []
}
},
methods: {
@@ -319,11 +331,25 @@ export default {
// 获取已填写的表单数据
getFilledFormData() {
- return this.getFilledFormDataByRefs(refNames)
+ const filledData = this.getFilledFormDataByRefs(refNames);
+ if(this.formData.ypmcTaOptions){
+ filledData.ypmcTaOptions = this.formData.ypmcTaOptions
+ }
+ return filledData
},
// 获取填写完成的表单数据
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() {