safecheck-client 4.0.1-4 → 4.0.1-41

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.
Files changed (54) hide show
  1. package/package.json +5 -5
  2. package/src/assets//350/255/246/345/221/212 (3).png +0 -0
  3. package/src/assets//350/255/246/345/221/212 (4).png +0 -0
  4. package/src/assets//350/255/246/345/221/212 (5).png +0 -0
  5. package/src/components/android/SwitchValve.vue +1 -1
  6. package/src/components/checkplan/CheckDetail.vue +1 -1
  7. package/src/components/map/SecurityCheckCoordinates.vue +348 -0
  8. package/src/components/pc/CheckBookUser.vue +337 -333
  9. package/src/filiale/jinhong/android/CurrentCreate.vue +41 -2
  10. package/src/filiale/jinhong/pc/CheckBookList.vue +10 -7
  11. package/src/filiale/jinhong/pc/DefectPaperNew.vue +10 -10
  12. package/src/filiale/jinhong/pc/checkUserList.vue +31 -8
  13. package/src/filiale/libo/android/PaperFeedback.vue +1579 -0
  14. package/src/filiale/libo/android/PhoneUpUserinfo.vue +1249 -0
  15. package/src/filiale/libo/android/SafecheckOrderV.vue +2302 -0
  16. package/src/filiale/libo/android.js +14 -0
  17. package/src/filiale/libo/pc/NewCheckpaper.vue +1987 -0
  18. package/src/filiale/libo/pc.js +12 -0
  19. package/src/filiale/meihekou/android/MeterReading.vue +9 -5
  20. package/src/filiale/meihekou/android/PhoneUpUserinfo.vue +3 -2
  21. package/src/filiale/meihekou/android/SafecheckDevices.vue +5 -5
  22. package/src/filiale/meihekou/android/SafecheckOrderV.vue +323 -310
  23. package/src/filiale/meihekou/pc/NewCheckpaper.vue +2027 -2027
  24. package/src/filiale/meihekou/pc/NewCheckpaperNew.vue +2050 -0
  25. package/src/filiale/meihekou/pc/PaperList.vue +810 -0
  26. package/src/filiale/meihekou/pc.js +15 -13
  27. package/src/filiale/minsheng/android/SwitchValve.vue +1 -1
  28. package/src/filiale/qianneng/android/SwitchValve.vue +1 -1
  29. package/src/filiale/qingjian/pc/NewCheckpaper.vue +1 -0
  30. package/src/filiale/qingjian/pc/checkUserList.vue +35 -0
  31. package/src/filiale/taiyuan/android/CurrentCreate.vue +1016 -0
  32. package/src/filiale/taiyuan/android/PhoneUpUserinfo.vue +1259 -0
  33. package/src/filiale/taiyuan/android/SafecheckOrderV.vue +2341 -0
  34. package/src/filiale/taiyuan/android/SafecheckUserInfo.vue +776 -0
  35. package/src/filiale/taiyuan/android.js +13 -0
  36. package/src/filiale/taiyuan/pc/DefectDeal.vue +1033 -0
  37. package/src/filiale/taiyuan/pc/NewCheckpaper.vue +1976 -0
  38. package/src/filiale/taiyuan/pc/PlanManage.vue +891 -0
  39. package/src/filiale/taiyuan/pc/checkUserList.vue +798 -0
  40. package/src/filiale/taiyuan/pc.js +15 -0
  41. package/src/filiale/tongchuan/android/SwitchValve.vue +1 -1
  42. package/src/filiale/xinkang/android/AddPlanItem.vue +1 -1
  43. package/src/filiale/xinkang/android/SafecheckDevices.vue +29 -7
  44. package/src/filiale/xinkang/android/SafecheckOrderV.vue +21 -44
  45. package/src/filiale/xinkang/android/SafecheckUserInfo.vue +1 -1
  46. package/src/filiale/xinkang/pc/NewCheckpaper.vue +1474 -1498
  47. package/src/filiale/xinkang/pc/PaperList.vue +596 -603
  48. package/src/filiale/yuansheng/android/SwitchValve.vue +1 -1
  49. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1030 -1030
  50. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +4 -4
  51. package/src/filiale/yunchengminsheng/pc/PaperList.vue +811 -0
  52. package/src/filiale/yunchengminsheng/pc.js +1 -0
  53. package/src/safecheck-android.js +4 -0
  54. package/src/safecheck.js +3 -0
@@ -115,13 +115,7 @@
115
115
  v-on:change="daychange" style="width: 60%"></v-select>
116
116
  </div>
117
117
  <div class="row" style="margin-top: 10px">
118
- <label class="font_normal_body">截止时间</label>
119
- <datepicker placeholder="请选择截至时间"
120
- :value.sync="selectData.f_finish_date"
121
- v-model="selectData.f_finish_date"
122
- :format="'yyyy-MM-dd HH:mm:ss'"
123
- style="width: 60%"
124
- :disabled="true"></datepicker>
118
+ <label class="font_normal_body">截止时间&nbsp;&nbsp;&nbsp;&nbsp;{{selectData.f_finish_date}}</label>
125
119
  </div>
126
120
  <div class="row" style="margin-top: 10px">
127
121
  <label class="font_normal_body" >备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
@@ -155,23 +149,6 @@ export default {
155
149
  // props: ['f_plan_id', 'role'],
156
150
  data() {
157
151
  return {
158
- //测试数据
159
- // f_plan_id:'',
160
- // role:'inspect',
161
- // item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
162
- // "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
163
- // "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
164
- // "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
165
- // "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
166
- // "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
167
- // "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
168
- // "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
169
- // "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
170
- // "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
171
- // "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
172
- // "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
173
- // },
174
-
175
152
  data: {
176
153
  f_devices: [],
177
154
  f_defect_content:'',
@@ -227,6 +204,7 @@ export default {
227
204
  f_meetunit:'维修站',
228
205
  f_outlets:'维修站'
229
206
  },
207
+ serverConfig: undefined,
230
208
  model: { //转维修数据
231
209
  // 一次派单
232
210
  serviceacitivity: [{
@@ -260,49 +238,38 @@ export default {
260
238
  repairitems:[],
261
239
  meading:'转站点',
262
240
  repairTypeOptions:this.$appdata.getParam('报修类型'),
263
- config: {
264
- "燃气表":{
265
- "checkmust":true,
266
- "index":1,
267
- "items":{
268
- //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
269
- "基表编号":{"index":1,"type":"string","readonly":true},
270
- "气表型号":{"index":2,"type":"string","readonly":true},
271
- "气表品牌":{"index":3,"type":"string","readonly":true},
272
- "表向":{"index":4,"type":"string","readonly":true},
273
- "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
274
- "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
275
- "累购气量":{"index":7,"type":"number","readonly":true},
276
- "累购金额":{"index":7,"type":"number","readonly":true},
277
- "已用气量":{"index":8,"type":"number","checkmust": false},//基表数
278
- "已用金额":{"index":8,"type":"number","checkmust": false},
279
- "剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
280
- //显示屏数 --实际剩余气量
281
- "剩余金额":{"index":9,"type":"number","checkmust": false},
282
- "气量异常差值":{"index":10,"type":"number","readonly": true},
283
- "金额异常差值":{"index":10,"type":"number","readonly": true},
284
- "系统余额":{"index":10,"type":"number","readonly": true},
285
- "表封号":{"index":11,"type":"string","readonly": true},
286
- "燃气表照片":{"index":12,"type":"picture","checkmust": false}
241
+ f_security_check_type_id: '',
242
+ config: [
243
+ {
244
+ "itemname": "燃气表",
245
+ "checkmust": true,
246
+ "index": 1,
247
+ "items": [
248
+ {"itemname": "基表编号", "index": 1, "type": "string", "readonly": true},
249
+ {"itemname": "气表型号", "index": 2, "type": "string", "readonly": true},
250
+ {"itemname": "气表品牌", "index": 3, "type": "string", "readonly": true},
251
+ {"itemname": "表向", "index": 4, "type": "string", "readonly": true},
252
+ {"itemname": "初始表底", "index": 5, "type": "number", "readonly": true},
253
+ {"itemname": "上期表读数", "index": 6, "type": "number", "readonly": true},
254
+
255
+ {"itemname": "累购气量", "index": 7, "type": "number", "readonly": true,unique: true,collectionType:"按气量"},
256
+ {"itemname": "已用气量", "index": 8, "type": "number", "checkmust": false,unique: true,collectionType:"按气量"},
257
+ {"itemname": "剩余气量", "index": 9, "type": "number", "checkmust": false,unique: true,collectionType:"按气量"},
258
+ {"itemname": "气量异常差值", "index": 10, "type": "number", "readonly": true,unique: true,collectionType:"按气量"},
259
+
260
+
261
+ {"itemname": "累购金额", "index": 7, "type": "number", "readonly": true,unique: true,collectionType:"按金额"},
262
+ {"itemname": "已用金额", "index": 8, "type": "number", "checkmust": false,unique: true,collectionType:"按金额"},
263
+ {"itemname": "剩余金额", "index": 9, "type": "number", "checkmust": false,unique: true,collectionType:"按金额"},
264
+ {"itemname": "金额异常差值", "index": 10, "type": "number", "readonly": true,unique: true,collectionType:"按金额"},
265
+
266
+ {"itemname": "系统余额", "index": 10, "type": "number", "readonly": true},
267
+
268
+ {"itemname": "表封号", "index": 11, "type": "string", "readonly": true},
269
+ {"itemname": "燃气表照片", "index": 12, "type": "picture", "checkmust": false}
270
+ ]
287
271
  }
288
- // 注意,配置项的index必须与上面的固定配置保持'顺序'
289
- },
290
- // "燃气表2":{
291
- // "checkmust":true,
292
- // "index":2,src
293
- // "items":{
294
- // "燃气表照片":{"index":1,"type":"picture"},
295
- // "表品牌":{"index":2,"type":"string","readonly":true},
296
- // "表号":{"index":3,"type":"string","readonly":true},
297
- // "表封号":{"index":4,"type":"number","readonly":true},
298
- // "表型号":{"index":5,"type":"string","readonly":true},
299
- // "位置":{"index":6,"type":"string","readonly":true},
300
- // "表底数":{"index":7,"type":"number","readonly":true},
301
- // "累购气量":{"index":8,"type":"number","readonly":true},
302
- // "累购金额":{"index":8,"type":"number","readonly":true}
303
- // }
304
- // }
305
- },
272
+ ],
306
273
  // 维修项
307
274
  isneedDate:'',
308
275
  days: this.$appdata.getParam('截止天数'),
@@ -348,36 +315,39 @@ export default {
348
315
  },
349
316
  methods: {
350
317
  getDays(val){
318
+ if (!val){
319
+ return
320
+ }
351
321
  console.log(val)
352
322
  this.days = this.$appdata.getParam(val+'截止天数')
353
323
  this.selectData.day = this.$appdata.getSingleValue(val+'默认截止天数') || 1
354
324
  },
355
325
  daychange(val) {
326
+ if (!val){
327
+ return
328
+ }
356
329
  this.selectData.day = val
357
330
  if (val == '其他') {
358
331
  this.flag = false
359
332
  } else {
360
333
  if(val){
361
334
  this.flag = true
362
- this.selectData.f_finish_date = this.getSecondDay(val)
335
+ this.$set('selectData.f_finish_date',this.getSecondDay(val))
363
336
  }else {
364
- this.selectData.f_finish_date = this.getSecondDay(1)
337
+ this.$set('selectData.f_finish_date',this.getSecondDay(1))
365
338
  }
366
-
367
339
  }
368
340
  },
369
- getSecondDay(val){
370
- let t = new Date();
371
- let t1 = t.getTime()
372
- val = val * 1000
373
- t.setTime(t1 + val * 60 * 60 * 24);
374
- let Y = t.getFullYear() + '-'
375
- let M = (t.getMonth() + 1 < 10 ? '0' + (t.getMonth() + 1) : t.getMonth() + 1) + '-'
376
- let D = (t.getDate() < 10 ? '0' + t.getDate() : t.getDate()) + ' '
377
- let h = (t.getHours() < 10 ? '0' + t.getHours() : t.getHours()) + ':'
378
- let m = (t.getMinutes() < 10 ? '0' + t.getMinutes() : t.getMinutes()) + ':'
379
- let s = t.getSeconds() < 10 ? '0' + t.getSeconds() : t.getSeconds()
380
- return Y + M + D + h + m + s
341
+ getSecondDay(val) {
342
+ const addMs = val * 1000 * 86400; // 86400 = 60*60*24
343
+ const targetDate = new Date(Date.now() + addMs);
344
+ const year = targetDate.getFullYear();
345
+ const month = String(targetDate.getMonth() + 1).padStart(2, '0');
346
+ const day = String(targetDate.getDate()).padStart(2, '0');
347
+ const hours = String(targetDate.getHours()).padStart(2, '0');
348
+ const minutes = String(targetDate.getMinutes()).padStart(2, '0');
349
+ const seconds = String(targetDate.getSeconds()).padStart(2, '0');
350
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
381
351
  },
382
352
  showmod(){
383
353
  // this.saveNoclick()
@@ -419,6 +389,7 @@ export default {
419
389
  f_meetunit:f_meetunit,
420
390
  f_outlets:f_meetunit,
421
391
  }
392
+ this.getDays(f_repairtype)
422
393
  },
423
394
  cancel1(){
424
395
  this.showModal2=false
@@ -755,14 +726,14 @@ export default {
755
726
  for(let device in this.data) {
756
727
  if (device.startsWith("device")) {
757
728
  for (let item in this.data[device]) {
758
- if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
729
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == this.config[dev].itemname) {
759
730
  error = false
760
731
  }
761
732
  }
762
733
  }
763
734
  }
764
735
  if (error) {
765
- return "请检查" + dev
736
+ return "请检查" + this.config[dev].itemname
766
737
  }
767
738
  }
768
739
  }
@@ -772,23 +743,22 @@ export default {
772
743
  if (device.startsWith("device")) {
773
744
  for (let item in this.data[device]) {
774
745
  //检查每一条安检结果
775
- if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
746
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == this.config[dev].itemname) {
776
747
  for (let i in this.data[device][item].f_items) {
777
748
  for (let it in this.config[dev].items) {
778
- if (it == this.data[device][item].f_items[i].f_item_name) {
779
- let check=false
780
- if (!this.data[device][item].f_items[i].f_item_value){
781
- check=true
782
- }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
783
- if (this.data[device][item].f_items[i].f_item_value.length==0){
784
- check=true
749
+ if (this.config[dev].items[it].itemname == this.data[device][item].f_items[i].f_item_name) {
750
+ let check = false
751
+ if (!this.data[device][item].f_items[i].f_item_value) {
752
+ check = true
753
+ } else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)) {
754
+ if (this.data[device][item].f_items[i].f_item_value.length == 0) {
755
+ check = true
785
756
  }
786
757
  }
787
-
788
- if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
758
+ if (this.config[dev].items[it].type == 'picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path) {
789
759
  return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
790
760
  }
791
- if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
761
+ if (this.config[dev].items[it].type != 'picture' && this.config[dev].items[it].checkmust == true && check) {
792
762
  return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
793
763
  }
794
764
  }
@@ -834,7 +804,7 @@ export default {
834
804
  let hasOther = ''
835
805
  let otherValue = null
836
806
  for (let item in codata[device]) {
837
- if(typeof codata[device][item]=='function'){
807
+ if (typeof codata[device][item] == 'function') {
838
808
  continue
839
809
  }
840
810
  codata[device][item].f_create_time = Util.toStandardTimeString()
@@ -844,17 +814,18 @@ export default {
844
814
  } else {
845
815
  f_device_type = codata[device][item].f_device_type
846
816
  }
847
- if(item == 'sum' || item == 'removeEmpty'){
817
+ if (item == 'sum' || item == 'removeEmpty') {
848
818
  continue
849
819
  }
850
- for (let i = 0; i < codata[device][item].f_items.length ; i++) {
820
+ for (let i = 0; i < codata[device][item].f_items.length; i++) {
851
821
  //tag
852
- if(i == 'sum' || i == 'removeEmpty'){
822
+ if (i == 'sum' || i == 'removeEmpty') {
853
823
  continue
854
824
  }
855
825
  var items = codata[device][item].f_items[i]
856
826
  items.f_create_time = Util.toStandardTimeString()
857
827
  items.f_item_lists = []
828
+
858
829
  if (items.type == 'selector') {
859
830
  items.selected = []
860
831
  } else if (items.type == 'inputSelector') {
@@ -867,62 +838,74 @@ export default {
867
838
  let f_item_value
868
839
  if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
869
840
  for (let i in items.f_item_value) {
870
- if(typeof items.f_item_value[i]=='function'){
841
+ if (typeof items.f_item_value[i] == 'function') {
871
842
  continue
872
843
  }
873
- let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
844
+ // let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
845
+ let configItems = ''
846
+ this.config.forEach(e => {
847
+ if (e.itemname == f_device_type)
848
+ e.items.forEach(item => {
849
+ if (item.itemname == f_item_name) {
850
+ configItems = item
851
+ }
852
+ })
853
+ })
854
+ items.f_defect_level = configItems.level
874
855
  //tag)
875
856
  for (let k in configItems.options) {
876
- if(typeof configItems.options[k]=='function'){
857
+ if (typeof configItems.options[k] == 'function') {
877
858
  continue
878
859
  }
879
860
  //tag)
880
861
  if (items.f_item_value[i] === configItems.options[k].data) {
881
-
882
862
  f_is_defect = configItems.options[k].isdefect
883
863
  f_item_value = items.f_item_value[i]
884
- f_defect_level = configItems.options[k].level
864
+ f_defect_level = configItems.level
885
865
  if (f_is_defect) {
886
866
  if (checkResults.result !== '有隐患') {
887
867
  checkResults.result = '有隐患'
888
868
  }
889
- console.log('items'+items)
890
- if(items.f_deal_dispose=='报修'){
869
+ console.log('items' + items)
870
+ if (items.f_deal_dispose == '报修') {
891
871
  console.log("检测到需要转维修++++++++++++")
892
- this.repairDefect.result='未处理'
872
+ this.repairDefect.result = '未处理'
893
873
  this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
894
874
  }
895
- if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
896
- this.checkResult[f_device_type+'-'+f_item_name] = []
875
+ if (!this.checkResult.hasOwnProperty(f_device_type + '-' + f_item_name)) {
876
+ this.checkResult[f_device_type + '-' + f_item_name] = []
897
877
  }
898
- this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
878
+ this.checkResult[f_device_type + '-' + f_item_name].push(f_item_value)
899
879
 
900
880
  }
901
881
 
902
- let items_list = {
903
- f_is_defect: f_is_defect,
904
- f_item_value: f_item_value,
905
- f_defect_level: f_defect_level,
906
- f_is_eliminate: null,
907
- f_create_time: Util.toStandardTimeString()
908
- }
909
- if (!items.f_item_lists) {
910
- items.f_item_lists = []
911
- if (JSON.stringify(items_list) !== '{}') {
912
- items.f_item_lists.push(items_list)
913
- }
882
+ let f_selected = f_item_value
883
+ if (!items.f_selected) {
884
+ items.f_selected = []
885
+ items.f_selected.push(f_item_value)
914
886
  } else {
915
- if (JSON.stringify(items_list) !== '{}') {
916
- items.f_item_lists.push(items_list)
917
- }
887
+ items.f_selected.push(f_item_value)
918
888
  }
919
889
  }
920
890
  }
921
891
  }
892
+ //
893
+ items.f_selected = JSON.stringify(items.f_selected);
894
+ items.f_item_value = items.f_item_value ? items.f_item_value.toString() : undefined
922
895
  } else {
923
- let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
896
+ // let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
897
+ let configItems = ''
898
+ this.config.forEach(e => {
899
+ if (e.itemname == f_device_type)
900
+ e.items.forEach(item => {
901
+ if (item.itemname == f_item_name) {
902
+ configItems = item
903
+ }
904
+ })
905
+ })
906
+
924
907
  f_is_defect = items.f_is_defect
925
- f_defect_level = items.level
908
+ f_defect_level = configItems.level
926
909
  f_item_value = items.f_item_value
927
910
  let items_list = {
928
911
  f_is_defect: f_is_defect,
@@ -966,7 +949,7 @@ export default {
966
949
  }
967
950
  if (this.checkResult) {
968
951
  for (let key in this.checkResult) {
969
- if(typeof this.checkResult[key]=='function'){
952
+ if (typeof this.checkResult[key] == 'function') {
970
953
  continue
971
954
  }
972
955
  // 上次安检结果数据组织
@@ -1012,7 +995,6 @@ export default {
1012
995
  return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
1013
996
  }
1014
997
  this.save()
1015
-
1016
998
  },
1017
999
  //将数据组装提出
1018
1000
  assemblyCodata(){
@@ -1031,21 +1013,21 @@ export default {
1031
1013
  save(type) {
1032
1014
  if (type == 'temp' || type == 'finish') {
1033
1015
  this.assemblyCodata()
1034
- }
1016
+ }
1035
1017
  //禁用事件
1036
1018
  this.saveNoclick()
1037
- if(type == 'temp'){
1019
+ if (type == 'temp') {
1038
1020
  this.data.f_complete = '未完成'
1039
1021
  this.rowCodata.f_complete = '未完成'
1040
1022
  // 关闭录音方法
1041
1023
  this.closely(true) //临时保存,删除录音文件并暂停录音
1042
1024
  this.disableTimer()
1043
- }else {
1025
+ } else {
1044
1026
  // 关闭录音方法
1045
1027
  this.closely(false) // 保存本地,不删除录音文件暂停录音
1046
1028
  let errString = this.errorVerify()
1047
1029
  if (errString) {
1048
- if (Vue.android){
1030
+ if (Vue.android) {
1049
1031
  this.$showMessage(errString)
1050
1032
  }
1051
1033
  return
@@ -1057,7 +1039,7 @@ export default {
1057
1039
  this.disableTimer()
1058
1040
  }
1059
1041
  }
1060
- if(this.data.f_blacklist!='是'){
1042
+ if (this.data.f_blacklist != '是') {
1061
1043
  delete this.data.f_blocking_cause
1062
1044
  }
1063
1045
  if (this.data.f_entry_status == '入户') {
@@ -1065,17 +1047,17 @@ export default {
1065
1047
  this.data.f_rejectcheck_path = null
1066
1048
  this.data.f_rejectcheck1_path = null
1067
1049
  this.data.f_rejectcheck2_path = null
1068
- this.data.f_noanswers_path=[]
1050
+ this.data.f_noanswers_path = []
1069
1051
  this.data.f_noanswer_path = null
1070
1052
  this.data.f_noanswer1_path = null
1071
1053
  this.data.f_noanswer2_path = null
1072
- }else if (this.data.f_entry_status == '到访不遇') {
1054
+ } else if (this.data.f_entry_status == '到访不遇') {
1073
1055
  this.data.f_rejectchecks_path = []
1074
1056
  this.data.f_rejectcheck_path = null
1075
1057
  this.data.f_rejectcheck1_path = null
1076
1058
  this.data.f_rejectcheck2_path = null
1077
- }else if (this.data.f_entry_status == '拒检') {
1078
- this.data.f_noanswers_path=[]
1059
+ } else if (this.data.f_entry_status == '拒检') {
1060
+ this.data.f_noanswers_path = []
1079
1061
  this.data.f_noanswer_path = null
1080
1062
  this.data.f_noanswer1_path = null
1081
1063
  this.data.f_noanswer2_path = null
@@ -1094,8 +1076,8 @@ export default {
1094
1076
  })
1095
1077
  if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
1096
1078
  codata.f_devices = this.f_devices
1097
- if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1098
- this.rowCodata = Object.assign({},this.rowCodata,codata)
1079
+ if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
1080
+ this.rowCodata = Object.assign({}, this.rowCodata, codata)
1099
1081
  } else {
1100
1082
  this.rowCodata = codata
1101
1083
  }
@@ -1160,8 +1142,8 @@ export default {
1160
1142
  alias: 'getUserinfomation',
1161
1143
  data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1162
1144
  })
1163
- if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1164
- this.rowCodata = Object.assign({},this.rowCodata,codata)
1145
+ if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
1146
+ this.rowCodata = Object.assign({}, this.rowCodata, codata)
1165
1147
  } else {
1166
1148
  this.rowCodata = codata
1167
1149
  }
@@ -1178,6 +1160,7 @@ export default {
1178
1160
  f_check_item_id: this.data.f_check_item_id
1179
1161
  }).then((res) => {
1180
1162
  if (res.data.code == 200) {
1163
+
1181
1164
  let f_paper_id = res.data.data[0].id
1182
1165
  for (let device of this.f_devices) {
1183
1166
  device.f_paper_id = f_paper_id
@@ -1200,8 +1183,7 @@ export default {
1200
1183
  return false
1201
1184
  }
1202
1185
  })
1203
- }
1204
- else {
1186
+ } else {
1205
1187
  this.$androidUtil.bzLogic('保存安检单信息', {
1206
1188
  f_check_item_id: this.data.f_check_item_id,
1207
1189
  f_checker_id: this.data.f_checker_id,
@@ -1318,23 +1300,23 @@ export default {
1318
1300
  // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1319
1301
  'backresult': 1
1320
1302
  })
1321
- }else{
1303
+ } else {
1322
1304
  this.$showMessage('保存成功!')
1323
- if(this.clickBack){
1305
+ if (this.clickBack) {
1324
1306
  this.isStrat = false
1325
1307
  this.$dispatch('confirm')
1326
1308
  }
1327
1309
  }
1328
- }else{
1310
+ } else {
1329
1311
  this.$showMessage('保存失败!')
1330
1312
  return
1331
1313
  }
1332
- }else{
1314
+ } else {
1333
1315
  this.$showMessage('服务器内部错误,保存失败!')
1334
1316
  return
1335
1317
  }
1336
1318
  },
1337
- uploadCallBack(jo){
1319
+ uploadCallBack(jo) {
1338
1320
  //获取微信推送路径
1339
1321
  let url = ""
1340
1322
  if(Vue.config.safecheck != undefined) {
@@ -1344,13 +1326,13 @@ export default {
1344
1326
  }
1345
1327
  }
1346
1328
  }
1347
- if(jo.state == 'ok'){
1329
+ if (jo.state == 'ok') {
1348
1330
  let res = JSON.parse(jo.result)
1349
- if(res.code == 200){
1331
+ if (res.code == 200) {
1350
1332
  this.$set('data.f_paper_id', res.id)
1351
- this.isStrat=false
1352
- if(url != ""){
1353
- this.$resetpost(`${url}`,{data:WxResult})
1333
+ this.isStrat = false
1334
+ if (url != "") {
1335
+ this.$resetpost(`${url}`, {data: WxResult})
1354
1336
  }
1355
1337
  // 预约安检回更预约安检单
1356
1338
  if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
@@ -1364,27 +1346,27 @@ export default {
1364
1346
  }
1365
1347
  })
1366
1348
  }
1367
- if(this.isToRepair){
1368
- for (let device in this.data){
1369
- if(device.startsWith("device")){
1349
+ if (this.isToRepair) {
1350
+ for (let device in this.data) {
1351
+ if (device.startsWith("device")) {
1370
1352
  this.data[device] = []
1371
- if(res.data.length > 0){
1372
- for(let i in res.data[0].f_devices){
1373
- if(this.data[device].length > 0){
1374
- if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
1353
+ if (res.data.length > 0) {
1354
+ for (let i in res.data[0].f_devices) {
1355
+ if (this.data[device].length > 0) {
1356
+ if (this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type) {
1375
1357
  this.data[device].push(res.data[0].f_devices[i])
1376
- res.data[0].f_devices.splice(i,1)
1358
+ res.data[0].f_devices.splice(i, 1)
1377
1359
  }
1378
- }else{
1360
+ } else {
1379
1361
  this.data[device].push(res.data[0].f_devices[i])
1380
- res.data[0].f_devices.splice(i,1)
1362
+ res.data[0].f_devices.splice(i, 1)
1381
1363
  }
1382
1364
  }
1383
1365
  }
1384
1366
  }
1385
1367
  }
1386
1368
  this.todo()
1387
- }else{
1369
+ } else {
1388
1370
  this.$showMessage('安检上传成功!')
1389
1371
  if (this.data.f_userinfoid){
1390
1372
  let http = new HttpResetClass()
@@ -1409,7 +1391,8 @@ export default {
1409
1391
  let param = {}
1410
1392
  param = res.data[0]
1411
1393
  param.f_new_tablebase = _this.data.f_new_tablebase
1412
- param.tabname="在线抄表"
1394
+ param.tabname="在线抄表",
1395
+ param.f_result_state="安检回量"
1413
1396
  var pardate = {
1414
1397
  _this:this,
1415
1398
  tittle:'抄表单信息',
@@ -1448,8 +1431,7 @@ export default {
1448
1431
  this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
1449
1432
  this.onlySave = true
1450
1433
  return
1451
- }
1452
- else{
1434
+ } else {
1453
1435
  this.$showMessage('上传失败!')
1454
1436
  }
1455
1437
  }else {
@@ -1457,31 +1439,31 @@ export default {
1457
1439
  }
1458
1440
  this.onlySave = true
1459
1441
  },
1460
- safecheckToRepairCallBack(jo){
1442
+ safecheckToRepairCallBack(jo) {
1461
1443
  //获取微信推送路径
1462
- if(jo.state == 'ok'){
1444
+ if (jo.state == 'ok') {
1463
1445
  let res = JSON.parse(jo.result)
1464
- if(res.code == 200){
1465
- if(res.data.code == 200){
1446
+ if (res.code == 200) {
1447
+ if (res.data.code == 200) {
1466
1448
  this.$showMessage('上传并转维修成功!')
1467
- }else{
1449
+ } else {
1468
1450
  this.$showMessage('上传并转维修成功,回写安检单失败!')
1469
1451
  }
1470
1452
  this.$dispatch('confirm')
1471
- }else{
1453
+ } else {
1472
1454
  this.$showMessage('上传失败!')
1473
1455
  this.onlySave = true
1474
1456
  }
1475
- }else{
1457
+ } else {
1476
1458
  this.$showMessage('网络异常,上传失败!')
1477
1459
  this.onlySave = true
1478
1460
  }
1479
1461
  },
1480
- todo(){
1462
+ todo() {
1481
1463
  let gen = getRepairParam(this)
1482
1464
  co(gen)
1483
1465
  },
1484
- undo(){
1466
+ undo() {
1485
1467
  this.showCheckToRepair = !this.showCheckToRepair
1486
1468
  this.model.serviceacitivity[0].f_reciever = ''
1487
1469
  this.model.serviceacitivity[0].f_meetunit = ''
@@ -1517,26 +1499,60 @@ export default {
1517
1499
  return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
1518
1500
  },
1519
1501
  extend(initalObj, finalObj) {
1520
- var obj = finalObj || {};
1521
- for (var i in initalObj) {
1522
- var prop = initalObj[i];
1502
+ initalObj.forEach(item2 => {
1503
+ const item1 = finalObj.find(item => item.itemname === item2.itemname);
1523
1504
 
1524
- // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1525
- if (prop === obj) {
1526
- continue;
1505
+ if (!item1) {
1506
+ finalObj.push(item2);
1507
+ } else {
1508
+ // 对 item2 的 items 进行逆序遍历
1509
+ item2.items.slice().forEach(subItem2 => {
1510
+ const subItem1Index = item1.items.findIndex(subItem => subItem.itemname === subItem2.itemname);
1511
+
1512
+ if (subItem1Index > -1) {
1513
+ // 如果找到匹配的 subItem1,用 subItem2 替换它
1514
+ item1.items[subItem1Index] = subItem2;
1515
+ } else {
1516
+ // 如果没有找到,将 subItem2 插入到 item1.items 的前面
1517
+ item1.items.push(subItem2);
1518
+ }
1519
+ });
1527
1520
  }
1521
+ });
1528
1522
 
1529
- if (typeof prop === 'object') {
1530
- if (obj[i]) {
1531
- this.extend(obj[i], prop)
1532
- } else {
1533
- obj[i] = prop;
1534
- }
1523
+ return finalObj;
1524
+ },
1525
+ removeNestedItem(arr, itemname1, itemname2) {
1526
+ // 创建一个新数组以避免修改原始数组
1527
+ const newArr = arr.map(item => {
1528
+ // 复制每个项目以避免直接修改它们
1529
+ const newItem = { ...item };
1530
+
1531
+ // 检查外层itemname是否匹配
1532
+ if (newItem.itemname === itemname1 && Array.isArray(newItem.items)) {
1533
+ // 过滤掉匹配的内层itemname
1534
+ newItem.items = newItem.items.filter(subItem => subItem.itemname !== itemname2);
1535
1535
  }
1536
- }
1537
- return obj;
1536
+ return newItem;
1537
+ });
1538
+ return newArr;
1538
1539
  },
1539
- putDevices() {
1540
+ removeByCollectionType(arr, collectionType) {
1541
+ // 创建一个新数组以避免修改原始数组
1542
+ const newArr = arr.map(item => {
1543
+ // 复制每个项目以避免直接修改它们
1544
+ const newItem = {...item};
1545
+
1546
+ // 检查外层itemname是否匹配
1547
+ if (newItem.itemname === '燃气表' && Array.isArray(newItem.items)) {
1548
+ // 过滤掉匹配的内层itemname
1549
+ newItem.items = newItem.items.filter(subItem => !subItem.unique || subItem.collectionType == collectionType);
1550
+ }
1551
+ return newItem;
1552
+ });
1553
+ return newArr;
1554
+ },
1555
+ async putDevices() {
1540
1556
  this.$set('data.approve', "true")
1541
1557
  this.$set('data.writeback', "false")
1542
1558
  if (Vue.config.safecheck != undefined) {
@@ -1560,46 +1576,60 @@ export default {
1560
1576
  this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
1561
1577
  }
1562
1578
  }
1563
- if(this.item.f_user_type == '非民用'){
1564
- // 非民用
1565
- if (Vue.config.safecheck.DevicesSetConfig != undefined){
1566
- if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1567
- this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1568
- }else{
1569
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
1570
- }
1571
- }
1572
1579
 
1573
- }else{
1574
- // 民用户
1575
- if (Vue.config.safecheck.DevicesConfig != undefined){
1576
- if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1577
- this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1578
- }else{
1579
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type?this.item.f_user_type:'民用']])
1580
- }
1580
+ if (this.item.f_security_check_type_id && this.item.f_security_check_type_id != null) {
1581
+ try {
1582
+ await this.getSecurityCheckType(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/getSecurityCheckTypeHistoryById`, {id: this.item.f_security_check_type_id})
1583
+ this.f_security_check_type_id = this.serverConfig.data.id
1584
+ } catch (e) {
1585
+ return this.$showMessage('获取配置文件失败,请返回后重新进入!多次失败请联系管理员')
1586
+ }
1587
+ this.config = this.extend(JSON.parse(this.serverConfig.data.f_json), this.config)
1588
+ this.initConfig()
1589
+ } else {
1590
+ try {
1591
+ await this.getSecurityCheckType(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/getSecurityCheckTypeByType`, {
1592
+ f_safecheck_type: this.item.f_safecheck_type || '年度普检',
1593
+ f_user_type: this.item.f_user_type
1594
+ })
1595
+ this.f_security_check_type_id = this.serverConfig.data[0].id
1596
+ this.config = this.extend(JSON.parse(this.serverConfig.data[0].f_json), this.config)
1597
+ this.initConfig()
1598
+ } catch (e) {
1599
+ return this.$showMessage('获取配置文件失败,请返回后重新进入!多次失败请联系管理员')
1581
1600
  }
1582
1601
  }
1583
-
1584
1602
  }
1585
- // 预留设备项位置
1603
+ },
1604
+ async getSecurityCheckType(url, data) {
1605
+ let res = await new HttpResetClass().http('POST', url,
1606
+ data,
1607
+ {resolveMsg: null, rejectMsg: '网络异常'})
1608
+ if (typeof res === 'object') {
1609
+ this.serverConfig = res
1610
+ } else {
1611
+ this.serverConfig = JSON.parse(res)
1612
+ }
1613
+ },
1614
+ initConfig() {
1586
1615
  for (let i in this.config) {
1587
- this.tabs.splice(1,0,null)
1616
+ this.tabs.splice(1, 0, null)
1588
1617
  }
1589
- //遍历安检项配置
1590
1618
  for (let i in this.config) {
1591
1619
  //取得安检项索引值
1592
- let n = this.config[i].index
1593
- this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1620
+ let n = parseInt(i) + 1
1621
+ //tag
1622
+ this.devices[n - 1] = {device: parseInt(i), n: n, checkmust: this.config[i].checkmust}
1594
1623
  this.$set('data.' + 'device' + n, [])
1595
1624
  this.tabs[n] = {
1596
- header: i,
1625
+ header: this.config[i].itemname,
1597
1626
  complete: 'safecheck-devices',
1598
1627
  class: 'repair-details-class',
1599
1628
  number: n
1600
1629
  }
1601
1630
 
1602
- if(this.config[i].quantity && this.config[i].quantity >0){
1631
+ if (this.config[i].quantity && this.config[i].quantity > 0) {
1632
+
1603
1633
  let items = []
1604
1634
  for (let it in this.config[i].items) {
1605
1635
  //赋值下拉选项
@@ -1607,9 +1637,9 @@ export default {
1607
1637
  for (let op in this.config[i].items[it].options) {
1608
1638
  if (this.config[i].items[it].options[op].isdefault == true) {
1609
1639
  items.push({
1610
- f_defect_level: this.config[i].items[it].options[op].level,
1640
+ f_defect_level: this.config[i].items[it].level,
1611
1641
  f_is_defect: this.config[i].items[it].options[op].isdefect,
1612
- f_item_name: it,
1642
+ f_item_name: this.config[i].items[it].itemname,
1613
1643
  f_item_value: this.config[i].items[it].options[op].data,
1614
1644
  f_path: "",
1615
1645
  type: "selector"
@@ -1618,9 +1648,11 @@ export default {
1618
1648
  }
1619
1649
  }
1620
1650
  }
1621
- for(let q =0;q<this.config[i].quantity;q++) {
1651
+ for (let q = 0; q < this.config[i].quantity; q++) {
1622
1652
  this.data['device' + n].push(
1623
- {f_device_type: i, f_items:items}
1653
+ {
1654
+ f_device_type: this.config[i].itemname, f_items: items
1655
+ }
1624
1656
  )
1625
1657
  }
1626
1658
  }
@@ -1708,7 +1740,7 @@ export default {
1708
1740
  if (this.item.f_plan_meters[i].f_meter_type) {
1709
1741
  this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
1710
1742
  //tag)
1711
- if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
1743
+ if (this.config[this.devices[de].device].itemname == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') > 0) {
1712
1744
  this.data['device' + this.devices[de].n].push({
1713
1745
  f_device_type: "燃气表",
1714
1746
  f_items: [
@@ -1768,8 +1800,7 @@ export default {
1768
1800
  }
1769
1801
  ]
1770
1802
  })
1771
- }
1772
- else if (this.devices[de].device == "燃气表") {
1803
+ } else if (this.config[this.devices[de].device].itemname == "燃气表") {
1773
1804
  this.data['device' + this.devices[de].n].push({
1774
1805
  f_device_type: "燃气表",
1775
1806
  f_items: [
@@ -1830,15 +1861,15 @@ export default {
1830
1861
  ]
1831
1862
  })
1832
1863
  }
1833
- if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
1864
+ if(this.config[this.devices[de].device].itemname == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
1834
1865
  this.data['device' + this.devices[de].n].forEach(device => {
1835
1866
  if (!this.data.f_collection_type) {
1836
1867
  this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1837
- delete this.config['燃气表']['items']['累购气量']
1838
- delete this.config['燃气表']['items']['已用金额']
1839
- delete this.config['燃气表']['items']['剩余气量']
1840
- delete this.config['燃气表']['items']['气量异常差值']
1841
- delete this.config['燃气表']['items']['金额异常差值']
1868
+ this.config = this.removeNestedItem(this.config, '燃气表', '累购气量')
1869
+ this.config = this.removeNestedItem(this.config, '燃气表', '已用金额')
1870
+ this.config = this.removeNestedItem(this.config, '燃气表', '剩余气量')
1871
+ this.config = this.removeNestedItem(this.config, '燃气表', '气量异常差值')
1872
+ this.config = this.removeNestedItem(this.config, '燃气表', '金额异常差值')
1842
1873
  device.f_items.push(
1843
1874
  {
1844
1875
  f_defect_level: null,
@@ -1889,7 +1920,8 @@ export default {
1889
1920
  )
1890
1921
  }
1891
1922
  })
1892
- } else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
1923
+ }
1924
+ else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
1893
1925
  this.data['device' + this.devices[de].n].forEach(device => {
1894
1926
  /*
1895
1927
  "累购气量":{"index":8,"type":"number","readonly":true},
@@ -1904,11 +1936,8 @@ export default {
1904
1936
  if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
1905
1937
  if (!this.data.f_collection_type) {
1906
1938
  this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1907
- delete this.config['燃气表']['items']['累购气量']
1908
- delete this.config['燃气表']['items']['已用气量']
1909
- delete this.config['燃气表']['items']['剩余气量']
1910
- delete this.config['燃气表']['items']['气量异常差值']
1911
- delete this.config['燃气表']['items']['系统余额']
1939
+ this.config = this.removeNestedItem(this.config, '燃气表', '系统余额')
1940
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
1912
1941
  device.f_items.push(
1913
1942
  {
1914
1943
  f_defect_level: null,
@@ -1957,16 +1986,14 @@ export default {
1957
1986
  type: "number"
1958
1987
  }
1959
1988
  )
1989
+ //tag)
1960
1990
  }
1961
1991
  } else
1962
1992
  if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
1963
1993
  if (!this.data.f_collection_type) {
1964
1994
  this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1965
- delete this.config['燃气表']['items']['累购金额']
1966
- delete this.config['燃气表']['items']['已用金额']
1967
- delete this.config['燃气表']['items']['剩余金额']
1968
- delete this.config['燃气表']['items']['金额异常差值']
1969
- delete this.config['燃气表']['items']['系统余额']
1995
+ this.config = this.removeNestedItem(this.config, '燃气表', '系统余额')
1996
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
1970
1997
  device.f_items.push(
1971
1998
  {
1972
1999
  f_defect_level: null,
@@ -2018,15 +2045,12 @@ export default {
2018
2045
  }
2019
2046
  }
2020
2047
  })
2021
- } else if(this.devices[de].device == "燃气表"){
2048
+ } else if(this.config[this.devices[de].device].itemname == "燃气表"){
2022
2049
  this.data['device' + this.devices[de].n].forEach(device => {
2023
2050
  if (!this.data.f_collection_type) {
2024
2051
  this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2025
- delete this.config['燃气表']['items']['累购金额']
2026
- delete this.config['燃气表']['items']['已用金额']
2027
- delete this.config['燃气表']['items']['剩余金额']
2028
- delete this.config['燃气表']['items']['金额异常差值']
2029
- delete this.config['燃气表']['items']['系统余额']
2052
+ this.config = this.removeNestedItem(this.config, '燃气表', '系统余额')
2053
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
2030
2054
  device.f_items.push(
2031
2055
  {
2032
2056
  f_defect_level: null,
@@ -2087,12 +2111,12 @@ export default {
2087
2111
  }
2088
2112
  },
2089
2113
  watch: {
2090
- 'row' () {
2114
+ 'row'() {
2091
2115
  //tag
2092
2116
  this.copy()
2093
2117
  }
2094
2118
  },
2095
- async ready () {
2119
+ async ready() {
2096
2120
  try {
2097
2121
  if (this.item.f_userinfoid){
2098
2122
  let http = new HttpResetClass()
@@ -2118,7 +2142,7 @@ export default {
2118
2142
  }
2119
2143
  //送气超期功能
2120
2144
  //await this.isoverDate()
2121
- this.putDevices()
2145
+ await this.putDevices()
2122
2146
  //如果已检,则提取安检单
2123
2147
  if (this.item.f_state != '未检') {
2124
2148
  if (this.role == 'inspect' || this.role == 'androidview') {
@@ -2138,61 +2162,39 @@ export default {
2138
2162
  Util.replaceFalse(value)
2139
2163
  if (value.data.length != 0) {
2140
2164
  that.$set('data', value.data[0])
2141
- if (this.data.f_collection_type == '按气量') {
2142
- delete this.config['燃气表']['items']['累购金额']
2143
- delete this.config['燃气表']['items']['已用金额']
2144
- delete this.config['燃气表']['items']['剩余金额']
2145
- delete this.config['燃气表']['items']['金额异常差值']
2146
- delete this.config['燃气表']['items']['系统余额']
2147
- } else if (this.data.f_collection_type == '按金额') {
2148
- delete this.config['燃气表']['items']['累购气量']
2149
- delete this.config['燃气表']['items']['已用气量']
2150
- delete this.config['燃气表']['items']['剩余气量']
2151
- delete this.config['燃气表']['items']['气量异常差值']
2152
- delete this.config['燃气表']['items']['系统余额']
2153
- }
2154
- //tag)
2165
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
2155
2166
  if (value.data[0].f_devices) {
2156
2167
  for (let da in that.devices) {
2157
- if(typeof that.devices[da]=='function'){
2168
+ if (typeof that.devices[da] == 'function') {
2158
2169
  continue
2159
2170
  }
2160
2171
  that.$set('data.device' + that.devices[da].n, [])
2161
2172
  }
2162
2173
  value.data[0].f_devices.forEach((item) => {
2163
2174
  for (let i in item.f_items) {
2164
- if(typeof item.f_items[i]=='function'){
2175
+ if (typeof item.f_items[i] == 'function') {
2165
2176
  continue
2166
2177
  }
2167
- for (let de in that.config[item.f_device_type].items) {
2168
- if(typeof that.config[item.f_device_type].items[de]=='function'){
2178
+ let items = this.config.find(obj => obj.itemname === item.f_device_type).items;
2179
+ for (let de in items) {
2180
+ if (typeof items[de] == 'function') {
2169
2181
  continue
2170
2182
  }
2171
- if (item.f_items[i].f_item_name == de) {
2172
- if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
2183
+ if (item.f_items[i].f_item_name == items[de].itemname) {
2184
+ if (items[de].type == 'selector' || items[de].type == 'checkbox') {
2173
2185
  item.f_items[i].f_item_value = []
2174
- } else {
2175
- item.f_items[i].f_item_value = ''
2176
2186
  }
2177
2187
  }
2178
2188
  }
2179
- for (let j in item.f_items[i].f_item_lists) {
2180
- if(typeof item.f_items[i].f_item_lists[j]=='function'){
2181
- continue
2182
- }
2183
- if (item.f_items[i].f_item_value instanceof Array) {
2184
- item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
2185
- } else {
2186
- item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
2187
- }
2189
+ if (item.f_items[i].f_item_value instanceof Array) {
2190
+ item.f_items[i].f_item_value = JSON.parse(item.f_items[i].f_selected)
2188
2191
  }
2189
-
2190
2192
  }
2191
2193
  for (let de in that.devices) {
2192
- if(typeof that.devices[de]=='function'){
2194
+ if (typeof that.devices[de] == 'function') {
2193
2195
  continue
2194
2196
  }
2195
- if (that.devices[de].device == item.f_device_type) {
2197
+ if (this.config[that.devices[de].device].itemname == item.f_device_type) {
2196
2198
  that.data['device' + that.devices[de].n].push({
2197
2199
  f_device_type: item.f_device_type,
2198
2200
  f_items: item.f_items
@@ -2212,15 +2214,15 @@ export default {
2212
2214
  this.init()
2213
2215
  }
2214
2216
  if(this.parentPage && this.parentPage=='CurrentCreate'){
2215
- let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2216
- if (isRecodr) {
2217
- if (isRecodr=='true') {
2217
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2218
+ if (isRecodr) {
2219
+ if (isRecodr == 'true') {
2218
2220
  this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2219
- // 初始化录音
2220
- let resse = this.record()
2221
- }
2221
+ // 初始化录音
2222
+ let resse = this.record()
2222
2223
  }
2223
2224
  }
2225
+ }
2224
2226
  this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2225
2227
  } else {
2226
2228
  let that = this
@@ -2228,10 +2230,10 @@ export default {
2228
2230
  if (this.role == 'view') {
2229
2231
  id = this.item.id
2230
2232
  }
2231
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
2233
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${id}'`}}).then((respanse) => {
2232
2234
  if (respanse.data.length != 0) {
2233
- that.data = Object.assign(that.data,respanse.data[0])
2234
- if(respanse.data[0].f_devices) {
2235
+ that.data = Object.assign(that.data, respanse.data[0])
2236
+ if (respanse.data[0].f_devices) {
2235
2237
  for (let da in that.devices) {
2236
2238
  that.$set('data.device' + that.devices[da].n, [])
2237
2239
  }
@@ -2248,10 +2250,10 @@ export default {
2248
2250
  }
2249
2251
  Util.replaceFalse(that.data)
2250
2252
  Util.booleanFilter(that.data)
2251
- if(this.role == 'view'){
2253
+ if (this.role == 'view') {
2252
2254
  Util.ratifyPics(that.data)
2253
- }else{
2254
- Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
2255
+ } else {
2256
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2255
2257
  }
2256
2258
  } else {
2257
2259
  alert("该安检单可能已不在本地!")
@@ -2292,6 +2294,7 @@ export default {
2292
2294
  .noclickbut {
2293
2295
  pointer-events: none;
2294
2296
  }
2297
+
2295
2298
  .tab-befor-img (@url) {
2296
2299
  content: '';
2297
2300
  background-image: url("@{url}");
@@ -2310,16 +2313,19 @@ export default {
2310
2313
  margin: 0.3em 0;
2311
2314
  }
2312
2315
  }
2313
- .repair-details-class{
2316
+
2317
+ .repair-details-class {
2314
2318
  &::before {
2315
2319
  .tab-befor-img("../../../assets/huneiweixiu1.png");
2316
2320
  }
2317
2321
  }
2322
+
2318
2323
  .repair-info-class {
2319
2324
  &::before {
2320
2325
  .tab-befor-img("../../../assets/baoxiuxinxi1.png");
2321
2326
  }
2322
2327
  }
2328
+
2323
2329
  .repair-user-info-class {
2324
2330
  &::before {
2325
2331
  .tab-befor-img("../../../assets/jibenxinxi1.png")
@@ -2371,11 +2377,13 @@ export default {
2371
2377
  .tab-befor-img("../../../assets/guzhanghuizong1.png")
2372
2378
  }
2373
2379
  }
2380
+
2374
2381
  .photo-write-class {
2375
2382
  &::before {
2376
2383
  .tab-befor-img("../../../assets/zaoju.png")
2377
2384
  }
2378
2385
  }
2386
+
2379
2387
  .delay-apply-class {
2380
2388
  &::before {
2381
2389
  .tab-befor-img("../../../assets/yonghubaoxiu.png")
@@ -2387,44 +2395,49 @@ export default {
2387
2395
  .tab-befor-img("../../../assets/fanhui.png")
2388
2396
  }
2389
2397
  }
2398
+
2390
2399
  .butt2 {
2391
2400
  display: inline;
2392
2401
  float: right;
2393
2402
  width: 10px;
2394
2403
  text-align: center;
2395
- align-items:center;
2404
+ align-items: center;
2396
2405
  position: absolute;
2397
- top:50%;
2406
+ top: 50%;
2398
2407
 
2399
- left:90%;
2400
- transform: translate(-50%,-50%);
2408
+ left: 90%;
2409
+ transform: translate(-50%, -50%);
2401
2410
  }
2402
- .linesty{
2411
+
2412
+ .linesty {
2403
2413
  display: inline-block;
2404
- height:1px;
2405
- width:100%;
2406
- background:#d0d0d0;
2407
- overflow:hidden;
2414
+ height: 1px;
2415
+ width: 100%;
2416
+ background: #d0d0d0;
2417
+ overflow: hidden;
2408
2418
  vertical-align: middle;
2409
2419
  }
2410
- .spanboder{
2411
- border-bottom:2px solid #499edf;
2420
+
2421
+ .spanboder {
2422
+ border-bottom: 2px solid #499edf;
2412
2423
  padding-bottom: 8px
2413
2424
  }
2425
+
2414
2426
  .app-botton {
2415
- position:fixed;
2427
+ position: fixed;
2416
2428
  background: #87b2dd;
2417
- right:8px;
2429
+ right: 8px;
2418
2430
  color: #FFF;
2419
2431
  padding: 8px;
2420
2432
  text-align: center;
2421
2433
  font-size: 1.2em;
2422
2434
  z-index: 10;
2423
- opacity:0.5;
2435
+ opacity: 0.5;
2424
2436
  bottom: 50px;
2425
2437
  margin-top: -10px;
2426
2438
  height: 40px;
2427
2439
  }
2440
+
2428
2441
  .android-repair-order > div > ul a {
2429
2442
  font-size: 12px;
2430
2443
  color: #333333;