From f51f7affaf29fe10a11f5630c26367ca89461142 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 20 Dec 2024 11:08:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:enum.js=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/enum.js | 14 ++++++++++++++ src/views/qm/defect.vue | 3 +-- src/views/qm/testItem_form.vue | 9 ++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/utils/enum.js b/src/utils/enum.js index 06ddce2f..df6f5d13 100644 --- a/src/utils/enum.js +++ b/src/utils/enum.js @@ -70,6 +70,20 @@ export const mioTypeEnum = new EnumFactory({ 'other_in': '其他入库', 'other_out': '其他出库' }) +export const fiedTypeEnum = new EnumFactory({ + 'input-int': '整数', + 'input-number': '小数', + 'input-text': '文本', + 'select-text': '单选', + 'selects-text': '多选', +}) +export const testTagsEnum = new EnumFactory({ + 'purin': '入厂检验', + 'first': '首件检验', + 'prod': '成品检验', + 'process': '过程检验', + 'performance': '性能检验', +}) export const productTypeEnum = new EnumFactory({ 0: '电/水/气', 10: '成品', diff --git a/src/views/qm/defect.vue b/src/views/qm/defect.vue index e7f49fe2..9877887f 100644 --- a/src/views/qm/defect.vue +++ b/src/views/qm/defect.vue @@ -150,8 +150,7 @@ this.addForm.okcate=10; this.limitedVisible = true; // 清除验证状态 - this.$refs.addForm.clearValidate(); - // this.addForm = Object.assign({}, defaultForm); + // this.$refs.addForm.clearValidate(); }, submitHandle(){ let that = this; diff --git a/src/views/qm/testItem_form.vue b/src/views/qm/testItem_form.vue index 861d5399..1b892f3d 100644 --- a/src/views/qm/testItem_form.vue +++ b/src/views/qm/testItem_form.vue @@ -184,9 +184,12 @@ export default { this.getmcateTagsOptions(); }, methods: { - getmcateTagsOptions() { - this.$API.mtm.material.cates.req().then((res) => { - this.mcateTagsOptions = res; + async getmcateTagsOptions() { + let that = this; + await that.$API.mtm.material.cates.req().then((res) => { + if(res&&res.length>0){ + that.mcateTagsOptions = res; + } }); }, addComponent(type) {