cloud-web-corejs 1.0.284 → 1.0.285
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/package.json +1 -1
- package/src/components/VabUpload/mixins.js +126 -19
- package/src/components/VabUpload/view.vue +248 -209
- package/src/components/mobile/wf/addTaskUserdialog.vue +100 -80
- package/src/components/mobile/wf/content.vue +1705 -1556
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +73 -54
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- package/src/components/mobile/wf/selectUserDialog.vue +118 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +69 -48
- package/src/components/mobile/wf/urgingDialog.vue +75 -52
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
- package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
- package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
- package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
- package/src/components/xform/form-designer/designer.js +5 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +243 -227
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +228 -207
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +165 -136
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +2 -3
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +3 -3
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +2 -3
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +39 -1
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
- package/src/components/xform/form-designer/indexMixin.js +35 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +10 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +6 -1
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +13 -0
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +22 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +57 -3
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
- package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1917 -1700
- package/src/components/xform/form-render/index.vue +7 -1
- package/src/components/xform/form-render/indexMixin.js +42 -4
- package/src/components/xform/lang/en-US.js +10 -0
- package/src/components/xform/lang/zh-CN.js +10 -0
- package/src/components/xform/styles/h5.scss +2305 -0
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +4 -0
- package/src/views/bd/setting/form_template/edit.vue +25 -3
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +1 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +64 -0
- package/src/views/bd/setting/form_template/mixins/list.js +27 -0
- package/src/views/user/form/vform/designer.vue +3 -1
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
|
@@ -1,136 +1,165 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
|
|
3
|
-
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
|
4
|
-
<div class="grid-container" :key="widget.id"
|
|
5
|
-
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
height:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
|
|
3
|
+
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
|
4
|
+
<div class="grid-container" :key="widget.id"
|
|
5
|
+
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
|
6
|
+
<!-- 常驻选中把手(设计器专用)。h5卡片自己的可点区域会被它的卡片选项卡整块铺满
|
|
7
|
+
—— 拖入「H5详情」时默认就带三个(基础信息/明细信息/附件信息,见 designer.js
|
|
8
|
+
的 detail-h5 分支),一落地就点不中,只能「先选中里面的选项卡、再点返回上级」
|
|
9
|
+
才能打开它的属性面板,而增删/改名/排序选项卡都在那个面板里。
|
|
10
|
+
container-wrapper 的 drag-handler 帮不上忙:它只在**已经选中之后**才出现。
|
|
11
|
+
运行期走 h5-card-item,不含本文件,故只影响设计器画布。 -->
|
|
12
|
+
<div class="h5-card-handler" @click.stop="selectWidget(widget)">
|
|
13
|
+
{{ i18n2t(`designer.widgetLabel.${widget.type}`, `extension.widgetLabel.${widget.type}`) }}
|
|
14
|
+
</div>
|
|
15
|
+
<h5CardPaneWidget v-for="(paneWidget, index) in widget.panes" :key="index" :widget="paneWidget"
|
|
16
|
+
:designer="designer" :parent-list="widget.panes"
|
|
17
|
+
:index-of-parent-list="index" :parent-widget="widget"
|
|
18
|
+
:col-height="widget.options.colHeight" tabRef="baseTabRef"
|
|
19
|
+
:tabPaneGrade="2"></h5CardPaneWidget>
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
</container-wrapper>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
|
|
26
|
+
import h5CardPaneWidget from "../../../../../components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue";
|
|
27
|
+
import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper.vue";
|
|
28
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
29
|
+
import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin";
|
|
30
|
+
import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: "h5-card-widget",
|
|
34
|
+
componentName: 'ContainerWidget',
|
|
35
|
+
mixins: [i18n, containerMixin, refMixinDesign],
|
|
36
|
+
inject: ['refList'],
|
|
37
|
+
components: {ContainerWrapper, h5CardPaneWidget},
|
|
38
|
+
props: {
|
|
39
|
+
widget: Object,
|
|
40
|
+
parentWidget: Object,
|
|
41
|
+
parentList: Array,
|
|
42
|
+
indexOfParentList: Number,
|
|
43
|
+
designer: Object,
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
selected() {
|
|
47
|
+
return this.widget.id === this.designer.selectedId
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
customClass() {
|
|
51
|
+
return this.widget.options.customClass || ''
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
//
|
|
57
|
+
},
|
|
58
|
+
created() {
|
|
59
|
+
this.initRefList()
|
|
60
|
+
},
|
|
61
|
+
mounted() {
|
|
62
|
+
//
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
checkContainerMove(evt) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.grid-container {
|
|
73
|
+
min-height: 50px;
|
|
74
|
+
//line-height: 48px;
|
|
75
|
+
/* 侧边与底部留一圈属于卡片自己的可点区域,和顶上的把手一起圈出它的边界 */
|
|
76
|
+
padding: 0 6px 6px;
|
|
77
|
+
outline: 1px dashed #336699;
|
|
78
|
+
|
|
79
|
+
> div {
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.form-widget-list {
|
|
84
|
+
// min-height: 28px;
|
|
85
|
+
height: 100%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.grid-container.selected, .grid-cell.selected {
|
|
91
|
+
outline: 2px solid $--color-primary !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* 把手条。★ 必须显式给高度:上面那条 `.grid-container > div{height:100%}` (0,1,1)
|
|
95
|
+
会把所有直接子元素拉满,本条 (0,2,0) 压得过。
|
|
96
|
+
负的左右外边距把它顶回容器的 6px 内边距之外,与虚线框贴齐。 */
|
|
97
|
+
.grid-container > .h5-card-handler {
|
|
98
|
+
height: 20px;
|
|
99
|
+
line-height: 20px;
|
|
100
|
+
margin: 0 -6px 6px;
|
|
101
|
+
padding: 0 6px;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
color: $--color-primary;
|
|
104
|
+
background: transparentize($--color-primary, 0.88);
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.grid-container.selected > .h5-card-handler {
|
|
109
|
+
color: #fff;
|
|
110
|
+
background: $--color-primary;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.grid-cell {
|
|
114
|
+
min-height: 38px;
|
|
115
|
+
//margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
|
|
116
|
+
padding: 3px;
|
|
117
|
+
outline: 1px dashed #336699;
|
|
118
|
+
position: relative;
|
|
119
|
+
|
|
120
|
+
> div {
|
|
121
|
+
height: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.form-widget-list {
|
|
125
|
+
min-height: 50px;
|
|
126
|
+
height: 100%
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.grid-col-action {
|
|
130
|
+
position: absolute;
|
|
131
|
+
bottom: 0;
|
|
132
|
+
right: -2px;
|
|
133
|
+
height: 28px;
|
|
134
|
+
line-height: 28px;
|
|
135
|
+
background: $--color-primary;
|
|
136
|
+
z-index: 999;
|
|
137
|
+
|
|
138
|
+
i {
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
color: #fff;
|
|
141
|
+
margin: 0 5px;
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.grid-col-handler {
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: -2px;
|
|
149
|
+
left: -2px;
|
|
150
|
+
height: 22px;
|
|
151
|
+
line-height: 22px;
|
|
152
|
+
background: $--color-primary;
|
|
153
|
+
z-index: 9;
|
|
154
|
+
|
|
155
|
+
i {
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
font-style: normal;
|
|
158
|
+
color: #fff;
|
|
159
|
+
margin: 4px;
|
|
160
|
+
cursor: default;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
</style>
|
|
@@ -274,9 +274,8 @@ export default {
|
|
|
274
274
|
</script>
|
|
275
275
|
|
|
276
276
|
<style lang="scss" scoped>
|
|
277
|
-
::v-deep .H5 .h5-fixed-bottom-btns
|
|
278
|
-
|
|
279
|
-
}
|
|
277
|
+
/* 原 ::v-deep .H5 .h5-fixed-bottom-btns{bottom:95px} 已删:本文件从未把 H5 类
|
|
278
|
+
绑到任何元素上,该选择器从来没生效过。H5 底栏已改为流内布局。 */
|
|
280
279
|
|
|
281
280
|
.list-dialog {
|
|
282
281
|
.el-dialog__body {
|
|
@@ -316,9 +316,9 @@ export default {
|
|
|
316
316
|
</script>
|
|
317
317
|
|
|
318
318
|
<style lang="scss" scoped>
|
|
319
|
-
::v-deep .H5 .h5-fixed-bottom-btns
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
/* 原 ::v-deep .H5 .h5-fixed-bottom-btns{bottom:95px} 已删:本文件从未把 H5 类
|
|
320
|
+
绑到任何元素上(layoutType 只存在 data 里),该选择器从来没生效过。
|
|
321
|
+
H5 底栏已改为流内布局(styles/h5.scss 块 G),自然贴弹框底部,无需此补丁。 */
|
|
322
322
|
|
|
323
323
|
.list-dialog {
|
|
324
324
|
.el-dialog__body {
|
|
@@ -485,9 +485,8 @@ export default {
|
|
|
485
485
|
</script>
|
|
486
486
|
|
|
487
487
|
<style scoped lang="scss">
|
|
488
|
-
::v-deep .H5 .h5-fixed-bottom-btns
|
|
489
|
-
|
|
490
|
-
}
|
|
488
|
+
/* 原 ::v-deep .H5 .h5-fixed-bottom-btns{bottom:95px} 已删:本文件从未把 H5 类
|
|
489
|
+
绑到任何元素上,该选择器从来没生效过。H5 底栏已改为流内布局。 */
|
|
491
490
|
::v-deep .tree-container {
|
|
492
491
|
height: 100%;
|
|
493
492
|
.tree-box {
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
<template>
|
|
12
12
|
<div
|
|
13
13
|
class="field-wrapper"
|
|
14
|
-
:class="
|
|
14
|
+
:class="[
|
|
15
|
+
{ 'design-time-bottom-margin': !!this.designer },
|
|
16
|
+
isH5Field ? 'h5-field' : '',
|
|
17
|
+
field.options.h5Span === 'half' ? 'h5-half' : '',
|
|
18
|
+
isH5BlockField ? 'h5-block' : '',
|
|
19
|
+
]"
|
|
15
20
|
v-show="!field.options.hidden || designState === true"
|
|
16
21
|
>
|
|
17
22
|
<div>
|
|
@@ -258,6 +263,18 @@ import {
|
|
|
258
263
|
resolveTextMaskFlag,
|
|
259
264
|
} from "../../../../../components/xform/utils/textMaskUtil";
|
|
260
265
|
|
|
266
|
+
/* H5 版式下独占整行、左对齐的「宽内容」字段(见 isH5BlockField) */
|
|
267
|
+
const H5_BLOCK_FIELD_TYPES = [
|
|
268
|
+
"vabUpload",
|
|
269
|
+
"vabUpload2",
|
|
270
|
+
"baseAttachment",
|
|
271
|
+
"singleUpload",
|
|
272
|
+
"picture-upload",
|
|
273
|
+
"file-upload",
|
|
274
|
+
"rich-editor",
|
|
275
|
+
"html-text",
|
|
276
|
+
];
|
|
277
|
+
|
|
261
278
|
export default {
|
|
262
279
|
name: "form-item-wrapper",
|
|
263
280
|
mixins: [i18n],
|
|
@@ -362,6 +379,27 @@ export default {
|
|
|
362
379
|
: "";
|
|
363
380
|
},
|
|
364
381
|
|
|
382
|
+
isH5BlockField() {
|
|
383
|
+
return H5_BLOCK_FIELD_TYPES.indexOf(this.field.type) > -1;
|
|
384
|
+
},
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* H5 版式的字段行锚点。整套 H5 行版式(styles/h5.scss 块 C/C1/C2/C3/D/E)都挂在
|
|
388
|
+
* .field-wrapper.h5-field 上,与容器解耦。
|
|
389
|
+
*
|
|
390
|
+
* 原先锚在 `.h5-detail-wrap .h5-item .h5-form-box`,而 `.h5-item` 只有
|
|
391
|
+
* h5-card-pane 会吐(h5-card-pane-item.vue),h5-card 吐的是 `.grid-cell`,
|
|
392
|
+
* 字段/表格直挂 detail-h5.panes 时(设计器的 draggable 是单一 dragGroup,
|
|
393
|
+
* 任何容器都能拖进去)连 `.h5-form-box` 都没有 —— 这些摆法下整套行版式会
|
|
394
|
+
* 静默落空,表现为「标签右对齐、值左对齐」(element 默认),与卡片内的
|
|
395
|
+
* 「标签左、值右」对不上。
|
|
396
|
+
*
|
|
397
|
+
* PC 版式不打这个类,故 PC 表单零影响。
|
|
398
|
+
*/
|
|
399
|
+
isH5Field() {
|
|
400
|
+
return this.formConfig?.layoutType === "H5";
|
|
401
|
+
},
|
|
402
|
+
|
|
365
403
|
subFormName() {
|
|
366
404
|
return !!this.parentWidget ? this.parentWidget.options.name : "";
|
|
367
405
|
},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:multi="field.options.limit!==1"
|
|
16
16
|
:limit="field.options.limit"
|
|
17
17
|
resultType="Array"
|
|
18
|
-
:edit="!field.options.disabled"
|
|
18
|
+
:edit="!field.options.disabled && !isReadMode"
|
|
19
19
|
@callback="submitFile"
|
|
20
20
|
:hideInfo="field.options.hideFileInfo"
|
|
21
21
|
:hideName="field.options.hideFileName"
|
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
:file.sync="fieldModel"
|
|
27
27
|
:hidePasteArea.sync="isH5"
|
|
28
28
|
:uploadDialogCustomClass="isH5 ? 'dialog-upload-h5' : null"
|
|
29
|
+
:h5Preview="isH5"
|
|
29
30
|
:pickPrivateProfile="false"
|
|
30
31
|
:multi="field.options.limit !== 1"
|
|
31
32
|
:limit="field.options.limit"
|
|
32
33
|
:fileTypes="field.options.fileTypes || []"
|
|
33
34
|
resultType="Array"
|
|
34
|
-
:edit="!field.options.disabled"
|
|
35
|
-
:remove="!field.options.hideRemoveButton"
|
|
35
|
+
:edit="!field.options.disabled && !isReadMode"
|
|
36
|
+
:remove="!field.options.hideRemoveButton && !isReadMode"
|
|
36
37
|
@callback="submitFile"
|
|
37
38
|
:hideInfo="field.options.hideFileInfo"
|
|
38
39
|
:hideName="field.options.hideFileName"
|
|
@@ -93,6 +93,8 @@ modules = {
|
|
|
93
93
|
readonly: Boolean,
|
|
94
94
|
columnFlag: Boolean,
|
|
95
95
|
sourceData: Object,
|
|
96
|
+
/* 进入设计器时的布局模式(模板自带 layoutType 时不覆盖);传入即锁定,工具栏不允许再切换 */
|
|
97
|
+
defaultLayoutType: { type: String, default: "" },
|
|
96
98
|
},
|
|
97
99
|
data() {
|
|
98
100
|
return {
|
|
@@ -147,6 +149,8 @@ modules = {
|
|
|
147
149
|
serverFieldList: this.fieldList,
|
|
148
150
|
getServerSubFormList: () => this.subFormList,
|
|
149
151
|
getDesignerConfig: () => this.designerConfig,
|
|
152
|
+
/* 由表单模板等入口指定布局模式时,布局类型由模板类型决定,设计器内不可切换 */
|
|
153
|
+
getLayoutTypeLocked: () => !!this.defaultLayoutType,
|
|
150
154
|
getBannedWidgets: () => this.bannedWidgets,
|
|
151
155
|
saveReportTemplate: this.saveReportTemplate,
|
|
152
156
|
getReportTemplate: () => this.reportTemplate,
|
|
@@ -345,23 +349,51 @@ modules = {
|
|
|
345
349
|
baseRefUtil.changeLocale(langName);
|
|
346
350
|
},
|
|
347
351
|
|
|
352
|
+
/**
|
|
353
|
+
* 应用入口指定的布局模式:模板 JSON 自带 layoutType 时以模板为准,不覆盖
|
|
354
|
+
*/
|
|
355
|
+
applyDefaultLayoutType(loadedFormJson) {
|
|
356
|
+
if (!this.defaultLayoutType) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
if (loadedFormJson && loadedFormJson.formConfig?.layoutType) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
this.designer.changeLayoutType(this.defaultLayoutType);
|
|
363
|
+
},
|
|
364
|
+
|
|
348
365
|
setFormJson(formJson) {
|
|
349
366
|
let modifiedFlag = false;
|
|
367
|
+
let loadedFormJson = null;
|
|
350
368
|
if (!!formJson) {
|
|
351
369
|
if (typeof formJson === "string") {
|
|
352
370
|
let newFormJson = JSON.parse(formJson);
|
|
353
371
|
this.upgradeFormJson(newFormJson);
|
|
372
|
+
loadedFormJson = newFormJson;
|
|
354
373
|
modifiedFlag = this.designer.loadFormJson(newFormJson);
|
|
355
374
|
} else if (formJson.constructor === Object) {
|
|
356
375
|
this.upgradeFormJson(formJson);
|
|
376
|
+
loadedFormJson = formJson;
|
|
357
377
|
modifiedFlag = this.designer.loadFormJson(formJson);
|
|
358
378
|
}
|
|
359
379
|
|
|
360
380
|
if (modifiedFlag) {
|
|
361
381
|
this.designer.emitHistoryChange();
|
|
362
382
|
}
|
|
383
|
+
|
|
384
|
+
this.applyDefaultLayoutType(loadedFormJson);
|
|
385
|
+
/* 模板 JSON 里的 layoutType 此刻才写入;左侧面板 mounted 时仍是默认 PC,
|
|
386
|
+
必须再筛一次,否则进入 H5 模板时仍展示 PC 容器(data-table/detail 等) */
|
|
387
|
+
this.$nextTick(() => {
|
|
388
|
+
this.loadWidgets();
|
|
389
|
+
});
|
|
363
390
|
} else {
|
|
391
|
+
/* 新建模板 formViewContent 为空会走这里,同样要落入口默认布局 */
|
|
364
392
|
this.clearDesigner();
|
|
393
|
+
this.applyDefaultLayoutType(null);
|
|
394
|
+
this.$nextTick(() => {
|
|
395
|
+
this.loadWidgets();
|
|
396
|
+
});
|
|
365
397
|
}
|
|
366
398
|
},
|
|
367
399
|
|
|
@@ -826,7 +858,9 @@ modules = {
|
|
|
826
858
|
});
|
|
827
859
|
},
|
|
828
860
|
loadWidgets() {
|
|
829
|
-
this.$refs.widgetPanelRef
|
|
861
|
+
if (this.$refs.widgetPanelRef) {
|
|
862
|
+
this.$refs.widgetPanelRef.loadWidgets();
|
|
863
|
+
}
|
|
830
864
|
},
|
|
831
865
|
getBdEnv() {
|
|
832
866
|
getBdFlag({
|
|
@@ -59,11 +59,10 @@
|
|
|
59
59
|
<el-input v-model="scope.row.prop"></el-input>
|
|
60
60
|
</template>
|
|
61
61
|
</el-table-column>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</el-table-column>
|
|
62
|
+
<!-- 「列宽」已移除:H5 明细卡片是 dl/dt/dd 排版,不读列宽 —— 它当年是从数据表格
|
|
63
|
+
那套列配置沿用过来的,运行期只被塞进一个拼错的键(witdh)、无人读取。
|
|
64
|
+
列在卡片里占整行还是半行,由下面的「H5列宽」控制。
|
|
65
|
+
存量模板里残留的 width 值不用清,读不到就是了。 -->
|
|
67
66
|
<el-table-column :label="i18nt('designer.setting.visibleColumn')" width="70" prop="show">
|
|
68
67
|
<template slot-scope="scope">
|
|
69
68
|
<el-switch v-model="scope.row.show"></el-switch>
|
|
@@ -79,6 +78,21 @@
|
|
|
79
78
|
<el-switch v-model="scope.row.showForRow"></el-switch>
|
|
80
79
|
</template>
|
|
81
80
|
</el-table-column>
|
|
81
|
+
<!-- H5 明细卡片里这个字段占整行还是半行(半行=一行两个)。
|
|
82
|
+
不配即整行,运行期判等只认 'half'(存量列读到 undefined 就是整行),
|
|
83
|
+
不能写成 !== 'full'。样式见 xform/styles/h5.scss 块 I2。
|
|
84
|
+
★ 用 :value + $set 而不是 v-model:h5Span 是后加的键,存量列上没有,
|
|
85
|
+
Vue 2 只给赋值那一刻已存在的属性装 getter/setter,直接 v-model
|
|
86
|
+
新增属性追踪不到,选完不回显。 -->
|
|
87
|
+
<el-table-column label="H5列宽" width="110" prop="h5Span">
|
|
88
|
+
<template slot-scope="scope">
|
|
89
|
+
<el-select :value="scope.row.h5Span" clearable placeholder="整行"
|
|
90
|
+
@input="v => $set(scope.row, 'h5Span', v)">
|
|
91
|
+
<el-option value="full" label="整行"></el-option>
|
|
92
|
+
<el-option value="half" label="半行(一行两个)"></el-option>
|
|
93
|
+
</el-select>
|
|
94
|
+
</template>
|
|
95
|
+
</el-table-column>
|
|
82
96
|
<el-table-column :label="i18nt('designer.setting.formatOfColumn')" width="200" prop="formatS">
|
|
83
97
|
<template slot-scope="scope">
|
|
84
98
|
<el-select v-model="scope.row.formatS" @change="changeFormatS(scope.row)" clearable>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 仅 H5 版式下显示:该选项在 PC/Pad 版式没有任何作用 -->
|
|
3
|
+
<el-form-item
|
|
4
|
+
v-if="showEditor"
|
|
5
|
+
:label="i18nt('designer.setting.h5Span')"
|
|
6
|
+
class="form-item-label-top"
|
|
7
|
+
>
|
|
8
|
+
<el-tooltip
|
|
9
|
+
:enterable="false"
|
|
10
|
+
effect="dark"
|
|
11
|
+
:content="i18nt('designer.setting.h5SpanHelp')"
|
|
12
|
+
placement="top"
|
|
13
|
+
popper-class="tooltip-skin"
|
|
14
|
+
>
|
|
15
|
+
<el-radio-group v-model="optionModel.h5Span" size="mini">
|
|
16
|
+
<el-radio-button label="full">
|
|
17
|
+
{{ i18nt("designer.setting.h5SpanFull") }}
|
|
18
|
+
</el-radio-button>
|
|
19
|
+
<el-radio-button label="half">
|
|
20
|
+
{{ i18nt("designer.setting.h5SpanHalf") }}
|
|
21
|
+
</el-radio-button>
|
|
22
|
+
</el-radio-group>
|
|
23
|
+
</el-tooltip>
|
|
24
|
+
</el-form-item>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: "h5Span-editor",
|
|
32
|
+
mixins: [i18n],
|
|
33
|
+
props: {
|
|
34
|
+
designer: Object,
|
|
35
|
+
selectedWidget: Object,
|
|
36
|
+
optionModel: Object,
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
showEditor() {
|
|
40
|
+
let formConfig = this.designer && this.designer.formConfig;
|
|
41
|
+
return !!formConfig && formConfig.layoutType === "H5";
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
// 注意:不要在 created 里给老表单自动回填 "full"。
|
|
45
|
+
// upgradeWidgetConfig 给老表单补新增 option 时补的是 null(不是默认值),
|
|
46
|
+
// 此时两个 radio 都不选中是可接受表现(等价整宽);自动回填会把所有老表单
|
|
47
|
+
// 标记成已修改。详见 docs/2026-08 xform H5 P0 实现规格.md §3.2 / §3.4。
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style scoped></style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item
|
|
3
|
+
:label="i18nt('designer.setting.itemStyle')"
|
|
4
|
+
class="form-item-label-top"
|
|
5
|
+
>
|
|
6
|
+
<el-tooltip
|
|
7
|
+
:enterable="false"
|
|
8
|
+
effect="dark"
|
|
9
|
+
:content="i18nt('designer.setting.itemStyleHelp')"
|
|
10
|
+
placement="top"
|
|
11
|
+
popper-class="tooltip-skin"
|
|
12
|
+
>
|
|
13
|
+
<el-radio-group v-model="optionModel.itemStyle" size="mini">
|
|
14
|
+
<el-radio-button label="plain">
|
|
15
|
+
{{ i18nt("designer.setting.itemStylePlain") }}
|
|
16
|
+
</el-radio-button>
|
|
17
|
+
<el-radio-button label="card">
|
|
18
|
+
{{ i18nt("designer.setting.itemStyleCard") }}
|
|
19
|
+
</el-radio-button>
|
|
20
|
+
</el-radio-group>
|
|
21
|
+
</el-tooltip>
|
|
22
|
+
</el-form-item>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: "itemStyle-editor",
|
|
30
|
+
mixins: [i18n],
|
|
31
|
+
props: {
|
|
32
|
+
designer: Object,
|
|
33
|
+
selectedWidget: Object,
|
|
34
|
+
optionModel: Object,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style scoped></style>
|