cloud-web-corejs 1.0.54-dev.346 → 1.0.54-dev.348

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.
@@ -0,0 +1,495 @@
1
+ <template>
2
+ <div id="containt">
3
+ <div class="filter-btns">
4
+ <el-select class="f-btn" v-model="formData.dateRange" @change="handleSelectChange">
5
+ <el-option :label="$t1('本日')" :value="1"></el-option>
6
+ <el-option :label="$t1('本周')" :value="2"></el-option>
7
+ <el-option :label="$t1('本月')" :value="3"></el-option>
8
+ <el-option :label="$t1('本年')" :value="4"></el-option>
9
+ </el-select>
10
+ <el-select
11
+ class="f-btn"
12
+ v-model="formData.stat"
13
+ :placeholder="$t2('全部状态', 'components.wf.wfReport.allStatus')"
14
+ clearable
15
+ @clear="formData.stat = null"
16
+ @change="handleSelectChange"
17
+ >
18
+ <el-option
19
+ :label="$t2('审核中', 'components.wf.wfStatus1')"
20
+ :value="1"
21
+ ></el-option>
22
+ <el-option
23
+ :label="$t2('已完成', 'components.wf.wfStatus2')"
24
+ :value="2"
25
+ ></el-option>
26
+ <el-option
27
+ :label="$t2('已驳回', 'components.wf.wfStatus3')"
28
+ :value="3"
29
+ ></el-option>
30
+ </el-select>
31
+ </div>
32
+ <div class="sum-statistics">
33
+ <div class="item">
34
+ <p>总流程数</p>
35
+ <b>{{ countData.total || 0 }}</b>
36
+ <!-- <p class="f-gray">较上月增长 12%</p> -->
37
+ <i class="ico iconfont icon-liuchengshu"></i>
38
+ </div>
39
+ <div class="item">
40
+ <p>快速处理</p>
41
+ <b>{{ countData.count_1 || 0 }}</b>
42
+ <p class="f-gray"><1天完成</p>
43
+ <i class="ico iconfont icon-kuaisuchuli"></i>
44
+ </div>
45
+ <div class="item">
46
+ <p>正常处理</p>
47
+ <b>{{ countData.count_1_3 || 0 }}</b>
48
+ <p class="f-gray">1-3天完成</p>
49
+ <i class="ico iconfont icon-zhengchangchuli"></i>
50
+ </div>
51
+ <div class="item">
52
+ <p>缓慢处理</p>
53
+ <b>{{ countData.count_3_7 || 0 }}</b>
54
+ <p class="f-gray">3-7天完成</p>
55
+ <i class="ico iconfont icon-huanmanchuli"></i>
56
+ </div>
57
+ <div class="item">
58
+ <p>超时处理</p>
59
+ <b>{{ countData.count_7 || 0 }}</b>
60
+ <p class="f-gray">>7天完成</p>
61
+ <i class="ico iconfont icon-chaoshichuli"></i>
62
+ </div>
63
+ </div>
64
+ <el-row style="margin: 0 -5px">
65
+ <el-col :span="16">
66
+ <el-card class="box-style1">
67
+ <div slot="header" class="clearfix">
68
+ <span>流程详情列表</span>
69
+ </div>
70
+ <div style="height: 100%">
71
+ <vxe-grid ref="table-m1" v-bind="vxeOption" :data="tableData"> </vxe-grid>
72
+ </div>
73
+ </el-card>
74
+ </el-col>
75
+ <el-col :span="8">
76
+ <el-card class="box-style1">
77
+ <div slot="header" class="clearfix">
78
+ <span>节点详情</span>
79
+ </div>
80
+ <div class="node-box">
81
+ <div class="info" v-if="currentRow.name">
82
+ <p class="tit">{{ currentRow.name }}</p>
83
+ <p>总耗时: {{ currentRow.duration }}分钟</p>
84
+ <el-tag type="warning" v-if="currentRow.stat === 1">{{
85
+ $t2("审核中", "components.wf.wfStatus1")
86
+ }}</el-tag>
87
+ <el-tag type="success" v-if="currentRow.stat === 2">{{
88
+ $t2("已完成", "components.wf.wfStatus3")
89
+ }}</el-tag>
90
+ <el-tag type="danger" v-if="currentRow.stat === 3">{{
91
+ $t2("已驳回", "components.wf.wfStatus2")
92
+ }}</el-tag>
93
+ </div>
94
+ <el-steps direction="vertical" :active="1" class="step-box3">
95
+ <el-step v-for="(row, index) in nodeList" :key="index">
96
+ <div slot="title">
97
+ <div class="name">{{ row.task_name }}</div>
98
+ <div class="a-time">耗时: {{ row.duration }}分钟</div>
99
+ </div>
100
+ <div slot="description">
101
+ <p>
102
+ <span class="use">{{ row.candidate_names }}</span>
103
+ <span class="time">{{ row.approve_time }}</span>
104
+ </p>
105
+ <p v-if="taskStatuses[row.type]" :class="taskStatuses[row.type].class">
106
+ {{ taskStatuses[row.type].value }}
107
+ </p>
108
+ <p v-if="row.opinion">审批意见:{{ row.opinion }}</p>
109
+ </div>
110
+ </el-step>
111
+ <!-- <el-step>
112
+ <div slot="title">
113
+ <div class="name">产品经理审批</div>
114
+ <div class="a-time">耗时: 2天</div>
115
+ </div>
116
+ <div slot="description">
117
+ <p>
118
+ <span class="use">张十三</span
119
+ ><span class="time">2019-02-05 12:33:02</span>
120
+ </p>
121
+ <p class="f-blue">审批中</p>
122
+ </div>
123
+ </el-step>
124
+ <el-step>
125
+ <div slot="title">
126
+ <div class="name">人事审批</div>
127
+ <div class="a-time">耗时: 2天</div>
128
+ </div>
129
+ <div slot="description">
130
+ <p>
131
+ <span class="use">张十三</span
132
+ ><span class="time">2019-02-05 12:33:02</span>
133
+ </p>
134
+ <p class="f-green">审批通过</p>
135
+ <p>审批意见:通过</p>
136
+ </div>
137
+ </el-step>
138
+ <el-step>
139
+ <div slot="title">
140
+ <div class="name">产品经理审批</div>
141
+ <div class="a-time">耗时: 2天</div>
142
+ </div>
143
+ <div slot="description">
144
+ <p>
145
+ <span class="use">张十三</span
146
+ ><span class="time">2019-02-05 12:33:02</span>
147
+ </p>
148
+ <p class="f-dred">审批不通过</p>
149
+ <p>审批意见:不通过</p>
150
+ </div>
151
+ </el-step> -->
152
+ </el-steps>
153
+ </div>
154
+ </el-card>
155
+ </el-col>
156
+ </el-row>
157
+ </div>
158
+ </template>
159
+
160
+ <script>
161
+ import scriptHttpMixin from "@base/components/xform/mixins/scriptHttp";
162
+ export default {
163
+ name: "wf_report:index",
164
+ mixins: [scriptHttpMixin],
165
+ data() {
166
+ return {
167
+ vxeOption: {},
168
+ serviceName: "sf-cloud-user",
169
+ tableData: [],
170
+ countData: {},
171
+ currentRow: {},
172
+ nodeList: [],
173
+
174
+ taskStatuses: {
175
+ start: {
176
+ class: "f-blue",
177
+ value: this.$t2("开始", "components.wf.startStatus"),
178
+ },
179
+ approve: {
180
+ class: "f-orgn",
181
+ value: this.$t2("待审批", "components.wf.approveStatus"),
182
+ },
183
+ submit: {
184
+ class: "f-green",
185
+ value: this.$t2("同意", "components.wf.submitStatus"),
186
+ },
187
+ reject: {
188
+ class: "f-red",
189
+ value: this.$t2("驳回", "components.wf.rejectStatus"),
190
+ },
191
+ transfer: {
192
+ class: "f-green",
193
+ value: this.$t2("转办", "components.wf.transferStatus"),
194
+ },
195
+ addIncreaseSign: {
196
+ class: "f-green",
197
+ value: this.$t2("加签", "components.wf.addIncreaseSignStatus"),
198
+ },
199
+ revoke: {
200
+ class: "f-red",
201
+ value: this.$t2("撤回", "components.wf.revokeStatus"),
202
+ },
203
+ end: {
204
+ class: "f-gray",
205
+ value: this.$t2("结束", "components.wf.endStatus"),
206
+ },
207
+ },
208
+ formData: {
209
+ dateRange: 3,
210
+ stat: null,
211
+ },
212
+ };
213
+ },
214
+ mounted() {
215
+ this.initTableList();
216
+ this.loadWfSummaryCount();
217
+ },
218
+ methods: {
219
+ searchEvent() {
220
+ this.$refs["table-m1"].commitProxy("reload");
221
+ },
222
+ initTableList() {
223
+ let that = this;
224
+ let formCode = this.$route.query.formCode;
225
+ let syncColumns = [];
226
+
227
+ let tableOption = {
228
+ vue: this,
229
+ tableRef: "table-m1",
230
+ tableName: "user-wf-report-index-m1",
231
+ path: `/${this.serviceName}/bd_api/intf/wfSummaryList`,
232
+ param: () => {
233
+ return {
234
+ ...this.formData,
235
+ // ...this.advancedFormData,
236
+ };
237
+ },
238
+ config: {
239
+ columnConfig: {
240
+ resizable: true,
241
+ },
242
+ },
243
+
244
+ columns: [
245
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
246
+ { field: "obj_type_name", title: "流程类型", width: 150, fixed: "left" },
247
+ { field: "name", title: "标题", width: 180 },
248
+ {
249
+ field: "stat",
250
+ title: "状态",
251
+ width: 150,
252
+ slots: {
253
+ default: ({ row }) => {
254
+ if (row.stat === 1) {
255
+ return [
256
+ <el-tag type="warning">
257
+ {this.$t2("审核中", "components.wf.wfStatus1")}
258
+ </el-tag>,
259
+ ];
260
+ } else if (row.stat === 2) {
261
+ return [
262
+ <el-tag type="success">
263
+ {this.$t2("已完成", "components.wf.wfStatus2")}
264
+ </el-tag>,
265
+ ];
266
+ } else if (row.stat === 3) {
267
+ return [
268
+ <el-tag type="info">
269
+ {this.$t2("已驳回", "components.wf.wfStatus3")}
270
+ </el-tag>,
271
+ ];
272
+ }
273
+ },
274
+ },
275
+ },
276
+ { field: "task_name", title: "当前节点", width: 180 },
277
+ {
278
+ field: "candidate_names",
279
+ title: "当前处理人",
280
+ width: 180,
281
+ slots: {
282
+ default: ({ row }) => {
283
+ return [
284
+ <div class="txt-mid">
285
+ <i class="iconfont icon-dangqianchuliren"></i>
286
+ <sapn>{row.candidate_names}</sapn>
287
+ </div>,
288
+ ];
289
+ },
290
+ },
291
+ },
292
+ {
293
+ field: "duration",
294
+ title: "总耗时",
295
+ width: 180,
296
+ slots: {
297
+ default: ({ row }) => {
298
+ return [
299
+ <div class="txt-mid">
300
+ <i class="iconfont icon-shijian"></i>
301
+ <sapn> {row.duration}</sapn>
302
+ </div>,
303
+ ];
304
+ },
305
+ },
306
+ },
307
+ {
308
+ field: "task_duration",
309
+ title: "当前节点耗时",
310
+ width: 180,
311
+ slots: {
312
+ default: ({ row }) => {
313
+ return [
314
+ <div class="txt-mid">
315
+ <i class="iconfont icon-shijian"></i>
316
+ <sapn> {row.task_duration}</sapn>
317
+ </div>,
318
+ ];
319
+ },
320
+ },
321
+ },
322
+ {
323
+ width: 47,
324
+ fixed: "right",
325
+ title: "",
326
+ sortable: false,
327
+ slots: {
328
+ default: ({ row }) => {
329
+ return [
330
+ <a
331
+ href="javascript:void(0);"
332
+ class="a-link"
333
+ onclick={() => {
334
+ this.loadWfSummaryNode(row);
335
+ }}
336
+ >
337
+ <el-tooltip
338
+ enterable={false}
339
+ effect="dark"
340
+ content="查看"
341
+ placement="top"
342
+ popper-class="tooltip-skin"
343
+ >
344
+ <i class="iconfont icon-dianji" />
345
+ </el-tooltip>
346
+ </a>,
347
+ ];
348
+ },
349
+ },
350
+ },
351
+ ],
352
+ };
353
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
354
+ this.vxeOption = opts;
355
+ });
356
+ },
357
+ loadWfSummaryCount() {
358
+ this.$http({
359
+ url: `/${this.serviceName}/bd_api/intf/wfSummaryCount`,
360
+ method: "post",
361
+ data: {
362
+ ...this.formData,
363
+ },
364
+ success: (res) => {
365
+ this.countData = res.objx || {};
366
+ },
367
+ });
368
+ },
369
+ loadWfSummaryNode(row) {
370
+ this.$http({
371
+ url: `/${this.serviceName}/bd_api/intf/wfSummaryNode`,
372
+ method: "post",
373
+ data: {
374
+ proc_inst_id: row.proc_inst_id,
375
+ },
376
+ success: (res) => {
377
+ this.currentRow = row;
378
+ this.nodeList = res.objx || [];
379
+ },
380
+ });
381
+ },
382
+ clearWfSummaryNode() {
383
+ this.currentRow = {};
384
+ this.nodeList = [];
385
+ },
386
+ handleSelectChange() {
387
+ this.loadWfSummaryCount();
388
+ this.searchEvent();
389
+ this.clearWfSummaryNode();
390
+ },
391
+ },
392
+ };
393
+ </script>
394
+ <style scoped lang="scss">
395
+ #containt {
396
+ background: none;
397
+ padding: 10px 0 0;
398
+ box-shadow: none;
399
+ }
400
+ .filter-btns {
401
+ .f-btn {
402
+ margin-right: 10px;
403
+ }
404
+ }
405
+ .sum-statistics {
406
+ display: flex;
407
+ margin: 10px -5px 0;
408
+ .item {
409
+ flex: 1;
410
+ background: #fff;
411
+ border: solid 1px #e9e9e9;
412
+ border-radius: 6px;
413
+ margin: 0 5px;
414
+ padding: 10px 14px 8px;
415
+ font-size: 12px;
416
+ position: relative;
417
+ .ico {
418
+ position: absolute;
419
+ top: 50%;
420
+ right: 18px;
421
+ width: 34px;
422
+ height: 34px;
423
+ margin-top: -17px;
424
+ border-radius: 6px;
425
+ text-align: center;
426
+ line-height: 35px;
427
+ font-size: 16;
428
+ background: #eff6ff;
429
+ color: #2f6ffc;
430
+ }
431
+ p {
432
+ margin-bottom: 0;
433
+ }
434
+ > b {
435
+ font-size: 26px;
436
+ margin: 8px 0 3px;
437
+ display: inline-block;
438
+ font-weight: 400;
439
+ }
440
+ &:nth-child(2) .ico {
441
+ background: #faf5ff;
442
+ color: #ab3dfa;
443
+ }
444
+ &:nth-child(3) .ico {
445
+ background: #f0fdf4;
446
+ color: #0aa945;
447
+ }
448
+ &:nth-child(4) .ico {
449
+ background: #fff7ed;
450
+ color: #f5520b;
451
+ }
452
+ &:nth-child(5) .ico {
453
+ background: #fef2f2;
454
+ color: #e70a15;
455
+ }
456
+ }
457
+ }
458
+ ::v-deep .box-style1 {
459
+ margin: 10px 5px 0;
460
+ .el-card__body {
461
+ height: calc(100vh - 254px);
462
+ }
463
+ }
464
+ .node-box {
465
+ .info {
466
+ border: solid 1px #e6ebf5;
467
+ background: #f6faff;
468
+ border-radius: 4px;
469
+ padding: 10px 14px;
470
+ position: relative;
471
+ font-size: 12px;
472
+ color: #666666;
473
+ margin-bottom: 8px;
474
+ p {
475
+ margin-bottom: 0;
476
+ }
477
+ .el-tag {
478
+ position: absolute;
479
+ right: 12px;
480
+ top: 50%;
481
+ margin-top: -14px;
482
+ }
483
+ .tit {
484
+ font-size: 13px;
485
+ color: #212121;
486
+ margin-bottom: 5px;
487
+ }
488
+ }
489
+ .el-steps {
490
+ height: calc(100vh - 326px);
491
+ overflow: auto;
492
+ padding-right: 10px;
493
+ }
494
+ }
495
+ </style>