fix: 修改列表页筛选bug
This commit is contained in:
parent
898becaf3d
commit
5415daf906
@ -129,7 +129,7 @@ export class SurveyMetaController {
|
|||||||
const allowFilterField = [
|
const allowFilterField = [
|
||||||
'title',
|
'title',
|
||||||
'remark',
|
'remark',
|
||||||
'questionType',
|
'surveyType',
|
||||||
'curStatus.status',
|
'curStatus.status',
|
||||||
];
|
];
|
||||||
return filterList.reduce(
|
return filterList.reduce(
|
||||||
|
@ -17,11 +17,9 @@ export class XiaojuSurveyPluginManager {
|
|||||||
async triggerHook(hookName: AllowHooks, data?: any) {
|
async triggerHook(hookName: AllowHooks, data?: any) {
|
||||||
for (const plugin of this.plugins) {
|
for (const plugin of this.plugins) {
|
||||||
if (plugin[hookName]) {
|
if (plugin[hookName]) {
|
||||||
await plugin[hookName](data);
|
return await plugin[hookName](data);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ export default {
|
|||||||
searchVal: '',
|
searchVal: '',
|
||||||
selectOptionsDict,
|
selectOptionsDict,
|
||||||
selectValueMap: {
|
selectValueMap: {
|
||||||
questionType: '',
|
surveyType: '',
|
||||||
'curStatus.status': '',
|
'curStatus.status': '',
|
||||||
},
|
},
|
||||||
buttonOptionsDict,
|
buttonOptionsDict,
|
||||||
@ -204,8 +204,8 @@ export default {
|
|||||||
comparator: '',
|
comparator: '',
|
||||||
condition: [
|
condition: [
|
||||||
{
|
{
|
||||||
field: 'questionType',
|
field: 'surveyType',
|
||||||
value: this.selectValueMap.questionType,
|
value: this.selectValueMap.surveyType,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -231,12 +231,9 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const filter = JSON.stringify(
|
const filter = JSON.stringify(
|
||||||
this.filter.filter((item) => {
|
this.filter.filter((item) => {
|
||||||
return (
|
return item.condition[0].value;
|
||||||
item.condition[0].field === 'title' || item.condition[0].value
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const res = await getSurveyList({
|
const res = await getSurveyList({
|
||||||
curPage: this.currentPage,
|
curPage: this.currentPage,
|
||||||
filter,
|
filter,
|
||||||
|
@ -68,7 +68,7 @@ export const statusMaps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 问卷类型
|
// 问卷类型
|
||||||
export const questionTypeSelect = {
|
export const surveyTypeSelect = {
|
||||||
label: '问卷类型',
|
label: '问卷类型',
|
||||||
value: [
|
value: [
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@ export const curStatusSelect = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const selectOptionsDict = Object.freeze({
|
export const selectOptionsDict = Object.freeze({
|
||||||
questionType: questionTypeSelect,
|
surveyType: surveyTypeSelect,
|
||||||
'curStatus.status': curStatusSelect,
|
'curStatus.status': curStatusSelect,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user