@ecan-bi/datav 1.0.76 → 1.0.77
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/dist/index.es.js +24 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +24 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +11 -8
- package/package.json +1 -1
- package/types/table/table/Table.vue.d.ts +1 -1
- package/types/table/table/index.d.ts +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.0.
|
|
1
|
+
/*! @ecan-bi/datav@1.0.77 */
|
|
2
2
|
(function(global, factory) {
|
|
3
3
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("echarts/core"), require("resize-detector"), require("ant-design-vue"), require("ant-design-vue/es/spin/style"), require("ant-design-vue/es/skeleton/style"), require("lodash-es"), require("axios"), require("mitt"), require("dayjs"), require("ant-design-vue/es/progress/style"), require("ant-design-vue/es/input/style"), require("ant-design-vue/es/date-picker/style"), require("ant-design-vue/es/date-picker/locale/zh_CN"), require("ant-design-vue/es/select/style"), require("ant-design-vue/es/button/style"), require("echarts/renderers"), require("echarts/charts"), require("echarts/components"), require("echarts"), require("ant-design-vue/es/modal/style"), require("ant-design-vue/es/table/style")) : typeof define === "function" && define.amd ? define(["exports", "vue", "echarts/core", "resize-detector", "ant-design-vue", "ant-design-vue/es/spin/style", "ant-design-vue/es/skeleton/style", "lodash-es", "axios", "mitt", "dayjs", "ant-design-vue/es/progress/style", "ant-design-vue/es/input/style", "ant-design-vue/es/date-picker/style", "ant-design-vue/es/date-picker/locale/zh_CN", "ant-design-vue/es/select/style", "ant-design-vue/es/button/style", "echarts/renderers", "echarts/charts", "echarts/components", "echarts", "ant-design-vue/es/modal/style", "ant-design-vue/es/table/style"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["@ecan/bi-datav"] = {}, global.vue, global["echarts/core"], global["resize-detector"], global["ant-design-vue"], null, null, global["lodash-es"], global.axios, global.mitt, global.dayjs, null, null, null, global["ant-design-vue/es/date-picker/locale/zh_CN"], null, null, global["echarts/renderers"], global["echarts/charts"], global["echarts/components"], global.echarts));
|
|
4
4
|
})(this, function(exports2, vue, core, resizeDetector, antDesignVue, style$1, style$2, lodashEs, axios, mitt, dayjs, style$3, style$4, style$5, locale, style$6, style$7, renderers, charts, components$1, echarts) {
|
|
@@ -6368,15 +6368,18 @@
|
|
|
6368
6368
|
return;
|
|
6369
6369
|
dataSource.value = data;
|
|
6370
6370
|
});
|
|
6371
|
+
const orderCondition = vue.ref(void 0);
|
|
6371
6372
|
const requestData = useRequestData(props2);
|
|
6372
6373
|
const loading = vue.ref(false);
|
|
6373
|
-
const handleRequestData = async () => {
|
|
6374
|
+
const handleRequestData = async (isUseLoading = true) => {
|
|
6374
6375
|
var _a2;
|
|
6375
6376
|
try {
|
|
6376
|
-
|
|
6377
|
+
if (isUseLoading)
|
|
6378
|
+
loading.value = true;
|
|
6377
6379
|
const res = await requestData({
|
|
6378
6380
|
pageNum: vue.unref(pageNum),
|
|
6379
|
-
pageSize: vue.unref(pageSize)
|
|
6381
|
+
pageSize: vue.unref(pageSize),
|
|
6382
|
+
orderCondition: vue.unref(orderCondition)
|
|
6380
6383
|
});
|
|
6381
6384
|
const { rows = [], total: tableTotal = 0 } = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) || {};
|
|
6382
6385
|
total.value = tableTotal;
|
|
@@ -6387,8 +6390,21 @@
|
|
|
6387
6390
|
loading.value = false;
|
|
6388
6391
|
}
|
|
6389
6392
|
};
|
|
6390
|
-
const tableChange = ({ current }, _filters,
|
|
6393
|
+
const tableChange = ({ current }, _filters, sorter) => {
|
|
6391
6394
|
pageNum.value = current;
|
|
6395
|
+
if (sorter && Object.keys(sorter).length > 0) {
|
|
6396
|
+
const { field, order } = sorter;
|
|
6397
|
+
const map = {
|
|
6398
|
+
ascend: "asc",
|
|
6399
|
+
descend: "desc"
|
|
6400
|
+
};
|
|
6401
|
+
const fieldOrder = map[order];
|
|
6402
|
+
if (field != null && fieldOrder != null) {
|
|
6403
|
+
orderCondition.value = field + " " + fieldOrder;
|
|
6404
|
+
pageNum.value = 1;
|
|
6405
|
+
}
|
|
6406
|
+
}
|
|
6407
|
+
refreshData(false);
|
|
6392
6408
|
};
|
|
6393
6409
|
const pagination = vue.computed(() => {
|
|
6394
6410
|
const simple = props2.simple;
|
|
@@ -6467,12 +6483,12 @@
|
|
|
6467
6483
|
setGlobalModel(id, { ...modal, RECORD: record });
|
|
6468
6484
|
})
|
|
6469
6485
|
});
|
|
6470
|
-
const refreshData = () => {
|
|
6486
|
+
const refreshData = (isUseLoading = true) => {
|
|
6471
6487
|
if (vue.unref(pageMode) === "design")
|
|
6472
6488
|
return;
|
|
6473
6489
|
switch (props2.dataType) {
|
|
6474
6490
|
case "request":
|
|
6475
|
-
handleRequestData();
|
|
6491
|
+
handleRequestData(isUseLoading);
|
|
6476
6492
|
break;
|
|
6477
6493
|
case "indicator":
|
|
6478
6494
|
handleIndicatorData();
|
|
@@ -6672,7 +6688,7 @@
|
|
|
6672
6688
|
}, 8, ["loading"])
|
|
6673
6689
|
], 4);
|
|
6674
6690
|
}
|
|
6675
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
6691
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-34b40a0f"]]);
|
|
6676
6692
|
const EcanTable = withInstall(Table);
|
|
6677
6693
|
const mapProps = {
|
|
6678
6694
|
...props,
|