Browse Source

feat:[模板管理][update]

ouqian
luojie 1 month ago
parent
commit
9e6d32b4d7
2 changed files with 13 additions and 10 deletions
  1. +2
    -2
      src/components/Template/BaseInfoFormPackage.vue
  2. +11
    -8
      src/views/business/comps/template/comps/sp/SP0020.vue

+ 2
- 2
src/components/Template/BaseInfoFormPackage.vue View File

@ -92,7 +92,7 @@
<div v-show="isShowOther(formFields[key])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div>
<div class="flex">
<div class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)"
:item="getOtherItem(sItem)" v-model="formFields[sItem.otherCode]"
@ -194,7 +194,7 @@
<div v-show="isShowOther(formFields[key])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div>
<div class="flex">
<div class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)"
:item="getOtherItem(sItem)" v-model="formFields[sItem.otherCode]"

+ 11
- 8
src/views/business/comps/template/comps/sp/SP0020.vue View File

@ -7,10 +7,10 @@
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
:ref="refConfig.baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<LineLabel label="试验内容" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
:ref="refConfig.remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
@ -30,6 +30,12 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
import { getBaseInfoFormConfig} from "../../formConfig/sp/SP0019";
import { getSynrFormConfig} from "../../formConfig/sp/SP0020";
const refConfig = {
baseInfoRef: "baseInfoRef",
remarkRef: "remarkRef",
}
const compRefs = Object.values(refConfig);
export default {
name: "SP0020",
@ -74,7 +80,7 @@ export default {
data() {
return {
formData: {},
compRefs:["baseInfoRef", "storageConditionRef", "spzxhRef","yqInfoTableRef","ryTableRef", "remarkRef"]
refConfig
};
},
mounted() {
@ -93,16 +99,13 @@ export default {
this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params);
}
},
onYqSubmit(data, col, rowIndex, colIndex, row){
console.log(data, col, rowIndex, colIndex, row,"onRegentSubmit")
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(this.compRefs)
return this.getFilledFormDataByRefs(compRefs)
},
//
async getFormData() {
let content = await this.validFormFields(this.compRefs);
let content = await this.validFormFields(compRefs);
console.log(content)
return content;
},

Loading…
Cancel
Save