safecheck-client 3.0.35-gongyi → 3.0.35-gongyi-3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,580 +1,655 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" v-if="!$parent.$parent.$parent.showItem">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">安检计划</label>
9
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
10
- @click="$parent.$parent.showChooser"
11
- style="width: 60%" placeholder="安检计划" readonly="readonly">
12
- </div>
13
- <div :class="$parent.$parent.style" v-show="false">
14
- <label class="font_normal_body">存在隐患</label>
15
- <v-select style="width:60% "
16
- class="select select_list"
17
- :value.sync="model.f_has_defect"
18
- v-model="model.f_has_defect"
19
- :options='$parent.$parent.hasDefectOptions'
20
- :placeholder='model.f_has_defect'
21
- condition="f_has_defect = '{}'"
22
- close-on-select>
23
- </v-select>
24
- </div>
25
- <div :class="$parent.$parent.style">
26
- <label class="font_normal_body">用户编号</label>
27
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
28
- condition="f_userinfo_code = '{}'"
29
- style="width: 60%" placeholder="用户编号">
30
- </div>
31
- <div :class="$parent.$parent.style">
32
- <label class="font_normal_body">结果查询</label>
33
- <v-select
34
- placeholder='处理结果查询'
35
- :value-single="true"
36
- class="select select_list" style="width: 60%"
37
- v-model='model.f_repaired'
38
- :value.sync="model.f_repaired"
39
- :options='$parent.$parent.repaired'
40
- condition="f_repaired = '{}'"
41
- close-on-select clear-button> </v-select>
42
- </div>
43
- <div class=" col-sm-4 form-group button-range" >
44
- <div class="span" style="float: right;margin-top: 8px">
45
- <div style="float: right" class="button_spacing"
46
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
47
- @click="$parent.$parent.hiddenr()"></div>
48
- <div style="float: right" class="button_spacing"
49
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
50
- @click="$parent.$parent.hidden()"></div>
51
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
52
- <div style="float: right">
53
- <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
54
- :field="$parent.$parent.getfield"
55
- progress="safeGetExportProgress"
56
- sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefect" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
57
- </div>
58
- </div>
59
- </div>
60
- </div>
61
- <div class="row" v-if="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
62
- <div :class="$parent.$parent.style">
63
- <label class="font_normal_body">片&emsp;&emsp;区</label>
64
- <v-select class="select_list select"
65
- placeholder='片区/管理站' style="width: 60%"
66
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
67
- :options='$parent.$parent.sliceArea'
68
- filer-key="name"
69
- close-on-select clear-button
70
- condition="f_slice_area='{}'"
71
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
72
- :value-single="true">
73
- </v-select>
74
- </div>
75
- <div :class="$parent.$parent.style2" style="margin: 0">
76
- <role-selector-safe
77
- role-name="安检员"
78
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
79
- @re-res="$parent.$parent.getRes"
80
- :value.sync="model.f_checker_id"
81
- v-model="model.f_checker_id"
82
- condition="f_checker_name = '{}'">
83
- </role-selector-safe>
84
- </div>
85
-
86
- <div :class="$parent.$parent.style">
87
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
88
- <v-select class="select_list select"
89
- placeholder='抄表册' style="width: 60%"
90
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
91
- :options='$parent.$parent.cbc'
92
- filer-key="name"
93
- close-on-select clear-button
94
- condition="f_meter_book_num={}"
95
- :value-single="true">
96
- </v-select>
97
- </div>
98
- <div :class="$parent.$parent.style">
99
- <label class="font_normal_body">起始时间</label>
100
- <datepicker
101
- placeholder='起始时间' style="width:60%"
102
- :disabled-days-of-week="[]"
103
- :format="'yyyy-MM-dd'"
104
- :show-rest-button="reset"
105
- :value.sync="model.f_start_time"
106
- v-model="model.f_start_time"
107
- condition="f_offsite_time >= '{} 00:00:00'">
108
- </datepicker>
109
- </div>
110
- <div :class="$parent.$parent.style">
111
- <label class="font_normal_body">结束时间</label>
112
- <datepicker
113
- placeholder='结束时间' style="width:60%"
114
- :disabled-days-of-week="[]"
115
- :format="'yyyy-MM-dd'"
116
- :show-rest-button="reset"
117
- :value.sync="model.f_end_time"
118
- v-model="model.f_end_time"
119
- condition="f_offsite_time <= '{} 23:59:59'">
120
- </datepicker>
121
- </div>
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
-
146
- </div>
147
- <div class="row" v-if="$parent.$parent.$parent.showItem">
148
- <div :class="$parent.$parent.style">
149
- <label class="font_normal_body">安检计划</label>
150
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
151
- @click="$parent.$parent.showChooser"
152
- style="width: 60%" placeholder="安检计划" readonly="readonly">
153
- </div>
154
- <div :class="$parent.$parent.style" v-show="false">
155
- <label class="font_normal_body">存在隐患</label>
156
- <v-select style="width:60% "
157
- class="select select_list"
158
- :value.sync="model.f_has_defect"
159
- v-model="model.f_has_defect"
160
- :options='$parent.$parent.hasDefectOptions'
161
- :placeholder='model.f_has_defect'
162
- condition="f_has_defect = '{}'"
163
- close-on-select>
164
- </v-select>
165
- </div>
166
-
167
- <div class=" col-sm-4 form-group button-range">
168
- <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
169
- <div style="float: right" class="button_spacing"
170
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
171
- @click="$parent.$parent.hiddenr()"></div>
172
- <div style="float: right" class="button_spacing"
173
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
174
- @click="$parent.$parent.hidden()"></div>
175
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
176
- <div style="float: right">
177
- <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids}"
178
- :field="$parent.$parent.getfield"
179
- progress="safeGetExportProgress"
180
- sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefect" template-name='安检计划明细' :choose-col="true"></export-excel-safe>
181
- </div>
182
- </div>
183
- </div>
184
-
185
-
186
-
187
- </div>
188
- <div class="row" v-if="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
189
- <div :class="$parent.$parent.style">
190
- <label class="font_normal_body">用户编号</label>
191
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
192
- condition="f_userinfo_code = '{}'"
193
- style="width: 60%" placeholder="用户编号">
194
- </div>
195
- <div :class="$parent.$parent.style">
196
- <label class="font_normal_body">结果查询</label>
197
- <v-select
198
- placeholder='处理结果查询'
199
- :value-single="true"
200
- class="select select_list" style="width: 60%"
201
- v-model='model.f_repaired'
202
- :value.sync="model.f_repaired"
203
- :options='$parent.$parent.repaired'
204
- condition="f_repaired = '{}'"
205
- close-on-select clear-button> </v-select>
206
- </div>
207
-
208
- <div :class="$parent.$parent.style2" style="margin: 0">
209
- <role-selector-safe
210
- role-name="安检员"
211
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
212
- @re-res="$parent.$parent.getRes"
213
- :value.sync="model.f_checker_id"
214
- v-model="model.f_checker_id"
215
- condition="f_checker_name = '{}'">
216
- </role-selector-safe>
217
- </div>
218
- </div>
219
- <div class="row" v-if="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
220
- <div :class="$parent.$parent.style">
221
- <label class="font_normal_body">片&emsp;&emsp;区</label>
222
- <v-select class="select_list select"
223
- placeholder='片区/管理站' style="width: 60%"
224
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
225
- :options='$parent.$parent.sliceArea'
226
- filer-key="name"
227
- close-on-select clear-button
228
- condition="f_slice_area='{}'"
229
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
230
- :value-single="true">
231
- </v-select>
232
- </div>
233
- <div :class="$parent.$parent.style">
234
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
235
- <v-select class="select_list select"
236
- placeholder='抄表册' style="width: 60%"
237
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
238
- :options='$parent.$parent.cbc'
239
- filer-key="name"
240
- close-on-select clear-button
241
- condition="f_meter_book_num={}"
242
- :value-single="true">
243
- </v-select>
244
- </div>
245
- <div :class="$parent.$parent.style">
246
- <label class="font_normal_body">起始时间</label>
247
- <datepicker
248
- placeholder='起始时间' style="width:60%"
249
- :disabled-days-of-week="[]"
250
- :format="'yyyy-MM-dd'"
251
- :show-rest-button="reset"
252
- :value.sync="model.f_start_time"
253
- v-model="model.f_start_time"
254
- condition="f_offsite_time >= '{} 00:00:00'">
255
- </datepicker>
256
- </div>
257
- <div :class="$parent.$parent.style">
258
- <label class="font_normal_body">结束时间</label>
259
- <datepicker
260
- placeholder='结束时间' style="width:60%"
261
- :disabled-days-of-week="[]"
262
- :format="'yyyy-MM-dd'"
263
- :show-rest-button="reset"
264
- :value.sync="model.f_end_time"
265
- v-model="model.f_end_time"
266
- condition="f_offsite_time <= '{} 23:59:59'">
267
- </datepicker>
268
- </div>
269
- <div :class="$parent.$parent.style">
270
- <label class="font_normal_body">隐&ensp;患&ensp;项</label>
271
- <v-select style="width:60% "
272
- class="select select_list"
273
- :value.sync="$parent.$parent.defectLeave"
274
- v-model="$parent.$parent.defectLeave"
275
- :options='$parent.$parent.defectLeaveList'
276
- placeholder='隐患项'
277
- value-single
278
- close-on-select>
279
- </v-select>
280
- </div>
281
- <div :class="$parent.$parent.style">
282
- <label class="font_normal_body">隐患内容</label>
283
- <v-select style="width:60% "
284
- class="select select_list"
285
- :value.sync="$parent.$parent.defectType"
286
- v-model="$parent.$parent.defectType"
287
- :options='$parent.$parent.getdefectType'
288
- placeholder='隐患内容'
289
- :multiple="true">
290
- </v-select>
291
- </div>
292
-
293
- </div>
294
- </div>
295
- </criteria>
296
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
297
- <template partial='head'>
298
- <tr>
299
- <th><nobr>入户状态</nobr></th>
300
- <th><nobr>用户编号</nobr></th>
301
- <th><nobr>用户名</nobr></th>
302
- <th><nobr>用户电话</nobr></th>
303
- <th><nobr>用户小区</nobr></th>
304
- <th><nobr>用户地址</nobr></th>
305
- <th><nobr>安检时间</nobr></th>
306
- <th><nobr>安检员</nobr></th>
307
- <th><nobr>计划名</nobr></th>
308
- <!--<th><nobr>是否有隐患</nobr></th>-->
309
- <th><nobr>隐患总数</nobr></th>
310
- <th><nobr>已处理数</nobr></th>
311
- <th><nobr>未处理数</nobr></th>
312
- <!-- <th><nobr>整改数</nobr></th>-->
313
-
314
- </tr>
315
- </template>
316
- <template partial='body'>
317
- <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
318
- <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
319
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
320
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
321
- <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
322
- <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
323
- <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
324
- <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
325
- <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
326
- <!--<td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>-->
327
- <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
328
- <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
329
- <td style="text-align: center;white-space:nowrap;">{{row.remainder}}</td>
330
- <!-- <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>-->
331
-
332
- </template>
333
- </data-grid>
334
- </criteria-paged>
335
-
336
- <modal :show.sync="showModal" v-ref:modal>
337
- <div slot="modal-header" class="modal-header">
338
- <h4 class="modal-title">
339
- 选择计划
340
- </h4>
341
- </div>
342
- <div slot="modal-body" class="modal-body">
343
- <plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
344
- </div>
345
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
346
- <button class="button_search" @click="ok">确认</button>
347
- <button class="button_search" @click="cancel">取消</button>
348
- </div>
349
- </modal>
350
- </div>
351
- </template>
352
- <script>
353
- import {PagedList} from 'vue-client'
354
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
355
- import co from 'co'
356
-
357
- let select = function* (self) {
358
- let http = new HttpResetClass()
359
- let getGasman = yield http.load('POST', '/rs/search', {
360
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
361
- userid: self.$login.f.id
362
- }, {resolveMsg: null, rejectMsg: null})
363
- console.log('获取安检员', getGasman)
364
- self.checkersid.push({label: '全部', value: ''})
365
- getGasman.data.forEach((checker) => {
366
- self.checkersid.push({label: checker.name, value: checker.name})
367
- })
368
- }
369
- export default {
370
- title: '隐患查询',
371
- data() {
372
- let model = new PagedList('rs/sql/GetCheckPaperByDefect', 20, {
373
- f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
374
- })
375
- model.f_filialeids = '(' + this.$login.f.orgid + ')'
376
- 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"
377
- return {
378
- repaired:[{label: '未修', value: '未修'}, {label: '已修', value: '已修'}],
379
- hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
380
- f: this.$login.f,
381
- model: model,
382
- criteriaShow: false,
383
- showModal: false,
384
- f_check_plan: {f_plan_name: '', id: ''},
385
- sumsmodel: {},
386
- all: false,
387
- fields: {},
388
- modelval: [],
389
- checkersid: [],
390
- sliceArea: [],
391
- cbc:[],
392
- cbcs:[],
393
- thead: '',
394
- defectLeave:'',
395
- defectType:'',
396
- defectLeaveList:[],
397
- headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','隐患总数','已处理数','未处理数','隐患数','隐患情况'],
398
- 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']
399
- }
400
- },
401
- props:{
402
-
403
- style: {
404
- type: String,
405
- default: 'col-sm-2 form-group'
406
- },
407
- style2: {
408
- type: String,
409
- default: 'col-sm-4 form-group'
410
- }
411
-
412
- },
413
-
414
- methods: {
415
- getmeterbook(val){
416
- this.cbc=[]
417
- this.cbc.push({
418
- label:'全部',
419
- value:''
420
- })
421
- if (val==''){
422
-
423
- this.cbcs.forEach(res=>{
424
- this.cbc.push({
425
- label:res.f_book_name,
426
- value:res.id
427
- })
428
- })
429
- }else{
430
- this.cbcs.forEach(res=>{
431
- if (res.f_book_slice_area==val){
432
- this.cbc.push({
433
- label:res.f_book_name,
434
- value:res.id
435
- })
436
- }
437
- })
438
- }
439
- },
440
-
441
- Mreadibook(val){
442
- console.log("999999999")
443
- console.log(val)
444
- this.sliceArea=[]
445
- if (val){
446
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
447
- items: 'name',
448
- tablename: 't_zone',
449
- condition: `parentid in ${val}`,
450
- orderitem: 'id'
451
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
452
- this.sliceArea.push({
453
- label:'全部',
454
- value:''
455
- })
456
- res.data.forEach(ress=>{
457
- this.sliceArea.push({
458
- label:ress.name,
459
- value:ress.name
460
- })
461
- })
462
-
463
- })
464
- }
465
- },
466
- getAllMeterBook(val){
467
- console.log("999999999")
468
- console.log(val)
469
- this.cbcs=[]
470
- if (val){
471
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
472
- items: 'f_book_name,f_book_slice_area,id',
473
- tablename: 't_meter_book',
474
- condition: `f_filiale_id in ${val}`,
475
- orderitem: 'id'
476
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
477
- res.data.forEach(ress=>{
478
- this.cbcs.push({
479
- id:ress.id,
480
- f_book_name:ress.f_book_name,
481
- f_book_slice_area:ress.f_book_slice_area
482
- })
483
- })
484
- this.cbc=[]
485
- this.cbc.push({
486
- label:'全部',
487
- value:''
488
- })
489
- this.cbcs.forEach(res=>{
490
- this.cbc.push({
491
- label:res.f_book_name,
492
- value:res.id
493
- })
494
- })
495
- })
496
- }
497
- },
498
- hiddenr() {
499
- this.$parent.showItem = !this.$parent.showItem
500
- },
501
- hidden() {
502
- this.criteriaShow = !this.criteriaShow
503
- },
504
- search(args) {
505
- if(this.defectLeave && (this.defectType.length==0 || !this.defectType.length)){
506
- this.$showMessage("选择隐患项后,必须选择隐患内容!")
507
- return
508
- }
509
- if(this.defectType.length>0){
510
- args.condition += ` and (`
511
- for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
512
- console.log(sqlstr)
513
- console.log(this.defectType[sqlstr])
514
- args.condition += ` f_defect_content like '%${this.defectType[sqlstr]}%'`
515
- if(sqlstr<this.defectType.length-1){
516
- args.condition +=' or'
517
- }
518
- }
519
- args.condition += ` )`
520
- }
521
- if (this.f_check_plan.f_plan_name) {
522
- args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
523
- }
524
- this.model.search(args.condition, args.model)
525
- },
526
- getRes(obj) {
527
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
528
- this.Mreadibook(this.model.f_filialeids)
529
- this.getAllMeterBook(this.model.f_filialeids)
530
- },
531
- showChooser() {
532
- this.showModal = true
533
- },
534
- ok() {
535
- this.showModal = false
536
- if (this.$refs.modal.$children[0].selectedRow.id) {
537
- this.f_check_plan = this.$refs.modal.$children[0].selectedRow
538
- }
539
- },
540
- cancel() {
541
- this.showModal = false
542
- this.f_check_plan = {f_plan_name: '', id: ''}
543
- }
544
- },
545
- ready() {
546
- this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
547
- this.defectLeaveList=[{label:'全部',value:''}, ...this.$appdata.getParam('安检隐患项')]
548
- let gen = select(this)
549
- // this.Mreadibook(`('${this.$login.f.orgid}')`)
550
- co(gen)
551
- },
552
- computed: {
553
- getdefectType(){
554
- this.defectType=[]
555
- return [... this.$appdata.getParam(`安检项-${this.defectLeave}`)]
556
- },
557
- selected() {
558
- return this.$refs.paged.$refs.grid.selected
559
- },
560
- getfield(){
561
- console.log("---------------------------------------------导出方法")
562
- let data = {}
563
- this.bodyData.forEach((value, index)=>{
564
- data[this.bodyData[index]] = this.headData[index]
565
- })
566
- //合计字段打印
567
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
568
- if(this.sumsmodel){
569
- Object.keys(this.sumsmodel).forEach((key) => {
570
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
571
- })
572
- }else{
573
- this.tfoot += '暂无'
574
- }
575
- this.tfoot += '</th></tr>'
576
- return data
577
- }
578
- }
579
- }
580
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" v-if="!$parent.$parent.$parent.showItem">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">安检计划</label>
9
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
10
+ @click="$parent.$parent.showChooser"
11
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
12
+ </div>
13
+ <div :class="$parent.$parent.style" v-show="false">
14
+ <label class="font_normal_body">存在隐患</label>
15
+ <v-select style="width:60% "
16
+ class="select select_list"
17
+ :value.sync="model.f_has_defect"
18
+ v-model="model.f_has_defect"
19
+ :options='$parent.$parent.hasDefectOptions'
20
+ :placeholder='model.f_has_defect'
21
+ condition="f_has_defect = '{}'"
22
+ close-on-select>
23
+ </v-select>
24
+ </div>
25
+ <div :class="$parent.$parent.style">
26
+ <label class="font_normal_body">用户编号</label>
27
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
28
+ condition="f_userinfo_code = '{}'"
29
+ style="width: 60%" placeholder="用户编号">
30
+ </div>
31
+ <div :class="$parent.$parent.style">
32
+ <label class="font_normal_body">结果查询</label>
33
+ <v-select
34
+ placeholder='处理结果查询'
35
+ :value-single="true"
36
+ class="select select_list" style="width: 60%"
37
+ v-model='model.f_repaired'
38
+ :value.sync="model.f_repaired"
39
+ :options='$parent.$parent.repaired'
40
+ condition="f_repaired = '{}'"
41
+ close-on-select clear-button> </v-select>
42
+ </div>
43
+ <div class=" col-sm-4 form-group button-range" >
44
+ <div class="span" style="float: right;margin-top: 8px">
45
+ <div style="float: right" class="button_spacing"
46
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
47
+ @click="$parent.$parent.hiddenr()"></div>
48
+ <div style="float: right" class="button_spacing"
49
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
50
+ @click="$parent.$parent.hidden()"></div>
51
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
52
+ <div style="float: right">
53
+ <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
54
+ :field="$parent.$parent.getfield"
55
+ progress="safeGetExportProgress"
56
+ sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefect" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div class="row" v-if="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
62
+ <div :class="$parent.$parent.style">
63
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
64
+ <v-select class="select_list select"
65
+ placeholder='片区/管理站' style="width: 60%"
66
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
67
+ :options='$parent.$parent.sliceArea'
68
+ filer-key="name"
69
+ close-on-select clear-button
70
+ condition="f_slice_area='{}'"
71
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
72
+ :value-single="true">
73
+ </v-select>
74
+ </div>
75
+ <div :class="$parent.$parent.style2" style="margin: 0">
76
+ <role-selector-safe
77
+ role-name="安检员"
78
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
79
+ @re-res="$parent.$parent.getRes"
80
+ :value.sync="model.f_checker_id"
81
+ v-model="model.f_checker_id"
82
+ condition="f_checker_name = '{}'">
83
+ </role-selector-safe>
84
+ </div>
85
+
86
+ <div :class="$parent.$parent.style">
87
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
88
+ <v-select class="select_list select"
89
+ placeholder='抄表册' style="width: 60%"
90
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
91
+ :options='$parent.$parent.cbc'
92
+ filer-key="name"
93
+ close-on-select clear-button
94
+ condition="f_meter_book_num={}"
95
+ :value-single="true">
96
+ </v-select>
97
+ </div>
98
+ <div :class="$parent.$parent.style">
99
+ <label class="font_normal_body">起始时间</label>
100
+ <datepicker
101
+ placeholder='起始时间' style="width:60%"
102
+ :disabled-days-of-week="[]"
103
+ :format="'yyyy-MM-dd'"
104
+ :show-rest-button="reset"
105
+ :value.sync="model.f_start_time"
106
+ v-model="model.f_start_time"
107
+ condition="f_offsite_time >= '{} 00:00:00'">
108
+ </datepicker>
109
+ </div>
110
+ <div :class="$parent.$parent.style">
111
+ <label class="font_normal_body">结束时间</label>
112
+ <datepicker
113
+ placeholder='结束时间' style="width:60%"
114
+ :disabled-days-of-week="[]"
115
+ :format="'yyyy-MM-dd'"
116
+ :show-rest-button="reset"
117
+ :value.sync="model.f_end_time"
118
+ v-model="model.f_end_time"
119
+ condition="f_offsite_time <= '{} 23:59:59'">
120
+ </datepicker>
121
+ </div>
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>
194
+ </div>
195
+ <div class="row" v-if="$parent.$parent.$parent.showItem">
196
+ <div :class="$parent.$parent.style">
197
+ <label class="font_normal_body">安检计划</label>
198
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
199
+ @click="$parent.$parent.showChooser"
200
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
201
+ </div>
202
+ <div :class="$parent.$parent.style" v-show="false">
203
+ <label class="font_normal_body">存在隐患</label>
204
+ <v-select style="width:60% "
205
+ class="select select_list"
206
+ :value.sync="model.f_has_defect"
207
+ v-model="model.f_has_defect"
208
+ :options='$parent.$parent.hasDefectOptions'
209
+ :placeholder='model.f_has_defect'
210
+ condition="f_has_defect = '{}'"
211
+ close-on-select>
212
+ </v-select>
213
+ </div>
214
+
215
+ <div class=" col-sm-4 form-group button-range">
216
+ <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
217
+ <div style="float: right" class="button_spacing"
218
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
219
+ @click="$parent.$parent.hiddenr()"></div>
220
+ <div style="float: right" class="button_spacing"
221
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
222
+ @click="$parent.$parent.hidden()"></div>
223
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
224
+ <div style="float: right">
225
+ <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids}"
226
+ :field="$parent.$parent.getfield"
227
+ progress="safeGetExportProgress"
228
+ sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefect" template-name='安检计划明细' :choose-col="true"></export-excel-safe>
229
+ </div>
230
+ </div>
231
+ </div>
232
+
233
+
234
+
235
+ </div>
236
+ <div class="row" v-if="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
237
+ <div :class="$parent.$parent.style">
238
+ <label class="font_normal_body">用户编号</label>
239
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
240
+ condition="f_userinfo_code = '{}'"
241
+ style="width: 60%" placeholder="用户编号">
242
+ </div>
243
+ <div :class="$parent.$parent.style">
244
+ <label class="font_normal_body">结果查询</label>
245
+ <v-select
246
+ placeholder='处理结果查询'
247
+ :value-single="true"
248
+ class="select select_list" style="width: 60%"
249
+ v-model='model.f_repaired'
250
+ :value.sync="model.f_repaired"
251
+ :options='$parent.$parent.repaired'
252
+ condition="f_repaired = '{}'"
253
+ close-on-select clear-button> </v-select>
254
+ </div>
255
+
256
+ <div :class="$parent.$parent.style2" style="margin: 0">
257
+ <role-selector-safe
258
+ role-name="安检员"
259
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
260
+ @re-res="$parent.$parent.getRes"
261
+ :value.sync="model.f_checker_id"
262
+ v-model="model.f_checker_id"
263
+ condition="f_checker_name = '{}'">
264
+ </role-selector-safe>
265
+ </div>
266
+ </div>
267
+ <div class="row" v-if="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
268
+ <div :class="$parent.$parent.style">
269
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
270
+ <v-select class="select_list select"
271
+ placeholder='片区/管理站' style="width: 60%"
272
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
273
+ :options='$parent.$parent.sliceArea'
274
+ filer-key="name"
275
+ close-on-select clear-button
276
+ condition="f_slice_area='{}'"
277
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
278
+ :value-single="true">
279
+ </v-select>
280
+ </div>
281
+ <div :class="$parent.$parent.style">
282
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
283
+ <v-select class="select_list select"
284
+ placeholder='抄表册' style="width: 60%"
285
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
286
+ :options='$parent.$parent.cbc'
287
+ filer-key="name"
288
+ close-on-select clear-button
289
+ condition="f_meter_book_num={}"
290
+ :value-single="true">
291
+ </v-select>
292
+ </div>
293
+ <div :class="$parent.$parent.style">
294
+ <label class="font_normal_body">起始时间</label>
295
+ <datepicker
296
+ placeholder='起始时间' style="width:60%"
297
+ :disabled-days-of-week="[]"
298
+ :format="'yyyy-MM-dd'"
299
+ :show-rest-button="reset"
300
+ :value.sync="model.f_start_time"
301
+ v-model="model.f_start_time"
302
+ condition="f_offsite_time >= '{} 00:00:00'">
303
+ </datepicker>
304
+ </div>
305
+ <div :class="$parent.$parent.style">
306
+ <label class="font_normal_body">结束时间</label>
307
+ <datepicker
308
+ placeholder='结束时间' style="width:60%"
309
+ :disabled-days-of-week="[]"
310
+ :format="'yyyy-MM-dd'"
311
+ :show-rest-button="reset"
312
+ :value.sync="model.f_end_time"
313
+ v-model="model.f_end_time"
314
+ condition="f_offsite_time <= '{} 23:59:59'">
315
+ </datepicker>
316
+ </div>
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>
340
+
341
+ </div>
342
+ </div>
343
+ </criteria>
344
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
345
+ <template partial='head'>
346
+ <tr>
347
+ <th><nobr>入户状态</nobr></th>
348
+ <th><nobr>用户编号</nobr></th>
349
+ <th><nobr>用户名</nobr></th>
350
+ <th><nobr>用户电话</nobr></th>
351
+ <th><nobr>用户小区</nobr></th>
352
+ <th><nobr>用户地址</nobr></th>
353
+ <th><nobr>安检时间</nobr></th>
354
+ <th><nobr>安检员</nobr></th>
355
+ <th><nobr>计划名</nobr></th>
356
+ <!--<th><nobr>是否有隐患</nobr></th>-->
357
+ <th><nobr>隐患总数</nobr></th>
358
+ <th><nobr>已处理数</nobr></th>
359
+ <th><nobr>未处理数</nobr></th>
360
+ <!-- <th><nobr>整改数</nobr></th>-->
361
+
362
+ </tr>
363
+ </template>
364
+ <template partial='body'>
365
+ <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
366
+ <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
367
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
368
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
369
+ <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
370
+ <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
371
+ <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
372
+ <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
373
+ <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
374
+ <!--<td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>-->
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>
378
+ <!-- <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>-->
379
+
380
+ </template>
381
+ </data-grid>
382
+ </criteria-paged>
383
+
384
+ <modal :show.sync="showModal" v-ref:modal>
385
+ <div slot="modal-header" class="modal-header">
386
+ <h4 class="modal-title">
387
+ 选择计划
388
+ </h4>
389
+ </div>
390
+ <div slot="modal-body" class="modal-body">
391
+ <plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
392
+ </div>
393
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
394
+ <button class="button_search" @click="ok">确认</button>
395
+ <button class="button_search" @click="cancel">取消</button>
396
+ </div>
397
+ </modal>
398
+ </div>
399
+ </template>
400
+ <script>
401
+ import {PagedList} from 'vue-client'
402
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
403
+ import co from 'co'
404
+
405
+ let select = function* (self) {
406
+ let http = new HttpResetClass()
407
+ let getGasman = yield http.load('POST', '/rs/search', {
408
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
409
+ userid: self.$login.f.id
410
+ }, {resolveMsg: null, rejectMsg: null})
411
+ console.log('获取安检员', getGasman)
412
+ self.checkersid.push({label: '全部', value: ''})
413
+ getGasman.data.forEach((checker) => {
414
+ self.checkersid.push({label: checker.name, value: checker.name})
415
+ })
416
+ }
417
+ export default {
418
+ title: '隐患查询',
419
+ data() {
420
+ let model = new PagedList('rs/sql/GetCheckPaperByDefect', 20, {
421
+ f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
422
+ })
423
+ model.f_filialeids = '(' + this.$login.f.orgid + ')'
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"
425
+ return {
426
+ housetype: [],//房屋类型
427
+ positions: [],//安装位置
428
+ meter_classifys:[],//气表类型
429
+ usertypes: this.usertypes(),//用户类型
430
+ repaired:[{label: '未修', value: '未修'}, {label: '已修', value: '已修'}],
431
+ hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
432
+ f: this.$login.f,
433
+ model: model,
434
+ criteriaShow: false,
435
+ showModal: false,
436
+ f_check_plan: {f_plan_name: '', id: ''},
437
+ sumsmodel: {},
438
+ all: false,
439
+ fields: {},
440
+ modelval: [],
441
+ checkersid: [],
442
+ sliceArea: [],
443
+ cbc:[],
444
+ cbcs:[],
445
+ thead: '',
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']
451
+ }
452
+ },
453
+ props:{
454
+
455
+ style: {
456
+ type: String,
457
+ default: 'col-sm-2 form-group'
458
+ },
459
+ style2: {
460
+ type: String,
461
+ default: 'col-sm-4 form-group'
462
+ }
463
+
464
+ },
465
+
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
+ },
489
+ getmeterbook(val){
490
+ this.cbc=[]
491
+ this.cbc.push({
492
+ label:'全部',
493
+ value:''
494
+ })
495
+ if (val==''){
496
+
497
+ this.cbcs.forEach(res=>{
498
+ this.cbc.push({
499
+ label:res.f_book_name,
500
+ value:res.id
501
+ })
502
+ })
503
+ }else{
504
+ this.cbcs.forEach(res=>{
505
+ if (res.f_book_slice_area==val){
506
+ this.cbc.push({
507
+ label:res.f_book_name,
508
+ value:res.id
509
+ })
510
+ }
511
+ })
512
+ }
513
+ },
514
+
515
+ Mreadibook(val){
516
+ console.log("999999999")
517
+ console.log(val)
518
+ this.sliceArea=[]
519
+ if (val){
520
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
521
+ items: 'name',
522
+ tablename: 't_zone',
523
+ condition: `parentid in ${val}`,
524
+ orderitem: 'id'
525
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
526
+ this.sliceArea.push({
527
+ label:'全部',
528
+ value:''
529
+ })
530
+ res.data.forEach(ress=>{
531
+ this.sliceArea.push({
532
+ label:ress.name,
533
+ value:ress.name
534
+ })
535
+ })
536
+
537
+ })
538
+ }
539
+ },
540
+ getAllMeterBook(val){
541
+ console.log("999999999")
542
+ console.log(val)
543
+ this.cbcs=[]
544
+ if (val){
545
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
546
+ items: 'f_book_name,f_book_slice_area,id',
547
+ tablename: 't_meter_book',
548
+ condition: `f_filiale_id in ${val}`,
549
+ orderitem: 'id'
550
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
551
+ res.data.forEach(ress=>{
552
+ this.cbcs.push({
553
+ id:ress.id,
554
+ f_book_name:ress.f_book_name,
555
+ f_book_slice_area:ress.f_book_slice_area
556
+ })
557
+ })
558
+ this.cbc=[]
559
+ this.cbc.push({
560
+ label:'全部',
561
+ value:''
562
+ })
563
+ this.cbcs.forEach(res=>{
564
+ this.cbc.push({
565
+ label:res.f_book_name,
566
+ value:res.id
567
+ })
568
+ })
569
+ })
570
+ }
571
+ },
572
+ hiddenr() {
573
+ this.$parent.showItem = !this.$parent.showItem
574
+ },
575
+ hidden() {
576
+ this.criteriaShow = !this.criteriaShow
577
+ },
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
+ }
595
+ if (this.f_check_plan.f_plan_name) {
596
+ args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
597
+ }
598
+ this.model.search(args.condition, args.model)
599
+ },
600
+ getRes(obj) {
601
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
602
+ this.Mreadibook(this.model.f_filialeids)
603
+ this.getAllMeterBook(this.model.f_filialeids)
604
+ },
605
+ showChooser() {
606
+ this.showModal = true
607
+ },
608
+ ok() {
609
+ this.showModal = false
610
+ if (this.$refs.modal.$children[0].selectedRow.id) {
611
+ this.f_check_plan = this.$refs.modal.$children[0].selectedRow
612
+ }
613
+ },
614
+ cancel() {
615
+ this.showModal = false
616
+ this.f_check_plan = {f_plan_name: '', id: ''}
617
+ }
618
+ },
619
+ ready() {
620
+ this.setConList()
621
+ this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
622
+ this.defectLeaveList=[{label:'全部',value:''}, ...this.$appdata.getParam('安检隐患项')]
623
+ let gen = select(this)
624
+ // this.Mreadibook(`('${this.$login.f.orgid}')`)
625
+ co(gen)
626
+ },
627
+ computed: {
628
+ getdefectType(){
629
+ this.defectType=[]
630
+ return [... this.$appdata.getParam(`安检项-${this.defectLeave}`)]
631
+ },
632
+ selected() {
633
+ return this.$refs.paged.$refs.grid.selected
634
+ },
635
+ getfield(){
636
+ console.log("---------------------------------------------导出方法")
637
+ let data = {}
638
+ this.bodyData.forEach((value, index)=>{
639
+ data[this.bodyData[index]] = this.headData[index]
640
+ })
641
+ //合计字段打印
642
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
643
+ if(this.sumsmodel){
644
+ Object.keys(this.sumsmodel).forEach((key) => {
645
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
646
+ })
647
+ }else{
648
+ this.tfoot += '暂无'
649
+ }
650
+ this.tfoot += '</th></tr>'
651
+ return data
652
+ }
653
+ }
654
+ }
655
+ </script>