From 444e1e026c8c24316d94bf442791e2cb7b2b7719 Mon Sep 17 00:00:00 2001 From: Jam Date: Thu, 9 Mar 2023 22:56:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/formItem.html | 2 +- .../component/tpl/formItemListGenerator.html | 56 +++++++++---------- .../component/tpl/formItemListReview.html | 36 ++++++------ app/view/page/workflowEditor.html | 2 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/app/view/component/formItem.html b/app/view/component/formItem.html index b710931..308b75f 100644 --- a/app/view/component/formItem.html +++ b/app/view/component/formItem.html @@ -9,7 +9,7 @@ :rules="validationRules.requireRules" class="jh-v-input" dense single-line filled - label="班级ID" + label="" v-model="formItem.answer" :readonly="readonly" > diff --git a/app/view/component/tpl/formItemListGenerator.html b/app/view/component/tpl/formItemListGenerator.html index 0a0e857..6fc188b 100644 --- a/app/view/component/tpl/formItemListGenerator.html +++ b/app/view/component/tpl/formItemListGenerator.html @@ -42,31 +42,31 @@ dense> - - - + + + - + {{ index + 1 }}. {{ - formItem.component.statement + formItem.statement }} -
- +
- + + :label="(index+1) + '. ' + formItem.statement"/> - - + @@ -100,26 +100,26 @@
+ v-if="formItemList[selectCanvaIndex].type === 'single' || formItemList[selectCanvaIndex].type === 'multiple'"> + v-model="formItemList[selectCanvaIndex].statement">
选项列表 + @click.stop="propertyAddOption(formItemList[selectCanvaIndex].optionList.length)"> mdi-plus-box
- + + v-model="formItemList[selectCanvaIndex].statement"> - + + v-model="formItemList[selectCanvaIndex].statement">
@@ -174,16 +174,16 @@ Vue.component("form-item-list-generator", { {typeName: '多行文本', type: 'textarea', statement: '多行文本', property: {}, icon: 'mdi-form-textarea'}, { typeName: '单选', - type: 'singleSelect', + type: 'single', statement: '单选', - property: {selectOptionList: []}, + optionList: [], icon: 'mdi-checkbox-marked-circle' }, { typeName: '多选', - type: 'multipleSelect', + type: 'multiple', statement: '多选', - property: {selectOptionList: []}, + optionList: [], icon: 'mdi-checkbox-marked' }, ], @@ -250,7 +250,7 @@ Vue.component("form-item-list-generator", { }, formItemCopy(index, formItem) { const newFormItem = _.cloneDeep(formItem); - newFormItem.id = `${newFormItem.component.type}_${this.uuid(8)}`, + newFormItem.id = `${newFormItem.type}_${this.uuid(8)}`, this.formItemList.splice(index + 1, 0, newFormItem); }, emptyCanva() { @@ -263,10 +263,10 @@ Vue.component("form-item-list-generator", { } }, propertyAddOption(index) { - this.formItemList[this.selectCanvaIndex].component.property.selectOptionList.splice(index, 0, {value: ""}); + this.formItemList[this.selectCanvaIndex].optionList.splice(index, 0, ""); }, propertyDeleteOption(index) { - this.formItemList[this.selectCanvaIndex].component.property.selectOptionList.splice(index, 1); + this.formItemList[this.selectCanvaIndex].optionList.splice(index, 1); }, uuid(t = 21) { let e = "", r = crypto.getRandomValues(new Uint8Array(t)); diff --git a/app/view/component/tpl/formItemListReview.html b/app/view/component/tpl/formItemListReview.html index 6274c92..04c3a17 100644 --- a/app/view/component/tpl/formItemListReview.html +++ b/app/view/component/tpl/formItemListReview.html @@ -1,26 +1,26 @@