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,1035 +1,1036 @@
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-show="!$parent.$parent.$parent.showItem">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">用户编号</label>
9
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
- id="f_userinfo_code"
11
-
12
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
13
- </div>
14
- <div :class="$parent.$parent.style">
15
- <label class="font_normal_body">用户姓名</label>
16
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
17
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
18
- </div>
19
- <div :class="$parent.$parent.style">
20
- <label class="font_normal_body">小&emsp;&emsp;区</label>
21
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
22
- id="f_residential_area"
23
- placeholder="小区" condition="f_residential_area like '%{}%'">
24
- </div>
25
- <div :class="$parent.$parent.style">
26
- <label class="font_normal_body">地&emsp;&emsp;址</label>
27
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
28
- placeholder="地址" condition="f_address like '%{}%'">
29
- </div>
30
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
31
- <export-excel-safe :data="$parent.$parent.searchData"
32
- :field="$parent.$parent.excelHeaders"
33
- :choose-col="true"
34
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
35
- template-name='用户安检情况'></export-excel-safe>
36
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
37
- <div style="float: right" class="button_spacing"
38
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
39
- @click="$parent.$parent.hiddenr()"></div>
40
- <div style="float: right" class="button_spacing"
41
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
42
- @click="$parent.$parent.hidden()">
43
-
44
- </div>
45
- </div>
46
-
47
-
48
- </div>
49
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
50
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
51
- <label class="font_normal_body">用户类型</label>
52
- <v-select id="f_usertype"
53
- placeholder='用户类型'
54
- class="select select_list"
55
- :value.sync="model.f_usertype"
56
- :value-single="true"
57
- :options='$parent.$parent.usertypes'
58
- v-model="model.f_usertype"
59
- condition="f_user_type = '{}'"
60
- close-on-select clear-button></v-select>
61
- </div>
62
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
63
-
64
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
65
- <label class="font_normal_body" style="color: red;">安检筛选</label>
66
- <v-select
67
- placeholder='安检筛选'
68
- :value-single="true"
69
- class="select select_list"
70
- :value.sync="$parent.$parent.SafeCheckXZ"
71
- :options='$parent.$parent.SafeCheckXZs'
72
- v-model="$parent.$parent.SafeCheckXZ"
73
- close-on-select clear-button></v-select>
74
- </div>
75
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
76
- <label class="font_normal_body">安检起始</label>
77
- <datepicker
78
- :value.sync="model.f_check_start"
79
- placeholder='最后安检时间起始'
80
- style="width: 60%"
81
- :format="'yyyy-MM-dd 00:00:00'"
82
- :show-rest-button="reset"
83
- v-model="model.f_check_start">
84
- </datepicker>
85
- </div>
86
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
87
- <label class="font_normal_body">安检结束</label>
88
- <datepicker
89
- :value.sync="model.f_check_end"
90
- placeholder='最后安检时间结束'
91
- style="width: 60%"
92
- :format="'yyyy-MM-dd 23:59:59'"
93
- :show-rest-button="reset"
94
- v-model="model.f_check_end">
95
- </datepicker>
96
- </div>
97
-
98
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
99
- <label class="font_normal_body">安检状态</label>
100
- <v-select id="f_entry"
101
- placeholder='安检状态'
102
- class="select select_list"
103
- :value.sync="model.f_last_check_state"
104
- :value-single="true"
105
- :options='$parent.$parent.checkstatus'
106
- v-model="model.f_last_check_state"
107
- condition="f_last_check_state = '{}'"
108
- close-on-select clear-button></v-select>
109
- </div>
110
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
111
- <label class="font_normal_body">隐患情况</label>
112
- <v-select
113
- placeholder='隐患情况'
114
- class="select select_list"
115
- :value-single="true"
116
- v-model='model.f_check_result'
117
- :value.sync="model.f_check_result"
118
- :options='$parent.$parent.f_check_results'
119
- condition="f_last_check_result like '%{}%'"
120
- close-on-select clear-button></v-select>
121
- </div>
122
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
123
- </div>
124
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
125
-
126
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
127
- <role-selector-safe
128
- role-name="安检员"
129
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
130
- @re-res="$parent.$parent.getRes"
131
- :value.sync="model.f_checker_id"
132
- v-model="model.f_checker_id"
133
- condition=" f_checker_name = '{}'">
134
- </role-selector-safe>
135
- </div>
136
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
137
- <label class="font_normal_body">片&emsp;&emsp;区</label>
138
- <v-select class="select_list select"
139
- placeholder='片区/管理站' style="width: 60%"
140
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
- :options='$parent.$parent.sliceArea'
142
- filer-key="name"
143
- close-on-select clear-button
144
- condition="f_slice_area='{}'"
145
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
146
- :value-single="true">
147
- </v-select>
148
- </div>
149
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
151
- <v-select class="select_list select"
152
- placeholder='抄表册' style="width: 60%"
153
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
154
- :options='$parent.$parent.cbc'
155
- filer-key="name"
156
- close-on-select clear-button
157
- condition="f_meter_book_num={}"
158
- :value-single="true">
159
- </v-select>
160
- </div>
161
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
- <label class="font_normal_body">省&ensp;市&ensp;区</label>
163
- <v-select class="select_list select"
164
- placeholder='请选择' style="width: 60%"
165
- :value.sync="model.f_pcd" v-model="model.f_pcd"
166
- :options='$parent.$parent.pcds'
167
- filer-key="name"
168
- close-on-select clear-button
169
- condition="f_pcd='{}'"
170
- :value-single="true">
171
- </v-select>
172
- </div>
173
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
174
- <label class="font_normal_body">用户状态</label>
175
- <v-select class="select_list select"
176
- placeholder='用户状态' style="width: 60%"
177
- :value.sync="model.f_user_state" v-model="model.f_user_state"
178
- :options='$parent.$parent.userstates'
179
- close-on-select clear-button
180
- condition="f_user_state = '{}'"
181
- :value-single="true">
182
- </v-select>
183
- </div>
184
- </div>
185
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
186
-
187
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
188
- <label class="font_normal_body">气表类型</label>
189
- <v-select class="select_list select"
190
- placeholder='气表类型' style="width: 60%"
191
- :value.sync="model.meter_classify" v-model="model.meter_classify"
192
- :options='$parent.$parent.meter_classifys'
193
- filer-key="name"
194
- close-on-select clear-button
195
- condition="F_METER_CLASSIFY='{}'"
196
- :value-single="true">
197
- </v-select>
198
- </div>
199
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
200
- <label class="font_normal_body">安装位置</label>
201
- <v-select class="select_list select"
202
- placeholder='安装位置' style="width: 60%"
203
- :value.sync="model.f_position" v-model="model.f_position"
204
- :options='$parent.$parent.positions'
205
- filer-key="name"
206
- close-on-select clear-button
207
- condition="f_position='{}'"
208
- :value-single="true">
209
- </v-select>
210
- </div>
211
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
212
- <label class="font_normal_body">房屋类型</label>
213
- <v-select class="select_list select"
214
- placeholder='请选择' style="width: 60%"
215
- :value.sync="model.f_house_type" v-model="model.f_house_type"
216
- :options='$parent.$parent.housetype'
217
- filer-key="name"
218
- close-on-select clear-button
219
- condition="f_house_type='{}'"
220
- :value-single="true">
221
- </v-select>
222
- </div>
223
- </div>
224
-
225
- <div class="row" v-show="$parent.$parent.$parent.showItem">
226
- <div :class="$parent.$parent.style">
227
- <label class="font_normal_body">用户编号</label>
228
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
229
-
230
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
231
- </div>
232
- <div :class="$parent.$parent.style">
233
- <label class="font_normal_body">用户姓名</label>
234
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
235
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
236
- </div>
237
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
238
- <export-excel-safe :data="$parent.$parent.searchData"
239
- :field="$parent.$parent.excelHeaders"
240
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
241
- template-name='用户安检情况'></export-excel-safe>
242
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
243
- <div style="float: right" class="button_spacing"
244
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
245
- @click="$parent.$parent.hiddenr()"></div>
246
- <div style="float: right" class="button_spacing"
247
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
248
- @click="$parent.$parent.hidden()">
249
-
250
- </div>
251
- </div>
252
-
253
- </div>
254
- <div class="row" v-show="$parent.$parent.$parent.showItem">
255
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
256
- <label class="font_normal_body">小&emsp;&emsp;区</label>
257
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
258
-
259
- placeholder="小区" condition="f_residential_area like '%{}%'">
260
- </div>
261
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
262
- <label class="font_normal_body">地&emsp;&emsp;址</label>
263
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
264
-
265
- placeholder="地址" condition="f_address like '%{}%'">
266
- </div>
267
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
268
- <label class="font_normal_body">用户类型</label>
269
- <v-select
270
- placeholder='用户类型'
271
- class="select select_list"
272
-
273
- :value.sync="model.f_usertype"
274
- :value-single="true"
275
- :options='$parent.$parent.usertypes'
276
- v-model="model.f_usertype"
277
- condition="f_user_type = '{}'"
278
- close-on-select clear-button></v-select>
279
- </div>
280
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
281
-
282
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
283
- <label class="font_normal_body" style="color: red;">安检筛选</label>
284
- <v-select
285
- placeholder='安检筛选'
286
- :value-single="true"
287
-
288
- class="select select_list"
289
- :value.sync="$parent.$parent.SafeCheckXZ"
290
- :options='$parent.$parent.SafeCheckXZs'
291
- v-model="$parent.$parent.SafeCheckXZ"
292
- close-on-select clear-button></v-select>
293
- </div>
294
-
295
- </div>
296
- <div class="row" v-show="$parent.$parent.$parent.showItem">
297
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
298
- <label class="font_normal_body">安检起始</label>
299
- <datepicker
300
- :value.sync="model.f_check_start"
301
- placeholder='最后安检时间起始'
302
- :disabled-days-of-week="[]"
303
- style="width: 60%"
304
- :format="'yyyy-MM-dd'"
305
- :show-rest-button="reset"
306
- v-model="model.f_check_start">
307
- </datepicker>
308
- </div>
309
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
310
- <label class="font_normal_body">安检结束</label>
311
- <datepicker
312
- :value.sync="model.f_check_end"
313
- placeholder='最后安检时间结束'
314
- style="width: 60%"
315
- :disabled-days-of-week="[]"
316
- :format="'yyyy-MM-dd'"
317
- :show-rest-button="reset"
318
- v-model="model.f_check_end">
319
- </datepicker>
320
- </div>
321
-
322
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
323
- <label class="font_normal_body">安检状态</label>
324
- <v-select
325
- placeholder='安检状态'
326
- class="select select_list"
327
-
328
- :value.sync="model.f_last_check_state"
329
- :value-single="true"
330
- :options='$parent.$parent.checkstatus'
331
- v-model="model.f_last_check_state"
332
- condition="f_last_check_state = '{}'"
333
- close-on-select clear-button></v-select>
334
- </div>
335
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
336
- <label class="font_normal_body">隐患情况</label>
337
- <v-select
338
- placeholder='隐患情况'
339
- class="select select_list"
340
-
341
- :value-single="true"
342
- v-model='model.f_check_result'
343
- :value.sync="model.f_check_result"
344
- :options='$parent.$parent.f_check_results'
345
- condition="f_last_check_result like '%{}%'"
346
- close-on-select clear-button></v-select>
347
- </div>
348
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
349
- <label class="font_normal_body">气表类型</label>
350
- <v-select class="select_list select"
351
- placeholder='气表类型' style="width: 60%"
352
- :value.sync="model.meter_classify" v-model="model.meter_classify"
353
- :options='$parent.$parent.meter_classifys'
354
- filer-key="name"
355
- close-on-select clear-button
356
- condition="F_METER_CLASSIFY='{}'"
357
- :value-single="true">
358
- </v-select>
359
- </div>
360
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
361
- <label class="font_normal_body">安装位置</label>
362
- <v-select class="select_list select"
363
- placeholder='安装位置' style="width: 60%"
364
- :value.sync="model.f_position" v-model="model.f_position"
365
- :options='$parent.$parent.positions'
366
- filer-key="name"
367
- close-on-select clear-button
368
- condition="f_position='{}'"
369
- :value-single="true">
370
- </v-select>
371
- </div>
372
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
373
- <label class="font_normal_body">房屋类型</label>
374
- <v-select class="select_list select"
375
- placeholder='请选择' style="width: 60%"
376
- :value.sync="model.f_house_type" v-model="model.f_house_type"
377
- :options='$parent.$parent.housetype'
378
- filer-key="name"
379
- close-on-select clear-button
380
- condition="f_house_type='{}'"
381
- :value-single="true">
382
- </v-select>
383
- </div>
384
- </div>
385
- <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
386
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
387
- <label class="font_normal_body">公&emsp;&emsp;司</label>
388
- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
389
- </right-tree>
390
- </div>
391
-
392
- </div>-->
393
- </div>
394
- </criteria>
395
- <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
396
- <template partial='head'>
397
- <tr>
398
- <th>
399
- <nobr>用户编号</nobr>
400
- </th>
401
- <th>
402
- <nobr>用户名称</nobr>
403
- </th>
404
- <th>
405
- <nobr>用户电话</nobr>
406
- </th>
407
- <th>
408
- <nobr>用户表号</nobr>
409
- </th>
410
- <!-- <th>-->
411
- <!-- <nobr>气表品牌</nobr>-->
412
- <!-- </th>-->
413
- <th>
414
- <nobr>用户类型</nobr>
415
- </th>
416
- <!-- <th>-->
417
- <!-- <nobr>壁挂炉</nobr>-->
418
- <!-- </th>-->
419
- <!-- <th>-->
420
- <!-- <nobr>灶具</nobr>-->
421
- <!-- </th>-->
422
- <th>
423
- <nobr>小区名称</nobr>
424
- </th>
425
- <th style="padding: 0 40px">
426
- <nobr>地址</nobr>
427
- </th>
428
- <th>
429
- <nobr>安检员</nobr>
430
- </th>
431
- <!-- <th>-->
432
- <!-- <nobr>安检员备注</nobr>-->
433
- <!-- </th>-->
434
- <th>
435
- <nobr>安检日期</nobr>
436
- </th>
437
- <th>
438
- <nobr>安检状态</nobr>
439
- </th>
440
- <th>
441
- <nobr>安检结果</nobr>
442
- </th>
443
- </tr>
444
- </template>
445
- <template partial='body'>
446
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
447
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
448
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
449
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_meternumber}}</td>
450
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_meter_brand}}</td>-->
451
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
452
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
453
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_haskitchen }}</td>-->
454
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
455
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
456
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_checker }}</td>
457
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
458
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
459
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
460
- {{row.f_last_check_result }}
461
- </td>
462
- </template>
463
- </data-grid>
464
- </criteria-paged>
465
- </div>
466
- </template>
467
-
468
- <script>
469
- import {PagedList} from 'vue-client'
470
- import {HttpResetClass} from 'vue-client'
471
- import co from 'co'
472
- import * as Util from './../Util'
473
- import Vue from 'vue'
474
-
475
- // let select = function * (self,userid) {
476
- // let http = new HttpResetClass()
477
- // let getGasman = yield http.load('POST','/rs/search', {
478
- // source: 'this.getChildByName($安检员$).getUsers()',
479
- // userid: userid
480
- // }, {resolveMsg: null, rejectMsg: null})
481
- // console.log('获取安检员', getGasman)
482
- // getGasman.data.forEach((checker)=>{
483
- // self.checkersid.push({label:checker.name,value:checker.id})
484
- // })
485
- // self.checkersid.push({label:'全部',value:''})
486
- // }
487
-
488
-
489
- export default {
490
- title: '用户安检情况',
491
- data() {
492
- let options = []
493
- let year = (new Date()).getFullYear()
494
- for (let i = year; i <= year + 3; i++)
495
- options.push({label: i + '', value: i + ''})
496
- let moptions = []
497
- for (let i = 1; i <= 12; i++)
498
- moptions.push({label: i + '', value: i + ''})
499
-
500
- return {
501
- searchData: {
502
- condition: '1=1',
503
- orderitem: "f_userinfo_code",
504
- timetype: "dd",
505
- f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '正常' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
506
-
507
- },
508
- excelHeaders: {
509
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
510
-
511
- 'f_userinfo_code': '用户编号',
512
- 'f_user_name': '用户名称',
513
- 'f_user_phone': '用户电话',
514
- 'f_meternumber': '用户表号',
515
- 'f_user_type': '用户类型',
516
- 'f_last_checker': '安检员',
517
- 'f_residential_area': '小区名称',
518
- 'f_address': '地址',
519
- 'f_last_check_date': '安检日期',
520
- 'f_last_check_state': '安检状态',
521
- 'f_last_check_result': '安检结果'
522
- },
523
- model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
524
- orderitem: "'f_last_check_date'",
525
- timetype: "'dd'",
526
- f_defect_content: 'this.f_defect_content'
527
- }),
528
- f_defect_content:"CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
529
- orgstrs: [{label: '全部', value: ''}],
530
- checkersid: [],
531
- SafeCheckXZ: '',
532
- civil: '', //民用安检周期
533
- civilian: '', //非民用安检周期
534
- SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
535
- SafeCheckSXs: [{label: '', value: ''}, {label: '', value: ''}, {label: '全部', value: ''}],
536
- // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
537
- IsShares: [{label: '', value: ''}, {label: '', value: '否'}],
538
- IsShare: '否',
539
- checker: {},
540
- NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
541
- criteriaShow: false,
542
- checkers: [],
543
- chosenOrg: {id: 0},
544
- showModal: false,
545
- checkedAll: false,
546
- checkrows: [],
547
- adjustables: [],
548
- f_plan_year: year + '',
549
- f_plan_month: moptions[new Date().getMonth()].value,
550
- f_effective_start_time: '', //计划有效起始时间
551
- f_effective_end_time: '', //计划有效结束时间
552
- checkboxModel: {},
553
- c_year_list: options,
554
- c_month_list: moptions,
555
- areas: this.areas(),
556
- checkstatus: this.checkstatus(),
557
- usertypes: this.usertypes(),
558
- userstates: this.userstates(),
559
- sqlname: '',
560
- f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
561
- creatPlanWay: '',
562
- sliceArea: [],
563
- cbcs:[],
564
- cbc:[],
565
- pcds:[],
566
- housetype: [],
567
- positions: [],
568
- meter_classifys:[]//气表类型
569
- }
570
- },
571
- props: {
572
- style: {
573
- type: String,
574
- default: 'col-sm-2 form-group'
575
- },
576
- style2: {
577
- type: String,
578
- default: 'col-sm-4 form-group'
579
- },
580
- checkplan: { // 传入一条安检计划信息
581
- type: Object
582
- },
583
- additemshow: {
584
- type: Boolean,
585
- default: false
586
- }
587
- },
588
- ready() {
589
- // 获取分公司信息
590
- this.model.f_defect_content=this.f_defect_content
591
- this.setConList()
592
- //this.getfengongsi()
593
- this.model.chosenOrg = {id: 0}
594
- this.model.f_filialeids = this.$login.f.f_orgids
595
- this.model.f_filiale = this.$login.f.f_fengongsi
596
- this.model.f_OrgStr = this.$login.f.orgpathstr
597
- this.Mreadibook(`('${this.$login.f.orgid}')`)
598
- this.getAllMeterBook(`('${this.$login.f.orgid}')`)
599
- },
600
- methods: {
601
- setConList(){
602
-
603
- this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
604
- label: '全部',
605
- value: ''
606
- }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
607
-
608
- this.positions=this.$appdata.getParam('安装位置') ? [{
609
- label: '全部',
610
- value: ''
611
- }, ...this.$appdata.getParam('安装位置')] : [{label: '全部', value: ''}]
612
- this.housetype=this.$appdata.getParam('房屋类型') ? [{
613
- label: '全部',
614
- value: ''
615
- }, ...this.$appdata.getParam('房屋类型')] : [{label: '全部', value: ''}]
616
- },
617
- //获取省市区列表
618
- getPcd(val){
619
- this.pcds = [{label:'全部',value:''}]
620
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
621
- {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
622
- {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
623
- pcdlist.data.forEach((result)=>{
624
- this.pcds.push({label:result.f_pcd,value:result.f_pcd})
625
- })
626
- })
627
- },
628
- getmeterbook(val){
629
-
630
- console.log("进来111")
631
- this.cbc=[]
632
- this.cbc.push({
633
- label:'全部',
634
- value:''
635
- })
636
- if (val==''){
637
-
638
- this.cbcs.forEach(res=>{
639
- this.cbc.push({
640
- label:res.f_book_name,
641
- value:res.id
642
- })
643
- })
644
- }else{
645
- this.cbcs.forEach(res=>{
646
- if (res.f_book_slice_area==val){
647
- this.cbc.push({
648
- label:res.f_book_name,
649
- value:res.id
650
- })
651
- }
652
- })
653
- }
654
- },
655
- Mreadibook(val){
656
- //console.log("999999999")
657
- //console.log(val)
658
- if (val){
659
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
660
- items: 'name',
661
- tablename: 't_zone',
662
- condition: `parentid in ${val}`,
663
- orderitem: 'id'
664
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
665
- this.sliceArea=[]
666
- this.sliceArea.push({
667
- label:'全部',
668
- value:''
669
- })
670
- res.data.forEach(ress=>{
671
- this.sliceArea.push({
672
- label:ress.name,
673
- value:ress.name
674
- })
675
- })
676
-
677
- })
678
- }
679
- },
680
- // 获取县域分公司内容
681
- getfengongsi() {
682
- let val = {
683
- source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
684
- userid: `${this.$login.f.id}`
685
- }
686
- let http = new HttpResetClass()
687
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
688
- res.data.forEach((item) => {
689
- this.orgstrs.push({label: item.name, value: item.id})
690
- })
691
- console.log(this.orgstrs.length)
692
- })
693
- },
694
- // 县域分公司发生改变
695
- // orgstrchange(val){
696
- // if(val == undefined || val == ''){
697
- // return
698
- // }else {
699
- // this.checkersid = []
700
- // let gen = select(this,val)
701
- // return co(gen)
702
- // }
703
- // },
704
- getDefect(val) {
705
- if (val) {
706
- try {
707
- var defect = JSON.parse(val)
708
- return defect.result
709
- } catch (e) {
710
- console.log(val)
711
- return '正常'
712
- }
713
- }
714
- return '正常'
715
- },
716
- checkerchange(val) {
717
- this.checkboxModel.f_checker = val.name
718
- this.checkboxModel.f_checker_id = val.id
719
- },
720
- search(args) {
721
- if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
722
- this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
723
- return
724
- }
725
- if (this.SafeCheckXZ == '未安检') {
726
- args.condition += " and ( f_last_check_date >= '" + args.model.f_check_end + "' or f_last_check_date <= '" + args.model.f_check_start + "' or f_last_check_date is null)"
727
- } else {
728
- if (args.model.f_check_start) {
729
- args.condition += " and f_last_check_date >= '" + args.model.f_check_start + "'"
730
- }
731
- if (args.model.f_check_end) {
732
- args.condition += " and f_last_check_date <= '" + args.model.f_check_end + "'"
733
- }
734
- }
735
- args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
736
- let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
737
- con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'`:''
738
- con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
739
- con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
740
- con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
741
- con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
742
- if (this.SafeCheckXZ == '未安检') {
743
- con += args.model.f_check_start ? ` and ( f_offsite_time < '${args.model.f_check_start}' or f_offsite_time > '${args.model.f_check_end}' )` : ''
744
- } else {
745
- con += args.model.f_check_start ? ` and f_offsite_time >= '${args.model.f_check_start}'` : ''
746
- con += args.model.f_check_end ? ` and f_offsite_time <= '${args.model.f_check_end}'` : ''
747
- }
748
- con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
749
- con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
750
- let condition = {
751
- condition1: args.condition,
752
- condition2: con
753
- }
754
- console.log('查询参数', condition)
755
- this.searchData.condition = condition
756
- return this.model.search(condition, args.model)
757
- },
758
- checkstatus() {
759
- return this.$appdata.getParam('安检状态') ? [{
760
- label: '全部',
761
- value: ''
762
- }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
763
- },
764
- usertypes() {
765
- return this.$appdata.getParam('用户类型') ? [{
766
- label: '全部',
767
- value: ''
768
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
769
- },
770
- userstates() {
771
- return this.$appdata.getParam('用户状态') ? [{
772
- label: '全部',
773
- value: ''
774
- }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
775
- },
776
- hiddenr() {
777
- this.$parent.showItem = !this.$parent.showItem
778
- },
779
- hidden() {
780
- this.criteriaShow = !this.criteriaShow
781
- },
782
- confirm() {
783
- if (!this.checkboxModel.f_plan_name) {
784
- this.$showMessage('请填写安检计划名称!')
785
- return
786
- }
787
- // if(this.f_effective_start_time == ''){
788
- // this.$showMessage('请选择有效起始日期!')
789
- // return
790
- // }
791
- // if(this.f_effective_end_time == ''){
792
- // this.$showMessage('请选择有效结束日期!')
793
- // return
794
- // }
795
- if (this.IsShare == '否') {
796
- if (!this.checkboxModel.f_checker_id) {
797
- this.$showMessage('请选择安检员!')
798
- return
799
- }
800
- }
801
- let gen = saveGen(this)
802
- return co(gen)
803
- },
804
- changeStates() {
805
- if (this.checkedAll) {//实现反选/
806
- this.checkrows = [];
807
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
808
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
809
- }
810
- } else {//实现全选
811
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
812
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
813
- }
814
- let _this = this
815
- let condition = this.$refs.paged.$refs.criteria.condition
816
- let url = this.model.url
817
- this.$resetpost(`${url}?pageSize=9999999`, {
818
- data: {
819
- condition: condition,
820
- groupitem: '',
821
- orderitem: 'f_residential_area',
822
- f_usertype: this.model.f_usertype,
823
- f_filialeids: this.model.f_filialeids,
824
- month: this.model.month,
825
- safeCycle: this.model.safeCycle,
826
- f_checktime_start: this.model.f_checktime_start,
827
- f_checktime_end: this.model.f_checktime_end,
828
- SafeCheckSX: this.model.SafeCheckSX,
829
- f_last_check_state: this.model.f_last_check_state
830
- },
831
- }, {resolveMsg: null, rejectMsg: null}, -1).then(
832
- (respanse) => {
833
- if (respanse.data.length >= 5000) {
834
- this.$showMessage("数据量太大,请重新选择")
835
- } else {
836
- _this.checkrows = []
837
- for (let j = 0; j < respanse.data.length; j++) {
838
- _this.checkrows.push(respanse.data[j])
839
- }
840
- console.log(_this.checkrows);
841
- }
842
- })
843
- }
844
- },
845
- addChecked(item) {
846
- console.log(item);
847
- if (!item.checked) {
848
- this.checkrows.push(item);
849
- console.log(this.checkrows);
850
- } else {
851
- for (let i = 0; i < this.checkrows.length; i++) {
852
- if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
853
- this.checkrows.splice(i, 1)
854
- }
855
- }
856
- }
857
- },
858
- ToshowModal() {
859
- this.creatPlanWay = 'single'
860
- if (this.checkrows.length > 0) {
861
- this.showModal = true
862
- } else {
863
- this.$showMessage("请选择需要安检的用户!")
864
- }
865
- },
866
- FiltrationPlan() {
867
- if (this.model.rows.length == 0) {
868
- this.$showMessage("暂无可生成的计划!")
869
- return
870
- }
871
- this.creatPlanWay = 'filtration'
872
- this.showModal = true
873
- },
874
- AllPlan() {
875
- if (this.model.rows.length == 0) {
876
- this.$showMessage("暂无可生成的计划!")
877
- return
878
- }
879
- this.creatPlanWay = 'all'
880
- this.showModal = true
881
- },
882
- cancel() {
883
- this.showModal = false
884
- },
885
- areas() {
886
- let rs = []
887
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
888
- let temp = {
889
- label: this.$login.f.f_allArea[i].label,
890
- value: this.$login.f.f_allArea[i].label
891
- }
892
- rs.push(temp)
893
- }
894
- return [{label: '全部', value: ''}, ...rs]
895
- },
896
- initAdjustables() {
897
- console.log('初始化调压箱', this.$GetSaleParam)
898
- let arr = []
899
- let filter = this.$login.f.f_orgids
900
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
901
- let temp = {}
902
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
903
- temp.value = `${item.value.id}`
904
- arr.push(temp)
905
- })
906
- this.adjustables = [{label: '全部', value: ''}, ...arr]
907
- },
908
- getAllMeterBook(val){
909
- //console.log("999999999")
910
- //console.log(val)
911
- this.cbcs=[]
912
- if (val){
913
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
914
- items: 'f_book_name,f_book_slice_area,id',
915
- tablename: 't_meter_book',
916
- condition: `f_filiale_id in ${val}`,
917
- orderitem: 'id'
918
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
919
- res.data.forEach(ress=>{
920
- this.cbcs.push({
921
- id:ress.id,
922
- f_book_name:ress.f_book_name,
923
- f_book_slice_area:ress.f_book_slice_area
924
- })
925
- })
926
- this.cbc=[]
927
- this.cbc.push({
928
- label:'全部',
929
- value:''
930
- })
931
- this.cbcs.forEach(res=>{
932
- this.cbc.push({
933
- label:res.f_book_name,
934
- value:res.id
935
- })
936
- })
937
- })
938
- }
939
- },
940
- getRes(obj) {
941
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
942
- this.Mreadibook(this.model.f_filialeids)
943
- this.getAllMeterBook(this.model.f_filialeids)
944
- this.getPcd(this.model.f_filialeids)
945
- }
946
- },
947
-
948
- watch: {
949
- 'model.f_usertype'(val) {
950
- if (val == '民用') {
951
- this.model.safeCycle = this.civil
952
- } else if (val == '非民用') {
953
- this.model.safeCycle = this.civilian
954
- }
955
- },
956
- 'model.SafeCheckXZ'(val) {
957
- this.model.SafeCheckSC = ''
958
- if (val == '已安检') {
959
- this.model.SafeCheckCQ = ''
960
- this.model.SafeCheckSX = {
961
- f_check_end: '', // 安检时间 查询起始条件
962
- f_check_start: ''// 安检时间 查询终止条件
963
- }
964
- } else {
965
- // 当使用筛选条件时,清空不需要的条件选项
966
- this.model.f_issue_start = ''
967
- this.model.f_issue_end = ''
968
- this.$refs.paged.$refs.criteria.model.f_check_start = ''
969
- this.$refs.paged.$refs.criteria.model.f_check_end = ''
970
- this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
971
- this.model.month = ''
972
- if (val == '应安检') {
973
- this.model.SafeCheckSC = ''
974
-
975
- this.model.f_issue_start = Util.toStartDateString()
976
- this.model.f_issue_end = Util.toStandardDateString()
977
- }
978
- // this.model.f_checktime_start = ''
979
- // this.model.f_checktime_end = ''
980
- }
981
- },
982
- 'model.SafeCheckSC'(val) {
983
- if (val == '') {
984
- this.model.f_issue_start = ''
985
- this.model.f_issue_end = ''
986
- }
987
- },
988
- // 'checker'(val){
989
- // console.log("checker",this.checker)
990
- // if(val){
991
- // this.checkboxModel.f_checker = this.checker[0].name
992
- // this.checkboxModel.f_checker_id = this.checker[0].id
993
- // }
994
- // },
995
- 'model.rows'() {
996
- // if (!this.checkedAll) {//实现反选/
997
- // this.checkrows = [];
998
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
999
- var k = false
1000
- for (let j = 0; j < this.checkrows.length; j++) {
1001
- if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1002
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1003
- k = true
1004
- continue
1005
- }
1006
- }
1007
- if (!k) {
1008
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1009
- }
1010
- }
1011
- // } else {//实现全选
1012
- // // this.checkboxModel = {};
1013
- // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1014
- // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1015
- // }
1016
- // }
1017
- }
1018
- },
1019
- computed: {
1020
- selected() {
1021
- return this.$refs.paged.$refs.grid.selected
1022
- }
1023
- }
1024
- }
1025
- </script>
1026
- <style scoped>
1027
- .newcolor {
1028
- color: red;
1029
- }
1030
-
1031
- .table th {
1032
- background-color: #f2f6fa;
1033
- color: black;
1034
- }
1035
- </style>
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-show="!$parent.$parent.$parent.showItem">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">用户编号</label>
9
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
+ id="f_userinfo_code"
11
+
12
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
13
+ </div>
14
+ <div :class="$parent.$parent.style">
15
+ <label class="font_normal_body">用户姓名</label>
16
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
17
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
18
+ </div>
19
+ <div :class="$parent.$parent.style">
20
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
21
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
22
+ id="f_residential_area"
23
+ placeholder="小区" condition="f_residential_area like '%{}%'">
24
+ </div>
25
+ <div :class="$parent.$parent.style">
26
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
27
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
28
+ placeholder="地址" condition="f_address like '%{}%'">
29
+ </div>
30
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
31
+ <export-excel-safe :data="$parent.$parent.searchData"
32
+ :field="$parent.$parent.excelHeaders"
33
+ :choose-col="true"
34
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
35
+ template-name='用户安检情况'></export-excel-safe>
36
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
37
+ <div style="float: right" class="button_spacing"
38
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
39
+ @click="$parent.$parent.hiddenr()"></div>
40
+ <div style="float: right" class="button_spacing"
41
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
42
+ @click="$parent.$parent.hidden()">
43
+
44
+ </div>
45
+ </div>
46
+
47
+
48
+ </div>
49
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
50
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
51
+ <label class="font_normal_body">用户类型</label>
52
+ <v-select id="f_usertype"
53
+ placeholder='用户类型'
54
+ class="select select_list"
55
+ :value.sync="model.f_usertype"
56
+ :value-single="true"
57
+ :options='$parent.$parent.usertypes'
58
+ v-model="model.f_usertype"
59
+ condition="f_user_type = '{}'"
60
+ close-on-select clear-button></v-select>
61
+ </div>
62
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
63
+
64
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
65
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
66
+ <v-select
67
+ placeholder='安检筛选'
68
+ :value-single="true"
69
+ class="select select_list"
70
+ :value.sync="$parent.$parent.SafeCheckXZ"
71
+ :options='$parent.$parent.SafeCheckXZs'
72
+ v-model="$parent.$parent.SafeCheckXZ"
73
+ close-on-select clear-button></v-select>
74
+ </div>
75
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
76
+ <label class="font_normal_body">安检起始</label>
77
+ <datepicker
78
+ :value.sync="model.f_check_start"
79
+ placeholder='最后安检时间起始'
80
+ style="width: 60%"
81
+ :format="'yyyy-MM-dd 00:00:00'"
82
+ :show-rest-button="reset"
83
+ v-model="model.f_check_start">
84
+ </datepicker>
85
+ </div>
86
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
87
+ <label class="font_normal_body">安检结束</label>
88
+ <datepicker
89
+ :value.sync="model.f_check_end"
90
+ placeholder='最后安检时间结束'
91
+ style="width: 60%"
92
+ :format="'yyyy-MM-dd 23:59:59'"
93
+ :show-rest-button="reset"
94
+ v-model="model.f_check_end">
95
+ </datepicker>
96
+ </div>
97
+
98
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
99
+ <label class="font_normal_body">安检状态</label>
100
+ <v-select id="f_entry"
101
+ placeholder='安检状态'
102
+ class="select select_list"
103
+ :value.sync="model.f_last_check_state"
104
+ :value-single="true"
105
+ :options='$parent.$parent.checkstatus'
106
+ v-model="model.f_last_check_state"
107
+ condition="f_last_check_state = '{}'"
108
+ close-on-select clear-button></v-select>
109
+ </div>
110
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
111
+ <label class="font_normal_body">隐患情况</label>
112
+ <v-select
113
+ placeholder='隐患情况'
114
+ class="select select_list"
115
+ :value-single="true"
116
+ v-model='model.f_check_result'
117
+ :value.sync="model.f_check_result"
118
+ :options='$parent.$parent.f_check_results'
119
+ condition="f_last_check_result like '%{}%'"
120
+ close-on-select clear-button></v-select>
121
+ </div>
122
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
123
+ </div>
124
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
125
+
126
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
127
+ <role-selector-safe
128
+ role-name="安检员"
129
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
130
+ @re-res="$parent.$parent.getRes"
131
+ :value.sync="model.f_checker_id"
132
+ v-model="model.f_checker_id"
133
+ condition=" f_checker_name = '{}'">
134
+ </role-selector-safe>
135
+ </div>
136
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
137
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
138
+ <v-select class="select_list select"
139
+ placeholder='片区/管理站' style="width: 60%"
140
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
+ :options='$parent.$parent.sliceArea'
142
+ filer-key="name"
143
+ close-on-select clear-button
144
+ condition="f_slice_area='{}'"
145
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
146
+ :value-single="true">
147
+ </v-select>
148
+ </div>
149
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
151
+ <v-select class="select_list select"
152
+ placeholder='抄表册' style="width: 60%"
153
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
154
+ :options='$parent.$parent.cbc'
155
+ filer-key="name"
156
+ close-on-select clear-button
157
+ condition="f_meter_book_num={}"
158
+ :value-single="true">
159
+ </v-select>
160
+ </div>
161
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
163
+ <v-select class="select_list select"
164
+ placeholder='请选择' style="width: 60%"
165
+ :value.sync="model.f_pcd" v-model="model.f_pcd"
166
+ :options='$parent.$parent.pcds'
167
+ filer-key="name"
168
+ close-on-select clear-button
169
+ condition="f_pcd='{}'"
170
+ :value-single="true">
171
+ </v-select>
172
+ </div>
173
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
174
+ <label class="font_normal_body">用户状态</label>
175
+ <v-select class="select_list select"
176
+ placeholder='用户状态' style="width: 60%"
177
+ :value.sync="model.f_user_state" v-model="model.f_user_state"
178
+ :options='$parent.$parent.userstates'
179
+ close-on-select clear-button
180
+ condition="f_user_state = '{}'"
181
+ :value-single="true">
182
+ </v-select>
183
+ </div>
184
+ </div>
185
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
186
+
187
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
188
+ <label class="font_normal_body">气表类型</label>
189
+ <v-select class="select_list select"
190
+ placeholder='气表类型' style="width: 60%"
191
+ :value.sync="model.meter_classify" v-model="model.meter_classify"
192
+ :options='$parent.$parent.meter_classifys'
193
+ filer-key="name"
194
+ close-on-select clear-button
195
+ condition="F_METER_CLASSIFY='{}'"
196
+ :value-single="true">
197
+ </v-select>
198
+ </div>
199
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
200
+ <label class="font_normal_body">安装位置</label>
201
+ <v-select class="select_list select"
202
+ placeholder='安装位置' style="width: 60%"
203
+ :value.sync="model.f_position" v-model="model.f_position"
204
+ :options='$parent.$parent.positions'
205
+ filer-key="name"
206
+ close-on-select clear-button
207
+ condition="f_position='{}'"
208
+ :value-single="true">
209
+ </v-select>
210
+ </div>
211
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
212
+ <label class="font_normal_body">房屋类型</label>
213
+ <v-select class="select_list select"
214
+ placeholder='请选择' style="width: 60%"
215
+ :value.sync="model.f_house_type" v-model="model.f_house_type"
216
+ :options='$parent.$parent.housetype'
217
+ filer-key="name"
218
+ close-on-select clear-button
219
+ condition="f_house_type='{}'"
220
+ :value-single="true">
221
+ </v-select>
222
+ </div>
223
+ </div>
224
+
225
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
226
+ <div :class="$parent.$parent.style">
227
+ <label class="font_normal_body">用户编号</label>
228
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
229
+
230
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
231
+ </div>
232
+ <div :class="$parent.$parent.style">
233
+ <label class="font_normal_body">用户姓名</label>
234
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
235
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
236
+ </div>
237
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
238
+ <export-excel-safe :data="$parent.$parent.searchData"
239
+ :field="$parent.$parent.excelHeaders"
240
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
241
+ template-name='用户安检情况'></export-excel-safe>
242
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
243
+ <div style="float: right" class="button_spacing"
244
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
245
+ @click="$parent.$parent.hiddenr()"></div>
246
+ <div style="float: right" class="button_spacing"
247
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
248
+ @click="$parent.$parent.hidden()">
249
+
250
+ </div>
251
+ </div>
252
+
253
+ </div>
254
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
255
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
256
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
257
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
258
+
259
+ placeholder="小区" condition="f_residential_area like '%{}%'">
260
+ </div>
261
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
262
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
263
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
264
+
265
+ placeholder="地址" condition="f_address like '%{}%'">
266
+ </div>
267
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
268
+ <label class="font_normal_body">用户类型</label>
269
+ <v-select
270
+ placeholder='用户类型'
271
+ class="select select_list"
272
+
273
+ :value.sync="model.f_usertype"
274
+ :value-single="true"
275
+ :options='$parent.$parent.usertypes'
276
+ v-model="model.f_usertype"
277
+ condition="f_user_type = '{}'"
278
+ close-on-select clear-button></v-select>
279
+ </div>
280
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
281
+
282
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
283
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
284
+ <v-select
285
+ placeholder='安检筛选'
286
+ :value-single="true"
287
+
288
+ class="select select_list"
289
+ :value.sync="$parent.$parent.SafeCheckXZ"
290
+ :options='$parent.$parent.SafeCheckXZs'
291
+ v-model="$parent.$parent.SafeCheckXZ"
292
+ close-on-select clear-button></v-select>
293
+ </div>
294
+
295
+ </div>
296
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
297
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
298
+ <label class="font_normal_body">安检起始</label>
299
+ <datepicker
300
+ :value.sync="model.f_check_start"
301
+ placeholder='最后安检时间起始'
302
+ :disabled-days-of-week="[]"
303
+ style="width: 60%"
304
+ :format="'yyyy-MM-dd'"
305
+ :show-rest-button="reset"
306
+ v-model="model.f_check_start">
307
+ </datepicker>
308
+ </div>
309
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
310
+ <label class="font_normal_body">安检结束</label>
311
+ <datepicker
312
+ :value.sync="model.f_check_end"
313
+ placeholder='最后安检时间结束'
314
+ style="width: 60%"
315
+ :disabled-days-of-week="[]"
316
+ :format="'yyyy-MM-dd'"
317
+ :show-rest-button="reset"
318
+ v-model="model.f_check_end">
319
+ </datepicker>
320
+ </div>
321
+
322
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
323
+ <label class="font_normal_body">安检状态</label>
324
+ <v-select
325
+ placeholder='安检状态'
326
+ class="select select_list"
327
+
328
+ :value.sync="model.f_last_check_state"
329
+ :value-single="true"
330
+ :options='$parent.$parent.checkstatus'
331
+ v-model="model.f_last_check_state"
332
+ condition="f_last_check_state = '{}'"
333
+ close-on-select clear-button></v-select>
334
+ </div>
335
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
336
+ <label class="font_normal_body">隐患情况</label>
337
+ <v-select
338
+ placeholder='隐患情况'
339
+ class="select select_list"
340
+
341
+ :value-single="true"
342
+ v-model='model.f_check_result'
343
+ :value.sync="model.f_check_result"
344
+ :options='$parent.$parent.f_check_results'
345
+ condition="f_last_check_result like '%{}%'"
346
+ close-on-select clear-button></v-select>
347
+ </div>
348
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
349
+ <label class="font_normal_body">气表类型</label>
350
+ <v-select class="select_list select"
351
+ placeholder='气表类型' style="width: 60%"
352
+ :value.sync="model.meter_classify" v-model="model.meter_classify"
353
+ :options='$parent.$parent.meter_classifys'
354
+ filer-key="name"
355
+ close-on-select clear-button
356
+ condition="F_METER_CLASSIFY='{}'"
357
+ :value-single="true">
358
+ </v-select>
359
+ </div>
360
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
361
+ <label class="font_normal_body">安装位置</label>
362
+ <v-select class="select_list select"
363
+ placeholder='安装位置' style="width: 60%"
364
+ :value.sync="model.f_position" v-model="model.f_position"
365
+ :options='$parent.$parent.positions'
366
+ filer-key="name"
367
+ close-on-select clear-button
368
+ condition="f_position='{}'"
369
+ :value-single="true">
370
+ </v-select>
371
+ </div>
372
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
373
+ <label class="font_normal_body">房屋类型</label>
374
+ <v-select class="select_list select"
375
+ placeholder='请选择' style="width: 60%"
376
+ :value.sync="model.f_house_type" v-model="model.f_house_type"
377
+ :options='$parent.$parent.housetype'
378
+ filer-key="name"
379
+ close-on-select clear-button
380
+ condition="f_house_type='{}'"
381
+ :value-single="true">
382
+ </v-select>
383
+ </div>
384
+ </div>
385
+ <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
386
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
387
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
388
+ <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
389
+ </right-tree>
390
+ </div>
391
+
392
+ </div>-->
393
+ </div>
394
+ </criteria>
395
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
396
+ <template partial='head'>
397
+ <tr>
398
+ <th>
399
+ <nobr>用户编号</nobr>
400
+ </th>
401
+ <th>
402
+ <nobr>用户名称</nobr>
403
+ </th>
404
+ <th>
405
+ <nobr>用户电话</nobr>
406
+ </th>
407
+ <th>
408
+ <nobr>用户表号</nobr>
409
+ </th>
410
+ <!-- <th>-->
411
+ <!-- <nobr>气表品牌</nobr>-->
412
+ <!-- </th>-->
413
+ <th>
414
+ <nobr>用户类型</nobr>
415
+ </th>
416
+ <!-- <th>-->
417
+ <!-- <nobr>壁挂炉</nobr>-->
418
+ <!-- </th>-->
419
+ <!-- <th>-->
420
+ <!-- <nobr>灶具</nobr>-->
421
+ <!-- </th>-->
422
+ <th>
423
+ <nobr>小区名称</nobr>
424
+ </th>
425
+ <th style="padding: 0 40px">
426
+ <nobr>地址</nobr>
427
+ </th>
428
+ <th>
429
+ <nobr>安检员</nobr>
430
+ </th>
431
+ <!-- <th>-->
432
+ <!-- <nobr>安检员备注</nobr>-->
433
+ <!-- </th>-->
434
+ <th>
435
+ <nobr>安检日期</nobr>
436
+ </th>
437
+ <th>
438
+ <nobr>安检状态</nobr>
439
+ </th>
440
+ <th>
441
+ <nobr>安检结果</nobr>
442
+ </th>
443
+ </tr>
444
+ </template>
445
+ <template partial='body'>
446
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
447
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
448
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
449
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_meternumber}}</td>
450
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_meter_brand}}</td>-->
451
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
452
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
453
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_haskitchen }}</td>-->
454
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
455
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
456
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
457
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
458
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
459
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
460
+ {{row.f_last_check_result }}
461
+ </td>
462
+ </template>
463
+ </data-grid>
464
+ </criteria-paged>
465
+ </div>
466
+ </template>
467
+
468
+ <script>
469
+ import {PagedList} from 'vue-client'
470
+ import {HttpResetClass} from 'vue-client'
471
+ import co from 'co'
472
+ import * as Util from './../Util'
473
+ import Vue from 'vue'
474
+
475
+ // let select = function * (self,userid) {
476
+ // let http = new HttpResetClass()
477
+ // let getGasman = yield http.load('POST','/rs/search', {
478
+ // source: 'this.getChildByName($安检员$).getUsers()',
479
+ // userid: userid
480
+ // }, {resolveMsg: null, rejectMsg: null})
481
+ // console.log('获取安检员', getGasman)
482
+ // getGasman.data.forEach((checker)=>{
483
+ // self.checkersid.push({label:checker.name,value:checker.id})
484
+ // })
485
+ // self.checkersid.push({label:'全部',value:''})
486
+ // }
487
+
488
+
489
+ export default {
490
+ title: '用户安检情况',
491
+ data() {
492
+ let options = []
493
+ let year = (new Date()).getFullYear()
494
+ for (let i = year; i <= year + 3; i++)
495
+ options.push({label: i + '', value: i + ''})
496
+ let moptions = []
497
+ for (let i = 1; i <= 12; i++)
498
+ moptions.push({label: i + '', value: i + ''})
499
+
500
+ return {
501
+ searchData: {
502
+ condition: '1=1',
503
+ orderitem: "f_userinfo_code",
504
+ timetype: "dd",
505
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '正常' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
506
+
507
+ },
508
+ excelHeaders: {
509
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
510
+
511
+ 'f_userinfo_code': '用户编号',
512
+ 'f_user_name': '用户名称',
513
+ 'f_user_phone': '用户电话',
514
+ 'f_meternumber': '用户表号',
515
+ 'f_user_type': '用户类型',
516
+ 'f_checker_name':'安检员',
517
+ // 'f_last_checker': '安检员',
518
+ 'f_residential_area': '小区名称',
519
+ 'f_address': '地址',
520
+ 'f_last_check_date': '安检日期',
521
+ 'f_last_check_state': '安检状态',
522
+ 'f_last_check_result': '安检结果'
523
+ },
524
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
525
+ orderitem: "'f_last_check_date'",
526
+ timetype: "'dd'",
527
+ f_defect_content: 'this.f_defect_content'
528
+ }),
529
+ f_defect_content:"CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
530
+ orgstrs: [{label: '全部', value: ''}],
531
+ checkersid: [],
532
+ SafeCheckXZ: '',
533
+ civil: '', //民用安检周期
534
+ civilian: '', //非民用安检周期
535
+ SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
536
+ SafeCheckSXs: [{label: '', value: ''}, {label: '', value: '否'}, {label: '全部', value: ''}],
537
+ // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
538
+ IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
539
+ IsShare: '否',
540
+ checker: {},
541
+ NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
542
+ criteriaShow: false,
543
+ checkers: [],
544
+ chosenOrg: {id: 0},
545
+ showModal: false,
546
+ checkedAll: false,
547
+ checkrows: [],
548
+ adjustables: [],
549
+ f_plan_year: year + '',
550
+ f_plan_month: moptions[new Date().getMonth()].value,
551
+ f_effective_start_time: '', //计划有效起始时间
552
+ f_effective_end_time: '', //计划有效结束时间
553
+ checkboxModel: {},
554
+ c_year_list: options,
555
+ c_month_list: moptions,
556
+ areas: this.areas(),
557
+ checkstatus: this.checkstatus(),
558
+ usertypes: this.usertypes(),
559
+ userstates: this.userstates(),
560
+ sqlname: '',
561
+ f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
562
+ creatPlanWay: '',
563
+ sliceArea: [],
564
+ cbcs:[],
565
+ cbc:[],
566
+ pcds:[],
567
+ housetype: [],
568
+ positions: [],
569
+ meter_classifys:[]//气表类型
570
+ }
571
+ },
572
+ props: {
573
+ style: {
574
+ type: String,
575
+ default: 'col-sm-2 form-group'
576
+ },
577
+ style2: {
578
+ type: String,
579
+ default: 'col-sm-4 form-group'
580
+ },
581
+ checkplan: { // 传入一条安检计划信息
582
+ type: Object
583
+ },
584
+ additemshow: {
585
+ type: Boolean,
586
+ default: false
587
+ }
588
+ },
589
+ ready() {
590
+ // 获取分公司信息
591
+ this.model.f_defect_content=this.f_defect_content
592
+ this.setConList()
593
+ //this.getfengongsi()
594
+ this.model.chosenOrg = {id: 0}
595
+ this.model.f_filialeids = this.$login.f.f_orgids
596
+ this.model.f_filiale = this.$login.f.f_fengongsi
597
+ this.model.f_OrgStr = this.$login.f.orgpathstr
598
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
599
+ this.getAllMeterBook(`('${this.$login.f.orgid}')`)
600
+ },
601
+ methods: {
602
+ setConList(){
603
+
604
+ this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
605
+ label: '全部',
606
+ value: ''
607
+ }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
608
+
609
+ this.positions=this.$appdata.getParam('安装位置') ? [{
610
+ label: '全部',
611
+ value: ''
612
+ }, ...this.$appdata.getParam('安装位置')] : [{label: '全部', value: ''}]
613
+ this.housetype=this.$appdata.getParam('房屋类型') ? [{
614
+ label: '全部',
615
+ value: ''
616
+ }, ...this.$appdata.getParam('房屋类型')] : [{label: '全部', value: ''}]
617
+ },
618
+ //获取省市区列表
619
+ getPcd(val){
620
+ this.pcds = [{label:'全部',value:''}]
621
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
622
+ {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
623
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
624
+ pcdlist.data.forEach((result)=>{
625
+ this.pcds.push({label:result.f_pcd,value:result.f_pcd})
626
+ })
627
+ })
628
+ },
629
+ getmeterbook(val){
630
+
631
+ console.log("进来111")
632
+ this.cbc=[]
633
+ this.cbc.push({
634
+ label:'全部',
635
+ value:''
636
+ })
637
+ if (val==''){
638
+
639
+ this.cbcs.forEach(res=>{
640
+ this.cbc.push({
641
+ label:res.f_book_name,
642
+ value:res.id
643
+ })
644
+ })
645
+ }else{
646
+ this.cbcs.forEach(res=>{
647
+ if (res.f_book_slice_area==val){
648
+ this.cbc.push({
649
+ label:res.f_book_name,
650
+ value:res.id
651
+ })
652
+ }
653
+ })
654
+ }
655
+ },
656
+ Mreadibook(val){
657
+ //console.log("999999999")
658
+ //console.log(val)
659
+ if (val){
660
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
661
+ items: 'name',
662
+ tablename: 't_zone',
663
+ condition: `parentid in ${val}`,
664
+ orderitem: 'id'
665
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
666
+ this.sliceArea=[]
667
+ this.sliceArea.push({
668
+ label:'全部',
669
+ value:''
670
+ })
671
+ res.data.forEach(ress=>{
672
+ this.sliceArea.push({
673
+ label:ress.name,
674
+ value:ress.name
675
+ })
676
+ })
677
+
678
+ })
679
+ }
680
+ },
681
+ // 获取县域分公司内容
682
+ getfengongsi() {
683
+ let val = {
684
+ source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
685
+ userid: `${this.$login.f.id}`
686
+ }
687
+ let http = new HttpResetClass()
688
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
689
+ res.data.forEach((item) => {
690
+ this.orgstrs.push({label: item.name, value: item.id})
691
+ })
692
+ console.log(this.orgstrs.length)
693
+ })
694
+ },
695
+ // 县域分公司发生改变
696
+ // orgstrchange(val){
697
+ // if(val == undefined || val == ''){
698
+ // return
699
+ // }else {
700
+ // this.checkersid = []
701
+ // let gen = select(this,val)
702
+ // return co(gen)
703
+ // }
704
+ // },
705
+ getDefect(val) {
706
+ if (val) {
707
+ try {
708
+ var defect = JSON.parse(val)
709
+ return defect.result
710
+ } catch (e) {
711
+ console.log(val)
712
+ return '正常'
713
+ }
714
+ }
715
+ return '正常'
716
+ },
717
+ checkerchange(val) {
718
+ this.checkboxModel.f_checker = val.name
719
+ this.checkboxModel.f_checker_id = val.id
720
+ },
721
+ search(args) {
722
+ if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
723
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
724
+ return
725
+ }
726
+ if (this.SafeCheckXZ == '未安检') {
727
+ args.condition += " and ( f_last_check_date >= '" + args.model.f_check_end + "' or f_last_check_date <= '" + args.model.f_check_start + "' or f_last_check_date is null)"
728
+ } else {
729
+ if (args.model.f_check_start) {
730
+ args.condition += " and f_last_check_date >= '" + args.model.f_check_start + "'"
731
+ }
732
+ if (args.model.f_check_end) {
733
+ args.condition += " and f_last_check_date <= '" + args.model.f_check_end + "'"
734
+ }
735
+ }
736
+ args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
737
+ let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
738
+ con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'`:''
739
+ con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
740
+ con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
741
+ con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
742
+ con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
743
+ if (this.SafeCheckXZ == '未安检') {
744
+ con += args.model.f_check_start ? ` and ( f_offsite_time < '${args.model.f_check_start}' or f_offsite_time > '${args.model.f_check_end}' )` : ''
745
+ } else {
746
+ con += args.model.f_check_start ? ` and f_offsite_time >= '${args.model.f_check_start}'` : ''
747
+ con += args.model.f_check_end ? ` and f_offsite_time <= '${args.model.f_check_end}'` : ''
748
+ }
749
+ con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
750
+ con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
751
+ let condition = {
752
+ condition1: args.condition,
753
+ condition2: con
754
+ }
755
+ console.log('查询参数', condition)
756
+ this.searchData.condition = condition
757
+ return this.model.search(condition, args.model)
758
+ },
759
+ checkstatus() {
760
+ return this.$appdata.getParam('安检状态') ? [{
761
+ label: '全部',
762
+ value: ''
763
+ }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
764
+ },
765
+ usertypes() {
766
+ return this.$appdata.getParam('用户类型') ? [{
767
+ label: '全部',
768
+ value: ''
769
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
770
+ },
771
+ userstates() {
772
+ return this.$appdata.getParam('用户状态') ? [{
773
+ label: '全部',
774
+ value: ''
775
+ }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
776
+ },
777
+ hiddenr() {
778
+ this.$parent.showItem = !this.$parent.showItem
779
+ },
780
+ hidden() {
781
+ this.criteriaShow = !this.criteriaShow
782
+ },
783
+ confirm() {
784
+ if (!this.checkboxModel.f_plan_name) {
785
+ this.$showMessage('请填写安检计划名称!')
786
+ return
787
+ }
788
+ // if(this.f_effective_start_time == ''){
789
+ // this.$showMessage('请选择有效起始日期!')
790
+ // return
791
+ // }
792
+ // if(this.f_effective_end_time == ''){
793
+ // this.$showMessage('请选择有效结束日期!')
794
+ // return
795
+ // }
796
+ if (this.IsShare == '否') {
797
+ if (!this.checkboxModel.f_checker_id) {
798
+ this.$showMessage('请选择安检员!')
799
+ return
800
+ }
801
+ }
802
+ let gen = saveGen(this)
803
+ return co(gen)
804
+ },
805
+ changeStates() {
806
+ if (this.checkedAll) {//实现反选/
807
+ this.checkrows = [];
808
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
809
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
810
+ }
811
+ } else {//实现全选
812
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
813
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
814
+ }
815
+ let _this = this
816
+ let condition = this.$refs.paged.$refs.criteria.condition
817
+ let url = this.model.url
818
+ this.$resetpost(`${url}?pageSize=9999999`, {
819
+ data: {
820
+ condition: condition,
821
+ groupitem: '',
822
+ orderitem: 'f_residential_area',
823
+ f_usertype: this.model.f_usertype,
824
+ f_filialeids: this.model.f_filialeids,
825
+ month: this.model.month,
826
+ safeCycle: this.model.safeCycle,
827
+ f_checktime_start: this.model.f_checktime_start,
828
+ f_checktime_end: this.model.f_checktime_end,
829
+ SafeCheckSX: this.model.SafeCheckSX,
830
+ f_last_check_state: this.model.f_last_check_state
831
+ },
832
+ }, {resolveMsg: null, rejectMsg: null}, -1).then(
833
+ (respanse) => {
834
+ if (respanse.data.length >= 5000) {
835
+ this.$showMessage("数据量太大,请重新选择")
836
+ } else {
837
+ _this.checkrows = []
838
+ for (let j = 0; j < respanse.data.length; j++) {
839
+ _this.checkrows.push(respanse.data[j])
840
+ }
841
+ console.log(_this.checkrows);
842
+ }
843
+ })
844
+ }
845
+ },
846
+ addChecked(item) {
847
+ console.log(item);
848
+ if (!item.checked) {
849
+ this.checkrows.push(item);
850
+ console.log(this.checkrows);
851
+ } else {
852
+ for (let i = 0; i < this.checkrows.length; i++) {
853
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
854
+ this.checkrows.splice(i, 1)
855
+ }
856
+ }
857
+ }
858
+ },
859
+ ToshowModal() {
860
+ this.creatPlanWay = 'single'
861
+ if (this.checkrows.length > 0) {
862
+ this.showModal = true
863
+ } else {
864
+ this.$showMessage("请选择需要安检的用户!")
865
+ }
866
+ },
867
+ FiltrationPlan() {
868
+ if (this.model.rows.length == 0) {
869
+ this.$showMessage("暂无可生成的计划!")
870
+ return
871
+ }
872
+ this.creatPlanWay = 'filtration'
873
+ this.showModal = true
874
+ },
875
+ AllPlan() {
876
+ if (this.model.rows.length == 0) {
877
+ this.$showMessage("暂无可生成的计划!")
878
+ return
879
+ }
880
+ this.creatPlanWay = 'all'
881
+ this.showModal = true
882
+ },
883
+ cancel() {
884
+ this.showModal = false
885
+ },
886
+ areas() {
887
+ let rs = []
888
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
889
+ let temp = {
890
+ label: this.$login.f.f_allArea[i].label,
891
+ value: this.$login.f.f_allArea[i].label
892
+ }
893
+ rs.push(temp)
894
+ }
895
+ return [{label: '全部', value: ''}, ...rs]
896
+ },
897
+ initAdjustables() {
898
+ console.log('初始化调压箱', this.$GetSaleParam)
899
+ let arr = []
900
+ let filter = this.$login.f.f_orgids
901
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
902
+ let temp = {}
903
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
904
+ temp.value = `${item.value.id}`
905
+ arr.push(temp)
906
+ })
907
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
908
+ },
909
+ getAllMeterBook(val){
910
+ //console.log("999999999")
911
+ //console.log(val)
912
+ this.cbcs=[]
913
+ if (val){
914
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
915
+ items: 'f_book_name,f_book_slice_area,id',
916
+ tablename: 't_meter_book',
917
+ condition: `f_filiale_id in ${val}`,
918
+ orderitem: 'id'
919
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
920
+ res.data.forEach(ress=>{
921
+ this.cbcs.push({
922
+ id:ress.id,
923
+ f_book_name:ress.f_book_name,
924
+ f_book_slice_area:ress.f_book_slice_area
925
+ })
926
+ })
927
+ this.cbc=[]
928
+ this.cbc.push({
929
+ label:'全部',
930
+ value:''
931
+ })
932
+ this.cbcs.forEach(res=>{
933
+ this.cbc.push({
934
+ label:res.f_book_name,
935
+ value:res.id
936
+ })
937
+ })
938
+ })
939
+ }
940
+ },
941
+ getRes(obj) {
942
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
943
+ this.Mreadibook(this.model.f_filialeids)
944
+ this.getAllMeterBook(this.model.f_filialeids)
945
+ this.getPcd(this.model.f_filialeids)
946
+ }
947
+ },
948
+
949
+ watch: {
950
+ 'model.f_usertype'(val) {
951
+ if (val == '民用') {
952
+ this.model.safeCycle = this.civil
953
+ } else if (val == '非民用') {
954
+ this.model.safeCycle = this.civilian
955
+ }
956
+ },
957
+ 'model.SafeCheckXZ'(val) {
958
+ this.model.SafeCheckSC = ''
959
+ if (val == '已安检') {
960
+ this.model.SafeCheckCQ = ''
961
+ this.model.SafeCheckSX = {
962
+ f_check_end: '', // 安检时间 查询起始条件
963
+ f_check_start: ''// 安检时间 查询终止条件
964
+ }
965
+ } else {
966
+ // 当使用筛选条件时,清空不需要的条件选项
967
+ this.model.f_issue_start = ''
968
+ this.model.f_issue_end = ''
969
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
970
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
971
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
972
+ this.model.month = ''
973
+ if (val == '应安检') {
974
+ this.model.SafeCheckSC = '否'
975
+
976
+ this.model.f_issue_start = Util.toStartDateString()
977
+ this.model.f_issue_end = Util.toStandardDateString()
978
+ }
979
+ // this.model.f_checktime_start = ''
980
+ // this.model.f_checktime_end = ''
981
+ }
982
+ },
983
+ 'model.SafeCheckSC'(val) {
984
+ if (val == '') {
985
+ this.model.f_issue_start = ''
986
+ this.model.f_issue_end = ''
987
+ }
988
+ },
989
+ // 'checker'(val){
990
+ // console.log("checker",this.checker)
991
+ // if(val){
992
+ // this.checkboxModel.f_checker = this.checker[0].name
993
+ // this.checkboxModel.f_checker_id = this.checker[0].id
994
+ // }
995
+ // },
996
+ 'model.rows'() {
997
+ // if (!this.checkedAll) {//实现反选/
998
+ // this.checkrows = [];
999
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1000
+ var k = false
1001
+ for (let j = 0; j < this.checkrows.length; j++) {
1002
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1003
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1004
+ k = true
1005
+ continue
1006
+ }
1007
+ }
1008
+ if (!k) {
1009
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1010
+ }
1011
+ }
1012
+ // } else {//实现全选
1013
+ // // this.checkboxModel = {};
1014
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1015
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1016
+ // }
1017
+ // }
1018
+ }
1019
+ },
1020
+ computed: {
1021
+ selected() {
1022
+ return this.$refs.paged.$refs.grid.selected
1023
+ }
1024
+ }
1025
+ }
1026
+ </script>
1027
+ <style scoped>
1028
+ .newcolor {
1029
+ color: red;
1030
+ }
1031
+
1032
+ .table th {
1033
+ background-color: #f2f6fa;
1034
+ color: black;
1035
+ }
1036
+ </style>