cloud-web-corejs 1.0.54-dev.455 → 1.0.54-dev.456
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/xform/form-designer/designer.js +3 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +57 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +1 -0
- package/src/components/xform/utils/util.js +3 -1
- package/src/views/user/form/view/list.vue +68 -0
package/package.json
CHANGED
|
@@ -170,6 +170,54 @@
|
|
|
170
170
|
<el-input type="text" v-model="formConfig.multiTabLabelField"></el-input>
|
|
171
171
|
</el-form-item>
|
|
172
172
|
</el-collapse-item>
|
|
173
|
+
<el-collapse-item name="2" title="其他标签页信息">
|
|
174
|
+
<el-form-item :label="i18nt('启用其他标签页')">
|
|
175
|
+
<el-switch v-model="formConfig.otherTabEnabled"></el-switch>
|
|
176
|
+
</el-form-item>
|
|
177
|
+
<el-form-item :label="i18nt('其他标签页配置')"> </el-form-item>
|
|
178
|
+
<el-form-item label-width="0">
|
|
179
|
+
<div>
|
|
180
|
+
<draggable
|
|
181
|
+
tag="ul"
|
|
182
|
+
class="draggable-box"
|
|
183
|
+
:list="formConfig.otherTabList"
|
|
184
|
+
v-bind="{
|
|
185
|
+
group: 'optionsGroup',
|
|
186
|
+
ghostClass: 'ghost',
|
|
187
|
+
handle: '.drag-option',
|
|
188
|
+
}"
|
|
189
|
+
>
|
|
190
|
+
<li v-for="(option, idx) in formConfig.otherTabList" :key="idx">
|
|
191
|
+
<el-input
|
|
192
|
+
v-model="option.label"
|
|
193
|
+
size="mini"
|
|
194
|
+
style="width: 100px"
|
|
195
|
+
placeholder="标签名称"
|
|
196
|
+
></el-input>
|
|
197
|
+
<el-input
|
|
198
|
+
v-model="option.formCode"
|
|
199
|
+
size="mini"
|
|
200
|
+
style="width: 100px"
|
|
201
|
+
placeholder="表单模板编码"
|
|
202
|
+
></el-input>
|
|
203
|
+
<i class="el-icon-s-operation drag-option"></i>
|
|
204
|
+
<el-button
|
|
205
|
+
circle
|
|
206
|
+
plain
|
|
207
|
+
size="mini"
|
|
208
|
+
type="danger"
|
|
209
|
+
@click="formConfig.otherTabList.splice(idx, 1)"
|
|
210
|
+
icon="el-icon-minus"
|
|
211
|
+
class="col-delete-button"
|
|
212
|
+
></el-button>
|
|
213
|
+
</li>
|
|
214
|
+
</draggable>
|
|
215
|
+
<el-button type="text" @click="addOtherTab">{{
|
|
216
|
+
i18nt("designer.setting.addOption")
|
|
217
|
+
}}</el-button>
|
|
218
|
+
</div>
|
|
219
|
+
</el-form-item>
|
|
220
|
+
</el-collapse-item>
|
|
173
221
|
|
|
174
222
|
<el-collapse-item name="3" title="详情表单信息">
|
|
175
223
|
<el-form-item :label="i18nt('查看页面表单编码')">
|
|
@@ -1310,6 +1358,15 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1310
1358
|
item.companyCodes = row.bdCompanyCode;
|
|
1311
1359
|
}
|
|
1312
1360
|
},
|
|
1361
|
+
addOtherTab() {
|
|
1362
|
+
if (!this.formConfig.otherTabList) {
|
|
1363
|
+
this.$set(this.formConfig, "otherTabList", []);
|
|
1364
|
+
}
|
|
1365
|
+
this.formConfig.otherTabList.push({
|
|
1366
|
+
label: null,
|
|
1367
|
+
formCode: null,
|
|
1368
|
+
});
|
|
1369
|
+
},
|
|
1313
1370
|
},
|
|
1314
1371
|
};
|
|
1315
1372
|
</script>
|
|
@@ -32,6 +32,28 @@
|
|
|
32
32
|
></vFormRender>
|
|
33
33
|
</div>
|
|
34
34
|
</el-tab-pane>
|
|
35
|
+
<el-tab-pane
|
|
36
|
+
v-for="(item, index) in otherTabList"
|
|
37
|
+
:key="index"
|
|
38
|
+
:label="$t2(item.label)"
|
|
39
|
+
:name="`otherTab${index}`"
|
|
40
|
+
>
|
|
41
|
+
<div class="grid-height">
|
|
42
|
+
<vFormRender
|
|
43
|
+
:ref="`list${index}`"
|
|
44
|
+
:formCode.sync="item.formCode"
|
|
45
|
+
:dataId.sync="item.dataId"
|
|
46
|
+
:param="item.param"
|
|
47
|
+
v-if="item.showContent"
|
|
48
|
+
:parent-target="_self"
|
|
49
|
+
@reload="
|
|
50
|
+
(...args) => {
|
|
51
|
+
reloadAutoContent(...args);
|
|
52
|
+
}
|
|
53
|
+
"
|
|
54
|
+
></vFormRender>
|
|
55
|
+
</div>
|
|
56
|
+
</el-tab-pane>
|
|
35
57
|
<template #editTab="{ tab, index, reloadTabContent }">
|
|
36
58
|
<el-tab-pane
|
|
37
59
|
:key="tab.data.id"
|
|
@@ -124,8 +146,21 @@ export default {
|
|
|
124
146
|
param: {},
|
|
125
147
|
multiTabLabelField: null,
|
|
126
148
|
formData: null,
|
|
149
|
+
otherTabList: [],
|
|
127
150
|
};
|
|
128
151
|
},
|
|
152
|
+
watch: {
|
|
153
|
+
activeName(val) {
|
|
154
|
+
if (
|
|
155
|
+
this.formJson.formConfig.otherTabEnabled &&
|
|
156
|
+
this.otherTabList.length > 0 &&
|
|
157
|
+
val.startsWith("otherTab")
|
|
158
|
+
) {
|
|
159
|
+
let num = Number(val.substring("otherTab".length));
|
|
160
|
+
this.otherTabList[num].showContent = true;
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
},
|
|
129
164
|
created() {
|
|
130
165
|
this.initParam();
|
|
131
166
|
this.getReportTemplate();
|
|
@@ -168,6 +203,7 @@ export default {
|
|
|
168
203
|
}
|
|
169
204
|
this.addFormCode = addFormCode;
|
|
170
205
|
this.multiTabLabelField = formJson.formConfig?.multiTabLabelField;
|
|
206
|
+
this.initOtherTabList();
|
|
171
207
|
},
|
|
172
208
|
});
|
|
173
209
|
},
|
|
@@ -231,6 +267,38 @@ export default {
|
|
|
231
267
|
this.formData = {};
|
|
232
268
|
this.$reloadHandle(...arguments);
|
|
233
269
|
},
|
|
270
|
+
initOtherTabList() {
|
|
271
|
+
if (!this.formJson.formConfig.otherTabEnabled) return;
|
|
272
|
+
this.otherTabList = this.formJson.formConfig.otherTabList
|
|
273
|
+
.filter((item) => !!item.formCode && !!item.label)
|
|
274
|
+
.map((item) => {
|
|
275
|
+
return {
|
|
276
|
+
label: item.label,
|
|
277
|
+
formCode: item.formCode,
|
|
278
|
+
showContent: false,
|
|
279
|
+
dataId: null,
|
|
280
|
+
param: null,
|
|
281
|
+
};
|
|
282
|
+
});
|
|
283
|
+
},
|
|
284
|
+
reloadAutoContent(target, param, tab) {
|
|
285
|
+
let updateParam =
|
|
286
|
+
param != null && param.updateParam != null ? param.updateParam : {};
|
|
287
|
+
for (let key in updateParam) {
|
|
288
|
+
target.$emit("update:" + key, updateParam[key]);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (!tab) {
|
|
292
|
+
let activeName = this.activeName;
|
|
293
|
+
tab = this.tabs.find((item) => item.label == activeName);
|
|
294
|
+
}
|
|
295
|
+
if (tab) {
|
|
296
|
+
tab.showContent = false;
|
|
297
|
+
setTimeout(() => {
|
|
298
|
+
tab.showContent = true;
|
|
299
|
+
}, 200);
|
|
300
|
+
}
|
|
301
|
+
},
|
|
234
302
|
},
|
|
235
303
|
};
|
|
236
304
|
</script>
|