super-page-runtime 2.1.45 → 2.1.50-temp1
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 +1 -18
- package/dist/es/components/runtime/utils/api/api-util.js +2 -306
- package/dist/es/components/runtime/utils/api/page-expose-util.js +8 -1
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +5 -1
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +11 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +333 -36
- package/dist/es/components/runtime/utils/events/validator-util.js +5 -25
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +3 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +23 -5
- package/dist/es/components/runtime/utils/page-init-util.js +1 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +491 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +64 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +247 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +318 -34
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +46 -14
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +28 -4
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +9 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +4 -1
- package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +4 -0
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -1
- package/dist/es/components/runtime/views/super-page.vue.js +4 -4
- package/package.json +2 -2
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
|
+
import _sfc_main$2 from "./normal-column.vue.js";
|
|
3
|
+
import _sfc_main$1 from "./group-column-item.vue.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "group-column",
|
|
6
|
+
props: {
|
|
7
|
+
configure: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: () => {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
pageContext: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
groupColumn: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
columnsConfigKeyValues: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: () => {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
setup(__props) {
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
const _component_el_table_column = resolveComponent("el-table-column");
|
|
35
|
+
return openBlock(), createBlock(_component_el_table_column, { "header-align": "center" }, {
|
|
36
|
+
header: withCtx(() => [
|
|
37
|
+
createTextVNode(toDisplayString(__props.groupColumn.titleText), 1)
|
|
38
|
+
]),
|
|
39
|
+
default: withCtx(() => [
|
|
40
|
+
__props.groupColumn.children && __props.groupColumn.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.groupColumn.children, (item, index) => {
|
|
41
|
+
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
42
|
+
item.children && item.children.length > 0 ? (openBlock(), createBlock(_sfc_main$1, {
|
|
43
|
+
key: index,
|
|
44
|
+
configure: __props.configure,
|
|
45
|
+
pageContext: __props.pageContext,
|
|
46
|
+
groupColumnItem: item,
|
|
47
|
+
columnsConfigKeyValues: __props.columnsConfigKeyValues
|
|
48
|
+
}, null, 8, ["configure", "pageContext", "groupColumnItem", "columnsConfigKeyValues"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
49
|
+
key: 1,
|
|
50
|
+
pageContext: __props.pageContext,
|
|
51
|
+
configure: __props.configure,
|
|
52
|
+
column: __props.columnsConfigKeyValues[item.columnUuid]
|
|
53
|
+
}, null, 8, ["pageContext", "configure", "column"]))
|
|
54
|
+
], 64);
|
|
55
|
+
}), 128)) : createCommentVNode("", true)
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
_sfc_main as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, resolveDynamicComponent, createVNode, normalizeClass, createCommentVNode, createElementVNode } from "vue";
|
|
2
|
+
import { getCustomFunc } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import eventBus from "../../../../utils/eventBus.js";
|
|
4
|
+
import { ExpressionEvaluator } from "./chart-table-util.js";
|
|
5
|
+
const _hoisted_1 = { key: 0 };
|
|
6
|
+
const _hoisted_2 = { key: 1 };
|
|
7
|
+
const _hoisted_3 = { key: 3 };
|
|
8
|
+
const _hoisted_4 = { key: 2 };
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "normal-column",
|
|
11
|
+
props: {
|
|
12
|
+
configure: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
pageContext: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
column: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(__props) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const resloveLinkText = ref(false);
|
|
34
|
+
let toPage = null;
|
|
35
|
+
if (props.column.linkPage && props.column.linkPage.length > 0) {
|
|
36
|
+
resloveLinkText.value = true;
|
|
37
|
+
}
|
|
38
|
+
function formatter(row, column, cellValue, index) {
|
|
39
|
+
console.log("formatter", row);
|
|
40
|
+
}
|
|
41
|
+
function showLink(row) {
|
|
42
|
+
var _a;
|
|
43
|
+
const show = (_a = props.column.linkPage) == null ? void 0 : _a.some((item) => {
|
|
44
|
+
let canShow = false;
|
|
45
|
+
if (item.scopeFunc) {
|
|
46
|
+
const func = getCustomFunc(props.pageContext, item.scopeFunc);
|
|
47
|
+
if (func) {
|
|
48
|
+
const result = func.apply(func, [
|
|
49
|
+
{
|
|
50
|
+
pageContext: props.pageContext,
|
|
51
|
+
configureObj: props.configure,
|
|
52
|
+
row
|
|
53
|
+
}
|
|
54
|
+
]);
|
|
55
|
+
if (result) {
|
|
56
|
+
canShow = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
} else if (item.showCondition && item.showCondition.length > 0) {
|
|
60
|
+
const result = ExpressionEvaluator.evaluate(props.pageContext, item.showCondition, row);
|
|
61
|
+
if (result) {
|
|
62
|
+
canShow = true;
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
canShow = true;
|
|
66
|
+
}
|
|
67
|
+
if (canShow) {
|
|
68
|
+
toPage = item;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return show;
|
|
73
|
+
}
|
|
74
|
+
function clickLink(row) {
|
|
75
|
+
if (toPage) {
|
|
76
|
+
const myPageCode = props.pageContext.code;
|
|
77
|
+
const eventPageInfo = myPageCode + "_";
|
|
78
|
+
const linkPage = JSON.parse(JSON.stringify(toPage));
|
|
79
|
+
linkPage.base = {
|
|
80
|
+
successOperation: "closeWindow"
|
|
81
|
+
};
|
|
82
|
+
const eventParams = {
|
|
83
|
+
id: row.id ? row["id"] : row["ID"],
|
|
84
|
+
selections: [row]
|
|
85
|
+
};
|
|
86
|
+
eventBus.$emit(eventPageInfo + "open-dialog", {
|
|
87
|
+
pageContext: props.pageContext,
|
|
88
|
+
configureObj: { props: linkPage },
|
|
89
|
+
eventParams
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function formatContent(row, format) {
|
|
94
|
+
console.log("formatContent", row, format);
|
|
95
|
+
const value = row[props.column.props.base.prop];
|
|
96
|
+
switch (format.type) {
|
|
97
|
+
case "number":
|
|
98
|
+
return formatNumber(value, format);
|
|
99
|
+
case "currency":
|
|
100
|
+
return formatCurrency(value, format);
|
|
101
|
+
case "percent":
|
|
102
|
+
return formatPercent(value, format);
|
|
103
|
+
case "custom":
|
|
104
|
+
return formatCustomFunc(row, format);
|
|
105
|
+
default:
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function formatNumber(value, format) {
|
|
110
|
+
let formattedValue = value;
|
|
111
|
+
if (!formattedValue) {
|
|
112
|
+
formattedValue = 0;
|
|
113
|
+
}
|
|
114
|
+
if (format.scientific) {
|
|
115
|
+
formattedValue = Number(value).toExponential(format.scientificNum);
|
|
116
|
+
}
|
|
117
|
+
if (format.decimalDigit) {
|
|
118
|
+
formattedValue = Number(value).toFixed(format.decimalDigit);
|
|
119
|
+
}
|
|
120
|
+
if (format.thousandsSeparator) {
|
|
121
|
+
formattedValue = formattedValue.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
122
|
+
}
|
|
123
|
+
if (format.symbol) {
|
|
124
|
+
formattedValue = `${format.symbol} ${formattedValue}`;
|
|
125
|
+
}
|
|
126
|
+
return formattedValue;
|
|
127
|
+
}
|
|
128
|
+
function formatCurrency(value, format) {
|
|
129
|
+
let formattedValue = value;
|
|
130
|
+
if (!formattedValue) {
|
|
131
|
+
formattedValue = 0;
|
|
132
|
+
}
|
|
133
|
+
if (format.decimalDigit) {
|
|
134
|
+
formattedValue = Number(value).toFixed(format.decimalDigit);
|
|
135
|
+
}
|
|
136
|
+
if (format.symbol) {
|
|
137
|
+
formattedValue = `${format.symbol} ${formattedValue}`;
|
|
138
|
+
}
|
|
139
|
+
return formattedValue;
|
|
140
|
+
}
|
|
141
|
+
function formatPercent(value, format) {
|
|
142
|
+
let formattedValue = value;
|
|
143
|
+
if (!formattedValue) {
|
|
144
|
+
formattedValue = 0;
|
|
145
|
+
}
|
|
146
|
+
if (format.decimalDigit) {
|
|
147
|
+
formattedValue = Number(value).toFixed(format.decimalDigit);
|
|
148
|
+
}
|
|
149
|
+
return formattedValue + " %";
|
|
150
|
+
}
|
|
151
|
+
function formatCustomFunc(row, format) {
|
|
152
|
+
const func = getCustomFunc(props.pageContext, format.customFunc);
|
|
153
|
+
if (func) {
|
|
154
|
+
const resultValue = func.apply(func, [
|
|
155
|
+
{
|
|
156
|
+
pageContext: props.pageContext,
|
|
157
|
+
configureObj: props.configure,
|
|
158
|
+
row,
|
|
159
|
+
prop: props.column.props.base.prop
|
|
160
|
+
}
|
|
161
|
+
]);
|
|
162
|
+
return resultValue;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return (_ctx, _cache) => {
|
|
166
|
+
const _component_el_table_column = resolveComponent("el-table-column");
|
|
167
|
+
const _component_el_progress = resolveComponent("el-progress");
|
|
168
|
+
const _component_el_tag = resolveComponent("el-tag");
|
|
169
|
+
const _component_el_link = resolveComponent("el-link");
|
|
170
|
+
return __props.column.props.base.prop === "$index" ? (openBlock(), createBlock(_component_el_table_column, {
|
|
171
|
+
key: 0,
|
|
172
|
+
label: __props.column.props.base.name,
|
|
173
|
+
type: "index",
|
|
174
|
+
align: "center",
|
|
175
|
+
"header-align": "center",
|
|
176
|
+
width: "80"
|
|
177
|
+
}, null, 8, ["label"])) : (openBlock(), createBlock(_component_el_table_column, {
|
|
178
|
+
key: 1,
|
|
179
|
+
prop: __props.column.props.base.prop,
|
|
180
|
+
width: __props.column.props.base.width ? __props.column.props.base.width : "",
|
|
181
|
+
label: __props.column.props.base.name,
|
|
182
|
+
"header-align": __props.column.props.base.headerAlign,
|
|
183
|
+
align: __props.column.props.base.align,
|
|
184
|
+
fixed: __props.column.props.base.fixed ? __props.column.props.base.fixed : false,
|
|
185
|
+
formatter
|
|
186
|
+
}, {
|
|
187
|
+
default: withCtx((scope) => [
|
|
188
|
+
__props.column.props.format && __props.column.props.format.type ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
189
|
+
createTextVNode(toDisplayString(__props.column.props.format.status) + " ", 1),
|
|
190
|
+
__props.column.props.format.type === "customControl" ? (openBlock(), createBlock(resolveDynamicComponent(__props.column.props.format.customControl), {
|
|
191
|
+
key: 0,
|
|
192
|
+
scope,
|
|
193
|
+
column: __props.column,
|
|
194
|
+
configure: __props.configure,
|
|
195
|
+
pageContext: __props.pageContext
|
|
196
|
+
}, null, 8, ["scope", "column", "configure", "pageContext"])) : __props.column.props.format.type === "progress" ? (openBlock(), createBlock(_component_el_progress, {
|
|
197
|
+
key: 1,
|
|
198
|
+
type: __props.column.props.format.progressType,
|
|
199
|
+
percentage: scope.row[__props.column.props.base.prop],
|
|
200
|
+
status: __props.column.props.format.status,
|
|
201
|
+
"text-inside": __props.column.props.format.showText,
|
|
202
|
+
"stroke-width": __props.column.props.format.strokeWidth,
|
|
203
|
+
color: __props.column.props.format.colorType === "custom" ? __props.column.props.format.color : ""
|
|
204
|
+
}, null, 8, ["type", "percentage", "status", "text-inside", "stroke-width", "color"])) : __props.column.props.format.type === "icon" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
205
|
+
__props.column.props.format.isTag ? (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
206
|
+
createVNode(_component_el_tag, {
|
|
207
|
+
type: __props.column.props.format.tagType,
|
|
208
|
+
effect: __props.column.props.format.tagEffect,
|
|
209
|
+
hit: __props.column.props.format.hit,
|
|
210
|
+
size: __props.column.props.format.size
|
|
211
|
+
}, {
|
|
212
|
+
default: withCtx(() => [
|
|
213
|
+
createTextVNode(toDisplayString(scope.row[__props.column.props.base.prop]), 1)
|
|
214
|
+
]),
|
|
215
|
+
_: 2
|
|
216
|
+
}, 1032, ["type", "effect", "hit", "size"])
|
|
217
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
218
|
+
__props.column.props.format.position === "pre" ? (openBlock(), createElementBlock("i", {
|
|
219
|
+
key: 0,
|
|
220
|
+
class: normalizeClass(__props.column.props.format.icon)
|
|
221
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
222
|
+
createElementVNode("span", null, toDisplayString(scope.row[__props.column.props.base.prop]), 1),
|
|
223
|
+
__props.column.props.format.position === "suf" ? (openBlock(), createElementBlock("i", {
|
|
224
|
+
key: 1,
|
|
225
|
+
class: normalizeClass(__props.column.props.format.icon)
|
|
226
|
+
}, null, 2)) : createCommentVNode("", true)
|
|
227
|
+
]))
|
|
228
|
+
], 64)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(formatContent(scope.row, __props.column.props.format)), 1))
|
|
229
|
+
], 64)) : resloveLinkText.value && showLink(scope.row) ? (openBlock(), createBlock(_component_el_link, {
|
|
230
|
+
key: 1,
|
|
231
|
+
type: "primary",
|
|
232
|
+
onClick: ($event) => clickLink(scope.row)
|
|
233
|
+
}, {
|
|
234
|
+
default: withCtx(() => [
|
|
235
|
+
createTextVNode(toDisplayString(scope.row[__props.column.props.base.prop]), 1)
|
|
236
|
+
]),
|
|
237
|
+
_: 2
|
|
238
|
+
}, 1032, ["onClick"])) : (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(scope.row[__props.column.props.base.prop]), 1))
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["prop", "width", "label", "header-align", "align", "fixed"]));
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
export {
|
|
246
|
+
_sfc_main as default
|
|
247
|
+
};
|