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