cloud-web-corejs 1.0.314 → 1.0.316
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/app-bootstrap.js +8 -1
- package/src/app-bootstrap.sync.js +8 -1
- package/src/boot-assets.legacy.js +6 -0
- package/src/components/hiprint/view/json-view.vue +4 -4
- package/src/components/mobile/wf/content.vue +2 -2
- package/src/components/table/plugins/cell-area/index.js +1062 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/xform/form-designer/designer.js +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +30 -4
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +27 -4
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +60 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-lazyRender-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabChange-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabClick-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +2 -4
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +8 -3
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +9 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +489 -404
- package/src/components/xform/form-render/container-item/panel-item.vue +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +48 -0
- package/src/components/xform/form-render/indexMixin.js +17 -2
- package/src/components/xform/form-render/pageDialogScope.js +54 -0
- package/src/components/xform/icon-picker/index.vue +1 -1
- package/src/components/xform/lang/en-US.js +3 -0
- package/src/components/xform/lang/zh-CN.js +3 -0
- package/src/components/xform/styles/h5-designer.scss +13 -13
- package/src/components/xform/styles/h5-runtime.scss +520 -0
- package/src/components/xform/styles/h5.scss +5 -2
- package/src/components/xform/utils/util.js +1 -0
- package/src/directive/el-drag-dialog/drag.js +32 -2
- package/src/router/index.js +41 -32
- package/src/styles/btn.scss +214 -3
- package/src/styles/dialog.scss +1710 -0
- package/src/styles/element-ui.scss +957 -36
- package/src/styles/index.scss +45 -0
- package/src/styles/layout-skins.scss +840 -0
- package/src/styles/legacy-base.scss +19 -0
- package/src/styles/mixin.scss +8 -0
- package/src/styles/page-shell.scss +723 -0
- package/src/styles/sidebar.scss +15 -0
- package/src/styles/utilities.scss +234 -118
- package/src/styles/variables.scss +28 -0
- package/src/views/user/form/view/list.vue +24 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 自研区域选取的高亮样式。
|
|
3
|
+
*
|
|
4
|
+
* 高亮是把 class 直接打在 td 上(见同目录 index.js),而不是画绝对定位的遮罩:
|
|
5
|
+
* 业务表常配 row-config.height: auto + autosize 的 textarea,行高会在输入过程中变化,
|
|
6
|
+
* 遮罩会漂移;而且有固定列时同一个单元格在 left/main/right 三个 wrapper 里各有一份,
|
|
7
|
+
* 打 class 一次就能全覆盖。
|
|
8
|
+
*
|
|
9
|
+
* 边框走 ::after 伪元素而不是 border,避免占用盒模型把单元格内容挤动。
|
|
10
|
+
*/
|
|
11
|
+
$vxe-cell-area-color: #409eff !default;
|
|
12
|
+
$vxe-cell-area-background-color: rgba(64, 158, 255, 0.12) !default;
|
|
13
|
+
$vxe-cell-area-border-width: 2px !default;
|
|
14
|
+
|
|
15
|
+
.vxe-table {
|
|
16
|
+
// 框选过程中禁掉文字选中,否则拖拽会连带选中单元格文本
|
|
17
|
+
&.drag--range {
|
|
18
|
+
.vxe-table--main-wrapper,
|
|
19
|
+
.vxe-table--fixed-left-wrapper,
|
|
20
|
+
.vxe-table--fixed-right-wrapper {
|
|
21
|
+
user-select: none;
|
|
22
|
+
|
|
23
|
+
* {
|
|
24
|
+
user-select: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.vxe-body--column {
|
|
30
|
+
&.col--area,
|
|
31
|
+
&.col--copy-area {
|
|
32
|
+
position: relative;
|
|
33
|
+
|
|
34
|
+
&::after {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
left: 0;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.col--area {
|
|
47
|
+
background-color: $vxe-cell-area-background-color;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 只有落在选区边界上的单元格画对应那条边,四条拼起来就是完整矩形
|
|
51
|
+
&.col--area-t::after {
|
|
52
|
+
border-top: $vxe-cell-area-border-width solid $vxe-cell-area-color;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.col--area-b::after {
|
|
56
|
+
border-bottom: $vxe-cell-area-border-width solid $vxe-cell-area-color;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.col--area-l::after {
|
|
60
|
+
border-left: $vxe-cell-area-border-width solid $vxe-cell-area-color;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.col--area-r::after {
|
|
64
|
+
border-right: $vxe-cell-area-border-width solid $vxe-cell-area-color;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 锚点格:shift 扩选与方向键移动的基准,不铺底色以示区别
|
|
68
|
+
&.col--area-active {
|
|
69
|
+
background-color: transparent;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 复制源:虚线框,粘贴或取消后清除
|
|
73
|
+
&.col--copy-area::after {
|
|
74
|
+
border: 1px dashed $vxe-cell-area-color;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 区域选取插件的纯函数部分:可选列/行的口径、矩形运算、剪贴板 TSV 编解码。
|
|
3
|
+
* 抽出来是为了能脱离 vxe 实例单测,index.js 只负责跟 vxe 的钩子对接。
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// 这些列没有业务值(复选框/单选/序号/展开),不参与区域选取与复制粘贴
|
|
7
|
+
const NOT_AREA_COLUMN_TYPES = ["checkbox", "radio", "seq", "expand"];
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 参与区域选取的列。索引空间以本函数返回的数组为准,
|
|
11
|
+
* 复制粘贴的列对齐、方向键移动都按这个下标算。
|
|
12
|
+
*/
|
|
13
|
+
export function getAreaColumns(columns, excludeFields) {
|
|
14
|
+
let excludes = excludeFields || [];
|
|
15
|
+
return (columns || []).filter((column) => {
|
|
16
|
+
if (!column) return false;
|
|
17
|
+
let field = column.property || column.field;
|
|
18
|
+
if (!field) return false;
|
|
19
|
+
if (NOT_AREA_COLUMN_TYPES.includes(column.type)) return false;
|
|
20
|
+
return !excludes.includes(field);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getColumnField(column) {
|
|
25
|
+
return column ? column.property || column.field : null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 下标钳制到 [0, size - 1],size 为 0 时返回 -1 表示无可用格。
|
|
30
|
+
*
|
|
31
|
+
* 只接受**算术下标**(锚点 ± 偏移,越界钳回边界是对的,比如在第 0 行按 ↑ 得到 -1 应该停在 0)。
|
|
32
|
+
* **不要拿 indexOf 的结果喂它** —— 那里的 -1 是"找不到",钳成 0 会把查找失败
|
|
33
|
+
* 静默变成"第 0 行",选区反向铺开。
|
|
34
|
+
*/
|
|
35
|
+
export function clampIndex(index, size) {
|
|
36
|
+
if (!size || size < 1) return -1;
|
|
37
|
+
if (index < 0) return 0;
|
|
38
|
+
if (index > size - 1) return size - 1;
|
|
39
|
+
return index;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 由锚点与焦点格构造矩形。锚点是 shift 扩选与方向键移动的基准,
|
|
44
|
+
* 始终保留在区域里,不随 start/end 归一化而丢失。
|
|
45
|
+
*/
|
|
46
|
+
export function buildArea(anchorRow, anchorCol, focusRow, focusCol) {
|
|
47
|
+
return {
|
|
48
|
+
anchorRow: anchorRow,
|
|
49
|
+
anchorCol: anchorCol,
|
|
50
|
+
focusRow: focusRow,
|
|
51
|
+
focusCol: focusCol,
|
|
52
|
+
startRow: Math.min(anchorRow, focusRow),
|
|
53
|
+
endRow: Math.max(anchorRow, focusRow),
|
|
54
|
+
startCol: Math.min(anchorCol, focusCol),
|
|
55
|
+
endCol: Math.max(anchorCol, focusCol),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** 折叠成单格 */
|
|
60
|
+
export function buildCellArea(rowIndex, colIndex) {
|
|
61
|
+
return buildArea(rowIndex, colIndex, rowIndex, colIndex);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** 以现有锚点扩选到目标格;没有区域时退化为单格 */
|
|
65
|
+
export function extendArea(area, focusRow, focusCol) {
|
|
66
|
+
if (!area) return buildCellArea(focusRow, focusCol);
|
|
67
|
+
return buildArea(area.anchorRow, area.anchorCol, focusRow, focusCol);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 方向键移动。extend 为真时移动焦点边(Shift+方向键),
|
|
72
|
+
* 否则整体折叠成单格移动到新位置。
|
|
73
|
+
*/
|
|
74
|
+
export function moveArea(area, offsetRow, offsetCol, rowSize, colSize, extend) {
|
|
75
|
+
if (!area) return null;
|
|
76
|
+
if (extend) {
|
|
77
|
+
let focusRow = clampIndex(area.focusRow + offsetRow, rowSize);
|
|
78
|
+
let focusCol = clampIndex(area.focusCol + offsetCol, colSize);
|
|
79
|
+
return buildArea(area.anchorRow, area.anchorCol, focusRow, focusCol);
|
|
80
|
+
}
|
|
81
|
+
let rowIndex = clampIndex(area.anchorRow + offsetRow, rowSize);
|
|
82
|
+
let colIndex = clampIndex(area.anchorCol + offsetCol, colSize);
|
|
83
|
+
return buildCellArea(rowIndex, colIndex);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Tab/Enter 的顺序移动:列走到头换行。越界则停在原地。
|
|
88
|
+
*/
|
|
89
|
+
export function moveNextCell(area, isRowFirst, isBack, rowSize, colSize) {
|
|
90
|
+
if (!area) return null;
|
|
91
|
+
let rowIndex = area.anchorRow;
|
|
92
|
+
let colIndex = area.anchorCol;
|
|
93
|
+
let step = isBack ? -1 : 1;
|
|
94
|
+
if (isRowFirst) {
|
|
95
|
+
colIndex += step;
|
|
96
|
+
if (colIndex > colSize - 1) {
|
|
97
|
+
colIndex = 0;
|
|
98
|
+
rowIndex += 1;
|
|
99
|
+
} else if (colIndex < 0) {
|
|
100
|
+
colIndex = colSize - 1;
|
|
101
|
+
rowIndex -= 1;
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
rowIndex += step;
|
|
105
|
+
}
|
|
106
|
+
if (rowIndex < 0 || rowIndex > rowSize - 1) {
|
|
107
|
+
return area;
|
|
108
|
+
}
|
|
109
|
+
return buildCellArea(rowIndex, clampIndex(colIndex, colSize));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 粘贴时需要补几行:从 startRowIndex 起放下 pasteRowSize 行,超出当前行数的部分。
|
|
114
|
+
*/
|
|
115
|
+
export function getIncrementRowSize(startRowIndex, pasteRowSize, rowSize) {
|
|
116
|
+
let need = startRowIndex + pasteRowSize - rowSize;
|
|
117
|
+
return need > 0 ? need : 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const NEED_QUOTE_RE = /[\t\r\n"]/;
|
|
121
|
+
|
|
122
|
+
/** 单元格文本 -> 剪贴板片段,按 Excel 约定转义 */
|
|
123
|
+
export function encodeClipCell(value) {
|
|
124
|
+
let text = value === null || value === undefined ? "" : "" + value;
|
|
125
|
+
if (NEED_QUOTE_RE.test(text)) {
|
|
126
|
+
return '"' + text.replace(/"/g, '""') + '"';
|
|
127
|
+
}
|
|
128
|
+
return text;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** 二维数组 -> TSV 文本 */
|
|
132
|
+
export function encodeClipText(matrix) {
|
|
133
|
+
return (matrix || [])
|
|
134
|
+
.map((row) => (row || []).map(encodeClipCell).join("\t"))
|
|
135
|
+
.join("\n");
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const HTML_ESCAPE_MAP = {
|
|
139
|
+
"&": "&",
|
|
140
|
+
"<": "<",
|
|
141
|
+
">": ">",
|
|
142
|
+
'"': """,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export function escapeClipHtml(value) {
|
|
146
|
+
let text = value === null || value === undefined ? "" : "" + value;
|
|
147
|
+
return text.replace(/[&<>"]/g, function (ch) {
|
|
148
|
+
return HTML_ESCAPE_MAP[ch];
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 二维数组 -> HTML 表格片段。
|
|
154
|
+
* 官方 copyCellArea() 的返回值是 { text, html },只写 text/plain 的话
|
|
155
|
+
* 粘进 Word / 邮件 / 富文本编辑器会丢掉表格结构,塌成一行文本。
|
|
156
|
+
*/
|
|
157
|
+
export function encodeClipHtml(matrix) {
|
|
158
|
+
let trList = (matrix || []).map(function (row) {
|
|
159
|
+
let tdList = (row || []).map(function (cell) {
|
|
160
|
+
// 格内换行要转 <br>,否则富文本里同样会被挤成一行
|
|
161
|
+
return "<td>" + escapeClipHtml(cell).replace(/\r?\n/g, "<br>") + "</td>";
|
|
162
|
+
});
|
|
163
|
+
return "<tr>" + tdList.join("") + "</tr>";
|
|
164
|
+
});
|
|
165
|
+
return "<table><tbody>" + trList.join("") + "</tbody></table>";
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* TSV 文本 -> 二维数组。走状态机而不是 split,
|
|
170
|
+
* 因为 Excel 会把含换行/制表符的单元格用引号包起来。
|
|
171
|
+
*/
|
|
172
|
+
export function decodeClipText(text) {
|
|
173
|
+
let source = text === null || text === undefined ? "" : "" + text;
|
|
174
|
+
if (!source) return [];
|
|
175
|
+
let rows = [];
|
|
176
|
+
let row = [];
|
|
177
|
+
let cell = "";
|
|
178
|
+
let inQuote = false;
|
|
179
|
+
let cellStart = true; // 只有单元格开头的引号才算包裹符
|
|
180
|
+
for (let i = 0; i < source.length; i++) {
|
|
181
|
+
let ch = source[i];
|
|
182
|
+
if (inQuote) {
|
|
183
|
+
if (ch === '"') {
|
|
184
|
+
if (source[i + 1] === '"') {
|
|
185
|
+
cell += '"';
|
|
186
|
+
i++;
|
|
187
|
+
} else {
|
|
188
|
+
inQuote = false;
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
cell += ch;
|
|
192
|
+
}
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (ch === '"' && cellStart) {
|
|
196
|
+
inQuote = true;
|
|
197
|
+
cellStart = false;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (ch === "\t") {
|
|
201
|
+
row.push(cell);
|
|
202
|
+
cell = "";
|
|
203
|
+
cellStart = true;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
if (ch === "\n" || ch === "\r") {
|
|
207
|
+
if (ch === "\r" && source[i + 1] === "\n") i++;
|
|
208
|
+
row.push(cell);
|
|
209
|
+
rows.push(row);
|
|
210
|
+
row = [];
|
|
211
|
+
cell = "";
|
|
212
|
+
cellStart = true;
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
cell += ch;
|
|
216
|
+
cellStart = false;
|
|
217
|
+
}
|
|
218
|
+
// 末尾没有换行时收尾;有换行时不要多造一个空行
|
|
219
|
+
if (cell !== "" || row.length || inQuote) {
|
|
220
|
+
row.push(cell);
|
|
221
|
+
rows.push(row);
|
|
222
|
+
}
|
|
223
|
+
return rows;
|
|
224
|
+
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dialog
|
|
3
|
+
ref="pageDialog"
|
|
3
4
|
:visible.sync="showDialog"
|
|
4
5
|
v-el-drag-dialog
|
|
5
|
-
v-el-dialog-center
|
|
6
|
+
v-el-dialog-center="!isPageScope"
|
|
7
|
+
:class="{
|
|
8
|
+
'xform-page-dialog-wrapper': isPageScope,
|
|
9
|
+
'xform-page-form-dialog-wrapper': isPageScope,
|
|
10
|
+
'xform-page-dialog-wrapper--top': pageDialogHasTop,
|
|
11
|
+
}"
|
|
6
12
|
v-bind="dialogConfig"
|
|
7
13
|
@close="close"
|
|
8
14
|
>
|
|
@@ -13,7 +19,11 @@
|
|
|
13
19
|
v-bind="bodyConfig"
|
|
14
20
|
v-if="listHost"
|
|
15
21
|
>
|
|
16
|
-
<list-view-host
|
|
22
|
+
<list-view-host
|
|
23
|
+
:formCode="listFormCode"
|
|
24
|
+
:param="dialogParam"
|
|
25
|
+
:dialogScope="option.dialogScope"
|
|
26
|
+
/>
|
|
17
27
|
</div>
|
|
18
28
|
<div class="cont designer-view" v-bind="bodyConfig" id="containt" v-else>
|
|
19
29
|
<v-form-render
|
|
@@ -30,6 +40,7 @@
|
|
|
30
40
|
@reload="reload"
|
|
31
41
|
v-bind="formConfig"
|
|
32
42
|
:param="dialogParam"
|
|
43
|
+
:dialogScope="option.dialogScope"
|
|
33
44
|
:dataTableOption="dialogDataTableOption"
|
|
34
45
|
class="data-table_height"
|
|
35
46
|
@hook:mounted="handleFormMounted"
|
|
@@ -75,6 +86,10 @@
|
|
|
75
86
|
|
|
76
87
|
<script>
|
|
77
88
|
import VFormRender from "../../../../../components/xform/form-render/index.vue";
|
|
89
|
+
import {
|
|
90
|
+
pageScopedDialogMixin,
|
|
91
|
+
pageDialogTop,
|
|
92
|
+
} from "@base/components/xform/form-render/pageDialogScope";
|
|
78
93
|
import {
|
|
79
94
|
resolveActionButtons,
|
|
80
95
|
hasButtonPermission,
|
|
@@ -95,7 +110,7 @@ export default {
|
|
|
95
110
|
visiable: Boolean,
|
|
96
111
|
option: Object,
|
|
97
112
|
},
|
|
98
|
-
mixins: [],
|
|
113
|
+
mixins: [pageScopedDialogMixin],
|
|
99
114
|
inject: ["getFormConfig"],
|
|
100
115
|
|
|
101
116
|
mounted() {},
|
|
@@ -171,6 +186,15 @@ export default {
|
|
|
171
186
|
config = Object.assign({}, config, this.option.dialogConfig, {
|
|
172
187
|
customClass,
|
|
173
188
|
});
|
|
189
|
+
if (this.isPageScope) {
|
|
190
|
+
Object.assign(config, {
|
|
191
|
+
appendToBody: false,
|
|
192
|
+
modalAppendToBody: false,
|
|
193
|
+
modal: false,
|
|
194
|
+
lockScroll: false,
|
|
195
|
+
top: pageDialogTop(this.option.dialogConfig?.top),
|
|
196
|
+
});
|
|
197
|
+
}
|
|
174
198
|
config.title = this.$t1(config.title);
|
|
175
199
|
return config;
|
|
176
200
|
},
|
|
@@ -236,7 +260,9 @@ export default {
|
|
|
236
260
|
method: `post`,
|
|
237
261
|
data: data,
|
|
238
262
|
isLoading: true,
|
|
239
|
-
loadingTarget:
|
|
263
|
+
loadingTarget: this.isPageScope
|
|
264
|
+
? this.option.pageDialogHost
|
|
265
|
+
: document.body,
|
|
240
266
|
modalStrictly: true,
|
|
241
267
|
success: (res) => {
|
|
242
268
|
let formTemplate = res.objx || {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dialog
|
|
3
|
+
ref="pageDialog"
|
|
3
4
|
:visible.sync="showDialog"
|
|
4
5
|
v-el-drag-dialog
|
|
5
|
-
v-el-dialog-center
|
|
6
|
+
v-el-dialog-center="!isPageScope"
|
|
7
|
+
:class="{
|
|
8
|
+
'xform-page-dialog-wrapper': isPageScope,
|
|
9
|
+
'xform-page-dialog-wrapper--top': pageDialogHasTop,
|
|
10
|
+
}"
|
|
6
11
|
v-bind="dialogConfig"
|
|
7
12
|
@close="close"
|
|
8
13
|
>
|
|
@@ -22,6 +27,7 @@
|
|
|
22
27
|
:dataTableOption="dataTableOption"
|
|
23
28
|
v-bind="formConfig"
|
|
24
29
|
:param="dialogParam"
|
|
30
|
+
:dialogScope="option.dialogScope"
|
|
25
31
|
class="data-table_height labMargin"
|
|
26
32
|
/>
|
|
27
33
|
</div>
|
|
@@ -72,12 +78,16 @@
|
|
|
72
78
|
<script>
|
|
73
79
|
import { selectDialogMixins } from "../../../../../mixins/selectDialog/index.js";
|
|
74
80
|
import VFormRender from "../../../../../components/xform/form-render/index.vue";
|
|
81
|
+
import {
|
|
82
|
+
pageScopedDialogMixin,
|
|
83
|
+
pageDialogTop,
|
|
84
|
+
} from "@base/components/xform/form-render/pageDialogScope";
|
|
75
85
|
import { traverseAllWidgetsNew } from "../../../../../components/xform/utils/util";
|
|
76
86
|
|
|
77
87
|
export default {
|
|
78
88
|
components: { VFormRender },
|
|
79
89
|
props: ["visiable", "multi", "rows", "param", "widget", "option"],
|
|
80
|
-
mixins: [selectDialogMixins],
|
|
90
|
+
mixins: [selectDialogMixins, pageScopedDialogMixin],
|
|
81
91
|
inject: ["getFormConfig"],
|
|
82
92
|
mounted() {},
|
|
83
93
|
data() {
|
|
@@ -172,6 +182,15 @@ export default {
|
|
|
172
182
|
config = Object.assign({}, config, this.option.dialogConfig, {
|
|
173
183
|
customClass,
|
|
174
184
|
});
|
|
185
|
+
if (this.isPageScope) {
|
|
186
|
+
Object.assign(config, {
|
|
187
|
+
appendToBody: false,
|
|
188
|
+
modalAppendToBody: false,
|
|
189
|
+
modal: false,
|
|
190
|
+
lockScroll: false,
|
|
191
|
+
top: pageDialogTop(this.option.dialogConfig?.top),
|
|
192
|
+
});
|
|
193
|
+
}
|
|
175
194
|
config.title = this.$t1(config.title);
|
|
176
195
|
return config;
|
|
177
196
|
},
|
|
@@ -228,7 +247,9 @@ export default {
|
|
|
228
247
|
method: `post`,
|
|
229
248
|
data: data,
|
|
230
249
|
isLoading: true,
|
|
231
|
-
loadingTarget:
|
|
250
|
+
loadingTarget: this.isPageScope
|
|
251
|
+
? this.option.pageDialogHost
|
|
252
|
+
: document.body,
|
|
232
253
|
modalStrictly: true,
|
|
233
254
|
success: (res) => {
|
|
234
255
|
let formTemplate = res.objx || {};
|
|
@@ -300,7 +321,9 @@ export default {
|
|
|
300
321
|
tableAlias: this.formCode,
|
|
301
322
|
},
|
|
302
323
|
isLoading: true,
|
|
303
|
-
loadingTarget:
|
|
324
|
+
loadingTarget: this.isPageScope
|
|
325
|
+
? this.option.pageDialogHost
|
|
326
|
+
: document.body,
|
|
304
327
|
modalStrictly: true,
|
|
305
328
|
success: (res) => {
|
|
306
329
|
let formData = res.objx && res.objx.data ? res.objx.data : {};
|
|
@@ -54,6 +54,19 @@
|
|
|
54
54
|
{{ i18nt("designer.setting.addCss") }}
|
|
55
55
|
</el-button>
|
|
56
56
|
</el-form-item>
|
|
57
|
+
<el-form-item
|
|
58
|
+
v-if="formConfig.layoutType === 'PC'"
|
|
59
|
+
class="form-item-label-top"
|
|
60
|
+
label="业务弹框作用域"
|
|
61
|
+
>
|
|
62
|
+
<el-radio-group v-model="dialogScopeValue">
|
|
63
|
+
<el-radio label="global">全局</el-radio>
|
|
64
|
+
<el-radio label="page">当前页面</el-radio>
|
|
65
|
+
</el-radio-group>
|
|
66
|
+
<div style="line-height: 1.6; color: #909399; font-size: 12px">
|
|
67
|
+
列表和详情模板需分别设置。当前页面模式只遮挡表单内容,顶部页签和左侧菜单仍可操作。
|
|
68
|
+
</div>
|
|
69
|
+
</el-form-item>
|
|
57
70
|
</el-collapse-item>
|
|
58
71
|
<el-collapse-item name="2" title="详情表单信息">
|
|
59
72
|
<el-form-item :label="i18nt('加载详情数据')">
|
|
@@ -374,7 +387,7 @@
|
|
|
374
387
|
</el-form-item>
|
|
375
388
|
<el-form-item
|
|
376
389
|
v-if="formConfig.multiTabEnabled"
|
|
377
|
-
:label="i18nt('新增打开页签')"
|
|
390
|
+
:label="i18nt('新增打开页签')"
|
|
378
391
|
class="el-form-item-second"
|
|
379
392
|
>
|
|
380
393
|
<el-switch v-model="formConfig.addTabEnabled"></el-switch>
|
|
@@ -480,7 +493,7 @@
|
|
|
480
493
|
<el-collapse-item
|
|
481
494
|
v-if="showEventCollapse()"
|
|
482
495
|
name="7"
|
|
483
|
-
:title="i18nt('designer.setting.eventSetting')"
|
|
496
|
+
:title="i18nt('designer.setting.eventSetting')"
|
|
484
497
|
class="form-item-label-red"
|
|
485
498
|
>
|
|
486
499
|
<!-- <el-form-item label="onBeforeCreated" label-width="150px">
|
|
@@ -1255,6 +1268,14 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1255
1268
|
});
|
|
1256
1269
|
},
|
|
1257
1270
|
computed: {
|
|
1271
|
+
dialogScopeValue: {
|
|
1272
|
+
get() {
|
|
1273
|
+
return this.formConfig.dialogScope === "page" ? "page" : "global";
|
|
1274
|
+
},
|
|
1275
|
+
set(value) {
|
|
1276
|
+
this.$set(this.formConfig, "dialogScope", value);
|
|
1277
|
+
},
|
|
1278
|
+
},
|
|
1258
1279
|
// formDialog/formDrawer 底部操作按钮配置(存 formConfig,随模板保存)
|
|
1259
1280
|
actionButtons() {
|
|
1260
1281
|
return this.formConfig.actionButtons || [];
|
|
@@ -1714,23 +1735,23 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1714
1735
|
|
|
1715
1736
|
<style lang="scss" scoped>
|
|
1716
1737
|
.setting-form {
|
|
1717
|
-
::v-deep .el-form-item{
|
|
1718
|
-
.el-form-item__label {
|
|
1719
|
-
font-size: 13px;
|
|
1720
|
-
//text-overflow: ellipsis;
|
|
1721
|
-
overflow: hidden;
|
|
1722
|
-
white-space: nowrap;
|
|
1723
|
-
}
|
|
1724
|
-
&.el-form-item--mini.el-form-item {
|
|
1725
|
-
margin-bottom: 6px;
|
|
1726
|
-
}
|
|
1727
|
-
&.el-form-item-second{
|
|
1728
|
-
.el-form-item__label{
|
|
1729
|
-
padding-left:4px;
|
|
1730
|
-
&:before{content:"";width:5px;height:2px;background:#FF4D4F;display:inline-block;margin-right:4px;}
|
|
1731
|
-
span{flex:1}
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1738
|
+
::v-deep .el-form-item{
|
|
1739
|
+
.el-form-item__label {
|
|
1740
|
+
font-size: 13px;
|
|
1741
|
+
//text-overflow: ellipsis;
|
|
1742
|
+
overflow: hidden;
|
|
1743
|
+
white-space: nowrap;
|
|
1744
|
+
}
|
|
1745
|
+
&.el-form-item--mini.el-form-item {
|
|
1746
|
+
margin-bottom: 6px;
|
|
1747
|
+
}
|
|
1748
|
+
&.el-form-item-second{
|
|
1749
|
+
.el-form-item__label{
|
|
1750
|
+
padding-left:4px;
|
|
1751
|
+
&:before{content:"";width:5px;height:2px;background:#FF4D4F;display:inline-block;margin-right:4px;}
|
|
1752
|
+
span{flex:1}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1734
1755
|
}
|
|
1735
1756
|
|
|
1736
1757
|
.radio-group-custom {
|
|
@@ -1757,29 +1778,29 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1757
1778
|
|
|
1758
1779
|
/* 折叠组内部的二级分组标题,用于把长配置组切成几段(如「流程信息」) */
|
|
1759
1780
|
::v-deep .wf-group-title {
|
|
1760
|
-
margin: 16px 0 8px;
|
|
1761
|
-
padding-left: 8px;
|
|
1762
|
-
//border-left: 3px solid #0073E5;
|
|
1763
|
-
color: rgba(0,0,0,.65);
|
|
1764
|
-
font-size: 13px;
|
|
1765
|
-
font-weight: 600;
|
|
1766
|
-
line-height: 1.3;
|
|
1767
|
-
background: rgba(0,0,0,0.04);
|
|
1781
|
+
margin: 16px 0 8px;
|
|
1782
|
+
padding-left: 8px;
|
|
1783
|
+
//border-left: 3px solid #0073E5;
|
|
1784
|
+
color: rgba(0,0,0,.65);
|
|
1785
|
+
font-size: 13px;
|
|
1786
|
+
font-weight: 600;
|
|
1787
|
+
line-height: 1.3;
|
|
1788
|
+
background: rgba(0,0,0,0.04);
|
|
1768
1789
|
padding: 4px 0 4px 8px;
|
|
1769
1790
|
&:first-child {
|
|
1770
1791
|
margin-top: 0;
|
|
1771
|
-
}
|
|
1772
|
-
~ .el-form-item{
|
|
1773
|
-
.el-form-item__label{
|
|
1774
|
-
padding-left:4px;
|
|
1775
|
-
&:before{content:"";width:5px;height:2px;background:#0073e5;display:inline-block;margin-right:4px;}
|
|
1776
|
-
span{flex:1}
|
|
1777
|
-
}
|
|
1778
|
-
&.form-item-label-red{
|
|
1779
|
-
.el-form-item__label:before{
|
|
1780
|
-
background:#FF4D4F
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1792
|
+
}
|
|
1793
|
+
~ .el-form-item{
|
|
1794
|
+
.el-form-item__label{
|
|
1795
|
+
padding-left:4px;
|
|
1796
|
+
&:before{content:"";width:5px;height:2px;background:#0073e5;display:inline-block;margin-right:4px;}
|
|
1797
|
+
span{flex:1}
|
|
1798
|
+
}
|
|
1799
|
+
&.form-item-label-red{
|
|
1800
|
+
.el-form-item__label:before{
|
|
1801
|
+
background:#FF4D4F
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1783
1804
|
}
|
|
1784
1805
|
}
|
|
1785
1806
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item class="form-item-label-top" :label="i18nt('designer.setting.lazyRender')">
|
|
3
|
+
<el-switch v-model="optionModel.lazyRender"></el-switch>
|
|
4
|
+
<el-tooltip placement="bottom" effect="light" :content="i18nt('designer.setting.lazyRenderHint')">
|
|
5
|
+
<i class="el-icon-info" style="margin-left: 4px"></i>
|
|
6
|
+
</el-tooltip>
|
|
7
|
+
</el-form-item>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: "tab-lazyRender-editor",
|
|
15
|
+
componentName: 'PropertyEditor',
|
|
16
|
+
mixins: [i18n],
|
|
17
|
+
props: {
|
|
18
|
+
designer: Object,
|
|
19
|
+
selectedWidget: Object,
|
|
20
|
+
optionModel: Object,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped>
|
|
26
|
+
|
|
27
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item label="onTabChange" label-width="150px">
|
|
3
|
+
<a href="javascript:void(0);" class="a-link link-oneLind" @click="editEventHandler('onTabChange', eventParams)">
|
|
4
|
+
<span>{{ optionModel.onTabChange }}</span>
|
|
5
|
+
<i class="el-icon-edit"></i>
|
|
6
|
+
</a>
|
|
7
|
+
</el-form-item>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
12
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: "onTabChange-editor",
|
|
16
|
+
mixins: [i18n, eventMixin],
|
|
17
|
+
props: {
|
|
18
|
+
designer: Object,
|
|
19
|
+
selectedWidget: Object,
|
|
20
|
+
optionModel: Object,
|
|
21
|
+
},
|
|
22
|
+
data() {
|
|
23
|
+
return { eventParams: ["name", "oldName"] };
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped></style>
|