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