diff --git a/web/src/common/logicEngine/ruleConf.ts b/web/src/common/logicEngine/ruleConf.ts index 4f979283..bcf27c3a 100644 --- a/web/src/common/logicEngine/ruleConf.ts +++ b/web/src/common/logicEngine/ruleConf.ts @@ -1,4 +1,4 @@ -// 静态数据 +// test:静态数据,实际业务里无用 export const ruleConf = [ { conditions: [ diff --git a/web/src/common/typeEnum.ts b/web/src/common/typeEnum.ts index 755e6f24..14087a02 100644 --- a/web/src/common/typeEnum.ts +++ b/web/src/common/typeEnum.ts @@ -7,7 +7,7 @@ export enum QUESTION_TYPE { BINARY_CHOICE = 'binary-choice', RADIO_STAR = 'radio-star', RADIO_NPS = 'radio-nps', - VOTE = 'vote', + VOTE = 'vote' } // 题目类型标签映射对象 @@ -23,19 +23,13 @@ export const typeTagLabels: Record = { } // 输入类题型 -export const INPUT = [ - QUESTION_TYPE.TEXT, - QUESTION_TYPE.TEXTAREA -] +export const INPUT = [QUESTION_TYPE.TEXT, QUESTION_TYPE.TEXTAREA] // 选择类题型分类 -export const NORMAL_CHOICES = [ - QUESTION_TYPE.RADIO, - QUESTION_TYPE.CHECKBOX -] +export const NORMAL_CHOICES = [QUESTION_TYPE.RADIO, QUESTION_TYPE.CHECKBOX] // 选择类题型分类 -export const CHOICES = [ +export const CHOICES = [ QUESTION_TYPE.RADIO, QUESTION_TYPE.CHECKBOX, QUESTION_TYPE.BINARY_CHOICE, @@ -43,8 +37,4 @@ export const CHOICES = [ ] // 评分题题型分类 -export const RATES = [ - QUESTION_TYPE.RADIO_STAR, - QUESTION_TYPE.RADIO_NPS -] - +export const RATES = [QUESTION_TYPE.RADIO_STAR, QUESTION_TYPE.RADIO_NPS] diff --git a/web/src/management/api/space.ts b/web/src/management/api/space.ts index b0aadda9..b0277276 100644 --- a/web/src/management/api/space.ts +++ b/web/src/management/api/space.ts @@ -71,4 +71,4 @@ export const getCollaboratorPermissions = (surveyId: string) => { surveyId } }) -} \ No newline at end of file +} diff --git a/web/src/management/components/LeftMenu.vue b/web/src/management/components/LeftMenu.vue index e9dc05ab..f60668a4 100644 --- a/web/src/management/components/LeftMenu.vue +++ b/web/src/management/components/LeftMenu.vue @@ -58,18 +58,22 @@ const tabArr = [ } ] const tabs = ref([]) -watch(() => store.state.cooperPermissions, (newVal) => { - tabs.value = [] - // 如果有问卷管理权限,则加入问卷编辑和投放菜单 - if (newVal.includes(SurveyPermissions.SurveyManage)) { - tabs.value.push(tabArr[0]) - tabs.value.push(tabArr[1]) - } - // 如果有数据分析权限,则加入数据分析菜单 - if (newVal.includes(SurveyPermissions.DataManage)) { - tabs.value.push(tabArr[2]) - } -}, { immediate: true }) +watch( + () => store.state.cooperPermissions, + (newVal) => { + tabs.value = [] + // 如果有问卷管理权限,则加入问卷编辑和投放菜单 + if (newVal.includes(SurveyPermissions.SurveyManage)) { + tabs.value.push(tabArr[0]) + tabs.value.push(tabArr[1]) + } + // 如果有数据分析权限,则加入数据分析菜单 + if (newVal.includes(SurveyPermissions.DataManage)) { + tabs.value.push(tabArr[2]) + } + }, + { immediate: true } +)