safecheck-client 3.0.35-gongyi → 3.0.35-gongyi-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,9 @@
28
28
  condition="f_userinfo_code = '{}'"
29
29
  style="width: 60%" placeholder="用户编号">
30
30
  </div>
31
+
32
+
33
+
31
34
  <div :class="$parent.$parent.style">
32
35
  <label class="font_normal_body">结果查询</label>
33
36
  <v-select
@@ -40,6 +43,46 @@
40
43
  condition="f_repaired = '{}'"
41
44
  close-on-select clear-button> </v-select>
42
45
  </div>
46
+
47
+ <div :class="$parent.$parent.style" >
48
+ <label class="font_normal_body">用户类型</label>
49
+ <v-select id="f_usertype"
50
+ placeholder='用户类型'
51
+ class="select select_list"
52
+ :value.sync="model.f_usertype"
53
+ :value-single="true"
54
+ :options='$parent.$parent.usertypes'
55
+ v-model="model.f_usertype"
56
+ close-on-select clear-button></v-select>
57
+ </div>
58
+
59
+
60
+
61
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}">
62
+ <label class="font_normal_body">隐患级别</label>
63
+ <v-select style="width:60% "
64
+ class="select select_list"
65
+ :value.sync="$parent.$parent.defectLeave"
66
+ v-model="$parent.$parent.defectLeave"
67
+ :options='$parent.$parent.defectLeaveList'
68
+ placeholder='隐患级别'
69
+ close-on-select>
70
+ </v-select>
71
+ </div>
72
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}">
73
+ <label class="font_normal_body">隐患类型</label>
74
+ <v-select style="width:60% "
75
+ class="select select_list"
76
+ :value.sync="$parent.$parent.defectType"
77
+ v-model="$parent.$parent.defectType"
78
+ :options='$parent.$parent.getdefectType'
79
+ placeholder='隐患类型'
80
+ :multiple="true">
81
+ </v-select>
82
+ </div>
83
+
84
+
85
+
43
86
  <div class=" col-sm-4 form-group button-range" >
44
87
  <div class="span" style="float: right;margin-top: 8px">
45
88
  <div style="float: right" class="button_spacing"
@@ -122,6 +165,7 @@
122
165
  </div>
123
166
 
124
167
 
168
+
125
169
  </div>
126
170
  <div class="row" v-if="$parent.$parent.$parent.showItem">
127
171
  <div :class="$parent.$parent.style">
@@ -171,6 +215,9 @@
171
215
  condition="f_userinfo_code = '{}'"
172
216
  style="width: 60%" placeholder="用户编号">
173
217
  </div>
218
+
219
+
220
+
174
221
  <div :class="$parent.$parent.style">
175
222
  <label class="font_normal_body">结果查询</label>
176
223
  <v-select
@@ -266,7 +313,8 @@
266
313
  <th><nobr>是否有隐患</nobr></th>
267
314
  <th><nobr>隐患数</nobr></th>
268
315
  <th><nobr>整改数</nobr></th>
269
-
316
+ <th><nobr>已处理数</nobr></th>
317
+ <th><nobr>未处理数</nobr></th>
270
318
  </tr>
271
319
  </template>
272
320
  <template partial='body'>
@@ -283,7 +331,8 @@
283
331
  <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
284
332
  <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
285
333
  <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
286
-
334
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
335
+ <td style="text-align: center;white-space:nowrap;">{{row.remainder}}</td>
287
336
  </template>
288
337
  </data-grid>
289
338
  </criteria-paged>
@@ -386,14 +435,18 @@
386
435
  }
387
436
  export default {
388
437
  title: '隐患查询',
389
- data() {
438
+ data () {
390
439
  let model = new PagedList('rs/sql/GetCheckPaperByDefect', 20, {
391
- f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
440
+ f_filialeids: 'this.f_filialeids', f_defect_content: 'this.f_defect_content'
392
441
  })
393
442
  model.f_filialeids = '(' + this.$login.f.orgid + ')'
394
- model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
443
+ model.f_defect_content = "CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
395
444
  return {
396
- repaired:[{label: '未修', value: '未修'}, {label: '已修', value: '已修'}],
445
+ usertypes: this.usertypes(),
446
+ defectType:[],
447
+ defectLeave:'',
448
+ defectLeaveList:[{label:'全部',value:''},{label:'一级隐患',value:'一级隐患'},{label:'二级隐患',value:'二级隐患'},{label:'三级隐患',value:'三级隐患'}],
449
+ repaired: [{label: '未修', value: '未修'}, {label: '已修', value: '已修'}],
397
450
  hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
398
451
  f: this.$login.f,
399
452
  model: model,
@@ -406,27 +459,27 @@
406
459
  modelval: [],
407
460
  checkersid: [],
408
461
  sliceArea: [],
409
- cbc:[],
410
- cbcs:[],
462
+ cbc: [],
463
+ cbcs: [],
411
464
  thead: '',
412
- showModal2:false,
413
- checkAll:false,
414
- checkes:[],
415
- batchSent:'否',
416
- repairTypeOptions:this.$appdata.getParam('报修类型'),
465
+ showModal2: false,
466
+ checkAll: false,
467
+ checkes: [],
468
+ batchSent: '否',
469
+ repairTypeOptions: this.$appdata.getParam('报修类型'),
417
470
  dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
418
- selectData:{
419
- dispatchType:'派发给维修员',
420
- f_repairman:'',
421
- f_remarks:'',
422
- f_repairtype:''
471
+ selectData: {
472
+ dispatchType: '派发给维修员',
473
+ f_repairman: '',
474
+ f_remarks: '',
475
+ f_repairtype: ''
423
476
  },
424
477
  repairers: [],
425
- headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','是否有隐患','隐患数','隐患情况'],
426
- bodyData: ['f_entry_status','f_userinfo_code','f_user_name','f_user_phone','f_residential_area','f_address','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','f_defect_content']
478
+ headData: ['入户状态', '用户编号', '用户名', '用户电话', '用户小区', '用户地址', '安检时间', '安检员', '计划名', '是否有隐患', '隐患数', '隐患情况'],
479
+ bodyData: ['f_entry_status', 'f_userinfo_code', 'f_user_name', 'f_user_phone', 'f_residential_area', 'f_address', 'f_offsite_time', 'f_checker_name', 'f_plan_name', 'f_has_defect', 'f_defect_count', 'f_defect_content']
427
480
  }
428
481
  },
429
- props:{
482
+ props: {
430
483
 
431
484
  style: {
432
485
  type: String,
@@ -440,126 +493,140 @@
440
493
  },
441
494
 
442
495
  methods: {
443
- cancel1(){
444
- this.showModal2=false
445
- this.selectData={
446
- dispatchType:'',
447
- f_repairman:'',
448
- f_remarks:'',
449
- f_repairtype:''
496
+ usertypes () {
497
+ return this.$appdata.getParam('用户类型') ? [{
498
+ label: '全部',
499
+ value: ''
500
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
501
+ },
502
+ cancel1 () {
503
+ this.showModal2 = false
504
+ this.selectData = {
505
+ dispatchType: '',
506
+ f_repairman: '',
507
+ f_remarks: '',
508
+ f_repairtype: ''
450
509
  }
451
510
  },
452
- showmod(){
453
- if(this.model.rows.length==0){
511
+ showmod () {
512
+ if (this.model.rows.length == 0) {
454
513
  this.$showMessage('请先选择需要转维修的用户!')
455
514
  return
456
515
  }
457
- if (this.checkAll || this.checkes.length>0) {
458
- this.showModal2=true
459
- }else{
516
+ if (this.checkAll || this.checkes.length > 0) {
517
+ this.showModal2 = true
518
+ } else {
460
519
  this.$showMessage('请先勾选需要转维修的用户!')
461
520
  return
462
521
  }
463
522
 
464
523
  },
465
- rectification(){
466
- if(this.selectData.dispatchType){
467
- if(this.selectData.dispatchType=='派发给站点'){
468
- if(!this.selectData.f_reciever){
524
+ rectification () {
525
+ if (this.selectData.dispatchType) {
526
+ if (this.selectData.dispatchType == '派发给站点') {
527
+ if (!this.selectData.f_reciever) {
469
528
  this.$showMessage('请选择部门!')
470
529
  return
471
530
  }
472
- }else{
473
- if(!this.selectData.f_repairman){
531
+ } else {
532
+ if (!this.selectData.f_repairman) {
474
533
  this.$showMessage('请选择维修员!')
475
534
  return
476
535
  }
477
536
  }
478
- }else {
537
+ } else {
479
538
  this.$showMessage('请选择派发类型!')
480
539
  return
481
540
  }
482
- if(!this.selectData.f_repairtype){
541
+ if (!this.selectData.f_repairtype) {
483
542
  this.$showMessage('请选择报修类型!')
484
543
  return
485
544
  }
486
- this.$showMessage('确定要将当前选中用户转派给维修吗?!', ['confirm', 'cancel']).then((msg)=>{
487
- if(msg=='confirm'){
488
-
489
- let act={}
490
- let toRepair=''
491
- if(this.selectData.dispatchType=='派发给站点'){
492
- act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
493
- toRepair=null
494
- }else{
495
- console.log('派发给维修员---------'+this.selectData.f_repairman)
496
- act={f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
497
- toRepair='一级派单'
545
+ this.$showMessage('确定要将当前选中用户转派给维修吗?!', ['confirm', 'cancel']).then((msg) => {
546
+ if (msg == 'confirm') {
547
+
548
+ let act = {}
549
+ let toRepair = ''
550
+ if (this.selectData.dispatchType == '派发给站点') {
551
+ act = {
552
+ f_meetunit: this.selectData.f_meetunit,
553
+ f_reciever: this.selectData.f_reciever,
554
+ f_service_acitivity_type: '派单'
555
+ }
556
+ toRepair = null
557
+ } else {
558
+ console.log('派发给维修员---------' + this.selectData.f_repairman)
559
+ act = {f_reciever: this.selectData.f_repairman, f_service_acitivity_type: '派单'}
560
+ toRepair = '一级派单'
498
561
  }
499
562
  this.$resetpost(`/rs/logic/UploadRectification`,
500
563
  {
501
- condition:this.model.params.condition,
502
- itemname:this.model.itemname,
503
- f_filialeids:this.model.params.f_filialeids,
504
- switchCheckAll:true,
505
- checkAll:this.checkAll,
506
- param:this.checkes,
507
- columnName:'id',
508
- toRepair:toRepair,
509
- activity:act,
510
- deps:this.$login.f.deps,
511
- depids:this.$login.f.depids,
512
- f_remarks:this.selectData.f_remarks,
513
- f_repairtype:this.selectData.f_repairtype,
564
+ condition: this.model.params.condition,
565
+ itemname: this.model.itemname,
566
+ f_filialeids: this.model.params.f_filialeids,
567
+ switchCheckAll: true,
568
+ checkAll: this.checkAll,
569
+ param: this.checkes,
570
+ columnName: 'id',
571
+ toRepair: toRepair,
572
+ activity: act,
573
+ deps: this.$login.f.deps,
574
+ depids: this.$login.f.depids,
575
+ f_remarks: this.selectData.f_remarks,
576
+ f_repairtype: this.selectData.f_repairtype,
514
577
  f_attendant: this.$login.f.name,
515
- loginUser:{name:this.$login.f.name,ename:this.$login.f.ename,id:this.$login.f.id},
516
- },{resolveMsg: null, rejectMsg: null}).then((res) => {
517
- if(res.data.code=200){
578
+ safeCycle: this.model.safeCycle,
579
+ loginUser: {name: this.$login.f.name, ename: this.$login.f.ename, id: this.$login.f.id},
580
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
581
+ if (res.data.code = 200) {
518
582
  //this.$showMessage('本次成功派发'+res.data.successcon+'个维修单!'+`其中${res.data.nohidden}个不需要隐患整改,${res.data.repeatCount}个已经派发过隐患整改单`)
519
- this.$showMessage('本次成功派发'+res.data.successcon+'个维修单!')
520
- this.checkAll=false;
583
+ this.$showMessage('本次成功派发' + res.data.successcon + '个维修单!')
584
+ this.checkAll = false;
521
585
  // 全选改变后,清空选中数据
522
586
  this.checkes = []
523
- this.selectData={
524
- dispatchType:'派发给维修员',
525
- f_repairman:'',
526
- f_remarks:'',
527
- f_repairtype:''
587
+ this.selectData = {
588
+ dispatchType: '派发给维修员',
589
+ f_repairman: '',
590
+ f_remarks: '',
591
+ f_repairtype: ''
528
592
  }
529
- this.showModal2=false
593
+ this.showModal2 = false
530
594
  this.$refs.paged.$refs.criteria.search()
531
595
  }
532
- }).cache((msg)=>{
596
+ }).cache((msg) => {
533
597
  this.$showMessage('网络异常,请重新操作!')
534
598
  })
535
599
  }
536
600
  })
537
601
  },
538
- getSiteRes(obj) {
602
+ getSiteRes (obj) {
539
603
  console.log('siteRes ---> ')
540
604
  console.log(obj)
541
- if(obj.resids[0]){
605
+ if (obj.resids[0]) {
542
606
  this.selectData.f_meetunit = obj.res.join('.')
543
607
  this.selectData.f_reciever = obj.resids.join('.')
544
608
  this.selectData.f_outlets = obj.res[obj.res.length - 1]
545
- }else {
609
+ } else {
546
610
  this.selectData.f_meetunit = ''
547
611
  this.selectData.f_reciever = ''
548
612
  this.selectData.f_outlets = ''
549
613
  }
550
614
  },
551
615
  // 获取维修员
552
- getEmp() {
553
- let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))', userid: `${this.$login.f.id}`}
616
+ getEmp () {
617
+ let val = {
618
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))',
619
+ userid: `${this.$login.f.id}`
620
+ }
554
621
  let http = new HttpResetClass()
555
622
  http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
556
- let str=''
557
- res.data.forEach((item,idx,arr) => {
558
- console.log(idx+"----"+arr.length)
559
- if(idx+1==arr.length){
623
+ let str = ''
624
+ res.data.forEach((item, idx, arr) => {
625
+ console.log(idx + "----" + arr.length)
626
+ if (idx + 1 == arr.length) {
560
627
  str += item.id
561
- }else{
562
- str += item.id+','
628
+ } else {
629
+ str += item.id + ','
563
630
  }
564
631
 
565
632
  })
@@ -573,18 +640,18 @@
573
640
  }
574
641
  }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
575
642
 
576
- res.data.forEach((user)=>{
643
+ res.data.forEach((user) => {
577
644
  try {
578
- ress.data.forEach((tel,tidx,arr)=>{
645
+ ress.data.forEach((tel, tidx, arr) => {
579
646
  console.log(`${user.id}--------------${tel.id} ----------${tidx}-------${ress.data[tidx].id}`)
580
- if(user.id==tel.id){
647
+ if (user.id == tel.id) {
581
648
  this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
582
- ress.data.splice(tidx,1)
649
+ ress.data.splice(tidx, 1)
583
650
  console.log(`******${ress.data[tidx].id}`)
584
651
  throw new Error("跳出循环");
585
652
  }
586
653
  })
587
- }catch (e) {
654
+ } catch (e) {
588
655
  console.log('下一次!')
589
656
  }
590
657
  })
@@ -592,7 +659,7 @@
592
659
 
593
660
  })
594
661
  },
595
- isChecked(v) {
662
+ isChecked (v) {
596
663
  // 如果全选,不在的按选中算,否则,在的按选中算
597
664
  if (this.checkAll) {
598
665
  return this.checkes.indexOf(v) == -1
@@ -600,162 +667,207 @@
600
667
  return this.checkes.indexOf(v) != -1
601
668
  }
602
669
  },
603
- setCheckAll() {
604
- this.checkAll=this.checkAll?false:true;
670
+ setCheckAll () {
671
+ this.checkAll = this.checkAll ? false : true;
605
672
  // 全选改变后,清空选中数据
606
673
  this.checkes = []
607
674
  },
608
- setCheckes(id) {
609
- let index=this.checkes.indexOf(id)
610
- if(index<0){
675
+ setCheckes (id) {
676
+ let index = this.checkes.indexOf(id)
677
+ if (index < 0) {
611
678
  this.checkes.push(id)
612
- }else{
613
- this.checkes.splice(index,1)
679
+ } else {
680
+ this.checkes.splice(index, 1)
614
681
  }
615
682
  },
616
- getmeterbook(val){
617
- this.cbc=[]
683
+ getmeterbook (val) {
684
+ this.cbc = []
618
685
  this.cbc.push({
619
- label:'全部',
620
- value:''
686
+ label: '全部',
687
+ value: ''
621
688
  })
622
- if (val==''){
689
+ if (val == '') {
623
690
 
624
- this.cbcs.forEach(res=>{
691
+ this.cbcs.forEach(res => {
625
692
  this.cbc.push({
626
- label:res.f_book_name,
627
- value:res.id
693
+ label: res.f_book_name,
694
+ value: res.id
628
695
  })
629
696
  })
630
- }else{
631
- this.cbcs.forEach(res=>{
632
- if (res.f_book_slice_area==val){
697
+ } else {
698
+ this.cbcs.forEach(res => {
699
+ if (res.f_book_slice_area == val) {
633
700
  this.cbc.push({
634
- label:res.f_book_name,
635
- value:res.id
701
+ label: res.f_book_name,
702
+ value: res.id
636
703
  })
637
704
  }
638
705
  })
639
706
  }
640
707
  },
641
708
 
642
- Mreadibook(val){
709
+ Mreadibook (val) {
643
710
  console.log("999999999")
644
711
  console.log(val)
645
- this.sliceArea=[]
646
- if (val){
647
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
712
+ this.sliceArea = []
713
+ if (val) {
714
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
715
+ data: {
648
716
  items: 'name',
649
717
  tablename: 't_zone',
650
718
  condition: `parentid in ${val}`,
651
719
  orderitem: 'id'
652
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
720
+ }
721
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
653
722
  this.sliceArea.push({
654
- label:'全部',
655
- value:''
723
+ label: '全部',
724
+ value: ''
656
725
  })
657
- res.data.forEach(ress=>{
726
+ res.data.forEach(ress => {
658
727
  this.sliceArea.push({
659
- label:ress.name,
660
- value:ress.name
728
+ label: ress.name,
729
+ value: ress.name
661
730
  })
662
731
  })
663
732
 
664
733
  })
665
734
  }
666
735
  },
667
- getAllMeterBook(val){
736
+ getAllMeterBook (val) {
668
737
  console.log("999999999")
669
738
  console.log(val)
670
- this.cbcs=[]
671
- if (val){
672
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
739
+ this.cbcs = []
740
+ if (val) {
741
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
742
+ data: {
673
743
  items: 'f_book_name,f_book_slice_area,id',
674
744
  tablename: 't_meter_book',
675
745
  condition: `f_filiale_id in ${val}`,
676
746
  orderitem: 'id'
677
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
678
- res.data.forEach(ress=>{
747
+ }
748
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
749
+ res.data.forEach(ress => {
679
750
  this.cbcs.push({
680
- id:ress.id,
681
- f_book_name:ress.f_book_name,
682
- f_book_slice_area:ress.f_book_slice_area
751
+ id: ress.id,
752
+ f_book_name: ress.f_book_name,
753
+ f_book_slice_area: ress.f_book_slice_area
683
754
  })
684
755
  })
685
- this.cbc=[]
756
+ this.cbc = []
686
757
  this.cbc.push({
687
- label:'全部',
688
- value:''
758
+ label: '全部',
759
+ value: ''
689
760
  })
690
- this.cbcs.forEach(res=>{
761
+ this.cbcs.forEach(res => {
691
762
  this.cbc.push({
692
- label:res.f_book_name,
693
- value:res.id
763
+ label: res.f_book_name,
764
+ value: res.id
694
765
  })
695
766
  })
696
767
  })
697
768
  }
698
769
  },
699
- hiddenr() {
770
+ hiddenr () {
700
771
  this.$parent.showItem = !this.$parent.showItem
701
772
  },
702
- hidden() {
773
+ hidden () {
703
774
  this.criteriaShow = !this.criteriaShow
704
775
  },
705
- search(args) {
776
+ search (args) {
777
+ console.log('测试吧',args.model)
778
+ if(this.defectLeave){
779
+ if(this.defectLeave=='一级隐患'){
780
+ args.condition += ` and f_fist_count > 0`
781
+ }
782
+ if(this.defectLeave=='二级隐患'){
783
+ args.condition += ` and f_second_count > 0`
784
+ }
785
+ if(this.defectLeave=='三级隐患'){
786
+ args.condition += ` and f_third_count > 0`
787
+ }
788
+ }
789
+ if(this.defectType.length>0){
790
+ args.condition += ` and (`
791
+ for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
792
+ console.log(sqlstr)
793
+ console.log(this.defectType[sqlstr])
794
+ args.condition += ` f_defect_content like '%${this.defectType[sqlstr]}%'`
795
+ if(sqlstr<this.defectType.length-1){
796
+ args.condition +=' or'
797
+ }
798
+ }
799
+ args.condition += ` )`
800
+ }
706
801
  if (this.f_check_plan.f_plan_name) {
707
802
  args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
708
803
  }
804
+ args.condition += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
709
805
  this.model.search(args.condition, args.model)
710
806
  },
711
- getRes(obj) {
807
+ getRes (obj) {
712
808
  this.model.f_filialeids = this.$login.convertToIn(obj.resids);
713
809
  this.Mreadibook(this.model.f_filialeids)
714
810
  this.getAllMeterBook(this.model.f_filialeids)
715
811
  },
716
- showChooser() {
812
+ showChooser () {
717
813
  this.showModal = true
718
814
  },
719
- ok() {
815
+ ok () {
720
816
  this.showModal = false
721
817
  if (this.$refs.modal.$children[0].selectedRow.id) {
722
818
  this.f_check_plan = this.$refs.modal.$children[0].selectedRow
723
819
  }
724
820
  },
725
- cancel() {
821
+ cancel () {
726
822
  this.showModal = false
727
823
  this.f_check_plan = {f_plan_name: '', id: ''}
728
824
  }
729
825
  },
730
- ready() {
826
+ ready () {
731
827
  this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
732
- this.batchSent=Vue.$appdata.getSingleValue('批量派发维修单')
828
+ this.batchSent = Vue.$appdata.getSingleValue('批量派发维修单')
733
829
  /*let gen = select(this)
734
830
  // this.Mreadibook(`('${this.$login.f.orgid}')`)
735
831
  co(gen)*/
736
832
  this.getEmp()
737
833
  },
738
834
  computed: {
739
- selected() {
835
+ selected () {
740
836
  return this.$refs.paged.$refs.grid.selected
741
837
  },
742
- getfield(){
743
- console.log("---------------------------------------------导出方法")
744
- let data = {}
745
- this.bodyData.forEach((value, index)=>{
746
- data[this.bodyData[index]] = this.headData[index]
747
- })
748
- //合计字段打印
749
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
750
- if(this.sumsmodel){
751
- Object.keys(this.sumsmodel).forEach((key) => {
752
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
838
+ getdefectType(){
839
+ this.defectType=[]
840
+ return [... this.$appdata.getParam(this.defectLeave)]
841
+ },
842
+ watch: {
843
+ getfield () {
844
+ console.log("---------------------------------------------导出方法")
845
+ let data = {}
846
+ this.bodyData.forEach((value, index) => {
847
+ data[this.bodyData[index]] = this.headData[index]
753
848
  })
754
- }else{
755
- this.tfoot += '暂无'
849
+ //合计字段打印
850
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
851
+ if (this.sumsmodel) {
852
+ Object.keys(this.sumsmodel).forEach((key) => {
853
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
854
+ })
855
+ } else {
856
+ this.tfoot += '暂无'
857
+ }
858
+ this.tfoot += '</th></tr>'
859
+ return data
860
+ },
861
+ 'model.rows.length'() {
862
+ console.log("发生变化---"+this.model.rows.length)
863
+ // 如果查询无结果,将合计置为0
864
+ if(this.model.rows.length < 1){
865
+ this.model.sums.f_defect_count = 0
866
+ this.model.sums.f_fist_count = 0
867
+ this.model.sums.f_second_count = 0
868
+ this.model.sums.f_third_count = 0
869
+ }
756
870
  }
757
- this.tfoot += '</th></tr>'
758
- return data
759
871
  }
760
872
  }
761
873
  }