@lambo-design/workflow-approve 1.0.0-beta.94 → 1.0.0-beta.96
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 +3 -3
- package/src/components/history.vue +5 -1
- 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/process-info.vue +6 -1
- package/src/components/title.vue +24 -24
- package/src/horizontal.vue +1002 -1002
- package/src/portrait.vue +18 -4
package/src/horizontal.vue
CHANGED
|
@@ -1,1002 +1,1002 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="margin-bottom: -10px">
|
|
3
|
-
<lamboIndicatorCard class="lamboIndicatorCard" :has-title="false" :hasExtend="false">
|
|
4
|
-
<Tabs name="auditInfo" v-model="custChange" @on-click="tabsChange">
|
|
5
|
-
<TabPane label="流程处理" :name="auditInfo" >
|
|
6
|
-
<a @click="historyShow = !historyShow">
|
|
7
|
-
<Title v-if="!handleButtons || handleButtons.includes('auditHistory')">
|
|
8
|
-
<a style="color: #989898">
|
|
9
|
-
<Icon v-if="historyShow" type="ios-arrow-down"/>
|
|
10
|
-
<Icon v-if="!historyShow" type="ios-arrow-up"/>
|
|
11
|
-
处理历史
|
|
12
|
-
</a>
|
|
13
|
-
</Title>
|
|
14
|
-
</a>
|
|
15
|
-
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
16
|
-
<div class="box" v-show="historyShow">
|
|
17
|
-
<Card class="process-history" dis-hover :bordered="false"
|
|
18
|
-
v-if="!handleButtons || handleButtons.includes('auditHistory')">
|
|
19
|
-
<processHistory :list="processHistory" :smart-flow-server-context="smartFlowServerContext"></processHistory>
|
|
20
|
-
</Card>
|
|
21
|
-
</div>
|
|
22
|
-
</transition>
|
|
23
|
-
|
|
24
|
-
<a @click="attachListShow = !attachListShow">
|
|
25
|
-
<Title v-if="!handleButtons || handleButtons.includes('attachmentFile')">
|
|
26
|
-
<a style="color: #989898">
|
|
27
|
-
<Icon v-if="attachListShow" type="ios-arrow-down"/>
|
|
28
|
-
<Icon v-if="!attachListShow" type="ios-arrow-up"/>
|
|
29
|
-
查看附件
|
|
30
|
-
</a>
|
|
31
|
-
</Title>
|
|
32
|
-
</a>
|
|
33
|
-
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
34
|
-
<div class="box" v-show="(!handleButtons || handleButtons.includes('attachmentFile')) && attachListShow" style="margin: 15px 20px 20px 100px">
|
|
35
|
-
<LamboPagingTable :requestSuccessCodes="requestSuccessCodes" :pageDisable="true" ref="table" :dataUrl="dataUrl" :columns="tableColumn"></LamboPagingTable>
|
|
36
|
-
<Modal title="查看附件" v-model="modalVisible" fullscreen scrollable :mask="false">
|
|
37
|
-
<img :src="imageUrl" v-if="modalVisible" alt="" style="width: 100%">
|
|
38
|
-
<div slot="footer">
|
|
39
|
-
<Button type="primary" @click="modalVisible = false">关闭</Button>
|
|
40
|
-
</div>
|
|
41
|
-
</Modal>
|
|
42
|
-
<Modal title="查看附件" v-model="modalDocx" fullscreen scrollable :mask="false">
|
|
43
|
-
<div ref="file" ></div>
|
|
44
|
-
</Modal>
|
|
45
|
-
</div>
|
|
46
|
-
</transition>
|
|
47
|
-
<Modal v-model="modal1" title="选择节点"
|
|
48
|
-
@on-cancel="cancel"
|
|
49
|
-
@on-ok="ok">
|
|
50
|
-
<Table border
|
|
51
|
-
:data="allNode"
|
|
52
|
-
:columns="nodeColumn"
|
|
53
|
-
highlight-row
|
|
54
|
-
@on-current-change="selectNode">
|
|
55
|
-
</Table>
|
|
56
|
-
</Modal>
|
|
57
|
-
<assigneeBox ref="assigneeHelpBox" :executionCompleted="executionCompleted" @update-selected="handleSelectedUser"
|
|
58
|
-
:data="assigneeBoxData" :smart-flow-server-context="smartFlowServerContext" :upms-server-context="upmsServerContext"/>
|
|
59
|
-
|
|
60
|
-
</TabPane>
|
|
61
|
-
<TabPane label="流程跟踪图" :name="auditProcess" v-if="!handleButtons || handleButtons.includes('processTrace')">
|
|
62
|
-
<div>
|
|
63
|
-
<Workflow_Diagram ref="processTrace" :instanceId="process.instanceId" :applyId="process.applyId"
|
|
64
|
-
:procId="process.procId"
|
|
65
|
-
:tableData="process.tableData" :hisAudit="hisAudit"
|
|
66
|
-
:smart-flow-server-context="smartFlowServerContext">
|
|
67
|
-
</Workflow_Diagram>
|
|
68
|
-
</div>
|
|
69
|
-
</TabPane>
|
|
70
|
-
</Tabs>
|
|
71
|
-
</lamboIndicatorCard>
|
|
72
|
-
<div class="sticky" v-if="custChange.includes('auditInfo')">
|
|
73
|
-
<lamboIndicatorCard :has-title="false" :hasExtend="false">
|
|
74
|
-
<a @click="auditShow = !auditShow">
|
|
75
|
-
<Title v-if="!handleButtons || handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile')">
|
|
76
|
-
<a style="color: #989898">
|
|
77
|
-
<Icon v-if="auditShow" type="ios-arrow-down"/>
|
|
78
|
-
<Icon v-if="!auditShow" type="ios-arrow-up"/>
|
|
79
|
-
我的审批
|
|
80
|
-
</a>
|
|
81
|
-
</Title>
|
|
82
|
-
</a>
|
|
83
|
-
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
84
|
-
<div class="box horizontal-audit" v-show="auditShow">
|
|
85
|
-
<Form ref="auditOpinion" justify="center"
|
|
86
|
-
v-if="!handleButtons || handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile')"
|
|
87
|
-
style=" margin-top: 15px;margin-left: 100px;margin-right: 100px" :rules="ruleValidate">
|
|
88
|
-
<Row>
|
|
89
|
-
<Col span="24" offset="0">
|
|
90
|
-
<FormItem :label-width="120" label="处理意见:" prop="auditOpinion"
|
|
91
|
-
v-if="!handleButtons || handleButtons.includes('auditOpinion')">
|
|
92
|
-
<AuditOpinion v-model="auditOpinion" :smart-flow-server-context="smartFlowServerContext"></AuditOpinion>
|
|
93
|
-
</FormItem>
|
|
94
|
-
<UploadFile style="margin-left: 120px" v-if="!handleButtons || handleButtons.includes('attachmentFile')"
|
|
95
|
-
@upload-result="uploadFile" :multiple="true"
|
|
96
|
-
:oss-server-context="smartFlowServerContext" :oss-file-put-url="ossFilePutUrl"></UploadFile>
|
|
97
|
-
</Col>
|
|
98
|
-
</Row>
|
|
99
|
-
</Form>
|
|
100
|
-
<Divider/>
|
|
101
|
-
<Row type="flex" justify="center" style="margin-top: 10px;margin-bottom: 10px;">
|
|
102
|
-
<Button style="margin-left: 10px;" v-if="isShowSave && businessFormSave" @click="saveBusinessForm">保存</Button>
|
|
103
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo30')"
|
|
104
|
-
:disabled="disable" :loading="loading" @click="audit('30')">通过
|
|
105
|
-
</Button>
|
|
106
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo70')"
|
|
107
|
-
:disabled="disable" :loading="loading" @click="audit('70')">驳回到原点
|
|
108
|
-
</Button>
|
|
109
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo40')"
|
|
110
|
-
:disabled="disable" :loading="loading" @click="audit('40')">驳回到上一级
|
|
111
|
-
</Button>
|
|
112
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo90')"
|
|
113
|
-
:disabled="disable" :loading="loading" @click="audit('90')">驳回指定节点
|
|
114
|
-
</Button>
|
|
115
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo80')"
|
|
116
|
-
:disabled="disable" :loading="loading" @click="audit('80')">跳转指定节点
|
|
117
|
-
</Button>
|
|
118
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo82')"
|
|
119
|
-
:disabled="disable" :loading="loading" @click="audit('82')">指定他人处理
|
|
120
|
-
</Button>
|
|
121
|
-
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo50')"
|
|
122
|
-
:disabled="disable" :loading="loading" @click="audit('50')">直接结束流程
|
|
123
|
-
</Button>
|
|
124
|
-
<Button style="margin-left: 10px;" v-if="isShowReturn"
|
|
125
|
-
:disabled="disable" :loading="loading" @click="pageGoBack()">返回
|
|
126
|
-
</Button>
|
|
127
|
-
</Row>
|
|
128
|
-
</div>
|
|
129
|
-
</transition>
|
|
130
|
-
</lamboIndicatorCard>
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
</div>
|
|
134
|
-
</template>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<script>
|
|
138
|
-
import LamboPageContainer from '@lambo-design/page-container'
|
|
139
|
-
import LamboIndicatorCard from '@lambo-design/indicator-card'
|
|
140
|
-
import Attachment from './components/horizontal/attachment';
|
|
141
|
-
import Workflow_Diagram from './workflow-diagram'
|
|
142
|
-
import ajax from "@lambo-design/shared/utils/ajax";
|
|
143
|
-
import { operateBtn } from '@lambo-design/shared/utils/assist';
|
|
144
|
-
import bus from '@lambo-design/shared/utils/bus';
|
|
145
|
-
import Title from "./components/title";
|
|
146
|
-
import processHistory from "./components/horizontal/history";
|
|
147
|
-
import assigneeBox from "./components/assignee-box";
|
|
148
|
-
import LamboPagingTable from "@lambo-design/paging-table";
|
|
149
|
-
import axios from "axios";
|
|
150
|
-
import AuditOpinion from "./components/horizontal/opinion";
|
|
151
|
-
import UploadFile from "@lambo-design/upload-file";
|
|
152
|
-
|
|
153
|
-
// 引入docx-preview插件
|
|
154
|
-
let docx = require('docx-preview');
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
export default {
|
|
158
|
-
props: {
|
|
159
|
-
procId: {
|
|
160
|
-
type: String,
|
|
161
|
-
required: true,
|
|
162
|
-
},
|
|
163
|
-
taskNode: {
|
|
164
|
-
type: String,
|
|
165
|
-
required: true,
|
|
166
|
-
},
|
|
167
|
-
applyId: {
|
|
168
|
-
type: String,
|
|
169
|
-
required: true,
|
|
170
|
-
},
|
|
171
|
-
isShowSave: {
|
|
172
|
-
type: Boolean,
|
|
173
|
-
required: false,
|
|
174
|
-
default: false
|
|
175
|
-
},
|
|
176
|
-
isShowReturn: {
|
|
177
|
-
type: Boolean,
|
|
178
|
-
required: false,
|
|
179
|
-
default: false
|
|
180
|
-
},
|
|
181
|
-
//业务表单保存方法
|
|
182
|
-
businessFormSave: {
|
|
183
|
-
type: Function,
|
|
184
|
-
required: false
|
|
185
|
-
},
|
|
186
|
-
//按钮执行完毕回调方法
|
|
187
|
-
executionCompleted: {
|
|
188
|
-
type: Function,
|
|
189
|
-
required: false,
|
|
190
|
-
},
|
|
191
|
-
smartFlowServerContext: {
|
|
192
|
-
type: String,
|
|
193
|
-
default: '/api/smart-flow-server',
|
|
194
|
-
},
|
|
195
|
-
upmsServerContext: {
|
|
196
|
-
type: String,
|
|
197
|
-
default: '/api/upms-server',
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
components: {
|
|
201
|
-
Title,
|
|
202
|
-
LamboPageContainer,
|
|
203
|
-
Workflow_Diagram,
|
|
204
|
-
Attachment,
|
|
205
|
-
processHistory,
|
|
206
|
-
assigneeBox,
|
|
207
|
-
LamboPagingTable,
|
|
208
|
-
AuditOpinion,
|
|
209
|
-
LamboIndicatorCard,
|
|
210
|
-
UploadFile
|
|
211
|
-
},
|
|
212
|
-
data() {
|
|
213
|
-
return {
|
|
214
|
-
dataUrl: this.smartFlowServerContext + '/manage/processDone/getAttachmentList?procId='+this.procId + '&applyId=' + this.applyId,
|
|
215
|
-
requestSuccessCodes: [200, "200"],
|
|
216
|
-
auditShow: false,
|
|
217
|
-
historyShow: true,
|
|
218
|
-
attachListShow: false,
|
|
219
|
-
tableData: [],
|
|
220
|
-
modalVisible: false,
|
|
221
|
-
modalDocx:false,
|
|
222
|
-
imageUrl: '',
|
|
223
|
-
assigneeBoxData: {},
|
|
224
|
-
selectedUserId: '',
|
|
225
|
-
targetTaskNode: '',
|
|
226
|
-
allNode: [],
|
|
227
|
-
auditParams: {},
|
|
228
|
-
modal1: false,
|
|
229
|
-
hisNode: [],
|
|
230
|
-
processHistory: [],
|
|
231
|
-
ruleValidate: {
|
|
232
|
-
auditOpinion: [{required: true, trigger: "blur", message: "审批意见不能为空", type: "String"}]
|
|
233
|
-
},
|
|
234
|
-
auditOpinion: '',
|
|
235
|
-
loading: false,
|
|
236
|
-
disable: false,
|
|
237
|
-
instanceId: '',
|
|
238
|
-
taskId: '',
|
|
239
|
-
handleButtons: [],
|
|
240
|
-
auditResult: '',
|
|
241
|
-
custChange: 'auditInfo',
|
|
242
|
-
auditInfo:"auditInfo",
|
|
243
|
-
auditProcess:"auditProcess",
|
|
244
|
-
fileList: [],
|
|
245
|
-
ossFilePutUrl: '/manage/oss/file/put',
|
|
246
|
-
hisAudit: [],
|
|
247
|
-
datas: {
|
|
248
|
-
orgName: "",
|
|
249
|
-
orgId: ""
|
|
250
|
-
},
|
|
251
|
-
editForm: {
|
|
252
|
-
approvalCost: '',
|
|
253
|
-
cost: '',
|
|
254
|
-
activityDate: []
|
|
255
|
-
},
|
|
256
|
-
process: {
|
|
257
|
-
tableData: [],
|
|
258
|
-
instanceId: '',
|
|
259
|
-
applyId: '',
|
|
260
|
-
procId: ''
|
|
261
|
-
},
|
|
262
|
-
handleButtonsNames: {
|
|
263
|
-
'30': '同意',
|
|
264
|
-
'70': '驳回原点',
|
|
265
|
-
'40': '驳回上一节点',
|
|
266
|
-
'90': '驳回指定节点',
|
|
267
|
-
'80': '跳转指定节点',
|
|
268
|
-
'82': '转办',
|
|
269
|
-
'50': '人工终止'
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
mounted() {
|
|
276
|
-
if (this.procId){
|
|
277
|
-
this.initData()
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
},
|
|
281
|
-
computed: {
|
|
282
|
-
title: function () {
|
|
283
|
-
return this.$route.query.procName;
|
|
284
|
-
},
|
|
285
|
-
nodeColumn: function () {
|
|
286
|
-
let column = []
|
|
287
|
-
column.push({title: '序号', type: 'index', width: 70, align: 'center', fixed: 'left'});
|
|
288
|
-
column.push({title: '节点名称', key: 'taskName', minWidth: 150, align: 'center', fixed: 'left'})
|
|
289
|
-
|
|
290
|
-
column.push({
|
|
291
|
-
title: '节点状态', key: 'auditResult', minWidth: 150, align: 'center', fixed: 'left',
|
|
292
|
-
render: (h, params) => {
|
|
293
|
-
if (params.row.taskNode == this.taskNode) {
|
|
294
|
-
return h('div', [
|
|
295
|
-
h('tag', {
|
|
296
|
-
props: {
|
|
297
|
-
color: '#ff9900'
|
|
298
|
-
}
|
|
299
|
-
}, '当前节点')
|
|
300
|
-
])
|
|
301
|
-
} else if (!params.row.auditResult) {
|
|
302
|
-
return h('div', [
|
|
303
|
-
h('tag', {
|
|
304
|
-
props: {
|
|
305
|
-
color: '#ff9900'
|
|
306
|
-
}
|
|
307
|
-
}, '未审批')
|
|
308
|
-
])
|
|
309
|
-
} else {
|
|
310
|
-
if (params.row.auditResult == '30' && params.row.taskNode != this.taskNode) {
|
|
311
|
-
return h('div', [
|
|
312
|
-
h('tag', {
|
|
313
|
-
props: {
|
|
314
|
-
color: '#19be6b'
|
|
315
|
-
}
|
|
316
|
-
}, '已审批通过')
|
|
317
|
-
])
|
|
318
|
-
} else if (params.row.auditResult == '40' && params.row.taskNode != this.taskNode) {
|
|
319
|
-
return h('div', [
|
|
320
|
-
h('tag', {
|
|
321
|
-
props: {
|
|
322
|
-
color: '#ed4014'
|
|
323
|
-
}
|
|
324
|
-
}, '已驳回到上一节点')
|
|
325
|
-
])
|
|
326
|
-
} else if (params.row.auditResult == '60' && params.row.taskNode != this.taskNode) {
|
|
327
|
-
return h('div', [
|
|
328
|
-
h('tag', {
|
|
329
|
-
props: {
|
|
330
|
-
color: '#ed4014'
|
|
331
|
-
}
|
|
332
|
-
}, '已撤回')
|
|
333
|
-
])
|
|
334
|
-
} else if (params.row.auditResult == '80' && params.row.taskNode != this.taskNode) {
|
|
335
|
-
return h('div', [
|
|
336
|
-
h('tag', {
|
|
337
|
-
props: {
|
|
338
|
-
color: '#19be6b'
|
|
339
|
-
}
|
|
340
|
-
}, '已跳转到指定节点')
|
|
341
|
-
])
|
|
342
|
-
} else if (params.row.auditResult == '90' && params.row.taskNode != this.taskNode) {
|
|
343
|
-
return h('div', [
|
|
344
|
-
h('tag', {
|
|
345
|
-
props: {
|
|
346
|
-
color: '#19be6b'
|
|
347
|
-
}
|
|
348
|
-
}, '已驳回到指定节点')
|
|
349
|
-
])
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
})
|
|
354
|
-
column.push({
|
|
355
|
-
title: "操作", width: 100, align: 'center',
|
|
356
|
-
render: (h, params) => {
|
|
357
|
-
return h('div', [
|
|
358
|
-
h('Button', {
|
|
359
|
-
props: {
|
|
360
|
-
type: 'primary',
|
|
361
|
-
size: 'small'
|
|
362
|
-
},
|
|
363
|
-
style: {
|
|
364
|
-
marginRight: '5px'
|
|
365
|
-
},
|
|
366
|
-
on: {
|
|
367
|
-
click: () => {
|
|
368
|
-
this.selectNode(params.row)
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}, '选择')
|
|
372
|
-
])
|
|
373
|
-
},
|
|
374
|
-
})
|
|
375
|
-
return column
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
tableColumn() {
|
|
379
|
-
let column = [];
|
|
380
|
-
let self = this;
|
|
381
|
-
column.push({
|
|
382
|
-
title: '序号',
|
|
383
|
-
type: 'index',
|
|
384
|
-
width: 70,
|
|
385
|
-
align: 'center',
|
|
386
|
-
});
|
|
387
|
-
column.push({
|
|
388
|
-
title: '附件名称', key: 'fileName', minWidth: 150, align: 'center',
|
|
389
|
-
render(h, {row}) {
|
|
390
|
-
const index= row.fileName.lastIndexOf(".");
|
|
391
|
-
const fileName=row.fileName.substr(0,index)
|
|
392
|
-
return h("span",fileName)
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
column.push({
|
|
397
|
-
title: '附件类型', width: 100, align: 'center',
|
|
398
|
-
render:(h,{row})=>{
|
|
399
|
-
const index= row.fileName.lastIndexOf(".");
|
|
400
|
-
const fileType=row.fileName.substr(index+1)
|
|
401
|
-
return h("span",fileType)
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
column.push({
|
|
406
|
-
title: "上传人姓名",
|
|
407
|
-
key: "uploadUserName",
|
|
408
|
-
width: 170,
|
|
409
|
-
align: "center",
|
|
410
|
-
});
|
|
411
|
-
|
|
412
|
-
column.push({
|
|
413
|
-
title: "节点名称",
|
|
414
|
-
key: "taskName",
|
|
415
|
-
width: 170,
|
|
416
|
-
align: "center",
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
column.push({
|
|
420
|
-
title: "上传时间",
|
|
421
|
-
key: "updTime",
|
|
422
|
-
width: 170,
|
|
423
|
-
align: "center",
|
|
424
|
-
render: (v, param) => {
|
|
425
|
-
if (param.row.updTime){
|
|
426
|
-
let date = new Date(param.row.updTime)
|
|
427
|
-
let y = date.getFullYear() // 年
|
|
428
|
-
let MM = date.getMonth() + 1 // 月
|
|
429
|
-
MM = MM < 10 ? ('0' + MM) : MM
|
|
430
|
-
let d = date.getDate() // 日
|
|
431
|
-
d = d < 10 ? ('0' + d) : d
|
|
432
|
-
let h = date.getHours() // 时
|
|
433
|
-
h = h < 10 ? ('0' + h) : h
|
|
434
|
-
let m = date.getMinutes()// 分
|
|
435
|
-
m = m < 10 ? ('0' + m) : m
|
|
436
|
-
let s = date.getSeconds()// 秒
|
|
437
|
-
s = s < 10 ? ('0' + s) : s
|
|
438
|
-
let state =y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
|
|
439
|
-
return v("span", state);
|
|
440
|
-
}
|
|
441
|
-
return v("span", '')
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
|
|
445
|
-
column.push({
|
|
446
|
-
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
447
|
-
render: (h, {row}) => {
|
|
448
|
-
const index= row.fileName.lastIndexOf(".");
|
|
449
|
-
const fileType=row.fileName.substr(index+1).toLowerCase()
|
|
450
|
-
// const typeList=['jpg','pdf','gif','png','docx']
|
|
451
|
-
//由于pdf预览显示乱码 暂时不提供pdf预览功能
|
|
452
|
-
const typeList=['jpg','gif','png','docx']
|
|
453
|
-
if (typeList.indexOf(fileType)!==-1){
|
|
454
|
-
return h("div", [
|
|
455
|
-
operateBtn(this, h, row, "下载", () => {
|
|
456
|
-
this.getAttach(row);
|
|
457
|
-
}, "primary"),
|
|
458
|
-
operateBtn(this, h, row, "预览", () => {
|
|
459
|
-
this.preViewAttach(row);
|
|
460
|
-
}, "primary")
|
|
461
|
-
]);
|
|
462
|
-
}else {
|
|
463
|
-
return h("div", [
|
|
464
|
-
operateBtn(this, h, row, "下载", () => {
|
|
465
|
-
this.getAttach(row);
|
|
466
|
-
}, "primary")
|
|
467
|
-
]);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
return column;
|
|
475
|
-
},
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
},
|
|
479
|
-
provide() {
|
|
480
|
-
return {
|
|
481
|
-
toBeDoneListDoSearch: this.doSearch
|
|
482
|
-
};
|
|
483
|
-
},
|
|
484
|
-
methods: {
|
|
485
|
-
initData(){
|
|
486
|
-
this.getAttachList()
|
|
487
|
-
this.getTaskId()
|
|
488
|
-
this.getHandleButtons()
|
|
489
|
-
this.getHisAudit();
|
|
490
|
-
this.getProcessHistory();
|
|
491
|
-
},
|
|
492
|
-
saveBusinessForm(){
|
|
493
|
-
this.businessFormSave(()=>{})
|
|
494
|
-
},
|
|
495
|
-
getAttachList(){
|
|
496
|
-
const self = this
|
|
497
|
-
const param = {
|
|
498
|
-
procId: this.procId,
|
|
499
|
-
applyId: this.applyId
|
|
500
|
-
}
|
|
501
|
-
ajax.get(self.smartFlowServerContext + '/manage/processDone/getAttachmentList', {params: param}).then(function (resp) {
|
|
502
|
-
self.tableData = resp.data.data.rows
|
|
503
|
-
self.attachListShow = true
|
|
504
|
-
}).catch(err => {
|
|
505
|
-
console.log(err);
|
|
506
|
-
})
|
|
507
|
-
},
|
|
508
|
-
getTaskId(){
|
|
509
|
-
const self = this
|
|
510
|
-
let param = {
|
|
511
|
-
procId: this.procId,
|
|
512
|
-
applyId: this.applyId,
|
|
513
|
-
taskNode:this.taskNode
|
|
514
|
-
}
|
|
515
|
-
ajax.get(self.smartFlowServerContext + "/manage/processTodo/list", {params: param}).then(function (resp) {
|
|
516
|
-
if (resp.data.code === '200') {
|
|
517
|
-
self.taskId = resp.data.data.rows[0].taskId
|
|
518
|
-
self.instanceId = resp.data.data.rows[0].procInstanceId
|
|
519
|
-
self.processPrint()
|
|
520
|
-
}else {
|
|
521
|
-
self.$Message.error(resp.data.message)
|
|
522
|
-
}
|
|
523
|
-
}).catch((err)=>{
|
|
524
|
-
console.log(err)
|
|
525
|
-
})
|
|
526
|
-
},
|
|
527
|
-
getHandleButtons(){
|
|
528
|
-
const self = this
|
|
529
|
-
let param = {
|
|
530
|
-
procId: this.procId,
|
|
531
|
-
taskNode: this.taskNode
|
|
532
|
-
}
|
|
533
|
-
ajax.post(self.smartFlowServerContext + '/manage/approvalCenter/getNodeData', param).then(function (resp) {
|
|
534
|
-
if (resp.data.code === '200') {
|
|
535
|
-
self.handleButtons = resp.data.data[0].handleButtons
|
|
536
|
-
}else {
|
|
537
|
-
self.$Message.error(resp.data.message)
|
|
538
|
-
}
|
|
539
|
-
}).catch((err)=>{
|
|
540
|
-
console.log(err)
|
|
541
|
-
})
|
|
542
|
-
},
|
|
543
|
-
handleSaveResult(saveResult) {
|
|
544
|
-
if (saveResult) {
|
|
545
|
-
this.executeButtonAction((execResult, instanceId, taskId) => {
|
|
546
|
-
if (this.executionCompleted) {
|
|
547
|
-
this.executionCompleted(execResult, instanceId, taskId);
|
|
548
|
-
}
|
|
549
|
-
});
|
|
550
|
-
} else {
|
|
551
|
-
console.error('保存失败');
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
executeButtonAction(callback) {
|
|
555
|
-
const self = this;
|
|
556
|
-
if (self.auditResult == '82') {
|
|
557
|
-
self.assigneeBoxData = self.auditParams
|
|
558
|
-
self.$refs.assigneeHelpBox.toggleShowHelpBox();
|
|
559
|
-
} else if (self.auditResult == '80') {
|
|
560
|
-
self.getNodesBehind()
|
|
561
|
-
} else if (self.auditResult == '90') {
|
|
562
|
-
self.getAllPreNodes()
|
|
563
|
-
} else if (self.auditResult == '40') {
|
|
564
|
-
self.loading = true
|
|
565
|
-
self.disable = true
|
|
566
|
-
let url = self.smartFlowServerContext + '/manage/processTodo/getPreNode'
|
|
567
|
-
ajax.post(url, self.auditParams).then(function (resp) {
|
|
568
|
-
let result = resp.data
|
|
569
|
-
if (result.code == '30010') {
|
|
570
|
-
self.$Modal.confirm({
|
|
571
|
-
title: "提示",
|
|
572
|
-
content: result.message,
|
|
573
|
-
onOk: () => {
|
|
574
|
-
self.auditParams.auditResult = '70'
|
|
575
|
-
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
576
|
-
ajax.post(url, self.auditParams).then(function (resp) {
|
|
577
|
-
let result = resp.data
|
|
578
|
-
if (result.code == '200') {
|
|
579
|
-
self.loading = false
|
|
580
|
-
self.disable = false
|
|
581
|
-
self.$Message.success(result.message);
|
|
582
|
-
//后端没有返回数据
|
|
583
|
-
callback(true, null, null);
|
|
584
|
-
bus.$emit('triggerTimer')
|
|
585
|
-
} else {
|
|
586
|
-
self.loading = false
|
|
587
|
-
self.disable = false
|
|
588
|
-
self.$Message.error(result.message)
|
|
589
|
-
callback(false, null, null);
|
|
590
|
-
}
|
|
591
|
-
bus.$emit('triggerTimer')
|
|
592
|
-
})
|
|
593
|
-
},
|
|
594
|
-
onCancel: () => {
|
|
595
|
-
self.loading = false
|
|
596
|
-
self.disable = false
|
|
597
|
-
}
|
|
598
|
-
})
|
|
599
|
-
} else {
|
|
600
|
-
self.loading = true
|
|
601
|
-
self.disable = true
|
|
602
|
-
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
603
|
-
ajax.post(url, self.auditParams).then(function (resp) {
|
|
604
|
-
let result = resp.data
|
|
605
|
-
if (result.code == '200') {
|
|
606
|
-
self.loading = false
|
|
607
|
-
self.disable = false
|
|
608
|
-
self.$Message.success(result.message);
|
|
609
|
-
if (result.data){
|
|
610
|
-
callback(true, result.data.processInstanceId, result.data.id)
|
|
611
|
-
}else {
|
|
612
|
-
callback(true, null, null)
|
|
613
|
-
}
|
|
614
|
-
} else {
|
|
615
|
-
self.loading = false
|
|
616
|
-
self.disable = false
|
|
617
|
-
self.$Message.error(result.message)
|
|
618
|
-
callback(false, null, null);
|
|
619
|
-
}
|
|
620
|
-
bus.$emit('triggerTimer')
|
|
621
|
-
})
|
|
622
|
-
}
|
|
623
|
-
})
|
|
624
|
-
} else {
|
|
625
|
-
self.loading = true
|
|
626
|
-
self.disable = true
|
|
627
|
-
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
628
|
-
ajax.post(url, self.auditParams).then(function (resp) {
|
|
629
|
-
let result = resp.data
|
|
630
|
-
if (result.code == '200') {
|
|
631
|
-
self.loading = false
|
|
632
|
-
self.disable = false
|
|
633
|
-
if (result.data){
|
|
634
|
-
callback(true, result.data.processInstanceId, result.data.id)
|
|
635
|
-
}else {
|
|
636
|
-
callback(true, null, null)
|
|
637
|
-
}
|
|
638
|
-
self.$Message.success(result.message);
|
|
639
|
-
} else if (result.code == '20002') {
|
|
640
|
-
// 流程结束
|
|
641
|
-
self.loading = false
|
|
642
|
-
self.disable = false
|
|
643
|
-
callback(true, null, null)
|
|
644
|
-
self.$Message.success(result.message)
|
|
645
|
-
} else {
|
|
646
|
-
self.loading = false
|
|
647
|
-
self.disable = false
|
|
648
|
-
callback(false, null, null)
|
|
649
|
-
self.$Message.error(result.message)
|
|
650
|
-
}
|
|
651
|
-
bus.$emit('triggerTimer')
|
|
652
|
-
})
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
},
|
|
656
|
-
|
|
657
|
-
doSearch() {
|
|
658
|
-
//不需要实现,是子组件assigneeBox要求使用父组件的这个方法
|
|
659
|
-
},
|
|
660
|
-
tabsChange(tab) {
|
|
661
|
-
console.log(tab)
|
|
662
|
-
},
|
|
663
|
-
audit: function (auditResult) {
|
|
664
|
-
let self = this
|
|
665
|
-
self.auditResult = auditResult
|
|
666
|
-
self.submit()
|
|
667
|
-
},
|
|
668
|
-
getAttach(row) {
|
|
669
|
-
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
670
|
-
},
|
|
671
|
-
preViewAttach(row) {
|
|
672
|
-
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
673
|
-
let regs = /\.(pdf)$/
|
|
674
|
-
if (reg.test(row.fileName)) {
|
|
675
|
-
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
676
|
-
this.imgPreview(url);
|
|
677
|
-
} else if (regs.test(row.fileName)) {
|
|
678
|
-
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
679
|
-
} else {
|
|
680
|
-
this.modalDocx = true
|
|
681
|
-
axios({
|
|
682
|
-
method: 'get',
|
|
683
|
-
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
684
|
-
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
685
|
-
}).then(({data}) => {
|
|
686
|
-
docx.renderAsync(data, this.$refs.file, null, {
|
|
687
|
-
className: "docx", //默认和文档样式类的类名/前缀
|
|
688
|
-
inWrapper: true, //启用围绕文档内容呈现包装器
|
|
689
|
-
ignoreWidth: false, //禁用页面的渲染宽度
|
|
690
|
-
ignoreHeight: false, //禁用页面的渲染高度
|
|
691
|
-
ignoreFonts: false, //禁用字体渲染
|
|
692
|
-
breakPages: true, //在分页符上启用分页
|
|
693
|
-
ignoreLastRenderedPageBreak: true, //在lastRenderedPageBreak元素上禁用分页
|
|
694
|
-
experimental: false, //启用实验功能(制表符停止计算)
|
|
695
|
-
trimXmlDeclaration: true, //如果为true,则在解析之前将从xml文档中删除xml声明
|
|
696
|
-
useBase64URL: false, //如果为true,图像、字体等将转换为base 64 URL,否则使用URL.createObjectURL
|
|
697
|
-
useMathMLPolyfill: false, //包括用于铬、边等的MathML多填充。
|
|
698
|
-
showChanges: false, //启用文档更改的实验渲染(插入/删除)
|
|
699
|
-
debug: false, //启用额外的日志记录
|
|
700
|
-
})
|
|
701
|
-
}
|
|
702
|
-
)
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
imgPreview(url) {
|
|
706
|
-
this.imageUrl = url;
|
|
707
|
-
this.modalVisible = true;
|
|
708
|
-
},
|
|
709
|
-
submit() {
|
|
710
|
-
let self = this;
|
|
711
|
-
|
|
712
|
-
self.auditParams = {
|
|
713
|
-
procId: self.procId,
|
|
714
|
-
applyId: self.applyId,
|
|
715
|
-
taskId: self.taskId,
|
|
716
|
-
auditOpinion: self.auditOpinion,
|
|
717
|
-
fileListStr: JSON.stringify(self.fileList),
|
|
718
|
-
auditResult: self.auditResult,
|
|
719
|
-
params: JSON.stringify(self.datas),
|
|
720
|
-
targetTaskNode: self.targetTaskNode,
|
|
721
|
-
selectedUserId: self.selectedUserId,
|
|
722
|
-
}
|
|
723
|
-
if (self.auditResult == '' || self.auditResult == null) {
|
|
724
|
-
self.$Message.error("请选择审批结果!");
|
|
725
|
-
return;
|
|
726
|
-
}
|
|
727
|
-
if (self.auditOpinion == '' || self.auditOpinion == null) {
|
|
728
|
-
if (!self.handleButtons || self.handleButtons.includes('auditOpinion')) {
|
|
729
|
-
self.$Message.error("请输入审批意见!")
|
|
730
|
-
return;
|
|
731
|
-
} else {
|
|
732
|
-
self.auditParams.auditOpinion = self.handleButtonsNames[self.auditResult];
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
self.businessFormSave ? self.businessFormSave(self.handleSaveResult) : self.handleSaveResult(true)
|
|
737
|
-
},
|
|
738
|
-
|
|
739
|
-
//打印流程图信息
|
|
740
|
-
processPrint() {
|
|
741
|
-
let self = this
|
|
742
|
-
let params = {
|
|
743
|
-
applyId: self.applyId,
|
|
744
|
-
instanceId: self.instanceId,
|
|
745
|
-
procId: self.procId,
|
|
746
|
-
taskId: self.taskId,
|
|
747
|
-
}
|
|
748
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getPrintData', {params: params}).then(function (resp) {
|
|
749
|
-
let result = resp.data.data
|
|
750
|
-
if (resp.data.code === '200') {
|
|
751
|
-
let tableData = result
|
|
752
|
-
self.process.tableData = tableData
|
|
753
|
-
self.process.applyId = self.applyId
|
|
754
|
-
self.process.instanceId = self.instanceId
|
|
755
|
-
self.process.procId = self.procId
|
|
756
|
-
self.datas.orgId = tableData[0].orgId
|
|
757
|
-
self.datas.orgName = tableData[0].orgName
|
|
758
|
-
}
|
|
759
|
-
})
|
|
760
|
-
},
|
|
761
|
-
|
|
762
|
-
pageGoBack() {
|
|
763
|
-
bus.$emit('triggerTimer')
|
|
764
|
-
window.history.back()
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
getHisAudit() {
|
|
768
|
-
let self = this
|
|
769
|
-
let params = {
|
|
770
|
-
applyId: self.applyId,
|
|
771
|
-
instanceId: self.instanceId,
|
|
772
|
-
procId: self.procId,
|
|
773
|
-
taskId: self.taskId
|
|
774
|
-
}
|
|
775
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getHisAudit', {params: params}).then(function (resp) {
|
|
776
|
-
if (resp.data.code === '200') {
|
|
777
|
-
self.hisAudit = resp.data.data
|
|
778
|
-
let uniqueDataMap = {};
|
|
779
|
-
self.hisAudit.forEach((item) => {
|
|
780
|
-
uniqueDataMap[item["taskNode"]] = item;
|
|
781
|
-
})
|
|
782
|
-
self.hisNode = Object.values(uniqueDataMap);
|
|
783
|
-
|
|
784
|
-
}
|
|
785
|
-
})
|
|
786
|
-
},
|
|
787
|
-
|
|
788
|
-
getProcessHistory() {
|
|
789
|
-
let self = this
|
|
790
|
-
let params = {
|
|
791
|
-
applyId: self.applyId,
|
|
792
|
-
instanceId: self.instanceId,
|
|
793
|
-
procId: self.procId,
|
|
794
|
-
taskId: self.taskId
|
|
795
|
-
}
|
|
796
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessHis', {params: params}).then(function (resp) {
|
|
797
|
-
if (resp.data.code === '200') {
|
|
798
|
-
self.processHistory = resp.data.data
|
|
799
|
-
}
|
|
800
|
-
})
|
|
801
|
-
},
|
|
802
|
-
cancel() {
|
|
803
|
-
this.modal = false
|
|
804
|
-
// this.$refs['radio5'].currentValue = false;
|
|
805
|
-
this.auditResult = '';
|
|
806
|
-
},
|
|
807
|
-
ok() {
|
|
808
|
-
this.modal = false
|
|
809
|
-
if (this.targetTaskNode == '' || this.targetTaskNode == null) {
|
|
810
|
-
// this.$refs['radio5'].currentValue = false;
|
|
811
|
-
this.auditResult = '';
|
|
812
|
-
this.$Message.error("请选择审批节点!");
|
|
813
|
-
} else {
|
|
814
|
-
let self = this;
|
|
815
|
-
|
|
816
|
-
self.auditParams = {
|
|
817
|
-
procId: self.procId,
|
|
818
|
-
applyId: self.applyId,
|
|
819
|
-
taskId: self.taskId,
|
|
820
|
-
auditOpinion: self.auditOpinion,
|
|
821
|
-
fileListStr: JSON.stringify(self.fileList),
|
|
822
|
-
auditResult: self.auditResult,
|
|
823
|
-
params: JSON.stringify(self.datas),
|
|
824
|
-
targetTaskNode: self.targetTaskNode,
|
|
825
|
-
selectedUserId: self.selectedUserId,
|
|
826
|
-
}
|
|
827
|
-
self.loading = true
|
|
828
|
-
self.disable = true
|
|
829
|
-
|
|
830
|
-
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
831
|
-
ajax.post(url, self.auditParams).then(function (resp) {
|
|
832
|
-
let result = resp.data
|
|
833
|
-
if (result.code === '200') {
|
|
834
|
-
setTimeout(() => {
|
|
835
|
-
self.loading = false
|
|
836
|
-
self.disable = false
|
|
837
|
-
self.$Message.success("审批成功");
|
|
838
|
-
if (self.executionCompleted) {
|
|
839
|
-
self.executionCompleted(true, result.data.processInstanceId, result.data.id);
|
|
840
|
-
}
|
|
841
|
-
bus.$emit('triggerTimer')
|
|
842
|
-
}, 500)
|
|
843
|
-
} else {
|
|
844
|
-
self.loading = false
|
|
845
|
-
self.disable = false
|
|
846
|
-
self.$Message.error(result.message)
|
|
847
|
-
if (self.executionCompleted) {
|
|
848
|
-
self.executionCompleted(false, null, null);
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
})
|
|
852
|
-
}
|
|
853
|
-
},
|
|
854
|
-
selectNode(currentRow, oldCurrentRow) {
|
|
855
|
-
let self = this
|
|
856
|
-
self.targetTaskNode = currentRow.taskNode
|
|
857
|
-
},
|
|
858
|
-
|
|
859
|
-
getAllPreNodes() {
|
|
860
|
-
let self = this
|
|
861
|
-
let params = {
|
|
862
|
-
processDefId: self.procId,
|
|
863
|
-
taskId: self.taskId,
|
|
864
|
-
}
|
|
865
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getAllPreNodes', {params: params}).then(function (resp) {
|
|
866
|
-
if (resp.data.code === '200') {
|
|
867
|
-
if (resp.data.data.length > 0){
|
|
868
|
-
self.allNode = resp.data.data
|
|
869
|
-
self.modal1 = true
|
|
870
|
-
}else {
|
|
871
|
-
self.$Message.warning('当前流程无前序节点')
|
|
872
|
-
}
|
|
873
|
-
} else {
|
|
874
|
-
self.$Message.error(resp.data.message)
|
|
875
|
-
}
|
|
876
|
-
})
|
|
877
|
-
},
|
|
878
|
-
getNodesBehind() {
|
|
879
|
-
let self = this
|
|
880
|
-
let params = {
|
|
881
|
-
processDefId: self.procId,
|
|
882
|
-
taskId: self.taskId,
|
|
883
|
-
}
|
|
884
|
-
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getNodesBehind', {params: params}).then(function (resp) {
|
|
885
|
-
if (resp.data.code === '200') {
|
|
886
|
-
if (resp.data.data.length > 0){
|
|
887
|
-
self.allNode = resp.data.data
|
|
888
|
-
self.modal1 = true
|
|
889
|
-
}else {
|
|
890
|
-
self.$Message.warning('当前流程无后续节点')
|
|
891
|
-
}
|
|
892
|
-
} else {
|
|
893
|
-
self.$Message.error(resp.data.message)
|
|
894
|
-
}
|
|
895
|
-
})
|
|
896
|
-
},
|
|
897
|
-
handleSelectedUser(userId) {
|
|
898
|
-
// 处理选中的用户ID,比如将其保存到数据中或执行其他逻辑
|
|
899
|
-
this.selectedUserId = userId;
|
|
900
|
-
// if (userId == null || userId == '') {
|
|
901
|
-
// this.$refs['radio6'].currentValue = false;
|
|
902
|
-
// }
|
|
903
|
-
},
|
|
904
|
-
|
|
905
|
-
//折叠动画效果
|
|
906
|
-
beforeEnter(el) {
|
|
907
|
-
el.style.height = '0';
|
|
908
|
-
},
|
|
909
|
-
enter(el, done) {
|
|
910
|
-
setTimeout(() => {
|
|
911
|
-
el.style.height = el.scrollHeight + 'px';
|
|
912
|
-
}, 0);
|
|
913
|
-
|
|
914
|
-
el.addEventListener('transitionend', done);
|
|
915
|
-
},
|
|
916
|
-
beforeLeave(el) {
|
|
917
|
-
el.style.height = el.scrollHeight + 'px';
|
|
918
|
-
},
|
|
919
|
-
leave(el, done) {
|
|
920
|
-
setTimeout(() => {
|
|
921
|
-
el.style.height = '0';
|
|
922
|
-
}, 0);
|
|
923
|
-
|
|
924
|
-
el.addEventListener('transitionend', done);
|
|
925
|
-
},
|
|
926
|
-
uploadFile(file){
|
|
927
|
-
const self = this;
|
|
928
|
-
self.fileList = []
|
|
929
|
-
file.forEach(item => {
|
|
930
|
-
self.fileList.push({
|
|
931
|
-
fileName: item.fileName,
|
|
932
|
-
fileId: item.fileCode,
|
|
933
|
-
});
|
|
934
|
-
})
|
|
935
|
-
},
|
|
936
|
-
},
|
|
937
|
-
watch: {
|
|
938
|
-
auditOpinionText(label) {
|
|
939
|
-
this.auditOpinion = label;
|
|
940
|
-
},
|
|
941
|
-
procId(val) {
|
|
942
|
-
this.procId = val;
|
|
943
|
-
this.initData()
|
|
944
|
-
},
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
</script>
|
|
948
|
-
|
|
949
|
-
<style lang="less" scoped>
|
|
950
|
-
|
|
951
|
-
/deep/ .ivu-table-row-highlight td {
|
|
952
|
-
background-color: #50c1ff !important;
|
|
953
|
-
color: #fff !important;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
.process-history {
|
|
957
|
-
height: 68vh;
|
|
958
|
-
width: 100%;
|
|
959
|
-
overflow-y: auto;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
.process-history::-webkit-scrollbar {
|
|
963
|
-
width: 5px;
|
|
964
|
-
height: 5px;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
.process-history::-webkit-scrollbar-thumb {
|
|
968
|
-
background: linear-gradient(to bottom right, #bbbbbb 0%, #bbbbbb 100%);
|
|
969
|
-
border-radius: 5px;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
.box {
|
|
973
|
-
overflow: hidden;
|
|
974
|
-
transition: height 0.3s ease;
|
|
975
|
-
height: auto;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
.draw-enter-active, .draw-leave-active {
|
|
979
|
-
|
|
980
|
-
}
|
|
981
|
-
.horizontal-audit{
|
|
982
|
-
overflow-y: auto;
|
|
983
|
-
}
|
|
984
|
-
.horizontal-audit::-webkit-scrollbar {
|
|
985
|
-
width: 5px;
|
|
986
|
-
height: 5px;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
.horizontal-audit::-webkit-scrollbar-thumb {
|
|
990
|
-
background: linear-gradient(to bottom right, #bbbbbb 0%, #bbbbbb 100%);
|
|
991
|
-
border-radius: 5px;
|
|
992
|
-
}
|
|
993
|
-
.draw-enter, .draw-leave-to {
|
|
994
|
-
height: 0;
|
|
995
|
-
}
|
|
996
|
-
.sticky{
|
|
997
|
-
position: sticky;
|
|
998
|
-
bottom : 0;
|
|
999
|
-
z-index: 100;
|
|
1000
|
-
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
1001
|
-
}
|
|
1002
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div style="margin-bottom: -10px">
|
|
3
|
+
<lamboIndicatorCard class="lamboIndicatorCard" :has-title="false" :hasExtend="false">
|
|
4
|
+
<Tabs name="auditInfo" v-model="custChange" @on-click="tabsChange">
|
|
5
|
+
<TabPane label="流程处理" :name="auditInfo" >
|
|
6
|
+
<a @click="historyShow = !historyShow">
|
|
7
|
+
<Title v-if="!handleButtons || handleButtons.includes('auditHistory')">
|
|
8
|
+
<a style="color: #989898">
|
|
9
|
+
<Icon v-if="historyShow" type="ios-arrow-down"/>
|
|
10
|
+
<Icon v-if="!historyShow" type="ios-arrow-up"/>
|
|
11
|
+
处理历史
|
|
12
|
+
</a>
|
|
13
|
+
</Title>
|
|
14
|
+
</a>
|
|
15
|
+
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
16
|
+
<div class="box" v-show="historyShow">
|
|
17
|
+
<Card class="process-history" dis-hover :bordered="false"
|
|
18
|
+
v-if="!handleButtons || handleButtons.includes('auditHistory')">
|
|
19
|
+
<processHistory :list="processHistory" :smart-flow-server-context="smartFlowServerContext"></processHistory>
|
|
20
|
+
</Card>
|
|
21
|
+
</div>
|
|
22
|
+
</transition>
|
|
23
|
+
|
|
24
|
+
<a @click="attachListShow = !attachListShow">
|
|
25
|
+
<Title v-if="!handleButtons || handleButtons.includes('attachmentFile')">
|
|
26
|
+
<a style="color: #989898">
|
|
27
|
+
<Icon v-if="attachListShow" type="ios-arrow-down"/>
|
|
28
|
+
<Icon v-if="!attachListShow" type="ios-arrow-up"/>
|
|
29
|
+
查看附件
|
|
30
|
+
</a>
|
|
31
|
+
</Title>
|
|
32
|
+
</a>
|
|
33
|
+
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
34
|
+
<div class="box" v-show="(!handleButtons || handleButtons.includes('attachmentFile')) && attachListShow" style="margin: 15px 20px 20px 100px">
|
|
35
|
+
<LamboPagingTable :requestSuccessCodes="requestSuccessCodes" :pageDisable="true" ref="table" :dataUrl="dataUrl" :columns="tableColumn"></LamboPagingTable>
|
|
36
|
+
<Modal title="查看附件" v-model="modalVisible" fullscreen scrollable :mask="false">
|
|
37
|
+
<img :src="imageUrl" v-if="modalVisible" alt="" style="width: 100%">
|
|
38
|
+
<div slot="footer">
|
|
39
|
+
<Button type="primary" @click="modalVisible = false">关闭</Button>
|
|
40
|
+
</div>
|
|
41
|
+
</Modal>
|
|
42
|
+
<Modal title="查看附件" v-model="modalDocx" fullscreen scrollable :mask="false">
|
|
43
|
+
<div ref="file" ></div>
|
|
44
|
+
</Modal>
|
|
45
|
+
</div>
|
|
46
|
+
</transition>
|
|
47
|
+
<Modal v-model="modal1" title="选择节点"
|
|
48
|
+
@on-cancel="cancel"
|
|
49
|
+
@on-ok="ok">
|
|
50
|
+
<Table border
|
|
51
|
+
:data="allNode"
|
|
52
|
+
:columns="nodeColumn"
|
|
53
|
+
highlight-row
|
|
54
|
+
@on-current-change="selectNode">
|
|
55
|
+
</Table>
|
|
56
|
+
</Modal>
|
|
57
|
+
<assigneeBox ref="assigneeHelpBox" :executionCompleted="executionCompleted" @update-selected="handleSelectedUser"
|
|
58
|
+
:data="assigneeBoxData" :smart-flow-server-context="smartFlowServerContext" :upms-server-context="upmsServerContext"/>
|
|
59
|
+
|
|
60
|
+
</TabPane>
|
|
61
|
+
<TabPane label="流程跟踪图" :name="auditProcess" v-if="!handleButtons || handleButtons.includes('processTrace')">
|
|
62
|
+
<div>
|
|
63
|
+
<Workflow_Diagram ref="processTrace" :instanceId="process.instanceId" :applyId="process.applyId"
|
|
64
|
+
:procId="process.procId"
|
|
65
|
+
:tableData="process.tableData" :hisAudit="hisAudit"
|
|
66
|
+
:smart-flow-server-context="smartFlowServerContext">
|
|
67
|
+
</Workflow_Diagram>
|
|
68
|
+
</div>
|
|
69
|
+
</TabPane>
|
|
70
|
+
</Tabs>
|
|
71
|
+
</lamboIndicatorCard>
|
|
72
|
+
<div class="sticky" v-if="custChange.includes('auditInfo')">
|
|
73
|
+
<lamboIndicatorCard :has-title="false" :hasExtend="false">
|
|
74
|
+
<a @click="auditShow = !auditShow">
|
|
75
|
+
<Title v-if="!handleButtons || handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile')">
|
|
76
|
+
<a style="color: #989898">
|
|
77
|
+
<Icon v-if="auditShow" type="ios-arrow-down"/>
|
|
78
|
+
<Icon v-if="!auditShow" type="ios-arrow-up"/>
|
|
79
|
+
我的审批
|
|
80
|
+
</a>
|
|
81
|
+
</Title>
|
|
82
|
+
</a>
|
|
83
|
+
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
84
|
+
<div class="box horizontal-audit" v-show="auditShow">
|
|
85
|
+
<Form ref="auditOpinion" justify="center"
|
|
86
|
+
v-if="!handleButtons || handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile')"
|
|
87
|
+
style=" margin-top: 15px;margin-left: 100px;margin-right: 100px" :rules="ruleValidate">
|
|
88
|
+
<Row>
|
|
89
|
+
<Col span="24" offset="0">
|
|
90
|
+
<FormItem :label-width="120" label="处理意见:" prop="auditOpinion"
|
|
91
|
+
v-if="!handleButtons || handleButtons.includes('auditOpinion')">
|
|
92
|
+
<AuditOpinion v-model="auditOpinion" :smart-flow-server-context="smartFlowServerContext"></AuditOpinion>
|
|
93
|
+
</FormItem>
|
|
94
|
+
<UploadFile style="margin-left: 120px" v-if="!handleButtons || handleButtons.includes('attachmentFile')"
|
|
95
|
+
@upload-result="uploadFile" :multiple="true"
|
|
96
|
+
:oss-server-context="smartFlowServerContext" :oss-file-put-url="ossFilePutUrl"></UploadFile>
|
|
97
|
+
</Col>
|
|
98
|
+
</Row>
|
|
99
|
+
</Form>
|
|
100
|
+
<Divider/>
|
|
101
|
+
<Row type="flex" justify="center" style="margin-top: 10px;margin-bottom: 10px;">
|
|
102
|
+
<Button style="margin-left: 10px;" v-if="isShowSave && businessFormSave" @click="saveBusinessForm">保存</Button>
|
|
103
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo30')"
|
|
104
|
+
:disabled="disable" :loading="loading" @click="audit('30')">通过
|
|
105
|
+
</Button>
|
|
106
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo70')"
|
|
107
|
+
:disabled="disable" :loading="loading" @click="audit('70')">驳回到原点
|
|
108
|
+
</Button>
|
|
109
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo40')"
|
|
110
|
+
:disabled="disable" :loading="loading" @click="audit('40')">驳回到上一级
|
|
111
|
+
</Button>
|
|
112
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo90')"
|
|
113
|
+
:disabled="disable" :loading="loading" @click="audit('90')">驳回指定节点
|
|
114
|
+
</Button>
|
|
115
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo80')"
|
|
116
|
+
:disabled="disable" :loading="loading" @click="audit('80')">跳转指定节点
|
|
117
|
+
</Button>
|
|
118
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo82')"
|
|
119
|
+
:disabled="disable" :loading="loading" @click="audit('82')">指定他人处理
|
|
120
|
+
</Button>
|
|
121
|
+
<Button style="margin-left: 10px;" v-if="!handleButtons || handleButtons.includes('auditTo50')"
|
|
122
|
+
:disabled="disable" :loading="loading" @click="audit('50')">直接结束流程
|
|
123
|
+
</Button>
|
|
124
|
+
<Button style="margin-left: 10px;" v-if="isShowReturn"
|
|
125
|
+
:disabled="disable" :loading="loading" @click="pageGoBack()">返回
|
|
126
|
+
</Button>
|
|
127
|
+
</Row>
|
|
128
|
+
</div>
|
|
129
|
+
</transition>
|
|
130
|
+
</lamboIndicatorCard>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
</div>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<script>
|
|
138
|
+
import LamboPageContainer from '@lambo-design/page-container'
|
|
139
|
+
import LamboIndicatorCard from '@lambo-design/indicator-card'
|
|
140
|
+
import Attachment from './components/horizontal/attachment';
|
|
141
|
+
import Workflow_Diagram from './workflow-diagram'
|
|
142
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
143
|
+
import { operateBtn } from '@lambo-design/shared/utils/assist';
|
|
144
|
+
import bus from '@lambo-design/shared/utils/bus';
|
|
145
|
+
import Title from "./components/title";
|
|
146
|
+
import processHistory from "./components/horizontal/history";
|
|
147
|
+
import assigneeBox from "./components/assignee-box";
|
|
148
|
+
import LamboPagingTable from "@lambo-design/paging-table";
|
|
149
|
+
import axios from "axios";
|
|
150
|
+
import AuditOpinion from "./components/horizontal/opinion";
|
|
151
|
+
import UploadFile from "@lambo-design/upload-file";
|
|
152
|
+
|
|
153
|
+
// 引入docx-preview插件
|
|
154
|
+
let docx = require('docx-preview');
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
export default {
|
|
158
|
+
props: {
|
|
159
|
+
procId: {
|
|
160
|
+
type: String,
|
|
161
|
+
required: true,
|
|
162
|
+
},
|
|
163
|
+
taskNode: {
|
|
164
|
+
type: String,
|
|
165
|
+
required: true,
|
|
166
|
+
},
|
|
167
|
+
applyId: {
|
|
168
|
+
type: String,
|
|
169
|
+
required: true,
|
|
170
|
+
},
|
|
171
|
+
isShowSave: {
|
|
172
|
+
type: Boolean,
|
|
173
|
+
required: false,
|
|
174
|
+
default: false
|
|
175
|
+
},
|
|
176
|
+
isShowReturn: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
required: false,
|
|
179
|
+
default: false
|
|
180
|
+
},
|
|
181
|
+
//业务表单保存方法
|
|
182
|
+
businessFormSave: {
|
|
183
|
+
type: Function,
|
|
184
|
+
required: false
|
|
185
|
+
},
|
|
186
|
+
//按钮执行完毕回调方法
|
|
187
|
+
executionCompleted: {
|
|
188
|
+
type: Function,
|
|
189
|
+
required: false,
|
|
190
|
+
},
|
|
191
|
+
smartFlowServerContext: {
|
|
192
|
+
type: String,
|
|
193
|
+
default: '/api/smart-flow-server',
|
|
194
|
+
},
|
|
195
|
+
upmsServerContext: {
|
|
196
|
+
type: String,
|
|
197
|
+
default: '/api/upms-server',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
components: {
|
|
201
|
+
Title,
|
|
202
|
+
LamboPageContainer,
|
|
203
|
+
Workflow_Diagram,
|
|
204
|
+
Attachment,
|
|
205
|
+
processHistory,
|
|
206
|
+
assigneeBox,
|
|
207
|
+
LamboPagingTable,
|
|
208
|
+
AuditOpinion,
|
|
209
|
+
LamboIndicatorCard,
|
|
210
|
+
UploadFile
|
|
211
|
+
},
|
|
212
|
+
data() {
|
|
213
|
+
return {
|
|
214
|
+
dataUrl: this.smartFlowServerContext + '/manage/processDone/getAttachmentList?procId='+this.procId + '&applyId=' + this.applyId,
|
|
215
|
+
requestSuccessCodes: [200, "200"],
|
|
216
|
+
auditShow: false,
|
|
217
|
+
historyShow: true,
|
|
218
|
+
attachListShow: false,
|
|
219
|
+
tableData: [],
|
|
220
|
+
modalVisible: false,
|
|
221
|
+
modalDocx:false,
|
|
222
|
+
imageUrl: '',
|
|
223
|
+
assigneeBoxData: {},
|
|
224
|
+
selectedUserId: '',
|
|
225
|
+
targetTaskNode: '',
|
|
226
|
+
allNode: [],
|
|
227
|
+
auditParams: {},
|
|
228
|
+
modal1: false,
|
|
229
|
+
hisNode: [],
|
|
230
|
+
processHistory: [],
|
|
231
|
+
ruleValidate: {
|
|
232
|
+
auditOpinion: [{required: true, trigger: "blur", message: "审批意见不能为空", type: "String"}]
|
|
233
|
+
},
|
|
234
|
+
auditOpinion: '',
|
|
235
|
+
loading: false,
|
|
236
|
+
disable: false,
|
|
237
|
+
instanceId: '',
|
|
238
|
+
taskId: '',
|
|
239
|
+
handleButtons: [],
|
|
240
|
+
auditResult: '',
|
|
241
|
+
custChange: 'auditInfo',
|
|
242
|
+
auditInfo:"auditInfo",
|
|
243
|
+
auditProcess:"auditProcess",
|
|
244
|
+
fileList: [],
|
|
245
|
+
ossFilePutUrl: '/manage/oss/file/put',
|
|
246
|
+
hisAudit: [],
|
|
247
|
+
datas: {
|
|
248
|
+
orgName: "",
|
|
249
|
+
orgId: ""
|
|
250
|
+
},
|
|
251
|
+
editForm: {
|
|
252
|
+
approvalCost: '',
|
|
253
|
+
cost: '',
|
|
254
|
+
activityDate: []
|
|
255
|
+
},
|
|
256
|
+
process: {
|
|
257
|
+
tableData: [],
|
|
258
|
+
instanceId: '',
|
|
259
|
+
applyId: '',
|
|
260
|
+
procId: ''
|
|
261
|
+
},
|
|
262
|
+
handleButtonsNames: {
|
|
263
|
+
'30': '同意',
|
|
264
|
+
'70': '驳回原点',
|
|
265
|
+
'40': '驳回上一节点',
|
|
266
|
+
'90': '驳回指定节点',
|
|
267
|
+
'80': '跳转指定节点',
|
|
268
|
+
'82': '转办',
|
|
269
|
+
'50': '人工终止'
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
mounted() {
|
|
276
|
+
if (this.procId){
|
|
277
|
+
this.initData()
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
},
|
|
281
|
+
computed: {
|
|
282
|
+
title: function () {
|
|
283
|
+
return this.$route.query.procName;
|
|
284
|
+
},
|
|
285
|
+
nodeColumn: function () {
|
|
286
|
+
let column = []
|
|
287
|
+
column.push({title: '序号', type: 'index', width: 70, align: 'center', fixed: 'left'});
|
|
288
|
+
column.push({title: '节点名称', key: 'taskName', minWidth: 150, align: 'center', fixed: 'left'})
|
|
289
|
+
|
|
290
|
+
column.push({
|
|
291
|
+
title: '节点状态', key: 'auditResult', minWidth: 150, align: 'center', fixed: 'left',
|
|
292
|
+
render: (h, params) => {
|
|
293
|
+
if (params.row.taskNode == this.taskNode) {
|
|
294
|
+
return h('div', [
|
|
295
|
+
h('tag', {
|
|
296
|
+
props: {
|
|
297
|
+
color: '#ff9900'
|
|
298
|
+
}
|
|
299
|
+
}, '当前节点')
|
|
300
|
+
])
|
|
301
|
+
} else if (!params.row.auditResult) {
|
|
302
|
+
return h('div', [
|
|
303
|
+
h('tag', {
|
|
304
|
+
props: {
|
|
305
|
+
color: '#ff9900'
|
|
306
|
+
}
|
|
307
|
+
}, '未审批')
|
|
308
|
+
])
|
|
309
|
+
} else {
|
|
310
|
+
if (params.row.auditResult == '30' && params.row.taskNode != this.taskNode) {
|
|
311
|
+
return h('div', [
|
|
312
|
+
h('tag', {
|
|
313
|
+
props: {
|
|
314
|
+
color: '#19be6b'
|
|
315
|
+
}
|
|
316
|
+
}, '已审批通过')
|
|
317
|
+
])
|
|
318
|
+
} else if (params.row.auditResult == '40' && params.row.taskNode != this.taskNode) {
|
|
319
|
+
return h('div', [
|
|
320
|
+
h('tag', {
|
|
321
|
+
props: {
|
|
322
|
+
color: '#ed4014'
|
|
323
|
+
}
|
|
324
|
+
}, '已驳回到上一节点')
|
|
325
|
+
])
|
|
326
|
+
} else if (params.row.auditResult == '60' && params.row.taskNode != this.taskNode) {
|
|
327
|
+
return h('div', [
|
|
328
|
+
h('tag', {
|
|
329
|
+
props: {
|
|
330
|
+
color: '#ed4014'
|
|
331
|
+
}
|
|
332
|
+
}, '已撤回')
|
|
333
|
+
])
|
|
334
|
+
} else if (params.row.auditResult == '80' && params.row.taskNode != this.taskNode) {
|
|
335
|
+
return h('div', [
|
|
336
|
+
h('tag', {
|
|
337
|
+
props: {
|
|
338
|
+
color: '#19be6b'
|
|
339
|
+
}
|
|
340
|
+
}, '已跳转到指定节点')
|
|
341
|
+
])
|
|
342
|
+
} else if (params.row.auditResult == '90' && params.row.taskNode != this.taskNode) {
|
|
343
|
+
return h('div', [
|
|
344
|
+
h('tag', {
|
|
345
|
+
props: {
|
|
346
|
+
color: '#19be6b'
|
|
347
|
+
}
|
|
348
|
+
}, '已驳回到指定节点')
|
|
349
|
+
])
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
})
|
|
354
|
+
column.push({
|
|
355
|
+
title: "操作", width: 100, align: 'center',
|
|
356
|
+
render: (h, params) => {
|
|
357
|
+
return h('div', [
|
|
358
|
+
h('Button', {
|
|
359
|
+
props: {
|
|
360
|
+
type: 'primary',
|
|
361
|
+
size: 'small'
|
|
362
|
+
},
|
|
363
|
+
style: {
|
|
364
|
+
marginRight: '5px'
|
|
365
|
+
},
|
|
366
|
+
on: {
|
|
367
|
+
click: () => {
|
|
368
|
+
this.selectNode(params.row)
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}, '选择')
|
|
372
|
+
])
|
|
373
|
+
},
|
|
374
|
+
})
|
|
375
|
+
return column
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
tableColumn() {
|
|
379
|
+
let column = [];
|
|
380
|
+
let self = this;
|
|
381
|
+
column.push({
|
|
382
|
+
title: '序号',
|
|
383
|
+
type: 'index',
|
|
384
|
+
width: 70,
|
|
385
|
+
align: 'center',
|
|
386
|
+
});
|
|
387
|
+
column.push({
|
|
388
|
+
title: '附件名称', key: 'fileName', minWidth: 150, align: 'center',
|
|
389
|
+
render(h, {row}) {
|
|
390
|
+
const index= row.fileName.lastIndexOf(".");
|
|
391
|
+
const fileName=row.fileName.substr(0,index)
|
|
392
|
+
return h("span",fileName)
|
|
393
|
+
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
column.push({
|
|
397
|
+
title: '附件类型', width: 100, align: 'center',
|
|
398
|
+
render:(h,{row})=>{
|
|
399
|
+
const index= row.fileName.lastIndexOf(".");
|
|
400
|
+
const fileType=row.fileName.substr(index+1)
|
|
401
|
+
return h("span",fileType)
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
column.push({
|
|
406
|
+
title: "上传人姓名",
|
|
407
|
+
key: "uploadUserName",
|
|
408
|
+
width: 170,
|
|
409
|
+
align: "center",
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
column.push({
|
|
413
|
+
title: "节点名称",
|
|
414
|
+
key: "taskName",
|
|
415
|
+
width: 170,
|
|
416
|
+
align: "center",
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
column.push({
|
|
420
|
+
title: "上传时间",
|
|
421
|
+
key: "updTime",
|
|
422
|
+
width: 170,
|
|
423
|
+
align: "center",
|
|
424
|
+
render: (v, param) => {
|
|
425
|
+
if (param.row.updTime){
|
|
426
|
+
let date = new Date(param.row.updTime)
|
|
427
|
+
let y = date.getFullYear() // 年
|
|
428
|
+
let MM = date.getMonth() + 1 // 月
|
|
429
|
+
MM = MM < 10 ? ('0' + MM) : MM
|
|
430
|
+
let d = date.getDate() // 日
|
|
431
|
+
d = d < 10 ? ('0' + d) : d
|
|
432
|
+
let h = date.getHours() // 时
|
|
433
|
+
h = h < 10 ? ('0' + h) : h
|
|
434
|
+
let m = date.getMinutes()// 分
|
|
435
|
+
m = m < 10 ? ('0' + m) : m
|
|
436
|
+
let s = date.getSeconds()// 秒
|
|
437
|
+
s = s < 10 ? ('0' + s) : s
|
|
438
|
+
let state =y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
|
|
439
|
+
return v("span", state);
|
|
440
|
+
}
|
|
441
|
+
return v("span", '')
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
column.push({
|
|
446
|
+
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
447
|
+
render: (h, {row}) => {
|
|
448
|
+
const index= row.fileName.lastIndexOf(".");
|
|
449
|
+
const fileType=row.fileName.substr(index+1).toLowerCase()
|
|
450
|
+
// const typeList=['jpg','pdf','gif','png','docx']
|
|
451
|
+
//由于pdf预览显示乱码 暂时不提供pdf预览功能
|
|
452
|
+
const typeList=['jpg','gif','png','docx']
|
|
453
|
+
if (typeList.indexOf(fileType)!==-1){
|
|
454
|
+
return h("div", [
|
|
455
|
+
operateBtn(this, h, row, "下载", () => {
|
|
456
|
+
this.getAttach(row);
|
|
457
|
+
}, "primary"),
|
|
458
|
+
operateBtn(this, h, row, "预览", () => {
|
|
459
|
+
this.preViewAttach(row);
|
|
460
|
+
}, "primary")
|
|
461
|
+
]);
|
|
462
|
+
}else {
|
|
463
|
+
return h("div", [
|
|
464
|
+
operateBtn(this, h, row, "下载", () => {
|
|
465
|
+
this.getAttach(row);
|
|
466
|
+
}, "primary")
|
|
467
|
+
]);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
return column;
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
},
|
|
479
|
+
provide() {
|
|
480
|
+
return {
|
|
481
|
+
toBeDoneListDoSearch: this.doSearch
|
|
482
|
+
};
|
|
483
|
+
},
|
|
484
|
+
methods: {
|
|
485
|
+
initData(){
|
|
486
|
+
this.getAttachList()
|
|
487
|
+
this.getTaskId()
|
|
488
|
+
this.getHandleButtons()
|
|
489
|
+
this.getHisAudit();
|
|
490
|
+
this.getProcessHistory();
|
|
491
|
+
},
|
|
492
|
+
saveBusinessForm(){
|
|
493
|
+
this.businessFormSave(()=>{})
|
|
494
|
+
},
|
|
495
|
+
getAttachList(){
|
|
496
|
+
const self = this
|
|
497
|
+
const param = {
|
|
498
|
+
procId: this.procId,
|
|
499
|
+
applyId: this.applyId
|
|
500
|
+
}
|
|
501
|
+
ajax.get(self.smartFlowServerContext + '/manage/processDone/getAttachmentList', {params: param}).then(function (resp) {
|
|
502
|
+
self.tableData = resp.data.data.rows
|
|
503
|
+
self.attachListShow = true
|
|
504
|
+
}).catch(err => {
|
|
505
|
+
console.log(err);
|
|
506
|
+
})
|
|
507
|
+
},
|
|
508
|
+
getTaskId(){
|
|
509
|
+
const self = this
|
|
510
|
+
let param = {
|
|
511
|
+
procId: this.procId,
|
|
512
|
+
applyId: this.applyId,
|
|
513
|
+
taskNode:this.taskNode
|
|
514
|
+
}
|
|
515
|
+
ajax.get(self.smartFlowServerContext + "/manage/processTodo/list", {params: param}).then(function (resp) {
|
|
516
|
+
if (resp.data.code === '200') {
|
|
517
|
+
self.taskId = resp.data.data.rows[0].taskId
|
|
518
|
+
self.instanceId = resp.data.data.rows[0].procInstanceId
|
|
519
|
+
self.processPrint()
|
|
520
|
+
}else {
|
|
521
|
+
self.$Message.error(resp.data.message)
|
|
522
|
+
}
|
|
523
|
+
}).catch((err)=>{
|
|
524
|
+
console.log(err)
|
|
525
|
+
})
|
|
526
|
+
},
|
|
527
|
+
getHandleButtons(){
|
|
528
|
+
const self = this
|
|
529
|
+
let param = {
|
|
530
|
+
procId: this.procId,
|
|
531
|
+
taskNode: this.taskNode
|
|
532
|
+
}
|
|
533
|
+
ajax.post(self.smartFlowServerContext + '/manage/approvalCenter/getNodeData', param).then(function (resp) {
|
|
534
|
+
if (resp.data.code === '200') {
|
|
535
|
+
self.handleButtons = resp.data.data[0].handleButtons
|
|
536
|
+
}else {
|
|
537
|
+
self.$Message.error(resp.data.message)
|
|
538
|
+
}
|
|
539
|
+
}).catch((err)=>{
|
|
540
|
+
console.log(err)
|
|
541
|
+
})
|
|
542
|
+
},
|
|
543
|
+
handleSaveResult(saveResult) {
|
|
544
|
+
if (saveResult) {
|
|
545
|
+
this.executeButtonAction((execResult, instanceId, taskId) => {
|
|
546
|
+
if (this.executionCompleted) {
|
|
547
|
+
this.executionCompleted(execResult, instanceId, taskId);
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
} else {
|
|
551
|
+
console.error('保存失败');
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
executeButtonAction(callback) {
|
|
555
|
+
const self = this;
|
|
556
|
+
if (self.auditResult == '82') {
|
|
557
|
+
self.assigneeBoxData = self.auditParams
|
|
558
|
+
self.$refs.assigneeHelpBox.toggleShowHelpBox();
|
|
559
|
+
} else if (self.auditResult == '80') {
|
|
560
|
+
self.getNodesBehind()
|
|
561
|
+
} else if (self.auditResult == '90') {
|
|
562
|
+
self.getAllPreNodes()
|
|
563
|
+
} else if (self.auditResult == '40') {
|
|
564
|
+
self.loading = true
|
|
565
|
+
self.disable = true
|
|
566
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/getPreNode'
|
|
567
|
+
ajax.post(url, self.auditParams).then(function (resp) {
|
|
568
|
+
let result = resp.data
|
|
569
|
+
if (result.code == '30010') {
|
|
570
|
+
self.$Modal.confirm({
|
|
571
|
+
title: "提示",
|
|
572
|
+
content: result.message,
|
|
573
|
+
onOk: () => {
|
|
574
|
+
self.auditParams.auditResult = '70'
|
|
575
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
576
|
+
ajax.post(url, self.auditParams).then(function (resp) {
|
|
577
|
+
let result = resp.data
|
|
578
|
+
if (result.code == '200') {
|
|
579
|
+
self.loading = false
|
|
580
|
+
self.disable = false
|
|
581
|
+
self.$Message.success(result.message);
|
|
582
|
+
//后端没有返回数据
|
|
583
|
+
callback(true, null, null);
|
|
584
|
+
bus.$emit('triggerTimer')
|
|
585
|
+
} else {
|
|
586
|
+
self.loading = false
|
|
587
|
+
self.disable = false
|
|
588
|
+
self.$Message.error(result.message)
|
|
589
|
+
callback(false, null, null);
|
|
590
|
+
}
|
|
591
|
+
bus.$emit('triggerTimer')
|
|
592
|
+
})
|
|
593
|
+
},
|
|
594
|
+
onCancel: () => {
|
|
595
|
+
self.loading = false
|
|
596
|
+
self.disable = false
|
|
597
|
+
}
|
|
598
|
+
})
|
|
599
|
+
} else {
|
|
600
|
+
self.loading = true
|
|
601
|
+
self.disable = true
|
|
602
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
603
|
+
ajax.post(url, self.auditParams).then(function (resp) {
|
|
604
|
+
let result = resp.data
|
|
605
|
+
if (result.code == '200') {
|
|
606
|
+
self.loading = false
|
|
607
|
+
self.disable = false
|
|
608
|
+
self.$Message.success(result.message);
|
|
609
|
+
if (result.data){
|
|
610
|
+
callback(true, result.data.processInstanceId, result.data.id)
|
|
611
|
+
}else {
|
|
612
|
+
callback(true, null, null)
|
|
613
|
+
}
|
|
614
|
+
} else {
|
|
615
|
+
self.loading = false
|
|
616
|
+
self.disable = false
|
|
617
|
+
self.$Message.error(result.message)
|
|
618
|
+
callback(false, null, null);
|
|
619
|
+
}
|
|
620
|
+
bus.$emit('triggerTimer')
|
|
621
|
+
})
|
|
622
|
+
}
|
|
623
|
+
})
|
|
624
|
+
} else {
|
|
625
|
+
self.loading = true
|
|
626
|
+
self.disable = true
|
|
627
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
628
|
+
ajax.post(url, self.auditParams).then(function (resp) {
|
|
629
|
+
let result = resp.data
|
|
630
|
+
if (result.code == '200') {
|
|
631
|
+
self.loading = false
|
|
632
|
+
self.disable = false
|
|
633
|
+
if (result.data){
|
|
634
|
+
callback(true, result.data.processInstanceId, result.data.id)
|
|
635
|
+
}else {
|
|
636
|
+
callback(true, null, null)
|
|
637
|
+
}
|
|
638
|
+
self.$Message.success(result.message);
|
|
639
|
+
} else if (result.code == '20002') {
|
|
640
|
+
// 流程结束
|
|
641
|
+
self.loading = false
|
|
642
|
+
self.disable = false
|
|
643
|
+
callback(true, null, null)
|
|
644
|
+
self.$Message.success(result.message)
|
|
645
|
+
} else {
|
|
646
|
+
self.loading = false
|
|
647
|
+
self.disable = false
|
|
648
|
+
callback(false, null, null)
|
|
649
|
+
self.$Message.error(result.message)
|
|
650
|
+
}
|
|
651
|
+
bus.$emit('triggerTimer')
|
|
652
|
+
})
|
|
653
|
+
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
|
|
657
|
+
doSearch() {
|
|
658
|
+
//不需要实现,是子组件assigneeBox要求使用父组件的这个方法
|
|
659
|
+
},
|
|
660
|
+
tabsChange(tab) {
|
|
661
|
+
console.log(tab)
|
|
662
|
+
},
|
|
663
|
+
audit: function (auditResult) {
|
|
664
|
+
let self = this
|
|
665
|
+
self.auditResult = auditResult
|
|
666
|
+
self.submit()
|
|
667
|
+
},
|
|
668
|
+
getAttach(row) {
|
|
669
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
670
|
+
},
|
|
671
|
+
preViewAttach(row) {
|
|
672
|
+
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
673
|
+
let regs = /\.(pdf)$/
|
|
674
|
+
if (reg.test(row.fileName)) {
|
|
675
|
+
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
676
|
+
this.imgPreview(url);
|
|
677
|
+
} else if (regs.test(row.fileName)) {
|
|
678
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
679
|
+
} else {
|
|
680
|
+
this.modalDocx = true
|
|
681
|
+
axios({
|
|
682
|
+
method: 'get',
|
|
683
|
+
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
684
|
+
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
685
|
+
}).then(({data}) => {
|
|
686
|
+
docx.renderAsync(data, this.$refs.file, null, {
|
|
687
|
+
className: "docx", //默认和文档样式类的类名/前缀
|
|
688
|
+
inWrapper: true, //启用围绕文档内容呈现包装器
|
|
689
|
+
ignoreWidth: false, //禁用页面的渲染宽度
|
|
690
|
+
ignoreHeight: false, //禁用页面的渲染高度
|
|
691
|
+
ignoreFonts: false, //禁用字体渲染
|
|
692
|
+
breakPages: true, //在分页符上启用分页
|
|
693
|
+
ignoreLastRenderedPageBreak: true, //在lastRenderedPageBreak元素上禁用分页
|
|
694
|
+
experimental: false, //启用实验功能(制表符停止计算)
|
|
695
|
+
trimXmlDeclaration: true, //如果为true,则在解析之前将从xml文档中删除xml声明
|
|
696
|
+
useBase64URL: false, //如果为true,图像、字体等将转换为base 64 URL,否则使用URL.createObjectURL
|
|
697
|
+
useMathMLPolyfill: false, //包括用于铬、边等的MathML多填充。
|
|
698
|
+
showChanges: false, //启用文档更改的实验渲染(插入/删除)
|
|
699
|
+
debug: false, //启用额外的日志记录
|
|
700
|
+
})
|
|
701
|
+
}
|
|
702
|
+
)
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
imgPreview(url) {
|
|
706
|
+
this.imageUrl = url;
|
|
707
|
+
this.modalVisible = true;
|
|
708
|
+
},
|
|
709
|
+
submit() {
|
|
710
|
+
let self = this;
|
|
711
|
+
|
|
712
|
+
self.auditParams = {
|
|
713
|
+
procId: self.procId,
|
|
714
|
+
applyId: self.applyId,
|
|
715
|
+
taskId: self.taskId,
|
|
716
|
+
auditOpinion: self.auditOpinion,
|
|
717
|
+
fileListStr: JSON.stringify(self.fileList),
|
|
718
|
+
auditResult: self.auditResult,
|
|
719
|
+
params: JSON.stringify(self.datas),
|
|
720
|
+
targetTaskNode: self.targetTaskNode,
|
|
721
|
+
selectedUserId: self.selectedUserId,
|
|
722
|
+
}
|
|
723
|
+
if (self.auditResult == '' || self.auditResult == null) {
|
|
724
|
+
self.$Message.error("请选择审批结果!");
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
if (self.auditOpinion == '' || self.auditOpinion == null) {
|
|
728
|
+
if (!self.handleButtons || self.handleButtons.includes('auditOpinion')) {
|
|
729
|
+
self.$Message.error("请输入审批意见!")
|
|
730
|
+
return;
|
|
731
|
+
} else {
|
|
732
|
+
self.auditParams.auditOpinion = self.handleButtonsNames[self.auditResult];
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
self.businessFormSave ? self.businessFormSave(self.handleSaveResult) : self.handleSaveResult(true)
|
|
737
|
+
},
|
|
738
|
+
|
|
739
|
+
//打印流程图信息
|
|
740
|
+
processPrint() {
|
|
741
|
+
let self = this
|
|
742
|
+
let params = {
|
|
743
|
+
applyId: self.applyId,
|
|
744
|
+
instanceId: self.instanceId,
|
|
745
|
+
procId: self.procId,
|
|
746
|
+
taskId: self.taskId,
|
|
747
|
+
}
|
|
748
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getPrintData', {params: params}).then(function (resp) {
|
|
749
|
+
let result = resp.data.data
|
|
750
|
+
if (resp.data.code === '200') {
|
|
751
|
+
let tableData = result
|
|
752
|
+
self.process.tableData = tableData
|
|
753
|
+
self.process.applyId = self.applyId
|
|
754
|
+
self.process.instanceId = self.instanceId
|
|
755
|
+
self.process.procId = self.procId
|
|
756
|
+
self.datas.orgId = tableData[0].orgId
|
|
757
|
+
self.datas.orgName = tableData[0].orgName
|
|
758
|
+
}
|
|
759
|
+
})
|
|
760
|
+
},
|
|
761
|
+
|
|
762
|
+
pageGoBack() {
|
|
763
|
+
bus.$emit('triggerTimer')
|
|
764
|
+
window.history.back()
|
|
765
|
+
},
|
|
766
|
+
|
|
767
|
+
getHisAudit() {
|
|
768
|
+
let self = this
|
|
769
|
+
let params = {
|
|
770
|
+
applyId: self.applyId,
|
|
771
|
+
instanceId: self.instanceId,
|
|
772
|
+
procId: self.procId,
|
|
773
|
+
taskId: self.taskId
|
|
774
|
+
}
|
|
775
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getHisAudit', {params: params}).then(function (resp) {
|
|
776
|
+
if (resp.data.code === '200') {
|
|
777
|
+
self.hisAudit = resp.data.data
|
|
778
|
+
let uniqueDataMap = {};
|
|
779
|
+
self.hisAudit.forEach((item) => {
|
|
780
|
+
uniqueDataMap[item["taskNode"]] = item;
|
|
781
|
+
})
|
|
782
|
+
self.hisNode = Object.values(uniqueDataMap);
|
|
783
|
+
|
|
784
|
+
}
|
|
785
|
+
})
|
|
786
|
+
},
|
|
787
|
+
|
|
788
|
+
getProcessHistory() {
|
|
789
|
+
let self = this
|
|
790
|
+
let params = {
|
|
791
|
+
applyId: self.applyId,
|
|
792
|
+
instanceId: self.instanceId,
|
|
793
|
+
procId: self.procId,
|
|
794
|
+
taskId: self.taskId
|
|
795
|
+
}
|
|
796
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessHis', {params: params}).then(function (resp) {
|
|
797
|
+
if (resp.data.code === '200') {
|
|
798
|
+
self.processHistory = resp.data.data
|
|
799
|
+
}
|
|
800
|
+
})
|
|
801
|
+
},
|
|
802
|
+
cancel() {
|
|
803
|
+
this.modal = false
|
|
804
|
+
// this.$refs['radio5'].currentValue = false;
|
|
805
|
+
this.auditResult = '';
|
|
806
|
+
},
|
|
807
|
+
ok() {
|
|
808
|
+
this.modal = false
|
|
809
|
+
if (this.targetTaskNode == '' || this.targetTaskNode == null) {
|
|
810
|
+
// this.$refs['radio5'].currentValue = false;
|
|
811
|
+
this.auditResult = '';
|
|
812
|
+
this.$Message.error("请选择审批节点!");
|
|
813
|
+
} else {
|
|
814
|
+
let self = this;
|
|
815
|
+
|
|
816
|
+
self.auditParams = {
|
|
817
|
+
procId: self.procId,
|
|
818
|
+
applyId: self.applyId,
|
|
819
|
+
taskId: self.taskId,
|
|
820
|
+
auditOpinion: self.auditOpinion,
|
|
821
|
+
fileListStr: JSON.stringify(self.fileList),
|
|
822
|
+
auditResult: self.auditResult,
|
|
823
|
+
params: JSON.stringify(self.datas),
|
|
824
|
+
targetTaskNode: self.targetTaskNode,
|
|
825
|
+
selectedUserId: self.selectedUserId,
|
|
826
|
+
}
|
|
827
|
+
self.loading = true
|
|
828
|
+
self.disable = true
|
|
829
|
+
|
|
830
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
831
|
+
ajax.post(url, self.auditParams).then(function (resp) {
|
|
832
|
+
let result = resp.data
|
|
833
|
+
if (result.code === '200') {
|
|
834
|
+
setTimeout(() => {
|
|
835
|
+
self.loading = false
|
|
836
|
+
self.disable = false
|
|
837
|
+
self.$Message.success("审批成功");
|
|
838
|
+
if (self.executionCompleted) {
|
|
839
|
+
self.executionCompleted(true, result.data.processInstanceId, result.data.id);
|
|
840
|
+
}
|
|
841
|
+
bus.$emit('triggerTimer')
|
|
842
|
+
}, 500)
|
|
843
|
+
} else {
|
|
844
|
+
self.loading = false
|
|
845
|
+
self.disable = false
|
|
846
|
+
self.$Message.error(result.message)
|
|
847
|
+
if (self.executionCompleted) {
|
|
848
|
+
self.executionCompleted(false, null, null);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
})
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
selectNode(currentRow, oldCurrentRow) {
|
|
855
|
+
let self = this
|
|
856
|
+
self.targetTaskNode = currentRow.taskNode
|
|
857
|
+
},
|
|
858
|
+
|
|
859
|
+
getAllPreNodes() {
|
|
860
|
+
let self = this
|
|
861
|
+
let params = {
|
|
862
|
+
processDefId: self.procId,
|
|
863
|
+
taskId: self.taskId,
|
|
864
|
+
}
|
|
865
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getAllPreNodes', {params: params}).then(function (resp) {
|
|
866
|
+
if (resp.data.code === '200') {
|
|
867
|
+
if (resp.data.data.length > 0){
|
|
868
|
+
self.allNode = resp.data.data
|
|
869
|
+
self.modal1 = true
|
|
870
|
+
}else {
|
|
871
|
+
self.$Message.warning('当前流程无前序节点')
|
|
872
|
+
}
|
|
873
|
+
} else {
|
|
874
|
+
self.$Message.error(resp.data.message)
|
|
875
|
+
}
|
|
876
|
+
})
|
|
877
|
+
},
|
|
878
|
+
getNodesBehind() {
|
|
879
|
+
let self = this
|
|
880
|
+
let params = {
|
|
881
|
+
processDefId: self.procId,
|
|
882
|
+
taskId: self.taskId,
|
|
883
|
+
}
|
|
884
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getNodesBehind', {params: params}).then(function (resp) {
|
|
885
|
+
if (resp.data.code === '200') {
|
|
886
|
+
if (resp.data.data.length > 0){
|
|
887
|
+
self.allNode = resp.data.data
|
|
888
|
+
self.modal1 = true
|
|
889
|
+
}else {
|
|
890
|
+
self.$Message.warning('当前流程无后续节点')
|
|
891
|
+
}
|
|
892
|
+
} else {
|
|
893
|
+
self.$Message.error(resp.data.message)
|
|
894
|
+
}
|
|
895
|
+
})
|
|
896
|
+
},
|
|
897
|
+
handleSelectedUser(userId) {
|
|
898
|
+
// 处理选中的用户ID,比如将其保存到数据中或执行其他逻辑
|
|
899
|
+
this.selectedUserId = userId;
|
|
900
|
+
// if (userId == null || userId == '') {
|
|
901
|
+
// this.$refs['radio6'].currentValue = false;
|
|
902
|
+
// }
|
|
903
|
+
},
|
|
904
|
+
|
|
905
|
+
//折叠动画效果
|
|
906
|
+
beforeEnter(el) {
|
|
907
|
+
el.style.height = '0';
|
|
908
|
+
},
|
|
909
|
+
enter(el, done) {
|
|
910
|
+
setTimeout(() => {
|
|
911
|
+
el.style.height = el.scrollHeight + 'px';
|
|
912
|
+
}, 0);
|
|
913
|
+
|
|
914
|
+
el.addEventListener('transitionend', done);
|
|
915
|
+
},
|
|
916
|
+
beforeLeave(el) {
|
|
917
|
+
el.style.height = el.scrollHeight + 'px';
|
|
918
|
+
},
|
|
919
|
+
leave(el, done) {
|
|
920
|
+
setTimeout(() => {
|
|
921
|
+
el.style.height = '0';
|
|
922
|
+
}, 0);
|
|
923
|
+
|
|
924
|
+
el.addEventListener('transitionend', done);
|
|
925
|
+
},
|
|
926
|
+
uploadFile(file){
|
|
927
|
+
const self = this;
|
|
928
|
+
self.fileList = []
|
|
929
|
+
file.forEach(item => {
|
|
930
|
+
self.fileList.push({
|
|
931
|
+
fileName: item.fileName,
|
|
932
|
+
fileId: item.fileCode,
|
|
933
|
+
});
|
|
934
|
+
})
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
watch: {
|
|
938
|
+
auditOpinionText(label) {
|
|
939
|
+
this.auditOpinion = label;
|
|
940
|
+
},
|
|
941
|
+
procId(val) {
|
|
942
|
+
this.procId = val;
|
|
943
|
+
this.initData()
|
|
944
|
+
},
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
</script>
|
|
948
|
+
|
|
949
|
+
<style lang="less" scoped>
|
|
950
|
+
|
|
951
|
+
/deep/ .ivu-table-row-highlight td {
|
|
952
|
+
background-color: #50c1ff !important;
|
|
953
|
+
color: #fff !important;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.process-history {
|
|
957
|
+
height: 68vh;
|
|
958
|
+
width: 100%;
|
|
959
|
+
overflow-y: auto;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.process-history::-webkit-scrollbar {
|
|
963
|
+
width: 5px;
|
|
964
|
+
height: 5px;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.process-history::-webkit-scrollbar-thumb {
|
|
968
|
+
background: linear-gradient(to bottom right, #bbbbbb 0%, #bbbbbb 100%);
|
|
969
|
+
border-radius: 5px;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.box {
|
|
973
|
+
overflow: hidden;
|
|
974
|
+
transition: height 0.3s ease;
|
|
975
|
+
height: auto;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.draw-enter-active, .draw-leave-active {
|
|
979
|
+
|
|
980
|
+
}
|
|
981
|
+
.horizontal-audit{
|
|
982
|
+
overflow-y: auto;
|
|
983
|
+
}
|
|
984
|
+
.horizontal-audit::-webkit-scrollbar {
|
|
985
|
+
width: 5px;
|
|
986
|
+
height: 5px;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.horizontal-audit::-webkit-scrollbar-thumb {
|
|
990
|
+
background: linear-gradient(to bottom right, #bbbbbb 0%, #bbbbbb 100%);
|
|
991
|
+
border-radius: 5px;
|
|
992
|
+
}
|
|
993
|
+
.draw-enter, .draw-leave-to {
|
|
994
|
+
height: 0;
|
|
995
|
+
}
|
|
996
|
+
.sticky{
|
|
997
|
+
position: sticky;
|
|
998
|
+
bottom : 0;
|
|
999
|
+
z-index: 100;
|
|
1000
|
+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
1001
|
+
}
|
|
1002
|
+
</style>
|