cloud-web-corejs 1.0.27 → 1.0.28
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/exportDialog.vue +1 -1
- package/src/components/jsonImport/index.vue +151 -202
- package/src/components/jsonImport/mixins.js +1 -309
- package/src/layout/components/Sidebar/default.vue +1 -2
- package/src/store/config/index.js +3 -0
- package/src/store/modules/permission.js +2 -2
- package/src/views/bd/setting/form_script/list.vue +223 -223
- package/src/views/bd/setting/form_script/list1.vue +444 -444
- package/src/views/bd/setting/form_template/list.vue +766 -766
- package/src/views/bd/setting/menu_kind/list.vue +266 -262
- package/src/views/bd/setting/table_model/list.vue +491 -491
- package/src/views/user/home/index.vue +2 -1
|
@@ -1,766 +1,766 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="containt">
|
|
3
|
-
<x-tabs ref="xTabs" v-model="activeName" class="tab-box" paneKeyName="formCode">
|
|
4
|
-
<el-tab-pane :label="$t1('常规')" name="first">
|
|
5
|
-
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :currentFormType="currentFormType"
|
|
6
|
-
:parent-target="_self" @reload="$reloadHandle"
|
|
7
|
-
@openDesignDialog="openDesingerDialogByChild"></editView>
|
|
8
|
-
</el-tab-pane>
|
|
9
|
-
<el-tab-pane :label="$t1('列表')" name="second">
|
|
10
|
-
<div class="tree-box fl">
|
|
11
|
-
<div class="tit"><b>表单分类</b></div>
|
|
12
|
-
<div class="tree-btns" style="margin-top: 10px;">
|
|
13
|
-
</div>
|
|
14
|
-
<el-tree
|
|
15
|
-
v-if="showTree"
|
|
16
|
-
:props="defaultProps"
|
|
17
|
-
:load="loadNode"
|
|
18
|
-
node-key="id"
|
|
19
|
-
ref="tree"
|
|
20
|
-
highlight-current
|
|
21
|
-
lazy
|
|
22
|
-
:expand-on-click-node="false"
|
|
23
|
-
@node-click="handleNodeClick"
|
|
24
|
-
class="tree-list"
|
|
25
|
-
icon-class="el-icon-arrow-down"
|
|
26
|
-
></el-tree>
|
|
27
|
-
</div>
|
|
28
|
-
<label id="labBtn">
|
|
29
|
-
<div class="icon">
|
|
30
|
-
<i class="el-icon-more"></i>
|
|
31
|
-
<i class="el-icon-more"></i>
|
|
32
|
-
</div>
|
|
33
|
-
</label>
|
|
34
|
-
<div class="main-right fr" style="padding-left:6px;">
|
|
35
|
-
<div class="grid-height">
|
|
36
|
-
<vxe-grid
|
|
37
|
-
ref="table-m1"
|
|
38
|
-
v-bind="vxeOption"
|
|
39
|
-
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
40
|
-
@custom="$vxeTableUtil.customHandle"
|
|
41
|
-
>
|
|
42
|
-
<template #form>
|
|
43
|
-
<tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
|
|
44
|
-
<template #buttonLeft>
|
|
45
|
-
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog()"
|
|
46
|
-
v-if="isDev && currentFormType.addAuth===1">新增
|
|
47
|
-
</vxe-button>
|
|
48
|
-
<vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">导入发布
|
|
49
|
-
</vxe-button>
|
|
50
|
-
<vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
|
|
51
|
-
v-if="isDev">导出发布
|
|
52
|
-
</vxe-button>
|
|
53
|
-
<projectTagAddButton :option="addProjectTagOption" v-if="isDev"></projectTagAddButton>
|
|
54
|
-
<projectTagDeleteButton :option="deleteProjectTagOption" v-if="isDev"></projectTagDeleteButton>
|
|
55
|
-
</template>
|
|
56
|
-
<template #buttonRight>
|
|
57
|
-
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
58
|
-
plain>{{$t1('重置')}}
|
|
59
|
-
</vxe-button>
|
|
60
|
-
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
|
|
61
|
-
</vxe-button>
|
|
62
|
-
</template>
|
|
63
|
-
<template #menuKindName>
|
|
64
|
-
<vxe-form-item title="表单分类:" field="tag">
|
|
65
|
-
<template v-slot>
|
|
66
|
-
<el-input v-model="currentMenuKindName" disabled></el-input>
|
|
67
|
-
</template>
|
|
68
|
-
</vxe-form-item>
|
|
69
|
-
</template>
|
|
70
|
-
<template #tag>
|
|
71
|
-
<vxe-form-item title="项目标签:" field="tag">
|
|
72
|
-
<template v-slot>
|
|
73
|
-
<el-input
|
|
74
|
-
class="search-input"
|
|
75
|
-
max="200"
|
|
76
|
-
:value="getTabNames()"
|
|
77
|
-
@clear="
|
|
78
|
-
checkTags = [];
|
|
79
|
-
"
|
|
80
|
-
v-el-readonly
|
|
81
|
-
clearable
|
|
82
|
-
>
|
|
83
|
-
<i slot="suffix" class="el-input__icon el-icon-search" @click="openProjectTagDialog3"></i>
|
|
84
|
-
</el-input>
|
|
85
|
-
</template>
|
|
86
|
-
</vxe-form-item>
|
|
87
|
-
</template>
|
|
88
|
-
</tableForm>
|
|
89
|
-
</template>
|
|
90
|
-
<template #tag="{row}">
|
|
91
|
-
<projectTagView v-model="row.formTemplateTagDTOs" :readonly="true"></projectTagView>
|
|
92
|
-
</template>
|
|
93
|
-
</vxe-grid>
|
|
94
|
-
<el-drawer title="流程模板" :visible.sync="showItemView" :modal="false" :wrapperClosable="false"
|
|
95
|
-
:destroy-on-close="true" size="90%" direction="btt">
|
|
96
|
-
<itemList v-if="showItemView" :formTemplate="currentRow"
|
|
97
|
-
@openWfDesignDialog="openWfDesignDialog"></itemList>
|
|
98
|
-
</el-drawer>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
</el-tab-pane>
|
|
102
|
-
<template #editTab="{tab,index,reloadTabContent}">
|
|
103
|
-
<el-tab-pane :key="tab.data.id" :label.sync="tab.data.formName" :name="tab.data.formCode"
|
|
104
|
-
:closable="true">
|
|
105
|
-
<editView v-if="tab.showContent" :_dataId="tab.dataId" :currentFormType="currentFormType"
|
|
106
|
-
:parent-target="_self"
|
|
107
|
-
@reload="reloadTabContent" @openDesignDialog="openDesingerDialogByChild"></editView>
|
|
108
|
-
</el-tab-pane>
|
|
109
|
-
</template>
|
|
110
|
-
</x-tabs>
|
|
111
|
-
<el-drawer :title="'表单设计('+formName+')'" :visible.sync="showDesingerDialog" :modal="false"
|
|
112
|
-
:destroy-on-close="true"
|
|
113
|
-
size="100%" direction="rtl" :before-close="closeFormDesignwinEvent" :append-to-body="false"
|
|
114
|
-
class="designer-drawer" :class="[isFullscreen ? 'is-fullscreen' : '']" @close="handleFormDesignClose">
|
|
115
|
-
<el-tabs v-model="formDesTabs" type="card" class="tab-boxOnly" :stretch="true">
|
|
116
|
-
<el-tab-pane label="设计器" name="first">
|
|
117
|
-
<designer ref="designer" :formCode.sync="formCode" @reflushTemplateList="reflushTemplateList"></designer>
|
|
118
|
-
</el-tab-pane>
|
|
119
|
-
<el-tab-pane label="后端脚本" name="second">
|
|
120
|
-
<formScriptList :formCode="formCode" :formTemplate="currentFormTemplate"
|
|
121
|
-
v-if="showFormScriptList"></formScriptList>
|
|
122
|
-
</el-tab-pane>
|
|
123
|
-
</el-tabs>
|
|
124
|
-
<el-button class="isFullIcon" v-if="!isFullscreen" @click="handleFullscreen">
|
|
125
|
-
<el-tooltip effect="dark" content="全屏" placement="top">
|
|
126
|
-
<i class="iconfont icon-quanping"></i>
|
|
127
|
-
</el-tooltip>
|
|
128
|
-
|
|
129
|
-
</el-button>
|
|
130
|
-
<el-button class="isFullIcon" v-else @click="handleFullscreen">
|
|
131
|
-
<el-tooltip effect="dark" content="缩小" placement="top">
|
|
132
|
-
<i class="iconfont icon-suoxiao"></i>
|
|
133
|
-
</el-tooltip>
|
|
134
|
-
</el-button>
|
|
135
|
-
</el-drawer>
|
|
136
|
-
|
|
137
|
-
<el-dialog
|
|
138
|
-
:title="流程设计"
|
|
139
|
-
:append-to-body="true"
|
|
140
|
-
:modal-append-to-body="true"
|
|
141
|
-
:close-on-click-modal="false"
|
|
142
|
-
v-if="showWfDialog"
|
|
143
|
-
:visible.sync="showWfDialog"
|
|
144
|
-
:modal="false"
|
|
145
|
-
custom-class="dialog-style designer-dialog"
|
|
146
|
-
width="100%"
|
|
147
|
-
height="100%"
|
|
148
|
-
top="0px"
|
|
149
|
-
bottom="0px"
|
|
150
|
-
:before-close="closeDesignwinEvent"
|
|
151
|
-
:destroy-on-close="true"
|
|
152
|
-
v-el-drag-dialog
|
|
153
|
-
>
|
|
154
|
-
<iframe :src="wfUrl" :style="'width:100%;height:' + ($root.$el.clientHeight - 30 - 12) + 'px'"></iframe>
|
|
155
|
-
</el-dialog>
|
|
156
|
-
|
|
157
|
-
<userDialog v-if="showUserDialog" :visiable.sync="showUserDialog" @confirm="confirmUser"
|
|
158
|
-
:multi.sync="wfAssignMulti"/>
|
|
159
|
-
<positionDialog v-if="showPositionDialog" :visiable.sync="showPositionDialog" @confirm="confirmPosition"/>
|
|
160
|
-
<scriptDescriptionDialog path="static/readme/Wf.txt" v-if="showScriptDescriptionDialog"
|
|
161
|
-
:visiable.sync="showScriptDescriptionDialog"></scriptDescriptionDialog>
|
|
162
|
-
|
|
163
|
-
<formTypeEditDialog v-if="showFormTypeDialog" :visiable.sync="showFormTypeDialog" :_dataId.sync="editFormTypeId"
|
|
164
|
-
@confirm="confirmFormTypeEditDialog"></formTypeEditDialog>
|
|
165
|
-
|
|
166
|
-
<ftHistoryDialog v-if="showFtHistoryDialog" :visiable.sync="showFtHistoryDialog"
|
|
167
|
-
:formCode.sync="operateFtHistory.formCode" @confirm="confirmFtHistoryDialog" :multi="false"/>
|
|
168
|
-
<projectTagDialog v-if="showProjectTagDialog3"
|
|
169
|
-
:visiable.sync="showProjectTagDialog3"
|
|
170
|
-
@confirm="confirmProjectTagDialog3"
|
|
171
|
-
:rows="checkTags"
|
|
172
|
-
:multi="true"></projectTagDialog>
|
|
173
|
-
|
|
174
|
-
</div>
|
|
175
|
-
</template>
|
|
176
|
-
|
|
177
|
-
<script>
|
|
178
|
-
import {treeScollx} from '@base/utils/global.js';
|
|
179
|
-
import editView from './edit.vue';
|
|
180
|
-
|
|
181
|
-
import userDialog from '../../../../views/user/user/dialog.vue';
|
|
182
|
-
import positionDialog from '../../../../views/user/position/dialog.vue';
|
|
183
|
-
import scriptDescriptionDialog from '@base/components/scriptDescription/dialog'
|
|
184
|
-
|
|
185
|
-
import itemList from "./itemList";
|
|
186
|
-
import formTypeEditDialog from "../../../../views/user/form/form_type/editDialog";
|
|
187
|
-
import ftHistoryDialog from "./ftHistoryDialog";
|
|
188
|
-
import indexUtil from "@base/utils/index.js"
|
|
189
|
-
import formScriptList from '../../../../views/bd/setting/form_script/form_list.vue';
|
|
190
|
-
import projectTagDialog from "../../../../views/user/project_tag/dialog.vue";
|
|
191
|
-
import tableForm from "@base/components/table/tableForm.vue";
|
|
192
|
-
import {getBdFlag} from "@base/api/user";
|
|
193
|
-
import projectTagDeleteButton from "@base/components/projectTag/deleteButton.vue";
|
|
194
|
-
import projectTagAddButton from "@base/components/projectTag/addButton.vue";
|
|
195
|
-
import projectTagView from "@base/components/projectTag/view.vue";
|
|
196
|
-
|
|
197
|
-
export default {
|
|
198
|
-
name: 'bd_form_template:list',
|
|
199
|
-
components: {
|
|
200
|
-
projectTagView,
|
|
201
|
-
projectTagAddButton, projectTagDeleteButton,
|
|
202
|
-
tableForm,
|
|
203
|
-
editView,
|
|
204
|
-
userDialog,
|
|
205
|
-
positionDialog,
|
|
206
|
-
scriptDescriptionDialog,
|
|
207
|
-
ftHistoryDialog,
|
|
208
|
-
itemList,
|
|
209
|
-
formTypeEditDialog,
|
|
210
|
-
formScriptList,
|
|
211
|
-
projectTagDialog,
|
|
212
|
-
designer: () => import('../../../../views/user/form/vform/designer.vue')
|
|
213
|
-
},
|
|
214
|
-
data() {
|
|
215
|
-
return {
|
|
216
|
-
isFullscreen: false,
|
|
217
|
-
formDesTabs: 'first',
|
|
218
|
-
activeName: 'second',
|
|
219
|
-
dataId: 0,
|
|
220
|
-
showEdit: false,
|
|
221
|
-
vxeOption: {},
|
|
222
|
-
formData: {},
|
|
223
|
-
showDesingerDialog: false,
|
|
224
|
-
formCode: null,
|
|
225
|
-
formName: null,
|
|
226
|
-
templateId: null,
|
|
227
|
-
currentFormTemplate: null,
|
|
228
|
-
|
|
229
|
-
showItemEdit: false,
|
|
230
|
-
showParamEdit: false,
|
|
231
|
-
vxeOption1: {},
|
|
232
|
-
editId: '',
|
|
233
|
-
itemEditId: '',
|
|
234
|
-
pRow: null,
|
|
235
|
-
currentRow: {},
|
|
236
|
-
serviceId: null,
|
|
237
|
-
itemServiceId: null,
|
|
238
|
-
|
|
239
|
-
showWfDialog: false,
|
|
240
|
-
wfUrl: '',
|
|
241
|
-
ph: '',
|
|
242
|
-
dialogActiveName: 'first',
|
|
243
|
-
showFunctionScriptList: false,
|
|
244
|
-
showUserDialog: false,
|
|
245
|
-
wfAssignData: [],
|
|
246
|
-
wfAssignCallback: null,
|
|
247
|
-
wfAssignMulti: true,
|
|
248
|
-
|
|
249
|
-
showPositionDialog: false,
|
|
250
|
-
wfAssignPositionData: [],
|
|
251
|
-
wfAssignPositionCallback: null,
|
|
252
|
-
|
|
253
|
-
showFormTemplateDialog: false,
|
|
254
|
-
wfAssignFormTemplateCallback: null,
|
|
255
|
-
|
|
256
|
-
showScriptDescriptionDialog: false,
|
|
257
|
-
showWfDiyAttributeEdit: false,
|
|
258
|
-
|
|
259
|
-
showFtHistoryDialog: false,
|
|
260
|
-
operateFtHistory: null,
|
|
261
|
-
|
|
262
|
-
defaultProps: {
|
|
263
|
-
label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
|
264
|
-
children: [],
|
|
265
|
-
isLeaf: 'leaf'
|
|
266
|
-
},
|
|
267
|
-
showItemView: false,
|
|
268
|
-
|
|
269
|
-
currentFormType: {},
|
|
270
|
-
editFormTypeId: null,
|
|
271
|
-
showFormTypeDialog: false,
|
|
272
|
-
showFormScriptList: false,
|
|
273
|
-
addProjectTagOption: {
|
|
274
|
-
url: USER_PREFIX + `/formTemplate/saveTag`,
|
|
275
|
-
tableDatas: () => {
|
|
276
|
-
return this.$refs["table-m1"].getCheckboxRecords(true);
|
|
277
|
-
},
|
|
278
|
-
reqData: (tagDatas, tableDatas) => {
|
|
279
|
-
let formCodes = tableDatas.map(item => item.formCode);
|
|
280
|
-
let tagCodes = tagDatas.map(item => item.tagCode);
|
|
281
|
-
let reqData = {
|
|
282
|
-
tagCodes,
|
|
283
|
-
formCodes
|
|
284
|
-
};
|
|
285
|
-
return reqData;
|
|
286
|
-
},
|
|
287
|
-
callback: () => {
|
|
288
|
-
this.searchEvent()
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
deleteProjectTagOption: {
|
|
292
|
-
url: USER_PREFIX + `/formTemplate/deleteTag`,
|
|
293
|
-
tableDatas: () => {
|
|
294
|
-
return this.$refs["table-m1"].getCheckboxRecords(true);
|
|
295
|
-
},
|
|
296
|
-
reqData: (tagDatas, tableDatas) => {
|
|
297
|
-
let formCodes = tableDatas.map(item => item.formCode);
|
|
298
|
-
let tagCodes = tagDatas.map(item => item.tagCode);
|
|
299
|
-
let reqData = {
|
|
300
|
-
tagCodes,
|
|
301
|
-
formCodes
|
|
302
|
-
};
|
|
303
|
-
return reqData;
|
|
304
|
-
},
|
|
305
|
-
callback: () => {
|
|
306
|
-
this.searchEvent()
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
showProjectTagDialog3: false,
|
|
310
|
-
checkTags: [],
|
|
311
|
-
isDev: true,
|
|
312
|
-
menuKindAuth: {},
|
|
313
|
-
showTree: false
|
|
314
|
-
};
|
|
315
|
-
},
|
|
316
|
-
computed: {
|
|
317
|
-
currentMenuKindId() {
|
|
318
|
-
return this.currentFormType?.id || null
|
|
319
|
-
},
|
|
320
|
-
currentMenuKindName() {
|
|
321
|
-
return this.currentFormType?.name || null
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
watch: {
|
|
325
|
-
formDesTabs(val) {
|
|
326
|
-
if (this.showFormScriptList == false && val == 'second') {
|
|
327
|
-
this.showFormScriptList = true;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
mounted() {
|
|
332
|
-
treeScollx({target: this, type: 'default'});
|
|
333
|
-
this.getBdEnv();
|
|
334
|
-
this.initTableList();
|
|
335
|
-
this.initWfWinParam();
|
|
336
|
-
},
|
|
337
|
-
methods: {
|
|
338
|
-
searchEvent() {
|
|
339
|
-
this.$refs['table-m1'].commitProxy('reload');
|
|
340
|
-
},
|
|
341
|
-
resetEvent() {
|
|
342
|
-
this.formData = {};
|
|
343
|
-
this.checkTags = [];
|
|
344
|
-
this.$refs['table-m1'].commitProxy('reload');
|
|
345
|
-
},
|
|
346
|
-
openEditDialog(row) {
|
|
347
|
-
let formCode = row?.formCode || null;
|
|
348
|
-
/*this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
349
|
-
this.activeName = 'first';
|
|
350
|
-
this.showItemEdit = false;
|
|
351
|
-
this.$openEditView('showEdit');*/
|
|
352
|
-
if (!formCode) {
|
|
353
|
-
this.dataId = formCode;
|
|
354
|
-
this.activeName = 'first';
|
|
355
|
-
this.$openEditView('showEdit');
|
|
356
|
-
} else {
|
|
357
|
-
this.$refs.xTabs.openEditTab(row);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
openDesingerDialog(row, callback) {
|
|
362
|
-
this.formCode = row.formCode;
|
|
363
|
-
this.formName = row.formName;
|
|
364
|
-
this.currentFormTemplate = row;
|
|
365
|
-
this.isFullscreen = false;
|
|
366
|
-
this.showDesingerDialog = true;
|
|
367
|
-
this.designerSaveCallback = callback ?? null;
|
|
368
|
-
},
|
|
369
|
-
openDesingerDialogByChild({row, callback}) {
|
|
370
|
-
this.openDesingerDialog(row, callback)
|
|
371
|
-
},
|
|
372
|
-
reflushTemplateList() {
|
|
373
|
-
this.searchEvent();
|
|
374
|
-
this.designerSaveCallback && this.designerSaveCallback();
|
|
375
|
-
},
|
|
376
|
-
handleFullscreen() {
|
|
377
|
-
let isFullscreen = this.isFullscreen;
|
|
378
|
-
if (!isFullscreen) {
|
|
379
|
-
indexUtil.addClass(document.body, "hideMenu");
|
|
380
|
-
} else {
|
|
381
|
-
indexUtil.removeClass(document.body, "hideMenu");
|
|
382
|
-
}
|
|
383
|
-
this.isFullscreen = !isFullscreen;
|
|
384
|
-
},
|
|
385
|
-
openFtHistoryDialog(row) {
|
|
386
|
-
this.operateFtHistory = row;
|
|
387
|
-
this.showFtHistoryDialog = true;
|
|
388
|
-
},
|
|
389
|
-
confirmFtHistoryDialog(row) {
|
|
390
|
-
this.searchEvent();
|
|
391
|
-
},
|
|
392
|
-
closeFormDesignwinEvent(done) {
|
|
393
|
-
this.$baseConfirm('请确认"已保存"报表模板,是否继续关闭?').then(() => {
|
|
394
|
-
indexUtil.removeClass(document.body, "hideMenu");
|
|
395
|
-
done && done();
|
|
396
|
-
});
|
|
397
|
-
},
|
|
398
|
-
getSearchParam() {
|
|
399
|
-
let tagCodes = null;
|
|
400
|
-
if (this.checkTags.length) {
|
|
401
|
-
tagCodes = this.checkTags.map(item => item.tagCode);
|
|
402
|
-
}
|
|
403
|
-
let currentFormType = this.currentFormType || {}
|
|
404
|
-
return {
|
|
405
|
-
...this.formData,
|
|
406
|
-
tagCodes,
|
|
407
|
-
menuKindCode: currentFormType.menuKindCode || null,
|
|
408
|
-
history: false
|
|
409
|
-
};
|
|
410
|
-
},
|
|
411
|
-
initTableList() {
|
|
412
|
-
let that = this;
|
|
413
|
-
let tableOption = {
|
|
414
|
-
vue: this,
|
|
415
|
-
tableRef: 'table-m1',
|
|
416
|
-
tableName: 'bd_form_template_list-m1',
|
|
417
|
-
path: USER_PREFIX + '/formTemplate/listPage',
|
|
418
|
-
param: () => {
|
|
419
|
-
return this.getSearchParam();
|
|
420
|
-
},
|
|
421
|
-
columns: [
|
|
422
|
-
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
423
|
-
{
|
|
424
|
-
title: '模板名称',
|
|
425
|
-
field: 'formName',
|
|
426
|
-
width: 150,
|
|
427
|
-
fixed: 'left'
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
title: '模板编码',
|
|
431
|
-
field: 'formCode',
|
|
432
|
-
width: 150
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
title: '模板版本',
|
|
436
|
-
field: 'formVersion',
|
|
437
|
-
width: 150
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
title: '表单分类',
|
|
441
|
-
field: 'menuKindName',
|
|
442
|
-
width: 150,
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
title: this.$t1('是否启用'),
|
|
446
|
-
field: 'enabled',
|
|
447
|
-
width: 150,
|
|
448
|
-
slots: {
|
|
449
|
-
default: ({row}) => {
|
|
450
|
-
if (row.enabled) {
|
|
451
|
-
return [
|
|
452
|
-
<div class="txt-status">
|
|
453
|
-
<span>启用</span>
|
|
454
|
-
</div>
|
|
455
|
-
];
|
|
456
|
-
} else {
|
|
457
|
-
return [
|
|
458
|
-
<div class="txt-status disable">
|
|
459
|
-
<span>禁用</span>
|
|
460
|
-
</div>
|
|
461
|
-
];
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
title: this.$t1('备注'),
|
|
468
|
-
field: 'remark',
|
|
469
|
-
width: 150
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
title: '项目标签', field: 'tag', width: 250, slots: {default: "tag"}, params: {
|
|
473
|
-
exportVal: ({row}) => {
|
|
474
|
-
if (row.formTemplateTagDTOs) {
|
|
475
|
-
return row.formTemplateTagDTOs.map(item => item.tagName).join(",")
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
title: this.$t1('更新时间'),
|
|
482
|
-
field: 'modifyDate',
|
|
483
|
-
width: 150
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
title: this.$t1('创建时间'),
|
|
487
|
-
field: 'createDate',
|
|
488
|
-
width: 150
|
|
489
|
-
},
|
|
490
|
-
{
|
|
491
|
-
width: 200,
|
|
492
|
-
fixed: 'right',
|
|
493
|
-
title: '',
|
|
494
|
-
sortable: false,
|
|
495
|
-
slots: {
|
|
496
|
-
default: ({row}) => {
|
|
497
|
-
return [
|
|
498
|
-
<div>
|
|
499
|
-
<a
|
|
500
|
-
href="javascript:void(0);"
|
|
501
|
-
class="a-link"
|
|
502
|
-
onclick={() => {
|
|
503
|
-
this.openEditDialog(row);
|
|
504
|
-
}}
|
|
505
|
-
>
|
|
506
|
-
<el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
|
|
507
|
-
popper-class="tooltip-skin">
|
|
508
|
-
<i class="el-icon-edit"/>
|
|
509
|
-
</el-tooltip>
|
|
510
|
-
</a>
|
|
511
|
-
<a
|
|
512
|
-
href="javascript:void(0);"
|
|
513
|
-
onClick={() => {
|
|
514
|
-
this.openDesingerDialog(row);
|
|
515
|
-
}}
|
|
516
|
-
class="a-link"
|
|
517
|
-
>
|
|
518
|
-
<el-tooltip enterable={false} effect="dark" content="表单设计" placement="top"
|
|
519
|
-
popper-class="tooltip-skin">
|
|
520
|
-
<i class="iconfont icon-liuchengguanli-shejiqi_liucheng"/>
|
|
521
|
-
</el-tooltip>
|
|
522
|
-
</a>
|
|
523
|
-
<a
|
|
524
|
-
href="javascript:void(0);"
|
|
525
|
-
onClick={() => {
|
|
526
|
-
this.chooseCellM1(row);
|
|
527
|
-
}}
|
|
528
|
-
class="a-link"
|
|
529
|
-
v-show={row.hasWf}
|
|
530
|
-
>
|
|
531
|
-
<el-tooltip enterable={false} effect="dark" content="流程模板维护" placement="top"
|
|
532
|
-
popper-class="tooltip-skin">
|
|
533
|
-
<i class="el-icon-edit"/>
|
|
534
|
-
<span>流程模板维护</span>
|
|
535
|
-
</el-tooltip>
|
|
536
|
-
</a>
|
|
537
|
-
<a
|
|
538
|
-
href="javascript:void(0);"
|
|
539
|
-
class="a-link"
|
|
540
|
-
onClick={() => {
|
|
541
|
-
this.openFtHistoryDialog(row);
|
|
542
|
-
}}
|
|
543
|
-
|
|
544
|
-
>
|
|
545
|
-
<el-tooltip enterable={false} effect="dark" content="历史" placement="top"
|
|
546
|
-
popper-class="tooltip-skin">
|
|
547
|
-
<i class="el-icon-s-order"/>
|
|
548
|
-
</el-tooltip>
|
|
549
|
-
</a>
|
|
550
|
-
</div>
|
|
551
|
-
];
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
],
|
|
556
|
-
searchColumns: [
|
|
557
|
-
{
|
|
558
|
-
title: "表单分类",
|
|
559
|
-
field: "menuKindName",
|
|
560
|
-
type: "input",
|
|
561
|
-
common: true,
|
|
562
|
-
disabled: true,
|
|
563
|
-
defaultValueEnabled: false,
|
|
564
|
-
slot: "menuKindName"
|
|
565
|
-
},
|
|
566
|
-
{title: "模板名称", field: "formName", type: "input", common: true},
|
|
567
|
-
{title: "模板编码", field: "formCode", type: "input", common: true},
|
|
568
|
-
{
|
|
569
|
-
title: this.$t1('是否启用'), field: "enabled", type: "select", common: true, itemOption: [
|
|
570
|
-
{label: this.$t1('启用'), value: true},
|
|
571
|
-
{label: this.$t1('禁用'), value: false}
|
|
572
|
-
]
|
|
573
|
-
},
|
|
574
|
-
{title: "项目标签", field: "tag", type: "input", common: true, slot: "tag"},
|
|
575
|
-
],
|
|
576
|
-
config: {
|
|
577
|
-
proxyConfig: {
|
|
578
|
-
autoLoad: false
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
};
|
|
582
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
583
|
-
this.vxeOption = opts;
|
|
584
|
-
this.showTree = true;
|
|
585
|
-
});
|
|
586
|
-
},
|
|
587
|
-
chooseCellM1(row) {
|
|
588
|
-
this.currentRow = row;
|
|
589
|
-
this.showItemView = true;
|
|
590
|
-
},
|
|
591
|
-
openWfDesignDialog(actModelId) {
|
|
592
|
-
//wfType 0:单据流程,1:场景流程
|
|
593
|
-
let serviceId = this.currentRow.serviceName;
|
|
594
|
-
this.wfUrl = WEB_PREFIX + '/activiti-explorer/modeler.html?wfType=0&serviceId=' + serviceId + '&modelId=' + actModelId;
|
|
595
|
-
this.dialogActiveName = 'first';
|
|
596
|
-
this.showWfDialog = true;
|
|
597
|
-
},
|
|
598
|
-
closeDesignwinEvent(done) {
|
|
599
|
-
this.$baseConfirm('请确认"已保存"流程模板,是否继续关闭?').then(() => {
|
|
600
|
-
this.showWfDialog = false;
|
|
601
|
-
// this.showDesingerDialog = false;
|
|
602
|
-
});
|
|
603
|
-
},
|
|
604
|
-
initWfWinParam() {
|
|
605
|
-
this.initCloseWfDesignWin();
|
|
606
|
-
this.initWinUserDialog();
|
|
607
|
-
this.initWinPositionDialog();
|
|
608
|
-
this.initSysParamForWf();
|
|
609
|
-
this.initWinFormTemplateDialog();
|
|
610
|
-
this.initWinScriptDescriptionDialog();
|
|
611
|
-
},
|
|
612
|
-
initCloseWfDesignWin() {
|
|
613
|
-
window.closeWfDesignWin = () => {
|
|
614
|
-
this.showWfDialog = false;
|
|
615
|
-
};
|
|
616
|
-
},
|
|
617
|
-
initWinUserDialog() {
|
|
618
|
-
window.openAssignUserDialog = opts => {
|
|
619
|
-
this.wfAssignMulti = opts.multi;
|
|
620
|
-
this.wfAssignData = opts.data || [];
|
|
621
|
-
this.wfAssignCallback = opts.callback;
|
|
622
|
-
this.showUserDialog = true;
|
|
623
|
-
};
|
|
624
|
-
},
|
|
625
|
-
confirmUser(rows) {
|
|
626
|
-
this.wfAssignCallback(rows);
|
|
627
|
-
},
|
|
628
|
-
initWinPositionDialog() {
|
|
629
|
-
window.openAssignPositionDialog = opts => {
|
|
630
|
-
this.wfAssignPositionData = opts.data || [];
|
|
631
|
-
this.wfAssignPositionCallback = opts.callback;
|
|
632
|
-
this.showPositionDialog = true;
|
|
633
|
-
};
|
|
634
|
-
},
|
|
635
|
-
initSysParamForWf() {
|
|
636
|
-
let webPrefix = WEB_PREFIX;
|
|
637
|
-
let baseApi = process.env.VUE_APP_BASE_API;
|
|
638
|
-
window.sysParamForWf = {
|
|
639
|
-
webPrefix,
|
|
640
|
-
baseApi
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
confirmPosition(rows) {
|
|
644
|
-
this.wfAssignPositionCallback(rows);
|
|
645
|
-
},
|
|
646
|
-
initWinFormTemplateDialog() {
|
|
647
|
-
window.openAssignFormTemplateDialog = opts => {
|
|
648
|
-
this.wfAssignFormTemplateCallback = opts.callback;
|
|
649
|
-
this.showFormTemplateDialog = true;
|
|
650
|
-
};
|
|
651
|
-
},
|
|
652
|
-
confirmFormTemplate(rows) {
|
|
653
|
-
this.wfAssignFormTemplateCallback(rows);
|
|
654
|
-
},
|
|
655
|
-
initWinScriptDescriptionDialog() {
|
|
656
|
-
window.openScriptDescriptionDialog = opts => {
|
|
657
|
-
this.showScriptDescriptionDialog = true;
|
|
658
|
-
};
|
|
659
|
-
},
|
|
660
|
-
handleNodeClick(data, node, v) {
|
|
661
|
-
this.handleNodeData(node)
|
|
662
|
-
this.$forceUpdate();
|
|
663
|
-
this.searchEvent();
|
|
664
|
-
},
|
|
665
|
-
// 异步树叶子节点懒加载逻辑
|
|
666
|
-
loadNode(node, resolve) {
|
|
667
|
-
let id = node && node.data && node.data.id ? node.data.id || '' : 0;
|
|
668
|
-
let param = {enabled: true};
|
|
669
|
-
let url = !id ? USER_PREFIX + '/menuKind/getAllList' : USER_PREFIX + '/menuKind/getChildren';
|
|
670
|
-
this.$http({
|
|
671
|
-
url: url,
|
|
672
|
-
method: 'post',
|
|
673
|
-
data: {
|
|
674
|
-
parent: id,
|
|
675
|
-
enabled: true
|
|
676
|
-
},
|
|
677
|
-
success: res => {
|
|
678
|
-
let rows = res.objx || [];
|
|
679
|
-
rows.forEach(value => {
|
|
680
|
-
value.leaf = !value.hasChild;
|
|
681
|
-
});
|
|
682
|
-
if (node.level === 0) {
|
|
683
|
-
if (rows.length > 0) {
|
|
684
|
-
this.$nextTick(() => {
|
|
685
|
-
let firstNode = node.childNodes[0];
|
|
686
|
-
if (rows[0].hasChild) {
|
|
687
|
-
firstNode.expand();
|
|
688
|
-
}
|
|
689
|
-
this.$refs.tree.setCurrentKey(firstNode.data);
|
|
690
|
-
this.handleNodeClick(firstNode.data, firstNode, this)
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
resolve(rows);
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
},
|
|
698
|
-
handleNodeData(node) {
|
|
699
|
-
this.currentFormType = node ? node.data : null;
|
|
700
|
-
this.currentNode = node;
|
|
701
|
-
},
|
|
702
|
-
handleFormDesignClose() {
|
|
703
|
-
this.formDesTabs = 'first';
|
|
704
|
-
this.showFormScriptList = false;
|
|
705
|
-
},
|
|
706
|
-
openProjectTagDialog3() {
|
|
707
|
-
this.showProjectTagDialog3 = true;
|
|
708
|
-
},
|
|
709
|
-
confirmProjectTagDialog3(rows) {
|
|
710
|
-
this.checkTags = rows;
|
|
711
|
-
},
|
|
712
|
-
getTabNames() {
|
|
713
|
-
return this.checkTags.map(item => item.tagName).join(",");
|
|
714
|
-
},
|
|
715
|
-
jsonImport() {
|
|
716
|
-
this.$jsonImport({
|
|
717
|
-
saveUrl: USER_PREFIX + '/form_develop/importFormTemplate',
|
|
718
|
-
callback: () => {
|
|
719
|
-
this.searchEvent();
|
|
720
|
-
}
|
|
721
|
-
});
|
|
722
|
-
},
|
|
723
|
-
jsonExport() {
|
|
724
|
-
this.$jsonExport({
|
|
725
|
-
targetRef: "table-m1",
|
|
726
|
-
url: USER_PREFIX + "/form_develop/exportFormTemplate",
|
|
727
|
-
abcEnabled: true
|
|
728
|
-
})
|
|
729
|
-
},
|
|
730
|
-
getBdEnv() {
|
|
731
|
-
getBdFlag({
|
|
732
|
-
success: res => {
|
|
733
|
-
this.isDev = res.objx == 1
|
|
734
|
-
}
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
};
|
|
739
|
-
</script>
|
|
740
|
-
<style scoped lang="scss">
|
|
741
|
-
::v-deep .tab-boxOnly > .el-tabs__header {
|
|
742
|
-
position: absolute;
|
|
743
|
-
right: 130px;
|
|
744
|
-
top: 0;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
|
|
748
|
-
.detail-wrap .d-cont {
|
|
749
|
-
height: calc(100vh - 158px) !important
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
.grid-height {
|
|
753
|
-
height: calc(100vh - 126px) !important
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
::v-deep .designer-drawer.is-fullscreen .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
|
|
758
|
-
.detail-wrap .d-cont {
|
|
759
|
-
height: calc(100vh - 116px) !important
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.grid-height {
|
|
763
|
-
height: calc(100vh - 84px) !important
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="containt">
|
|
3
|
+
<x-tabs ref="xTabs" v-model="activeName" class="tab-box" paneKeyName="formCode">
|
|
4
|
+
<el-tab-pane :label="$t1('常规')" name="first">
|
|
5
|
+
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :currentFormType="currentFormType"
|
|
6
|
+
:parent-target="_self" @reload="$reloadHandle"
|
|
7
|
+
@openDesignDialog="openDesingerDialogByChild"></editView>
|
|
8
|
+
</el-tab-pane>
|
|
9
|
+
<el-tab-pane :label="$t1('列表')" name="second">
|
|
10
|
+
<div class="tree-box fl">
|
|
11
|
+
<div class="tit"><b>表单分类</b></div>
|
|
12
|
+
<div class="tree-btns" style="margin-top: 10px;">
|
|
13
|
+
</div>
|
|
14
|
+
<el-tree
|
|
15
|
+
v-if="showTree"
|
|
16
|
+
:props="defaultProps"
|
|
17
|
+
:load="loadNode"
|
|
18
|
+
node-key="id"
|
|
19
|
+
ref="tree"
|
|
20
|
+
highlight-current
|
|
21
|
+
lazy
|
|
22
|
+
:expand-on-click-node="false"
|
|
23
|
+
@node-click="handleNodeClick"
|
|
24
|
+
class="tree-list"
|
|
25
|
+
icon-class="el-icon-arrow-down"
|
|
26
|
+
></el-tree>
|
|
27
|
+
</div>
|
|
28
|
+
<label id="labBtn">
|
|
29
|
+
<div class="icon">
|
|
30
|
+
<i class="el-icon-more"></i>
|
|
31
|
+
<i class="el-icon-more"></i>
|
|
32
|
+
</div>
|
|
33
|
+
</label>
|
|
34
|
+
<div class="main-right fr" style="padding-left:6px;">
|
|
35
|
+
<div class="grid-height">
|
|
36
|
+
<vxe-grid
|
|
37
|
+
ref="table-m1"
|
|
38
|
+
v-bind="vxeOption"
|
|
39
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
40
|
+
@custom="$vxeTableUtil.customHandle"
|
|
41
|
+
>
|
|
42
|
+
<template #form>
|
|
43
|
+
<tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
|
|
44
|
+
<template #buttonLeft>
|
|
45
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog()"
|
|
46
|
+
v-if="isDev && currentFormType.addAuth===1">新增
|
|
47
|
+
</vxe-button>
|
|
48
|
+
<vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">导入发布
|
|
49
|
+
</vxe-button>
|
|
50
|
+
<vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
|
|
51
|
+
v-if="isDev">导出发布
|
|
52
|
+
</vxe-button>
|
|
53
|
+
<projectTagAddButton :option="addProjectTagOption" v-if="isDev"></projectTagAddButton>
|
|
54
|
+
<projectTagDeleteButton :option="deleteProjectTagOption" v-if="isDev"></projectTagDeleteButton>
|
|
55
|
+
</template>
|
|
56
|
+
<template #buttonRight>
|
|
57
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
58
|
+
plain>{{$t1('重置')}}
|
|
59
|
+
</vxe-button>
|
|
60
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
|
|
61
|
+
</vxe-button>
|
|
62
|
+
</template>
|
|
63
|
+
<template #menuKindName>
|
|
64
|
+
<vxe-form-item title="表单分类:" field="tag">
|
|
65
|
+
<template v-slot>
|
|
66
|
+
<el-input v-model="currentMenuKindName" disabled></el-input>
|
|
67
|
+
</template>
|
|
68
|
+
</vxe-form-item>
|
|
69
|
+
</template>
|
|
70
|
+
<template #tag>
|
|
71
|
+
<vxe-form-item title="项目标签:" field="tag">
|
|
72
|
+
<template v-slot>
|
|
73
|
+
<el-input
|
|
74
|
+
class="search-input"
|
|
75
|
+
max="200"
|
|
76
|
+
:value="getTabNames()"
|
|
77
|
+
@clear="
|
|
78
|
+
checkTags = [];
|
|
79
|
+
"
|
|
80
|
+
v-el-readonly
|
|
81
|
+
clearable
|
|
82
|
+
>
|
|
83
|
+
<i slot="suffix" class="el-input__icon el-icon-search" @click="openProjectTagDialog3"></i>
|
|
84
|
+
</el-input>
|
|
85
|
+
</template>
|
|
86
|
+
</vxe-form-item>
|
|
87
|
+
</template>
|
|
88
|
+
</tableForm>
|
|
89
|
+
</template>
|
|
90
|
+
<template #tag="{row}">
|
|
91
|
+
<projectTagView v-model="row.formTemplateTagDTOs" :readonly="true"></projectTagView>
|
|
92
|
+
</template>
|
|
93
|
+
</vxe-grid>
|
|
94
|
+
<el-drawer title="流程模板" :visible.sync="showItemView" :modal="false" :wrapperClosable="false"
|
|
95
|
+
:destroy-on-close="true" size="90%" direction="btt">
|
|
96
|
+
<itemList v-if="showItemView" :formTemplate="currentRow"
|
|
97
|
+
@openWfDesignDialog="openWfDesignDialog"></itemList>
|
|
98
|
+
</el-drawer>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</el-tab-pane>
|
|
102
|
+
<template #editTab="{tab,index,reloadTabContent}">
|
|
103
|
+
<el-tab-pane :key="tab.data.id" :label.sync="tab.data.formName" :name="tab.data.formCode"
|
|
104
|
+
:closable="true">
|
|
105
|
+
<editView v-if="tab.showContent" :_dataId="tab.dataId" :currentFormType="currentFormType"
|
|
106
|
+
:parent-target="_self"
|
|
107
|
+
@reload="reloadTabContent" @openDesignDialog="openDesingerDialogByChild"></editView>
|
|
108
|
+
</el-tab-pane>
|
|
109
|
+
</template>
|
|
110
|
+
</x-tabs>
|
|
111
|
+
<el-drawer :title="'表单设计('+formName+')'" :visible.sync="showDesingerDialog" :modal="false"
|
|
112
|
+
:destroy-on-close="true"
|
|
113
|
+
size="100%" direction="rtl" :before-close="closeFormDesignwinEvent" :append-to-body="false"
|
|
114
|
+
class="designer-drawer" :class="[isFullscreen ? 'is-fullscreen' : '']" @close="handleFormDesignClose">
|
|
115
|
+
<el-tabs v-model="formDesTabs" type="card" class="tab-boxOnly" :stretch="true">
|
|
116
|
+
<el-tab-pane label="设计器" name="first">
|
|
117
|
+
<designer ref="designer" :formCode.sync="formCode" @reflushTemplateList="reflushTemplateList"></designer>
|
|
118
|
+
</el-tab-pane>
|
|
119
|
+
<el-tab-pane label="后端脚本" name="second">
|
|
120
|
+
<formScriptList :formCode="formCode" :formTemplate="currentFormTemplate"
|
|
121
|
+
v-if="showFormScriptList"></formScriptList>
|
|
122
|
+
</el-tab-pane>
|
|
123
|
+
</el-tabs>
|
|
124
|
+
<el-button class="isFullIcon" v-if="!isFullscreen" @click="handleFullscreen">
|
|
125
|
+
<el-tooltip effect="dark" content="全屏" placement="top">
|
|
126
|
+
<i class="iconfont icon-quanping"></i>
|
|
127
|
+
</el-tooltip>
|
|
128
|
+
|
|
129
|
+
</el-button>
|
|
130
|
+
<el-button class="isFullIcon" v-else @click="handleFullscreen">
|
|
131
|
+
<el-tooltip effect="dark" content="缩小" placement="top">
|
|
132
|
+
<i class="iconfont icon-suoxiao"></i>
|
|
133
|
+
</el-tooltip>
|
|
134
|
+
</el-button>
|
|
135
|
+
</el-drawer>
|
|
136
|
+
|
|
137
|
+
<el-dialog
|
|
138
|
+
:title="流程设计"
|
|
139
|
+
:append-to-body="true"
|
|
140
|
+
:modal-append-to-body="true"
|
|
141
|
+
:close-on-click-modal="false"
|
|
142
|
+
v-if="showWfDialog"
|
|
143
|
+
:visible.sync="showWfDialog"
|
|
144
|
+
:modal="false"
|
|
145
|
+
custom-class="dialog-style designer-dialog"
|
|
146
|
+
width="100%"
|
|
147
|
+
height="100%"
|
|
148
|
+
top="0px"
|
|
149
|
+
bottom="0px"
|
|
150
|
+
:before-close="closeDesignwinEvent"
|
|
151
|
+
:destroy-on-close="true"
|
|
152
|
+
v-el-drag-dialog
|
|
153
|
+
>
|
|
154
|
+
<iframe :src="wfUrl" :style="'width:100%;height:' + ($root.$el.clientHeight - 30 - 12) + 'px'"></iframe>
|
|
155
|
+
</el-dialog>
|
|
156
|
+
|
|
157
|
+
<userDialog v-if="showUserDialog" :visiable.sync="showUserDialog" @confirm="confirmUser"
|
|
158
|
+
:multi.sync="wfAssignMulti"/>
|
|
159
|
+
<positionDialog v-if="showPositionDialog" :visiable.sync="showPositionDialog" @confirm="confirmPosition"/>
|
|
160
|
+
<scriptDescriptionDialog path="static/readme/Wf.txt" v-if="showScriptDescriptionDialog"
|
|
161
|
+
:visiable.sync="showScriptDescriptionDialog"></scriptDescriptionDialog>
|
|
162
|
+
|
|
163
|
+
<formTypeEditDialog v-if="showFormTypeDialog" :visiable.sync="showFormTypeDialog" :_dataId.sync="editFormTypeId"
|
|
164
|
+
@confirm="confirmFormTypeEditDialog"></formTypeEditDialog>
|
|
165
|
+
|
|
166
|
+
<ftHistoryDialog v-if="showFtHistoryDialog" :visiable.sync="showFtHistoryDialog"
|
|
167
|
+
:formCode.sync="operateFtHistory.formCode" @confirm="confirmFtHistoryDialog" :multi="false"/>
|
|
168
|
+
<projectTagDialog v-if="showProjectTagDialog3"
|
|
169
|
+
:visiable.sync="showProjectTagDialog3"
|
|
170
|
+
@confirm="confirmProjectTagDialog3"
|
|
171
|
+
:rows="checkTags"
|
|
172
|
+
:multi="true"></projectTagDialog>
|
|
173
|
+
|
|
174
|
+
</div>
|
|
175
|
+
</template>
|
|
176
|
+
|
|
177
|
+
<script>
|
|
178
|
+
import {treeScollx} from '@base/utils/global.js';
|
|
179
|
+
import editView from './edit.vue';
|
|
180
|
+
|
|
181
|
+
import userDialog from '../../../../views/user/user/dialog.vue';
|
|
182
|
+
import positionDialog from '../../../../views/user/position/dialog.vue';
|
|
183
|
+
import scriptDescriptionDialog from '@base/components/scriptDescription/dialog'
|
|
184
|
+
|
|
185
|
+
import itemList from "./itemList";
|
|
186
|
+
import formTypeEditDialog from "../../../../views/user/form/form_type/editDialog";
|
|
187
|
+
import ftHistoryDialog from "./ftHistoryDialog";
|
|
188
|
+
import indexUtil from "@base/utils/index.js"
|
|
189
|
+
import formScriptList from '../../../../views/bd/setting/form_script/form_list.vue';
|
|
190
|
+
import projectTagDialog from "../../../../views/user/project_tag/dialog.vue";
|
|
191
|
+
import tableForm from "@base/components/table/tableForm.vue";
|
|
192
|
+
import {getBdFlag} from "@base/api/user";
|
|
193
|
+
import projectTagDeleteButton from "@base/components/projectTag/deleteButton.vue";
|
|
194
|
+
import projectTagAddButton from "@base/components/projectTag/addButton.vue";
|
|
195
|
+
import projectTagView from "@base/components/projectTag/view.vue";
|
|
196
|
+
|
|
197
|
+
export default {
|
|
198
|
+
name: 'bd_form_template:list',
|
|
199
|
+
components: {
|
|
200
|
+
projectTagView,
|
|
201
|
+
projectTagAddButton, projectTagDeleteButton,
|
|
202
|
+
tableForm,
|
|
203
|
+
editView,
|
|
204
|
+
userDialog,
|
|
205
|
+
positionDialog,
|
|
206
|
+
scriptDescriptionDialog,
|
|
207
|
+
ftHistoryDialog,
|
|
208
|
+
itemList,
|
|
209
|
+
formTypeEditDialog,
|
|
210
|
+
formScriptList,
|
|
211
|
+
projectTagDialog,
|
|
212
|
+
designer: () => import('../../../../views/user/form/vform/designer.vue')
|
|
213
|
+
},
|
|
214
|
+
data() {
|
|
215
|
+
return {
|
|
216
|
+
isFullscreen: false,
|
|
217
|
+
formDesTabs: 'first',
|
|
218
|
+
activeName: 'second',
|
|
219
|
+
dataId: 0,
|
|
220
|
+
showEdit: false,
|
|
221
|
+
vxeOption: {},
|
|
222
|
+
formData: {},
|
|
223
|
+
showDesingerDialog: false,
|
|
224
|
+
formCode: null,
|
|
225
|
+
formName: null,
|
|
226
|
+
templateId: null,
|
|
227
|
+
currentFormTemplate: null,
|
|
228
|
+
|
|
229
|
+
showItemEdit: false,
|
|
230
|
+
showParamEdit: false,
|
|
231
|
+
vxeOption1: {},
|
|
232
|
+
editId: '',
|
|
233
|
+
itemEditId: '',
|
|
234
|
+
pRow: null,
|
|
235
|
+
currentRow: {},
|
|
236
|
+
serviceId: null,
|
|
237
|
+
itemServiceId: null,
|
|
238
|
+
|
|
239
|
+
showWfDialog: false,
|
|
240
|
+
wfUrl: '',
|
|
241
|
+
ph: '',
|
|
242
|
+
dialogActiveName: 'first',
|
|
243
|
+
showFunctionScriptList: false,
|
|
244
|
+
showUserDialog: false,
|
|
245
|
+
wfAssignData: [],
|
|
246
|
+
wfAssignCallback: null,
|
|
247
|
+
wfAssignMulti: true,
|
|
248
|
+
|
|
249
|
+
showPositionDialog: false,
|
|
250
|
+
wfAssignPositionData: [],
|
|
251
|
+
wfAssignPositionCallback: null,
|
|
252
|
+
|
|
253
|
+
showFormTemplateDialog: false,
|
|
254
|
+
wfAssignFormTemplateCallback: null,
|
|
255
|
+
|
|
256
|
+
showScriptDescriptionDialog: false,
|
|
257
|
+
showWfDiyAttributeEdit: false,
|
|
258
|
+
|
|
259
|
+
showFtHistoryDialog: false,
|
|
260
|
+
operateFtHistory: null,
|
|
261
|
+
|
|
262
|
+
defaultProps: {
|
|
263
|
+
label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
|
264
|
+
children: [],
|
|
265
|
+
isLeaf: 'leaf'
|
|
266
|
+
},
|
|
267
|
+
showItemView: false,
|
|
268
|
+
|
|
269
|
+
currentFormType: {},
|
|
270
|
+
editFormTypeId: null,
|
|
271
|
+
showFormTypeDialog: false,
|
|
272
|
+
showFormScriptList: false,
|
|
273
|
+
addProjectTagOption: {
|
|
274
|
+
url: USER_PREFIX + `/formTemplate/saveTag`,
|
|
275
|
+
tableDatas: () => {
|
|
276
|
+
return this.$refs["table-m1"].getCheckboxRecords(true);
|
|
277
|
+
},
|
|
278
|
+
reqData: (tagDatas, tableDatas) => {
|
|
279
|
+
let formCodes = tableDatas.map(item => item.formCode);
|
|
280
|
+
let tagCodes = tagDatas.map(item => item.tagCode);
|
|
281
|
+
let reqData = {
|
|
282
|
+
tagCodes,
|
|
283
|
+
formCodes
|
|
284
|
+
};
|
|
285
|
+
return reqData;
|
|
286
|
+
},
|
|
287
|
+
callback: () => {
|
|
288
|
+
this.searchEvent()
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
deleteProjectTagOption: {
|
|
292
|
+
url: USER_PREFIX + `/formTemplate/deleteTag`,
|
|
293
|
+
tableDatas: () => {
|
|
294
|
+
return this.$refs["table-m1"].getCheckboxRecords(true);
|
|
295
|
+
},
|
|
296
|
+
reqData: (tagDatas, tableDatas) => {
|
|
297
|
+
let formCodes = tableDatas.map(item => item.formCode);
|
|
298
|
+
let tagCodes = tagDatas.map(item => item.tagCode);
|
|
299
|
+
let reqData = {
|
|
300
|
+
tagCodes,
|
|
301
|
+
formCodes
|
|
302
|
+
};
|
|
303
|
+
return reqData;
|
|
304
|
+
},
|
|
305
|
+
callback: () => {
|
|
306
|
+
this.searchEvent()
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
showProjectTagDialog3: false,
|
|
310
|
+
checkTags: [],
|
|
311
|
+
isDev: true,
|
|
312
|
+
menuKindAuth: {},
|
|
313
|
+
showTree: false
|
|
314
|
+
};
|
|
315
|
+
},
|
|
316
|
+
computed: {
|
|
317
|
+
currentMenuKindId() {
|
|
318
|
+
return this.currentFormType?.id || null
|
|
319
|
+
},
|
|
320
|
+
currentMenuKindName() {
|
|
321
|
+
return this.currentFormType?.name || null
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
watch: {
|
|
325
|
+
formDesTabs(val) {
|
|
326
|
+
if (this.showFormScriptList == false && val == 'second') {
|
|
327
|
+
this.showFormScriptList = true;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
mounted() {
|
|
332
|
+
treeScollx({target: this, type: 'default'});
|
|
333
|
+
this.getBdEnv();
|
|
334
|
+
this.initTableList();
|
|
335
|
+
this.initWfWinParam();
|
|
336
|
+
},
|
|
337
|
+
methods: {
|
|
338
|
+
searchEvent() {
|
|
339
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
340
|
+
},
|
|
341
|
+
resetEvent() {
|
|
342
|
+
this.formData = {};
|
|
343
|
+
this.checkTags = [];
|
|
344
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
345
|
+
},
|
|
346
|
+
openEditDialog(row) {
|
|
347
|
+
let formCode = row?.formCode || null;
|
|
348
|
+
/*this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
349
|
+
this.activeName = 'first';
|
|
350
|
+
this.showItemEdit = false;
|
|
351
|
+
this.$openEditView('showEdit');*/
|
|
352
|
+
if (!formCode) {
|
|
353
|
+
this.dataId = formCode;
|
|
354
|
+
this.activeName = 'first';
|
|
355
|
+
this.$openEditView('showEdit');
|
|
356
|
+
} else {
|
|
357
|
+
this.$refs.xTabs.openEditTab(row);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
},
|
|
361
|
+
openDesingerDialog(row, callback) {
|
|
362
|
+
this.formCode = row.formCode;
|
|
363
|
+
this.formName = row.formName;
|
|
364
|
+
this.currentFormTemplate = row;
|
|
365
|
+
this.isFullscreen = false;
|
|
366
|
+
this.showDesingerDialog = true;
|
|
367
|
+
this.designerSaveCallback = callback ?? null;
|
|
368
|
+
},
|
|
369
|
+
openDesingerDialogByChild({row, callback}) {
|
|
370
|
+
this.openDesingerDialog(row, callback)
|
|
371
|
+
},
|
|
372
|
+
reflushTemplateList() {
|
|
373
|
+
this.searchEvent();
|
|
374
|
+
this.designerSaveCallback && this.designerSaveCallback();
|
|
375
|
+
},
|
|
376
|
+
handleFullscreen() {
|
|
377
|
+
let isFullscreen = this.isFullscreen;
|
|
378
|
+
if (!isFullscreen) {
|
|
379
|
+
indexUtil.addClass(document.body, "hideMenu");
|
|
380
|
+
} else {
|
|
381
|
+
indexUtil.removeClass(document.body, "hideMenu");
|
|
382
|
+
}
|
|
383
|
+
this.isFullscreen = !isFullscreen;
|
|
384
|
+
},
|
|
385
|
+
openFtHistoryDialog(row) {
|
|
386
|
+
this.operateFtHistory = row;
|
|
387
|
+
this.showFtHistoryDialog = true;
|
|
388
|
+
},
|
|
389
|
+
confirmFtHistoryDialog(row) {
|
|
390
|
+
this.searchEvent();
|
|
391
|
+
},
|
|
392
|
+
closeFormDesignwinEvent(done) {
|
|
393
|
+
this.$baseConfirm('请确认"已保存"报表模板,是否继续关闭?').then(() => {
|
|
394
|
+
indexUtil.removeClass(document.body, "hideMenu");
|
|
395
|
+
done && done();
|
|
396
|
+
});
|
|
397
|
+
},
|
|
398
|
+
getSearchParam() {
|
|
399
|
+
let tagCodes = null;
|
|
400
|
+
if (this.checkTags.length) {
|
|
401
|
+
tagCodes = this.checkTags.map(item => item.tagCode);
|
|
402
|
+
}
|
|
403
|
+
let currentFormType = this.currentFormType || {}
|
|
404
|
+
return {
|
|
405
|
+
...this.formData,
|
|
406
|
+
tagCodes,
|
|
407
|
+
menuKindCode: currentFormType.menuKindCode || null,
|
|
408
|
+
history: false
|
|
409
|
+
};
|
|
410
|
+
},
|
|
411
|
+
initTableList() {
|
|
412
|
+
let that = this;
|
|
413
|
+
let tableOption = {
|
|
414
|
+
vue: this,
|
|
415
|
+
tableRef: 'table-m1',
|
|
416
|
+
tableName: 'bd_form_template_list-m1',
|
|
417
|
+
path: USER_PREFIX + '/formTemplate/listPage',
|
|
418
|
+
param: () => {
|
|
419
|
+
return this.getSearchParam();
|
|
420
|
+
},
|
|
421
|
+
columns: [
|
|
422
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
423
|
+
{
|
|
424
|
+
title: '模板名称',
|
|
425
|
+
field: 'formName',
|
|
426
|
+
width: 150,
|
|
427
|
+
fixed: 'left'
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
title: '模板编码',
|
|
431
|
+
field: 'formCode',
|
|
432
|
+
width: 150
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
title: '模板版本',
|
|
436
|
+
field: 'formVersion',
|
|
437
|
+
width: 150
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
title: '表单分类',
|
|
441
|
+
field: 'menuKindName',
|
|
442
|
+
width: 150,
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
title: this.$t1('是否启用'),
|
|
446
|
+
field: 'enabled',
|
|
447
|
+
width: 150,
|
|
448
|
+
slots: {
|
|
449
|
+
default: ({row}) => {
|
|
450
|
+
if (row.enabled) {
|
|
451
|
+
return [
|
|
452
|
+
<div class="txt-status">
|
|
453
|
+
<span>启用</span>
|
|
454
|
+
</div>
|
|
455
|
+
];
|
|
456
|
+
} else {
|
|
457
|
+
return [
|
|
458
|
+
<div class="txt-status disable">
|
|
459
|
+
<span>禁用</span>
|
|
460
|
+
</div>
|
|
461
|
+
];
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
title: this.$t1('备注'),
|
|
468
|
+
field: 'remark',
|
|
469
|
+
width: 150
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
title: '项目标签', field: 'tag', width: 250, slots: {default: "tag"}, params: {
|
|
473
|
+
exportVal: ({row}) => {
|
|
474
|
+
if (row.formTemplateTagDTOs) {
|
|
475
|
+
return row.formTemplateTagDTOs.map(item => item.tagName).join(",")
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
title: this.$t1('更新时间'),
|
|
482
|
+
field: 'modifyDate',
|
|
483
|
+
width: 150
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
title: this.$t1('创建时间'),
|
|
487
|
+
field: 'createDate',
|
|
488
|
+
width: 150
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
width: 200,
|
|
492
|
+
fixed: 'right',
|
|
493
|
+
title: '',
|
|
494
|
+
sortable: false,
|
|
495
|
+
slots: {
|
|
496
|
+
default: ({row}) => {
|
|
497
|
+
return [
|
|
498
|
+
<div>
|
|
499
|
+
<a
|
|
500
|
+
href="javascript:void(0);"
|
|
501
|
+
class="a-link"
|
|
502
|
+
onclick={() => {
|
|
503
|
+
this.openEditDialog(row);
|
|
504
|
+
}}
|
|
505
|
+
>
|
|
506
|
+
<el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
|
|
507
|
+
popper-class="tooltip-skin">
|
|
508
|
+
<i class="el-icon-edit"/>
|
|
509
|
+
</el-tooltip>
|
|
510
|
+
</a>
|
|
511
|
+
<a
|
|
512
|
+
href="javascript:void(0);"
|
|
513
|
+
onClick={() => {
|
|
514
|
+
this.openDesingerDialog(row);
|
|
515
|
+
}}
|
|
516
|
+
class="a-link"
|
|
517
|
+
>
|
|
518
|
+
<el-tooltip enterable={false} effect="dark" content="表单设计" placement="top"
|
|
519
|
+
popper-class="tooltip-skin">
|
|
520
|
+
<i class="iconfont icon-liuchengguanli-shejiqi_liucheng"/>
|
|
521
|
+
</el-tooltip>
|
|
522
|
+
</a>
|
|
523
|
+
<a
|
|
524
|
+
href="javascript:void(0);"
|
|
525
|
+
onClick={() => {
|
|
526
|
+
this.chooseCellM1(row);
|
|
527
|
+
}}
|
|
528
|
+
class="a-link"
|
|
529
|
+
v-show={row.hasWf}
|
|
530
|
+
>
|
|
531
|
+
<el-tooltip enterable={false} effect="dark" content="流程模板维护" placement="top"
|
|
532
|
+
popper-class="tooltip-skin">
|
|
533
|
+
<i class="el-icon-edit"/>
|
|
534
|
+
<span>流程模板维护</span>
|
|
535
|
+
</el-tooltip>
|
|
536
|
+
</a>
|
|
537
|
+
<a
|
|
538
|
+
href="javascript:void(0);"
|
|
539
|
+
class="a-link"
|
|
540
|
+
onClick={() => {
|
|
541
|
+
this.openFtHistoryDialog(row);
|
|
542
|
+
}}
|
|
543
|
+
|
|
544
|
+
>
|
|
545
|
+
<el-tooltip enterable={false} effect="dark" content="历史" placement="top"
|
|
546
|
+
popper-class="tooltip-skin">
|
|
547
|
+
<i class="el-icon-s-order"/>
|
|
548
|
+
</el-tooltip>
|
|
549
|
+
</a>
|
|
550
|
+
</div>
|
|
551
|
+
];
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
searchColumns: [
|
|
557
|
+
{
|
|
558
|
+
title: "表单分类",
|
|
559
|
+
field: "menuKindName",
|
|
560
|
+
type: "input",
|
|
561
|
+
common: true,
|
|
562
|
+
disabled: true,
|
|
563
|
+
defaultValueEnabled: false,
|
|
564
|
+
slot: "menuKindName"
|
|
565
|
+
},
|
|
566
|
+
{title: "模板名称", field: "formName", type: "input", common: true},
|
|
567
|
+
{title: "模板编码", field: "formCode", type: "input", common: true},
|
|
568
|
+
{
|
|
569
|
+
title: this.$t1('是否启用'), field: "enabled", type: "select", common: true, itemOption: [
|
|
570
|
+
{label: this.$t1('启用'), value: true},
|
|
571
|
+
{label: this.$t1('禁用'), value: false}
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
{title: "项目标签", field: "tag", type: "input", common: true, slot: "tag"},
|
|
575
|
+
],
|
|
576
|
+
config: {
|
|
577
|
+
proxyConfig: {
|
|
578
|
+
autoLoad: false
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
};
|
|
582
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
583
|
+
this.vxeOption = opts;
|
|
584
|
+
this.showTree = true;
|
|
585
|
+
});
|
|
586
|
+
},
|
|
587
|
+
chooseCellM1(row) {
|
|
588
|
+
this.currentRow = row;
|
|
589
|
+
this.showItemView = true;
|
|
590
|
+
},
|
|
591
|
+
openWfDesignDialog(actModelId) {
|
|
592
|
+
//wfType 0:单据流程,1:场景流程
|
|
593
|
+
let serviceId = this.currentRow.serviceName;
|
|
594
|
+
this.wfUrl = WEB_PREFIX + '/activiti-explorer/modeler.html?wfType=0&serviceId=' + serviceId + '&modelId=' + actModelId;
|
|
595
|
+
this.dialogActiveName = 'first';
|
|
596
|
+
this.showWfDialog = true;
|
|
597
|
+
},
|
|
598
|
+
closeDesignwinEvent(done) {
|
|
599
|
+
this.$baseConfirm('请确认"已保存"流程模板,是否继续关闭?').then(() => {
|
|
600
|
+
this.showWfDialog = false;
|
|
601
|
+
// this.showDesingerDialog = false;
|
|
602
|
+
});
|
|
603
|
+
},
|
|
604
|
+
initWfWinParam() {
|
|
605
|
+
this.initCloseWfDesignWin();
|
|
606
|
+
this.initWinUserDialog();
|
|
607
|
+
this.initWinPositionDialog();
|
|
608
|
+
this.initSysParamForWf();
|
|
609
|
+
this.initWinFormTemplateDialog();
|
|
610
|
+
this.initWinScriptDescriptionDialog();
|
|
611
|
+
},
|
|
612
|
+
initCloseWfDesignWin() {
|
|
613
|
+
window.closeWfDesignWin = () => {
|
|
614
|
+
this.showWfDialog = false;
|
|
615
|
+
};
|
|
616
|
+
},
|
|
617
|
+
initWinUserDialog() {
|
|
618
|
+
window.openAssignUserDialog = opts => {
|
|
619
|
+
this.wfAssignMulti = opts.multi;
|
|
620
|
+
this.wfAssignData = opts.data || [];
|
|
621
|
+
this.wfAssignCallback = opts.callback;
|
|
622
|
+
this.showUserDialog = true;
|
|
623
|
+
};
|
|
624
|
+
},
|
|
625
|
+
confirmUser(rows) {
|
|
626
|
+
this.wfAssignCallback(rows);
|
|
627
|
+
},
|
|
628
|
+
initWinPositionDialog() {
|
|
629
|
+
window.openAssignPositionDialog = opts => {
|
|
630
|
+
this.wfAssignPositionData = opts.data || [];
|
|
631
|
+
this.wfAssignPositionCallback = opts.callback;
|
|
632
|
+
this.showPositionDialog = true;
|
|
633
|
+
};
|
|
634
|
+
},
|
|
635
|
+
initSysParamForWf() {
|
|
636
|
+
let webPrefix = WEB_PREFIX;
|
|
637
|
+
let baseApi = process.env.VUE_APP_BASE_API;
|
|
638
|
+
window.sysParamForWf = {
|
|
639
|
+
webPrefix,
|
|
640
|
+
baseApi
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
confirmPosition(rows) {
|
|
644
|
+
this.wfAssignPositionCallback(rows);
|
|
645
|
+
},
|
|
646
|
+
initWinFormTemplateDialog() {
|
|
647
|
+
window.openAssignFormTemplateDialog = opts => {
|
|
648
|
+
this.wfAssignFormTemplateCallback = opts.callback;
|
|
649
|
+
this.showFormTemplateDialog = true;
|
|
650
|
+
};
|
|
651
|
+
},
|
|
652
|
+
confirmFormTemplate(rows) {
|
|
653
|
+
this.wfAssignFormTemplateCallback(rows);
|
|
654
|
+
},
|
|
655
|
+
initWinScriptDescriptionDialog() {
|
|
656
|
+
window.openScriptDescriptionDialog = opts => {
|
|
657
|
+
this.showScriptDescriptionDialog = true;
|
|
658
|
+
};
|
|
659
|
+
},
|
|
660
|
+
handleNodeClick(data, node, v) {
|
|
661
|
+
this.handleNodeData(node)
|
|
662
|
+
this.$forceUpdate();
|
|
663
|
+
this.searchEvent();
|
|
664
|
+
},
|
|
665
|
+
// 异步树叶子节点懒加载逻辑
|
|
666
|
+
loadNode(node, resolve) {
|
|
667
|
+
let id = node && node.data && node.data.id ? node.data.id || '' : 0;
|
|
668
|
+
let param = {enabled: true};
|
|
669
|
+
let url = !id ? USER_PREFIX + '/menuKind/getAllList' : USER_PREFIX + '/menuKind/getChildren';
|
|
670
|
+
this.$http({
|
|
671
|
+
url: url,
|
|
672
|
+
method: 'post',
|
|
673
|
+
data: {
|
|
674
|
+
parent: id,
|
|
675
|
+
enabled: true
|
|
676
|
+
},
|
|
677
|
+
success: res => {
|
|
678
|
+
let rows = res.objx || [];
|
|
679
|
+
rows.forEach(value => {
|
|
680
|
+
value.leaf = !value.hasChild;
|
|
681
|
+
});
|
|
682
|
+
if (node.level === 0) {
|
|
683
|
+
if (rows.length > 0) {
|
|
684
|
+
this.$nextTick(() => {
|
|
685
|
+
let firstNode = node.childNodes[0];
|
|
686
|
+
if (rows[0].hasChild) {
|
|
687
|
+
firstNode.expand();
|
|
688
|
+
}
|
|
689
|
+
this.$refs.tree.setCurrentKey(firstNode.data);
|
|
690
|
+
this.handleNodeClick(firstNode.data, firstNode, this)
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
resolve(rows);
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
},
|
|
698
|
+
handleNodeData(node) {
|
|
699
|
+
this.currentFormType = node ? node.data : null;
|
|
700
|
+
this.currentNode = node;
|
|
701
|
+
},
|
|
702
|
+
handleFormDesignClose() {
|
|
703
|
+
this.formDesTabs = 'first';
|
|
704
|
+
this.showFormScriptList = false;
|
|
705
|
+
},
|
|
706
|
+
openProjectTagDialog3() {
|
|
707
|
+
this.showProjectTagDialog3 = true;
|
|
708
|
+
},
|
|
709
|
+
confirmProjectTagDialog3(rows) {
|
|
710
|
+
this.checkTags = rows;
|
|
711
|
+
},
|
|
712
|
+
getTabNames() {
|
|
713
|
+
return this.checkTags.map(item => item.tagName).join(",");
|
|
714
|
+
},
|
|
715
|
+
jsonImport() {
|
|
716
|
+
this.$jsonImport({
|
|
717
|
+
saveUrl: USER_PREFIX + '/form_develop/importFormTemplate',
|
|
718
|
+
callback: () => {
|
|
719
|
+
this.searchEvent();
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
},
|
|
723
|
+
jsonExport() {
|
|
724
|
+
this.$jsonExport({
|
|
725
|
+
targetRef: "table-m1",
|
|
726
|
+
url: USER_PREFIX + "/form_develop/exportFormTemplate",
|
|
727
|
+
abcEnabled: true
|
|
728
|
+
})
|
|
729
|
+
},
|
|
730
|
+
getBdEnv() {
|
|
731
|
+
getBdFlag({
|
|
732
|
+
success: res => {
|
|
733
|
+
this.isDev = res.objx == 1
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
</script>
|
|
740
|
+
<style scoped lang="scss">
|
|
741
|
+
::v-deep .tab-boxOnly > .el-tabs__header {
|
|
742
|
+
position: absolute;
|
|
743
|
+
right: 130px;
|
|
744
|
+
top: 0;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
|
|
748
|
+
.detail-wrap .d-cont {
|
|
749
|
+
height: calc(100vh - 158px) !important
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.grid-height {
|
|
753
|
+
height: calc(100vh - 126px) !important
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
::v-deep .designer-drawer.is-fullscreen .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
|
|
758
|
+
.detail-wrap .d-cont {
|
|
759
|
+
height: calc(100vh - 116px) !important
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.grid-height {
|
|
763
|
+
height: calc(100vh - 84px) !important
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
</style>
|