safecheck-client 3.0.35-gongyi-2 → 3.0.35-gongyi-5

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "safecheck-client",
3
3
  "//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
4
- "version": "3.0.35-gongyi-2",
4
+ "version": "3.0.35-gongyi-5",
5
5
  "description": "安检模块 前端组件",
6
6
  "author": "丁新 <417755458@qq.com>",
7
7
  "license": "ISC",
@@ -15,12 +15,11 @@
15
15
  condition=" f_checker_name = '{}'">
16
16
  </role-selector-safe>
17
17
  </div>
18
- <div :class="$parent.$parent.style" v-if="$parent.$parent.permission === 'c1'">
18
+ <div :class="$parent.$parent.style" >
19
19
  <label class="font_normal_body">安检科室</label>
20
20
  <right-tree-safe islist :userid="$parent.$parent.userid" :source="$parent.$parent.source" v-on:re-res="$parent.$parent.reres2" :textContent="'选择科室'" :selectData="''" v-ref:f_reciever>
21
21
  </right-tree-safe>
22
- </div>
23
-
22
+ </div>
24
23
  <div :class="$parent.$parent.style" >
25
24
  <label class="font_normal_body">开始时间</label>
26
25
  <datepicker
@@ -59,13 +58,18 @@
59
58
  condition="f_run_date <= '{}'">
60
59
  </datepicker>
61
60
  </div>
62
-
61
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
62
+ <div :class="$parent.$parent.style">
63
+ <label class="font_normal_body">安检册名</label>
64
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_check_book_name"
65
+ placeholder="安检册名" condition="f_check_book_name like '%{}%'">
66
+ </div>
67
+ </div>
63
68
  <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
64
69
  <export-excel-safe :data="$parent.$parent.exportParameter"
65
70
  :field="$parent.$parent.excelHeaders"
66
71
  sqlurl="rs/logic/SafeExportExcel" sql-name="QueryCheckBook"
67
- template-name='安检册详情列表'>
68
- </export-excel-safe>
72
+ template-name='安检册详情列表'></export-excel-safe>
69
73
  <button type="button" class="button_search button_spacing" @click="search()">查询</button>
70
74
  <div style="float: right" class="button_spacing"
71
75
  :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
@@ -78,13 +82,7 @@
78
82
 
79
83
 
80
84
  </div>
81
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
82
- <div :class="$parent.$parent.style">
83
- <label class="font_normal_body">安检册名</label>
84
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_check_book_name"
85
- placeholder="安检册名" condition="f_check_book_name like '%{}%'">
86
- </div>
87
- </div>
85
+
88
86
 
89
87
  <div class="row" v-show="$parent.$parent.$parent.showItem">
90
88
  <div :class="$parent.$parent.style2" style="margin: 0px">
@@ -106,8 +104,7 @@
106
104
  <export-excel-safe :data="$parent.$parent.exportParameter"
107
105
  :field="$parent.$parent.excelHeaders"
108
106
  sqlurl="rs/logic/SafeExportExcel" sql-name="QueryCheckBook"
109
- template-name='安检册详情列表'>
110
- </export-excel-safe>
107
+ template-name='安检册详情列表'></export-excel-safe>
111
108
  <button type="button" class="button_search button_spacing" @click="search()">查询</button>
112
109
  <div style="float: right" class="button_spacing"
113
110
  :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
@@ -31,8 +31,8 @@
31
31
  <export-excel-safe :data="$parent.$parent.searchData"
32
32
  :field="$parent.$parent.excelHeaders"
33
33
  progress="safeGetExportProgress"
34
- sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails"
35
- template-name='安检隐患明细'></export-excel-safe>
34
+ sqlurl="rs/logic/SafeExportExcel" sql-name="getUserByCheckBook"
35
+ template-name='用户安检明细'></export-excel-safe>
36
36
 
37
37
 
38
38
  <button class="button_spacing button_search" @click="search()">查询</button>
@@ -124,7 +124,7 @@
124
124
  class="select_list select"
125
125
  :options='$parent.$parent.getgasmodel' placeholder='气表型号'
126
126
  close-on-select
127
- condition="tuf.f_gasmodel_id = {}"></v-select>
127
+ condition="tuf.f_gasmodel_id = '{}'"></v-select>
128
128
 
129
129
  </div>
130
130
  <div class="col-sm-2 form-group" style="margin-top: 0px">
@@ -135,7 +135,7 @@
135
135
  class="select_list select"
136
136
  :options='$parent.$parent.housetypes' placeholder='房屋类型'
137
137
  close-on-select
138
- condition="tui.f_house_type = {}"></v-select>
138
+ condition="tui.f_house_type = '{}'"></v-select>
139
139
 
140
140
  </div>
141
141
  <div class="col-sm-2 form-group" style="margin-top: 0px">
@@ -146,7 +146,7 @@
146
146
  class="select_list select"
147
147
  :options='$parent.$parent.positions' placeholder='安装位置'
148
148
  close-on-select
149
- condition="tuf.f_position = {}"></v-select>
149
+ condition="tuf.f_position = '{}'"></v-select>
150
150
 
151
151
  </div>
152
152
  <div class="col-sm-2 form-group" style="margin-top: 0px">
@@ -157,7 +157,7 @@
157
157
  class="select_list select"
158
158
  :options='$parent.$parent.usetypes' placeholder='使用类型'
159
159
  close-on-select
160
- condition="tuf.f_usetype = {}"></v-select>
160
+ condition="tuf.f_usetype = '{}'"></v-select>
161
161
 
162
162
  </div>
163
163
  <div class="form-group col-sm-2" style="margin-top: 0px">
@@ -267,7 +267,7 @@
267
267
  <nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
268
268
  </th>
269
269
  <th>
270
- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.isallchecked"/>全选本页</nobr>
270
+ <nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookCheckedAll"></input>本页全选</nobr>
271
271
  </th>
272
272
  <th>
273
273
  <nobr>客户姓名</nobr>
@@ -297,8 +297,7 @@
297
297
  </td>
298
298
  <td style="text-align: center">
299
299
  <nobr>
300
- <input type="checkbox" :checked="$parent.$parent.$parent.pageCheckModel(row)"
301
- @change="$parent.$parent.$parent.pageCheckChange(row, $event)"></input>
300
+ <input type="checkbox" :checked="$parent.$parent.$parent.pageCheckModel(row)"></input>
302
301
  </nobr>
303
302
  </td>
304
303
  <td style="text-align: center">{{ row.f_user_name }}</td>
@@ -326,7 +325,7 @@
326
325
  <!-- </div>-->
327
326
  <div class="col-sm-6 form-group" style="margin-top: 20px" v-if="permission === 'c1' && showModal ">
328
327
  <label class="font_normal_body">安检科室</label>
329
- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择科室" :selectData="" v-ref:f_reciever>
328
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择科室" :selectData="''" v-ref:f_reciever>
330
329
  </right-tree>
331
330
  </div>
332
331
  <div class="col-sm-6 form-group" style="margin-top: 20px" v-if="permission === 'c2' ">
@@ -438,11 +437,18 @@ export default {
438
437
  return {
439
438
  model: model,
440
439
  criteriaShow: false,
441
- excelHeaders: {},
440
+ excelHeaders: {
441
+ "f_user_name":'客户姓名',
442
+ "f_userinfo_code":'客户编号',
443
+ "f_user_type":'客户类型',
444
+ "f_user_phone":'客户电话',
445
+ "f_address":'客户地址',
446
+ "f_check_book_name":'所属安检册'
447
+ },
442
448
  checkBooks: [],
443
449
  f_orgid: '',
444
450
  bookAll: false,
445
- isallchecked:false,//本页全选
451
+ bookCheckedAll:false,
446
452
  bookList: [],
447
453
  selectBook:'',
448
454
  // init:false,
@@ -586,7 +592,7 @@ export default {
586
592
  this.$showMessage('请选择安检册')
587
593
  return
588
594
  }
589
- if (this.isSearch && (this.isallchecked || this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
595
+ if (this.isSearch && (this.bookAll || this.bookCheckedAll || this.bookList.length > 0) && this.model.rows.length > 0) {
590
596
  let userCondition = ''
591
597
  if (this.bookList.length < 1) {
592
598
  console.log('bookCondition', this.bookCondition)
@@ -614,7 +620,7 @@ export default {
614
620
  this.selectBook = ''
615
621
  this.clearBook()
616
622
  this.bookAll = false
617
- this.isallchecked = false
623
+ this.bookCheckedAll = false
618
624
  this.bookList = []
619
625
  this.showModal2 = false
620
626
  this.$refs.paged.$refs.criteria.search()
@@ -625,7 +631,7 @@ export default {
625
631
  this.$showMessage('请选择安检册')
626
632
  return
627
633
  }
628
- if (this.isSearch && (this.isallchecked || this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
634
+ if (this.isSearch && (this.bookAll || this.bookCheckedAll || this.bookList.length > 0) && this.model.rows.length > 0) {
629
635
  let userCondition = ''
630
636
  if (this.bookList.length < 1) {
631
637
  console.log('bookCondition', this.bookCondition)
@@ -653,7 +659,7 @@ export default {
653
659
  this.selectBook = ''
654
660
  this.clearBook()
655
661
  this.bookAll = false
656
- this.isallchecked = false
662
+ this.bookCheckedAll = false
657
663
  this.bookList = []
658
664
  this.showModal3 = false
659
665
  this.$refs.paged.$refs.criteria.search()
@@ -663,7 +669,7 @@ export default {
663
669
  this.selectBook = ''
664
670
  this.clearBook()
665
671
  this.bookAll = false
666
- this.isallchecked = false
672
+ this.bookCheckedAll = false
667
673
  this.bookList = []
668
674
  this.showModal2 = false
669
675
  this.$refs.paged.$refs.criteria.search()
@@ -672,7 +678,7 @@ export default {
672
678
  this.selectBook = ''
673
679
  this.clearBook()
674
680
  this.bookAll = false
675
- this.isallchecked = false
681
+ this.bookCheckedAll = false
676
682
  this.bookList = []
677
683
  this.showModal3 = false
678
684
  this.$refs.paged.$refs.criteria.search()
@@ -682,7 +688,7 @@ export default {
682
688
  this.$showMessage('请选择查询未划分安检册的用户')
683
689
  return
684
690
  }
685
- if (this.isSearch && (this.isallchecked || this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
691
+ if (this.isSearch && (this.bookAll ||this.bookCheckedAll || this.bookList.length > 0) && this.model.rows.length > 0) {
686
692
  this.showModal2 = true
687
693
  this.freshCheckBook()
688
694
  return
@@ -694,7 +700,7 @@ export default {
694
700
  this.$showMessage('请选择查询已划分安检册的用户')
695
701
  return
696
702
  }
697
- if (this.isSearch && (this.isallchecked || this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
703
+ if (this.isSearch && ( this.bookAll ||this.bookCheckedAll|| this.bookList.length > 0) && this.model.rows.length > 0) {
698
704
  this.showModal3 = true
699
705
  this.freshCheckBook()
700
706
  return
@@ -706,7 +712,7 @@ export default {
706
712
  this.$showMessage('请选择查询已划分安检册的用户')
707
713
  return
708
714
  }
709
- if (this.isSearch && (this.isallchecked || this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
715
+ if (this.isSearch && (this.bookAll ||this.bookCheckedAll|| this.bookList.length > 0) && this.model.rows.length > 0) {
710
716
  let userCondition= ''
711
717
  if (this.bookList.length < 1) {
712
718
  console.log('bookCondition', this.bookCondition)
@@ -733,7 +739,7 @@ export default {
733
739
  this.$showMessage('从安检册删除所选用户成功')
734
740
  this.selectBook = ''
735
741
  this.bookAll = false
736
- this.isallchecked = false
742
+ this.bookCheckedAll = false
737
743
  this.clearBook()
738
744
  this.bookList = []
739
745
  this.showModal3 = false
@@ -747,7 +753,7 @@ export default {
747
753
  this.$showMessage('请选择查询未划分安检册的用户')
748
754
  return
749
755
  }
750
- if (this.isSearch && (this.isallchecked || this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
756
+ if (this.isSearch && (this.bookAll ||this.bookCheckedAll || this.bookList.length > 0) && this.model.rows.length > 0) {
751
757
  this.showModal = true
752
758
  return
753
759
  }
@@ -799,7 +805,7 @@ export default {
799
805
  this.clearBook()
800
806
  this.bookList = []
801
807
  this.bookAll = false
802
- this.isallchecked = false
808
+ this.bookCheckedAll = false
803
809
  this.freshCheckBook()
804
810
  this.$refs.paged.$refs.criteria.search()
805
811
  }
@@ -809,7 +815,7 @@ export default {
809
815
  console.log('66666666666', val)
810
816
  console.log(this.model.rows)
811
817
  this.bookAll = false
812
- this.isallchecked = false
818
+ this.bookCheckedAll = false
813
819
  this.bookList = []
814
820
  if (this.$refs.paged.$refs.criteria.model.f_orgid){
815
821
  this.$refs.paged.$refs.criteria.search()
@@ -817,7 +823,7 @@ export default {
817
823
  },
818
824
  cancel () {
819
825
  this.bookAll = false
820
- this.isallchecked = false
826
+ this.bookCheckedAll = false
821
827
  this.bookList = []
822
828
  this.clearBook()
823
829
  this.showModal = false
@@ -825,25 +831,25 @@ export default {
825
831
  },
826
832
  checkModel (row) {
827
833
  if (this.bookAll) {
828
- console.log('row', this.bookAll, JSON.stringify(row))
834
+ //console.log('row', this.bookAll, JSON.stringify(row))
829
835
  return true
830
836
  } else {
831
837
  if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
832
- console.log('row1111', JSON.stringify(row))
838
+ //console.log('row1111', JSON.stringify(row))
833
839
  return true
834
840
  } else {
835
841
  return false
836
842
  }
837
843
  }
838
844
  },
839
- pageCheckModel (row) {
840
- //全选
841
- if (this.isallchecked) {
842
- console.log('row', this.isallchecked, JSON.stringify(row))
845
+ pageCheckModel(row){
846
+ if (this.bookCheckedAll){
847
+ console.log('benye', this.bookAll, JSON.stringify(row))
848
+ //全选被选中,每行row也被选中
843
849
  return true
844
- } else {
850
+ }else {
845
851
  if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
846
- console.log('row1111', JSON.stringify(row))
852
+ //console.log('本页', JSON.stringify(row))
847
853
  return true
848
854
  } else {
849
855
  return false
@@ -857,15 +863,7 @@ export default {
857
863
  } else {
858
864
  this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
859
865
  }
860
- // console.log('aaaaa', JSON.stringify(this.bookList))
861
- },
862
- pageCheckChange (row, e) {
863
- console.log('e', e.target.checked)
864
- if (e.target.checked) {
865
- this.bookList.push(row.f_userinfo_id)
866
- } else {
867
- this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
868
- }
866
+ console.log('aaaaa', JSON.stringify(this.bookList))
869
867
  },
870
868
  getRes (obj) {
871
869
  this.checkBook.f_orgid = obj.resids[0]
@@ -879,7 +877,7 @@ export default {
879
877
  selfSearch (args) {
880
878
  this.isSearch = true
881
879
  this.bookAll = false
882
- this.isallchecked = false
880
+ this.bookCheckedAll = false
883
881
  this.bookList = []
884
882
  // if (this.$refs.paged.$refs.criteria.model.f_orgid){
885
883
  // args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
@@ -922,20 +920,6 @@ export default {
922
920
  })
923
921
  }
924
922
  },
925
- watch: {
926
- "isallchecked"(val){
927
- if (val) {
928
- // 全选
929
- this.$refs.grid.model.rows.forEach((row=>{
930
- this.bookList.push(row.f_userinfo_id)
931
- }))
932
- } else {
933
- // 取消全选
934
- this.isallchecked = false
935
- this.bookList = []
936
- }
937
- }
938
- },
939
923
  ready () {
940
924
  // 获取片区
941
925
  this.getSliceArea()
@@ -953,7 +937,20 @@ export default {
953
937
  // this.init=true
954
938
  this.freshCheckBook()
955
939
  this.getChecker()
956
- }
940
+ },
941
+ watch: {
942
+ 'bookCheckedAll' (val) {
943
+ if (val){
944
+ this.$refs.paged.$refs.grid.model.rows.forEach(row=>{
945
+ this.bookList.push(row.f_userinfo_id)
946
+ })
947
+ console.log('this.bookList', JSON.stringify(this.bookList))
948
+ }else {
949
+ this.bookList = []
950
+ console.log('this.bookList', JSON.stringify(this.bookList))
951
+ }
952
+ }
953
+ },
957
954
  }
958
955
  </script>
959
956
  <style scoped>
@@ -238,8 +238,7 @@
238
238
  <export-excel-safe :data="$parent.$parent.searchData"
239
239
  :field="$parent.$parent.excelHeaders"
240
240
  sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
241
- template-name='用户安检情况'>
242
- </export-excel-safe>
241
+ template-name='用户安检情况'></export-excel-safe>
243
242
  <button type="button" class="button_search button_spacing" @click="search()">查询</button>
244
243
  <div style="float: right" class="button_spacing"
245
244
  :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"