cloud-web-corejs 1.0.54-dev.455 → 1.0.54-dev.457
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 +69 -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,29 @@
|
|
|
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
|
+
:openEditDialog="openEditDialog"
|
|
55
|
+
></vFormRender>
|
|
56
|
+
</div>
|
|
57
|
+
</el-tab-pane>
|
|
35
58
|
<template #editTab="{ tab, index, reloadTabContent }">
|
|
36
59
|
<el-tab-pane
|
|
37
60
|
:key="tab.data.id"
|
|
@@ -124,8 +147,21 @@ export default {
|
|
|
124
147
|
param: {},
|
|
125
148
|
multiTabLabelField: null,
|
|
126
149
|
formData: null,
|
|
150
|
+
otherTabList: [],
|
|
127
151
|
};
|
|
128
152
|
},
|
|
153
|
+
watch: {
|
|
154
|
+
activeName(val) {
|
|
155
|
+
if (
|
|
156
|
+
this.formJson.formConfig.otherTabEnabled &&
|
|
157
|
+
this.otherTabList.length > 0 &&
|
|
158
|
+
val.startsWith("otherTab")
|
|
159
|
+
) {
|
|
160
|
+
let num = Number(val.substring("otherTab".length));
|
|
161
|
+
this.otherTabList[num].showContent = true;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
},
|
|
129
165
|
created() {
|
|
130
166
|
this.initParam();
|
|
131
167
|
this.getReportTemplate();
|
|
@@ -168,6 +204,7 @@ export default {
|
|
|
168
204
|
}
|
|
169
205
|
this.addFormCode = addFormCode;
|
|
170
206
|
this.multiTabLabelField = formJson.formConfig?.multiTabLabelField;
|
|
207
|
+
this.initOtherTabList();
|
|
171
208
|
},
|
|
172
209
|
});
|
|
173
210
|
},
|
|
@@ -231,6 +268,38 @@ export default {
|
|
|
231
268
|
this.formData = {};
|
|
232
269
|
this.$reloadHandle(...arguments);
|
|
233
270
|
},
|
|
271
|
+
initOtherTabList() {
|
|
272
|
+
if (!this.formJson.formConfig.otherTabEnabled) return;
|
|
273
|
+
this.otherTabList = this.formJson.formConfig.otherTabList
|
|
274
|
+
.filter((item) => !!item.formCode && !!item.label)
|
|
275
|
+
.map((item) => {
|
|
276
|
+
return {
|
|
277
|
+
label: item.label,
|
|
278
|
+
formCode: item.formCode,
|
|
279
|
+
showContent: false,
|
|
280
|
+
dataId: null,
|
|
281
|
+
param: null,
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
},
|
|
285
|
+
reloadAutoContent(target, param, tab) {
|
|
286
|
+
let updateParam =
|
|
287
|
+
param != null && param.updateParam != null ? param.updateParam : {};
|
|
288
|
+
for (let key in updateParam) {
|
|
289
|
+
target.$emit("update:" + key, updateParam[key]);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (!tab) {
|
|
293
|
+
let activeName = this.activeName;
|
|
294
|
+
tab = this.tabs.find((item) => item.label == activeName);
|
|
295
|
+
}
|
|
296
|
+
if (tab) {
|
|
297
|
+
tab.showContent = false;
|
|
298
|
+
setTimeout(() => {
|
|
299
|
+
tab.showContent = true;
|
|
300
|
+
}, 200);
|
|
301
|
+
}
|
|
302
|
+
},
|
|
234
303
|
},
|
|
235
304
|
};
|
|
236
305
|
</script>
|