@lambo-design/workflow-approve 1.0.0-beta.2 → 1.0.0-beta.4
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/history.vue +17 -147
- package/src/components/{attachment.vue → horizontal/attachment.vue} +0 -4
- package/src/components/horizontal/history.vue +4 -8
- package/src/components/opinion.vue +46 -133
- package/src/horizontal.vue +97 -109
- package/src/portrait.vue +83 -332
- package/src/styles/css/index.less +221 -0
- package/src/workflow-diagram.vue +3 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/workflow-approve",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"axios": "^0.24.0",
|
|
14
14
|
"axios-cache-plugin": "^0.1.0",
|
|
15
15
|
"@lambo-design/core": "^4.7.1-beta.139",
|
|
16
|
-
"@lambo-design/shared": "^1.0.0-beta.
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.199"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"bpmn-js": "^7.3.1",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
|
|
4
|
-
<Timeline
|
|
5
|
-
<TimelineItem v-for="(items,index) in itemList" :key="index"
|
|
4
|
+
<Timeline class="portrait-timeline">
|
|
5
|
+
<TimelineItem v-for="(items,index) in itemList" :key="index" class="portrait-timeline-item">
|
|
6
6
|
<template #dot>
|
|
7
7
|
<div v-if="items[0].auditResult === '30' || items[0].auditResult === '80'" class="cicle" style="background-color: #005aff"></div>
|
|
8
8
|
<div v-else-if="items[0].auditResult === '40' || items[0].auditResult === '50'" class="cicle" style="background-color: #ffcc66"></div>
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
<Collapse v-model="activeName" simple style="margin: -10px 0 0 -2px;border: none">
|
|
13
13
|
<Panel :name="'panel' + index" hide-arrow>
|
|
14
|
-
<span class="title"> {{ items[0].taskName }}</span>
|
|
14
|
+
<span class="history-title"> {{ items[0].taskName }}</span>
|
|
15
15
|
<template #content>
|
|
16
16
|
<div v-for="(item, index) in items" :key="index">
|
|
17
17
|
<div v-for="(itemListItem, itemListIndex) in item.auditName" :key="itemListIndex">
|
|
18
18
|
<Card dis-hover
|
|
19
|
-
|
|
19
|
+
class="portrait-card"
|
|
20
20
|
:bordered="false">
|
|
21
21
|
<List item-layout="vertical">
|
|
22
22
|
<ListItem>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<!-- 左边:Avatar -->
|
|
25
25
|
<Col>
|
|
26
26
|
<avatar
|
|
27
|
-
:class="portraitWidth
|
|
27
|
+
:class="portraitWidth >= 600 ? 'portrait-avatar-large' : 'portrait-avatar-small'"
|
|
28
28
|
size="small">
|
|
29
29
|
{{ getFirstName(itemListItem) }}</avatar>
|
|
30
30
|
</Col>
|
|
@@ -32,22 +32,21 @@
|
|
|
32
32
|
<Col span="17">
|
|
33
33
|
<Row>
|
|
34
34
|
<tooltip>
|
|
35
|
-
<span class="
|
|
35
|
+
<span class="audit-name-style"> {{ itemListItem }}</span>
|
|
36
36
|
<div slot="content" style="white-space: normal"> {{ itemListItem }}</div>
|
|
37
37
|
</tooltip>
|
|
38
38
|
<Divider style="background-color:#808695;height: 1em;margin: 4px 9px 0 6px;"
|
|
39
39
|
type="vertical"/>
|
|
40
40
|
<span v-if="item.auditOrganName"
|
|
41
|
-
class="
|
|
42
|
-
<span v-if="portraitWidth === 0 || portraitWidth >= 600" class="
|
|
41
|
+
class="audit-name-style"> {{ item.auditOrganName[itemListIndex] }}</span>
|
|
42
|
+
<span v-if="portraitWidth === 0 || portraitWidth >= 600" class="audit-date-style">
|
|
43
43
|
{{ item.startDate }}{{ item.auditDate }}
|
|
44
44
|
</span>
|
|
45
45
|
</Row>
|
|
46
46
|
<Row v-if="item.auditComment">
|
|
47
|
-
<span class="
|
|
47
|
+
<span class="audit-name-style">{{ item.auditComment }}</span>
|
|
48
48
|
</Row>
|
|
49
|
-
|
|
50
|
-
<Row v-if="portraitWidth < 600" class="portraitAuditDateStyle">{{showDate(item)}}{{ item.startDate }}{{ item.auditDate }}</Row>
|
|
49
|
+
<Row v-if="portraitWidth < 600" class="portrait-audit-date-style">{{showDate(item)}}{{ item.startDate }}{{ item.auditDate }}</Row>
|
|
51
50
|
<Row style="margin-top: 10px">
|
|
52
51
|
<Col span="12">
|
|
53
52
|
<span style="color: #005aff;; font-size: 13px;"
|
|
@@ -152,10 +151,6 @@ export default {
|
|
|
152
151
|
type: String,
|
|
153
152
|
default: '/api/smart-flow-server',
|
|
154
153
|
},
|
|
155
|
-
ossServerContext: {
|
|
156
|
-
type: String,
|
|
157
|
-
default: '/api/oss-server',
|
|
158
|
-
},
|
|
159
154
|
},
|
|
160
155
|
data() {
|
|
161
156
|
return {
|
|
@@ -203,9 +198,7 @@ export default {
|
|
|
203
198
|
render: (h, {row}) => {
|
|
204
199
|
const index = row.fileName.lastIndexOf(".");
|
|
205
200
|
const fileType = row.fileName.substr(index + 1).toLowerCase()
|
|
206
|
-
|
|
207
|
-
//由于pdf预览显示乱码 暂时不提供pdf预览功能
|
|
208
|
-
const typeList = ['jpg', 'gif', 'png', 'docx']
|
|
201
|
+
const typeList=['jpg','gif','png','docx']
|
|
209
202
|
if (typeList.indexOf(fileType) !== -1) {
|
|
210
203
|
return h("div", [
|
|
211
204
|
operateHref(this, h, row, "下载", () => {
|
|
@@ -251,7 +244,7 @@ export default {
|
|
|
251
244
|
effectTime: item.startDate,
|
|
252
245
|
expireTime: item.warningDate,
|
|
253
246
|
};
|
|
254
|
-
let url =
|
|
247
|
+
let url = self.smartFlowServerContext + "/manage/processTodo/sendMessage";
|
|
255
248
|
ajax.post(url, params).then(function (resp) {
|
|
256
249
|
console.log("message ", resp);
|
|
257
250
|
if (resp.data.code == 200) {
|
|
@@ -262,22 +255,22 @@ export default {
|
|
|
262
255
|
});
|
|
263
256
|
},
|
|
264
257
|
getAttach(row) {
|
|
265
|
-
window.open(this.
|
|
258
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
266
259
|
},
|
|
267
260
|
preViewAttach(row) {
|
|
268
261
|
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
269
262
|
let regs = /\.(pdf)$/
|
|
270
263
|
if (reg.test(row.fileName)) {
|
|
271
|
-
let url = this.
|
|
264
|
+
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
272
265
|
this.imgPreview(url);
|
|
273
266
|
} else if (regs.test(row.fileName)) {
|
|
274
|
-
window.open(this.
|
|
267
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
275
268
|
} else {
|
|
276
269
|
this.modalDocx = true
|
|
277
270
|
axios({
|
|
278
271
|
method: 'get',
|
|
279
272
|
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
280
|
-
url: this.
|
|
273
|
+
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
281
274
|
}).then(({data}) => {
|
|
282
275
|
docx.renderAsync(data, this.$refs.file, null, {
|
|
283
276
|
className: "docx", //默认和文档样式类的类名/前缀
|
|
@@ -358,70 +351,7 @@ export default {
|
|
|
358
351
|
</script>
|
|
359
352
|
|
|
360
353
|
<style scoped>
|
|
361
|
-
.
|
|
362
|
-
display: flex;
|
|
363
|
-
justify-content: center;
|
|
364
|
-
align-items: center;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.fontType {
|
|
368
|
-
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
369
|
-
font-weight: bold;
|
|
370
|
-
color: #657180;
|
|
371
|
-
font-size: 14px
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.title {
|
|
375
|
-
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
376
|
-
font-weight: bold;
|
|
377
|
-
color: #515a6e;
|
|
378
|
-
font-size: 14px;
|
|
379
|
-
margin: 0 1vh 0 -2vh;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.imgStyle {
|
|
383
|
-
margin: 0 0 0 -5px;
|
|
384
|
-
zoom: 60%;
|
|
385
|
-
|
|
386
|
-
}
|
|
387
|
-
.cicle{
|
|
388
|
-
margin-left: 12px;
|
|
389
|
-
width: 15px;
|
|
390
|
-
height: 15px;
|
|
391
|
-
border-radius: 50%;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.cardStyle {
|
|
395
|
-
background-color: #bbbbbb;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.auditNameStyle {
|
|
399
|
-
margin-bottom: -5px;
|
|
400
|
-
white-space: nowrap;
|
|
401
|
-
display: inline-block;
|
|
402
|
-
max-width: 100px;
|
|
403
|
-
font-size: 14px;
|
|
404
|
-
color: #17233d;
|
|
405
|
-
overflow: hidden;
|
|
406
|
-
text-overflow: ellipsis;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.auditDateStyle {
|
|
410
|
-
white-space: nowrap;
|
|
411
|
-
display: inline-block;
|
|
412
|
-
max-width: 100px;
|
|
413
|
-
font-size: 14px;
|
|
414
|
-
color: #808695;
|
|
415
|
-
margin-left: 10px;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.horizontalTimelineItem {
|
|
419
|
-
margin-bottom: 30px !important;
|
|
420
|
-
}
|
|
421
|
-
.portraitTimelineItem {
|
|
422
|
-
margin-bottom: -10px !important;
|
|
423
|
-
}
|
|
424
|
-
|
|
354
|
+
@import "../styles/css/index.less";
|
|
425
355
|
/deep/ .docx {
|
|
426
356
|
width: 100% !important;
|
|
427
357
|
}
|
|
@@ -445,64 +375,4 @@ export default {
|
|
|
445
375
|
padding: 5px !important;
|
|
446
376
|
}
|
|
447
377
|
|
|
448
|
-
.horizontalTimeline {
|
|
449
|
-
margin: 4vh 0 0 10vh
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.portraitTimeline {
|
|
453
|
-
margin: 0 0 0 0
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.horizontalCard {
|
|
457
|
-
background-color: #f1f1f1;
|
|
458
|
-
border-radius: 10px;
|
|
459
|
-
margin-top: 10px;
|
|
460
|
-
width: 150vh;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.portraitCard {
|
|
464
|
-
background-color: #f1f1f1;
|
|
465
|
-
border-radius: 10px;
|
|
466
|
-
width: auto;
|
|
467
|
-
margin-left: -15px;
|
|
468
|
-
margin-right: -25px;
|
|
469
|
-
margin-bottom: 5px;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.horizontalAvatar {
|
|
473
|
-
background-color: #005aff;
|
|
474
|
-
margin: 0 30px 0 5px;
|
|
475
|
-
zoom: 200%
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
.portraitAvatarLarge {
|
|
479
|
-
background-color: #005aff;
|
|
480
|
-
margin: -15px 10px 0 10px;
|
|
481
|
-
zoom: 150%
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.portraitAvatarSmall {
|
|
485
|
-
background-color: #005aff;
|
|
486
|
-
margin: -30px 10px 0 5px;
|
|
487
|
-
zoom: 150%
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.urging{
|
|
491
|
-
margin-top: -3px;
|
|
492
|
-
font-size: small;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
.attach{
|
|
496
|
-
margin-top: -3px;
|
|
497
|
-
font-size: small;
|
|
498
|
-
margin-left: 130px
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.portraitAuditDateStyle{
|
|
502
|
-
white-space: nowrap;
|
|
503
|
-
max-width: 100px;
|
|
504
|
-
margin-top: 5px;
|
|
505
|
-
font-size: 12px;
|
|
506
|
-
color: #808695;
|
|
507
|
-
}
|
|
508
378
|
</style>
|
|
@@ -154,10 +154,6 @@ export default {
|
|
|
154
154
|
type: String,
|
|
155
155
|
default: '/api/smart-flow-server',
|
|
156
156
|
},
|
|
157
|
-
ossServerContext: {
|
|
158
|
-
type: String,
|
|
159
|
-
default: '/api/oss-server',
|
|
160
|
-
},
|
|
161
157
|
},
|
|
162
158
|
data() {
|
|
163
159
|
return {
|
|
@@ -264,22 +260,22 @@ export default {
|
|
|
264
260
|
});
|
|
265
261
|
},
|
|
266
262
|
getAttach(row) {
|
|
267
|
-
window.open(this.
|
|
263
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
268
264
|
},
|
|
269
265
|
preViewAttach(row) {
|
|
270
266
|
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
271
267
|
let regs = /\.(pdf)$/
|
|
272
268
|
if (reg.test(row.fileName)) {
|
|
273
|
-
let url = this.
|
|
269
|
+
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
274
270
|
this.imgPreview(url);
|
|
275
271
|
} else if (regs.test(row.fileName)) {
|
|
276
|
-
window.open(this.
|
|
272
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
277
273
|
} else {
|
|
278
274
|
this.modalDocx = true
|
|
279
275
|
axios({
|
|
280
276
|
method: 'get',
|
|
281
277
|
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
282
|
-
url: this.
|
|
278
|
+
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
283
279
|
}).then(({data}) => {
|
|
284
280
|
docx.renderAsync(data, this.$refs.file, null, {
|
|
285
281
|
className: "docx", //默认和文档样式类的类名/前缀
|
|
@@ -4,25 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
<a style="color: black" @click="customCommentListModal = true"><Icon type="ios-browsers-outline" /> 常用意见</a>
|
|
6
6
|
<Tooltip placement="bottom" v-if="attachmentFile">
|
|
7
|
-
<div style="font-size: smaller" slot="content">支持扩展名:.
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
:on-success="handleSuccess" :on-progress="handleProgress"
|
|
11
|
-
:on-format-error="handleFormatError"
|
|
12
|
-
:format="['xlsx', 'xls','txt','rar','zip','doc','docx','jpg','pdf','gif','png']">
|
|
13
|
-
<a style="color: black"><Icon type="md-attach" /> 附件</a>
|
|
14
|
-
</Upload>
|
|
7
|
+
<div style="font-size: smaller" slot="content">支持扩展名:.pdf .doc .docx .txt .xls .xlsx .jpg .jpeg .png .gif</div>
|
|
8
|
+
<UploadFile @upload-result="uploadFile" :upload-btn="false" :show-file-list="false" :multiple="true"
|
|
9
|
+
:oss-server-context="smartFlowServerContext" :oss-file-put-url="ossFilePutUrl"></UploadFile>
|
|
15
10
|
</Tooltip>
|
|
16
11
|
</div>
|
|
17
12
|
<Input v-model="auditOpinion" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" show-word-limit
|
|
18
13
|
:maxlength="200" placeholder="处理意见" style="width: 100%"
|
|
19
14
|
></Input>
|
|
20
15
|
<div>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</span>
|
|
16
|
+
<div v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
|
|
17
|
+
<span style="color:#2D8cF0 "> {{ item.fileName }}</span>
|
|
18
|
+
<a @click="forRemoveAttachment(index)" style="font-size: 13px;"> .删除</a>
|
|
19
|
+
</div>
|
|
26
20
|
</div>
|
|
27
21
|
<Modal v-model="customCommentListModal" title="常用意见" width="800px" footer-hide>
|
|
28
22
|
<LamboPagingTable :requestSuccessCodes="requestSuccessCodes" ref="customCommentTable" :dataUrl="dataUrl"
|
|
@@ -55,13 +49,14 @@
|
|
|
55
49
|
import ajax from "@lambo-design/shared/utils/ajax";
|
|
56
50
|
import { operateHref } from '@lambo-design/shared/utils/assist';
|
|
57
51
|
import LamboPagingTable from "@lambo-design/paging-table";
|
|
52
|
+
import UploadFile from "@lambo-design/upload-file";
|
|
58
53
|
|
|
59
|
-
import axios from 'axios';
|
|
60
54
|
// 引入docx-preview插件
|
|
61
55
|
let docx = require('docx-preview');
|
|
62
56
|
export default {
|
|
63
57
|
components: {
|
|
64
|
-
LamboPagingTable
|
|
58
|
+
LamboPagingTable,
|
|
59
|
+
UploadFile
|
|
65
60
|
},
|
|
66
61
|
props: {
|
|
67
62
|
attachmentFile:{
|
|
@@ -81,21 +76,14 @@ export default {
|
|
|
81
76
|
type: String,
|
|
82
77
|
default: '/api/smart-flow-server',
|
|
83
78
|
},
|
|
84
|
-
ossServerContext: {
|
|
85
|
-
type: String,
|
|
86
|
-
default: '/api/oss-server',
|
|
87
|
-
},
|
|
88
79
|
},
|
|
89
80
|
data() {
|
|
90
81
|
return {
|
|
91
82
|
requestSuccessCodes: [200, "200"],
|
|
92
83
|
tempFileArr: [],
|
|
93
84
|
fileList: [],
|
|
85
|
+
ossFilePutUrl: '/manage/oss/file/put',
|
|
94
86
|
auditOpinionText: '',
|
|
95
|
-
auditOpinionForSelect: [{
|
|
96
|
-
label: '',
|
|
97
|
-
value: ''
|
|
98
|
-
}],
|
|
99
87
|
customCommentListModal: false,
|
|
100
88
|
auditOpinion: '',
|
|
101
89
|
customCommentDetailModal: false,
|
|
@@ -172,17 +160,25 @@ export default {
|
|
|
172
160
|
column.push({
|
|
173
161
|
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
174
162
|
render: (h, {row}) => {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
this
|
|
184
|
-
|
|
185
|
-
|
|
163
|
+
if (row.commentType === '10'){
|
|
164
|
+
return h("div", [
|
|
165
|
+
operateHref(this, h, row, "修改", () => {
|
|
166
|
+
this.openDetailModal('update', row);
|
|
167
|
+
}, "primary"),
|
|
168
|
+
operateHref(this, h, row, "删除", () => {
|
|
169
|
+
this.deleteCustomComment(row);
|
|
170
|
+
}, "error"),
|
|
171
|
+
operateHref(this, h, row, "选择", () => {
|
|
172
|
+
this.choose(row);
|
|
173
|
+
}, "primary")
|
|
174
|
+
]);
|
|
175
|
+
}else {
|
|
176
|
+
return h("div", [
|
|
177
|
+
operateHref(this, h, row, "选择", () => {
|
|
178
|
+
this.choose(row);
|
|
179
|
+
}, "primary")
|
|
180
|
+
]);
|
|
181
|
+
}
|
|
186
182
|
|
|
187
183
|
}
|
|
188
184
|
|
|
@@ -217,7 +213,7 @@ export default {
|
|
|
217
213
|
self.$refs.customCommentForm.validate((valid) => {
|
|
218
214
|
if (valid) {
|
|
219
215
|
if (self.customCommentDetailForm.id) {
|
|
220
|
-
ajax.post(
|
|
216
|
+
ajax.post(self.smartFlowServerContext + "/manage/smartflowCustomComment/update", self.customCommentDetailForm).then((resp) => {
|
|
221
217
|
if (resp.data.code === "200") {
|
|
222
218
|
self.customCommentDetailForm = {
|
|
223
219
|
id: '',
|
|
@@ -230,7 +226,7 @@ export default {
|
|
|
230
226
|
console.log(err);
|
|
231
227
|
})
|
|
232
228
|
} else {
|
|
233
|
-
ajax.post(
|
|
229
|
+
ajax.post(self.smartFlowServerContext + "/manage/smartflowCustomComment/insert", self.customCommentDetailForm).then((resp) => {
|
|
234
230
|
if (resp.data.code === "200") {
|
|
235
231
|
self.customCommentDetailForm = {
|
|
236
232
|
id: '',
|
|
@@ -243,40 +239,21 @@ export default {
|
|
|
243
239
|
console.log(err);
|
|
244
240
|
})
|
|
245
241
|
}
|
|
246
|
-
|
|
247
|
-
this.customCommentDetailModal = false
|
|
248
|
-
}
|
|
249
|
-
})
|
|
250
|
-
},
|
|
251
|
-
getAuditOpinionForSelect() {
|
|
252
|
-
const self = this
|
|
253
|
-
let auditOpinionForSelect = []
|
|
254
|
-
ajax.get(this.smartFlowServerContext + "/manage/smartflowCustomComment/list", {params: {limit: 100}}).then((resp) => {
|
|
255
|
-
if (resp.data.code == "200" && resp.data.data) {
|
|
256
|
-
resp.data.data.rows.forEach(item =>
|
|
257
|
-
auditOpinionForSelect.push({
|
|
258
|
-
value: item.commentContent,
|
|
259
|
-
label: item.commentContent,
|
|
260
|
-
type: item.commentType === '10' ? '自定义' : '系统预置'
|
|
261
|
-
})
|
|
262
|
-
)
|
|
263
|
-
self.auditOpinionForSelect = auditOpinionForSelect
|
|
242
|
+
self.customCommentDetailModal = false
|
|
264
243
|
}
|
|
265
|
-
}).catch(err => {
|
|
266
|
-
console.log(err);
|
|
267
244
|
})
|
|
268
245
|
},
|
|
269
246
|
deleteCustomComment(row) {
|
|
270
247
|
const self = this
|
|
271
|
-
|
|
248
|
+
self.$Modal.confirm({
|
|
272
249
|
title: '提示',
|
|
273
250
|
content: `<p>确定要删除${row.commentContent}吗?</p>`,
|
|
274
251
|
onOk: () => {
|
|
275
|
-
ajax.post(
|
|
252
|
+
ajax.post(self.smartFlowServerContext + "/manage/smartflowCustomComment/delete/" + row.id).then(function (resp) {
|
|
276
253
|
if (resp.data.code === "200") {
|
|
277
254
|
self.refreshTable()
|
|
278
255
|
} else {
|
|
279
|
-
self.$Message.error(resp.data.
|
|
256
|
+
self.$Message.error(resp.data.message);
|
|
280
257
|
}
|
|
281
258
|
}).catch(function (err) {
|
|
282
259
|
self.$Message.error('删除失败,请联系应用管理员');
|
|
@@ -287,90 +264,24 @@ export default {
|
|
|
287
264
|
refreshTable() {
|
|
288
265
|
this.$refs.customCommentTable.tableRefresh()
|
|
289
266
|
},
|
|
290
|
-
updateValue() {
|
|
291
|
-
this.$emit('input', this.auditOpinion);
|
|
292
|
-
},
|
|
293
267
|
choose(row) {
|
|
294
268
|
this.auditOpinion = row.commentContent
|
|
295
269
|
this.customCommentListModal = false
|
|
296
270
|
},
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
handleUpload: function (file) {
|
|
305
|
-
if (!file.canceled) {
|
|
306
|
-
this.tempFileArr.push(file.name)
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
handleSuccess: function (response, file, fileList) {
|
|
310
|
-
let self = this;
|
|
311
|
-
let tempArr = JSON.parse(JSON.stringify(this.tempFileArr))
|
|
312
|
-
|
|
313
|
-
tempArr.forEach(function (value, index, array) {
|
|
314
|
-
if (value == file.name) {
|
|
315
|
-
self.tempFileArr.splice(index, 1)
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
if (response.code == 1 && self.tempFileArr && self.tempFileArr.length < 1) {
|
|
320
|
-
self.loading = false;
|
|
321
|
-
self.$Message.success("上传成功");
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
if (response.code == 1) {
|
|
325
|
-
if (response.data != undefined && response.data != null && response.data.length > 0) {
|
|
326
|
-
let tempData = [].concat(response.data);
|
|
327
|
-
this.attachmentdata.push({
|
|
328
|
-
fileName: tempData[0].originalName,
|
|
329
|
-
fileId: tempData[0].fileName,
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
this.fileList = fileList
|
|
334
|
-
|
|
335
|
-
} else {
|
|
336
|
-
self.loading = false;
|
|
337
|
-
this.$Message.error({
|
|
338
|
-
content: file.name + '上传失败!',
|
|
271
|
+
uploadFile(file){
|
|
272
|
+
const self = this;
|
|
273
|
+
file.forEach(item => {
|
|
274
|
+
self.attachmentdata.push({
|
|
275
|
+
fileName: item.fileName,
|
|
276
|
+
fileId: item.fileCode,
|
|
339
277
|
});
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
let j = 0;
|
|
343
|
-
for (let i = 0; i < fileList.length; i++) {
|
|
344
|
-
if (fileList[i].canceled) {
|
|
345
|
-
continue;
|
|
346
|
-
}
|
|
347
|
-
if (fileList[i].name === file.name && fileList[i].timestamp === file.timestamp) {
|
|
348
|
-
j = i;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
//console.log(fileList)
|
|
353
|
-
fileList.splice(j, 1);
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
},
|
|
358
|
-
handleProgress(event, file, fileList) {
|
|
359
|
-
this.loading = true
|
|
360
|
-
},
|
|
361
|
-
handleFormatError(file) {
|
|
362
|
-
this.loading = false
|
|
363
|
-
this.$Notice.warning({
|
|
364
|
-
title: "文件格式不正确",
|
|
365
|
-
desc: "文件 " + file.name + " 格式不支持,请上传其他格式的文件。",
|
|
366
|
-
});
|
|
278
|
+
})
|
|
367
279
|
},
|
|
368
280
|
forRemoveAttachment: function (index) {
|
|
369
281
|
this.attachmentdata.splice(index, 1);
|
|
370
282
|
},
|
|
371
283
|
},
|
|
372
284
|
mounted() {
|
|
373
|
-
this.getAuditOpinionForSelect()
|
|
374
285
|
},
|
|
375
286
|
watch: {
|
|
376
287
|
auditOpinionText(label) {
|
|
@@ -385,5 +296,7 @@ export default {
|
|
|
385
296
|
</script>
|
|
386
297
|
|
|
387
298
|
<style scoped>
|
|
388
|
-
|
|
299
|
+
/deep/ .upload-btn-box{
|
|
300
|
+
padding-bottom: 0;
|
|
301
|
+
}
|
|
389
302
|
</style>
|