super-page-runtime 0.0.1-tmp2
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/.prettierrc.json +8 -0
- package/README.md +61 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/runtime/index.d.ts +3 -0
- package/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +24 -0
- package/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
- package/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
- package/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
- package/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
- package/lib/components/runtime/views/super-page.vue.d.ts +91 -0
- package/lib/components/super-page-dialog/index.d.ts +3 -0
- package/lib/components/super-page-dialog/super-page-dialog.vue.d.ts +36 -0
- package/lib/components/wf-editor/index.d.ts +3 -0
- package/lib/components/wf-editor/wf-editor.vue.d.ts +2 -0
- package/lib/favicon.ico +0 -0
- package/lib/index.js +8 -0
- package/lib/runtime/index.js +3 -0
- package/lib/runtime/utils/assemblys-config.js +258 -0
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue2.js +54 -0
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +35 -0
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +110 -0
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +53 -0
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +42 -0
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +50 -0
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +50 -0
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +51 -0
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue.js +141 -0
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue.js +127 -0
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue.js +104 -0
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue2.js +72 -0
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +73 -0
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue2.js +78 -0
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +42 -0
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue2.js +43 -0
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +29 -0
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +68 -0
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +74 -0
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue.js +640 -0
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +452 -0
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue2.js +82 -0
- package/lib/runtime/views/assemblys/error-render.vue.js +22 -0
- package/lib/runtime/views/assemblys/error-render.vue2.js +3 -0
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +156 -0
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +82 -0
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +59 -0
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +40 -0
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +74 -0
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +127 -0
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue2.js +133 -0
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue2.js +77 -0
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +29 -0
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +157 -0
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +174 -0
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue2.js +201 -0
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +65 -0
- package/lib/runtime/views/assemblys/object-render.vue.js +142 -0
- package/lib/runtime/views/assemblys/object-render.vue2.js +3 -0
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +61 -0
- package/lib/runtime/views/super-page.vue.js +479 -0
- package/lib/runtime/views/super-page.vue2.js +3 -0
- package/lib/src/assets/chart-themes/theme1.js +7 -0
- package/lib/src/assets/chart-themes/theme2.js +7 -0
- package/lib/src/assets/chart-themes/theme3.js +7 -0
- package/lib/src/utils/api/api-util.d.ts +11 -0
- package/lib/src/utils/api/api-util.js +128 -0
- package/lib/src/utils/charts/chart-util.js +15 -0
- package/lib/src/utils/common-util.d.ts +11 -0
- package/lib/src/utils/common-util.js +81 -0
- package/lib/src/utils/events/event-util.d.ts +48 -0
- package/lib/src/utils/events/event-util.js +525 -0
- package/lib/src/utils/events/standard-event.d.ts +61 -0
- package/lib/src/utils/events/standard-event.js +1623 -0
- package/lib/src/utils/events/validator-util.d.ts +4 -0
- package/lib/src/utils/events/validator-util.js +389 -0
- package/lib/src/utils/global-refs.d.ts +59 -0
- package/lib/src/utils/global-refs.js +65 -0
- package/lib/src/utils/interfaces/page-design-types.d.ts +221 -0
- package/lib/src/utils/interfaces/page-design-types.js +9 -0
- package/lib/src/utils/page-helper-util.d.ts +87 -0
- package/lib/src/utils/page-helper-util.js +503 -0
- package/lib/src/utils/page-init-util.d.ts +38 -0
- package/lib/src/utils/page-init-util.js +200 -0
- package/lib/src/utils/store-util.d.ts +15 -0
- package/lib/src/utils/store-util.js +17 -0
- package/lib/src/utils/store.d.ts +2 -0
- package/lib/src/utils/store.js +3 -0
- package/lib/src/utils/table-utils.js +23 -0
- package/lib/super-page-dialog/index.js +3 -0
- package/lib/super-page-dialog/super-page-dialog.vue.js +73 -0
- package/lib/super-page-dialog/super-page-dialog.vue2.js +3 -0
- package/lib/wf-editor/index.js +3 -0
- package/lib/wf-editor/wf-editor.css +4 -0
- package/lib/wf-editor/wf-editor.vue.js +15 -0
- package/package-ws.json +70 -0
- package/package.json +67 -0
- package/src/assets/base.css +86 -0
- package/src/assets/chart-themes/theme1.ts +6 -0
- package/src/assets/chart-themes/theme2.ts +6 -0
- package/src/assets/chart-themes/theme3.ts +6 -0
- package/src/assets/images/button/button-group.png +0 -0
- package/src/assets/images/button/button.png +0 -0
- package/src/assets/images/chart/chart-column.png +0 -0
- package/src/assets/images/chart/chart-gauge.png +0 -0
- package/src/assets/images/chart/chart-pie.png +0 -0
- package/src/assets/images/chart/chart-radar.png +0 -0
- package/src/assets/images/chart/chart-scatter.png +0 -0
- package/src/assets/images/container/container-card.png +0 -0
- package/src/assets/images/container/container-collapse.png +0 -0
- package/src/assets/images/container/container-container.png +0 -0
- package/src/assets/images/container/container-flex.png +0 -0
- package/src/assets/images/container/container-form.png +0 -0
- package/src/assets/images/container/container-iframe.png +0 -0
- package/src/assets/images/container/container-normal.png +0 -0
- package/src/assets/images/container/container-tabs.png +0 -0
- package/src/assets/images/container/container-tools.png +0 -0
- package/src/assets/images/data/data-process.png +0 -0
- package/src/assets/images/data/data-step.png +0 -0
- package/src/assets/images/data/data-table-column.png +0 -0
- package/src/assets/images/data/data-table.png +0 -0
- package/src/assets/images/data/data-timeline.png +0 -0
- package/src/assets/images/data/data-tree.png +0 -0
- package/src/assets/images/form/form-cascader.png +0 -0
- package/src/assets/images/form/form-check.png +0 -0
- package/src/assets/images/form/form-color.png +0 -0
- package/src/assets/images/form/form-count.png +0 -0
- package/src/assets/images/form/form-custom.png +0 -0
- package/src/assets/images/form/form-date.png +0 -0
- package/src/assets/images/form/form-dept.png +0 -0
- package/src/assets/images/form/form-divider.png +0 -0
- package/src/assets/images/form/form-file.png +0 -0
- package/src/assets/images/form/form-image-upload.png +0 -0
- package/src/assets/images/form/form-img.png +0 -0
- package/src/assets/images/form/form-input.png +0 -0
- package/src/assets/images/form/form-label.png +0 -0
- package/src/assets/images/form/form-link.png +0 -0
- package/src/assets/images/form/form-radio.png +0 -0
- package/src/assets/images/form/form-scan.png +0 -0
- package/src/assets/images/form/form-score.png +0 -0
- package/src/assets/images/form/form-select.png +0 -0
- package/src/assets/images/form/form-slider.png +0 -0
- package/src/assets/images/form/form-space.png +0 -0
- package/src/assets/images/form/form-switch.png +0 -0
- package/src/assets/images/form/form-text.png +0 -0
- package/src/assets/images/form/form-textarea.png +0 -0
- package/src/assets/images/form/form-transfer.png +0 -0
- package/src/assets/images/form/form-zoom.png +0 -0
- package/src/assets/images/group-button.png +0 -0
- package/src/assets/images/group-chart.png +0 -0
- package/src/assets/images/group-container.png +0 -0
- package/src/assets/images/group-data.png +0 -0
- package/src/assets/images/group-form.png +0 -0
- package/src/assets/images/group-workflow.png +0 -0
- package/src/assets/images/workflow/workflow-button.png +0 -0
- package/src/assets/images/workflow/workflow-history-texts.png +0 -0
- package/src/assets/images/workflow/workflow-history.png +0 -0
- package/src/assets/images/workflow/workflow-imagehistory.png +0 -0
- package/src/assets/images/workflow/workflow-texthistory .png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +1 -0
- package/src/i18n/langs/cn.js +52 -0
- package/src/i18n/langs/en.js +52 -0
- package/src/stores/counter.ts +12 -0
- package/src/utils/api/api-util.ts +176 -0
- package/src/utils/charts/chart-util.ts +41 -0
- package/src/utils/common-util.ts +96 -0
- package/src/utils/container-style-util.ts +237 -0
- package/src/utils/eventBus.ts +14 -0
- package/src/utils/events/event-util.ts +790 -0
- package/src/utils/events/jump-page-util.ts +0 -0
- package/src/utils/events/standard-event.ts +2075 -0
- package/src/utils/events/validator-util.ts +474 -0
- package/src/utils/global-refs.ts +160 -0
- package/src/utils/interfaces/page-design-types.ts +259 -0
- package/src/utils/page-helper-util.ts +850 -0
- package/src/utils/page-init-util.ts +291 -0
- package/src/utils/page-permission-util.ts +521 -0
- package/src/utils/store-util.ts +41 -0
- package/src/utils/store.ts +3 -0
- package/src/utils/table-utils.ts +31 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const pageHelperUtil = require("../../../../../src/utils/page-helper-util.js");
|
|
4
|
+
const pageInitUtil = require("../../../../../src/utils/page-init-util.js");
|
|
5
|
+
const _hoisted_1 = { style: { "float": "left" } };
|
|
6
|
+
const _hoisted_2 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
|
+
__name: "select-runtime",
|
|
9
|
+
props: {
|
|
10
|
+
pageContext: {},
|
|
11
|
+
configure: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props, { expose: __expose }) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
16
|
+
let dynamicFields = pageInitUtil.getFormModelFields(props.pageContext, props.configure);
|
|
17
|
+
const dynamicModelMethod = vue.computed({
|
|
18
|
+
get() {
|
|
19
|
+
return pageHelperUtil.getVariableValue(entity, dynamicFields);
|
|
20
|
+
},
|
|
21
|
+
set(value) {
|
|
22
|
+
pageHelperUtil.setVariableValue(entity, dynamicFields, value);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
26
|
+
const runtimeStyle = runtimeInfo.style;
|
|
27
|
+
const runtimeClass = runtimeInfo.class;
|
|
28
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
29
|
+
const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
|
|
30
|
+
const listOptions = vue.ref(designProperty.options ? designProperty.options : []);
|
|
31
|
+
const cacheOptions = pageHelperUtil.getOptionDatasFromPage(props.pageContext, props.configure);
|
|
32
|
+
if (cacheOptions.length > 0) {
|
|
33
|
+
listOptions.value = cacheOptions;
|
|
34
|
+
}
|
|
35
|
+
const queryLoadingFlag = vue.ref(false);
|
|
36
|
+
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
37
|
+
const valueType = dataOrigin.optionValueSetType;
|
|
38
|
+
let autoSets = [];
|
|
39
|
+
const optionconfigInfo = designProperty.optionconfigInfo ? designProperty.optionconfigInfo : {};
|
|
40
|
+
if (valueType == "dynamicData" || valueType == "dataTable" || valueType == "service") {
|
|
41
|
+
if (dataOrigin.filterType == "remote") {
|
|
42
|
+
designProperty.filterable = true;
|
|
43
|
+
designProperty.remote = true;
|
|
44
|
+
designProperty.remoteShowSuffix = true;
|
|
45
|
+
let hisQuery = void 0;
|
|
46
|
+
designProperty.remoteMethod = function(query) {
|
|
47
|
+
if (hisQuery === query) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
hisQuery = query;
|
|
51
|
+
queryLoadingFlag.value = true;
|
|
52
|
+
console.log("query", query);
|
|
53
|
+
pageHelperUtil.queryOptionDatasources(props.pageContext, optionconfigInfo, query).then((results) => {
|
|
54
|
+
queryLoadingFlag.value = false;
|
|
55
|
+
}).then((error) => {
|
|
56
|
+
console.log("查询失败!", error);
|
|
57
|
+
queryLoadingFlag.value = false;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (dataOrigin.autoSets) {
|
|
62
|
+
for (let obj of dataOrigin.autoSets) {
|
|
63
|
+
if (obj.source) {
|
|
64
|
+
autoSets.push(obj);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (props.configure && props.configure.props && props.configure.props.base && props.configure.props.base.optionProp) {
|
|
70
|
+
autoSets.push({
|
|
71
|
+
source: "label",
|
|
72
|
+
target: props.configure.props.base.optionProp
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (autoSets.length > 0) {
|
|
76
|
+
designProperty.changeMethod = optionChange;
|
|
77
|
+
}
|
|
78
|
+
const monitorFields = designProperty.monitorFields;
|
|
79
|
+
const monitorFieldInfos = [];
|
|
80
|
+
if (monitorFields) {
|
|
81
|
+
const preFields = [];
|
|
82
|
+
for (let propName of monitorFields) {
|
|
83
|
+
if (propName.startsWith("${")) {
|
|
84
|
+
propName = propName.substring(2, propName.length - 1);
|
|
85
|
+
const fields = propName.split(".");
|
|
86
|
+
if (fields[0] === "page" || fields[0] === "task" || fields[0] === "data") {
|
|
87
|
+
monitorFieldInfos.push(fields);
|
|
88
|
+
if (!preFields.includes(fields[0])) {
|
|
89
|
+
preFields.push(fields[0]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
for (let preField of preFields) {
|
|
95
|
+
vue.watch(entity[preField], () => {
|
|
96
|
+
monitorFieldChange();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function getMonitorFieldValues() {
|
|
101
|
+
let values = "";
|
|
102
|
+
for (let fieldInfo of monitorFieldInfos) {
|
|
103
|
+
values += "_" + pageHelperUtil.getVariableValue(entity, fieldInfo);
|
|
104
|
+
}
|
|
105
|
+
return values;
|
|
106
|
+
}
|
|
107
|
+
let initMonitorValue = getMonitorFieldValues();
|
|
108
|
+
let monitorTimeout = false;
|
|
109
|
+
function monitorFieldChange() {
|
|
110
|
+
if (monitorTimeout) {
|
|
111
|
+
clearTimeout(monitorTimeout);
|
|
112
|
+
}
|
|
113
|
+
monitorTimeout = setTimeout(function() {
|
|
114
|
+
const newValue = getMonitorFieldValues();
|
|
115
|
+
if (newValue == initMonitorValue) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
initMonitorValue = newValue;
|
|
119
|
+
pageHelperUtil.queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((error) => {
|
|
120
|
+
console.log("查询失败!", error);
|
|
121
|
+
queryLoadingFlag.value = false;
|
|
122
|
+
});
|
|
123
|
+
}, 200);
|
|
124
|
+
}
|
|
125
|
+
function optionChange(value) {
|
|
126
|
+
let selItems = null;
|
|
127
|
+
if (listOptions.value && value != void 0 && value != null) {
|
|
128
|
+
selItems = listOptions.value.filter((item) => {
|
|
129
|
+
return Array.isArray(value) ? value.includes(item.value) : value === item.value;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
pageHelperUtil.autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
133
|
+
}
|
|
134
|
+
function updateOptions(newOptions) {
|
|
135
|
+
listOptions.value = newOptions ? newOptions : [];
|
|
136
|
+
console.log("updateOptions", newOptions);
|
|
137
|
+
}
|
|
138
|
+
__expose({
|
|
139
|
+
updateOptions
|
|
140
|
+
});
|
|
141
|
+
return (_ctx, _cache) => {
|
|
142
|
+
const _component_el_option = vue.resolveComponent("el-option");
|
|
143
|
+
const _component_el_select = vue.resolveComponent("el-select");
|
|
144
|
+
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
145
|
+
return vue.openBlock(), vue.createBlock(_component_el_form_item, {
|
|
146
|
+
required: vue.unref(designProperty).required ? true : false,
|
|
147
|
+
class: vue.normalizeClass(vue.unref(runtimeClass)),
|
|
148
|
+
"label-width": vue.unref(designProperty).labelWidth,
|
|
149
|
+
style: vue.normalizeStyle(vue.unref(runtimeStyle))
|
|
150
|
+
}, {
|
|
151
|
+
label: vue.withCtx(() => [
|
|
152
|
+
vue.unref(designProperty).tittleShow ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
153
|
+
key: 0,
|
|
154
|
+
style: vue.normalizeStyle({ ...vue.unref(headerStyle) })
|
|
155
|
+
}, vue.toDisplayString(vue.unref(designProperty).title), 5)) : vue.createCommentVNode("", true)
|
|
156
|
+
]),
|
|
157
|
+
default: vue.withCtx(() => [
|
|
158
|
+
vue.createVNode(_component_el_select, {
|
|
159
|
+
disabled: vue.unref(designProperty).state === "disabled",
|
|
160
|
+
size: vue.unref(designProperty).size,
|
|
161
|
+
clearable: vue.unref(designProperty).clearable,
|
|
162
|
+
multiple: vue.unref(designProperty).multiple,
|
|
163
|
+
"collapse-tags": vue.unref(designProperty).collapseTags,
|
|
164
|
+
"collapse-tags-tooltip": vue.unref(designProperty).collapseTagsTooltip,
|
|
165
|
+
filterable: vue.unref(designProperty).filterable,
|
|
166
|
+
"allow-create": vue.unref(designProperty).allowCreate,
|
|
167
|
+
placeholder: vue.unref(designProperty).placeholder,
|
|
168
|
+
"remote-show-suffix": vue.unref(designProperty).remoteShowSuffix,
|
|
169
|
+
remote: vue.unref(designProperty).remote,
|
|
170
|
+
"remote-method": vue.unref(designProperty).remoteMethod,
|
|
171
|
+
loading: queryLoadingFlag.value,
|
|
172
|
+
onChange: vue.unref(designProperty).changeMethod,
|
|
173
|
+
modelValue: dynamicModelMethod.value,
|
|
174
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
175
|
+
}, {
|
|
176
|
+
default: vue.withCtx(() => [
|
|
177
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(listOptions.value, (item) => {
|
|
178
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
179
|
+
key: item.value,
|
|
180
|
+
label: item.label,
|
|
181
|
+
value: item.value
|
|
182
|
+
}, {
|
|
183
|
+
default: vue.withCtx(() => [
|
|
184
|
+
item._description_ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
185
|
+
vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(item.label), 1),
|
|
186
|
+
vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(item._description_), 1)
|
|
187
|
+
], 64)) : vue.createCommentVNode("", true)
|
|
188
|
+
]),
|
|
189
|
+
_: 2
|
|
190
|
+
}, 1032, ["label", "value"]);
|
|
191
|
+
}), 128))
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])
|
|
195
|
+
]),
|
|
196
|
+
_: 1
|
|
197
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const pageInitUtil = require("../../../../../src/utils/page-init-util.js");
|
|
4
|
+
const pageHelperUtil = require("../../../../../src/utils/page-helper-util.js");
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
__name: "switch-runtime",
|
|
7
|
+
props: {
|
|
8
|
+
pageContext: {},
|
|
9
|
+
configure: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
14
|
+
let dynamicFields = pageInitUtil.getFormModelFields(props.pageContext, props.configure);
|
|
15
|
+
const dynamicModelMethod = vue.computed({
|
|
16
|
+
get() {
|
|
17
|
+
return pageHelperUtil.getVariableValue(entity, dynamicFields);
|
|
18
|
+
},
|
|
19
|
+
set(value) {
|
|
20
|
+
pageHelperUtil.setVariableValue(entity, dynamicFields, value);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
|
+
const runtimeStyle = runtimeInfo.style;
|
|
25
|
+
const runtimeClass = runtimeInfo.class;
|
|
26
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
27
|
+
const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
|
|
28
|
+
const switchStyle = runtimeInfo.switchStyle;
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
const _component_el_switch = vue.resolveComponent("el-switch");
|
|
31
|
+
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
32
|
+
return vue.openBlock(), vue.createBlock(_component_el_form_item, {
|
|
33
|
+
required: vue.unref(designProperty).required,
|
|
34
|
+
class: vue.normalizeClass(vue.unref(runtimeClass)),
|
|
35
|
+
"label-width": vue.unref(designProperty).labelWidth,
|
|
36
|
+
style: vue.normalizeStyle(vue.unref(runtimeStyle))
|
|
37
|
+
}, {
|
|
38
|
+
label: vue.withCtx(() => [
|
|
39
|
+
vue.unref(designProperty).tittleShow ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
style: vue.normalizeStyle({ ...vue.unref(headerStyle) })
|
|
42
|
+
}, vue.toDisplayString(vue.unref(designProperty).title), 5)) : vue.createCommentVNode("", true)
|
|
43
|
+
]),
|
|
44
|
+
default: vue.withCtx(() => [
|
|
45
|
+
vue.createVNode(_component_el_switch, {
|
|
46
|
+
disabled: vue.unref(designProperty).state === "disabled",
|
|
47
|
+
"active-value:": vue.unref(designProperty).activeValue,
|
|
48
|
+
"active-text": vue.unref(designProperty).activeText,
|
|
49
|
+
"inactive-value": vue.unref(designProperty).inactiveValue,
|
|
50
|
+
"inactive-text": vue.unref(designProperty).inactiveText,
|
|
51
|
+
width: vue.unref(designProperty).offOnWidth,
|
|
52
|
+
size: vue.unref(designProperty).size,
|
|
53
|
+
style: vue.normalizeStyle(vue.unref(switchStyle)),
|
|
54
|
+
modelValue: dynamicModelMethod.value,
|
|
55
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
56
|
+
}, null, 8, ["disabled", "active-value:", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const pageInitUtil = require("../../../../../src/utils/page-init-util.js");
|
|
4
|
+
const pageHelperUtil = require("../../../../../src/utils/page-helper-util.js");
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
__name: "tag-runtime",
|
|
7
|
+
props: {
|
|
8
|
+
pageContext: {},
|
|
9
|
+
configure: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
pageInitUtil.getFormModelFields(props.pageContext, props.configure);
|
|
14
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
15
|
+
const runtimeStyle = runtimeInfo.style;
|
|
16
|
+
const runtimeClass = runtimeInfo.class;
|
|
17
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
18
|
+
const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
|
|
19
|
+
let contentVariable = designProperty.formatting;
|
|
20
|
+
if (!contentVariable) {
|
|
21
|
+
const propsBase = props.configure.props.base ? props.configure.props.base : {};
|
|
22
|
+
contentVariable = propsBase.prop;
|
|
23
|
+
}
|
|
24
|
+
if (!contentVariable) {
|
|
25
|
+
contentVariable = "${page." + props.configure.uuid + "}";
|
|
26
|
+
}
|
|
27
|
+
const dynamicValue = vue.computed(() => {
|
|
28
|
+
const resultValue = pageHelperUtil.formatVariableValue(props.pageContext, contentVariable);
|
|
29
|
+
return resultValue == void 0 || resultValue == null ? "" : resultValue;
|
|
30
|
+
});
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
const _component_el_tag = vue.resolveComponent("el-tag");
|
|
33
|
+
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
34
|
+
return vue.openBlock(), vue.createBlock(_component_el_form_item, {
|
|
35
|
+
required: vue.unref(designProperty).required,
|
|
36
|
+
class: vue.normalizeClass(vue.unref(runtimeClass)),
|
|
37
|
+
"label-width": vue.unref(designProperty).labelWidth,
|
|
38
|
+
style: vue.normalizeStyle(vue.unref(runtimeStyle))
|
|
39
|
+
}, {
|
|
40
|
+
label: vue.withCtx(() => [
|
|
41
|
+
vue.unref(designProperty).tittleShow ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
42
|
+
key: 0,
|
|
43
|
+
style: vue.normalizeStyle({ ...vue.unref(headerStyle) })
|
|
44
|
+
}, vue.toDisplayString(vue.unref(designProperty).title), 5)) : vue.createCommentVNode("", true)
|
|
45
|
+
]),
|
|
46
|
+
default: vue.withCtx(() => [
|
|
47
|
+
vue.createVNode(_component_el_tag, {
|
|
48
|
+
size: vue.unref(designProperty).size,
|
|
49
|
+
closable: vue.unref(designProperty).closable,
|
|
50
|
+
type: vue.unref(designProperty).type
|
|
51
|
+
}, {
|
|
52
|
+
default: vue.withCtx(() => [
|
|
53
|
+
vue.createTextVNode(vue.toDisplayString(dynamicValue.value), 1)
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["size", "closable", "type"])
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const pageInitUtil = require("../../../../../src/utils/page-init-util.js");
|
|
4
|
+
const pageHelperUtil = require("../../../../../src/utils/page-helper-util.js");
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
__name: "textarea-runtime",
|
|
7
|
+
props: {
|
|
8
|
+
pageContext: {},
|
|
9
|
+
configure: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
14
|
+
let dynamicFields = pageInitUtil.getFormModelFields(props.pageContext, props.configure);
|
|
15
|
+
const dynamicModelMethod = vue.computed({
|
|
16
|
+
get() {
|
|
17
|
+
return pageHelperUtil.getVariableValue(entity, dynamicFields);
|
|
18
|
+
},
|
|
19
|
+
set(value) {
|
|
20
|
+
pageHelperUtil.setVariableValue(entity, dynamicFields, value);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
|
+
const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
|
|
25
|
+
const runtimeStyle = runtimeInfo.style;
|
|
26
|
+
const runtimeClass = runtimeInfo.class;
|
|
27
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
30
|
+
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
31
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
32
|
+
vue.createVNode(_component_el_form_item, {
|
|
33
|
+
required: vue.unref(designProperty).required ? true : false,
|
|
34
|
+
class: vue.normalizeClass(vue.unref(runtimeClass)),
|
|
35
|
+
"label-width": vue.unref(designProperty).labelWidth,
|
|
36
|
+
style: vue.normalizeStyle(vue.unref(runtimeStyle))
|
|
37
|
+
}, {
|
|
38
|
+
label: vue.withCtx(() => [
|
|
39
|
+
vue.unref(designProperty).tittleShow ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
style: vue.normalizeStyle({ ...vue.unref(headerStyle) })
|
|
42
|
+
}, vue.toDisplayString(vue.unref(designProperty).title), 5)) : vue.createCommentVNode("", true)
|
|
43
|
+
]),
|
|
44
|
+
default: vue.withCtx(() => [
|
|
45
|
+
vue.createVNode(_component_el_input, {
|
|
46
|
+
disabled: vue.unref(designProperty).state === "disabled",
|
|
47
|
+
readonly: vue.unref(designProperty).state === "readonly",
|
|
48
|
+
size: vue.unref(designProperty).size,
|
|
49
|
+
clearable: vue.unref(designProperty).clearable,
|
|
50
|
+
placeholder: vue.unref(designProperty).placeholder,
|
|
51
|
+
modelValue: dynamicModelMethod.value,
|
|
52
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
53
|
+
rows: vue.unref(designProperty).rows ? vue.unref(designProperty).rows : 2,
|
|
54
|
+
maxlength: vue.unref(designProperty).maxLength,
|
|
55
|
+
"show-word-limit": vue.unref(designProperty).showInputNum,
|
|
56
|
+
type: "textarea"
|
|
57
|
+
}, null, 8, ["disabled", "readonly", "size", "clearable", "placeholder", "modelValue", "rows", "maxlength", "show-word-limit"])
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["required", "class", "label-width", "style"])
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const errorRender_vue_vue_type_script_setup_true_lang = require("./error-render.vue.js");
|
|
4
|
+
const assemblysConfig = require("../../utils/assemblys-config.js");
|
|
5
|
+
const pageDesignTypes = require("../../../src/utils/interfaces/page-design-types.js");
|
|
6
|
+
const globalRefs = require("../../../src/utils/global-refs.js");
|
|
7
|
+
const pageInitUtil = require("../../../src/utils/page-init-util.js");
|
|
8
|
+
const pageHelperUtil = require("../../../src/utils/page-helper-util.js");
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
__name: "object-render",
|
|
11
|
+
props: {
|
|
12
|
+
pageContext: {},
|
|
13
|
+
configure: {}
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
if (props.configure.style == void 0) {
|
|
18
|
+
props.configure.style = {};
|
|
19
|
+
}
|
|
20
|
+
const permissionCodes = pageInitUtil.getPermissionCodes(props.configure, props.pageContext);
|
|
21
|
+
let handleShowFlag = vue.ref(true);
|
|
22
|
+
let showFlag = vue.ref(true);
|
|
23
|
+
if (props.configure && props.configure.props && props.configure.props.showConditions) {
|
|
24
|
+
const showConditions = props.configure.props.showConditions;
|
|
25
|
+
if (showConditions.length > 0) {
|
|
26
|
+
showFlag = vue.computed(() => {
|
|
27
|
+
if (!handleShowFlag.value) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return pageHelperUtil.caculateShowCondition(props.pageContext, props.configure, showConditions);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const dynamicComponent = vue.ref({});
|
|
35
|
+
dynamicComponent.value = vue.markRaw(assemblysConfig.getRuntimeComponentByName(props.configure.name));
|
|
36
|
+
const showCopy = vue.ref(true);
|
|
37
|
+
if (dynamicComponent.value == null) {
|
|
38
|
+
dynamicComponent.value = errorRender_vue_vue_type_script_setup_true_lang;
|
|
39
|
+
showCopy.value = false;
|
|
40
|
+
}
|
|
41
|
+
const thisRef = vue.ref(null);
|
|
42
|
+
const runtimeStyle = vue.ref({});
|
|
43
|
+
const runtimeClass = vue.ref("");
|
|
44
|
+
const commonRuntime = props.configure.runtime && props.configure.runtime.common ? props.configure.runtime.common : {};
|
|
45
|
+
if (commonRuntime.class) {
|
|
46
|
+
runtimeClass.value = commonRuntime.class;
|
|
47
|
+
}
|
|
48
|
+
if (commonRuntime.style) {
|
|
49
|
+
Object.assign(runtimeStyle.value, commonRuntime.style);
|
|
50
|
+
const pageDimensions = props.pageContext && props.pageContext.dimensions ? props.pageContext.dimensions : pageDesignTypes.PageDimensions.PC;
|
|
51
|
+
const sizeStyle = commonRuntime.style[pageDimensions + "_style"];
|
|
52
|
+
if (sizeStyle) {
|
|
53
|
+
Object.assign(runtimeStyle.value, sizeStyle);
|
|
54
|
+
}
|
|
55
|
+
const sizeClass = commonRuntime.style[pageDimensions + "_class"];
|
|
56
|
+
if (sizeClass) {
|
|
57
|
+
runtimeClass.value += " " + sizeClass;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function setComponentRef(el) {
|
|
61
|
+
thisRef.value = el;
|
|
62
|
+
if (el && !el.show) {
|
|
63
|
+
el.show = function() {
|
|
64
|
+
handleShowFlag.value = true;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (el && !el.hide) {
|
|
68
|
+
el.hide = function() {
|
|
69
|
+
handleShowFlag.value = false;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (props.configure.uuid) {
|
|
73
|
+
globalRefs.addComponentRef(props.pageContext, props.configure.uuid, thisRef);
|
|
74
|
+
}
|
|
75
|
+
if (props.configure.code) {
|
|
76
|
+
globalRefs.addComponentRefByCode(props.pageContext, props.configure.code, thisRef);
|
|
77
|
+
} else if (props.configure.props && props.configure.props.base) {
|
|
78
|
+
const propsBase = props.configure.props.base;
|
|
79
|
+
if (propsBase.prop) {
|
|
80
|
+
let propName = propsBase.prop;
|
|
81
|
+
if (propName.startsWith("${")) {
|
|
82
|
+
propName = propName.substring(2, propName.length - 1);
|
|
83
|
+
}
|
|
84
|
+
if (propName.includes(".")) {
|
|
85
|
+
propName = propName.substring(propName.indexOf(".") + 1);
|
|
86
|
+
}
|
|
87
|
+
globalRefs.addComponentRefByCode(props.pageContext, propName, thisRef);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
vue.onMounted(() => {
|
|
92
|
+
if (!thisRef.value || !thisRef.value.parentNode) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const thisProps = props.configure.props ? props.configure.props : {};
|
|
96
|
+
const thisStyle = props.configure.style ? props.configure.style : {};
|
|
97
|
+
const position = thisProps.position;
|
|
98
|
+
if (position == "top" || position == "bottom") {
|
|
99
|
+
const contentObj = [thisRef.value.parentNode];
|
|
100
|
+
if (contentObj && contentObj.length > 0) {
|
|
101
|
+
const contentRec = contentObj[0].getBoundingClientRect();
|
|
102
|
+
if (position == "top") {
|
|
103
|
+
runtimeStyle.value["top"] = contentRec.top + "px";
|
|
104
|
+
}
|
|
105
|
+
if (position == "bottom") {
|
|
106
|
+
runtimeStyle.value["bottom"] = "10px";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const thisRec = thisRef.value.getBoundingClientRect();
|
|
110
|
+
runtimeStyle.value["width"] = thisRec.width + "px";
|
|
111
|
+
} else if (thisStyle.position) {
|
|
112
|
+
runtimeStyle.value["position"] = thisStyle.position;
|
|
113
|
+
if (runtimeStyle.value.position != "relative") {
|
|
114
|
+
if (!runtimeStyle.value["width"]) {
|
|
115
|
+
const thisRec = thisRef.value.getBoundingClientRect();
|
|
116
|
+
runtimeStyle.value["width"] = thisRec.width + "px";
|
|
117
|
+
}
|
|
118
|
+
if (thisStyle.left) {
|
|
119
|
+
runtimeStyle.value["left"] = thisStyle.left + "px";
|
|
120
|
+
}
|
|
121
|
+
if (thisStyle.top) {
|
|
122
|
+
runtimeStyle.value["top"] = thisStyle.top + "px";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
const _directive_permission = vue.resolveDirective("permission");
|
|
129
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(dynamicComponent.value), {
|
|
130
|
+
ref: setComponentRef,
|
|
131
|
+
style: vue.normalizeStyle(runtimeStyle.value),
|
|
132
|
+
class: vue.normalizeClass(runtimeClass.value),
|
|
133
|
+
configure: _ctx.configure,
|
|
134
|
+
pageContext: _ctx.pageContext
|
|
135
|
+
}, null, 8, ["style", "class", "configure", "pageContext"])), [
|
|
136
|
+
[vue.vShow, vue.unref(showFlag)],
|
|
137
|
+
[_directive_permission, vue.unref(permissionCodes)]
|
|
138
|
+
]);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const objectRender_vue_vue_type_script_setup_true_lang = require("../../object-render.vue.js");
|
|
4
|
+
const eventUtil = require("../../../../../src/utils/events/event-util.js");
|
|
5
|
+
const standardEvent = require("../../../../../src/utils/events/standard-event.js");
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
7
|
+
__name: "workflowbutton-runtime",
|
|
8
|
+
props: {
|
|
9
|
+
pageContext: {},
|
|
10
|
+
configure: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
15
|
+
vue.ref(runtimeInfo.style ? runtimeInfo.style : {});
|
|
16
|
+
runtimeInfo.class;
|
|
17
|
+
const buttonInfo = props.pageContext.workflowButtonComponent;
|
|
18
|
+
const completeTaskParam = props.pageContext.completeTaskParam;
|
|
19
|
+
const visibleBtns = vue.ref([]);
|
|
20
|
+
props.configure.items.forEach((item) => {
|
|
21
|
+
const pageCode = props.pageContext.code;
|
|
22
|
+
const pageVersion = props.pageContext.version;
|
|
23
|
+
if (isVisibleBtn(item, pageCode, pageVersion)) {
|
|
24
|
+
visibleBtns.value.push(item);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function getStandardClickEvent(events, pageCode, pageVersion) {
|
|
28
|
+
const clickEventFunObj = eventUtil.getClickEventFuncByType(pageCode, pageVersion, events);
|
|
29
|
+
if (clickEventFunObj) {
|
|
30
|
+
const isStandardEvent = clickEventFunObj.isStandard;
|
|
31
|
+
if (isStandardEvent) {
|
|
32
|
+
return clickEventFunObj.event.eventName;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function isVisibleBtn(btnConfigure, pageCode, pageVersion) {
|
|
37
|
+
const events = btnConfigure.events;
|
|
38
|
+
const workflowStandardEventName = getStandardClickEvent(events, pageCode, pageVersion);
|
|
39
|
+
const isVisible = standardEvent.isVisibleWorkflowButton(
|
|
40
|
+
workflowStandardEventName,
|
|
41
|
+
buttonInfo,
|
|
42
|
+
completeTaskParam
|
|
43
|
+
);
|
|
44
|
+
return isVisible;
|
|
45
|
+
}
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return vue.openBlock(), vue.createElementBlock("span", null, [
|
|
48
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visibleBtns.value, (element, itemIndex) => {
|
|
49
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
50
|
+
element.check ? (vue.openBlock(), vue.createBlock(objectRender_vue_vue_type_script_setup_true_lang, {
|
|
51
|
+
key: itemIndex,
|
|
52
|
+
pageContext: _ctx.pageContext,
|
|
53
|
+
configure: element
|
|
54
|
+
}, null, 8, ["pageContext", "configure"])) : vue.createCommentVNode("", true)
|
|
55
|
+
], 64);
|
|
56
|
+
}), 256))
|
|
57
|
+
]);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
module.exports = _sfc_main;
|