mooho-base-admin-plus 2.7.7 → 2.8.1
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.
- package/history.md +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +75 -45
- package/package/mooho-base-admin-plus.min.js +4 -4
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/public/setting.js +1 -1
- package/src/api/customModel.js +12 -7
- package/src/api/dataSource.js +10 -8
- package/src/api/model.js +10 -4
- package/src/components/input/combo-select.vue +2 -2
- package/src/components/input/dialog-select.vue +2 -2
- package/src/components/view/modal-table.vue +7 -0
- package/src/components/view/table-filter.vue +2 -2
- package/src/components/view/view-chart.vue +1 -1
- package/src/components/view/view-form-draggable.vue +6 -6
- package/src/components/view/view-form.vue +4 -4
- package/src/components/view/view-table.vue +37 -10
- package/src/mixins/page.js +0 -1
- package/src/pages/system/user.vue +2 -2
- package/test/main.js +1 -5
package/history.md
CHANGED
|
@@ -140,3 +140,5 @@ mooho-base-admin-plus@2.7.4 - 修复全选的bug
|
|
|
140
140
|
mooho-base-admin-plus@2.7.5 - 将List组件改为后端分页
|
|
141
141
|
mooho-base-admin-plus@2.7.6 - 修复审批后没有刷新的bug
|
|
142
142
|
mooho-base-admin-plus@2.7.7 - 增加自定义显示格式
|
|
143
|
+
mooho-base-admin-plus@2.8.0 - 表格增加只返回所需字段的选项
|
|
144
|
+
mooho-base-admin-plus@2.8.1 - 表格增加必须返回的字段属性
|
|
@@ -11045,15 +11045,21 @@ const saveAs = /* @__PURE__ */ getDefaultExportFromCjs(FileSaver_minExports), mo
|
|
|
11045
11045
|
}
|
|
11046
11046
|
});
|
|
11047
11047
|
},
|
|
11048
|
-
query(r, a, o, s) {
|
|
11049
|
-
|
|
11048
|
+
query(r, a, o, s, l, u) {
|
|
11049
|
+
(l == null || l == "") && (l = "query"), (u == null || u == "") && (u = "post");
|
|
11050
|
+
let c = {
|
|
11051
|
+
...a,
|
|
11052
|
+
columns: o,
|
|
11053
|
+
viewCode: s ? s.code : null
|
|
11054
|
+
};
|
|
11055
|
+
return a.isGroupBy ? (c.modelName = r, service({
|
|
11050
11056
|
url: "api/Model/group",
|
|
11051
11057
|
method: "post",
|
|
11052
|
-
data:
|
|
11058
|
+
data: c
|
|
11053
11059
|
})) : service({
|
|
11054
|
-
url: `api/${r}/${
|
|
11055
|
-
method:
|
|
11056
|
-
data:
|
|
11060
|
+
url: `api/${r}/${l}`,
|
|
11061
|
+
method: u,
|
|
11062
|
+
data: c
|
|
11057
11063
|
});
|
|
11058
11064
|
},
|
|
11059
11065
|
async exportExcel(r, a) {
|
|
@@ -16725,7 +16731,6 @@ const initRouter = (r, a) => {
|
|
|
16725
16731
|
...mapState("admin/user", ["info"]),
|
|
16726
16732
|
...mapState("admin/cache", ["userNames", "enums", "dicts", "caches"]),
|
|
16727
16733
|
...mapState("admin/menu", ["userPermissions"]),
|
|
16728
|
-
...mapState("admin/displayFormat", ["defaultFormat"]),
|
|
16729
16734
|
rootPath() {
|
|
16730
16735
|
return "admin".trim() ? "/admin/static/" : "/static/";
|
|
16731
16736
|
},
|
|
@@ -21619,21 +21624,23 @@ const processType = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_r
|
|
|
21619
21624
|
}
|
|
21620
21625
|
});
|
|
21621
21626
|
},
|
|
21622
|
-
query(r, a) {
|
|
21623
|
-
let
|
|
21627
|
+
query(r, a, o, s) {
|
|
21628
|
+
let l = a.isGroupBy ? "group" : "query", u = {
|
|
21629
|
+
modelName: r,
|
|
21630
|
+
...a,
|
|
21631
|
+
columns: o,
|
|
21632
|
+
viewCode: s ? s.code : null
|
|
21633
|
+
};
|
|
21624
21634
|
return service({
|
|
21625
|
-
url: `api/${res$8}/${
|
|
21635
|
+
url: `api/${res$8}/${l}`,
|
|
21626
21636
|
method: "post",
|
|
21627
|
-
data:
|
|
21628
|
-
...a,
|
|
21629
|
-
modelName: r
|
|
21630
|
-
}
|
|
21637
|
+
data: u
|
|
21631
21638
|
});
|
|
21632
21639
|
},
|
|
21633
21640
|
async exportExcel(r, a) {
|
|
21634
21641
|
let o = {
|
|
21635
|
-
...a,
|
|
21636
21642
|
modelName: r.model,
|
|
21643
|
+
...a,
|
|
21637
21644
|
per: r.maxExportCount == null ? 1e6 : r.maxExportCount,
|
|
21638
21645
|
returnType: 1,
|
|
21639
21646
|
viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
|
|
@@ -21656,8 +21663,8 @@ const processType = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_r
|
|
|
21656
21663
|
},
|
|
21657
21664
|
async exportPdf(r, a) {
|
|
21658
21665
|
let o = {
|
|
21659
|
-
...a,
|
|
21660
21666
|
modelName: r.model,
|
|
21667
|
+
...a,
|
|
21661
21668
|
per: 1e5,
|
|
21662
21669
|
returnType: 3,
|
|
21663
21670
|
viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
|
|
@@ -25803,7 +25810,7 @@ const taskQueue = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_rend
|
|
|
25803
25810
|
// 填充数据源
|
|
25804
25811
|
async fillDataSource(r, a) {
|
|
25805
25812
|
let o;
|
|
25806
|
-
r.isSourceCustom ? o = await customModelApi.query(r.source, a) : o = await modelApi.query(r.source, a), o.data.forEach((s) => {
|
|
25813
|
+
r.isSourceCustom ? o = await customModelApi.query(r.source, a, [r.sourceDataCode, r.sourceDisplayCode]) : o = await modelApi.query(r.source, a, [r.sourceDataCode, r.sourceDisplayCode]), o.data.forEach((s) => {
|
|
25807
25814
|
r._dataSource.push({
|
|
25808
25815
|
id: (r.sourceDataCode || "").trim() ? this.parseData(s, r.sourceDataCode) : s.id,
|
|
25809
25816
|
name: this.parseData(s, r.sourceDisplayCode)
|
|
@@ -26477,22 +26484,23 @@ const processPage = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_re
|
|
|
26477
26484
|
default: processPage
|
|
26478
26485
|
}, Symbol.toStringTag, { value: "Module" })), res$1 = "DataSource", dataSourceApi = {
|
|
26479
26486
|
query(r, a) {
|
|
26487
|
+
let o = {
|
|
26488
|
+
dataSource: r,
|
|
26489
|
+
...a
|
|
26490
|
+
};
|
|
26480
26491
|
return service({
|
|
26481
26492
|
url: `api/${res$1}/query`,
|
|
26482
26493
|
method: "post",
|
|
26483
|
-
data:
|
|
26484
|
-
...a,
|
|
26485
|
-
dataSource: r
|
|
26486
|
-
}
|
|
26494
|
+
data: o
|
|
26487
26495
|
});
|
|
26488
26496
|
},
|
|
26489
26497
|
async exportExcel(r, a, o = "query") {
|
|
26490
26498
|
let s = {
|
|
26499
|
+
dataSource: r.dataSource,
|
|
26491
26500
|
...a,
|
|
26492
26501
|
per: r.maxExportCount == null ? 1e6 : r.maxExportCount,
|
|
26493
26502
|
returnType: 1,
|
|
26494
|
-
viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
|
|
26495
|
-
dataSource: r.dataSource
|
|
26503
|
+
viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
|
|
26496
26504
|
};
|
|
26497
26505
|
const l = await service({
|
|
26498
26506
|
url: `api/${res$1}/${o}`,
|
|
@@ -26506,11 +26514,11 @@ const processPage = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_re
|
|
|
26506
26514
|
},
|
|
26507
26515
|
async exportPdf(r, a, o = "query") {
|
|
26508
26516
|
let s = {
|
|
26517
|
+
dataSource: r.dataSource,
|
|
26509
26518
|
...a,
|
|
26510
26519
|
per: 1e5,
|
|
26511
26520
|
returnType: 3,
|
|
26512
|
-
viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
|
|
26513
|
-
dataSource: r.dataSource
|
|
26521
|
+
viewCode: (r.exportDataViewCode || "").trim() ? r.exportDataViewCode : r.code
|
|
26514
26522
|
};
|
|
26515
26523
|
const l = await service({
|
|
26516
26524
|
url: `api/${res$1}/${o}`,
|
|
@@ -26638,7 +26646,7 @@ const processPage = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_re
|
|
|
26638
26646
|
let o = await dataSourceApi.query(this.tableView.dataSource, a);
|
|
26639
26647
|
this.total = o.totalCount, this.data = o.table;
|
|
26640
26648
|
} else {
|
|
26641
|
-
let o = await modelApi.query(this.tableView.model, a, this.tableView.functionName, this.tableView.functionType);
|
|
26649
|
+
let o = await modelApi.query(this.tableView.model, a, null, null, this.tableView.functionName, this.tableView.functionType);
|
|
26642
26650
|
this.total = o.totalCount, this.data = o.data;
|
|
26643
26651
|
}
|
|
26644
26652
|
}
|
|
@@ -27311,7 +27319,7 @@ const CheckGroup = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_ren
|
|
|
27311
27319
|
let o = this.param;
|
|
27312
27320
|
o[this.column.sourceDataCode] = a.map((l) => l.value).join(",");
|
|
27313
27321
|
let s;
|
|
27314
|
-
this.column.isSourceCustom ? s = await customModelApi.query(this.column.source, o) : s = await modelApi.query(this.column.source, o), s.data.forEach((l) => {
|
|
27322
|
+
this.column.isSourceCustom ? s = await customModelApi.query(this.column.source, o, [this.column.sourceDataCode, this.column.sourceDisplayCode]) : s = await modelApi.query(this.column.source, o, [this.column.sourceDataCode, this.column.sourceDisplayCode]), s.data.forEach((l) => {
|
|
27315
27323
|
let u = this.parseData(l, this.column.sourceDataCode), c = this.parseData(l, this.column.sourceDisplayCode);
|
|
27316
27324
|
this.multi || (this.$refs.select.query = c);
|
|
27317
27325
|
let d = a.find((f) => f.value == u);
|
|
@@ -27470,13 +27478,13 @@ const comboSelect = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_re
|
|
|
27470
27478
|
};
|
|
27471
27479
|
r[this.sourceDataCode] = JSON.parse(this.modelValue).join(","), this.loadDataView(this.source).then(async (a) => {
|
|
27472
27480
|
if (a.dataView.isCustom) {
|
|
27473
|
-
let o = await customModelApi.query(a.dataView.model, r);
|
|
27481
|
+
let o = await customModelApi.query(a.dataView.model, r, [this.sourceDataCode, this.sourceDisplayCode]);
|
|
27474
27482
|
o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.data);
|
|
27475
27483
|
} else if (a.dataView.isDataSource) {
|
|
27476
27484
|
let o = await dataSourceApi.query(a.dataView.dataSource, r);
|
|
27477
27485
|
o.table.length > 0 && (this.selected = o.table.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.table);
|
|
27478
27486
|
} else {
|
|
27479
|
-
let o = await modelApi.query(a.dataView.model, r);
|
|
27487
|
+
let o = await modelApi.query(a.dataView.model, r, [this.sourceDataCode, this.sourceDisplayCode]);
|
|
27480
27488
|
o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.data);
|
|
27481
27489
|
}
|
|
27482
27490
|
});
|
|
@@ -35234,7 +35242,7 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
|
|
|
35234
35242
|
let s;
|
|
35235
35243
|
(a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") && (s = this.parseTreeData(r, a.code), a.dataSource = null), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
|
|
35236
35244
|
let l;
|
|
35237
|
-
if (a.isSourceCustom ? l = await customModelApi.query(a.source, o) : l = await modelApi.query(a.source, o), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
|
|
35245
|
+
if (a.isSourceCustom ? l = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : l = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
|
|
35238
35246
|
let u = l.data.map((c) => ({
|
|
35239
35247
|
id: (a.sourceDataCode || "").trim() ? this.parseData(c, a.sourceDataCode) : c.id,
|
|
35240
35248
|
name: this.parseData(c, a.sourceDisplayCode),
|
|
@@ -35292,7 +35300,7 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
|
|
|
35292
35300
|
(u || "").trim() && (o = {
|
|
35293
35301
|
...o,
|
|
35294
35302
|
...JSON.parse(u)
|
|
35295
|
-
}), a.isSourceCustom ? s = await customModelApi.query(a.sourceModel, o) : s = await modelApi.query(a.sourceModel, o, l.functionName, l.functionType), this.$refs["list_" + a.code][0].loadData(s.data);
|
|
35303
|
+
}), a.isSourceCustom ? s = await customModelApi.query(a.sourceModel, o, null, l.isReturnSimple ? l : null) : s = await modelApi.query(a.sourceModel, o, null, l.isReturnSimple ? l : null, l.functionName, l.functionType), this.$refs["list_" + a.code][0].loadData(s.data);
|
|
35296
35304
|
}
|
|
35297
35305
|
}
|
|
35298
35306
|
a.needClear = !1, a.needRefresh = !1;
|
|
@@ -35426,7 +35434,7 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
|
|
|
35426
35434
|
let u = this.getParam(r, a);
|
|
35427
35435
|
u[a.sourceDataCode] = l.map((d) => d.value).join(",");
|
|
35428
35436
|
let c;
|
|
35429
|
-
a.isSourceCustom ? c = await customModelApi.query(a.source, u) : c = await modelApi.query(a.source, u), c.data.forEach((d) => {
|
|
35437
|
+
a.isSourceCustom ? c = await customModelApi.query(a.source, u, [a.sourceDataCode, a.sourceDisplayCode]) : c = await modelApi.query(a.source, u, [a.sourceDataCode, a.sourceDisplayCode]), c.data.forEach((d) => {
|
|
35430
35438
|
let f = this.parseData(d, a.sourceDataCode), p = this.parseData(d, a.sourceDisplayCode);
|
|
35431
35439
|
a.controlType == "ComboSelect";
|
|
35432
35440
|
let v = l.find((g) => g.value == f);
|
|
@@ -37963,6 +37971,12 @@ const modalForm = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rend
|
|
|
37963
37971
|
highlightRow: {
|
|
37964
37972
|
type: Boolean,
|
|
37965
37973
|
default: !1
|
|
37974
|
+
},
|
|
37975
|
+
/**
|
|
37976
|
+
* 必须返回的字段
|
|
37977
|
+
*/
|
|
37978
|
+
returnColumns: {
|
|
37979
|
+
type: Array
|
|
37966
37980
|
}
|
|
37967
37981
|
},
|
|
37968
37982
|
computed: {
|
|
@@ -38221,6 +38235,7 @@ function _sfc_render$r(r, a, o, s, l, u) {
|
|
|
38221
38235
|
"load-data-enable": o.loadDataEnable,
|
|
38222
38236
|
"row-class-name": o.rowClassName,
|
|
38223
38237
|
"highlight-row": o.highlightRow,
|
|
38238
|
+
returnColumns: o.returnColumns,
|
|
38224
38239
|
onCreate: u.create,
|
|
38225
38240
|
onEdit: u.edit,
|
|
38226
38241
|
onShow: u.show,
|
|
@@ -38274,7 +38289,7 @@ function _sfc_render$r(r, a, o, s, l, u) {
|
|
|
38274
38289
|
})
|
|
38275
38290
|
]),
|
|
38276
38291
|
_: 3
|
|
38277
|
-
}, 8, ["view-code", "static", "setting-enable", "select-enable", "check-cross-page", "tree-enable", "tree-load", "has-children", "create-enable", "edit-enable", "show-enable", "remove-enable", "draggable", "filter-enable", "page-enable", "embedded", "before-load-data", "on-search", "summary-method", "page-size-opts", "span-method", "load-data-enable", "row-class-name", "highlight-row", "onCreate", "onEdit", "onShow", "onOnReady", "onOnLoadData", "onAfterInit"])
|
|
38292
|
+
}, 8, ["view-code", "static", "setting-enable", "select-enable", "check-cross-page", "tree-enable", "tree-load", "has-children", "create-enable", "edit-enable", "show-enable", "remove-enable", "draggable", "filter-enable", "page-enable", "embedded", "before-load-data", "on-search", "summary-method", "page-size-opts", "span-method", "load-data-enable", "row-class-name", "highlight-row", "returnColumns", "onCreate", "onEdit", "onShow", "onOnReady", "onOnLoadData", "onAfterInit"])
|
|
38278
38293
|
])
|
|
38279
38294
|
]),
|
|
38280
38295
|
_: 3
|
|
@@ -38381,7 +38396,7 @@ const modalTable = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_ren
|
|
|
38381
38396
|
let s;
|
|
38382
38397
|
(a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") && (s = this.parseTreeFilterData(r, a), a.dataSource = null), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
|
|
38383
38398
|
let l;
|
|
38384
|
-
if (a.isSourceCustom ? l = await customModelApi.query(a.source, o) : l = await modelApi.query(a.source, o), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
|
|
38399
|
+
if (a.isSourceCustom ? l = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : l = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
|
|
38385
38400
|
let u = l.data.map((c) => ({
|
|
38386
38401
|
id: (a.sourceDataCode || "").trim() ? this.parseData(c, a.sourceDataCode) : c.id,
|
|
38387
38402
|
name: this.parseData(c, a.sourceDisplayCode),
|
|
@@ -39589,7 +39604,7 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_r
|
|
|
39589
39604
|
a ? this.$refs["table_" + r.code][0].loadData(JSON.parse(a)) : this.$refs["table_" + r.code][0].loadData([]);
|
|
39590
39605
|
} else if (this.data.id) {
|
|
39591
39606
|
let a, o = {}, s = this.$refs["table_" + r.code][0].tableView, l = s.filtering;
|
|
39592
|
-
(l || "").trim() && (o = JSON.parse(l)), o[r.sourceDataCode] = this.data.id, r.isSourceCustom ? a = await customModelApi.query(r.sourceModel, o) : a = await modelApi.query(r.sourceModel, o, s.functionName, s.functionType), this.$refs["table_" + r.code][0].loadData(a.data);
|
|
39607
|
+
(l || "").trim() && (o = JSON.parse(l)), o[r.sourceDataCode] = this.data.id, r.isSourceCustom ? a = await customModelApi.query(r.sourceModel, o, null, s.isReturnSimple ? s : null) : a = await modelApi.query(r.sourceModel, o, null, s.isReturnSimple ? s : null, s.functionName, s.functionType), this.$refs["table_" + r.code][0].loadData(a.data);
|
|
39593
39608
|
}
|
|
39594
39609
|
}) : r.controlType == "Attachment" && this.$refs["attachment_" + r.code] && this.$refs["attachment_" + r.code][0].setData(this.parseData(this.data, r.code));
|
|
39595
39610
|
});
|
|
@@ -39881,7 +39896,7 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_r
|
|
|
39881
39896
|
let s;
|
|
39882
39897
|
(a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") && (s = this.parseTreeData(r, a.code), a.dataSource = null), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
|
|
39883
39898
|
let l;
|
|
39884
|
-
if (a.isSourceCustom ? l = await customModelApi.query(a.source, o) : l = await modelApi.query(a.source, o), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
|
|
39899
|
+
if (a.isSourceCustom ? l = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : l = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), a.rawData = l.data, a.controlType === "TreeSelect" || a.controlType === "MultiTreeSelect") {
|
|
39885
39900
|
let u = l.data.map((c) => ({
|
|
39886
39901
|
id: (a.sourceDataCode || "").trim() ? this.parseData(c, a.sourceDataCode) : c.id,
|
|
39887
39902
|
name: this.parseData(c, a.sourceDisplayCode),
|
|
@@ -40903,6 +40918,12 @@ const _sfc_main$n = {
|
|
|
40903
40918
|
highlightRow: {
|
|
40904
40919
|
type: Boolean,
|
|
40905
40920
|
default: !1
|
|
40921
|
+
},
|
|
40922
|
+
/**
|
|
40923
|
+
* 必须返回的字段
|
|
40924
|
+
*/
|
|
40925
|
+
returnColumns: {
|
|
40926
|
+
type: Array
|
|
40906
40927
|
}
|
|
40907
40928
|
},
|
|
40908
40929
|
computed: {
|
|
@@ -41060,13 +41081,20 @@ const _sfc_main$n = {
|
|
|
41060
41081
|
orderBy: this.orderBy
|
|
41061
41082
|
};
|
|
41062
41083
|
if (this.tableView.isGroupBy && (a.isGroupBy = !0, a.groupColumn = JSON.parse(this.tableView.groupColumn), a.groupMethod = JSON.parse(this.tableView.groupMethod)), this.tableView.isCustom) {
|
|
41063
|
-
let o = await customModelApi.query(this.tableView.model, a);
|
|
41084
|
+
let o = await customModelApi.query(this.tableView.model, a, this.returnColumns, this.tableView.isReturnSimple ? this.tableView : null);
|
|
41064
41085
|
this.total = o.totalCount, this.data = o.data;
|
|
41065
41086
|
} else if (this.tableView.isDataSource) {
|
|
41066
41087
|
let o = await dataSourceApi.query(this.tableView.dataSource, a);
|
|
41067
41088
|
this.total = o.totalCount, this.data = o.table;
|
|
41068
41089
|
} else {
|
|
41069
|
-
let o = await modelApi.query(
|
|
41090
|
+
let o = await modelApi.query(
|
|
41091
|
+
this.tableView.model,
|
|
41092
|
+
a,
|
|
41093
|
+
this.returnColumns,
|
|
41094
|
+
this.tableView.isReturnSimple ? this.tableView : null,
|
|
41095
|
+
this.tableView.functionName,
|
|
41096
|
+
this.tableView.functionType
|
|
41097
|
+
);
|
|
41070
41098
|
this.total = o.totalCount, this.data = o.data;
|
|
41071
41099
|
}
|
|
41072
41100
|
if (this.tableView.isDynamicColumn && (this.columns = this.columns.filter((o) => o.slot != "normal"), this.data.length > 0)) {
|
|
@@ -41114,8 +41142,9 @@ const _sfc_main$n = {
|
|
|
41114
41142
|
* @param {int} index 行序号
|
|
41115
41143
|
* @public
|
|
41116
41144
|
*/
|
|
41117
|
-
edit(r, a) {
|
|
41118
|
-
|
|
41145
|
+
async edit(r, a) {
|
|
41146
|
+
let o = r;
|
|
41147
|
+
this.tableView.isCustom ? o = await customModelApi.get(this.tableView.model, r.id) : this.tableView.isDataSource || (o = await modelApi.get(this.tableView.model, r.id)), this.$emit("edit", { row: o, index: a });
|
|
41119
41148
|
},
|
|
41120
41149
|
/**
|
|
41121
41150
|
* 查看项
|
|
@@ -41124,8 +41153,9 @@ const _sfc_main$n = {
|
|
|
41124
41153
|
* @param {int} index 行序号
|
|
41125
41154
|
* @public
|
|
41126
41155
|
*/
|
|
41127
|
-
show(r, a) {
|
|
41128
|
-
|
|
41156
|
+
async show(r, a) {
|
|
41157
|
+
let o = r;
|
|
41158
|
+
this.tableView.isCustom ? o = await customModelApi.get(this.tableView.model, r.id) : this.tableView.isDataSource || (o = await modelApi.get(this.tableView.model, r.id)), this.$emit("show", { row: o, index: a });
|
|
41129
41159
|
},
|
|
41130
41160
|
/**
|
|
41131
41161
|
* 删除项
|
|
@@ -41352,7 +41382,7 @@ const _sfc_main$n = {
|
|
|
41352
41382
|
async fillDataSource(r, a, o) {
|
|
41353
41383
|
r._dataSource || (r._dataSource = {}, r._rawData = {}, r._needRefresh = {}, r._needClear = {}), (a.controlType === "ComboSelect" || a.controlType === "MultiComboSelect") && (o.per = 20), this.disableLoader();
|
|
41354
41384
|
let s;
|
|
41355
|
-
if (a.isSourceCustom ? s = await customModelApi.query(a.source, o) : s = await modelApi.query(a.source, o), this.enableLoader(), r._rawData[a.code] = s.data, r._dataSource[a.code] = s.data.map((l) => ({
|
|
41385
|
+
if (a.isSourceCustom ? s = await customModelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]) : s = await modelApi.query(a.source, o, [a.sourceDataCode, a.sourceDisplayCode]), this.enableLoader(), r._rawData[a.code] = s.data, r._dataSource[a.code] = s.data.map((l) => ({
|
|
41356
41386
|
id: (a.sourceDataCode || "").trim() ? this.parseData(l, a.sourceDataCode) : l.id,
|
|
41357
41387
|
name: this.parseData(l, a.sourceDisplayCode)
|
|
41358
41388
|
})), r && this.parseData(r, a.code) == null && a.isDefaultFirst && s.data.length > 0 && (this.setData(r, a.code, this.parseData(s.data[0], a.sourceDataCode)), a.sourceDataCode == "id" && a.code.length > 2)) {
|
|
@@ -41765,7 +41795,7 @@ const _sfc_main$n = {
|
|
|
41765
41795
|
let c = this.getParam(r, a);
|
|
41766
41796
|
c[a.sourceDataCode] = u.map((f) => f.value).join(",");
|
|
41767
41797
|
let d;
|
|
41768
|
-
a.isSourceCustom ? d = await customModelApi.query(a.source, c) : d = await modelApi.query(a.source, c), d.data.forEach((f) => {
|
|
41798
|
+
a.isSourceCustom ? d = await customModelApi.query(a.source, c, [a.sourceDataCode, a.sourceDisplayCode]) : d = await modelApi.query(a.source, c, [a.sourceDataCode, a.sourceDisplayCode]), d.data.forEach((f) => {
|
|
41769
41799
|
let p = this.parseData(f, a.sourceDataCode), v = this.parseData(f, a.sourceDisplayCode);
|
|
41770
41800
|
a.controlType == "ComboSelect";
|
|
41771
41801
|
let g = u.find((y) => y.value == p);
|
|
@@ -42532,7 +42562,7 @@ function _sfc_render$n(r, a, o, s, l, u) {
|
|
|
42532
42562
|
], 2)
|
|
42533
42563
|
], 2);
|
|
42534
42564
|
}
|
|
42535
|
-
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-
|
|
42565
|
+
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-1cb5962f"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42536
42566
|
__proto__: null,
|
|
42537
42567
|
default: viewTable
|
|
42538
42568
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = {
|