diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue index 2c01dffd..8f9ad93f 100644 --- a/src/views/equipment/timing-diagram/output/index.vue +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -141,7 +141,7 @@ export default { top: 48, left: 48, right: 24, - bottom: 24, + bottom: 64, }, legend: { top: 0, @@ -171,7 +171,10 @@ export default { }, }, axisLabel: { - color: '#0007', + // show: true, + // textStyle: { + // color: '#0007', + // }, }, data: [], // data: Array(24) diff --git a/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue b/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue index 58fcf31e..f3c06269 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue @@ -62,7 +62,7 @@ prop="productionLineId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> + @change="$emit('update', innerDataForm)"> @@ -112,12 +112,11 @@ prop="checkTime" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> + @change="$emit('update', innerDataForm)"> @@ -126,15 +125,17 @@ @@ -163,6 +164,7 @@ export default { inspectionDetList: [], productionLineList: [], sectionList: [], + innerDataForm: {}, }; }, mounted() { @@ -173,12 +175,18 @@ export default { ); }, watch: { - 'dataForm.productionLineId': { + 'innerDataForm.productionLineId': { handler: async function (plId) { if (plId) await this.getWorksectionList(plId); }, immediate: true, }, + dataForm: { + handler: function (dataForm) { + this.innerDataForm = JSON.parse(JSON.stringify(dataForm)); + }, + immediate: true, + }, }, methods: { /** 模拟透传 ref */ @@ -190,8 +198,8 @@ export default { }, async handleProductlineChange(id) { await this.getWorksectionList(id); - this.dataForm.sectionId = null; - this.$emit('update', this.dataForm); + this.innerDataForm.sectionId = null; + this.$emit('update', this.innerDataForm); }, // getCode async getCode(url) { diff --git a/src/views/quality/monitoring/qualityInspectionRecord/index.vue b/src/views/quality/monitoring/qualityInspectionRecord/index.vue index 2eb641ef..8dec558e 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/index.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/index.vue @@ -39,7 +39,7 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - + @@ -55,13 +55,13 @@ import { } from '@/api/monitoring/qualityInspectionRecord'; // import Editor from '@/components/Editor'; import moment from 'moment'; -// import DialogForm from './dialogForm.vue' +import DialogForm from './dialogForm.vue'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; export default { name: 'QualityInspectionRecord', components: { - // DialogForm + DialogForm, }, mixins: [basicPageMixin], data() { @@ -276,6 +276,12 @@ export default { // this.getProductLineList(); }, watch: { + form: { + handler: function (val) { + console.log('form change:', val); + }, + deep: true + } // 注册弹窗里产线改变时的监听事件 // 'form.productionLineId': { // handler: function (val) { @@ -367,7 +373,11 @@ export default { const id = row.id; getQualityInspectionRecord(id).then((response) => { /** 因为后端返回的时间是时间戳格式,需转换 */ - this.form = this.filterData(response.data, Object.keys(this.form)); + const info = {} + Object.keys(this.form).forEach(key => { + info[key] = response.data[key] + }); + this.form = info; this.open = true; this.title = '修改质量检查信息记录表'; });