From a7d02670d9ed762b99afbd510fda0e74e95e6aee Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Aug 2024 14:27:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=A3=80=E6=B5=8B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_base/testItem_form.vue | 156 ++++++++++++++++++++------- 1 file changed, 115 insertions(+), 41 deletions(-) diff --git a/src/views/enm_base/testItem_form.vue b/src/views/enm_base/testItem_form.vue index e0d2ae1d..bf783814 100644 --- a/src/views/enm_base/testItem_form.vue +++ b/src/views/enm_base/testItem_form.vue @@ -13,7 +13,7 @@ :model="form" :rules="rules" label-position="right" - label-width="80px" + label-width="100px" style="padding: 0 10px" > @@ -25,6 +25,93 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加 + + + + + + - - - - - 添加 - - - - - @@ -91,7 +146,9 @@ const defaultForm = { name: "", description: "", sort: 1, - tags: [""], + tags: [], + mcate_tags: [], + choices: [""], }; export default { emits: ["success", "closed"], @@ -114,19 +171,36 @@ export default { }, visible: false, isSaveing: false, - options: [], + options: [ + {value:"input-number",name:"数字"}, + {value:"input-text",name:"文字"}, + {value:"select",name:"单选"}, + {value:"selects",name:"多选"}, + ], + tagsOptions: [ + {value:"first",name:"首件检验"}, + {value:"prod",name:"成品检验"}, + {value:"performance",name:"性能检验"}, + ], + mcateTagsOptions: [], processOptions: [], setFiltersVisible: false, }; }, - mounted() {}, + mounted() { + this.getmcateTagsOptions(); + }, methods: { - addComponent() { - this.form.tags.push(""); + getmcateTagsOptions() { + this.$API.mtm.material.cates.req().then((res) => { + this.mcateTagsOptions = res; + }); }, - delComponent(index) { - this.form.tags.splice(index, 1); - console.log("this.form.tags:", this.form.tags); + addComponent(type) { + this.form[type].push(""); + }, + delComponent(index,type) { + this.form[type].splice(index, 1); }, //显示 open(mode = "add") {