diff --git a/server/src/modules/survey/controllers/surveyMeta.controller.ts b/server/src/modules/survey/controllers/surveyMeta.controller.ts index f1bdd6de..7787363e 100644 --- a/server/src/modules/survey/controllers/surveyMeta.controller.ts +++ b/server/src/modules/survey/controllers/surveyMeta.controller.ts @@ -129,7 +129,7 @@ export class SurveyMetaController { const allowFilterField = [ 'title', 'remark', - 'questionType', + 'surveyType', 'curStatus.status', ]; return filterList.reduce( diff --git a/server/src/securityPlugin/pluginManager.ts b/server/src/securityPlugin/pluginManager.ts index d557ade8..67d5e2fe 100644 --- a/server/src/securityPlugin/pluginManager.ts +++ b/server/src/securityPlugin/pluginManager.ts @@ -17,11 +17,9 @@ export class XiaojuSurveyPluginManager { async triggerHook(hookName: AllowHooks, data?: any) { for (const plugin of this.plugins) { if (plugin[hookName]) { - await plugin[hookName](data); - break; + return await plugin[hookName](data); } } - return data; } } diff --git a/web/src/management/pages/list/components/baseList.vue b/web/src/management/pages/list/components/baseList.vue index a7716690..3bb4e267 100644 --- a/web/src/management/pages/list/components/baseList.vue +++ b/web/src/management/pages/list/components/baseList.vue @@ -154,7 +154,7 @@ export default { searchVal: '', selectOptionsDict, selectValueMap: { - questionType: '', + surveyType: '', 'curStatus.status': '', }, buttonOptionsDict, @@ -204,8 +204,8 @@ export default { comparator: '', condition: [ { - field: 'questionType', - value: this.selectValueMap.questionType, + field: 'surveyType', + value: this.selectValueMap.surveyType, }, ], }, @@ -231,12 +231,9 @@ export default { try { const filter = JSON.stringify( this.filter.filter((item) => { - return ( - item.condition[0].field === 'title' || item.condition[0].value - ); + return item.condition[0].value; }) ); - const res = await getSurveyList({ curPage: this.currentPage, filter, diff --git a/web/src/management/pages/list/config/index.js b/web/src/management/pages/list/config/index.js index f03dffc1..a159735f 100644 --- a/web/src/management/pages/list/config/index.js +++ b/web/src/management/pages/list/config/index.js @@ -68,7 +68,7 @@ export const statusMaps = { }; // 问卷类型 -export const questionTypeSelect = { +export const surveyTypeSelect = { label: '问卷类型', value: [ { @@ -124,7 +124,7 @@ export const curStatusSelect = { }; export const selectOptionsDict = Object.freeze({ - questionType: questionTypeSelect, + surveyType: surveyTypeSelect, 'curStatus.status': curStatusSelect, });