王飞
2025-01-23 99365608dec6eade7d645a91fb0f2205a332d1f1
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
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
// pages/fireSafetymeasure/fireSafetymeasure.js
var req_url = getApp().globalData.base_url;
const app = getApp()
Page({
 
    /**
     * 页面的初始数据
     */
    data: {
        locknum: 0,
        opinion: '',
        bumen: '',
        bindnum: '',
        miehuoqinum: '',
        miehuotannum: '',
        fangshuidainum: '',
        firesafetymeasure: '',
        zypcode: '',
        username: wx.getStorageSync('username'),
        phone: wx.getStorageSync('phone'),
        safetyMeasure: [
            {
                context: "动火设备内部构件清理干净,蒸汽吹扫或水洗合格,达到动火条件",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "断开与动火设备相连接的所有管线,加盲板( )块,未采取水封或仅关闭阀门的方式代替盲板",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "动火点周围及附近的孔洞、窖井、地沟、水封设施、污水井等已清除易燃物,并已采取覆盖、铺沙等手段进行隔离",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "油气罐区内动火点同一防火堤内和防火间距内的油罐不同时进行脱水和取样作业",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "作业已采取防火花飞溅措施,作业人员应佩戴必要的个体防护装备",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "在有可燃物构件和使用可燃物做防腐内衬的设备内部动火作业,已采取防火隔绝 措施",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "乙炔气瓶直立放置,已采取防倾倒措施并安装防回火装置;乙炔气瓶、氧气瓶与火源间的距离不应小于10 m,两气瓶相互间距不应小于5 m",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "现场配备灭火器( )台,灭火毯( )块,消防蒸汽带或消防水带( )",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "电焊机所处位置已考虑防火防爆要求,且已可靠接地",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "动火点周围规定距离内没有易燃易爆化学品的装卸、排放、喷漆等可能引起火爆炸的危险作业",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "动火点30 m内垂直空间未排放可燃气体;15 m内垂直空间未排放可燃液体;10 m范围内及动火点下方未同时进行可燃溶剂清洗或喷漆等作业,10 m范围内未见有可燃性粉尘清扫作业",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "已开展作业危害分析,制定相应的安全风险管控措施,交叉作业已明确协调人",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "用于连续检测的移动式可燃气体检测仪已配备到位",
                safetymeasure: '',
                name: '',
                phone: '',
                lock: true,
 
            },
            {
                context: "配备的摄录设备已到位,且防爆级别满足安全要求",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "其他相关特殊作业已办理相应安全作业票,作业现场四周已设立警戒区",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
            {
                context: "",
                safetymeasure: '',
                refer: "",
                name: '',
                phone: '',
                lock: true,
            },
        ],
    },
 
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        console.log(options);
        this.setData({
            firesafetymeasure: options.safetymeasure,
            opinion: options.opinion,
            bumen: options.bumen,
            zypcode: options.zypcode
        })
        this.getList();
    },
    getList: function () {
        var that = this;
        console.log(that.data.zypcode);
        //请求后台数据
        wx.request({
            url: req_url + "/findFireCode",
            data: {
                code: that.data.zypcode,
            },
            method: 'get',
            success: function (res) {
 
                console.log(res);
                var datas = res.data;
                if (res.statusCode != 200) {
                    wx.showToast({
                        title: '获取数据失败',
                        icon: 'none',
                        duration: 2000
                    });
                } else {
                    var zypd = []
                    var json = {}
                    json.context = that.data.safetyMeasure[0].context
                    json.refer = datas.refer1
                    json.safetymeasure = datas.safetymeasure1
                    json.name = datas.safetymeasure1.split(',')[0]
                    json.phone = datas.safetymeasure1.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure1.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure1.split(',')[1]) {
                        console.log(11111);
                        json.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json.lock = true
                    }
                    zypd.push(json)
                    var json1 = {}
                    json1.context = that.data.safetyMeasure[1].context
                    json1.refer = datas.refer2
                    json1.safetymeasure = datas.safetymeasure2
                    json1.name = datas.safetymeasure2.split(',')[0]
                    json1.phone = datas.safetymeasure2.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure2.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure2.split(',')[1]) {
 
                        json1.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json1.lock = true
                    }
                    zypd.push(json1)
                    var json2 = {}
                    json2.context = that.data.safetyMeasure[2].context
                    json2.refer = datas.refer3
                    json2.safetymeasure = datas.safetymeasure3
                    json2.name = datas.safetymeasure3.split(',')[0]
                    json2.phone = datas.safetymeasure3.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure3.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure3.split(',')[1]) {
 
                        json2.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json2.lock = true
                    }
                    zypd.push(json2)
                    var json3 = {}
                    json3.context = that.data.safetyMeasure[3].context
                    json3.refer = datas.refer4
                    json3.safetymeasure = datas.safetymeasure4
                    json3.name = datas.safetymeasure4.split(',')[0]
                    json3.phone = datas.safetymeasure4.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure4.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure4.split(',')[1]) {
 
                        json3.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json3.lock = true
                    }
                    zypd.push(json3)
                    var json4 = {}
                    json4.context = that.data.safetyMeasure[4].context
                    json4.refer = datas.refer5
                    json4.safetymeasure = datas.safetymeasure5
                    json4.name = datas.safetymeasure5.split(',')[0]
                    json4.phone = datas.safetymeasure5.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure5.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure5.split(',')[1]) {
 
                        json4.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json4.lock = true
                    }
                    zypd.push(json4)
                    var json5 = {}
                    json5.context = that.data.safetyMeasure[5].context
                    json5.refer = datas.refer6
                    json5.safetymeasure = datas.safetymeasure6
                    json5.name = datas.safetymeasure6.split(',')[0]
                    json5.phone = datas.safetymeasure6.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure6.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure6.split(',')[1]) {
 
                        json5.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json5.lock = true
                    }
                    zypd.push(json5)
                    var json6 = {}
                    json6.context = that.data.safetyMeasure[6].context
                    json6.refer = datas.refer7
                    json6.safetymeasure = datas.safetymeasure7
                    json6.name = datas.safetymeasure7.split(',')[0]
                    json6.phone = datas.safetymeasure7.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure7.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure7.split(',')[1]) {
 
                        json6.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json6.lock = true
                    }
                    zypd.push(json6)
                    var json7 = {}
                    json7.context = that.data.safetyMeasure[7].context
                    json7.refer = datas.refer8
                    json7.safetymeasure = datas.safetymeasure8
                    json7.name = datas.safetymeasure8.split(',')[0]
                    json7.phone = datas.safetymeasure8.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure8.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure8.split(',')[1]) {
 
                        json7.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json7.lock = true
                    }
                    zypd.push(json7)
                    var json8 = {}
                    json8.context = that.data.safetyMeasure[8].context
                    json8.refer = datas.refer9
                    json8.safetymeasure = datas.safetymeasure9
                    json8.name = datas.safetymeasure9.split(',')[0]
                    json8.phone = datas.safetymeasure9.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure9.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure9.split(',')[1]) {
 
                        json8.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json8.lock = true
                    }
                    zypd.push(json8)
                    var json9 = {}
                    json9.context = that.data.safetyMeasure[9].context
                    json9.refer = datas.refer10
                    json9.safetymeasure = datas.safetymeasure10
                    json9.name = datas.safetymeasure10.split(',')[0]
                    json9.phone = datas.safetymeasure10.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure10.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure10.split(',')[1]) {
 
                        json9.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json9.lock = true
                    }
                    zypd.push(json9)
                    var json10 = {}
                    json10.context = that.data.safetyMeasure[10].context
                    json10.refer = datas.refer11
                    json10.safetymeasure = datas.safetymeasure11
                    json10.name = datas.safetymeasure11.split(',')[0]
                    json10.phone = datas.safetymeasure11.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure11.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure11.split(',')[1]) {
 
                        json10.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json10.lock = true
                    }
                    zypd.push(json10)
                    var json11 = {}
                    json11.context = that.data.safetyMeasure[11].context
                    json11.refer = datas.refer12
                    json11.safetymeasure = datas.safetymeasure12
                    json11.name = datas.safetymeasure12.split(',')[0]
                    json11.phone = datas.safetymeasure12.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure12.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure12.split(',')[1]) {
 
                        json11.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json11.lock = true
                    }
                    zypd.push(json11)
                    var json12 = {}
                    json12.context = that.data.safetyMeasure[12].context
                    json12.refer = datas.refer13
                    json12.safetymeasure = datas.safetymeasure13
                    json12.name = datas.safetymeasure13.split(',')[0]
                    json12.phone = datas.safetymeasure13.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure13.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure13.split(',')[1]) {
 
                        json12.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json12.lock = true
                    }
                    zypd.push(json12)
                    var json13 = {}
                    json13.context = that.data.safetyMeasure[13].context
                    json13.refer = datas.refer14
                    json13.safetymeasure = datas.safetymeasure14
                    json13.name = datas.safetymeasure14.split(',')[0]
                    json13.phone = datas.safetymeasure14.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure14.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure14.split(',')[1]) {
                        json13.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json13.lock = true
                    }
                    zypd.push(json13)
                    var json14 = {}
                    json14.context = that.data.safetyMeasure[14].context
                    json14.refer = datas.refer15
                    json14.safetymeasure = datas.safetymeasure15
                    json14.name = datas.safetymeasure15.split(',')[0]
                    json14.phone = datas.safetymeasure15.split(',')[1]
                    if (wx.getStorageSync('username') == datas.safetymeasure15.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure15.split(',')[1]) {
                        json14.lock = false
                    } else {
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json14.lock = true
                    }
 
                    zypd.push(json14)
                    if (datas.safetymeasureother != '') {
                        var json15 = {}
                        json15.context = datas.safetymeasureother
                        json15.refer = datas.refer16
                        json15.safetymeasure = datas.safetymeasure16
                        json15.name = datas.safetymeasure16.split(',')[0]
                        json15.phone = datas.safetymeasure16.split(',')[1]
                        if (wx.getStorageSync('username') == datas.safetymeasure16.split(',')[0] && wx.getStorageSync('phone') == datas.safetymeasure16.split(',')[1]) {
                            json15.lock = false
                        } else {
                            that.setData({
                                locknum: that.data.locknum + 1
                            })
                            json15.lock = true
                        }
                        zypd.push(json15)
                    } else {
                        var json15 = {}
                        json15.context = ''
                        json15.refer = ''
                        json15.safetymeasure = ''
                        json15.name = ''
                        json15.phone = ''
                        that.setData({
                            locknum: that.data.locknum + 1
                        })
                        json15.lock = true
                        zypd.push(json15)
                    }
 
                    var fenxian = []
                    that.setData({
                        bindnum: datas.bindnum,
                        miehuoqinum: datas.miehuoqinum,
                        miehuotannum: datas.miehuotannum,
                        bindnfangshuidainumum: datas.fangshuidainum,
                        safetyMeasure: zypd,
                    })
                }
            }
        })
    },
    onChange(event) {
        var that = this;
 
        var zypd = []
        var json = {}
        json.context = that.data.safetyMeasure[0].context
        json.refer = that.data.safetyMeasure[0].refer
        json.lock = that.data.safetyMeasure[0].lock
        if (event.currentTarget.dataset.index == 0) {
 
            json.refer = event.detail
        }
        zypd.push(json)
        var json1 = {}
        json1.context = that.data.safetyMeasure[1].context
        json1.refer = that.data.safetyMeasure[1].refer
        json1.lock = that.data.safetyMeasure[1].lock
        if (event.currentTarget.dataset.index == 1) {
            json1.refer = event.detail
        }
        zypd.push(json1)
        var json2 = {}
        json2.context = that.data.safetyMeasure[2].context
        json2.refer = that.data.safetyMeasure[2].refer
        json2.lock = that.data.safetyMeasure[2].lock
        if (event.currentTarget.dataset.index == 2) {
            json2.refer = event.detail
        }
        zypd.push(json2)
        var json3 = {}
        json3.context = that.data.safetyMeasure[3].context
        json3.refer = that.data.safetyMeasure[3].refer
        json3.lock = that.data.safetyMeasure[3].lock
        if (event.currentTarget.dataset.index == 3) {
            json3.refer = event.detail
        }
        zypd.push(json3)
        var json4 = {}
        json4.context = that.data.safetyMeasure[4].context
        json4.refer = that.data.safetyMeasure[4].refer
        json4.lock = that.data.safetyMeasure[4].lock
        if (event.currentTarget.dataset.index == 4) {
            json4.refer = event.detail
 
        }
        zypd.push(json4)
        var json5 = {}
        json5.context = that.data.safetyMeasure[5].context
        json5.refer = that.data.safetyMeasure[5].refer
        json5.lock = that.data.safetyMeasure[5].lock
        if (event.currentTarget.dataset.index == 5) {
            json5.refer = event.detail
 
        }
        zypd.push(json5)
        var json6 = {}
        json6.context = that.data.safetyMeasure[6].context
        json6.refer = that.data.safetyMeasure[6].refer
        json6.lock = that.data.safetyMeasure[6].lock
        if (event.currentTarget.dataset.index == 6) {
            json6.refer = event.detail
        }
        zypd.push(json6)
        var json7 = {}
        json7.context = that.data.safetyMeasure[7].context
        json7.refer = that.data.safetyMeasure[7].refer
        json7.lock = that.data.safetyMeasure[7].lock
        if (event.currentTarget.dataset.index == 7) {
            json7.refer = event.detail
 
        }
        zypd.push(json7)
        var json8 = {}
        json8.context = that.data.safetyMeasure[8].context
        json8.refer = that.data.safetyMeasure[8].refer
        json8.lock = that.data.safetyMeasure[8].lock
        if (event.currentTarget.dataset.index == 8) {
            json8.refer = event.detail
 
        }
        zypd.push(json8)
        var json9 = {}
        json9.context = that.data.safetyMeasure[9].context
        json9.refer = that.data.safetyMeasure[9].refer
        json9.lock = that.data.safetyMeasure[9].lock
        if (event.currentTarget.dataset.index == 9) {
            json9.refer = event.detail
 
        }
        zypd.push(json9)
        var json10 = {}
        json10.context = that.data.safetyMeasure[10].context
        json10.refer = that.data.safetyMeasure[10].refer
        json10.lock = that.data.safetyMeasure[10].lock
 
        if (event.currentTarget.dataset.index == 10) {
            json10.refer = event.detail
 
        }
        zypd.push(json10)
        var json11 = {}
        json11.context = that.data.safetyMeasure[11].context
        json11.refer = that.data.safetyMeasure[11].refer
        json11.lock = that.data.safetyMeasure[11].lock
 
        if (event.currentTarget.dataset.index == 11) {
            json11.refer = event.detail
 
        }
        zypd.push(json11)
        var json12 = {}
        json12.context = that.data.safetyMeasure[12].context
        json12.refer = that.data.safetyMeasure[12].refer
        json12.lock = that.data.safetyMeasure[12].lock
 
        if (event.currentTarget.dataset.index == 12) {
            json12.refer = event.detail
 
        }
        zypd.push(json12)
        var json13 = {}
        json13.context = that.data.safetyMeasure[13].context
        json13.refer = that.data.safetyMeasure[13].refer
        json13.lock = that.data.safetyMeasure[13].lock
 
        if (event.currentTarget.dataset.index == 13) {
            json13.refer = event.detail
 
        }
        zypd.push(json13)
        var json14 = {}
        json14.context = that.data.safetyMeasure[14].context
        json14.refer = that.data.safetyMeasure[14].refer
        json14.lock = that.data.safetyMeasure[14].lock
 
        if (event.currentTarget.dataset.index == 14) {
            json14.refer = event.detail
 
        }
        zypd.push(json14)
        var json15 = {}
        console.log(that.data.safetyMeasure[15]);
 
        json15.context = that.data.safetyMeasure[15].context
        json15.refer = that.data.safetyMeasure[15].refer
        json15.lock = that.data.safetyMeasure[15].lock
 
        if (event.currentTarget.dataset.index == 15) {
            json15.refer = event.detail
        }
        zypd.push(json15)
 
 
        var fenxian = []
        that.setData({
            safetyMeasure: zypd,
        })
 
        var fenxian = []
        that.setData({
            safetyMeasure: zypd,
        })
        // this.setData({
        //     safetyMeasure[1].refer: event.detail,
        // });
    },
    showBack() {
        wx.navigateBack({
            delta: 1
        })
    },
    showPopup() {
        var that = this;
        var json = {}
 
        json.code = that.data.zypcode,
            json.refer1 = that.data.safetyMeasure[0].refer,
            json.refer2 = that.data.safetyMeasure[1].refer,
            json.refer3 = that.data.safetyMeasure[2].refer,
            json.refer4 = that.data.safetyMeasure[3].refer,
            json.refer5 = that.data.safetyMeasure[4].refer,
            json.refer6 = that.data.safetyMeasure[5].refer,
            json.refer7 = that.data.safetyMeasure[6].refer,
            json.refer = that.data.safetyMeasure[7].refer,
            json.refer9 = that.data.safetyMeasure[8].refer,
            json.refer10 = that.data.safetyMeasure[9].refer,
            json.refer11 = that.data.safetyMeasure[10].refer,
            json.refer12 = that.data.safetyMeasure[11].refer,
            json.refer13 = that.data.safetyMeasure[12].refer,
            json.refer14 = that.data.safetyMeasure[13].refer,
            json.refer15 = that.data.safetyMeasure[14].refer,
 
            json.refer16 = that.data.safetyMeasure[15].refer,
 
 
            wx.navigateTo({
                url: '../safetyMeasureSign/safetyMeasureSign?opinion=' + that.data.opinion + '&bumen=' + that.data.bumen + '&name=' + that.data.zypcode + '&url=/updateGround' + '&refer=' + json
            })
 
    },
    submitForm: function (e) {
        var that = this;
        console.log(11111111);
        console.log(that.data.safetyMeasure);
        console.log(that.data.zypcode);
        console.log(that.data.safetyMeasure[1].refer);
        wx.request({
            url: req_url + "/updateDH",
            method: 'post',
            data: {
                code: that.data.zypcode,
                refer1: that.data.safetyMeasure[0].refer,
                refer2: that.data.safetyMeasure[1].refer,
                refer3: that.data.safetyMeasure[2].refer,
                refer4: that.data.safetyMeasure[3].refer,
                refer5: that.data.safetyMeasure[4].refer,
                refer6: that.data.safetyMeasure[5].refer,
                refer7: that.data.safetyMeasure[6].refer,
                refer8: that.data.safetyMeasure[7].refer,
                refer9: that.data.safetyMeasure[8].refer,
                refer10: that.data.safetyMeasure[9].refer,
                refer11: that.data.safetyMeasure[10].refer,
                refer12: that.data.safetyMeasure[11].refer,
                refer13: that.data.safetyMeasure[12].refer,
                refer14: that.data.safetyMeasure[13].refer,
                refer15: that.data.safetyMeasure[14].refer,
 
                refer16: that.data.safetyMeasure[15].refer,
            },
            header: {
                'Content-Type': 'application/json'
            },
            success: (res) => {
                if (res.errMsg == "request:ok") {
                    wx.showToast({
                        title: '操作成功',
                        icon: 'success',
                        duration: 2000
                    });
                    wx.navigateBack({
                        delta: 1
                    })
                } else {
                    wx.showToast({
                        title: '操作失败',
                    })
                }
            }
            // })
        });
    },
 
    uploadPerPic(url, back) {
        var name = ''
        var that = this
        name = 'sign' + that.data.zypcode + wx.getStorageSync('phone');
        wx.uploadFile({
            url: req_url + "addsafetyMeasurepic",
            method: "POST",
            filePath: url,
            name: 'file',
            formData: {
                'opinion': that.data.opinion,
                'bumen': that.data.bumen,
                'name': name,
            },
            success(res) {
                console.log(res);
                back(res.data);
            },
            fail(e) { }
        })
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {
 
    },
 
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {
        console.log(this.data.signtempFilePaths);
        console.log(11111111);
        console.log(this.data.safetyMeasure);
        console.log(this.data.zypcode);
        console.log(this.data.safetyMeasure[1].refer);
        if (this.data.signtempFilePaths != '') {
            var that = this;
            that.uploadPerPic(this.data.signtempFilePaths, function back(resp) {
                wx.request({
                    url: req_url + "/updateDH",
                    method: 'post',
                    data: {
                        username: wx.getStorageSync('username'),
                        phone: wx.getStorageSync('phone'),
                        sign: resp,
                        code: that.data.zypcode,
                        refer1: that.data.safetyMeasure[0].refer,
                        refer2: that.data.safetyMeasure[1].refer,
                        refer3: that.data.safetyMeasure[2].refer,
                        refer4: that.data.safetyMeasure[3].refer,
                        refer5: that.data.safetyMeasure[4].refer,
                        refer6: that.data.safetyMeasure[5].refer,
                        refer7: that.data.safetyMeasure[6].refer,
                        refer8: that.data.safetyMeasure[7].refer,
                        refer9: that.data.safetyMeasure[8].refer,
                        refer10: that.data.safetyMeasure[9].refer,
                        refer11: that.data.safetyMeasure[10].refer,
                        refer12: that.data.safetyMeasure[11].refer,
                        refer13: that.data.safetyMeasure[12].refer,
                        refer14: that.data.safetyMeasure[13].refer,
                        refer15: that.data.safetyMeasure[14].refer,
                        refer16: that.data.safetyMeasure[15].refer,
                    },
                    header: {
                        'Content-Type': 'application/json'
                    },
                    success: (res) => {
                        if (res.errMsg == "request:ok") {
                            var content = "用户:" + wx.getStorageSync('username') + "提交安全措施确认"
                            wx.request({
                                url: req_url + "/addZypLog",
                                method: 'post',
                                data: {
                                    name: wx.getStorageSync('username'),
                                    zyptype: "动火作业",
                                    // bumen: that.data.bumen,
                                    zypcode: that.data.zypcode,
                                    content: content,
                                },
                                header: {
                                    'Content-Type': 'application/json'
                                },
                                success: (res) => {
                                    console.log(res);
 
                                }
                            });
                            wx.showToast({
                                title: '操作成功',
                                icon: 'success',
                                duration: 2000
                            });
                            wx.navigateBack({
                                delta: 1
                            })
                        } else {
                            wx.showToast({
                                title: '操作失败',
                            })
                        }
                    }
                    // })
                });
 
            })
        }
 
    },
 
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {
 
    },
 
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {
 
    },
 
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {
 
    },
 
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {
 
    },
 
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {
 
    }
})