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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**version-1.0*/
|
|
2
|
+
/**
|
|
3
|
+
* v-append-to-body —— 把元素搬到 document.body 下,脱离宿主子树。
|
|
4
|
+
*
|
|
5
|
+
* 用途:那些视觉上是全屏浮层、但写死在业务模板里的 div(如移动版流程的
|
|
6
|
+
* 通过/驳回/中断/转办/加签确认框)。它们靠 `position:fixed` 定位,一旦祖先出现
|
|
7
|
+
* transform / filter / display:none 就会失效或被裁掉。搬到 body 下即可根治,
|
|
8
|
+
* 且不必把它们改造成 el-dialog(造型差太远,改了样式量不减反增)。
|
|
9
|
+
*
|
|
10
|
+
* ★ 必须配 v-show 用,不能配 v-if。
|
|
11
|
+
* Vue 2 的 patch 在插入节点时要拿兄弟节点当参照物:
|
|
12
|
+
* function insert (parent, elm, ref) {
|
|
13
|
+
* if (isDef(ref)) { if (nodeOps.parentNode(ref) === parent) { ... } }
|
|
14
|
+
* }
|
|
15
|
+
* 本指令把节点搬走后,它的 parentNode 变成了 body、不再等于宿主元素,于是
|
|
16
|
+
* 以它为参照物的那次插入会被这个判断**静默跳过**(不报错,但节点没插进去),
|
|
17
|
+
* 兄弟节点的顺序随之错乱。v-show 不产生插入/移除,节点从头到尾只搬一次,
|
|
18
|
+
* 没有这个问题 —— element-ui 自己的 append-to-body 弹框也是用 v-show,
|
|
19
|
+
* 不是 v-if,同一个原因。
|
|
20
|
+
*
|
|
21
|
+
* ★ 元素上原有的 `display` 内联值要保留。
|
|
22
|
+
* v-show 记的 originalDisplay 取自 `el.style.display`;如果元素本身靠内联
|
|
23
|
+
* `style="display: block;"` 顶掉某条 `.xxx{display:none}` 的全局规则,把内联值
|
|
24
|
+
* 删了会让「显示」态退回 display:none,表现为点了没反应。
|
|
25
|
+
*/
|
|
26
|
+
let modules = {};
|
|
27
|
+
|
|
28
|
+
modules = {
|
|
29
|
+
install: function (Vue) {
|
|
30
|
+
Vue.directive("append-to-body", {
|
|
31
|
+
inserted(el) {
|
|
32
|
+
if (el.parentNode !== document.body) {
|
|
33
|
+
document.body.appendChild(el);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
unbind(el) {
|
|
37
|
+
// 配 v-show 时切换显隐不会走到这里,只有宿主组件销毁才会。
|
|
38
|
+
// 那时节点在 body 下、已不在宿主子树里,宿主自身的 DOM 移除够不着它——
|
|
39
|
+
// 不在这里摘掉就会永久留在 body 上(每进出一次详情页泄漏一份)。
|
|
40
|
+
if (el.parentNode) {
|
|
41
|
+
el.parentNode.removeChild(el);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default modules;
|
package/src/index.js
CHANGED
|
@@ -167,6 +167,10 @@ import elReadonly from "@base/directive/el-readonly/index.js";
|
|
|
167
167
|
|
|
168
168
|
Vue.use(elReadonly);
|
|
169
169
|
|
|
170
|
+
import appendToBody from "@base/directive/append-to-body/index.js";
|
|
171
|
+
|
|
172
|
+
Vue.use(appendToBody.install);
|
|
173
|
+
|
|
170
174
|
/*import cnPrint from "@base/components/cnPrint/index.js"
|
|
171
175
|
|
|
172
176
|
Vue.use(cnPrint);*/
|
|
@@ -91,20 +91,42 @@
|
|
|
91
91
|
</el-form-item>
|
|
92
92
|
</td>
|
|
93
93
|
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<th>
|
|
96
|
+
<em class="f-red" v-if="!formTemplate.id">*</em>
|
|
97
|
+
{{ $t1("模板类型") }}
|
|
98
|
+
</th>
|
|
99
|
+
<td colspan="3">
|
|
100
|
+
<el-radio-group
|
|
101
|
+
v-model="templateType"
|
|
102
|
+
v-if="!formTemplate.id"
|
|
103
|
+
>
|
|
104
|
+
<el-radio label="PC">{{ $t1("PC端") }}</el-radio>
|
|
105
|
+
<el-radio label="H5">{{ $t1("移动端") }}</el-radio>
|
|
106
|
+
</el-radio-group>
|
|
107
|
+
<template v-else>
|
|
108
|
+
{{ templateTypeText }}
|
|
109
|
+
</template>
|
|
110
|
+
</td>
|
|
111
|
+
</tr>
|
|
94
112
|
<tr>
|
|
95
113
|
<th>{{ $t1("模板编码") }}</th>
|
|
96
114
|
<td colspan="3">
|
|
97
115
|
<el-form-item
|
|
98
116
|
prop="formCode"
|
|
99
|
-
:rules="
|
|
117
|
+
:rules="formCodeRules"
|
|
100
118
|
v-if="!formTemplate.id"
|
|
101
119
|
>
|
|
102
120
|
<el-input
|
|
103
121
|
type="text"
|
|
104
122
|
autocomplete="off"
|
|
105
|
-
v-model="
|
|
123
|
+
v-model="formCodeInput"
|
|
106
124
|
clearable
|
|
107
|
-
|
|
125
|
+
>
|
|
126
|
+
<template #prepend v-if="isH5Template">
|
|
127
|
+
{{ h5FormCodePrefix }}
|
|
128
|
+
</template>
|
|
129
|
+
</el-input>
|
|
108
130
|
</el-form-item>
|
|
109
131
|
<template v-else>
|
|
110
132
|
{{ formTemplate.formCode }}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
:sourceData="sourceData"
|
|
27
27
|
:formTemplate="formTemplate"
|
|
28
28
|
:jsonFlag="jsonFlag"
|
|
29
|
+
:defaultLayoutType="defaultLayoutType"
|
|
29
30
|
></designer>
|
|
30
31
|
</el-tab-pane>
|
|
31
32
|
<el-tab-pane :label="$t1('后端脚本')" name="second" v-if="showFormScript">
|
|
@@ -87,6 +88,11 @@ export default {
|
|
|
87
88
|
widgetList: Array,
|
|
88
89
|
columnFlag: Boolean,
|
|
89
90
|
sourceData: Object,
|
|
91
|
+
/* 进入设计器时的默认布局模式(临时模式,不写死模板) */
|
|
92
|
+
defaultLayoutType: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: "",
|
|
95
|
+
},
|
|
90
96
|
},
|
|
91
97
|
components: {
|
|
92
98
|
designer: () => import("@base/views/user/form/vform/designer.vue"),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表单模板「模板类型」(PC端 / 移动端)
|
|
3
|
+
*
|
|
4
|
+
* 模板类型不是数据库字段,只在新增时维护:选择移动端后模板编码固定加前缀 h5_,
|
|
5
|
+
* 之后一律由 formCode 前缀反推类型,列表展示、编辑态回显、设计器默认布局共用此处。
|
|
6
|
+
*/
|
|
7
|
+
export const H5_FORM_CODE_PREFIX = "h5_";
|
|
8
|
+
|
|
9
|
+
export const TEMPLATE_TYPE_PC = "PC";
|
|
10
|
+
export const TEMPLATE_TYPE_H5 = "H5";
|
|
11
|
+
|
|
12
|
+
/** 模板编码是否为移动端模板 */
|
|
13
|
+
export function isH5FormTemplate(formCode) {
|
|
14
|
+
return (
|
|
15
|
+
typeof formCode === "string" && formCode.indexOf(H5_FORM_CODE_PREFIX) === 0
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** 去掉移动端前缀,返回编码主体 */
|
|
20
|
+
export function stripH5Prefix(formCode) {
|
|
21
|
+
if (!isH5FormTemplate(formCode)) {
|
|
22
|
+
return formCode || "";
|
|
23
|
+
}
|
|
24
|
+
return formCode.slice(H5_FORM_CODE_PREFIX.length);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** 按模板类型给编码补/去前缀,重复调用不会叠加前缀 */
|
|
28
|
+
export function applyTemplateTypeToFormCode(formCode, templateType) {
|
|
29
|
+
let code = stripH5Prefix(formCode);
|
|
30
|
+
return templateType === TEMPLATE_TYPE_H5 ? H5_FORM_CODE_PREFIX + code : code;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 由模板编码推导模板类型 */
|
|
34
|
+
export function getTemplateTypeByFormCode(formCode) {
|
|
35
|
+
return isH5FormTemplate(formCode) ? TEMPLATE_TYPE_H5 : TEMPLATE_TYPE_PC;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 进入设计器时的布局模式:由模板类型决定,进入后不允许在工具栏切换
|
|
40
|
+
*/
|
|
41
|
+
export function getDesignerLayoutType(formCode) {
|
|
42
|
+
return isH5FormTemplate(formCode) ? "H5" : "PC";
|
|
43
|
+
}
|
|
@@ -4,6 +4,14 @@ import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vu
|
|
|
4
4
|
import formOplogTable from "@base/components/formOplog/index.vue";
|
|
5
5
|
import { getBdFlag } from "@base/api/user";
|
|
6
6
|
import otherAuthDialog from "../otherAuthDialog.vue";
|
|
7
|
+
import {
|
|
8
|
+
H5_FORM_CODE_PREFIX,
|
|
9
|
+
TEMPLATE_TYPE_PC,
|
|
10
|
+
applyTemplateTypeToFormCode,
|
|
11
|
+
getTemplateTypeByFormCode,
|
|
12
|
+
isH5FormTemplate,
|
|
13
|
+
stripH5Prefix,
|
|
14
|
+
} from "../formTemplateType.js";
|
|
7
15
|
|
|
8
16
|
let modules = {};
|
|
9
17
|
modules = {
|
|
@@ -33,6 +41,8 @@ modules = {
|
|
|
33
41
|
data() {
|
|
34
42
|
return {
|
|
35
43
|
isEdit: false,
|
|
44
|
+
/* 模板类型不是数据库字段,只在新增时维护,不能挂到 formTemplate 上(保存会整体提交) */
|
|
45
|
+
templateType: TEMPLATE_TYPE_PC,
|
|
36
46
|
tabIndex: "first",
|
|
37
47
|
dataId: "",
|
|
38
48
|
formTemplate: {
|
|
@@ -71,6 +81,58 @@ modules = {
|
|
|
71
81
|
isCompare: false,
|
|
72
82
|
};
|
|
73
83
|
},
|
|
84
|
+
computed: {
|
|
85
|
+
h5FormCodePrefix() {
|
|
86
|
+
return H5_FORM_CODE_PREFIX;
|
|
87
|
+
},
|
|
88
|
+
isH5Template() {
|
|
89
|
+
return isH5FormTemplate(this.formTemplate.formCode);
|
|
90
|
+
},
|
|
91
|
+
templateTypeText() {
|
|
92
|
+
return this.isH5Template ? this.$t1("移动端") : this.$t1("PC端");
|
|
93
|
+
},
|
|
94
|
+
/* 移动端模板编码带固定前缀,输入框里只让用户维护前缀之后的部分 */
|
|
95
|
+
formCodeInput: {
|
|
96
|
+
get() {
|
|
97
|
+
return stripH5Prefix(this.formTemplate.formCode);
|
|
98
|
+
},
|
|
99
|
+
set(val) {
|
|
100
|
+
this.$set(
|
|
101
|
+
this.formTemplate,
|
|
102
|
+
"formCode",
|
|
103
|
+
applyTemplateTypeToFormCode(val, this.templateType)
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
formCodeRules() {
|
|
108
|
+
return [
|
|
109
|
+
{
|
|
110
|
+
required: true,
|
|
111
|
+
trigger: "blur",
|
|
112
|
+
validator: (rule, value, callback) => {
|
|
113
|
+
/* 带前缀时 value 恒非空,必须校验前缀之后的主体 */
|
|
114
|
+
if (!stripH5Prefix(value)) {
|
|
115
|
+
callback(new Error(this.$t1("模板编码不能为空")));
|
|
116
|
+
} else {
|
|
117
|
+
callback();
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
watch: {
|
|
125
|
+
templateType(val) {
|
|
126
|
+
if (this.formTemplate.id) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
this.$set(
|
|
130
|
+
this.formTemplate,
|
|
131
|
+
"formCode",
|
|
132
|
+
applyTemplateTypeToFormCode(this.formTemplate.formCode, val)
|
|
133
|
+
);
|
|
134
|
+
},
|
|
135
|
+
},
|
|
74
136
|
created() {
|
|
75
137
|
if (this.hData) {
|
|
76
138
|
this.readonly = true;
|
|
@@ -96,6 +158,7 @@ modules = {
|
|
|
96
158
|
initData(formData) {
|
|
97
159
|
this.isEdit = true;
|
|
98
160
|
this.formTemplate = formData || {};
|
|
161
|
+
this.templateType = getTemplateTypeByFormCode(this.formTemplate.formCode);
|
|
99
162
|
this.getMenuKindAuth(this.formTemplate.menuKindCode);
|
|
100
163
|
this.$nextTick(() => {
|
|
101
164
|
this.isInited = true;
|
|
@@ -154,6 +217,7 @@ modules = {
|
|
|
154
217
|
} else if (this.hData) {
|
|
155
218
|
this.isEdit = true;
|
|
156
219
|
this.formTemplate = this.$baseLodash.cloneDeep(this.hData);
|
|
220
|
+
this.templateType = getTemplateTypeByFormCode(this.formTemplate.formCode);
|
|
157
221
|
this.dataId = this.hData.id;
|
|
158
222
|
this.isInited = true;
|
|
159
223
|
this.getMenuKindAuth(this.formTemplate.menuKindCode);
|
|
@@ -20,6 +20,10 @@ import {
|
|
|
20
20
|
} from "@base/views/bd/setting/utils/index";
|
|
21
21
|
import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
|
|
22
22
|
import settingConfig from "@/settings";
|
|
23
|
+
import {
|
|
24
|
+
getDesignerLayoutType,
|
|
25
|
+
isH5FormTemplate,
|
|
26
|
+
} from "@base/views/bd/setting/form_template/formTemplateType.js";
|
|
23
27
|
|
|
24
28
|
let modules = {};
|
|
25
29
|
modules = {
|
|
@@ -142,6 +146,7 @@ modules = {
|
|
|
142
146
|
menuKindAuth: {},
|
|
143
147
|
showTree: false,
|
|
144
148
|
designerReadonly: false,
|
|
149
|
+
designerLayoutType: "PC",
|
|
145
150
|
};
|
|
146
151
|
},
|
|
147
152
|
computed: {
|
|
@@ -223,6 +228,8 @@ modules = {
|
|
|
223
228
|
}
|
|
224
229
|
},
|
|
225
230
|
openDesingerDialog(row, callback, readonly = false) {
|
|
231
|
+
/* 布局模式跟随模板类型,移动端模板进设计器为 H5,且工具栏不可切换 */
|
|
232
|
+
this.designerLayoutType = getDesignerLayoutType(row.formCode);
|
|
226
233
|
this.formCode = row.formCode;
|
|
227
234
|
this.formName = row.formName;
|
|
228
235
|
this.currentFormTemplate = row;
|
|
@@ -334,6 +341,26 @@ modules = {
|
|
|
334
341
|
field: "formCode",
|
|
335
342
|
width: 150,
|
|
336
343
|
},
|
|
344
|
+
{
|
|
345
|
+
/* 模板类型非数据库字段,由模板编码前缀派生,不参与后端查询 */
|
|
346
|
+
title: this.$t1("模板类型"),
|
|
347
|
+
field: "templateType",
|
|
348
|
+
width: 120,
|
|
349
|
+
slots: {
|
|
350
|
+
default: ({ row }) => {
|
|
351
|
+
return isH5FormTemplate(row.formCode)
|
|
352
|
+
? this.$t1("移动端")
|
|
353
|
+
: this.$t1("PC端");
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
params: {
|
|
357
|
+
exportVal: ({ row }) => {
|
|
358
|
+
return isH5FormTemplate(row.formCode)
|
|
359
|
+
? this.$t1("移动端")
|
|
360
|
+
: this.$t1("PC端");
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
},
|
|
337
364
|
{
|
|
338
365
|
title: this.$t1("表单分类"),
|
|
339
366
|
field: "menuKindName",
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
@field-widget-used="handleFWU" @field-widget-removed="handleFWR"
|
|
8
8
|
@form-json-updated="handleFJU" @reflushTemplateList="reflushTemplateList"
|
|
9
9
|
v-if="showDesinger" :readonly="readonly" :columnFlag="columnFlag"
|
|
10
|
-
:sourceData="sourceData" sourceData:="sourceData" @customConfirm="customConfirm"
|
|
10
|
+
:sourceData="sourceData" sourceData:="sourceData" @customConfirm="customConfirm"
|
|
11
|
+
:defaultLayoutType="defaultLayoutType" />
|
|
11
12
|
</div>
|
|
12
13
|
<!--
|
|
13
14
|
<el-tabs v-model="activeName" class="tab-boxCard tabCard-sty1" v-if="showDesinger">
|
|
@@ -37,6 +38,7 @@ export default {
|
|
|
37
38
|
columnFlag: Boolean,
|
|
38
39
|
sourceData: Object,
|
|
39
40
|
jsonFlag: Boolean,
|
|
41
|
+
defaultLayoutType: String,
|
|
40
42
|
},
|
|
41
43
|
components: {
|
|
42
44
|
VFormDesigner,
|