Commit 0a2e3555 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化应用数据排序

parent fcc2150a
......@@ -162,6 +162,7 @@ export default {
searchTemplate: [], //关联搜索字段模板列表
selectedRowKeys: [],
orConditionList: [],
sortSearch: [], // 排序搜索条件
};
},
computed: {
......@@ -233,6 +234,16 @@ export default {
return a.fieldOrderNo - b.fieldOrderNo;
});
this.appTemplate = arr;
this.sortSearch = arr
.filter((v) => {
return v.fieldCode == "top" || v.fieldCode == "sort";
})
.map((v) => {
return {
fieldCode: v.fieldCode,
fieldValue: "%%",
};
});
this.searchTemplate = data.filter((v) => {
return v.defaultValue == 1;
});
......@@ -244,12 +255,21 @@ export default {
// 获取数据列表
async getDatasetList() {
this.loading = true;
let orConditionList = [
{
fieldCode: this.fieldCode,
fieldValue: `%${this.searchVal}%`,
},
...this.sortSearch,
];
let res = await getDatasetList({
page: this.current,
size: this.size,
appId: this.appId,
fieldCode: this.fieldCode,
fieldValue: `%${this.searchVal}%`,
orConditionList,
// fieldCode: this.fieldCode,
// fieldValue: `%${this.searchVal}%`,
// orConditionList: [
// {
// fieldCode: this.fieldCode,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment