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

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@
10
10
  @click="$parent.$parent.showChooser"
11
11
  style="width: 60%" placeholder="安检计划" readonly="readonly">
12
12
  </div>
13
- <div :class="$parent.$parent.style">
13
+ <div :class="$parent.$parent.style" v-show="false">
14
14
  <label class="font_normal_body">存在隐患</label>
15
15
  <v-select style="width:60% "
16
16
  class="select select_list"
@@ -119,8 +119,78 @@
119
119
  condition="f_offsite_time <= '{} 23:59:59'">
120
120
  </datepicker>
121
121
  </div>
122
-
123
-
122
+ <div :class="$parent.$parent.style">
123
+ <label class="font_normal_body">隐&ensp;患&ensp;项</label>
124
+ <v-select style="width:60% "
125
+ class="select select_list"
126
+ :value.sync="$parent.$parent.defectLeave"
127
+ v-model="$parent.$parent.defectLeave"
128
+ :options='$parent.$parent.defectLeaveList'
129
+ placeholder='隐患项'
130
+ value-single
131
+ close-on-select>
132
+ </v-select>
133
+ </div>
134
+ <div :class="$parent.$parent.style">
135
+ <label class="font_normal_body">隐患内容</label>
136
+ <v-select style="width:60% "
137
+ class="select select_list"
138
+ :value.sync="$parent.$parent.defectType"
139
+ v-model="$parent.$parent.defectType"
140
+ :options='$parent.$parent.getdefectType'
141
+ placeholder='隐患内容'
142
+ :multiple="true">
143
+ </v-select>
144
+ </div>
145
+ <div :class="$parent.$parent.style">
146
+ <label class="font_normal_body">用户类型</label>
147
+ <v-select id="f_usertype"
148
+ placeholder='用户类型'
149
+ class="select select_list"
150
+ :value.sync="model.f_usertype"
151
+ :value-single="true"
152
+ :options='$parent.$parent.usertypes'
153
+ v-model="model.f_usertype"
154
+ condition="f_user_type='{}'"
155
+ close-on-select clear-button>
156
+ </v-select>
157
+ </div>
158
+ <div :class="$parent.$parent.style">
159
+ <label class="font_normal_body">气表类型</label>
160
+ <v-select class="select_list select"
161
+ placeholder='气表类型' style="width: 60%"
162
+ :value.sync="model.meter_classify" v-model="model.meter_classify"
163
+ :options='$parent.$parent.meter_classifys'
164
+ filer-key="name"
165
+ close-on-select clear-button
166
+ condition="F_METER_CLASSIFY='{}'"
167
+ :value-single="true">
168
+ </v-select>
169
+ </div>
170
+ <div :class="$parent.$parent.style">
171
+ <label class="font_normal_body">安装位置</label>
172
+ <v-select class="select_list select"
173
+ placeholder='安装位置' style="width: 60%"
174
+ :value.sync="model.f_position" v-model="model.f_position"
175
+ :options='$parent.$parent.positions'
176
+ filer-key="name"
177
+ close-on-select clear-button
178
+ condition="f_position='{}'"
179
+ :value-single="true">
180
+ </v-select>
181
+ </div>
182
+ <div :class="$parent.$parent.style">
183
+ <label class="font_normal_body">房屋类型</label>
184
+ <v-select class="select_list select"
185
+ placeholder='请选择' style="width: 60%"
186
+ :value.sync="model.f_house_type" v-model="model.f_house_type"
187
+ :options='$parent.$parent.housetype'
188
+ filer-key="name"
189
+ close-on-select clear-button
190
+ condition="f_house_type='{}'"
191
+ :value-single="true">
192
+ </v-select>
193
+ </div>
124
194
  </div>
125
195
  <div class="row" v-if="$parent.$parent.$parent.showItem">
126
196
  <div :class="$parent.$parent.style">
@@ -129,7 +199,7 @@
129
199
  @click="$parent.$parent.showChooser"
130
200
  style="width: 60%" placeholder="安检计划" readonly="readonly">
131
201
  </div>
132
- <div :class="$parent.$parent.style">
202
+ <div :class="$parent.$parent.style" v-show="false">
133
203
  <label class="font_normal_body">存在隐患</label>
134
204
  <v-select style="width:60% "
135
205
  class="select select_list"
@@ -244,7 +314,29 @@
244
314
  condition="f_offsite_time <= '{} 23:59:59'">
245
315
  </datepicker>
246
316
  </div>
247
-
317
+ <div :class="$parent.$parent.style">
318
+ <label class="font_normal_body">隐&ensp;患&ensp;项</label>
319
+ <v-select style="width:60% "
320
+ class="select select_list"
321
+ :value.sync="$parent.$parent.defectLeave"
322
+ v-model="$parent.$parent.defectLeave"
323
+ :options='$parent.$parent.defectLeaveList'
324
+ placeholder='隐患项'
325
+ value-single
326
+ close-on-select>
327
+ </v-select>
328
+ </div>
329
+ <div :class="$parent.$parent.style">
330
+ <label class="font_normal_body">隐患内容</label>
331
+ <v-select style="width:60% "
332
+ class="select select_list"
333
+ :value.sync="$parent.$parent.defectType"
334
+ v-model="$parent.$parent.defectType"
335
+ :options='$parent.$parent.getdefectType'
336
+ placeholder='隐患内容'
337
+ :multiple="true">
338
+ </v-select>
339
+ </div>
248
340
 
249
341
  </div>
250
342
  </div>
@@ -261,8 +353,10 @@
261
353
  <th><nobr>安检时间</nobr></th>
262
354
  <th><nobr>安检员</nobr></th>
263
355
  <th><nobr>计划名</nobr></th>
264
- <th><nobr>是否有隐患</nobr></th>
265
- <th><nobr>隐患数</nobr></th>
356
+ <!--<th><nobr>是否有隐患</nobr></th>-->
357
+ <th><nobr>隐患总数</nobr></th>
358
+ <th><nobr>已处理数</nobr></th>
359
+ <th><nobr>未处理数</nobr></th>
266
360
  <!-- <th><nobr>整改数</nobr></th>-->
267
361
 
268
362
  </tr>
@@ -277,8 +371,10 @@
277
371
  <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
278
372
  <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
279
373
  <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
280
- <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
374
+ <!--<td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>-->
281
375
  <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
376
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
377
+ <td style="text-align: center;white-space:nowrap;">{{row.remainder}}</td>
282
378
  <!-- <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>-->
283
379
 
284
380
  </template>
@@ -327,6 +423,10 @@
327
423
  model.f_filialeids = '(' + this.$login.f.orgid + ')'
328
424
  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"
329
425
  return {
426
+ housetype: [],//房屋类型
427
+ positions: [],//安装位置
428
+ meter_classifys:[],//气表类型
429
+ usertypes: this.usertypes(),//用户类型
330
430
  repaired:[{label: '未修', value: '未修'}, {label: '已修', value: '已修'}],
331
431
  hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
332
432
  f: this.$login.f,
@@ -343,8 +443,11 @@
343
443
  cbc:[],
344
444
  cbcs:[],
345
445
  thead: '',
346
- headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','是否有隐患','隐患数','隐患情况'],
347
- 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']
446
+ defectLeave:'',
447
+ defectType:'',
448
+ defectLeaveList:[],
449
+ headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','隐患总数','已处理数','未处理数','隐患数','隐患情况'],
450
+ 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_defect_count','f_repair_count','remainder','f_defect_count','f_defect_content']
348
451
  }
349
452
  },
350
453
  props:{
@@ -361,6 +464,28 @@
361
464
  },
362
465
 
363
466
  methods: {
467
+ setConList(){
468
+
469
+ this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
470
+ label: '全部',
471
+ value: ''
472
+ }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
473
+
474
+ this.positions=this.$appdata.getParam('安装位置') ? [{
475
+ label: '全部',
476
+ value: ''
477
+ }, ...this.$appdata.getParam('安装位置')] : [{label: '全部', value: ''}]
478
+ this.housetype=this.$appdata.getParam('房屋类型') ? [{
479
+ label: '全部',
480
+ value: ''
481
+ }, ...this.$appdata.getParam('房屋类型')] : [{label: '全部', value: ''}]
482
+ },
483
+ usertypes () {
484
+ return this.$appdata.getParam('用户类型') ? [{
485
+ label: '全部',
486
+ value: ''
487
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
488
+ },
364
489
  getmeterbook(val){
365
490
  this.cbc=[]
366
491
  this.cbc.push({
@@ -451,6 +576,22 @@
451
576
  this.criteriaShow = !this.criteriaShow
452
577
  },
453
578
  search(args) {
579
+ if(this.defectLeave && (this.defectType.length==0 || !this.defectType.length)){
580
+ this.$showMessage("选择隐患项后,必须选择隐患内容!")
581
+ return
582
+ }
583
+ if(this.defectType.length>0){
584
+ args.condition += ` and (`
585
+ for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
586
+ console.log(sqlstr)
587
+ console.log(this.defectType[sqlstr])
588
+ args.condition += ` f_defect_content like '%${this.defectType[sqlstr]}%'`
589
+ if(sqlstr<this.defectType.length-1){
590
+ args.condition +=' or'
591
+ }
592
+ }
593
+ args.condition += ` )`
594
+ }
454
595
  if (this.f_check_plan.f_plan_name) {
455
596
  args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
456
597
  }
@@ -476,12 +617,18 @@
476
617
  }
477
618
  },
478
619
  ready() {
620
+ this.setConList()
479
621
  this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
622
+ this.defectLeaveList=[{label:'全部',value:''}, ...this.$appdata.getParam('安检隐患项')]
480
623
  let gen = select(this)
481
624
  // this.Mreadibook(`('${this.$login.f.orgid}')`)
482
625
  co(gen)
483
626
  },
484
627
  computed: {
628
+ getdefectType(){
629
+ this.defectType=[]
630
+ return [... this.$appdata.getParam(`安检项-${this.defectLeave}`)]
631
+ },
485
632
  selected() {
486
633
  return this.$refs.paged.$refs.grid.selected
487
634
  },