diff --git a/src/components/Template/BaseInfoFormPackage.vue b/src/components/Template/BaseInfoFormPackage.vue index 78551ba..4bcd338 100644 --- a/src/components/Template/BaseInfoFormPackage.vue +++ b/src/components/Template/BaseInfoFormPackage.vue @@ -173,13 +173,14 @@ @copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)" :error="errors[key]" @update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" /> -
-
{{ sItem.otherLabel ? $t(sItem.otherLabel) : +
+
{{ sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}
@@ -396,6 +397,11 @@ export default { }; }, methods: { + //是否显示radio后的select + isShowRadioSelect(value){ + const arr = ["动物种属","细胞系"]; + return arr.includes(value) + }, onBeforeReagentSubmit(data, callback, key) { this.$emit('beforeReagentSubmit', { selectData: data, callback, key, formFields: this.formFields }) }, diff --git a/src/components/Template/mixins/formPackageMixins.js b/src/components/Template/mixins/formPackageMixins.js index 180e26f..afdf91b 100644 --- a/src/components/Template/mixins/formPackageMixins.js +++ b/src/components/Template/mixins/formPackageMixins.js @@ -154,6 +154,7 @@ export default { fillType: sItem.fillType, maxlength: sItem.otherMaxlength || 50, parentLabel: sItem.label, + options: sItem.otherOptions || [], } }, getRadioOtherItem(sItem) { diff --git a/src/views/business/comps/template/comps/dl/DL023.vue b/src/views/business/comps/template/comps/dl/DL023.vue index 7d100ec..431893c 100644 --- a/src/views/business/comps/template/comps/dl/DL023.vue +++ b/src/views/business/comps/template/comps/dl/DL023.vue @@ -22,7 +22,7 @@ + @select="onSelect" :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
@@ -141,10 +141,13 @@ export default { label: 'template.dl.dl023.dwzshxbx', type: 'radio', fillType: 'actFill', - options:[ - {label:"动物种属",value:"动物种属"}, - {label:"细胞系",value:"细胞系"} - ] + options: [ + { label: "动物种属", value: "动物种属" }, + { label: "细胞系", value: "细胞系" } + ], + otherCode: 'dwzshxbxOther', + showOtherLabel: false, + otherOptions: this.otherOptions }, sydd: { label: 'template.dl.dl023.sydd', @@ -203,11 +206,22 @@ export default { data() { return { formData: {}, + otherOptions: [], }; }, mounted() { }, 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) { const { selectInfo, key, rowIndex } = e