@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.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.1.
|
|
1
|
+
/*! @ecan-bi/datav@1.1.14 */
|
|
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) {
|
|
@@ -1674,7 +1674,7 @@
|
|
|
1674
1674
|
for (let i = 0; i < variables.length; i++) {
|
|
1675
1675
|
const variable = variables[i];
|
|
1676
1676
|
let statement = variable.slice(1, -1);
|
|
1677
|
-
const reg = /[\u4e00-\
|
|
1677
|
+
const reg = /[\u4e00-\u9fa5a-z-_A-Z]+[0-9]*/g;
|
|
1678
1678
|
const textVariables = statement.match(reg);
|
|
1679
1679
|
for (let j = 0; j < textVariables.length; j++) {
|
|
1680
1680
|
const textVariable = textVariables[j];
|
|
@@ -1684,7 +1684,7 @@
|
|
|
1684
1684
|
}
|
|
1685
1685
|
}
|
|
1686
1686
|
try {
|
|
1687
|
-
if (/[0-9]+(.*)[
|
|
1687
|
+
if (/[0-9]+(.*)[+|-|*|/](.*)[0-9]+/g.test(statement)) {
|
|
1688
1688
|
const eval2 = eval;
|
|
1689
1689
|
statement = eval2(statement);
|
|
1690
1690
|
}
|
|
@@ -1719,9 +1719,10 @@
|
|
|
1719
1719
|
const { getGlobalModel } = vue.inject(GLOBAL_MODEL, {
|
|
1720
1720
|
getGlobalModel: (key) => void 0
|
|
1721
1721
|
});
|
|
1722
|
+
console.log("requestUrl", requestUrl);
|
|
1723
|
+
const url = useVariablesInText(requestUrl);
|
|
1724
|
+
console.log("url", url);
|
|
1722
1725
|
const requestData = async (params = {}) => {
|
|
1723
|
-
const url = useVariablesInText(requestUrl);
|
|
1724
|
-
console.log("url", url);
|
|
1725
1726
|
if (!url || !method || !headers || vue.unref(pageMode) === "design")
|
|
1726
1727
|
return;
|
|
1727
1728
|
let _params = {};
|
|
@@ -3566,10 +3567,11 @@
|
|
|
3566
3567
|
keyName: "\u65E5\u671F\u9009\u62E9\u5668",
|
|
3567
3568
|
rotate: "",
|
|
3568
3569
|
type: "ecanDatePicker",
|
|
3569
|
-
value:
|
|
3570
|
+
value: "",
|
|
3570
3571
|
picker: "date",
|
|
3571
3572
|
format: "YYYY-MM-DD",
|
|
3572
|
-
showTime: false
|
|
3573
|
+
showTime: false,
|
|
3574
|
+
useCurrentTime: true
|
|
3573
3575
|
};
|
|
3574
3576
|
const datePickerComponentProps = transformToComponentProps(datePickerProps);
|
|
3575
3577
|
const datePickerEvents = ["dateChange"];
|
|
@@ -3585,8 +3587,14 @@
|
|
|
3585
3587
|
const style2 = usePickComponentStyle(props2);
|
|
3586
3588
|
const getPopupContainer = () => document.getElementById("ProviderConfig") || document.body;
|
|
3587
3589
|
const myValue = vue.ref(null);
|
|
3588
|
-
vue.watch(() => props2.value, () => {
|
|
3589
|
-
|
|
3590
|
+
vue.watch(() => [props2.value, props2.useCurrentTime], ([value, useCurrentTime]) => {
|
|
3591
|
+
let _value = null;
|
|
3592
|
+
if (value) {
|
|
3593
|
+
_value = dayjs__default.default(value);
|
|
3594
|
+
} else if (useCurrentTime) {
|
|
3595
|
+
_value = dayjs__default.default();
|
|
3596
|
+
}
|
|
3597
|
+
myValue.value = _value;
|
|
3590
3598
|
}, {
|
|
3591
3599
|
immediate: true
|
|
3592
3600
|
});
|
|
@@ -3777,7 +3785,10 @@
|
|
|
3777
3785
|
picker: "date",
|
|
3778
3786
|
format: "YYYY-MM-DD",
|
|
3779
3787
|
startTime: "",
|
|
3780
|
-
endTime: ""
|
|
3788
|
+
endTime: "",
|
|
3789
|
+
useCurrentTime: true,
|
|
3790
|
+
interval: 1,
|
|
3791
|
+
intervalUnit: "year"
|
|
3781
3792
|
};
|
|
3782
3793
|
const rangePickerComponentProps = transformToComponentProps(rangePickerProps);
|
|
3783
3794
|
const rangePickerEvents = ["dateChange"];
|
|
@@ -3793,9 +3804,19 @@
|
|
|
3793
3804
|
const style2 = usePickComponentStyle(props2);
|
|
3794
3805
|
const getPopupContainer = () => document.getElementById("ProviderConfig") || document.body;
|
|
3795
3806
|
const myValue = vue.ref([null, null]);
|
|
3796
|
-
vue.watch(() => [props2.startTime, props2.endTime], ([startTime, endTime]) => {
|
|
3797
|
-
|
|
3798
|
-
|
|
3807
|
+
vue.watch(() => [props2.startTime, props2.endTime, props2.useCurrentTime, props2.interval, props2.intervalUnit], ([startTime, endTime, useCurrentTime, interval, intervalUnit]) => {
|
|
3808
|
+
let _startTime = null;
|
|
3809
|
+
let _endTime = null;
|
|
3810
|
+
if (useCurrentTime) {
|
|
3811
|
+
_startTime = dayjs__default.default();
|
|
3812
|
+
_endTime = dayjs__default.default().subtract(interval, intervalUnit);
|
|
3813
|
+
}
|
|
3814
|
+
if (startTime) {
|
|
3815
|
+
_startTime = dayjs__default.default(startTime);
|
|
3816
|
+
}
|
|
3817
|
+
if (endTime) {
|
|
3818
|
+
_endTime = dayjs__default.default(endTime);
|
|
3819
|
+
}
|
|
3799
3820
|
myValue.value = [_startTime, _endTime];
|
|
3800
3821
|
}, {
|
|
3801
3822
|
immediate: true
|
|
@@ -3826,7 +3847,7 @@
|
|
|
3826
3847
|
};
|
|
3827
3848
|
}
|
|
3828
3849
|
});
|
|
3829
|
-
const
|
|
3850
|
+
const RangePicker_vue_vue_type_style_index_0_scoped_2fc9988b_lang = "";
|
|
3830
3851
|
const RangePicker_vue_vue_type_style_index_1_lang = "";
|
|
3831
3852
|
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3832
3853
|
const _component_a_range_picker = vue.resolveComponent("a-range-picker");
|
|
@@ -3847,7 +3868,7 @@
|
|
|
3847
3868
|
}, null, 8, ["value", "format", "picker", "locale", "getPopupContainer", "onChange"])
|
|
3848
3869
|
], 4);
|
|
3849
3870
|
}
|
|
3850
|
-
const RangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-
|
|
3871
|
+
const RangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-2fc9988b"]]);
|
|
3851
3872
|
const EcanRangePicker = withInstall(RangePicker);
|
|
3852
3873
|
const buttonProps = {
|
|
3853
3874
|
...props,
|
|
@@ -3879,7 +3900,7 @@
|
|
|
3879
3900
|
const emitEvent = useEmitEvent(props2);
|
|
3880
3901
|
const click = emitEvent("click", () => {
|
|
3881
3902
|
const url = vue.unref(myHref);
|
|
3882
|
-
if (props2.target === "event") {
|
|
3903
|
+
if (url && props2.target === "event") {
|
|
3883
3904
|
window.parent.postMessage({
|
|
3884
3905
|
type: "openPage",
|
|
3885
3906
|
url
|
|
@@ -4114,7 +4135,7 @@
|
|
|
4114
4135
|
toolboxInfoText: "\u5F53\u524D\u65E0\u8BF4\u660E\u4FE1\u606F"
|
|
4115
4136
|
};
|
|
4116
4137
|
const pieComponentProps = transformToComponentProps(pieProps);
|
|
4117
|
-
const pieEvents = ["click", "refreshData"];
|
|
4138
|
+
const pieEvents = ["click", "refreshData", "resetRecord"];
|
|
4118
4139
|
const useDownloadFile = async (downloadFileUrl) => {
|
|
4119
4140
|
var _a2;
|
|
4120
4141
|
const res = await request.post(downloadFileUrl, {}, {
|
|
@@ -4367,7 +4388,13 @@
|
|
|
4367
4388
|
const refreshData = () => {
|
|
4368
4389
|
chooseRequestOrDiagram();
|
|
4369
4390
|
};
|
|
4391
|
+
const resetRecord = () => {
|
|
4392
|
+
const id = props2.id;
|
|
4393
|
+
const modal = getGlobalModel(id);
|
|
4394
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
4395
|
+
};
|
|
4370
4396
|
useOnEvent(props2, {
|
|
4397
|
+
resetRecord,
|
|
4371
4398
|
refreshData,
|
|
4372
4399
|
click
|
|
4373
4400
|
});
|
|
@@ -4494,7 +4521,7 @@
|
|
|
4494
4521
|
areaStyleOpacity: 0
|
|
4495
4522
|
};
|
|
4496
4523
|
const lineComponentProps = transformToComponentProps(lineProps);
|
|
4497
|
-
const lineEvents = ["click", "refreshData"];
|
|
4524
|
+
const lineEvents = ["click", "refreshData", "resetRecord"];
|
|
4498
4525
|
core.use([
|
|
4499
4526
|
renderers.CanvasRenderer,
|
|
4500
4527
|
charts.LineChart,
|
|
@@ -4781,8 +4808,14 @@
|
|
|
4781
4808
|
const refreshData = () => {
|
|
4782
4809
|
chooseRequestOrDiagram();
|
|
4783
4810
|
};
|
|
4811
|
+
const resetRecord = () => {
|
|
4812
|
+
const id = props2.id;
|
|
4813
|
+
const modal = getGlobalModel(id);
|
|
4814
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
4815
|
+
};
|
|
4784
4816
|
useOnEvent(props2, {
|
|
4785
4817
|
refreshData,
|
|
4818
|
+
resetRecord,
|
|
4786
4819
|
click
|
|
4787
4820
|
});
|
|
4788
4821
|
const { setRequest } = vue.inject(REQUEST_MODEL, {
|
|
@@ -4936,7 +4969,7 @@
|
|
|
4936
4969
|
labelColor: ""
|
|
4937
4970
|
};
|
|
4938
4971
|
const barComponentProps = transformToComponentProps(barProps);
|
|
4939
|
-
const barEvents = ["refreshData", "click"];
|
|
4972
|
+
const barEvents = ["refreshData", "click", "resetRecord"];
|
|
4940
4973
|
core.use([
|
|
4941
4974
|
renderers.CanvasRenderer,
|
|
4942
4975
|
charts.BarChart,
|
|
@@ -5246,9 +5279,15 @@
|
|
|
5246
5279
|
requestFn: refreshData,
|
|
5247
5280
|
sortNum: props2.requestSort
|
|
5248
5281
|
});
|
|
5282
|
+
const resetRecord = () => {
|
|
5283
|
+
const id = props2.id;
|
|
5284
|
+
const modal = getGlobalModel(id);
|
|
5285
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
5286
|
+
};
|
|
5249
5287
|
useOnEvent(props2, {
|
|
5250
5288
|
refreshData,
|
|
5251
|
-
click
|
|
5289
|
+
click,
|
|
5290
|
+
resetRecord
|
|
5252
5291
|
});
|
|
5253
5292
|
return {
|
|
5254
5293
|
option,
|
|
@@ -5785,7 +5824,7 @@
|
|
|
5785
5824
|
barWidth: "40%"
|
|
5786
5825
|
};
|
|
5787
5826
|
const comboGraphComponentProps = transformToComponentProps(comboGraphProps);
|
|
5788
|
-
const comboGraphEvents = ["refreshData", "click"];
|
|
5827
|
+
const comboGraphEvents = ["refreshData", "click", "resetRecord"];
|
|
5789
5828
|
core.use([
|
|
5790
5829
|
renderers.CanvasRenderer,
|
|
5791
5830
|
charts.BarChart,
|
|
@@ -6105,7 +6144,13 @@
|
|
|
6105
6144
|
requestFn: chooseRequestOrDiagram,
|
|
6106
6145
|
sortNum: props2.requestSort
|
|
6107
6146
|
});
|
|
6147
|
+
const resetRecord = () => {
|
|
6148
|
+
const id = props2.id;
|
|
6149
|
+
const modal = getGlobalModel(id);
|
|
6150
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
6151
|
+
};
|
|
6108
6152
|
useOnEvent(props2, {
|
|
6153
|
+
resetRecord,
|
|
6109
6154
|
refreshData,
|
|
6110
6155
|
click
|
|
6111
6156
|
});
|
|
@@ -6795,7 +6840,7 @@
|
|
|
6795
6840
|
}
|
|
6796
6841
|
};
|
|
6797
6842
|
const tableComponentProps = transformToComponentProps(tableProps);
|
|
6798
|
-
const tableEvents = ["click", "refreshData"];
|
|
6843
|
+
const tableEvents = ["click", "refreshData", "resetRecord"];
|
|
6799
6844
|
const _sfc_main$1 = vue.defineComponent({
|
|
6800
6845
|
name: "EcanTable",
|
|
6801
6846
|
components: {
|
|
@@ -7164,7 +7209,13 @@
|
|
|
7164
7209
|
break;
|
|
7165
7210
|
}
|
|
7166
7211
|
};
|
|
7212
|
+
const resetRecord = () => {
|
|
7213
|
+
const id = props2.id;
|
|
7214
|
+
const modal = getGlobalModel(id);
|
|
7215
|
+
setGlobalModel(id, { ...modal, RECORD: "" });
|
|
7216
|
+
};
|
|
7167
7217
|
useOnEvent(props2, {
|
|
7218
|
+
resetRecord,
|
|
7168
7219
|
refreshData
|
|
7169
7220
|
});
|
|
7170
7221
|
const summaryList = vue.computed(() => {
|
|
@@ -7299,7 +7350,7 @@
|
|
|
7299
7350
|
};
|
|
7300
7351
|
}
|
|
7301
7352
|
});
|
|
7302
|
-
const
|
|
7353
|
+
const Table_vue_vue_type_style_index_0_scoped_3f25d4f8_lang = "";
|
|
7303
7354
|
const Table_vue_vue_type_style_index_1_lang = "";
|
|
7304
7355
|
const _hoisted_1$1 = /* @__PURE__ */ vue.createTextVNode(" \u641C\u7D22 ");
|
|
7305
7356
|
const _hoisted_2 = /* @__PURE__ */ vue.createTextVNode(" \u91CD\u7F6E ");
|
|
@@ -7455,7 +7506,7 @@
|
|
|
7455
7506
|
}, 8, ["loading"])
|
|
7456
7507
|
], 4);
|
|
7457
7508
|
}
|
|
7458
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7509
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-3f25d4f8"]]);
|
|
7459
7510
|
const EcanTable = withInstall(Table);
|
|
7460
7511
|
const mapProps = {
|
|
7461
7512
|
...props,
|