diff --git a/src/components/Template/BaseInfoFormPackage.vue b/src/components/Template/BaseInfoFormPackage.vue index 7692db7..eb28b6e 100644 --- a/src/components/Template/BaseInfoFormPackage.vue +++ b/src/components/Template/BaseInfoFormPackage.vue @@ -40,7 +40,7 @@
-
{{ sItem.otherLabel ? $t(sItem.otherLabel) : +
{{ sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}
-
+
+
+
{{ sItem.otherLabel ? $t(sItem.otherLabel) : + $t("template.common.other") }}
+
+ +
+
+ :ref="key" :orange-bg="orangeBgFields[key]" /> {{ $t(sItem.subText) }} - +
@@ -125,22 +136,20 @@
- +
-
-
+
+ @change="(e) => onFqyqChange(key, e)" :error="errors[key]" + @update:error="errors[key] = false" />
@@ -166,7 +176,8 @@
+ :style="{ 'width': sItem.labelWidth ? sItem.labelWidth + 'px' : '150px' }" + v-if="sItem.label"> {{ $t(sItem.label) }}
-
-
{{ sItem.otherLabel ? $t(sItem.otherLabel) : +
+
{{ sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}
- - {{ formFields[sItem.subKey] }}
{{ $t(sItem.subText) }} - - -
-
{{ sItem.otherLabel ? $t(sItem.otherLabel) : +
+
{{ sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}
-
{{ formFields[sItem.subKey] }}
- - import HandleFormItem from "./HandleFormItem.vue"; import LineLabel from "./LineLabel.vue"; -import { isShowOther,isShowOtherByRadioAndOther } from "@/utils/formPackageCommon.js"; +import { isShowOther, isShowOtherByRadioAndOther } from "@/utils/formPackageCommon.js"; import { isRegent } from "@/utils/index.js"; import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js' @@ -372,9 +390,9 @@ export default { this.$emit('beforeReagentSubmit', { selectData: data, callback, key, formFields: this.formFields }) }, // 点击按钮 - handleClickButton(e, item,val,data) { + handleClickButton(e, item, val, data) { this.formFields[item.subKey] = val; - this.$emit("clickButton", item,data) + this.$emit("clickButton", item, data) }, // 获取按钮项 getButtonItem(sItem) { @@ -385,10 +403,17 @@ export default { } }, // 处理fqyq变化 - onFqyqChange(key, e){ - console.log(e,key,'fqyq'); + onFqyqChange(key, e) { + console.log(e, key, 'fqyq'); this.formFields[key] = e; - } + }, + //是否显示其他输入框的标题 + isShowOtherLabel(sItem){ + if (sItem.hasOwnProperty("showOtherLabel")) { + return sItem.showOtherLabel + } + return true + }, } } @@ -551,10 +576,11 @@ export default { .mr-20 { margin-right: 20px; } -.form-error-border{ + +.form-error-border { box-shadow: 0 0 6px #ffc3c3; - padding: 8px; - border-radius: 4px; - border: 1px solid #ff5d5d; + padding: 8px; + border-radius: 4px; + border: 1px solid #ff5d5d; } \ No newline at end of file diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index f24a8e9..c316990 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -23,6 +23,7 @@ + {{ item.checkboxLabel }} ({ @@ -915,7 +913,7 @@ export default { const { otherValues: oldOtherValues,checkboxValues: oldCheckboxValues } = this.oldCheckboxListValue; const o = { "checkboxListValue":{oldValue:oldCheckboxValues,newValue:checkboxValues,des:""}, - "checkboxListOther":{oldValue:oldOtherValues[this.currentOtherCode],newValue:otherValues[this.currentOtherCode],des:""}, + "checkboxListOther":{oldValue:oldOtherValues[this.currentOtherCode],newValue:otherValues[this.currentOtherCode],des:"样品信息:"}, } return o[this.currentHandleType]; }, @@ -1066,8 +1064,8 @@ export default { isModify = !!this.oldFqyqValue.mainRadio }else if(this.type === "checkboxList"){ const current = this.getCheckboxListInfo(); - recordOldVlaue = `${current.des+current.oldValue}`; - recordValue = `${current.des+current.newValue}`; + recordOldVlaue = `${current.des+(current.oldValue || '')}`; + recordValue = `${current.des+(current.newValue || '')}`; isModify = !!current.oldValue; } const record = { diff --git a/src/utils/formPackageCommon.js b/src/utils/formPackageCommon.js index 568e8d3..b431518 100644 --- a/src/utils/formPackageCommon.js +++ b/src/utils/formPackageCommon.js @@ -5,7 +5,7 @@ export const isShowOther = (v = [], col) => { } // 确保v是数组类型,以避免类型错误 const arr = Array.isArray(v) ? v : [v] - const otherArr = ['其他', '遮光', 'CA-QC Dilution-', '拒绝', '部分接受'] + const otherArr = ['其他', '遮光', 'CA-QC Dilution-', '拒绝', '部分接受',"污染"] return arr.some((item) => otherArr.includes(item)) } diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index 1ed5232..eea82a2 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -31,6 +31,7 @@ import SP007 from "./comps/sp/SP007.vue"; import SP008 from "./comps/sp/SP008.vue"; import SP009 from "./comps/sp/SP009.vue"; import SP0019 from "./comps/sp/SP0019.vue"; +import SP0020 from "./comps/sp/SP0020.vue"; import Demo from "./comps/sp/Demo.vue"; //供试品 import GSP001 from "./comps/gsp/GSP001.vue"; @@ -111,7 +112,7 @@ export default { //供试品 GSP001,GSP002, GSP003, GSP004,GSP009, GSP010, //色谱 - SP001, SP003, SP00456,SP007, SP008, SP009,SP0019, + SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020, // PCR PCR002, PCR003, PCR004, PCR005, //LBA @@ -206,6 +207,7 @@ export default { 'SP017': 'SP008', 'SP018': 'SP008', 'SP019': 'SP0019', + 'SP020': 'SP0020', //供试品 'GSP001': 'GSP001', diff --git a/src/views/business/comps/template/comps/sp/SP0020.vue b/src/views/business/comps/template/comps/sp/SP0020.vue new file mode 100644 index 0000000..18fbaf4 --- /dev/null +++ b/src/views/business/comps/template/comps/sp/SP0020.vue @@ -0,0 +1,124 @@ + + + + + \ No newline at end of file diff --git a/src/views/business/comps/template/formConfig/sp/SP0020.js b/src/views/business/comps/template/formConfig/sp/SP0020.js new file mode 100644 index 0000000..a951969 --- /dev/null +++ b/src/views/business/comps/template/formConfig/sp/SP0020.js @@ -0,0 +1,15 @@ +export const getSynrFormConfig = ($this) => { + return [ + { + type: 'step', + config: { + yqmxh: { + label: '色谱柱型号', + type: 'yq', + fillType: 'actFill', + filledCodes:['mc','bh'], + }, + } + }, + ] +} \ No newline at end of file