manage-client 3.2.102 → 3.2.103

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.
@@ -1,506 +1,547 @@
1
- <template>
2
- <div class="flex-row" v-if="!showdetail">
3
- <div id='app1' class="basic-main" v-show="(!echarts)&&(!isActiveTotalForm)">
4
- <criteria-paged :model="model" :pager='true' v-ref:paged>
5
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="col-sm-2 form-group">
9
- <label style="width:35%" class="font_normal_body">客户编号</label>
10
- <input style="width:60%" type="text" class="input_search"
11
- v-model="model.f_userinfo_code"
12
- placeholder='客户编号'
13
- @keyup.enter="search"
14
- condition="f_userinfo_code like '%{}%'"
15
- v-el:xq v-next-el='f_userinfo_code'
16
- v-el:username>
17
- </div>
18
- <div class="col-sm-2 form-group">
19
- <label style="width:35%" class="font_normal_body">客户名称</label>
20
- <input style="width:60%" type="text" class="input_search"
21
- v-model="model.username"
22
- @keyup.enter="search"
23
- placeholder='客户名称'
24
- condition="username like '%{}%'"
25
- v-el:xq v-next-el='username'
26
- v-el:username>
27
- </div>
28
- <div class="col-sm-2 form-group">
29
- <label style="width:35%" class="font_normal_body">客户地址</label>
30
- <input style="width:60%" type="text" class="input_search"
31
- v-model="model.address" placeholder='地址'
32
- condition="address like '%{}%'"
33
- @keyup.enter="search"
34
- v-el:xq v-next-el='address' v-el:area
35
- >
36
- </div>
37
- <div class="col-sm-2 form-group">
38
- <label style="width:35%" class="font_normal_body">&nbsp;&nbsp;&nbsp;表号&nbsp;&nbsp;&nbsp;</label>
39
- <input style="width:60%" type="text" class="input_search"
40
- v-model="model.f_meternumber" placeholder='表号'
41
- @keyup.enter="search"
42
- condition="f_meternumber like '%{}%'"
43
- v-next-el='meternumber' v-el:meternumber>
44
- </div>
45
- <div style="float:right">
46
- <button class="button_search button_spacing" @click="search()">查询</button>
47
- <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
48
- <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
49
- :field="$parent.$parent.getfield"
50
- sqlurl="rs/logic/exportfile" sql-name="DrillErrorByUserinfo" template-name='异常分析'
51
- :choose-col="true"></export-excel>
52
- <!--<button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()">显示汇总</button>-->
53
- <!-- <button class="button_search button_spacing" @click="$parent.$parent.showEcharts()">显示图表</button>-->
54
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
55
- </div>
56
- </div>
57
- <div class="row" v-show="$parent.$parent.criteriaShow">
58
- <div class="col-sm-2 form-group">
59
- <label style="width:35%" class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
60
- <right-tree @re-res="$parent.$parent.getorg"
61
- :initresid='$parent.$parent.org'></right-tree>
62
- </div>
63
- <div class="col-sm-2 form-group">
64
- <label style="width:35%" class="font_normal_body">余额&nbsp;&nbsp;大于</label>
65
- <input style="width:60%" type="number" class="input_search"
66
- v-model="model.f_balance_amount_sta" placeholder='账户余额'
67
- condition="f_balance_amount>{}"
68
- @keyup.enter="search"
69
- v-el:xq v-next-el='f_day' v-el:area
70
- >
71
- </div>
72
- <div class="col-sm-2 form-group">
73
- <label style="width:35%" class="font_normal_body">小于</label>
74
- <input style="width:60%" type="number" class="input_search"
75
- v-model="model.f_balance_amount_end" placeholder='账户余额'
76
- condition="f_balance_amount < {}"
77
- @keyup.enter="search"
78
- v-el:xq v-next-el='f_day' v-el:area
79
- >
80
- </div>
81
- <div class="col-sm-2 form-group">
82
- <label style="width:35%" class="font_normal_body">气表品牌</label>
83
- <v-select :value.sync="model.f_balance_amount"
84
- v-model="model.f_meter_brand"
85
- :options='$parent.$parent.meterbrands' placeholder='请选择'
86
- condition="f_meter_brand = '{}'"
87
- close-on-select></v-select>
88
- </div>
89
- <div class="col-sm-2 form-group">
90
- <label style="width:35%" class="font_normal_body">上报区间</label>
91
- <datepicker style="width:60%" id="startdate" placeholder="开始时间"
92
- v-model="model.startDate"
93
- :value.sync="model.startDate"
94
- :disabled-days-of-Week="[]"
95
- :format="'yyyy-MM-dd HH:mm:ss'"
96
- condition="f_insert_date >= '{}'"
97
- :show-reset-button="reset">
98
- </datepicker>
99
- </div>
100
- <div class="col-sm-2 form-group">
101
- <label style="width:35%" class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
102
- <datepicker style="width:60%" id="enddate" placeholder="结束日期"
103
- v-model="model.endDate"
104
- :value.sync="model.endDate"
105
- :format="'yyyy-MM-dd HH:mm:ss'"
106
- :disabled-days-of-Week="[]"
107
- condition="f_insert_date <= '{}'"
108
- :show-reset-button="reset">
109
- </datepicker>
110
- </div>
111
- <div class="col-sm-2 form-group">
112
- <label style="width:35%" class="font_normal_body">未抄表天数&nbsp;></label>
113
- <input style="width:60%" type="number" class="input_search"
114
- v-model="model.f_day" placeholder='未抄表天数'
115
- condition="DateDiff(dd,f_hand_date,getdate())>{}"
116
- @keyup.enter="search"
117
- v-el:xq v-next-el='f_day' v-el:area
118
- >
119
- </div>
120
- <div class="col-sm-2 form-group">
121
- <label style="width:35%" class="font_normal_body">电池电量&nbsp;&nbsp;大于</label>
122
- <input style="width:60%" type="number" class="input_search"
123
- v-model="model.f_batterylevel_sta" placeholder='电池电量'
124
- condition="f_batterylevel>{}"
125
- @keyup.enter="search"
126
- v-el:xq v-next-el='f_day' v-el:area
127
- >
128
- </div>
129
- <div class="col-sm-2 form-group">
130
- <label style="width:35%" class="font_normal_body">小于</label>
131
- <input style="width:60%" type="number" class="input_search"
132
- v-model="model.f_batterylevel_end" placeholder='电池电量'
133
- condition="f_batterylevel < {}"
134
- @keyup.enter="search"
135
- v-el:xq v-next-el='f_day' v-el:area
136
- >
137
- </div>
138
-
139
-
140
- </div>
141
- </div>
142
- </criteria>
143
- <data-grid id="lostuserlist" :model="model" class="list_area table_sy" partial='list' v-ref:grid>
144
- <template partial='head'>
145
- <tr>
146
- <th style="text-align:center">
147
- <nobr>序号</nobr>
148
- </th>
149
- <th style="text-align:center">
150
- <nobr>客户编号</nobr>
151
- </th>
152
- <th style="text-align:center">
153
- <nobr>客户名称</nobr>
154
- </th>
155
- <th style="text-align:center">
156
- <nobr>小区</nobr>
157
- </th>
158
- <th style="text-align:center">
159
- <nobr>客户地址</nobr>
160
- </th>
161
- <th style="text-align:center">
162
- <nobr>账户余额</nobr>
163
- </th>
164
- <th style="text-align:center">
165
- <nobr>联系电话</nobr>
166
- </th>
167
- <th style="text-align:center">
168
- <nobr>表号</nobr>
169
- </th>
170
- <th style="text-align:center">
171
- <nobr>气表品牌</nobr>
172
- </th>
173
- <th style="text-align:center">
174
- <nobr>抄表日期</nobr>
175
- </th>
176
- <th style="text-align:center">
177
- <nobr>最后一次通讯时间</nobr>
178
- </th>
179
- <th style="text-align:center">
180
- <nobr>电池电压</nobr>
181
- </th>
182
- <th style="text-align:center">
183
- <nobr>信号强度</nobr>
184
- </th>
185
- <th style="text-align:center">
186
- <nobr>磁干扰异常</nobr>
187
- </th>
188
- <th style="text-align:center">
189
- <nobr>阀门状态</nobr>
190
- </th>
191
- <th style="text-align:center">
192
- <nobr>分公司</nobr>
193
- </th>
194
-
195
- </tr>
196
-
197
- </template>
198
- <template partial='body'>
199
- <td style="text-align:center">
200
- <nobr>{{$index+1}}</nobr>
201
- </td>
202
- <td style="text-align: center;"><nobr>
203
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
204
- </nobr> </td>
205
- <td style="text-align:center"><nobr>{{row.username}}</nobr></td>
206
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
207
- <td>
208
- <nobr>{{row.address}}</nobr>
209
- </td>
210
- <td style="text-align:center">{{row.f_balance_amount}}</td>
211
- <td style="text-align:center">{{row.f_user_phone}}</td>
212
- <td style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></td>
213
- <td style="text-align:center">
214
- <nobr>{{row.f_meter_brand}}</nobr>
215
- </td>
216
- <td style="text-align:center">
217
- <nobr>{{row.f_hand_date}}</nobr>
218
- </td>
219
- <td style="text-align:center">
220
- <nobr>{{row.f_insert_date}}</nobr>
221
- </td>
222
- <td style="text-align:center">
223
- <nobr>{{row.f_batterylevel}}</nobr>
224
- </td>
225
- <td style="text-align:center">
226
- <nobr>{{row.f_signal}}</nobr>
227
- </td>
228
- <td style="text-align:center">
229
- <nobr>{{row.f_magneticInterference == 1 ? '异常' : '正常'}}</nobr>
230
- </td>
231
- <td style="text-align:center">
232
- <nobr>{{row.f_valvestate == 0 ? '开阀' : '关阀'}}</nobr>
233
- </td>
234
- <td style="text-align:center">
235
- <nobr>{{row.f_orgname}}</nobr>
236
- </td>
237
- </template>
238
- </data-grid>
239
- </criteria-paged>
240
- </div>
241
- <!--<div style="height: 40px;width: 100%;" v-show="echarts">
242
- <div style="display: inline-block;width: 20%;">
243
- <button class="button_search button_spacing" v-show="echarts" @click="notShowEcharts()">隐藏图表</button>
244
- <button class="button_search button_spacing" v-show="isActiveTotalForm" @click="notShowTotalForm()">隐藏汇总</button>
245
- </div>
246
- &lt;!&ndash;图显示模板&ndash;&gt;
247
- <div class="mystyle" style="display: inline-block;" >
248
- <label class="font_normal_body">图表统计项</label>
249
- <v-select style="width:60%" id="groupname" v-model="groupname"
250
- placeholder='分组项'
251
- value-single="true"
252
- :value.sync="groupname"
253
- :options='getgroupname'
254
- close-on-select></v-select>
255
- </div>
256
- </div>
257
- <div v-show="echarts" style="width: 100%;height: 90%;">
258
- <new-exception-echarts :condition="condition" :startdate="startDate" :groupname="groupname[0]"
259
- :enddate="endDate" :echarts="echarts"></new-exception-echarts>
260
- </div>
261
- <div v-show="isActiveTotalForm" style="width: 100%;height: 90%;">
262
- <new-exception-eform-total :condition="condition" :startdate="startDate"
263
- :enddate="endDate"></new-exception-eform-total>
264
- </div>-->
265
- </div>
266
- <div class="flex" v-if="showdetail">
267
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
268
- </div>
269
- </template>
270
-
271
- <script>
272
- import {HttpResetClass, PagedList} from 'vue-client'
273
- import * as Util from '../../../../Util'
274
- import getLodop from '../../../../plugins/LodopFuncs'
275
- import plugin from 'system-clients/src/plugins/GetLoginInfoService'
276
-
277
- let readySomething = async function (self) {
278
- await self.$MagLoadParams.loadParam()
279
- self.initParams()
280
- }
281
- export default {
282
- title: '异常查看',
283
- props: ['data'],
284
- data() {
285
- return {
286
- model: new PagedList('rs/sql/getExceptionList', 20),
287
- reportStr: null,
288
- show: false,
289
- startDate: '',
290
- endDate: '',
291
- meterbrands: [],
292
- f_error_type:'',
293
- groupname: ['year'],
294
- getgroupname: [
295
- {label: '年份', value: 'year'},
296
- {label: '月份', value: 'month'},
297
- {label: '周', value: 'week'},
298
- {label: '日', value: 'day'}
299
- ],
300
- getfield:{
301
- "f_userinfo_code":"客户编号", "f_user_name":"客户名称", "f_address":"客户地址","f_user_type":"客户类型","f_gasproperties":"用气性质",
302
- "f_meternumber":"表号","f_meter_brand":"气表品牌","f_insert_date":"上报时间","f_error_level":"异常级别","f_error_type":"异常类型",
303
- "f_error_msg":"异常描述","f_orgname":"组织机构"
304
- },
305
- outlets: [],
306
- operator: [],
307
- showdetail:false,
308
- rowdata:{},
309
- filename: '',
310
- criteriaShow: false,
311
- echarts: false,
312
- searchshow: false,
313
- isActiveTotalForm: false,
314
- GetErrorLevel:[],
315
- GetErrorType:[],
316
- condition: '1=1',
317
- org:[this.$login.f.orgid],
318
- orgCondtionStr: ` and f_orgid = ${this.$login.f.orgid}`
319
- }
320
- },
321
- ready() {
322
- readySomething(this)
323
- this.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
324
- this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
325
- // console.log("type:"+this.$refs.paged.$refs.cri.model.f_error_type)
326
- this.getErrorInfo('f_error_level')
327
- // console.log("type:"+this.$refs.paged.$refs.cri.model.f_error_type)
328
- this.$refs.paged.$refs.cri.search()
329
-
330
- },
331
- methods: {
332
- showmsg(obj){
333
- this.rowdata=obj
334
- this.showdetail=true
335
- },
336
- cancel() {
337
- this.showdetail = false
338
- },
339
- getorg(obj) {
340
- if (obj.resids.length>0) {
341
- this.orgCondtionStr = " and f_orgid in " + plugin.convertToIn(obj.resids)
342
- }else
343
- {
344
- this.orgCondtionStr = " and f_orgid = " + this.$login.f.orgid
345
- }
346
- },
347
- initParams () {
348
- let arr = []
349
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
350
- let temp = {}
351
- if(item.value.f_meter_type==='物联网表'){
352
- temp.label = item.label
353
- temp.value = item.value.f_meter_brand
354
- arr.push(temp )
355
- }
356
-
357
- })
358
- this.meterbrands = [{label: '全部', value: ''}, ...arr]
359
- },
360
- hidden(){
361
- this.criteriaShow = !this.criteriaShow
362
- },
363
- clickshow() {
364
- this.searchshow = !this.searchshow
365
- },
366
- getErrorInfo(items){
367
- let self = this
368
- let f_error_level=''
369
- if (items!='f_error_level') {
370
- if(this.$refs.paged.$refs.cri.model.f_error_level){
371
- f_error_level=this.$refs.paged.$refs.cri.model.f_error_level[0]
372
- }
373
- }
374
- let load = new HttpResetClass()
375
- load.load('POST', 'rs/sql/singleTableParam', {
376
- data: {
377
- items:items+' f_type',
378
- tablename:'t_exception',
379
- condition:items=='f_error_level'?'1=1 group by '+items:`f_error_level='${f_error_level}' group by `+items
380
- }
381
- },{warnMsg:null,resolveMsg:null}).then((res) => {
382
- let i = 0
383
- let rows=res.data
384
- let array1=[]
385
- array1.push({label: '全部', value: ''})
386
- console.log("rows========",rows)
387
- for (i = 0; i < rows.length; i++) {
388
- let dr = {label: '全部', value: ''}
389
- dr.label=rows[i].f_type
390
- dr.value=rows[i].f_type
391
- array1.push(dr)
392
- console.log("rows[i]========",rows[i],dr)
393
- }
394
- console.log("array1========",array1)
395
- if (items=='f_error_level'){
396
- self.GetErrorLevel=array1
397
- }else {
398
- self.GetErrorType=array1
399
- }
400
- })
401
-
402
- },
403
- search(args) {
404
- this.startDate = this.$refs.paged.$refs.cri.model.startDate
405
- this.endDate = this.$refs.paged.$refs.cri.model.endDate
406
- this.f_error_type=this.$refs.paged.$refs.cri.model.f_error_type
407
- console.log('1231321312312321')
408
- /* if (this.endDate == '' || this.startDate == '') {
409
- return this.$showMessage("时间区间的开始和结束时间不能为空!")
410
- }*/
411
- this.condition = this.$refs.paged.$refs.cri.condition + this.orgCondtionStr
412
-
413
- args.condition = this.condition
414
- this.model.search(args.condition, args.model)
415
- },
416
- SaveAsFile(str) {
417
- this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
418
- if (res === 'confirm') {
419
- let style = '<style>' +
420
- 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
421
- let strHtml = style + document.getElementById(str).innerHTML;
422
- console.log(strHtml);
423
- let LODOP = getLodop();
424
- LODOP.PRINT_INIT('');
425
- LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
426
- LODOP.SAVE_TO_FILE('异常分析(表统计).xls')
427
- }
428
- })
429
- },
430
- clearmsg() {
431
- this.$refs.paged.$refs.cri.model = {}
432
- },
433
- close() {
434
- this.show = false
435
- },
436
- // 显示柱状图
437
- showEcharts() {
438
- this.echarts = true
439
- this.isActiveTotalForm = false
440
- },
441
- notShowTotalForm() {
442
- this.echarts = false
443
- this.isActiveTotalForm = false
444
- },
445
- // 不显示柱状图
446
- notShowEcharts() {
447
- this.echarts = false
448
- this.isActiveTotalForm = false
449
- },
450
- // 显示汇总数据表格
451
- showTotalForm() {
452
- this.echarts = false
453
- this.isActiveTotalForm = true
454
- }
455
- },
456
- watch: {
457
- 'data'(val) {
458
- if (val.f_files_path) {
459
- this.getFileContent(val.f_files_path)
460
- } else {
461
- this.reportStr = null
462
- }
463
- }
464
- },
465
- computed: {
466
- // usertypes () {
467
- // return this.$appdate.getParams("客户类型")
468
- // },
469
- getCondition() {
470
- let condition=this.$refs.paged.$refs.cri.condition + this.orgCondtionStr
471
- return {
472
- condition: condition ,
473
- startDate:`${this.$refs.paged.$refs.cri.model.startDate}`,
474
- endDate:`${this.$refs.paged.$refs.cri.model.endDate}`
475
- }
476
-
477
- },
478
- usertypes() {
479
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
480
- },
481
- Gasproperties() {
482
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
483
- }
484
-
485
- }
486
- }
487
- </script>
488
- <style>
489
- .form-input-group label {
490
- text-align: right;
491
- width: auto;
492
- }
493
-
494
- .mystyle {
495
- float: right;
496
- padding-right: 10%;
497
- }
498
-
499
- .datapanel {
500
- color: #333;
501
- background-color: white;
502
- box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
503
- padding: 10px 30px 10px 30px;
504
- border-radius: 15px;
505
- }
506
- </style>
1
+ <template>
2
+ <div class="flex-row" v-if="!showdetail">
3
+ <div id='app1' class="basic-main" v-show="(!echarts)&&(!isActiveTotalForm)">
4
+ <criteria-paged :model="model" :pager='true' v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="col-sm-2 form-group">
9
+ <label style="width:35%" class="font_normal_body">客户编号</label>
10
+ <input style="width:60%" type="text" class="input_search"
11
+ v-model="model.f_userinfo_code"
12
+ placeholder='客户编号'
13
+ @keyup.enter="search"
14
+ condition="f_userinfo_code like '%{}%'"
15
+ v-el:xq v-next-el='f_userinfo_code'
16
+ v-el:username>
17
+ </div>
18
+ <div class="col-sm-2 form-group">
19
+ <label style="width:35%" class="font_normal_body">客户名称</label>
20
+ <input style="width:60%" type="text" class="input_search"
21
+ v-model="model.username"
22
+ @keyup.enter="search"
23
+ placeholder='客户名称'
24
+ condition="username like '%{}%'"
25
+ v-el:xq v-next-el='username'
26
+ v-el:username>
27
+ </div>
28
+ <div class="col-sm-2 form-group">
29
+ <label style="width:35%" class="font_normal_body">客户地址</label>
30
+ <input style="width:60%" type="text" class="input_search"
31
+ v-model="model.address" placeholder='地址'
32
+ condition="address like '%{}%'"
33
+ @keyup.enter="search"
34
+ v-el:xq v-next-el='address' v-el:area
35
+ >
36
+ </div>
37
+ <div class="col-sm-2 form-group">
38
+ <label style="width:35%" class="font_normal_body">&nbsp;&nbsp;&nbsp;表号&nbsp;&nbsp;&nbsp;</label>
39
+ <input style="width:60%" type="text" class="input_search"
40
+ v-model="model.f_meternumber" placeholder='表号'
41
+ @keyup.enter="search"
42
+ condition="f_meternumber like '%{}%'"
43
+ v-next-el='meternumber' v-el:meternumber>
44
+ </div>
45
+ <div style="float:right">
46
+ <button class="button_search button_spacing" @click="search()">查询</button>
47
+ <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
48
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
49
+ :field="$parent.$parent.getfield"
50
+ sqlurl="rs/logic/exportfile" sql-name="DrillErrorByUserinfo" template-name='异常分析'
51
+ :choose-col="true"></export-excel>
52
+ <!--<button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()">显示汇总</button>-->
53
+ <!-- <button class="button_search button_spacing" @click="$parent.$parent.showEcharts()">显示图表</button>-->
54
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
55
+ </div>
56
+ </div>
57
+ <div class="row" v-show="$parent.$parent.criteriaShow">
58
+ <div class="col-sm-2 form-group">
59
+ <label style="width:35%" class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
60
+ <right-tree @re-res="$parent.$parent.getorg"
61
+ :initresid='$parent.$parent.org'></right-tree>
62
+ </div>
63
+ <div class="col-sm-2 form-group">
64
+ <label style="width:35%" class="font_normal_body">余额&nbsp;&nbsp;大于</label>
65
+ <input style="width:60%" type="number" class="input_search"
66
+ v-model="model.f_balance_amount_sta" placeholder='账户余额'
67
+ condition="f_balance_amount>{}"
68
+ @keyup.enter="search"
69
+ v-el:xq v-next-el='f_day' v-el:area
70
+ >
71
+ </div>
72
+ <div class="col-sm-2 form-group">
73
+ <label style="width:35%" class="font_normal_body">小于</label>
74
+ <input style="width:60%" type="number" class="input_search"
75
+ v-model="model.f_balance_amount_end" placeholder='账户余额'
76
+ condition="f_balance_amount < {}"
77
+ @keyup.enter="search"
78
+ v-el:xq v-next-el='f_day' v-el:area
79
+ >
80
+ </div>
81
+ <div class="col-sm-2 form-group">
82
+ <label style="width:35%" class="font_normal_body">气表品牌</label>
83
+ <v-select :value.sync="model.f_balance_amount"
84
+ v-model="model.f_meter_brand"
85
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
86
+ condition="f_meter_brand = '{}'"
87
+ close-on-select></v-select>
88
+ </div>
89
+ <div class="col-sm-2 form-group">
90
+ <label style="width:35%" class="font_normal_body">上报区间</label>
91
+ <datepicker style="width:60%" id="startdate" placeholder="开始时间"
92
+ v-model="model.startDate"
93
+ :value.sync="model.startDate"
94
+ :disabled-days-of-Week="[]"
95
+ :format="'yyyy-MM-dd HH:mm:ss'"
96
+ condition="f_insert_date >= '{}'"
97
+ :show-reset-button="reset">
98
+ </datepicker>
99
+ </div>
100
+ <div class="col-sm-2 form-group">
101
+ <label style="width:35%" class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
102
+ <datepicker style="width:60%" id="enddate" placeholder="结束日期"
103
+ v-model="model.endDate"
104
+ :value.sync="model.endDate"
105
+ :format="'yyyy-MM-dd HH:mm:ss'"
106
+ :disabled-days-of-Week="[]"
107
+ condition="f_insert_date <= '{}'"
108
+ :show-reset-button="reset">
109
+ </datepicker>
110
+ </div>
111
+ <div class="col-sm-2 form-group">
112
+ <label style="width:35%" class="font_normal_body">未抄表天数&nbsp;></label>
113
+ <input style="width:60%" type="number" class="input_search"
114
+ v-model="model.f_day" placeholder='未抄表天数'
115
+ condition="DateDiff(dd,f_hand_date,getdate())>{}"
116
+ @keyup.enter="search"
117
+ v-el:xq v-next-el='f_day' v-el:area
118
+ >
119
+ </div>
120
+ <div class="col-sm-2 form-group">
121
+ <label style="width:35%" class="font_normal_body">电池电量大于</label>
122
+ <input style="width:60%" type="number" class="input_search"
123
+ v-model="model.f_electricity_sta" placeholder='电池电量'
124
+ condition="f_electricity>{}"
125
+ @keyup.enter="search"
126
+ v-el:xq v-next-el='f_day' v-el:area
127
+ >
128
+ </div>
129
+ <div class="col-sm-2 form-group">
130
+ <label style="width:35%" class="font_normal_body">小于</label>
131
+ <input style="width:60%" type="number" class="input_search"
132
+ v-model="model.f_electricity_end" placeholder='电池电量'
133
+ condition="f_electricity < {}"
134
+ @keyup.enter="search"
135
+ v-el:xq v-next-el='f_day' v-el:area
136
+ >
137
+ </div>
138
+ <div class="col-sm-2 form-group">
139
+ <label style="width:35%" class="font_normal_body">电池电压大于</label>
140
+ <input style="width:60%" type="number" class="input_search"
141
+ v-model="model.f_batterylevel_sta" placeholder='电池电压'
142
+ condition="f_batterylevel>{}"
143
+ @keyup.enter="search"
144
+ v-el:xq v-next-el='f_day' v-el:area
145
+ >
146
+ </div>
147
+ <div class="col-sm-2 form-group">
148
+ <label style="width:35%" class="font_normal_body">小于</label>
149
+ <input style="width:60%" type="number" class="input_search"
150
+ v-model="model.f_batterylevel_end" placeholder='电池电压'
151
+ condition="f_batterylevel < {}"
152
+ @keyup.enter="search"
153
+ v-el:xq v-next-el='f_day' v-el:area
154
+ >
155
+ </div>
156
+ <div class="col-sm-2 form-group">
157
+ <label style="width:35%" class="font_normal_body">异常状态</label>
158
+ <v-select v-model="model.f_meter_state"
159
+ placeholder="异常状态"
160
+ :value.sync="model.f_meter_state"
161
+ :options='$parent.$parent.abnormalstatus'
162
+ condition="m.f_meter_state = '{}'"
163
+ close-on-select >
164
+ </v-select>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </criteria>
169
+ <data-grid id="lostuserlist" :model="model" class="list_area table_sy" partial='list' v-ref:grid>
170
+ <template partial='head'>
171
+ <tr>
172
+ <th style="text-align:center">
173
+ <nobr>序号</nobr>
174
+ </th>
175
+ <th style="text-align:center">
176
+ <nobr>客户编号</nobr>
177
+ </th>
178
+ <th style="text-align:center">
179
+ <nobr>客户名称</nobr>
180
+ </th>
181
+ <th style="text-align:center">
182
+ <nobr>小区</nobr>
183
+ </th>
184
+ <th style="text-align:center">
185
+ <nobr>客户地址</nobr>
186
+ </th>
187
+ <th style="text-align:center">
188
+ <nobr>账户余额</nobr>
189
+ </th>
190
+ <th style="text-align:center">
191
+ <nobr>联系电话</nobr>
192
+ </th>
193
+ <th style="text-align:center">
194
+ <nobr>表号</nobr>
195
+ </th>
196
+ <th style="text-align:center">
197
+ <nobr>气表品牌</nobr>
198
+ </th>
199
+ <th style="text-align:center">
200
+ <nobr>抄表日期</nobr>
201
+ </th>
202
+ <th style="text-align:center">
203
+ <nobr>最后一次通讯时间</nobr>
204
+ </th>
205
+ <th style="text-align:center">
206
+ <nobr>电池电量</nobr>
207
+ </th>
208
+ <th style="text-align:center">
209
+ <nobr>电池电压</nobr>
210
+ </th>
211
+ <th style="text-align:center">
212
+ <nobr>信号强度</nobr>
213
+ </th>
214
+ <th style="text-align:center">
215
+ <nobr>磁干扰异常</nobr>
216
+ </th>
217
+ <th style="text-align:center">
218
+ <nobr>阀门状态</nobr>
219
+ </th>
220
+ <th style="text-align:center">
221
+ <nobr>异常状态</nobr>
222
+ </th>
223
+ <th style="text-align:center">
224
+ <nobr>分公司</nobr>
225
+ </th>
226
+
227
+ </tr>
228
+
229
+ </template>
230
+ <template partial='body'>
231
+ <td style="text-align:center">
232
+ <nobr>{{$index+1}}</nobr>
233
+ </td>
234
+ <td style="text-align: center;"><nobr>
235
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
236
+ </nobr> </td>
237
+ <td style="text-align:center"><nobr>{{row.username}}</nobr></td>
238
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
239
+ <td>
240
+ <nobr>{{row.address}}</nobr>
241
+ </td>
242
+ <td style="text-align:center">{{row.f_balance_amount}}</td>
243
+ <td style="text-align:center">{{row.f_user_phone}}</td>
244
+ <td style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></td>
245
+ <td style="text-align:center">
246
+ <nobr>{{row.f_meter_brand}}</nobr>
247
+ </td>
248
+ <td style="text-align:center">
249
+ <nobr>{{row.f_hand_date}}</nobr>
250
+ </td>
251
+ <td style="text-align:center">
252
+ <nobr>{{row.f_insert_date}}</nobr>
253
+ </td>
254
+ <td style="text-align:center">
255
+ <nobr>{{row.f_electricity}}</nobr>
256
+ </td>
257
+ <td style="text-align:center">
258
+ <nobr>{{row.f_batterylevel}}</nobr>
259
+ </td>
260
+ <td style="text-align:center">
261
+ <nobr>{{row.f_signal}}</nobr>
262
+ </td>
263
+ <td style="text-align:center">
264
+ <nobr>{{row.f_magneticInterference == 1 ? '异常' : '正常'}}</nobr>
265
+ </td>
266
+ <td style="text-align:center">
267
+ <nobr>{{row.f_valvestate == 0 ? '开阀' : '关阀'}}</nobr>
268
+ </td>
269
+ <td style="text-align:center">
270
+ <nobr>{{row.f_meter_state}}</nobr>
271
+ </td>
272
+ <td style="text-align:center">
273
+ <nobr>{{row.f_orgname}}</nobr>
274
+ </td>
275
+ </template>
276
+ </data-grid>
277
+ </criteria-paged>
278
+ </div>
279
+ <!--<div style="height: 40px;width: 100%;" v-show="echarts">
280
+ <div style="display: inline-block;width: 20%;">
281
+ <button class="button_search button_spacing" v-show="echarts" @click="notShowEcharts()">隐藏图表</button>
282
+ <button class="button_search button_spacing" v-show="isActiveTotalForm" @click="notShowTotalForm()">隐藏汇总</button>
283
+ </div>
284
+ &lt;!&ndash;图显示模板&ndash;&gt;
285
+ <div class="mystyle" style="display: inline-block;" >
286
+ <label class="font_normal_body">图表统计项</label>
287
+ <v-select style="width:60%" id="groupname" v-model="groupname"
288
+ placeholder='分组项'
289
+ value-single="true"
290
+ :value.sync="groupname"
291
+ :options='getgroupname'
292
+ close-on-select></v-select>
293
+ </div>
294
+ </div>
295
+ <div v-show="echarts" style="width: 100%;height: 90%;">
296
+ <new-exception-echarts :condition="condition" :startdate="startDate" :groupname="groupname[0]"
297
+ :enddate="endDate" :echarts="echarts"></new-exception-echarts>
298
+ </div>
299
+ <div v-show="isActiveTotalForm" style="width: 100%;height: 90%;">
300
+ <new-exception-eform-total :condition="condition" :startdate="startDate"
301
+ :enddate="endDate"></new-exception-eform-total>
302
+ </div>-->
303
+ </div>
304
+ <div class="flex" v-if="showdetail">
305
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
306
+ </div>
307
+ </template>
308
+
309
+ <script>
310
+ import {HttpResetClass, PagedList} from 'vue-client'
311
+ import * as Util from '../../../../Util'
312
+ import getLodop from '../../../../plugins/LodopFuncs'
313
+ import plugin from 'system-clients/src/plugins/GetLoginInfoService'
314
+
315
+ let readySomething = async function (self) {
316
+ await self.$MagLoadParams.loadParam()
317
+ self.initParams()
318
+ }
319
+ export default {
320
+ title: '异常查看',
321
+ props: ['data'],
322
+ data() {
323
+ return {
324
+ model: new PagedList('rs/sql/getExceptionList', 20),
325
+ reportStr: null,
326
+ show: false,
327
+ startDate: '',
328
+ endDate: '',
329
+ meterbrands: [],
330
+ f_error_type:'',
331
+ groupname: ['year'],
332
+ getgroupname: [
333
+ {label: '年份', value: 'year'},
334
+ {label: '月份', value: 'month'},
335
+ {label: '周', value: 'week'},
336
+ {label: '日', value: 'day'}
337
+ ],
338
+ getfield:{
339
+ "f_userinfo_code":"客户编号", "f_user_name":"客户名称", "f_address":"客户地址","f_user_type":"客户类型","f_gasproperties":"用气性质",
340
+ "f_meternumber":"表号","f_meter_brand":"气表品牌","f_insert_date":"上报时间","f_error_level":"异常级别","f_error_type":"异常类型",
341
+ "f_error_msg":"异常描述","f_orgname":"组织机构"
342
+ },
343
+ outlets: [],
344
+ operator: [],
345
+ showdetail:false,
346
+ rowdata:{},
347
+ filename: '',
348
+ criteriaShow: false,
349
+ echarts: false,
350
+ searchshow: false,
351
+ isActiveTotalForm: false,
352
+ GetErrorLevel:[],
353
+ GetErrorType:[],
354
+ condition: '1=1',
355
+ org:[this.$login.f.orgid],
356
+ orgCondtionStr: ` and f_orgid = ${this.$login.f.orgid}`
357
+ }
358
+ },
359
+ ready() {
360
+ readySomething(this)
361
+ this.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
362
+ this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
363
+ // console.log("type:"+this.$refs.paged.$refs.cri.model.f_error_type)
364
+ this.getErrorInfo('f_error_level')
365
+ // console.log("type:"+this.$refs.paged.$refs.cri.model.f_error_type)
366
+ this.$refs.paged.$refs.cri.search()
367
+
368
+ },
369
+ methods: {
370
+ showmsg(obj){
371
+ this.rowdata=obj
372
+ this.showdetail=true
373
+ },
374
+ cancel() {
375
+ this.showdetail = false
376
+ },
377
+ getorg(obj) {
378
+ if (obj.resids.length>0) {
379
+ this.orgCondtionStr = " and f_orgid in " + plugin.convertToIn(obj.resids)
380
+ }else
381
+ {
382
+ this.orgCondtionStr = " and f_orgid = " + this.$login.f.orgid
383
+ }
384
+ },
385
+ initParams () {
386
+ let arr = []
387
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
388
+ let temp = {}
389
+ if(item.value.f_meter_type==='物联网表'){
390
+ temp.label = item.label
391
+ temp.value = item.value.f_meter_brand
392
+ arr.push(temp )
393
+ }
394
+
395
+ })
396
+ this.meterbrands = [{label: '全部', value: ''}, ...arr]
397
+ },
398
+ hidden(){
399
+ this.criteriaShow = !this.criteriaShow
400
+ },
401
+ clickshow() {
402
+ this.searchshow = !this.searchshow
403
+ },
404
+ getErrorInfo(items){
405
+ let self = this
406
+ let f_error_level=''
407
+ if (items!='f_error_level') {
408
+ if(this.$refs.paged.$refs.cri.model.f_error_level){
409
+ f_error_level=this.$refs.paged.$refs.cri.model.f_error_level[0]
410
+ }
411
+ }
412
+ let load = new HttpResetClass()
413
+ load.load('POST', 'rs/sql/singleTableParam', {
414
+ data: {
415
+ items:items+' f_type',
416
+ tablename:'t_exception',
417
+ condition:items=='f_error_level'?'1=1 group by '+items:`f_error_level='${f_error_level}' group by `+items
418
+ }
419
+ },{warnMsg:null,resolveMsg:null}).then((res) => {
420
+ let i = 0
421
+ let rows=res.data
422
+ let array1=[]
423
+ array1.push({label: '全部', value: ''})
424
+ console.log("rows========",rows)
425
+ for (i = 0; i < rows.length; i++) {
426
+ let dr = {label: '全部', value: ''}
427
+ dr.label=rows[i].f_type
428
+ dr.value=rows[i].f_type
429
+ array1.push(dr)
430
+ console.log("rows[i]========",rows[i],dr)
431
+ }
432
+ console.log("array1========",array1)
433
+ if (items=='f_error_level'){
434
+ self.GetErrorLevel=array1
435
+ }else {
436
+ self.GetErrorType=array1
437
+ }
438
+ })
439
+
440
+ },
441
+ search(args) {
442
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
443
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
444
+ this.f_error_type=this.$refs.paged.$refs.cri.model.f_error_type
445
+ console.log('1231321312312321')
446
+ /* if (this.endDate == '' || this.startDate == '') {
447
+ return this.$showMessage("时间区间的开始和结束时间不能为空!")
448
+ }*/
449
+ this.condition = this.$refs.paged.$refs.cri.condition + this.orgCondtionStr
450
+
451
+ args.condition = this.condition
452
+ this.model.search(args.condition, args.model)
453
+ },
454
+ SaveAsFile(str) {
455
+ this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
456
+ if (res === 'confirm') {
457
+ let style = '<style>' +
458
+ 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
459
+ let strHtml = style + document.getElementById(str).innerHTML;
460
+ console.log(strHtml);
461
+ let LODOP = getLodop();
462
+ LODOP.PRINT_INIT('');
463
+ LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
464
+ LODOP.SAVE_TO_FILE('异常分析(表统计).xls')
465
+ }
466
+ })
467
+ },
468
+ clearmsg() {
469
+ this.$refs.paged.$refs.cri.model = {}
470
+ },
471
+ close() {
472
+ this.show = false
473
+ },
474
+ // 显示柱状图
475
+ showEcharts() {
476
+ this.echarts = true
477
+ this.isActiveTotalForm = false
478
+ },
479
+ notShowTotalForm() {
480
+ this.echarts = false
481
+ this.isActiveTotalForm = false
482
+ },
483
+ // 不显示柱状图
484
+ notShowEcharts() {
485
+ this.echarts = false
486
+ this.isActiveTotalForm = false
487
+ },
488
+ // 显示汇总数据表格
489
+ showTotalForm() {
490
+ this.echarts = false
491
+ this.isActiveTotalForm = true
492
+ }
493
+ },
494
+ watch: {
495
+ 'data'(val) {
496
+ if (val.f_files_path) {
497
+ this.getFileContent(val.f_files_path)
498
+ } else {
499
+ this.reportStr = null
500
+ }
501
+ }
502
+ },
503
+ computed: {
504
+ // usertypes () {
505
+ // return this.$appdate.getParams("客户类型")
506
+ // },
507
+ getCondition() {
508
+ let condition=this.$refs.paged.$refs.cri.condition + this.orgCondtionStr
509
+ return {
510
+ condition: condition ,
511
+ startDate:`${this.$refs.paged.$refs.cri.model.startDate}`,
512
+ endDate:`${this.$refs.paged.$refs.cri.model.endDate}`
513
+ }
514
+
515
+ },
516
+ usertypes() {
517
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
518
+ },
519
+ Gasproperties() {
520
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
521
+ },
522
+ abnormalstatus(){
523
+ return this.$getParams('异常状态', [{label: '全部', value: ''}])
524
+ }
525
+
526
+ }
527
+ }
528
+ </script>
529
+ <style>
530
+ .form-input-group label {
531
+ text-align: right;
532
+ width: auto;
533
+ }
534
+
535
+ .mystyle {
536
+ float: right;
537
+ padding-right: 10%;
538
+ }
539
+
540
+ .datapanel {
541
+ color: #333;
542
+ background-color: white;
543
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
544
+ padding: 10px 30px 10px 30px;
545
+ border-radius: 15px;
546
+ }
547
+ </style>