super-page-runtime 2.0.10 → 2.0.15
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/es/components/runtime/utils/api/api-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/api/api-util.js +140 -2
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +279 -0
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +74 -0
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +118 -0
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +100 -0
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +74 -0
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +40 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +288 -14
- package/dist/es/components/runtime/utils/events/event-util.d.ts +5 -0
- package/dist/es/components/runtime/utils/events/event-util.js +42 -10
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +54 -5
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +8 -0
- package/dist/es/components/runtime/utils/events/validator-util.js +83 -57
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +0 -1
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +22 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +59 -50
- package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/page-init-util.js +29 -4
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +8 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +34 -322
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +2 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +66 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +91 -4
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +65 -4
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +65 -4
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +36 -1
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -4
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +22 -58
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +16 -3
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +10 -1
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +25 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +14 -11
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -0
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +14 -11
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +4 -1
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +7 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +2 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +3 -0
- package/dist/es/components/runtime/views/super-page.vue.js +84 -130
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +2 -1
- package/package.json +2 -2
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode } from "vue";
|
|
2
|
-
import { getCustomTheme } from "../../../../utils/charts/chart-util.js";
|
|
1
|
+
import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
|
|
2
|
+
import { getCustomTheme, initChartOption } from "../../../../utils/charts/chart-util.js";
|
|
3
|
+
import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { updateChartOption } from "../../../../utils/charts/chart-radar-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/common-chart-header.vue.js";
|
|
3
6
|
import { use } from "echarts/core";
|
|
4
7
|
import { CanvasRenderer } from "echarts/renderers";
|
|
5
8
|
import { RadarChart } from "echarts/charts";
|
|
@@ -11,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
14
|
pageContext: {},
|
|
12
15
|
configure: {}
|
|
13
16
|
},
|
|
14
|
-
setup(__props) {
|
|
17
|
+
setup(__props, { expose: __expose }) {
|
|
15
18
|
use([
|
|
16
19
|
CanvasRenderer,
|
|
17
20
|
RadarChart,
|
|
@@ -23,12 +26,62 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
26
|
]);
|
|
24
27
|
const props = __props;
|
|
25
28
|
const thisRef = ref(null);
|
|
29
|
+
const chartRef = ref(null);
|
|
30
|
+
const headerRef = ref(null);
|
|
26
31
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
27
32
|
const runtimeStyle = runtimeInfo.style;
|
|
28
33
|
const runtimeClass = runtimeInfo.class;
|
|
34
|
+
const dataConfig = runtimeInfo.dataConfig;
|
|
35
|
+
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
29
36
|
const chartOption = runtimeInfo.chartOption;
|
|
30
37
|
const configureProps = props.configure.props ? props.configure.props : {};
|
|
31
38
|
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
39
|
+
initChartOption(props.configure, chartOption);
|
|
40
|
+
console.log("chartOption", chartOption);
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
43
|
+
if (resultData) {
|
|
44
|
+
updateChartDatas(resultData);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
let hisGroupValue = headerInfo.groupValue;
|
|
48
|
+
watch(headerInfo, () => {
|
|
49
|
+
if (hisGroupValue == headerInfo.groupValue) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
hisGroupValue = headerInfo.groupValue;
|
|
53
|
+
refresh();
|
|
54
|
+
});
|
|
55
|
+
function refresh() {
|
|
56
|
+
if (!dataConfig) {
|
|
57
|
+
console.log("无数据源配置,不需要查询!");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
61
|
+
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
62
|
+
}
|
|
63
|
+
const monitorFields = headerInfo.monitorFields;
|
|
64
|
+
monitorFieldChange(props.pageContext, monitorFields, refresh);
|
|
65
|
+
function updateChartDatas(resultData) {
|
|
66
|
+
if (!resultData) {
|
|
67
|
+
resultData = [];
|
|
68
|
+
}
|
|
69
|
+
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
70
|
+
if (!resultData) {
|
|
71
|
+
resultData = {};
|
|
72
|
+
}
|
|
73
|
+
if (resultData.hasRender) {
|
|
74
|
+
resultData.hasRender = true;
|
|
75
|
+
console.log("重复更新!", resultData);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
resultData.hasRender = true;
|
|
79
|
+
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
80
|
+
console.log("chartOption", chartOption);
|
|
81
|
+
}
|
|
82
|
+
__expose({
|
|
83
|
+
updateChartDatas
|
|
84
|
+
});
|
|
32
85
|
return (_ctx, _cache) => {
|
|
33
86
|
return openBlock(), createElementBlock("div", {
|
|
34
87
|
style: normalizeStyle(unref(runtimeStyle)),
|
|
@@ -36,8 +89,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
89
|
ref_key: "thisRef",
|
|
37
90
|
ref: thisRef
|
|
38
91
|
}, [
|
|
92
|
+
withDirectives(createVNode(_sfc_main$1, {
|
|
93
|
+
ref_key: "headerRef",
|
|
94
|
+
ref: headerRef,
|
|
95
|
+
headerInfo: unref(headerInfo)
|
|
96
|
+
}, null, 8, ["headerInfo"]), [
|
|
97
|
+
[vShow, unref(headerInfo).showHeader]
|
|
98
|
+
]),
|
|
39
99
|
createVNode(unref(VChart), {
|
|
40
|
-
|
|
100
|
+
ref_key: "chartRef",
|
|
101
|
+
ref: chartRef,
|
|
41
102
|
theme: unref(customTheme),
|
|
42
103
|
option: unref(chartOption),
|
|
43
104
|
autoresize: ""
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode } from "vue";
|
|
2
|
-
import { getCustomTheme } from "../../../../utils/charts/chart-util.js";
|
|
1
|
+
import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
|
|
2
|
+
import { getCustomTheme, initChartOption } from "../../../../utils/charts/chart-util.js";
|
|
3
|
+
import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { updateChartOption } from "../../../../utils/charts/chart-scatter-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/common-chart-header.vue.js";
|
|
3
6
|
import { use } from "echarts/core";
|
|
4
7
|
import { CanvasRenderer } from "echarts/renderers";
|
|
5
8
|
import { ScatterChart } from "echarts/charts";
|
|
@@ -11,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
14
|
pageContext: {},
|
|
12
15
|
configure: {}
|
|
13
16
|
},
|
|
14
|
-
setup(__props) {
|
|
17
|
+
setup(__props, { expose: __expose }) {
|
|
15
18
|
use([
|
|
16
19
|
CanvasRenderer,
|
|
17
20
|
ScatterChart,
|
|
@@ -24,12 +27,62 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
27
|
]);
|
|
25
28
|
const props = __props;
|
|
26
29
|
const thisRef = ref(null);
|
|
30
|
+
const chartRef = ref(null);
|
|
31
|
+
const headerRef = ref(null);
|
|
27
32
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
28
33
|
const runtimeStyle = runtimeInfo.style;
|
|
29
34
|
const runtimeClass = runtimeInfo.class;
|
|
35
|
+
const dataConfig = runtimeInfo.dataConfig;
|
|
36
|
+
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
30
37
|
const chartOption = runtimeInfo.chartOption;
|
|
31
38
|
const configureProps = props.configure.props ? props.configure.props : {};
|
|
32
39
|
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
40
|
+
initChartOption(props.configure, chartOption);
|
|
41
|
+
console.log("chartOption", chartOption);
|
|
42
|
+
onMounted(() => {
|
|
43
|
+
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
44
|
+
if (resultData) {
|
|
45
|
+
updateChartDatas(resultData);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
let hisGroupValue = headerInfo.groupValue;
|
|
49
|
+
watch(headerInfo, () => {
|
|
50
|
+
if (hisGroupValue == headerInfo.groupValue) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
hisGroupValue = headerInfo.groupValue;
|
|
54
|
+
refresh();
|
|
55
|
+
});
|
|
56
|
+
function refresh() {
|
|
57
|
+
if (!dataConfig) {
|
|
58
|
+
console.log("无数据源配置,不需要查询!");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
62
|
+
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
63
|
+
}
|
|
64
|
+
const monitorFields = headerInfo.monitorFields;
|
|
65
|
+
monitorFieldChange(props.pageContext, monitorFields, refresh);
|
|
66
|
+
function updateChartDatas(resultData) {
|
|
67
|
+
if (!resultData) {
|
|
68
|
+
resultData = [];
|
|
69
|
+
}
|
|
70
|
+
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
71
|
+
if (!resultData) {
|
|
72
|
+
resultData = {};
|
|
73
|
+
}
|
|
74
|
+
if (resultData.hasRender) {
|
|
75
|
+
resultData.hasRender = true;
|
|
76
|
+
console.log("重复更新!", resultData);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
resultData.hasRender = true;
|
|
80
|
+
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
81
|
+
console.log("chartOption scatter", chartOption);
|
|
82
|
+
}
|
|
83
|
+
__expose({
|
|
84
|
+
updateChartDatas
|
|
85
|
+
});
|
|
33
86
|
return (_ctx, _cache) => {
|
|
34
87
|
return openBlock(), createElementBlock("div", {
|
|
35
88
|
style: normalizeStyle(unref(runtimeStyle)),
|
|
@@ -37,8 +90,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
90
|
ref_key: "thisRef",
|
|
38
91
|
ref: thisRef
|
|
39
92
|
}, [
|
|
93
|
+
withDirectives(createVNode(_sfc_main$1, {
|
|
94
|
+
ref_key: "headerRef",
|
|
95
|
+
ref: headerRef,
|
|
96
|
+
headerInfo: unref(headerInfo)
|
|
97
|
+
}, null, 8, ["headerInfo"]), [
|
|
98
|
+
[vShow, unref(headerInfo).showHeader]
|
|
99
|
+
]),
|
|
40
100
|
createVNode(unref(VChart), {
|
|
41
|
-
|
|
101
|
+
ref_key: "chartRef",
|
|
102
|
+
ref: chartRef,
|
|
42
103
|
theme: unref(customTheme),
|
|
43
104
|
option: unref(chartOption),
|
|
44
105
|
autoresize: ""
|
|
@@ -3,6 +3,7 @@ import { ElTabs, ElTabPane } from "element-plus";
|
|
|
3
3
|
import _sfc_main$1 from "../../object-render.vue.js";
|
|
4
4
|
import { SuperIcon } from "agilebuilder-ui";
|
|
5
5
|
import "../../../../utils/global-refs.js";
|
|
6
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "tabs-runtime",
|
|
8
9
|
props: {
|
|
@@ -17,6 +18,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
const runtimeStyle = runtimeInfo.style;
|
|
18
19
|
const runtimeClass = runtimeInfo.class;
|
|
19
20
|
const headerStyle = runtimeInfo.headerStyle;
|
|
21
|
+
function tabClick(pane, ev) {
|
|
22
|
+
const params = {
|
|
23
|
+
pane,
|
|
24
|
+
ev
|
|
25
|
+
};
|
|
26
|
+
return handleEvent(null, props.pageContext, props.configure, "tab-click", params);
|
|
27
|
+
}
|
|
28
|
+
function tabChange(paneName) {
|
|
29
|
+
const params = {
|
|
30
|
+
paneName
|
|
31
|
+
};
|
|
32
|
+
return handleEvent(null, props.pageContext, props.configure, "tab-change", params);
|
|
33
|
+
}
|
|
34
|
+
function tabRemove(paneName) {
|
|
35
|
+
const params = {
|
|
36
|
+
paneName
|
|
37
|
+
};
|
|
38
|
+
return handleEvent(null, props.pageContext, props.configure, "tab-remove", params);
|
|
39
|
+
}
|
|
40
|
+
function tabAdd() {
|
|
41
|
+
return handleEvent(null, props.pageContext, props.configure, "tab-add");
|
|
42
|
+
}
|
|
43
|
+
function tabEdit(paneName, action) {
|
|
44
|
+
const params = {
|
|
45
|
+
paneName,
|
|
46
|
+
action
|
|
47
|
+
};
|
|
48
|
+
return handleEvent(null, props.pageContext, props.configure, "edit", params);
|
|
49
|
+
}
|
|
20
50
|
return (_ctx, _cache) => {
|
|
21
51
|
return openBlock(), createBlock(unref(ElTabs), {
|
|
22
52
|
ref_key: "thisRef",
|
|
@@ -26,7 +56,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
56
|
type: _ctx.configure.props.cardType,
|
|
27
57
|
"tab-position": _ctx.configure.props.tabPosition,
|
|
28
58
|
style: normalizeStyle(unref(runtimeStyle)),
|
|
29
|
-
class: normalizeClass(unref(runtimeClass))
|
|
59
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
60
|
+
onTabClick: tabClick,
|
|
61
|
+
onTabChange: tabChange,
|
|
62
|
+
onTabRemove: tabRemove,
|
|
63
|
+
onTabAdd: tabAdd,
|
|
64
|
+
onEdit: tabEdit
|
|
30
65
|
}, {
|
|
31
66
|
default: withCtx(() => [
|
|
32
67
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (item, index) => {
|
|
@@ -217,7 +217,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
function setGridEvents(options) {
|
|
220
|
-
const tableEvents = configure.events;
|
|
220
|
+
const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
221
221
|
setTableEvents(options, tableEvents, pageContext, configure);
|
|
222
222
|
const customEvents = pageContext.customEvents;
|
|
223
223
|
if (customEvents) {
|
|
@@ -18,8 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const dataModel = pageContext.entity.data;
|
|
19
19
|
const prop = configure.props && configure.props.base ? configure.props.base.prop : null;
|
|
20
20
|
const additionalParamMap = pageContext.entity.request;
|
|
21
|
-
configure.events;
|
|
22
|
-
ref({});
|
|
21
|
+
const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
23
22
|
const selections = ref([]);
|
|
24
23
|
const superGridItems = pageContext.superGridItems;
|
|
25
24
|
const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
|
|
@@ -132,8 +131,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
131
|
changeInitializationSubTable();
|
|
133
132
|
function setGridDataEventOptions() {
|
|
134
133
|
setSubTableValidateInfo();
|
|
135
|
-
|
|
136
|
-
setTableEvents(listViewOptions.value, tableEvents2, pageContext, configure);
|
|
134
|
+
setTableEvents(listViewOptions.value, tableEvents, pageContext, configure);
|
|
137
135
|
const customEvents = pageContext.customEvents;
|
|
138
136
|
if (customEvents) {
|
|
139
137
|
listViewOptions.value["eventCallBack"] = customEvents;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, computed, ref,
|
|
2
|
-
import { getVariableValue, setVariableValue, getOptionDatasFromPage, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
|
|
1
|
+
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
|
|
2
|
+
import { getVariableValue, setVariableValue, getOptionDatasFromPage, monitorFieldChange, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "checkbox-runtime",
|
|
6
7
|
props: {
|
|
@@ -47,64 +48,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
48
|
target: props.configure.props.base.optionProp
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
designProperty.changeMethod = optionChange;
|
|
52
|
-
}
|
|
53
|
-
const monitorFields = designProperty.monitorFields;
|
|
54
|
-
const monitorFieldInfos = [];
|
|
55
|
-
if (monitorFields) {
|
|
56
|
-
const preFields = [];
|
|
57
|
-
for (let propName of monitorFields) {
|
|
58
|
-
if (propName.startsWith("${")) {
|
|
59
|
-
propName = propName.substring(2, propName.length - 1);
|
|
60
|
-
const fields = propName.split(".");
|
|
61
|
-
if (fields[0] === "page" || fields[0] === "task" || fields[0] === "data") {
|
|
62
|
-
monitorFieldInfos.push(fields);
|
|
63
|
-
if (!preFields.includes(fields[0])) {
|
|
64
|
-
preFields.push(fields[0]);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
for (let preField of preFields) {
|
|
70
|
-
watch(entity[preField], () => {
|
|
71
|
-
monitorFieldChange();
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function getMonitorFieldValues() {
|
|
76
|
-
let values = "";
|
|
77
|
-
for (let fieldInfo of monitorFieldInfos) {
|
|
78
|
-
values += "_" + getVariableValue(entity, fieldInfo);
|
|
79
|
-
}
|
|
80
|
-
return values;
|
|
81
|
-
}
|
|
82
|
-
let initMonitorValue = getMonitorFieldValues();
|
|
83
|
-
let monitorTimeout = false;
|
|
51
|
+
designProperty.changeMethod = optionChange;
|
|
84
52
|
const optionconfigInfo = designProperty.optionconfigInfo ? designProperty.optionconfigInfo : {};
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
monitorTimeout = setTimeout(function() {
|
|
90
|
-
const newValue = getMonitorFieldValues();
|
|
91
|
-
if (newValue == initMonitorValue) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
initMonitorValue = newValue;
|
|
95
|
-
queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((error) => {
|
|
96
|
-
console.log("查询失败!", error);
|
|
97
|
-
});
|
|
98
|
-
}, 200);
|
|
53
|
+
function refreshOptions() {
|
|
54
|
+
queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((result) => {
|
|
55
|
+
console.log("动态查询结果", result);
|
|
56
|
+
});
|
|
99
57
|
}
|
|
58
|
+
const monitorFields = designProperty.monitorFields;
|
|
59
|
+
monitorFieldChange(props.pageContext, monitorFields, refreshOptions);
|
|
100
60
|
function optionChange(value) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
61
|
+
if (autoSets.length > -1) {
|
|
62
|
+
let selItems = null;
|
|
63
|
+
if (listOptions.value && value != void 0 && value != null) {
|
|
64
|
+
selItems = listOptions.value.filter((item) => {
|
|
65
|
+
return Array.isArray(value) ? value.includes(item.value) : value === item.value;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
106
69
|
}
|
|
107
|
-
|
|
70
|
+
handleEvent(value, props.pageContext, props.configure, "change");
|
|
108
71
|
}
|
|
109
72
|
function updateOptions(newOptions) {
|
|
110
73
|
listOptions.value = newOptions ? newOptions : [];
|
|
@@ -140,8 +103,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
140
103
|
return openBlock(), createBlock(_component_el_checkbox, {
|
|
141
104
|
key: item.value,
|
|
142
105
|
value: item.value,
|
|
143
|
-
label: item.label
|
|
144
|
-
|
|
106
|
+
label: item.label,
|
|
107
|
+
onClick: ($event) => unref(handleEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
|
|
108
|
+
}, null, 8, ["value", "label", "onClick"]);
|
|
145
109
|
}), 128))
|
|
146
110
|
]),
|
|
147
111
|
_: 1
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "datepicker-runtime",
|
|
6
7
|
props: {
|
|
@@ -56,7 +57,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
57
|
modelValue: dynamicModelMethod.value,
|
|
57
58
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
58
59
|
shortcuts: unref(designProperty).shortcuts,
|
|
59
|
-
type: unref(designProperty).dateType
|
|
60
|
+
type: unref(designProperty).dateType,
|
|
61
|
+
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
62
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
63
|
+
onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
|
|
64
|
+
onCalendarChange: _cache[4] || (_cache[4] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "calendar-change")),
|
|
65
|
+
onVisibleChange: _cache[5] || (_cache[5] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
|
|
66
|
+
onPanelChange: _cache[6] || (_cache[6] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
|
|
60
67
|
}, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
|
|
61
68
|
key: 1,
|
|
62
69
|
clearable: unref(designProperty).clearable,
|
|
@@ -68,9 +75,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
68
75
|
"end-placeholder": unref(designProperty).endPlaceholder,
|
|
69
76
|
format: unref(designProperty).format,
|
|
70
77
|
modelValue: dynamicModelMethod.value,
|
|
71
|
-
"onUpdate:modelValue": _cache[
|
|
78
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dynamicModelMethod.value = $event),
|
|
72
79
|
shortcuts: unref(designProperty).shortcuts,
|
|
73
|
-
type: unref(designProperty).dateType
|
|
80
|
+
type: unref(designProperty).dateType,
|
|
81
|
+
onChange: _cache[8] || (_cache[8] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
82
|
+
onBlur: _cache[9] || (_cache[9] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
83
|
+
onFocus: _cache[10] || (_cache[10] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
|
|
84
|
+
onCalendarChange: _cache[11] || (_cache[11] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "calendar-change")),
|
|
85
|
+
onVisibleChange: _cache[12] || (_cache[12] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
|
|
86
|
+
onPanelChange: _cache[13] || (_cache[13] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
|
|
74
87
|
}, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"]))
|
|
75
88
|
]),
|
|
76
89
|
_: 1
|
|
@@ -4,6 +4,7 @@ import "agilebuilder-ui/src/utils/request";
|
|
|
4
4
|
import "dayjs";
|
|
5
5
|
import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
6
6
|
import "../../../../utils/global-refs.js";
|
|
7
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
9
|
__name: "depttree-runtime",
|
|
9
10
|
props: {
|
|
@@ -25,6 +26,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
26
|
const runtimeClass = runtimeInfo.class;
|
|
26
27
|
const headerStyle = runtimeInfo.headerStyle;
|
|
27
28
|
const autoSetFields = designProperty.autoSetFields ? designProperty.autoSetFields : [];
|
|
29
|
+
function changeValue(value) {
|
|
30
|
+
handleEvent(value, props.pageContext, props.configure, "change");
|
|
31
|
+
}
|
|
32
|
+
function showTree() {
|
|
33
|
+
handleEvent(null, props.pageContext, props.configure, "click");
|
|
34
|
+
}
|
|
28
35
|
return (_ctx, _cache) => {
|
|
29
36
|
const _component_OrganizationInput = resolveComponent("OrganizationInput");
|
|
30
37
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -51,7 +58,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
58
|
fields: unref(autoSetFields),
|
|
52
59
|
size: unref(designProperty).size,
|
|
53
60
|
placeholder: "请选择",
|
|
54
|
-
separator: unref(designProperty).separator
|
|
61
|
+
separator: unref(designProperty).separator,
|
|
62
|
+
onChange: changeValue,
|
|
63
|
+
onShowTree: showTree
|
|
55
64
|
}, null, 8, ["disabled", "multiple", "treeType", "modelValue", "models", "fields", "size", "separator"])
|
|
56
65
|
]),
|
|
57
66
|
_: 1
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, watch, resolveComponent, unref, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { fileUploadBeforeUpload, fileUploadUploaded, fileUploadBeforeDelete, fileUploadDeleted } from "../../../../utils/events/event-util.js";
|
|
3
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
5
|
__name: "fileupload-runtime",
|
|
5
6
|
props: {
|
|
@@ -13,6 +14,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
14
|
const runtimeStyle = runtimeInfo.style;
|
|
14
15
|
const runtimeClass = runtimeInfo.class;
|
|
15
16
|
const headerStyle = runtimeInfo.headerStyle;
|
|
17
|
+
const fileSetObj = designProperty.fileSetObj;
|
|
18
|
+
fileSetObj.beforeUpload = beforeUpload;
|
|
19
|
+
fileSetObj.pageContext = props.pageContext;
|
|
20
|
+
fileSetObj.configureObj = props.configure;
|
|
16
21
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
17
22
|
const propsBase = props.configure.props.base ? props.configure.props.base : {};
|
|
18
23
|
propsBase.prop;
|
|
@@ -37,6 +42,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
42
|
}
|
|
38
43
|
return variableName.split(".");
|
|
39
44
|
}
|
|
45
|
+
function beforeUpload(params) {
|
|
46
|
+
return fileUploadBeforeUpload(params);
|
|
47
|
+
}
|
|
48
|
+
function uploaded(params) {
|
|
49
|
+
return fileUploadUploaded(props.pageContext, props.configure, params);
|
|
50
|
+
}
|
|
51
|
+
function beforeDelete(params) {
|
|
52
|
+
return fileUploadBeforeDelete(props.pageContext, props.configure, params);
|
|
53
|
+
}
|
|
54
|
+
function deleted(params) {
|
|
55
|
+
return fileUploadDeleted(props.pageContext, props.configure, params);
|
|
56
|
+
}
|
|
40
57
|
return (_ctx, _cache) => {
|
|
41
58
|
const _component_FsUploadList = resolveComponent("FsUploadList");
|
|
42
59
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -57,7 +74,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
74
|
createVNode(_component_FsUploadList, {
|
|
58
75
|
disabled: unref(designProperty).state == "disabled",
|
|
59
76
|
fileSetObj: unref(designProperty).fileSetObj,
|
|
60
|
-
fileInfo: unref(fileInfo)
|
|
77
|
+
fileInfo: unref(fileInfo),
|
|
78
|
+
onUploaded: uploaded,
|
|
79
|
+
onBeforeDelete: beforeDelete,
|
|
80
|
+
onDeleted: deleted
|
|
61
81
|
}, null, 8, ["disabled", "fileSetObj", "fileInfo"])
|
|
62
82
|
]),
|
|
63
83
|
_: 1
|
|
@@ -65,7 +85,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
85
|
key: 1,
|
|
66
86
|
disabled: unref(designProperty).state == "disabled",
|
|
67
87
|
fileSetObj: unref(designProperty).fileSetObj,
|
|
68
|
-
fileInfo: unref(fileInfo)
|
|
88
|
+
fileInfo: unref(fileInfo),
|
|
89
|
+
onUploaded: uploaded,
|
|
90
|
+
onBeforeDelete: beforeDelete,
|
|
91
|
+
onDeleted: deleted
|
|
69
92
|
}, null, 8, ["disabled", "fileSetObj", "fileInfo"]));
|
|
70
93
|
};
|
|
71
94
|
}
|
package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "input-number-runtime",
|
|
6
7
|
props: {
|
|
@@ -51,7 +52,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
52
|
precision: unref(designProperty).precision,
|
|
52
53
|
step: unref(designProperty).step,
|
|
53
54
|
min: unref(designProperty).min,
|
|
54
|
-
max: unref(designProperty).max
|
|
55
|
+
max: unref(designProperty).max,
|
|
56
|
+
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
57
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
58
|
+
onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus"))
|
|
55
59
|
}, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])
|
|
56
60
|
]),
|
|
57
61
|
_: 1
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import { formatVariableValue
|
|
3
|
+
import { formatVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "link-runtime",
|
|
6
7
|
props: {
|
|
@@ -57,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
58
|
disabled: unref(designProperty).state === "disabled",
|
|
58
59
|
type: unref(designProperty).type,
|
|
59
60
|
underline: unref(designProperty).underline,
|
|
60
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(
|
|
61
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
61
62
|
}, {
|
|
62
63
|
default: withCtx(() => [
|
|
63
64
|
createTextVNode(toDisplayString(dynamicValue.value), 1)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
|
|
2
2
|
import { getVariableValue, setVariableValue, getOptionDatasFromPage, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "radio-runtime",
|
|
6
7
|
props: {
|
|
@@ -47,9 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
48
|
target: props.configure.props.base.optionProp
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
designProperty.changeMethod = optionChange;
|
|
52
|
-
}
|
|
51
|
+
designProperty.changeMethod = optionChange;
|
|
53
52
|
const monitorFields = designProperty.monitorFields;
|
|
54
53
|
const monitorFieldInfos = [];
|
|
55
54
|
if (monitorFields) {
|
|
@@ -98,13 +97,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
97
|
}, 200);
|
|
99
98
|
}
|
|
100
99
|
function optionChange(value) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
if (autoSets.length > 0) {
|
|
101
|
+
let selItems = null;
|
|
102
|
+
if (listOptions.value && value != void 0 && value != null) {
|
|
103
|
+
selItems = listOptions.value.filter((item) => {
|
|
104
|
+
return value === item.value;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
106
108
|
}
|
|
107
|
-
|
|
109
|
+
handleEvent(value, props.pageContext, props.configure, "change");
|
|
108
110
|
}
|
|
109
111
|
function updateOptions(newOptions) {
|
|
110
112
|
listOptions.value = newOptions ? newOptions : [];
|
|
@@ -141,8 +143,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
141
143
|
return openBlock(), createBlock(_component_el_radio, {
|
|
142
144
|
key: item.value,
|
|
143
145
|
value: item.value,
|
|
144
|
-
label: item.label
|
|
145
|
-
|
|
146
|
+
label: item.label,
|
|
147
|
+
onClick: ($event) => unref(handleEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
|
|
148
|
+
}, null, 8, ["value", "label", "onClick"]);
|
|
146
149
|
}), 128))
|
|
147
150
|
]),
|
|
148
151
|
_: 1
|
|
@@ -3,6 +3,7 @@ import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
|
3
3
|
import { formatVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import Quill from "quill";
|
|
5
5
|
import "quill/dist/quill.snow.css";
|
|
6
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
6
7
|
const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
|
|
7
8
|
const _hoisted_2 = {
|
|
8
9
|
key: 1,
|
|
@@ -102,6 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
103
|
}
|
|
103
104
|
window.updateQuillTimeout = setTimeout(function() {
|
|
104
105
|
setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
|
|
106
|
+
handleEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", { entity });
|
|
105
107
|
console.log("new entity", entity);
|
|
106
108
|
}, 1e3);
|
|
107
109
|
});
|