safecheck-client 3.0.34-7 → 3.0.34-70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. package/package.json +1 -1
  2. package/src/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
  3. package/src/App.vue +31 -31
  4. package/src/assets/123.png +0 -0
  5. package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
  6. package/src/components/LoadData.vue +62 -0
  7. package/src/components/NewDefectList/DefectListNew.vue +1 -0
  8. package/src/components/android/AndroidDefectDeal.vue +1 -0
  9. package/src/components/android/AndroidDefectDealBeforeSafe.vue +502 -0
  10. package/src/components/android/AreaSelect.vue +198 -0
  11. package/src/components/android/BuildingSelect.vue +192 -0
  12. package/src/components/android/CheckPlanSelect.vue +229 -0
  13. package/src/components/android/PaperFeedback.vue +1514 -1481
  14. package/src/components/android/PaperFeedbackTemp.vue +1470 -1470
  15. package/src/components/android/QRCode/QRCodeBinding.vue +300 -0
  16. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  17. package/src/components/android/SafePlanItem.vue +509 -509
  18. package/src/components/android/SafecheckDevices.vue +1298 -1298
  19. package/src/components/android/SafecheckDevicesTemp.vue +1333 -1333
  20. package/src/components/android/SafecheckOrderV.vue +8 -12
  21. package/src/components/android/UserinfoSelect.vue +702 -0
  22. package/src/components/android/examples/SafeListExamples.vue +96 -0
  23. package/src/components/android/examples/UserExamples.vue +130 -0
  24. package/src/components/android/userinfo/SafecheckUserInfo.vue +776 -776
  25. package/src/components/rongcheng/AddPlanItem.vue +4 -0
  26. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  27. package/src/components/rongcheng/CheckSearchUser.vue +40 -14
  28. package/src/components/rongcheng/PaperStatem.vue +6 -1
  29. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  30. package/src/components/rongcheng/PhoneUpUserinfo.vue +0 -92
  31. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  32. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  33. package/src/components/safecheckNew/android/SafecheckOrderV.vue +2731 -2731
  34. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +4 -4
  35. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -0
  36. package/src/filiale/baiyin/android.js +1 -0
  37. package/src/filiale/baiyin/pc/CheckSearchUser.vue +2 -2
  38. package/src/filiale/baiyin/pc/DefectListNew.vue +3 -3
  39. package/src/filiale/baiyin/pc/PaperList.vue +7 -7
  40. package/src/filiale/bayan/android/PaperFeedback.vue +1651 -1651
  41. package/src/filiale/bayan/android/SafecheckDevices.vue +1303 -1303
  42. package/src/filiale/bayan/android/SafecheckOrderV.vue +52 -29
  43. package/src/filiale/bayan/android/SafecheckUserInfo.vue +863 -863
  44. package/src/filiale/bayan/pc/PaperList.vue +1 -0
  45. package/src/filiale/dexin/android/SafecheckDevices.vue +1305 -1305
  46. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  47. package/src/filiale/hanzhong/android/PaperFeedback.vue +1477 -1477
  48. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1313 -1313
  49. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +786 -786
  50. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  51. package/src/filiale/huaran/android.js +12 -0
  52. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  53. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  54. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  55. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  56. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  57. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  58. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  59. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  60. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  61. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  62. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  63. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  64. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  65. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  66. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  67. package/src/filiale/huaran/pc.js +27 -0
  68. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  69. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  70. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
  71. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -0
  72. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  73. package/src/filiale/jiaxian/android.js +4 -0
  74. package/src/filiale/jingyang/android/AddPlanItem.vue +458 -458
  75. package/src/filiale/jingyang/android/CurrentCreate.vue +1080 -1080
  76. package/src/filiale/jingyang/android/PaperFeedback.vue +1493 -1493
  77. package/src/filiale/jingyang/android/SafecheckOrderV.vue +2734 -2734
  78. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +781 -781
  79. package/src/filiale/jingyang/android.js +15 -15
  80. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  81. package/src/filiale/pingxiang/android/PaperFeedback.vue +1399 -1399
  82. package/src/filiale/qingjian/android/SafecheckDevices.vue +1269 -1269
  83. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +800 -800
  84. package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -0
  85. package/src/filiale/qingtongxia/android/CurrentCreate.vue +1053 -0
  86. package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -0
  87. package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -0
  88. package/src/filiale/qingtongxia/android.js +14 -10
  89. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2696 -2696
  90. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  91. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  92. package/src/filiale/ruihua/android.js +11 -0
  93. package/src/filiale/shanxian/pc/checkUserList.vue +4 -4
  94. package/src/filiale/shiquan/android/SafecheckDevices.vue +1269 -1269
  95. package/src/filiale/siyang/android/AddPlanItem.vue +446 -0
  96. package/src/filiale/siyang/android/SafecheckUserInfo.vue +789 -789
  97. package/src/filiale/siyang/android.js +1 -0
  98. package/src/filiale/siyang/pc/CheckBookSearchArea.vue +645 -0
  99. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -0
  100. package/src/filiale/siyang/pc/CheckSearchUser.vue +982 -0
  101. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -0
  102. package/src/filiale/siyang/pc/NewCheckpaper.vue +1938 -1938
  103. package/src/filiale/siyang/pc/checkPlanList.vue +367 -0
  104. package/src/filiale/siyang/pc/checkUserList.vue +790 -786
  105. package/src/filiale/siyang/pc.js +21 -16
  106. package/src/filiale/tongchuan/android/Select.vue +421 -0
  107. package/src/filiale/tongchuan/android.js +1 -0
  108. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +3 -1
  109. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +6 -2
  110. package/src/filiale/tongchuan/pc/HiddenSituation.vue +3 -1
  111. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +13 -22
  112. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1 -1
  113. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +5 -2
  114. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  115. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  116. package/src/filiale/weinan/android/SafecheckDevices.vue +1295 -1295
  117. package/src/filiale/weinan/android/SafecheckOrderV.vue +1 -1
  118. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +75 -62
  119. package/src/filiale/weinan/pc/CheckDetail.vue +11 -11
  120. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  121. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  122. package/src/filiale/weinan/pc/checkUserList.vue +49 -113
  123. package/src/filiale/weinan/pc.js +1 -0
  124. package/src/filiale/wuan/android/SafecheckOrderV.vue +1 -0
  125. package/src/filiale/wuan/android/SafecheckUserInfo.vue +4 -0
  126. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  127. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
  128. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
  129. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +13 -11
  130. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +269 -269
  131. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +96 -30
  132. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +10 -10
  133. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1128 -1128
  134. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +972 -972
  135. package/src/filiale/yangchunboneng/pc/PaperList.vue +773 -773
  136. package/src/filiale/yongzhou/android/PaperFeedback.vue +1519 -1519
  137. package/src/filiale/yongzhou/android/SafecheckDevices.vue +1294 -1294
  138. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +776 -776
  139. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  140. package/src/filiale/yuansheng/android/SwitchValve.vue +322 -322
  141. package/src/filiale/yuansheng/android.js +17 -17
  142. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  143. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1508 -1508
  144. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1270 -1270
  145. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +784 -784
  146. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  147. package/src/main.js +33 -33
  148. package/src/safecheck-android.js +9 -0
  149. package/src/safecheck-page.js +10 -0
@@ -1,1333 +1,1333 @@
1
- <template>
2
- <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
- <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
- <!--<blockquote class="blockquote">-->
5
- <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
- <!--</blockquote>-->
7
- <!--</div>-->
8
- <div class="panel panel-default auto repair-info-content">
9
- <div class="panel-body" style="padding: 0">
10
- <!-- 安检项内容 -->
11
- <div class="auto repair-info-content compatible" style="padding: 0">
12
- <div class="row auto" style="padding: 0">
13
- <div v-show="false" class="{{shuclass}}" v-if=" device.device != '信息填写'">
14
- <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
- </div>
16
- <!--<div class="{{shuclass}}" v-if="device.device != '信息填写' && candelete">-->
17
- <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
- <!--</div>-->
19
- <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
- <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
- <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
- <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
- <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}} <br/>{{row.remark}} <span v-show="row.verification_state" :style="{color:row.verification_state==='pass'?'green':'red'}">{{row.verification_text}}</span></label>
24
- <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
25
- <!--<datepicker placeholder="请选择时间"-->
26
- <!--:value.sync="row.f_content"-->
27
- <!--v-model="row.f_content"-->
28
- <!--:format="'yyyy-MM-dd'"-->
29
- <!--v-if="!show && row.type == 'date'"-->
30
- <!--:readonly="true"-->
31
- <!--&gt;</datepicker>-->
32
- <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
33
- <div class="auto" >
34
- <div class="panel">
35
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
36
- <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
37
- <div class="col-sm-4" v-show="row.f_path">
38
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
39
- </div>
40
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
41
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
42
- </div>
43
- <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
44
- </div>
45
- </div>
46
- </div>
47
- </div>
48
- </div>
49
- <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
50
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
51
- </div>
52
- <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
53
- <datepicker id="f_making_date" :placeholder= row.f_item_name
54
- :value.sync="row.f_item_value"
55
- v-if="row.type == 'date'"
56
- v-show="row.isshow"
57
- :disabled-days-of-Week="[]"
58
- :format="'yyyy-MM-dd HH:mm:ss'"
59
- :show-reset-button="reset" readonly="readonly">
60
- </datepicker>
61
- </div>
62
-
63
- <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
64
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
65
- </div>
66
- <!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
67
- <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
68
- <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
69
- <input-select v-if="row.type == 'inputSelector'"
70
- v-show="row.isshow"
71
- :value.sync="row.selected"
72
- v-model="row.selected"
73
- :readonly="false"
74
- :options="row.options"
75
- @change="changse"
76
- @click="transelation(idxs)"></input-select>
77
- <v-select style="float: left" :value.sync="row.selected"
78
- v-model="row.selected"
79
- v-if="row.type == 'selector'"
80
- :search="false"
81
- v-show="row.isshow"
82
- placeholder='请选择'
83
- :options="row.options"
84
- :disabled="role == 'androidview' || row.readonly"
85
- @change="changse"
86
- @click="transelation(idxs)"
87
- :multiple="row.multiple"
88
- :close-on-select="!row.multiple" clear-button></v-select>
89
- <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
90
- <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
91
- <!-- <input type="radio" :name="row.f_item_name" @click="disSelect($parent.idxs,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >-->
92
- <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
93
- <span>{{item.label}}</span>
94
- </div>
95
- </div>
96
- <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
97
- <div style="float: left" v-for="item in row.options">
98
- <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
99
- <span>{{item.label}}</span>
100
- </div>
101
- </div>
102
- <div style="clear: both">
103
- <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
104
- <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
105
- <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
106
- </div>
107
- </div>
108
- <div style="clear: both">
109
- <!-- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (livedispose == 'true' || livedispose == true) " >-->
110
- <!-- <label class="fivelabel">现场已处理</label>-->
111
- <!-- <v-select :value="row.f_live_dispose"-->
112
- <!-- :value-single="true"-->
113
- <!-- :options="lives"-->
114
- <!-- :disabled="role == 'androidview'"-->
115
- <!-- @change="changlive"-->
116
- <!-- @click="transelation(idxs)"-->
117
- <!-- close-on-select clear-button></v-select>-->
118
- <!-- </div>-->
119
- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
120
- <label class="fivelabel">处理方式</label>
121
- <v-select
122
- :value="row.f_deal_dispose"
123
- :value-single="true"
124
- :options="deals"
125
- :disabled="role == 'androidview'"
126
- @change="changdeal"
127
- @click="transelation(idxs)"
128
- close-on-select clear-button>
129
- </v-select>
130
- </div>
131
- <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
132
- <label class="fivelabel">处理时效:</label>
133
- <datepicker
134
- :value.sync="row.f_handle_date"
135
- v-model="row.f_handle_date"
136
- :format="'yyyy-MM-dd 00:00:00'"
137
- placeholder="请选择"
138
- style="width: 60%">
139
- </datepicker>
140
- </div>
141
- <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
142
- ☆{{row.tooltip}}
143
- </div>
144
- <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
145
- <div class="auto" style="margin:1px;">
146
- <div class="panel">
147
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
148
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
149
- <div class="col-sm-4" v-show="row.f_path">
150
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
151
- </div>
152
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
153
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
154
- </div>
155
- <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
156
- </div>
157
- </div>
158
- </div>
159
- </div>
160
- <!--多张隐患照片-->
161
- <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
162
- <div class="panel">
163
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
164
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
165
- <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
166
- <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
167
- </div>
168
- <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">
169
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
170
- </div>
171
- <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
172
- </div >
173
- </div>
174
- </div>
175
- </div>
176
- <div style="display: flex;flex-wrap: wrap;margin-top: 10px" v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && this.showXCImg">
177
- <label class="fivelabel">整改照片:</label>
178
- <div class="auto" style="margin:1px;">
179
- <div class="panel">
180
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
181
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
182
- <div class="col-sm-4" v-show="row.f_repair_path">
183
- <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140" height="140"></img-self>
184
- </div>
185
- <div class="col-sm-4" v-show="!row.f_repair_path" @click="takePic(idxs, row.f_item_name,'f_repair_path',row.f_defect_level)">
186
- <img src="../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
187
- </div>
188
- <img v-show="row.f_repair_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
189
- </div>
190
- </div>
191
- </div>
192
- </div>
193
- </div>
194
- </div>
195
- </div>
196
-
197
- <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌'"-->
198
- <!--&gt;</v-select>-->
199
- <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' @change="getgasmodel" placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"-->
200
- <!--&gt;</v-select>-->
201
- <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
202
- <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
203
- <!-- :checked="row.f_content == '有'"-->
204
- <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
205
- <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
206
- <!-- </div>-->
207
- <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
208
- </div>
209
- </div>
210
- </div>
211
- <div style="border-top: 1px solid #D4D4D4"></div>
212
- </div>
213
- </div>
214
- </div>
215
- </template>
216
- <script>
217
- import Vue from 'vue'
218
- import * as Util from '../Util'
219
-
220
- export default {
221
- title: '维修列表信息',
222
- data() {
223
- return {
224
- // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
225
- // meterstyle:[],
226
- hiddenDangerImgNumber:0,//隐患图片数
227
- shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
228
- shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
229
- // labels:[],
230
- meternum:'',
231
- ischecked:'有',
232
- gasmodel:'',
233
- textstyle:'color: red',
234
- paper: this.$parent.$parent.data,
235
- f_items:[],
236
- page:{},
237
- selectindex:null,
238
- lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
239
- deals:[{label: '现场处理', value: '现场处理'},{label: '自行处理', value: '自行处理'}],
240
- f_live_dispose:'否',
241
- f_deal_dispose:'未处理',
242
- // 初始表底
243
- f_initial_base: {},
244
- // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
245
- f_gas_aberrant_number: {},
246
- // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
247
- f_fee_aberrant_number: {},
248
- // 累购气量
249
- f_total_gas: {},
250
- // 累购金额
251
- f_total_fee: {},
252
- // 已用气量
253
- f_table_base: {},
254
- // 已用金额
255
- f_fee_base: {},
256
- // 剩余气量
257
- f_gas_balance: {},
258
- // 剩余金额
259
- f_fee_balance: {},
260
- // 表端剩余金额
261
- f_table_balance: {},
262
- // 气量异常差值允许误差
263
-
264
- //物联网表数据存储
265
- f_balance_amount:{},//物联网表剩余金额
266
- f_meter_base:{},//物联网表读数
267
- f_balance_amount1:{},//物联网表现场录入的表上剩余金额
268
- f_meter_base1:{},//物联网表现场录入的表字轮数
269
- f_meter_aberrant_number1: {},//物联网表 表数异常差值
270
- f_fee_aberrant_number1: {},//物联网 表金额异常差值
271
- gasDeviation: (
272
- function (_this) {
273
- let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
274
- if (deviation && !isNaN(deviation)) {
275
- return deviation
276
- } else {
277
- return 0
278
- }
279
- }
280
- )(this),
281
- // 金额异常差值允许误差
282
- feeDeviation: (
283
- function (_this) {
284
- let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
285
- if (deviation && !isNaN(deviation)) {
286
- return deviation
287
- } else {
288
- return 0
289
- }
290
- }
291
- )(this),
292
- // 字轮异常差值允许误差
293
- meterbase: (
294
- function (_this) {
295
- let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
296
- if (deviation && !isNaN(deviation)) {
297
- return deviation
298
- } else {
299
- return 0
300
- }
301
- }
302
- )(this),
303
- showElse:false, //控制其他选项是否显示
304
- showXCImg: false, // 是否显示现场整改拍照选项
305
- showZXTime: false // 是否显示自行整改处理时效
306
- }
307
- },
308
- props: ['config','device','idx','operation','role'],
309
- // props: {
310
- // // 维修对应的用户数据收集
311
- // model: {
312
- // type: Object
313
- // },
314
- // service:{
315
- // type: Object
316
- // },
317
- // show: {
318
- // type: Boolean,
319
- // default: false
320
- // },
321
- // repairitem:{
322
- // type: Object
323
- // },
324
- // shutype:'heng',
325
- // tabs:{
326
- // type: Object
327
- // },
328
- // repairdetails:{
329
- // type: Object
330
- // },
331
- // faultshow:{
332
- // type: Object
333
- // },
334
- // issee:''
335
- // },
336
- methods: {
337
- changse(val){
338
- if(val == undefined){
339
- return
340
- }
341
- if(this.selectindex != null) {
342
- if(this.f_items[this.selectindex].type == 'selector'){
343
- this.f_items[this.selectindex].f_item_value = val
344
- }else if(this.f_items[this.selectindex].type == 'inputSelector'){
345
- this.f_items[this.selectindex].f_item_value = val.target.value
346
- }
347
- }
348
- },
349
- changlive(val){
350
- if(val == undefined){
351
- return
352
- }
353
- if(this.selectindex != null) {
354
- this.f_items[this.selectindex].f_live_dispose = val
355
- }
356
- },
357
- changdeal(val){
358
- if(val == undefined){
359
- return
360
- }
361
- if(this.selectindex != null) {
362
- this.f_items[this.selectindex].f_deal_dispose = val
363
- }
364
- },
365
- switchDetails(detailsType, event){
366
- if (event.srcElement.checked) {
367
- for(var i = 0;i<this.Detail.details.length;i++){
368
- if(this.Detail.details[i].f_project == detailsType){
369
- this.Detail.details[i].f_content = '有'
370
- this.ischecked = '有'
371
- return
372
- }
373
- }
374
- } else {
375
- this.Detail.imgs = []
376
- for(var i = 0;i<this.Detail.details.length;i++){
377
- if(this.Detail.details[i].f_project == detailsType){
378
- this.Detail.details[i].f_content = '无'
379
- this.ischecked = '无'
380
- }else{
381
- this.Detail.details[i].f_content = ''
382
- }
383
- }
384
- }
385
- },
386
- getgasmodel(val){
387
- this.gasmodel = val
388
- },
389
- getradios(val,flag){
390
- let Reoptions = []
391
- for (let i = 0;i<this.repairdetails.length;i++) {
392
- var t = false
393
- if(this.repairdetails[i].f_type == this.repairitem.header ){
394
- for(var j =0;j<this.repairdetails[i].details.length;j++){
395
- if(this.repairdetails[i].details[j].f_project == val ){
396
- Reoptions = this.repairdetails[i].details[j].options
397
- t = true
398
- break
399
- }
400
- }
401
- }
402
- if(t){
403
- break
404
- }
405
- }
406
- for(let j = 0;j<Reoptions.length;j++){
407
- if(Reoptions[j].data == flag){
408
- for(var e = 0;e<this.Detail.details.length;e++){
409
- if(this.Detail.details[e].f_project == val){
410
- this.Detail.details[e].f_status = Reoptions[j].f_status
411
- return
412
- }
413
- }
414
- break
415
- }
416
- }
417
- },
418
- deletedetails(){
419
- this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
420
- if (res === 'confirm') {
421
- for(var i = 0;i<this.tabs.length;i++){
422
- if(this.tabs[i].number == this.repairitem.number){
423
- this.tabs.splice(i, 1)
424
- this.model.servicerepair.splice(this.repairitem.number, 1)
425
- for(let t = i;t < this.tabs.length;t++ ) {
426
- this.tabs[t].number -= 1
427
- }
428
- return
429
- }
430
- }
431
- }
432
- })
433
- },
434
- takePic(prop, title, pathname='null') {
435
- if (this.role == 'androidview') {
436
- return
437
- }
438
- HostApp.__callback__ = this.cameraCallBack
439
- HostApp.__this__ = this
440
- //tag
441
- let fileName
442
- if (pathname == 'null') {
443
- if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
444
- fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
445
- } else {
446
- fileName = Util.getFileName(this.f_items[prop].f_path)
447
- }
448
- } else {
449
- if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
450
- fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
451
- } else {
452
- fileName = Util.getFileName(this.f_items[prop][pathname])
453
- }
454
- }
455
- let jingweidu = ''
456
- if (this.$parent.$parent.is_has_jingweidu == 'true'){
457
- const obj = HostApp.getGpsDetailAddress()
458
- jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
459
- }
460
- //tag
461
- //tag
462
- HostApp._open_a_page({type: 'boomerang',
463
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
464
- param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'","'+ title +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu}
465
- })
466
- },
467
- cameraCallBack(prop,title, fileName,pathname) {
468
- if(title == '到访不遇/拒检照片'){
469
- if(this.$parent.$parent.data.f_entry_status == '到访不遇'){
470
- this.$parent.$parent.data.f_noanswer_path = fileName + '?' + Math.random()
471
- }else{
472
- this.$parent.$parent.data.f_nongasuser_path = fileName + '?' + Math.random()
473
- }
474
- }
475
- //tag
476
- if (pathname == 'null') {
477
- //tag
478
- HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
479
- //tag
480
- HostApp.__callback__ = null
481
- HostApp.__this__ = null
482
- } else {
483
- //tag
484
- //tag)
485
- HostApp.__this__.$set( 'f_items['+prop+'].'+pathname+'', fileName + '?' + Math.random())
486
- HostApp.__callback__ = null
487
- HostApp.__this__ = null
488
- }
489
- if(this.f_items[prop].is_verification){
490
- let path=fileName.replace('http://newimg','')
491
- path=path.replace('file://','')
492
- console.log('fileName',fileName)
493
- console.log(path)
494
- let res=HostApp.pictureVerificationAI(path,title)
495
- if(res.code==200){
496
- if(res.type_result){
497
- // this.$showMessage("检测通过,当前照片为"+title)
498
- this.f_items[prop].verification_text=`检测通过,当前照片为 ${title}`
499
- this.f_items[prop].verification_state='pass'
500
- }else{
501
- // this.$showMessage("检测失败,未识别到当前照片为 "+title+",请重新拍摄!")
502
- this.f_items[prop].verification_text=`检测失败,未识别到当前照片为'${title}',请重新拍摄!`
503
- this.f_items[prop].verification_state='npass'
504
- }
505
- }else{
506
- // this.$showMessage("检测失败,请重试!")
507
- this.f_items[prop].verification_text=`检测失败,请重试!`
508
- this.f_items[prop].verification_state='npass'
509
- }
510
- }
511
- },
512
- delfile(prop, fileName, pathname='null') {
513
- if (pathname == 'null') {
514
- //tag
515
- //tag)
516
- if(fileName == Vue.nopic){
517
- return
518
- } else {
519
- HostApp.delfile(fileName)
520
- this.f_items[prop].f_path = Vue.nopic
521
- }
522
- }else {
523
- //tag
524
- //tag)
525
- if(fileName == Vue.nopic){
526
- return
527
- } else {
528
- HostApp.delfile(fileName)
529
- this.f_items[prop][pathname] = Vue.nopic
530
- }
531
- }
532
- },
533
- adddetails(){
534
- // 下标作为序号,取值用。 增加 序号得依次增加
535
- if(this.tabs.length > 0){
536
- for(let i = this.tabs.length-1;i > 0 ;i-- ){
537
- if(this.tabs[i].header == this.repairitem.header){
538
- if(this.model.servicerepair.length > 0){
539
- for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
540
- if(this.model.servicerepair[j].f_type == this.repairitem.header){
541
- this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
542
- this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
543
- for(let t = i+2;t < this.tabs.length;t++ ) {
544
- this.tabs[t].number += 1
545
- }
546
- this.faultshow.number += this.faultshow.number + 1
547
- return
548
- }
549
- }
550
- }
551
- }
552
- }
553
- }
554
- },
555
- transelation(val){
556
- this.selectindex = val
557
- },
558
- towatch(){
559
- for(let n in this.f_items){
560
- if(typeof this.f_items[n]=='function'){
561
- continue
562
- }
563
- if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
564
- // 监听下拉框,如果有隐患,需要拍照
565
- this.$watch('f_items['+n+'].selected',function(val,old) {
566
- if(val==old){
567
- return
568
- }
569
- // 下拉框值
570
- //tag)
571
- // 下拉框所属设备
572
- //tag
573
- // 下拉框所属项
574
- //tag
575
- if (val == undefined || val.length == 0 || val[0] == ''){
576
- this.f_items[n].f_path = ''
577
- this.f_items[n].f_is_defect = ''
578
- this.f_items[n].f_defect_level = ''
579
- this.f_items[n].f_live_dispose = ''
580
- this.f_items[n].f_deal_dispose = ''
581
- this.f_items[n].tooltip = ''
582
- this.f_items[n].f_else = ''
583
- return
584
- }
585
- let shImage = false
586
- if(val.indexOf('其他') == -1){
587
- this.f_items[n].f_else = ''
588
- }
589
- // if(this.config[this.device.device].items[item].type == 'selector'){
590
- // this.f_items[n].f_item_value = val
591
- // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
592
- // this.f_items[n].f_item_value = val[0]
593
- // }
594
- // 在配置中查找该项
595
- for (let item in this.config[this.device.device].items) {
596
- if(typeof this.config[this.device.device].items[item]=='function'){
597
- continue
598
- }
599
- let type = this.config[this.device.device].items[item].type
600
- let multiple = this.config[this.device.device].items[item].multiple?this.config[this.device.device].items[item].multiple:false
601
- let options = this.config[this.device.device].items[item].options
602
- if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
603
- if(this.f_items[n].f_item_name == '入户状态'){
604
- this.$parent.$parent.data.f_entry_status = val[0]
605
- if(val[0] == '到访不遇' || val[0] == '拒检'){
606
- this.f_items.forEach(item => {
607
- if (item.f_item_name == '到访不遇/拒检照片') {
608
- item.isshow = true
609
- item.checkmust = true
610
- }
611
- })
612
- for (let item in this.config[this.device.device].items) {
613
- if(item == '到访不遇/拒检照片'){
614
- this.config[this.device.device].items[item].isshow = true
615
- this.config[this.device.device].items[item].checkmust = true
616
- }
617
- }
618
-
619
- }else{
620
- this.f_items.forEach(item => {
621
- if (item.f_item_name == '到访不遇/拒检照片') {
622
- item.isshow = false
623
- item.checkmust = false
624
- }
625
- })
626
- for (let item in this.config[this.device.device].items) {
627
- if(item == '到访不遇/拒检照片'){
628
- this.config[this.device.device].items[item].isshow = false
629
- this.config[this.device.device].items[item].checkmust = false
630
- }
631
- }
632
-
633
- }
634
- }
635
- for (let i in options) {
636
- if(typeof options[i]=='function'){
637
- continue
638
- }
639
- let value
640
- if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
641
- value = val[0]
642
- }else if (this.config[this.device.device].items[item].type == 'inputSelector'){
643
- value = val
644
- }
645
- //tag)
646
- // 如果未选择,清空图片、隐患信息等
647
- if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
648
- this.f_items[n].f_path = ''
649
- this.f_items[n].f_is_defect = ''
650
- this.f_items[n].f_defect_level = ''
651
- this.f_items[n].f_live_dispose = ''
652
- this.f_items[n].f_deal_dispose = ''
653
- this.f_items[n].tooltip = ''
654
- }
655
- if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
656
- // 找到选中的项了
657
- //tag
658
- if(options[i].isdefect == true ){
659
- shImage = true
660
- }
661
- if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
662
- shImage = false
663
- }
664
- //tag
665
- if(shImage){
666
- this.f_items[n].f_is_defect =true
667
- this.f_items[n].f_defect_level = options[i].level
668
- this.f_items[n].f_path = Vue.nopic
669
- this.f_items[n].f_live_dispose = '否'
670
- this.f_items[n].f_deal_dispose = '未处理'
671
- //tag
672
- this.f_items[n].tooltip= options[i].tooltip
673
- }else{
674
- this.f_items[n].f_path = ''
675
- this.f_items[n].f_is_defect = ''
676
- this.f_items[n].f_defect_level = ''
677
- this.f_items[n].f_live_dispose = ''
678
- this.f_items[n].f_deal_dispose = ''
679
- this.f_items[n].tooltip = ''
680
- }
681
- }
682
- }
683
- }
684
- }
685
- }
686
- )
687
- // this.$watch('other',function(val){
688
- // //tag
689
- // if(this.selectindex != null) {
690
- // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
691
- // if(index > -1){
692
- // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
693
- // }
694
- // }
695
- //
696
- // })
697
- }else if(this.f_items[n].type == 'radio') {
698
- // 监听单选框,如果有隐患,需要拍照
699
- this.$watch('f_items[' + n + '].f_item_value', function (val) {
700
- //tag)
701
- let options = this.f_items[n].options
702
- //tag)
703
- for (let i = 0; i < options.length; i++) {
704
- //tag)
705
- // 找到选中的项了
706
- if (options[i].value == val) {
707
- // 如果有隐患,拍图片
708
- if (options[i].isdefect) {
709
- this.f_items[n].f_is_defect = true
710
- this.f_items[n].f_defect_level = options[i].level
711
- this.f_items[n].f_path = Vue.nopic
712
- this.f_items[n].f_live_dispose = '否'
713
- this.f_items[n].f_deal_dispose = '未处理'
714
- this.f_items[n].tooltip = options[i].tooltip
715
- //tag)
716
- return
717
- }
718
- }
719
- }
720
- this.f_items[n].f_path = ''
721
- this.f_items[n].f_is_defect = ''
722
- this.f_items[n].f_defect_level = ''
723
- this.f_items[n].f_live_dispose = ''
724
- this.f_items[n].f_deal_dispose = ''
725
- this.f_items[n].tooltip = ''
726
- })
727
- }else if(this.f_items[n].type == 'checkbox') {
728
- // 监听单选框,如果有隐患,需要拍照
729
- this.$watch('f_items[' + n + '].f_item_value', function (val) {
730
- //tag)
731
- // 如果是手动赋值,不执行下面逻辑
732
- if (this.f_items[n].isReSet) {
733
- this.f_items[n].isReSet = false
734
- return
735
- }
736
- let options = this.f_items[n].options
737
- //tag)
738
- // 取出选中项中有隐患的详细信息
739
- let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
740
-
741
- if(selected.length > 0){
742
- // 防止赋值无限调用
743
- this.f_items[n].isReSet = true
744
- let selectList = selected.map(item => {return item.value})
745
- // 如果选中的是非隐患项,取消选中isdefect为true的
746
- if (selectList.indexOf(val[val.length - 1]) == -1) {
747
- this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
748
- this.f_items[n].f_path = ''
749
- this.f_items[n].f_is_defect = ''
750
- this.f_items[n].f_defect_level = ''
751
- this.f_items[n].f_live_dispose = ''
752
- this.f_items[n].f_deal_dispose = ''
753
- this.f_items[n].tooltip = ''
754
- return
755
- }
756
- // 如果选中的是隐患项,取消选中isdefect为false的
757
- this.f_items[n].f_item_value = selectList
758
- // 如果第一次选择隐患项,初始化
759
- if (!this.f_items[n].f_is_defect) {
760
- this.f_items[n].f_is_defect = true
761
- this.f_items[n].f_defect_level = selected[0].level
762
- this.f_items[n].f_path = Vue.nopic
763
- this.f_items[n].f_live_dispose = '否'
764
- this.f_items[n].f_deal_dispose = '未处理'
765
- //tag
766
- this.f_items[n].tooltip = selected[0].tooltip
767
- }
768
- //tag)
769
- return
770
- }
771
- this.f_items[n].f_path = ''
772
- this.f_items[n].f_is_defect = ''
773
- this.f_items[n].f_defect_level = ''
774
- this.f_items[n].f_live_dispose = ''
775
- this.f_items[n].f_deal_dispose = ''
776
- this.f_items[n].tooltip = ''
777
- })
778
- }
779
- }
780
- //tag)
781
- },
782
- getGasAberrantNumber(val) {
783
- //tag
784
- if(!this.f_table_base.index || !this.f_gas_balance.index){
785
- //tag
786
- return
787
- }
788
- // 先清空
789
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
790
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
791
- if(val=='已用气量'){
792
- //剩余气量 = 累购-已用
793
- this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_table_base.index].f_item_value
794
- if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
795
- this.f_items[this.f_gas_balance.index].f_item_value = null
796
- }
797
- }
798
-
799
- // 只有两个值都填了才会计算
800
- if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
801
- return
802
- }
803
- //tag)
804
- //tag
805
- //tag
806
-
807
- // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
808
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index?this.f_items[this.f_initial_base.index].f_item_value:0))
809
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
810
- // 如果数值有误,清空结果s
811
- if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
812
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
813
- }
814
- //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
815
- //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
816
- // 计算差值是否在范围内
817
- if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)|| Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
818
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
819
- this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
820
- }else{
821
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
822
- this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
823
- }
824
-
825
- //tag)
826
- },
827
- getFeeAberrantNumber(val) {
828
- //tag
829
- // 只有两个值都填了才会计算
830
- if(!this.f_fee_base.index || !this.f_fee_balance.index){
831
- //tag
832
- return
833
- }
834
- // 先清空
835
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
836
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
837
-
838
- if(val=='已用金额'){
839
- this.f_items[this.f_fee_balance.index].f_item_value=(this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
840
- if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
841
- this.f_items[this.f_fee_balance.index].f_item_value = null
842
- }
843
- }
844
-
845
- if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
846
- return
847
- }
848
-
849
- // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
850
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
851
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
852
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
853
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
854
- }
855
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
856
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
857
- // 计算差值是否在范围内
858
- if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
859
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
860
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
861
- }else{
862
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
863
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
864
- }
865
-
866
- //tag)
867
- },
868
- // 计算剩余金额和剩余金额差值
869
- getFeeAberrantNumber2(val) {
870
- //tag
871
- // 只有两个值都填了才会计算
872
- if(!this.f_table_balance.index || !this.f_fee_balance.index){
873
- //tag
874
- return
875
- }
876
- // 先清空
877
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
878
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
879
-
880
- // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
881
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
882
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
883
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
884
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
885
- }
886
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
887
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
888
- // 计算差值是否在范围内
889
- if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
890
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
891
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
892
- }else{
893
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
894
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
895
- }
896
- console.log('--------------------------------')
897
- console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
898
-
899
- //tag)
900
- },
901
- //物联网表字轮数改变触发
902
- getmeteraberrantnumber() {
903
- //tag
904
-
905
- // 先清空
906
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
907
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
908
- //tag
909
- // 只有两个值都填了才会计算
910
- if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
911
- return
912
- }
913
- //tag
914
- // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
915
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
916
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
917
- if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
918
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
919
- }
920
- //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
921
- // 计算差值是否在范围内
922
- //tag)
923
- if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
924
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
925
- }
926
-
927
- //tag)
928
- },
929
-
930
- disSelect(index, itemValue) {
931
- //tag)
932
- //tag)
933
- if (this.f_items[index].f_item_value == itemValue) {
934
- this.$set(`f_items[${index}].f_item_value`, '')
935
- }
936
- }
937
- },
938
- ready() {
939
- //tag
940
- //tag
941
- if(Vue.config.safecheck != undefined){
942
- if(Vue.config.safecheck.ApproveConfig != undefined){
943
- if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
944
- this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
945
- }
946
- if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
947
- this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
948
- }
949
- if(Vue.config.safecheck.ApproveConfig.showtorepair) {
950
- this.deals=[{label: '现场整改', value: '现场整改'},
951
- {label: '自行处理', value: '自行处理'},
952
- {label: '转维修', value: '报修'}
953
- ]
954
- }
955
- if(Vue.config.safecheck.ApproveConfig.Processing) {
956
- if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
957
- this.deals = Vue.config.safecheck.ApproveConfig.Processing
958
- }
959
- }
960
- if(Vue.config.safecheck.ApproveConfig.showXCImg) {
961
- this.showXCImg = true
962
- }
963
- if(Vue.config.safecheck.ApproveConfig.showZXTime) {
964
- this.showZXTime = true
965
- }
966
- if(Vue.config.safecheck.ApproveConfig.showtorepair) {
967
- }
968
- if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
969
- if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
970
- this.hiddenDangerImgNumber = 3
971
- }else {
972
- this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
973
- }
974
- }
975
- }
976
- }
977
- //tag
978
- //tag)
979
- //tag)
980
- //tag)
981
- //创建页面所需数据
982
- this.$set('piece', this.paper['device'+this.device.n][this.idx])
983
- //tag)
984
- //tag)
985
- let n = 0
986
- for (let item in this.config[this.device.device].items) {
987
- if(typeof this.config[this.device.device].items[item]=='function'){
988
- continue
989
- }
990
- let index = this.config[this.device.device].items[item].index-1
991
- this.$set('page.options' + index, [])
992
- //tag)
993
- //tag)
994
- //tag)
995
- // 先根据配置组接页面
996
- let f_item_value
997
- if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
998
- f_item_value = []
999
- // 判断选项的默认值
1000
- for (let defitem in this.config[this.device.device].items[item].options) {
1001
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1002
- continue
1003
- }
1004
- let defopt = this.config[this.device.device].items[item].options[defitem]
1005
- if (defopt.isdefault) {
1006
- //tag
1007
- f_item_value[0] = defopt.data
1008
- }
1009
- }
1010
- // if(this.config[this.device.device].items[item].data){
1011
- // f_item_value.push(this.config[this.device.device].items[item].data)
1012
- // }
1013
- }else if(this.config[this.device.device].items[item].type == 'radio'){
1014
- //为radio添加默认值
1015
- f_item_value=''
1016
- //tag)
1017
- for (let defitem in this.config[this.device.device].items[item].options) {
1018
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1019
- continue
1020
- }
1021
- //tag)
1022
- let defopt = this.config[this.device.device].items[item].options[defitem]
1023
- if (defopt.isdefault) {
1024
- //tag)
1025
- f_item_value = defopt.data
1026
- }
1027
- }
1028
- }else{
1029
- f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1030
- }
1031
- //tag)
1032
- let it = {
1033
- type: this.config[this.device.device].items[item].type,
1034
- f_item_name: item,
1035
- checkmust: this.config[this.device.device].items[item].checkmust,
1036
- f_item_value: f_item_value,
1037
- is_verification:this.config[this.device.device].items[item].is_verification,
1038
- verification_text:'',
1039
- verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1040
- f_is_defect: '',
1041
- multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1042
- isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1043
- readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1044
- remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1045
- f_path: '',
1046
- unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1047
- tooltip:'',
1048
- f_live_dispose:'',
1049
- f_deal_dispose:'',
1050
- f_else: '',
1051
- f_p1_path: '',
1052
- f_p2_path: '',
1053
- f_p3_path: ''
1054
- }
1055
- //tag)
1056
- //tag)
1057
- this.$set('f_items['+index+']',it)
1058
- if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1059
- if(this.config[this.device.device].items[item].type == 'selector'){
1060
- this.page['options' + index].push({
1061
- label: "请选择",
1062
- value: ''
1063
- })
1064
- }
1065
- for (let i in this.config[this.device.device].items[item].options) {
1066
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1067
- continue
1068
- }
1069
- this.page['options' + index].push({
1070
- label: this.config[this.device.device].items[item].options[i].data,
1071
- value: this.config[this.device.device].items[item].options[i].data,
1072
- tooltip: this.config[this.device.device].items[item].options[i].tooltip
1073
- })
1074
- }
1075
- if(this.config[this.device.device].items[item].type == 'selector'){
1076
- this.$set('f_items['+index+'].selected', f_item_value)
1077
- }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1078
- this.$set('f_items['+index+'].selected', f_item_value)
1079
- }
1080
-
1081
- this.$set('f_items['+index+'].options',this.page['options' + index])
1082
-
1083
- //tag)
1084
- } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1085
- //tag)
1086
- //tag
1087
- //tag)
1088
- for (let i in this.config[this.device.device].items[item].options) {
1089
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1090
- continue
1091
- }
1092
- //tag
1093
- this.page['options' + index].push({
1094
- label: this.config[this.device.device].items[item].options[i].data,
1095
- value: this.config[this.device.device].items[item].options[i].data,
1096
- isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1097
- level: this.config[this.device.device].items[item].options[i].level,
1098
- tooltip: this.config[this.device.device].items[item].options[i].tooltip
1099
- })
1100
- //tag)
1101
- }
1102
- //tag)
1103
- this.$set('f_items[' + index + '].options', this.page['options' + index])
1104
- this.$set('f_items[' + index + '].f_item_value', f_item_value)
1105
- //tag)
1106
- }
1107
- n = n + 1
1108
- }
1109
- if(!this.piece || JSON.stringify(this.piece) == '{}') {
1110
- // 如果没有,则新建
1111
- this.$set('piece.f_items',this.f_items)
1112
- this.$set('piece.f_device_type',this.device.device)
1113
- } else {
1114
- // 已经存在,把之前的数据重新填入
1115
- for (let f in this.f_items){
1116
- if(typeof this.f_items[f]=='function'){
1117
- continue
1118
- }
1119
- for(let p in this.piece.f_items) {
1120
- if(typeof this.piece.f_items[p]=='function'){
1121
- continue
1122
- }
1123
- if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1124
- //tag)
1125
- //tag)
1126
- this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1127
- //tag)
1128
- if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1129
- //tag)
1130
- //tag)
1131
- this.f_items[f].selected = this.piece.f_items[p].f_item_value
1132
- //tag)
1133
- }
1134
- // 取出特殊值
1135
- if (this.f_items[f].f_item_name == '初始表底') {
1136
- //tag)
1137
- this.f_initial_base.index = f
1138
- } else if (this.f_items[f].f_item_name == '累购气量') {
1139
- //tag)
1140
- this.f_total_gas.index = f
1141
- } else if (this.f_items[f].f_item_name == '已用气量') {
1142
- //tag)
1143
- this.f_table_base.index = f
1144
- this.$watch('f_items[' + f + '].f_item_value', function () {
1145
- this.getGasAberrantNumber('已用气量')
1146
- })
1147
- } else if (this.f_items[f].f_item_name == '剩余气量') {
1148
- //tag)
1149
- this.f_gas_balance.index = f
1150
- this.$watch('f_items[' + f + '].f_item_value', function () {
1151
- this.getGasAberrantNumber('')
1152
- })
1153
- } else if (this.f_items[f].f_item_name == '气量异常差值') {
1154
- //tag)
1155
- this.f_gas_aberrant_number.index = f
1156
- } else if (this.f_items[f].f_item_name == '累购金额') {
1157
- //tag)
1158
- this.f_total_fee.index = f
1159
- } else if (this.f_items[f].f_item_name == '已用金额') {
1160
- //tag)
1161
- this.f_fee_base.index = f
1162
- this.$watch('f_items[' + f + '].f_item_value', function () {
1163
- this.getFeeAberrantNumber('已用金额')
1164
- })
1165
- } else if (this.f_items[f].f_item_name == '剩余金额') {
1166
- //tag)
1167
- this.f_fee_balance.index = f
1168
- this.$watch('f_items[' + f + '].f_item_value', function () {
1169
- this.getFeeAberrantNumber('')
1170
- this.getFeeAberrantNumber2('')
1171
- })
1172
- } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1173
- this.f_table_balance.index = f
1174
- this.$watch('f_items[' + f + '].f_item_value', function () {
1175
- this.getFeeAberrantNumber2('')
1176
- })
1177
- } else if (this.f_items[f].f_item_name == '金额异常差值') {
1178
- //tag)
1179
- this.f_fee_aberrant_number.index = f
1180
- }else if (this.f_items[f].f_item_name == '表读数') {
1181
- //tag)
1182
- this.f_meter_base.index = f
1183
- }else if (this.f_items[f].f_item_name == '表剩余金额') {
1184
- //tag)
1185
- this.f_balance_amount.index = f
1186
- }else if (this.f_items[f].f_item_name == '字轮数') {
1187
- //tag)
1188
- this.f_meter_base1.index = f
1189
- this.$watch('f_items[' + f + '].f_item_value', function () {
1190
- this.getmeteraberrantnumber()
1191
- })
1192
- }else if (this.f_items[f].f_item_name == '表余额') {
1193
- //tag)
1194
- this.f_balance_amount1.index = f
1195
- this.$watch('f_items[' + f + '].f_item_value', function () {
1196
- this.getfeeaberrantnumber1()
1197
- })
1198
- }else if (this.f_items[f].f_item_name == '表数异常差值') {
1199
- //tag)
1200
- this.f_meter_aberrant_number1.index = f
1201
- }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1202
- //tag)
1203
- this.f_fee_aberrant_number1.index = f
1204
- }
1205
- }
1206
- }
1207
- for (let em in this.config[this.device.device].items) {
1208
- if(typeof this.config[this.device.device].items[em]=='function'){
1209
- continue
1210
- }
1211
- if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1212
- this.f_items[f].options =[]
1213
- for (let k in this.config[this.device.device].items[em].options) {
1214
- if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1215
- continue
1216
- }
1217
- this.f_items[f].options.push({
1218
- label: this.config[this.device.device].items[em].options[k].data,
1219
- value: this.config[this.device.device].items[em].options[k].data
1220
- })
1221
- }
1222
- }
1223
- }
1224
- }
1225
- //tag)
1226
- this.$set('piece.f_items',this.f_items)
1227
- }
1228
- this.towatch()
1229
- },
1230
- destroyed(){
1231
- let nullCount = 0
1232
- let metertitles
1233
- //判断当前是否有选中项
1234
- for (let row in this.f_items){
1235
- if(typeof this.f_items[row]=='function'){
1236
- continue
1237
- }
1238
- if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1239
- //tag
1240
- this.f_items[row].f_item_value = this.f_items[row].selected
1241
- }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1242
- //tag
1243
- this.f_items[row].f_item_value = this.f_items[row].selected
1244
- }
1245
- // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1246
- // nullCount = nullCount+1
1247
- // }else if(this.f_items[row].f_item_value != ''){
1248
- // nullCount = nullCount+1
1249
- // }
1250
- }
1251
- let picture = []
1252
- // for (let row in this.f_items){
1253
- // let a={}
1254
- // a.f_path = this.f_items[row].f_path
1255
- // a.name = this.f_items[row].f_item_name
1256
- // }
1257
- // picture.push(a)
1258
- this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1259
- //tag
1260
- },
1261
- computed:{
1262
-
1263
- }
1264
- }
1265
- </script>
1266
- <style lang="less" scoped>
1267
- .class-erro {
1268
- color: #a94442;
1269
- }
1270
- .fivelabel{
1271
- border: none;
1272
- border-left: 5px solid #A2C2EB;
1273
- float: left;
1274
- width: 35%;
1275
- margin-bottom: 3px;
1276
- text-align: left;
1277
- word-wrap: break-word;
1278
- white-space: normal;
1279
- }
1280
- .radiolabel{
1281
- border: none;
1282
- border-left: 5px solid #A2C2EB;
1283
- float: left;
1284
- width: 65%;
1285
- margin-bottom: 3px;
1286
- text-align: left;
1287
- word-wrap: break-word;
1288
- white-space: normal;
1289
- }
1290
-
1291
- .textlabel {
1292
- border: none;
1293
- border-left: 5px solid #A2C2EB;
1294
- width: 100%;
1295
- margin-bottom: 3px;
1296
- text-align: left;
1297
- word-wrap: break-word;
1298
- white-space: normal;
1299
- }
1300
- .textlabel1 {
1301
- border: none;
1302
- border-left: 5px solid #f7cb32;
1303
- width: 100%;
1304
- margin-bottom: 3px;
1305
- text-align: left;
1306
- word-wrap: break-word;
1307
- white-space: normal;
1308
- }
1309
- .spanrodio{
1310
- margin-right: 10px;
1311
- }
1312
- .div-photo{
1313
- width: auto;
1314
- height: auto;
1315
- /* margin-top: 10px; */
1316
- position: absolute;
1317
- bottom: 10px;
1318
- right: 10px;
1319
- }
1320
- .panel-self{
1321
- border-radius: 5px;
1322
- border:1px solid #c5e1f7;
1323
- //background-color: #F2F6FA;
1324
- }
1325
- .btn-photo{
1326
- border: 0;
1327
- border-radius: 7px;
1328
- background-color: #7dc1f4;
1329
- font: 15px PingFang-SC-Bold;
1330
- height: 20%;
1331
- }
1332
- </style>
1333
-
1
+ <template>
2
+ <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
+ <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
+ <!--<blockquote class="blockquote">-->
5
+ <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
+ <!--</blockquote>-->
7
+ <!--</div>-->
8
+ <div class="panel panel-default auto repair-info-content">
9
+ <div class="panel-body" style="padding: 0">
10
+ <!-- 安检项内容 -->
11
+ <div class="auto repair-info-content compatible" style="padding: 0">
12
+ <div class="row auto" style="padding: 0">
13
+ <div v-show="false" class="{{shuclass}}" v-if=" device.device != '信息填写'">
14
+ <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
+ </div>
16
+ <!--<div class="{{shuclass}}" v-if="device.device != '信息填写' && candelete">-->
17
+ <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
+ <!--</div>-->
19
+ <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
+ <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
+ <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
+ <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
+ <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}} <br/>{{row.remark}} <span v-show="row.verification_state" :style="{color:row.verification_state==='pass'?'green':'red'}">{{row.verification_text}}</span></label>
24
+ <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
25
+ <!--<datepicker placeholder="请选择时间"-->
26
+ <!--:value.sync="row.f_content"-->
27
+ <!--v-model="row.f_content"-->
28
+ <!--:format="'yyyy-MM-dd'"-->
29
+ <!--v-if="!show && row.type == 'date'"-->
30
+ <!--:readonly="true"-->
31
+ <!--&gt;</datepicker>-->
32
+ <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
33
+ <div class="auto" >
34
+ <div class="panel">
35
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
36
+ <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
37
+ <div class="col-sm-4" v-show="row.f_path">
38
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
39
+ </div>
40
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
41
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
42
+ </div>
43
+ <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
50
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
51
+ </div>
52
+ <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
53
+ <datepicker id="f_making_date" :placeholder= row.f_item_name
54
+ :value.sync="row.f_item_value"
55
+ v-if="row.type == 'date'"
56
+ v-show="row.isshow"
57
+ :disabled-days-of-Week="[]"
58
+ :format="'yyyy-MM-dd HH:mm:ss'"
59
+ :show-reset-button="reset" readonly="readonly">
60
+ </datepicker>
61
+ </div>
62
+
63
+ <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
64
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
65
+ </div>
66
+ <!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
67
+ <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
68
+ <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
69
+ <input-select v-if="row.type == 'inputSelector'"
70
+ v-show="row.isshow"
71
+ :value.sync="row.selected"
72
+ v-model="row.selected"
73
+ :readonly="false"
74
+ :options="row.options"
75
+ @change="changse"
76
+ @click="transelation(idxs)"></input-select>
77
+ <v-select style="float: left" :value.sync="row.selected"
78
+ v-model="row.selected"
79
+ v-if="row.type == 'selector'"
80
+ :search="false"
81
+ v-show="row.isshow"
82
+ placeholder='请选择'
83
+ :options="row.options"
84
+ :disabled="role == 'androidview' || row.readonly"
85
+ @change="changse"
86
+ @click="transelation(idxs)"
87
+ :multiple="row.multiple"
88
+ :close-on-select="!row.multiple" clear-button></v-select>
89
+ <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
90
+ <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
91
+ <!-- <input type="radio" :name="row.f_item_name" @click="disSelect($parent.idxs,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >-->
92
+ <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
93
+ <span>{{item.label}}</span>
94
+ </div>
95
+ </div>
96
+ <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
97
+ <div style="float: left" v-for="item in row.options">
98
+ <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
99
+ <span>{{item.label}}</span>
100
+ </div>
101
+ </div>
102
+ <div style="clear: both">
103
+ <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
104
+ <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
105
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
106
+ </div>
107
+ </div>
108
+ <div style="clear: both">
109
+ <!-- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (livedispose == 'true' || livedispose == true) " >-->
110
+ <!-- <label class="fivelabel">现场已处理</label>-->
111
+ <!-- <v-select :value="row.f_live_dispose"-->
112
+ <!-- :value-single="true"-->
113
+ <!-- :options="lives"-->
114
+ <!-- :disabled="role == 'androidview'"-->
115
+ <!-- @change="changlive"-->
116
+ <!-- @click="transelation(idxs)"-->
117
+ <!-- close-on-select clear-button></v-select>-->
118
+ <!-- </div>-->
119
+ <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
120
+ <label class="fivelabel">处理方式</label>
121
+ <v-select
122
+ :value="row.f_deal_dispose"
123
+ :value-single="true"
124
+ :options="deals"
125
+ :disabled="role == 'androidview'"
126
+ @change="changdeal"
127
+ @click="transelation(idxs)"
128
+ close-on-select clear-button>
129
+ </v-select>
130
+ </div>
131
+ <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
132
+ <label class="fivelabel">处理时效:</label>
133
+ <datepicker
134
+ :value.sync="row.f_handle_date"
135
+ v-model="row.f_handle_date"
136
+ :format="'yyyy-MM-dd 00:00:00'"
137
+ placeholder="请选择"
138
+ style="width: 60%">
139
+ </datepicker>
140
+ </div>
141
+ <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
142
+ ☆{{row.tooltip}}
143
+ </div>
144
+ <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
145
+ <div class="auto" style="margin:1px;">
146
+ <div class="panel">
147
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
148
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
149
+ <div class="col-sm-4" v-show="row.f_path">
150
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
151
+ </div>
152
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
153
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
154
+ </div>
155
+ <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ <!--多张隐患照片-->
161
+ <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
162
+ <div class="panel">
163
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
164
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
165
+ <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
166
+ <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
167
+ </div>
168
+ <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">
169
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
170
+ </div>
171
+ <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
172
+ </div >
173
+ </div>
174
+ </div>
175
+ </div>
176
+ <div style="display: flex;flex-wrap: wrap;margin-top: 10px" v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && this.showXCImg">
177
+ <label class="fivelabel">整改照片:</label>
178
+ <div class="auto" style="margin:1px;">
179
+ <div class="panel">
180
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
181
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
182
+ <div class="col-sm-4" v-show="row.f_repair_path">
183
+ <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140" height="140"></img-self>
184
+ </div>
185
+ <div class="col-sm-4" v-show="!row.f_repair_path" @click="takePic(idxs, row.f_item_name,'f_repair_path',row.f_defect_level)">
186
+ <img src="../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
187
+ </div>
188
+ <img v-show="row.f_repair_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ </div>
196
+
197
+ <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌'"-->
198
+ <!--&gt;</v-select>-->
199
+ <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' @change="getgasmodel" placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"-->
200
+ <!--&gt;</v-select>-->
201
+ <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
202
+ <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
203
+ <!-- :checked="row.f_content == '有'"-->
204
+ <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
205
+ <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
206
+ <!-- </div>-->
207
+ <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
208
+ </div>
209
+ </div>
210
+ </div>
211
+ <div style="border-top: 1px solid #D4D4D4"></div>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ </template>
216
+ <script>
217
+ import Vue from 'vue'
218
+ import * as Util from '../Util'
219
+
220
+ export default {
221
+ title: '维修列表信息',
222
+ data() {
223
+ return {
224
+ // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
225
+ // meterstyle:[],
226
+ hiddenDangerImgNumber:0,//隐患图片数
227
+ shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
228
+ shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
229
+ // labels:[],
230
+ meternum:'',
231
+ ischecked:'有',
232
+ gasmodel:'',
233
+ textstyle:'color: red',
234
+ paper: this.$parent.$parent.data,
235
+ f_items:[],
236
+ page:{},
237
+ selectindex:null,
238
+ lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
239
+ deals:[{label: '现场处理', value: '现场处理'},{label: '自行处理', value: '自行处理'}],
240
+ f_live_dispose:'否',
241
+ f_deal_dispose:'未处理',
242
+ // 初始表底
243
+ f_initial_base: {},
244
+ // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
245
+ f_gas_aberrant_number: {},
246
+ // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
247
+ f_fee_aberrant_number: {},
248
+ // 累购气量
249
+ f_total_gas: {},
250
+ // 累购金额
251
+ f_total_fee: {},
252
+ // 已用气量
253
+ f_table_base: {},
254
+ // 已用金额
255
+ f_fee_base: {},
256
+ // 剩余气量
257
+ f_gas_balance: {},
258
+ // 剩余金额
259
+ f_fee_balance: {},
260
+ // 表端剩余金额
261
+ f_table_balance: {},
262
+ // 气量异常差值允许误差
263
+
264
+ //物联网表数据存储
265
+ f_balance_amount:{},//物联网表剩余金额
266
+ f_meter_base:{},//物联网表读数
267
+ f_balance_amount1:{},//物联网表现场录入的表上剩余金额
268
+ f_meter_base1:{},//物联网表现场录入的表字轮数
269
+ f_meter_aberrant_number1: {},//物联网表 表数异常差值
270
+ f_fee_aberrant_number1: {},//物联网 表金额异常差值
271
+ gasDeviation: (
272
+ function (_this) {
273
+ let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
274
+ if (deviation && !isNaN(deviation)) {
275
+ return deviation
276
+ } else {
277
+ return 0
278
+ }
279
+ }
280
+ )(this),
281
+ // 金额异常差值允许误差
282
+ feeDeviation: (
283
+ function (_this) {
284
+ let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
285
+ if (deviation && !isNaN(deviation)) {
286
+ return deviation
287
+ } else {
288
+ return 0
289
+ }
290
+ }
291
+ )(this),
292
+ // 字轮异常差值允许误差
293
+ meterbase: (
294
+ function (_this) {
295
+ let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
296
+ if (deviation && !isNaN(deviation)) {
297
+ return deviation
298
+ } else {
299
+ return 0
300
+ }
301
+ }
302
+ )(this),
303
+ showElse:false, //控制其他选项是否显示
304
+ showXCImg: false, // 是否显示现场整改拍照选项
305
+ showZXTime: false // 是否显示自行整改处理时效
306
+ }
307
+ },
308
+ props: ['config','device','idx','operation','role'],
309
+ // props: {
310
+ // // 维修对应的用户数据收集
311
+ // model: {
312
+ // type: Object
313
+ // },
314
+ // service:{
315
+ // type: Object
316
+ // },
317
+ // show: {
318
+ // type: Boolean,
319
+ // default: false
320
+ // },
321
+ // repairitem:{
322
+ // type: Object
323
+ // },
324
+ // shutype:'heng',
325
+ // tabs:{
326
+ // type: Object
327
+ // },
328
+ // repairdetails:{
329
+ // type: Object
330
+ // },
331
+ // faultshow:{
332
+ // type: Object
333
+ // },
334
+ // issee:''
335
+ // },
336
+ methods: {
337
+ changse(val){
338
+ if(val == undefined){
339
+ return
340
+ }
341
+ if(this.selectindex != null) {
342
+ if(this.f_items[this.selectindex].type == 'selector'){
343
+ this.f_items[this.selectindex].f_item_value = val
344
+ }else if(this.f_items[this.selectindex].type == 'inputSelector'){
345
+ this.f_items[this.selectindex].f_item_value = val.target.value
346
+ }
347
+ }
348
+ },
349
+ changlive(val){
350
+ if(val == undefined){
351
+ return
352
+ }
353
+ if(this.selectindex != null) {
354
+ this.f_items[this.selectindex].f_live_dispose = val
355
+ }
356
+ },
357
+ changdeal(val){
358
+ if(val == undefined){
359
+ return
360
+ }
361
+ if(this.selectindex != null) {
362
+ this.f_items[this.selectindex].f_deal_dispose = val
363
+ }
364
+ },
365
+ switchDetails(detailsType, event){
366
+ if (event.srcElement.checked) {
367
+ for(var i = 0;i<this.Detail.details.length;i++){
368
+ if(this.Detail.details[i].f_project == detailsType){
369
+ this.Detail.details[i].f_content = '有'
370
+ this.ischecked = '有'
371
+ return
372
+ }
373
+ }
374
+ } else {
375
+ this.Detail.imgs = []
376
+ for(var i = 0;i<this.Detail.details.length;i++){
377
+ if(this.Detail.details[i].f_project == detailsType){
378
+ this.Detail.details[i].f_content = '无'
379
+ this.ischecked = '无'
380
+ }else{
381
+ this.Detail.details[i].f_content = ''
382
+ }
383
+ }
384
+ }
385
+ },
386
+ getgasmodel(val){
387
+ this.gasmodel = val
388
+ },
389
+ getradios(val,flag){
390
+ let Reoptions = []
391
+ for (let i = 0;i<this.repairdetails.length;i++) {
392
+ var t = false
393
+ if(this.repairdetails[i].f_type == this.repairitem.header ){
394
+ for(var j =0;j<this.repairdetails[i].details.length;j++){
395
+ if(this.repairdetails[i].details[j].f_project == val ){
396
+ Reoptions = this.repairdetails[i].details[j].options
397
+ t = true
398
+ break
399
+ }
400
+ }
401
+ }
402
+ if(t){
403
+ break
404
+ }
405
+ }
406
+ for(let j = 0;j<Reoptions.length;j++){
407
+ if(Reoptions[j].data == flag){
408
+ for(var e = 0;e<this.Detail.details.length;e++){
409
+ if(this.Detail.details[e].f_project == val){
410
+ this.Detail.details[e].f_status = Reoptions[j].f_status
411
+ return
412
+ }
413
+ }
414
+ break
415
+ }
416
+ }
417
+ },
418
+ deletedetails(){
419
+ this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
420
+ if (res === 'confirm') {
421
+ for(var i = 0;i<this.tabs.length;i++){
422
+ if(this.tabs[i].number == this.repairitem.number){
423
+ this.tabs.splice(i, 1)
424
+ this.model.servicerepair.splice(this.repairitem.number, 1)
425
+ for(let t = i;t < this.tabs.length;t++ ) {
426
+ this.tabs[t].number -= 1
427
+ }
428
+ return
429
+ }
430
+ }
431
+ }
432
+ })
433
+ },
434
+ takePic(prop, title, pathname='null') {
435
+ if (this.role == 'androidview') {
436
+ return
437
+ }
438
+ HostApp.__callback__ = this.cameraCallBack
439
+ HostApp.__this__ = this
440
+ //tag
441
+ let fileName
442
+ if (pathname == 'null') {
443
+ if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
444
+ fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
445
+ } else {
446
+ fileName = Util.getFileName(this.f_items[prop].f_path)
447
+ }
448
+ } else {
449
+ if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
450
+ fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
451
+ } else {
452
+ fileName = Util.getFileName(this.f_items[prop][pathname])
453
+ }
454
+ }
455
+ let jingweidu = ''
456
+ if (this.$parent.$parent.is_has_jingweidu == 'true'){
457
+ const obj = HostApp.getGpsDetailAddress()
458
+ jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
459
+ }
460
+ //tag
461
+ //tag
462
+ HostApp._open_a_page({type: 'boomerang',
463
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
464
+ param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'","'+ title +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu}
465
+ })
466
+ },
467
+ cameraCallBack(prop,title, fileName,pathname) {
468
+ if(title == '到访不遇/拒检照片'){
469
+ if(this.$parent.$parent.data.f_entry_status == '到访不遇'){
470
+ this.$parent.$parent.data.f_noanswer_path = fileName + '?' + Math.random()
471
+ }else{
472
+ this.$parent.$parent.data.f_nongasuser_path = fileName + '?' + Math.random()
473
+ }
474
+ }
475
+ //tag
476
+ if (pathname == 'null') {
477
+ //tag
478
+ HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
479
+ //tag
480
+ HostApp.__callback__ = null
481
+ HostApp.__this__ = null
482
+ } else {
483
+ //tag
484
+ //tag)
485
+ HostApp.__this__.$set( 'f_items['+prop+'].'+pathname+'', fileName + '?' + Math.random())
486
+ HostApp.__callback__ = null
487
+ HostApp.__this__ = null
488
+ }
489
+ if(this.f_items[prop].is_verification){
490
+ let path=fileName.replace('http://newimg','')
491
+ path=path.replace('file://','')
492
+ console.log('fileName',fileName)
493
+ console.log(path)
494
+ let res=HostApp.pictureVerificationAI(path,title)
495
+ if(res.code==200){
496
+ if(res.type_result){
497
+ // this.$showMessage("检测通过,当前照片为"+title)
498
+ this.f_items[prop].verification_text=`检测通过,当前照片为 ${title}`
499
+ this.f_items[prop].verification_state='pass'
500
+ }else{
501
+ // this.$showMessage("检测失败,未识别到当前照片为 "+title+",请重新拍摄!")
502
+ this.f_items[prop].verification_text=`检测失败,未识别到当前照片为'${title}',请重新拍摄!`
503
+ this.f_items[prop].verification_state='npass'
504
+ }
505
+ }else{
506
+ // this.$showMessage("检测失败,请重试!")
507
+ this.f_items[prop].verification_text=`检测失败,请重试!`
508
+ this.f_items[prop].verification_state='npass'
509
+ }
510
+ }
511
+ },
512
+ delfile(prop, fileName, pathname='null') {
513
+ if (pathname == 'null') {
514
+ //tag
515
+ //tag)
516
+ if(fileName == Vue.nopic){
517
+ return
518
+ } else {
519
+ HostApp.delfile(fileName)
520
+ this.f_items[prop].f_path = Vue.nopic
521
+ }
522
+ }else {
523
+ //tag
524
+ //tag)
525
+ if(fileName == Vue.nopic){
526
+ return
527
+ } else {
528
+ HostApp.delfile(fileName)
529
+ this.f_items[prop][pathname] = Vue.nopic
530
+ }
531
+ }
532
+ },
533
+ adddetails(){
534
+ // 下标作为序号,取值用。 增加 序号得依次增加
535
+ if(this.tabs.length > 0){
536
+ for(let i = this.tabs.length-1;i > 0 ;i-- ){
537
+ if(this.tabs[i].header == this.repairitem.header){
538
+ if(this.model.servicerepair.length > 0){
539
+ for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
540
+ if(this.model.servicerepair[j].f_type == this.repairitem.header){
541
+ this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
542
+ this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
543
+ for(let t = i+2;t < this.tabs.length;t++ ) {
544
+ this.tabs[t].number += 1
545
+ }
546
+ this.faultshow.number += this.faultshow.number + 1
547
+ return
548
+ }
549
+ }
550
+ }
551
+ }
552
+ }
553
+ }
554
+ },
555
+ transelation(val){
556
+ this.selectindex = val
557
+ },
558
+ towatch(){
559
+ for(let n in this.f_items){
560
+ if(typeof this.f_items[n]=='function'){
561
+ continue
562
+ }
563
+ if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
564
+ // 监听下拉框,如果有隐患,需要拍照
565
+ this.$watch('f_items['+n+'].selected',function(val,old) {
566
+ if(val==old){
567
+ return
568
+ }
569
+ // 下拉框值
570
+ //tag)
571
+ // 下拉框所属设备
572
+ //tag
573
+ // 下拉框所属项
574
+ //tag
575
+ if (val == undefined || val.length == 0 || val[0] == ''){
576
+ this.f_items[n].f_path = ''
577
+ this.f_items[n].f_is_defect = ''
578
+ this.f_items[n].f_defect_level = ''
579
+ this.f_items[n].f_live_dispose = ''
580
+ this.f_items[n].f_deal_dispose = ''
581
+ this.f_items[n].tooltip = ''
582
+ this.f_items[n].f_else = ''
583
+ return
584
+ }
585
+ let shImage = false
586
+ if(val.indexOf('其他') == -1){
587
+ this.f_items[n].f_else = ''
588
+ }
589
+ // if(this.config[this.device.device].items[item].type == 'selector'){
590
+ // this.f_items[n].f_item_value = val
591
+ // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
592
+ // this.f_items[n].f_item_value = val[0]
593
+ // }
594
+ // 在配置中查找该项
595
+ for (let item in this.config[this.device.device].items) {
596
+ if(typeof this.config[this.device.device].items[item]=='function'){
597
+ continue
598
+ }
599
+ let type = this.config[this.device.device].items[item].type
600
+ let multiple = this.config[this.device.device].items[item].multiple?this.config[this.device.device].items[item].multiple:false
601
+ let options = this.config[this.device.device].items[item].options
602
+ if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
603
+ if(this.f_items[n].f_item_name == '入户状态'){
604
+ this.$parent.$parent.data.f_entry_status = val[0]
605
+ if(val[0] == '到访不遇' || val[0] == '拒检'){
606
+ this.f_items.forEach(item => {
607
+ if (item.f_item_name == '到访不遇/拒检照片') {
608
+ item.isshow = true
609
+ item.checkmust = true
610
+ }
611
+ })
612
+ for (let item in this.config[this.device.device].items) {
613
+ if(item == '到访不遇/拒检照片'){
614
+ this.config[this.device.device].items[item].isshow = true
615
+ this.config[this.device.device].items[item].checkmust = true
616
+ }
617
+ }
618
+
619
+ }else{
620
+ this.f_items.forEach(item => {
621
+ if (item.f_item_name == '到访不遇/拒检照片') {
622
+ item.isshow = false
623
+ item.checkmust = false
624
+ }
625
+ })
626
+ for (let item in this.config[this.device.device].items) {
627
+ if(item == '到访不遇/拒检照片'){
628
+ this.config[this.device.device].items[item].isshow = false
629
+ this.config[this.device.device].items[item].checkmust = false
630
+ }
631
+ }
632
+
633
+ }
634
+ }
635
+ for (let i in options) {
636
+ if(typeof options[i]=='function'){
637
+ continue
638
+ }
639
+ let value
640
+ if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
641
+ value = val[0]
642
+ }else if (this.config[this.device.device].items[item].type == 'inputSelector'){
643
+ value = val
644
+ }
645
+ //tag)
646
+ // 如果未选择,清空图片、隐患信息等
647
+ if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
648
+ this.f_items[n].f_path = ''
649
+ this.f_items[n].f_is_defect = ''
650
+ this.f_items[n].f_defect_level = ''
651
+ this.f_items[n].f_live_dispose = ''
652
+ this.f_items[n].f_deal_dispose = ''
653
+ this.f_items[n].tooltip = ''
654
+ }
655
+ if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
656
+ // 找到选中的项了
657
+ //tag
658
+ if(options[i].isdefect == true ){
659
+ shImage = true
660
+ }
661
+ if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
662
+ shImage = false
663
+ }
664
+ //tag
665
+ if(shImage){
666
+ this.f_items[n].f_is_defect =true
667
+ this.f_items[n].f_defect_level = options[i].level
668
+ this.f_items[n].f_path = Vue.nopic
669
+ this.f_items[n].f_live_dispose = '否'
670
+ this.f_items[n].f_deal_dispose = '未处理'
671
+ //tag
672
+ this.f_items[n].tooltip= options[i].tooltip
673
+ }else{
674
+ this.f_items[n].f_path = ''
675
+ this.f_items[n].f_is_defect = ''
676
+ this.f_items[n].f_defect_level = ''
677
+ this.f_items[n].f_live_dispose = ''
678
+ this.f_items[n].f_deal_dispose = ''
679
+ this.f_items[n].tooltip = ''
680
+ }
681
+ }
682
+ }
683
+ }
684
+ }
685
+ }
686
+ )
687
+ // this.$watch('other',function(val){
688
+ // //tag
689
+ // if(this.selectindex != null) {
690
+ // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
691
+ // if(index > -1){
692
+ // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
693
+ // }
694
+ // }
695
+ //
696
+ // })
697
+ }else if(this.f_items[n].type == 'radio') {
698
+ // 监听单选框,如果有隐患,需要拍照
699
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
700
+ //tag)
701
+ let options = this.f_items[n].options
702
+ //tag)
703
+ for (let i = 0; i < options.length; i++) {
704
+ //tag)
705
+ // 找到选中的项了
706
+ if (options[i].value == val) {
707
+ // 如果有隐患,拍图片
708
+ if (options[i].isdefect) {
709
+ this.f_items[n].f_is_defect = true
710
+ this.f_items[n].f_defect_level = options[i].level
711
+ this.f_items[n].f_path = Vue.nopic
712
+ this.f_items[n].f_live_dispose = '否'
713
+ this.f_items[n].f_deal_dispose = '未处理'
714
+ this.f_items[n].tooltip = options[i].tooltip
715
+ //tag)
716
+ return
717
+ }
718
+ }
719
+ }
720
+ this.f_items[n].f_path = ''
721
+ this.f_items[n].f_is_defect = ''
722
+ this.f_items[n].f_defect_level = ''
723
+ this.f_items[n].f_live_dispose = ''
724
+ this.f_items[n].f_deal_dispose = ''
725
+ this.f_items[n].tooltip = ''
726
+ })
727
+ }else if(this.f_items[n].type == 'checkbox') {
728
+ // 监听单选框,如果有隐患,需要拍照
729
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
730
+ //tag)
731
+ // 如果是手动赋值,不执行下面逻辑
732
+ if (this.f_items[n].isReSet) {
733
+ this.f_items[n].isReSet = false
734
+ return
735
+ }
736
+ let options = this.f_items[n].options
737
+ //tag)
738
+ // 取出选中项中有隐患的详细信息
739
+ let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
740
+
741
+ if(selected.length > 0){
742
+ // 防止赋值无限调用
743
+ this.f_items[n].isReSet = true
744
+ let selectList = selected.map(item => {return item.value})
745
+ // 如果选中的是非隐患项,取消选中isdefect为true的
746
+ if (selectList.indexOf(val[val.length - 1]) == -1) {
747
+ this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
748
+ this.f_items[n].f_path = ''
749
+ this.f_items[n].f_is_defect = ''
750
+ this.f_items[n].f_defect_level = ''
751
+ this.f_items[n].f_live_dispose = ''
752
+ this.f_items[n].f_deal_dispose = ''
753
+ this.f_items[n].tooltip = ''
754
+ return
755
+ }
756
+ // 如果选中的是隐患项,取消选中isdefect为false的
757
+ this.f_items[n].f_item_value = selectList
758
+ // 如果第一次选择隐患项,初始化
759
+ if (!this.f_items[n].f_is_defect) {
760
+ this.f_items[n].f_is_defect = true
761
+ this.f_items[n].f_defect_level = selected[0].level
762
+ this.f_items[n].f_path = Vue.nopic
763
+ this.f_items[n].f_live_dispose = '否'
764
+ this.f_items[n].f_deal_dispose = '未处理'
765
+ //tag
766
+ this.f_items[n].tooltip = selected[0].tooltip
767
+ }
768
+ //tag)
769
+ return
770
+ }
771
+ this.f_items[n].f_path = ''
772
+ this.f_items[n].f_is_defect = ''
773
+ this.f_items[n].f_defect_level = ''
774
+ this.f_items[n].f_live_dispose = ''
775
+ this.f_items[n].f_deal_dispose = ''
776
+ this.f_items[n].tooltip = ''
777
+ })
778
+ }
779
+ }
780
+ //tag)
781
+ },
782
+ getGasAberrantNumber(val) {
783
+ //tag
784
+ if(!this.f_table_base.index || !this.f_gas_balance.index){
785
+ //tag
786
+ return
787
+ }
788
+ // 先清空
789
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
790
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
791
+ if(val=='已用气量'){
792
+ //剩余气量 = 累购-已用
793
+ this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_table_base.index].f_item_value
794
+ if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
795
+ this.f_items[this.f_gas_balance.index].f_item_value = null
796
+ }
797
+ }
798
+
799
+ // 只有两个值都填了才会计算
800
+ if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
801
+ return
802
+ }
803
+ //tag)
804
+ //tag
805
+ //tag
806
+
807
+ // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
808
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index?this.f_items[this.f_initial_base.index].f_item_value:0))
809
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
810
+ // 如果数值有误,清空结果s
811
+ if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
812
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
813
+ }
814
+ //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
815
+ //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
816
+ // 计算差值是否在范围内
817
+ if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)|| Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
818
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
819
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
820
+ }else{
821
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
822
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
823
+ }
824
+
825
+ //tag)
826
+ },
827
+ getFeeAberrantNumber(val) {
828
+ //tag
829
+ // 只有两个值都填了才会计算
830
+ if(!this.f_fee_base.index || !this.f_fee_balance.index){
831
+ //tag
832
+ return
833
+ }
834
+ // 先清空
835
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
836
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
837
+
838
+ if(val=='已用金额'){
839
+ this.f_items[this.f_fee_balance.index].f_item_value=(this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
840
+ if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
841
+ this.f_items[this.f_fee_balance.index].f_item_value = null
842
+ }
843
+ }
844
+
845
+ if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
846
+ return
847
+ }
848
+
849
+ // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
850
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
851
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
852
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
853
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
854
+ }
855
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
856
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
857
+ // 计算差值是否在范围内
858
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
859
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
860
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
861
+ }else{
862
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
863
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
864
+ }
865
+
866
+ //tag)
867
+ },
868
+ // 计算剩余金额和剩余金额差值
869
+ getFeeAberrantNumber2(val) {
870
+ //tag
871
+ // 只有两个值都填了才会计算
872
+ if(!this.f_table_balance.index || !this.f_fee_balance.index){
873
+ //tag
874
+ return
875
+ }
876
+ // 先清空
877
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
878
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
879
+
880
+ // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
881
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
882
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
883
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
884
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
885
+ }
886
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
887
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
888
+ // 计算差值是否在范围内
889
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
890
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
891
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
892
+ }else{
893
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
894
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
895
+ }
896
+ console.log('--------------------------------')
897
+ console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
898
+
899
+ //tag)
900
+ },
901
+ //物联网表字轮数改变触发
902
+ getmeteraberrantnumber() {
903
+ //tag
904
+
905
+ // 先清空
906
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
907
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
908
+ //tag
909
+ // 只有两个值都填了才会计算
910
+ if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
911
+ return
912
+ }
913
+ //tag
914
+ // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
915
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
916
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
917
+ if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
918
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
919
+ }
920
+ //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
921
+ // 计算差值是否在范围内
922
+ //tag)
923
+ if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
924
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
925
+ }
926
+
927
+ //tag)
928
+ },
929
+
930
+ disSelect(index, itemValue) {
931
+ //tag)
932
+ //tag)
933
+ if (this.f_items[index].f_item_value == itemValue) {
934
+ this.$set(`f_items[${index}].f_item_value`, '')
935
+ }
936
+ }
937
+ },
938
+ ready() {
939
+ //tag
940
+ //tag
941
+ if(Vue.config.safecheck != undefined){
942
+ if(Vue.config.safecheck.ApproveConfig != undefined){
943
+ if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
944
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
945
+ }
946
+ if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
947
+ this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
948
+ }
949
+ if(Vue.config.safecheck.ApproveConfig.showtorepair) {
950
+ this.deals=[{label: '现场整改', value: '现场整改'},
951
+ {label: '自行处理', value: '自行处理'},
952
+ {label: '转维修', value: '报修'}
953
+ ]
954
+ }
955
+ if(Vue.config.safecheck.ApproveConfig.Processing) {
956
+ if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
957
+ this.deals = Vue.config.safecheck.ApproveConfig.Processing
958
+ }
959
+ }
960
+ if(Vue.config.safecheck.ApproveConfig.showXCImg) {
961
+ this.showXCImg = true
962
+ }
963
+ if(Vue.config.safecheck.ApproveConfig.showZXTime) {
964
+ this.showZXTime = true
965
+ }
966
+ if(Vue.config.safecheck.ApproveConfig.showtorepair) {
967
+ }
968
+ if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
969
+ if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
970
+ this.hiddenDangerImgNumber = 3
971
+ }else {
972
+ this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
973
+ }
974
+ }
975
+ }
976
+ }
977
+ //tag
978
+ //tag)
979
+ //tag)
980
+ //tag)
981
+ //创建页面所需数据
982
+ this.$set('piece', this.paper['device'+this.device.n][this.idx])
983
+ //tag)
984
+ //tag)
985
+ let n = 0
986
+ for (let item in this.config[this.device.device].items) {
987
+ if(typeof this.config[this.device.device].items[item]=='function'){
988
+ continue
989
+ }
990
+ let index = this.config[this.device.device].items[item].index-1
991
+ this.$set('page.options' + index, [])
992
+ //tag)
993
+ //tag)
994
+ //tag)
995
+ // 先根据配置组接页面
996
+ let f_item_value
997
+ if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
998
+ f_item_value = []
999
+ // 判断选项的默认值
1000
+ for (let defitem in this.config[this.device.device].items[item].options) {
1001
+ if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1002
+ continue
1003
+ }
1004
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1005
+ if (defopt.isdefault) {
1006
+ //tag
1007
+ f_item_value[0] = defopt.data
1008
+ }
1009
+ }
1010
+ // if(this.config[this.device.device].items[item].data){
1011
+ // f_item_value.push(this.config[this.device.device].items[item].data)
1012
+ // }
1013
+ }else if(this.config[this.device.device].items[item].type == 'radio'){
1014
+ //为radio添加默认值
1015
+ f_item_value=''
1016
+ //tag)
1017
+ for (let defitem in this.config[this.device.device].items[item].options) {
1018
+ if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1019
+ continue
1020
+ }
1021
+ //tag)
1022
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1023
+ if (defopt.isdefault) {
1024
+ //tag)
1025
+ f_item_value = defopt.data
1026
+ }
1027
+ }
1028
+ }else{
1029
+ f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1030
+ }
1031
+ //tag)
1032
+ let it = {
1033
+ type: this.config[this.device.device].items[item].type,
1034
+ f_item_name: item,
1035
+ checkmust: this.config[this.device.device].items[item].checkmust,
1036
+ f_item_value: f_item_value,
1037
+ is_verification:this.config[this.device.device].items[item].is_verification,
1038
+ verification_text:'',
1039
+ verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1040
+ f_is_defect: '',
1041
+ multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1042
+ isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1043
+ readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1044
+ remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1045
+ f_path: '',
1046
+ unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1047
+ tooltip:'',
1048
+ f_live_dispose:'',
1049
+ f_deal_dispose:'',
1050
+ f_else: '',
1051
+ f_p1_path: '',
1052
+ f_p2_path: '',
1053
+ f_p3_path: ''
1054
+ }
1055
+ //tag)
1056
+ //tag)
1057
+ this.$set('f_items['+index+']',it)
1058
+ if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1059
+ if(this.config[this.device.device].items[item].type == 'selector'){
1060
+ this.page['options' + index].push({
1061
+ label: "请选择",
1062
+ value: ''
1063
+ })
1064
+ }
1065
+ for (let i in this.config[this.device.device].items[item].options) {
1066
+ if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1067
+ continue
1068
+ }
1069
+ this.page['options' + index].push({
1070
+ label: this.config[this.device.device].items[item].options[i].data,
1071
+ value: this.config[this.device.device].items[item].options[i].data,
1072
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1073
+ })
1074
+ }
1075
+ if(this.config[this.device.device].items[item].type == 'selector'){
1076
+ this.$set('f_items['+index+'].selected', f_item_value)
1077
+ }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1078
+ this.$set('f_items['+index+'].selected', f_item_value)
1079
+ }
1080
+
1081
+ this.$set('f_items['+index+'].options',this.page['options' + index])
1082
+
1083
+ //tag)
1084
+ } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1085
+ //tag)
1086
+ //tag
1087
+ //tag)
1088
+ for (let i in this.config[this.device.device].items[item].options) {
1089
+ if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1090
+ continue
1091
+ }
1092
+ //tag
1093
+ this.page['options' + index].push({
1094
+ label: this.config[this.device.device].items[item].options[i].data,
1095
+ value: this.config[this.device.device].items[item].options[i].data,
1096
+ isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1097
+ level: this.config[this.device.device].items[item].options[i].level,
1098
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1099
+ })
1100
+ //tag)
1101
+ }
1102
+ //tag)
1103
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1104
+ this.$set('f_items[' + index + '].f_item_value', f_item_value)
1105
+ //tag)
1106
+ }
1107
+ n = n + 1
1108
+ }
1109
+ if(!this.piece || JSON.stringify(this.piece) == '{}') {
1110
+ // 如果没有,则新建
1111
+ this.$set('piece.f_items',this.f_items)
1112
+ this.$set('piece.f_device_type',this.device.device)
1113
+ } else {
1114
+ // 已经存在,把之前的数据重新填入
1115
+ for (let f in this.f_items){
1116
+ if(typeof this.f_items[f]=='function'){
1117
+ continue
1118
+ }
1119
+ for(let p in this.piece.f_items) {
1120
+ if(typeof this.piece.f_items[p]=='function'){
1121
+ continue
1122
+ }
1123
+ if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1124
+ //tag)
1125
+ //tag)
1126
+ this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1127
+ //tag)
1128
+ if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1129
+ //tag)
1130
+ //tag)
1131
+ this.f_items[f].selected = this.piece.f_items[p].f_item_value
1132
+ //tag)
1133
+ }
1134
+ // 取出特殊值
1135
+ if (this.f_items[f].f_item_name == '初始表底') {
1136
+ //tag)
1137
+ this.f_initial_base.index = f
1138
+ } else if (this.f_items[f].f_item_name == '累购气量') {
1139
+ //tag)
1140
+ this.f_total_gas.index = f
1141
+ } else if (this.f_items[f].f_item_name == '已用气量') {
1142
+ //tag)
1143
+ this.f_table_base.index = f
1144
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1145
+ this.getGasAberrantNumber('已用气量')
1146
+ })
1147
+ } else if (this.f_items[f].f_item_name == '剩余气量') {
1148
+ //tag)
1149
+ this.f_gas_balance.index = f
1150
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1151
+ this.getGasAberrantNumber('')
1152
+ })
1153
+ } else if (this.f_items[f].f_item_name == '气量异常差值') {
1154
+ //tag)
1155
+ this.f_gas_aberrant_number.index = f
1156
+ } else if (this.f_items[f].f_item_name == '累购金额') {
1157
+ //tag)
1158
+ this.f_total_fee.index = f
1159
+ } else if (this.f_items[f].f_item_name == '已用金额') {
1160
+ //tag)
1161
+ this.f_fee_base.index = f
1162
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1163
+ this.getFeeAberrantNumber('已用金额')
1164
+ })
1165
+ } else if (this.f_items[f].f_item_name == '剩余金额') {
1166
+ //tag)
1167
+ this.f_fee_balance.index = f
1168
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1169
+ this.getFeeAberrantNumber('')
1170
+ this.getFeeAberrantNumber2('')
1171
+ })
1172
+ } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1173
+ this.f_table_balance.index = f
1174
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1175
+ this.getFeeAberrantNumber2('')
1176
+ })
1177
+ } else if (this.f_items[f].f_item_name == '金额异常差值') {
1178
+ //tag)
1179
+ this.f_fee_aberrant_number.index = f
1180
+ }else if (this.f_items[f].f_item_name == '表读数') {
1181
+ //tag)
1182
+ this.f_meter_base.index = f
1183
+ }else if (this.f_items[f].f_item_name == '表剩余金额') {
1184
+ //tag)
1185
+ this.f_balance_amount.index = f
1186
+ }else if (this.f_items[f].f_item_name == '字轮数') {
1187
+ //tag)
1188
+ this.f_meter_base1.index = f
1189
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1190
+ this.getmeteraberrantnumber()
1191
+ })
1192
+ }else if (this.f_items[f].f_item_name == '表余额') {
1193
+ //tag)
1194
+ this.f_balance_amount1.index = f
1195
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1196
+ this.getfeeaberrantnumber1()
1197
+ })
1198
+ }else if (this.f_items[f].f_item_name == '表数异常差值') {
1199
+ //tag)
1200
+ this.f_meter_aberrant_number1.index = f
1201
+ }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1202
+ //tag)
1203
+ this.f_fee_aberrant_number1.index = f
1204
+ }
1205
+ }
1206
+ }
1207
+ for (let em in this.config[this.device.device].items) {
1208
+ if(typeof this.config[this.device.device].items[em]=='function'){
1209
+ continue
1210
+ }
1211
+ if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1212
+ this.f_items[f].options =[]
1213
+ for (let k in this.config[this.device.device].items[em].options) {
1214
+ if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1215
+ continue
1216
+ }
1217
+ this.f_items[f].options.push({
1218
+ label: this.config[this.device.device].items[em].options[k].data,
1219
+ value: this.config[this.device.device].items[em].options[k].data
1220
+ })
1221
+ }
1222
+ }
1223
+ }
1224
+ }
1225
+ //tag)
1226
+ this.$set('piece.f_items',this.f_items)
1227
+ }
1228
+ this.towatch()
1229
+ },
1230
+ destroyed(){
1231
+ let nullCount = 0
1232
+ let metertitles
1233
+ //判断当前是否有选中项
1234
+ for (let row in this.f_items){
1235
+ if(typeof this.f_items[row]=='function'){
1236
+ continue
1237
+ }
1238
+ if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1239
+ //tag
1240
+ this.f_items[row].f_item_value = this.f_items[row].selected
1241
+ }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1242
+ //tag
1243
+ this.f_items[row].f_item_value = this.f_items[row].selected
1244
+ }
1245
+ // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1246
+ // nullCount = nullCount+1
1247
+ // }else if(this.f_items[row].f_item_value != ''){
1248
+ // nullCount = nullCount+1
1249
+ // }
1250
+ }
1251
+ let picture = []
1252
+ // for (let row in this.f_items){
1253
+ // let a={}
1254
+ // a.f_path = this.f_items[row].f_path
1255
+ // a.name = this.f_items[row].f_item_name
1256
+ // }
1257
+ // picture.push(a)
1258
+ this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1259
+ //tag
1260
+ },
1261
+ computed:{
1262
+
1263
+ }
1264
+ }
1265
+ </script>
1266
+ <style lang="less" scoped>
1267
+ .class-erro {
1268
+ color: #a94442;
1269
+ }
1270
+ .fivelabel{
1271
+ border: none;
1272
+ border-left: 5px solid #A2C2EB;
1273
+ float: left;
1274
+ width: 35%;
1275
+ margin-bottom: 3px;
1276
+ text-align: left;
1277
+ word-wrap: break-word;
1278
+ white-space: normal;
1279
+ }
1280
+ .radiolabel{
1281
+ border: none;
1282
+ border-left: 5px solid #A2C2EB;
1283
+ float: left;
1284
+ width: 65%;
1285
+ margin-bottom: 3px;
1286
+ text-align: left;
1287
+ word-wrap: break-word;
1288
+ white-space: normal;
1289
+ }
1290
+
1291
+ .textlabel {
1292
+ border: none;
1293
+ border-left: 5px solid #A2C2EB;
1294
+ width: 100%;
1295
+ margin-bottom: 3px;
1296
+ text-align: left;
1297
+ word-wrap: break-word;
1298
+ white-space: normal;
1299
+ }
1300
+ .textlabel1 {
1301
+ border: none;
1302
+ border-left: 5px solid #f7cb32;
1303
+ width: 100%;
1304
+ margin-bottom: 3px;
1305
+ text-align: left;
1306
+ word-wrap: break-word;
1307
+ white-space: normal;
1308
+ }
1309
+ .spanrodio{
1310
+ margin-right: 10px;
1311
+ }
1312
+ .div-photo{
1313
+ width: auto;
1314
+ height: auto;
1315
+ /* margin-top: 10px; */
1316
+ position: absolute;
1317
+ bottom: 10px;
1318
+ right: 10px;
1319
+ }
1320
+ .panel-self{
1321
+ border-radius: 5px;
1322
+ border:1px solid #c5e1f7;
1323
+ //background-color: #F2F6FA;
1324
+ }
1325
+ .btn-photo{
1326
+ border: 0;
1327
+ border-radius: 7px;
1328
+ background-color: #7dc1f4;
1329
+ font: 15px PingFang-SC-Bold;
1330
+ height: 20%;
1331
+ }
1332
+ </style>
1333
+