index.js
21.3 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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-02-23 16:27:17
*/
import Vue from 'vue'
import { getPrintTemplateByCode, getPrintAcceptance,getPrintReceiveSupplementalMaterials,getPrintRejectForms,getPrintSendBackMaterials,getPrintRiviseForms} from "@/api/print";
import { uploadUndo } from "@/api/clxx";
import { getLodop } from "@/utils/LodopFuncs";
import { getNewDate } from '@/utils/util'
import adapter from "@/utils/sqs/adapter";
import {
stepExpandInfo,
record,
completeTask,
getNextLinkInfo,
getWorkFlowImage,
getPrintApplicationForm,
deleteFlow,
unClaimTask,
getZdInfo
} from "@/api/workFlow.js";
import { getZrzbsmList } from "@/api/search.js";
import { ywPopupDialog } from "@/utils/popup.js";
export default {
data () {
return {
//是否开启材料分屏
splitScreen: false,
//设置表单组件是否刷选值
fresh: 10,
//左侧菜单数据集合
unitData: [],
//顶部左侧按钮集合
leftButtonList: [],
//顶部右侧按钮集合
rightButtonList: [],
//批量按钮名称
batchButtonName: '',
// 受理申请信息
slsq: {},
dqhj: "",
newDate: getNewDate()
}
},
mounted () {
this.flowInitParam();
},
methods: {
/**
* @description: 加载流程初始参数
* @author: renchao
*/
flowInitParam () {
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid ? this.bestepid : '');
if (this.type) {
formdata.append("type", "READ_ONLY");
}
stepExpandInfo(formdata).then((res) => {
if (res.code === 200) {
this.leftButtonList = res.result.button;
if (res.result.properties && res.result.properties.length) {
this.dqhj = res.result.properties[0].value
this.$store.dispatch('getdqhj/setdqjh', this.dqhj);
}
this.rightButtonList = res.result.operation;
this.slsq = res.result.slsq
}
})
},
/**
* @description: 流程环节操作按钮
* @param {*} item
* @author: renchao
*/
operation (item) {
//按钮 B0:选择不动产单元 B1:流程图 B2:材料分屏 B3:材料导入 B4:登记簿 B5:证书预览 B6:打印申请书 B7:证书领取 B8:楼盘表 B9:登簿,B10:打印回执 ZSXG: 证书修改
//操作按钮 登簿:record 转件:transfer 退回:back 退出:signout 受理凭证 slpz
let that = this;
switch (item.value) {
case "B0":
this.openDialog(item)
break;
case "B1":
getWorkFlowImage(this.bsmSlsq, this.bestepid ? this.bestepid : '').then(res => {
let { result } = res
this.$popupDialog("流程图", "workflow/top/processViewer/index", {
xml: result.xml,
finishedInfo: {
finishedTaskSet: result.finishedActivityIds,
unfinishedTaskSet: result.runningActivityIds,
rejectedTaskSet: result.rejectedActivityIds,
finishedSequenceFlowSet: result.finishedSequenceFlowIds
},
handlinglist: result.runningTasks,
allCommentList: result.finishedTasks
}, '80%', true)
})
break;
case "B2": //材料分屏按钮
this.splitScreen = this.splitScreen ? false : true;
this.$store.dispatch("app/settScreen", this.splitScreen);
if (this.splitScreen) {
//如果当前选项卡为材料信息内容,递减到上一个选项卡内容
if (this.tabName == this.clxxTab.value) {
this.tabName = this.tabList[this.clxxIndex - 1].value;
this.getFromRouter(this.tabList[this.clxxIndex - 1].value);
}
//删除材料信息选项卡数据
this.tabList.splice(this.clxxIndex, 1);
} else {
//新增材料信息选项卡数据
this.tabList.splice(this.clxxIndex, 0, this.clxxTab);
}
break;
case "B3": //材料导入
document.getElementById("cldr").click();
break;
case "B4":
this.$popupDialog("登记簿详情", "registerBook/djbFrame", this.currentSelectProps, '80%', true)
break;
case "B5":
this.$popupDialog("证书证明预览", "workflow/top/zsyl/index", {
bsmSlsq: this.bsmSlsq,
entryType: '1'
}, '1230px', true)
break;
case "B-ZSXG":
this.$popupDialog("证书修改", "workflow/top/zsxg/index", { bsmSlsq: this.bsmSlsq, }, '55%', true)
break;
case "B6":
this.$popupDialog("打印申请书", "workflow/components/dialog/sqs",
{ bsmSldy: this.currentSelectProps.bsmSldy }, '30%', true
)
break;
case "B7":
this.$popupDialog("证书领取", "workflow/components/dialog/zslq",
{ bsmSlsq: this.$route.query.bsmSlsq }, '70%', true
)
break;
case "B8":
!window.djlx && getZrzbsmList(this.bsmSlsq).then((res) => {
if (res.code === 200) {
ywPopupDialog('楼盘表', 'lpb/index', {
bsm: res.result[0],
onlyShow: false,
unitData: window.unitData,
bsmSlsq: this.bsmSlsq,
showSave: true,
djlx: window.djlx
}, '85%', true, false)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
this.$message.error(err)
});
window.djlx && ywPopupDialog('楼盘表', 'lpb/zjgcdy', {
onlyShow: false,
unitData: window.unitData,
bsmSlsq: this.bsmSlsq,
showSave: true,
djlx: window.djlx
}, '85%', true, false)
break;
// 图形定位
case "B-TXDW":
getZdInfo(this.currentSelectProps.bdcdyid).then(res => {
this.bsmZd = res?.result[0]?.bsmZd
console.log(this.bsmZd);
this.$popupDialog('图形定位', 'workflow/top/map/index', { bsmZd: this.bsmZd }, '85%', true)
})
break;
case "back": //退回按钮
this.$popupDialog("退回", "workflow/top/back/index", {
bsmSlsq: this.bsmSlsq,
bestepid: this.bestepid ? this.bestepid : ''
}, '800px', true)
break;
case "transfer": //转件按钮
getNextLinkInfo({
bsmSlsq: this.bsmSlsq,
bestepid: this.bestepid ? this.bestepid : ''
}).then((res) => {
if (res.code === 200) {
if (res.result) {
this.sendToNext(res.result);
} else {
this.sendToEnd();
}
}
});
break;
case "stop": //终止按钮
this.$popupDialog("终止", "workflow/top/stop/index", {
bsmSlsq: this.bsmSlsq,
bestepid: this.bestepid ? this.bestepid : ''
}, '600px', true)
break;
case "signout":
window.close();
//取消认领
unClaimTask(this.bsmSlsq, this.bestepid ? this.bestepid : '')
break;
case "B9":
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid ? this.bestepid : '');
this.$confirm("请确认是否登簿", "提示", {
iconClass: "el-icon-info", //自定义图标样式
confirmButtonText: "确认", //确认按钮文字更换
cancelButtonText: "取消", //取消按钮文字更换
showClose: true, //是否显示右上角关闭按钮
type: "warning", //提示类型 success/info/warning/error
}).then(function () {
record(formdata).then((res) => {
if (res.code === 200) {
if (res.result.length === 1) {
res.result[0].state ? that.$message({
message: '登簿成功',
type: 'success'
}) : ywPopupDialog("登簿错误明细", "workflow/components/dialog/dblist", { result: res.result }, '30%', true)
}
else {
ywPopupDialog("登簿错误明细", "workflow/components/dialog/dblist", { result: res.result }, '30%', true)
}
} else {
that.$message.error(res.message)
}
})
})
break;
case "B10":
break;
case "rm":
this.del()
break;
// 互联网数据共享
case "B-HLGXSJ":
this.$popupDialog("互联网数据共享", "sjgx/gbmhlgxsjgx/gbmhlgxsjgx", {}, '90%', true)
break;
// slpz 受理凭证
case "slpz":
getPrintTemplateByCode({ tmpno: 'bdcdjslpz' }).then(res => {
if (res.code === 200) {
getPrintAcceptance(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
if (infoRes.result.fileList && infoRes.result.fileList.length > 0) {
infoRes.result.fileList.forEach((it, index) => {
let key = index + 1
this.$set(infoRes.result, "file" + key, it.sjmc)
this.$set(infoRes.result, "file" + key + 'ys', it.ys)
this.$set(infoRes.result, "file" + key + 'lx', it.sjlx==1?"原件":"复印件")
})
}
infoRes.result.nownian = this.newDate.split(' ')[0].split('年')[0]
infoRes.result.nowyue = this.newDate.slice(5,7)
infoRes.result.nowri = this.newDate.slice(8,10)
let date = infoRes.result.sqrq
infoRes.result.sqnian = date.split(' ')[0].split('-')[0]
infoRes.result.sqyue = date.split(' ')[0].split('-')[1]
infoRes.result.sqri = date.split(' ')[0].split('-')[2]
console.log(infoRes.result)
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
}
});
} else {
this.$message.error(res.message);
}
})
break;
// 补充材料通知书
case "bccltzs":
this.$popupDialog("补充材料通知书", "workflow/top/bccltzs/index",
{ bsmSlsq: this.$route.query.bsmSlsq, bsmSldy: this.currentSelectProps.bsmSldy,type:"bccltzs" },
'70%', true)
break;
// 补充材料接收凭证
case "bccljspz":
getPrintTemplateByCode({ tmpno: 'bdcdjbccljspz' }).then(res => {
if (res.code === 200) {
getPrintReceiveSupplementalMaterials(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
if (infoRes.result.fileList && infoRes.result.fileList.length > 0) {
infoRes.result.fileList.forEach((it, index) => {
let key = index + 1
this.$set(infoRes.result, "file" + key, it.sjmc)
this.$set(infoRes.result, "file" + key + 'ys', it.ys)
this.$set(infoRes.result, "file" + key + 'lx', it.sjlx==1?"原件":"复印件")
})
}
infoRes.result.nownian = this.newDate.split(' ')[0].split('年')[0]
infoRes.result.nowyue = this.newDate.slice(5,7)
infoRes.result.nowri = this.newDate.slice(8,10)
let date = infoRes.result.sqrq
infoRes.result.sqnian = date.split(' ')[0].split('-')[0]
infoRes.result.sqyue = date.split(' ')[0].split('-')[1]
infoRes.result.sqri = date.split(' ')[0].split('-')[2]
console.log(infoRes.result)
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
}
});
} else {
this.$message.error(res.message);
}
})
break;
// 不予登记告知书
case "bydjgzs":
getPrintTemplateByCode({ tmpno: 'bydjgzs' }).then(res => {
if (res.code === 200) {
getPrintRejectForms(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
if (infoRes.result.fileList && infoRes.result.fileList.length > 0) {
infoRes.result.fileList.forEach((it, index) => {
let key = index + 1
this.$set(infoRes.result, "file" + key, it.sjmc)
this.$set(infoRes.result, "file" + key + 'ys', it.ys)
})
}
infoRes.result.nownian = this.newDate.split(' ')[0].split('年')[0]
infoRes.result.nowyue = this.newDate.slice(5,7)
infoRes.result.nowri = this.newDate.slice(8,10)
let date = infoRes.result.sqrq
infoRes.result.sqnian = date.split(' ')[0].split('-')[0]
infoRes.result.sqyue = date.split(' ')[0].split('-')[1]
infoRes.result.sqri = date.split(' ')[0].split('-')[2]
console.log(infoRes.result)
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
}
});
} else {
this.$message.error(res.message);
}
})
break;
// 申请材料退回通知书
case "sqclthtzs":
getPrintTemplateByCode({ tmpno: 'bdcdjsqclthtzs' }).then(res => {
if (res.code === 200) {
getPrintSendBackMaterials(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
if (infoRes.result.fileList && infoRes.result.fileList.length > 0) {
infoRes.result.fileList.forEach((it, index) => {
let key = index + 1
this.$set(infoRes.result, "file" + key, it.sjmc)
this.$set(infoRes.result, "file" + key + 'ys', it.ys)
})
}
infoRes.result.nownian = this.newDate.split(' ')[0].split('年')[0]
infoRes.result.nowyue = this.newDate.slice(5,7)
infoRes.result.nowri = this.newDate.slice(8,10)
let date = infoRes.result.sqrq
infoRes.result.sqnian = date.split(' ')[0].split('-')[0]
infoRes.result.sqyue = date.split(' ')[0].split('-')[1]
infoRes.result.sqri = date.split(' ')[0].split('-')[2]
console.log(infoRes.result)
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
}
});
} else {
this.$message.error(res.message);
}
})
break;
// 不动产更正登记通知书
case "gzdjtzs":
getPrintTemplateByCode({ tmpno: 'bdcgzdjtzs' }).then(res => {
if (res.code === 200) {
getPrintRiviseForms(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
if (infoRes.result.fileList && infoRes.result.fileList.length > 0) {
infoRes.result.fileList.forEach((it, index) => {
let key = index + 1
this.$set(infoRes.result, "file" + key, it.sjmc)
this.$set(infoRes.result, "file" + key + 'ys', it.ys)
})
}
infoRes.result.nownian = this.newDate.split(' ')[0].split('年')[0]
infoRes.result.nowyue = this.newDate.slice(5,7)
infoRes.result.nowri = this.newDate.slice(8,10)
let date = infoRes.result.sqrq
infoRes.result.sqnian = date.split(' ')[0].split('-')[0]
infoRes.result.sqyue = date.split(' ')[0].split('-')[1]
infoRes.result.sqri = date.split(' ')[0].split('-')[2]
console.log(infoRes.result)
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
}
});
} else {
this.$message.error(res.message);
}
})
break;
}
},
/**
* @description: del
* @author: renchao
*/
del () {
let formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
this.$confirm("确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
deleteFlow(formdata).then((res) => {
if (res.code === 200) {
this.$message({
type: "success",
message: "删除成功!",
});
window.close();
window.opener.getBpageList();
} else {
this.$message.error(res.message);
}
})
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
})
})
},
/**
* @description: 发送下一个环节
* @param {*} obj
* @author: renchao
*/
sendToNext (obj) {
this.$popupDialog("转出", "workflow/top/transfer/index", {
obj: obj,
bsmSlsq: this.bsmSlsq,
tabList: this.tabList,
tshowidea: this.showidea
}, '800px', true)
},
/**
* @description: 转出最后一个流程
* @param {*} obj
* @author: renchao
*/
sendToEnd (obj) {
this.$popupDialog("转出", "workflow/top/transfer/index", {
obj: "",
bsmSlsq: this.bsmSlsq,
tabList: this.tabList,
showidea: this.showidea
}, '800px', true)
},
/**
* @description: 批量操作
* @author: renchao
*/
handleBatchDel () {
this.$popupDialog("批量删除", "workflow/components/batchDel", {
width: "50%",
btnShow: false,
bsmSlsq: this.bsmSlsq,
dataList: this.unitData,
})
},
/**
* @description: handleChange
* @param {*} file
* @author: renchao
*/
handleChange (file) {
var formdata = new FormData();
formdata.append("file", file.raw);
formdata.append("bsmSldy", this.currentSelectProps.bsmSldy);
formdata.append("bsmSlsq", this.bsmSlsq);
uploadUndo(formdata).then(res => {
if (res.code == 200) {
this.$message.success("导入成功")
} else {
this.$message.error(res.message)
}
})
},
/**
* @description: 上传
* @param {*} file
* @author: renchao
*/
beforeUpload (file) {
return true;
}
}
}