@ecan-bi/datav 1.1.1 → 1.1.2
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 +51 -55
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +51 -55
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +8 -8
- package/package.json +1 -1
- package/types/table/table/Table.vue.d.ts +8 -2
- package/types/table/table/index.d.ts +8 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.1.
|
|
1
|
+
/*! @ecan-bi/datav@1.1.2 */
|
|
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) {
|
|
@@ -1565,7 +1565,6 @@
|
|
|
1565
1565
|
const ERD_URL = ((_d = window == null ? void 0 : window.config) == null ? void 0 : _d.erdURL) || "";
|
|
1566
1566
|
const useOnEvent = (props2, events) => {
|
|
1567
1567
|
vue.watch(() => props2.id, (id, oldId) => {
|
|
1568
|
-
console.log(id, oldId);
|
|
1569
1568
|
const eventBus = vue.inject(EVENT_BUS, {
|
|
1570
1569
|
onEvent: (i, e) => void 0,
|
|
1571
1570
|
offEvent: (i) => void 0
|
|
@@ -1682,8 +1681,6 @@
|
|
|
1682
1681
|
const usedVariable = data[textVariable];
|
|
1683
1682
|
if (usedVariable != null) {
|
|
1684
1683
|
statement = statement.replace(textVariable, usedVariable);
|
|
1685
|
-
} else {
|
|
1686
|
-
statement = statement.replace(textVariable, "");
|
|
1687
1684
|
}
|
|
1688
1685
|
}
|
|
1689
1686
|
try {
|
|
@@ -3155,7 +3152,7 @@
|
|
|
3155
3152
|
key: 0,
|
|
3156
3153
|
class: "ranking"
|
|
3157
3154
|
};
|
|
3158
|
-
const _hoisted_3$
|
|
3155
|
+
const _hoisted_3$2 = {
|
|
3159
3156
|
key: 1,
|
|
3160
3157
|
class: "ecan-list-content"
|
|
3161
3158
|
};
|
|
@@ -3203,7 +3200,7 @@
|
|
|
3203
3200
|
], 4);
|
|
3204
3201
|
}), 128))
|
|
3205
3202
|
])) : vue.createCommentVNode("", true),
|
|
3206
|
-
_ctx.dataSource.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
3203
|
+
_ctx.dataSource.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
3207
3204
|
_ctx.useTitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3208
3205
|
key: 0,
|
|
3209
3206
|
class: "title-placeholder",
|
|
@@ -6218,7 +6215,7 @@
|
|
|
6218
6215
|
const _withScopeId = (n) => (vue.pushScopeId("data-v-f3fc1305"), n = n(), vue.popScopeId(), n);
|
|
6219
6216
|
const _hoisted_1$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "top-left border-item" }, null, -1));
|
|
6220
6217
|
const _hoisted_2$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "top-right border-item" }, null, -1));
|
|
6221
|
-
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "bottom-left border-item" }, null, -1));
|
|
6218
|
+
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "bottom-left border-item" }, null, -1));
|
|
6222
6219
|
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "bottom-right border-item" }, null, -1));
|
|
6223
6220
|
const _hoisted_5 = { class: "title-item-wrapper" };
|
|
6224
6221
|
const _hoisted_6 = { class: "title-item" };
|
|
@@ -6254,7 +6251,7 @@
|
|
|
6254
6251
|
_ctx.useBorderModify ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6255
6252
|
_hoisted_1$5,
|
|
6256
6253
|
_hoisted_2$1,
|
|
6257
|
-
_hoisted_3,
|
|
6254
|
+
_hoisted_3$1,
|
|
6258
6255
|
_hoisted_4
|
|
6259
6256
|
], 64)) : vue.createCommentVNode("", true)
|
|
6260
6257
|
], 4)) : vue.createCommentVNode("", true),
|
|
@@ -6813,13 +6810,13 @@
|
|
|
6813
6810
|
const x = vue.computed(() => props2.scrollX);
|
|
6814
6811
|
const y = vue.computed(() => parseFloat(props2.height) - vue.unref(splitY));
|
|
6815
6812
|
const myColumns = vue.ref([]);
|
|
6816
|
-
const myDataSource = vue.ref(
|
|
6813
|
+
const myDataSource = vue.ref([]);
|
|
6817
6814
|
const tableColumns = vue.ref([]);
|
|
6818
6815
|
const tableDataSource = vue.ref([]);
|
|
6819
6816
|
const total = vue.ref(0);
|
|
6820
6817
|
const pageNum = vue.ref(1);
|
|
6821
6818
|
const pageSize = vue.computed(() => props2.paginationPageSize);
|
|
6822
|
-
const handleChildrenColumns = (_columns) => {
|
|
6819
|
+
const handleChildrenColumns = (_columns = []) => {
|
|
6823
6820
|
if (Array.isArray(_columns) && _columns.length > 0) {
|
|
6824
6821
|
const len = _columns.length;
|
|
6825
6822
|
const columnsFixedNum = props2.columnsFixedNum;
|
|
@@ -6864,25 +6861,22 @@
|
|
|
6864
6861
|
}
|
|
6865
6862
|
};
|
|
6866
6863
|
const handleColumns = (columns = []) => {
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
if (isUseSeq) {
|
|
6870
|
-
_columns.push({
|
|
6864
|
+
if (props2.isUseSeq) {
|
|
6865
|
+
columns.unshift({
|
|
6871
6866
|
title: "\u5E8F\u53F7",
|
|
6872
6867
|
dataIndex: "SEQ",
|
|
6873
6868
|
align: "center"
|
|
6874
6869
|
});
|
|
6875
6870
|
}
|
|
6876
|
-
_columns = _columns.concat(lodashEs.cloneDeep(columns));
|
|
6877
6871
|
if (props2.isUseAction) {
|
|
6878
|
-
|
|
6872
|
+
columns.push({
|
|
6879
6873
|
title: "\u64CD\u4F5C",
|
|
6880
6874
|
dataIndex: "ACTION",
|
|
6881
6875
|
width: props2.actionColumnWidth
|
|
6882
6876
|
});
|
|
6883
6877
|
}
|
|
6884
|
-
handleChildrenColumns(
|
|
6885
|
-
|
|
6878
|
+
handleChildrenColumns(columns);
|
|
6879
|
+
return columns;
|
|
6886
6880
|
};
|
|
6887
6881
|
vue.watch(() => [
|
|
6888
6882
|
props2.columns,
|
|
@@ -6893,7 +6887,7 @@
|
|
|
6893
6887
|
props2.cellBackgroundColor,
|
|
6894
6888
|
props2.borderColor
|
|
6895
6889
|
], () => {
|
|
6896
|
-
handleColumns(props2.columns);
|
|
6890
|
+
myColumns.value = handleColumns(lodashEs.cloneDeep(props2.columns));
|
|
6897
6891
|
}, {
|
|
6898
6892
|
immediate: true,
|
|
6899
6893
|
deep: true
|
|
@@ -6902,6 +6896,21 @@
|
|
|
6902
6896
|
if (dataType !== "static")
|
|
6903
6897
|
return;
|
|
6904
6898
|
myDataSource.value = data;
|
|
6899
|
+
}, {
|
|
6900
|
+
immediate: true
|
|
6901
|
+
});
|
|
6902
|
+
vue.watch(() => [props2.isReverse, myColumns.value, myDataSource.value], () => {
|
|
6903
|
+
if (props2.isReverse) {
|
|
6904
|
+
const { columns, dataSource } = handleReverseTable(lodashEs.cloneDeep(vue.unref(myColumns)), lodashEs.cloneDeep(vue.unref(myDataSource)));
|
|
6905
|
+
tableColumns.value = columns;
|
|
6906
|
+
tableDataSource.value = dataSource;
|
|
6907
|
+
} else {
|
|
6908
|
+
tableColumns.value = vue.unref(myColumns);
|
|
6909
|
+
tableDataSource.value = vue.unref(myDataSource);
|
|
6910
|
+
}
|
|
6911
|
+
}, {
|
|
6912
|
+
immediate: true,
|
|
6913
|
+
flush: "post"
|
|
6905
6914
|
});
|
|
6906
6915
|
const handleReverseTable = (columns, dataSource) => {
|
|
6907
6916
|
const firstColumns = columns[0];
|
|
@@ -6936,19 +6945,6 @@
|
|
|
6936
6945
|
dataSource: _dataSource
|
|
6937
6946
|
};
|
|
6938
6947
|
};
|
|
6939
|
-
vue.watch(() => [props2.isReverse, myColumns.value, myDataSource.value], () => {
|
|
6940
|
-
if (props2.isReverse) {
|
|
6941
|
-
const { columns, dataSource } = handleReverseTable(vue.unref(myColumns), vue.unref(myDataSource));
|
|
6942
|
-
tableColumns.value = columns;
|
|
6943
|
-
tableDataSource.value = dataSource;
|
|
6944
|
-
} else {
|
|
6945
|
-
tableColumns.value = lodashEs.cloneDeep(vue.unref(myColumns));
|
|
6946
|
-
tableDataSource.value = lodashEs.cloneDeep(vue.unref(myDataSource));
|
|
6947
|
-
}
|
|
6948
|
-
}, {
|
|
6949
|
-
deep: true,
|
|
6950
|
-
immediate: true
|
|
6951
|
-
});
|
|
6952
6948
|
const orderCondition = vue.ref("");
|
|
6953
6949
|
const requestData = useRequestData(props2);
|
|
6954
6950
|
const loading = vue.ref(false);
|
|
@@ -7049,7 +7045,8 @@
|
|
|
7049
7045
|
});
|
|
7050
7046
|
const handleIndicatorDataset = (dataColumns = [], dataRows = []) => {
|
|
7051
7047
|
const _columns = dataColumns.map((column) => ({ title: column, dataIndex: column, key: column }));
|
|
7052
|
-
handleColumns(_columns);
|
|
7048
|
+
const columns = handleColumns(_columns);
|
|
7049
|
+
myColumns.value = columns;
|
|
7053
7050
|
myDataSource.value = dataRows;
|
|
7054
7051
|
};
|
|
7055
7052
|
const indicatorData = useIndicatorData(props2);
|
|
@@ -7091,16 +7088,17 @@
|
|
|
7091
7088
|
});
|
|
7092
7089
|
const summaryList = vue.computed(() => {
|
|
7093
7090
|
const columns = vue.unref(tableColumns);
|
|
7094
|
-
|
|
7095
|
-
if (props2.isUseSeq) {
|
|
7096
|
-
columns.shift();
|
|
7097
|
-
summaryList2 = [{ total: "\u5C0F\u8BA1" }];
|
|
7098
|
-
}
|
|
7091
|
+
const summaryList2 = [];
|
|
7099
7092
|
let calcTotalCount = 0;
|
|
7100
7093
|
for (let i = 0; i < columns.length; i++) {
|
|
7101
7094
|
const column = columns[i];
|
|
7102
7095
|
const { isCalcTotal } = column;
|
|
7103
|
-
if (
|
|
7096
|
+
if (props2.isUseSeq && i === 0) {
|
|
7097
|
+
summaryList2.push({
|
|
7098
|
+
...column,
|
|
7099
|
+
total: "\u5C0F\u8BA1"
|
|
7100
|
+
});
|
|
7101
|
+
} else if (isCalcTotal) {
|
|
7104
7102
|
summaryList2.push({
|
|
7105
7103
|
...column,
|
|
7106
7104
|
index: i,
|
|
@@ -7177,24 +7175,27 @@
|
|
|
7177
7175
|
formatFn,
|
|
7178
7176
|
contrastClass,
|
|
7179
7177
|
tableChange,
|
|
7180
|
-
|
|
7181
|
-
|
|
7178
|
+
myColumns,
|
|
7179
|
+
myDataSource,
|
|
7182
7180
|
summaryList,
|
|
7183
7181
|
loading,
|
|
7184
7182
|
onTouchHrefEvent,
|
|
7185
7183
|
handleHref,
|
|
7186
7184
|
handleHrefTarget,
|
|
7187
|
-
useRowIndex
|
|
7185
|
+
useRowIndex,
|
|
7186
|
+
tableColumns,
|
|
7187
|
+
tableDataSource
|
|
7188
7188
|
};
|
|
7189
7189
|
}
|
|
7190
7190
|
});
|
|
7191
|
-
const
|
|
7191
|
+
const Table_vue_vue_type_style_index_0_scoped_292c12ab_lang = "";
|
|
7192
7192
|
const Table_vue_vue_type_style_index_1_lang = "";
|
|
7193
|
-
const _hoisted_1$1 = {
|
|
7193
|
+
const _hoisted_1$1 = { key: 0 };
|
|
7194
|
+
const _hoisted_2 = {
|
|
7194
7195
|
key: 1,
|
|
7195
7196
|
class: "action-list"
|
|
7196
7197
|
};
|
|
7197
|
-
const
|
|
7198
|
+
const _hoisted_3 = ["href", "target", "onClick"];
|
|
7198
7199
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7199
7200
|
const _component_a_table_summary_cell = vue.resolveComponent("a-table-summary-cell");
|
|
7200
7201
|
const _component_a_table_summary_row = vue.resolveComponent("a-table-summary-row");
|
|
@@ -7235,13 +7236,8 @@
|
|
|
7235
7236
|
}, vue.toDisplayString(column.title), 5)
|
|
7236
7237
|
]),
|
|
7237
7238
|
bodyCell: vue.withCtx(({ column, index: index2, text, record }) => [
|
|
7238
|
-
column.dataIndex === "SEQ" ? (vue.openBlock(), vue.createElementBlock("span",
|
|
7239
|
-
|
|
7240
|
-
style: vue.normalizeStyle({
|
|
7241
|
-
fontSize: _ctx.fontSize,
|
|
7242
|
-
fontWeight: _ctx.fontWeight
|
|
7243
|
-
})
|
|
7244
|
-
}, vue.toDisplayString(index2 + 1), 5)) : column.dataIndex === "ACTION" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
7239
|
+
column.dataIndex === "SEQ" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$1, vue.toDisplayString(index2 + 1), 1)) : vue.createCommentVNode("", true),
|
|
7240
|
+
column.dataIndex === "ACTION" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
7245
7241
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actionList, (action, index22) => {
|
|
7246
7242
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
7247
7243
|
class: "action",
|
|
@@ -7256,7 +7252,7 @@
|
|
|
7256
7252
|
fontWeight: _ctx.fontWeight
|
|
7257
7253
|
}),
|
|
7258
7254
|
onClick: ($event) => _ctx.onTouchHrefEvent(action.target, _ctx.handleHref(action.href, record))
|
|
7259
|
-
}, vue.toDisplayString(action.title), 13,
|
|
7255
|
+
}, vue.toDisplayString(action.title), 13, _hoisted_3)
|
|
7260
7256
|
]);
|
|
7261
7257
|
}), 128))
|
|
7262
7258
|
])) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -7266,7 +7262,7 @@
|
|
|
7266
7262
|
fontSize: _ctx.fontSize,
|
|
7267
7263
|
fontWeight: _ctx.fontWeight
|
|
7268
7264
|
})
|
|
7269
|
-
}, vue.toDisplayString(
|
|
7265
|
+
}, vue.toDisplayString(column.format != null ? _ctx.formatFn(text, column.format) : text), 7))
|
|
7270
7266
|
]),
|
|
7271
7267
|
summary: vue.withCtx(() => [
|
|
7272
7268
|
_ctx.summaryList.length > 0 ? (vue.openBlock(), vue.createBlock(_component_a_table_summary, { key: 0 }, {
|
|
@@ -7310,7 +7306,7 @@
|
|
|
7310
7306
|
}, 8, ["loading"])
|
|
7311
7307
|
], 4);
|
|
7312
7308
|
}
|
|
7313
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7309
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-292c12ab"]]);
|
|
7314
7310
|
const EcanTable = withInstall(Table);
|
|
7315
7311
|
const mapProps = {
|
|
7316
7312
|
...props,
|