|
|
@@ -423,53 +423,84 @@
|
|
423
|
423
|
}
|
|
424
|
424
|
}
|
|
425
|
425
|
},
|
|
426
|
|
- async onLoad(optioin) {
|
|
|
426
|
+ onShow(){
|
|
|
427
|
+ const pages = getCurrentPages();
|
|
|
428
|
+ const currentPage = pages[pages.length - 1];
|
|
|
429
|
+ const routeParams = currentPage.options;
|
|
|
430
|
+
|
|
|
431
|
+ // let fullPath = `${currentPage.route}`;
|
|
|
432
|
+ // console.log(fullPath)
|
|
|
433
|
+ // if(fullPath === '/pages/myTask/workOrderDetail/workOrderDetail'){
|
|
|
434
|
+ // if (Object.keys(routeParams).length > 0) {
|
|
|
435
|
+ // fullPath += '?';
|
|
|
436
|
+ // for (const key in routeParams) {
|
|
|
437
|
+ // fullPath += `${key}=${routeParams[key]}&`;
|
|
|
438
|
+ // }
|
|
|
439
|
+ // fullPath = fullPath.slice(0, -1); // 去除最后一个多余的 '&'
|
|
|
440
|
+ // }
|
|
|
441
|
+ // uni.reLaunch({
|
|
|
442
|
+ // url:fullPath
|
|
|
443
|
+ // });
|
|
|
444
|
+ // }
|
|
|
445
|
+ // console.log(fullPath);
|
|
|
446
|
+
|
|
|
447
|
+ this.init(routeParams)
|
|
|
448
|
+ },
|
|
|
449
|
+ onLoad(optioin) {
|
|
427
|
450
|
console.log(optioin,'1111111111111')
|
|
428
|
|
- await this.getGongDanType()
|
|
429
|
|
- this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
|
|
430
|
|
- this.workorderid = optioin.wid
|
|
431
|
|
- this.sms_id = optioin.sms_id
|
|
432
|
|
- this.listtype = optioin.listtype
|
|
433
|
|
- this.getDetail(0)
|
|
434
|
|
- this.getDetail(3)
|
|
435
|
|
- this.getDetail(1)
|
|
436
|
|
- this.getDetail(4)
|
|
437
|
|
- if(this.sms_id) {
|
|
438
|
|
- this.getButtons()
|
|
439
|
|
- }else if(optioin.buttons) {
|
|
440
|
|
- console.log(JSON.parse(optioin.buttons))
|
|
441
|
|
- JSON.parse(optioin.buttons).forEach(v => {
|
|
442
|
|
- let btn = this.$mButtonConfig[v.key];
|
|
443
|
|
- if (btn != undefined) {
|
|
444
|
|
- this.orderButtonData.push(btn);
|
|
445
|
|
- }
|
|
446
|
|
- //判断有没有返回按钮有的话显示维修确认页面
|
|
447
|
|
- if(v.key == "repairconfirmnew"){
|
|
448
|
|
- this.isconfirm = 1
|
|
449
|
|
- }
|
|
450
|
|
- })
|
|
451
|
|
- }
|
|
452
|
|
- // pageData.getDet((res, data) => {
|
|
453
|
|
- // this.departList = data
|
|
454
|
|
- // })
|
|
455
|
|
- this.departList = JSON.parse(uni.getStorageSync('deptTreeData'))
|
|
456
|
|
- // pageData.getApplicant('', (res) => {
|
|
457
|
|
- // this.userCodeList = res
|
|
458
|
|
- // })
|
|
459
|
|
- if(this.sms_id) {
|
|
460
|
|
- this.isDisplay.displaySegmentedControl = true
|
|
461
|
|
- this.segmenter.type = 0
|
|
462
|
|
- this.segmenter.items = ["处理结果", "协作工单","工单流程", "维修记录", "评价"]
|
|
463
|
|
- this.getDetail(2)
|
|
464
|
|
- } else {
|
|
465
|
|
- this.isDisplay.displaySegmentedControl = true
|
|
466
|
|
- this.segmenter.type = optioin.segmenter
|
|
467
|
|
- this.segmenter.items = segmenterData[optioin.segmenter]
|
|
468
|
|
- this.getDetail(2)
|
|
469
|
|
- }
|
|
470
|
|
- this.roleCode = uni.getStorageSync("roleCode")
|
|
|
451
|
+ // 页面
|
|
|
452
|
+ uni.$on("updateDetail", (res) => {
|
|
|
453
|
+ this.init(optioin)
|
|
|
454
|
+ })
|
|
|
455
|
+ // this.init(optioin)
|
|
471
|
456
|
},
|
|
472
|
457
|
methods: {
|
|
|
458
|
+ async init(optioin){
|
|
|
459
|
+ await this.getGongDanType()
|
|
|
460
|
+ this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
|
|
|
461
|
+ this.workorderid = optioin.wid
|
|
|
462
|
+ this.sms_id = optioin.sms_id
|
|
|
463
|
+ this.listtype = optioin.listtype
|
|
|
464
|
+ this.getDetail(0)
|
|
|
465
|
+ this.getDetail(3)
|
|
|
466
|
+ this.getDetail(1)
|
|
|
467
|
+ this.getDetail(4)
|
|
|
468
|
+ if(this.sms_id) {
|
|
|
469
|
+ this.getButtons()
|
|
|
470
|
+ }else if(optioin.buttons) {
|
|
|
471
|
+ console.log(JSON.parse(optioin.buttons))
|
|
|
472
|
+ this.orderButtonData = []
|
|
|
473
|
+ JSON.parse(optioin.buttons).forEach(v => {
|
|
|
474
|
+ let btn = this.$mButtonConfig[v.key];
|
|
|
475
|
+ if (btn != undefined) {
|
|
|
476
|
+ this.orderButtonData.push(btn);
|
|
|
477
|
+ }
|
|
|
478
|
+ //判断有没有返回按钮有的话显示维修确认页面
|
|
|
479
|
+ if(v.key == "repairconfirmnew"){
|
|
|
480
|
+ this.isconfirm = 1
|
|
|
481
|
+ }
|
|
|
482
|
+ })
|
|
|
483
|
+ }
|
|
|
484
|
+ // pageData.getDet((res, data) => {
|
|
|
485
|
+ // this.departList = data
|
|
|
486
|
+ // })
|
|
|
487
|
+ this.departList = JSON.parse(uni.getStorageSync('deptTreeData'))
|
|
|
488
|
+ // pageData.getApplicant('', (res) => {
|
|
|
489
|
+ // this.userCodeList = res
|
|
|
490
|
+ // })
|
|
|
491
|
+ if(this.sms_id) {
|
|
|
492
|
+ this.isDisplay.displaySegmentedControl = true
|
|
|
493
|
+ this.segmenter.type = 0
|
|
|
494
|
+ this.segmenter.items = ["处理结果", "协作工单","工单流程", "维修记录", "评价"]
|
|
|
495
|
+ this.getDetail(2)
|
|
|
496
|
+ } else {
|
|
|
497
|
+ this.isDisplay.displaySegmentedControl = true
|
|
|
498
|
+ this.segmenter.type = optioin.segmenter
|
|
|
499
|
+ this.segmenter.items = segmenterData[optioin.segmenter]
|
|
|
500
|
+ this.getDetail(2)
|
|
|
501
|
+ }
|
|
|
502
|
+ this.roleCode = uni.getStorageSync("roleCode")
|
|
|
503
|
+ },
|
|
473
|
504
|
clickEye(){
|
|
474
|
505
|
this.detailContentData.F_DeptPhone = decrypt(this.detailContentData.F_DeptPhoneShow)
|
|
475
|
506
|
this.detailContentData.F_Applicantsphone = decrypt(this.detailContentData.F_ApplicantsphoneShow)
|