From 5640d8b6e59deee22a0045d10ea681146e772304 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 22 Nov 2021 16:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=9F=A5=E9=97=AE=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/serve.js | 6 +- src/apps/AppAskForm/AppAskForm.vue | 69 ++ src/apps/AppAskForm/addForm.vue | 700 +++++++++++++++++++++ src/apps/AppAskForm/askForm.vue | 52 ++ src/apps/AppAskForm/components/addList.vue | 182 ++++++ src/apps/AppAskForm/components/list.vue | 497 +++++++++++++++ src/apps/AppAskForm/config.js | 163 +++++ src/apps/AppAskForm/filedConfig.vue | 535 ++++++++++++++++ src/apps/AppAskForm/formDetail.vue | 405 ++++++++++++ src/apps/AppAskForm/formList.vue | 164 +++++ src/apps/AppAskForm/formSetting.vue | 314 +++++++++ src/apps/AppAskForm/previewForm.vue | 457 ++++++++++++++ 12 files changed, 3541 insertions(+), 3 deletions(-) create mode 100644 src/apps/AppAskForm/AppAskForm.vue create mode 100644 src/apps/AppAskForm/addForm.vue create mode 100644 src/apps/AppAskForm/askForm.vue create mode 100644 src/apps/AppAskForm/components/addList.vue create mode 100644 src/apps/AppAskForm/components/list.vue create mode 100644 src/apps/AppAskForm/config.js create mode 100644 src/apps/AppAskForm/filedConfig.vue create mode 100644 src/apps/AppAskForm/formDetail.vue create mode 100644 src/apps/AppAskForm/formList.vue create mode 100644 src/apps/AppAskForm/formSetting.vue create mode 100644 src/apps/AppAskForm/previewForm.vue diff --git a/bin/serve.js b/bin/serve.js index ff3bba6b..d02bae31 100644 --- a/bin/serve.js +++ b/bin/serve.js @@ -40,12 +40,12 @@ const chalkTag = { */ const findApp = (dir, cb) => { return readdir(dir).then(apps => { - return Promise.all(apps?.map(e => { + return Promise.all(apps.map(e => { let cPath = path.join(dir, e) return stat(cPath).then(state => { - if (state?.isDirectory()) { + if (state.isDirectory()) { return findApp(cPath, cb) - } else if (state?.isFile()) { + } else if (state.isFile()) { cb && cb(cPath) } }) diff --git a/src/apps/AppAskForm/AppAskForm.vue b/src/apps/AppAskForm/AppAskForm.vue new file mode 100644 index 00000000..82121b5d --- /dev/null +++ b/src/apps/AppAskForm/AppAskForm.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/src/apps/AppAskForm/addForm.vue b/src/apps/AppAskForm/addForm.vue new file mode 100644 index 00000000..d0172ec2 --- /dev/null +++ b/src/apps/AppAskForm/addForm.vue @@ -0,0 +1,700 @@ + + + + + diff --git a/src/apps/AppAskForm/askForm.vue b/src/apps/AppAskForm/askForm.vue new file mode 100644 index 00000000..304ca182 --- /dev/null +++ b/src/apps/AppAskForm/askForm.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/apps/AppAskForm/components/addList.vue b/src/apps/AppAskForm/components/addList.vue new file mode 100644 index 00000000..a2826ce5 --- /dev/null +++ b/src/apps/AppAskForm/components/addList.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/apps/AppAskForm/components/list.vue b/src/apps/AppAskForm/components/list.vue new file mode 100644 index 00000000..2bcd23ce --- /dev/null +++ b/src/apps/AppAskForm/components/list.vue @@ -0,0 +1,497 @@ + + + + + diff --git a/src/apps/AppAskForm/config.js b/src/apps/AppAskForm/config.js new file mode 100644 index 00000000..affd9efb --- /dev/null +++ b/src/apps/AppAskForm/config.js @@ -0,0 +1,163 @@ +export const components = [ + { + type: 'radio', + label: '单选', + fixedLabel: '单选', + value: '', + points: '', + icon: 'iconradio', + isShowPoints: false, + required: true, + hasAnswer: false, + answer: '', + pointType: '0', + pointDict: [ + { + dictName: '此题有唯一答案和分值', + dictValue: '0' + }, + { + dictName: '每个选项都有对应分值', + dictValue: '1' + } + ], + options: [ + { + label: '选项1', + value: '', + point: '', + img: [] + }, + { + label: '选项2', + value: '', + point: '', + img: [] + } + ], + title: '' + }, + { + type: 'checkbox', + label: '多选', + fixedLabel: '多选', + points: '', + icon: 'iconcheck_box', + isShowPoints: false, + required: true, + hasAnswer: false, + answer: [], + value: [], + pointType: '0', + pointDict: [ + { + dictName: '此题有唯一答案和分值', + dictValue: '0' + }, + { + dictName: '每个选项都有对应分值', + dictValue: '1' + }, + { + dictName: '答对几项得几分,答错不得分', + dictValue: '2' + } + ], + options: [ + { + label: '选项1', + value: '', + point: '', + img: [], + checked: false + }, + { + label: '选项2', + point: '', + value: '', + img: [], + checked: false + } + ], + title: '' + }, + { + type: 'select', + label: '单下拉框', + fixedLabel: '单下拉框', + value: '', + points: '', + icon: 'iconSelect', + isShowPoints: false, + required: true, + hasAnswer: false, + answer: '', + pointType: '0', + placeholder: '请选择', + pointDict: [ + { + dictName: '此题有唯一答案和分值', + dictValue: '0' + }, + { + dictName: '每个选项都有对应分值', + dictValue: '1' + } + ], + options: [ + { + label: '选项1', + value: '', + point: '', + img: [] + }, + { + label: '选项2', + value: '', + point: '', + img: [] + } + ], + title: '' + }, + { + type: 'input', + label: '单行填空', + fixedLabel: '单行填空', + value: '', + pointType: '0', + icon: 'icontext_box', + isShowPoints: false, + points: '', + required: true, + hasAnswer: false, + placeholder: '请输入...', + answer: '' + }, + { + type: 'textarea', + label: '多行填空', + fixedLabel: '多行填空', + pointType: '0', + icon: 'icontext_area', + points: '', + isShowPoints: false, + required: true, + hasAnswer: false, + answer: '', + placeholder: '请输入...', + value: '' + }, + { + type: 'upload', + label: '上传图片', + fixedLabel: '上传图片', + value: '', + icon: 'iconpic', + isShowPoints: false, + points: '', + required: true, + hasAnswer: false, + answer: '' + } +]; diff --git a/src/apps/AppAskForm/filedConfig.vue b/src/apps/AppAskForm/filedConfig.vue new file mode 100644 index 00000000..fe59b245 --- /dev/null +++ b/src/apps/AppAskForm/filedConfig.vue @@ -0,0 +1,535 @@ + + + + +