@lambo-design/workflow-approve 1.0.0-beta.19 → 1.0.0-beta.20
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/assignee-box.vue +65 -37
- package/src/components/candidate-groups-help-box.vue +1785 -0
- package/src/components/history.vue +3 -3
- package/src/components/horizontal/attachment.vue +224 -224
- package/src/components/horizontal/history.vue +464 -464
- package/src/components/horizontal/opinion.vue +263 -263
- package/src/components/opinion.vue +302 -302
- package/src/components/title.vue +24 -24
- package/src/horizontal.vue +1002 -1002
- package/src/portrait.vue +503 -183
- package/src/styles/css/index.less +61 -9
- package/src/workflow-diagram.vue +16 -7
package/src/portrait.vue
CHANGED
|
@@ -6,36 +6,42 @@
|
|
|
6
6
|
<template slot="page-extend">
|
|
7
7
|
<slot name="return-button"></slot>
|
|
8
8
|
</template>
|
|
9
|
-
<div class="portrait-lambo-indicator-card"
|
|
9
|
+
<div class="portrait-lambo-indicator-card"
|
|
10
|
+
:style="{float: 'left', width: isExpanded && showProcessInfo ? `calc(100% - ${portraitWidth+10}px)` : '99%'}">
|
|
10
11
|
<slot name="business-content">
|
|
11
12
|
</slot>
|
|
12
13
|
</div>
|
|
13
14
|
|
|
14
|
-
<a @click="isExpanded = !isExpanded" class="arrow-button-container"
|
|
15
|
+
<a v-if="showProcessInfo" @click="isExpanded = !isExpanded" class="arrow-button-container"
|
|
16
|
+
:style="{right: isExpanded ? portraitWidth+10 + 'px' : '10px'}">
|
|
15
17
|
<Icon class="icon-class" v-if="isExpanded" type="ios-arrow-forward"/>
|
|
16
18
|
<Icon class="icon-class" v-if="!isExpanded" type="ios-arrow-back"/>
|
|
17
19
|
</a>
|
|
18
|
-
<transition name="draw" @before-enter="beforeFlowInfoEnter" @enter="flowInfoEnter"
|
|
20
|
+
<transition v-if="showProcessInfo" name="draw" @before-enter="beforeFlowInfoEnter" @enter="flowInfoEnter"
|
|
19
21
|
@before-leave="beforeFlowInfoLeave" @leave="flowInfoLeave">
|
|
20
|
-
<lamboIndicatorCard
|
|
22
|
+
<lamboIndicatorCard v-if="isExpanded" class="portrait-lambo-indicator-card"
|
|
23
|
+
:style="{width: portraitWidth + 'px', float: 'right'}" :hasExtend="false">
|
|
21
24
|
<div slot="content-title">流程信息</div>
|
|
22
25
|
<a v-if="!isDetail" @click="auditShow = !auditShow">
|
|
23
|
-
<Title
|
|
26
|
+
<Title
|
|
27
|
+
v-if="handleButtons && (handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile'))">
|
|
24
28
|
<a style="color: #989898">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
<Icon v-if="auditShow" type="ios-arrow-down"/>
|
|
30
|
+
<Icon v-if="!auditShow" type="ios-arrow-up"/>
|
|
31
|
+
审批信息
|
|
28
32
|
</a>
|
|
29
33
|
</Title>
|
|
30
34
|
</a>
|
|
31
|
-
<transition v-if="!isDetail" name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave"
|
|
35
|
+
<transition v-if="!isDetail" name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave"
|
|
36
|
+
@leave="leave">
|
|
32
37
|
<div class="box" v-show="auditShow">
|
|
33
38
|
<Form ref="auditOpinion" justify="center" :label-width="100" :model="form"
|
|
34
|
-
v-if="
|
|
39
|
+
v-if="handleButtons && handleButtons.includes('auditOpinion')"
|
|
35
40
|
style="margin: 10px 0 0 10px;" :rules="ruleValidate">
|
|
36
|
-
<FormItem label="审批意见:" prop="auditOpinion"
|
|
41
|
+
<FormItem label="审批意见:" prop="auditOpinion">
|
|
37
42
|
<AuditOpinion v-model="form.auditOpinion" :attachment-file="handleButtons.includes('attachmentFile')"
|
|
38
|
-
:attachmentdata="fileList"
|
|
43
|
+
:attachmentdata="fileList"
|
|
44
|
+
:smart-flow-server-context="smartFlowServerContext"></AuditOpinion>
|
|
39
45
|
</FormItem>
|
|
40
46
|
</Form>
|
|
41
47
|
<Form ref="auditOpinion" justify="center" :label-width="100"
|
|
@@ -43,16 +49,20 @@
|
|
|
43
49
|
style="margin: 10px 0 0 10px;">
|
|
44
50
|
<FormItem style="min-height: 70px">
|
|
45
51
|
<Tooltip placement="bottom" max-width="200">
|
|
46
|
-
<div style="font-size: smaller" slot="content">支持扩展名:.pdf .doc .docx .txt .xls .xlsx .jpg .jpeg
|
|
52
|
+
<div style="font-size: smaller" slot="content">支持扩展名:.pdf .doc .docx .txt .xls .xlsx .jpg .jpeg
|
|
53
|
+
.png .gif
|
|
54
|
+
</div>
|
|
47
55
|
<UploadFile @upload-result="uploadFile" :multiple="true"
|
|
48
|
-
:oss-server-context="smartFlowServerContext"
|
|
56
|
+
:oss-server-context="smartFlowServerContext"
|
|
57
|
+
:oss-file-put-url="ossFilePutUrl"></UploadFile>
|
|
49
58
|
</Tooltip>
|
|
50
59
|
</FormItem>
|
|
51
60
|
</Form>
|
|
52
61
|
</div>
|
|
53
62
|
</transition>
|
|
54
63
|
<a v-if="taskNode && isDetail && hisAuditOpinion[0].auditOpinion" @click="auditShow = !auditShow">
|
|
55
|
-
<Title
|
|
64
|
+
<Title
|
|
65
|
+
v-if="handleButtons && (handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile'))">
|
|
56
66
|
<a style="color: #989898">
|
|
57
67
|
<Icon v-if="auditShow" type="ios-arrow-down"/>
|
|
58
68
|
<Icon v-if="!auditShow" type="ios-arrow-up"/>
|
|
@@ -60,10 +70,11 @@
|
|
|
60
70
|
</a>
|
|
61
71
|
</Title>
|
|
62
72
|
</a>
|
|
63
|
-
<transition v-if="taskNode && isDetail && hisAuditOpinion[0].auditOpinion" name="draw" @before-enter="beforeEnter"
|
|
73
|
+
<transition v-if="taskNode && isDetail && hisAuditOpinion[0].auditOpinion" name="draw" @before-enter="beforeEnter"
|
|
74
|
+
@enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
64
75
|
<div class="box" v-show="auditShow">
|
|
65
76
|
<Form ref="auditOpinion" justify="center" :model="form"
|
|
66
|
-
v-if="
|
|
77
|
+
v-if="handleButtons && handleButtons.includes('auditOpinion')"
|
|
67
78
|
style="margin: 10px 0 0 10px;" :rules="ruleValidate">
|
|
68
79
|
<FormItem style="margin-left: -60px">
|
|
69
80
|
<Card v-for="(item, index) in hisAuditOpinion" :key="index">
|
|
@@ -78,18 +89,18 @@
|
|
|
78
89
|
</div>
|
|
79
90
|
</transition>
|
|
80
91
|
<a @click="historyShow = !historyShow">
|
|
81
|
-
<Title v-if="
|
|
92
|
+
<Title v-if="handleButtons && handleButtons.includes('auditHistory')">
|
|
82
93
|
<a style="color: #989898">
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
<Icon v-if="historyShow" type="ios-arrow-down"/>
|
|
95
|
+
<Icon v-if="!historyShow" type="ios-arrow-up"/>
|
|
96
|
+
审批记录
|
|
86
97
|
</a>
|
|
87
98
|
</Title>
|
|
88
99
|
</a>
|
|
89
100
|
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
90
101
|
<div class="box" v-show="historyShow">
|
|
91
102
|
<Card class="process-history" :style="processHistoryHeight" dis-hover :bordered="false"
|
|
92
|
-
v-if="
|
|
103
|
+
v-if="handleButtons && handleButtons.includes('auditHistory')">
|
|
93
104
|
<processHistory :portrait-width="portraitWidth" :list="processHistory" :done-page="isDetail"
|
|
94
105
|
:smart-flow-server-context="smartFlowServerContext"></processHistory>
|
|
95
106
|
</Card>
|
|
@@ -97,16 +108,17 @@
|
|
|
97
108
|
</transition>
|
|
98
109
|
|
|
99
110
|
<a @click="attachListShow = !attachListShow">
|
|
100
|
-
<Title v-if="
|
|
111
|
+
<Title v-if="handleButtons && handleButtons.includes('attachmentFile') && attachmentList.length > 0">
|
|
101
112
|
<a style="color: #989898">
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
113
|
+
<Icon v-if="attachListShow" type="ios-arrow-down"/>
|
|
114
|
+
<Icon v-if="!attachListShow" type="ios-arrow-up"/>
|
|
115
|
+
查看附件
|
|
105
116
|
</a>
|
|
106
117
|
</Title>
|
|
107
118
|
</a>
|
|
108
119
|
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
109
|
-
<div class="box"
|
|
120
|
+
<div class="box"
|
|
121
|
+
v-show="handleButtons && handleButtons.includes('auditHistory') && attachmentList.length > 0 && attachListShow">
|
|
110
122
|
<div v-for="(item, index) in attachmentList" :key="index">
|
|
111
123
|
<Card dis-hover class="attach-card">
|
|
112
124
|
<List item-layout="vertical">
|
|
@@ -114,16 +126,25 @@
|
|
|
114
126
|
<Row style="display: flex; align-items: center;">
|
|
115
127
|
<!-- 左边:图片 -->
|
|
116
128
|
<Col span="4" style="margin-top: -25px">
|
|
117
|
-
<avatar v-if="item.fileType === 'image'" icon="ios-image-outline" class="attach-avatar"
|
|
129
|
+
<avatar v-if="item.fileType === 'image'" icon="ios-image-outline" class="attach-avatar"
|
|
130
|
+
style="background-color: #005aff"
|
|
131
|
+
:style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
|
|
118
132
|
:size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
|
|
119
|
-
<avatar v-else-if="item.fileType === 'doc'" icon="ios-document-outline" class="attach-avatar"
|
|
133
|
+
<avatar v-else-if="item.fileType === 'doc'" icon="ios-document-outline" class="attach-avatar"
|
|
134
|
+
style="background-color: #005aff"
|
|
135
|
+
:style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
|
|
120
136
|
:size="portraitWidth >= 600 ? 'middle' : 'small'">
|
|
121
137
|
</avatar>
|
|
122
|
-
<avatar v-else-if="item.fileType === 'xlsx'" icon="ios-document-outline" class="attach-avatar"
|
|
138
|
+
<avatar v-else-if="item.fileType === 'xlsx'" icon="ios-document-outline" class="attach-avatar"
|
|
139
|
+
style="background-color: #19be6b"
|
|
140
|
+
:style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
|
|
123
141
|
:size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
|
|
124
|
-
<avatar v-else-if="item.fileType === 'pdf'" icon="ios-document-outline" class="attach-avatar"
|
|
142
|
+
<avatar v-else-if="item.fileType === 'pdf'" icon="ios-document-outline" class="attach-avatar"
|
|
143
|
+
style="background-color: #ed4014"
|
|
144
|
+
:style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
|
|
125
145
|
:size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
|
|
126
|
-
<avatar v-else icon="ios-document-outline" class="attach-avatar"
|
|
146
|
+
<avatar v-else icon="ios-document-outline" class="attach-avatar"
|
|
147
|
+
:style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
|
|
127
148
|
:size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
|
|
128
149
|
</Col>
|
|
129
150
|
<!-- 右边:附件信息 -->
|
|
@@ -159,13 +180,13 @@
|
|
|
159
180
|
</div>
|
|
160
181
|
</transition>
|
|
161
182
|
<Modal title="查看附件" v-model="modalVisible" fullscreen scrollable :mask="false">
|
|
162
|
-
<img :src="imageUrl" v-if="modalVisible"
|
|
183
|
+
<img :src="imageUrl" v-if="modalVisible" alt="" style="width: 100%">
|
|
163
184
|
<div slot="footer">
|
|
164
185
|
<Button type="primary" @click="modalVisible = false">关闭</Button>
|
|
165
186
|
</div>
|
|
166
187
|
</Modal>
|
|
167
188
|
<Modal title="查看附件" v-model="modalDocx" fullscreen scrollable :mask="false">
|
|
168
|
-
<div ref="file"
|
|
189
|
+
<div ref="file"></div>
|
|
169
190
|
</Modal>
|
|
170
191
|
<Modal v-model="modal1" title="选择节点"
|
|
171
192
|
@on-cancel="cancel"
|
|
@@ -177,41 +198,122 @@
|
|
|
177
198
|
@on-current-change="selectNode">
|
|
178
199
|
</Table>
|
|
179
200
|
</Modal>
|
|
180
|
-
<assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted"
|
|
181
|
-
|
|
201
|
+
<assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted"
|
|
202
|
+
@update-selected="handleSelectedUser" @update-next-node-assignee="updateNextNodeAssignee"
|
|
203
|
+
:data="assigneeBoxData" :smart-flow-server-context="smartFlowServerContext"
|
|
204
|
+
:upms-server-context="upmsServerContext"/>
|
|
182
205
|
<Modal v-model="modalBoxShow" width="1000" title="流程跟踪图">
|
|
183
206
|
<Workflow_Diagram ref="processTrace" :instanceId="process.instanceId" :applyId="process.applyId"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
207
|
+
:procId="process.procId"
|
|
208
|
+
:tableData="process.tableData" :hisAudit="hisAudit"
|
|
209
|
+
:smart-flow-server-context="smartFlowServerContext">
|
|
187
210
|
</Workflow_Diagram>
|
|
188
211
|
</Modal>
|
|
212
|
+
<Modal v-model="appointBoxShow" title="下一环节设置"
|
|
213
|
+
@on-cancel="appointBoxShow = false" width="600"
|
|
214
|
+
@on-ok="appointOk">
|
|
215
|
+
<Card v-for="(item,index) of nextNodesFormList" :key="index" style="margin-bottom: 10px"
|
|
216
|
+
v-if="handleButtons && (handleButtons.includes('appointHandler') || handleButtons.includes('appointTimeoutTime'))">
|
|
217
|
+
<Form ref="appointBox" justify="center" :label-width="100" :model="item"
|
|
218
|
+
style="margin: 10px 0 0 10px;" :rules="ruleValidate">
|
|
219
|
+
<div v-if="handleButtons && handleButtons.includes('appointHandler')">
|
|
220
|
+
<FormItem label="下一环节:">
|
|
221
|
+
{{ item.name }}
|
|
222
|
+
</FormItem>
|
|
223
|
+
<FormItem label="人员类型:" v-if="!item.isMultiInstance">
|
|
224
|
+
<RadioGroup v-model="item.actionType">
|
|
225
|
+
<Radio label="ASSIGNEE">办理人</Radio>
|
|
226
|
+
<Radio label="CAND">候选人</Radio>
|
|
227
|
+
</RadioGroup>
|
|
228
|
+
</FormItem>
|
|
229
|
+
<FormItem label="办理人员:" prop="assignee" v-if="!item.isMultiInstance && item.actionType === 'ASSIGNEE'">
|
|
230
|
+
<Input v-model="item.assigneeName"
|
|
231
|
+
placeholder="请选择办理人"
|
|
232
|
+
style="width: 68%"
|
|
233
|
+
icon="md-apps"
|
|
234
|
+
@on-focus="readingRangeClick(item)"
|
|
235
|
+
@on-click="readingRangeClick(item)"/>
|
|
236
|
+
</FormItem>
|
|
237
|
+
<FormItem label="候选人员:" prop="candidateGroups" v-if="item.isMultiInstance || item.actionType === 'CAND'">
|
|
238
|
+
<Input v-model="item.candidateNames"
|
|
239
|
+
placeholder="请选择候选人"
|
|
240
|
+
style="width: 68%"
|
|
241
|
+
icon="md-apps"
|
|
242
|
+
@on-focus="candidateGroupsReadingRangeClick(item)"
|
|
243
|
+
@on-click="candidateGroupsReadingRangeClick(item)"/>
|
|
244
|
+
</FormItem>
|
|
245
|
+
</div>
|
|
246
|
+
<div v-if="handleButtons && handleButtons.includes('appointTimeoutTime')">
|
|
247
|
+
<Row>
|
|
248
|
+
<Col span="12">
|
|
249
|
+
<FormItem label="停留时间:">
|
|
250
|
+
<Input v-model="item.remainDay" style="width: 100px" type="number" :min="0"></Input>
|
|
251
|
+
天
|
|
252
|
+
</FormItem>
|
|
253
|
+
</Col>
|
|
254
|
+
<Col span="12">
|
|
255
|
+
<FormItem>
|
|
256
|
+
<Input v-model="item.remainTime" style="margin-left: -140px; width: 100px" type="number"
|
|
257
|
+
:min="0"></Input>
|
|
258
|
+
小时 自动处理
|
|
259
|
+
</FormItem>
|
|
260
|
+
</Col>
|
|
261
|
+
</Row>
|
|
262
|
+
<Row>
|
|
263
|
+
<Col span="12">
|
|
264
|
+
<FormItem label="任务提前:">
|
|
265
|
+
<Input v-model="item.inAdvanceDay" style="width: 100px" type="number" :min="0"></Input>
|
|
266
|
+
天
|
|
267
|
+
</FormItem>
|
|
268
|
+
</Col>
|
|
269
|
+
<Col span="12">
|
|
270
|
+
<FormItem>
|
|
271
|
+
<Input v-model="item.inAdvanceTime" style="margin-left: -140px;width: 100px" type="number"
|
|
272
|
+
:min="0"></Input>
|
|
273
|
+
小时 标红预警
|
|
274
|
+
</FormItem>
|
|
275
|
+
</Col>
|
|
276
|
+
</Row>
|
|
277
|
+
<FormItem label="处理方式:">
|
|
278
|
+
<Select v-model="item.processing" style="width:200px" placeholder="自动同意">
|
|
279
|
+
<Option v-for="item in handleTypeList" :value="item.value" :key="item.value">
|
|
280
|
+
{{ item.label }}
|
|
281
|
+
</Option>
|
|
282
|
+
</Select>
|
|
283
|
+
</FormItem>
|
|
284
|
+
</div>
|
|
285
|
+
</Form>
|
|
286
|
+
</Card>
|
|
287
|
+
</Modal>
|
|
288
|
+
<candidateGroupsHelpBox ref="candidateGroupsHelpBox" :show="candidateGroupsHelpBoxShow" @update-cand-groups="updateCandGroups"
|
|
289
|
+
:upms-server-context="upmsServerContext" :smart-flow-server-context="smartFlowServerContext"/>
|
|
189
290
|
</lamboIndicatorCard>
|
|
190
291
|
</transition>
|
|
191
292
|
<template slot="page-footer">
|
|
192
293
|
<div>
|
|
193
294
|
<slot name="footer-button"></slot>
|
|
194
|
-
<Button style="margin-left: 10px;" v-if="
|
|
295
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo70') && !isDetail"
|
|
195
296
|
:disabled="disable" :loading="loading" @click="audit('70')">驳回到原点
|
|
196
297
|
</Button>
|
|
197
|
-
<Button style="margin-left: 10px;" v-if="
|
|
298
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo40') && !isDetail"
|
|
198
299
|
:disabled="disable" :loading="loading" @click="audit('40')">驳回上一节点
|
|
199
300
|
</Button>
|
|
200
|
-
<Button style="margin-left: 10px;" v-if="
|
|
301
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo90') && !isDetail"
|
|
201
302
|
:disabled="disable" :loading="loading" @click="audit('90')">驳回指定节点
|
|
202
303
|
</Button>
|
|
203
|
-
<Button style="margin-left: 10px;" v-if="
|
|
304
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo80') && !isDetail"
|
|
204
305
|
:disabled="disable" :loading="loading" @click="audit('80')">跳转指定节点
|
|
205
306
|
</Button>
|
|
206
|
-
<Button style="margin-left: 10px;" v-if="
|
|
307
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo82') && !isDetail"
|
|
207
308
|
:disabled="disable" :loading="loading" @click="audit('82')">指定他人处理
|
|
208
309
|
</Button>
|
|
209
|
-
<Button style="margin-left: 10px;" v-if="
|
|
310
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo50') && !isDetail"
|
|
210
311
|
:disabled="disable" :loading="loading" @click="audit('50')">直接结束流程
|
|
211
312
|
</Button>
|
|
212
|
-
<Button style="margin-left: 10px;" v-if="
|
|
213
|
-
@click="processPrint"
|
|
214
|
-
|
|
313
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('processTrace')"
|
|
314
|
+
@click="processPrint">流程跟踪图
|
|
315
|
+
</Button>
|
|
316
|
+
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo30') && !isDetail"
|
|
215
317
|
:disabled="disable" :loading="loading" type="primary" @click="audit('30')">通过
|
|
216
318
|
</Button>
|
|
217
319
|
</div>
|
|
@@ -229,6 +331,7 @@ import bus from '@lambo-design/shared/utils/bus';
|
|
|
229
331
|
import Title from "./components/title";
|
|
230
332
|
import processHistory from "./components/history";
|
|
231
333
|
import assigneeBox from "./components/assignee-box";
|
|
334
|
+
import CandidateGroupsHelpBox from "./components/candidate-groups-help-box";
|
|
232
335
|
import LamboPagingTable from "@lambo-design/paging-table";
|
|
233
336
|
import AuditOpinion from "./components/opinion";
|
|
234
337
|
import axios from "axios";
|
|
@@ -273,7 +376,7 @@ export default {
|
|
|
273
376
|
type: Function,
|
|
274
377
|
required: false,
|
|
275
378
|
},
|
|
276
|
-
title:{
|
|
379
|
+
title: {
|
|
277
380
|
type: String,
|
|
278
381
|
default: "流程办理"
|
|
279
382
|
},
|
|
@@ -295,11 +398,13 @@ export default {
|
|
|
295
398
|
LamboPagingTable,
|
|
296
399
|
AuditOpinion,
|
|
297
400
|
LamboIndicatorCard,
|
|
298
|
-
UploadFile
|
|
401
|
+
UploadFile,
|
|
402
|
+
CandidateGroupsHelpBox
|
|
299
403
|
},
|
|
300
404
|
data() {
|
|
301
405
|
return {
|
|
302
406
|
isExpanded: true,
|
|
407
|
+
showProcessInfo: true,
|
|
303
408
|
portraitWidth: 0,
|
|
304
409
|
requestSuccessCodes: [200, "200"],
|
|
305
410
|
auditShow: true,
|
|
@@ -316,10 +421,19 @@ export default {
|
|
|
316
421
|
auditParams: {},
|
|
317
422
|
modal1: false,
|
|
318
423
|
modalBoxShow: false,
|
|
424
|
+
candidateGroupsHelpBoxShow: false,
|
|
425
|
+
appointBoxShow: false,
|
|
426
|
+
autoOpenNode: '0',
|
|
427
|
+
nextNodesOldSettings: [],
|
|
428
|
+
nextNodesFormList: [],
|
|
319
429
|
hisNode: [],
|
|
320
430
|
processHistory: [],
|
|
431
|
+
permScope: '',
|
|
432
|
+
organTreeType: '',
|
|
321
433
|
ruleValidate: {
|
|
322
|
-
auditOpinion: [{required: true, trigger: "blur", message: "审批意见不能为空"}]
|
|
434
|
+
auditOpinion: [{required: true, trigger: "blur", message: "审批意见不能为空"}],
|
|
435
|
+
assignee: [{required: true, trigger: "blur", message: "办理人不能为空"}],
|
|
436
|
+
candidateGroups: [{required: true, trigger: "blur", message: "候选人不能为空"}],
|
|
323
437
|
},
|
|
324
438
|
form: {
|
|
325
439
|
auditOpinion: '',
|
|
@@ -356,37 +470,55 @@ export default {
|
|
|
356
470
|
procId: ''
|
|
357
471
|
},
|
|
358
472
|
handleButtonsNames: {
|
|
359
|
-
'30': '
|
|
360
|
-
'70': '
|
|
473
|
+
'30': '通过',
|
|
474
|
+
'70': '驳回到原点',
|
|
361
475
|
'40': '驳回上一节点',
|
|
362
476
|
'90': '驳回指定节点',
|
|
363
477
|
'80': '跳转指定节点',
|
|
364
|
-
'82': '
|
|
365
|
-
'50': '
|
|
478
|
+
'82': '指定他人处理',
|
|
479
|
+
'50': '直接结束流程'
|
|
366
480
|
},
|
|
481
|
+
handleTypeList: [
|
|
482
|
+
{
|
|
483
|
+
value: '00',
|
|
484
|
+
label: '只预警不处理'
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
value: '10',
|
|
488
|
+
label: '自动同意'
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
value: '20',
|
|
492
|
+
label: '直接终止流程'
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
value: '90',
|
|
496
|
+
label: '自动驳回'
|
|
497
|
+
}
|
|
498
|
+
],
|
|
367
499
|
}
|
|
368
500
|
|
|
369
501
|
},
|
|
370
502
|
|
|
371
503
|
mounted() {
|
|
372
504
|
this.getWidth()
|
|
373
|
-
if (this.procId){
|
|
505
|
+
if (this.procId) {
|
|
374
506
|
this.initData()
|
|
375
507
|
}
|
|
376
508
|
|
|
377
509
|
},
|
|
378
510
|
computed: {
|
|
379
|
-
processHistoryHeight(){
|
|
511
|
+
processHistoryHeight() {
|
|
380
512
|
let str = '';
|
|
381
|
-
const hasAuditOpinion = this.taskNode &&
|
|
382
|
-
const hasAttachmentFile =
|
|
513
|
+
const hasAuditOpinion = this.taskNode && this.handleButtons && this.handleButtons.includes('auditOpinion')
|
|
514
|
+
const hasAttachmentFile = this.handleButtons && this.handleButtons.includes('auditHistory') && this.attachmentList.length > 0
|
|
383
515
|
const isDetail = this.isDetail && !this.hisAuditOpinion[0].auditOpinion.length > 0
|
|
384
|
-
if (hasAuditOpinion && !hasAttachmentFile && !isDetail){
|
|
385
|
-
str+= "height: 43vh"
|
|
386
|
-
} else if (hasAuditOpinion && hasAttachmentFile && !isDetail){
|
|
387
|
-
str+= "height: 40vh"
|
|
516
|
+
if (hasAuditOpinion && !hasAttachmentFile && !isDetail) {
|
|
517
|
+
str += "height: 43vh"
|
|
518
|
+
} else if (hasAuditOpinion && hasAttachmentFile && !isDetail) {
|
|
519
|
+
str += "height: 40vh"
|
|
388
520
|
} else {
|
|
389
|
-
str+= "height: 67vh"
|
|
521
|
+
str += "height: 67vh"
|
|
390
522
|
}
|
|
391
523
|
return str;
|
|
392
524
|
},
|
|
@@ -496,9 +628,9 @@ export default {
|
|
|
496
628
|
}
|
|
497
629
|
this.portraitWidth = this.width
|
|
498
630
|
},
|
|
499
|
-
initData(){
|
|
631
|
+
initData() {
|
|
500
632
|
this.getAttachList()
|
|
501
|
-
if (!this.isDetail){
|
|
633
|
+
if (!this.isDetail) {
|
|
502
634
|
this.getTodoTaskId()
|
|
503
635
|
} else {
|
|
504
636
|
this.getDoneTaskId()
|
|
@@ -507,10 +639,6 @@ export default {
|
|
|
507
639
|
this.getHisAudit();
|
|
508
640
|
this.getProcessHistory();
|
|
509
641
|
},
|
|
510
|
-
saveBusinessForm() {
|
|
511
|
-
this.businessFormSave(() => {
|
|
512
|
-
})
|
|
513
|
-
},
|
|
514
642
|
getAttachList() {
|
|
515
643
|
const self = this
|
|
516
644
|
const param = {
|
|
@@ -538,12 +666,21 @@ export default {
|
|
|
538
666
|
let param = {
|
|
539
667
|
procId: this.procId,
|
|
540
668
|
applyId: this.applyId,
|
|
541
|
-
taskNode:this.taskNode
|
|
669
|
+
taskNode: this.taskNode
|
|
542
670
|
}
|
|
543
671
|
ajax.get(self.smartFlowServerContext + "/manage/processTodo/list", {params: param}).then(function (resp) {
|
|
544
672
|
if (resp.data.code === '200') {
|
|
545
673
|
self.taskId = resp.data.data.rows[0].taskId
|
|
546
674
|
self.instanceId = resp.data.data.rows[0].procInstanceId
|
|
675
|
+
let procType = resp.data.data.rows[0].procType
|
|
676
|
+
ajax.get(self.smartFlowServerContext + "/manage/processType/lists?proType=" + procType)
|
|
677
|
+
.then(resp => {
|
|
678
|
+
let data = resp.data.data.rows
|
|
679
|
+
self.permScope = data[0].permScope
|
|
680
|
+
self.organTreeType = data[0].organTreeType
|
|
681
|
+
}).catch(err => {
|
|
682
|
+
console.log(err);
|
|
683
|
+
})
|
|
547
684
|
} else {
|
|
548
685
|
self.$Message.error(resp.data.message)
|
|
549
686
|
}
|
|
@@ -556,7 +693,7 @@ export default {
|
|
|
556
693
|
let param = {
|
|
557
694
|
procId: this.procId,
|
|
558
695
|
applyId: this.applyId,
|
|
559
|
-
taskNode:this.taskNode
|
|
696
|
+
taskNode: this.taskNode
|
|
560
697
|
}
|
|
561
698
|
ajax.get(self.smartFlowServerContext + "/manage/processDone/getDoneDetail", {params: param}).then(function (resp) {
|
|
562
699
|
if (resp.data.code === '200') {
|
|
@@ -600,6 +737,88 @@ export default {
|
|
|
600
737
|
ajax.post(self.smartFlowServerContext + '/manage/approvalCenter/getNodeData', param).then(function (resp) {
|
|
601
738
|
if (resp.data.code === '200') {
|
|
602
739
|
self.handleButtons = resp.data.data[0].handleButtons
|
|
740
|
+
if (!self.handleButtons || (!self.handleButtons.includes('auditOpinion') && !self.handleButtons.includes('attachmentFile') && !self.handleButtons.includes('auditHistory'))){
|
|
741
|
+
self.showProcessInfo = false
|
|
742
|
+
}
|
|
743
|
+
/*if (self.handleButtons.includes('appointHandler') || self.handleButtons.includes('appointTimeoutTime')) {
|
|
744
|
+
//获取下个节点信息
|
|
745
|
+
self.getNextNodes()
|
|
746
|
+
}*/
|
|
747
|
+
} else {
|
|
748
|
+
self.$Message.error(resp.data.message)
|
|
749
|
+
}
|
|
750
|
+
}).catch((err) => {
|
|
751
|
+
console.log(err)
|
|
752
|
+
})
|
|
753
|
+
},
|
|
754
|
+
getNextNodes(){
|
|
755
|
+
const self = this
|
|
756
|
+
self.nextNodesFormList = []
|
|
757
|
+
self.nextNodesOldSettings = []
|
|
758
|
+
let param = {
|
|
759
|
+
procId: this.procId,
|
|
760
|
+
taskNode: this.taskNode
|
|
761
|
+
}
|
|
762
|
+
ajax.post(self.smartFlowServerContext + '/manage/processTodo/getNextNodes', param).then(function (resp) {
|
|
763
|
+
if (resp.data.code === '200') {
|
|
764
|
+
let nextNodeForm = {}
|
|
765
|
+
let nextNodeOldForm = {}
|
|
766
|
+
let data = resp.data.data
|
|
767
|
+
for (let i = 0; i < data.length; i++) {
|
|
768
|
+
nextNodeOldForm = {
|
|
769
|
+
id: data[i].id,
|
|
770
|
+
assignee: data[i].assignee ? data[i].assignee.id : '',
|
|
771
|
+
timeLimit: data[i].timeLimit,
|
|
772
|
+
}
|
|
773
|
+
nextNodeForm = {
|
|
774
|
+
id: data[i].id,
|
|
775
|
+
name: data[i].name,
|
|
776
|
+
assignee: data[i].assignee ? data[i].assignee.id : '',
|
|
777
|
+
assigneeName: data[i].assignee ? data[i].assignee.name : '',
|
|
778
|
+
candidateGroups: '',
|
|
779
|
+
isMultiInstance: data[i].isMultiInstance,
|
|
780
|
+
actionType: 'ASSIGNEE',
|
|
781
|
+
remainDay : 0,
|
|
782
|
+
remainTime : 0,
|
|
783
|
+
inAdvanceDay : 0,
|
|
784
|
+
inAdvanceTime : 0,
|
|
785
|
+
processing : '00'
|
|
786
|
+
}
|
|
787
|
+
//显示具体候选人信息
|
|
788
|
+
if (data[i].candidateGroups){
|
|
789
|
+
nextNodeForm.actionType = 'CAND'
|
|
790
|
+
let names = [];
|
|
791
|
+
let candidates = {};
|
|
792
|
+
for (let groupName in data[i].candidateGroups) {
|
|
793
|
+
if (data[i].candidateGroups.hasOwnProperty(groupName)) {
|
|
794
|
+
let group = data[i].candidateGroups[groupName];
|
|
795
|
+
group.forEach(item => {
|
|
796
|
+
names.push(item.name);
|
|
797
|
+
});
|
|
798
|
+
candidates[groupName] = group.map(item => item.id + ':' + item.name).join(',');
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
nextNodeForm.candidateNames = names.join(',');
|
|
802
|
+
nextNodeForm.candidates = candidates;
|
|
803
|
+
nextNodeOldForm.candidates = candidates;
|
|
804
|
+
}
|
|
805
|
+
if (data[i].timeLimit) {
|
|
806
|
+
let expireTime = data[i].timeLimit.split(";")[0].split(":")[1]
|
|
807
|
+
let warningTime = data[i].timeLimit.split(";")[1].split(":")[1]
|
|
808
|
+
let handleType = data[i].timeLimit.split(";")[2].split(":")[1]
|
|
809
|
+
let days = expireTime.slice(0, expireTime.indexOf("D")) //过期天
|
|
810
|
+
let hourOfDay = expireTime.slice(expireTime.indexOf("D") + 1, expireTime.indexOf("H")) //过期小时
|
|
811
|
+
let daysWarn = warningTime.slice(0, warningTime.indexOf("D")) //警告天
|
|
812
|
+
let hourOfDayWarn = warningTime.slice(warningTime.indexOf("D") + 1, warningTime.indexOf("H")) //警告小时
|
|
813
|
+
nextNodeForm.remainDay = parseInt(days)
|
|
814
|
+
nextNodeForm.remainTime = parseInt(hourOfDay)
|
|
815
|
+
nextNodeForm.inAdvanceDay = parseInt(daysWarn)
|
|
816
|
+
nextNodeForm.inAdvanceTime = parseInt(hourOfDayWarn)
|
|
817
|
+
nextNodeForm.processing = handleType
|
|
818
|
+
}
|
|
819
|
+
self.nextNodesFormList.push(nextNodeForm)
|
|
820
|
+
self.nextNodesOldSettings.push(nextNodeOldForm)
|
|
821
|
+
}
|
|
603
822
|
} else {
|
|
604
823
|
self.$Message.error(resp.data.message)
|
|
605
824
|
}
|
|
@@ -607,9 +826,77 @@ export default {
|
|
|
607
826
|
console.log(err)
|
|
608
827
|
})
|
|
609
828
|
},
|
|
829
|
+
getHisAudit() {
|
|
830
|
+
let self = this
|
|
831
|
+
let params = {
|
|
832
|
+
applyId: self.applyId,
|
|
833
|
+
instanceId: self.instanceId,
|
|
834
|
+
procId: self.procId,
|
|
835
|
+
taskId: self.taskId
|
|
836
|
+
}
|
|
837
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getHisAudit', {params: params}).then(function (resp) {
|
|
838
|
+
if (resp.data.code === '200') {
|
|
839
|
+
self.hisAudit = resp.data.data
|
|
840
|
+
let uniqueDataMap = {};
|
|
841
|
+
self.hisAudit.forEach((item) => {
|
|
842
|
+
uniqueDataMap[item["taskNode"]] = item;
|
|
843
|
+
})
|
|
844
|
+
self.hisNode = Object.values(uniqueDataMap);
|
|
845
|
+
|
|
846
|
+
}
|
|
847
|
+
})
|
|
848
|
+
},
|
|
849
|
+
getProcessHistory() {
|
|
850
|
+
let self = this
|
|
851
|
+
let params = {
|
|
852
|
+
applyId: self.applyId,
|
|
853
|
+
instanceId: self.instanceId,
|
|
854
|
+
procId: self.procId,
|
|
855
|
+
taskId: self.taskId
|
|
856
|
+
}
|
|
857
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessHis', {params: params}).then(function (resp) {
|
|
858
|
+
if (resp.data.code === '200') {
|
|
859
|
+
self.processHistory = resp.data.data
|
|
860
|
+
}
|
|
861
|
+
})
|
|
862
|
+
},
|
|
863
|
+
|
|
864
|
+
audit: function (auditResult) {
|
|
865
|
+
let self = this
|
|
866
|
+
self.auditResult = auditResult
|
|
867
|
+
self.submit()
|
|
868
|
+
},
|
|
869
|
+
submit() {
|
|
870
|
+
let self = this;
|
|
871
|
+
self.auditParams = {
|
|
872
|
+
procId: self.procId,
|
|
873
|
+
applyId: self.applyId,
|
|
874
|
+
taskId: self.taskId,
|
|
875
|
+
auditOpinion: self.form.auditOpinion,
|
|
876
|
+
fileListStr: JSON.stringify(self.fileList),
|
|
877
|
+
auditResult: self.auditResult,
|
|
878
|
+
params: JSON.stringify(self.datas),
|
|
879
|
+
targetTaskNode: self.targetTaskNode,
|
|
880
|
+
selectedUserId: self.selectedUserId,
|
|
881
|
+
}
|
|
882
|
+
if (self.auditResult == '' || self.auditResult == null) {
|
|
883
|
+
self.$Message.error("请选择审批结果!");
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
if (self.form.auditOpinion == '' || self.form.auditOpinion == null) {
|
|
887
|
+
if (!self.handleButtons || self.handleButtons.includes('auditOpinion')) {
|
|
888
|
+
self.$Message.error("请输入审批意见!")
|
|
889
|
+
return;
|
|
890
|
+
} else {
|
|
891
|
+
self.auditParams.auditOpinion = self.handleButtonsNames[self.auditResult];
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
self.businessFormSave ? self.businessFormSave(self.handleSaveResult) : self.handleSaveResult(true)
|
|
896
|
+
},
|
|
610
897
|
handleSaveResult(saveResult, businessParams) {
|
|
611
898
|
if (saveResult) {
|
|
612
|
-
this.executeButtonAction(businessParams,(execResult, instanceId, taskIds, auditResult, curTaskId) => {
|
|
899
|
+
this.executeButtonAction(businessParams, (execResult, instanceId, taskIds, auditResult, curTaskId) => {
|
|
613
900
|
if (this.executionCompleted) {
|
|
614
901
|
this.executionCompleted(execResult, instanceId, taskIds, auditResult, curTaskId);
|
|
615
902
|
}
|
|
@@ -620,7 +907,7 @@ export default {
|
|
|
620
907
|
},
|
|
621
908
|
executeButtonAction(businessParams, callback) {
|
|
622
909
|
const self = this;
|
|
623
|
-
if (businessParams){
|
|
910
|
+
if (businessParams) {
|
|
624
911
|
Object.assign(self.datas, businessParams)
|
|
625
912
|
self.auditParams.params = JSON.stringify(self.datas)
|
|
626
913
|
}
|
|
@@ -632,7 +919,7 @@ export default {
|
|
|
632
919
|
self.assigneeBoxData = self.auditParams
|
|
633
920
|
self.assigneeBoxData.auditResultName = self.handleButtonsNames[self.auditResult]
|
|
634
921
|
self.assigneeBoxData.instanceId = self.instanceId
|
|
635
|
-
self.$refs.assigneeHelpBox.toggleShowHelpBox()
|
|
922
|
+
self.$refs.assigneeHelpBox.toggleShowHelpBox(self.organTreeType, '', 'transferCurTask')
|
|
636
923
|
} else if (self.auditResult === '80') {
|
|
637
924
|
self.getNodesBehind()
|
|
638
925
|
} else if (self.auditResult === '90') {
|
|
@@ -643,7 +930,7 @@ export default {
|
|
|
643
930
|
let url = self.smartFlowServerContext + '/manage/processTodo/getPreNode'
|
|
644
931
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
645
932
|
let result = resp.data
|
|
646
|
-
if(result.code == '30013' || result.code == '30014') {
|
|
933
|
+
if (result.code == '30013' || result.code == '30014') {
|
|
647
934
|
//前序节点为子流程或当前节点为子流程第一个节点不可驳回上一级节点
|
|
648
935
|
self.$Message.warning(result.message)
|
|
649
936
|
//避免未提示消息直接回调
|
|
@@ -692,7 +979,7 @@ export default {
|
|
|
692
979
|
self.loading = false
|
|
693
980
|
self.disable = false
|
|
694
981
|
self.$Message.success(result.message);
|
|
695
|
-
if (result.data){
|
|
982
|
+
if (result.data) {
|
|
696
983
|
let taskIds = result.data.map(item => item.id).join(',');
|
|
697
984
|
callback(true, result.data[0].processInstanceId, taskIds, auditResult, self.taskId)
|
|
698
985
|
} else {
|
|
@@ -711,39 +998,49 @@ export default {
|
|
|
711
998
|
}
|
|
712
999
|
})
|
|
713
1000
|
} else {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
1001
|
+
if (!self.handleButtons || self.handleButtons.includes('appointHandler') || self.handleButtons.includes('appointTimeoutTime')){
|
|
1002
|
+
self.getNextNodes()
|
|
1003
|
+
self.appointBoxShow = true
|
|
1004
|
+
} else {
|
|
1005
|
+
self.doPass(callback)
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
doPass(callback){
|
|
1010
|
+
const self = this
|
|
1011
|
+
let auditResult = {
|
|
1012
|
+
code: self.auditResult,
|
|
1013
|
+
name: self.handleButtonsNames[self.auditResult]
|
|
1014
|
+
}
|
|
1015
|
+
self.loading = true
|
|
1016
|
+
self.disable = true
|
|
1017
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
1018
|
+
ajax.post(url, self.auditParams).then(function (resp) {
|
|
1019
|
+
let result = resp.data
|
|
1020
|
+
if (result.code == '200') {
|
|
1021
|
+
self.loading = false
|
|
1022
|
+
self.disable = false
|
|
1023
|
+
if (result.data){
|
|
1024
|
+
let taskIds = result.data.map(item => item.id).join(',');
|
|
1025
|
+
callback(true, result.data[0].processInstanceId, taskIds, auditResult, self.taskId)
|
|
735
1026
|
} else {
|
|
736
|
-
self.
|
|
737
|
-
self.disable = false
|
|
738
|
-
self.$Message.error(result.message)
|
|
739
|
-
setTimeout(() => {
|
|
740
|
-
callback(false, null, null, auditResult, self.taskId);
|
|
741
|
-
}, 1000)
|
|
1027
|
+
callback(true, null, null, auditResult, self.taskId)
|
|
742
1028
|
}
|
|
743
|
-
|
|
744
|
-
})
|
|
745
|
-
|
|
746
|
-
|
|
1029
|
+
self.$Message.success(result.message ? result.message : '审批成功');
|
|
1030
|
+
} else if (result.code == '20002') {
|
|
1031
|
+
// 流程结束
|
|
1032
|
+
self.loading = false
|
|
1033
|
+
self.disable = false
|
|
1034
|
+
callback(true, '流程已结束', '流程已结束', auditResult, self.taskId)
|
|
1035
|
+
self.$Message.success(result.message)
|
|
1036
|
+
} else {
|
|
1037
|
+
self.loading = false
|
|
1038
|
+
self.disable = false
|
|
1039
|
+
callback(false, null, null, auditResult, self.taskId)
|
|
1040
|
+
self.$Message.error(result.message ? result.message : '审批失败')
|
|
1041
|
+
}
|
|
1042
|
+
bus.$emit('triggerTimer')
|
|
1043
|
+
})
|
|
747
1044
|
},
|
|
748
1045
|
|
|
749
1046
|
doSearch() {
|
|
@@ -752,11 +1049,6 @@ export default {
|
|
|
752
1049
|
tabsChange(tab) {
|
|
753
1050
|
console.log(tab)
|
|
754
1051
|
},
|
|
755
|
-
audit: function (auditResult) {
|
|
756
|
-
let self = this
|
|
757
|
-
self.auditResult = auditResult
|
|
758
|
-
self.submit()
|
|
759
|
-
},
|
|
760
1052
|
getAttach(row) {
|
|
761
1053
|
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
762
1054
|
},
|
|
@@ -798,35 +1090,6 @@ export default {
|
|
|
798
1090
|
this.imageUrl = url;
|
|
799
1091
|
this.modalVisible = true;
|
|
800
1092
|
},
|
|
801
|
-
submit() {
|
|
802
|
-
let self = this;
|
|
803
|
-
|
|
804
|
-
self.auditParams = {
|
|
805
|
-
procId: self.procId,
|
|
806
|
-
applyId: self.applyId,
|
|
807
|
-
taskId: self.taskId,
|
|
808
|
-
auditOpinion: self.form.auditOpinion,
|
|
809
|
-
fileListStr: JSON.stringify(self.fileList),
|
|
810
|
-
auditResult: self.auditResult,
|
|
811
|
-
params: JSON.stringify(self.datas),
|
|
812
|
-
targetTaskNode: self.targetTaskNode,
|
|
813
|
-
selectedUserId: self.selectedUserId,
|
|
814
|
-
}
|
|
815
|
-
if (self.auditResult == '' || self.auditResult == null) {
|
|
816
|
-
self.$Message.error("请选择审批结果!");
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
if (self.form.auditOpinion == '' || self.form.auditOpinion == null) {
|
|
820
|
-
if (!self.handleButtons || self.handleButtons.includes('auditOpinion')) {
|
|
821
|
-
self.$Message.error("请输入审批意见!")
|
|
822
|
-
return;
|
|
823
|
-
} else {
|
|
824
|
-
self.auditParams.auditOpinion = self.handleButtonsNames[self.auditResult];
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
self.businessFormSave ? self.businessFormSave(self.handleSaveResult) : self.handleSaveResult(true)
|
|
829
|
-
},
|
|
830
1093
|
|
|
831
1094
|
//打印流程图信息
|
|
832
1095
|
processPrint() {
|
|
@@ -852,26 +1115,6 @@ export default {
|
|
|
852
1115
|
})
|
|
853
1116
|
},
|
|
854
1117
|
|
|
855
|
-
getHisAudit() {
|
|
856
|
-
let self = this
|
|
857
|
-
let params = {
|
|
858
|
-
applyId: self.applyId,
|
|
859
|
-
instanceId: self.instanceId,
|
|
860
|
-
procId: self.procId,
|
|
861
|
-
taskId: self.taskId
|
|
862
|
-
}
|
|
863
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getHisAudit', {params: params}).then(function (resp) {
|
|
864
|
-
if (resp.data.code === '200') {
|
|
865
|
-
self.hisAudit = resp.data.data
|
|
866
|
-
let uniqueDataMap = {};
|
|
867
|
-
self.hisAudit.forEach((item) => {
|
|
868
|
-
uniqueDataMap[item["taskNode"]] = item;
|
|
869
|
-
})
|
|
870
|
-
self.hisNode = Object.values(uniqueDataMap);
|
|
871
|
-
|
|
872
|
-
}
|
|
873
|
-
})
|
|
874
|
-
},
|
|
875
1118
|
showTaskNode(taskId) {
|
|
876
1119
|
if (this.processHistory.length > 0) {
|
|
877
1120
|
let task = null
|
|
@@ -883,20 +1126,6 @@ export default {
|
|
|
883
1126
|
}
|
|
884
1127
|
return ''
|
|
885
1128
|
},
|
|
886
|
-
getProcessHistory() {
|
|
887
|
-
let self = this
|
|
888
|
-
let params = {
|
|
889
|
-
applyId: self.applyId,
|
|
890
|
-
instanceId: self.instanceId,
|
|
891
|
-
procId: self.procId,
|
|
892
|
-
taskId: self.taskId
|
|
893
|
-
}
|
|
894
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessHis', {params: params}).then(function (resp) {
|
|
895
|
-
if (resp.data.code === '200') {
|
|
896
|
-
self.processHistory = resp.data.data
|
|
897
|
-
}
|
|
898
|
-
})
|
|
899
|
-
},
|
|
900
1129
|
cancel() {
|
|
901
1130
|
this.modal = false
|
|
902
1131
|
this.auditResult = '';
|
|
@@ -965,10 +1194,10 @@ export default {
|
|
|
965
1194
|
}
|
|
966
1195
|
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getAllPreNodes', {params: params}).then(function (resp) {
|
|
967
1196
|
if (resp.data.code === '200') {
|
|
968
|
-
if (resp.data.data.length > 0){
|
|
1197
|
+
if (resp.data.data.length > 0) {
|
|
969
1198
|
self.allNode = resp.data.data
|
|
970
1199
|
self.modal1 = true
|
|
971
|
-
}else {
|
|
1200
|
+
} else {
|
|
972
1201
|
self.$Message.warning('当前流程无前序节点')
|
|
973
1202
|
}
|
|
974
1203
|
} else {
|
|
@@ -984,10 +1213,10 @@ export default {
|
|
|
984
1213
|
}
|
|
985
1214
|
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getNodesBehind', {params: params}).then(function (resp) {
|
|
986
1215
|
if (resp.data.code === '200') {
|
|
987
|
-
if (resp.data.data.length > 0){
|
|
1216
|
+
if (resp.data.data.length > 0) {
|
|
988
1217
|
self.allNode = resp.data.data
|
|
989
1218
|
self.modal1 = true
|
|
990
|
-
}else {
|
|
1219
|
+
} else {
|
|
991
1220
|
self.$Message.warning('当前流程无后续节点')
|
|
992
1221
|
}
|
|
993
1222
|
} else {
|
|
@@ -1039,7 +1268,7 @@ export default {
|
|
|
1039
1268
|
el.style.transform = 'translateX(100%)';
|
|
1040
1269
|
el.addEventListener('transitionend', done);
|
|
1041
1270
|
},
|
|
1042
|
-
uploadFile(file){
|
|
1271
|
+
uploadFile(file) {
|
|
1043
1272
|
const self = this;
|
|
1044
1273
|
self.fileList = []
|
|
1045
1274
|
file.forEach(item => {
|
|
@@ -1049,6 +1278,94 @@ export default {
|
|
|
1049
1278
|
});
|
|
1050
1279
|
})
|
|
1051
1280
|
},
|
|
1281
|
+
|
|
1282
|
+
appointOk() {
|
|
1283
|
+
const self = this
|
|
1284
|
+
let oldSettings
|
|
1285
|
+
let params = this.nextNodesFormList.reduce((acc, item) => {
|
|
1286
|
+
acc[item.id] = {
|
|
1287
|
+
assignee: item.assignee,
|
|
1288
|
+
candidateGroup: item.candidateGroups,
|
|
1289
|
+
needUpdate: 'false',
|
|
1290
|
+
}
|
|
1291
|
+
let timeLimit = 'expireTime:' + item.remainDay + "D" + item.remainTime + "H" + ";warningTime:" + item.inAdvanceDay + "D" + item.inAdvanceTime + "H;" + "handleType:" + item.processing;
|
|
1292
|
+
if (!(item.remainDay === 0 && item.remainTime === 0 && item.inAdvanceDay === 0 && item.inAdvanceTime === 0)){
|
|
1293
|
+
acc[item.id].timeLimit = timeLimit
|
|
1294
|
+
}
|
|
1295
|
+
oldSettings = self.nextNodesOldSettings.filter(oldSetting => oldSetting.id === item.id)[0]
|
|
1296
|
+
if (oldSettings.assignee !== item.assignee || self.checkGroupsUpdate(oldSettings.candidates, item.candidateGroups) || self.checkTimeLimitUpdate(oldSettings.timeLimit, timeLimit)) {
|
|
1297
|
+
acc[item.id].needUpdate = 'true'
|
|
1298
|
+
}
|
|
1299
|
+
return acc;
|
|
1300
|
+
}, {});
|
|
1301
|
+
self.auditParams.nodeConfigMaps = JSON.stringify(params)
|
|
1302
|
+
self.doPass((execResult, instanceId, taskIds, auditResult, curTaskId) => {
|
|
1303
|
+
if (this.executionCompleted) {
|
|
1304
|
+
this.executionCompleted(execResult, instanceId, taskIds, auditResult, curTaskId);
|
|
1305
|
+
}
|
|
1306
|
+
})
|
|
1307
|
+
},
|
|
1308
|
+
checkGroupsUpdate(oldSetting, newSetting) {
|
|
1309
|
+
if (oldSetting && newSetting) {
|
|
1310
|
+
let oldIdList = []
|
|
1311
|
+
for (let [key, value] of Object.entries(oldSetting)) {
|
|
1312
|
+
if (value) {
|
|
1313
|
+
value.split(',').forEach(part => {
|
|
1314
|
+
const [id] = part.split(':');
|
|
1315
|
+
if (id) {
|
|
1316
|
+
oldIdList.push(id);
|
|
1317
|
+
}
|
|
1318
|
+
})
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
const regex = /(?:O:|U:|P:|R:)([^,]+)/g;
|
|
1322
|
+
let match;
|
|
1323
|
+
const newIds = [];
|
|
1324
|
+
while ((match = regex.exec(newSetting)) !== null) {
|
|
1325
|
+
newIds.push(...match[1].split(';'))
|
|
1326
|
+
}
|
|
1327
|
+
const allInString = oldIdList.every(item => newIds.includes(item));
|
|
1328
|
+
const hasExtra = newIds.some(item => !oldIdList.includes(item));
|
|
1329
|
+
return !allInString || hasExtra
|
|
1330
|
+
}
|
|
1331
|
+
return false
|
|
1332
|
+
},
|
|
1333
|
+
checkTimeLimitUpdate(oldSetting, newSetting){
|
|
1334
|
+
if (oldSetting && newSetting){
|
|
1335
|
+
return oldSetting !== newSetting
|
|
1336
|
+
}
|
|
1337
|
+
if (!oldSetting){
|
|
1338
|
+
return newSetting !== 'expireTime:0D0H;warningTime:0D0H;handleType:00'
|
|
1339
|
+
}
|
|
1340
|
+
return false
|
|
1341
|
+
},
|
|
1342
|
+
readingRangeClick(item) {
|
|
1343
|
+
this.$refs.assigneeHelpBox.toggleShowHelpBox(this.organTreeType, this.permScope, 'transferNextTask', item.id)
|
|
1344
|
+
},
|
|
1345
|
+
candidateGroupsReadingRangeClick(item) {
|
|
1346
|
+
this.$refs.candidateGroupsHelpBox.toggleShowHelpBox(this.permScope, item.candidates, this.organTreeType, item.id);
|
|
1347
|
+
},
|
|
1348
|
+
updateCandGroups(newCandGroups, nameStr, detail, nodeId){
|
|
1349
|
+
let oldSettings = this.nextNodesOldSettings.filter(item => item.id === nodeId)[0]
|
|
1350
|
+
if (JSON.stringify(oldSettings.candidates) != JSON.stringify(detail)) {
|
|
1351
|
+
let node = this.nextNodesFormList.filter(item => item.id === nodeId)[0]
|
|
1352
|
+
node.candidateGroups = newCandGroups
|
|
1353
|
+
node.candidateNames = nameStr
|
|
1354
|
+
node.candidates = detail
|
|
1355
|
+
node.needUpdate = true
|
|
1356
|
+
this.$forceUpdate();
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
updateNextNodeAssignee(selectedAssigneeId, selectedAssigneeName, nodeId){
|
|
1360
|
+
let oldSettings = this.nextNodesOldSettings.filter(item => item.id === nodeId)[0]
|
|
1361
|
+
if (oldSettings.assignee != selectedAssigneeId) {
|
|
1362
|
+
let node = this.nextNodesFormList.filter(item => item.id === nodeId)[0]
|
|
1363
|
+
node.assignee = selectedAssigneeId
|
|
1364
|
+
node.assigneeName = selectedAssigneeName
|
|
1365
|
+
node.needUpdate = true
|
|
1366
|
+
this.$forceUpdate();
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1052
1369
|
},
|
|
1053
1370
|
watch: {
|
|
1054
1371
|
auditOpinionText(label) {
|
|
@@ -1064,14 +1381,17 @@ export default {
|
|
|
1064
1381
|
|
|
1065
1382
|
<style lang="less" scoped>
|
|
1066
1383
|
@import "./styles/css/index.less";
|
|
1384
|
+
|
|
1067
1385
|
/deep/ .ivu-table-row-highlight td {
|
|
1068
1386
|
background-color: #50c1ff !important;
|
|
1069
1387
|
color: #fff !important;
|
|
1070
1388
|
}
|
|
1071
|
-
|
|
1389
|
+
|
|
1390
|
+
/deep/ .ivu-card-body {
|
|
1072
1391
|
padding: 10px;
|
|
1073
1392
|
}
|
|
1074
|
-
|
|
1393
|
+
|
|
1394
|
+
.page-info /deep/ .page-body {
|
|
1075
1395
|
overflow-y: hidden;
|
|
1076
1396
|
}
|
|
1077
1397
|
</style>
|