Browse Source

feat:[模板管理][update]

ouqian
luojie 1 month ago
parent
commit
18c40361b4
3 changed files with 28 additions and 7 deletions
  1. +8
    -2
      src/components/Template/BaseInfoFormPackage.vue
  2. +1
    -0
      src/components/Template/mixins/formPackageMixins.js
  3. +19
    -5
      src/views/business/comps/template/comps/dl/DL023.vue

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

@ -173,13 +173,14 @@
@copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)" @copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)"
:error="errors[key]" @update:error="errors[key] = false" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" /> :orange-bg="orangeBgFields[key]" />
<div v-show="isShowOther(formFields[key])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem)">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
<div v-show="isShowOther(formFields[key]) || isShowRadioSelect(formFields[key])" class="flex flex1 ml-10">
<div class="other-title" v-if="isShowOtherLabel(sItem) && isShowOther(formFields[key])">{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}</div> $t("template.common.other") }}</div>
<div class="flex flex1"> <div class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" <HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)" :field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)"
:item="getOtherItem(sItem)" v-model="formFields[sItem.otherCode]" :item="getOtherItem(sItem)" v-model="formFields[sItem.otherCode]"
:type = "isShowOther(formFields[key]) ? 'input' : 'select'"
@copy="onCopy(sItem, key)" :error="errors[sItem.otherCode]" @copy="onCopy(sItem, key)" :error="errors[sItem.otherCode]"
@update:error="errors[sItem.otherCode] = false" @update:error="errors[sItem.otherCode] = false"
:orange-bg="orangeBgFields[sItem.otherCode]" /> :orange-bg="orangeBgFields[sItem.otherCode]" />
@ -396,6 +397,11 @@ export default {
}; };
}, },
methods: { methods: {
//radioselect
isShowRadioSelect(value){
const arr = ["动物种属","细胞系"];
return arr.includes(value)
},
onBeforeReagentSubmit(data, callback, key) { onBeforeReagentSubmit(data, callback, key) {
this.$emit('beforeReagentSubmit', { selectData: data, callback, key, formFields: this.formFields }) this.$emit('beforeReagentSubmit', { selectData: data, callback, key, formFields: this.formFields })
}, },

+ 1
- 0
src/components/Template/mixins/formPackageMixins.js View File

@ -154,6 +154,7 @@ export default {
fillType: sItem.fillType, fillType: sItem.fillType,
maxlength: sItem.otherMaxlength || 50, maxlength: sItem.otherMaxlength || 50,
parentLabel: sItem.label, parentLabel: sItem.label,
options: sItem.otherOptions || [],
} }
}, },
getRadioOtherItem(sItem) { getRadioOtherItem(sItem) {

+ 19
- 5
src/views/business/comps/template/comps/dl/DL023.vue View File

@ -22,7 +22,7 @@
<LineLabel label="template.dl.dl023.czjl" /> <LineLabel label="template.dl.dl023.czjl" />
<!-- 操作记录 --> <!-- 操作记录 -->
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps" <BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
@select="onSelect" :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div> </div>
@ -141,10 +141,13 @@ export default {
label: 'template.dl.dl023.dwzshxbx', label: 'template.dl.dl023.dwzshxbx',
type: 'radio', type: 'radio',
fillType: 'actFill', fillType: 'actFill',
options:[
{label:"动物种属",value:"动物种属"},
{label:"细胞系",value:"细胞系"}
]
options: [
{ label: "动物种属", value: "动物种属" },
{ label: "细胞系", value: "细胞系" }
],
otherCode: 'dwzshxbxOther',
showOtherLabel: false,
otherOptions: this.otherOptions
}, },
sydd: { sydd: {
label: 'template.dl.dl023.sydd', label: 'template.dl.dl023.sydd',
@ -203,11 +206,22 @@ export default {
data() { data() {
return { return {
formData: {}, formData: {},
otherOptions: [],
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
onSelect(e) {
const { key, value } = e
if (key === "dwzshxbx") {//
this.otherOptions = value === '动物种属' ? this.getDictOptions('business_dl_xbmc') : [
{ label: "细胞系1", value: "细胞系1" },
{ label: "细胞系2", value: "细胞系2" },
]
}
},
// //
onRegentSubmit(e) { onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e const { selectInfo, key, rowIndex } = e

Loading…
Cancel
Save