cloud-web-corejs 1.0.54-dev.757 → 1.0.54-dev.759
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/jsonImport/mixins.js +350 -350
- package/src/components/langImport/mixins.js +502 -502
- package/src/components/wf/wf.js +2221 -2221
- package/src/components/xform/form-designer/designer.js +2027 -2027
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -1774
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +1553 -1553
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -370
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -655
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -173
- package/src/components/xform/form-render/container-item/detail-item.vue +287 -287
- package/src/components/xform/form-render/indexMixin.js +23 -23
- package/src/components/xform/utils/util.js +5 -5
- package/src/index.js +2 -0
- package/src/microRouter/index.js +68 -7
- package/src/store/modules/micro.js +5 -0
- package/src/store/modules/permission.js +46 -1
- package/src/views/user/home/default2.vue +1158 -1158
- package/src/views/user/login/indexMixin.js +661 -661
|
@@ -1,1553 +1,1553 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-form
|
|
4
|
-
:model="formConfig"
|
|
5
|
-
size="mini"
|
|
6
|
-
label-position="left"
|
|
7
|
-
label-width="120px"
|
|
8
|
-
class="setting-form"
|
|
9
|
-
@submit.native.prevent
|
|
10
|
-
>
|
|
11
|
-
<el-collapse v-model="formActiveCollapseNames" class="setting-collapse">
|
|
12
|
-
<el-collapse-item
|
|
13
|
-
name="1"
|
|
14
|
-
:title="i18nt('designer.setting.basicSetting')"
|
|
15
|
-
>
|
|
16
|
-
<el-form-item :label="i18nt('数据库表')">
|
|
17
|
-
<el-input type="text" v-model="formConfig.entity"></el-input>
|
|
18
|
-
</el-form-item>
|
|
19
|
-
<el-form-item :label="i18nt('数据保存脚本编码')">
|
|
20
|
-
<el-input
|
|
21
|
-
type="text"
|
|
22
|
-
v-model="formConfig.saveScriptCode"
|
|
23
|
-
placeholder="默认saveUpdatge"
|
|
24
|
-
></el-input>
|
|
25
|
-
</el-form-item>
|
|
26
|
-
<el-form-item label="全局参数配置">
|
|
27
|
-
<a
|
|
28
|
-
href="javascript:void(0);"
|
|
29
|
-
class="a-link link-oneLind"
|
|
30
|
-
@click="editFormEventHandler('globalConfig')"
|
|
31
|
-
>
|
|
32
|
-
<span>{{ formConfig.globalConfig }}</span>
|
|
33
|
-
<i class="el-icon-edit"></i>
|
|
34
|
-
</a>
|
|
35
|
-
</el-form-item>
|
|
36
|
-
<el-form-item :label="i18nt('designer.setting.globalFunctions')">
|
|
37
|
-
<a
|
|
38
|
-
href="javascript:void(0);"
|
|
39
|
-
class="a-link link-oneLind"
|
|
40
|
-
@click="editGlobalFunctions"
|
|
41
|
-
>
|
|
42
|
-
<span>{{ formConfig.functions }}</span>
|
|
43
|
-
<i class="el-icon-edit"></i>
|
|
44
|
-
</a>
|
|
45
|
-
</el-form-item>
|
|
46
|
-
<el-form-item :label="i18nt('designer.setting.formCss')">
|
|
47
|
-
<el-button
|
|
48
|
-
type="info"
|
|
49
|
-
icon="el-icon-edit"
|
|
50
|
-
plain
|
|
51
|
-
round
|
|
52
|
-
@click="editFormCss"
|
|
53
|
-
>
|
|
54
|
-
{{ i18nt("designer.setting.addCss") }}
|
|
55
|
-
</el-button>
|
|
56
|
-
</el-form-item>
|
|
57
|
-
</el-collapse-item>
|
|
58
|
-
<el-collapse-item name="2" title="详情表单信息">
|
|
59
|
-
<el-form-item :label="i18nt('加载详情数据')">
|
|
60
|
-
<el-switch v-model="formConfig.isLoadEntity"></el-switch>
|
|
61
|
-
</el-form-item>
|
|
62
|
-
<el-form-item :label="i18nt('详情数据脚本编码')">
|
|
63
|
-
<el-input
|
|
64
|
-
type="text"
|
|
65
|
-
v-model="formConfig.formScriptCode"
|
|
66
|
-
placeholder="默认getOne"
|
|
67
|
-
></el-input>
|
|
68
|
-
</el-form-item>
|
|
69
|
-
<el-form-item :label="i18nt('详情数据脚本参数')">
|
|
70
|
-
<a
|
|
71
|
-
href="javascript:void(0);"
|
|
72
|
-
class="a-link link-oneLind"
|
|
73
|
-
@click="editFormScriptParam"
|
|
74
|
-
>
|
|
75
|
-
<span>{{ formConfig.formScriptParam }}</span>
|
|
76
|
-
<i class="el-icon-edit"></i>
|
|
77
|
-
</a>
|
|
78
|
-
</el-form-item>
|
|
79
|
-
<el-form-item :label="i18nt('详情数据脚本回调')">
|
|
80
|
-
<a
|
|
81
|
-
href="javascript:void(0);"
|
|
82
|
-
class="a-link link-oneLind"
|
|
83
|
-
@click="editFormScriptSuccess"
|
|
84
|
-
>
|
|
85
|
-
<span>{{ formConfig.formScriptSuccess }}</span>
|
|
86
|
-
<i class="el-icon-edit"></i>
|
|
87
|
-
</a>
|
|
88
|
-
</el-form-item>
|
|
89
|
-
<el-form-item :label="i18nt('查看页面表单编码')">
|
|
90
|
-
<el-input
|
|
91
|
-
class="search-input"
|
|
92
|
-
max="200"
|
|
93
|
-
v-model="formConfig.editFormCode"
|
|
94
|
-
@clear="
|
|
95
|
-
formConfig.editFormName = null;
|
|
96
|
-
$forceUpdate();
|
|
97
|
-
"
|
|
98
|
-
v-el-readonly
|
|
99
|
-
clearable
|
|
100
|
-
>
|
|
101
|
-
<i
|
|
102
|
-
slot="suffix"
|
|
103
|
-
class="el-input__icon el-icon-search"
|
|
104
|
-
@click="openFormTemplate(2)"
|
|
105
|
-
></i>
|
|
106
|
-
</el-input>
|
|
107
|
-
</el-form-item>
|
|
108
|
-
<el-form-item :label="i18nt('查看页面表单名称')">
|
|
109
|
-
{{ formConfig.editFormName }}
|
|
110
|
-
</el-form-item>
|
|
111
|
-
<el-form-item :label="i18nt('新增页面表单编码')">
|
|
112
|
-
<el-input
|
|
113
|
-
class="search-input"
|
|
114
|
-
max="200"
|
|
115
|
-
v-model="formConfig.addFormCode"
|
|
116
|
-
@clear="
|
|
117
|
-
formConfig.addFormCode = null;
|
|
118
|
-
formConfig.addFormName = null;
|
|
119
|
-
$forceUpdate();
|
|
120
|
-
"
|
|
121
|
-
v-el-readonly
|
|
122
|
-
clearable
|
|
123
|
-
placeholder="默认使用查看表单编码"
|
|
124
|
-
>
|
|
125
|
-
<i
|
|
126
|
-
slot="suffix"
|
|
127
|
-
class="el-input__icon el-icon-search"
|
|
128
|
-
@click="openFormTemplate(1)"
|
|
129
|
-
></i>
|
|
130
|
-
</el-input>
|
|
131
|
-
</el-form-item>
|
|
132
|
-
<el-form-item :label="i18nt('新增页面表单名称')">
|
|
133
|
-
{{ formConfig.addFormName }}
|
|
134
|
-
</el-form-item>
|
|
135
|
-
<el-form-item :label="i18nt('详情翻单按钮')">
|
|
136
|
-
<el-switch v-model="formConfig.billNavEnabled"></el-switch>
|
|
137
|
-
<span style="margin-left: 8px; color: #999; font-size: 12px">
|
|
138
|
-
编辑态页签显示「上一单/下一单」
|
|
139
|
-
</span>
|
|
140
|
-
</el-form-item>
|
|
141
|
-
</el-collapse-item>
|
|
142
|
-
<el-collapse-item name="3" title="流程信息">
|
|
143
|
-
<el-form-item :label="i18nt('启用流程')">
|
|
144
|
-
<el-switch
|
|
145
|
-
v-model="formConfig.wfEnabled"
|
|
146
|
-
@change="changeWfEnabled"
|
|
147
|
-
></el-switch>
|
|
148
|
-
</el-form-item>
|
|
149
|
-
<el-form-item :label="i18nt('默认流程单据类型名称')">
|
|
150
|
-
<el-input
|
|
151
|
-
type="text"
|
|
152
|
-
v-model="designer.vueInstance.reportTemplate.objTypeName"
|
|
153
|
-
></el-input>
|
|
154
|
-
</el-form-item>
|
|
155
|
-
<el-form-item>
|
|
156
|
-
<span slot="label"
|
|
157
|
-
>流程主题
|
|
158
|
-
<scriptDescriptionButton
|
|
159
|
-
title="流程主题说明"
|
|
160
|
-
path="static/readme/WfSubject.txt"
|
|
161
|
-
></scriptDescriptionButton>
|
|
162
|
-
</span>
|
|
163
|
-
</el-form-item>
|
|
164
|
-
<div>
|
|
165
|
-
<el-input
|
|
166
|
-
style="word-break: break-word"
|
|
167
|
-
type="textarea"
|
|
168
|
-
:rows="3"
|
|
169
|
-
v-model="formConfig.wfTheme"
|
|
170
|
-
clearable
|
|
171
|
-
></el-input>
|
|
172
|
-
</div>
|
|
173
|
-
<el-form-item :label="i18nt('流程启动时自动保存表单数据')">
|
|
174
|
-
<el-switch v-model="formConfig.wfStartBindSave"></el-switch>
|
|
175
|
-
</el-form-item>
|
|
176
|
-
<el-form-item :label="i18nt('流程启动确认提示脚本')">
|
|
177
|
-
<a
|
|
178
|
-
href="javascript:void(0);"
|
|
179
|
-
class="a-link link-oneLind"
|
|
180
|
-
@click="editFormEventHandler('wfStartConfirmText')"
|
|
181
|
-
>
|
|
182
|
-
<span>{{ formConfig.wfStartConfirmText }}</span>
|
|
183
|
-
<i class="el-icon-edit"></i>
|
|
184
|
-
</a>
|
|
185
|
-
</el-form-item>
|
|
186
|
-
|
|
187
|
-
<el-form-item :label="i18nt('流程通过时自动保存表单数据')">
|
|
188
|
-
<el-switch v-model="formConfig.wfAgreenBindSave"></el-switch>
|
|
189
|
-
</el-form-item>
|
|
190
|
-
<el-form-item :label="i18nt('流程通过时自动保存表单数据的节点配置')">
|
|
191
|
-
<a
|
|
192
|
-
href="javascript:void(0);"
|
|
193
|
-
class="a-link link-oneLind"
|
|
194
|
-
@click="openWfConfigDataDialog2"
|
|
195
|
-
>
|
|
196
|
-
<span>{{
|
|
197
|
-
formConfig.wfAgreeConfigData &&
|
|
198
|
-
formConfig.wfAgreeConfigData.length
|
|
199
|
-
? "已维护"
|
|
200
|
-
: ""
|
|
201
|
-
}}</span>
|
|
202
|
-
<i class="el-icon-edit"></i>
|
|
203
|
-
</a>
|
|
204
|
-
</el-form-item>
|
|
205
|
-
<el-form-item :label="i18nt('启用流程节点可编辑表单')">
|
|
206
|
-
<el-switch v-model="formConfig.wfConfigDataEnabled"></el-switch>
|
|
207
|
-
</el-form-item>
|
|
208
|
-
<el-form-item :label="i18nt('流程节点可编辑表单配置')">
|
|
209
|
-
<a
|
|
210
|
-
href="javascript:void(0);"
|
|
211
|
-
class="a-link link-oneLind"
|
|
212
|
-
@click="openWfConfigDataDialog"
|
|
213
|
-
>
|
|
214
|
-
<span>{{
|
|
215
|
-
formConfig.wfConfigData && formConfig.wfConfigData.length
|
|
216
|
-
? "已维护"
|
|
217
|
-
: ""
|
|
218
|
-
}}</span>
|
|
219
|
-
<i class="el-icon-edit"></i>
|
|
220
|
-
</a>
|
|
221
|
-
</el-form-item>
|
|
222
|
-
<el-form-item :label="i18nt('引用流程的表单编码')">
|
|
223
|
-
<el-input
|
|
224
|
-
type="text"
|
|
225
|
-
v-model="designer.vueInstance.reportTemplate.fromWfFormCode"
|
|
226
|
-
></el-input>
|
|
227
|
-
</el-form-item>
|
|
228
|
-
<el-form-item :label="i18nt('流程自定义配置')">
|
|
229
|
-
<a
|
|
230
|
-
href="javascript:void(0);"
|
|
231
|
-
class="a-link link-oneLind"
|
|
232
|
-
@click="editFormEventHandler('wfConfig')"
|
|
233
|
-
>
|
|
234
|
-
<span>{{ formConfig.wfConfig }}</span>
|
|
235
|
-
<i class="el-icon-edit"></i>
|
|
236
|
-
</a>
|
|
237
|
-
</el-form-item>
|
|
238
|
-
</el-collapse-item>
|
|
239
|
-
<el-collapse-item name="4" title="列表标签页信息">
|
|
240
|
-
<el-form-item :label="i18nt('列表启用详情多标签')">
|
|
241
|
-
<el-switch v-model="formConfig.multiTabEnabled"></el-switch>
|
|
242
|
-
</el-form-item>
|
|
243
|
-
<el-form-item :label="i18nt('标签名称字段')">
|
|
244
|
-
<el-input
|
|
245
|
-
type="text"
|
|
246
|
-
v-model="formConfig.multiTabLabelField"
|
|
247
|
-
></el-input>
|
|
248
|
-
</el-form-item>
|
|
249
|
-
<el-form-item
|
|
250
|
-
v-if="formConfig.multiTabEnabled"
|
|
251
|
-
:label="i18nt('新增打开页签')"
|
|
252
|
-
>
|
|
253
|
-
<el-switch v-model="formConfig.addTabEnabled"></el-switch>
|
|
254
|
-
<span style="margin-left: 8px; color: #999; font-size: 12px">
|
|
255
|
-
开启后新增打开独立可关闭页签,需配置「标签名称字段」
|
|
256
|
-
</span>
|
|
257
|
-
</el-form-item>
|
|
258
|
-
<el-form-item :label="i18nt('流程启动后行为')">
|
|
259
|
-
<el-radio-group v-model="formConfig.submitBehavior">
|
|
260
|
-
<el-radio label="closeToList">关闭页签并回列表刷新</el-radio>
|
|
261
|
-
<el-radio label="refreshCurrent">刷新当前页签</el-radio>
|
|
262
|
-
</el-radio-group>
|
|
263
|
-
</el-form-item>
|
|
264
|
-
</el-collapse-item>
|
|
265
|
-
<el-collapse-item name="5" title="其他标签页信息">
|
|
266
|
-
<el-form-item :label="i18nt('自定义列表标签名称')">
|
|
267
|
-
<el-input
|
|
268
|
-
type="text"
|
|
269
|
-
v-model="formConfig.customListTabLabel"
|
|
270
|
-
placeholder="默认`列表`"
|
|
271
|
-
></el-input>
|
|
272
|
-
</el-form-item>
|
|
273
|
-
<el-form-item :label="i18nt('启用其他标签页')">
|
|
274
|
-
<el-switch v-model="formConfig.otherTabEnabled"></el-switch>
|
|
275
|
-
</el-form-item>
|
|
276
|
-
<el-form-item :label="i18nt('隐藏常规标签')">
|
|
277
|
-
<el-switch v-model="formConfig.hideNormalTab"></el-switch>
|
|
278
|
-
</el-form-item>
|
|
279
|
-
<el-form-item :label="i18nt('其他标签页配置')"> </el-form-item>
|
|
280
|
-
<el-form-item label-width="0">
|
|
281
|
-
<div>
|
|
282
|
-
<draggable
|
|
283
|
-
tag="ul"
|
|
284
|
-
class="draggable-box"
|
|
285
|
-
:list="formConfig.otherTabList"
|
|
286
|
-
v-bind="{
|
|
287
|
-
group: 'optionsGroup',
|
|
288
|
-
ghostClass: 'ghost',
|
|
289
|
-
handle: '.drag-option',
|
|
290
|
-
}"
|
|
291
|
-
>
|
|
292
|
-
<li v-for="(option, idx) in formConfig.otherTabList" :key="idx">
|
|
293
|
-
<el-input
|
|
294
|
-
v-model="option.label"
|
|
295
|
-
size="mini"
|
|
296
|
-
style="width: 100px"
|
|
297
|
-
placeholder="标签名称"
|
|
298
|
-
></el-input>
|
|
299
|
-
<el-input
|
|
300
|
-
v-model="option.formCode"
|
|
301
|
-
size="mini"
|
|
302
|
-
style="width: 100px"
|
|
303
|
-
placeholder="表单模板编码"
|
|
304
|
-
></el-input>
|
|
305
|
-
<i class="el-icon-s-operation drag-option"></i>
|
|
306
|
-
<el-button
|
|
307
|
-
circle
|
|
308
|
-
plain
|
|
309
|
-
size="mini"
|
|
310
|
-
type="danger"
|
|
311
|
-
@click="formConfig.otherTabList.splice(idx, 1)"
|
|
312
|
-
icon="el-icon-minus"
|
|
313
|
-
class="col-delete-button"
|
|
314
|
-
></el-button>
|
|
315
|
-
</li>
|
|
316
|
-
</draggable>
|
|
317
|
-
<el-button type="text" @click="addOtherTab">{{
|
|
318
|
-
i18nt("designer.setting.addOption")
|
|
319
|
-
}}</el-button>
|
|
320
|
-
</div>
|
|
321
|
-
</el-form-item>
|
|
322
|
-
</el-collapse-item>
|
|
323
|
-
<el-collapse-item name="6" title="查询弹框展示信息">
|
|
324
|
-
<el-form-item :label="i18nt('展示字段')">
|
|
325
|
-
<el-input
|
|
326
|
-
class="search-input"
|
|
327
|
-
max="200"
|
|
328
|
-
v-model="formConfig.searchDialogNameField"
|
|
329
|
-
clearable
|
|
330
|
-
>
|
|
331
|
-
</el-input>
|
|
332
|
-
</el-form-item>
|
|
333
|
-
<el-form-item :label="i18nt('数据唯一标识')">
|
|
334
|
-
<el-input
|
|
335
|
-
class="search-input"
|
|
336
|
-
max="200"
|
|
337
|
-
v-model="formConfig.searchDialogUniqueField"
|
|
338
|
-
clearable
|
|
339
|
-
>
|
|
340
|
-
</el-input>
|
|
341
|
-
</el-form-item>
|
|
342
|
-
</el-collapse-item>
|
|
343
|
-
|
|
344
|
-
<el-collapse-item name="8" title="动态字段规则">
|
|
345
|
-
<form-dynamic-field-setting
|
|
346
|
-
:designer="designer"
|
|
347
|
-
:form-config="formConfig"
|
|
348
|
-
></form-dynamic-field-setting>
|
|
349
|
-
</el-collapse-item>
|
|
350
|
-
|
|
351
|
-
<el-collapse-item
|
|
352
|
-
v-if="showEventCollapse()"
|
|
353
|
-
name="7"
|
|
354
|
-
:title="i18nt('designer.setting.eventSetting')"
|
|
355
|
-
>
|
|
356
|
-
<!-- <el-form-item label="onBeforeCreated" label-width="150px">
|
|
357
|
-
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
358
|
-
@click="editFormEventHandler('onBeforeCreated', ['dataId','done'])">
|
|
359
|
-
<span>{{ formConfig.onBeforeCreated }}</span>
|
|
360
|
-
<i class="el-icon-edit"></i>
|
|
361
|
-
</a>
|
|
362
|
-
</el-form-item>-->
|
|
363
|
-
<el-form-item label="onFormCreated" label-width="150px">
|
|
364
|
-
<a
|
|
365
|
-
href="javascript:void(0);"
|
|
366
|
-
class="a-link link-oneLind"
|
|
367
|
-
@click="editFormEventHandler('onFormCreated')"
|
|
368
|
-
>
|
|
369
|
-
<span>{{ formConfig.onFormCreated }}</span>
|
|
370
|
-
<i class="el-icon-edit"></i>
|
|
371
|
-
</a>
|
|
372
|
-
</el-form-item>
|
|
373
|
-
<el-form-item label="onFormBeforeMounted" label-width="150px">
|
|
374
|
-
<a
|
|
375
|
-
href="javascript:void(0);"
|
|
376
|
-
class="a-link link-oneLind"
|
|
377
|
-
@click="editFormEventHandler('onFormBeforeMounted')"
|
|
378
|
-
>
|
|
379
|
-
<span>{{ formConfig.onFormBeforeMounted }}</span>
|
|
380
|
-
<i class="el-icon-edit"></i>
|
|
381
|
-
</a>
|
|
382
|
-
</el-form-item>
|
|
383
|
-
<el-form-item label="onFormMounted" label-width="150px">
|
|
384
|
-
<a
|
|
385
|
-
href="javascript:void(0);"
|
|
386
|
-
class="a-link link-oneLind"
|
|
387
|
-
@click="editFormEventHandler('onFormMounted')"
|
|
388
|
-
>
|
|
389
|
-
<span>{{ formConfig.onFormMounted }}</span>
|
|
390
|
-
<i class="el-icon-edit"></i>
|
|
391
|
-
</a>
|
|
392
|
-
</el-form-item>
|
|
393
|
-
<!-- -->
|
|
394
|
-
<el-form-item label="onFormDataChange" label-width="150px">
|
|
395
|
-
<a
|
|
396
|
-
href="javascript:void(0);"
|
|
397
|
-
class="a-link link-oneLind"
|
|
398
|
-
@click="editFormEventHandler('onFormDataChange')"
|
|
399
|
-
>
|
|
400
|
-
<span>{{ formConfig.onFormDataChange }}</span>
|
|
401
|
-
<i class="el-icon-edit"></i>
|
|
402
|
-
</a>
|
|
403
|
-
</el-form-item>
|
|
404
|
-
<!-- -->
|
|
405
|
-
<!--
|
|
406
|
-
<el-form-item label="onFormValidate">
|
|
407
|
-
<el-button type="info" icon="el-icon-edit" plain round @click="editFormEventHandler('onFormValidate')">
|
|
408
|
-
{{i18nt('designer.setting.addEventHandler')}}</el-button>
|
|
409
|
-
</el-form-item>
|
|
410
|
-
-->
|
|
411
|
-
</el-collapse-item>
|
|
412
|
-
</el-collapse>
|
|
413
|
-
</el-form>
|
|
414
|
-
|
|
415
|
-
<el-dialog
|
|
416
|
-
:title="formEventDialogTitle"
|
|
417
|
-
:visible.sync="showFormEventDialogFlag"
|
|
418
|
-
v-if="showFormEventDialogFlag"
|
|
419
|
-
:show-close="true"
|
|
420
|
-
custom-class="dialog-style list-dialog"
|
|
421
|
-
v-dialog-drag
|
|
422
|
-
:close-on-click-modal="false"
|
|
423
|
-
:close-on-press-escape="false"
|
|
424
|
-
:destroy-on-close="true"
|
|
425
|
-
:append-to-body="true"
|
|
426
|
-
:modal-append-to-body="true"
|
|
427
|
-
top="5vh"
|
|
428
|
-
>
|
|
429
|
-
<div class="cont">
|
|
430
|
-
<el-alert
|
|
431
|
-
type="info"
|
|
432
|
-
:closable="false"
|
|
433
|
-
:title="'form.' + eventParamsMap[curEventName]"
|
|
434
|
-
></el-alert>
|
|
435
|
-
<code-editor
|
|
436
|
-
:mode="'javascript'"
|
|
437
|
-
:readonly="false"
|
|
438
|
-
v-model="formEventHandlerCode"
|
|
439
|
-
ref="ecEditor"
|
|
440
|
-
></code-editor>
|
|
441
|
-
<el-alert type="info" :closable="false" title="}"></el-alert>
|
|
442
|
-
</div>
|
|
443
|
-
<div slot="footer" class="dialog-footer">
|
|
444
|
-
<el-button
|
|
445
|
-
@click="showFormEventDialogFlag = false"
|
|
446
|
-
class="button-sty"
|
|
447
|
-
icon="el-icon-close"
|
|
448
|
-
>
|
|
449
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
450
|
-
</el-button>
|
|
451
|
-
<el-button
|
|
452
|
-
type="primary"
|
|
453
|
-
@click="saveFormEventHandler"
|
|
454
|
-
class="button-sty"
|
|
455
|
-
icon="el-icon-check"
|
|
456
|
-
>
|
|
457
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
458
|
-
</el-button>
|
|
459
|
-
</div>
|
|
460
|
-
</el-dialog>
|
|
461
|
-
|
|
462
|
-
<el-dialog
|
|
463
|
-
:title="i18nt('designer.setting.formCss')"
|
|
464
|
-
:visible.sync="showEditFormCssDialogFlag"
|
|
465
|
-
v-if="showEditFormCssDialogFlag"
|
|
466
|
-
:show-close="true"
|
|
467
|
-
custom-class="dialog-style list-dialog"
|
|
468
|
-
v-dialog-drag
|
|
469
|
-
:close-on-click-modal="false"
|
|
470
|
-
:close-on-press-escape="false"
|
|
471
|
-
:destroy-on-close="true"
|
|
472
|
-
:append-to-body="true"
|
|
473
|
-
:modal-append-to-body="true"
|
|
474
|
-
>
|
|
475
|
-
<div class="cont">
|
|
476
|
-
<code-editor
|
|
477
|
-
:mode="'css'"
|
|
478
|
-
:readonly="false"
|
|
479
|
-
v-model="formCssCode"
|
|
480
|
-
></code-editor>
|
|
481
|
-
</div>
|
|
482
|
-
<div slot="footer" class="dialog-footer">
|
|
483
|
-
<el-button
|
|
484
|
-
@click="showEditFormCssDialogFlag = false"
|
|
485
|
-
class="button-sty"
|
|
486
|
-
icon="el-icon-close"
|
|
487
|
-
>
|
|
488
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
489
|
-
</el-button>
|
|
490
|
-
<el-button
|
|
491
|
-
type="primary"
|
|
492
|
-
@click="saveFormCss"
|
|
493
|
-
class="button-sty"
|
|
494
|
-
icon="el-icon-check"
|
|
495
|
-
>
|
|
496
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
497
|
-
</el-button>
|
|
498
|
-
</div>
|
|
499
|
-
</el-dialog>
|
|
500
|
-
|
|
501
|
-
<el-dialog
|
|
502
|
-
:title="i18nt('designer.setting.globalFunctions')"
|
|
503
|
-
:visible.sync="showEditFunctionsDialogFlag"
|
|
504
|
-
v-if="showEditFunctionsDialogFlag"
|
|
505
|
-
:show-close="true"
|
|
506
|
-
custom-class="dialog-style list-dialog"
|
|
507
|
-
v-dialog-drag
|
|
508
|
-
:close-on-click-modal="false"
|
|
509
|
-
:close-on-press-escape="false"
|
|
510
|
-
:destroy-on-close="true"
|
|
511
|
-
:append-to-body="true"
|
|
512
|
-
:modal-append-to-body="true"
|
|
513
|
-
>
|
|
514
|
-
<div class="cont">
|
|
515
|
-
<code-editor
|
|
516
|
-
:mode="'javascript'"
|
|
517
|
-
:readonly="false"
|
|
518
|
-
v-model="functionsCode"
|
|
519
|
-
ref="gfEditor"
|
|
520
|
-
></code-editor>
|
|
521
|
-
</div>
|
|
522
|
-
<div slot="footer" class="dialog-footer">
|
|
523
|
-
<el-button
|
|
524
|
-
@click="showEditFunctionsDialogFlag = false"
|
|
525
|
-
class="button-sty"
|
|
526
|
-
icon="el-icon-close"
|
|
527
|
-
>
|
|
528
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
529
|
-
</el-button>
|
|
530
|
-
<el-button
|
|
531
|
-
type="primary"
|
|
532
|
-
@click="saveGlobalFunctions"
|
|
533
|
-
class="button-sty"
|
|
534
|
-
icon="el-icon-check"
|
|
535
|
-
>
|
|
536
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
537
|
-
</el-button>
|
|
538
|
-
</div>
|
|
539
|
-
</el-dialog>
|
|
540
|
-
|
|
541
|
-
<el-dialog
|
|
542
|
-
:title="i18nt('详情数据脚本参数')"
|
|
543
|
-
:visible.sync="showFormScriptParamDialog"
|
|
544
|
-
v-if="showFormScriptParamDialog"
|
|
545
|
-
:show-close="true"
|
|
546
|
-
custom-class="dialog-style list-dialog"
|
|
547
|
-
v-dialog-drag
|
|
548
|
-
:close-on-click-modal="false"
|
|
549
|
-
:close-on-press-escape="false"
|
|
550
|
-
:destroy-on-close="true"
|
|
551
|
-
:append-to-body="true"
|
|
552
|
-
:modal-append-to-body="true"
|
|
553
|
-
>
|
|
554
|
-
<div class="cont">
|
|
555
|
-
<code-editor
|
|
556
|
-
:mode="'javascript'"
|
|
557
|
-
:readonly="false"
|
|
558
|
-
v-model="formScriptParam"
|
|
559
|
-
ref="gfEditor"
|
|
560
|
-
></code-editor>
|
|
561
|
-
</div>
|
|
562
|
-
<div slot="footer" class="dialog-footer">
|
|
563
|
-
<el-button
|
|
564
|
-
@click="showFormScriptParamDialog = false"
|
|
565
|
-
class="button-sty"
|
|
566
|
-
icon="el-icon-close"
|
|
567
|
-
>
|
|
568
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
569
|
-
</el-button>
|
|
570
|
-
<el-button
|
|
571
|
-
type="primary"
|
|
572
|
-
@click="saveFormScriptParam"
|
|
573
|
-
class="button-sty"
|
|
574
|
-
icon="el-icon-check"
|
|
575
|
-
>
|
|
576
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
577
|
-
</el-button>
|
|
578
|
-
</div>
|
|
579
|
-
</el-dialog>
|
|
580
|
-
<el-dialog
|
|
581
|
-
:title="i18nt('详情数据脚本回调')"
|
|
582
|
-
:visible.sync="showFormScriptSuccessDialog"
|
|
583
|
-
v-if="showFormScriptSuccessDialog"
|
|
584
|
-
:show-close="true"
|
|
585
|
-
custom-class="dialog-style list-dialog"
|
|
586
|
-
v-dialog-drag
|
|
587
|
-
:close-on-click-modal="false"
|
|
588
|
-
:close-on-press-escape="false"
|
|
589
|
-
:destroy-on-close="true"
|
|
590
|
-
:append-to-body="true"
|
|
591
|
-
:modal-append-to-body="true"
|
|
592
|
-
>
|
|
593
|
-
<div class="cont">
|
|
594
|
-
<code-editor
|
|
595
|
-
:mode="'javascript'"
|
|
596
|
-
:readonly="false"
|
|
597
|
-
v-model="formScriptSuccess"
|
|
598
|
-
ref="gfEditor"
|
|
599
|
-
></code-editor>
|
|
600
|
-
</div>
|
|
601
|
-
<div slot="footer" class="dialog-footer">
|
|
602
|
-
<el-button
|
|
603
|
-
@click="showFormScriptSuccessDialog = false"
|
|
604
|
-
class="button-sty"
|
|
605
|
-
icon="el-icon-close"
|
|
606
|
-
>
|
|
607
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
608
|
-
</el-button>
|
|
609
|
-
<el-button
|
|
610
|
-
type="primary"
|
|
611
|
-
@click="saveFormScriptSuccess"
|
|
612
|
-
class="button-sty"
|
|
613
|
-
icon="el-icon-check"
|
|
614
|
-
>
|
|
615
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
616
|
-
</el-button>
|
|
617
|
-
</div>
|
|
618
|
-
</el-dialog>
|
|
619
|
-
<el-dialog
|
|
620
|
-
v-if="dialogVisible"
|
|
621
|
-
custom-class="dialog-style list-dialog"
|
|
622
|
-
:title="i18nt('流程节点可编辑表单配置')"
|
|
623
|
-
:visible.sync="dialogVisible"
|
|
624
|
-
:show-close="!0"
|
|
625
|
-
:append-to-body="true"
|
|
626
|
-
:modal="false"
|
|
627
|
-
:close-on-click-modal="!1"
|
|
628
|
-
:close-on-press-escape="!1"
|
|
629
|
-
:destroy-on-close="!0"
|
|
630
|
-
width="1220px"
|
|
631
|
-
top="5vh"
|
|
632
|
-
v-dialog-drag
|
|
633
|
-
:fullscreen="true"
|
|
634
|
-
>
|
|
635
|
-
<div class="cont" style="padding-bottom: 8px">
|
|
636
|
-
<el-table
|
|
637
|
-
ref="singleTable"
|
|
638
|
-
width="100%"
|
|
639
|
-
:data="wfConfigData"
|
|
640
|
-
height="100%"
|
|
641
|
-
border=""
|
|
642
|
-
row-key="columnId"
|
|
643
|
-
stripe=""
|
|
644
|
-
style="margin-bottom: 0px"
|
|
645
|
-
>
|
|
646
|
-
<el-table-column
|
|
647
|
-
type="index"
|
|
648
|
-
width="35"
|
|
649
|
-
fixed="left"
|
|
650
|
-
></el-table-column>
|
|
651
|
-
<!-- <el-table-column :label="i18nt('服务')" width="150">
|
|
652
|
-
<template slot-scope="{ row }">
|
|
653
|
-
<el-select v-model="row.serveType" @change="changeServeType(row)">
|
|
654
|
-
<el-option :value="1" label="正式"></el-option>
|
|
655
|
-
<el-option :value="2" label="UAT"></el-option>
|
|
656
|
-
<el-option :value="3" label="测试"></el-option>
|
|
657
|
-
<el-option :value="4" label="自定义"></el-option>
|
|
658
|
-
</el-select>
|
|
659
|
-
</template>
|
|
660
|
-
</el-table-column>
|
|
661
|
-
<el-table-column :label="i18nt('自定义服务')" width="150">
|
|
662
|
-
<template slot-scope="{ row }">
|
|
663
|
-
<el-input
|
|
664
|
-
v-model="row.serveName"
|
|
665
|
-
clearable
|
|
666
|
-
:disabled="row.serveType !== 4"
|
|
667
|
-
></el-input>
|
|
668
|
-
</template>
|
|
669
|
-
</el-table-column>
|
|
670
|
-
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
671
|
-
<template slot-scope="{ row, $index }">
|
|
672
|
-
<el-input v-model="row.companyCodes" clearable></el-input>
|
|
673
|
-
</template>
|
|
674
|
-
</el-table-column> -->
|
|
675
|
-
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
676
|
-
<template slot-scope="{ row, $index }">
|
|
677
|
-
<el-input
|
|
678
|
-
class="search-input"
|
|
679
|
-
max="200"
|
|
680
|
-
v-model="row.companyCodes"
|
|
681
|
-
@clear="clearBdCompanyEnv1(row)"
|
|
682
|
-
v-el-readonly
|
|
683
|
-
clearable
|
|
684
|
-
>
|
|
685
|
-
<i
|
|
686
|
-
slot="suffix"
|
|
687
|
-
class="el-input__icon el-icon-search"
|
|
688
|
-
@click="openBdCompanyEnvDialog1($index)"
|
|
689
|
-
></i>
|
|
690
|
-
</el-input>
|
|
691
|
-
</template>
|
|
692
|
-
</el-table-column>
|
|
693
|
-
<el-table-column :label="i18nt('服务名称')" width="150">
|
|
694
|
-
<template slot-scope="{ row }">
|
|
695
|
-
{{ row.serveName }}
|
|
696
|
-
</template>
|
|
697
|
-
</el-table-column>
|
|
698
|
-
<!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
|
|
699
|
-
<template slot-scope="{ row }">
|
|
700
|
-
<el-input v-model="row.modelKey" clearable></el-input>
|
|
701
|
-
</template>
|
|
702
|
-
</el-table-column> -->
|
|
703
|
-
<el-table-column :label="i18nt('流程模板序号')" width="150">
|
|
704
|
-
<template slot-scope="{ row }">
|
|
705
|
-
<base-input-number
|
|
706
|
-
v-model="row.modelOrders"
|
|
707
|
-
clearable
|
|
708
|
-
></base-input-number>
|
|
709
|
-
</template>
|
|
710
|
-
</el-table-column>
|
|
711
|
-
<el-table-column
|
|
712
|
-
:label="i18nt('节点步骤(多个值用“,”隔开)')"
|
|
713
|
-
width="250"
|
|
714
|
-
>
|
|
715
|
-
<template slot-scope="{ row }">
|
|
716
|
-
<el-input v-model="row.taskSteps" clearable></el-input>
|
|
717
|
-
</template>
|
|
718
|
-
</el-table-column>
|
|
719
|
-
<!-- <el-table-column :label="i18nt('设置')" width="150">
|
|
720
|
-
<template slot-scope="{row}">
|
|
721
|
-
<el-select v-model="row.type" clearable>
|
|
722
|
-
<el-option :value="1" label="可编辑"></el-option>
|
|
723
|
-
<el-option :value="2" label="仅显示"></el-option>
|
|
724
|
-
<el-option :value="3" label="隐藏"></el-option>
|
|
725
|
-
</el-select>
|
|
726
|
-
</template>
|
|
727
|
-
</el-table-column>-->
|
|
728
|
-
<el-table-column
|
|
729
|
-
:label="i18nt('designer.setting.actionColumn')"
|
|
730
|
-
width="100"
|
|
731
|
-
align="center"
|
|
732
|
-
>
|
|
733
|
-
<template #header>
|
|
734
|
-
<span>{{ i18nt("designer.setting.actionColumn") }}</span>
|
|
735
|
-
<el-button
|
|
736
|
-
:title="i18nt('designer.setting.addTableColumn')"
|
|
737
|
-
size="mini"
|
|
738
|
-
type=""
|
|
739
|
-
circle=""
|
|
740
|
-
icon="el-icon-plus"
|
|
741
|
-
@click="addItem"
|
|
742
|
-
></el-button>
|
|
743
|
-
</template>
|
|
744
|
-
<template slot-scope="scope">
|
|
745
|
-
<el-button
|
|
746
|
-
:title="i18nt('designer.setting.deleteTableColumn')"
|
|
747
|
-
size="mini"
|
|
748
|
-
type=""
|
|
749
|
-
circle=""
|
|
750
|
-
icon="el-icon-minus"
|
|
751
|
-
@click="wfConfigData.splice(scope.$index, 1)"
|
|
752
|
-
></el-button>
|
|
753
|
-
</template>
|
|
754
|
-
</el-table-column>
|
|
755
|
-
</el-table>
|
|
756
|
-
</div>
|
|
757
|
-
<div class="dialog-footer" slot="footer">
|
|
758
|
-
<el-button
|
|
759
|
-
@click="dialogVisible = false"
|
|
760
|
-
class="button-sty"
|
|
761
|
-
icon="el-icon-close"
|
|
762
|
-
>
|
|
763
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
764
|
-
</el-button>
|
|
765
|
-
<el-button
|
|
766
|
-
type="primary"
|
|
767
|
-
@click="confirmWfConfigDataDialog"
|
|
768
|
-
class="button-sty"
|
|
769
|
-
icon="el-icon-check"
|
|
770
|
-
>
|
|
771
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
772
|
-
</el-button>
|
|
773
|
-
</div>
|
|
774
|
-
</el-dialog>
|
|
775
|
-
|
|
776
|
-
<el-dialog
|
|
777
|
-
v-if="dialogVisible2"
|
|
778
|
-
custom-class="dialog-style list-dialog"
|
|
779
|
-
:title="i18nt('流程通过时自动保存表单数据的节点配置')"
|
|
780
|
-
:visible.sync="dialogVisible2"
|
|
781
|
-
:show-close="!0"
|
|
782
|
-
:append-to-body="true"
|
|
783
|
-
:modal="false"
|
|
784
|
-
:close-on-click-modal="!1"
|
|
785
|
-
:close-on-press-escape="!1"
|
|
786
|
-
:destroy-on-close="!0"
|
|
787
|
-
width="1220px"
|
|
788
|
-
top="5vh"
|
|
789
|
-
v-dialog-drag
|
|
790
|
-
:fullscreen="true"
|
|
791
|
-
>
|
|
792
|
-
<div class="cont" style="padding-bottom: 8px">
|
|
793
|
-
<el-table
|
|
794
|
-
ref="singleTable"
|
|
795
|
-
width="100%"
|
|
796
|
-
:data="wfAgreeConfigData"
|
|
797
|
-
height="100%"
|
|
798
|
-
border=""
|
|
799
|
-
row-key="columnId"
|
|
800
|
-
stripe=""
|
|
801
|
-
style="margin-bottom: 0px"
|
|
802
|
-
>
|
|
803
|
-
<el-table-column
|
|
804
|
-
type="index"
|
|
805
|
-
width="35"
|
|
806
|
-
fixed="left"
|
|
807
|
-
></el-table-column>
|
|
808
|
-
<!-- <el-table-column :label="i18nt('服务')" width="150">
|
|
809
|
-
<template slot-scope="{ row }">
|
|
810
|
-
<el-select v-model="row.serveType" @change="changeServeType(row)">
|
|
811
|
-
<el-option :value="1" label="正式"></el-option>
|
|
812
|
-
<el-option :value="2" label="UAT"></el-option>
|
|
813
|
-
<el-option :value="3" label="测试"></el-option>
|
|
814
|
-
<el-option :value="4" label="自定义"></el-option>
|
|
815
|
-
</el-select>
|
|
816
|
-
</template>
|
|
817
|
-
</el-table-column>
|
|
818
|
-
<el-table-column :label="i18nt('自定义服务')" width="150">
|
|
819
|
-
<template slot-scope="{ row }">
|
|
820
|
-
<el-input
|
|
821
|
-
v-model="row.serveName"
|
|
822
|
-
clearable
|
|
823
|
-
:disabled="row.serveType !== 4"
|
|
824
|
-
></el-input>
|
|
825
|
-
</template>
|
|
826
|
-
</el-table-column>
|
|
827
|
-
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
828
|
-
<template slot-scope="{ row, $index }">
|
|
829
|
-
<el-input v-model="row.companyCodes" clearable></el-input>
|
|
830
|
-
</template>
|
|
831
|
-
</el-table-column> -->
|
|
832
|
-
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
833
|
-
<template slot-scope="{ row, $index }">
|
|
834
|
-
<el-input
|
|
835
|
-
class="search-input"
|
|
836
|
-
max="200"
|
|
837
|
-
v-model="row.companyCodes"
|
|
838
|
-
@clear="clearBdCompanyEnv2(row)"
|
|
839
|
-
v-el-readonly
|
|
840
|
-
clearable
|
|
841
|
-
>
|
|
842
|
-
<i
|
|
843
|
-
slot="suffix"
|
|
844
|
-
class="el-input__icon el-icon-search"
|
|
845
|
-
@click="openBdCompanyEnvDialog2($index)"
|
|
846
|
-
></i>
|
|
847
|
-
</el-input>
|
|
848
|
-
</template>
|
|
849
|
-
</el-table-column>
|
|
850
|
-
<el-table-column :label="i18nt('服务名称')" width="150">
|
|
851
|
-
<template slot-scope="{ row }">
|
|
852
|
-
{{ row.serveName }}
|
|
853
|
-
</template>
|
|
854
|
-
</el-table-column>
|
|
855
|
-
<!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
|
|
856
|
-
<template slot-scope="{ row }">
|
|
857
|
-
<el-input v-model="row.modelKey" clearable></el-input>
|
|
858
|
-
</template>
|
|
859
|
-
</el-table-column> -->
|
|
860
|
-
<el-table-column :label="i18nt('流程模板序号')" width="150">
|
|
861
|
-
<template slot-scope="{ row }">
|
|
862
|
-
<base-input-number
|
|
863
|
-
v-model="row.modelOrders"
|
|
864
|
-
clearable
|
|
865
|
-
></base-input-number>
|
|
866
|
-
</template>
|
|
867
|
-
</el-table-column>
|
|
868
|
-
<el-table-column
|
|
869
|
-
:label="i18nt('节点步骤(多个值用“,”隔开)')"
|
|
870
|
-
width="250"
|
|
871
|
-
>
|
|
872
|
-
<template slot-scope="{ row }">
|
|
873
|
-
<el-input v-model="row.taskSteps" clearable></el-input>
|
|
874
|
-
</template>
|
|
875
|
-
</el-table-column>
|
|
876
|
-
<!-- <el-table-column :label="i18nt('设置')" width="150">
|
|
877
|
-
<template slot-scope="{row}">
|
|
878
|
-
<el-select v-model="row.type" clearable>
|
|
879
|
-
<el-option :value="1" label="可编辑"></el-option>
|
|
880
|
-
<el-option :value="2" label="仅显示"></el-option>
|
|
881
|
-
<el-option :value="3" label="隐藏"></el-option>
|
|
882
|
-
</el-select>
|
|
883
|
-
</template>
|
|
884
|
-
</el-table-column>-->
|
|
885
|
-
<el-table-column
|
|
886
|
-
:label="i18nt('designer.setting.actionColumn')"
|
|
887
|
-
width="100"
|
|
888
|
-
align="center"
|
|
889
|
-
>
|
|
890
|
-
<template #header>
|
|
891
|
-
<span>{{ i18nt("designer.setting.actionColumn") }}</span>
|
|
892
|
-
<el-button
|
|
893
|
-
:title="i18nt('designer.setting.addTableColumn')"
|
|
894
|
-
size="mini"
|
|
895
|
-
type=""
|
|
896
|
-
circle=""
|
|
897
|
-
icon="el-icon-plus"
|
|
898
|
-
@click="addItem2"
|
|
899
|
-
></el-button>
|
|
900
|
-
</template>
|
|
901
|
-
<template slot-scope="scope">
|
|
902
|
-
<el-button
|
|
903
|
-
:title="i18nt('designer.setting.deleteTableColumn')"
|
|
904
|
-
size="mini"
|
|
905
|
-
type=""
|
|
906
|
-
circle=""
|
|
907
|
-
icon="el-icon-minus"
|
|
908
|
-
@click="wfAgreeConfigData.splice(scope.$index, 1)"
|
|
909
|
-
></el-button>
|
|
910
|
-
</template>
|
|
911
|
-
</el-table-column>
|
|
912
|
-
</el-table>
|
|
913
|
-
</div>
|
|
914
|
-
<div class="dialog-footer" slot="footer">
|
|
915
|
-
<el-button
|
|
916
|
-
@click="dialogVisible2 = false"
|
|
917
|
-
class="button-sty"
|
|
918
|
-
icon="el-icon-close"
|
|
919
|
-
>
|
|
920
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
921
|
-
</el-button>
|
|
922
|
-
<el-button
|
|
923
|
-
type="primary"
|
|
924
|
-
@click="confirmWfConfigDataDialog2"
|
|
925
|
-
class="button-sty"
|
|
926
|
-
icon="el-icon-check"
|
|
927
|
-
>
|
|
928
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
929
|
-
</el-button>
|
|
930
|
-
</div>
|
|
931
|
-
</el-dialog>
|
|
932
|
-
|
|
933
|
-
<formTemplateDialog
|
|
934
|
-
v-if="showFormTemplateDialog"
|
|
935
|
-
:visiable.sync="showFormTemplateDialog"
|
|
936
|
-
@confirm="confirmFormTemplate"
|
|
937
|
-
multi="false"
|
|
938
|
-
/>
|
|
939
|
-
<wfObjConfigDialog
|
|
940
|
-
v-if="showWfObjConfigDialog"
|
|
941
|
-
:visiable.sync="showWfObjConfigDialog"
|
|
942
|
-
@confirm="confirmWfObjConfigDialog"
|
|
943
|
-
:formTemplate="designer.vueInstance.reportTemplate"
|
|
944
|
-
/>
|
|
945
|
-
|
|
946
|
-
<bdCompanyEnvDialog
|
|
947
|
-
v-if="showBdCompanyEnvDialog1"
|
|
948
|
-
:visiable.sync="showBdCompanyEnvDialog1"
|
|
949
|
-
@confirm="confirmBdCompanyEnvDialog1"
|
|
950
|
-
:multi="false"
|
|
951
|
-
/>
|
|
952
|
-
<bdCompanyEnvDialog
|
|
953
|
-
v-if="showBdCompanyEnvDialog2"
|
|
954
|
-
:visiable.sync="showBdCompanyEnvDialog2"
|
|
955
|
-
@confirm="confirmBdCompanyEnvDialog2"
|
|
956
|
-
:multi="false"
|
|
957
|
-
/>
|
|
958
|
-
</div>
|
|
959
|
-
</template>
|
|
960
|
-
|
|
961
|
-
<script>
|
|
962
|
-
import i18n from "../../../../components/xform/utils/i18n";
|
|
963
|
-
import {
|
|
964
|
-
deepClone,
|
|
965
|
-
insertCustomCssToHead,
|
|
966
|
-
insertGlobalFunctionsToHtml,
|
|
967
|
-
} from "../../../../components/xform/utils/util";
|
|
968
|
-
import formTemplateDialog from "../../../../views/bd/setting/form_template/dialog.vue";
|
|
969
|
-
import wfObjConfigDialog from "./wfObjConfigDialog.vue";
|
|
970
|
-
import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
|
|
971
|
-
import Draggable from "vuedraggable";
|
|
972
|
-
import formDynamicFieldSetting from "./form-dynamicField-setting.vue";
|
|
973
|
-
|
|
974
|
-
export default {
|
|
975
|
-
name: "form-setting",
|
|
976
|
-
mixins: [i18n],
|
|
977
|
-
components: {
|
|
978
|
-
formTemplateDialog,
|
|
979
|
-
wfObjConfigDialog,
|
|
980
|
-
bdCompanyEnvDialog,
|
|
981
|
-
Draggable,
|
|
982
|
-
formDynamicFieldSetting,
|
|
983
|
-
},
|
|
984
|
-
props: {
|
|
985
|
-
designer: Object,
|
|
986
|
-
formConfig: Object,
|
|
987
|
-
},
|
|
988
|
-
inject: ["getDesignerConfig"],
|
|
989
|
-
data() {
|
|
990
|
-
return {
|
|
991
|
-
designerConfig: this.getDesignerConfig(),
|
|
992
|
-
|
|
993
|
-
formActiveCollapseNames: ["1", "2", "7"],
|
|
994
|
-
|
|
995
|
-
formSizes: [
|
|
996
|
-
{ label: "default", value: "" },
|
|
997
|
-
{ label: "large", value: "large" },
|
|
998
|
-
{ label: "medium", value: "medium" },
|
|
999
|
-
{ label: "small", value: "small" },
|
|
1000
|
-
{ label: "mini", value: "mini" },
|
|
1001
|
-
],
|
|
1002
|
-
|
|
1003
|
-
showEditFormCssDialogFlag: false,
|
|
1004
|
-
formCssCode: "",
|
|
1005
|
-
cssClassList: [],
|
|
1006
|
-
|
|
1007
|
-
showEditFunctionsDialogFlag: false,
|
|
1008
|
-
functionsCode: "",
|
|
1009
|
-
|
|
1010
|
-
showFormEventDialogFlag: false,
|
|
1011
|
-
formEventHandlerCode: "",
|
|
1012
|
-
curEventName: "",
|
|
1013
|
-
formEventDialogTitle: "",
|
|
1014
|
-
eventDialogTitleMap: {
|
|
1015
|
-
globalConfig: "全局参数配置",
|
|
1016
|
-
wfStartConfirmText: "流程启动确认提示语配置",
|
|
1017
|
-
wfConfig: "流程自定义配置",
|
|
1018
|
-
onBeforeCreated: "表单创建前事件配置",
|
|
1019
|
-
onFormCreated: "表单创建事件配置",
|
|
1020
|
-
onFormBeforeMounted: "表单挂载前事件配置",
|
|
1021
|
-
onFormMounted: "表单挂载事件配置",
|
|
1022
|
-
onFormDataChange: "表单数据变更事件配置",
|
|
1023
|
-
onFormValidate: "表单校验事件配置",
|
|
1024
|
-
},
|
|
1025
|
-
|
|
1026
|
-
eventParamsMap: {
|
|
1027
|
-
onBeforeCreated: "onBeforeCreated(dataId,formCode,done) {",
|
|
1028
|
-
onFormCreated: "onFormCreated(dataId,formCode) {",
|
|
1029
|
-
onFormBeforeMounted: "onFormBeforeMounted(dataId,formCode, done) {",
|
|
1030
|
-
onFormMounted: "onFormMounted(dataId,formCode) {",
|
|
1031
|
-
onFormDataChange:
|
|
1032
|
-
"onFormDataChange(fieldName, newValue, oldValue, formModel, subFormName, subFormRowIndex) {",
|
|
1033
|
-
wfStartConfirmText:
|
|
1034
|
-
"wfStartConfirmText(dataId, formCode, formData) {",
|
|
1035
|
-
wfConfig: "wfConfig(dataId, formCode, formData) {",
|
|
1036
|
-
globalConfig: "globalConfig(dataId, formCode) {",
|
|
1037
|
-
//'onFormValidate': 'onFormValidate() {',
|
|
1038
|
-
},
|
|
1039
|
-
showVabsearchConfigDialog: false,
|
|
1040
|
-
vabsearchConfigType: 1,
|
|
1041
|
-
showFormTemplateDialog: false,
|
|
1042
|
-
|
|
1043
|
-
formScriptParam: null,
|
|
1044
|
-
showFormScriptParamDialog: false,
|
|
1045
|
-
formScriptSuccess: null,
|
|
1046
|
-
showFormScriptSuccessDialog: false,
|
|
1047
|
-
wfObjConfigs: [],
|
|
1048
|
-
showWfObjConfigDialog: false,
|
|
1049
|
-
|
|
1050
|
-
dialogVisible: false,
|
|
1051
|
-
wfConfigData: [],
|
|
1052
|
-
|
|
1053
|
-
dialogVisible2: false,
|
|
1054
|
-
wfAgreeConfigData: [],
|
|
1055
|
-
|
|
1056
|
-
showBdCompanyEnvDialog1: false,
|
|
1057
|
-
showBdCompanyEnvDialog2: false,
|
|
1058
|
-
|
|
1059
|
-
globalConfigParams: ["dataId", "formCode"],
|
|
1060
|
-
|
|
1061
|
-
tip1: `流程主题表达式设置说明。
|
|
1062
|
-
|
|
1063
|
-
1、可使用参数:
|
|
1064
|
-
wf:流程对象
|
|
1065
|
-
name:流程名称
|
|
1066
|
-
objTypeCode:单据类型编码
|
|
1067
|
-
objId:对象id
|
|
1068
|
-
procInstId:act流程实例id
|
|
1069
|
-
procDefId:act流程定义id
|
|
1070
|
-
modelId:act流程模板id
|
|
1071
|
-
starterId:启动人ID
|
|
1072
|
-
starterName:启动人姓名
|
|
1073
|
-
uuid:流程实例唯一标识
|
|
1074
|
-
identityInfo:身份信息对象
|
|
1075
|
-
id:用户ID
|
|
1076
|
-
loginAccount:用户登录名
|
|
1077
|
-
nickName:用户姓名
|
|
1078
|
-
companyCode:企业编码
|
|
1079
|
-
parentCompanyCode:集团企业编码
|
|
1080
|
-
nowDate:当前时间
|
|
1081
|
-
nowDateStr:当前时间字符串(yyyy-MM-dd HH:mm:ss)
|
|
1082
|
-
nowDayStr:当前天字符串(yyyy-MM-dd)
|
|
1083
|
-
tableName:数据库表名,取表单设计中维护的表名作为参数名称
|
|
1084
|
-
tableField1:数据库表字段名1
|
|
1085
|
-
tableField2:数据库表字段名2
|
|
1086
|
-
tableField3:数据库表字段名3
|
|
1087
|
-
......
|
|
1088
|
-
|
|
1089
|
-
2、可使用函数:
|
|
1090
|
-
func.orgName(orgId):根据机构id获取机构名称
|
|
1091
|
-
func.convertDate(date, format):时间转换,如当前时间转为当前天字符串,则$\{func.convertDate(nowDate, 'yyyy-MM-dd')\},当前时间转为当前月字符串,则$\{func.convertDate(nowDate, 'yyyy-MM')\}
|
|
1092
|
-
|
|
1093
|
-
3、配置示例
|
|
1094
|
-
比如表名为:pm_product_project,配置如下:
|
|
1095
|
-
$\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_project.product_name\}$\{wf.name\}$\{pm_product_project.sn\}$\{func.orgName(pm_product_project.f_sale_org_id)\}$\{nowDayStr\}`,
|
|
1096
|
-
};
|
|
1097
|
-
},
|
|
1098
|
-
created() {
|
|
1099
|
-
//导入表单JSON后需要重新加载自定义CSS样式!!!
|
|
1100
|
-
this.designer.handleEvent("form-json-imported", () => {
|
|
1101
|
-
this.formCssCode = this.formConfig.cssCode || "";
|
|
1102
|
-
insertCustomCssToHead(this.formCssCcssCodeode);
|
|
1103
|
-
this.extractCssClass();
|
|
1104
|
-
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
1105
|
-
});
|
|
1106
|
-
},
|
|
1107
|
-
mounted() {
|
|
1108
|
-
/* SettingPanel和FormWidget为兄弟组件, 在FormWidget加载formConfig时,
|
|
1109
|
-
此处SettingPanel可能无法获取到formConfig.cssCode, 故加个延时函数! */
|
|
1110
|
-
setTimeout(() => {
|
|
1111
|
-
this.formCssCode = this.formConfig.cssCode || "";
|
|
1112
|
-
insertCustomCssToHead(this.formCssCode);
|
|
1113
|
-
this.extractCssClass();
|
|
1114
|
-
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
1115
|
-
}, 1200);
|
|
1116
|
-
this.getListByObjTypeCode();
|
|
1117
|
-
},
|
|
1118
|
-
methods: {
|
|
1119
|
-
showEventCollapse() {
|
|
1120
|
-
if (this.designerConfig["eventCollapse"] === undefined) {
|
|
1121
|
-
return true;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
return !!this.designerConfig["eventCollapse"];
|
|
1125
|
-
},
|
|
1126
|
-
|
|
1127
|
-
editFormCss() {
|
|
1128
|
-
this.formCssCode = this.designer.formConfig.cssCode;
|
|
1129
|
-
this.showEditFormCssDialogFlag = true;
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
extractCssClass() {
|
|
1133
|
-
let regExp = /\..*{/g;
|
|
1134
|
-
let result = this.formCssCode ? this.formCssCode.match(regExp) : [];
|
|
1135
|
-
let cssNameArray = [];
|
|
1136
|
-
|
|
1137
|
-
if (!!result && result.length > 0) {
|
|
1138
|
-
result.forEach((rItem) => {
|
|
1139
|
-
let classArray = rItem.split(","); //切分逗号分割的多个class
|
|
1140
|
-
if (classArray.length > 0) {
|
|
1141
|
-
classArray.forEach((cItem) => {
|
|
1142
|
-
let caItem = cItem.trim();
|
|
1143
|
-
if (caItem.indexOf(".", 1) !== -1) {
|
|
1144
|
-
//查找第二个.位置
|
|
1145
|
-
let newClass = caItem.substring(
|
|
1146
|
-
caItem.indexOf(".") + 1,
|
|
1147
|
-
caItem.indexOf(".", 1)
|
|
1148
|
-
); //仅截取第一、二个.号之间的class
|
|
1149
|
-
if (!!newClass) {
|
|
1150
|
-
cssNameArray.push(newClass.trim());
|
|
1151
|
-
}
|
|
1152
|
-
} else if (caItem.indexOf(" ") !== -1) {
|
|
1153
|
-
//查找第一个空格位置
|
|
1154
|
-
let newClass = caItem.substring(
|
|
1155
|
-
caItem.indexOf(".") + 1,
|
|
1156
|
-
caItem.indexOf(" ")
|
|
1157
|
-
); //仅截取第一、二个.号之间的class
|
|
1158
|
-
if (!!newClass) {
|
|
1159
|
-
cssNameArray.push(newClass.trim());
|
|
1160
|
-
}
|
|
1161
|
-
} else {
|
|
1162
|
-
if (caItem.indexOf("{") !== -1) {
|
|
1163
|
-
//查找第一个{位置
|
|
1164
|
-
let newClass = caItem.substring(
|
|
1165
|
-
caItem.indexOf(".") + 1,
|
|
1166
|
-
caItem.indexOf("{")
|
|
1167
|
-
);
|
|
1168
|
-
cssNameArray.push(newClass.trim());
|
|
1169
|
-
} else {
|
|
1170
|
-
let newClass = caItem.substring(caItem.indexOf(".") + 1);
|
|
1171
|
-
cssNameArray.push(newClass.trim());
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
//this.cssClassList.length = 0
|
|
1180
|
-
this.cssClassList.splice(0, this.cssClassList.length); //清除数组必须用splice,length=0不会响应式更新!!
|
|
1181
|
-
this.cssClassList = Array.from(new Set(cssNameArray)); //数组去重
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1184
|
-
saveFormCss() {
|
|
1185
|
-
this.extractCssClass();
|
|
1186
|
-
this.designer.formConfig.cssCode = this.formCssCode;
|
|
1187
|
-
insertCustomCssToHead(this.formCssCode);
|
|
1188
|
-
this.showEditFormCssDialogFlag = false;
|
|
1189
|
-
|
|
1190
|
-
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
1191
|
-
},
|
|
1192
|
-
|
|
1193
|
-
editGlobalFunctions() {
|
|
1194
|
-
this.functionsCode = this.designer.formConfig.functions;
|
|
1195
|
-
this.showEditFunctionsDialogFlag = true;
|
|
1196
|
-
},
|
|
1197
|
-
editFormScriptParam() {
|
|
1198
|
-
this.formScriptParam = this.designer.formConfig.formScriptParam;
|
|
1199
|
-
this.showFormScriptParamDialog = true;
|
|
1200
|
-
},
|
|
1201
|
-
|
|
1202
|
-
saveGlobalFunctions() {
|
|
1203
|
-
const codeHints = this.$refs.gfEditor.getEditorAnnotations();
|
|
1204
|
-
let syntaxErrorFlag = false;
|
|
1205
|
-
if (!!codeHints && codeHints.length > 0) {
|
|
1206
|
-
codeHints.forEach((chItem) => {
|
|
1207
|
-
if (chItem.type === "error") {
|
|
1208
|
-
syntaxErrorFlag = true;
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
|
|
1212
|
-
if (syntaxErrorFlag) {
|
|
1213
|
-
this.$message.error(
|
|
1214
|
-
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1215
|
-
);
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
this.designer.formConfig.functions = this.functionsCode;
|
|
1221
|
-
insertGlobalFunctionsToHtml(this.functionsCode);
|
|
1222
|
-
this.showEditFunctionsDialogFlag = false;
|
|
1223
|
-
},
|
|
1224
|
-
|
|
1225
|
-
editFormEventHandler(eventName, dialogTitle) {
|
|
1226
|
-
this.curEventName = eventName;
|
|
1227
|
-
this.formEventHandlerCode = this.formConfig[eventName];
|
|
1228
|
-
let customTitle =
|
|
1229
|
-
typeof dialogTitle === "string" && dialogTitle ? dialogTitle : null;
|
|
1230
|
-
let eventTitle =
|
|
1231
|
-
customTitle ||
|
|
1232
|
-
this.eventDialogTitleMap[eventName] ||
|
|
1233
|
-
(eventName ? eventName + " 配置" : "配置");
|
|
1234
|
-
this.formEventDialogTitle = this.i18nt(eventTitle);
|
|
1235
|
-
this.showFormEventDialogFlag = true;
|
|
1236
|
-
},
|
|
1237
|
-
|
|
1238
|
-
saveFormEventHandler() {
|
|
1239
|
-
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1240
|
-
let syntaxErrorFlag = false;
|
|
1241
|
-
if (!!codeHints && codeHints.length > 0) {
|
|
1242
|
-
codeHints.forEach((chItem) => {
|
|
1243
|
-
if (chItem.type === "error") {
|
|
1244
|
-
syntaxErrorFlag = true;
|
|
1245
|
-
}
|
|
1246
|
-
});
|
|
1247
|
-
|
|
1248
|
-
if (syntaxErrorFlag) {
|
|
1249
|
-
this.$message.error(
|
|
1250
|
-
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1251
|
-
);
|
|
1252
|
-
return;
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
this.formConfig[this.curEventName] = this.formEventHandlerCode;
|
|
1257
|
-
this.showFormEventDialogFlag = false;
|
|
1258
|
-
},
|
|
1259
|
-
openFormTemplate(flag) {
|
|
1260
|
-
this.formTemplateFlag = flag;
|
|
1261
|
-
this.showFormTemplateDialog = true;
|
|
1262
|
-
},
|
|
1263
|
-
confirmFormTemplate(rows) {
|
|
1264
|
-
if (rows.length) {
|
|
1265
|
-
let row = rows[0];
|
|
1266
|
-
if (this.formTemplateFlag == 1) {
|
|
1267
|
-
//新增
|
|
1268
|
-
this.$set(this.formConfig, "addFormCode", row.formCode);
|
|
1269
|
-
this.$set(this.formConfig, "addFormName", row.formName);
|
|
1270
|
-
} else {
|
|
1271
|
-
//查看
|
|
1272
|
-
this.$set(this.formConfig, "editFormCode", row.formCode);
|
|
1273
|
-
this.$set(this.formConfig, "editFormName", row.formName);
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
},
|
|
1277
|
-
getEventButtonName(funStr) {
|
|
1278
|
-
let name = this.i18nt("designer.setting.addEventHandler");
|
|
1279
|
-
if (funStr) name = "已维护";
|
|
1280
|
-
return name;
|
|
1281
|
-
},
|
|
1282
|
-
saveFormScriptParam() {
|
|
1283
|
-
const codeHints = this.$refs.gfEditor.getEditorAnnotations();
|
|
1284
|
-
let syntaxErrorFlag = false;
|
|
1285
|
-
if (!!codeHints && codeHints.length > 0) {
|
|
1286
|
-
codeHints.forEach((chItem) => {
|
|
1287
|
-
if (chItem.type === "error") {
|
|
1288
|
-
syntaxErrorFlag = true;
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
|
-
|
|
1292
|
-
if (syntaxErrorFlag) {
|
|
1293
|
-
this.$message.error(
|
|
1294
|
-
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1295
|
-
);
|
|
1296
|
-
return;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
this.designer.formConfig.formScriptParam = this.formScriptParam;
|
|
1301
|
-
this.showFormScriptParamDialog = false;
|
|
1302
|
-
},
|
|
1303
|
-
editFormScriptSuccess() {
|
|
1304
|
-
this.formScriptSuccess = this.designer.formConfig.formScriptSuccess;
|
|
1305
|
-
this.showFormScriptSuccessDialog = true;
|
|
1306
|
-
},
|
|
1307
|
-
saveFormScriptSuccess() {
|
|
1308
|
-
const codeHints = this.$refs.gfEditor.getEditorAnnotations();
|
|
1309
|
-
let syntaxErrorFlag = false;
|
|
1310
|
-
if (!!codeHints && codeHints.length > 0) {
|
|
1311
|
-
codeHints.forEach((chItem) => {
|
|
1312
|
-
if (chItem.type === "error") {
|
|
1313
|
-
syntaxErrorFlag = true;
|
|
1314
|
-
}
|
|
1315
|
-
});
|
|
1316
|
-
|
|
1317
|
-
if (syntaxErrorFlag) {
|
|
1318
|
-
this.$message.error(
|
|
1319
|
-
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1320
|
-
);
|
|
1321
|
-
return;
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
this.designer.formConfig.formScriptSuccess = this.formScriptSuccess;
|
|
1326
|
-
this.showFormScriptSuccessDialog = false;
|
|
1327
|
-
},
|
|
1328
|
-
openWfObjConfigDialog() {
|
|
1329
|
-
this.showWfObjConfigDialog = true;
|
|
1330
|
-
},
|
|
1331
|
-
confirmWfObjConfigDialog(rows) {
|
|
1332
|
-
this.wfObjConfigs = rows || [];
|
|
1333
|
-
},
|
|
1334
|
-
getListByObjTypeCode() {
|
|
1335
|
-
let reportTemplate = this.designer.vueInstance.reportTemplate;
|
|
1336
|
-
this.$http({
|
|
1337
|
-
url: `/${reportTemplate.serviceName}/wf_obj_config/listByObjTypeCode`,
|
|
1338
|
-
method: `post`,
|
|
1339
|
-
data: {
|
|
1340
|
-
stringOne: reportTemplate.objTypeCode,
|
|
1341
|
-
},
|
|
1342
|
-
isLoading: true,
|
|
1343
|
-
success: (res) => {
|
|
1344
|
-
this.wfObjConfigs = res.objx || [];
|
|
1345
|
-
},
|
|
1346
|
-
});
|
|
1347
|
-
},
|
|
1348
|
-
changeWfEnabled(val) {
|
|
1349
|
-
this.designer.vueInstance.reportTemplate.objTypeName = null;
|
|
1350
|
-
this.designer.vueInstance.reportTemplate.fromWfFormCode = null;
|
|
1351
|
-
},
|
|
1352
|
-
openWfConfigDataDialog() {
|
|
1353
|
-
let wfConfigData = this.formConfig.wfConfigData || [];
|
|
1354
|
-
this.dialogVisible = true;
|
|
1355
|
-
this.wfConfigData = this.$baseLodash.cloneDeep(wfConfigData);
|
|
1356
|
-
},
|
|
1357
|
-
addItem() {
|
|
1358
|
-
let newItem = {
|
|
1359
|
-
type: null,
|
|
1360
|
-
serveType: null,
|
|
1361
|
-
serveName: null,
|
|
1362
|
-
modelKey: null,
|
|
1363
|
-
modelOrders: undefined,
|
|
1364
|
-
taskSteps: null,
|
|
1365
|
-
companyCodes: null,
|
|
1366
|
-
};
|
|
1367
|
-
this.wfConfigData.push(newItem);
|
|
1368
|
-
},
|
|
1369
|
-
confirmWfConfigDataDialog() {
|
|
1370
|
-
let tableData = this.wfConfigData;
|
|
1371
|
-
let map = {};
|
|
1372
|
-
for (let i = 0; i < tableData.length; i++) {
|
|
1373
|
-
let item = tableData[i];
|
|
1374
|
-
if (!item.serveName) {
|
|
1375
|
-
this.$message({
|
|
1376
|
-
type: "error",
|
|
1377
|
-
message: "服务名称不能为空",
|
|
1378
|
-
});
|
|
1379
|
-
return;
|
|
1380
|
-
}
|
|
1381
|
-
if (!item.companyCodes) {
|
|
1382
|
-
this.$message({
|
|
1383
|
-
type: "error",
|
|
1384
|
-
message: "组织编码不能为空",
|
|
1385
|
-
});
|
|
1386
|
-
return;
|
|
1387
|
-
}
|
|
1388
|
-
let modelOrders = item.modelOrders ?? "";
|
|
1389
|
-
|
|
1390
|
-
let serveName = item.serveName;
|
|
1391
|
-
let companyCodes = item.companyCodes;
|
|
1392
|
-
let key = serveName + "_" + companyCodes + "_" + modelOrders;
|
|
1393
|
-
if (!map[key]) {
|
|
1394
|
-
map[key] = true;
|
|
1395
|
-
} else {
|
|
1396
|
-
this.$message({
|
|
1397
|
-
type: "error",
|
|
1398
|
-
message: "[服务+组织+流程模板序号]不能重复",
|
|
1399
|
-
});
|
|
1400
|
-
return;
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
this.dialogVisible = !1;
|
|
1405
|
-
this.formConfig.wfConfigData = this.wfConfigData;
|
|
1406
|
-
},
|
|
1407
|
-
|
|
1408
|
-
openWfConfigDataDialog2() {
|
|
1409
|
-
let wfAgreeConfigData = this.formConfig.wfAgreeConfigData || [];
|
|
1410
|
-
this.dialogVisible2 = true;
|
|
1411
|
-
this.wfAgreeConfigData = this.$baseLodash.cloneDeep(wfAgreeConfigData);
|
|
1412
|
-
},
|
|
1413
|
-
addItem2() {
|
|
1414
|
-
let newItem = {
|
|
1415
|
-
type: null,
|
|
1416
|
-
serveType: null,
|
|
1417
|
-
serveName: null,
|
|
1418
|
-
modelKey: null,
|
|
1419
|
-
modelOrders: undefined,
|
|
1420
|
-
taskSteps: null,
|
|
1421
|
-
companyCodes: null,
|
|
1422
|
-
};
|
|
1423
|
-
this.wfAgreeConfigData.push(newItem);
|
|
1424
|
-
},
|
|
1425
|
-
confirmWfConfigDataDialog2() {
|
|
1426
|
-
let tableData = this.wfAgreeConfigData;
|
|
1427
|
-
|
|
1428
|
-
let map = {};
|
|
1429
|
-
for (let i = 0; i < tableData.length; i++) {
|
|
1430
|
-
let item = tableData[i];
|
|
1431
|
-
if (!item.serveName) {
|
|
1432
|
-
this.$message({
|
|
1433
|
-
type: "error",
|
|
1434
|
-
message: "服务名称不能为空",
|
|
1435
|
-
});
|
|
1436
|
-
return;
|
|
1437
|
-
}
|
|
1438
|
-
if (!item.companyCodes) {
|
|
1439
|
-
this.$message({
|
|
1440
|
-
type: "error",
|
|
1441
|
-
message: "组织编码不能为空",
|
|
1442
|
-
});
|
|
1443
|
-
return;
|
|
1444
|
-
}
|
|
1445
|
-
let modelOrders = item.modelOrders ?? "";
|
|
1446
|
-
|
|
1447
|
-
let serveName = item.serveName;
|
|
1448
|
-
let companyCodes = item.companyCodes;
|
|
1449
|
-
let key = serveName + "_" + companyCodes + "_" + modelOrders;
|
|
1450
|
-
if (!map[key]) {
|
|
1451
|
-
map[key] = true;
|
|
1452
|
-
} else {
|
|
1453
|
-
this.$message({
|
|
1454
|
-
type: "error",
|
|
1455
|
-
message: "[服务+组织+流程模板序号]不能重复",
|
|
1456
|
-
});
|
|
1457
|
-
return;
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
this.dialogVisible2 = !1;
|
|
1461
|
-
this.formConfig.wfAgreeConfigData = this.wfAgreeConfigData;
|
|
1462
|
-
},
|
|
1463
|
-
|
|
1464
|
-
clearBdCompanyEnv1(row) {
|
|
1465
|
-
row.serveName = null;
|
|
1466
|
-
row.companyCodes = null;
|
|
1467
|
-
},
|
|
1468
|
-
openBdCompanyEnvDialog1(rowIndex) {
|
|
1469
|
-
this.operateIndex = rowIndex;
|
|
1470
|
-
this.showBdCompanyEnvDialog1 = true;
|
|
1471
|
-
},
|
|
1472
|
-
confirmBdCompanyEnvDialog1(rows) {
|
|
1473
|
-
if (rows.length) {
|
|
1474
|
-
let row = rows[0];
|
|
1475
|
-
let item = this.wfConfigData[this.operateIndex];
|
|
1476
|
-
item.serveName = row.bdService;
|
|
1477
|
-
item.companyCodes = row.bdCompanyCode;
|
|
1478
|
-
}
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1481
|
-
clearBdCompanyEnv2(row) {
|
|
1482
|
-
row.serveName = null;
|
|
1483
|
-
row.companyCodes = null;
|
|
1484
|
-
},
|
|
1485
|
-
openBdCompanyEnvDialog2(rowIndex) {
|
|
1486
|
-
this.operateIndex = rowIndex;
|
|
1487
|
-
this.showBdCompanyEnvDialog2 = true;
|
|
1488
|
-
},
|
|
1489
|
-
confirmBdCompanyEnvDialog2(rows) {
|
|
1490
|
-
if (rows.length) {
|
|
1491
|
-
let row = rows[0];
|
|
1492
|
-
let item = this.wfAgreeConfigData[this.operateIndex];
|
|
1493
|
-
item.serveName = row.bdService;
|
|
1494
|
-
item.companyCodes = row.bdCompanyCode;
|
|
1495
|
-
}
|
|
1496
|
-
},
|
|
1497
|
-
addOtherTab() {
|
|
1498
|
-
if (!this.formConfig.otherTabList) {
|
|
1499
|
-
this.$set(this.formConfig, "otherTabList", []);
|
|
1500
|
-
}
|
|
1501
|
-
this.formConfig.otherTabList.push({
|
|
1502
|
-
label: null,
|
|
1503
|
-
formCode: null,
|
|
1504
|
-
});
|
|
1505
|
-
},
|
|
1506
|
-
},
|
|
1507
|
-
};
|
|
1508
|
-
</script>
|
|
1509
|
-
|
|
1510
|
-
<style lang="scss" scoped>
|
|
1511
|
-
.setting-form {
|
|
1512
|
-
::v-deep .el-form-item__label {
|
|
1513
|
-
font-size: 13px;
|
|
1514
|
-
//text-overflow: ellipsis;
|
|
1515
|
-
overflow: hidden;
|
|
1516
|
-
white-space: nowrap;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
::v-deep .el-form-item--mini.el-form-item {
|
|
1520
|
-
margin-bottom: 6px;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
.radio-group-custom {
|
|
1524
|
-
::v-deep .el-radio-button__inner {
|
|
1525
|
-
padding-left: 12px;
|
|
1526
|
-
padding-right: 12px;
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
.custom-divider.el-divider--horizontal {
|
|
1531
|
-
margin: 10px 0;
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
.setting-collapse {
|
|
1536
|
-
::v-deep .el-collapse-item__content {
|
|
1537
|
-
padding-bottom: 6px;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
::v-deep .el-collapse-item__header {
|
|
1541
|
-
font-weight: bold;
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
.small-padding-dialog {
|
|
1546
|
-
::v-deep .el-dialog__body {
|
|
1547
|
-
padding: 6px 15px 12px 15px;
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
::v-deep .el-textarea .el-textarea__inner {
|
|
1551
|
-
word-break: break-all;
|
|
1552
|
-
}
|
|
1553
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form
|
|
4
|
+
:model="formConfig"
|
|
5
|
+
size="mini"
|
|
6
|
+
label-position="left"
|
|
7
|
+
label-width="120px"
|
|
8
|
+
class="setting-form"
|
|
9
|
+
@submit.native.prevent
|
|
10
|
+
>
|
|
11
|
+
<el-collapse v-model="formActiveCollapseNames" class="setting-collapse">
|
|
12
|
+
<el-collapse-item
|
|
13
|
+
name="1"
|
|
14
|
+
:title="i18nt('designer.setting.basicSetting')"
|
|
15
|
+
>
|
|
16
|
+
<el-form-item :label="i18nt('数据库表')">
|
|
17
|
+
<el-input type="text" v-model="formConfig.entity"></el-input>
|
|
18
|
+
</el-form-item>
|
|
19
|
+
<el-form-item :label="i18nt('数据保存脚本编码')">
|
|
20
|
+
<el-input
|
|
21
|
+
type="text"
|
|
22
|
+
v-model="formConfig.saveScriptCode"
|
|
23
|
+
placeholder="默认saveUpdatge"
|
|
24
|
+
></el-input>
|
|
25
|
+
</el-form-item>
|
|
26
|
+
<el-form-item label="全局参数配置">
|
|
27
|
+
<a
|
|
28
|
+
href="javascript:void(0);"
|
|
29
|
+
class="a-link link-oneLind"
|
|
30
|
+
@click="editFormEventHandler('globalConfig')"
|
|
31
|
+
>
|
|
32
|
+
<span>{{ formConfig.globalConfig }}</span>
|
|
33
|
+
<i class="el-icon-edit"></i>
|
|
34
|
+
</a>
|
|
35
|
+
</el-form-item>
|
|
36
|
+
<el-form-item :label="i18nt('designer.setting.globalFunctions')">
|
|
37
|
+
<a
|
|
38
|
+
href="javascript:void(0);"
|
|
39
|
+
class="a-link link-oneLind"
|
|
40
|
+
@click="editGlobalFunctions"
|
|
41
|
+
>
|
|
42
|
+
<span>{{ formConfig.functions }}</span>
|
|
43
|
+
<i class="el-icon-edit"></i>
|
|
44
|
+
</a>
|
|
45
|
+
</el-form-item>
|
|
46
|
+
<el-form-item :label="i18nt('designer.setting.formCss')">
|
|
47
|
+
<el-button
|
|
48
|
+
type="info"
|
|
49
|
+
icon="el-icon-edit"
|
|
50
|
+
plain
|
|
51
|
+
round
|
|
52
|
+
@click="editFormCss"
|
|
53
|
+
>
|
|
54
|
+
{{ i18nt("designer.setting.addCss") }}
|
|
55
|
+
</el-button>
|
|
56
|
+
</el-form-item>
|
|
57
|
+
</el-collapse-item>
|
|
58
|
+
<el-collapse-item name="2" title="详情表单信息">
|
|
59
|
+
<el-form-item :label="i18nt('加载详情数据')">
|
|
60
|
+
<el-switch v-model="formConfig.isLoadEntity"></el-switch>
|
|
61
|
+
</el-form-item>
|
|
62
|
+
<el-form-item :label="i18nt('详情数据脚本编码')">
|
|
63
|
+
<el-input
|
|
64
|
+
type="text"
|
|
65
|
+
v-model="formConfig.formScriptCode"
|
|
66
|
+
placeholder="默认getOne"
|
|
67
|
+
></el-input>
|
|
68
|
+
</el-form-item>
|
|
69
|
+
<el-form-item :label="i18nt('详情数据脚本参数')">
|
|
70
|
+
<a
|
|
71
|
+
href="javascript:void(0);"
|
|
72
|
+
class="a-link link-oneLind"
|
|
73
|
+
@click="editFormScriptParam"
|
|
74
|
+
>
|
|
75
|
+
<span>{{ formConfig.formScriptParam }}</span>
|
|
76
|
+
<i class="el-icon-edit"></i>
|
|
77
|
+
</a>
|
|
78
|
+
</el-form-item>
|
|
79
|
+
<el-form-item :label="i18nt('详情数据脚本回调')">
|
|
80
|
+
<a
|
|
81
|
+
href="javascript:void(0);"
|
|
82
|
+
class="a-link link-oneLind"
|
|
83
|
+
@click="editFormScriptSuccess"
|
|
84
|
+
>
|
|
85
|
+
<span>{{ formConfig.formScriptSuccess }}</span>
|
|
86
|
+
<i class="el-icon-edit"></i>
|
|
87
|
+
</a>
|
|
88
|
+
</el-form-item>
|
|
89
|
+
<el-form-item :label="i18nt('查看页面表单编码')">
|
|
90
|
+
<el-input
|
|
91
|
+
class="search-input"
|
|
92
|
+
max="200"
|
|
93
|
+
v-model="formConfig.editFormCode"
|
|
94
|
+
@clear="
|
|
95
|
+
formConfig.editFormName = null;
|
|
96
|
+
$forceUpdate();
|
|
97
|
+
"
|
|
98
|
+
v-el-readonly
|
|
99
|
+
clearable
|
|
100
|
+
>
|
|
101
|
+
<i
|
|
102
|
+
slot="suffix"
|
|
103
|
+
class="el-input__icon el-icon-search"
|
|
104
|
+
@click="openFormTemplate(2)"
|
|
105
|
+
></i>
|
|
106
|
+
</el-input>
|
|
107
|
+
</el-form-item>
|
|
108
|
+
<el-form-item :label="i18nt('查看页面表单名称')">
|
|
109
|
+
{{ formConfig.editFormName }}
|
|
110
|
+
</el-form-item>
|
|
111
|
+
<el-form-item :label="i18nt('新增页面表单编码')">
|
|
112
|
+
<el-input
|
|
113
|
+
class="search-input"
|
|
114
|
+
max="200"
|
|
115
|
+
v-model="formConfig.addFormCode"
|
|
116
|
+
@clear="
|
|
117
|
+
formConfig.addFormCode = null;
|
|
118
|
+
formConfig.addFormName = null;
|
|
119
|
+
$forceUpdate();
|
|
120
|
+
"
|
|
121
|
+
v-el-readonly
|
|
122
|
+
clearable
|
|
123
|
+
placeholder="默认使用查看表单编码"
|
|
124
|
+
>
|
|
125
|
+
<i
|
|
126
|
+
slot="suffix"
|
|
127
|
+
class="el-input__icon el-icon-search"
|
|
128
|
+
@click="openFormTemplate(1)"
|
|
129
|
+
></i>
|
|
130
|
+
</el-input>
|
|
131
|
+
</el-form-item>
|
|
132
|
+
<el-form-item :label="i18nt('新增页面表单名称')">
|
|
133
|
+
{{ formConfig.addFormName }}
|
|
134
|
+
</el-form-item>
|
|
135
|
+
<el-form-item :label="i18nt('详情翻单按钮')">
|
|
136
|
+
<el-switch v-model="formConfig.billNavEnabled"></el-switch>
|
|
137
|
+
<span style="margin-left: 8px; color: #999; font-size: 12px">
|
|
138
|
+
编辑态页签显示「上一单/下一单」
|
|
139
|
+
</span>
|
|
140
|
+
</el-form-item>
|
|
141
|
+
</el-collapse-item>
|
|
142
|
+
<el-collapse-item name="3" title="流程信息">
|
|
143
|
+
<el-form-item :label="i18nt('启用流程')">
|
|
144
|
+
<el-switch
|
|
145
|
+
v-model="formConfig.wfEnabled"
|
|
146
|
+
@change="changeWfEnabled"
|
|
147
|
+
></el-switch>
|
|
148
|
+
</el-form-item>
|
|
149
|
+
<el-form-item :label="i18nt('默认流程单据类型名称')">
|
|
150
|
+
<el-input
|
|
151
|
+
type="text"
|
|
152
|
+
v-model="designer.vueInstance.reportTemplate.objTypeName"
|
|
153
|
+
></el-input>
|
|
154
|
+
</el-form-item>
|
|
155
|
+
<el-form-item>
|
|
156
|
+
<span slot="label"
|
|
157
|
+
>流程主题
|
|
158
|
+
<scriptDescriptionButton
|
|
159
|
+
title="流程主题说明"
|
|
160
|
+
path="static/readme/WfSubject.txt"
|
|
161
|
+
></scriptDescriptionButton>
|
|
162
|
+
</span>
|
|
163
|
+
</el-form-item>
|
|
164
|
+
<div>
|
|
165
|
+
<el-input
|
|
166
|
+
style="word-break: break-word"
|
|
167
|
+
type="textarea"
|
|
168
|
+
:rows="3"
|
|
169
|
+
v-model="formConfig.wfTheme"
|
|
170
|
+
clearable
|
|
171
|
+
></el-input>
|
|
172
|
+
</div>
|
|
173
|
+
<el-form-item :label="i18nt('流程启动时自动保存表单数据')">
|
|
174
|
+
<el-switch v-model="formConfig.wfStartBindSave"></el-switch>
|
|
175
|
+
</el-form-item>
|
|
176
|
+
<el-form-item :label="i18nt('流程启动确认提示脚本')">
|
|
177
|
+
<a
|
|
178
|
+
href="javascript:void(0);"
|
|
179
|
+
class="a-link link-oneLind"
|
|
180
|
+
@click="editFormEventHandler('wfStartConfirmText')"
|
|
181
|
+
>
|
|
182
|
+
<span>{{ formConfig.wfStartConfirmText }}</span>
|
|
183
|
+
<i class="el-icon-edit"></i>
|
|
184
|
+
</a>
|
|
185
|
+
</el-form-item>
|
|
186
|
+
|
|
187
|
+
<el-form-item :label="i18nt('流程通过时自动保存表单数据')">
|
|
188
|
+
<el-switch v-model="formConfig.wfAgreenBindSave"></el-switch>
|
|
189
|
+
</el-form-item>
|
|
190
|
+
<el-form-item :label="i18nt('流程通过时自动保存表单数据的节点配置')">
|
|
191
|
+
<a
|
|
192
|
+
href="javascript:void(0);"
|
|
193
|
+
class="a-link link-oneLind"
|
|
194
|
+
@click="openWfConfigDataDialog2"
|
|
195
|
+
>
|
|
196
|
+
<span>{{
|
|
197
|
+
formConfig.wfAgreeConfigData &&
|
|
198
|
+
formConfig.wfAgreeConfigData.length
|
|
199
|
+
? "已维护"
|
|
200
|
+
: ""
|
|
201
|
+
}}</span>
|
|
202
|
+
<i class="el-icon-edit"></i>
|
|
203
|
+
</a>
|
|
204
|
+
</el-form-item>
|
|
205
|
+
<el-form-item :label="i18nt('启用流程节点可编辑表单')">
|
|
206
|
+
<el-switch v-model="formConfig.wfConfigDataEnabled"></el-switch>
|
|
207
|
+
</el-form-item>
|
|
208
|
+
<el-form-item :label="i18nt('流程节点可编辑表单配置')">
|
|
209
|
+
<a
|
|
210
|
+
href="javascript:void(0);"
|
|
211
|
+
class="a-link link-oneLind"
|
|
212
|
+
@click="openWfConfigDataDialog"
|
|
213
|
+
>
|
|
214
|
+
<span>{{
|
|
215
|
+
formConfig.wfConfigData && formConfig.wfConfigData.length
|
|
216
|
+
? "已维护"
|
|
217
|
+
: ""
|
|
218
|
+
}}</span>
|
|
219
|
+
<i class="el-icon-edit"></i>
|
|
220
|
+
</a>
|
|
221
|
+
</el-form-item>
|
|
222
|
+
<el-form-item :label="i18nt('引用流程的表单编码')">
|
|
223
|
+
<el-input
|
|
224
|
+
type="text"
|
|
225
|
+
v-model="designer.vueInstance.reportTemplate.fromWfFormCode"
|
|
226
|
+
></el-input>
|
|
227
|
+
</el-form-item>
|
|
228
|
+
<el-form-item :label="i18nt('流程自定义配置')">
|
|
229
|
+
<a
|
|
230
|
+
href="javascript:void(0);"
|
|
231
|
+
class="a-link link-oneLind"
|
|
232
|
+
@click="editFormEventHandler('wfConfig')"
|
|
233
|
+
>
|
|
234
|
+
<span>{{ formConfig.wfConfig }}</span>
|
|
235
|
+
<i class="el-icon-edit"></i>
|
|
236
|
+
</a>
|
|
237
|
+
</el-form-item>
|
|
238
|
+
</el-collapse-item>
|
|
239
|
+
<el-collapse-item name="4" title="列表标签页信息">
|
|
240
|
+
<el-form-item :label="i18nt('列表启用详情多标签')">
|
|
241
|
+
<el-switch v-model="formConfig.multiTabEnabled"></el-switch>
|
|
242
|
+
</el-form-item>
|
|
243
|
+
<el-form-item :label="i18nt('标签名称字段')">
|
|
244
|
+
<el-input
|
|
245
|
+
type="text"
|
|
246
|
+
v-model="formConfig.multiTabLabelField"
|
|
247
|
+
></el-input>
|
|
248
|
+
</el-form-item>
|
|
249
|
+
<el-form-item
|
|
250
|
+
v-if="formConfig.multiTabEnabled"
|
|
251
|
+
:label="i18nt('新增打开页签')"
|
|
252
|
+
>
|
|
253
|
+
<el-switch v-model="formConfig.addTabEnabled"></el-switch>
|
|
254
|
+
<span style="margin-left: 8px; color: #999; font-size: 12px">
|
|
255
|
+
开启后新增打开独立可关闭页签,需配置「标签名称字段」
|
|
256
|
+
</span>
|
|
257
|
+
</el-form-item>
|
|
258
|
+
<el-form-item :label="i18nt('流程启动后行为')">
|
|
259
|
+
<el-radio-group v-model="formConfig.submitBehavior">
|
|
260
|
+
<el-radio label="closeToList">关闭页签并回列表刷新</el-radio>
|
|
261
|
+
<el-radio label="refreshCurrent">刷新当前页签</el-radio>
|
|
262
|
+
</el-radio-group>
|
|
263
|
+
</el-form-item>
|
|
264
|
+
</el-collapse-item>
|
|
265
|
+
<el-collapse-item name="5" title="其他标签页信息">
|
|
266
|
+
<el-form-item :label="i18nt('自定义列表标签名称')">
|
|
267
|
+
<el-input
|
|
268
|
+
type="text"
|
|
269
|
+
v-model="formConfig.customListTabLabel"
|
|
270
|
+
placeholder="默认`列表`"
|
|
271
|
+
></el-input>
|
|
272
|
+
</el-form-item>
|
|
273
|
+
<el-form-item :label="i18nt('启用其他标签页')">
|
|
274
|
+
<el-switch v-model="formConfig.otherTabEnabled"></el-switch>
|
|
275
|
+
</el-form-item>
|
|
276
|
+
<el-form-item :label="i18nt('隐藏常规标签')">
|
|
277
|
+
<el-switch v-model="formConfig.hideNormalTab"></el-switch>
|
|
278
|
+
</el-form-item>
|
|
279
|
+
<el-form-item :label="i18nt('其他标签页配置')"> </el-form-item>
|
|
280
|
+
<el-form-item label-width="0">
|
|
281
|
+
<div>
|
|
282
|
+
<draggable
|
|
283
|
+
tag="ul"
|
|
284
|
+
class="draggable-box"
|
|
285
|
+
:list="formConfig.otherTabList"
|
|
286
|
+
v-bind="{
|
|
287
|
+
group: 'optionsGroup',
|
|
288
|
+
ghostClass: 'ghost',
|
|
289
|
+
handle: '.drag-option',
|
|
290
|
+
}"
|
|
291
|
+
>
|
|
292
|
+
<li v-for="(option, idx) in formConfig.otherTabList" :key="idx">
|
|
293
|
+
<el-input
|
|
294
|
+
v-model="option.label"
|
|
295
|
+
size="mini"
|
|
296
|
+
style="width: 100px"
|
|
297
|
+
placeholder="标签名称"
|
|
298
|
+
></el-input>
|
|
299
|
+
<el-input
|
|
300
|
+
v-model="option.formCode"
|
|
301
|
+
size="mini"
|
|
302
|
+
style="width: 100px"
|
|
303
|
+
placeholder="表单模板编码"
|
|
304
|
+
></el-input>
|
|
305
|
+
<i class="el-icon-s-operation drag-option"></i>
|
|
306
|
+
<el-button
|
|
307
|
+
circle
|
|
308
|
+
plain
|
|
309
|
+
size="mini"
|
|
310
|
+
type="danger"
|
|
311
|
+
@click="formConfig.otherTabList.splice(idx, 1)"
|
|
312
|
+
icon="el-icon-minus"
|
|
313
|
+
class="col-delete-button"
|
|
314
|
+
></el-button>
|
|
315
|
+
</li>
|
|
316
|
+
</draggable>
|
|
317
|
+
<el-button type="text" @click="addOtherTab">{{
|
|
318
|
+
i18nt("designer.setting.addOption")
|
|
319
|
+
}}</el-button>
|
|
320
|
+
</div>
|
|
321
|
+
</el-form-item>
|
|
322
|
+
</el-collapse-item>
|
|
323
|
+
<el-collapse-item name="6" title="查询弹框展示信息">
|
|
324
|
+
<el-form-item :label="i18nt('展示字段')">
|
|
325
|
+
<el-input
|
|
326
|
+
class="search-input"
|
|
327
|
+
max="200"
|
|
328
|
+
v-model="formConfig.searchDialogNameField"
|
|
329
|
+
clearable
|
|
330
|
+
>
|
|
331
|
+
</el-input>
|
|
332
|
+
</el-form-item>
|
|
333
|
+
<el-form-item :label="i18nt('数据唯一标识')">
|
|
334
|
+
<el-input
|
|
335
|
+
class="search-input"
|
|
336
|
+
max="200"
|
|
337
|
+
v-model="formConfig.searchDialogUniqueField"
|
|
338
|
+
clearable
|
|
339
|
+
>
|
|
340
|
+
</el-input>
|
|
341
|
+
</el-form-item>
|
|
342
|
+
</el-collapse-item>
|
|
343
|
+
|
|
344
|
+
<el-collapse-item name="8" title="动态字段规则">
|
|
345
|
+
<form-dynamic-field-setting
|
|
346
|
+
:designer="designer"
|
|
347
|
+
:form-config="formConfig"
|
|
348
|
+
></form-dynamic-field-setting>
|
|
349
|
+
</el-collapse-item>
|
|
350
|
+
|
|
351
|
+
<el-collapse-item
|
|
352
|
+
v-if="showEventCollapse()"
|
|
353
|
+
name="7"
|
|
354
|
+
:title="i18nt('designer.setting.eventSetting')"
|
|
355
|
+
>
|
|
356
|
+
<!-- <el-form-item label="onBeforeCreated" label-width="150px">
|
|
357
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
358
|
+
@click="editFormEventHandler('onBeforeCreated', ['dataId','done'])">
|
|
359
|
+
<span>{{ formConfig.onBeforeCreated }}</span>
|
|
360
|
+
<i class="el-icon-edit"></i>
|
|
361
|
+
</a>
|
|
362
|
+
</el-form-item>-->
|
|
363
|
+
<el-form-item label="onFormCreated" label-width="150px">
|
|
364
|
+
<a
|
|
365
|
+
href="javascript:void(0);"
|
|
366
|
+
class="a-link link-oneLind"
|
|
367
|
+
@click="editFormEventHandler('onFormCreated')"
|
|
368
|
+
>
|
|
369
|
+
<span>{{ formConfig.onFormCreated }}</span>
|
|
370
|
+
<i class="el-icon-edit"></i>
|
|
371
|
+
</a>
|
|
372
|
+
</el-form-item>
|
|
373
|
+
<el-form-item label="onFormBeforeMounted" label-width="150px">
|
|
374
|
+
<a
|
|
375
|
+
href="javascript:void(0);"
|
|
376
|
+
class="a-link link-oneLind"
|
|
377
|
+
@click="editFormEventHandler('onFormBeforeMounted')"
|
|
378
|
+
>
|
|
379
|
+
<span>{{ formConfig.onFormBeforeMounted }}</span>
|
|
380
|
+
<i class="el-icon-edit"></i>
|
|
381
|
+
</a>
|
|
382
|
+
</el-form-item>
|
|
383
|
+
<el-form-item label="onFormMounted" label-width="150px">
|
|
384
|
+
<a
|
|
385
|
+
href="javascript:void(0);"
|
|
386
|
+
class="a-link link-oneLind"
|
|
387
|
+
@click="editFormEventHandler('onFormMounted')"
|
|
388
|
+
>
|
|
389
|
+
<span>{{ formConfig.onFormMounted }}</span>
|
|
390
|
+
<i class="el-icon-edit"></i>
|
|
391
|
+
</a>
|
|
392
|
+
</el-form-item>
|
|
393
|
+
<!-- -->
|
|
394
|
+
<el-form-item label="onFormDataChange" label-width="150px">
|
|
395
|
+
<a
|
|
396
|
+
href="javascript:void(0);"
|
|
397
|
+
class="a-link link-oneLind"
|
|
398
|
+
@click="editFormEventHandler('onFormDataChange')"
|
|
399
|
+
>
|
|
400
|
+
<span>{{ formConfig.onFormDataChange }}</span>
|
|
401
|
+
<i class="el-icon-edit"></i>
|
|
402
|
+
</a>
|
|
403
|
+
</el-form-item>
|
|
404
|
+
<!-- -->
|
|
405
|
+
<!--
|
|
406
|
+
<el-form-item label="onFormValidate">
|
|
407
|
+
<el-button type="info" icon="el-icon-edit" plain round @click="editFormEventHandler('onFormValidate')">
|
|
408
|
+
{{i18nt('designer.setting.addEventHandler')}}</el-button>
|
|
409
|
+
</el-form-item>
|
|
410
|
+
-->
|
|
411
|
+
</el-collapse-item>
|
|
412
|
+
</el-collapse>
|
|
413
|
+
</el-form>
|
|
414
|
+
|
|
415
|
+
<el-dialog
|
|
416
|
+
:title="formEventDialogTitle"
|
|
417
|
+
:visible.sync="showFormEventDialogFlag"
|
|
418
|
+
v-if="showFormEventDialogFlag"
|
|
419
|
+
:show-close="true"
|
|
420
|
+
custom-class="dialog-style list-dialog"
|
|
421
|
+
v-dialog-drag
|
|
422
|
+
:close-on-click-modal="false"
|
|
423
|
+
:close-on-press-escape="false"
|
|
424
|
+
:destroy-on-close="true"
|
|
425
|
+
:append-to-body="true"
|
|
426
|
+
:modal-append-to-body="true"
|
|
427
|
+
top="5vh"
|
|
428
|
+
>
|
|
429
|
+
<div class="cont">
|
|
430
|
+
<el-alert
|
|
431
|
+
type="info"
|
|
432
|
+
:closable="false"
|
|
433
|
+
:title="'form.' + eventParamsMap[curEventName]"
|
|
434
|
+
></el-alert>
|
|
435
|
+
<code-editor
|
|
436
|
+
:mode="'javascript'"
|
|
437
|
+
:readonly="false"
|
|
438
|
+
v-model="formEventHandlerCode"
|
|
439
|
+
ref="ecEditor"
|
|
440
|
+
></code-editor>
|
|
441
|
+
<el-alert type="info" :closable="false" title="}"></el-alert>
|
|
442
|
+
</div>
|
|
443
|
+
<div slot="footer" class="dialog-footer">
|
|
444
|
+
<el-button
|
|
445
|
+
@click="showFormEventDialogFlag = false"
|
|
446
|
+
class="button-sty"
|
|
447
|
+
icon="el-icon-close"
|
|
448
|
+
>
|
|
449
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
450
|
+
</el-button>
|
|
451
|
+
<el-button
|
|
452
|
+
type="primary"
|
|
453
|
+
@click="saveFormEventHandler"
|
|
454
|
+
class="button-sty"
|
|
455
|
+
icon="el-icon-check"
|
|
456
|
+
>
|
|
457
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
458
|
+
</el-button>
|
|
459
|
+
</div>
|
|
460
|
+
</el-dialog>
|
|
461
|
+
|
|
462
|
+
<el-dialog
|
|
463
|
+
:title="i18nt('designer.setting.formCss')"
|
|
464
|
+
:visible.sync="showEditFormCssDialogFlag"
|
|
465
|
+
v-if="showEditFormCssDialogFlag"
|
|
466
|
+
:show-close="true"
|
|
467
|
+
custom-class="dialog-style list-dialog"
|
|
468
|
+
v-dialog-drag
|
|
469
|
+
:close-on-click-modal="false"
|
|
470
|
+
:close-on-press-escape="false"
|
|
471
|
+
:destroy-on-close="true"
|
|
472
|
+
:append-to-body="true"
|
|
473
|
+
:modal-append-to-body="true"
|
|
474
|
+
>
|
|
475
|
+
<div class="cont">
|
|
476
|
+
<code-editor
|
|
477
|
+
:mode="'css'"
|
|
478
|
+
:readonly="false"
|
|
479
|
+
v-model="formCssCode"
|
|
480
|
+
></code-editor>
|
|
481
|
+
</div>
|
|
482
|
+
<div slot="footer" class="dialog-footer">
|
|
483
|
+
<el-button
|
|
484
|
+
@click="showEditFormCssDialogFlag = false"
|
|
485
|
+
class="button-sty"
|
|
486
|
+
icon="el-icon-close"
|
|
487
|
+
>
|
|
488
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
489
|
+
</el-button>
|
|
490
|
+
<el-button
|
|
491
|
+
type="primary"
|
|
492
|
+
@click="saveFormCss"
|
|
493
|
+
class="button-sty"
|
|
494
|
+
icon="el-icon-check"
|
|
495
|
+
>
|
|
496
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
497
|
+
</el-button>
|
|
498
|
+
</div>
|
|
499
|
+
</el-dialog>
|
|
500
|
+
|
|
501
|
+
<el-dialog
|
|
502
|
+
:title="i18nt('designer.setting.globalFunctions')"
|
|
503
|
+
:visible.sync="showEditFunctionsDialogFlag"
|
|
504
|
+
v-if="showEditFunctionsDialogFlag"
|
|
505
|
+
:show-close="true"
|
|
506
|
+
custom-class="dialog-style list-dialog"
|
|
507
|
+
v-dialog-drag
|
|
508
|
+
:close-on-click-modal="false"
|
|
509
|
+
:close-on-press-escape="false"
|
|
510
|
+
:destroy-on-close="true"
|
|
511
|
+
:append-to-body="true"
|
|
512
|
+
:modal-append-to-body="true"
|
|
513
|
+
>
|
|
514
|
+
<div class="cont">
|
|
515
|
+
<code-editor
|
|
516
|
+
:mode="'javascript'"
|
|
517
|
+
:readonly="false"
|
|
518
|
+
v-model="functionsCode"
|
|
519
|
+
ref="gfEditor"
|
|
520
|
+
></code-editor>
|
|
521
|
+
</div>
|
|
522
|
+
<div slot="footer" class="dialog-footer">
|
|
523
|
+
<el-button
|
|
524
|
+
@click="showEditFunctionsDialogFlag = false"
|
|
525
|
+
class="button-sty"
|
|
526
|
+
icon="el-icon-close"
|
|
527
|
+
>
|
|
528
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
529
|
+
</el-button>
|
|
530
|
+
<el-button
|
|
531
|
+
type="primary"
|
|
532
|
+
@click="saveGlobalFunctions"
|
|
533
|
+
class="button-sty"
|
|
534
|
+
icon="el-icon-check"
|
|
535
|
+
>
|
|
536
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
537
|
+
</el-button>
|
|
538
|
+
</div>
|
|
539
|
+
</el-dialog>
|
|
540
|
+
|
|
541
|
+
<el-dialog
|
|
542
|
+
:title="i18nt('详情数据脚本参数')"
|
|
543
|
+
:visible.sync="showFormScriptParamDialog"
|
|
544
|
+
v-if="showFormScriptParamDialog"
|
|
545
|
+
:show-close="true"
|
|
546
|
+
custom-class="dialog-style list-dialog"
|
|
547
|
+
v-dialog-drag
|
|
548
|
+
:close-on-click-modal="false"
|
|
549
|
+
:close-on-press-escape="false"
|
|
550
|
+
:destroy-on-close="true"
|
|
551
|
+
:append-to-body="true"
|
|
552
|
+
:modal-append-to-body="true"
|
|
553
|
+
>
|
|
554
|
+
<div class="cont">
|
|
555
|
+
<code-editor
|
|
556
|
+
:mode="'javascript'"
|
|
557
|
+
:readonly="false"
|
|
558
|
+
v-model="formScriptParam"
|
|
559
|
+
ref="gfEditor"
|
|
560
|
+
></code-editor>
|
|
561
|
+
</div>
|
|
562
|
+
<div slot="footer" class="dialog-footer">
|
|
563
|
+
<el-button
|
|
564
|
+
@click="showFormScriptParamDialog = false"
|
|
565
|
+
class="button-sty"
|
|
566
|
+
icon="el-icon-close"
|
|
567
|
+
>
|
|
568
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
569
|
+
</el-button>
|
|
570
|
+
<el-button
|
|
571
|
+
type="primary"
|
|
572
|
+
@click="saveFormScriptParam"
|
|
573
|
+
class="button-sty"
|
|
574
|
+
icon="el-icon-check"
|
|
575
|
+
>
|
|
576
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
577
|
+
</el-button>
|
|
578
|
+
</div>
|
|
579
|
+
</el-dialog>
|
|
580
|
+
<el-dialog
|
|
581
|
+
:title="i18nt('详情数据脚本回调')"
|
|
582
|
+
:visible.sync="showFormScriptSuccessDialog"
|
|
583
|
+
v-if="showFormScriptSuccessDialog"
|
|
584
|
+
:show-close="true"
|
|
585
|
+
custom-class="dialog-style list-dialog"
|
|
586
|
+
v-dialog-drag
|
|
587
|
+
:close-on-click-modal="false"
|
|
588
|
+
:close-on-press-escape="false"
|
|
589
|
+
:destroy-on-close="true"
|
|
590
|
+
:append-to-body="true"
|
|
591
|
+
:modal-append-to-body="true"
|
|
592
|
+
>
|
|
593
|
+
<div class="cont">
|
|
594
|
+
<code-editor
|
|
595
|
+
:mode="'javascript'"
|
|
596
|
+
:readonly="false"
|
|
597
|
+
v-model="formScriptSuccess"
|
|
598
|
+
ref="gfEditor"
|
|
599
|
+
></code-editor>
|
|
600
|
+
</div>
|
|
601
|
+
<div slot="footer" class="dialog-footer">
|
|
602
|
+
<el-button
|
|
603
|
+
@click="showFormScriptSuccessDialog = false"
|
|
604
|
+
class="button-sty"
|
|
605
|
+
icon="el-icon-close"
|
|
606
|
+
>
|
|
607
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
608
|
+
</el-button>
|
|
609
|
+
<el-button
|
|
610
|
+
type="primary"
|
|
611
|
+
@click="saveFormScriptSuccess"
|
|
612
|
+
class="button-sty"
|
|
613
|
+
icon="el-icon-check"
|
|
614
|
+
>
|
|
615
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
616
|
+
</el-button>
|
|
617
|
+
</div>
|
|
618
|
+
</el-dialog>
|
|
619
|
+
<el-dialog
|
|
620
|
+
v-if="dialogVisible"
|
|
621
|
+
custom-class="dialog-style list-dialog"
|
|
622
|
+
:title="i18nt('流程节点可编辑表单配置')"
|
|
623
|
+
:visible.sync="dialogVisible"
|
|
624
|
+
:show-close="!0"
|
|
625
|
+
:append-to-body="true"
|
|
626
|
+
:modal="false"
|
|
627
|
+
:close-on-click-modal="!1"
|
|
628
|
+
:close-on-press-escape="!1"
|
|
629
|
+
:destroy-on-close="!0"
|
|
630
|
+
width="1220px"
|
|
631
|
+
top="5vh"
|
|
632
|
+
v-dialog-drag
|
|
633
|
+
:fullscreen="true"
|
|
634
|
+
>
|
|
635
|
+
<div class="cont" style="padding-bottom: 8px">
|
|
636
|
+
<el-table
|
|
637
|
+
ref="singleTable"
|
|
638
|
+
width="100%"
|
|
639
|
+
:data="wfConfigData"
|
|
640
|
+
height="100%"
|
|
641
|
+
border=""
|
|
642
|
+
row-key="columnId"
|
|
643
|
+
stripe=""
|
|
644
|
+
style="margin-bottom: 0px"
|
|
645
|
+
>
|
|
646
|
+
<el-table-column
|
|
647
|
+
type="index"
|
|
648
|
+
width="35"
|
|
649
|
+
fixed="left"
|
|
650
|
+
></el-table-column>
|
|
651
|
+
<!-- <el-table-column :label="i18nt('服务')" width="150">
|
|
652
|
+
<template slot-scope="{ row }">
|
|
653
|
+
<el-select v-model="row.serveType" @change="changeServeType(row)">
|
|
654
|
+
<el-option :value="1" label="正式"></el-option>
|
|
655
|
+
<el-option :value="2" label="UAT"></el-option>
|
|
656
|
+
<el-option :value="3" label="测试"></el-option>
|
|
657
|
+
<el-option :value="4" label="自定义"></el-option>
|
|
658
|
+
</el-select>
|
|
659
|
+
</template>
|
|
660
|
+
</el-table-column>
|
|
661
|
+
<el-table-column :label="i18nt('自定义服务')" width="150">
|
|
662
|
+
<template slot-scope="{ row }">
|
|
663
|
+
<el-input
|
|
664
|
+
v-model="row.serveName"
|
|
665
|
+
clearable
|
|
666
|
+
:disabled="row.serveType !== 4"
|
|
667
|
+
></el-input>
|
|
668
|
+
</template>
|
|
669
|
+
</el-table-column>
|
|
670
|
+
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
671
|
+
<template slot-scope="{ row, $index }">
|
|
672
|
+
<el-input v-model="row.companyCodes" clearable></el-input>
|
|
673
|
+
</template>
|
|
674
|
+
</el-table-column> -->
|
|
675
|
+
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
676
|
+
<template slot-scope="{ row, $index }">
|
|
677
|
+
<el-input
|
|
678
|
+
class="search-input"
|
|
679
|
+
max="200"
|
|
680
|
+
v-model="row.companyCodes"
|
|
681
|
+
@clear="clearBdCompanyEnv1(row)"
|
|
682
|
+
v-el-readonly
|
|
683
|
+
clearable
|
|
684
|
+
>
|
|
685
|
+
<i
|
|
686
|
+
slot="suffix"
|
|
687
|
+
class="el-input__icon el-icon-search"
|
|
688
|
+
@click="openBdCompanyEnvDialog1($index)"
|
|
689
|
+
></i>
|
|
690
|
+
</el-input>
|
|
691
|
+
</template>
|
|
692
|
+
</el-table-column>
|
|
693
|
+
<el-table-column :label="i18nt('服务名称')" width="150">
|
|
694
|
+
<template slot-scope="{ row }">
|
|
695
|
+
{{ row.serveName }}
|
|
696
|
+
</template>
|
|
697
|
+
</el-table-column>
|
|
698
|
+
<!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
|
|
699
|
+
<template slot-scope="{ row }">
|
|
700
|
+
<el-input v-model="row.modelKey" clearable></el-input>
|
|
701
|
+
</template>
|
|
702
|
+
</el-table-column> -->
|
|
703
|
+
<el-table-column :label="i18nt('流程模板序号')" width="150">
|
|
704
|
+
<template slot-scope="{ row }">
|
|
705
|
+
<base-input-number
|
|
706
|
+
v-model="row.modelOrders"
|
|
707
|
+
clearable
|
|
708
|
+
></base-input-number>
|
|
709
|
+
</template>
|
|
710
|
+
</el-table-column>
|
|
711
|
+
<el-table-column
|
|
712
|
+
:label="i18nt('节点步骤(多个值用“,”隔开)')"
|
|
713
|
+
width="250"
|
|
714
|
+
>
|
|
715
|
+
<template slot-scope="{ row }">
|
|
716
|
+
<el-input v-model="row.taskSteps" clearable></el-input>
|
|
717
|
+
</template>
|
|
718
|
+
</el-table-column>
|
|
719
|
+
<!-- <el-table-column :label="i18nt('设置')" width="150">
|
|
720
|
+
<template slot-scope="{row}">
|
|
721
|
+
<el-select v-model="row.type" clearable>
|
|
722
|
+
<el-option :value="1" label="可编辑"></el-option>
|
|
723
|
+
<el-option :value="2" label="仅显示"></el-option>
|
|
724
|
+
<el-option :value="3" label="隐藏"></el-option>
|
|
725
|
+
</el-select>
|
|
726
|
+
</template>
|
|
727
|
+
</el-table-column>-->
|
|
728
|
+
<el-table-column
|
|
729
|
+
:label="i18nt('designer.setting.actionColumn')"
|
|
730
|
+
width="100"
|
|
731
|
+
align="center"
|
|
732
|
+
>
|
|
733
|
+
<template #header>
|
|
734
|
+
<span>{{ i18nt("designer.setting.actionColumn") }}</span>
|
|
735
|
+
<el-button
|
|
736
|
+
:title="i18nt('designer.setting.addTableColumn')"
|
|
737
|
+
size="mini"
|
|
738
|
+
type=""
|
|
739
|
+
circle=""
|
|
740
|
+
icon="el-icon-plus"
|
|
741
|
+
@click="addItem"
|
|
742
|
+
></el-button>
|
|
743
|
+
</template>
|
|
744
|
+
<template slot-scope="scope">
|
|
745
|
+
<el-button
|
|
746
|
+
:title="i18nt('designer.setting.deleteTableColumn')"
|
|
747
|
+
size="mini"
|
|
748
|
+
type=""
|
|
749
|
+
circle=""
|
|
750
|
+
icon="el-icon-minus"
|
|
751
|
+
@click="wfConfigData.splice(scope.$index, 1)"
|
|
752
|
+
></el-button>
|
|
753
|
+
</template>
|
|
754
|
+
</el-table-column>
|
|
755
|
+
</el-table>
|
|
756
|
+
</div>
|
|
757
|
+
<div class="dialog-footer" slot="footer">
|
|
758
|
+
<el-button
|
|
759
|
+
@click="dialogVisible = false"
|
|
760
|
+
class="button-sty"
|
|
761
|
+
icon="el-icon-close"
|
|
762
|
+
>
|
|
763
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
764
|
+
</el-button>
|
|
765
|
+
<el-button
|
|
766
|
+
type="primary"
|
|
767
|
+
@click="confirmWfConfigDataDialog"
|
|
768
|
+
class="button-sty"
|
|
769
|
+
icon="el-icon-check"
|
|
770
|
+
>
|
|
771
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
772
|
+
</el-button>
|
|
773
|
+
</div>
|
|
774
|
+
</el-dialog>
|
|
775
|
+
|
|
776
|
+
<el-dialog
|
|
777
|
+
v-if="dialogVisible2"
|
|
778
|
+
custom-class="dialog-style list-dialog"
|
|
779
|
+
:title="i18nt('流程通过时自动保存表单数据的节点配置')"
|
|
780
|
+
:visible.sync="dialogVisible2"
|
|
781
|
+
:show-close="!0"
|
|
782
|
+
:append-to-body="true"
|
|
783
|
+
:modal="false"
|
|
784
|
+
:close-on-click-modal="!1"
|
|
785
|
+
:close-on-press-escape="!1"
|
|
786
|
+
:destroy-on-close="!0"
|
|
787
|
+
width="1220px"
|
|
788
|
+
top="5vh"
|
|
789
|
+
v-dialog-drag
|
|
790
|
+
:fullscreen="true"
|
|
791
|
+
>
|
|
792
|
+
<div class="cont" style="padding-bottom: 8px">
|
|
793
|
+
<el-table
|
|
794
|
+
ref="singleTable"
|
|
795
|
+
width="100%"
|
|
796
|
+
:data="wfAgreeConfigData"
|
|
797
|
+
height="100%"
|
|
798
|
+
border=""
|
|
799
|
+
row-key="columnId"
|
|
800
|
+
stripe=""
|
|
801
|
+
style="margin-bottom: 0px"
|
|
802
|
+
>
|
|
803
|
+
<el-table-column
|
|
804
|
+
type="index"
|
|
805
|
+
width="35"
|
|
806
|
+
fixed="left"
|
|
807
|
+
></el-table-column>
|
|
808
|
+
<!-- <el-table-column :label="i18nt('服务')" width="150">
|
|
809
|
+
<template slot-scope="{ row }">
|
|
810
|
+
<el-select v-model="row.serveType" @change="changeServeType(row)">
|
|
811
|
+
<el-option :value="1" label="正式"></el-option>
|
|
812
|
+
<el-option :value="2" label="UAT"></el-option>
|
|
813
|
+
<el-option :value="3" label="测试"></el-option>
|
|
814
|
+
<el-option :value="4" label="自定义"></el-option>
|
|
815
|
+
</el-select>
|
|
816
|
+
</template>
|
|
817
|
+
</el-table-column>
|
|
818
|
+
<el-table-column :label="i18nt('自定义服务')" width="150">
|
|
819
|
+
<template slot-scope="{ row }">
|
|
820
|
+
<el-input
|
|
821
|
+
v-model="row.serveName"
|
|
822
|
+
clearable
|
|
823
|
+
:disabled="row.serveType !== 4"
|
|
824
|
+
></el-input>
|
|
825
|
+
</template>
|
|
826
|
+
</el-table-column>
|
|
827
|
+
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
828
|
+
<template slot-scope="{ row, $index }">
|
|
829
|
+
<el-input v-model="row.companyCodes" clearable></el-input>
|
|
830
|
+
</template>
|
|
831
|
+
</el-table-column> -->
|
|
832
|
+
<el-table-column :label="i18nt('组织编码')" width="250">
|
|
833
|
+
<template slot-scope="{ row, $index }">
|
|
834
|
+
<el-input
|
|
835
|
+
class="search-input"
|
|
836
|
+
max="200"
|
|
837
|
+
v-model="row.companyCodes"
|
|
838
|
+
@clear="clearBdCompanyEnv2(row)"
|
|
839
|
+
v-el-readonly
|
|
840
|
+
clearable
|
|
841
|
+
>
|
|
842
|
+
<i
|
|
843
|
+
slot="suffix"
|
|
844
|
+
class="el-input__icon el-icon-search"
|
|
845
|
+
@click="openBdCompanyEnvDialog2($index)"
|
|
846
|
+
></i>
|
|
847
|
+
</el-input>
|
|
848
|
+
</template>
|
|
849
|
+
</el-table-column>
|
|
850
|
+
<el-table-column :label="i18nt('服务名称')" width="150">
|
|
851
|
+
<template slot-scope="{ row }">
|
|
852
|
+
{{ row.serveName }}
|
|
853
|
+
</template>
|
|
854
|
+
</el-table-column>
|
|
855
|
+
<!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
|
|
856
|
+
<template slot-scope="{ row }">
|
|
857
|
+
<el-input v-model="row.modelKey" clearable></el-input>
|
|
858
|
+
</template>
|
|
859
|
+
</el-table-column> -->
|
|
860
|
+
<el-table-column :label="i18nt('流程模板序号')" width="150">
|
|
861
|
+
<template slot-scope="{ row }">
|
|
862
|
+
<base-input-number
|
|
863
|
+
v-model="row.modelOrders"
|
|
864
|
+
clearable
|
|
865
|
+
></base-input-number>
|
|
866
|
+
</template>
|
|
867
|
+
</el-table-column>
|
|
868
|
+
<el-table-column
|
|
869
|
+
:label="i18nt('节点步骤(多个值用“,”隔开)')"
|
|
870
|
+
width="250"
|
|
871
|
+
>
|
|
872
|
+
<template slot-scope="{ row }">
|
|
873
|
+
<el-input v-model="row.taskSteps" clearable></el-input>
|
|
874
|
+
</template>
|
|
875
|
+
</el-table-column>
|
|
876
|
+
<!-- <el-table-column :label="i18nt('设置')" width="150">
|
|
877
|
+
<template slot-scope="{row}">
|
|
878
|
+
<el-select v-model="row.type" clearable>
|
|
879
|
+
<el-option :value="1" label="可编辑"></el-option>
|
|
880
|
+
<el-option :value="2" label="仅显示"></el-option>
|
|
881
|
+
<el-option :value="3" label="隐藏"></el-option>
|
|
882
|
+
</el-select>
|
|
883
|
+
</template>
|
|
884
|
+
</el-table-column>-->
|
|
885
|
+
<el-table-column
|
|
886
|
+
:label="i18nt('designer.setting.actionColumn')"
|
|
887
|
+
width="100"
|
|
888
|
+
align="center"
|
|
889
|
+
>
|
|
890
|
+
<template #header>
|
|
891
|
+
<span>{{ i18nt("designer.setting.actionColumn") }}</span>
|
|
892
|
+
<el-button
|
|
893
|
+
:title="i18nt('designer.setting.addTableColumn')"
|
|
894
|
+
size="mini"
|
|
895
|
+
type=""
|
|
896
|
+
circle=""
|
|
897
|
+
icon="el-icon-plus"
|
|
898
|
+
@click="addItem2"
|
|
899
|
+
></el-button>
|
|
900
|
+
</template>
|
|
901
|
+
<template slot-scope="scope">
|
|
902
|
+
<el-button
|
|
903
|
+
:title="i18nt('designer.setting.deleteTableColumn')"
|
|
904
|
+
size="mini"
|
|
905
|
+
type=""
|
|
906
|
+
circle=""
|
|
907
|
+
icon="el-icon-minus"
|
|
908
|
+
@click="wfAgreeConfigData.splice(scope.$index, 1)"
|
|
909
|
+
></el-button>
|
|
910
|
+
</template>
|
|
911
|
+
</el-table-column>
|
|
912
|
+
</el-table>
|
|
913
|
+
</div>
|
|
914
|
+
<div class="dialog-footer" slot="footer">
|
|
915
|
+
<el-button
|
|
916
|
+
@click="dialogVisible2 = false"
|
|
917
|
+
class="button-sty"
|
|
918
|
+
icon="el-icon-close"
|
|
919
|
+
>
|
|
920
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
921
|
+
</el-button>
|
|
922
|
+
<el-button
|
|
923
|
+
type="primary"
|
|
924
|
+
@click="confirmWfConfigDataDialog2"
|
|
925
|
+
class="button-sty"
|
|
926
|
+
icon="el-icon-check"
|
|
927
|
+
>
|
|
928
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
929
|
+
</el-button>
|
|
930
|
+
</div>
|
|
931
|
+
</el-dialog>
|
|
932
|
+
|
|
933
|
+
<formTemplateDialog
|
|
934
|
+
v-if="showFormTemplateDialog"
|
|
935
|
+
:visiable.sync="showFormTemplateDialog"
|
|
936
|
+
@confirm="confirmFormTemplate"
|
|
937
|
+
multi="false"
|
|
938
|
+
/>
|
|
939
|
+
<wfObjConfigDialog
|
|
940
|
+
v-if="showWfObjConfigDialog"
|
|
941
|
+
:visiable.sync="showWfObjConfigDialog"
|
|
942
|
+
@confirm="confirmWfObjConfigDialog"
|
|
943
|
+
:formTemplate="designer.vueInstance.reportTemplate"
|
|
944
|
+
/>
|
|
945
|
+
|
|
946
|
+
<bdCompanyEnvDialog
|
|
947
|
+
v-if="showBdCompanyEnvDialog1"
|
|
948
|
+
:visiable.sync="showBdCompanyEnvDialog1"
|
|
949
|
+
@confirm="confirmBdCompanyEnvDialog1"
|
|
950
|
+
:multi="false"
|
|
951
|
+
/>
|
|
952
|
+
<bdCompanyEnvDialog
|
|
953
|
+
v-if="showBdCompanyEnvDialog2"
|
|
954
|
+
:visiable.sync="showBdCompanyEnvDialog2"
|
|
955
|
+
@confirm="confirmBdCompanyEnvDialog2"
|
|
956
|
+
:multi="false"
|
|
957
|
+
/>
|
|
958
|
+
</div>
|
|
959
|
+
</template>
|
|
960
|
+
|
|
961
|
+
<script>
|
|
962
|
+
import i18n from "../../../../components/xform/utils/i18n";
|
|
963
|
+
import {
|
|
964
|
+
deepClone,
|
|
965
|
+
insertCustomCssToHead,
|
|
966
|
+
insertGlobalFunctionsToHtml,
|
|
967
|
+
} from "../../../../components/xform/utils/util";
|
|
968
|
+
import formTemplateDialog from "../../../../views/bd/setting/form_template/dialog.vue";
|
|
969
|
+
import wfObjConfigDialog from "./wfObjConfigDialog.vue";
|
|
970
|
+
import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
|
|
971
|
+
import Draggable from "vuedraggable";
|
|
972
|
+
import formDynamicFieldSetting from "./form-dynamicField-setting.vue";
|
|
973
|
+
|
|
974
|
+
export default {
|
|
975
|
+
name: "form-setting",
|
|
976
|
+
mixins: [i18n],
|
|
977
|
+
components: {
|
|
978
|
+
formTemplateDialog,
|
|
979
|
+
wfObjConfigDialog,
|
|
980
|
+
bdCompanyEnvDialog,
|
|
981
|
+
Draggable,
|
|
982
|
+
formDynamicFieldSetting,
|
|
983
|
+
},
|
|
984
|
+
props: {
|
|
985
|
+
designer: Object,
|
|
986
|
+
formConfig: Object,
|
|
987
|
+
},
|
|
988
|
+
inject: ["getDesignerConfig"],
|
|
989
|
+
data() {
|
|
990
|
+
return {
|
|
991
|
+
designerConfig: this.getDesignerConfig(),
|
|
992
|
+
|
|
993
|
+
formActiveCollapseNames: ["1", "2", "7"],
|
|
994
|
+
|
|
995
|
+
formSizes: [
|
|
996
|
+
{ label: "default", value: "" },
|
|
997
|
+
{ label: "large", value: "large" },
|
|
998
|
+
{ label: "medium", value: "medium" },
|
|
999
|
+
{ label: "small", value: "small" },
|
|
1000
|
+
{ label: "mini", value: "mini" },
|
|
1001
|
+
],
|
|
1002
|
+
|
|
1003
|
+
showEditFormCssDialogFlag: false,
|
|
1004
|
+
formCssCode: "",
|
|
1005
|
+
cssClassList: [],
|
|
1006
|
+
|
|
1007
|
+
showEditFunctionsDialogFlag: false,
|
|
1008
|
+
functionsCode: "",
|
|
1009
|
+
|
|
1010
|
+
showFormEventDialogFlag: false,
|
|
1011
|
+
formEventHandlerCode: "",
|
|
1012
|
+
curEventName: "",
|
|
1013
|
+
formEventDialogTitle: "",
|
|
1014
|
+
eventDialogTitleMap: {
|
|
1015
|
+
globalConfig: "全局参数配置",
|
|
1016
|
+
wfStartConfirmText: "流程启动确认提示语配置",
|
|
1017
|
+
wfConfig: "流程自定义配置",
|
|
1018
|
+
onBeforeCreated: "表单创建前事件配置",
|
|
1019
|
+
onFormCreated: "表单创建事件配置",
|
|
1020
|
+
onFormBeforeMounted: "表单挂载前事件配置",
|
|
1021
|
+
onFormMounted: "表单挂载事件配置",
|
|
1022
|
+
onFormDataChange: "表单数据变更事件配置",
|
|
1023
|
+
onFormValidate: "表单校验事件配置",
|
|
1024
|
+
},
|
|
1025
|
+
|
|
1026
|
+
eventParamsMap: {
|
|
1027
|
+
onBeforeCreated: "onBeforeCreated(dataId,formCode,done) {",
|
|
1028
|
+
onFormCreated: "onFormCreated(dataId,formCode) {",
|
|
1029
|
+
onFormBeforeMounted: "onFormBeforeMounted(dataId,formCode, done) {",
|
|
1030
|
+
onFormMounted: "onFormMounted(dataId,formCode) {",
|
|
1031
|
+
onFormDataChange:
|
|
1032
|
+
"onFormDataChange(fieldName, newValue, oldValue, formModel, subFormName, subFormRowIndex) {",
|
|
1033
|
+
wfStartConfirmText:
|
|
1034
|
+
"wfStartConfirmText(dataId, formCode, formData) {",
|
|
1035
|
+
wfConfig: "wfConfig(dataId, formCode, formData) {",
|
|
1036
|
+
globalConfig: "globalConfig(dataId, formCode) {",
|
|
1037
|
+
//'onFormValidate': 'onFormValidate() {',
|
|
1038
|
+
},
|
|
1039
|
+
showVabsearchConfigDialog: false,
|
|
1040
|
+
vabsearchConfigType: 1,
|
|
1041
|
+
showFormTemplateDialog: false,
|
|
1042
|
+
|
|
1043
|
+
formScriptParam: null,
|
|
1044
|
+
showFormScriptParamDialog: false,
|
|
1045
|
+
formScriptSuccess: null,
|
|
1046
|
+
showFormScriptSuccessDialog: false,
|
|
1047
|
+
wfObjConfigs: [],
|
|
1048
|
+
showWfObjConfigDialog: false,
|
|
1049
|
+
|
|
1050
|
+
dialogVisible: false,
|
|
1051
|
+
wfConfigData: [],
|
|
1052
|
+
|
|
1053
|
+
dialogVisible2: false,
|
|
1054
|
+
wfAgreeConfigData: [],
|
|
1055
|
+
|
|
1056
|
+
showBdCompanyEnvDialog1: false,
|
|
1057
|
+
showBdCompanyEnvDialog2: false,
|
|
1058
|
+
|
|
1059
|
+
globalConfigParams: ["dataId", "formCode"],
|
|
1060
|
+
|
|
1061
|
+
tip1: `流程主题表达式设置说明。
|
|
1062
|
+
|
|
1063
|
+
1、可使用参数:
|
|
1064
|
+
wf:流程对象
|
|
1065
|
+
name:流程名称
|
|
1066
|
+
objTypeCode:单据类型编码
|
|
1067
|
+
objId:对象id
|
|
1068
|
+
procInstId:act流程实例id
|
|
1069
|
+
procDefId:act流程定义id
|
|
1070
|
+
modelId:act流程模板id
|
|
1071
|
+
starterId:启动人ID
|
|
1072
|
+
starterName:启动人姓名
|
|
1073
|
+
uuid:流程实例唯一标识
|
|
1074
|
+
identityInfo:身份信息对象
|
|
1075
|
+
id:用户ID
|
|
1076
|
+
loginAccount:用户登录名
|
|
1077
|
+
nickName:用户姓名
|
|
1078
|
+
companyCode:企业编码
|
|
1079
|
+
parentCompanyCode:集团企业编码
|
|
1080
|
+
nowDate:当前时间
|
|
1081
|
+
nowDateStr:当前时间字符串(yyyy-MM-dd HH:mm:ss)
|
|
1082
|
+
nowDayStr:当前天字符串(yyyy-MM-dd)
|
|
1083
|
+
tableName:数据库表名,取表单设计中维护的表名作为参数名称
|
|
1084
|
+
tableField1:数据库表字段名1
|
|
1085
|
+
tableField2:数据库表字段名2
|
|
1086
|
+
tableField3:数据库表字段名3
|
|
1087
|
+
......
|
|
1088
|
+
|
|
1089
|
+
2、可使用函数:
|
|
1090
|
+
func.orgName(orgId):根据机构id获取机构名称
|
|
1091
|
+
func.convertDate(date, format):时间转换,如当前时间转为当前天字符串,则$\{func.convertDate(nowDate, 'yyyy-MM-dd')\},当前时间转为当前月字符串,则$\{func.convertDate(nowDate, 'yyyy-MM')\}
|
|
1092
|
+
|
|
1093
|
+
3、配置示例
|
|
1094
|
+
比如表名为:pm_product_project,配置如下:
|
|
1095
|
+
$\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_project.product_name\}$\{wf.name\}$\{pm_product_project.sn\}$\{func.orgName(pm_product_project.f_sale_org_id)\}$\{nowDayStr\}`,
|
|
1096
|
+
};
|
|
1097
|
+
},
|
|
1098
|
+
created() {
|
|
1099
|
+
//导入表单JSON后需要重新加载自定义CSS样式!!!
|
|
1100
|
+
this.designer.handleEvent("form-json-imported", () => {
|
|
1101
|
+
this.formCssCode = this.formConfig.cssCode || "";
|
|
1102
|
+
insertCustomCssToHead(this.formCssCcssCodeode);
|
|
1103
|
+
this.extractCssClass();
|
|
1104
|
+
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
1105
|
+
});
|
|
1106
|
+
},
|
|
1107
|
+
mounted() {
|
|
1108
|
+
/* SettingPanel和FormWidget为兄弟组件, 在FormWidget加载formConfig时,
|
|
1109
|
+
此处SettingPanel可能无法获取到formConfig.cssCode, 故加个延时函数! */
|
|
1110
|
+
setTimeout(() => {
|
|
1111
|
+
this.formCssCode = this.formConfig.cssCode || "";
|
|
1112
|
+
insertCustomCssToHead(this.formCssCode);
|
|
1113
|
+
this.extractCssClass();
|
|
1114
|
+
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
1115
|
+
}, 1200);
|
|
1116
|
+
this.getListByObjTypeCode();
|
|
1117
|
+
},
|
|
1118
|
+
methods: {
|
|
1119
|
+
showEventCollapse() {
|
|
1120
|
+
if (this.designerConfig["eventCollapse"] === undefined) {
|
|
1121
|
+
return true;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
return !!this.designerConfig["eventCollapse"];
|
|
1125
|
+
},
|
|
1126
|
+
|
|
1127
|
+
editFormCss() {
|
|
1128
|
+
this.formCssCode = this.designer.formConfig.cssCode;
|
|
1129
|
+
this.showEditFormCssDialogFlag = true;
|
|
1130
|
+
},
|
|
1131
|
+
|
|
1132
|
+
extractCssClass() {
|
|
1133
|
+
let regExp = /\..*{/g;
|
|
1134
|
+
let result = this.formCssCode ? this.formCssCode.match(regExp) : [];
|
|
1135
|
+
let cssNameArray = [];
|
|
1136
|
+
|
|
1137
|
+
if (!!result && result.length > 0) {
|
|
1138
|
+
result.forEach((rItem) => {
|
|
1139
|
+
let classArray = rItem.split(","); //切分逗号分割的多个class
|
|
1140
|
+
if (classArray.length > 0) {
|
|
1141
|
+
classArray.forEach((cItem) => {
|
|
1142
|
+
let caItem = cItem.trim();
|
|
1143
|
+
if (caItem.indexOf(".", 1) !== -1) {
|
|
1144
|
+
//查找第二个.位置
|
|
1145
|
+
let newClass = caItem.substring(
|
|
1146
|
+
caItem.indexOf(".") + 1,
|
|
1147
|
+
caItem.indexOf(".", 1)
|
|
1148
|
+
); //仅截取第一、二个.号之间的class
|
|
1149
|
+
if (!!newClass) {
|
|
1150
|
+
cssNameArray.push(newClass.trim());
|
|
1151
|
+
}
|
|
1152
|
+
} else if (caItem.indexOf(" ") !== -1) {
|
|
1153
|
+
//查找第一个空格位置
|
|
1154
|
+
let newClass = caItem.substring(
|
|
1155
|
+
caItem.indexOf(".") + 1,
|
|
1156
|
+
caItem.indexOf(" ")
|
|
1157
|
+
); //仅截取第一、二个.号之间的class
|
|
1158
|
+
if (!!newClass) {
|
|
1159
|
+
cssNameArray.push(newClass.trim());
|
|
1160
|
+
}
|
|
1161
|
+
} else {
|
|
1162
|
+
if (caItem.indexOf("{") !== -1) {
|
|
1163
|
+
//查找第一个{位置
|
|
1164
|
+
let newClass = caItem.substring(
|
|
1165
|
+
caItem.indexOf(".") + 1,
|
|
1166
|
+
caItem.indexOf("{")
|
|
1167
|
+
);
|
|
1168
|
+
cssNameArray.push(newClass.trim());
|
|
1169
|
+
} else {
|
|
1170
|
+
let newClass = caItem.substring(caItem.indexOf(".") + 1);
|
|
1171
|
+
cssNameArray.push(newClass.trim());
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
//this.cssClassList.length = 0
|
|
1180
|
+
this.cssClassList.splice(0, this.cssClassList.length); //清除数组必须用splice,length=0不会响应式更新!!
|
|
1181
|
+
this.cssClassList = Array.from(new Set(cssNameArray)); //数组去重
|
|
1182
|
+
},
|
|
1183
|
+
|
|
1184
|
+
saveFormCss() {
|
|
1185
|
+
this.extractCssClass();
|
|
1186
|
+
this.designer.formConfig.cssCode = this.formCssCode;
|
|
1187
|
+
insertCustomCssToHead(this.formCssCode);
|
|
1188
|
+
this.showEditFormCssDialogFlag = false;
|
|
1189
|
+
|
|
1190
|
+
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
1191
|
+
},
|
|
1192
|
+
|
|
1193
|
+
editGlobalFunctions() {
|
|
1194
|
+
this.functionsCode = this.designer.formConfig.functions;
|
|
1195
|
+
this.showEditFunctionsDialogFlag = true;
|
|
1196
|
+
},
|
|
1197
|
+
editFormScriptParam() {
|
|
1198
|
+
this.formScriptParam = this.designer.formConfig.formScriptParam;
|
|
1199
|
+
this.showFormScriptParamDialog = true;
|
|
1200
|
+
},
|
|
1201
|
+
|
|
1202
|
+
saveGlobalFunctions() {
|
|
1203
|
+
const codeHints = this.$refs.gfEditor.getEditorAnnotations();
|
|
1204
|
+
let syntaxErrorFlag = false;
|
|
1205
|
+
if (!!codeHints && codeHints.length > 0) {
|
|
1206
|
+
codeHints.forEach((chItem) => {
|
|
1207
|
+
if (chItem.type === "error") {
|
|
1208
|
+
syntaxErrorFlag = true;
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
if (syntaxErrorFlag) {
|
|
1213
|
+
this.$message.error(
|
|
1214
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1215
|
+
);
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
this.designer.formConfig.functions = this.functionsCode;
|
|
1221
|
+
insertGlobalFunctionsToHtml(this.functionsCode);
|
|
1222
|
+
this.showEditFunctionsDialogFlag = false;
|
|
1223
|
+
},
|
|
1224
|
+
|
|
1225
|
+
editFormEventHandler(eventName, dialogTitle) {
|
|
1226
|
+
this.curEventName = eventName;
|
|
1227
|
+
this.formEventHandlerCode = this.formConfig[eventName];
|
|
1228
|
+
let customTitle =
|
|
1229
|
+
typeof dialogTitle === "string" && dialogTitle ? dialogTitle : null;
|
|
1230
|
+
let eventTitle =
|
|
1231
|
+
customTitle ||
|
|
1232
|
+
this.eventDialogTitleMap[eventName] ||
|
|
1233
|
+
(eventName ? eventName + " 配置" : "配置");
|
|
1234
|
+
this.formEventDialogTitle = this.i18nt(eventTitle);
|
|
1235
|
+
this.showFormEventDialogFlag = true;
|
|
1236
|
+
},
|
|
1237
|
+
|
|
1238
|
+
saveFormEventHandler() {
|
|
1239
|
+
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1240
|
+
let syntaxErrorFlag = false;
|
|
1241
|
+
if (!!codeHints && codeHints.length > 0) {
|
|
1242
|
+
codeHints.forEach((chItem) => {
|
|
1243
|
+
if (chItem.type === "error") {
|
|
1244
|
+
syntaxErrorFlag = true;
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
|
|
1248
|
+
if (syntaxErrorFlag) {
|
|
1249
|
+
this.$message.error(
|
|
1250
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1251
|
+
);
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
this.formConfig[this.curEventName] = this.formEventHandlerCode;
|
|
1257
|
+
this.showFormEventDialogFlag = false;
|
|
1258
|
+
},
|
|
1259
|
+
openFormTemplate(flag) {
|
|
1260
|
+
this.formTemplateFlag = flag;
|
|
1261
|
+
this.showFormTemplateDialog = true;
|
|
1262
|
+
},
|
|
1263
|
+
confirmFormTemplate(rows) {
|
|
1264
|
+
if (rows.length) {
|
|
1265
|
+
let row = rows[0];
|
|
1266
|
+
if (this.formTemplateFlag == 1) {
|
|
1267
|
+
//新增
|
|
1268
|
+
this.$set(this.formConfig, "addFormCode", row.formCode);
|
|
1269
|
+
this.$set(this.formConfig, "addFormName", row.formName);
|
|
1270
|
+
} else {
|
|
1271
|
+
//查看
|
|
1272
|
+
this.$set(this.formConfig, "editFormCode", row.formCode);
|
|
1273
|
+
this.$set(this.formConfig, "editFormName", row.formName);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
getEventButtonName(funStr) {
|
|
1278
|
+
let name = this.i18nt("designer.setting.addEventHandler");
|
|
1279
|
+
if (funStr) name = "已维护";
|
|
1280
|
+
return name;
|
|
1281
|
+
},
|
|
1282
|
+
saveFormScriptParam() {
|
|
1283
|
+
const codeHints = this.$refs.gfEditor.getEditorAnnotations();
|
|
1284
|
+
let syntaxErrorFlag = false;
|
|
1285
|
+
if (!!codeHints && codeHints.length > 0) {
|
|
1286
|
+
codeHints.forEach((chItem) => {
|
|
1287
|
+
if (chItem.type === "error") {
|
|
1288
|
+
syntaxErrorFlag = true;
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
|
|
1292
|
+
if (syntaxErrorFlag) {
|
|
1293
|
+
this.$message.error(
|
|
1294
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1295
|
+
);
|
|
1296
|
+
return;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
this.designer.formConfig.formScriptParam = this.formScriptParam;
|
|
1301
|
+
this.showFormScriptParamDialog = false;
|
|
1302
|
+
},
|
|
1303
|
+
editFormScriptSuccess() {
|
|
1304
|
+
this.formScriptSuccess = this.designer.formConfig.formScriptSuccess;
|
|
1305
|
+
this.showFormScriptSuccessDialog = true;
|
|
1306
|
+
},
|
|
1307
|
+
saveFormScriptSuccess() {
|
|
1308
|
+
const codeHints = this.$refs.gfEditor.getEditorAnnotations();
|
|
1309
|
+
let syntaxErrorFlag = false;
|
|
1310
|
+
if (!!codeHints && codeHints.length > 0) {
|
|
1311
|
+
codeHints.forEach((chItem) => {
|
|
1312
|
+
if (chItem.type === "error") {
|
|
1313
|
+
syntaxErrorFlag = true;
|
|
1314
|
+
}
|
|
1315
|
+
});
|
|
1316
|
+
|
|
1317
|
+
if (syntaxErrorFlag) {
|
|
1318
|
+
this.$message.error(
|
|
1319
|
+
this.i18nt("designer.setting.syntaxCheckWarning")
|
|
1320
|
+
);
|
|
1321
|
+
return;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
this.designer.formConfig.formScriptSuccess = this.formScriptSuccess;
|
|
1326
|
+
this.showFormScriptSuccessDialog = false;
|
|
1327
|
+
},
|
|
1328
|
+
openWfObjConfigDialog() {
|
|
1329
|
+
this.showWfObjConfigDialog = true;
|
|
1330
|
+
},
|
|
1331
|
+
confirmWfObjConfigDialog(rows) {
|
|
1332
|
+
this.wfObjConfigs = rows || [];
|
|
1333
|
+
},
|
|
1334
|
+
getListByObjTypeCode() {
|
|
1335
|
+
let reportTemplate = this.designer.vueInstance.reportTemplate;
|
|
1336
|
+
this.$http({
|
|
1337
|
+
url: `/${reportTemplate.serviceName}/wf_obj_config/listByObjTypeCode`,
|
|
1338
|
+
method: `post`,
|
|
1339
|
+
data: {
|
|
1340
|
+
stringOne: reportTemplate.objTypeCode,
|
|
1341
|
+
},
|
|
1342
|
+
isLoading: true,
|
|
1343
|
+
success: (res) => {
|
|
1344
|
+
this.wfObjConfigs = res.objx || [];
|
|
1345
|
+
},
|
|
1346
|
+
});
|
|
1347
|
+
},
|
|
1348
|
+
changeWfEnabled(val) {
|
|
1349
|
+
this.designer.vueInstance.reportTemplate.objTypeName = null;
|
|
1350
|
+
this.designer.vueInstance.reportTemplate.fromWfFormCode = null;
|
|
1351
|
+
},
|
|
1352
|
+
openWfConfigDataDialog() {
|
|
1353
|
+
let wfConfigData = this.formConfig.wfConfigData || [];
|
|
1354
|
+
this.dialogVisible = true;
|
|
1355
|
+
this.wfConfigData = this.$baseLodash.cloneDeep(wfConfigData);
|
|
1356
|
+
},
|
|
1357
|
+
addItem() {
|
|
1358
|
+
let newItem = {
|
|
1359
|
+
type: null,
|
|
1360
|
+
serveType: null,
|
|
1361
|
+
serveName: null,
|
|
1362
|
+
modelKey: null,
|
|
1363
|
+
modelOrders: undefined,
|
|
1364
|
+
taskSteps: null,
|
|
1365
|
+
companyCodes: null,
|
|
1366
|
+
};
|
|
1367
|
+
this.wfConfigData.push(newItem);
|
|
1368
|
+
},
|
|
1369
|
+
confirmWfConfigDataDialog() {
|
|
1370
|
+
let tableData = this.wfConfigData;
|
|
1371
|
+
let map = {};
|
|
1372
|
+
for (let i = 0; i < tableData.length; i++) {
|
|
1373
|
+
let item = tableData[i];
|
|
1374
|
+
if (!item.serveName) {
|
|
1375
|
+
this.$message({
|
|
1376
|
+
type: "error",
|
|
1377
|
+
message: "服务名称不能为空",
|
|
1378
|
+
});
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
if (!item.companyCodes) {
|
|
1382
|
+
this.$message({
|
|
1383
|
+
type: "error",
|
|
1384
|
+
message: "组织编码不能为空",
|
|
1385
|
+
});
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
let modelOrders = item.modelOrders ?? "";
|
|
1389
|
+
|
|
1390
|
+
let serveName = item.serveName;
|
|
1391
|
+
let companyCodes = item.companyCodes;
|
|
1392
|
+
let key = serveName + "_" + companyCodes + "_" + modelOrders;
|
|
1393
|
+
if (!map[key]) {
|
|
1394
|
+
map[key] = true;
|
|
1395
|
+
} else {
|
|
1396
|
+
this.$message({
|
|
1397
|
+
type: "error",
|
|
1398
|
+
message: "[服务+组织+流程模板序号]不能重复",
|
|
1399
|
+
});
|
|
1400
|
+
return;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
this.dialogVisible = !1;
|
|
1405
|
+
this.formConfig.wfConfigData = this.wfConfigData;
|
|
1406
|
+
},
|
|
1407
|
+
|
|
1408
|
+
openWfConfigDataDialog2() {
|
|
1409
|
+
let wfAgreeConfigData = this.formConfig.wfAgreeConfigData || [];
|
|
1410
|
+
this.dialogVisible2 = true;
|
|
1411
|
+
this.wfAgreeConfigData = this.$baseLodash.cloneDeep(wfAgreeConfigData);
|
|
1412
|
+
},
|
|
1413
|
+
addItem2() {
|
|
1414
|
+
let newItem = {
|
|
1415
|
+
type: null,
|
|
1416
|
+
serveType: null,
|
|
1417
|
+
serveName: null,
|
|
1418
|
+
modelKey: null,
|
|
1419
|
+
modelOrders: undefined,
|
|
1420
|
+
taskSteps: null,
|
|
1421
|
+
companyCodes: null,
|
|
1422
|
+
};
|
|
1423
|
+
this.wfAgreeConfigData.push(newItem);
|
|
1424
|
+
},
|
|
1425
|
+
confirmWfConfigDataDialog2() {
|
|
1426
|
+
let tableData = this.wfAgreeConfigData;
|
|
1427
|
+
|
|
1428
|
+
let map = {};
|
|
1429
|
+
for (let i = 0; i < tableData.length; i++) {
|
|
1430
|
+
let item = tableData[i];
|
|
1431
|
+
if (!item.serveName) {
|
|
1432
|
+
this.$message({
|
|
1433
|
+
type: "error",
|
|
1434
|
+
message: "服务名称不能为空",
|
|
1435
|
+
});
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
if (!item.companyCodes) {
|
|
1439
|
+
this.$message({
|
|
1440
|
+
type: "error",
|
|
1441
|
+
message: "组织编码不能为空",
|
|
1442
|
+
});
|
|
1443
|
+
return;
|
|
1444
|
+
}
|
|
1445
|
+
let modelOrders = item.modelOrders ?? "";
|
|
1446
|
+
|
|
1447
|
+
let serveName = item.serveName;
|
|
1448
|
+
let companyCodes = item.companyCodes;
|
|
1449
|
+
let key = serveName + "_" + companyCodes + "_" + modelOrders;
|
|
1450
|
+
if (!map[key]) {
|
|
1451
|
+
map[key] = true;
|
|
1452
|
+
} else {
|
|
1453
|
+
this.$message({
|
|
1454
|
+
type: "error",
|
|
1455
|
+
message: "[服务+组织+流程模板序号]不能重复",
|
|
1456
|
+
});
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
this.dialogVisible2 = !1;
|
|
1461
|
+
this.formConfig.wfAgreeConfigData = this.wfAgreeConfigData;
|
|
1462
|
+
},
|
|
1463
|
+
|
|
1464
|
+
clearBdCompanyEnv1(row) {
|
|
1465
|
+
row.serveName = null;
|
|
1466
|
+
row.companyCodes = null;
|
|
1467
|
+
},
|
|
1468
|
+
openBdCompanyEnvDialog1(rowIndex) {
|
|
1469
|
+
this.operateIndex = rowIndex;
|
|
1470
|
+
this.showBdCompanyEnvDialog1 = true;
|
|
1471
|
+
},
|
|
1472
|
+
confirmBdCompanyEnvDialog1(rows) {
|
|
1473
|
+
if (rows.length) {
|
|
1474
|
+
let row = rows[0];
|
|
1475
|
+
let item = this.wfConfigData[this.operateIndex];
|
|
1476
|
+
item.serveName = row.bdService;
|
|
1477
|
+
item.companyCodes = row.bdCompanyCode;
|
|
1478
|
+
}
|
|
1479
|
+
},
|
|
1480
|
+
|
|
1481
|
+
clearBdCompanyEnv2(row) {
|
|
1482
|
+
row.serveName = null;
|
|
1483
|
+
row.companyCodes = null;
|
|
1484
|
+
},
|
|
1485
|
+
openBdCompanyEnvDialog2(rowIndex) {
|
|
1486
|
+
this.operateIndex = rowIndex;
|
|
1487
|
+
this.showBdCompanyEnvDialog2 = true;
|
|
1488
|
+
},
|
|
1489
|
+
confirmBdCompanyEnvDialog2(rows) {
|
|
1490
|
+
if (rows.length) {
|
|
1491
|
+
let row = rows[0];
|
|
1492
|
+
let item = this.wfAgreeConfigData[this.operateIndex];
|
|
1493
|
+
item.serveName = row.bdService;
|
|
1494
|
+
item.companyCodes = row.bdCompanyCode;
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1497
|
+
addOtherTab() {
|
|
1498
|
+
if (!this.formConfig.otherTabList) {
|
|
1499
|
+
this.$set(this.formConfig, "otherTabList", []);
|
|
1500
|
+
}
|
|
1501
|
+
this.formConfig.otherTabList.push({
|
|
1502
|
+
label: null,
|
|
1503
|
+
formCode: null,
|
|
1504
|
+
});
|
|
1505
|
+
},
|
|
1506
|
+
},
|
|
1507
|
+
};
|
|
1508
|
+
</script>
|
|
1509
|
+
|
|
1510
|
+
<style lang="scss" scoped>
|
|
1511
|
+
.setting-form {
|
|
1512
|
+
::v-deep .el-form-item__label {
|
|
1513
|
+
font-size: 13px;
|
|
1514
|
+
//text-overflow: ellipsis;
|
|
1515
|
+
overflow: hidden;
|
|
1516
|
+
white-space: nowrap;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
::v-deep .el-form-item--mini.el-form-item {
|
|
1520
|
+
margin-bottom: 6px;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
.radio-group-custom {
|
|
1524
|
+
::v-deep .el-radio-button__inner {
|
|
1525
|
+
padding-left: 12px;
|
|
1526
|
+
padding-right: 12px;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.custom-divider.el-divider--horizontal {
|
|
1531
|
+
margin: 10px 0;
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.setting-collapse {
|
|
1536
|
+
::v-deep .el-collapse-item__content {
|
|
1537
|
+
padding-bottom: 6px;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
::v-deep .el-collapse-item__header {
|
|
1541
|
+
font-weight: bold;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.small-padding-dialog {
|
|
1546
|
+
::v-deep .el-dialog__body {
|
|
1547
|
+
padding: 6px 15px 12px 15px;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
::v-deep .el-textarea .el-textarea__inner {
|
|
1551
|
+
word-break: break-all;
|
|
1552
|
+
}
|
|
1553
|
+
</style>
|