super-page-designer 2.0.31 → 2.0.34
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/design/utils/assemblys-config.js +17 -0
- package/dist/es/components/design/utils/page-explore-util.d.ts +2 -2
- package/dist/es/components/design/utils/page-explore-util.js +5 -17
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.d.ts +9 -0
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +3 -3
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue2.js +1 -487
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +686 -1
- package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js +55 -25
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-design.vue2.js +9 -106
- package/dist/es/components/design/views/design/page-design.vue.js +14 -20
- package/dist/es/components/design/views/design/view/attr-container.vue.js +23 -1
- package/dist/es/style.css +90 -90
- package/package.json +4 -4
|
@@ -6,7 +6,7 @@ import "uuid";
|
|
|
6
6
|
import "@element-plus/icons-vue";
|
|
7
7
|
import http from "agilebuilder-ui/src/utils/request";
|
|
8
8
|
import { usePageContextStore } from "../../../../../../stores/page-store.js";
|
|
9
|
-
import "../../common/common-variable-bind.
|
|
9
|
+
import "../../common/common-variable-bind.vue2.js";
|
|
10
10
|
import _sfc_main$4 from "./data-origin-service-in.vue.js";
|
|
11
11
|
import { queryTableFields } from "../../../../utils/page-table-util.js";
|
|
12
12
|
import _sfc_main$5 from "../../common/common-select-table.vue.js";
|
package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, unref, createCommentVNode,
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, unref, createCommentVNode, withDirectives, vShow, createTextVNode } from "vue";
|
|
2
2
|
import { getFormComponentOptions } from "../../../../utils/assemblys-config.js";
|
|
3
3
|
import { getCustomFuncs } from "../../../../utils/page-event-util.js";
|
|
4
4
|
import _sfc_main$2 from "../../common/common-attr-size.vue.js";
|
|
@@ -21,11 +21,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
if (props.configure.isTable) {
|
|
22
22
|
isTable.value = true;
|
|
23
23
|
}
|
|
24
|
+
const labelName = computed(() => {
|
|
25
|
+
const propBase = props.configure.props.base;
|
|
26
|
+
const isScope = (!propBase.type || propBase.type != "week" && propBase.type != "year") && propBase.dateScope;
|
|
27
|
+
return isScope ? "默认值1" : "默认值";
|
|
28
|
+
});
|
|
29
|
+
computed(() => {
|
|
30
|
+
const propBase = props.configure.props.base;
|
|
31
|
+
return (!propBase.type || propBase.type != "week" && propBase.type != "year") && propBase.dateScope;
|
|
32
|
+
});
|
|
24
33
|
function afterBindVariable(modelValue) {
|
|
25
34
|
props.configure.props.base.prop = modelValue;
|
|
26
35
|
}
|
|
27
|
-
function afterBindDefaultValue(modelValue) {
|
|
28
|
-
|
|
36
|
+
function afterBindDefaultValue(modelValue, fieldName) {
|
|
37
|
+
if (fieldName === "defaultValue2") {
|
|
38
|
+
props.configure.props.base.defaultValue2 = modelValue;
|
|
39
|
+
} else {
|
|
40
|
+
props.configure.props.base.defaultValue = modelValue;
|
|
41
|
+
}
|
|
29
42
|
}
|
|
30
43
|
return (_ctx, _cache) => {
|
|
31
44
|
const _component_el_option = resolveComponent("el-option");
|
|
@@ -49,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
62
|
default: withCtx(() => [
|
|
50
63
|
createVNode(_component_el_collapse, {
|
|
51
64
|
modelValue: openCollapseItems.value,
|
|
52
|
-
"onUpdate:modelValue": _cache[
|
|
65
|
+
"onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => openCollapseItems.value = $event),
|
|
53
66
|
style: { "margin-top": "6px" }
|
|
54
67
|
}, {
|
|
55
68
|
default: withCtx(() => [
|
|
@@ -105,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
118
|
}, {
|
|
106
119
|
default: withCtx(() => [
|
|
107
120
|
(openBlock(), createBlock(BindVariable, {
|
|
108
|
-
key: __props.configure.uuid,
|
|
121
|
+
key: __props.configure.uuid + "prop",
|
|
109
122
|
modelValue: __props.configure.props.base.prop,
|
|
110
123
|
paramTypes: ["data", "page"],
|
|
111
124
|
"onUpdate:modelValue": afterBindVariable
|
|
@@ -114,18 +127,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
127
|
_: 1
|
|
115
128
|
})) : createCommentVNode("", true),
|
|
116
129
|
createVNode(_component_el_form_item, {
|
|
117
|
-
label:
|
|
130
|
+
label: unref(labelName),
|
|
118
131
|
class: "amb-design-attr-item"
|
|
119
132
|
}, {
|
|
120
133
|
default: withCtx(() => [
|
|
121
134
|
(openBlock(), createBlock(BindVariable, {
|
|
122
|
-
key: __props.configure.uuid,
|
|
135
|
+
key: __props.configure.uuid + "defaultValue",
|
|
136
|
+
isRange: true,
|
|
123
137
|
modelValue: __props.configure.props.base.defaultValue,
|
|
124
138
|
"onUpdate:modelValue": afterBindDefaultValue
|
|
125
139
|
}, null, 8, ["modelValue"]))
|
|
126
140
|
]),
|
|
127
141
|
_: 1
|
|
128
|
-
}),
|
|
142
|
+
}, 8, ["label"]),
|
|
143
|
+
withDirectives(createVNode(_component_el_form_item, {
|
|
144
|
+
label: "默认值2",
|
|
145
|
+
class: "amb-design-attr-item"
|
|
146
|
+
}, {
|
|
147
|
+
default: withCtx(() => [
|
|
148
|
+
(openBlock(), createBlock(BindVariable, {
|
|
149
|
+
key: __props.configure.uuid + "defaultValue2",
|
|
150
|
+
isRange: true,
|
|
151
|
+
modelValue: __props.configure.props.base.defaultValue2,
|
|
152
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = (value) => afterBindDefaultValue(value, "defaultValue2"))
|
|
153
|
+
}, null, 8, ["modelValue"]))
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 512), [
|
|
157
|
+
[vShow, (!__props.configure.props.base.type || __props.configure.props.base.type != "week" && __props.configure.props.base.type != "year") && __props.configure.props.base.dateScope]
|
|
158
|
+
]),
|
|
129
159
|
!isTable.value ? (openBlock(), createBlock(_component_el_form_item, {
|
|
130
160
|
key: 1,
|
|
131
161
|
label: "绑定权限",
|
|
@@ -147,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
147
177
|
default: withCtx(() => [
|
|
148
178
|
createVNode(_component_el_radio_group, {
|
|
149
179
|
modelValue: __props.configure.props.base.tittleShow,
|
|
150
|
-
"onUpdate:modelValue": _cache[
|
|
180
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => __props.configure.props.base.tittleShow = $event),
|
|
151
181
|
class: "ml-4"
|
|
152
182
|
}, {
|
|
153
183
|
default: withCtx(() => [
|
|
@@ -176,7 +206,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
176
206
|
default: withCtx(() => [
|
|
177
207
|
createVNode(_component_el_input, {
|
|
178
208
|
modelValue: __props.configure.props.base.title,
|
|
179
|
-
"onUpdate:modelValue": _cache[
|
|
209
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => __props.configure.props.base.title = $event),
|
|
180
210
|
placeholder: "请输入"
|
|
181
211
|
}, null, 8, ["modelValue"])
|
|
182
212
|
]),
|
|
@@ -191,7 +221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
191
221
|
default: withCtx(() => [
|
|
192
222
|
createVNode(_component_el_input_number, {
|
|
193
223
|
modelValue: __props.configure.props.base.titleWidth,
|
|
194
|
-
"onUpdate:modelValue": _cache[
|
|
224
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => __props.configure.props.base.titleWidth = $event),
|
|
195
225
|
style: { "width": "100%" },
|
|
196
226
|
min: 0,
|
|
197
227
|
max: 200,
|
|
@@ -214,7 +244,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
214
244
|
default: withCtx(() => [
|
|
215
245
|
createVNode(_component_el_input, {
|
|
216
246
|
modelValue: __props.configure.props.base.placeholder,
|
|
217
|
-
"onUpdate:modelValue": _cache[
|
|
247
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => __props.configure.props.base.placeholder = $event),
|
|
218
248
|
placeholder: "请输入"
|
|
219
249
|
}, null, 8, ["modelValue"])
|
|
220
250
|
]),
|
|
@@ -227,7 +257,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
227
257
|
default: withCtx(() => [
|
|
228
258
|
createVNode(_component_el_input, {
|
|
229
259
|
modelValue: __props.configure.props.base.endPlaceholder,
|
|
230
|
-
"onUpdate:modelValue": _cache[
|
|
260
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => __props.configure.props.base.endPlaceholder = $event),
|
|
231
261
|
placeholder: "请输入"
|
|
232
262
|
}, null, 8, ["modelValue"])
|
|
233
263
|
]),
|
|
@@ -242,7 +272,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
272
|
default: withCtx(() => [
|
|
243
273
|
createVNode(_component_el_radio_group, {
|
|
244
274
|
modelValue: __props.configure.props.base.clearable,
|
|
245
|
-
"onUpdate:modelValue": _cache[
|
|
275
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => __props.configure.props.base.clearable = $event),
|
|
246
276
|
class: "ml-4"
|
|
247
277
|
}, {
|
|
248
278
|
default: withCtx(() => [
|
|
@@ -271,7 +301,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
271
301
|
default: withCtx(() => [
|
|
272
302
|
createVNode(_component_el_radio_group, {
|
|
273
303
|
modelValue: __props.configure.props.base.type,
|
|
274
|
-
"onUpdate:modelValue": _cache[
|
|
304
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => __props.configure.props.base.type = $event),
|
|
275
305
|
class: "ml-4"
|
|
276
306
|
}, {
|
|
277
307
|
default: withCtx(() => [
|
|
@@ -324,7 +354,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
354
|
default: withCtx(() => [
|
|
325
355
|
createVNode(_component_el_radio_group, {
|
|
326
356
|
modelValue: __props.configure.props.base.dateScope,
|
|
327
|
-
"onUpdate:modelValue": _cache[
|
|
357
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => __props.configure.props.base.dateScope = $event),
|
|
328
358
|
class: "ml-4"
|
|
329
359
|
}, {
|
|
330
360
|
default: withCtx(() => [
|
|
@@ -355,7 +385,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
355
385
|
default: withCtx(() => [
|
|
356
386
|
createVNode(_component_el_checkbox_group, {
|
|
357
387
|
modelValue: __props.configure.props.base.dateScopeDetails,
|
|
358
|
-
"onUpdate:modelValue": _cache[
|
|
388
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => __props.configure.props.base.dateScopeDetails = $event),
|
|
359
389
|
class: "ml-4"
|
|
360
390
|
}, {
|
|
361
391
|
default: withCtx(() => [
|
|
@@ -417,7 +447,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
417
447
|
clearable: "",
|
|
418
448
|
disabled: !__props.configure.props.base.dateScopeDetails || !__props.configure.props.base.dateScopeDetails.includes("custom"),
|
|
419
449
|
modelValue: __props.configure.props.base.scopeFunc,
|
|
420
|
-
"onUpdate:modelValue": _cache[
|
|
450
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => __props.configure.props.base.scopeFunc = $event),
|
|
421
451
|
placeholder: "请选择自定义方法",
|
|
422
452
|
filterable: ""
|
|
423
453
|
}, {
|
|
@@ -453,7 +483,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
453
483
|
default: withCtx(() => [
|
|
454
484
|
createVNode(_component_el_radio_group, {
|
|
455
485
|
modelValue: __props.configure.props.base.timestamp,
|
|
456
|
-
"onUpdate:modelValue": _cache[
|
|
486
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => __props.configure.props.base.timestamp = $event),
|
|
457
487
|
class: "ml-4"
|
|
458
488
|
}, {
|
|
459
489
|
default: withCtx(() => [
|
|
@@ -484,7 +514,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
484
514
|
default: withCtx(() => [
|
|
485
515
|
createVNode(_component_el_input, {
|
|
486
516
|
modelValue: __props.configure.props.base.format,
|
|
487
|
-
"onUpdate:modelValue": _cache[
|
|
517
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => __props.configure.props.base.format = $event),
|
|
488
518
|
placeholder: "请输入"
|
|
489
519
|
}, null, 8, ["modelValue"])
|
|
490
520
|
]),
|
|
@@ -497,7 +527,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
497
527
|
default: withCtx(() => [
|
|
498
528
|
createVNode(_component_el_radio_group, {
|
|
499
529
|
modelValue: __props.configure.props.base.size,
|
|
500
|
-
"onUpdate:modelValue": _cache[
|
|
530
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => __props.configure.props.base.size = $event),
|
|
501
531
|
class: "ml-4"
|
|
502
532
|
}, {
|
|
503
533
|
default: withCtx(() => [
|
|
@@ -532,7 +562,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
532
562
|
default: withCtx(() => [
|
|
533
563
|
createVNode(_component_el_radio_group, {
|
|
534
564
|
modelValue: __props.configure.props.base.state,
|
|
535
|
-
"onUpdate:modelValue": _cache[
|
|
565
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => __props.configure.props.base.state = $event),
|
|
536
566
|
class: "ml-4"
|
|
537
567
|
}, {
|
|
538
568
|
default: withCtx(() => [
|
|
@@ -579,7 +609,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
579
609
|
default: withCtx(() => [
|
|
580
610
|
createVNode(_component_el_checkbox, {
|
|
581
611
|
modelValue: __props.configure.props.verification.required,
|
|
582
|
-
"onUpdate:modelValue": _cache[
|
|
612
|
+
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => __props.configure.props.verification.required = $event),
|
|
583
613
|
label: "必填"
|
|
584
614
|
}, null, 8, ["modelValue"])
|
|
585
615
|
]),
|
|
@@ -595,7 +625,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
595
625
|
createVNode(_component_el_checkbox, {
|
|
596
626
|
label: "自定义",
|
|
597
627
|
modelValue: __props.configure.props.verification.custom,
|
|
598
|
-
"onUpdate:modelValue": _cache[
|
|
628
|
+
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => __props.configure.props.verification.custom = $event)
|
|
599
629
|
}, null, 8, ["modelValue"])
|
|
600
630
|
]),
|
|
601
631
|
_: 1
|
|
@@ -607,7 +637,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
607
637
|
clearable: "",
|
|
608
638
|
disabled: !__props.configure.props.verification.custom,
|
|
609
639
|
modelValue: __props.configure.props.verification.customFunc,
|
|
610
|
-
"onUpdate:modelValue": _cache[
|
|
640
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => __props.configure.props.verification.customFunc = $event),
|
|
611
641
|
placeholder: "请选择校验方法",
|
|
612
642
|
filterable: ""
|
|
613
643
|
}, {
|
package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-design.vue2.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { caculateDetailComponentStyle, caculateComponentProps } from "../../../../utils/form-design-util.js";
|
|
3
|
+
import "super-page-runtime";
|
|
3
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
5
|
__name: "datepicker-design",
|
|
5
6
|
props: {
|
|
@@ -27,10 +28,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
},
|
|
28
29
|
{ immediate: true }
|
|
29
30
|
);
|
|
31
|
+
const shortCuts = ref([]);
|
|
30
32
|
function caculateDateProps() {
|
|
31
33
|
let propBase = props.configure && props.configure.props ? props.configure.props.base : {};
|
|
32
34
|
propBase = propBase ? propBase : {};
|
|
33
35
|
const tempProps = {};
|
|
36
|
+
tempProps.defaultValue2 = propBase.defaultValue2;
|
|
34
37
|
if (propBase.format) {
|
|
35
38
|
tempProps["format"] = propBase.format;
|
|
36
39
|
}
|
|
@@ -57,99 +60,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
60
|
} else {
|
|
58
61
|
tempProps.dateType = dateType;
|
|
59
62
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const dateParams = {
|
|
65
|
-
text: "今天",
|
|
66
|
-
value: () => {
|
|
67
|
-
return /* @__PURE__ */ new Date();
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
if (tempProps.dateType.endsWith("range")) {
|
|
71
|
-
dateParams.value = () => {
|
|
72
|
-
return [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()];
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
shortcuts.push(dateParams);
|
|
76
|
-
}
|
|
77
|
-
if (dateScopeDetails.includes("yesterday") && !["week", "month", "year"].includes(dateType)) {
|
|
78
|
-
const date = /* @__PURE__ */ new Date();
|
|
79
|
-
date.setTime(date.getTime() - 3600 * 1e3 * 24);
|
|
80
|
-
const dateParams = {
|
|
81
|
-
text: "昨天",
|
|
82
|
-
value: () => {
|
|
83
|
-
return date;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
if (tempProps.dateType.endsWith("range")) {
|
|
87
|
-
dateParams.value = () => {
|
|
88
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
shortcuts.push(dateParams);
|
|
92
|
-
}
|
|
93
|
-
if (dateScopeDetails.includes("oneWeek") && !["month", "year"].includes(dateType)) {
|
|
94
|
-
const date = /* @__PURE__ */ new Date();
|
|
95
|
-
date.setTime(date.getTime() - 3600 * 1e3 * 24 * 7);
|
|
96
|
-
const dateParams = {
|
|
97
|
-
text: "一周前",
|
|
98
|
-
value: () => {
|
|
99
|
-
return date;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
if (tempProps.dateType.endsWith("range")) {
|
|
103
|
-
dateParams.text = "一周";
|
|
104
|
-
dateParams.value = () => {
|
|
105
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
shortcuts.push(dateParams);
|
|
109
|
-
}
|
|
110
|
-
if (dateScopeDetails.includes("oneMonth") && !["year"].includes(dateType)) {
|
|
111
|
-
const date = /* @__PURE__ */ new Date();
|
|
112
|
-
if (date.getMonth() > 0) {
|
|
113
|
-
date.setMonth(date.getMonth() - 1);
|
|
114
|
-
} else {
|
|
115
|
-
date.setMonth(12);
|
|
116
|
-
date.setFullYear(date.getFullYear() - 1);
|
|
117
|
-
}
|
|
118
|
-
const dateParams = {
|
|
119
|
-
text: "一月前",
|
|
120
|
-
value: () => {
|
|
121
|
-
return date;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
if (tempProps.dateType.endsWith("range")) {
|
|
125
|
-
dateParams.text = "一月";
|
|
126
|
-
dateParams.value = () => {
|
|
127
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
shortcuts.push(dateParams);
|
|
131
|
-
}
|
|
132
|
-
if (dateScopeDetails.includes("oneYear")) {
|
|
133
|
-
const date = /* @__PURE__ */ new Date();
|
|
134
|
-
date.setFullYear(date.getFullYear() - 1);
|
|
135
|
-
const dateParams = {
|
|
136
|
-
text: "一年前",
|
|
137
|
-
value: () => {
|
|
138
|
-
return date;
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
if (tempProps.dateType.endsWith("range")) {
|
|
142
|
-
dateParams.text = "一年";
|
|
143
|
-
dateParams.value = () => {
|
|
144
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
shortcuts.push(dateParams);
|
|
148
|
-
}
|
|
149
|
-
tempProps.shortcuts = shortcuts;
|
|
150
|
-
if (dateScopeDetails.includes("custom") && propBase.scopeFunc) {
|
|
151
|
-
tempProps.shortcutsFunc = propBase.scopeFunc;
|
|
152
|
-
}
|
|
63
|
+
tempProps.sourceType = dateType;
|
|
64
|
+
tempProps.dateScopeDetails = propBase.dateScopeDetails;
|
|
65
|
+
if (propBase.dateScopeDetails && propBase.dateScopeDetails.includes("custom") && propBase.scopeFunc) {
|
|
66
|
+
tempProps.shortcutsFunc = propBase.scopeFunc;
|
|
153
67
|
}
|
|
154
68
|
Object.assign(designProperty.value, tempProps);
|
|
155
69
|
}
|
|
@@ -158,17 +72,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
158
72
|
() => {
|
|
159
73
|
caculateComponentProps(props.configure, designProperty);
|
|
160
74
|
caculateDateProps();
|
|
161
|
-
const shortcuts = designProperty.value.shortcuts;
|
|
162
|
-
designProperty.value.shortcuts = [];
|
|
163
|
-
const dateType = designProperty.value.dateType;
|
|
164
|
-
designProperty.value.dateType = "daterange";
|
|
165
|
-
console.log("%c描述-205312", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", designProperty.value);
|
|
166
|
-
setTimeout(function() {
|
|
167
|
-
if (shortcuts) {
|
|
168
|
-
designProperty.value.dateType = dateType;
|
|
169
|
-
designProperty.value.shortcuts = shortcuts;
|
|
170
|
-
}
|
|
171
|
-
}, 10);
|
|
172
75
|
props.configure.runtime.props = designProperty.value;
|
|
173
76
|
},
|
|
174
77
|
{ immediate: true }
|
|
@@ -205,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
205
108
|
format: designProperty.value.format,
|
|
206
109
|
modelValue: designProperty.value.value,
|
|
207
110
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => designProperty.value.value = $event),
|
|
208
|
-
shortcuts:
|
|
111
|
+
shortcuts: shortCuts.value,
|
|
209
112
|
type: designProperty.value.dateType
|
|
210
113
|
}, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
|
|
211
114
|
key: 1,
|
|
@@ -220,7 +123,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
220
123
|
format: designProperty.value.format,
|
|
221
124
|
modelValue: designProperty.value.value,
|
|
222
125
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => designProperty.value.value = $event),
|
|
223
|
-
shortcuts:
|
|
126
|
+
shortcuts: shortCuts.value,
|
|
224
127
|
type: designProperty.value.dateType
|
|
225
128
|
}, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"]))
|
|
226
129
|
]),
|
|
@@ -167,22 +167,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
167
167
|
fn.apply(context, args);
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
if (pageDesign.value.props.workflowSource) {
|
|
173
|
-
if (pageDesign.value.props.workflowSource === "link") {
|
|
174
|
-
myWorkflowCode = pageDesign.value.props.linkWorkflowCode;
|
|
175
|
-
} else {
|
|
176
|
-
myWorkflowCode = pageDesign.value.props.createWorkflowCode;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
170
|
+
function workflowDefVersionChange(newDef) {
|
|
171
|
+
const workflowVersion = newDef.definitionVersion;
|
|
179
172
|
if (workflowVersion) {
|
|
180
173
|
pageDesign.value.props.workflowSource = "link";
|
|
181
174
|
pageDesign.value.props.linkWorkflowVersion = workflowVersion;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (myWorkflowCode) {
|
|
185
|
-
getProcessDefinition(myWorkflowCode, workflowVersion);
|
|
175
|
+
pageDesign.value.workflowVersion = workflowVersion;
|
|
176
|
+
afterChangeDefinition(newDef);
|
|
186
177
|
}
|
|
187
178
|
}
|
|
188
179
|
function managePagePermission(pageDesign2) {
|
|
@@ -211,13 +202,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
202
|
}
|
|
212
203
|
function getProcessDefinition(workflowCode, defVersion) {
|
|
213
204
|
getHighestVersionDefinition(workflowCode, defVersion, publishVersion.value).then((definition) => {
|
|
214
|
-
|
|
215
|
-
selectWfVersion.value = definition.definitionVersion;
|
|
216
|
-
definitionId.value = definition.id;
|
|
205
|
+
afterChangeDefinition(definition);
|
|
217
206
|
clickType.value = "workflow";
|
|
218
207
|
isShowWfEditor.value = true;
|
|
219
208
|
});
|
|
220
209
|
}
|
|
210
|
+
function afterChangeDefinition(definition) {
|
|
211
|
+
selectWfCode.value = definition.code;
|
|
212
|
+
selectWfVersion.value = definition.definitionVersion;
|
|
213
|
+
definitionId.value = definition.id;
|
|
214
|
+
}
|
|
221
215
|
function clickWorkflow() {
|
|
222
216
|
let defVersion;
|
|
223
217
|
let workflowCode;
|
|
@@ -329,13 +323,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
329
323
|
isShowWfEditor.value ? withDirectives((openBlock(), createBlock(_component_workflow_editor, {
|
|
330
324
|
key: 0,
|
|
331
325
|
id: definitionId.value,
|
|
332
|
-
|
|
333
|
-
|
|
326
|
+
code: pageDesign.value.workflowCode,
|
|
327
|
+
version: pageDesign.value.workflowVersion,
|
|
334
328
|
"system-code": pageDesign.value.systemCode,
|
|
335
329
|
"system-publish-version": pageDesign.value.systemVersion,
|
|
336
330
|
onBack: _ctx.goBack,
|
|
337
|
-
|
|
338
|
-
}, null, 8, ["id", "
|
|
331
|
+
onChangeDefVersion: workflowDefVersionChange
|
|
332
|
+
}, null, 8, ["id", "code", "version", "system-code", "system-publish-version", "onBack"])), [
|
|
339
333
|
[vShow, clickType.value === "workflow"]
|
|
340
334
|
]) : createCommentVNode("", true),
|
|
341
335
|
withDirectives(createVNode(unref(ServiceFlowDesginer), { pageContext: pageDesign.value }, null, 8, ["pageContext"]), [
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, openBlock, createElementBlock, normalizeStyle, createBlock, resolveDynamicComponent } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../assemblys/page/page-attr.vue.js";
|
|
3
3
|
import _sfc_main$2 from "../../assemblys/error-attr.vue.js";
|
|
4
|
-
import { getAttrComponentByName } from "../../../utils/assemblys-config.js";
|
|
4
|
+
import { getAttrComponentByName, getComponentEventOptions } from "../../../utils/assemblys-config.js";
|
|
5
|
+
import { deepCopy } from "../../../utils/common-util.js";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "attr-container",
|
|
7
8
|
props: {
|
|
@@ -37,6 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
dynamicConfigure.value = props.pageInfo;
|
|
38
39
|
dynamicComponent.value = _sfc_main$1;
|
|
39
40
|
} else {
|
|
41
|
+
updateConfEvents(configure);
|
|
40
42
|
dynamicConfigure.value = configure;
|
|
41
43
|
let newComponent = cacheComponent[configure.name];
|
|
42
44
|
if (newComponent == null) {
|
|
@@ -53,6 +55,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
55
|
dynamicConfigure.value = configure;
|
|
54
56
|
dynamicComponent.value = component;
|
|
55
57
|
}
|
|
58
|
+
function updateConfEvents(configure) {
|
|
59
|
+
if (!configure || !configure.name || !configure.events) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const allEvents = getComponentEventOptions(configure.name);
|
|
63
|
+
if (!allEvents) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const hisMaps = {};
|
|
67
|
+
for (let e of configure.events) {
|
|
68
|
+
hisMaps[e.name] = e;
|
|
69
|
+
}
|
|
70
|
+
for (let e of allEvents) {
|
|
71
|
+
if (hisMaps[e.name]) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const newEvent = deepCopy(e);
|
|
75
|
+
configure.events.push(newEvent);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
56
78
|
__expose({
|
|
57
79
|
changeAssembly,
|
|
58
80
|
changeAssemblyByComponent
|