super-page-runtime 2.0.49 → 2.0.53
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/assemblys-config.js +13 -0
- package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/common-util.js +2 -2
- package/dist/es/components/runtime/utils/events/print-label.js +2 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +55 -44
- package/dist/es/components/runtime/utils/events/validator-util.js +6 -26
- package/dist/es/components/runtime/utils/page-helper-util.js +1 -42
- package/dist/es/components/runtime/utils/page-init-util.js +11 -2
- package/dist/es/components/runtime/utils/table-utils.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +10 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +20 -0
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +10 -6
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +48 -0
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +35 -27
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +21 -18
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +67 -26
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +14 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +35 -5
- package/dist/es/components/runtime/views/super-page.vue.js +18 -5
- package/package.json +2 -2
|
@@ -84,17 +84,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
84
|
hisGroupValue = headerInfo.groupValue;
|
|
85
85
|
refresh();
|
|
86
86
|
});
|
|
87
|
-
function refresh() {
|
|
87
|
+
function refresh(isHandle) {
|
|
88
88
|
if (!dataConfig) {
|
|
89
89
|
console.log("无数据源配置,不需要查询!");
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
93
|
-
|
|
93
|
+
if (isHandle !== true) {
|
|
94
|
+
dataConfig.autoRefresh = true;
|
|
95
|
+
}
|
|
94
96
|
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
95
97
|
}
|
|
96
98
|
const monitorFields = headerInfo.monitorFields;
|
|
97
|
-
monitorFieldChange(props.pageContext, monitorFields,
|
|
99
|
+
monitorFieldChange(props.pageContext, monitorFields, () => {
|
|
100
|
+
refresh(true);
|
|
101
|
+
});
|
|
98
102
|
function updateChartDatas(resultData) {
|
|
99
103
|
if (!resultData) {
|
|
100
104
|
resultData = [];
|
|
@@ -109,17 +113,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
113
|
return;
|
|
110
114
|
}
|
|
111
115
|
resultData.hasRender = true;
|
|
112
|
-
if (!dataConfig.
|
|
116
|
+
if (!dataConfig.autoRefresh) {
|
|
113
117
|
hisGroupValue = resultData.groupValue;
|
|
114
118
|
if (hisGroupValue && headerInfo.groupComponent !== "checkbox") {
|
|
115
119
|
hisGroupValue = hisGroupValue.join(",");
|
|
116
120
|
}
|
|
117
121
|
headerInfo.groupValue = hisGroupValue;
|
|
118
122
|
}
|
|
119
|
-
if (!dataConfig.
|
|
123
|
+
if (!dataConfig.autoRefresh || !enableDrill) {
|
|
120
124
|
clearChartSelected(props.pageContext, props.configure, chartRef.value.chart);
|
|
121
125
|
}
|
|
122
|
-
dataConfig.
|
|
126
|
+
dataConfig.autoRefresh = false;
|
|
123
127
|
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
124
128
|
console.log("chartOption--pie", chartOption);
|
|
125
129
|
}
|
|
@@ -90,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
function getUrlToListData() {
|
|
91
91
|
let urlToListData2 = baseURL + "/dsc/commons/list";
|
|
92
92
|
if (urlToListData2) {
|
|
93
|
-
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
93
|
+
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl, pageContext.isTest);
|
|
94
94
|
}
|
|
95
95
|
return urlToListData2;
|
|
96
96
|
}
|
|
@@ -163,7 +163,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
163
|
if (!backendUrl && !tableName) {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
getDataTypeMapRequest(backendUrl, tableName).then((result) => {
|
|
166
|
+
getDataTypeMapRequest(backendUrl, tableName, pageContext.isTest).then((result) => {
|
|
167
167
|
if (!pageContext["dataTypeMaps"]) {
|
|
168
168
|
pageContext["dataTypeMaps"] = {};
|
|
169
169
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, normalizeStyle } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "tree-runtime",
|
|
6
|
+
props: {
|
|
7
|
+
pageContext: {},
|
|
8
|
+
configure: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
13
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
14
|
+
computed({
|
|
15
|
+
get() {
|
|
16
|
+
return getVariableValue(entity, dynamicFields);
|
|
17
|
+
},
|
|
18
|
+
set(value) {
|
|
19
|
+
setVariableValue(entity, dynamicFields, value);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
23
|
+
const runtimeStyle = runtimeInfo.style;
|
|
24
|
+
const runtimeClass = runtimeInfo.class;
|
|
25
|
+
runtimeInfo.headerStyle;
|
|
26
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
const _component_el_tree = resolveComponent("el-tree");
|
|
29
|
+
return openBlock(), createElementBlock("div", {
|
|
30
|
+
class: normalizeClass(unref(runtimeClass))
|
|
31
|
+
}, [
|
|
32
|
+
createVNode(_component_el_tree, {
|
|
33
|
+
style: normalizeStyle([unref(runtimeStyle), { "width": "fit-content" }]),
|
|
34
|
+
data: designProperty.value.staticData,
|
|
35
|
+
"default-expand-all": designProperty.value.defaultExpandAll,
|
|
36
|
+
"expand-on-click-node": designProperty.value.expandOnClickNode,
|
|
37
|
+
indent: designProperty.value.retractWidth ? designProperty.value.retractWidth : 18,
|
|
38
|
+
accordion: designProperty.value.accordion,
|
|
39
|
+
"show-checkbox": designProperty.value.showCheckbox,
|
|
40
|
+
props: _ctx.defaultProps
|
|
41
|
+
}, null, 8, ["style", "data", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "props"])
|
|
42
|
+
], 2);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
_sfc_main as default
|
|
48
|
+
};
|
|
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
}
|
|
68
68
|
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
handleFormEvent(value, props.pageContext, props.configure, "change");
|
|
71
71
|
}
|
|
72
72
|
function updateOptions(newOptions) {
|
|
73
73
|
listOptions.value = newOptions ? newOptions : [];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getVariableValue, formatValueByType } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { SuperIcon } from "agilebuilder-ui";
|
|
5
|
-
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
6
6
|
const _hoisted_1 = { style: { "overflow": "hidden", "white-space": "nowrap" } };
|
|
7
7
|
const _hoisted_2 = ["title"];
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -11,9 +11,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
11
|
pageContext: {},
|
|
12
12
|
configure: {}
|
|
13
13
|
},
|
|
14
|
-
setup(__props) {
|
|
14
|
+
setup(__props, { expose: __expose }) {
|
|
15
15
|
const props = __props;
|
|
16
|
-
|
|
16
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
17
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
17
18
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
18
19
|
const runtimeStyle = runtimeInfo.style;
|
|
19
20
|
const runtimeClass = runtimeInfo.class;
|
|
@@ -21,28 +22,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
22
|
const appendClass = runtimeInfo.appendClass;
|
|
22
23
|
const appendStyle = runtimeInfo.appendStyle;
|
|
23
24
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
24
|
-
const listOptions = designProperty.value.options ? designProperty.value.options : [];
|
|
25
|
-
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
26
|
-
const valueType = dataOrigin.optionValueSetType;
|
|
27
|
-
if (valueType == "dynamicData" || valueType == "dynamicData" || valueType == "service") {
|
|
28
|
-
queryOptions(props.configure, props.pageContext, "").then((results) => {
|
|
29
|
-
listOptions.value = results;
|
|
30
|
-
}).catch((error) => {
|
|
31
|
-
console.log("lable组件查询数据源失败!", error);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
let contentVariable = designProperty.value.formatting;
|
|
35
|
-
if (!contentVariable) {
|
|
36
|
-
const propsBase = props.configure.props.base ? props.configure.props.base : {};
|
|
37
|
-
contentVariable = propsBase.prop;
|
|
38
|
-
}
|
|
39
|
-
if (!contentVariable) {
|
|
40
|
-
contentVariable = "${page." + props.configure.uuid + "}";
|
|
41
|
-
}
|
|
25
|
+
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
42
26
|
const formatType = designProperty.value.formatType;
|
|
27
|
+
console.log("designProperty.value", designProperty.value);
|
|
43
28
|
const dynamicValue = computed(() => {
|
|
44
|
-
let resultValue =
|
|
45
|
-
console.log("formatType", formatType);
|
|
29
|
+
let resultValue = getVariableValue(entity, dynamicFields);
|
|
46
30
|
if (formatType) {
|
|
47
31
|
if (designProperty.value.hasOptions) {
|
|
48
32
|
let selItems = null;
|
|
@@ -52,11 +36,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
36
|
if (selItems && selItems.length > 0) {
|
|
53
37
|
resultValue = selItems[0].label;
|
|
54
38
|
}
|
|
39
|
+
} else if ("custom" === formatType) {
|
|
40
|
+
const func = getCustomFunc(props.pageContext, designProperty.value.formatFunc);
|
|
41
|
+
if (func) {
|
|
42
|
+
resultValue = func.apply(func, [
|
|
43
|
+
{
|
|
44
|
+
pageContext: props.pageContext,
|
|
45
|
+
configureObj: props.configure,
|
|
46
|
+
value: resultValue
|
|
47
|
+
}
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
55
50
|
} else {
|
|
56
51
|
resultValue = formatValueByType(resultValue, formatType, designProperty.value);
|
|
57
52
|
}
|
|
58
53
|
}
|
|
59
|
-
|
|
54
|
+
resultValue = resultValue === void 0 || resultValue === null ? "" : resultValue;
|
|
55
|
+
return resultValue;
|
|
56
|
+
});
|
|
57
|
+
function updateOptions(newOptions) {
|
|
58
|
+
listOptions.value = newOptions ? newOptions : [];
|
|
59
|
+
}
|
|
60
|
+
__expose({
|
|
61
|
+
updateOptions
|
|
60
62
|
});
|
|
61
63
|
return (_ctx, _cache) => {
|
|
62
64
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -81,7 +83,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
83
|
createElementVNode("span", _hoisted_1, [
|
|
82
84
|
designProperty.value.preIconValue || designProperty.value.preText ? (openBlock(), createElementBlock("span", {
|
|
83
85
|
key: 0,
|
|
84
|
-
class: normalizeClass({
|
|
86
|
+
class: normalizeClass({
|
|
87
|
+
"el-input__suffix": designProperty.value.iconPosition != "outer",
|
|
88
|
+
"el-input-group__append": designProperty.value.iconPosition == "outer"
|
|
89
|
+
}),
|
|
85
90
|
style: normalizeStyle(unref(appendStyle))
|
|
86
91
|
}, [
|
|
87
92
|
designProperty.value.preIconType && designProperty.value.preIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
|
|
@@ -95,7 +100,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
100
|
]),
|
|
96
101
|
designProperty.value.sufIconValue || designProperty.value.sufText ? (openBlock(), createElementBlock("span", {
|
|
97
102
|
key: 0,
|
|
98
|
-
class: normalizeClass({
|
|
103
|
+
class: normalizeClass({
|
|
104
|
+
"el-input__suffix": designProperty.value.iconPosition != "outer",
|
|
105
|
+
"el-input-group__append": designProperty.value.iconPosition == "outer"
|
|
106
|
+
})
|
|
99
107
|
}, [
|
|
100
108
|
designProperty.value.sufIconType && designProperty.value.sufIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
|
|
101
109
|
key: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, 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 {
|
|
3
|
+
import { getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "link-runtime",
|
|
@@ -10,29 +10,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
},
|
|
11
11
|
setup(__props) {
|
|
12
12
|
const props = __props;
|
|
13
|
-
getFormModelFields(props.pageContext, props.configure);
|
|
13
|
+
const modelFields = getFormModelFields(props.pageContext, props.configure);
|
|
14
14
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
15
15
|
const runtimeStyle = runtimeInfo.style;
|
|
16
16
|
const runtimeClass = runtimeInfo.class;
|
|
17
17
|
const headerStyle = runtimeInfo.headerStyle;
|
|
18
18
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
contentVariable = propsBase.prop;
|
|
23
|
-
}
|
|
24
|
-
if (!contentVariable) {
|
|
25
|
-
contentVariable = "${page." + props.configure.uuid + "}";
|
|
26
|
-
}
|
|
19
|
+
console.log("designProperty", designProperty.value);
|
|
20
|
+
let formatting = designProperty.value.formatting;
|
|
21
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
27
22
|
const dynamicValue = computed(() => {
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
24
|
+
resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
|
|
25
|
+
if (formatting) {
|
|
26
|
+
resultValue = formatting.replace(/\${value}/g, resultValue);
|
|
27
|
+
}
|
|
28
|
+
return resultValue;
|
|
30
29
|
});
|
|
31
30
|
let tooltipVariable = designProperty.value.tooltip;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
let tooltipValue = null;
|
|
32
|
+
if (tooltipVariable) {
|
|
33
|
+
tooltipValue = computed(() => {
|
|
34
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
35
|
+
resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
|
|
36
|
+
return tooltipVariable.replace(/\${value}/g, resultValue);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
36
39
|
return (_ctx, _cache) => {
|
|
37
40
|
const _component_el_link = resolveComponent("el-link");
|
|
38
41
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
@@ -50,8 +53,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
53
|
]),
|
|
51
54
|
default: withCtx(() => [
|
|
52
55
|
createVNode(_component_el_tooltip, {
|
|
53
|
-
disabled: !tooltipValue
|
|
54
|
-
content: tooltipValue
|
|
56
|
+
disabled: !unref(tooltipValue),
|
|
57
|
+
content: unref(tooltipValue)
|
|
55
58
|
}, {
|
|
56
59
|
default: withCtx(() => [
|
|
57
60
|
createVNode(_component_el_link, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "tag-runtime",
|
|
@@ -10,24 +10,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
},
|
|
11
11
|
setup(__props) {
|
|
12
12
|
const props = __props;
|
|
13
|
-
getFormModelFields(props.pageContext, props.configure);
|
|
13
|
+
const modelFields = getFormModelFields(props.pageContext, props.configure);
|
|
14
14
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
15
15
|
const runtimeStyle = runtimeInfo.style;
|
|
16
16
|
const runtimeClass = runtimeInfo.class;
|
|
17
17
|
const headerStyle = runtimeInfo.headerStyle;
|
|
18
18
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
let formatting = designProperty.value.formatting;
|
|
20
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
21
|
+
const dynamicValues = computed(() => {
|
|
22
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
23
|
+
if (resultValue === void 0 || resultValue === null) {
|
|
24
|
+
resultValue = [];
|
|
25
|
+
}
|
|
26
|
+
if (!Array.isArray(resultValue)) {
|
|
27
|
+
resultValue = (resultValue + "").split(",");
|
|
28
|
+
}
|
|
29
|
+
const options = [];
|
|
30
|
+
let no = 1;
|
|
31
|
+
for (const val of resultValue) {
|
|
32
|
+
if (val === void 0 || val === null || val === "") {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const o = {
|
|
36
|
+
value: val,
|
|
37
|
+
label: val
|
|
38
|
+
};
|
|
39
|
+
if (formatting) {
|
|
40
|
+
o.label = formatting.replace(/\${value}/g, o.value).replace(/\${no}/g, no);
|
|
41
|
+
}
|
|
42
|
+
options.push(o);
|
|
43
|
+
no++;
|
|
44
|
+
}
|
|
45
|
+
return options;
|
|
30
46
|
});
|
|
47
|
+
function closeTag($event, tag) {
|
|
48
|
+
if (designProperty.value.closable) {
|
|
49
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
50
|
+
if (resultValue === void 0 || resultValue === null) {
|
|
51
|
+
resultValue = [];
|
|
52
|
+
}
|
|
53
|
+
const isArray = Array.isArray(resultValue);
|
|
54
|
+
if (!isArray) {
|
|
55
|
+
resultValue = (resultValue + "").split(",");
|
|
56
|
+
}
|
|
57
|
+
const index = resultValue.indexOf(tag.value);
|
|
58
|
+
if (index > -1) {
|
|
59
|
+
resultValue.splice(index, 1);
|
|
60
|
+
}
|
|
61
|
+
if (!isArray) {
|
|
62
|
+
resultValue = resultValue.join(",");
|
|
63
|
+
}
|
|
64
|
+
setVariableValue(entity, modelFields, resultValue);
|
|
65
|
+
}
|
|
66
|
+
handleFormEvent($event, props.pageContext, props.configure, "remove");
|
|
67
|
+
}
|
|
31
68
|
return (_ctx, _cache) => {
|
|
32
69
|
const _component_el_tag = resolveComponent("el-tag");
|
|
33
70
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -44,18 +81,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
81
|
}, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
|
|
45
82
|
]),
|
|
46
83
|
default: withCtx(() => [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
84
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dynamicValues.value, (tag) => {
|
|
85
|
+
return openBlock(), createBlock(_component_el_tag, {
|
|
86
|
+
key: tag,
|
|
87
|
+
size: designProperty.value.size,
|
|
88
|
+
closable: designProperty.value.closable,
|
|
89
|
+
type: designProperty.value.type,
|
|
90
|
+
style: { "margin-right": "4px" },
|
|
91
|
+
onClose: ($event) => closeTag($event, tag),
|
|
92
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
93
|
+
}, {
|
|
94
|
+
default: withCtx(() => [
|
|
95
|
+
createTextVNode(toDisplayString(tag.label), 1)
|
|
96
|
+
]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1032, ["size", "closable", "type", "onClose"]);
|
|
99
|
+
}), 128))
|
|
59
100
|
]),
|
|
60
101
|
_: 1
|
|
61
102
|
}, 8, ["required", "class", "label-width", "style"]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode, unref, normalizeStyle, toDisplayString } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../object-render.vue.js";
|
|
3
3
|
import { getClickEventFuncByType } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import { isVisibleWorkflowButton } from "../../../../utils/events/standard-event.js";
|
|
@@ -16,6 +16,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
const buttonInfo = props.pageContext.workflowButtonComponent;
|
|
17
17
|
const completeTaskParam = props.pageContext.completeTaskParam;
|
|
18
18
|
const visibleBtns = ref([]);
|
|
19
|
+
let taskName = ref("");
|
|
20
|
+
let activityNameColor = "";
|
|
21
|
+
if (props.configure.props.base.showActivityName) {
|
|
22
|
+
activityNameColor = props.configure.props.base.activityNameColor || "red";
|
|
23
|
+
if (props.pageContext.entity && props.pageContext.entity.task && props.pageContext.entity.task.name) {
|
|
24
|
+
taskName.value = props.pageContext.entity.task.name;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
19
27
|
props.configure.items.forEach((item) => {
|
|
20
28
|
if (isVisibleBtn(item)) {
|
|
21
29
|
visibleBtns.value.push(item);
|
|
@@ -50,7 +58,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
58
|
configure: element
|
|
51
59
|
}, null, 8, ["pageContext", "configure"])) : createCommentVNode("", true)
|
|
52
60
|
], 64);
|
|
53
|
-
}), 256))
|
|
61
|
+
}), 256)),
|
|
62
|
+
unref(taskName) ? (openBlock(), createElementBlock("span", {
|
|
63
|
+
key: 0,
|
|
64
|
+
style: normalizeStyle({ color: unref(activityNameColor) })
|
|
65
|
+
}, " 当前环节: " + toDisplayString(unref(taskName)), 5)) : createCommentVNode("", true)
|
|
54
66
|
]);
|
|
55
67
|
};
|
|
56
68
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createCommentVNode } from "vue";
|
|
2
|
-
import "element-plus";
|
|
3
2
|
import _sfc_main$1 from "./super-page.vue.js";
|
|
4
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
4
|
__name: "super-page-dialog",
|
|
@@ -20,8 +19,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
19
|
const pageCode = ref(null);
|
|
21
20
|
const dataId = ref(null);
|
|
22
21
|
const taskId = ref(null);
|
|
22
|
+
const dialogType = ref(null);
|
|
23
23
|
const pageRequest = ref({});
|
|
24
|
+
const draggable = ref(false);
|
|
25
|
+
const overflow = ref(false);
|
|
26
|
+
const showPosition = ref("rtl");
|
|
24
27
|
if (myJumpPageSetting) {
|
|
28
|
+
dialogType.value = myJumpPageSetting && myJumpPageSetting["dialogType"] ? myJumpPageSetting["dialogType"] : "dialog";
|
|
29
|
+
draggable.value = myJumpPageSetting && myJumpPageSetting["draggable"] ? myJumpPageSetting["draggable"] : false;
|
|
30
|
+
overflow.value = myJumpPageSetting && myJumpPageSetting["overflow"] ? myJumpPageSetting["overflow"] : false;
|
|
31
|
+
showPosition.value = myJumpPageSetting && myJumpPageSetting["showPosition"] ? myJumpPageSetting["showPosition"] : "rtl";
|
|
25
32
|
title.value = myJumpPageSetting && myJumpPageSetting["jumpPageTitle"] ? myJumpPageSetting["jumpPageTitle"] : null;
|
|
26
33
|
width.value = myJumpPageSetting && myJumpPageSetting["jumpPageWidth"] ? myJumpPageSetting["jumpPageWidth"] : "100%";
|
|
27
34
|
pageCode.value = myJumpPageSetting && myJumpPageSetting["pageCode"];
|
|
@@ -52,12 +59,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
59
|
}
|
|
53
60
|
return (_ctx, _cache) => {
|
|
54
61
|
const _component_el_drawer = resolveComponent("el-drawer");
|
|
55
|
-
|
|
62
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
63
|
+
return dialogType.value && dialogType.value === "drawer" ? (openBlock(), createBlock(_component_el_drawer, {
|
|
64
|
+
key: 0,
|
|
56
65
|
modelValue: showContent.value,
|
|
57
66
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showContent.value = $event),
|
|
58
|
-
"with-header": !title.value,
|
|
59
67
|
title: title.value,
|
|
60
|
-
direction:
|
|
68
|
+
direction: showPosition.value,
|
|
61
69
|
size: width.value,
|
|
62
70
|
onOpen: _cache[1] || (_cache[1] = ($event) => emits("open")),
|
|
63
71
|
onOpened: _cache[2] || (_cache[2] = ($event) => emits("opened")),
|
|
@@ -72,7 +80,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
80
|
}, null, 8, ["pageCode", "pageRequest"])) : createCommentVNode("", true)
|
|
73
81
|
]),
|
|
74
82
|
_: 1
|
|
75
|
-
}, 8, ["modelValue", "
|
|
83
|
+
}, 8, ["modelValue", "title", "direction", "size"])) : (openBlock(), createBlock(_component_el_dialog, {
|
|
84
|
+
key: 1,
|
|
85
|
+
"model-value": "",
|
|
86
|
+
title: title.value,
|
|
87
|
+
"close-on-click-modal": false,
|
|
88
|
+
"append-to-body": "",
|
|
89
|
+
width: width.value,
|
|
90
|
+
draggable: draggable.value,
|
|
91
|
+
overflow: overflow.value,
|
|
92
|
+
onOpen: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("open")),
|
|
93
|
+
onOpend: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("opend")),
|
|
94
|
+
onClose: _cache[7] || (_cache[7] = ($event) => emits("close")),
|
|
95
|
+
onClosed: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("closed"))
|
|
96
|
+
}, {
|
|
97
|
+
default: withCtx(() => [
|
|
98
|
+
pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
99
|
+
key: 0,
|
|
100
|
+
pageCode: pageCode.value,
|
|
101
|
+
pageRequest: pageRequest.value
|
|
102
|
+
}, null, 8, ["pageCode", "pageRequest"])) : createCommentVNode("", true)
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["title", "width", "draggable", "overflow"]));
|
|
76
106
|
};
|
|
77
107
|
}
|
|
78
108
|
});
|
|
@@ -18,6 +18,7 @@ import _sfc_main$5 from "./super-page-dialog.vue.js";
|
|
|
18
18
|
import { useRoute, useRouter } from "vue-router";
|
|
19
19
|
import { jumpToPage } from "agilebuilder-ui/src/utils/jump-page-utils";
|
|
20
20
|
import { setSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
21
|
+
import { deepCopy } from "../utils/common-util.js";
|
|
21
22
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
23
|
__name: "super-page",
|
|
23
24
|
props: {
|
|
@@ -136,6 +137,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
137
|
buttonPageContext.value = params.pageContext;
|
|
137
138
|
showExportForm.value = true;
|
|
138
139
|
});
|
|
140
|
+
eventBus.$on(eventPageInfo.value + "export-pdf-report", (params) => {
|
|
141
|
+
buttonParams.value = params;
|
|
142
|
+
buttonConfigure.value = params.configureObj;
|
|
143
|
+
buttonPageContext.value = params.pageContext;
|
|
144
|
+
showExportForm.value = true;
|
|
145
|
+
});
|
|
139
146
|
eventBus.$on(eventPageInfo.value + "import-file", (params) => {
|
|
140
147
|
buttonParams.value = params;
|
|
141
148
|
clickImport();
|
|
@@ -182,7 +189,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
182
189
|
parentPageContext.value = params.pageContext;
|
|
183
190
|
parentConfigureObj.value = params.configureObj;
|
|
184
191
|
parentEventParams.value = params.eventParams;
|
|
185
|
-
params.jumpPageSetting;
|
|
186
192
|
openDialog(parentConfigureObj.value, parentEventParams.value, params.jumpPageSetting);
|
|
187
193
|
});
|
|
188
194
|
watch(
|
|
@@ -290,6 +296,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
290
296
|
removeCustomFuncFromWindow(pageDesignResult.value);
|
|
291
297
|
}
|
|
292
298
|
eventBus.$off(eventPageInfo.value + "export-form-report");
|
|
299
|
+
eventBus.$off(eventPageInfo.value + "export-pdf-report");
|
|
293
300
|
eventBus.$off(eventPageInfo.value + "import-file");
|
|
294
301
|
eventBus.$off(eventPageInfo.value + "assign-task");
|
|
295
302
|
eventBus.$off(eventPageInfo.value + "copy-task");
|
|
@@ -306,8 +313,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
306
313
|
showExportForm.value = false;
|
|
307
314
|
buttonParams.value = null;
|
|
308
315
|
}
|
|
309
|
-
function doExportFormReport(templateFile) {
|
|
310
|
-
|
|
316
|
+
function doExportFormReport(buttonConfigure2, templateFile) {
|
|
317
|
+
let isPdf = false;
|
|
318
|
+
if (buttonConfigure2.name === "export-pdf") {
|
|
319
|
+
isPdf = true;
|
|
320
|
+
}
|
|
311
321
|
exportFormReport(
|
|
312
322
|
buttonParams.value.pageContext,
|
|
313
323
|
buttonParams.value.configureObj,
|
|
@@ -324,8 +334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
334
|
if (!_selectFile_.value) {
|
|
325
335
|
return;
|
|
326
336
|
}
|
|
327
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
328
|
-
return;
|
|
337
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
|
|
329
338
|
const fileObj = _selectFile_.value.files[0];
|
|
330
339
|
if (fileObj) {
|
|
331
340
|
_selectFile_.value.value = null;
|
|
@@ -397,6 +406,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
397
406
|
function openDialog(configureObj, eventParams, myJumpPageSetting) {
|
|
398
407
|
getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then((openPageParams) => {
|
|
399
408
|
if (openPageParams) {
|
|
409
|
+
const myJumpPageSettingOrg = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
|
|
410
|
+
if (myJumpPageSettingOrg) {
|
|
411
|
+
Object.assign(openPageParams, deepCopy(myJumpPageSettingOrg));
|
|
412
|
+
}
|
|
400
413
|
const jumpMode = openPageParams.jumpMode;
|
|
401
414
|
const popPageSetting = openPageParams;
|
|
402
415
|
popPageSetting.parentPageCode = parentPageContext.value.code;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.53",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
50
50
|
"@vue/test-utils": "^2.4.4",
|
|
51
|
-
"agilebuilder-ui": "1.0.
|
|
51
|
+
"agilebuilder-ui": "1.0.42",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|