safecheck-client 3.0.30-51 → 3.0.30-53

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "safecheck-client",
3
3
  "//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
4
- "version": "3.0.30-51",
4
+ "version": "3.0.30-53",
5
5
  "description": "安检模块 前端组件",
6
6
  "author": "丁新 <417755458@qq.com>",
7
7
  "license": "ISC",
@@ -29,7 +29,16 @@ export default {
29
29
  },
30
30
  ready() {
31
31
  if (this.row) {
32
- this.inputText = Buffer.from(this.row.blob, 'base64').toString('utf8');
32
+ try {
33
+ let hex = Buffer.from(this.row.blob, 'hex').toString('utf8');
34
+ if (!hex.includes('{')) {
35
+ this.inputText = Buffer.from(hex, 'hex').toString('utf8');
36
+ } else {
37
+ this.inputText = hex;
38
+ }
39
+ } catch (e) {
40
+ this.$showMessage('网络异常请联系管理员')
41
+ }
33
42
  }
34
43
  this.handleClick()
35
44
  },
@@ -54,15 +63,16 @@ export default {
54
63
  return
55
64
  }
56
65
  let param = JSON.parse(this.paperMessage)
57
- if (!param.title){
66
+ if (!param.title) {
58
67
  this.$showMessage('请填写示意图标题')
59
68
  return
60
69
  }
61
70
  param.sketchId = param.sketchId ? param.sketchId : util.generateUUID()
62
71
  let gadgets = param.gadgets
63
72
  if (gadgets.length > 0) {
73
+ var jsonString = JSON.stringify(param);
64
74
  var reqdata = {
65
- blob: JSON.stringify(param),
75
+ blob: Buffer.from(jsonString,'utf8').toString('hex'),
66
76
  orgid: this.$login.f.orgid,
67
77
  orgname: this.$login.f.orgs,
68
78
  title: param.title,
@@ -76,6 +86,33 @@ export default {
76
86
  }
77
87
  })
78
88
  }
89
+ },
90
+ hexToBytes(hex) {
91
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
92
+ bytes.push(parseInt(hex.substring(c, 2), 16));
93
+ return new Uint8Array(bytes);
94
+ },
95
+ decodeHexStringToJSON(hexString) {
96
+ // 去除前缀 "0x"
97
+ var cleanHexString = hexString.slice(2);
98
+
99
+ // 将十六进制字符串转换为字节数组
100
+ var byteArray = this.hexToBytes(cleanHexString);
101
+
102
+ // 创建 Blob 对象
103
+ var blob = new Blob([byteArray], {type: 'application/json'});
104
+
105
+ // 读取 Blob 为文本
106
+ return new Promise(function(resolve, reject) {
107
+ var reader = new FileReader();
108
+ reader.onloadend = function() {
109
+ resolve(reader.result);
110
+ };
111
+ reader.onerror = function() {
112
+ reject(reader.error);
113
+ };
114
+ reader.readAsText(blob, 'UTF-8');
115
+ });
79
116
  }
80
117
  },
81
118
  // beforeDestroy() {
@@ -5,6 +5,12 @@
5
5
  <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
6
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
7
  <div class="row">
8
+ <div class="form-group col-sm-2">
9
+ <label class="font_normal_body">用户编号</label>
10
+ <input type="text" class="input_search" v-model="model.title"
11
+ condition="tui.f_userinfo_code like '%{}%'"
12
+ style="width: 60%" placeholder="示意图标题" >
13
+ </div>
8
14
  <div class="form-group col-sm-2">
9
15
  <label class="font_normal_body">示意图标题</label>
10
16
  <input type="text" class="input_search" v-model="model.title"
@@ -6,7 +6,7 @@
6
6
  <form>
7
7
  <div class="row app-row">
8
8
  <div class="col-xs-4">
9
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
9
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
10
10
  <label class="font text-left">用户编号:</label>
11
11
  </div>
12
12
  <div class="col-xs-8" >
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  <div class="row app-row">
18
18
  <div class="col-xs-4">
19
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
19
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
20
20
  <label class="font text-left">表 &nbsp;&nbsp; &nbsp;&nbsp; 号:</label>
21
21
  </div>
22
22
  <div class="col-xs-8" >
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  <div class="row app-row">
29
29
  <div class="col-xs-4">
30
- <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
30
+ <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
31
31
  <label class="font text-left">用户名称:</label>
32
32
  </div>
33
33
  <div class="col-xs-8" >
@@ -36,7 +36,7 @@
36
36
  </div>
37
37
  <div class="row app-row">
38
38
  <div class="col-xs-4">
39
- <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
39
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
40
40
  <label class="font text-left">用户类型:</label>
41
41
  </div>
42
42
  <div class="col-xs-8" >
@@ -47,7 +47,7 @@
47
47
  </div>
48
48
  <div class="row app-row">
49
49
  <div class="col-xs-4">
50
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
50
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
51
51
  <label class="font text-left">片区筛选:</label>
52
52
  </div>
53
53
  <div class="col-xs-8" >
@@ -59,7 +59,7 @@
59
59
  </div>
60
60
  <div class="row app-row">
61
61
  <div class="col-xs-4">
62
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
62
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
63
63
  <label class="font text-left">小区名称:</label>
64
64
  </div>
65
65
  <div class="col-xs-8" >
@@ -68,7 +68,7 @@
68
68
  </div>
69
69
  <div class="row app-row">
70
70
  <div class="col-xs-4">
71
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
71
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
72
72
  <label class="font text-left">楼&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</label>
73
73
  </div>
74
74
  <div class="col-xs-8" >
@@ -77,7 +77,7 @@
77
77
  </div>
78
78
  <div class="row app-row">
79
79
  <div class="col-xs-4">
80
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
80
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
81
81
  <label class="font text-left">单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;元:</label>
82
82
  </div>
83
83
  <div class="col-xs-8" >
@@ -86,7 +86,7 @@
86
86
  </div>
87
87
  <div class="row app-row">
88
88
  <div class="col-xs-4">
89
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
89
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
90
90
  <label class="font text-left">用户地址:</label>
91
91
  </div>
92
92
  <div class="col-xs-8" >
@@ -95,7 +95,7 @@
95
95
  </div>
96
96
  <div class="row app-row">
97
97
  <div class="col-xs-4">
98
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
98
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
99
99
  <label class="font text-left">表&nbsp;&nbsp;封&nbsp;&nbsp;号:</label>
100
100
  </div>
101
101
  <div class="col-xs-8" >
@@ -104,7 +104,7 @@
104
104
  </div>
105
105
  <div class="row app-row">
106
106
  <div class="col-xs-4">
107
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
107
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
108
108
  <label class="font text-left">电&nbsp;&nbsp;话&nbsp;&nbsp;号:</label>
109
109
  </div>
110
110
  <div class="col-xs-8" >
@@ -113,7 +113,7 @@
113
113
  </div>
114
114
  <div class="row app-row">
115
115
  <div class="col-xs-4">
116
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
116
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
117
117
  <label class="font text-left">卡&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</label>
118
118
  </div>
119
119
  <div class="col-xs-8" >
@@ -122,7 +122,7 @@
122
122
  </div>
123
123
  <div class="row app-row">
124
124
  <div class="col-xs-4">
125
- <img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
125
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
126
126
  <label class="font text-left">抄&nbsp;&nbsp;表&nbsp;&nbsp;册:</label>
127
127
  </div>
128
128
  <div class="col-xs-8" >
@@ -135,37 +135,6 @@
135
135
  close-on-select clear-button></v-select>
136
136
  </div>
137
137
  </div>
138
- <!-- <div class="row app-row">
139
- <div class="col-xs-4">
140
- <img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
141
- <label class="font text-left">安检情况</label>
142
- </div>
143
- <div class="col-xs-8" >
144
- <v-select class="input-font"
145
- placeholder='请选择安检情况'
146
- :value.sync="model.f_ischeck"
147
- v-model="model.f_ischeck"
148
- :options='$parent.$parent.ischecks'
149
- condition="{}"
150
- close-on-select clear-button></v-select>
151
- </div>
152
- </div>
153
- <div class="row app-row">
154
- <div class="col-xs-4">
155
- <img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
156
- <label class="font text-left">档案状态:</label>
157
- </div>
158
- <div class="col-xs-8" >
159
- <v-select class="input-font"
160
- placeholder='请选择档案状态'
161
- :value.sync="$parent.$parent.model.f_user_state"
162
- :options='$parent.$parent.f_user_states'
163
- close-on-select clear-button></v-select>
164
- </div>
165
- </div>-->
166
-
167
-
168
-
169
138
  <div class="row text-center" style="margin-top: 20px;">
170
139
  <button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="search">查询</button>
171
140
  </div>
@@ -223,14 +192,13 @@
223
192
  </div>
224
193
  </list>
225
194
  </criteria-paged>
226
- <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
227
195
  </div>
228
196
  </template>
229
197
 
230
198
  <script>
231
199
  import {HttpResetClass, PagedList} from 'vue-client'
232
200
  import Vue from 'vue'
233
- import * as Util from '../Util'
201
+ import * as Util from '../../../components/Util'
234
202
 
235
203
  export default {
236
204
  title: '安检员B',
@@ -276,18 +244,6 @@
276
244
  }
277
245
  },
278
246
  ready () {
279
- // this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/getSafeCheckCycle`,{},{resolveMsg: null, rejectMsg: null}).then((res) => {
280
- // //tag)
281
- // if(res.data.code == 200){
282
- // this.model.myCycle = res.data.civil.value
283
- // this.model.fyCycle = res.data.civilian.value
284
- // }else{
285
- // //this.$showMessage(res.data.msg)
286
- // }
287
- //
288
- // })
289
- // this.getCheckTime()
290
- // this.Mreadibook()
291
247
  this.getCommunity()
292
248
  },
293
249
  computed: {
@@ -296,7 +252,6 @@
296
252
  },
297
253
  selected () {
298
254
  return this.$refs.paged.$refs.grid.selected
299
- return this.$refs.paged.$refs.grid.selected
300
255
  }
301
256
  },
302
257
  methods:{
@@ -334,7 +289,6 @@
334
289
  condition: `f_filialeid = '${Vue.user.orgid}'`,
335
290
  orderitem: 'id'
336
291
  }}).then(res=>{
337
- //tag)
338
292
  let nocheck=''
339
293
  let ischeck=''
340
294
  if (res.data[0]){
@@ -344,25 +298,20 @@
344
298
 
345
299
  }else{
346
300
  let addtime= (Util.toStandardTimeString().substring(0,4)-res.data[0].f_start_time.substring(0,4))%res.data[0].f_circle
347
- //tag
348
301
  let time =(Util.toStandardTimeString().substring(0,4)-addtime)+'-01-01 00:00:00'
349
- //tag
350
302
  nocheck=`(ua.f_last_check_date<'${time}' or ua.f_last_check_date is null)`
351
303
  ischeck=`ua.f_last_check_date>'${time}'`
352
304
  }
353
- //tag
354
305
  this.ischecks=[
355
306
  {label: '全部', value: ''},
356
307
  {label: '已检', value: ischeck },
357
308
  {label: '未检', value: nocheck},
358
309
  ]
359
- //tag
360
310
  }else{
361
311
  this.$showMessage("未配置安检周期")
362
312
  }
363
-
364
313
  })
365
- //tag
314
+
366
315
  },
367
316
  inspect (info){
368
317
  if(info.f_last_check_date){
@@ -371,9 +320,7 @@
371
320
  info.id = ''
372
321
  info.f_state = '未检'
373
322
  info.f_no_checkplan = '无计划安检'
374
- //tag
375
323
  this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`,{data:{f_userid:info.f_userinfo_id}}).then((response)=>{
376
- //tag)
377
324
  info['f_plan_meters'] = response.data
378
325
  var pardate = {
379
326
  _this:this,
@@ -392,7 +339,6 @@
392
339
  info.f_no_checkplan = '无计划安检'
393
340
  //tag
394
341
  this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`,{data:{f_userid:info.f_userinfo_id}}).then((response)=>{
395
- //tag)
396
342
  info['f_plan_meters'] = response.data
397
343
  var pardate = {
398
344
  _this:this,
@@ -412,20 +358,10 @@
412
358
  {data: {f_orgid: "('"+Vue.user.orgid+"')"}},
413
359
  {resolveMsg: null, rejectMsg: '获取失败!!!'}).then((getMeterReadingBooks)=>{
414
360
  this.cbc = [{label: '全部', value: ''}]
415
- //tag
416
- //tag)
417
- //tag
418
361
  getMeterReadingBooks.data.meterbooks.forEach((res) => {
419
362
  this.cbc.push({label: res.f_book_name, value: res.id})
420
- /*if(res.f_book_slice_area){
421
- if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
422
- this.sliceArea.push(res.f_book_slice_area)
423
- }
424
- }*/
425
363
  })
426
364
  })
427
-
428
-
429
365
  }
430
366
  }
431
367
  }