From bd1bcd5ea2529e4940c391be1a78f9cde92ab13a Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Fri, 16 Jan 2026 16:56:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][upd?= =?UTF-8?q?ate]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/BaseInfoFormPcakge.vue | 28 +- src/components/Template/CustomTable.vue | 9 + src/components/Template/HandleFormItem.vue | 37 +-- src/components/Template/Step.vue | 6 +- src/lang/en/template/commonTemplate.js | 2 + src/lang/index.js | 4 +- src/lang/zh/template/commonTemplate.js | 2 + .../comps/template/comps/sp/SWYPBQGZYZBB.vue | 4 +- .../comps/template/comps/sp/SWYPFXCBYPZB.vue | 4 +- .../comps/template/comps/sp/SWYPNBGZYZBB.vue | 303 +------------------- .../template/formConfig/paralleAndLadderConfig.js | 315 +++++++++++++++++++++ .../comps/template/mixins/paralleAndladderMixin.js | 6 + .../comps/template/mixins/templateMixin.js | 1 - vue.config.js | 4 +- 14 files changed, 387 insertions(+), 338 deletions(-) create mode 100644 src/views/business/comps/template/formConfig/paralleAndLadderConfig.js create mode 100644 src/views/business/comps/template/mixins/paralleAndladderMixin.js diff --git a/src/components/Template/BaseInfoFormPcakge.vue b/src/components/Template/BaseInfoFormPcakge.vue index 277f888..5c11b64 100644 --- a/src/components/Template/BaseInfoFormPcakge.vue +++ b/src/components/Template/BaseInfoFormPcakge.vue @@ -39,7 +39,7 @@
-
其他
+
{{ $t("template.common.other") }}
@@ -106,7 +107,7 @@ @change="onSelectChange(key, $event)" :error="errors[key]" @update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" />
-
其他
+
{{ $t("template.common.other") }}
{{ formFields[sItem.subKey] }}
-
其他
+
{{ $t("template.common.other") }}
{{ formFields[sItem.subKey] }}
-
- +
@@ -301,7 +302,7 @@ export default { //获取其他下拉框的配置 getOtherItem(sItem) { return { - label: "其他", + label: "template.common.other", fillType: sItem.fillType, maxlength: sItem.otherMaxlength || 50, parentLabel: sItem.label, @@ -369,7 +370,7 @@ export default { } else { result[otherCode] = formData[otherCode] || formFields[otherCode] || ''; } - config[otherCode] = { label: "其他", parentKey: key, type: "input", fillType: currentConfig.fillType } + config[otherCode] = { label: "template.common.other", parentKey: key, type: "input", fillType: currentConfig.fillType } } if (currentConfig.subKey) { const { subKey } = currentConfig; @@ -434,7 +435,7 @@ export default { } if (this.isValueEmpty(formFields[key])) { // 其他字段需要判断是否显示再校验 - if (o.label === "其他" && !this.isShowOther(formFields[o.parentKey])) { + if (o.label === "template.common.other" && !this.isShowOther(formFields[o.parentKey])) { continue } //span的字段不校验 @@ -460,7 +461,6 @@ export default { } } } - return { valid: errors.length === 0, errors: errors diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue index afd1d33..ff793b9 100644 --- a/src/components/Template/CustomTable.vue +++ b/src/components/Template/CustomTable.vue @@ -72,6 +72,14 @@ @update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" :orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> + @@ -214,6 +222,7 @@ export default { // 数据校验 const validateResult = this.validateFormData(); + console.log(validateResult,"validateResult") return new Promise((resolve, reject) => { if (validateResult.valid) { resolve({ diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index c9d4449..6bc490e 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -32,7 +32,6 @@ {{ getPlaceholder() }}
-
@@ -351,21 +350,12 @@ export default { this.$emit('update:error', true); } - // 检查值是否发生变化 - if (this.templateFillType === "actFill") { - // 值发生了变化,需要弹出密码输入框 - const isSame = this.isEqual(this.oldValue, this.inputValue); - if (this.oldValue && !isSame) { - this.$refs.editSignRef.show() - }else if (!this.oldValue) {//如果是第一次填写,不需要密码验证 - this.handleUpdateRecord() - } - - } else { - // 值没有变化,正常触发 blur和change 事件 - this.$emit("blur", val) - this.$emit('input', val); - this.$emit("change", val) + // 值发生了变化,需要弹出密码输入框 + const isSame = this.isEqual(this.oldValue, this.inputValue); + if (this.oldValue && !isSame && this.templateFillType === "actFill") { + this.$refs.editSignRef.show() + }else{//如果是第一次填写,不需要密码验证 + this.handleUpdateRecord() } }, @@ -391,7 +381,9 @@ export default { if (data) { record.reason = data.remark } - this.updateZdxgjl(record); + if(this.templateFillType === "actFill"){//只有实际填报的时候才记录修改记录 + this.updateZdxgjl(record); + } const params = { type: "fieldChanged", newRecord: record, @@ -478,8 +470,9 @@ export default { }, //判断是否显示操作按钮 isShowHandle() { + const { fillType } = this.item; //只有当模板状态不是预填时,才显示操作按钮 - return this.templateFillType !== "preFill" + return this.templateFillType !== "preFill" && fillType === "actFill" }, //判断是否禁用 getDisabled() { @@ -504,13 +497,13 @@ export default { return "" } if (type === "clickable") { - return "请选择" + return this.$t("template.common.pleaseSelect") } - let prex = "请输入"; + let prex = "template.common.pleaseFillIn" if (type === "select" || type === "dateTime") { - prex = "请选择" + prex = "template.common.pleaseSelect" } - return placeholder ? this.$t(placeholder) : (prex + this.$t(label)) + return placeholder ? this.$t(placeholder) : (this.$t(prex) + this.$t(label)) }, onCopy() { diff --git a/src/components/Template/Step.vue b/src/components/Template/Step.vue index 026512b..675f218 100644 --- a/src/components/Template/Step.vue +++ b/src/components/Template/Step.vue @@ -167,12 +167,12 @@ export default { }, 'formData': { handler(newVal) { - console.log('newVal', newVal) + console.log('stepValue', newVal) if(!newVal || newVal.length === 0) return this.steps = newVal.map((step) => ({ id: this.stepId++, type: step.type || '', - formData: step.formData || {} + formData: step })) }, deep: true, @@ -219,6 +219,8 @@ export default { }, onFormUpdate(stepIndex, formData) { + console.log('stepIndex', stepIndex) + console.log('formData', formData) this.steps[stepIndex].formData = formData }, diff --git a/src/lang/en/template/commonTemplate.js b/src/lang/en/template/commonTemplate.js index e9a5672..f942328 100644 --- a/src/lang/en/template/commonTemplate.js +++ b/src/lang/en/template/commonTemplate.js @@ -61,4 +61,6 @@ export default { other: 'Other', otherInfo: 'Other Information', unit: 'unit', + pleaseFillIn:"Please fill in", + pleaseSelect:"Please select" } diff --git a/src/lang/index.js b/src/lang/index.js index 5e10739..56520d5 100644 --- a/src/lang/index.js +++ b/src/lang/index.js @@ -6,6 +6,7 @@ import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN' // element-ui lan import enLocale from './en' import zhLocale from './zh' + Vue.use(VueI18n) const messages = { @@ -23,7 +24,8 @@ const i18n = new VueI18n({ // 设置语言 选项 en | zh locale: Cookies.get('language') || 'zh_CN', // 设置文本内容 - messages + messages, + silentTranslationWarn: true // 禁止翻译警告警告,太多未翻译的时候浏览器会太卡。 }) export default i18n diff --git a/src/lang/zh/template/commonTemplate.js b/src/lang/zh/template/commonTemplate.js index 39504f3..09af724 100644 --- a/src/lang/zh/template/commonTemplate.js +++ b/src/lang/zh/template/commonTemplate.js @@ -61,4 +61,6 @@ export default { other: '其他', otherInfo: '其他信息', unit: '单位', + pleaseFillIn:"请输入", + pleaseSelect:"请选择" } diff --git a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue index f89ca92..fcbfcc1 100644 --- a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue @@ -174,11 +174,11 @@ export default { type: "cellItem", label: "处理时间", config: { - createTime: { + startDate: { label: "开始时间", type: "input", }, - endTime: { + endDate: { label: "结束时间", type: "input", }, diff --git a/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue b/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue index 459a8cd..ccd0d99 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue @@ -135,11 +135,11 @@ export default { type: "cellItem", label: "配置时间", config: { - createTime: { + startDate: { label: "开始时间", type: "input", }, - endTime: { + endDate: { label: "结束时间", type: "input", }, diff --git a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue index 0370dee..4b2a77a 100644 --- a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue @@ -145,7 +145,7 @@ import templateMixin from "../../mixins/templateMixin"; import CustomTable from '@/components/Template/CustomTable.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" - +import {getLadderColumnsConfig,getParallelColumnsConfig} from "../../formConfig/paralleAndLadderConfig.js"; export default { name: "SWYPBQGZYZBB", components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, @@ -272,11 +272,11 @@ export default { type: "cellItem", label: "处理时间", config: { - createTime: { + startDate: { label: "开始时间", type: "input", }, - endTime: { + endDate: { label: "结束时间", type: "input", }, @@ -380,292 +380,11 @@ export default { ] }, paralleStepColumns() { - return [ - { - label: "目标溶液编号", - prop: "targetSolutionCode", - bodyType: "input", - subType: "span", - subKey: "subTargetSolutionCode", - bodyFillType: "preFill", - width: 280 - }, - { - label: "起始溶液编号", - prop: "startSolutionCode", - width: 280, - bodyType: "input", - bodyFillType: "actFill", - bodyMaxlength: 10, - }, - { - label: "预设起始溶液体积", - prop: "targetStartSolutionVolume", - width: 280, - headerSelectKey: "targetStartSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "targetStartSolutionVolumePrecision", - bodyFillType: "preFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "targetStartSolutionVolumePrecision", - bodyMaxlength: 10, - bodySubPlaceholder: "请输入保留小数位数", - }, - { - label: "实际起始溶液体积", - prop: "actStartSolutionVolume", - width: 280, - headerSelectKey: "actStartSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodyFillType: "actFill", - bodyMaxlength: 10, - copyFrom: "targetStartSolutionVolume",//复制哪个字段 - }, - { - label: "预设稀释液体积", - prop: "targetDiluentVolume", - width: 280, - headerSelectKey: "targetDiluentVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "targetDiluentVolumePrecision", - bodyFillType: "preFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "targetDiluentVolumePrecision", - bodyMaxlength: 10, - bodySubPlaceholder: "请输入保留小数位数", - }, - { - label: "实际稀释液体积", - prop: "actDiluentVolume", - width: 280, - headerSelectKey: "actDiluentVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodyFillType: "actFill", - bodyMaxlength: 10, - copyFrom: "targetDiluentVolume",//复制哪个字段 - }, - { - label: "预设目标溶液浓度", - prop: "targetSolutionConcentration", - width: 280, - headerSelectKey: "targetSolutionConcentrationUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_nddw'), - bodyType: "inputNumber", - bodyFillType: "preFill", - bodyMaxlength: 10, - }, - { - label: "实际目标溶液浓度", - prop: "actSolutionConcentration", - width: 280, - headerSelectKey: "actSolutionConcentrationUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_nddw'), - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "actSolutionConcentrationPrecision", - bodyFillType: "actFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "actSolutionConcentrationPrecision", - bodyMaxlength: 10, - copyFrom: "targetSolutionConcentration",//复制哪个字段 - bodySubPlaceholder: "请输入保留小数位数", - }, - { - label: "预设目标溶液体积", - prop: "targetSolutionVolume", - width: 280, - headerSelectKey: "targetSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodyFillType: "preFill", - bodyMaxlength: 10, - }, - { - label: "实际目标溶液体积", - prop: "actSolutionVolume", - width: 280, - headerSelectKey: "actSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "actSolutionVolumePrecision", - bodyFillType: "actFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "actSolutionVolumePrecision", - bodyMaxlength: 10, - copyFrom: "targetSolutionVolume",//复制哪个字段 - bodySubPlaceholder: "请输入保留小数位数", - }, - ] + return getParallelColumnsConfig(this); }, - // 步骤表格列配置 + // 阶梯配置表格列配置 ladderStepColumns() { - return [ - { - label: "目标溶液编号", - prop: "targetSolutionCode", - bodyType: "input", - subType: "span", - subKey: "subTargetSolutionCode", - bodyFillType: "preFill", - width: 280 - }, - { - label: "起始溶液编号", - prop: "startSolutionCode", - width: 280, - bodyType: "input", - bodyFillType: "actFill", - bodyMaxlength: 10, - }, - { - label: "预设起始溶液体积", - prop: "targetStartSolutionVolume", - width: 280, - headerSelectKey: "targetStartSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "targetStartSolutionVolumePrecision", - bodyFillType: "preFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "targetStartSolutionVolumePrecision", - bodyMaxlength: 10, - bodySubPlaceholder: "请输入保留小数位数", - }, - { - label: "实际起始溶液体积", - prop: "actStartSolutionVolume", - width: 280, - headerSelectKey: "actStartSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodyFillType: "actFill", - bodyMaxlength: 10, - copyFrom: "targetStartSolutionVolume",//复制哪个字段 - }, - { - label: "预设稀释液体积", - prop: "targetDiluentVolume", - width: 280, - headerSelectKey: "targetDiluentVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "targetDiluentVolumePrecision", - bodyFillType: "preFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "targetDiluentVolumePrecision", - bodyMaxlength: 10, - bodySubPlaceholder: "请输入保留小数位数", - }, - { - label: "实际稀释液体积", - prop: "actDiluentVolume", - width: 280, - headerSelectKey: "actDiluentVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodyFillType: "actFill", - bodyMaxlength: 10, - copyFrom: "targetDiluentVolume",//复制哪个字段 - }, - { - label: "预设目标溶液浓度", - prop: "targetSolutionConcentration", - width: 280, - headerSelectKey: "targetSolutionConcentrationUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_nddw'), - bodyType: "inputNumber", - bodyFillType: "preFill", - bodyMaxlength: 10, - }, - { - label: "实际目标溶液浓度", - prop: "actSolutionConcentration", - width: 280, - headerSelectKey: "actSolutionConcentrationUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_nddw'), - - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "actSolutionConcentrationPrecision", - bodyFillType: "actFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "actSolutionConcentrationPrecision", - bodyMaxlength: 10, - copyFrom: "targetSolutionConcentration",//复制哪个字段 - bodySubPlaceholder: "请输入保留小数位数", - }, - { - label: "预设目标溶液体积", - prop: "targetSolutionVolume", - width: 280, - headerSelectKey: "targetSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - bodyType: "inputNumber", - bodyFillType: "preFill", - bodyMaxlength: 10, - }, - { - label: "实际目标溶液体积", - prop: "actSolutionVolume", - width: 280, - headerSelectKey: "actSolutionVolumeUnit", - fillType: "preFill", - headerOptions: this.getDictOptions('business_tjdw'), - - bodyType: "inputNumber", - bodySubType: "inputNumber", - bodySubKey: "actSolutionVolumePrecision", - bodyFillType: "actFill", - bodySubFillType: "preFill", - showBodySub: this.fillType === "preFill", - bodyDisabled: true, - bodyPrecisionKey: "actSolutionVolumePrecision", - bodyMaxlength: 10, - copyFrom: "targetSolutionVolume",//复制哪个字段 - bodySubPlaceholder: "请输入保留小数位数", - }, - ] + return getLadderColumnsConfig(this); }, }, data() { @@ -795,7 +514,7 @@ export default { } return await this.validFormFields(refsToValidate); }, - getRealFormData(){ + getFilledFormData(){ const baseData = this.$refs.baseInfoRef.getFilledFormData(); const conditionData = this.$refs.storageConditionRef.getFilledFormData(); @@ -810,7 +529,7 @@ export default { ladderConfigsData.push({ ...ladderFormData, ...ladderTableFormData, - ladderStepData, + ladderStepData:ladderStepData.stepData, showLadderConfig: true }); } @@ -827,7 +546,7 @@ export default { paralleConfigsData.push({ ...paralleFormData, ...paralleTableFormData, - paralleStepData, + paralleStepData:paralleStepData.stepData, showParalleConfig: true }); } @@ -845,11 +564,11 @@ export default { }, async getFormData() { //先校验再获取值 - const validFlag = this.validFields(); + const validFlag = await this.validFields(); if(!validFlag){ return false; } - return this.getRealFormData(); + return this.getFilledFormData(); }, async onSave() { const formData = await this.getFormData(); diff --git a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js new file mode 100644 index 0000000..7bea198 --- /dev/null +++ b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js @@ -0,0 +1,315 @@ +// 阶梯配置表格列配置 +export const getLadderColumnsConfig = ($this) => { + return [ + { + label: "目标溶液编号", + prop: "targetSolutionCode", + bodyType: "input", + bodySubType: "span", + bodySubKey: "subTargetSolutionCode", + bodyFillType: "preFill", + width: 280 + }, + { + label: "起始溶液编号", + prop: "startSolutionCode", + width: 280, + bodyType: "input", + bodyFillType: "actFill", + bodyMaxlength: 10, + }, + { + label: "预设起始溶液体积", + prop: "targetStartSolutionVolume", + width: 280, + headerSelectKey: "targetStartSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: "inputNumber", + bodySubType: "inputNumber", + bodySubKey: "targetStartSolutionVolumePrecision", + bodyFillType: "preFill", + bodySubFillType: "preFill", + showBodySub: $this.fillType === "preFill", + bodyPrecisionKey: "targetStartSolutionVolumePrecision", + bodyMaxlength: 10, + bodySubPlaceholder: "请输入保留小数位数", + }, + { + label: "实际起始溶液体积", + prop: "actStartSolutionVolume", + width: 280, + headerSelectKey: "actStartSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: "inputNumber", + bodyFillType: "actFill", + bodyMaxlength: 10, + copyFrom: "targetStartSolutionVolume",//复制哪个字段 + }, + { + label: "预设稀释液体积", + prop: "targetDiluentVolume", + width: 280, + headerSelectKey: "targetDiluentVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + + bodyType: "inputNumber", + bodySubType: "inputNumber", + bodySubKey: "targetDiluentVolumePrecision", + bodyFillType: "preFill", + bodySubFillType: "preFill", + showBodySub: $this.fillType === "preFill", + + bodyPrecisionKey: "targetDiluentVolumePrecision", + bodyMaxlength: 10, + bodySubPlaceholder: "请输入保留小数位数", + }, + { + label: "实际稀释液体积", + prop: "actDiluentVolume", + width: 280, + headerSelectKey: "actDiluentVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: "inputNumber", + bodyFillType: "actFill", + bodyMaxlength: 10, + copyFrom: "targetDiluentVolume",//复制哪个字段 + }, + { + label: "预设目标溶液浓度", + prop: "targetSolutionConcentration", + width: 280, + headerSelectKey: "targetSolutionConcentrationUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_nddw'), + bodyType: "inputNumber", + bodyFillType: "preFill", + bodyMaxlength: 10, + }, + { + label: "实际目标溶液浓度", + prop: "actSolutionConcentration", + width: 280, + headerSelectKey: "actSolutionConcentrationUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_nddw'), + + bodyType: "inputNumber", + bodySubType: "inputNumber", + bodySubKey: "actSolutionConcentrationPrecision", + bodyFillType: "actFill", + bodySubFillType: "preFill", + showBodySub: $this.fillType === "preFill", + + bodyPrecisionKey: "actSolutionConcentrationPrecision", + bodyMaxlength: 10, + copyFrom: "targetSolutionConcentration",//复制哪个字段 + bodySubPlaceholder: "请输入保留小数位数", + }, + { + label: "预设目标溶液体积", + prop: "targetSolutionVolume", + width: 280, + headerSelectKey: "targetSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: "inputNumber", + bodyFillType: "preFill", + bodyMaxlength: 10, + }, + { + label: "实际目标溶液体积", + prop: "actSolutionVolume", + width: 280, + headerSelectKey: "actSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + + bodyType: "inputNumber", + bodySubType: "inputNumber", + bodySubKey: "actSolutionVolumePrecision", + bodyFillType: "actFill", + bodySubFillType: "preFill", + showBodySub: $this.fillType === "preFill", + + bodyPrecisionKey: "actSolutionVolumePrecision", + bodyMaxlength: 10, + copyFrom: "targetSolutionVolume",//复制哪个字段 + bodySubPlaceholder: "请输入保留小数位数", + }, + ] +} +// 平行配置表格列配置 +export const getParallelColumnsConfig = ($this) => { + return [ + { + label: "目标溶液编号", + prop: "targetSolutionCode", + bodyType: "select", + bodyOptions:[{ + label: "溶液1", + value: "1", + }], + subType: "span", + subKey: "subTargetSolutionCode", + bodyFillType: "preFill", + width: 280 + }, + { + label: "预设目标溶液浓度", + prop: "targetSolutionConcentration", + width: 280, + headerSelectKey: "targetSolutionConcentrationUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_nddw'), + bodyType: "inputNumber", + bodyFillType: "preFill", + bodyMaxlength: 10, + }, + { + label: "实际目标溶液浓度", + prop: "actSolutionConcentration", + width: 280, + headerSelectKey: "actSolutionConcentrationUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_nddw'), + + bodyType: "inputNumber", + bodySubType: "inputNumber", + bodySubKey: "actSolutionConcentrationPrecision", + bodyFillType: "actFill", + bodySubFillType: "preFill", + showBodySub: $this.fillType === "preFill", + + bodyPrecisionKey: "actSolutionConcentrationPrecision", + bodyMaxlength: 10, + copyFrom: "targetSolutionConcentration",//复制哪个字段 + bodySubPlaceholder: "请输入保留小数位数", + }, + { + label: "实际目标溶液体积", + prop: "actSolutionVolume", + width: 280, + headerSelectKey: "actSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + + bodyType: "inputNumber", + bodySubType: "inputNumber", + bodySubKey: "actSolutionVolumePrecision", + bodyFillType: "actFill", + bodySubFillType: "preFill", + showBodySub: $this.fillType === "preFill", + + bodyPrecisionKey: "actSolutionVolumePrecision", + bodyMaxlength: 10, + copyFrom: "targetSolutionVolume",//复制哪个字段 + bodySubPlaceholder: "请输入保留小数位数", + }, + { + label: "目标溶液有效周期", + prop: "targetSolutionCycle", + width: 280, + fillType: "preFill", + bodyType: "inputNumber", + bodySubType: "select", + bodySubKey: "targetSolutionCyclePrecision", + bodySubOptions: $this.getDictOptions('business_yxqdw'), + bodyFillType: "actFill", + bodySubFillType: "preFill", + bodyMaxlength: 10, + }, + { + label: "目标溶液失效日", + prop: "targetSolutionExpirationDate", + width: 280, + bodyType: "span", + }, + { + label: "预设原始溶液编号", + prop: "startSolutionCode", + width: 280, + bodyType: "input", + bodyFillType: "preFill", + }, + { + label: "实际原始溶液编号", + prop: "actStartSolutionCode", + width: 280, + bodyType: "input", + bodyFillType: "actFill", + }, + { + label: "预设原始溶液浓度", + prop: "targetStartSolutionConcentration", + width: 280, + bodyType: "inputNumber", + bodyFillType: "preFill", + bodySubType: "select", + bodySubKey: "targetStartSolutionConcentrationPrecision", + bodySubOptions: $this.getDictOptions('business_nddw'), + bodySubFillType: "preFill", + bodyMaxlength: 10, + }, + { + label: "预设原始溶液体积", + prop: "targetStartSolutionVolume", + headerSelectKey: "targetStartSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + width: 280, + bodyType: "inputNumber", + bodyFillType: "preFill", + bodySubType: "inputNumber", + bodySubKey: "targetStartSolutionVolumePrecision", + bodySubFillType: "preFill", + bodyMaxlength: 10, + bodyPrecisionKey: "targetStartSolutionVolumePrecision", + bodyMaxlength: 10, + bodySubPlaceholder: "请输入保留小数位数", + }, + + { + label: "实际原始溶液体积", + prop: "actStartSolutionVolume", + headerSelectKey: "actStartSolutionVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + width: 280, + bodyType: "inputNumber", + bodyFillType: "actFill", + bodyMaxlength: 10, + }, + + { + label: "预计稀释液体积", + prop: "preDiluentVolume", + headerSelectKey: "preDiluentVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + width: 280, + bodyType: "inputNumber", + bodyFillType: "preFill", + bodySubType: "inputNumber", + bodySubKey: "preDiluentVolumePrecision", + bodySubFillType: "preFill", + bodyMaxlength: 10, + bodyPrecisionKey: "preDiluentVolumePrecision", + bodySubPlaceholder: "请输入保留小数位数", + }, + { + label: "实际稀释液体积", + prop: "actDiluentVolume", + headerSelectKey: "actDiluentVolumeUnit", + fillType: "preFill", + headerOptions: $this.getDictOptions('business_tjdw'), + width: 280, + bodyType: "inputNumber", + bodyFillType: "actFill", + bodyMaxlength: 10, + }, + ] +} \ No newline at end of file diff --git a/src/views/business/comps/template/mixins/paralleAndladderMixin.js b/src/views/business/comps/template/mixins/paralleAndladderMixin.js new file mode 100644 index 0000000..6bc83ce --- /dev/null +++ b/src/views/business/comps/template/mixins/paralleAndladderMixin.js @@ -0,0 +1,6 @@ +import moment from "moment"; +export default { + methods: { + + }, +} \ No newline at end of file diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 6384ffe..27573b4 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -70,7 +70,6 @@ export default { this.$message.error("请添加步骤"); return } - console.log(err, "err") this.$message.error("表单内容未填完,请填写后再提交"); }); if (validFormData) { diff --git a/vue.config.js b/vue.config.js index 0461fab..bf3ddf1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -34,8 +34,8 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, - // target: `http://39.99.251.173:8080`, + // target: `http://localhost:8080`, + target: `http://39.99.251.173:8080`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''