@lambo-design/workflow-approve 1.0.0-beta.95 → 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 +2 -2
- 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/title.vue +24 -24
- package/src/horizontal.vue +1002 -1002
|
@@ -1,464 +1,464 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
|
|
4
|
-
<Timeline class="horizontalTimeline">
|
|
5
|
-
<TimelineItem v-for="(items,index) in itemList" :key="index" class="horizontalTimelineItem">
|
|
6
|
-
<template #dot>
|
|
7
|
-
<img v-if="items[0].auditResult === '30'" style="zoom: 18%" class="imgStyle" src="../../static/icons/tongguo1.png"
|
|
8
|
-
alt=""/>
|
|
9
|
-
<img v-else-if="items[0].auditResult === '40'" style="zoom: 15%" class="imgStyle"
|
|
10
|
-
src="../../static/icons/bohui1.png" alt=""/>
|
|
11
|
-
<img v-else-if="items[0].auditResult === '50'" style="zoom: 15%" class="imgStyle"
|
|
12
|
-
src="../../static/icons/bohui1.png" alt=""/>
|
|
13
|
-
<img v-else-if="items[0].auditResult === '60'" class="imgStyle" src="../../static/icons/bohui.png" alt=""/>
|
|
14
|
-
<img v-else-if="items[0].auditResult === '80'" style="zoom: 18%" class="imgStyle"
|
|
15
|
-
src="../../static/icons/tongguo1.png" alt=""/>
|
|
16
|
-
<img v-else style="zoom: 18%" class="imgStyle" src="../../static/icons/daiban.png" alt=""/>
|
|
17
|
-
</template>
|
|
18
|
-
<Collapse v-model="activeName" simple style="margin: -10px 0 0 -2px;border: none">
|
|
19
|
-
<Panel :name="'panel' + index">
|
|
20
|
-
<span class="title"> {{ items[0].taskName }}</span>
|
|
21
|
-
<template #content>
|
|
22
|
-
<div v-for="(item, index) in items" :key="index">
|
|
23
|
-
<div v-for="(itemListItem, itemListIndex) in item.auditName" :key="itemListIndex">
|
|
24
|
-
<Card dis-hover
|
|
25
|
-
class="horizontalCard"
|
|
26
|
-
:bordered="false">
|
|
27
|
-
<List item-layout="vertical">
|
|
28
|
-
<ListItem>
|
|
29
|
-
<Row style="display: flex; align-items: center;">
|
|
30
|
-
<!-- 左边:Avatar -->
|
|
31
|
-
<Col>
|
|
32
|
-
<avatar
|
|
33
|
-
class="horizontalAvatar"
|
|
34
|
-
icon="ios-person"
|
|
35
|
-
size="large"/>
|
|
36
|
-
</Col>
|
|
37
|
-
<!-- 右边:审批信息 -->
|
|
38
|
-
<Col span="17">
|
|
39
|
-
<Row>
|
|
40
|
-
<tooltip>
|
|
41
|
-
<span class="auditNameStyle"> {{ itemListItem }}</span>
|
|
42
|
-
<div slot="content" style="white-space: normal"> {{ itemListItem }}</div>
|
|
43
|
-
</tooltip>
|
|
44
|
-
<Divider style="background-color:#808695;height: 1em;margin: 4px 9px 0 6px;"
|
|
45
|
-
type="vertical"/>
|
|
46
|
-
<span v-if="item.auditOrganName"
|
|
47
|
-
class="auditNameStyle"> {{ item.auditOrganName[itemListIndex] }}</span>
|
|
48
|
-
<span class="auditDateStyle">
|
|
49
|
-
{{ item.startDate }}{{ item.auditDate }}
|
|
50
|
-
</span>
|
|
51
|
-
</Row>
|
|
52
|
-
<Row style="margin-top: 10px">
|
|
53
|
-
<span style="color: #19be6b; font-size: 13px;"
|
|
54
|
-
v-if="item.auditResult === '30'">通过</span>
|
|
55
|
-
<span style="color: #ed4014; font-size: 13px;"
|
|
56
|
-
v-else-if="item.auditResult === '40'">驳回到上一节点</span>
|
|
57
|
-
<span style="color: #ed4014; font-size: 13px;"
|
|
58
|
-
v-else-if="item.auditResult === '50'">驳回到原点</span>
|
|
59
|
-
<span style="color: #ed4014; font-size: 13px;"
|
|
60
|
-
v-else-if="item.auditResult === '60'">撤回</span>
|
|
61
|
-
<span style="color: #19be6b; font-size: 13px;"
|
|
62
|
-
v-else-if="item.auditResult === '80'">跳转到指定节点</span>
|
|
63
|
-
<span style="color: #19be6b; font-size: 13px;"
|
|
64
|
-
v-else-if="item.auditResult === '80'">驳回到指定节点</span>
|
|
65
|
-
<span style="color: #ff9900; font-size: 13px;" v-else>待审批</span>
|
|
66
|
-
<span style="color: #808695;font-size: 13px;margin-left: 10px"
|
|
67
|
-
v-if="item.auditComment">审批意见:</span>
|
|
68
|
-
<span style="color: #808695;font-size: 13px"
|
|
69
|
-
>{{ item.auditComment }}</span>
|
|
70
|
-
<template v-if="item.fileList && item.fileList.length > 0">
|
|
71
|
-
<a @click="openModal(item)" style="margin-left: 10px">查看附件</a>
|
|
72
|
-
</template>
|
|
73
|
-
</Row>
|
|
74
|
-
</Col>
|
|
75
|
-
<Col style="margin-right: 10px">
|
|
76
|
-
<template
|
|
77
|
-
v-if="displayPushButton && item.auditResult !== '30'&&item.auditResult !== '40'&&item.auditResult !== '50'&&item.auditResult !== '60'&&item.auditResult!=='80'">
|
|
78
|
-
<Button style="color:#d30000;border-color:#d30000;zoom: 120%;"
|
|
79
|
-
@click="pushHim(item,itemListItem,itemListIndex)">催一下
|
|
80
|
-
</Button>
|
|
81
|
-
</template>
|
|
82
|
-
</Col>
|
|
83
|
-
</Row>
|
|
84
|
-
|
|
85
|
-
</ListItem>
|
|
86
|
-
</List>
|
|
87
|
-
</Card>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</template>
|
|
91
|
-
</Panel>
|
|
92
|
-
</Collapse>
|
|
93
|
-
</TimelineItem>
|
|
94
|
-
</Timeline>
|
|
95
|
-
|
|
96
|
-
<Modal
|
|
97
|
-
v-model="showModal"
|
|
98
|
-
title="查看附件"
|
|
99
|
-
>
|
|
100
|
-
<Table border
|
|
101
|
-
:columns="attachmentColumn"
|
|
102
|
-
:data="fileList"
|
|
103
|
-
>
|
|
104
|
-
</Table>
|
|
105
|
-
</Modal>
|
|
106
|
-
<div v-if="0 < allGroupKeys.length">
|
|
107
|
-
<div v-show="arrowShow" class="arrow">
|
|
108
|
-
<a @click="arrowClick">
|
|
109
|
-
<Icon type="ios-arrow-down"/>
|
|
110
|
-
展开显示更多
|
|
111
|
-
</a>
|
|
112
|
-
</div>
|
|
113
|
-
<div v-show="!arrowShow" class="arrow">
|
|
114
|
-
<a @click="arrowClick">
|
|
115
|
-
<Icon type="ios-arrow-up"/>
|
|
116
|
-
收缩
|
|
117
|
-
</a>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<Modal title="查看附件" v-model="modalImg" fullscreen scrollable :mask="false">
|
|
121
|
-
<img :src="image" v-if="modalImg" alt="" style="width: 100%">
|
|
122
|
-
<div slot="footer">
|
|
123
|
-
<Button type="primary" @click="modalImg = false">关闭</Button>
|
|
124
|
-
</div>
|
|
125
|
-
</Modal>
|
|
126
|
-
<Modal title="查看附件" v-model="modalDocx" fullscreen scrollable :mask="false">
|
|
127
|
-
<div ref="file"></div>
|
|
128
|
-
</Modal>
|
|
129
|
-
</div>
|
|
130
|
-
</template>
|
|
131
|
-
|
|
132
|
-
<script>
|
|
133
|
-
import ajax from "@lambo-design/shared/utils/ajax";
|
|
134
|
-
import { operateBtn } from '@lambo-design/shared/utils/assist'
|
|
135
|
-
import axios from 'axios';
|
|
136
|
-
// 引入docx-preview插件
|
|
137
|
-
let docx = require('docx-preview');
|
|
138
|
-
export default {
|
|
139
|
-
components: {},
|
|
140
|
-
props: {
|
|
141
|
-
list: {
|
|
142
|
-
type: Array,
|
|
143
|
-
default: () => []
|
|
144
|
-
},
|
|
145
|
-
applyId: {
|
|
146
|
-
type: String,
|
|
147
|
-
default: ""
|
|
148
|
-
},
|
|
149
|
-
donePage: {
|
|
150
|
-
type: Boolean,
|
|
151
|
-
default: false
|
|
152
|
-
},
|
|
153
|
-
smartFlowServerContext: {
|
|
154
|
-
type: String,
|
|
155
|
-
default: '/api/smart-flow-server',
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
data() {
|
|
159
|
-
return {
|
|
160
|
-
allGroupKeys: [],
|
|
161
|
-
displayedList: [],
|
|
162
|
-
arrowShow: true, // 控制加载更多按钮的显示
|
|
163
|
-
activeName: 'panel0',
|
|
164
|
-
modalDocx: false,
|
|
165
|
-
setModals: {
|
|
166
|
-
modals: []
|
|
167
|
-
},
|
|
168
|
-
showModal: false,
|
|
169
|
-
fileList: [],
|
|
170
|
-
modalImg: false,
|
|
171
|
-
image: "",
|
|
172
|
-
itemList: {},
|
|
173
|
-
auditNameList: [],
|
|
174
|
-
displayPushButton: false,
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
computed: {
|
|
178
|
-
attachmentColumn: function () {
|
|
179
|
-
let column = [];
|
|
180
|
-
column.push({title: '序号', type: 'index', width: 70, align: 'center', fixed: 'left'});
|
|
181
|
-
column.push({
|
|
182
|
-
title: '附件名称', key: 'fileName', minWidth: 150, align: 'center', fixed: 'left',
|
|
183
|
-
render(h, {row}) {
|
|
184
|
-
const index = row.fileName.lastIndexOf(".");
|
|
185
|
-
const fileName = row.fileName.substr(0, index)
|
|
186
|
-
return h("span", fileName)
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
column.push({
|
|
191
|
-
title: '附件类型', width: 100, align: 'center', fixed: 'left',
|
|
192
|
-
render: (h, {row}) => {
|
|
193
|
-
const index = row.fileName.lastIndexOf(".");
|
|
194
|
-
const fileType = row.fileName.substr(index + 1)
|
|
195
|
-
return h("span", fileType)
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
column.push({
|
|
200
|
-
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
201
|
-
render: (h, {row}) => {
|
|
202
|
-
const index = row.fileName.lastIndexOf(".");
|
|
203
|
-
const fileType = row.fileName.substr(index + 1).toLowerCase()
|
|
204
|
-
// const typeList=['jpg','pdf','gif','png','docx']
|
|
205
|
-
//由于pdf预览显示乱码 暂时不提供pdf预览功能
|
|
206
|
-
const typeList = ['jpg', 'gif', 'png', 'docx']
|
|
207
|
-
if (typeList.indexOf(fileType) !== -1) {
|
|
208
|
-
return h("div", [
|
|
209
|
-
operateBtn(this, h, row, "下载", () => {
|
|
210
|
-
this.getAttach(row);
|
|
211
|
-
}, "primary"),
|
|
212
|
-
operateBtn(this, h, row, "预览", () => {
|
|
213
|
-
this.preViewAttach(row);
|
|
214
|
-
}, "primary")
|
|
215
|
-
]);
|
|
216
|
-
} else {
|
|
217
|
-
return h("div", [
|
|
218
|
-
operateBtn(this, h, row, "下载", () => {
|
|
219
|
-
this.getAttach(row);
|
|
220
|
-
}, "primary")
|
|
221
|
-
]);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
});
|
|
227
|
-
return column;
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
methods: {
|
|
231
|
-
pushHim(item, auditName, index) {
|
|
232
|
-
if (this.isDebouncing) {
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
this.isDebouncing = true;
|
|
237
|
-
// 设置一个延时,例如 1 秒,之后重置防抖状态
|
|
238
|
-
setTimeout(() => {
|
|
239
|
-
this.isDebouncing = false;
|
|
240
|
-
}, 2000);
|
|
241
|
-
|
|
242
|
-
let self = this;
|
|
243
|
-
let applyUserName = item.applyUser.split(":")[1];
|
|
244
|
-
let params = {
|
|
245
|
-
applyUserName: applyUserName,
|
|
246
|
-
auditName: auditName,
|
|
247
|
-
auditId: item.auditId[index],
|
|
248
|
-
procName: item.procName,
|
|
249
|
-
effectTime: item.startDate,
|
|
250
|
-
expireTime: item.warningDate,
|
|
251
|
-
};
|
|
252
|
-
let url = this.smartFlowServerContext + "/manage/processTodo/sendMessage";
|
|
253
|
-
ajax.post(url, params).then(function (resp) {
|
|
254
|
-
console.log("message ", resp);
|
|
255
|
-
if (resp.data.code == 200) {
|
|
256
|
-
self.$Message.success("催办成功");
|
|
257
|
-
} else {
|
|
258
|
-
self.$Message.error("催办失败");
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
},
|
|
262
|
-
getAttach(row) {
|
|
263
|
-
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
264
|
-
},
|
|
265
|
-
preViewAttach(row) {
|
|
266
|
-
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
267
|
-
let regs = /\.(pdf)$/
|
|
268
|
-
if (reg.test(row.fileName)) {
|
|
269
|
-
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
270
|
-
this.imgPreview(url);
|
|
271
|
-
} else if (regs.test(row.fileName)) {
|
|
272
|
-
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
273
|
-
} else {
|
|
274
|
-
this.modalDocx = true
|
|
275
|
-
axios({
|
|
276
|
-
method: 'get',
|
|
277
|
-
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
278
|
-
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
279
|
-
}).then(({data}) => {
|
|
280
|
-
docx.renderAsync(data, this.$refs.file, null, {
|
|
281
|
-
className: "docx", //默认和文档样式类的类名/前缀
|
|
282
|
-
inWrapper: true, //启用围绕文档内容呈现包装器
|
|
283
|
-
ignoreWidth: false, //禁用页面的渲染宽度
|
|
284
|
-
ignoreHeight: false, //禁用页面的渲染高度
|
|
285
|
-
ignoreFonts: false, //禁用字体渲染
|
|
286
|
-
breakPages: true, //在分页符上启用分页
|
|
287
|
-
ignoreLastRenderedPageBreak: true, //在lastRenderedPageBreak元素上禁用分页
|
|
288
|
-
experimental: false, //启用实验功能(制表符停止计算)
|
|
289
|
-
trimXmlDeclaration: true, //如果为true,则在解析之前将从xml文档中删除xml声明
|
|
290
|
-
useBase64URL: false, //如果为true,图像、字体等将转换为base 64 URL,否则使用URL.createObjectURL
|
|
291
|
-
useMathMLPolyfill: false, //包括用于铬、边等的MathML多填充。
|
|
292
|
-
showChanges: false, //启用文档更改的实验渲染(插入/删除)
|
|
293
|
-
debug: false, //启用额外的日志记录
|
|
294
|
-
})
|
|
295
|
-
}
|
|
296
|
-
)
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
//查看附件
|
|
300
|
-
imgPreview: function (img) {
|
|
301
|
-
this.modalImg = true
|
|
302
|
-
this.image = img;
|
|
303
|
-
},
|
|
304
|
-
arrowClick() {
|
|
305
|
-
if (this.itemList.length > 0) {
|
|
306
|
-
if (this.arrowShow) {
|
|
307
|
-
// 显示全部
|
|
308
|
-
this.displayedList = this.itemList;
|
|
309
|
-
this.arrowShow = false;
|
|
310
|
-
} else {
|
|
311
|
-
// 只显示两个
|
|
312
|
-
this.displayedList = this.itemList.slice(0, 2);
|
|
313
|
-
this.arrowShow = true;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
openModal(item) {
|
|
318
|
-
this.fileList = item.fileList
|
|
319
|
-
this.showModal = true
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
mounted() {
|
|
323
|
-
this.displayPushButton = this.donePage;
|
|
324
|
-
this.itemList = this.list;
|
|
325
|
-
if (this.itemList.length > 0) {
|
|
326
|
-
this.displayedList = this.itemList.slice(0, 2);
|
|
327
|
-
// 初始化modals
|
|
328
|
-
this.setModals.modals = this.itemList.map(() => ({value: false}));
|
|
329
|
-
this.activeName = 'panel0';
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
watch: {
|
|
333
|
-
list: function (newValue) {
|
|
334
|
-
this.$nextTick(() => {
|
|
335
|
-
this.itemList = newValue;
|
|
336
|
-
if (this.itemList.length > 0) {
|
|
337
|
-
this.displayedList = this.itemList.slice(0, 2);
|
|
338
|
-
this.setModals.modals = this.itemList.map(() => ({value: false}));
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
</script>
|
|
348
|
-
|
|
349
|
-
<style scoped>
|
|
350
|
-
.arrow {
|
|
351
|
-
display: flex;
|
|
352
|
-
justify-content: center;
|
|
353
|
-
align-items: center;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.fontType {
|
|
357
|
-
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
358
|
-
font-weight: bold;
|
|
359
|
-
color: #657180;
|
|
360
|
-
font-size: 14px
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.title {
|
|
364
|
-
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
365
|
-
font-weight: bold;
|
|
366
|
-
color: #515a6e;
|
|
367
|
-
font-size: 14px;
|
|
368
|
-
margin: 0 1vh 0 -2vh;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.imgStyle {
|
|
372
|
-
margin: 0 0 0 -5px;
|
|
373
|
-
zoom: 60%;
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.cardStyle {
|
|
378
|
-
background-color: #bbbbbb;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.auditNameStyle {
|
|
382
|
-
margin-bottom: -5px;
|
|
383
|
-
white-space: nowrap;
|
|
384
|
-
display: inline-block;
|
|
385
|
-
max-width: 100px;
|
|
386
|
-
font-size: 14px;
|
|
387
|
-
color: #17233d;
|
|
388
|
-
overflow: hidden;
|
|
389
|
-
text-overflow: ellipsis;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.auditDateStyle {
|
|
393
|
-
white-space: nowrap;
|
|
394
|
-
display: inline-block;
|
|
395
|
-
max-width: 100px;
|
|
396
|
-
font-size: 14px;
|
|
397
|
-
color: #808695;
|
|
398
|
-
margin-left: 10px;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.horizontalTimelineItem {
|
|
402
|
-
margin-bottom: 30px !important;
|
|
403
|
-
}
|
|
404
|
-
.portraitTimelineItem {
|
|
405
|
-
margin-bottom: -10px !important;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/deep/ .docx {
|
|
409
|
-
width: 100% !important;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
/deep/ .ivu-timeline-item-tail {
|
|
413
|
-
border-style: dashed;
|
|
414
|
-
border-left: none;
|
|
415
|
-
border-color: #bbbbbb;
|
|
416
|
-
border-width: thin;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.horizontalTimeline {
|
|
420
|
-
margin: 4vh 0 0 10vh
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.portraitTimeline {
|
|
424
|
-
margin: 0 0 0 0
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.horizontalCard {
|
|
428
|
-
background-color: #f1f1f1;
|
|
429
|
-
border-radius: 10px;
|
|
430
|
-
margin-top: 10px;
|
|
431
|
-
width: 150vh;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.portraitCard {
|
|
435
|
-
background-color: #f1f1f1;
|
|
436
|
-
border-radius: 10px;
|
|
437
|
-
width: auto;
|
|
438
|
-
margin-left: -15px;
|
|
439
|
-
margin-right: -25px;
|
|
440
|
-
margin-bottom: 5px;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.horizontalAvatar {
|
|
444
|
-
margin: 0 30px 0 5px;
|
|
445
|
-
zoom: 200%
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
.portraitAvatarLarge {
|
|
449
|
-
margin: 0 20px 0 0;
|
|
450
|
-
zoom: 200%
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.portraitAvatarSmall {
|
|
454
|
-
margin: 0 5px 0 0;
|
|
455
|
-
zoom: 200%
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.portraitAuditDateStyle{
|
|
459
|
-
white-space: nowrap;
|
|
460
|
-
max-width: 100px;
|
|
461
|
-
font-size: 14px;
|
|
462
|
-
color: #808695;
|
|
463
|
-
}
|
|
464
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<Timeline class="horizontalTimeline">
|
|
5
|
+
<TimelineItem v-for="(items,index) in itemList" :key="index" class="horizontalTimelineItem">
|
|
6
|
+
<template #dot>
|
|
7
|
+
<img v-if="items[0].auditResult === '30'" style="zoom: 18%" class="imgStyle" src="../../static/icons/tongguo1.png"
|
|
8
|
+
alt=""/>
|
|
9
|
+
<img v-else-if="items[0].auditResult === '40'" style="zoom: 15%" class="imgStyle"
|
|
10
|
+
src="../../static/icons/bohui1.png" alt=""/>
|
|
11
|
+
<img v-else-if="items[0].auditResult === '50'" style="zoom: 15%" class="imgStyle"
|
|
12
|
+
src="../../static/icons/bohui1.png" alt=""/>
|
|
13
|
+
<img v-else-if="items[0].auditResult === '60'" class="imgStyle" src="../../static/icons/bohui.png" alt=""/>
|
|
14
|
+
<img v-else-if="items[0].auditResult === '80'" style="zoom: 18%" class="imgStyle"
|
|
15
|
+
src="../../static/icons/tongguo1.png" alt=""/>
|
|
16
|
+
<img v-else style="zoom: 18%" class="imgStyle" src="../../static/icons/daiban.png" alt=""/>
|
|
17
|
+
</template>
|
|
18
|
+
<Collapse v-model="activeName" simple style="margin: -10px 0 0 -2px;border: none">
|
|
19
|
+
<Panel :name="'panel' + index">
|
|
20
|
+
<span class="title"> {{ items[0].taskName }}</span>
|
|
21
|
+
<template #content>
|
|
22
|
+
<div v-for="(item, index) in items" :key="index">
|
|
23
|
+
<div v-for="(itemListItem, itemListIndex) in item.auditName" :key="itemListIndex">
|
|
24
|
+
<Card dis-hover
|
|
25
|
+
class="horizontalCard"
|
|
26
|
+
:bordered="false">
|
|
27
|
+
<List item-layout="vertical">
|
|
28
|
+
<ListItem>
|
|
29
|
+
<Row style="display: flex; align-items: center;">
|
|
30
|
+
<!-- 左边:Avatar -->
|
|
31
|
+
<Col>
|
|
32
|
+
<avatar
|
|
33
|
+
class="horizontalAvatar"
|
|
34
|
+
icon="ios-person"
|
|
35
|
+
size="large"/>
|
|
36
|
+
</Col>
|
|
37
|
+
<!-- 右边:审批信息 -->
|
|
38
|
+
<Col span="17">
|
|
39
|
+
<Row>
|
|
40
|
+
<tooltip>
|
|
41
|
+
<span class="auditNameStyle"> {{ itemListItem }}</span>
|
|
42
|
+
<div slot="content" style="white-space: normal"> {{ itemListItem }}</div>
|
|
43
|
+
</tooltip>
|
|
44
|
+
<Divider style="background-color:#808695;height: 1em;margin: 4px 9px 0 6px;"
|
|
45
|
+
type="vertical"/>
|
|
46
|
+
<span v-if="item.auditOrganName"
|
|
47
|
+
class="auditNameStyle"> {{ item.auditOrganName[itemListIndex] }}</span>
|
|
48
|
+
<span class="auditDateStyle">
|
|
49
|
+
{{ item.startDate }}{{ item.auditDate }}
|
|
50
|
+
</span>
|
|
51
|
+
</Row>
|
|
52
|
+
<Row style="margin-top: 10px">
|
|
53
|
+
<span style="color: #19be6b; font-size: 13px;"
|
|
54
|
+
v-if="item.auditResult === '30'">通过</span>
|
|
55
|
+
<span style="color: #ed4014; font-size: 13px;"
|
|
56
|
+
v-else-if="item.auditResult === '40'">驳回到上一节点</span>
|
|
57
|
+
<span style="color: #ed4014; font-size: 13px;"
|
|
58
|
+
v-else-if="item.auditResult === '50'">驳回到原点</span>
|
|
59
|
+
<span style="color: #ed4014; font-size: 13px;"
|
|
60
|
+
v-else-if="item.auditResult === '60'">撤回</span>
|
|
61
|
+
<span style="color: #19be6b; font-size: 13px;"
|
|
62
|
+
v-else-if="item.auditResult === '80'">跳转到指定节点</span>
|
|
63
|
+
<span style="color: #19be6b; font-size: 13px;"
|
|
64
|
+
v-else-if="item.auditResult === '80'">驳回到指定节点</span>
|
|
65
|
+
<span style="color: #ff9900; font-size: 13px;" v-else>待审批</span>
|
|
66
|
+
<span style="color: #808695;font-size: 13px;margin-left: 10px"
|
|
67
|
+
v-if="item.auditComment">审批意见:</span>
|
|
68
|
+
<span style="color: #808695;font-size: 13px"
|
|
69
|
+
>{{ item.auditComment }}</span>
|
|
70
|
+
<template v-if="item.fileList && item.fileList.length > 0">
|
|
71
|
+
<a @click="openModal(item)" style="margin-left: 10px">查看附件</a>
|
|
72
|
+
</template>
|
|
73
|
+
</Row>
|
|
74
|
+
</Col>
|
|
75
|
+
<Col style="margin-right: 10px">
|
|
76
|
+
<template
|
|
77
|
+
v-if="displayPushButton && item.auditResult !== '30'&&item.auditResult !== '40'&&item.auditResult !== '50'&&item.auditResult !== '60'&&item.auditResult!=='80'">
|
|
78
|
+
<Button style="color:#d30000;border-color:#d30000;zoom: 120%;"
|
|
79
|
+
@click="pushHim(item,itemListItem,itemListIndex)">催一下
|
|
80
|
+
</Button>
|
|
81
|
+
</template>
|
|
82
|
+
</Col>
|
|
83
|
+
</Row>
|
|
84
|
+
|
|
85
|
+
</ListItem>
|
|
86
|
+
</List>
|
|
87
|
+
</Card>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
</Panel>
|
|
92
|
+
</Collapse>
|
|
93
|
+
</TimelineItem>
|
|
94
|
+
</Timeline>
|
|
95
|
+
|
|
96
|
+
<Modal
|
|
97
|
+
v-model="showModal"
|
|
98
|
+
title="查看附件"
|
|
99
|
+
>
|
|
100
|
+
<Table border
|
|
101
|
+
:columns="attachmentColumn"
|
|
102
|
+
:data="fileList"
|
|
103
|
+
>
|
|
104
|
+
</Table>
|
|
105
|
+
</Modal>
|
|
106
|
+
<div v-if="0 < allGroupKeys.length">
|
|
107
|
+
<div v-show="arrowShow" class="arrow">
|
|
108
|
+
<a @click="arrowClick">
|
|
109
|
+
<Icon type="ios-arrow-down"/>
|
|
110
|
+
展开显示更多
|
|
111
|
+
</a>
|
|
112
|
+
</div>
|
|
113
|
+
<div v-show="!arrowShow" class="arrow">
|
|
114
|
+
<a @click="arrowClick">
|
|
115
|
+
<Icon type="ios-arrow-up"/>
|
|
116
|
+
收缩
|
|
117
|
+
</a>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<Modal title="查看附件" v-model="modalImg" fullscreen scrollable :mask="false">
|
|
121
|
+
<img :src="image" v-if="modalImg" alt="" style="width: 100%">
|
|
122
|
+
<div slot="footer">
|
|
123
|
+
<Button type="primary" @click="modalImg = false">关闭</Button>
|
|
124
|
+
</div>
|
|
125
|
+
</Modal>
|
|
126
|
+
<Modal title="查看附件" v-model="modalDocx" fullscreen scrollable :mask="false">
|
|
127
|
+
<div ref="file"></div>
|
|
128
|
+
</Modal>
|
|
129
|
+
</div>
|
|
130
|
+
</template>
|
|
131
|
+
|
|
132
|
+
<script>
|
|
133
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
134
|
+
import { operateBtn } from '@lambo-design/shared/utils/assist'
|
|
135
|
+
import axios from 'axios';
|
|
136
|
+
// 引入docx-preview插件
|
|
137
|
+
let docx = require('docx-preview');
|
|
138
|
+
export default {
|
|
139
|
+
components: {},
|
|
140
|
+
props: {
|
|
141
|
+
list: {
|
|
142
|
+
type: Array,
|
|
143
|
+
default: () => []
|
|
144
|
+
},
|
|
145
|
+
applyId: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: ""
|
|
148
|
+
},
|
|
149
|
+
donePage: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: false
|
|
152
|
+
},
|
|
153
|
+
smartFlowServerContext: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: '/api/smart-flow-server',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
data() {
|
|
159
|
+
return {
|
|
160
|
+
allGroupKeys: [],
|
|
161
|
+
displayedList: [],
|
|
162
|
+
arrowShow: true, // 控制加载更多按钮的显示
|
|
163
|
+
activeName: 'panel0',
|
|
164
|
+
modalDocx: false,
|
|
165
|
+
setModals: {
|
|
166
|
+
modals: []
|
|
167
|
+
},
|
|
168
|
+
showModal: false,
|
|
169
|
+
fileList: [],
|
|
170
|
+
modalImg: false,
|
|
171
|
+
image: "",
|
|
172
|
+
itemList: {},
|
|
173
|
+
auditNameList: [],
|
|
174
|
+
displayPushButton: false,
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
computed: {
|
|
178
|
+
attachmentColumn: function () {
|
|
179
|
+
let column = [];
|
|
180
|
+
column.push({title: '序号', type: 'index', width: 70, align: 'center', fixed: 'left'});
|
|
181
|
+
column.push({
|
|
182
|
+
title: '附件名称', key: 'fileName', minWidth: 150, align: 'center', fixed: 'left',
|
|
183
|
+
render(h, {row}) {
|
|
184
|
+
const index = row.fileName.lastIndexOf(".");
|
|
185
|
+
const fileName = row.fileName.substr(0, index)
|
|
186
|
+
return h("span", fileName)
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
column.push({
|
|
191
|
+
title: '附件类型', width: 100, align: 'center', fixed: 'left',
|
|
192
|
+
render: (h, {row}) => {
|
|
193
|
+
const index = row.fileName.lastIndexOf(".");
|
|
194
|
+
const fileType = row.fileName.substr(index + 1)
|
|
195
|
+
return h("span", fileType)
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
column.push({
|
|
200
|
+
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
201
|
+
render: (h, {row}) => {
|
|
202
|
+
const index = row.fileName.lastIndexOf(".");
|
|
203
|
+
const fileType = row.fileName.substr(index + 1).toLowerCase()
|
|
204
|
+
// const typeList=['jpg','pdf','gif','png','docx']
|
|
205
|
+
//由于pdf预览显示乱码 暂时不提供pdf预览功能
|
|
206
|
+
const typeList = ['jpg', 'gif', 'png', 'docx']
|
|
207
|
+
if (typeList.indexOf(fileType) !== -1) {
|
|
208
|
+
return h("div", [
|
|
209
|
+
operateBtn(this, h, row, "下载", () => {
|
|
210
|
+
this.getAttach(row);
|
|
211
|
+
}, "primary"),
|
|
212
|
+
operateBtn(this, h, row, "预览", () => {
|
|
213
|
+
this.preViewAttach(row);
|
|
214
|
+
}, "primary")
|
|
215
|
+
]);
|
|
216
|
+
} else {
|
|
217
|
+
return h("div", [
|
|
218
|
+
operateBtn(this, h, row, "下载", () => {
|
|
219
|
+
this.getAttach(row);
|
|
220
|
+
}, "primary")
|
|
221
|
+
]);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
});
|
|
227
|
+
return column;
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
methods: {
|
|
231
|
+
pushHim(item, auditName, index) {
|
|
232
|
+
if (this.isDebouncing) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
this.isDebouncing = true;
|
|
237
|
+
// 设置一个延时,例如 1 秒,之后重置防抖状态
|
|
238
|
+
setTimeout(() => {
|
|
239
|
+
this.isDebouncing = false;
|
|
240
|
+
}, 2000);
|
|
241
|
+
|
|
242
|
+
let self = this;
|
|
243
|
+
let applyUserName = item.applyUser.split(":")[1];
|
|
244
|
+
let params = {
|
|
245
|
+
applyUserName: applyUserName,
|
|
246
|
+
auditName: auditName,
|
|
247
|
+
auditId: item.auditId[index],
|
|
248
|
+
procName: item.procName,
|
|
249
|
+
effectTime: item.startDate,
|
|
250
|
+
expireTime: item.warningDate,
|
|
251
|
+
};
|
|
252
|
+
let url = this.smartFlowServerContext + "/manage/processTodo/sendMessage";
|
|
253
|
+
ajax.post(url, params).then(function (resp) {
|
|
254
|
+
console.log("message ", resp);
|
|
255
|
+
if (resp.data.code == 200) {
|
|
256
|
+
self.$Message.success("催办成功");
|
|
257
|
+
} else {
|
|
258
|
+
self.$Message.error("催办失败");
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
},
|
|
262
|
+
getAttach(row) {
|
|
263
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
264
|
+
},
|
|
265
|
+
preViewAttach(row) {
|
|
266
|
+
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
267
|
+
let regs = /\.(pdf)$/
|
|
268
|
+
if (reg.test(row.fileName)) {
|
|
269
|
+
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
270
|
+
this.imgPreview(url);
|
|
271
|
+
} else if (regs.test(row.fileName)) {
|
|
272
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
273
|
+
} else {
|
|
274
|
+
this.modalDocx = true
|
|
275
|
+
axios({
|
|
276
|
+
method: 'get',
|
|
277
|
+
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
278
|
+
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
279
|
+
}).then(({data}) => {
|
|
280
|
+
docx.renderAsync(data, this.$refs.file, null, {
|
|
281
|
+
className: "docx", //默认和文档样式类的类名/前缀
|
|
282
|
+
inWrapper: true, //启用围绕文档内容呈现包装器
|
|
283
|
+
ignoreWidth: false, //禁用页面的渲染宽度
|
|
284
|
+
ignoreHeight: false, //禁用页面的渲染高度
|
|
285
|
+
ignoreFonts: false, //禁用字体渲染
|
|
286
|
+
breakPages: true, //在分页符上启用分页
|
|
287
|
+
ignoreLastRenderedPageBreak: true, //在lastRenderedPageBreak元素上禁用分页
|
|
288
|
+
experimental: false, //启用实验功能(制表符停止计算)
|
|
289
|
+
trimXmlDeclaration: true, //如果为true,则在解析之前将从xml文档中删除xml声明
|
|
290
|
+
useBase64URL: false, //如果为true,图像、字体等将转换为base 64 URL,否则使用URL.createObjectURL
|
|
291
|
+
useMathMLPolyfill: false, //包括用于铬、边等的MathML多填充。
|
|
292
|
+
showChanges: false, //启用文档更改的实验渲染(插入/删除)
|
|
293
|
+
debug: false, //启用额外的日志记录
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
//查看附件
|
|
300
|
+
imgPreview: function (img) {
|
|
301
|
+
this.modalImg = true
|
|
302
|
+
this.image = img;
|
|
303
|
+
},
|
|
304
|
+
arrowClick() {
|
|
305
|
+
if (this.itemList.length > 0) {
|
|
306
|
+
if (this.arrowShow) {
|
|
307
|
+
// 显示全部
|
|
308
|
+
this.displayedList = this.itemList;
|
|
309
|
+
this.arrowShow = false;
|
|
310
|
+
} else {
|
|
311
|
+
// 只显示两个
|
|
312
|
+
this.displayedList = this.itemList.slice(0, 2);
|
|
313
|
+
this.arrowShow = true;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
openModal(item) {
|
|
318
|
+
this.fileList = item.fileList
|
|
319
|
+
this.showModal = true
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
mounted() {
|
|
323
|
+
this.displayPushButton = this.donePage;
|
|
324
|
+
this.itemList = this.list;
|
|
325
|
+
if (this.itemList.length > 0) {
|
|
326
|
+
this.displayedList = this.itemList.slice(0, 2);
|
|
327
|
+
// 初始化modals
|
|
328
|
+
this.setModals.modals = this.itemList.map(() => ({value: false}));
|
|
329
|
+
this.activeName = 'panel0';
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
watch: {
|
|
333
|
+
list: function (newValue) {
|
|
334
|
+
this.$nextTick(() => {
|
|
335
|
+
this.itemList = newValue;
|
|
336
|
+
if (this.itemList.length > 0) {
|
|
337
|
+
this.displayedList = this.itemList.slice(0, 2);
|
|
338
|
+
this.setModals.modals = this.itemList.map(() => ({value: false}));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
}
|
|
347
|
+
</script>
|
|
348
|
+
|
|
349
|
+
<style scoped>
|
|
350
|
+
.arrow {
|
|
351
|
+
display: flex;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
align-items: center;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.fontType {
|
|
357
|
+
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
358
|
+
font-weight: bold;
|
|
359
|
+
color: #657180;
|
|
360
|
+
font-size: 14px
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.title {
|
|
364
|
+
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
365
|
+
font-weight: bold;
|
|
366
|
+
color: #515a6e;
|
|
367
|
+
font-size: 14px;
|
|
368
|
+
margin: 0 1vh 0 -2vh;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.imgStyle {
|
|
372
|
+
margin: 0 0 0 -5px;
|
|
373
|
+
zoom: 60%;
|
|
374
|
+
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.cardStyle {
|
|
378
|
+
background-color: #bbbbbb;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.auditNameStyle {
|
|
382
|
+
margin-bottom: -5px;
|
|
383
|
+
white-space: nowrap;
|
|
384
|
+
display: inline-block;
|
|
385
|
+
max-width: 100px;
|
|
386
|
+
font-size: 14px;
|
|
387
|
+
color: #17233d;
|
|
388
|
+
overflow: hidden;
|
|
389
|
+
text-overflow: ellipsis;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.auditDateStyle {
|
|
393
|
+
white-space: nowrap;
|
|
394
|
+
display: inline-block;
|
|
395
|
+
max-width: 100px;
|
|
396
|
+
font-size: 14px;
|
|
397
|
+
color: #808695;
|
|
398
|
+
margin-left: 10px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.horizontalTimelineItem {
|
|
402
|
+
margin-bottom: 30px !important;
|
|
403
|
+
}
|
|
404
|
+
.portraitTimelineItem {
|
|
405
|
+
margin-bottom: -10px !important;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/deep/ .docx {
|
|
409
|
+
width: 100% !important;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/deep/ .ivu-timeline-item-tail {
|
|
413
|
+
border-style: dashed;
|
|
414
|
+
border-left: none;
|
|
415
|
+
border-color: #bbbbbb;
|
|
416
|
+
border-width: thin;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.horizontalTimeline {
|
|
420
|
+
margin: 4vh 0 0 10vh
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.portraitTimeline {
|
|
424
|
+
margin: 0 0 0 0
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.horizontalCard {
|
|
428
|
+
background-color: #f1f1f1;
|
|
429
|
+
border-radius: 10px;
|
|
430
|
+
margin-top: 10px;
|
|
431
|
+
width: 150vh;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.portraitCard {
|
|
435
|
+
background-color: #f1f1f1;
|
|
436
|
+
border-radius: 10px;
|
|
437
|
+
width: auto;
|
|
438
|
+
margin-left: -15px;
|
|
439
|
+
margin-right: -25px;
|
|
440
|
+
margin-bottom: 5px;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.horizontalAvatar {
|
|
444
|
+
margin: 0 30px 0 5px;
|
|
445
|
+
zoom: 200%
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.portraitAvatarLarge {
|
|
449
|
+
margin: 0 20px 0 0;
|
|
450
|
+
zoom: 200%
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.portraitAvatarSmall {
|
|
454
|
+
margin: 0 5px 0 0;
|
|
455
|
+
zoom: 200%
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.portraitAuditDateStyle{
|
|
459
|
+
white-space: nowrap;
|
|
460
|
+
max-width: 100px;
|
|
461
|
+
font-size: 14px;
|
|
462
|
+
color: #808695;
|
|
463
|
+
}
|
|
464
|
+
</style>
|