mooho-base-admin-plus 0.4.52 → 0.4.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30376,6 +30376,12 @@ const _sfc_main$J = {
|
|
|
30376
30376
|
static: {
|
|
30377
30377
|
type: Boolean,
|
|
30378
30378
|
default: false
|
|
30379
|
+
},
|
|
30380
|
+
filter: {
|
|
30381
|
+
type: Object,
|
|
30382
|
+
default() {
|
|
30383
|
+
return {};
|
|
30384
|
+
}
|
|
30379
30385
|
}
|
|
30380
30386
|
},
|
|
30381
30387
|
computed: {},
|
|
@@ -30428,24 +30434,39 @@ const _sfc_main$J = {
|
|
|
30428
30434
|
if (this.tableView.filtering) {
|
|
30429
30435
|
filter2 = JSON.parse(this.tableView.filtering);
|
|
30430
30436
|
}
|
|
30431
|
-
let
|
|
30432
|
-
|
|
30433
|
-
}
|
|
30437
|
+
for (let key in this.filter) {
|
|
30438
|
+
filter2[key] = this.filter[key];
|
|
30439
|
+
}
|
|
30440
|
+
for (let key in staticData) {
|
|
30441
|
+
filter2[key] = staticData[key];
|
|
30442
|
+
}
|
|
30443
|
+
if (this.tableView.sorting) {
|
|
30444
|
+
let obj = JSON.parse(this.tableView.sorting);
|
|
30445
|
+
let arr = [];
|
|
30446
|
+
for (let key in obj) {
|
|
30447
|
+
if (obj[key] === "desc") {
|
|
30448
|
+
arr.push("-" + key);
|
|
30449
|
+
} else {
|
|
30450
|
+
arr.push("+" + key);
|
|
30451
|
+
}
|
|
30452
|
+
}
|
|
30453
|
+
filter2.orderBy = arr.join(",");
|
|
30454
|
+
}
|
|
30434
30455
|
if (this.tableView.isGroupBy) {
|
|
30435
|
-
|
|
30436
|
-
|
|
30437
|
-
|
|
30456
|
+
filter2.isGroupBy = true;
|
|
30457
|
+
filter2.groupColumn = JSON.parse(this.tableView.groupColumn);
|
|
30458
|
+
filter2.groupMethod = JSON.parse(this.tableView.groupMethod);
|
|
30438
30459
|
}
|
|
30439
30460
|
if (this.tableView.isCustom) {
|
|
30440
|
-
let res2 = await customModelApi.query(this.tableView.model,
|
|
30461
|
+
let res2 = await customModelApi.query(this.tableView.model, filter2);
|
|
30441
30462
|
this.total = res2.totalCount;
|
|
30442
30463
|
this.data = res2.data;
|
|
30443
30464
|
} else if (this.tableView.isDataSource) {
|
|
30444
|
-
let res2 = await dataSourceApi.query(this.tableView.dataSource,
|
|
30465
|
+
let res2 = await dataSourceApi.query(this.tableView.dataSource, filter2);
|
|
30445
30466
|
this.total = res2.totalCount;
|
|
30446
30467
|
this.data = res2.table;
|
|
30447
30468
|
} else {
|
|
30448
|
-
let res2 = await modelApi.query(this.tableView.model,
|
|
30469
|
+
let res2 = await modelApi.query(this.tableView.model, filter2, this.tableView.functionName, this.tableView.functionType);
|
|
30449
30470
|
this.total = res2.totalCount;
|
|
30450
30471
|
this.data = res2.data;
|
|
30451
30472
|
}
|