@lambo-design/workflow-approve 1.0.0-beta.139 → 1.0.0-beta.140
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 +4 -4
- package/src/components/horizontal/attachment.vue +224 -224
- package/src/components/horizontal/opinion.vue +263 -263
- package/src/components/title.vue +24 -24
- package/src/portrait.vue +42 -6
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.140",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"registry": "https://registry.npmjs.org/"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@lambo-design/core": "^4.7.1-beta.176",
|
|
14
|
-
"@lambo-design/shared": "^1.0.0-beta.354",
|
|
15
13
|
"axios": "^0.24.0",
|
|
16
|
-
"axios-cache-plugin": "^0.1.0"
|
|
14
|
+
"axios-cache-plugin": "^0.1.0",
|
|
15
|
+
"@lambo-design/core": "^4.7.1-beta.178",
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.362"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"bpmn-js": "^7.3.1",
|
|
@@ -1,224 +1,224 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<Row>
|
|
4
|
-
<Row>
|
|
5
|
-
<span v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
|
|
6
|
-
<span v-if="index>0">、</span>
|
|
7
|
-
<span style="color:#2D8cF0 "> {{ item.fileName }}</span>
|
|
8
|
-
<a @click="forRemoveAttachment(index)" style="font-size: 13px;">.删除</a>
|
|
9
|
-
</span>
|
|
10
|
-
<div>
|
|
11
|
-
<div slot="buttons">
|
|
12
|
-
<Upload :action="actionUrl" :on-error="handleError" :before-upload="handleUpload" :show-upload-list="false"
|
|
13
|
-
multiple
|
|
14
|
-
:on-success="handleSuccess" :on-progress="handleProgress"
|
|
15
|
-
:on-format-error="handleFormatError"
|
|
16
|
-
:format="['xlsx', 'xls','txt','rar','zip','doc','docx','jpg','pdf','gif','png']">
|
|
17
|
-
<Button :loading="loading" icon="ios-arrow-round-up" type="primary"
|
|
18
|
-
style="color: #808080;border-color:#e0e0e0;" ghost>添加附件
|
|
19
|
-
</Button>
|
|
20
|
-
</Upload>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</Row>
|
|
24
|
-
<Row style="margin-top: 10px">
|
|
25
|
-
<span style="color: red;font-size: 14px">* 支持扩展名: .rar .zip .doc .docx .pdf .jpg...</span>
|
|
26
|
-
</Row>
|
|
27
|
-
</Row>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
name: "attachment",
|
|
36
|
-
components: {},
|
|
37
|
-
props: {
|
|
38
|
-
actionUrl: {
|
|
39
|
-
default: "/api/oss-server/file/put",
|
|
40
|
-
},
|
|
41
|
-
attachmentdata: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default: function () {
|
|
44
|
-
return []
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
attachmentColumn: {
|
|
48
|
-
default: function () {
|
|
49
|
-
let column = [
|
|
50
|
-
{title: "序号", type: 'index', width: 80, align: "center"},
|
|
51
|
-
{
|
|
52
|
-
title: "相关附件", key: "fileName", minWidth: 200, align: 'left', tooltip: true,
|
|
53
|
-
render: (h, {row}) => {
|
|
54
|
-
return h("a", {
|
|
55
|
-
on: {
|
|
56
|
-
'click': () => {
|
|
57
|
-
let reg = /\.(gif|jpg|jpeg|bmp|png)$/
|
|
58
|
-
let regs = /\.pdf$/
|
|
59
|
-
if (reg.test(row.fileName)) {
|
|
60
|
-
let imgs = [];
|
|
61
|
-
let url = this.ossServerContext + "/file/get/" + row.fileId;
|
|
62
|
-
this.imgPreview(url);
|
|
63
|
-
} else if (regs.test(row.fileName)) {
|
|
64
|
-
window.open(this.ossServerContext + "/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
65
|
-
} else {
|
|
66
|
-
window.open(this.ossServerContext + "/file/get/" + row.fileId, "_blank");
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, row.fileName);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
title: "操作", width: 80, align: "center",
|
|
75
|
-
render: (h, {index}) => {
|
|
76
|
-
return h('div', [
|
|
77
|
-
h('Button', {
|
|
78
|
-
props: {
|
|
79
|
-
type: 'warning',
|
|
80
|
-
size: 'small',
|
|
81
|
-
ghost: true
|
|
82
|
-
},
|
|
83
|
-
on: {
|
|
84
|
-
click: () => {
|
|
85
|
-
this.forRemoveAttachment(index)
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}, '删除')
|
|
89
|
-
]);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
];
|
|
93
|
-
return column
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
data() {
|
|
98
|
-
return {
|
|
99
|
-
loading: false,
|
|
100
|
-
modalImg: false,
|
|
101
|
-
image: "",
|
|
102
|
-
tempFileArr: [],
|
|
103
|
-
percentage: null,
|
|
104
|
-
file_name: '',
|
|
105
|
-
fileList: [],
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
methods: {
|
|
109
|
-
openAttachment(item) {
|
|
110
|
-
let reg = /\.(gif|jpg|jpeg|bmp|png)$/;
|
|
111
|
-
let regs = /\.pdf$/;
|
|
112
|
-
|
|
113
|
-
if (reg.test(item.fileName)) {
|
|
114
|
-
let imgs = [];
|
|
115
|
-
let url = this.ossServerContext + "/file/get/" + item.fileId;
|
|
116
|
-
this.imgPreview(url);
|
|
117
|
-
} else if (regs.test(item.fileName)) {
|
|
118
|
-
window.open(this.ossServerContext + "/file/getFileStream?fileId=" + item.fileId, "_blank");
|
|
119
|
-
} else {
|
|
120
|
-
window.open(this.ossServerContext + "/file/get/" + item.fileId, "_blank");
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
handleSuccess: function (response, file, fileList) {
|
|
124
|
-
let self = this;
|
|
125
|
-
let tempArr = JSON.parse(JSON.stringify(this.tempFileArr))
|
|
126
|
-
|
|
127
|
-
tempArr.forEach(function (value, index, array) {
|
|
128
|
-
if (value == file.name) {
|
|
129
|
-
self.tempFileArr.splice(index, 1)
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
if (response.code == 1 && self.tempFileArr && self.tempFileArr.length < 1) {
|
|
134
|
-
self.loading = false;
|
|
135
|
-
self.$Message.success("上传成功");
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (response.code == 1) {
|
|
139
|
-
if (response.data != undefined && response.data != null && response.data.length > 0) {
|
|
140
|
-
let tempData = [].concat(response.data);
|
|
141
|
-
this.attachmentdata.push({
|
|
142
|
-
fileName: tempData[0].originalName,
|
|
143
|
-
fileId: tempData[0].fileName,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
this.fileList = fileList
|
|
148
|
-
|
|
149
|
-
} else {
|
|
150
|
-
self.loading = false;
|
|
151
|
-
this.$Message.error({
|
|
152
|
-
content: file.name + '上传失败!',
|
|
153
|
-
});
|
|
154
|
-
//this.$Message.error("上传失败!");
|
|
155
|
-
|
|
156
|
-
let j = 0;
|
|
157
|
-
for (let i = 0; i < fileList.length; i++) {
|
|
158
|
-
if (fileList[i].canceled) {
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
if (fileList[i].name === file.name && fileList[i].timestamp === file.timestamp) {
|
|
162
|
-
j = i;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
//console.log(fileList)
|
|
167
|
-
fileList.splice(j, 1);
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
handleError: function (error, file, fileList) {
|
|
173
|
-
this.loading = false
|
|
174
|
-
this.$Message.error({
|
|
175
|
-
content: fileList.name + ' 上传失败!',
|
|
176
|
-
});
|
|
177
|
-
},
|
|
178
|
-
handleUpload: function (file) {
|
|
179
|
-
if (!file.canceled) {
|
|
180
|
-
this.tempFileArr.push(file.name)
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
forRemoveAttachment: function (index) {
|
|
184
|
-
this.attachmentdata.splice(index, 1);
|
|
185
|
-
this.$refs.attachmentTable.tableRefresh()
|
|
186
|
-
},
|
|
187
|
-
//查看附件
|
|
188
|
-
imgPreview: function (img) {
|
|
189
|
-
this.modalImg = true
|
|
190
|
-
this.image = img;
|
|
191
|
-
},
|
|
192
|
-
//查看附件
|
|
193
|
-
cancelUpload: function (item, fileList) {
|
|
194
|
-
item.showProgress = false;
|
|
195
|
-
item.canceled = true;
|
|
196
|
-
},
|
|
197
|
-
handleProgress(event, file, fileList) {
|
|
198
|
-
this.loading = true
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
},
|
|
202
|
-
handleFormatError(file) {
|
|
203
|
-
this.loading = false
|
|
204
|
-
this.$Notice.warning({
|
|
205
|
-
title: "文件格式不正确",
|
|
206
|
-
desc: "文件 " + file.name + " 格式不支持,请上传其他格式的文件。",
|
|
207
|
-
});
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
</script>
|
|
213
|
-
|
|
214
|
-
<style scoped>
|
|
215
|
-
.demo-spin-icon-load {
|
|
216
|
-
animation: ani-demo-spin 1s linear infinite;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/deep/ .ivu-icon {
|
|
220
|
-
zoom: 130%;
|
|
221
|
-
color: #808080;
|
|
222
|
-
margin-right: -1px;
|
|
223
|
-
}
|
|
224
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Row>
|
|
4
|
+
<Row>
|
|
5
|
+
<span v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
|
|
6
|
+
<span v-if="index>0">、</span>
|
|
7
|
+
<span style="color:#2D8cF0 "> {{ item.fileName }}</span>
|
|
8
|
+
<a @click="forRemoveAttachment(index)" style="font-size: 13px;">.删除</a>
|
|
9
|
+
</span>
|
|
10
|
+
<div>
|
|
11
|
+
<div slot="buttons">
|
|
12
|
+
<Upload :action="actionUrl" :on-error="handleError" :before-upload="handleUpload" :show-upload-list="false"
|
|
13
|
+
multiple
|
|
14
|
+
:on-success="handleSuccess" :on-progress="handleProgress"
|
|
15
|
+
:on-format-error="handleFormatError"
|
|
16
|
+
:format="['xlsx', 'xls','txt','rar','zip','doc','docx','jpg','pdf','gif','png']">
|
|
17
|
+
<Button :loading="loading" icon="ios-arrow-round-up" type="primary"
|
|
18
|
+
style="color: #808080;border-color:#e0e0e0;" ghost>添加附件
|
|
19
|
+
</Button>
|
|
20
|
+
</Upload>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</Row>
|
|
24
|
+
<Row style="margin-top: 10px">
|
|
25
|
+
<span style="color: red;font-size: 14px">* 支持扩展名: .rar .zip .doc .docx .pdf .jpg...</span>
|
|
26
|
+
</Row>
|
|
27
|
+
</Row>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: "attachment",
|
|
36
|
+
components: {},
|
|
37
|
+
props: {
|
|
38
|
+
actionUrl: {
|
|
39
|
+
default: "/api/oss-server/file/put",
|
|
40
|
+
},
|
|
41
|
+
attachmentdata: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: function () {
|
|
44
|
+
return []
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
attachmentColumn: {
|
|
48
|
+
default: function () {
|
|
49
|
+
let column = [
|
|
50
|
+
{title: "序号", type: 'index', width: 80, align: "center"},
|
|
51
|
+
{
|
|
52
|
+
title: "相关附件", key: "fileName", minWidth: 200, align: 'left', tooltip: true,
|
|
53
|
+
render: (h, {row}) => {
|
|
54
|
+
return h("a", {
|
|
55
|
+
on: {
|
|
56
|
+
'click': () => {
|
|
57
|
+
let reg = /\.(gif|jpg|jpeg|bmp|png)$/
|
|
58
|
+
let regs = /\.pdf$/
|
|
59
|
+
if (reg.test(row.fileName)) {
|
|
60
|
+
let imgs = [];
|
|
61
|
+
let url = this.ossServerContext + "/file/get/" + row.fileId;
|
|
62
|
+
this.imgPreview(url);
|
|
63
|
+
} else if (regs.test(row.fileName)) {
|
|
64
|
+
window.open(this.ossServerContext + "/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
65
|
+
} else {
|
|
66
|
+
window.open(this.ossServerContext + "/file/get/" + row.fileId, "_blank");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, row.fileName);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: "操作", width: 80, align: "center",
|
|
75
|
+
render: (h, {index}) => {
|
|
76
|
+
return h('div', [
|
|
77
|
+
h('Button', {
|
|
78
|
+
props: {
|
|
79
|
+
type: 'warning',
|
|
80
|
+
size: 'small',
|
|
81
|
+
ghost: true
|
|
82
|
+
},
|
|
83
|
+
on: {
|
|
84
|
+
click: () => {
|
|
85
|
+
this.forRemoveAttachment(index)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, '删除')
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
return column
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
data() {
|
|
98
|
+
return {
|
|
99
|
+
loading: false,
|
|
100
|
+
modalImg: false,
|
|
101
|
+
image: "",
|
|
102
|
+
tempFileArr: [],
|
|
103
|
+
percentage: null,
|
|
104
|
+
file_name: '',
|
|
105
|
+
fileList: [],
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
methods: {
|
|
109
|
+
openAttachment(item) {
|
|
110
|
+
let reg = /\.(gif|jpg|jpeg|bmp|png)$/;
|
|
111
|
+
let regs = /\.pdf$/;
|
|
112
|
+
|
|
113
|
+
if (reg.test(item.fileName)) {
|
|
114
|
+
let imgs = [];
|
|
115
|
+
let url = this.ossServerContext + "/file/get/" + item.fileId;
|
|
116
|
+
this.imgPreview(url);
|
|
117
|
+
} else if (regs.test(item.fileName)) {
|
|
118
|
+
window.open(this.ossServerContext + "/file/getFileStream?fileId=" + item.fileId, "_blank");
|
|
119
|
+
} else {
|
|
120
|
+
window.open(this.ossServerContext + "/file/get/" + item.fileId, "_blank");
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
handleSuccess: function (response, file, fileList) {
|
|
124
|
+
let self = this;
|
|
125
|
+
let tempArr = JSON.parse(JSON.stringify(this.tempFileArr))
|
|
126
|
+
|
|
127
|
+
tempArr.forEach(function (value, index, array) {
|
|
128
|
+
if (value == file.name) {
|
|
129
|
+
self.tempFileArr.splice(index, 1)
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
if (response.code == 1 && self.tempFileArr && self.tempFileArr.length < 1) {
|
|
134
|
+
self.loading = false;
|
|
135
|
+
self.$Message.success("上传成功");
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (response.code == 1) {
|
|
139
|
+
if (response.data != undefined && response.data != null && response.data.length > 0) {
|
|
140
|
+
let tempData = [].concat(response.data);
|
|
141
|
+
this.attachmentdata.push({
|
|
142
|
+
fileName: tempData[0].originalName,
|
|
143
|
+
fileId: tempData[0].fileName,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
this.fileList = fileList
|
|
148
|
+
|
|
149
|
+
} else {
|
|
150
|
+
self.loading = false;
|
|
151
|
+
this.$Message.error({
|
|
152
|
+
content: file.name + '上传失败!',
|
|
153
|
+
});
|
|
154
|
+
//this.$Message.error("上传失败!");
|
|
155
|
+
|
|
156
|
+
let j = 0;
|
|
157
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
158
|
+
if (fileList[i].canceled) {
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (fileList[i].name === file.name && fileList[i].timestamp === file.timestamp) {
|
|
162
|
+
j = i;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
//console.log(fileList)
|
|
167
|
+
fileList.splice(j, 1);
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
},
|
|
172
|
+
handleError: function (error, file, fileList) {
|
|
173
|
+
this.loading = false
|
|
174
|
+
this.$Message.error({
|
|
175
|
+
content: fileList.name + ' 上传失败!',
|
|
176
|
+
});
|
|
177
|
+
},
|
|
178
|
+
handleUpload: function (file) {
|
|
179
|
+
if (!file.canceled) {
|
|
180
|
+
this.tempFileArr.push(file.name)
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
forRemoveAttachment: function (index) {
|
|
184
|
+
this.attachmentdata.splice(index, 1);
|
|
185
|
+
this.$refs.attachmentTable.tableRefresh()
|
|
186
|
+
},
|
|
187
|
+
//查看附件
|
|
188
|
+
imgPreview: function (img) {
|
|
189
|
+
this.modalImg = true
|
|
190
|
+
this.image = img;
|
|
191
|
+
},
|
|
192
|
+
//查看附件
|
|
193
|
+
cancelUpload: function (item, fileList) {
|
|
194
|
+
item.showProgress = false;
|
|
195
|
+
item.canceled = true;
|
|
196
|
+
},
|
|
197
|
+
handleProgress(event, file, fileList) {
|
|
198
|
+
this.loading = true
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
},
|
|
202
|
+
handleFormatError(file) {
|
|
203
|
+
this.loading = false
|
|
204
|
+
this.$Notice.warning({
|
|
205
|
+
title: "文件格式不正确",
|
|
206
|
+
desc: "文件 " + file.name + " 格式不支持,请上传其他格式的文件。",
|
|
207
|
+
});
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
</script>
|
|
213
|
+
|
|
214
|
+
<style scoped>
|
|
215
|
+
.demo-spin-icon-load {
|
|
216
|
+
animation: ani-demo-spin 1s linear infinite;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/deep/ .ivu-icon {
|
|
220
|
+
zoom: 130%;
|
|
221
|
+
color: #808080;
|
|
222
|
+
margin-right: -1px;
|
|
223
|
+
}
|
|
224
|
+
</style>
|
|
@@ -1,263 +1,263 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<Select v-model="auditOpinionText" style="width:190px" clearable transfer>
|
|
4
|
-
<Option v-for="item in auditOpinionForSelect" :value="item.value" :key="item.value">
|
|
5
|
-
<span>{{ item.label }}</span>
|
|
6
|
-
<span style="float:right;color:#ccc">{{ item.type }}</span>
|
|
7
|
-
</Option>
|
|
8
|
-
</Select>
|
|
9
|
-
<Button style="margin-left: 10px" @click="customCommentListModal = true">自定义我的意见</Button>
|
|
10
|
-
<Input v-model="auditOpinion" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" show-word-limit
|
|
11
|
-
:maxlength="200" placeholder="处理意见" style="margin-top: 15px"
|
|
12
|
-
></Input>
|
|
13
|
-
|
|
14
|
-
<Modal v-model="customCommentListModal" title="常用意见" width="800px" footer-hide>
|
|
15
|
-
<LamboPagingTable :requestSuccessCodes="requestSuccessCodes" ref="customCommentTable" :dataUrl="dataUrl"
|
|
16
|
-
:columns="tableColumn">
|
|
17
|
-
<div slot="buttons">
|
|
18
|
-
<Button type="primary" ghost icon="md-add" @click="openDetailModal('create')">新增</Button>
|
|
19
|
-
</div>
|
|
20
|
-
</LamboPagingTable>
|
|
21
|
-
</Modal>
|
|
22
|
-
<Modal v-model="customCommentDetailModal" :title="customCommentDetailTitle" width="700px"
|
|
23
|
-
@on-cancel="customCommentDetailCancel"
|
|
24
|
-
@on-ok="customCommentDetailOk">
|
|
25
|
-
<Card v-model="customCommentDetailModal" width="600px" dis-hover>
|
|
26
|
-
<Form ref="customCommentForm" :model="customCommentDetailForm" :rules="customCommentRuleValidate"
|
|
27
|
-
:label-width="100" label-position="right">
|
|
28
|
-
<FormItem label="常用意见:" prop="commentContent">
|
|
29
|
-
<Input type="textarea" v-model="customCommentDetailForm.commentContent" show-word-limit :maxlength="1000"
|
|
30
|
-
style="width: 500px"/>
|
|
31
|
-
</FormItem>
|
|
32
|
-
<FormItem label="排序码:">
|
|
33
|
-
<Input style="width: 100px" v-model="customCommentDetailForm.orders"/>
|
|
34
|
-
</FormItem>
|
|
35
|
-
</Form>
|
|
36
|
-
</Card>
|
|
37
|
-
</Modal>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script>
|
|
42
|
-
import ajax from "@lambo-design/shared/utils/ajax";
|
|
43
|
-
import LamboPagingTable from "@lambo-design/paging-table/index";
|
|
44
|
-
import { operateHref } from '@lambo-design/shared/utils/assist'
|
|
45
|
-
|
|
46
|
-
// 引入docx-preview插件
|
|
47
|
-
let docx = require('docx-preview');
|
|
48
|
-
export default {
|
|
49
|
-
components: {
|
|
50
|
-
LamboPagingTable
|
|
51
|
-
},
|
|
52
|
-
props: {
|
|
53
|
-
smartFlowServerContext: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: '/api/smart-flow-server',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
data() {
|
|
59
|
-
return {
|
|
60
|
-
requestSuccessCodes: [200, "200"],
|
|
61
|
-
auditOpinionText: '',
|
|
62
|
-
auditOpinionForSelect: [{
|
|
63
|
-
label: '',
|
|
64
|
-
value: ''
|
|
65
|
-
}],
|
|
66
|
-
customCommentListModal: false,
|
|
67
|
-
auditOpinion: '',
|
|
68
|
-
customCommentDetailModal: false,
|
|
69
|
-
customCommentDetailTitle: '',
|
|
70
|
-
dataUrl: this.smartFlowServerContext + '/manage/smartflowCustomComment/list?commentType=10',
|
|
71
|
-
customCommentDetailForm: {
|
|
72
|
-
id: '',
|
|
73
|
-
commentContent: '',
|
|
74
|
-
orders: 10
|
|
75
|
-
},
|
|
76
|
-
customCommentRuleValidate: {
|
|
77
|
-
commentContent: [
|
|
78
|
-
{required: true, trigger: "blur", message: "意见不能为空"},
|
|
79
|
-
{max: 1000, message: "意见不能大于1000位", trigger: "blur"}
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
computed: {
|
|
85
|
-
tableColumn() {
|
|
86
|
-
let column = [];
|
|
87
|
-
let self = this;
|
|
88
|
-
column.push({
|
|
89
|
-
title: '常用意见',
|
|
90
|
-
key: "commentContent",
|
|
91
|
-
minWidth: 150,
|
|
92
|
-
align: 'center',
|
|
93
|
-
});
|
|
94
|
-
column.push({
|
|
95
|
-
title: "排序码",
|
|
96
|
-
key: "orders",
|
|
97
|
-
width: 170,
|
|
98
|
-
align: "center",
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
column.push({
|
|
102
|
-
title: "修改时间",
|
|
103
|
-
key: "updateTime",
|
|
104
|
-
width: 170,
|
|
105
|
-
align: "center",
|
|
106
|
-
render: (v, param) => {
|
|
107
|
-
if (param.row.updateTime) {
|
|
108
|
-
let date = new Date(param.row.updateTime)
|
|
109
|
-
let y = date.getFullYear() // 年
|
|
110
|
-
let MM = date.getMonth() + 1 // 月
|
|
111
|
-
MM = MM < 10 ? ('0' + MM) : MM
|
|
112
|
-
let d = date.getDate() // 日
|
|
113
|
-
d = d < 10 ? ('0' + d) : d
|
|
114
|
-
let h = date.getHours() // 时
|
|
115
|
-
h = h < 10 ? ('0' + h) : h
|
|
116
|
-
let m = date.getMinutes()// 分
|
|
117
|
-
m = m < 10 ? ('0' + m) : m
|
|
118
|
-
let s = date.getSeconds()// 秒
|
|
119
|
-
s = s < 10 ? ('0' + s) : s
|
|
120
|
-
let state = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
|
|
121
|
-
return v("span", state);
|
|
122
|
-
}
|
|
123
|
-
return v("span", '')
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
column.push({
|
|
128
|
-
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
129
|
-
render: (h, {row}) => {
|
|
130
|
-
return h("div", [
|
|
131
|
-
operateHref(this, h, row, "修改", () => {
|
|
132
|
-
this.openDetailModal('update', row);
|
|
133
|
-
}, "primary"),
|
|
134
|
-
operateHref(this, h, row, "删除", () => {
|
|
135
|
-
this.deleteCustomComment(row);
|
|
136
|
-
}, "error")
|
|
137
|
-
]);
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
return column;
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
methods: {
|
|
147
|
-
openDetailModal(type, row) {
|
|
148
|
-
this.customCommentDetailModal = true
|
|
149
|
-
if (type === 'create') {
|
|
150
|
-
this.customCommentDetailTitle = '新增常用意见'
|
|
151
|
-
} else {
|
|
152
|
-
this.customCommentDetailTitle = '修改常用意见'
|
|
153
|
-
this.customCommentDetailForm.id = row.id
|
|
154
|
-
this.customCommentDetailForm.commentContent = row.commentContent
|
|
155
|
-
this.customCommentDetailForm.orders = row.orders
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
customCommentDetailCancel() {
|
|
159
|
-
this.getAuditOpinionForSelect()
|
|
160
|
-
this.customCommentDetailForm = {
|
|
161
|
-
id: '',
|
|
162
|
-
commentContent: '',
|
|
163
|
-
orders: 10
|
|
164
|
-
}
|
|
165
|
-
this.customCommentDetailModal = false
|
|
166
|
-
},
|
|
167
|
-
customCommentDetailOk() {
|
|
168
|
-
const self = this
|
|
169
|
-
self.$refs.customCommentForm.validate((valid) => {
|
|
170
|
-
if (valid) {
|
|
171
|
-
if (self.customCommentDetailForm.id) {
|
|
172
|
-
ajax.post(this.smartFlowServerContext + "/manage/smartflowCustomComment/update", self.customCommentDetailForm).then((resp) => {
|
|
173
|
-
if (resp.data.code === "200") {
|
|
174
|
-
self.customCommentDetailForm = {
|
|
175
|
-
id: '',
|
|
176
|
-
commentContent: '',
|
|
177
|
-
orders: 10
|
|
178
|
-
}
|
|
179
|
-
self.refreshTable()
|
|
180
|
-
}
|
|
181
|
-
}).catch(err => {
|
|
182
|
-
console.log(err);
|
|
183
|
-
})
|
|
184
|
-
} else {
|
|
185
|
-
ajax.post(this.smartFlowServerContext + "/manage/smartflowCustomComment/insert", self.customCommentDetailForm).then((resp) => {
|
|
186
|
-
if (resp.data.code === "200") {
|
|
187
|
-
self.customCommentDetailForm = {
|
|
188
|
-
id: '',
|
|
189
|
-
commentContent: '',
|
|
190
|
-
orders: 10
|
|
191
|
-
}
|
|
192
|
-
self.refreshTable()
|
|
193
|
-
}
|
|
194
|
-
}).catch(err => {
|
|
195
|
-
console.log(err);
|
|
196
|
-
})
|
|
197
|
-
}
|
|
198
|
-
this.getAuditOpinionForSelect()
|
|
199
|
-
this.customCommentDetailModal = false
|
|
200
|
-
}
|
|
201
|
-
})
|
|
202
|
-
},
|
|
203
|
-
getAuditOpinionForSelect() {
|
|
204
|
-
const self = this
|
|
205
|
-
let auditOpinionForSelect = []
|
|
206
|
-
ajax.get(this.smartFlowServerContext + "/manage/smartflowCustomComment/list", {params: {limit: 100}}).then((resp) => {
|
|
207
|
-
if (resp.data.code == "200" && resp.data.data) {
|
|
208
|
-
resp.data.data.rows.forEach(item =>
|
|
209
|
-
auditOpinionForSelect.push({
|
|
210
|
-
value: item.commentContent,
|
|
211
|
-
label: item.commentContent,
|
|
212
|
-
type: item.commentType === '10' ? '自定义' : '系统预置'
|
|
213
|
-
})
|
|
214
|
-
)
|
|
215
|
-
self.auditOpinionForSelect = auditOpinionForSelect
|
|
216
|
-
}
|
|
217
|
-
}).catch(err => {
|
|
218
|
-
console.log(err);
|
|
219
|
-
})
|
|
220
|
-
},
|
|
221
|
-
deleteCustomComment(row) {
|
|
222
|
-
const self = this
|
|
223
|
-
this.$Modal.confirm({
|
|
224
|
-
title: '提示',
|
|
225
|
-
content: `<p>确定要删除${row.commentContent}吗?</p>`,
|
|
226
|
-
onOk: () => {
|
|
227
|
-
ajax.post(this.smartFlowServerContext + "/manage/smartflowCustomComment/delete/" + row.id).then(function (resp) {
|
|
228
|
-
if (resp.data.code === "200") {
|
|
229
|
-
self.refreshTable()
|
|
230
|
-
} else {
|
|
231
|
-
self.$Message.error(resp.data.data);
|
|
232
|
-
}
|
|
233
|
-
}).catch(function (err) {
|
|
234
|
-
self.$Message.error('删除失败,请联系应用管理员');
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
},
|
|
239
|
-
refreshTable() {
|
|
240
|
-
this.$refs.customCommentTable.tableRefresh()
|
|
241
|
-
},
|
|
242
|
-
updateValue() {
|
|
243
|
-
this.$emit('input', this.auditOpinion);
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
mounted() {
|
|
247
|
-
this.getAuditOpinionForSelect()
|
|
248
|
-
},
|
|
249
|
-
watch: {
|
|
250
|
-
auditOpinionText(label) {
|
|
251
|
-
this.auditOpinion = label;
|
|
252
|
-
},
|
|
253
|
-
auditOpinion(val) {
|
|
254
|
-
this.$emit('input', val)
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
</script>
|
|
260
|
-
|
|
261
|
-
<style scoped>
|
|
262
|
-
|
|
263
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Select v-model="auditOpinionText" style="width:190px" clearable transfer>
|
|
4
|
+
<Option v-for="item in auditOpinionForSelect" :value="item.value" :key="item.value">
|
|
5
|
+
<span>{{ item.label }}</span>
|
|
6
|
+
<span style="float:right;color:#ccc">{{ item.type }}</span>
|
|
7
|
+
</Option>
|
|
8
|
+
</Select>
|
|
9
|
+
<Button style="margin-left: 10px" @click="customCommentListModal = true">自定义我的意见</Button>
|
|
10
|
+
<Input v-model="auditOpinion" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" show-word-limit
|
|
11
|
+
:maxlength="200" placeholder="处理意见" style="margin-top: 15px"
|
|
12
|
+
></Input>
|
|
13
|
+
|
|
14
|
+
<Modal v-model="customCommentListModal" title="常用意见" width="800px" footer-hide>
|
|
15
|
+
<LamboPagingTable :requestSuccessCodes="requestSuccessCodes" ref="customCommentTable" :dataUrl="dataUrl"
|
|
16
|
+
:columns="tableColumn">
|
|
17
|
+
<div slot="buttons">
|
|
18
|
+
<Button type="primary" ghost icon="md-add" @click="openDetailModal('create')">新增</Button>
|
|
19
|
+
</div>
|
|
20
|
+
</LamboPagingTable>
|
|
21
|
+
</Modal>
|
|
22
|
+
<Modal v-model="customCommentDetailModal" :title="customCommentDetailTitle" width="700px"
|
|
23
|
+
@on-cancel="customCommentDetailCancel"
|
|
24
|
+
@on-ok="customCommentDetailOk">
|
|
25
|
+
<Card v-model="customCommentDetailModal" width="600px" dis-hover>
|
|
26
|
+
<Form ref="customCommentForm" :model="customCommentDetailForm" :rules="customCommentRuleValidate"
|
|
27
|
+
:label-width="100" label-position="right">
|
|
28
|
+
<FormItem label="常用意见:" prop="commentContent">
|
|
29
|
+
<Input type="textarea" v-model="customCommentDetailForm.commentContent" show-word-limit :maxlength="1000"
|
|
30
|
+
style="width: 500px"/>
|
|
31
|
+
</FormItem>
|
|
32
|
+
<FormItem label="排序码:">
|
|
33
|
+
<Input style="width: 100px" v-model="customCommentDetailForm.orders"/>
|
|
34
|
+
</FormItem>
|
|
35
|
+
</Form>
|
|
36
|
+
</Card>
|
|
37
|
+
</Modal>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
43
|
+
import LamboPagingTable from "@lambo-design/paging-table/index";
|
|
44
|
+
import { operateHref } from '@lambo-design/shared/utils/assist'
|
|
45
|
+
|
|
46
|
+
// 引入docx-preview插件
|
|
47
|
+
let docx = require('docx-preview');
|
|
48
|
+
export default {
|
|
49
|
+
components: {
|
|
50
|
+
LamboPagingTable
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
smartFlowServerContext: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: '/api/smart-flow-server',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
requestSuccessCodes: [200, "200"],
|
|
61
|
+
auditOpinionText: '',
|
|
62
|
+
auditOpinionForSelect: [{
|
|
63
|
+
label: '',
|
|
64
|
+
value: ''
|
|
65
|
+
}],
|
|
66
|
+
customCommentListModal: false,
|
|
67
|
+
auditOpinion: '',
|
|
68
|
+
customCommentDetailModal: false,
|
|
69
|
+
customCommentDetailTitle: '',
|
|
70
|
+
dataUrl: this.smartFlowServerContext + '/manage/smartflowCustomComment/list?commentType=10',
|
|
71
|
+
customCommentDetailForm: {
|
|
72
|
+
id: '',
|
|
73
|
+
commentContent: '',
|
|
74
|
+
orders: 10
|
|
75
|
+
},
|
|
76
|
+
customCommentRuleValidate: {
|
|
77
|
+
commentContent: [
|
|
78
|
+
{required: true, trigger: "blur", message: "意见不能为空"},
|
|
79
|
+
{max: 1000, message: "意见不能大于1000位", trigger: "blur"}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
tableColumn() {
|
|
86
|
+
let column = [];
|
|
87
|
+
let self = this;
|
|
88
|
+
column.push({
|
|
89
|
+
title: '常用意见',
|
|
90
|
+
key: "commentContent",
|
|
91
|
+
minWidth: 150,
|
|
92
|
+
align: 'center',
|
|
93
|
+
});
|
|
94
|
+
column.push({
|
|
95
|
+
title: "排序码",
|
|
96
|
+
key: "orders",
|
|
97
|
+
width: 170,
|
|
98
|
+
align: "center",
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
column.push({
|
|
102
|
+
title: "修改时间",
|
|
103
|
+
key: "updateTime",
|
|
104
|
+
width: 170,
|
|
105
|
+
align: "center",
|
|
106
|
+
render: (v, param) => {
|
|
107
|
+
if (param.row.updateTime) {
|
|
108
|
+
let date = new Date(param.row.updateTime)
|
|
109
|
+
let y = date.getFullYear() // 年
|
|
110
|
+
let MM = date.getMonth() + 1 // 月
|
|
111
|
+
MM = MM < 10 ? ('0' + MM) : MM
|
|
112
|
+
let d = date.getDate() // 日
|
|
113
|
+
d = d < 10 ? ('0' + d) : d
|
|
114
|
+
let h = date.getHours() // 时
|
|
115
|
+
h = h < 10 ? ('0' + h) : h
|
|
116
|
+
let m = date.getMinutes()// 分
|
|
117
|
+
m = m < 10 ? ('0' + m) : m
|
|
118
|
+
let s = date.getSeconds()// 秒
|
|
119
|
+
s = s < 10 ? ('0' + s) : s
|
|
120
|
+
let state = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
|
|
121
|
+
return v("span", state);
|
|
122
|
+
}
|
|
123
|
+
return v("span", '')
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
column.push({
|
|
128
|
+
title: "操作", width: 160, align: 'center', tooltip: true,
|
|
129
|
+
render: (h, {row}) => {
|
|
130
|
+
return h("div", [
|
|
131
|
+
operateHref(this, h, row, "修改", () => {
|
|
132
|
+
this.openDetailModal('update', row);
|
|
133
|
+
}, "primary"),
|
|
134
|
+
operateHref(this, h, row, "删除", () => {
|
|
135
|
+
this.deleteCustomComment(row);
|
|
136
|
+
}, "error")
|
|
137
|
+
]);
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
return column;
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
methods: {
|
|
147
|
+
openDetailModal(type, row) {
|
|
148
|
+
this.customCommentDetailModal = true
|
|
149
|
+
if (type === 'create') {
|
|
150
|
+
this.customCommentDetailTitle = '新增常用意见'
|
|
151
|
+
} else {
|
|
152
|
+
this.customCommentDetailTitle = '修改常用意见'
|
|
153
|
+
this.customCommentDetailForm.id = row.id
|
|
154
|
+
this.customCommentDetailForm.commentContent = row.commentContent
|
|
155
|
+
this.customCommentDetailForm.orders = row.orders
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
customCommentDetailCancel() {
|
|
159
|
+
this.getAuditOpinionForSelect()
|
|
160
|
+
this.customCommentDetailForm = {
|
|
161
|
+
id: '',
|
|
162
|
+
commentContent: '',
|
|
163
|
+
orders: 10
|
|
164
|
+
}
|
|
165
|
+
this.customCommentDetailModal = false
|
|
166
|
+
},
|
|
167
|
+
customCommentDetailOk() {
|
|
168
|
+
const self = this
|
|
169
|
+
self.$refs.customCommentForm.validate((valid) => {
|
|
170
|
+
if (valid) {
|
|
171
|
+
if (self.customCommentDetailForm.id) {
|
|
172
|
+
ajax.post(this.smartFlowServerContext + "/manage/smartflowCustomComment/update", self.customCommentDetailForm).then((resp) => {
|
|
173
|
+
if (resp.data.code === "200") {
|
|
174
|
+
self.customCommentDetailForm = {
|
|
175
|
+
id: '',
|
|
176
|
+
commentContent: '',
|
|
177
|
+
orders: 10
|
|
178
|
+
}
|
|
179
|
+
self.refreshTable()
|
|
180
|
+
}
|
|
181
|
+
}).catch(err => {
|
|
182
|
+
console.log(err);
|
|
183
|
+
})
|
|
184
|
+
} else {
|
|
185
|
+
ajax.post(this.smartFlowServerContext + "/manage/smartflowCustomComment/insert", self.customCommentDetailForm).then((resp) => {
|
|
186
|
+
if (resp.data.code === "200") {
|
|
187
|
+
self.customCommentDetailForm = {
|
|
188
|
+
id: '',
|
|
189
|
+
commentContent: '',
|
|
190
|
+
orders: 10
|
|
191
|
+
}
|
|
192
|
+
self.refreshTable()
|
|
193
|
+
}
|
|
194
|
+
}).catch(err => {
|
|
195
|
+
console.log(err);
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
this.getAuditOpinionForSelect()
|
|
199
|
+
this.customCommentDetailModal = false
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
getAuditOpinionForSelect() {
|
|
204
|
+
const self = this
|
|
205
|
+
let auditOpinionForSelect = []
|
|
206
|
+
ajax.get(this.smartFlowServerContext + "/manage/smartflowCustomComment/list", {params: {limit: 100}}).then((resp) => {
|
|
207
|
+
if (resp.data.code == "200" && resp.data.data) {
|
|
208
|
+
resp.data.data.rows.forEach(item =>
|
|
209
|
+
auditOpinionForSelect.push({
|
|
210
|
+
value: item.commentContent,
|
|
211
|
+
label: item.commentContent,
|
|
212
|
+
type: item.commentType === '10' ? '自定义' : '系统预置'
|
|
213
|
+
})
|
|
214
|
+
)
|
|
215
|
+
self.auditOpinionForSelect = auditOpinionForSelect
|
|
216
|
+
}
|
|
217
|
+
}).catch(err => {
|
|
218
|
+
console.log(err);
|
|
219
|
+
})
|
|
220
|
+
},
|
|
221
|
+
deleteCustomComment(row) {
|
|
222
|
+
const self = this
|
|
223
|
+
this.$Modal.confirm({
|
|
224
|
+
title: '提示',
|
|
225
|
+
content: `<p>确定要删除${row.commentContent}吗?</p>`,
|
|
226
|
+
onOk: () => {
|
|
227
|
+
ajax.post(this.smartFlowServerContext + "/manage/smartflowCustomComment/delete/" + row.id).then(function (resp) {
|
|
228
|
+
if (resp.data.code === "200") {
|
|
229
|
+
self.refreshTable()
|
|
230
|
+
} else {
|
|
231
|
+
self.$Message.error(resp.data.data);
|
|
232
|
+
}
|
|
233
|
+
}).catch(function (err) {
|
|
234
|
+
self.$Message.error('删除失败,请联系应用管理员');
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
refreshTable() {
|
|
240
|
+
this.$refs.customCommentTable.tableRefresh()
|
|
241
|
+
},
|
|
242
|
+
updateValue() {
|
|
243
|
+
this.$emit('input', this.auditOpinion);
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
mounted() {
|
|
247
|
+
this.getAuditOpinionForSelect()
|
|
248
|
+
},
|
|
249
|
+
watch: {
|
|
250
|
+
auditOpinionText(label) {
|
|
251
|
+
this.auditOpinion = label;
|
|
252
|
+
},
|
|
253
|
+
auditOpinion(val) {
|
|
254
|
+
this.$emit('input', val)
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
</script>
|
|
260
|
+
|
|
261
|
+
<style scoped>
|
|
262
|
+
|
|
263
|
+
</style>
|
package/src/components/title.vue
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="model-header">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name: "model-title"
|
|
10
|
-
}
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<style scoped lang="less">
|
|
14
|
-
.model-header{
|
|
15
|
-
background: #F2F2F2;
|
|
16
|
-
line-height: 24px;
|
|
17
|
-
padding: 10px 15px;
|
|
18
|
-
font-size: 14px;
|
|
19
|
-
font-weight: bolder;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
margin: 5px 0;
|
|
22
|
-
color: #989898;
|
|
23
|
-
}
|
|
24
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="model-header">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "model-title"
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style scoped lang="less">
|
|
14
|
+
.model-header{
|
|
15
|
+
background: #F2F2F2;
|
|
16
|
+
line-height: 24px;
|
|
17
|
+
padding: 10px 15px;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: bolder;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
margin: 5px 0;
|
|
22
|
+
color: #989898;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
package/src/portrait.vue
CHANGED
|
@@ -151,6 +151,13 @@
|
|
|
151
151
|
<span>{{ rejectUsers.name }}</span>
|
|
152
152
|
<Button size="small" class="reject-user-button" @click="handleSelectRejectUser">选择</Button>
|
|
153
153
|
</Card>
|
|
154
|
+
<Card class="reject-attribute-card" dis-hover v-if="showRejectOption && auditResult == '90'">
|
|
155
|
+
<p slot="title">驳回给:</p>
|
|
156
|
+
<RadioGroup v-model="rejectToTakeOver">
|
|
157
|
+
<Radio label="original">原办理人</Radio>
|
|
158
|
+
<Radio label="actual">实际办理人</Radio>
|
|
159
|
+
</RadioGroup>
|
|
160
|
+
</Card>
|
|
154
161
|
<Card class="reject-attribute-card" dis-hover v-if="showProcessControl && auditResult == '90'">
|
|
155
162
|
<p slot="title">驳回的节点通过后:</p>
|
|
156
163
|
<RadioGroup v-model="rejectAttribute">
|
|
@@ -277,15 +284,21 @@
|
|
|
277
284
|
</template>
|
|
278
285
|
</Modal>
|
|
279
286
|
<!-- 驳回设置弹框 -->
|
|
280
|
-
<Modal v-model="rejectAttributesBoxShow" :title="showRejectToSelected ? '驳回设置' : '驳回的节点通过后'"
|
|
287
|
+
<Modal v-model="rejectAttributesBoxShow" :title="showRejectToSelected || showRejectOption ? '驳回设置' : '驳回的节点通过后'"
|
|
281
288
|
@on-cancel="rejectAttributesCancel"
|
|
282
289
|
@on-ok="rejectProcessWithRejectAttributes">
|
|
283
290
|
<Form :label-width="150">
|
|
284
|
-
<FormItem v-if="showProcessControl" :label="showRejectToSelected ? '驳回的节点通过后:' : ''" :label-width="showRejectToSelected ? 150 : 0">
|
|
291
|
+
<FormItem v-if="showProcessControl" :label="showRejectToSelected || showRejectOption ? '驳回的节点通过后:' : ''" :label-width="showRejectToSelected || showRejectOption ? 150 : 0">
|
|
285
292
|
<RadioGroup v-model="rejectAttribute">
|
|
286
293
|
<Radio v-for="(item, index) in rejectAttributeList" :key="index" :label="item.type">{{item.name}}</Radio>
|
|
287
294
|
</RadioGroup>
|
|
288
295
|
</FormItem>
|
|
296
|
+
<FormItem v-if="showRejectOption" label="驳回给:" :label-width="150">
|
|
297
|
+
<RadioGroup v-model="rejectToTakeOver">
|
|
298
|
+
<Radio label="original">原办理人</Radio>
|
|
299
|
+
<Radio label="actual">实际办理人</Radio>
|
|
300
|
+
</RadioGroup>
|
|
301
|
+
</FormItem>
|
|
289
302
|
<FormItem v-if="showRejectToSelected">
|
|
290
303
|
<template slot="label">
|
|
291
304
|
<span>
|
|
@@ -474,6 +487,11 @@ export default {
|
|
|
474
487
|
type: Array,
|
|
475
488
|
default: () => ([])
|
|
476
489
|
},
|
|
490
|
+
//默认是否驳回给转办人
|
|
491
|
+
defaultRejectToTakeOver: {
|
|
492
|
+
type: Boolean,
|
|
493
|
+
default: false
|
|
494
|
+
},
|
|
477
495
|
},
|
|
478
496
|
components: {
|
|
479
497
|
Title,
|
|
@@ -527,6 +545,8 @@ export default {
|
|
|
527
545
|
rejectAttributes: {},
|
|
528
546
|
showProcessControl: false,
|
|
529
547
|
showRejectToSelected: false,
|
|
548
|
+
showRejectOption: false,
|
|
549
|
+
rejectToTakeOver: this.defaultRejectToTakeOver ? 'actual' : 'original',
|
|
530
550
|
rejectUsers: {
|
|
531
551
|
name: '全部办理人',
|
|
532
552
|
id: 'all'
|
|
@@ -555,7 +575,7 @@ export default {
|
|
|
555
575
|
auditOpinion: '',
|
|
556
576
|
},
|
|
557
577
|
loading: false,
|
|
558
|
-
disable:
|
|
578
|
+
disable: true,
|
|
559
579
|
rejectedTask: false,
|
|
560
580
|
revokeDelegateTask: false,
|
|
561
581
|
appointTask: false,
|
|
@@ -1604,7 +1624,14 @@ export default {
|
|
|
1604
1624
|
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessHis', {params: params}).then(function (resp) {
|
|
1605
1625
|
if (resp.data.code === '200') {
|
|
1606
1626
|
self.processHistory = resp.data.data
|
|
1627
|
+
self.disable = false
|
|
1628
|
+
} else {
|
|
1629
|
+
self.disable = !!!taskId
|
|
1607
1630
|
}
|
|
1631
|
+
}).catch(err => {
|
|
1632
|
+
self.disable = !!!taskId
|
|
1633
|
+
console.log('获取流程审批历史失败,任务taskId为:', taskId)
|
|
1634
|
+
console.log(err)
|
|
1608
1635
|
})
|
|
1609
1636
|
},
|
|
1610
1637
|
|
|
@@ -1859,10 +1886,12 @@ export default {
|
|
|
1859
1886
|
self.executionCompleted(true, null, null, auditResult, self.curTaskId)
|
|
1860
1887
|
}, 1000)
|
|
1861
1888
|
} else {
|
|
1862
|
-
//
|
|
1889
|
+
// 驳回会签指定人员:前序节点只有一个会签节点才可选择驳回人员
|
|
1863
1890
|
self.showRejectToSelected = Array.isArray(result.data) && result.data.length === 1 && result.data[0].handleButtons?.includes('rejectToSelected')
|
|
1864
1891
|
self.targetTaskNode = Array.isArray(result.data) && result.data.length === 1 ? result.data[0].taskNode : ''
|
|
1865
|
-
|
|
1892
|
+
// 前序节点进行过交接时,支持选择驳回原办理人/实际办理人
|
|
1893
|
+
self.showRejectOption = Array.isArray(result.data) && result.data.some(item => item.taskTakedOver && (item.taskTakedOver === true || item.taskTakedOver === 'true'))
|
|
1894
|
+
if ((self.showRejectToSelected || self.showRejectOption) && !self.handleButtons?.includes('rejectProcessControl')) {
|
|
1866
1895
|
self.rejectAttributesBoxShow = true
|
|
1867
1896
|
} else {
|
|
1868
1897
|
self.handleButtons && self.handleButtons.includes('rejectProcessControl') ? self.getProcessAttributes() : self.doPass()
|
|
@@ -1921,6 +1950,7 @@ export default {
|
|
|
1921
1950
|
if (self.rejectUsers.id != 'all'){
|
|
1922
1951
|
self.auditParams.rejectUsers = self.rejectUsers.id
|
|
1923
1952
|
}
|
|
1953
|
+
self.auditParams.rejectToTakeOver = self.rejectToTakeOver && self.rejectToTakeOver != 'original'
|
|
1924
1954
|
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
1925
1955
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
1926
1956
|
let result = resp.data
|
|
@@ -2154,6 +2184,8 @@ export default {
|
|
|
2154
2184
|
this.targetTaskNodeProcessControl = 'inSequence'
|
|
2155
2185
|
this.showProcessControl = false
|
|
2156
2186
|
this.showRejectToSelected = false
|
|
2187
|
+
this.showRejectOption = false
|
|
2188
|
+
this.rejectToTakeOver = this.defaultRejectToTakeOver ? 'actual' : 'original'
|
|
2157
2189
|
this.selectedRejectUserList = []
|
|
2158
2190
|
this.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2159
2191
|
},
|
|
@@ -2187,6 +2219,8 @@ export default {
|
|
|
2187
2219
|
this.disable = false
|
|
2188
2220
|
this.showProcessControl = false
|
|
2189
2221
|
this.showRejectToSelected = false
|
|
2222
|
+
this.showRejectOption = false
|
|
2223
|
+
this.rejectToTakeOver = this.defaultRejectToTakeOver ? 'actual' : 'original'
|
|
2190
2224
|
this.selectedRejectUserList = []
|
|
2191
2225
|
this.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2192
2226
|
},
|
|
@@ -2202,6 +2236,8 @@ export default {
|
|
|
2202
2236
|
self.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2203
2237
|
self.targetTaskNodeProcessControl = currentRow.processControl
|
|
2204
2238
|
self.showRejectToSelected = currentRow.rejectToSelected
|
|
2239
|
+
self.rejectToTakeOver = this.defaultRejectToTakeOver ? 'actual' : 'original'
|
|
2240
|
+
self.showRejectOption = currentRow.taskTakedOver && (currentRow.taskTakedOver === true || currentRow.taskTakedOver === 'true')
|
|
2205
2241
|
},
|
|
2206
2242
|
handleSelectRejectUser() {
|
|
2207
2243
|
let self = this
|
|
@@ -2517,7 +2553,7 @@ export default {
|
|
|
2517
2553
|
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessAttributes', {params: params}).then(function (resp) {
|
|
2518
2554
|
if (resp.data.code === '200') {
|
|
2519
2555
|
if ((self.auditParams.auditResult == '70' && !resp.data.data.jumpFirstNode) || (self.auditParams.auditResult == '40' && (resp.data.data.multiNode || resp.data.data.preNodeGateway))) {
|
|
2520
|
-
if (self.showRejectToSelected && self.targetTaskNode) {
|
|
2556
|
+
if ((self.showRejectToSelected && self.targetTaskNode) || self.showRejectOption) {
|
|
2521
2557
|
self.rejectAttributesBoxShow = true
|
|
2522
2558
|
return
|
|
2523
2559
|
}
|