index.vue
12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<template>
<div class="app-container">
<taskCard :task="task" v-for="task in taskList" @sendToParent="showTask"/>
<h5Page :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<el-dialog :title="title" :visible.sync="open2" width="300px" append-to-body>
<threestepInfo :businessKey="businessKey" v-if="open2"/>
</el-dialog>
<el-dialog :title="title" :visible.sync="construct" width="300px" append-to-body>
<constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct" />
</el-dialog>
<!-- 会议管理 -->
<el-dialog :title="title" :visible.sync="conferenceOpen" width="300px" append-to-body>
<conferenceInfo :idInfo="idInfo" v-if="conferenceOpen"/>
</el-dialog>
<!-- 请假申请 -->
<el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="300px" append-to-body>
<leaveApplicationInfo :idInfo="idInfo" v-if="leaveApplicationOpen"/>
</el-dialog>
<el-dialog :title="title" :visible.sync="earthsites" width="300px" append-to-body>
<earthsitesInfo :businessKey="businessKey" v-if="earthsites" />
</el-dialog>
<el-dialog :title="title" :visible.sync="contract" width="300px" append-to-body>
<contractInfo :businessKey="businessKey" v-if="contract" />
</el-dialog>
<!-- 后勤管理 -->
<el-dialog :title="title" :visible.sync="logisticsInfoOpen" width="300px" append-to-body
:close-on-click-modal="false">
<logisticsInfo :idInfo="idInfo" v-if="logisticsInfoOpen"/>
</el-dialog>
<!-- 办文办事 -->
<el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="300px" append-to-body
:close-on-click-modal="false">
<handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" :depts="depts"
:businessKey="definitionKey"
:controlId="controlId"/>
</el-dialog>
<!-- 线下案卷交办 -->
<el-dialog :title="title" :visible.sync="caseOffline" width="300px" append-to-body :close-on-click-modal="false">
<caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/>
</el-dialog>
<!-- 平台违规信息 -->
<el-dialog :title="title" :visible.sync="violationCaseFile" width="300px" append-to-body :close-on-click-modal="false">
<violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/>
</el-dialog>
<!-- 违规预警信息 -->
<el-dialog :title="title" :visible.sync="violationCaseFile1" width="300px" append-to-body :close-on-click-modal="false">
<violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/>
</el-dialog>
<el-dialog :title="title" :visible.sync="supervisionOpen" width="300px" append-to-body :close-on-click-modal="false">
<supervisionInfo :infoData="supervisionData"/>
</el-dialog>
<el-dialog :title="title" :visible.sync="company" width="300px" append-to-body :close-on-click-modal="false">
<companyInfo :businessKey="businessKey" v-if="company"/>
</el-dialog>
<el-dialog :title="title" :visible.sync="vehicle" width="300px" append-to-body :close-on-click-modal="false">
<vehicleInfo :businessKey="businessKey" v-if="vehicle"/>
</el-dialog>
<el-dialog :title="title" :visible.sync="driver" width="300px" append-to-body :close-on-click-modal="false">
<driverInfo :businessKey="businessKey" v-if="driver"/>
</el-dialog>
</div>
</template>
<script>
import {
listEndTask,
listTask,
formDataShow
} from "@/api/activiti/taskhistory";
import Treeselect from "@riophae/vue-treeselect";
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign";
import pagination from '../Pagination';
import threestepInfo from "@/views/h5/task/threestepInfo";
import taskCard from "@/views/h5/task/taskCard";
import conferenceInfo from "@/views/h5/task/conferenceInfo";
import leaveApplicationInfo from "@/views/h5/leaveApplication/leaveApplicationInfo";
import constructsiteInfo from "@/views/h5/task/constructsiteInfo";
import earthsitesInfo from "@/views/h5/task/earthsitesInfo";
import contractInfo from "@/views/h5/task/contractInfo";
import logisticsInfo from "@/views/h5/task/logisticsInfo";
import handleInfo from "@/views/h5/task/handleInfo";
import caseOfflineInfo from "@/views/h5/caseOffline/caseOfflineInfo";
import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
import violationWarningInformationInfo from "@/views/h5/task/violationWarningInformationInfo";
import supervisionInfo from "@/views/h5/task/SupervisionInfo";
import companyInfo from "@/views/activiti/task/companyInfo";
import driverInfo from "@/views/activiti/task/driverInfo";
import vehicleInfo from "@/views/activiti/task/vehicleInfo";
import {
getArea,
getDict,
getUsers,
getSupervision
} from "@/api/dict";
export default {
name: "taskHistory",
props: {
type: {
type: Number
}
},
components: {
taskCard,
threestepInfo,
conferenceInfo,
leaveApplicationInfo,
logisticsInfo,
handleInfo,
constructsiteInfo,
Treeselect,
earthsitesInfo,
contractInfo,
caseOfflineInfo,
violationCaseFileInfo,
pagination,
violationWarningInformationInfo,
supervisionInfo,
companyInfo,
driverInfo,
vehicleInfo
},
data() {
return {
id: '',
definitionKey: '',
businessKey: '',
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 请假表格数据
taskList: [],
// 弹出层标题
title: "",
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
},
// 表单参数
form: {
formData: []
},
needShow:false,
// 表单校验
rules: {},
uploadImageDialog: false,
idInfo:null,
signData:null,
supervisionData: null,
// 是否显示弹出层
earthsites: false,
contract: false,
logisticsInfoOpen: false,
handleAffairsInfoOpen: false,
caseOffline: false,
violationCaseFile: false,
violationCaseFile1: false,
supervisionOpen: false,
open: false,
open2: false,
conferenceOpen: false,
construct: false,
leaveApplicationOpen: false,
company:false,
driver:false,
vehicle:false,
};
},
created() {
let dep = {type: "CSUserDepartmentType"};
getDict(dep).then(res => {
this.depts = res.result;
});
let role = {type: "CSUserPostType"};
getDict(role).then(res => {
this.roles = res.result;
});
this.getList();
},
methods: {
/** 查询请假列表 */
getList() {
this.loading = true;
if(this.type == 1){
listEndTask(this.queryParams).then(response => {
this.taskList = response.rows;
this.total = response.total;
this.loading = false;
});
}else{
listTask(this.queryParams).then(response => {
this.taskList = response.rows;
this.total = response.total;
this.loading = false;
});
}
},
// 取消按钮
cancel() {
this.earthsites=false;
this.contract=false;
this.logisticsInfoOpen=false;
this.handleAffairsInfoOpen=false;
this.caseOffline=false;
this.violationCaseFile=false;
this.violationCaseFile1=false;
this.supervisionOpen=false;
this.open=false;
this.open2=false;
this.conferenceOpen=false;
this.construct=false;
this.leaveApplicationOpen=false;
this.company=false;
this.driver=false;
this.vehicle=false;
this.reset();
},
// 表单重置
reset() {
this.definitionKey = '',
this.businessKey = '',
this.form = {
formData: [],
};
this.resetForm("form");
},
showTask(row,idx) {
this.needShow = false;
this.reset();
this.definitionKey = row.definitionKey;
this.businessKey = row.businessKey;
this.id = row.id;
this.title = "详情";
formDataShow(row.id).then(response => {
let datas = response.data;
let formData = []
for (let i = 0; i < datas.length; i++) {
let strings = datas[i].split('--__!!')
let controlValue = null
let controlDefault = null
switch (strings[1]) {
case 'radio':
controlValue = idx;
controlDefault = strings[4]
break;
// default:
}
formData.push({
controlId: strings[0],
controlType: strings[1],
controlLable: strings[2],
controlIsParam: strings[3],
controlValue: controlValue,
controlDefault: controlDefault
})
}
if (this.definitionKey == "handleAffairs" || this.definitionKey == "gongwenchuli" || this.definitionKey == "yuelan" || this.definitionKey == "yuelanxuexi") {
this.controlId = formData[0].controlId;
this.idInfo = row.businessKey.split(":")[1];
this.handleAffairsInfoOpen = true;
return;
}
});
if(this.definitionKey == "conference"){
this.idInfo = row.businessKey.substring(row.businessKey.indexOf(":")+1);
this.conferenceOpen = true;
return;
}
if(this.definitionKey == "workflow_leave"){
this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":")+1);
this.leaveApplicationOpen = true;
return;
}
if(this.definitionKey == "workflow_constructsite"){
getSignByObjId(this.businessKey.split(":")[1]).then(res=>{
this.signData = res;
this.construct = true;
});
return;
}
if(this.definitionKey == "workflow_earthsites"){
this.earthsites = true;
return;
}
if(this.definitionKey == "workflow_conract"){
this.contract = true;
return;
}
if(this.definitionKey == "workflow_threestep"){
this.open2 = true;
return;
}
if (this.definitionKey == "logistics") {
this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
this.logisticsInfoOpen = true;
return;
}
if(this.definitionKey == "workflow_caseoffline"){
this.caseOffline = true;
return;
}
if(this.definitionKey == "workflow_casefile"){
this.violationCaseFile = true;
return;
}
if(this.definitionKey == "violation_warning"){
this.violationCaseFile1 = true;
return;
}
if(this.definitionKey.indexOf("supervision")>-1){
const params = {
id: row.businessKey.split(":")[1],
}
getSupervision(params).then(res=>{
if(res.result==null){
this.$message.error("获取纪检督察详情失败!请重试")
return;
}
this.supervisionData = res.result;
this.supervisionOpen = true;
})
return;
}
if(this.definitionKey == "workflow_company"){
this.company = true;
return;
}
if(this.definitionKey == "workflow_vehicle"){
this.vehicle = true;
return;
}
if(this.definitionKey == "workflow_driver"){
this.driver = true;
return;
}
},
}
};
</script>
<style>
@import '../../../assets/css/task.css'
</style>
<style scope>
.el-select-dropdown__item{
width:300px;
}
</style>