diff --git a/server/package.json b/server/package.json index 44164d74..f6aade83 100644 --- a/server/package.json +++ b/server/package.json @@ -97,5 +97,9 @@ "moduleNameMapper": { "^src/(.*)$": "/$1" } + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.6.0" } } diff --git a/web/src/common/typeEnum.ts b/web/src/common/typeEnum.ts new file mode 100644 index 00000000..755e6f24 --- /dev/null +++ b/web/src/common/typeEnum.ts @@ -0,0 +1,50 @@ +// 题型枚举 +export enum QUESTION_TYPE { + TEXT = 'text', + TEXTAREA = 'textarea', + RADIO = 'radio', + CHECKBOX = 'checkbox', + BINARY_CHOICE = 'binary-choice', + RADIO_STAR = 'radio-star', + RADIO_NPS = 'radio-nps', + VOTE = 'vote', +} + +// 题目类型标签映射对象 +export const typeTagLabels: Record = { + [QUESTION_TYPE.TEXT]: '单行输入框', + [QUESTION_TYPE.TEXTAREA]: '多行输入框', + [QUESTION_TYPE.RADIO]: '单选', + [QUESTION_TYPE.CHECKBOX]: '多选', + [QUESTION_TYPE.BINARY_CHOICE]: '判断', + [QUESTION_TYPE.RADIO_STAR]: '评分', + [QUESTION_TYPE.RADIO_NPS]: 'NPS评分', + [QUESTION_TYPE.VOTE]: '投票' +} + +// 输入类题型 +export const INPUT = [ + QUESTION_TYPE.TEXT, + QUESTION_TYPE.TEXTAREA +] + +// 选择类题型分类 +export const NORMAL_CHOICES = [ + QUESTION_TYPE.RADIO, + QUESTION_TYPE.CHECKBOX +] + +// 选择类题型分类 +export const CHOICES = [ + QUESTION_TYPE.RADIO, + QUESTION_TYPE.CHECKBOX, + QUESTION_TYPE.BINARY_CHOICE, + QUESTION_TYPE.VOTE +] + +// 评分题题型分类 +export const RATES = [ + QUESTION_TYPE.RADIO_STAR, + QUESTION_TYPE.RADIO_NPS +] + diff --git a/web/src/management/pages/edit/modules/logicModule/components/ConditionView.vue b/web/src/management/pages/edit/modules/logicModule/components/ConditionView.vue index b1bef149..639e3d74 100644 --- a/web/src/management/pages/edit/modules/logicModule/components/ConditionView.vue +++ b/web/src/management/pages/edit/modules/logicModule/components/ConditionView.vue @@ -65,7 +65,7 @@