@ecan-bi/datav 1.1.12 → 1.1.14
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 +75 -24
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +75 -24
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +11 -11
- package/package.json +1 -1
- package/types/control/date-picker/DatePicker.vue.d.ts +18 -0
- package/types/control/date-picker/index.d.ts +18 -0
- package/types/control/date-picker/props.d.ts +10 -0
- package/types/control/range-picker/RangePicker.vue.d.ts +54 -0
- package/types/control/range-picker/index.d.ts +54 -0
- package/types/control/range-picker/props.d.ts +31 -0
- package/types/graph/bar/props.d.ts +1 -5
- package/types/graph/pie/props.d.ts +1 -5
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.1.
|
|
1
|
+
/*! @ecan-bi/datav@1.1.14 */
|
|
2
2
|
var _a, _b, _c, _d;
|
|
3
3
|
import { watch, inject, computed, unref, watchEffect, defineComponent, shallowRef, toRefs, onMounted, onUnmounted, h, nextTick, createVNode, resolveComponent, openBlock, createElementBlock, createBlock, renderSlot, withCtx, ref, normalizeStyle, createCommentVNode, provide, onBeforeUnmount, toDisplayString, Fragment, renderList, createElementVNode, normalizeClass, pushScopeId, popScopeId, createSlots, resolveDynamicComponent, mergeProps, withModifiers, reactive, createTextVNode, withDirectives, vShow } from "vue";
|
|
4
4
|
import { throttle, init, use, registerMap } from "echarts/core";
|
|
@@ -1669,7 +1669,7 @@ const useVariablesInText = (formatter = "", data = {}, { useNewline = false, use
|
|
|
1669
1669
|
for (let i = 0; i < variables.length; i++) {
|
|
1670
1670
|
const variable = variables[i];
|
|
1671
1671
|
let statement = variable.slice(1, -1);
|
|
1672
|
-
const reg = /[\u4e00-\
|
|
1672
|
+
const reg = /[\u4e00-\u9fa5a-z-_A-Z]+[0-9]*/g;
|
|
1673
1673
|
const textVariables = statement.match(reg);
|
|
1674
1674
|
for (let j = 0; j < textVariables.length; j++) {
|
|
1675
1675
|
const textVariable = textVariables[j];
|
|
@@ -1679,7 +1679,7 @@ const useVariablesInText = (formatter = "", data = {}, { useNewline = false, use
|
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
try {
|
|
1682
|
-
if (/[0-9]+(.*)[
|
|
1682
|
+
if (/[0-9]+(.*)[+|-|*|/](.*)[0-9]+/g.test(statement)) {
|
|
1683
1683
|
const eval2 = eval;
|
|
1684
1684
|
statement = eval2(statement);
|
|
1685
1685
|
}
|
|
@@ -1714,9 +1714,10 @@ const useRequestData = (props2, callBack = () => {
|
|
|
1714
1714
|
const { getGlobalModel } = inject(GLOBAL_MODEL, {
|
|
1715
1715
|
getGlobalModel: (key) => void 0
|
|
1716
1716
|
});
|
|
1717
|
+
console.log("requestUrl", requestUrl);
|
|
1718
|
+
const url = useVariablesInText(requestUrl);
|
|
1719
|
+
console.log("url", url);
|
|
1717
1720
|
const requestData = async (params = {}) => {
|
|
1718
|
-
const url = useVariablesInText(requestUrl);
|
|
1719
|
-
console.log("url", url);
|
|
1720
1721
|
if (!url || !method || !headers || unref(pageMode) === "design")
|
|
1721
1722
|
return;
|
|
1722
1723
|
let _params = {};
|
|
@@ -3561,10 +3562,11 @@ const datePickerProps = {
|
|
|
3561
3562
|
keyName: "\u65E5\u671F\u9009\u62E9\u5668",
|
|
3562
3563
|
rotate: "",
|
|
3563
3564
|
type: "ecanDatePicker",
|
|
3564
|
-
value:
|
|
3565
|
+
value: "",
|
|
3565
3566
|
picker: "date",
|
|
3566
3567
|
format: "YYYY-MM-DD",
|
|
3567
|
-
showTime: false
|
|
3568
|
+
showTime: false,
|
|
3569
|
+
useCurrentTime: true
|
|
3568
3570
|
};
|
|
3569
3571
|
const datePickerComponentProps = transformToComponentProps(datePickerProps);
|
|
3570
3572
|
const datePickerEvents = ["dateChange"];
|
|
@@ -3580,8 +3582,14 @@ const _sfc_main$h = defineComponent({
|
|
|
3580
3582
|
const style2 = usePickComponentStyle(props2);
|
|
3581
3583
|
const getPopupContainer = () => document.getElementById("ProviderConfig") || document.body;
|
|
3582
3584
|
const myValue = ref(null);
|
|
3583
|
-
watch(() => props2.value, () => {
|
|
3584
|
-
|
|
3585
|
+
watch(() => [props2.value, props2.useCurrentTime], ([value, useCurrentTime]) => {
|
|
3586
|
+
let _value = null;
|
|
3587
|
+
if (value) {
|
|
3588
|
+
_value = dayjs(value);
|
|
3589
|
+
} else if (useCurrentTime) {
|
|
3590
|
+
_value = dayjs();
|
|
3591
|
+
}
|
|
3592
|
+
myValue.value = _value;
|
|
3585
3593
|
}, {
|
|
3586
3594
|
immediate: true
|
|
3587
3595
|
});
|
|
@@ -3772,7 +3780,10 @@ const rangePickerProps = {
|
|
|
3772
3780
|
picker: "date",
|
|
3773
3781
|
format: "YYYY-MM-DD",
|
|
3774
3782
|
startTime: "",
|
|
3775
|
-
endTime: ""
|
|
3783
|
+
endTime: "",
|
|
3784
|
+
useCurrentTime: true,
|
|
3785
|
+
interval: 1,
|
|
3786
|
+
intervalUnit: "year"
|
|
3776
3787
|
};
|
|
3777
3788
|
const rangePickerComponentProps = transformToComponentProps(rangePickerProps);
|
|
3778
3789
|
const rangePickerEvents = ["dateChange"];
|
|
@@ -3788,9 +3799,19 @@ const _sfc_main$f = defineComponent({
|
|
|
3788
3799
|
const style2 = usePickComponentStyle(props2);
|
|
3789
3800
|
const getPopupContainer = () => document.getElementById("ProviderConfig") || document.body;
|
|
3790
3801
|
const myValue = ref([null, null]);
|
|
3791
|
-
watch(() => [props2.startTime, props2.endTime], ([startTime, endTime]) => {
|
|
3792
|
-
|
|
3793
|
-
|
|
3802
|
+
watch(() => [props2.startTime, props2.endTime, props2.useCurrentTime, props2.interval, props2.intervalUnit], ([startTime, endTime, useCurrentTime, interval, intervalUnit]) => {
|
|
3803
|
+
let _startTime = null;
|
|
3804
|
+
let _endTime = null;
|
|
3805
|
+
if (useCurrentTime) {
|
|
3806
|
+
_startTime = dayjs();
|
|
3807
|
+
_endTime = dayjs().subtract(interval, intervalUnit);
|
|
3808
|
+
}
|
|
3809
|
+
if (startTime) {
|
|
3810
|
+
_startTime = dayjs(startTime);
|
|
3811
|
+
}
|
|
3812
|
+
if (endTime) {
|
|
3813
|
+
_endTime = dayjs(endTime);
|
|
3814
|
+
}
|
|
3794
3815
|
myValue.value = [_startTime, _endTime];
|
|
3795
3816
|
}, {
|
|
3796
3817
|
immediate: true
|
|
@@ -3821,7 +3842,7 @@ const _sfc_main$f = defineComponent({
|
|
|
3821
3842
|
};
|
|
3822
3843
|
}
|
|
3823
3844
|
});
|
|
3824
|
-
const
|
|
3845
|
+
const RangePicker_vue_vue_type_style_index_0_scoped_2fc9988b_lang = "";
|
|
3825
3846
|
const RangePicker_vue_vue_type_style_index_1_lang = "";
|
|
3826
3847
|
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3827
3848
|
const _component_a_range_picker = resolveComponent("a-range-picker");
|
|
@@ -3842,7 +3863,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3842
3863
|
}, null, 8, ["value", "format", "picker", "locale", "getPopupContainer", "onChange"])
|
|
3843
3864
|
], 4);
|
|
3844
3865
|
}
|
|
3845
|
-
const RangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-
|
|
3866
|
+
const RangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-2fc9988b"]]);
|
|
3846
3867
|
const EcanRangePicker = withInstall(RangePicker);
|
|
3847
3868
|
const buttonProps = {
|
|
3848
3869
|
...props,
|
|
@@ -3874,7 +3895,7 @@ const _sfc_main$e = defineComponent({
|
|
|
3874
3895
|
const emitEvent = useEmitEvent(props2);
|
|
3875
3896
|
const click = emitEvent("click", () => {
|
|
3876
3897
|
const url = unref(myHref);
|
|
3877
|
-
if (props2.target === "event") {
|
|
3898
|
+
if (url && props2.target === "event") {
|
|
3878
3899
|
window.parent.postMessage({
|
|
3879
3900
|
type: "openPage",
|
|
3880
3901
|
url
|
|
@@ -4109,7 +4130,7 @@ const pieProps = {
|
|
|
4109
4130
|
toolboxInfoText: "\u5F53\u524D\u65E0\u8BF4\u660E\u4FE1\u606F"
|
|
4110
4131
|
};
|
|
4111
4132
|
const pieComponentProps = transformToComponentProps(pieProps);
|
|
4112
|
-
const pieEvents = ["click", "refreshData"];
|
|
4133
|
+
const pieEvents = ["click", "refreshData", "resetRecord"];
|
|
4113
4134
|
const useDownloadFile = async (downloadFileUrl) => {
|
|
4114
4135
|
var _a2;
|
|
4115
4136
|
const res = await request.post(downloadFileUrl, {}, {
|
|
@@ -4362,7 +4383,13 @@ const _sfc_main$c = defineComponent({
|
|
|
4362
4383
|
const refreshData = () => {
|
|
4363
4384
|
chooseRequestOrDiagram();
|
|
4364
4385
|
};
|
|
4386
|
+
const resetRecord = () => {
|
|
4387
|
+
const id = props2.id;
|
|
4388
|
+
const modal = getGlobalModel(id);
|
|
4389
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
4390
|
+
};
|
|
4365
4391
|
useOnEvent(props2, {
|
|
4392
|
+
resetRecord,
|
|
4366
4393
|
refreshData,
|
|
4367
4394
|
click
|
|
4368
4395
|
});
|
|
@@ -4489,7 +4516,7 @@ const lineProps = {
|
|
|
4489
4516
|
areaStyleOpacity: 0
|
|
4490
4517
|
};
|
|
4491
4518
|
const lineComponentProps = transformToComponentProps(lineProps);
|
|
4492
|
-
const lineEvents = ["click", "refreshData"];
|
|
4519
|
+
const lineEvents = ["click", "refreshData", "resetRecord"];
|
|
4493
4520
|
use([
|
|
4494
4521
|
CanvasRenderer,
|
|
4495
4522
|
LineChart,
|
|
@@ -4776,8 +4803,14 @@ const _sfc_main$b = defineComponent({
|
|
|
4776
4803
|
const refreshData = () => {
|
|
4777
4804
|
chooseRequestOrDiagram();
|
|
4778
4805
|
};
|
|
4806
|
+
const resetRecord = () => {
|
|
4807
|
+
const id = props2.id;
|
|
4808
|
+
const modal = getGlobalModel(id);
|
|
4809
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
4810
|
+
};
|
|
4779
4811
|
useOnEvent(props2, {
|
|
4780
4812
|
refreshData,
|
|
4813
|
+
resetRecord,
|
|
4781
4814
|
click
|
|
4782
4815
|
});
|
|
4783
4816
|
const { setRequest } = inject(REQUEST_MODEL, {
|
|
@@ -4931,7 +4964,7 @@ const barProps = {
|
|
|
4931
4964
|
labelColor: ""
|
|
4932
4965
|
};
|
|
4933
4966
|
const barComponentProps = transformToComponentProps(barProps);
|
|
4934
|
-
const barEvents = ["refreshData", "click"];
|
|
4967
|
+
const barEvents = ["refreshData", "click", "resetRecord"];
|
|
4935
4968
|
use([
|
|
4936
4969
|
CanvasRenderer,
|
|
4937
4970
|
BarChart,
|
|
@@ -5241,9 +5274,15 @@ const _sfc_main$a = defineComponent({
|
|
|
5241
5274
|
requestFn: refreshData,
|
|
5242
5275
|
sortNum: props2.requestSort
|
|
5243
5276
|
});
|
|
5277
|
+
const resetRecord = () => {
|
|
5278
|
+
const id = props2.id;
|
|
5279
|
+
const modal = getGlobalModel(id);
|
|
5280
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
5281
|
+
};
|
|
5244
5282
|
useOnEvent(props2, {
|
|
5245
5283
|
refreshData,
|
|
5246
|
-
click
|
|
5284
|
+
click,
|
|
5285
|
+
resetRecord
|
|
5247
5286
|
});
|
|
5248
5287
|
return {
|
|
5249
5288
|
option,
|
|
@@ -5780,7 +5819,7 @@ const comboGraphProps = {
|
|
|
5780
5819
|
barWidth: "40%"
|
|
5781
5820
|
};
|
|
5782
5821
|
const comboGraphComponentProps = transformToComponentProps(comboGraphProps);
|
|
5783
|
-
const comboGraphEvents = ["refreshData", "click"];
|
|
5822
|
+
const comboGraphEvents = ["refreshData", "click", "resetRecord"];
|
|
5784
5823
|
use([
|
|
5785
5824
|
CanvasRenderer,
|
|
5786
5825
|
BarChart,
|
|
@@ -6100,7 +6139,13 @@ const _sfc_main$7 = defineComponent({
|
|
|
6100
6139
|
requestFn: chooseRequestOrDiagram,
|
|
6101
6140
|
sortNum: props2.requestSort
|
|
6102
6141
|
});
|
|
6142
|
+
const resetRecord = () => {
|
|
6143
|
+
const id = props2.id;
|
|
6144
|
+
const modal = getGlobalModel(id);
|
|
6145
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
6146
|
+
};
|
|
6103
6147
|
useOnEvent(props2, {
|
|
6148
|
+
resetRecord,
|
|
6104
6149
|
refreshData,
|
|
6105
6150
|
click
|
|
6106
6151
|
});
|
|
@@ -6790,7 +6835,7 @@ const tableProps = {
|
|
|
6790
6835
|
}
|
|
6791
6836
|
};
|
|
6792
6837
|
const tableComponentProps = transformToComponentProps(tableProps);
|
|
6793
|
-
const tableEvents = ["click", "refreshData"];
|
|
6838
|
+
const tableEvents = ["click", "refreshData", "resetRecord"];
|
|
6794
6839
|
const _sfc_main$1 = defineComponent({
|
|
6795
6840
|
name: "EcanTable",
|
|
6796
6841
|
components: {
|
|
@@ -7159,7 +7204,13 @@ const _sfc_main$1 = defineComponent({
|
|
|
7159
7204
|
break;
|
|
7160
7205
|
}
|
|
7161
7206
|
};
|
|
7207
|
+
const resetRecord = () => {
|
|
7208
|
+
const id = props2.id;
|
|
7209
|
+
const modal = getGlobalModel(id);
|
|
7210
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
7211
|
+
};
|
|
7162
7212
|
useOnEvent(props2, {
|
|
7213
|
+
resetRecord,
|
|
7163
7214
|
refreshData
|
|
7164
7215
|
});
|
|
7165
7216
|
const summaryList = computed(() => {
|
|
@@ -7294,7 +7345,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
7294
7345
|
};
|
|
7295
7346
|
}
|
|
7296
7347
|
});
|
|
7297
|
-
const
|
|
7348
|
+
const Table_vue_vue_type_style_index_0_scoped_3f25d4f8_lang = "";
|
|
7298
7349
|
const Table_vue_vue_type_style_index_1_lang = "";
|
|
7299
7350
|
const _hoisted_1$1 = /* @__PURE__ */ createTextVNode(" \u641C\u7D22 ");
|
|
7300
7351
|
const _hoisted_2 = /* @__PURE__ */ createTextVNode(" \u91CD\u7F6E ");
|
|
@@ -7450,7 +7501,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7450
7501
|
}, 8, ["loading"])
|
|
7451
7502
|
], 4);
|
|
7452
7503
|
}
|
|
7453
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7504
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-3f25d4f8"]]);
|
|
7454
7505
|
const EcanTable = withInstall(Table);
|
|
7455
7506
|
const mapProps = {
|
|
7456
7507
|
...props,
|