@ecan-bi/datav 1.1.0 → 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 +178 -110
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +177 -109
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +31 -31
- 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/types/utils/types.d.ts +5 -0
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) {
|
|
@@ -1569,9 +1569,6 @@
|
|
|
1569
1569
|
onEvent: (i, e) => void 0,
|
|
1570
1570
|
offEvent: (i) => void 0
|
|
1571
1571
|
});
|
|
1572
|
-
if (oldId != null && oldId !== "") {
|
|
1573
|
-
eventBus.offEvent(oldId);
|
|
1574
|
-
}
|
|
1575
1572
|
if (id != null && id !== "") {
|
|
1576
1573
|
eventBus.onEvent(id, events);
|
|
1577
1574
|
}
|
|
@@ -1684,8 +1681,6 @@
|
|
|
1684
1681
|
const usedVariable = data[textVariable];
|
|
1685
1682
|
if (usedVariable != null) {
|
|
1686
1683
|
statement = statement.replace(textVariable, usedVariable);
|
|
1687
|
-
} else {
|
|
1688
|
-
statement = statement.replace(textVariable, "");
|
|
1689
1684
|
}
|
|
1690
1685
|
}
|
|
1691
1686
|
try {
|
|
@@ -2645,11 +2640,16 @@
|
|
|
2645
2640
|
setGlobalModel
|
|
2646
2641
|
});
|
|
2647
2642
|
const eventBus = mitt__default.default();
|
|
2643
|
+
const eventBusKeySet = /* @__PURE__ */ new Set();
|
|
2648
2644
|
const onEvent = (key, events) => {
|
|
2645
|
+
if (eventBusKeySet.has(key)) {
|
|
2646
|
+
eventBus.off(key);
|
|
2647
|
+
}
|
|
2649
2648
|
eventBus.on(key, (k) => {
|
|
2649
|
+
eventBusKeySet.add(key);
|
|
2650
2650
|
return Object.prototype.toString.call(events[k]) === "[object Function]" && events[k]();
|
|
2651
2651
|
});
|
|
2652
|
-
vue.
|
|
2652
|
+
vue.onBeforeUnmount(() => {
|
|
2653
2653
|
eventBus.off(key);
|
|
2654
2654
|
});
|
|
2655
2655
|
};
|
|
@@ -2672,14 +2672,16 @@
|
|
|
2672
2672
|
requestToken
|
|
2673
2673
|
});
|
|
2674
2674
|
const requestModel = /* @__PURE__ */ new Map();
|
|
2675
|
-
const
|
|
2676
|
-
|
|
2675
|
+
const requestMap = /* @__PURE__ */ new Map();
|
|
2676
|
+
const setRequest = ({ requestFn = () => {
|
|
2677
|
+
}, sortNum = 0, id = "" }) => {
|
|
2677
2678
|
if (requestModel.has(sortNum)) {
|
|
2678
2679
|
const requestFnList = requestModel.get(sortNum);
|
|
2679
2680
|
requestFnList == null ? void 0 : requestFnList.push(requestFn);
|
|
2680
2681
|
} else {
|
|
2681
2682
|
requestModel.set(sortNum, [requestFn]);
|
|
2682
2683
|
}
|
|
2684
|
+
requestMap.set(id, requestFn);
|
|
2683
2685
|
};
|
|
2684
2686
|
const handleRequestFnList = (requestFnList) => {
|
|
2685
2687
|
return new Promise((resolve, reject) => {
|
|
@@ -2701,22 +2703,29 @@
|
|
|
2701
2703
|
});
|
|
2702
2704
|
config.indicatorToken = (_a2 = res.data.data) == null ? void 0 : _a2.token;
|
|
2703
2705
|
};
|
|
2704
|
-
const touchRequest = async () => {
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2706
|
+
const touchRequest = async (id) => {
|
|
2707
|
+
if (!id) {
|
|
2708
|
+
const requestModelArr = Array.from(requestModel);
|
|
2709
|
+
requestModelArr.sort((a, b) => b[0] - a[0]);
|
|
2710
|
+
const len = requestModelArr.length;
|
|
2711
|
+
try {
|
|
2712
|
+
if (props2.pageMode !== "design" && vue.unref(tokenNum) > 0) {
|
|
2713
|
+
await queryUserToken();
|
|
2714
|
+
}
|
|
2715
|
+
for (let i = 0; i < len; i++) {
|
|
2716
|
+
const requestFnList = requestModelArr[i][1];
|
|
2717
|
+
await handleRequestFnList(requestFnList);
|
|
2718
|
+
}
|
|
2719
|
+
} catch (e) {
|
|
2720
|
+
console.error(e);
|
|
2721
|
+
} finally {
|
|
2722
|
+
requestModel.clear();
|
|
2711
2723
|
}
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2724
|
+
} else if (typeof id === "string") {
|
|
2725
|
+
const requestFn = requestMap.get(id);
|
|
2726
|
+
if (typeof requestFn === "function") {
|
|
2727
|
+
requestFn();
|
|
2715
2728
|
}
|
|
2716
|
-
} catch (e) {
|
|
2717
|
-
console.error(e);
|
|
2718
|
-
} finally {
|
|
2719
|
-
requestModel.clear();
|
|
2720
2729
|
}
|
|
2721
2730
|
};
|
|
2722
2731
|
vue.provide(REQUEST_MODEL, {
|
|
@@ -2735,6 +2744,10 @@
|
|
|
2735
2744
|
eventBus.off(REFRESH_PAGE);
|
|
2736
2745
|
});
|
|
2737
2746
|
};
|
|
2747
|
+
vue.onBeforeUnmount(() => {
|
|
2748
|
+
requestModel == null ? void 0 : requestModel.clear();
|
|
2749
|
+
requestMap == null ? void 0 : requestMap.clear();
|
|
2750
|
+
});
|
|
2738
2751
|
expose({
|
|
2739
2752
|
touchRequest,
|
|
2740
2753
|
getGlobalModel,
|
|
@@ -2869,9 +2882,13 @@
|
|
|
2869
2882
|
refreshData
|
|
2870
2883
|
});
|
|
2871
2884
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
2872
|
-
setRequest: (
|
|
2885
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
2886
|
+
});
|
|
2887
|
+
setRequest({
|
|
2888
|
+
id: props2.id,
|
|
2889
|
+
requestFn: refreshData,
|
|
2890
|
+
sortNum: props2.requestSort
|
|
2873
2891
|
});
|
|
2874
|
-
setRequest(refreshData, props2.requestSort);
|
|
2875
2892
|
useOnEvent(props2, {
|
|
2876
2893
|
refreshData
|
|
2877
2894
|
});
|
|
@@ -2904,7 +2921,7 @@
|
|
|
2904
2921
|
};
|
|
2905
2922
|
}
|
|
2906
2923
|
});
|
|
2907
|
-
const
|
|
2924
|
+
const Text_vue_vue_type_style_index_0_scoped_860fa6ea_lang = "";
|
|
2908
2925
|
const _hoisted_1$8 = ["innerHTML"];
|
|
2909
2926
|
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2910
2927
|
const _component_skeleton = vue.resolveComponent("skeleton");
|
|
@@ -2922,7 +2939,7 @@
|
|
|
2922
2939
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
|
|
2923
2940
|
}, null, 12, _hoisted_1$8));
|
|
2924
2941
|
}
|
|
2925
|
-
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-
|
|
2942
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-860fa6ea"]]);
|
|
2926
2943
|
const EcanText = withInstall(Text);
|
|
2927
2944
|
const _sfc_main$m = vue.defineComponent({
|
|
2928
2945
|
name: "EcanScrollText",
|
|
@@ -3106,9 +3123,13 @@
|
|
|
3106
3123
|
refreshData
|
|
3107
3124
|
});
|
|
3108
3125
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
3109
|
-
setRequest: (
|
|
3126
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
3127
|
+
});
|
|
3128
|
+
setRequest({
|
|
3129
|
+
id: props2.id,
|
|
3130
|
+
requestFn: handleRequestData,
|
|
3131
|
+
sortNum: props2.requestSort
|
|
3110
3132
|
});
|
|
3111
|
-
setRequest(handleRequestData, props2.requestSort);
|
|
3112
3133
|
return {
|
|
3113
3134
|
style: style2,
|
|
3114
3135
|
formatFn,
|
|
@@ -3120,9 +3141,9 @@
|
|
|
3120
3141
|
};
|
|
3121
3142
|
}
|
|
3122
3143
|
});
|
|
3123
|
-
const
|
|
3144
|
+
const List_vue_vue_type_style_index_0_scoped_baf2ff0c_lang = "";
|
|
3124
3145
|
const List_vue_vue_type_style_index_1_lang = "";
|
|
3125
|
-
const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-
|
|
3146
|
+
const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-baf2ff0c"), n = n(), vue.popScopeId(), n);
|
|
3126
3147
|
const _hoisted_1$6 = {
|
|
3127
3148
|
key: 0,
|
|
3128
3149
|
class: "title"
|
|
@@ -3131,7 +3152,7 @@
|
|
|
3131
3152
|
key: 0,
|
|
3132
3153
|
class: "ranking"
|
|
3133
3154
|
};
|
|
3134
|
-
const _hoisted_3$
|
|
3155
|
+
const _hoisted_3$2 = {
|
|
3135
3156
|
key: 1,
|
|
3136
3157
|
class: "ecan-list-content"
|
|
3137
3158
|
};
|
|
@@ -3179,7 +3200,7 @@
|
|
|
3179
3200
|
], 4);
|
|
3180
3201
|
}), 128))
|
|
3181
3202
|
])) : vue.createCommentVNode("", true),
|
|
3182
|
-
_ctx.dataSource.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
3203
|
+
_ctx.dataSource.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
3183
3204
|
_ctx.useTitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3184
3205
|
key: 0,
|
|
3185
3206
|
class: "title-placeholder",
|
|
@@ -3224,7 +3245,7 @@
|
|
|
3224
3245
|
}, 8, ["loading"])
|
|
3225
3246
|
], 4);
|
|
3226
3247
|
}
|
|
3227
|
-
const List = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-
|
|
3248
|
+
const List = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-baf2ff0c"]]);
|
|
3228
3249
|
const EcanList = withInstall(List);
|
|
3229
3250
|
const proportionProps = {
|
|
3230
3251
|
...props,
|
|
@@ -3379,9 +3400,13 @@
|
|
|
3379
3400
|
const click = emitEvent("click", () => {
|
|
3380
3401
|
});
|
|
3381
3402
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
3382
|
-
setRequest: (
|
|
3403
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
3404
|
+
});
|
|
3405
|
+
setRequest({
|
|
3406
|
+
id: props2.id,
|
|
3407
|
+
requestFn: handleRequestData,
|
|
3408
|
+
sortNum: props2.requestSort
|
|
3383
3409
|
});
|
|
3384
|
-
setRequest(handleRequestData, props2.requestSort);
|
|
3385
3410
|
return {
|
|
3386
3411
|
style: style2,
|
|
3387
3412
|
myWidth,
|
|
@@ -3392,7 +3417,7 @@
|
|
|
3392
3417
|
};
|
|
3393
3418
|
}
|
|
3394
3419
|
});
|
|
3395
|
-
const
|
|
3420
|
+
const Proportion_vue_vue_type_style_index_0_scoped_304d430d_lang = "";
|
|
3396
3421
|
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3397
3422
|
const _component_skeleton = vue.resolveComponent("skeleton");
|
|
3398
3423
|
const _component_a_progress = vue.resolveComponent("a-progress");
|
|
@@ -3432,7 +3457,7 @@
|
|
|
3432
3457
|
}, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
|
|
3433
3458
|
], 4);
|
|
3434
3459
|
}
|
|
3435
|
-
const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-
|
|
3460
|
+
const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-304d430d"]]);
|
|
3436
3461
|
const EcanProportion = withInstall(Proportion);
|
|
3437
3462
|
const inputProps = {
|
|
3438
3463
|
...props,
|
|
@@ -3679,9 +3704,13 @@
|
|
|
3679
3704
|
selectChange
|
|
3680
3705
|
});
|
|
3681
3706
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
3682
|
-
setRequest: (
|
|
3707
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
3708
|
+
});
|
|
3709
|
+
setRequest({
|
|
3710
|
+
id: props2.id,
|
|
3711
|
+
requestFn: handleRequestData,
|
|
3712
|
+
sortNum: props2.requestSort
|
|
3683
3713
|
});
|
|
3684
|
-
setRequest(handleRequestData, props2.requestSort);
|
|
3685
3714
|
return {
|
|
3686
3715
|
style: style2,
|
|
3687
3716
|
getPopupContainer,
|
|
@@ -3693,7 +3722,7 @@
|
|
|
3693
3722
|
};
|
|
3694
3723
|
}
|
|
3695
3724
|
});
|
|
3696
|
-
const
|
|
3725
|
+
const Select_vue_vue_type_style_index_0_scoped_dd2bcf63_lang = "";
|
|
3697
3726
|
const Select_vue_vue_type_style_index_1_lang = "";
|
|
3698
3727
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3699
3728
|
const _component_a_select = vue.resolveComponent("a-select");
|
|
@@ -3717,7 +3746,7 @@
|
|
|
3717
3746
|
}, null, 8, ["value", "options", "mode", "getPopupContainer", "field-names", "maxTagCount", "filter-option", "onChange", "loading"])
|
|
3718
3747
|
], 4);
|
|
3719
3748
|
}
|
|
3720
|
-
const Select = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-
|
|
3749
|
+
const Select = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-dd2bcf63"]]);
|
|
3721
3750
|
const EcanSelect = withInstall(Select);
|
|
3722
3751
|
const rangePickerProps = {
|
|
3723
3752
|
...props,
|
|
@@ -3971,9 +4000,13 @@
|
|
|
3971
4000
|
setGlobalModel(id, { ...modal, RECORD: myValue });
|
|
3972
4001
|
});
|
|
3973
4002
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
3974
|
-
setRequest: (
|
|
4003
|
+
setRequest: ({ id: id2, sortNum, requestFn }) => void 0
|
|
4004
|
+
});
|
|
4005
|
+
setRequest({
|
|
4006
|
+
id: props2.id,
|
|
4007
|
+
requestFn: handleRequestData,
|
|
4008
|
+
sortNum: props2.requestSort
|
|
3975
4009
|
});
|
|
3976
|
-
setRequest(handleRequestData, props2.requestSort);
|
|
3977
4010
|
return {
|
|
3978
4011
|
myOption,
|
|
3979
4012
|
style: style2,
|
|
@@ -4320,9 +4353,13 @@
|
|
|
4320
4353
|
click
|
|
4321
4354
|
});
|
|
4322
4355
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
4323
|
-
setRequest: (
|
|
4356
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
4357
|
+
});
|
|
4358
|
+
setRequest({
|
|
4359
|
+
id: props2.id,
|
|
4360
|
+
requestFn: chooseRequestOrDiagram,
|
|
4361
|
+
sortNum: props2.requestSort
|
|
4324
4362
|
});
|
|
4325
|
-
setRequest(chooseRequestOrDiagram, props2.requestSort);
|
|
4326
4363
|
return {
|
|
4327
4364
|
option,
|
|
4328
4365
|
style: style2,
|
|
@@ -4730,9 +4767,13 @@
|
|
|
4730
4767
|
click
|
|
4731
4768
|
});
|
|
4732
4769
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
4733
|
-
setRequest: (
|
|
4770
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
4771
|
+
});
|
|
4772
|
+
setRequest({
|
|
4773
|
+
id: props2.id,
|
|
4774
|
+
requestFn: chooseRequestOrDiagram,
|
|
4775
|
+
sortNum: props2.requestSort
|
|
4734
4776
|
});
|
|
4735
|
-
setRequest(chooseRequestOrDiagram, props2.requestSort);
|
|
4736
4777
|
return {
|
|
4737
4778
|
option,
|
|
4738
4779
|
style: style2,
|
|
@@ -5175,9 +5216,13 @@
|
|
|
5175
5216
|
setGlobalModel(id, { ...modal, RECORD: e.data });
|
|
5176
5217
|
});
|
|
5177
5218
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
5178
|
-
setRequest: (
|
|
5219
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
5220
|
+
});
|
|
5221
|
+
setRequest({
|
|
5222
|
+
id: props2.id,
|
|
5223
|
+
requestFn: refreshData,
|
|
5224
|
+
sortNum: props2.requestSort
|
|
5179
5225
|
});
|
|
5180
|
-
setRequest(refreshData, props2.requestSort);
|
|
5181
5226
|
useOnEvent(props2, {
|
|
5182
5227
|
refreshData,
|
|
5183
5228
|
click
|
|
@@ -5499,9 +5544,13 @@
|
|
|
5499
5544
|
click
|
|
5500
5545
|
});
|
|
5501
5546
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
5502
|
-
setRequest: (
|
|
5547
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
5548
|
+
});
|
|
5549
|
+
setRequest({
|
|
5550
|
+
id: props2.id,
|
|
5551
|
+
requestFn: handleRequestData,
|
|
5552
|
+
sortNum: props2.requestSort
|
|
5503
5553
|
});
|
|
5504
|
-
setRequest(handleRequestData, props2.requestSort);
|
|
5505
5554
|
return {
|
|
5506
5555
|
option,
|
|
5507
5556
|
style: style2,
|
|
@@ -6026,9 +6075,13 @@
|
|
|
6026
6075
|
setGlobalModel(id, { ...modal, RECORD: e == null ? void 0 : e.data });
|
|
6027
6076
|
});
|
|
6028
6077
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
6029
|
-
setRequest: (
|
|
6078
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
6079
|
+
});
|
|
6080
|
+
setRequest({
|
|
6081
|
+
id: props2.id,
|
|
6082
|
+
requestFn: chooseRequestOrDiagram,
|
|
6083
|
+
sortNum: props2.requestSort
|
|
6030
6084
|
});
|
|
6031
|
-
setRequest(chooseRequestOrDiagram, props2.requestSort);
|
|
6032
6085
|
useOnEvent(props2, {
|
|
6033
6086
|
refreshData,
|
|
6034
6087
|
click
|
|
@@ -6162,7 +6215,7 @@
|
|
|
6162
6215
|
const _withScopeId = (n) => (vue.pushScopeId("data-v-f3fc1305"), n = n(), vue.popScopeId(), n);
|
|
6163
6216
|
const _hoisted_1$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "top-left border-item" }, null, -1));
|
|
6164
6217
|
const _hoisted_2$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "top-right border-item" }, null, -1));
|
|
6165
|
-
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));
|
|
6166
6219
|
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "bottom-right border-item" }, null, -1));
|
|
6167
6220
|
const _hoisted_5 = { class: "title-item-wrapper" };
|
|
6168
6221
|
const _hoisted_6 = { class: "title-item" };
|
|
@@ -6198,7 +6251,7 @@
|
|
|
6198
6251
|
_ctx.useBorderModify ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6199
6252
|
_hoisted_1$5,
|
|
6200
6253
|
_hoisted_2$1,
|
|
6201
|
-
_hoisted_3,
|
|
6254
|
+
_hoisted_3$1,
|
|
6202
6255
|
_hoisted_4
|
|
6203
6256
|
], 64)) : vue.createCommentVNode("", true)
|
|
6204
6257
|
], 4)) : vue.createCommentVNode("", true),
|
|
@@ -6757,13 +6810,13 @@
|
|
|
6757
6810
|
const x = vue.computed(() => props2.scrollX);
|
|
6758
6811
|
const y = vue.computed(() => parseFloat(props2.height) - vue.unref(splitY));
|
|
6759
6812
|
const myColumns = vue.ref([]);
|
|
6760
|
-
const myDataSource = vue.ref(
|
|
6813
|
+
const myDataSource = vue.ref([]);
|
|
6761
6814
|
const tableColumns = vue.ref([]);
|
|
6762
6815
|
const tableDataSource = vue.ref([]);
|
|
6763
6816
|
const total = vue.ref(0);
|
|
6764
6817
|
const pageNum = vue.ref(1);
|
|
6765
6818
|
const pageSize = vue.computed(() => props2.paginationPageSize);
|
|
6766
|
-
const handleChildrenColumns = (_columns) => {
|
|
6819
|
+
const handleChildrenColumns = (_columns = []) => {
|
|
6767
6820
|
if (Array.isArray(_columns) && _columns.length > 0) {
|
|
6768
6821
|
const len = _columns.length;
|
|
6769
6822
|
const columnsFixedNum = props2.columnsFixedNum;
|
|
@@ -6776,9 +6829,11 @@
|
|
|
6776
6829
|
}
|
|
6777
6830
|
const {
|
|
6778
6831
|
cellAlign = "center",
|
|
6779
|
-
cellColor
|
|
6832
|
+
cellColor,
|
|
6833
|
+
dataIndex,
|
|
6834
|
+
title
|
|
6780
6835
|
} = column;
|
|
6781
|
-
column.customCell = (
|
|
6836
|
+
column.customCell = (record, rowIndex) => ({
|
|
6782
6837
|
style: {
|
|
6783
6838
|
textAlign: cellAlign,
|
|
6784
6839
|
color: cellColor,
|
|
@@ -6787,7 +6842,17 @@
|
|
|
6787
6842
|
},
|
|
6788
6843
|
class: {
|
|
6789
6844
|
highlight: vue.unref(useRowIndex) === rowIndex && props2.clickHighlight
|
|
6790
|
-
}
|
|
6845
|
+
},
|
|
6846
|
+
onClick: emitEvent("click", () => {
|
|
6847
|
+
const id = props2.id;
|
|
6848
|
+
const modal = getGlobalModel(id);
|
|
6849
|
+
record = {
|
|
6850
|
+
dataIndex,
|
|
6851
|
+
title,
|
|
6852
|
+
...record
|
|
6853
|
+
};
|
|
6854
|
+
setGlobalModel(id, { ...modal, RECORD: record });
|
|
6855
|
+
})
|
|
6791
6856
|
});
|
|
6792
6857
|
if (Array.isArray(column.children)) {
|
|
6793
6858
|
handleChildrenColumns(column.children);
|
|
@@ -6796,25 +6861,22 @@
|
|
|
6796
6861
|
}
|
|
6797
6862
|
};
|
|
6798
6863
|
const handleColumns = (columns = []) => {
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
if (isUseSeq) {
|
|
6802
|
-
_columns.push({
|
|
6864
|
+
if (props2.isUseSeq) {
|
|
6865
|
+
columns.unshift({
|
|
6803
6866
|
title: "\u5E8F\u53F7",
|
|
6804
6867
|
dataIndex: "SEQ",
|
|
6805
6868
|
align: "center"
|
|
6806
6869
|
});
|
|
6807
6870
|
}
|
|
6808
|
-
_columns = _columns.concat(lodashEs.cloneDeep(columns));
|
|
6809
6871
|
if (props2.isUseAction) {
|
|
6810
|
-
|
|
6872
|
+
columns.push({
|
|
6811
6873
|
title: "\u64CD\u4F5C",
|
|
6812
6874
|
dataIndex: "ACTION",
|
|
6813
6875
|
width: props2.actionColumnWidth
|
|
6814
6876
|
});
|
|
6815
6877
|
}
|
|
6816
|
-
handleChildrenColumns(
|
|
6817
|
-
|
|
6878
|
+
handleChildrenColumns(columns);
|
|
6879
|
+
return columns;
|
|
6818
6880
|
};
|
|
6819
6881
|
vue.watch(() => [
|
|
6820
6882
|
props2.columns,
|
|
@@ -6825,7 +6887,7 @@
|
|
|
6825
6887
|
props2.cellBackgroundColor,
|
|
6826
6888
|
props2.borderColor
|
|
6827
6889
|
], () => {
|
|
6828
|
-
handleColumns(props2.columns);
|
|
6890
|
+
myColumns.value = handleColumns(lodashEs.cloneDeep(props2.columns));
|
|
6829
6891
|
}, {
|
|
6830
6892
|
immediate: true,
|
|
6831
6893
|
deep: true
|
|
@@ -6834,6 +6896,21 @@
|
|
|
6834
6896
|
if (dataType !== "static")
|
|
6835
6897
|
return;
|
|
6836
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"
|
|
6837
6914
|
});
|
|
6838
6915
|
const handleReverseTable = (columns, dataSource) => {
|
|
6839
6916
|
const firstColumns = columns[0];
|
|
@@ -6868,19 +6945,6 @@
|
|
|
6868
6945
|
dataSource: _dataSource
|
|
6869
6946
|
};
|
|
6870
6947
|
};
|
|
6871
|
-
vue.watch(() => [props2.isReverse, myColumns.value, myDataSource.value], () => {
|
|
6872
|
-
if (props2.isReverse) {
|
|
6873
|
-
const { columns, dataSource } = handleReverseTable(vue.unref(myColumns), vue.unref(myDataSource));
|
|
6874
|
-
tableColumns.value = columns;
|
|
6875
|
-
tableDataSource.value = dataSource;
|
|
6876
|
-
} else {
|
|
6877
|
-
tableColumns.value = lodashEs.cloneDeep(vue.unref(myColumns));
|
|
6878
|
-
tableDataSource.value = lodashEs.cloneDeep(vue.unref(myDataSource));
|
|
6879
|
-
}
|
|
6880
|
-
}, {
|
|
6881
|
-
deep: true,
|
|
6882
|
-
immediate: true
|
|
6883
|
-
});
|
|
6884
6948
|
const orderCondition = vue.ref("");
|
|
6885
6949
|
const requestData = useRequestData(props2);
|
|
6886
6950
|
const loading = vue.ref(false);
|
|
@@ -6981,7 +7045,8 @@
|
|
|
6981
7045
|
});
|
|
6982
7046
|
const handleIndicatorDataset = (dataColumns = [], dataRows = []) => {
|
|
6983
7047
|
const _columns = dataColumns.map((column) => ({ title: column, dataIndex: column, key: column }));
|
|
6984
|
-
handleColumns(_columns);
|
|
7048
|
+
const columns = handleColumns(_columns);
|
|
7049
|
+
myColumns.value = columns;
|
|
6985
7050
|
myDataSource.value = dataRows;
|
|
6986
7051
|
};
|
|
6987
7052
|
const indicatorData = useIndicatorData(props2);
|
|
@@ -6999,7 +7064,7 @@
|
|
|
6999
7064
|
};
|
|
7000
7065
|
const useRowIndex = vue.ref(-1);
|
|
7001
7066
|
const customRow = (record, index2) => ({
|
|
7002
|
-
onClick: emitEvent("
|
|
7067
|
+
onClick: emitEvent("rowClick", () => {
|
|
7003
7068
|
const id = props2.id;
|
|
7004
7069
|
const modal = getGlobalModel(id);
|
|
7005
7070
|
setGlobalModel(id, { ...modal, RECORD: record });
|
|
@@ -7023,16 +7088,17 @@
|
|
|
7023
7088
|
});
|
|
7024
7089
|
const summaryList = vue.computed(() => {
|
|
7025
7090
|
const columns = vue.unref(tableColumns);
|
|
7026
|
-
|
|
7027
|
-
if (props2.isUseSeq) {
|
|
7028
|
-
columns.shift();
|
|
7029
|
-
summaryList2 = [{ total: "\u5C0F\u8BA1" }];
|
|
7030
|
-
}
|
|
7091
|
+
const summaryList2 = [];
|
|
7031
7092
|
let calcTotalCount = 0;
|
|
7032
7093
|
for (let i = 0; i < columns.length; i++) {
|
|
7033
7094
|
const column = columns[i];
|
|
7034
7095
|
const { isCalcTotal } = column;
|
|
7035
|
-
if (
|
|
7096
|
+
if (props2.isUseSeq && i === 0) {
|
|
7097
|
+
summaryList2.push({
|
|
7098
|
+
...column,
|
|
7099
|
+
total: "\u5C0F\u8BA1"
|
|
7100
|
+
});
|
|
7101
|
+
} else if (isCalcTotal) {
|
|
7036
7102
|
summaryList2.push({
|
|
7037
7103
|
...column,
|
|
7038
7104
|
index: i,
|
|
@@ -7068,9 +7134,13 @@
|
|
|
7068
7134
|
return summaryList2;
|
|
7069
7135
|
});
|
|
7070
7136
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
7071
|
-
setRequest: (
|
|
7137
|
+
setRequest: ({ id, sortNum, requestFn }) => void 0
|
|
7138
|
+
});
|
|
7139
|
+
setRequest({
|
|
7140
|
+
id: props2.id,
|
|
7141
|
+
requestFn: refreshData,
|
|
7142
|
+
sortNum: props2.requestSort
|
|
7072
7143
|
});
|
|
7073
|
-
setRequest(refreshData, props2.requestSort);
|
|
7074
7144
|
expose({
|
|
7075
7145
|
refreshData
|
|
7076
7146
|
});
|
|
@@ -7105,24 +7175,27 @@
|
|
|
7105
7175
|
formatFn,
|
|
7106
7176
|
contrastClass,
|
|
7107
7177
|
tableChange,
|
|
7108
|
-
|
|
7109
|
-
|
|
7178
|
+
myColumns,
|
|
7179
|
+
myDataSource,
|
|
7110
7180
|
summaryList,
|
|
7111
7181
|
loading,
|
|
7112
7182
|
onTouchHrefEvent,
|
|
7113
7183
|
handleHref,
|
|
7114
7184
|
handleHrefTarget,
|
|
7115
|
-
useRowIndex
|
|
7185
|
+
useRowIndex,
|
|
7186
|
+
tableColumns,
|
|
7187
|
+
tableDataSource
|
|
7116
7188
|
};
|
|
7117
7189
|
}
|
|
7118
7190
|
});
|
|
7119
|
-
const
|
|
7191
|
+
const Table_vue_vue_type_style_index_0_scoped_292c12ab_lang = "";
|
|
7120
7192
|
const Table_vue_vue_type_style_index_1_lang = "";
|
|
7121
|
-
const _hoisted_1$1 = {
|
|
7193
|
+
const _hoisted_1$1 = { key: 0 };
|
|
7194
|
+
const _hoisted_2 = {
|
|
7122
7195
|
key: 1,
|
|
7123
7196
|
class: "action-list"
|
|
7124
7197
|
};
|
|
7125
|
-
const
|
|
7198
|
+
const _hoisted_3 = ["href", "target", "onClick"];
|
|
7126
7199
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7127
7200
|
const _component_a_table_summary_cell = vue.resolveComponent("a-table-summary-cell");
|
|
7128
7201
|
const _component_a_table_summary_row = vue.resolveComponent("a-table-summary-row");
|
|
@@ -7163,13 +7236,8 @@
|
|
|
7163
7236
|
}, vue.toDisplayString(column.title), 5)
|
|
7164
7237
|
]),
|
|
7165
7238
|
bodyCell: vue.withCtx(({ column, index: index2, text, record }) => [
|
|
7166
|
-
column.dataIndex === "SEQ" ? (vue.openBlock(), vue.createElementBlock("span",
|
|
7167
|
-
|
|
7168
|
-
style: vue.normalizeStyle({
|
|
7169
|
-
fontSize: _ctx.fontSize,
|
|
7170
|
-
fontWeight: _ctx.fontWeight
|
|
7171
|
-
})
|
|
7172
|
-
}, 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, [
|
|
7173
7241
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actionList, (action, index22) => {
|
|
7174
7242
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
7175
7243
|
class: "action",
|
|
@@ -7184,7 +7252,7 @@
|
|
|
7184
7252
|
fontWeight: _ctx.fontWeight
|
|
7185
7253
|
}),
|
|
7186
7254
|
onClick: ($event) => _ctx.onTouchHrefEvent(action.target, _ctx.handleHref(action.href, record))
|
|
7187
|
-
}, vue.toDisplayString(action.title), 13,
|
|
7255
|
+
}, vue.toDisplayString(action.title), 13, _hoisted_3)
|
|
7188
7256
|
]);
|
|
7189
7257
|
}), 128))
|
|
7190
7258
|
])) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -7194,7 +7262,7 @@
|
|
|
7194
7262
|
fontSize: _ctx.fontSize,
|
|
7195
7263
|
fontWeight: _ctx.fontWeight
|
|
7196
7264
|
})
|
|
7197
|
-
}, vue.toDisplayString(
|
|
7265
|
+
}, vue.toDisplayString(column.format != null ? _ctx.formatFn(text, column.format) : text), 7))
|
|
7198
7266
|
]),
|
|
7199
7267
|
summary: vue.withCtx(() => [
|
|
7200
7268
|
_ctx.summaryList.length > 0 ? (vue.openBlock(), vue.createBlock(_component_a_table_summary, { key: 0 }, {
|
|
@@ -7238,7 +7306,7 @@
|
|
|
7238
7306
|
}, 8, ["loading"])
|
|
7239
7307
|
], 4);
|
|
7240
7308
|
}
|
|
7241
|
-
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"]]);
|
|
7242
7310
|
const EcanTable = withInstall(Table);
|
|
7243
7311
|
const mapProps = {
|
|
7244
7312
|
...props,
|