system-phone 3.1.17 → 3.1.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.
@@ -1,496 +1,496 @@
1
- <template>
2
- <div class="auto" style="background: #f8f8f8;">
3
- <div partial class="bg-white ">
4
- <div class="row app-row " style="margin-top: 10px">
5
- <div class="col-xs-4">
6
- <img src="../../assets/表号.png" style="width: 20px;margin-bottom: 5px" alt="">
7
- <label class="font ">表号:</label>
8
- </div>
9
- <div class="col-xs-8" >
10
- <input class="search_input input-font" placeholder="请输入您要查询的表号" v-model="f_meternumber" />
11
- </div>
12
- </div>
13
- <div class="row app-row " style="margin-top: 10px">
14
- <div class="col-xs-4">
15
- <img src="../../assets/用户编号.png" style="width: 20px;margin-bottom: 5px" alt="">
16
- <label class="font ">用户编号:</label>
17
- </div>
18
- <div class="col-xs-8" >
19
- <input class="search_input input-font" placeholder="请输入用户编号" v-model="f_userinfo_code" />
20
- </div>
21
- </div>
22
- <div class="row text-center" style="padding-top: 10px;padding-bottom:10px;text-align: center">
23
- <button type="button" class="btn btn-font" style="width: 25%;
24
- margin-right: 3%; background-color: #499edf;color:#FFFFFF;border-radius: 10px ;" @click="query(querytitle)">查询</button>
25
- <button type="button" class="btn btn-font btn-color1" style="width: 25%;margin-right: 3%" @click="empty">清空</button>
26
- <button type="button" class="btn btn-font btn-color1" style="width: 25%;margin-right: 3%" @click="Scanningtable">扫表号</button>
27
- </div>
28
- </div>
29
- <div class="meterinfo auto bg-white">
30
- <iot-meter-info :row="row"></iot-meter-info>
31
- </div>
32
- <div class="">
33
- <div class="row bg-white" style="padding: 10px;margin-bottom: 5px">
34
- <div class="col-sm-12 " >
35
- <img src="../../assets/caozuo.png" style="width: 20px;margin-bottom: 5px" alt="">
36
- <label class="font ">操作</label>
37
- <button type="button" class="btn btn-font btn-color" style="width: 20%" @click="OpenValve('1')">开阀</button>
38
- <button type="button" class="btn btn-font btn-color" style="width: 20%" @click="valveShutoff('0')">关阀</button>
39
- <button type="button" class="btn btn-font btn-color" style="width: 25%" @click="againOpening">重新开户</button>
40
- </div>
41
- </div>
42
-
43
- </div>
44
- <div class="bg-white" >
45
- <!--<div class="row" style="padding-left: 10px">-->
46
- <!--<label class="font_normal_body">信息查询</label>-->
47
- <!--</div>-->
48
- <div class="row auto flex-row" style="justify-content: space-between">
49
- <div @click="setquery('基础')" >
50
- <label :class="querytitle == '基础' ? 'text-center div_ul2' : 'text-center div_ul'">基础</label>
51
- </div>
52
- <div @click="setquery('指令查询')" >
53
- <label :class="querytitle == '指令查询' ? 'text-center div_ul2' : 'text-center div_ul'">指令</label>
54
- </div>
55
- <div @click="setquery('抄表查询')" >
56
- <label :class="querytitle == '抄表查询' ? 'text-center div_ul2' : 'text-center div_ul'">抄表</label>
57
- </div>
58
- <div @click="setquery('售气查询')" >
59
- <label :class="querytitle == '售气查询' ? 'text-center div_ul2' : 'text-center div_ul'">售气</label>
60
- </div>
61
- <div @click="setquery('上报查询')" >
62
- <label :class="querytitle == '上报查询' ? ' text-center div_ul2' : 'text-center div_ul'">上报</label>
63
- </div>
64
- </div>
65
- <div v-if="model.rows.length == 0 && querytitle !== '基础'" style="margin-top: 20px">
66
- <label class="font_normal_body"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;暂无记录...&nbsp;&nbsp;&nbsp;</b></label>
67
- </div>
68
- <div class="iotbaseinfo " v-if="querytitle == '基础'">
69
- <iot-base-info :row="row"></iot-base-info>
70
- </div>
71
- <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '指令查询'">
72
- <div partial>
73
- <div class="auto app-text" style="margin-top: 5px; " @click="$parent.$parent.goto(row)">
74
- <div class="panel" style="padding: 10px 10px 5px 10px;">
75
- <div class="panel-body panel-self " style="border: 2px solid #499EDF; border-radius: 10px">
76
- <div class="col-xs-12">
77
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>指令类型:</b></p>
78
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_instruct_type }}</p>
79
- </div>
80
- <div class="col-xs-12">
81
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>指令标题:</b></p>
82
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_instruct_title }}</p>
83
- </div>
84
- <div class="col-xs-12">
85
- <p class="panel-title col-xs-5 text-left font"><b>执行状态:</b></p>
86
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_instruct_state }}
87
- </p>
88
- </div>
89
- <div class="col-xs-12">
90
- <p class="panel-title col-xs-5 text-left font"><b>执行结果:</b></p>
91
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_receive_state }}
92
- </p>
93
- </div>
94
- <div class="col-xs-12">
95
- <p class="panel-title col-xs-5 text-left font"><b>生成人员:</b></p>
96
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_inputtor }}</p>
97
- </div>
98
- <div class="col-xs-12">
99
- <p class="panel-title col-xs-5 text-left font"><b>生成时间:</b></p>
100
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_instruct_date }}</p>
101
- </div>
102
- </div>
103
- </div>
104
- </div>
105
- </div>
106
- </list>
107
- <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '抄表查询'">
108
- <div partial>
109
- <div class="auto app-text" style="margin-top: 5px;">
110
- <div class="panel" style="padding: 10px 10px 5px 10px;">
111
- <div class="panel-body panel-self" style="border: 2px solid #499EDF; border-radius: 10px">
112
- <div class="col-xs-12">
113
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>本次抄表底数:</b></p>
114
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_tablebase }}</p>
115
- </div>
116
- <div class="col-xs-12">
117
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>上次抄表底数:</b></p>
118
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_last_tablebase }}</p>
119
- </div>
120
- <div class="col-xs-12">
121
- <p class="panel-title col-xs-5 text-left font"><b>操作员:</b></p>
122
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_inputtor }}
123
- </p>
124
- </div>
125
- <div class="col-xs-12">
126
- <p class="panel-title col-xs-5 text-left font"><b>抄表日期:</b></p>
127
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_input_date }}
128
- </p>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
- </list>
135
- <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '售气查询'">
136
- <div partial>
137
- <div class="auto app-text" style="margin-top: 5px;">
138
- <div class="panel" style="padding: 10px 10px 5px 10px;">
139
- <div class="panel-body panel-self" style="border: 2px solid #499EDF; border-radius: 10px">
140
- <div class="col-xs-12">
141
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>预购气量:</b></p>
142
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_pregas }}</p>
143
- </div>
144
- <div class="col-xs-12">
145
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>预购金额:</b></p>
146
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_preamount }}</p>
147
- </div>
148
- <div class="col-xs-12">
149
- <p class="panel-title col-xs-5 text-left font"><b>累购气量:</b></p>
150
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_total_gas }}
151
- </p>
152
- </div>
153
- <div class="col-xs-12">
154
- <p class="panel-title col-xs-5 text-left font"><b>累购金额:</b></p>
155
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_total_fee }}
156
- </p>
157
- </div>
158
- <div class="col-xs-12">
159
- <p class="panel-title col-xs-5 text-left font"><b>缴费日期:</b></p>
160
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_operate_date }}
161
- </p>
162
- </div>
163
- </div>
164
- </div>
165
- </div>
166
- </div>
167
- </list>
168
- <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '上报查询'">
169
- <div partial>
170
- <div class="auto app-text" style="margin-top: 5px;">
171
- <div class="panel" style="padding: 10px 10px 5px 10px;">
172
- <div class="panel-body panel-self" style="border: 2px solid #499EDF; border-radius: 10px">
173
- <div class="col-xs-12">
174
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>上报类型:</b></p>
175
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_upload_type }}</p>
176
- </div>
177
- <div class="col-xs-12">
178
- <p class="panel-title col-xs-5 text-left font" style="float: left"><b>阀门状态:</b></p>
179
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_valvestate }}</p>
180
- </div>
181
- <div class="col-xs-12">
182
- <p class="panel-title col-xs-5 text-left font"><b>表内单价:</b></p>
183
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_price }}
184
- </p>
185
- </div>
186
- <div class="col-xs-12">
187
- <p class="panel-title col-xs-5 text-left font"><b>抄表底数:</b></p>
188
- <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_tablebase }}
189
- </p>
190
- </div>
191
- <div class="col-xs-12">
192
- <p class="panel-title col-xs-5 text-left font"><b>上报日期:</b></p>
193
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_hand_date }}</p>
194
- </div>
195
- <div class="col-xs-12">
196
- <p class="panel-title col-xs-5 text-left font"><b>系统接收日期:</b></p>
197
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_insert_date }}</p>
198
- </div>
199
- </div>
200
- </div>
201
- </div>
202
- </div>
203
- </list>
204
- </div>
205
- <modal :show.sync="showModal">
206
- <div slot="modal-header" class="modal-header">
207
- <h4 class="modal-title">
208
- {{modalTitle}}
209
- </h4>
210
- </div>
211
- <div slot="modal-body" class="modal-body">
212
- <div class="row" style="margin-top: 6px">
213
- <textarea id="el_ca_txt" v-model.trim="f_comments" style="border-radius:4px;width: 100%;" placeholder="请输入开关阀原因" >
214
- </textarea>
215
- </div>
216
- </div>
217
- <div slot="modal-footer" class="modal-footer">
218
- <button type="button" class="btn btn-default" @click="showModal = false">取消</button>
219
- <button type="button" class="btn btn-success" @click="openOrCloneValveMethod(istype)">{{istype}}</button>
220
- </div>
221
- </modal>
222
-
223
- </div>
224
-
225
- </template>
226
-
227
- <script>
228
- import Vue from 'vue'
229
- import {HttpResetClass} from 'vue-client'
230
- import IotMeterInfo from "./IotMeterInfo";
231
- export default {
232
- components: {IotMeterInfo},
233
- title: '物联网监控',
234
- data () {
235
- return {
236
- f_meternumber: '',
237
- f_userinfo_code:'',
238
- querytitle: '基础',
239
- showModal: '',
240
- modalTitle: '', //开关阀标题
241
- f_comments: '', //开关阀原因
242
- istype: '', //
243
- row:{},
244
- model: {
245
- rows: [{}]
246
- }
247
-
248
- }
249
- },
250
- ready () {
251
- console.log('物联网监控')
252
- },
253
- methods: {
254
- openOrCloneValveMethod (msg) {
255
- if (this.f_comments=='') {
256
- return this.$showMessage("请输入开关阀原因")
257
- }
258
- var data = {
259
- instructType: '阀门控制',
260
- instructTitle: `手动${msg}`,
261
- condition: `t_userfiles.f_userfiles_id='${this.row.f_user_id}'`,
262
- meterBrandName: this.row.f_alias, // 气表别名
263
- f_instruct_state: '待发送',
264
- inputtor: Vue.user.name,
265
- reasonInfo: this.f_comments, //操作原因
266
- meternumberf: this.row.f_meternumber, //表号
267
- contentData: {isOpen: msg=='开阀' ? 1 : 0}, // oper 为true 时为开阀 false 为关阀
268
- }
269
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/iot_saveInstruct`, {data: data}).then((row) => {
270
- this.$showMessage(`${msg}指令发送成功,请等候2分钟进行查询`)
271
- this.istype = '';
272
- this.f_comments = '';
273
- this.showModal = false
274
- }).catch((e) => {
275
- this.$showMessage(`${msg}指令发送失败`)
276
- })
277
- },
278
- OpenValve () {
279
- this.modalTitle = '对表号为'+ this.row.f_meternumber+'开阀'
280
- this.istype = '开阀'
281
- this.showModal = true;
282
-
283
- },
284
- valveShutoff () {
285
- this.modalTitle = '对表号为'+ this.row.f_meternumber+'关阀'
286
- this.istype = '关阀'
287
- this.showModal = true;
288
- },
289
- goto(row){
290
- console.log(row)
291
- let _this=this
292
- var pardate = {
293
- _this:_this,
294
- title:'指令信息',
295
- safe:false
296
- }
297
- this.$dispatch('gotoson',pardate)
298
- this.$goto('instruct-message',{row:row}, 'self')
299
- },
300
- empty () {
301
- console.log('清空')
302
- this.f_meternumber = ''
303
- this.f_userinfo_code = ''
304
- },
305
- // 查询表别名
306
- queryAlias() {
307
- console.log('查询表别名'+JSON.stringify(this.f_meternumber))
308
- let data = {
309
- items: ' f_alias , f_user_id ',
310
- tablename: ' t_userfiles uf LEFT JOIN t_gasbrand gb ON uf.f_gasbrand_id = gb.id ',
311
- orderitem: 'gb.id desc',
312
- condition: ` f_meternumber = '${this.f_meternumber}'`
313
- }
314
- // console.log('查询条件'+ JSON.stringify(data))
315
- // this.$resetpost(`/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
316
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
317
- // console.log('查询返回'+JSON.stringify(row))
318
- return row.data[0]
319
- }).catch((e) => {
320
- this.$showMessage('表别名获取失败!')
321
- // console.log('错误信息+++++++'+JSON.stringify(e))
322
- })
323
- },
324
- againOpening () {
325
- console.log('重新开户')
326
- if (!this.f_meternumber) {
327
- this.$showMessage('请输入/扫描用户表号!')
328
- return
329
- }
330
- this.$showMessage(`您确认要重新开户吗?`, ['confirm', 'cancel']).then(async (res) => {
331
- if (res === 'confirm') {
332
- let http = new HttpResetClass()
333
- let condition = `f_meternumber = '${this.f_meternumber}'`
334
- console.log('修改条件===' + JSON.stringify(condition))
335
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/againOpenAccountnvm `, {data: {condition: condition}},{resolveMsg: null, rejectMsg: null}).then((row) => {
336
- // console.log('修改返回' + JSON.stringify(row))
337
- this.$showMessage('操作成功!将会在一段时间内重新生成开户指令!')
338
- }).catch((e) => {
339
- this.$showMessage('操作失败!请稍后重试!')
340
- console.log('错误信息+++++++'+JSON.stringify(e))
341
- })
342
- }
343
- })
344
-
345
-
346
- },
347
- query (title) {
348
- console.log('查询'+ JSON.stringify(title))
349
- if (!this.f_meternumber&&!this.f_userinfo_code) {
350
- this.$showMessage('请输入/扫描用户表号或输入用户编号!')
351
- return
352
- }
353
- let condition = this.f_meternumber!==''? `f_meternumber = '${this.f_meternumber}'`:`f_userinfo_code = '${this.f_userinfo_code}'`
354
- let data = {
355
- items: '*',
356
- tablename: 't_instruct',
357
- orderitem: 'f_instruct_date desc',
358
- f_meternumber: this.meternumber
359
- }
360
- if(title==='基础'){
361
- // let condition = `f_meternumber = '${this.f_meternumber}'`
362
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getUserByMeter`, {data: {condition:condition}}).then((row) => {
363
- if(row.data.length===0)
364
- this.$showMessage('未查询到用户信息')
365
- // console.log('查询返回'+JSON.stringify(row))
366
- // this.f_meternumber = row.data[0].f_meternumber
367
- // this.f_userinfo_code = row.data[0].f_userinfo_code?row.data[0].f_userinfo_code:this.f_userinfo_code
368
- this.row = row.data[0]
369
- }).catch((e) => {
370
- console.log('错误信息+++++++'+JSON.stringify(e))
371
- })
372
- } else {
373
- if (title == '指令查询') {
374
- data = {
375
- items: '*',
376
- tablename: 't_instruct',
377
- orderitem: 'f_instruct_date desc',
378
- condition: condition
379
- }
380
- }else if (title == '抄表查询') {
381
- data = {
382
- items: '*',
383
- tablename: 't_handplan',
384
- orderitem: 'f_input_date desc',
385
- condition: condition
386
- }
387
- }else if (title == '售气查询') {
388
- if (!this.f_meternumber) {
389
- this.$showMessage('请输入/扫描用户表号!')
390
- return
391
- }
392
- data = {
393
- items: '*',
394
- tablename: 't_sellinggas',
395
- orderitem: 'f_operate_date desc',
396
- condition: condition
397
- }
398
- }else if (title == '上报查询') {
399
- if (!this.f_meternumber) {
400
- this.$showMessage('请输入/扫描用户表号!')
401
- return
402
- }
403
- data = {
404
- items: '*',
405
- tablename: 't_meteread',
406
- orderitem: 'f_hand_date desc',
407
- condition: condition
408
- }
409
- }
410
- console.log('查询条件'+ JSON.stringify(data))
411
- // this.$resetpost(`/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
412
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
413
- console.log('查询返回'+JSON.stringify(row))
414
- this.model.rows = row.data
415
- // this.f_meternumber = row.data[0].f_meternumber
416
- // this.f_userinfo_code = row.data[0].f_userinfo_code?row.data[0].f_userinfo_code:this.f_userinfo_code
417
- }).catch((e) => {
418
- console.log('正在维护!')
419
- console.log('错误信息+++++++'+JSON.stringify(e))
420
- })
421
- }
422
- },
423
- setquery (msg) {
424
- console.log(msg)
425
- this.querytitle = msg
426
- // 查询
427
- this.query(msg)
428
- },
429
- Scanningtable() {
430
- console.log('扫表号6666666')
431
- HostApp.__this__ = this
432
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
433
- },
434
- getCode () {
435
- var datapa = HostApp.getCode().data
436
- console.log(`扫码返回值${datapa}`)
437
- this.f_meternumber = datapa
438
- this.$showMessage(`扫码返回值为:${datapa}`)
439
- },
440
-
441
- }
442
- }
443
- </script>
444
-
445
- <style scoped>
446
- .btn-color{
447
- background-color: #499edf;
448
- border-radius: 10px ;
449
- border: 1px solid #499EDF;
450
- font:600 16px PingFang-SC-Bold;
451
- color: #FFFFFF;
452
-
453
- }
454
- .btn-color1{
455
- background-color: #FFFFFF;
456
- border-radius: 10px ;
457
- border: 1px solid #499EDF;
458
- font:600 16px PingFang-SC-Bold;
459
- color: #499EDF;
460
- }
461
- .app-row {
462
- background-color: white;
463
- padding: 10px 10px 0 10px;
464
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
465
- }
466
- .search_input {
467
- border: 0;
468
- outline: none;
469
- }
470
- .font{
471
- font: 15px PingFang-SC-Medium;
472
- color: #666666;
473
- }
474
- .input-font{
475
- font: 15px PingFang-SC-Medium;
476
- color: #333333;
477
- }
478
- .div_ul {
479
- height: 36px;
480
- color:rgb(153,153,153);
481
- /*border-right: 1px solid royalblue;*/
482
- line-height: 36px;
483
- }
484
- .div_ul2 {
485
- height: 36px;
486
- /*border-right: 1px solid royalblue;*/
487
- line-height: 36px;
488
- color:#6eb0e3;
489
- border-bottom: 2px solid #6eb0e3;
490
- }
491
- .meterinfo{
492
- padding: 10px;
493
- margin-top: 5px;
494
- margin-bottom: 5px;
495
- }
496
- </style>
1
+ <template>
2
+ <div class="auto" style="background: #f8f8f8;">
3
+ <div partial class="bg-white ">
4
+ <div class="row app-row " style="margin-top: 10px">
5
+ <div class="col-xs-4">
6
+ <img src="../../assets/表号.png" style="width: 20px;margin-bottom: 5px" alt="">
7
+ <label class="font ">表号:</label>
8
+ </div>
9
+ <div class="col-xs-8" >
10
+ <input class="search_input input-font" placeholder="请输入您要查询的表号" v-model="f_meternumber" />
11
+ </div>
12
+ </div>
13
+ <div class="row app-row " style="margin-top: 10px">
14
+ <div class="col-xs-4">
15
+ <img src="../../assets/用户编号.png" style="width: 20px;margin-bottom: 5px" alt="">
16
+ <label class="font ">用户编号:</label>
17
+ </div>
18
+ <div class="col-xs-8" >
19
+ <input class="search_input input-font" placeholder="请输入用户编号" v-model="f_userinfo_code" />
20
+ </div>
21
+ </div>
22
+ <div class="row text-center" style="padding-top: 10px;padding-bottom:10px;text-align: center">
23
+ <button type="button" class="btn btn-font" style="width: 25%;
24
+ margin-right: 3%; background-color: #499edf;color:#FFFFFF;border-radius: 10px ;" @click="query(querytitle)">查询</button>
25
+ <button type="button" class="btn btn-font btn-color1" style="width: 25%;margin-right: 3%" @click="empty">清空</button>
26
+ <button type="button" class="btn btn-font btn-color1" style="width: 25%;margin-right: 3%" @click="Scanningtable">扫表号</button>
27
+ </div>
28
+ </div>
29
+ <div class="meterinfo auto bg-white">
30
+ <iot-meter-info :row="row"></iot-meter-info>
31
+ </div>
32
+ <div class="">
33
+ <div class="row bg-white" style="padding: 10px;margin-bottom: 5px">
34
+ <div class="col-sm-12 " >
35
+ <img src="../../assets/caozuo.png" style="width: 20px;margin-bottom: 5px" alt="">
36
+ <label class="font ">操作</label>
37
+ <button type="button" class="btn btn-font btn-color" style="width: 20%" @click="OpenValve('1')">开阀</button>
38
+ <button type="button" class="btn btn-font btn-color" style="width: 20%" @click="valveShutoff('0')">关阀</button>
39
+ <button type="button" class="btn btn-font btn-color" style="width: 25%" @click="againOpening">重新开户</button>
40
+ </div>
41
+ </div>
42
+
43
+ </div>
44
+ <div class="bg-white" >
45
+ <!--<div class="row" style="padding-left: 10px">-->
46
+ <!--<label class="font_normal_body">信息查询</label>-->
47
+ <!--</div>-->
48
+ <div class="row auto flex-row" style="justify-content: space-between">
49
+ <div @click="setquery('基础')" >
50
+ <label :class="querytitle == '基础' ? 'text-center div_ul2' : 'text-center div_ul'">基础</label>
51
+ </div>
52
+ <div @click="setquery('指令查询')" >
53
+ <label :class="querytitle == '指令查询' ? 'text-center div_ul2' : 'text-center div_ul'">指令</label>
54
+ </div>
55
+ <div @click="setquery('抄表查询')" >
56
+ <label :class="querytitle == '抄表查询' ? 'text-center div_ul2' : 'text-center div_ul'">抄表</label>
57
+ </div>
58
+ <div @click="setquery('售气查询')" >
59
+ <label :class="querytitle == '售气查询' ? 'text-center div_ul2' : 'text-center div_ul'">售气</label>
60
+ </div>
61
+ <div @click="setquery('上报查询')" >
62
+ <label :class="querytitle == '上报查询' ? ' text-center div_ul2' : 'text-center div_ul'">上报</label>
63
+ </div>
64
+ </div>
65
+ <div v-if="model.rows.length == 0 && querytitle !== '基础'" style="margin-top: 20px">
66
+ <label class="font_normal_body"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;暂无记录...&nbsp;&nbsp;&nbsp;</b></label>
67
+ </div>
68
+ <div class="iotbaseinfo " v-if="querytitle == '基础'">
69
+ <iot-base-info :row="row"></iot-base-info>
70
+ </div>
71
+ <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '指令查询'">
72
+ <div partial>
73
+ <div class="auto app-text" style="margin-top: 5px; " @click="$parent.$parent.goto(row)">
74
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
75
+ <div class="panel-body panel-self " style="border: 2px solid #499EDF; border-radius: 10px">
76
+ <div class="col-xs-12">
77
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>指令类型:</b></p>
78
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_instruct_type }}</p>
79
+ </div>
80
+ <div class="col-xs-12">
81
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>指令标题:</b></p>
82
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_instruct_title }}</p>
83
+ </div>
84
+ <div class="col-xs-12">
85
+ <p class="panel-title col-xs-5 text-left font"><b>执行状态:</b></p>
86
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_instruct_state }}
87
+ </p>
88
+ </div>
89
+ <div class="col-xs-12">
90
+ <p class="panel-title col-xs-5 text-left font"><b>执行结果:</b></p>
91
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_receive_state }}
92
+ </p>
93
+ </div>
94
+ <div class="col-xs-12">
95
+ <p class="panel-title col-xs-5 text-left font"><b>生成人员:</b></p>
96
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_inputtor }}</p>
97
+ </div>
98
+ <div class="col-xs-12">
99
+ <p class="panel-title col-xs-5 text-left font"><b>生成时间:</b></p>
100
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_instruct_date }}</p>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </list>
107
+ <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '抄表查询'">
108
+ <div partial>
109
+ <div class="auto app-text" style="margin-top: 5px;">
110
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
111
+ <div class="panel-body panel-self" style="border: 2px solid #499EDF; border-radius: 10px">
112
+ <div class="col-xs-12">
113
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>本次抄表底数:</b></p>
114
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_tablebase }}</p>
115
+ </div>
116
+ <div class="col-xs-12">
117
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>上次抄表底数:</b></p>
118
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_last_tablebase }}</p>
119
+ </div>
120
+ <div class="col-xs-12">
121
+ <p class="panel-title col-xs-5 text-left font"><b>操作员:</b></p>
122
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_inputtor }}
123
+ </p>
124
+ </div>
125
+ <div class="col-xs-12">
126
+ <p class="panel-title col-xs-5 text-left font"><b>抄表日期:</b></p>
127
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_input_date }}
128
+ </p>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </list>
135
+ <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '售气查询'">
136
+ <div partial>
137
+ <div class="auto app-text" style="margin-top: 5px;">
138
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
139
+ <div class="panel-body panel-self" style="border: 2px solid #499EDF; border-radius: 10px">
140
+ <div class="col-xs-12">
141
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>预购气量:</b></p>
142
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_pregas }}</p>
143
+ </div>
144
+ <div class="col-xs-12">
145
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>预购金额:</b></p>
146
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_preamount }}</p>
147
+ </div>
148
+ <div class="col-xs-12">
149
+ <p class="panel-title col-xs-5 text-left font"><b>累购气量:</b></p>
150
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_total_gas }}
151
+ </p>
152
+ </div>
153
+ <div class="col-xs-12">
154
+ <p class="panel-title col-xs-5 text-left font"><b>累购金额:</b></p>
155
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_total_fee }}
156
+ </p>
157
+ </div>
158
+ <div class="col-xs-12">
159
+ <p class="panel-title col-xs-5 text-left font"><b>缴费日期:</b></p>
160
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_operate_date }}
161
+ </p>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </list>
168
+ <list :model="model" partial='list' style="padding-bottom: 10px" v-if="querytitle == '上报查询'">
169
+ <div partial>
170
+ <div class="auto app-text" style="margin-top: 5px;">
171
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
172
+ <div class="panel-body panel-self" style="border: 2px solid #499EDF; border-radius: 10px">
173
+ <div class="col-xs-12">
174
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>上报类型:</b></p>
175
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_upload_type }}</p>
176
+ </div>
177
+ <div class="col-xs-12">
178
+ <p class="panel-title col-xs-5 text-left font" style="float: left"><b>阀门状态:</b></p>
179
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_valvestate }}</p>
180
+ </div>
181
+ <div class="col-xs-12">
182
+ <p class="panel-title col-xs-5 text-left font"><b>表内单价:</b></p>
183
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_price }}
184
+ </p>
185
+ </div>
186
+ <div class="col-xs-12">
187
+ <p class="panel-title col-xs-5 text-left font"><b>抄表底数:</b></p>
188
+ <p class="panel-title col-xs-7 text-left input-font" >{{ row.f_tablebase }}
189
+ </p>
190
+ </div>
191
+ <div class="col-xs-12">
192
+ <p class="panel-title col-xs-5 text-left font"><b>上报日期:</b></p>
193
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_hand_date }}</p>
194
+ </div>
195
+ <div class="col-xs-12">
196
+ <p class="panel-title col-xs-5 text-left font"><b>系统接收日期:</b></p>
197
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_insert_date }}</p>
198
+ </div>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ </list>
204
+ </div>
205
+ <modal :show.sync="showModal">
206
+ <div slot="modal-header" class="modal-header">
207
+ <h4 class="modal-title">
208
+ {{modalTitle}}
209
+ </h4>
210
+ </div>
211
+ <div slot="modal-body" class="modal-body">
212
+ <div class="row" style="margin-top: 6px">
213
+ <textarea id="el_ca_txt" v-model.trim="f_comments" style="border-radius:4px;width: 100%;" placeholder="请输入开关阀原因" >
214
+ </textarea>
215
+ </div>
216
+ </div>
217
+ <div slot="modal-footer" class="modal-footer">
218
+ <button type="button" class="btn btn-default" @click="showModal = false">取消</button>
219
+ <button type="button" class="btn btn-success" @click="openOrCloneValveMethod(istype)">{{istype}}</button>
220
+ </div>
221
+ </modal>
222
+
223
+ </div>
224
+
225
+ </template>
226
+
227
+ <script>
228
+ import Vue from 'vue'
229
+ import {HttpResetClass} from 'vue-client'
230
+ import IotMeterInfo from "./IotMeterInfo";
231
+ export default {
232
+ components: {IotMeterInfo},
233
+ title: '物联网监控',
234
+ data () {
235
+ return {
236
+ f_meternumber: '',
237
+ f_userinfo_code:'',
238
+ querytitle: '基础',
239
+ showModal: '',
240
+ modalTitle: '', //开关阀标题
241
+ f_comments: '', //开关阀原因
242
+ istype: '', //
243
+ row:{},
244
+ model: {
245
+ rows: [{}]
246
+ }
247
+
248
+ }
249
+ },
250
+ ready () {
251
+ console.log('物联网监控')
252
+ },
253
+ methods: {
254
+ openOrCloneValveMethod (msg) {
255
+ if (this.f_comments=='') {
256
+ return this.$showMessage("请输入开关阀原因")
257
+ }
258
+ var data = {
259
+ instructType: '阀门控制',
260
+ instructTitle: `手动${msg}`,
261
+ condition: `t_userfiles.f_userfiles_id='${this.row.f_user_id}'`,
262
+ meterBrandName: this.row.f_alias, // 气表别名
263
+ f_instruct_state: '待发送',
264
+ inputtor: Vue.user.name,
265
+ reasonInfo: this.f_comments, //操作原因
266
+ meternumberf: this.row.f_meternumber, //表号
267
+ contentData: {isOpen: msg=='开阀' ? 1 : 0}, // oper 为true 时为开阀 false 为关阀
268
+ }
269
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/iot_saveInstruct`, {data: data}).then((row) => {
270
+ this.$showMessage(`${msg}指令发送成功,请等候2分钟进行查询`)
271
+ this.istype = '';
272
+ this.f_comments = '';
273
+ this.showModal = false
274
+ }).catch((e) => {
275
+ this.$showMessage(`${msg}指令发送失败`)
276
+ })
277
+ },
278
+ OpenValve () {
279
+ this.modalTitle = '对表号为'+ this.row.f_meternumber+'开阀'
280
+ this.istype = '开阀'
281
+ this.showModal = true;
282
+
283
+ },
284
+ valveShutoff () {
285
+ this.modalTitle = '对表号为'+ this.row.f_meternumber+'关阀'
286
+ this.istype = '关阀'
287
+ this.showModal = true;
288
+ },
289
+ goto(row){
290
+ console.log(row)
291
+ let _this=this
292
+ var pardate = {
293
+ _this:_this,
294
+ title:'指令信息',
295
+ safe:false
296
+ }
297
+ this.$dispatch('gotoson',pardate)
298
+ this.$goto('instruct-message',{row:row}, 'self')
299
+ },
300
+ empty () {
301
+ console.log('清空')
302
+ this.f_meternumber = ''
303
+ this.f_userinfo_code = ''
304
+ },
305
+ // 查询表别名
306
+ queryAlias() {
307
+ console.log('查询表别名'+JSON.stringify(this.f_meternumber))
308
+ let data = {
309
+ items: ' f_alias , f_user_id ',
310
+ tablename: ' t_userfiles uf LEFT JOIN t_gasbrand gb ON uf.f_gasbrand_id = gb.id ',
311
+ orderitem: 'gb.id desc',
312
+ condition: ` f_meternumber = '${this.f_meternumber}'`
313
+ }
314
+ // console.log('查询条件'+ JSON.stringify(data))
315
+ // this.$resetpost(`/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
316
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
317
+ // console.log('查询返回'+JSON.stringify(row))
318
+ return row.data[0]
319
+ }).catch((e) => {
320
+ this.$showMessage('表别名获取失败!')
321
+ // console.log('错误信息+++++++'+JSON.stringify(e))
322
+ })
323
+ },
324
+ againOpening () {
325
+ console.log('重新开户')
326
+ if (!this.f_meternumber) {
327
+ this.$showMessage('请输入/扫描用户表号!')
328
+ return
329
+ }
330
+ this.$showMessage(`您确认要重新开户吗?`, ['confirm', 'cancel']).then(async (res) => {
331
+ if (res === 'confirm') {
332
+ let http = new HttpResetClass()
333
+ let condition = `f_meternumber = '${this.f_meternumber}'`
334
+ console.log('修改条件===' + JSON.stringify(condition))
335
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/againOpenAccountnvm `, {data: {condition: condition}},{resolveMsg: null, rejectMsg: null}).then((row) => {
336
+ // console.log('修改返回' + JSON.stringify(row))
337
+ this.$showMessage('操作成功!将会在一段时间内重新生成开户指令!')
338
+ }).catch((e) => {
339
+ this.$showMessage('操作失败!请稍后重试!')
340
+ console.log('错误信息+++++++'+JSON.stringify(e))
341
+ })
342
+ }
343
+ })
344
+
345
+
346
+ },
347
+ query (title) {
348
+ console.log('查询'+ JSON.stringify(title))
349
+ if (!this.f_meternumber&&!this.f_userinfo_code) {
350
+ this.$showMessage('请输入/扫描用户表号或输入用户编号!')
351
+ return
352
+ }
353
+ let condition = this.f_meternumber!==''? `f_meternumber = '${this.f_meternumber}'`:`f_userinfo_code = '${this.f_userinfo_code}'`
354
+ let data = {
355
+ items: '*',
356
+ tablename: 't_instruct',
357
+ orderitem: 'f_instruct_date desc',
358
+ f_meternumber: this.meternumber
359
+ }
360
+ if(title==='基础'){
361
+ // let condition = `f_meternumber = '${this.f_meternumber}'`
362
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getUserByMeter`, {data: {condition:condition}}).then((row) => {
363
+ if(row.data.length===0)
364
+ this.$showMessage('未查询到用户信息')
365
+ // console.log('查询返回'+JSON.stringify(row))
366
+ // this.f_meternumber = row.data[0].f_meternumber
367
+ // this.f_userinfo_code = row.data[0].f_userinfo_code?row.data[0].f_userinfo_code:this.f_userinfo_code
368
+ this.row = row.data[0]
369
+ }).catch((e) => {
370
+ console.log('错误信息+++++++'+JSON.stringify(e))
371
+ })
372
+ } else {
373
+ if (title == '指令查询') {
374
+ data = {
375
+ items: '*',
376
+ tablename: 't_instruct',
377
+ orderitem: 'f_instruct_date desc',
378
+ condition: condition
379
+ }
380
+ }else if (title == '抄表查询') {
381
+ data = {
382
+ items: '*',
383
+ tablename: 't_handplan',
384
+ orderitem: 'f_input_date desc',
385
+ condition: condition
386
+ }
387
+ }else if (title == '售气查询') {
388
+ if (!this.f_meternumber) {
389
+ this.$showMessage('请输入/扫描用户表号!')
390
+ return
391
+ }
392
+ data = {
393
+ items: '*',
394
+ tablename: 't_sellinggas',
395
+ orderitem: 'f_operate_date desc',
396
+ condition: condition
397
+ }
398
+ }else if (title == '上报查询') {
399
+ if (!this.f_meternumber) {
400
+ this.$showMessage('请输入/扫描用户表号!')
401
+ return
402
+ }
403
+ data = {
404
+ items: '*',
405
+ tablename: 't_meteread',
406
+ orderitem: 'f_hand_date desc',
407
+ condition: condition
408
+ }
409
+ }
410
+ console.log('查询条件'+ JSON.stringify(data))
411
+ // this.$resetpost(`/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
412
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/iot_singleTable_OrderBy`, {data: data}).then((row) => {
413
+ console.log('查询返回'+JSON.stringify(row))
414
+ this.model.rows = row.data
415
+ // this.f_meternumber = row.data[0].f_meternumber
416
+ // this.f_userinfo_code = row.data[0].f_userinfo_code?row.data[0].f_userinfo_code:this.f_userinfo_code
417
+ }).catch((e) => {
418
+ console.log('正在维护!')
419
+ console.log('错误信息+++++++'+JSON.stringify(e))
420
+ })
421
+ }
422
+ },
423
+ setquery (msg) {
424
+ console.log(msg)
425
+ this.querytitle = msg
426
+ // 查询
427
+ this.query(msg)
428
+ },
429
+ Scanningtable() {
430
+ console.log('扫表号6666666')
431
+ HostApp.__this__ = this
432
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
433
+ },
434
+ getCode () {
435
+ var datapa = HostApp.getCode().data
436
+ console.log(`扫码返回值${datapa}`)
437
+ this.f_meternumber = datapa
438
+ this.$showMessage(`扫码返回值为:${datapa}`)
439
+ },
440
+
441
+ }
442
+ }
443
+ </script>
444
+
445
+ <style scoped>
446
+ .btn-color{
447
+ background-color: #499edf;
448
+ border-radius: 10px ;
449
+ border: 1px solid #499EDF;
450
+ font:600 16px PingFang-SC-Bold;
451
+ color: #FFFFFF;
452
+
453
+ }
454
+ .btn-color1{
455
+ background-color: #FFFFFF;
456
+ border-radius: 10px ;
457
+ border: 1px solid #499EDF;
458
+ font:600 16px PingFang-SC-Bold;
459
+ color: #499EDF;
460
+ }
461
+ .app-row {
462
+ background-color: white;
463
+ padding: 10px 10px 0 10px;
464
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
465
+ }
466
+ .search_input {
467
+ border: 0;
468
+ outline: none;
469
+ }
470
+ .font{
471
+ font: 15px PingFang-SC-Medium;
472
+ color: #666666;
473
+ }
474
+ .input-font{
475
+ font: 15px PingFang-SC-Medium;
476
+ color: #333333;
477
+ }
478
+ .div_ul {
479
+ height: 36px;
480
+ color:rgb(153,153,153);
481
+ /*border-right: 1px solid royalblue;*/
482
+ line-height: 36px;
483
+ }
484
+ .div_ul2 {
485
+ height: 36px;
486
+ /*border-right: 1px solid royalblue;*/
487
+ line-height: 36px;
488
+ color:#6eb0e3;
489
+ border-bottom: 2px solid #6eb0e3;
490
+ }
491
+ .meterinfo{
492
+ padding: 10px;
493
+ margin-top: 5px;
494
+ margin-bottom: 5px;
495
+ }
496
+ </style>