fix: 修改列表页筛选bug
This commit is contained in:
parent
898becaf3d
commit
5415daf906
@ -129,7 +129,7 @@ export class SurveyMetaController {
|
||||
const allowFilterField = [
|
||||
'title',
|
||||
'remark',
|
||||
'questionType',
|
||||
'surveyType',
|
||||
'curStatus.status',
|
||||
];
|
||||
return filterList.reduce(
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user