diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index 38ed74d..6ec2b33 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -77,6 +77,7 @@ import Question from "./icons/Question.vue"; import DecimalInput from "./DecimalInput.vue"; import { EventBus } from "@/utils/eventBus" export default { + inject: ['templateFillType'], components: { Question, DecimalInput @@ -155,6 +156,8 @@ export default { }, // 复选框变化处理 onCheckboxChange(val) { + const {templateStatus} = this.$store.state.template; + console.log(this.templateFillType,"templateStatus") // 触发修改记录事件 EventBus.$emit('onModifyRecord', { timestamp: new Date().toLocaleString(), @@ -263,6 +266,7 @@ export default { isShowHandle() { const { fillType } = this.item; const { templateStatus } = this.$store.state.template; + return true; //只有当模板状态是qc和实际填报时,才显示操作按钮 return (templateStatus === "qc" || templateStatus === "actFill") && fillType === "actFill"; }, diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index 2cc2158..00ea965 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -16,7 +16,6 @@ import SWYPFXCBYPZB from "./comps/sp/SWYPFXCBYPZB.vue"; import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue"; import SWYPNBGZYZBB from "./comps/sp/SWYPNBGZYZBB.vue"; import Demo from "./comps/sp/Demo.vue"; -import IndexDBDemo from "./comps/sp/IndexDBDemo.vue"; //公用 import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue"; import MJYLQSQD from "./comps/gy/MJYLQSQD.vue"; @@ -25,7 +24,7 @@ export default { name: "TemplateTable", components: { MJYLQSQD, SYWZPZJHB, - SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB, IndexDBDemo + SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB }, props: { sn: { @@ -40,6 +39,10 @@ export default { type: Object, default: () => { }, }, + emitName: { + type: String, + default: 'onModifyRecord', + }, }, computed: { @@ -52,7 +55,6 @@ export default { 'SP004': 'SWYPNBGZYZBB', 'SYWZPZJHB': 'SYWZPZJHB', 'MJYLQSQD': 'MJYLQSQD', - // 'SP001': 'IndexDBDemo', } } return this.componentMap || "Demo" @@ -66,6 +68,12 @@ export default { } } }, + provide() { + return { + //分发给子组件的fillType + templateFillType: this.fillType, + } + }, data() { return { info: {}, @@ -73,7 +81,7 @@ export default { }, mounted() { EventBus.$on('onModifyRecord', (data) => { - this.$emit("onModifyRecord", data) + this.$emit(this.emitName, data) }) }, beforeDestroy() { diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 233bdaa..5efeb7b 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -43,7 +43,9 @@ export default { this.setTemplateData({}); }, methods: { - + getResource() { + return this.resource; + }, //根据ref数组获取直接formData getFilledFormDataByRefs(refArr = []){ let result = {}; @@ -140,6 +142,7 @@ export default { } } }, + //计算并更新实际目标溶液浓度 先计算实际目标溶液体积再计算实际目标溶液浓度 updateSjmbrynd(item,targetAcSolution){ //实际源溶液浓度÷(实际终体积÷源溶液加入体积); diff --git a/src/views/business/study/comp/tbbd/Bj.vue b/src/views/business/study/comp/tbbd/Bj.vue index b7841b0..424c51f 100644 --- a/src/views/business/study/comp/tbbd/Bj.vue +++ b/src/views/business/study/comp/tbbd/Bj.vue @@ -76,7 +76,7 @@