@ecan-bi/datav 1.0.99 → 1.1.0
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 +37 -23
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +37 -23
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +8 -8
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.0
|
|
1
|
+
/*! @ecan-bi/datav@1.1.0 */
|
|
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("ant-design-vue/es/checkbox/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", "ant-design-vue/es/checkbox/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, 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, style$8, renderers, charts, components$1, echarts) {
|
|
@@ -6764,7 +6764,7 @@
|
|
|
6764
6764
|
const pageNum = vue.ref(1);
|
|
6765
6765
|
const pageSize = vue.computed(() => props2.paginationPageSize);
|
|
6766
6766
|
const handleChildrenColumns = (_columns) => {
|
|
6767
|
-
if (Array.isArray(_columns)) {
|
|
6767
|
+
if (Array.isArray(_columns) && _columns.length > 0) {
|
|
6768
6768
|
const len = _columns.length;
|
|
6769
6769
|
const columnsFixedNum = props2.columnsFixedNum;
|
|
6770
6770
|
for (let i = 0; i < len; i++) {
|
|
@@ -6874,8 +6874,8 @@
|
|
|
6874
6874
|
tableColumns.value = columns;
|
|
6875
6875
|
tableDataSource.value = dataSource;
|
|
6876
6876
|
} else {
|
|
6877
|
-
tableColumns.value = vue.unref(myColumns);
|
|
6878
|
-
tableDataSource.value = vue.unref(myDataSource);
|
|
6877
|
+
tableColumns.value = lodashEs.cloneDeep(vue.unref(myColumns));
|
|
6878
|
+
tableDataSource.value = lodashEs.cloneDeep(vue.unref(myDataSource));
|
|
6879
6879
|
}
|
|
6880
6880
|
}, {
|
|
6881
6881
|
deep: true,
|
|
@@ -6890,7 +6890,7 @@
|
|
|
6890
6890
|
if (isUseLoading)
|
|
6891
6891
|
loading.value = true;
|
|
6892
6892
|
let params = {};
|
|
6893
|
-
if (vue.unref(orderCondition)
|
|
6893
|
+
if (vue.unref(orderCondition)) {
|
|
6894
6894
|
params.orderCondition = vue.unref(orderCondition);
|
|
6895
6895
|
}
|
|
6896
6896
|
if (props2.paginationShow) {
|
|
@@ -6904,7 +6904,9 @@
|
|
|
6904
6904
|
const res = await requestData(params);
|
|
6905
6905
|
const { rows = [], total: tableTotal = 0 } = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) || {};
|
|
6906
6906
|
total.value = tableTotal;
|
|
6907
|
-
|
|
6907
|
+
if (Array.isArray(rows)) {
|
|
6908
|
+
myDataSource.value = rows;
|
|
6909
|
+
}
|
|
6908
6910
|
} catch (e) {
|
|
6909
6911
|
console.error(e);
|
|
6910
6912
|
} finally {
|
|
@@ -7020,8 +7022,12 @@
|
|
|
7020
7022
|
refreshData
|
|
7021
7023
|
});
|
|
7022
7024
|
const summaryList = vue.computed(() => {
|
|
7023
|
-
const columns =
|
|
7024
|
-
|
|
7025
|
+
const columns = vue.unref(tableColumns);
|
|
7026
|
+
let summaryList2 = [];
|
|
7027
|
+
if (props2.isUseSeq) {
|
|
7028
|
+
columns.shift();
|
|
7029
|
+
summaryList2 = [{ total: "\u5C0F\u8BA1" }];
|
|
7030
|
+
}
|
|
7025
7031
|
let calcTotalCount = 0;
|
|
7026
7032
|
for (let i = 0; i < columns.length; i++) {
|
|
7027
7033
|
const column = columns[i];
|
|
@@ -7043,16 +7049,20 @@
|
|
|
7043
7049
|
return [];
|
|
7044
7050
|
const start = (vue.unref(pageNum) - 1) * vue.unref(pageSize);
|
|
7045
7051
|
const end = start + vue.unref(pageSize);
|
|
7046
|
-
const records = vue.unref(
|
|
7047
|
-
for (let i = 0; i <
|
|
7048
|
-
const
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7052
|
+
const records = vue.unref(tableDataSource).slice(start, end);
|
|
7053
|
+
for (let i = 0; i < summaryList2.length; i++) {
|
|
7054
|
+
const summary = summaryList2[i];
|
|
7055
|
+
let total2 = 0;
|
|
7056
|
+
const { isCalcTotal, dataIndex } = summary;
|
|
7057
|
+
if (isCalcTotal === true) {
|
|
7058
|
+
for (let j = 0; j < records.length; j++) {
|
|
7059
|
+
const record = records[j];
|
|
7060
|
+
const num = record[dataIndex];
|
|
7061
|
+
if (!isNaN(num)) {
|
|
7062
|
+
total2 = num + total2;
|
|
7063
|
+
}
|
|
7055
7064
|
}
|
|
7065
|
+
summary.total = total2;
|
|
7056
7066
|
}
|
|
7057
7067
|
}
|
|
7058
7068
|
return summaryList2;
|
|
@@ -7106,7 +7116,7 @@
|
|
|
7106
7116
|
};
|
|
7107
7117
|
}
|
|
7108
7118
|
});
|
|
7109
|
-
const
|
|
7119
|
+
const Table_vue_vue_type_style_index_0_scoped_33b428a2_lang = "";
|
|
7110
7120
|
const Table_vue_vue_type_style_index_1_lang = "";
|
|
7111
7121
|
const _hoisted_1$1 = {
|
|
7112
7122
|
key: 1,
|
|
@@ -7193,8 +7203,8 @@
|
|
|
7193
7203
|
default: vue.withCtx(() => [
|
|
7194
7204
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.summaryList, (summary, index2) => {
|
|
7195
7205
|
return vue.openBlock(), vue.createBlock(_component_a_table_summary_cell, {
|
|
7196
|
-
key:
|
|
7197
|
-
index:
|
|
7206
|
+
key: index2,
|
|
7207
|
+
index: index2,
|
|
7198
7208
|
style: vue.normalizeStyle({
|
|
7199
7209
|
backgroundColor: _ctx.cellBackgroundColor,
|
|
7200
7210
|
textAlign: summary.cellAlign || "center",
|
|
@@ -7204,8 +7214,12 @@
|
|
|
7204
7214
|
}, {
|
|
7205
7215
|
default: vue.withCtx(() => [
|
|
7206
7216
|
vue.createElementVNode("div", {
|
|
7207
|
-
class: vue.normalizeClass([_ctx.contrastClass(summary.total, summary.format)])
|
|
7208
|
-
|
|
7217
|
+
class: vue.normalizeClass([_ctx.contrastClass(summary.total, summary.format)]),
|
|
7218
|
+
style: vue.normalizeStyle({
|
|
7219
|
+
fontSize: _ctx.fontSize,
|
|
7220
|
+
fontWeight: _ctx.fontWeight
|
|
7221
|
+
})
|
|
7222
|
+
}, vue.toDisplayString((summary.format != null || summary.format !== "") && _ctx.formatFn(summary.total, summary.format)), 7)
|
|
7209
7223
|
]),
|
|
7210
7224
|
_: 2
|
|
7211
7225
|
}, 1032, ["index", "style"]);
|
|
@@ -7224,7 +7238,7 @@
|
|
|
7224
7238
|
}, 8, ["loading"])
|
|
7225
7239
|
], 4);
|
|
7226
7240
|
}
|
|
7227
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7241
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-33b428a2"]]);
|
|
7228
7242
|
const EcanTable = withInstall(Table);
|
|
7229
7243
|
const mapProps = {
|
|
7230
7244
|
...props,
|