safecheck-client 3.0.34-1 → 3.0.34-100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) 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/assets/123.png +0 -0
  4. package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
  5. package/src/components/LoadData.vue +62 -0
  6. package/src/components/NewDefectList/DefectListNew.vue +1 -0
  7. package/src/components/android/AddPlanItemYy.vue +451 -0
  8. package/src/components/android/AndroidDefectDeal.vue +1 -0
  9. package/src/components/android/AndroidDefectDealBeforeSafe.vue +502 -0
  10. package/src/components/android/AreaPlan.vue +1 -7
  11. package/src/components/android/AreaSelect.vue +198 -0
  12. package/src/components/android/BuildingSelect.vue +192 -0
  13. package/src/components/android/CheckPlanSelect.vue +229 -0
  14. package/src/components/android/CurrentCreateYy.vue +1051 -0
  15. package/src/components/android/ImgSelfAndroid.vue +181 -181
  16. package/src/components/android/PaperFeedback.vue +34 -1
  17. package/src/components/android/PaperFeedbackTemp.vue +1 -1
  18. package/src/components/android/QRCode/QRCodeBinding.vue +300 -0
  19. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  20. package/src/components/android/SafecheckDevices.vue +4 -4
  21. package/src/components/android/SafecheckDevicesTemp.vue +1 -1
  22. package/src/components/android/SafecheckOrderV.vue +8 -12
  23. package/src/components/android/UserinfoSelect.vue +714 -0
  24. package/src/components/android/examples/410.png +0 -0
  25. package/src/components/android/examples/SafeListExamples.vue +296 -0
  26. package/src/components/android/examples/UserExamples.vue +137 -0
  27. package/src/components/android/examples/ViewDetailsExamples.vue +1235 -0
  28. package/src/components/android/examples/touxiang.png +0 -0
  29. package/src/components/android/userinfo/SafecheckUserInfo.vue +1 -1
  30. package/src/components/pc/SafeVisitInfo.vue +261 -0
  31. package/src/components/rongcheng/AddPlanItem.vue +8 -0
  32. package/src/components/rongcheng/AspiratedAreaPlan.vue +574 -464
  33. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  34. package/src/components/rongcheng/CheckSearchUser.vue +46 -16
  35. package/src/components/rongcheng/PaperStatem.vue +6 -1
  36. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  37. package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1328
  38. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  39. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  40. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
  41. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -0
  42. package/src/filiale/baiyin/android.js +11 -10
  43. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
  44. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
  45. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
  46. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
  47. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
  48. package/src/filiale/baiyin/pc/PaperList.vue +790 -790
  49. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
  50. package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
  51. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
  52. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
  53. package/src/filiale/bayan/android/AddPlanItem.vue +8 -0
  54. package/src/filiale/bayan/android/PaperFeedback.vue +68 -50
  55. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +40 -40
  56. package/src/filiale/bayan/android/SafecheckDevices.vue +1 -1
  57. package/src/filiale/bayan/android/SafecheckOrderV.vue +58 -58
  58. package/src/filiale/bayan/android/SafecheckUserInfo.vue +6 -1
  59. package/src/filiale/bayan/pc/NewCheckpaper.vue +50 -46
  60. package/src/filiale/bayan/pc/PaperList.vue +1 -0
  61. package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
  62. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  63. package/src/filiale/hanzhong/android/PaperFeedback.vue +1 -1
  64. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1 -1
  65. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +1 -1
  66. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  67. package/src/filiale/huaran/android.js +12 -0
  68. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  69. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  70. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  71. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  72. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  73. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  74. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  75. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  76. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  77. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  78. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  79. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  80. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  81. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  82. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  83. package/src/filiale/huaran/pc.js +27 -0
  84. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  85. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  86. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
  87. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -0
  88. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  89. package/src/filiale/jiaxian/android.js +14 -10
  90. package/src/filiale/jiaxian/pc.js +12 -12
  91. package/src/filiale/jingyang/android/PaperFeedback.vue +1 -1
  92. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +1 -1
  93. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  94. package/src/filiale/pingxiang/android/PaperFeedback.vue +1 -1
  95. package/src/filiale/qianneng/android/SafecheckOrderV.vue +1 -1
  96. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
  97. package/src/filiale/qingjian/android/SafecheckDevices.vue +1 -1
  98. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
  99. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +1 -1
  100. package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -0
  101. package/src/filiale/qingtongxia/android/CurrentCreate.vue +1053 -0
  102. package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -0
  103. package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -0
  104. package/src/filiale/qingtongxia/android.js +4 -0
  105. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  106. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  107. package/src/filiale/ruihua/android.js +11 -0
  108. package/src/filiale/shanxian/android/AddPlanItem.vue +447 -0
  109. package/src/filiale/shanxian/android/SafecheckOrderV.vue +1 -1
  110. package/src/filiale/shanxian/android.js +1 -0
  111. package/src/filiale/shanxian/pc/PaperList.vue +785 -0
  112. package/src/filiale/shanxian/pc/checkUserList.vue +4 -4
  113. package/src/filiale/shanxian/pc.js +2 -2
  114. package/src/filiale/shiquan/android/SafecheckDevices.vue +1 -1
  115. package/src/filiale/siyang/android/AddPlanItem.vue +450 -0
  116. package/src/filiale/siyang/android/AppCheckPlan.vue +246 -0
  117. package/src/filiale/siyang/android/CurrentCreate.vue +1051 -0
  118. package/src/filiale/siyang/android/SafecheckUserInfo.vue +1 -1
  119. package/src/filiale/siyang/android.js +4 -0
  120. package/src/filiale/siyang/pc/CheckBookList.vue +396 -0
  121. package/src/filiale/siyang/pc/CheckBookSearchArea.vue +667 -0
  122. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -0
  123. package/src/filiale/siyang/pc/CheckSearchUser.vue +1035 -0
  124. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -0
  125. package/src/filiale/siyang/pc/checkPlanList.vue +367 -0
  126. package/src/filiale/siyang/pc/checkUserList.vue +22 -18
  127. package/src/filiale/siyang/pc.js +6 -0
  128. package/src/filiale/tongchuan/android/SafecheckDevices.vue +2 -2
  129. package/src/filiale/tongchuan/android/Select.vue +421 -0
  130. package/src/filiale/tongchuan/android.js +1 -0
  131. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +3 -1
  132. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +6 -2
  133. package/src/filiale/tongchuan/pc/HiddenSituation.vue +3 -1
  134. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +13 -22
  135. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1 -1
  136. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +5 -2
  137. package/src/filiale/tongchuan/pc/checkUserList.vue +30 -0
  138. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  139. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  140. package/src/filiale/weinan/android/SafecheckDevices.vue +1 -1
  141. package/src/filiale/weinan/android/SafecheckOrderV.vue +6 -2
  142. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +75 -62
  143. package/src/filiale/weinan/pc/CheckDetail.vue +11 -11
  144. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  145. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  146. package/src/filiale/weinan/pc/checkUserList.vue +49 -113
  147. package/src/filiale/weinan/pc.js +1 -0
  148. package/src/filiale/wuan/android/SafecheckOrderV.vue +5 -1
  149. package/src/filiale/wuan/android/SafecheckUserInfo.vue +10 -5
  150. package/src/filiale/xilan/android/AddPlanItem.vue +457 -0
  151. package/src/filiale/xilan/android/CurrentCreate.vue +1063 -0
  152. package/src/filiale/xilan/android.js +11 -0
  153. package/src/filiale/xilan/pc/checkUserList.vue +772 -0
  154. package/src/filiale/xilan/pc.js +12 -0
  155. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +8 -11
  156. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +8 -13
  157. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  158. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  159. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
  160. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1336 -1332
  161. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2865 -2845
  162. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
  163. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +8 -13
  164. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +23 -11
  165. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +9 -9
  166. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +96 -30
  167. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  168. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +54 -3
  169. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1046 -944
  170. package/src/filiale/yangchunboneng/pc/PaperList.vue +29 -0
  171. package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
  172. package/src/filiale/yongzhou/android/SafecheckDevices.vue +1 -1
  173. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +1 -1
  174. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  175. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  176. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1 -1
  177. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1 -1
  178. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +1 -1
  179. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  180. package/src/main.js +33 -33
  181. package/src/safecheck-android.js +307 -296
  182. package/src/safecheck-page.js +12 -0
  183. package/src/safecheck.js +3 -0
@@ -0,0 +1,2785 @@
1
+ <template>
2
+ <!--<div class="app-botton" @click="back()">-->
3
+ <!--返回<span class="glyphicon glyphicon-menu-right"></span>-->
4
+ <!--</div>-->
5
+ <div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
6
+ <div class="col-sm-12 col-xs-12" >
7
+ <ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
8
+ <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
9
+ v-if="$index < number+1 && $index < faultshow.number" >
10
+ <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
11
+ <span class="spanboder">{{row.header}}</span>
12
+ <img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
13
+ <p></p>
14
+ </li>
15
+ <div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
16
+ <route name='repair' :reuse="false"></route>
17
+ </div>
18
+ <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
19
+ v-if="$index > number && $index < faultshow.number ">
20
+ <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
21
+ <span class="spanboder">{{row.header}}</span>
22
+ <img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
23
+ <p></p>
24
+ </li>
25
+ <div class="col-sm-12 col-xs-12 repair-bg" v-if="actionEnabled ">
26
+ <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
27
+ <div class="bq-parent">
28
+ <blockquote class="blockquote">
29
+ <p>安检上传</p>
30
+ </blockquote>
31
+ </div>
32
+ <div class="panel panel-default auto repair-info-content">
33
+ <div class="panel-body ">
34
+ <div class="row auto">
35
+ <!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
36
+ <!--<label>请输入超期原因:</label><br/>-->
37
+ <!--<textarea style="width: 100%;" v-model=""></textarea>-->
38
+ <!--</div>-->
39
+ <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
40
+ <div class="col-xs-3 col-sm-3 col-md-3" v-if="parentPage=='CurrentCreate'">
41
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="save('temp')">
42
+ 临时保存
43
+ </button>
44
+ </div>
45
+ <div class="col-xs-3 col-sm-3 col-md-3">
46
+ <button class="col-sm-3 btn btn-primary" @click="save('finish')">
47
+ 本地缓存
48
+ </button>
49
+ </div>
50
+ <div class="col-xs-3 col-sm-3 col-md-3">
51
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
52
+ 上传
53
+ </button>
54
+ </div>
55
+ <div v-if="show_torepair">
56
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="showmod">
57
+ 转维修
58
+ </button>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </ul>
67
+ </div>
68
+ <modal :show.sync="showModal2" :backdrop="false" style="font-size: 15px">
69
+ <div slot="modal-header" class="modal-header upuserinfo_sel">
70
+ <h4 class="modal-title">
71
+ 转维修
72
+ </h4>
73
+ </div>
74
+ <div slot="modal-body" class="modal-body">
75
+ <div class="row">
76
+ <ol style="border: 1px solid green;padding: 15px 0 15px 20px">
77
+ <li v-for="row in repairDefect.data" >{{row}}</li>
78
+ </ol>
79
+ </div>
80
+ <div class="row" style="margin-top: 10px">
81
+ <label class="font_normal_body">派发类型</label>
82
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
83
+ :options='dispatchTypeOptions' placeholder='派发类型'
84
+ close-on-select>
85
+ </v-select>
86
+ </div>
87
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
88
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
89
+ <v-select
90
+ :value.sync="selectData.f_repairman"
91
+ :value-single="true"
92
+ :options='repairers'
93
+ placeholder='请选择维修员'
94
+ close-on-select></v-select>
95
+ </div>
96
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
97
+ <label class="font_normal_body">站&ensp;&ensp;&ensp;&ensp;点</label>
98
+ <right-tree
99
+ islist
100
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
101
+ @re-res="getSiteRes"></right-tree>
102
+ </div>
103
+ <!--<div class="row" style="margin-top: 10px">
104
+ <label class="font_normal_body">报修类型</label>
105
+ <v-select :value.sync="selectData.f_repairtype"
106
+ class="select select_list"
107
+ :value-single="true"
108
+ :options='repairTypeOptions'
109
+ close-on-select>
110
+ </v-select>
111
+ </div>-->
112
+ <div class="row" style="margin-top: 10px">
113
+ <label class="font_normal_body" >备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
114
+ <div class="btn-group" style="width:60%">
115
+ <textarea style="width:100%;height: 100px" v-model="selectData.f_remarks"></textarea>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
120
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="rectification">转维修</button>
121
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel1">取消</button>
122
+ </div>
123
+ </modal>
124
+ </div>
125
+ </template>
126
+
127
+ <script>
128
+ // 户内维修
129
+ import Vue from 'vue'
130
+ import * as Util from '../../Util'
131
+ import { HttpResetClass } from 'vue-client'
132
+ import co from 'co'
133
+ import $ from "jquery";
134
+ let loadParamGem = async function (self) {
135
+ await self.$LoadParams.loadParam()
136
+ }
137
+
138
+ export default {
139
+ title: '安检单',
140
+ props: ['f_plan_id', 'item', 'role','parentPage','source'],
141
+ // props: ['f_plan_id', 'role'],
142
+ data() {
143
+ return {
144
+ //测试数据
145
+ // f_plan_id:'',
146
+ // role:'inspect',
147
+ // item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
148
+ // "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
149
+ // "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
150
+ // "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
151
+ // "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
152
+ // "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
153
+ // "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
154
+ // "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
155
+ // "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
156
+ // "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
157
+ // "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
158
+ // "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
159
+ // },
160
+
161
+ data: {
162
+ f_devices: [],
163
+ f_defect_content:'',
164
+ f_recording1_path:'',
165
+ f_visit_number:'',
166
+ f_remark:''
167
+ },
168
+ imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
169
+ updateuserphone:false, //安检时是否更新用户电话
170
+ updatemetermodel:false, //安检时是否更新表型号
171
+ updatemeternumber:false, //安检时是否更新表号
172
+ beforephone:'',
173
+ isUpload:false,
174
+ show_torepair: false,
175
+ onlySave:true, //判断保存还是保存并上传
176
+ livedispose:'',
177
+ refuseinspection:'', // 拒捡拍照是否提示
178
+ notencountered:'', // 到访不遇拍照是否提示
179
+ startClick:false, //开始安检按钮是否可点击
180
+ isStrat: false, //是否开始安检
181
+ checkResult:{},//查询结果
182
+ newcheckResult:{},
183
+ repairDefect : {
184
+ result: '正常',
185
+ data: []
186
+ },
187
+ rowCodata:{},
188
+ repairers: [],
189
+ timer: null,
190
+ showModal: false,
191
+ showModal2:false,
192
+ pic_to_be_viewed: '',
193
+ showBack:true,
194
+ devices: [],
195
+ f_devices : [],
196
+ isToRepair:false,
197
+ clickBack:true, //是否点击返回按钮
198
+ isSafeCheckToRepair:false,//是否转维修
199
+ Url:this.$androidUtil.getProxyUrl(),
200
+ detail:{},
201
+ defectDevice:{},
202
+ user:{},
203
+ is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
204
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
205
+ selectData:{
206
+ dispatchType:'派发给维修员',
207
+ f_repairman:'',
208
+ f_remarks:'',
209
+ f_repairtype:'整改'
210
+ },
211
+ model: { //转维修数据
212
+ // 一次派单
213
+ serviceacitivity: [{
214
+ f_service_acitivity_type: '派单'
215
+ }],
216
+ f_source:'安检',
217
+ f_service_id: '',
218
+ f_contact_phone: '',
219
+ f_meetunit: '',
220
+ f_phone: '',
221
+ f_user_name: '',
222
+ f_address: '',
223
+ f_repair_date: Util.toStandardTimeString(),
224
+ f_card_id: '',
225
+ // f_department: '', 站点选择
226
+ f_reciever:'',
227
+ f_remarks: '',
228
+ f_user_type: '',
229
+ f_area: '',
230
+ f_unit_name:'',
231
+ f_street: '',
232
+ f_residential_area: '',
233
+ f_building: '',
234
+ f_unit: '',
235
+ f_floor: '',
236
+ f_room: '',
237
+ aState: null,
238
+ f_repairtype: '',
239
+ f_repairitems:{},
240
+ },
241
+ repairitems:[],
242
+ meading:'转站点',
243
+ config: {
244
+ "燃气表":{
245
+ "checkmust":true,
246
+ "index":1,
247
+ "items":{
248
+ //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
249
+ "基表编号":{"index":1,"type":"string","readonly":true},
250
+ "气表型号":{"index":2,"type":"string","readonly":true},
251
+ "气表品牌":{"index":3,"type":"string","readonly":true},
252
+ "进气方向":{"index":4,"type":"string","readonly":true},
253
+ "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
254
+ "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
255
+ "累购气量":{"index":7,"type":"number","readonly":true},
256
+ "累购金额":{"index":7,"type":"number","readonly":true},
257
+ "已用气量":{"index":8,"type":"number","checkmust": false},//基表数
258
+ "已用金额":{"index":8,"type":"number","checkmust": false},
259
+ "剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
260
+ //显示屏数 --实际剩余气量
261
+ "剩余金额":{"index":9,"type":"number","checkmust": false},
262
+ "气量异常差值":{"index":10,"type":"number","readonly": true},
263
+ "金额异常差值":{"index":10,"type":"number","readonly": true},
264
+ "系统余额":{"index":10,"type":"number","readonly": true},
265
+ "表封号":{"index":11,"type":"string","readonly": true},
266
+ "燃气表照片":{"index":12,"type":"picture","checkmust": false}
267
+ }
268
+ // 注意,配置项的index必须与上面的固定配置保持'顺序'
269
+ },
270
+ // "燃气表2":{
271
+ // "checkmust":true,
272
+ // "index":2,src
273
+ // "items":{
274
+ // "燃气表照片":{"index":1,"type":"picture"},
275
+ // "表品牌":{"index":2,"type":"string","readonly":true},
276
+ // "表号":{"index":3,"type":"string","readonly":true},
277
+ // "表封号":{"index":4,"type":"number","readonly":true},
278
+ // "表型号":{"index":5,"type":"string","readonly":true},
279
+ // "位置":{"index":6,"type":"string","readonly":true},
280
+ // "表底数":{"index":7,"type":"number","readonly":true},
281
+ // "累购气量":{"index":8,"type":"number","readonly":true},
282
+ // "累购金额":{"index":8,"type":"number","readonly":true}
283
+ // }
284
+ // }
285
+ },
286
+ // 维修项
287
+ isneedDate:'',
288
+ routeShow:true,
289
+ number:0,
290
+ shupingshow:false,
291
+ pipeline: {},
292
+ details: [],
293
+ ids: '',
294
+ savevalid: {
295
+ uservalid: false,
296
+ doorvalid: true,
297
+ changetable: false
298
+ },
299
+ doordetails: {},
300
+ devicedetails: {},
301
+ cookdetails: {},
302
+ componentName: 'safecheck-userinfo',
303
+ header:'客户信息',
304
+ tabs: [
305
+ // 参数全部设置成空,在ready时,等model处理好了,再添加
306
+ {
307
+ header: '客户信息',complete:'safecheck-userinfo',class: 'repair-info-class', props: null
308
+ },
309
+ {
310
+ header: '拍照签名',complete:'paper-feedback', class: 'outlay-class', props: null
311
+ }
312
+ ],
313
+ faultshow:{
314
+ number : 8
315
+ } // 控制 故障汇总 在 菜单里显示与否,
316
+ }
317
+ },
318
+ computed: {
319
+ actionEnabled: {
320
+ get() {
321
+ return this.role == 'inspect'
322
+ }
323
+ }
324
+ },
325
+ methods: {
326
+ showmod(){
327
+ // this.saveNoclick()
328
+ let errString = this.errorVerify()
329
+ if (errString) {
330
+ console.log(errString)
331
+ console.log('Vue.android',Vue.android)
332
+ console.log('this.isUpload',this.isUpload)
333
+ if (Vue.android){
334
+ this.$showMessage(errString)
335
+ }
336
+ return
337
+ }
338
+ //清空转维修列表重新进行数据组织
339
+ this.repairDefect = {
340
+ result: '正常',
341
+ data: []
342
+ }
343
+ this.data.f_complete = '已完成'
344
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
345
+ this.assemblyCodata()
346
+ if(this.repairDefect.result=='正常'){
347
+ this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
348
+ return
349
+ }
350
+ console.log("准备保存!")
351
+ this.disableTimer()
352
+ this.getEmp()
353
+ this.showModal2=true
354
+ },
355
+ cancel1(){
356
+ this.showModal2=false
357
+ this.selectData={
358
+ dispatchType:'派发给维修员',
359
+ f_repairman:'',
360
+ f_remarks:'',
361
+ f_repairtype:'整改'
362
+ }
363
+ },
364
+ getSiteRes(obj) {
365
+ console.log('siteRes ---> ')
366
+ console.log(obj)
367
+ if(obj.resids[0]){
368
+ this.selectData.f_meetunit = obj.res.join('.')
369
+ this.selectData.f_reciever = obj.resids.join('.')
370
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
371
+ }else {
372
+ this.selectData.f_meetunit = ''
373
+ this.selectData.f_reciever = ''
374
+ this.selectData.f_outlets = ''
375
+ }
376
+ },
377
+ rectification(){
378
+ if(this.selectData.dispatchType){
379
+ if(this.selectData.dispatchType=='派发给站点'){
380
+ if(!this.selectData.f_reciever){
381
+ this.$showMessage('请选择部门!')
382
+ return
383
+ }
384
+ }else{
385
+ if(!this.selectData.f_repairman){
386
+ this.$showMessage('请选择维修员!')
387
+ return
388
+ }
389
+ }
390
+ }else {
391
+ this.$showMessage('请选择派发类型!')
392
+ return
393
+ }
394
+ /*if(!this.selectData.f_repairtype){
395
+ this.$showMessage('请选择报修类型!')
396
+ return
397
+ }*/
398
+ //关闭录音
399
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
400
+ let act={}
401
+ let toRepair=''
402
+ if(this.selectData.dispatchType=='派发给站点'){
403
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
404
+ toRepair=null
405
+ }else{
406
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
407
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
408
+ toRepair='一级派单'
409
+ }
410
+ let repData={
411
+ toRepair:toRepair,
412
+ activity:act,
413
+ deps:Vue.user.deps,
414
+ depids:Vue.user.depids,
415
+ f_remarks:this.selectData.f_remarks,
416
+ f_repairtype:this.selectData.f_repairtype,
417
+ f_attendant: Vue.user.name,
418
+ loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
419
+ }
420
+ this.rowCodata.istoRepair='转维修'
421
+ this.rowCodata.repData=repData
422
+ console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
423
+ this.onlySave = false
424
+ this.save()
425
+ },
426
+ // 获取维修员
427
+ getEmp() {
428
+ this.repairers=[]
429
+ let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
430
+ let http = new HttpResetClass()
431
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
432
+ res.data.forEach((user)=>{
433
+ this.repairers.push({label:user.name, value: user.name})
434
+ })
435
+ })
436
+ },
437
+ closely(isdelete){
438
+ try {
439
+ var startOrStopAudioClipStr;
440
+ if (isdelete===true) {
441
+ //tag
442
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
443
+ }else {
444
+ //tag
445
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
446
+ }
447
+ if (startOrStopAudioClipStr.code == 200) {
448
+ //tag
449
+ return true;
450
+ }else {
451
+ return false;
452
+ }
453
+ } catch (e) {
454
+ console.error("关闭录音方法异常")
455
+ console.error(e)
456
+ return false;
457
+ }
458
+ },
459
+ // 录音方法
460
+ record() {
461
+ //tag
462
+ if (this.role != 'inspect') {
463
+ if (this.data.f_recording1_path != '') {
464
+ window.location = "/rs/file"+this.data.f_recording1_path
465
+ }
466
+ } else {
467
+ //tag
468
+ let fileName
469
+ if (!this.data.f_recording1_path) {
470
+ fileName = Util.guid() + '.amr'
471
+ } else {
472
+ fileName = Util.getFileName(this.data.f_recording1_path)
473
+ }
474
+ //HostApp.__this__ = this
475
+ /*调用无限制录音模块*/
476
+ let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
477
+ //tag
478
+ if (startOrStopState.code == 200) {
479
+ this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
480
+ //tag
481
+ return true;
482
+ }else {
483
+ return false;
484
+ }
485
+ }
486
+ },
487
+ saveNoclick() {
488
+ // 禁用点击事件
489
+ $("#savebut").addClass("noclickbut");
490
+ //tag
491
+
492
+ // 5秒后启用点击事件
493
+ setTimeout(function(){
494
+ $("#savebut").removeClass("noclickbut");
495
+ },5000);
496
+ },
497
+ timeSet(val){
498
+ if (!val){
499
+ return
500
+ }
501
+ let time =new Date(val).getTime()
502
+ let time2=new Date().getTime()
503
+ if (time2>time) {
504
+ return true
505
+ }
506
+ },
507
+ imgback(val,isheader){
508
+ if(val && this.routeShow && isheader){
509
+ return require('../../../assets/xiangxia1.png')
510
+ }else{
511
+ return require('../../../assets/xiangyou1.png')
512
+ }
513
+ },
514
+ changediv(val){
515
+ //tag
516
+ return val
517
+ },
518
+ // 选择tab
519
+ tabSelect (item,number) {
520
+ this.header = item.header
521
+ //tag
522
+ //tag
523
+ //tag
524
+ //tag
525
+ // 处理关闭/显示 内容
526
+ if(this.number == number && !this.routeShow ){
527
+ this.routeShow = true
528
+ }else if(this.number == number && this.routeShow){
529
+ this.routeShow = false
530
+ }else if(this.number != item.complete){
531
+ this.routeShow = true
532
+ }
533
+ this.number = number
534
+ this.componentName = item.complete
535
+ //tag
536
+ if(item.complete == 'safecheck-devices'){
537
+ //tag
538
+ if(item.header != '燃气表' && this.data['device'+item.number].length == 0){
539
+ this.data['device' + item.number].push({})
540
+ }
541
+ //tag
542
+ //tag)
543
+ let idx=this.data['device' + item.number].length - 1
544
+ let itemprops = {
545
+ config:this.config,
546
+ device:this.devices[item.number-1],
547
+ idx:idx,
548
+ role:'inspect'
549
+ }
550
+ //tag
551
+ //tag)
552
+ //tag)
553
+ //tag
554
+ if(this.routeShow){
555
+ this.$goto(item.complete, itemprops, 'repair')
556
+ //tag
557
+ }
558
+ }else{
559
+ //tag
560
+ if(this.routeShow){
561
+ this.$goto(item.complete, {userinfo:this.data}, 'repair')
562
+ }
563
+ }
564
+ this.shupingshow = true
565
+ },
566
+ // 给组件添加参数
567
+ getImgPath() {
568
+ for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
569
+ this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
570
+ }
571
+ this.ids = this.ids.substring(0, this.ids.length - 1)
572
+ if(this.ids){
573
+ this.getImgGen();
574
+ }
575
+ },
576
+ getImgGen(){
577
+ let http = new HttpResetClass()
578
+ http.load('POST','rs/sql/tel_singleTable_OrderBy', {data: {
579
+ items: '*',
580
+ tablename: 't_files',
581
+ condition: `id in (${this.ids})`,
582
+ orderitem: 'id'
583
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
584
+ for (let i = 0; i < res.data.length; i++) {
585
+ for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
586
+ //tag)
587
+ //tag
588
+ if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
589
+ this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
590
+ }
591
+ }
592
+
593
+ }
594
+ })
595
+ },
596
+
597
+ sortDetails(){
598
+ for (let i = 0; i < this.details.length; i++) {
599
+ if (this.details[i].details.length) {
600
+ for (let j = 0; j < this.details[i].details.length; j++) {
601
+ if (this.details[i].details[j].f_type === 'a') {
602
+ this.doordetails = {details: this.details[i].details}
603
+ break
604
+ }
605
+ if (this.details[i].details[j].f_type === 'b') {
606
+ this.devicedetails = {details: this.details[i].details}
607
+ break
608
+ }
609
+ if (this.details[i].details[j].f_type === 'c') {
610
+ this.cookdetails = {details: this.details[i].details}
611
+ break
612
+ }
613
+ }
614
+ }
615
+ }
616
+ },
617
+ // 复制数据
618
+ back () {
619
+ let _this = this
620
+ if(this.issee){
621
+ _this.$back()
622
+ return
623
+ }
624
+ this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
625
+ if (res === 'confirm') {
626
+ this.closely()
627
+ _this.$back()
628
+ }
629
+ })
630
+ },
631
+ confirm(){
632
+ this.$dispatch('confirm')
633
+ },
634
+ tick() {
635
+ this.timer = null
636
+ this.data.f_offsite_time = Util.toStandardTimeString()
637
+ this.timer = window.setTimeout(this.tick, 1000)
638
+ },
639
+ getRepairState() {
640
+ let repaired = true
641
+ this.data.f_defects.forEach((defect) => {
642
+ repaired = repaired & (defect.f_ratification == '已处理')
643
+ })
644
+ return repaired
645
+ },
646
+ verifyRepairDefects() {
647
+ this.data.f_repair_date = Util.toStandardTimeString()
648
+ this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
649
+ },
650
+ errorVerify() {
651
+ let hasError = this.verifyState()
652
+ if(hasError)
653
+ return hasError
654
+
655
+ if(this.data.f_entry_status != '入户' || this.data.f_usegas == '未用气')
656
+ return null
657
+ hasError = this.verifyUser()
658
+ if(hasError)
659
+ return hasError
660
+ hasError = this.verifyDevices()
661
+ if(hasError)
662
+ return hasError
663
+ hasError = this.verifyFeedback()
664
+ if(hasError)
665
+ return hasError
666
+ },
667
+ verifyState() {
668
+ if(Vue.android && this.data.f_usegas == '未用气' && (this.data.f_nongasuser_path == Vue.nopic || this.data.f_nongasuser_path == ''))
669
+ return '未使用天然气则必须拍照'
670
+ if(Vue.android && this.data.f_entry_status == '到访不遇' && this.notencountered && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
671
+ return '到访不遇必须拍照'
672
+ if(Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
673
+ return '拒捡必须拍照'
674
+ },
675
+ verifyUser() {
676
+ let prefix = '用户基本信息:'
677
+ if(Util.required(this.data.f_user_name))
678
+ return prefix + '用户名必须输入'
679
+ },
680
+ verifyDevices() {
681
+ for (let dev in this.config) {
682
+ if (this.config[dev].checkmust == true) {
683
+ let error = true
684
+ for(let device in this.data) {
685
+ if (device.startsWith("device")) {
686
+ for (let item in this.data[device]) {
687
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
688
+ error = false
689
+ }
690
+ }
691
+ }
692
+ }
693
+ if (error) {
694
+ return "请检查" + dev
695
+ }
696
+ }
697
+ }
698
+
699
+ for (let dev in this.config) {
700
+ for(let device in this.data) {
701
+ if (device.startsWith("device")) {
702
+ for (let item in this.data[device]) {
703
+ //检查每一条安检结果
704
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
705
+ for (let i in this.data[device][item].f_items) {
706
+ for (let it in this.config[dev].items) {
707
+ if (it == this.data[device][item].f_items[i].f_item_name) {
708
+ let check=false
709
+ if (!this.data[device][item].f_items[i].f_item_value){
710
+ check=true
711
+ }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
712
+ if (this.data[device][item].f_items[i].f_item_value.length==0){
713
+ check=true
714
+ }
715
+ }
716
+
717
+ if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
718
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
719
+ }
720
+ if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
721
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
722
+ }
723
+ }
724
+ }
725
+ //检查安检下拉结果
726
+ if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
727
+ if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
728
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
729
+ }
730
+ }
731
+ }
732
+ }
733
+ }
734
+ }
735
+ }
736
+ }
737
+ },
738
+ verifyFeedback() {
739
+ let prefix = '拍照签名:'
740
+ //tag)
741
+ if(Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
742
+ return prefix + `必须有${this.imgsnum}安检总体照片`
743
+ if(Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
744
+ return prefix + '必须有用户签名'
745
+ if(Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
746
+ return prefix + '下发安检通知书则必须给通知书拍照'
747
+ if(Vue.android && this.data.f_blacklist && this.data.f_blocking_cause=='')
748
+ return prefix + '请填写拉黑原因'
749
+ if(!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
750
+ return prefix + '请选择服务评价'
751
+ },
752
+ getAllDefect() {
753
+ let checkResults = {
754
+ result: '正常',
755
+ data: []
756
+ }
757
+ let value = ''
758
+ let codata = JSON.parse(JSON.stringify(this.data))
759
+ //tag)
760
+ //tag)
761
+ codata.f_devices = []
762
+ this.f_devices = []
763
+ for (let device in codata) {
764
+ let f_device_type
765
+ if (device.startsWith("device")) {
766
+ //tag)
767
+ let hasOther = ''
768
+ let otherValue = null
769
+ for (let item in codata[device]) {
770
+ if(typeof codata[device][item]=='function'){
771
+ continue
772
+ }
773
+ codata[device][item].f_create_time = Util.toStandardTimeString()
774
+ if (codata[device].length > 1) {
775
+ let j = Number.parseInt(item) + 1
776
+ f_device_type = `${codata[device][item].f_device_type}${j}`
777
+ } else {
778
+ f_device_type = codata[device][item].f_device_type
779
+ }
780
+ //tag
781
+ //tag
782
+ //tag)
783
+ //tag)
784
+ if(item == 'sum' || item == 'removeEmpty'){
785
+ continue
786
+ }
787
+ for (let i = 0; i < codata[device][item].f_items.length ; i++) {
788
+ //tag
789
+ if(i == 'sum' || i == 'removeEmpty'){
790
+ continue
791
+ }
792
+ //tag)
793
+ var items = codata[device][item].f_items[i]
794
+ items.f_create_time = Util.toStandardTimeString()
795
+ //tag)
796
+ items.f_item_lists = []
797
+ //tag)
798
+ // //tag)
799
+ // //tag} name => ${JSON.stringify(items.f_item_name)} value => ${JSON.stringify(items.f_item_value)}`)
800
+ // console.log(`f_is_defect => ${this.config[codata[device][item]
801
+ // .f_device_type]
802
+ // .items[items.f_item_name]
803
+ // .options
804
+ // .find((option)=>option.data === items.f_item_value)
805
+ // .map((option)=>option.f_is_defect)}`)
806
+ // if (items.f_is_defect && (items.f_is_defect == true || items.f_is_defect == 'true')) {
807
+ // //tag
808
+ // checkResults.result = '有隐患'
809
+ // //tag)
810
+ // //tag)
811
+ // // this.$set('checkResult.' + items.f_item_name, items.f_item_value)
812
+ // this.checkResult[items.f_item_name] = items.f_item_value
813
+ // //tag)
814
+ // // this.$set('checkResultsss.' + items.f_item_name, `${f_device_type}${items.f_item_value}`)
815
+ // // //tag)
816
+ // }
817
+ if (items.type == 'selector') {
818
+ items.selected = []
819
+ } else if (items.type == 'inputSelector') {
820
+ items.selected = ''
821
+ }
822
+ //遍历配置项 将所选隐患项的配置信息放入保存的数据中
823
+ let f_is_defect //是否是隐患
824
+ let f_defect_level //是否是隐患
825
+ let f_item_name = items.f_item_name
826
+ let f_item_value
827
+ let f_is_eliminate //隐患是否消除
828
+ let f_meternumber = ''
829
+ let f_user_defects = [] // 用户所有隐患
830
+ //tag
831
+ //tag
832
+ if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
833
+ for (let i in items.f_item_value) {
834
+ if(typeof items.f_item_value[i]=='function'){
835
+ continue
836
+ }
837
+ let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
838
+ //tag)
839
+ for (let k in configItems.options) {
840
+ if(typeof configItems.options[k]=='function'){
841
+ continue
842
+ }
843
+ //tag)
844
+ if (items.f_item_value[i] === configItems.options[k].data) {
845
+
846
+ f_is_defect = configItems.options[k].isdefect
847
+ f_item_value = items.f_item_value[i]
848
+ f_defect_level = configItems.options[k].level
849
+
850
+ //tag
851
+ //tag
852
+ //tag
853
+
854
+ if (f_is_defect) {
855
+ if (checkResults.result !== '有隐患') {
856
+ checkResults.result = '有隐患'
857
+ }
858
+ console.log('items'+items)
859
+ if(items.f_deal_dispose=='报修'){
860
+ console.log("检测到需要转维修++++++++++++")
861
+ this.repairDefect.result='未处理'
862
+ this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
863
+ }
864
+ if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
865
+ //tag
866
+ this.checkResult[f_device_type+'-'+f_item_name] = []
867
+ }
868
+
869
+ //tag
870
+ this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
871
+
872
+ }
873
+
874
+ let items_list = {
875
+ f_is_defect: f_is_defect,
876
+ f_item_value: f_item_value,
877
+ f_defect_level: f_defect_level,
878
+ f_is_eliminate: null,
879
+ f_create_time: Util.toStandardTimeString()
880
+ }
881
+ if (!items.f_item_lists) {
882
+ //tag
883
+ items.f_item_lists = []
884
+ //tag)
885
+ if (JSON.stringify(items_list) !== '{}') {
886
+ //tag
887
+ items.f_item_lists.push(items_list)
888
+ }
889
+ } else {
890
+ //tag)
891
+ if (JSON.stringify(items_list) !== '{}') {
892
+ //tag
893
+ items.f_item_lists.push(items_list)
894
+ }
895
+ }
896
+ }
897
+ }
898
+ }
899
+ } else {
900
+ let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
901
+ f_is_defect = items.f_is_defect
902
+ f_defect_level = items.level
903
+ f_item_value = items.f_item_value
904
+ let items_list = {
905
+ f_is_defect: f_is_defect,
906
+ f_item_value: f_item_value,
907
+ f_defect_level: f_defect_level,
908
+ f_create_time: Util.toStandardTimeString()
909
+ }
910
+ if (f_is_defect && f_item_value) {
911
+ items.f_is_defect = true
912
+ if (checkResults.result !== '有隐患') {
913
+ checkResults.result = '有隐患'
914
+ }
915
+ if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
916
+ //tag
917
+ this.checkResult[items.f_item_name] = []
918
+ }
919
+
920
+ //tag
921
+ this.checkResult[items.f_item_name].push(f_item_value)
922
+
923
+ }
924
+ //tag)
925
+ //tag)
926
+ if (!items.f_item_lists) {
927
+ //tag
928
+ items.f_item_lists = []
929
+ if (JSON.stringify(items_list) != '{}') {
930
+ //tag
931
+ items.f_item_lists.push(items_list)
932
+ }
933
+ } else {
934
+ // items.f_item_lists[0].f_item_value = f_item_value
935
+ if (JSON.stringify(items_list) != '{}') {
936
+ //tag
937
+ //tag)
938
+ //tag)
939
+ //tag
940
+ items.f_item_lists.push(items_list)
941
+ }
942
+ }
943
+ }
944
+ if (hasOther !== '' && otherValue !== null) {
945
+ //tag
946
+ this.checkResult[hasOther].push(otherValue)
947
+ hasOther = ''
948
+ otherValue = null
949
+ }
950
+ items.f_item_value = ''
951
+ }
952
+ //tag)
953
+ this.f_devices.push(codata[device][item])
954
+ }
955
+ }
956
+ }
957
+ if (this.checkResult) {
958
+ for (let key in this.checkResult) {
959
+ if(typeof this.checkResult[key]=='function'){
960
+ continue
961
+ }
962
+ // 上次安检结果数据组织
963
+ //tag
964
+ //tag
965
+ let temp = {}
966
+ temp[key] = this.checkResult[key].join(',')
967
+ checkResults.data.push(temp)
968
+ // this.newcheckResult[key] = this.checkResult[key]
969
+ // checkResults.data.push(this.newcheckResult)
970
+ //tag)
971
+ // this.newcheckResult = {}
972
+ }
973
+ this.checkResult = {}
974
+ }
975
+ if (checkResults.data.length > 0) {
976
+ let msg = ''
977
+ for (let a = 0; a < checkResults.data.length; a++) {
978
+ for (let datumKey in checkResults.data[a]) {
979
+ msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
980
+ }
981
+ }
982
+ this.data.f_defect_text = msg
983
+ codata.f_defect_text = msg
984
+ }
985
+ codata.f_defect_content = JSON.stringify(checkResults)
986
+ this.data.f_defect_content = JSON.stringify(checkResults)
987
+ //tag
988
+ return codata
989
+ },
990
+ uploadCheckPaper(){
991
+ this.saveNoclick()
992
+ this.closely(false) // 保存本地,不删除录音文件停止录音
993
+ let errString = this.errorVerify()
994
+ if (errString) {
995
+ if (Vue.android){
996
+ this.$showMessage(errString)
997
+ }
998
+ return
999
+ } else {
1000
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1001
+ this.$set('data.f_upload_time', Util.toStandardTimeString())
1002
+ this.$set('data.f_upload_date', Util.toStandardTimeString())
1003
+ //tag
1004
+ this.data.f_complete = '已完成'
1005
+ this.disableTimer()
1006
+ }
1007
+ //tag
1008
+ this.onlySave = false
1009
+ this.assemblyCodata()
1010
+ if (this.repairDefect.result != '正常') {
1011
+ return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
1012
+ }
1013
+ let res = this.save()
1014
+ // if(res) {
1015
+ // try {
1016
+ // let codata = this.getAllDefect()
1017
+ // //获取微信推送内容
1018
+ // let WxResult = this.getWeixin(codata)
1019
+ // let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1020
+ // f_check_item_id: this.data.f_check_item_id
1021
+ // })
1022
+ // //如果是转维修上传,则不做校验,上传完成后自动转维修
1023
+ // //tag
1024
+ // //tag
1025
+ // if(!this.isToRepair){
1026
+ // if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
1027
+ // //tag
1028
+ // //tag
1029
+ // if(!this.isSafeCheckToRepair){
1030
+ // this.$showMessage('有未处理的隐患,请前往拍照上传中将安检转为维修单!')
1031
+ // return
1032
+ // }
1033
+ // }
1034
+ // }
1035
+ // //tag
1036
+ // for (let key in codata){
1037
+ // if(key.startsWith("device")){
1038
+ // codata[key] = []
1039
+ // }
1040
+ // }
1041
+ // //tag}`)
1042
+ //
1043
+ // //tag
1044
+ // let isStart = true
1045
+ // let res
1046
+ // for (let i in this.f_devices){
1047
+ // res = HostApp.organizeJSON({isStart:isStart,isDevice:true,device:this.f_devices[i]})
1048
+ // if(res.code == 200){
1049
+ // isStart = false
1050
+ // }else{
1051
+ // this.$showMessage("保存失败!")
1052
+ // }
1053
+ // }
1054
+ // let result = HostApp.organizeJSON({
1055
+ // isStart:false,
1056
+ // isJSON:true,
1057
+ // jsonstr:{
1058
+ // f_check_item_id: this.data.f_check_item_id,
1059
+ // f_checker_id: this.data.f_checker_id,
1060
+ // row: codata
1061
+ // }
1062
+ // })
1063
+ // if(result.code == 200){
1064
+ // HostApp.__this__ = this
1065
+ // this.runSyncLogic('上传安检信息','javascript:HostApp.__this__.uploadCallBack()',1)
1066
+ // }
1067
+ //
1068
+ //
1069
+ // // let response = this.$androidUtil.bzLogic('上传安检信息', {
1070
+ // // f_check_item_id: this.data.f_check_item_id,
1071
+ // // f_checker_id: this.data.f_checker_id,
1072
+ // // row: codata
1073
+ // // })
1074
+ // // if (response.code == 200) {
1075
+ // // //tag
1076
+ // // //tag)
1077
+ // // let f_paper_id
1078
+ // // if(response.data != '' && response.data != null){
1079
+ // // f_paper_id = JSON.parse(response.data).id
1080
+ // // }
1081
+ // // this.$set('data.f_paper_id', f_paper_id)
1082
+ // // //tag
1083
+ // // //tag)
1084
+ // // //tag
1085
+ // // //tag)
1086
+ // // for (let device in this.data){
1087
+ // // //tag
1088
+ // // //tag)
1089
+ // // if(device.startsWith("device")){
1090
+ // // for(let devices of this.data[device]) {
1091
+ // // devices.f_paper_id = f_paper_id
1092
+ // // let ret = this.$androidUtil.bzLogic('UpCheckPaperDevices', {
1093
+ // // row: devices
1094
+ // // })
1095
+ // // //tag}`)
1096
+ // // if(ret.code == 200){
1097
+ // // //tag
1098
+ // // devices.f_device_id = JSON.parse(ret.data.f_device_id).id
1099
+ // // }
1100
+ // // //tag
1101
+ // // //tag)
1102
+ // // if (ret.code != 200) {
1103
+ // // //TODO 失败后处理
1104
+ // // // this.isUpload = false
1105
+ // // this.$showMessage("上传失败!")
1106
+ // // return false
1107
+ // // }
1108
+ // // }
1109
+ // // }
1110
+ // // }
1111
+ // // // for (let device of this.f_devices) {
1112
+ // // // device.f_paper_id = f_paper_id
1113
+ // // // //tag
1114
+ // // // //tag)
1115
+ // // // let ret = this.$androidUtil.bzLogic('UpCheckPaperDevices', {
1116
+ // // // row: device
1117
+ // // // })
1118
+ // // // //tag
1119
+ // // // if (ret.code != 200) {
1120
+ // // // //TODO 失败后处理
1121
+ // // // HostApp.alert("上传失败!")
1122
+ // // // return false
1123
+ // // // }
1124
+ // // // }
1125
+ // // let result = this.$androidUtil.bzLogic('FinishUpload',
1126
+ // // {
1127
+ // // f_check_item_id: this.data.f_check_item_id,
1128
+ // // f_userinfo_id: codata.f_userinfoid,
1129
+ // // f_last_check_result: codata.f_defect_content
1130
+ // // })
1131
+ // // if(result.code == 200){
1132
+ // // // this.$showAlert('上传成功!', 'success', 2000)
1133
+ // // this.$showMessage('上传成功!')
1134
+ // // this.isStrat=false
1135
+ // // if(url != "" ){
1136
+ // // this.$resetpost(`${url}`,{data:WxResult})
1137
+ // // }
1138
+ // // return true
1139
+ // // }else{
1140
+ // // // this.isUpload = false
1141
+ // // this.$showMessage("上传失败!")
1142
+ // // return false
1143
+ // // }
1144
+ // // }else{
1145
+ // // // this.isUpload = false
1146
+ // // this.$showMessage("上传失败!")
1147
+ // // return false
1148
+ // // }
1149
+ // }catch (e) {
1150
+ // //tag)
1151
+ // // this.isUpload = false
1152
+ // this.$showMessage("上传失败!")
1153
+ // }
1154
+ // }
1155
+ },
1156
+ //将数据组装提出
1157
+ assemblyCodata(){
1158
+ let codata = this.getAllDefect()
1159
+ console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
1160
+ console.log(`codata内容-->${JSON.stringify(codata)}`)
1161
+ for (let key in codata) {
1162
+ if (key.startsWith("device")) {
1163
+ console.log('this.data.' + key + JSON.stringify(codata[key]))
1164
+ codata[key] = []
1165
+ }
1166
+ }
1167
+ codata.f_devices = this.f_devices
1168
+ this.rowCodata=codata
1169
+ },
1170
+ save(type) {
1171
+ if (type == 'temp' || type == 'finish') {
1172
+ this.assemblyCodata()
1173
+ }
1174
+ //禁用事件
1175
+ this.saveNoclick()
1176
+ //tag
1177
+ //tag
1178
+ if(type == 'temp'){
1179
+ this.data.f_complete = '未完成'
1180
+ this.rowCodata.f_complete = '未完成'
1181
+ // 关闭录音方法
1182
+ this.closely(true) //临时保存,删除录音文件并暂停录音
1183
+ this.disableTimer()
1184
+ }else {
1185
+ // 关闭录音方法
1186
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
1187
+ let errString = this.errorVerify()
1188
+ if (errString) {
1189
+ //tag
1190
+ //tag
1191
+ //tag
1192
+ if (Vue.android){
1193
+ this.$showMessage(errString)
1194
+ }
1195
+ return
1196
+ } else {
1197
+ this.data.f_complete = '已完成'
1198
+ this.rowCodata.f_complete = '已完成'
1199
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1200
+ this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
1201
+ this.disableTimer()
1202
+ }
1203
+ }
1204
+ //tag
1205
+ if(this.data.f_blacklist!='是'){
1206
+ delete this.data.f_blocking_cause
1207
+ }
1208
+ if (this.data.f_entry_status == '入户') {
1209
+ this.data.f_rejectchecks_path = []
1210
+ this.data.f_rejectcheck_path = null
1211
+ this.data.f_rejectcheck1_path = null
1212
+ this.data.f_rejectcheck2_path = null
1213
+ this.data.f_noanswers_path=[]
1214
+ this.data.f_noanswer_path = null
1215
+ this.data.f_noanswer1_path = null
1216
+ this.data.f_noanswer2_path = null
1217
+ }else if (this.data.f_entry_status == '到访不遇') {
1218
+ this.data.f_rejectchecks_path = []
1219
+ this.data.f_rejectcheck_path = null
1220
+ this.data.f_rejectcheck1_path = null
1221
+ this.data.f_rejectcheck2_path = null
1222
+ }else if (this.data.f_entry_status == '拒检') {
1223
+ this.data.f_noanswers_path=[]
1224
+ this.data.f_noanswer_path = null
1225
+ this.data.f_noanswer1_path = null
1226
+ this.data.f_noanswer2_path = null
1227
+ }
1228
+ // try {
1229
+ let codata = this.rowCodata
1230
+ //tag
1231
+ //tag}`)
1232
+ for (let key in codata) {
1233
+ if (key.startsWith("device")) {
1234
+ //tag)
1235
+ codata[key] = []
1236
+ }
1237
+ }
1238
+ codata.f_complete = this.data.f_complete
1239
+ //tag}`)
1240
+ //tag}`)
1241
+ //tag
1242
+ if (Vue.android) {
1243
+ //tag
1244
+ let value = this.$androidUtil.path({
1245
+ alias: 'getUserinfomation',
1246
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1247
+ })
1248
+ //tag)
1249
+ if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
1250
+ // let result = this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1251
+ // f_check_item_id: this.data.f_check_item_id,
1252
+ // f_checker_id: this.data.f_checker_id,
1253
+ // f_upload_state:'未传',
1254
+ // row: codata
1255
+ // })
1256
+ //tag
1257
+ let isStart = true
1258
+ // let res
1259
+ // for (let i in this.f_devices) {
1260
+ // res = HostApp.organizeJSON({isStart: isStart, isDevice: true, device: this.f_devices[i]})
1261
+ // if (res.code == 200) {
1262
+ // isStart = false
1263
+ // } else {
1264
+ // this.$showMessage("保存失败!")
1265
+ // }
1266
+ // }
1267
+ // let result = HostApp.organizeJSON({
1268
+ // isStart: false,
1269
+ // isJSON: true,
1270
+ // jsonstr: {
1271
+ // f_check_item_id: this.data.f_check_item_id,
1272
+ // f_checker_id: this.data.f_checker_id,
1273
+ // f_upload_state: '未传',
1274
+ // row: codata
1275
+ // }
1276
+ // })
1277
+ codata.f_devices = this.f_devices
1278
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1279
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1280
+ } else {
1281
+ this.rowCodata = codata
1282
+ }
1283
+ let param = {
1284
+ f_check_item_id: this.data.f_check_item_id,
1285
+ f_checker_id: this.data.f_checker_id,
1286
+ f_upload_state: '未传',
1287
+ // row: codata
1288
+ row: this.rowCodata
1289
+ }
1290
+ //tag)
1291
+ let paramStr = JSON.stringify(param)
1292
+ // 多长截断一次
1293
+ let subLength = 800
1294
+ for (let i = 0; i < paramStr.length; i += subLength) {
1295
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1296
+ }
1297
+ HostApp.__this__ = this
1298
+ HostApp.syncLogic({
1299
+ // logic别名,key必须为logic
1300
+ 'logic': 'SafeSaveNoPaper',
1301
+ // 回调执行方法名,key必须为callback
1302
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1303
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1304
+ // 执行回调方法传入key为backresult
1305
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1306
+ 'backresult': 1
1307
+ })
1308
+ } else {
1309
+ // console.log("dddddddd")
1310
+ //tag
1311
+ let isStart = true
1312
+ let res
1313
+ //tag)
1314
+ // for (let i in this.f_devices) {
1315
+ // //tag)
1316
+ // for (let j = 0; j < this.f_devices[i].f_items.length; j++) {
1317
+ // //tag)
1318
+ // }
1319
+ // res = HostApp.organizeJSON({isStart: isStart, isDevice: true, device: this.f_devices[i]})
1320
+ // //tag)
1321
+ // if (res.code == 200) {
1322
+ // isStart = false
1323
+ // } else {
1324
+ // this.$showMessage("保存失败!")
1325
+ // }
1326
+ // }
1327
+ //tag)
1328
+ //tag)
1329
+ //tag)
1330
+ // let result = HostApp.organizeJSON({
1331
+ // isStart: false,
1332
+ // isJSON: true,
1333
+ // jsonstr: {
1334
+ // f_check_item_id: this.data.f_check_item_id,
1335
+ // f_checker_id: this.data.f_checker_id,
1336
+ // row: codata
1337
+ // }
1338
+ // })
1339
+ codata.f_devices = this.f_devices
1340
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1341
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1342
+ } else {
1343
+ this.rowCodata = codata
1344
+ }
1345
+ let param = {
1346
+ f_check_item_id: this.data.f_check_item_id,
1347
+ f_checker_id: this.data.f_checker_id,
1348
+ // row: codata
1349
+ row: this.rowCodata
1350
+ }
1351
+ //tag)
1352
+ // console.log("ni"+JSON.stringify(param))
1353
+ let paramStr = JSON.stringify(param)
1354
+ // 多长截断一次
1355
+ let subLength = 800
1356
+ for (let i = 0; i < paramStr.length; i += subLength) {
1357
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1358
+ }
1359
+ HostApp.__this__ = this
1360
+ HostApp.syncLogic({
1361
+ // logic别名,key必须为logic
1362
+ 'logic': '保存安检单信息',
1363
+ // 回调执行方法名,key必须为callback
1364
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1365
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1366
+ // 执行回调方法传入key为backresult
1367
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1368
+ 'backresult': 1
1369
+ })
1370
+ }
1371
+
1372
+ } else {
1373
+ //tag
1374
+ let value = this.$androidUtil.path({
1375
+ alias: 'getUserinfomation',
1376
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1377
+ })
1378
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1379
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1380
+ } else {
1381
+ this.rowCodata = codata
1382
+ }
1383
+ if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
1384
+ this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1385
+ f_check_item_id: this.data.f_check_item_id,
1386
+ f_checker_id: this.data.f_checker_id,
1387
+ f_upload_state: '未传',
1388
+ // row: codata
1389
+ row: this.rowCodata
1390
+ }).then((res) => {
1391
+ if (res.data.code == 200) {
1392
+ //保存devices
1393
+ this.$androidUtil.bzLogic('getPaperInfo', {
1394
+ f_check_item_id: this.data.f_check_item_id
1395
+ }).then((res) => {
1396
+ //tag
1397
+ if (res.data.code == 200) {
1398
+
1399
+ let f_paper_id = res.data.data[0].id
1400
+ for (let device of this.f_devices) {
1401
+ device.f_paper_id = f_paper_id
1402
+ //tag
1403
+ this.$androidUtil.bzLogic('saveDevice', {
1404
+ row: device
1405
+ }).then((ret) => {
1406
+ //tag
1407
+ if (ret.code != 200) {
1408
+ // if(this.isUpload){
1409
+ // this.isUpload = false
1410
+ // }
1411
+ //TODO 失败后处理
1412
+ this.$showMessage("保存失败!")
1413
+ return false
1414
+ }
1415
+ })
1416
+ }
1417
+ }
1418
+ })
1419
+ // this.$showAlert('保存成功!', 'success', 2000)
1420
+ this.$showMessage('保存成功!')
1421
+ return true
1422
+ } else {
1423
+ // if(this.isUpload){
1424
+ // this.isUpload = false
1425
+ // }
1426
+ this.$showMessage("保存失败!")
1427
+ return false
1428
+ }
1429
+ })
1430
+ }
1431
+ else {
1432
+ this.$androidUtil.bzLogic('保存安检单信息', {
1433
+ f_check_item_id: this.data.f_check_item_id,
1434
+ f_checker_id: this.data.f_checker_id,
1435
+ row: this.rowCodata
1436
+ }).then((res) => {
1437
+ //tag
1438
+ if (res.data.code == 200) {
1439
+ //保存devices
1440
+ this.$androidUtil.bzLogic('getPaperInfo', {
1441
+ f_check_item_id: this.data.f_check_item_id
1442
+ }).then((res) => {
1443
+ //tag
1444
+ if (res.data.code == 200) {
1445
+
1446
+ let f_paper_id = res.data.data[0].id
1447
+ for (let device of this.f_devices) {
1448
+ device.f_paper_id = f_paper_id
1449
+ //tag
1450
+ this.$androidUtil.bzLogic('saveDevice', {
1451
+ row: device
1452
+ }).then((ret) => {
1453
+ //tag
1454
+ if (ret.code != 200) {
1455
+ // if(this.isUpload){
1456
+ // this.isUpload = false
1457
+ // }
1458
+ //TODO 失败后处理
1459
+ this.$showMessage("保存失败!")
1460
+ return false
1461
+ }
1462
+ })
1463
+ }
1464
+ }
1465
+ })
1466
+ // this.$showAlert('保存成功!', 'success', 2000)
1467
+ this.$showMessage('保存成功!')
1468
+ return true
1469
+ } else {
1470
+ // if(this.isUpload){
1471
+ // this.isUpload = false
1472
+ // }
1473
+ this.$showMessage("保存失败!")
1474
+ return false
1475
+ }
1476
+ })
1477
+ }
1478
+ }
1479
+ // }catch (e) {
1480
+ // //tag)
1481
+ // // this.isUpload = false
1482
+ // this.$showMessage("保存失败!")
1483
+ // }
1484
+ },
1485
+ runSyncLogic(logic,callback,backresult){
1486
+ HostApp.runSyncLogic({
1487
+ // logic别名,key必须为logic
1488
+ 'logic': logic,
1489
+ // 回调执行方法名,key必须为callback
1490
+ 'callback': callback,
1491
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1492
+ // 执行回调方法传入key为backresult
1493
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1494
+ 'backresult':backresult
1495
+ })
1496
+ },
1497
+ logicWithHint(logic,data,callback,backresult){
1498
+ HostApp.logicWithHint({
1499
+ // logic别名,key必须为logic
1500
+ 'logic': logic,
1501
+ // 回调执行方法名,key必须为callback
1502
+ 'callback': callback,
1503
+ // logic执行需要的业务参数
1504
+ 'data': data,
1505
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1506
+ // 执行回调方法传入key为backresult
1507
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1508
+ 'backresult':backresult
1509
+ })
1510
+ },
1511
+ saveCallBack(jo){
1512
+ //tag)
1513
+ // console.log("jjjj"+JSON.stringify(jo))
1514
+ if(jo.state == 'ok'){
1515
+ let res = JSON.parse(jo.result)
1516
+ //tag)
1517
+ if(res.code == 200){
1518
+ //tag
1519
+ if(!this.onlySave){
1520
+ let codata = this.getAllDefect()
1521
+ //获取微信推送内容
1522
+ // let WxResult = this.getWeixin(codata)
1523
+ let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1524
+ f_check_item_id: this.data.f_check_item_id
1525
+ })
1526
+ //如果是转维修上传,则不做校验,上传完成后自动转维修
1527
+ //tag
1528
+ //tag
1529
+ if(!this.isToRepair){
1530
+ if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
1531
+ //tag
1532
+ //tag
1533
+ if(!this.isSafeCheckToRepair){
1534
+
1535
+ }
1536
+ }
1537
+ }
1538
+ //tag
1539
+ for (let key in codata){
1540
+ if(key.startsWith("device")){
1541
+ codata[key] = []
1542
+ }
1543
+ }
1544
+ //tag}`)
1545
+
1546
+ //tag
1547
+ // let isStart = true
1548
+ // let res
1549
+ // for (let i in this.f_devices){
1550
+ // res = HostApp.organizeJSON({isStart:isStart,isDevice:true,device:this.f_devices[i]})
1551
+ // if(res.code == 200){
1552
+ // isStart = false
1553
+ // }else{
1554
+ // this.$showMessage("上传失败!")
1555
+ // return
1556
+ // }
1557
+ // }
1558
+ // let result = HostApp.organizeJSON({
1559
+ // isStart:false,
1560
+ // isJSON:true,
1561
+ // jsonstr:{
1562
+ // f_check_item_id: this.data.f_check_item_id,
1563
+ // f_checker_id: this.data.f_checker_id,
1564
+ // row: codata
1565
+ // }
1566
+ // })
1567
+ codata.f_devices = this.f_devices
1568
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1569
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1570
+ } else {
1571
+ this.rowCodata = codata
1572
+ }
1573
+ let param = {
1574
+ f_check_item_id: this.data.f_check_item_id,
1575
+ f_checker_id: this.data.f_checker_id,
1576
+ // row: codata
1577
+ row: this.rowCodata
1578
+ }
1579
+ //tag)
1580
+ let paramStr = JSON.stringify(param)
1581
+ // 多长截断一次
1582
+ let subLength = 800
1583
+ for (let i = 0; i < paramStr.length; i += subLength) {
1584
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1585
+ }
1586
+ HostApp.__this__ = this
1587
+ HostApp.syncLogic({
1588
+ // logic别名,key必须为logic
1589
+ 'logic': '上传安检信息',
1590
+ // 回调执行方法名,key必须为callback
1591
+ 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
1592
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1593
+ // 执行回调方法传入key为backresult
1594
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1595
+ 'backresult': 1
1596
+ })
1597
+ }else{
1598
+ this.$showMessage('保存成功!')
1599
+ if(this.clickBack){
1600
+ this.isStrat = false
1601
+ this.$dispatch('confirm')
1602
+ //this.$back()
1603
+ }
1604
+ }
1605
+ }else{
1606
+ this.$showMessage('保存失败!')
1607
+ return
1608
+ }
1609
+ }else{
1610
+ this.$showMessage('服务器内部错误,保存失败!')
1611
+ return
1612
+ }
1613
+ },
1614
+ uploadCallBack(jo){
1615
+ //获取微信推送路径
1616
+ let url = ""
1617
+ if(Vue.config.safecheck != undefined) {
1618
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1619
+ if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
1620
+ url = Vue.config.safecheck.ApproveConfig.weixinurl
1621
+ }
1622
+ }
1623
+ }
1624
+ //tag)
1625
+ //tag)
1626
+ if(jo.state == 'ok'){
1627
+ let res = JSON.parse(jo.result)
1628
+ //tag)
1629
+ //tag)
1630
+ if(res.code == 200){
1631
+ this.$set('data.f_paper_id', res.id)
1632
+ this.isStrat=false
1633
+ if(url != ""){
1634
+ this.$resetpost(`${url}`,{data:WxResult})
1635
+ }
1636
+ // 预约安检回更预约安检单
1637
+ if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
1638
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/ReturnSafeService`, {data:{
1639
+ f_paper_id:this.data.f_paper_id,
1640
+ f_service_id:this.data.f_SafeToRepair_id
1641
+ }
1642
+ }).then((ret) => {
1643
+ if(ret.data && ret.data.code == 200){
1644
+ console.log('预约安检回更成功')
1645
+ }
1646
+ })
1647
+ }
1648
+ //tag
1649
+ if(this.isToRepair){
1650
+ for (let device in this.data){
1651
+ if(device.startsWith("device")){
1652
+ this.data[device] = []
1653
+ if(res.data.length > 0){
1654
+ for(let i in res.data[0].f_devices){
1655
+ if(this.data[device].length > 0){
1656
+ if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
1657
+ this.data[device].push(res.data[0].f_devices[i])
1658
+ res.data[0].f_devices.splice(i,1)
1659
+ }
1660
+ }else{
1661
+ this.data[device].push(res.data[0].f_devices[i])
1662
+ res.data[0].f_devices.splice(i,1)
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ }
1668
+ this.todo()
1669
+ }else{
1670
+ this.$showMessage('上传成功!')
1671
+ //tag
1672
+ this.$dispatch('confirm')
1673
+ // this.$back()
1674
+ }
1675
+ }else if(res.code == 309){
1676
+ this.$showMessage('该安检单已作废!')
1677
+ //tag
1678
+ this.$dispatch('confirm')
1679
+ }else if(res.code == 710){
1680
+ this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
1681
+ this.onlySave = true
1682
+ return
1683
+ }else if(res.code == 711){
1684
+ this.$showMessage('该安检单已被管理员调整,请联系管理员!')
1685
+ this.onlySave = true
1686
+ return
1687
+ }else if(res.code == 712){
1688
+ this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
1689
+ this.onlySave = true
1690
+ return
1691
+ }
1692
+ else{
1693
+ this.$showMessage('上传失败!')
1694
+ }
1695
+ }else {
1696
+ this.$showMessage('网络异常,上传失败!')
1697
+ }
1698
+ this.onlySave = true
1699
+ },
1700
+ safecheckToRepairCallBack(jo){
1701
+ //获取微信推送路径
1702
+ if(jo.state == 'ok'){
1703
+ let res = JSON.parse(jo.result)
1704
+ //tag)
1705
+ if(res.code == 200){
1706
+ //tag
1707
+ if(res.data.code == 200){
1708
+ this.$showMessage('上传并转维修成功!')
1709
+ }else{
1710
+ this.$showMessage('上传并转维修成功,回写安检单失败!')
1711
+ }
1712
+ this.$dispatch('confirm')
1713
+ // this.$back()
1714
+ }else{
1715
+ this.$showMessage('上传失败!')
1716
+ this.onlySave = true
1717
+ }
1718
+ }else{
1719
+ this.$showMessage('网络异常,上传失败!')
1720
+ this.onlySave = true
1721
+ }
1722
+ },
1723
+ todo(){
1724
+ let gen = getRepairParam(this)
1725
+ co(gen)
1726
+ },
1727
+ undo(){
1728
+ this.showCheckToRepair = !this.showCheckToRepair
1729
+ this.model.serviceacitivity[0].f_reciever = ''
1730
+ this.model.serviceacitivity[0].f_meetunit = ''
1731
+ this.model.f_repairtype = ''
1732
+ this.meading = '转站点'
1733
+ },
1734
+ disableTimer() {
1735
+ if(this.timer) {
1736
+ window.clearTimeout(this.timer)
1737
+ this.timer = null
1738
+ }
1739
+ },
1740
+ loaded(paper) {
1741
+ if(!paper.hasOwnProperty('id')) {
1742
+ this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
1743
+ this.init()
1744
+ } else {
1745
+ Util.booleanFilter(paper)
1746
+ HostApp.__this__.$set('data', paper)
1747
+ HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
1748
+ // 如果打回重检则重新计时
1749
+ //tag
1750
+ if(HostApp.__this__.role == 'inspect'
1751
+ && HostApp.__this__.data.f_approved
1752
+ && HostApp.__this__.data.f_approved == '打回') {
1753
+ //tag
1754
+ HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
1755
+ HostApp.__this__.tick()
1756
+ }
1757
+ }
1758
+ HostApp.__callback__ = null
1759
+ HostApp.__this__ = null
1760
+ },
1761
+ S4() {
1762
+ return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
1763
+ },
1764
+ extend(initalObj, finalObj) {
1765
+ var obj = finalObj || {};
1766
+ for (var i in initalObj) {
1767
+ var prop = initalObj[i];
1768
+
1769
+ // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1770
+ if (prop === obj) {
1771
+ continue;
1772
+ }
1773
+
1774
+ if (typeof prop === 'object') {
1775
+ if (obj[i]) {
1776
+ this.extend(obj[i], prop)
1777
+ } else {
1778
+ obj[i] = prop;
1779
+ }
1780
+ }
1781
+ }
1782
+ return obj;
1783
+ },
1784
+ // async isoverDate(){
1785
+ // let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
1786
+ // condition:"f_plan_item_id='"+this.item.id+"'"
1787
+ // }
1788
+ // })
1789
+ // this.isneedDate=res.data[0]["f_subscribe_date"]
1790
+ // },
1791
+ putDevices() {
1792
+ //tag)
1793
+ //tag)
1794
+ this.$set('data.approve', "true")
1795
+ this.$set('data.writeback', "false")
1796
+ if (Vue.config.safecheck != undefined) {
1797
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1798
+ if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
1799
+ this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
1800
+ }
1801
+ if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
1802
+ this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
1803
+ }
1804
+ if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
1805
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
1806
+ }
1807
+ if (Vue.config.safecheck.ApproveConfig.showtorepair) {
1808
+ this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
1809
+ }
1810
+ if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
1811
+ this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
1812
+ }
1813
+ if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
1814
+ this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
1815
+ }
1816
+ }
1817
+ //tag
1818
+ //tag)
1819
+ //tag)
1820
+ //tag
1821
+ if(this.item.f_user_type == '非民用'){
1822
+ // 非民用
1823
+ if (Vue.config.safecheck.DevicesSetConfig != undefined){
1824
+ if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1825
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1826
+ }else{
1827
+ //tag
1828
+ //tag
1829
+ //tag
1830
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
1831
+ }
1832
+ //this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1833
+ }
1834
+
1835
+ }else{
1836
+ // 民用户
1837
+ if (Vue.config.safecheck.DevicesConfig != undefined){
1838
+ if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1839
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1840
+ }else{
1841
+ //tag
1842
+ //tag
1843
+ //tag
1844
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type?this.item.f_user_type:'民用']])
1845
+ }
1846
+ // this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1847
+ }
1848
+ }
1849
+
1850
+ }
1851
+ //tag)
1852
+ // 预留设备项位置
1853
+ for (let i in this.config) {
1854
+ this.tabs.splice(1,0,null)
1855
+ }
1856
+ //遍历安检项配置
1857
+ for (let i in this.config) {
1858
+ //取得安检项索引值
1859
+ let n = this.config[i].index
1860
+ //tag
1861
+ this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1862
+ this.$set('data.' + 'device' + n, [])
1863
+ //tag
1864
+ // this.tabs.splice(2 + n - 1, 0,
1865
+ // {
1866
+ // header:i,
1867
+ // complete:'safecheck-devices',
1868
+ // class:'repair-details-class',
1869
+ // number:n
1870
+ // })
1871
+ this.tabs[n] = {
1872
+ header: i,
1873
+ complete: 'safecheck-devices',
1874
+ class: 'repair-details-class',
1875
+ number: n
1876
+ }
1877
+
1878
+ if(this.config[i].quantity && this.config[i].quantity >0){
1879
+ let items = []
1880
+ for (let it in this.config[i].items) {
1881
+ //赋值下拉选项
1882
+ if (this.config[i].items[it].type == 'selector') {
1883
+ for (let op in this.config[i].items[it].options) {
1884
+ if (this.config[i].items[it].options[op].isdefault == true) {
1885
+ items.push({
1886
+ f_defect_level: this.config[i].items[it].options[op].level,
1887
+ f_is_defect: this.config[i].items[it].options[op].isdefect,
1888
+ f_item_name: it,
1889
+ f_item_value: this.config[i].items[it].options[op].data,
1890
+ f_path: "",
1891
+ type: "selector"
1892
+ })
1893
+ }
1894
+ }
1895
+ }
1896
+ }
1897
+ for(let q =0;q<this.config[i].quantity;q++) {
1898
+ this.data['device' + n].push(
1899
+ {f_device_type: i, f_items:items}
1900
+ )
1901
+ }
1902
+ }
1903
+ // this.data['device' + n].push(
1904
+ // {f_device_type: i, f_items: items}
1905
+ // )
1906
+ n = n + 1
1907
+ }
1908
+ //tag
1909
+ this.faultshow.number = this.tabs.length
1910
+ },
1911
+ init () {
1912
+ //tag
1913
+ // this.data.f_noplan_item_id = this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()
1914
+ // 无计划安检是否回更待办计划
1915
+ this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
1916
+ // 预约安检单工单编号
1917
+ this.data.f_SafeToRepair_id = this.item.f_service_id
1918
+ this.data.ename = Vue.user.ename
1919
+ this.data.f_outlets = Vue.user.f_parentname
1920
+ this.data.f_meetunit = Vue.user.orgpathnames
1921
+ this.data.orgpathstr = Vue.user.orgpathstr
1922
+ this.data.f_check_item_id = this.item.id
1923
+ this.data.f_check_plan_id = this.f_plan_id
1924
+ this.data.f_checker_id = Vue.user.id
1925
+ this.data.f_checker_name = Vue.user.name
1926
+ this.data.f_check_type = this.item.f_user_type
1927
+ this.data.f_safecheck_type = this.item.f_safecheck_type
1928
+ //this.data.f_exceed_reason = ''//存放送气超期原因
1929
+ //tag
1930
+ this.data.f_subcompany = this.item.f_subcompany
1931
+ this.data.f_approved = this.item.f_approvedf_read_instructions
1932
+ this.data.f_repair_approved = this.item.f_repair_approved
1933
+ this.data.f_no_checkplan = this.item.f_no_checkplan
1934
+ this.data.f_approved = this.item.f_approved
1935
+ this.data.f_filialeid = this.item.f_filialeid || Vue.user.orgid
1936
+ this.data.f_orgstr = this.item.f_orgstr
1937
+ this.data.version = this.item.version
1938
+ this.data.f_check_version=this.item.f_check_version
1939
+ this.$set('data.f_meters', this.item.f_plan_meters)
1940
+ this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1941
+ // 安检状态
1942
+ this.$set('data.f_entry_status', '入户')
1943
+ this.$set('data.f_safe_type', '年度安检')
1944
+ this.$set('data.f_usegas', '已使用')
1945
+ this.$set('data.f_state',this.item.f_state)
1946
+ this.$set('data.f_source', this.source?this.source:'安检')
1947
+ this.$set('data.f_other_checker_name', '')
1948
+ //tag
1949
+ // 用户信息
1950
+ this.$set('data.f_user_name', this.item.f_user_name)
1951
+ this.$set('data.f_rent_phone', this.item.f_rent_phone)
1952
+ this.$set('data.f_user_phone', this.item.f_user_phone || this.item.f_plan_meters[0].f_user_phone)
1953
+ this.$set('data.f_userinfoid', this.item.f_userinfoid)
1954
+ this.$set('data.f_address', this.item.f_address)
1955
+ this.$set('data.f_card_id', this.item.f_card_id)
1956
+ this.$set('data.f_slice_area', this.item.f_slice_area)
1957
+ this.$set('data.f_recheck_id', this.item.id)
1958
+ this.$set('rowCodata.f_recheck_id', this.item.id)
1959
+ this.$set('data.f_street', this.item.f_street)
1960
+ this.$set('data.f_room', this.item.f_room)
1961
+ this.$set('data.f_building', this.item.f_building)
1962
+ this.$set('data.f_unit', this.item.f_unit)
1963
+ //tag
1964
+ this.$set('data.f_floor', this.item.f_floor)
1965
+ this.$set('data.f_residential_area' , this.item.f_residential_area)
1966
+ this.$set('data.f_idnumber', this.item.f_idnumber)
1967
+ this.$set('data.f_comments', this.item.f_comments)
1968
+ this.$set('data.f_userproperties', this.item.f_userproperties)
1969
+ this.$set('data.f_client_evaluation', '满意')
1970
+ this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
1971
+ this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
1972
+ this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
1973
+ // this.$set('data.f_user_inhome_time', this.item.f_user_inhome_time)
1974
+ // this.$set('data.f_user_check_time', this.item.f_user_check_time)
1975
+ // this.$set('data.f_user_spare_phone', this.item.f_user_spare_phone)
1976
+ // this.$set('data.f_user_family_remarks', this.item.f_user_family_remarks)
1977
+ // this.$set('data.f_user_equipment_remarks', this.item.f_user_equipment_remarks)
1978
+ // 处置方式
1979
+ //tag
1980
+ this.$set('data.f_gas_guidelines', true)
1981
+ this.$set('data.f_safety_warning', true)
1982
+ this.$set('data.f_gas_manual', true)
1983
+ this.$set('data.f_no_gas_device', false)
1984
+ this.$set('data.f_close_valve', false)
1985
+ this.$set('data.f_unload_battery', false)
1986
+ //tag
1987
+ if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检' ) {
1988
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1989
+ }
1990
+ if(this.item.f_no_checkplan == '复检'){
1991
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1992
+ }
1993
+ //tag
1994
+ if(this.item.f_plan_meters) {
1995
+ for (let de in this.devices) {
1996
+ if(typeof this.devices[de]=='function'){
1997
+ continue
1998
+ }
1999
+ this.$set('data.device' + this.devices[de].n, [])
2000
+ for (let i = 0; i < this.item.f_plan_meters.length; i++) {
2001
+ if (this.item.f_plan_meters[i].f_meter_type) {
2002
+ this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
2003
+ //tag)
2004
+ if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
2005
+ this.data['device' + this.devices[de].n].push({
2006
+ f_device_type: "燃气表",
2007
+ f_items: [
2008
+ {
2009
+ f_defect_level: null,
2010
+ f_device_id: "",
2011
+ f_is_defect: "",
2012
+ f_item_name: "基表编号",
2013
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
2014
+ f_path: "",
2015
+ type: "number"
2016
+ },
2017
+ {
2018
+ f_defect_level: null,
2019
+ f_device_id: "",
2020
+ f_is_defect: "",
2021
+ f_item_name: "气表型号",
2022
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
2023
+ f_path: "",
2024
+ type: "string"
2025
+ },
2026
+ {
2027
+ f_defect_level: null,
2028
+ f_device_id: "",
2029
+ f_is_defect: "",
2030
+ f_item_name: "气表品牌",
2031
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
2032
+ f_path: "",
2033
+ type: "string"
2034
+ },
2035
+ {
2036
+ f_defect_level: null,
2037
+ f_device_id: "",
2038
+ f_is_defect: "",
2039
+ f_item_name: "进气方向",
2040
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
2041
+ f_path: "",
2042
+ type: "string"
2043
+ },
2044
+ {
2045
+ f_defect_level: null,
2046
+ f_device_id: "",
2047
+ f_is_defect: "",
2048
+ f_item_name: "上期表读数",
2049
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
2050
+ f_path: "",
2051
+ type: "number"
2052
+ },
2053
+ {
2054
+ f_defect_level: null,
2055
+ f_device_id: "",
2056
+ f_is_defect: "",
2057
+ f_item_name: "表封号",
2058
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
2059
+ f_path: "",
2060
+ type: "string"
2061
+ }
2062
+ ]
2063
+ })
2064
+ }
2065
+ else if (this.devices[de].device == "燃气表") {
2066
+ // delete this.config['燃气表']['items']['表底数']
2067
+ this.data['device' + this.devices[de].n].push({
2068
+ f_device_type: "燃气表",
2069
+ f_items: [
2070
+ {
2071
+ f_defect_level: null,
2072
+ f_device_id: "",
2073
+ f_is_defect: "",
2074
+ f_item_name: "基表编号",
2075
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
2076
+ f_path: "",
2077
+ type: "number"
2078
+ },
2079
+ {
2080
+ f_defect_level: null,
2081
+ f_device_id: "",
2082
+ f_is_defect: "",
2083
+ f_item_name: "气表型号",
2084
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
2085
+ f_path: "",
2086
+ type: "string"
2087
+ },
2088
+ {
2089
+ f_defect_level: null,
2090
+ f_device_id: "",
2091
+ f_is_defect: "",
2092
+ f_item_name: "气表品牌",
2093
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
2094
+ f_path: "",
2095
+ type: "string"
2096
+ },
2097
+ {
2098
+ f_defect_level: null,
2099
+ f_device_id: "",
2100
+ f_is_defect: "",
2101
+ f_item_name: "进气方向",
2102
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
2103
+ f_path: "",
2104
+ type: "string"
2105
+ },
2106
+ {
2107
+ f_defect_level: null,
2108
+ f_device_id: "",
2109
+ f_is_defect: "",
2110
+ f_item_name: "上期表读数",
2111
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
2112
+ f_path: "",
2113
+ type: "number"
2114
+ },
2115
+ {
2116
+ f_defect_level: null,
2117
+ f_device_id: "",
2118
+ f_is_defect: "",
2119
+ f_item_name: "表封号",
2120
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
2121
+ f_path: "",
2122
+ type: "string"
2123
+ }
2124
+ ]
2125
+ })
2126
+ }
2127
+ if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
2128
+ //tag
2129
+ this.data['device' + this.devices[de].n].forEach(device => {
2130
+ //tag)
2131
+ if (!this.data.f_collection_type) {
2132
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2133
+ delete this.config['燃气表']['items']['累购气量']
2134
+ delete this.config['燃气表']['items']['已用金额']
2135
+ delete this.config['燃气表']['items']['剩余气量']
2136
+ delete this.config['燃气表']['items']['气量异常差值']
2137
+ delete this.config['燃气表']['items']['金额异常差值']
2138
+ device.f_items.push(
2139
+ {
2140
+ f_defect_level: null,
2141
+ f_device_id: "",
2142
+ f_is_defect: "",
2143
+ f_item_name: "初始表底",
2144
+ isshow: true,
2145
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2146
+ f_path: "",
2147
+ type: "number"
2148
+ },
2149
+ {
2150
+ f_defect_level: null,
2151
+ f_device_id: "",
2152
+ f_is_defect: "",
2153
+ f_item_name: "累购金额",
2154
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
2155
+ f_path: "",
2156
+ type: "number"
2157
+ },
2158
+ {
2159
+ f_defect_level: null,
2160
+ f_device_id: "",
2161
+ f_is_defect: "",
2162
+ f_item_name: "已用气量",
2163
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2164
+ f_path: "",
2165
+ type: "number"
2166
+ },
2167
+ {
2168
+ f_defect_level: null,
2169
+ f_device_id: "",
2170
+ f_is_defect: "",
2171
+ f_item_name: "剩余金额",
2172
+ f_item_value: '',
2173
+ f_path: "",
2174
+ type: "number"
2175
+ },
2176
+ {
2177
+ f_defect_level: null,
2178
+ f_device_id: "",
2179
+ f_is_defect: "",
2180
+ f_item_name: "系统余额",
2181
+ f_item_value: this.item.f_plan_meters[i].f_balance_amount,
2182
+ f_path: "",
2183
+ type: "number"
2184
+ }
2185
+ )
2186
+ //tag)
2187
+ }
2188
+ })
2189
+ } else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
2190
+ this.data['device' + this.devices[de].n].forEach(device => {
2191
+ //tag)
2192
+ //tag)
2193
+ /*
2194
+ "累购气量":{"index":8,"type":"number","readonly":true},
2195
+ "累购金额":{"index":8,"type":"number","readonly":true},
2196
+ "字轮读数":{"index":9,"type":"number","checkmust": true},
2197
+ "已用金额":{"index":9,"type":"number","checkmust": true},
2198
+ "剩余气量":{"index":10,"type":"number","checkmust": true},
2199
+ "剩余金额":{"index":10,"type":"number","checkmust": true},
2200
+ "气量异常差值":{"index":11,"type":"number","readonly": true},
2201
+ "金额异常差值":{"index":11,"type":"number","readonly": true}
2202
+ */
2203
+ if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
2204
+ if (!this.data.f_collection_type) {
2205
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2206
+ delete this.config['燃气表']['items']['累购气量']
2207
+ delete this.config['燃气表']['items']['已用气量']
2208
+ delete this.config['燃气表']['items']['剩余气量']
2209
+ delete this.config['燃气表']['items']['气量异常差值']
2210
+ delete this.config['燃气表']['items']['系统余额']
2211
+ device.f_items.push(
2212
+ {
2213
+ f_defect_level: null,
2214
+ f_device_id: "",
2215
+ f_is_defect: "",
2216
+ f_item_name: "初始表底",
2217
+ isshow: false,
2218
+ f_item_value: '',
2219
+ f_path: "",
2220
+ type: "number"
2221
+ },
2222
+ {
2223
+ f_defect_level: null,
2224
+ f_device_id: "",
2225
+ f_is_defect: "",
2226
+ f_item_name: "累购金额",
2227
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
2228
+ f_path: "",
2229
+ type: "number"
2230
+ },
2231
+ {
2232
+ f_defect_level: null,
2233
+ f_device_id: "",
2234
+ f_is_defect: "",
2235
+ f_item_name: "已用金额",
2236
+ f_item_value: null,
2237
+ f_path: "",
2238
+ type: "number"
2239
+ },
2240
+ {
2241
+ f_defect_level: null,
2242
+ f_device_id: "",
2243
+ f_is_defect: "",
2244
+ f_item_name: "剩余金额",
2245
+ f_item_value: null,
2246
+ f_path: "",
2247
+ type: "number"
2248
+ },
2249
+ {
2250
+ f_defect_level: null,
2251
+ f_device_id: "",
2252
+ f_is_defect: "",
2253
+ f_item_name: "金额异常差值",
2254
+ f_item_value: null,
2255
+ f_path: "",
2256
+ type: "number"
2257
+ }
2258
+ )
2259
+ //tag)
2260
+ }
2261
+ } else
2262
+ if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
2263
+ if (!this.data.f_collection_type) {
2264
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2265
+ delete this.config['燃气表']['items']['累购金额']
2266
+ delete this.config['燃气表']['items']['已用金额']
2267
+ delete this.config['燃气表']['items']['剩余金额']
2268
+ delete this.config['燃气表']['items']['金额异常差值']
2269
+ delete this.config['燃气表']['items']['系统余额']
2270
+ device.f_items.push(
2271
+ {
2272
+ f_defect_level: null,
2273
+ f_device_id: "",
2274
+ f_is_defect: "",
2275
+ f_item_name: "初始表底",
2276
+ isshow: true,
2277
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2278
+ f_path: "",
2279
+ type: "number"
2280
+ },
2281
+ {
2282
+ f_defect_level: null,
2283
+ f_device_id: "",
2284
+ f_is_defect: "",
2285
+ f_item_name: "累购气量",
2286
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2287
+ f_path: "",
2288
+ type: "number"
2289
+ },
2290
+ {
2291
+ f_defect_level: null,
2292
+ f_device_id: "",
2293
+ f_is_defect: "",
2294
+ f_item_name: "已用气量",
2295
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2296
+ f_path: "",
2297
+ type: "number"
2298
+ },
2299
+ {
2300
+ f_defect_level: null,
2301
+ f_device_id: "",
2302
+ f_is_defect: "",
2303
+ f_item_name: "剩余气量",
2304
+ f_item_value: "",
2305
+ f_path: "",
2306
+ type: "number"
2307
+ },
2308
+ {
2309
+ f_defect_level: null,
2310
+ f_device_id: "",
2311
+ f_is_defect: "",
2312
+ f_item_name: "气量异常差值",
2313
+ f_item_value: null,
2314
+ f_path: "",
2315
+ type: "number"
2316
+ }
2317
+ )
2318
+ //tag)
2319
+ }
2320
+ }
2321
+ })
2322
+ } else if(this.devices[de].device == "燃气表"){
2323
+ //tag
2324
+ this.data['device' + this.devices[de].n].forEach(device => {
2325
+ //tag)
2326
+ if (!this.data.f_collection_type) {
2327
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2328
+ delete this.config['燃气表']['items']['累购金额']
2329
+ delete this.config['燃气表']['items']['已用金额']
2330
+ delete this.config['燃气表']['items']['剩余金额']
2331
+ delete this.config['燃气表']['items']['金额异常差值']
2332
+ delete this.config['燃气表']['items']['系统余额']
2333
+ device.f_items.push(
2334
+ {
2335
+ f_defect_level: null,
2336
+ f_device_id: "",
2337
+ f_is_defect: "",
2338
+ f_item_name: "初始表底",
2339
+ isshow: true,
2340
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2341
+ f_path: "",
2342
+ type: "number"
2343
+ },
2344
+ {
2345
+ f_defect_level: null,
2346
+ f_device_id: "",
2347
+ f_is_defect: "",
2348
+ f_item_name: "累购气量",
2349
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2350
+ f_path: "",
2351
+ type: "number"
2352
+ },
2353
+ {
2354
+ f_defect_level: null,
2355
+ f_device_id: "",
2356
+ f_is_defect: "",
2357
+ f_item_name: "已用气量",
2358
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2359
+ f_path: "",
2360
+ type: "number"
2361
+ },
2362
+ {
2363
+ f_defect_level: null,
2364
+ f_device_id: "",
2365
+ f_is_defect: "",
2366
+ f_item_name: "剩余气量",
2367
+ f_item_value: '',
2368
+ f_path: "",
2369
+ type: "number"
2370
+ },
2371
+ {
2372
+ f_defect_level: null,
2373
+ f_device_id: "",
2374
+ f_is_defect: "",
2375
+ f_item_name: "气量异常差值",
2376
+ isshow:false,
2377
+ f_item_value: null,
2378
+ f_path: "",
2379
+ type: "number"
2380
+ }
2381
+ )
2382
+ //tag)
2383
+ }
2384
+ })
2385
+ }
2386
+ }
2387
+ }
2388
+ }
2389
+ }
2390
+ var pardate = {
2391
+ _this:this,
2392
+ tittle:'安检详情',
2393
+ safe:true
2394
+ }
2395
+ // this.$dispatch('gotoson',pardate)
2396
+ //tag
2397
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2398
+ }
2399
+ },
2400
+ watch: {
2401
+ 'row' () {
2402
+ //tag
2403
+ this.copy()
2404
+ }
2405
+ },
2406
+ async ready () {
2407
+ //送气超期功能
2408
+ //await this.isoverDate()
2409
+ this.putDevices()
2410
+ //如果已检,则提取安检单
2411
+ if (this.item.f_state != '未检') {
2412
+ if (this.role == 'inspect' || this.role == 'androidview') {
2413
+ HostApp.__callback__ = this.loaded
2414
+ HostApp.__this__ = this
2415
+ let that = this
2416
+ let value = {}
2417
+ //tag
2418
+ if (this.role == 'inspect') {
2419
+ //tag
2420
+ if (this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') {
2421
+ value = this.$androidUtil.path({
2422
+ alias: 'getUserinfomation',
2423
+ data: {condition: "f_check_item_id = '" + this.item.id + "' and f_no_checkplan in ('无计划安检','复检')"}
2424
+ })
2425
+ } else {
2426
+ value = this.$androidUtil.bzLogic('FetchCheckPaper', {id: this.item.id})
2427
+ }
2428
+ } else {
2429
+ value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
2430
+ }
2431
+ Util.replaceFalse(value)
2432
+ //tag)
2433
+ if (value.data.length != 0) {
2434
+ that.$set('data', value.data[0])
2435
+ //tag)
2436
+ if (this.data.f_collection_type == '按气量') {
2437
+ delete this.config['燃气表']['items']['累购金额']
2438
+ delete this.config['燃气表']['items']['已用金额']
2439
+ delete this.config['燃气表']['items']['剩余金额']
2440
+ delete this.config['燃气表']['items']['金额异常差值']
2441
+ delete this.config['燃气表']['items']['系统余额']
2442
+ } else if (this.data.f_collection_type == '按金额') {
2443
+ delete this.config['燃气表']['items']['累购气量']
2444
+ delete this.config['燃气表']['items']['已用气量']
2445
+ delete this.config['燃气表']['items']['剩余气量']
2446
+ delete this.config['燃气表']['items']['气量异常差值']
2447
+ delete this.config['燃气表']['items']['系统余额']
2448
+ }
2449
+ //tag)
2450
+ if (value.data[0].f_devices) {
2451
+ for (let da in that.devices) {
2452
+ if(typeof that.devices[da]=='function'){
2453
+ continue
2454
+ }
2455
+ that.$set('data.device' + that.devices[da].n, [])
2456
+ }
2457
+ value.data[0].f_devices.forEach((item) => {
2458
+ //tag)
2459
+ for (let i in item.f_items) {
2460
+ if(typeof item.f_items[i]=='function'){
2461
+ continue
2462
+ }
2463
+ // if (item.f_items[i].f_path != '' && item.f_items[i].f_path != null) {
2464
+ // this.picture.push({f_path: item.f_items[i].f_path, name: item.f_items[i].f_item_name})
2465
+ // }
2466
+ for (let de in that.config[item.f_device_type].items) {
2467
+ if(typeof that.config[item.f_device_type].items[de]=='function'){
2468
+ continue
2469
+ }
2470
+ if (item.f_items[i].f_item_name == de) {
2471
+ if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
2472
+ item.f_items[i].f_item_value = []
2473
+ } else {
2474
+ item.f_items[i].f_item_value = ''
2475
+ }
2476
+ }
2477
+ }
2478
+ //tag)
2479
+
2480
+ // if (item.f_items[i].f_item_name=='累购气量'){
2481
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_total_gas
2482
+ // }else if (item.f_items[i].f_item_name=='累购金额'){
2483
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_total_fee
2484
+ // }else if (item.f_items[i].f_item_name=='基表编号'){
2485
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_meter_no
2486
+ // }else if (item.f_items[i].f_item_name=='气表品牌'){
2487
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_aliasname
2488
+ // }else if (item.f_items[i].f_item_name=='进气方向'){
2489
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_flow_direction
2490
+ // }else if (item.f_items[i].f_item_name=='气表型号'){
2491
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_diaphgram_size
2492
+ // }else if (item.f_items[i].f_item_name=='表箱号'){
2493
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_metertitles
2494
+ // }
2495
+ // else{
2496
+ for (let j in item.f_items[i].f_item_lists) {
2497
+ if(typeof item.f_items[i].f_item_lists[j]=='function'){
2498
+ continue
2499
+ }
2500
+ //tag)
2501
+ if (item.f_items[i].f_item_value instanceof Array) {
2502
+ item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
2503
+ } else {
2504
+ item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
2505
+ }
2506
+ }
2507
+ // }
2508
+
2509
+ }
2510
+ for (let de in that.devices) {
2511
+ if(typeof that.devices[de]=='function'){
2512
+ continue
2513
+ }
2514
+ if (that.devices[de].device == item.f_device_type) {
2515
+ that.data['device' + that.devices[de].n].push({
2516
+ f_device_type: item.f_device_type,
2517
+ f_items: item.f_items
2518
+ })
2519
+ //tag)
2520
+ }
2521
+ }
2522
+ })
2523
+ if (this.role == 'androidview') {
2524
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2525
+ Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
2526
+ Util.booleanFilter(that.data)
2527
+ }
2528
+ //tag)
2529
+ }
2530
+ } else {
2531
+ //tag
2532
+ this.init()
2533
+ }
2534
+ if(this.parentPage && this.parentPage=='CurrentCreate'){
2535
+ //tag
2536
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2537
+ if (isRecodr) {
2538
+ if (isRecodr=='true') {
2539
+ this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2540
+ // 初始化录音
2541
+ let resse = this.record()
2542
+ }
2543
+ }
2544
+ }
2545
+ //tag
2546
+ var pardate = {
2547
+ _this:this,
2548
+ tittle:'安检详情',
2549
+ safe:true
2550
+ }
2551
+ // this.$dispatch('gotoson',pardate)getImgPath
2552
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2553
+ } else {
2554
+ let that = this
2555
+ let id
2556
+ if (this.role == 'view') {
2557
+ id = this.item.id
2558
+ }
2559
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
2560
+ if (respanse.data.length != 0) {
2561
+ that.data = Object.assign(that.data,respanse.data[0])
2562
+ if(respanse.data[0].f_devices) {
2563
+ for (let da in that.devices) {
2564
+ that.$set('data.device' + that.devices[da].n, [])
2565
+ }
2566
+ respanse.data[0].f_devices.forEach((item) => {
2567
+ for (let de in that.devices) {
2568
+ if (that.devices[de].device == item.f_device_type) {
2569
+ that.data['device' + that.devices[de].n].push({
2570
+ f_device_type: item.f_device_type,
2571
+ f_items: item.f_items
2572
+ })
2573
+ }
2574
+ }
2575
+ })
2576
+ }
2577
+ Util.replaceFalse(that.data)
2578
+ Util.booleanFilter(that.data)
2579
+ if(this.role == 'view'){
2580
+ Util.ratifyPics(that.data)
2581
+ }else{
2582
+ Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
2583
+ }
2584
+ //tag
2585
+ } else {
2586
+ alert("该安检单可能已不在本地!")
2587
+ this.init()
2588
+ }
2589
+ var pardate = {
2590
+ _this:this,
2591
+ tittle:'安检详情',
2592
+ safe:true
2593
+ }
2594
+ // this.$dispatch('gotoson',pardate)
2595
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'paper-router')
2596
+ }
2597
+ ).catch(
2598
+ (respanse) => {
2599
+ alert('查找安检单失败')
2600
+ })
2601
+ }
2602
+ }else{
2603
+ if(this.parentPage && this.parentPage=='CurrentCreate'){
2604
+ //tag
2605
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2606
+ if (isRecodr) {
2607
+ if (isRecodr=='true') {
2608
+ // this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2609
+ // 初始化录音
2610
+ let resse = this.record()
2611
+ }
2612
+ }
2613
+ }
2614
+ this.init()
2615
+ }
2616
+ // tbs合并数组
2617
+ // if( this.model.serviceacitivity[0].servicerepair.length > 0){
2618
+ // for(let i = 0;i < this.model.serviceacitivity[0].servicerepair.length;i++ ){
2619
+ //
2620
+ // }
2621
+ // }
2622
+ },
2623
+ components: {
2624
+ // 'door-service': DoorService,
2625
+ // 'repair-info': RepairInfo,
2626
+ // 'repair-user-info': RepairUserInfo,
2627
+ // 'outlay': Outlay,
2628
+ // 'fault-all': FaultAll,
2629
+ // 'repair-details':RepairDetails
2630
+ // 'pipeline': Pipeline,
2631
+ // 'device-service': DeviceService,
2632
+ // 'trouble-removal': TroubleRemoval,
2633
+ // 'cooking-utensils': CookingUtensils,
2634
+ // 'repair-matter-info': RepairMatterInfo,
2635
+ // 'first-gas-check': FirstGasCheck,
2636
+ // 'tel-change-matter': TelChangeMatter/
2637
+ },
2638
+ events: {
2639
+ 'tijiao': function () {
2640
+ // 事件回调内的 `this` 自动绑定到注册它的实例上
2641
+ this.confirm()
2642
+ }
2643
+ }
2644
+ }
2645
+ </script>
2646
+ <style lang="less">
2647
+ @import "../../../../src/bootstrap/less/variables.less";
2648
+ .noclickbut {
2649
+ pointer-events: none;
2650
+ }
2651
+ .tab-befor-img (@url) {
2652
+ content: '';
2653
+ background-image: url("@{url}");
2654
+ background-size: 20px;
2655
+ display: inline-block;
2656
+ margin-right: 8px;
2657
+ margin-top: 0.3em;
2658
+ height: 1.3em;
2659
+ width: 1.3em;
2660
+ vertical-align: -35%;
2661
+ }
2662
+
2663
+ @media screen and (min-width: 768px) {
2664
+ .android-repair-order > div > ul a {
2665
+ font-size: @font-size-h2;
2666
+ margin: 0.3em 0;
2667
+ }
2668
+ }
2669
+ .repair-details-class{
2670
+ &::before {
2671
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
2672
+ }
2673
+ }
2674
+ .repair-info-class {
2675
+ &::before {
2676
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
2677
+ }
2678
+ }
2679
+ .repair-user-info-class {
2680
+ &::before {
2681
+ .tab-befor-img("../../../assets/jibenxinxi1.png")
2682
+ }
2683
+ }
2684
+
2685
+ .door-service-class {
2686
+ &::before {
2687
+ .tab-befor-img("../../../assets/huneiweixiu1.png")
2688
+ }
2689
+ }
2690
+
2691
+ .pipeline-class {
2692
+ &::before {
2693
+ .tab-befor-img("../../../assets/guandao1.png")
2694
+ }
2695
+ }
2696
+
2697
+ .device-service-class {
2698
+ &::before {
2699
+ .tab-befor-img("../../../assets/shebeiweixiu1.png")
2700
+ }
2701
+ }
2702
+
2703
+ .trouble-removal-class {
2704
+ &::before {
2705
+ .tab-befor-img("../../../assets/shiguchuli.png")
2706
+ }
2707
+ }
2708
+
2709
+ .cooking-utensils-class {
2710
+ &::before {
2711
+ .tab-befor-img("../../../assets/zaoju1.png")
2712
+ }
2713
+ }
2714
+
2715
+ .outlay-class {
2716
+ &::before {
2717
+ .tab-befor-img("../../../assets/feiyong1.png")
2718
+ }
2719
+ }
2720
+
2721
+ .fault-all-class {
2722
+ &::before {
2723
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
2724
+ }
2725
+ }
2726
+ .photo-write-class {
2727
+ &::before {
2728
+ .tab-befor-img("../../../assets/zaoju.png")
2729
+ }
2730
+ }
2731
+ .delay-apply-class {
2732
+ &::before {
2733
+ .tab-befor-img("../../../assets/yonghubaoxiu.png")
2734
+ }
2735
+ }
2736
+
2737
+ .repair-back-class {
2738
+ &::before {
2739
+ .tab-befor-img("../../../assets/fanhui.png")
2740
+ }
2741
+ }
2742
+ .butt2 {
2743
+ display: inline;
2744
+ float: right;
2745
+ width: 10px;
2746
+ text-align: center;
2747
+ align-items:center;
2748
+ position: absolute;
2749
+ top:50%;
2750
+
2751
+ left:90%;
2752
+ transform: translate(-50%,-50%);
2753
+ }
2754
+ .linesty{
2755
+ display: inline-block;
2756
+ height:1px;
2757
+ width:100%;
2758
+ background:#d0d0d0;
2759
+ overflow:hidden;
2760
+ vertical-align: middle;
2761
+ }
2762
+ .spanboder{
2763
+ border-bottom:2px solid #499edf;
2764
+ padding-bottom: 8px
2765
+ }
2766
+ .app-botton {
2767
+ position:fixed;
2768
+ background: #87b2dd;
2769
+ right:8px;
2770
+ color: #FFF;
2771
+ padding: 8px;
2772
+ text-align: center;
2773
+ font-size: 1.2em;
2774
+ z-index: 10;
2775
+ opacity:0.5;
2776
+ bottom: 50px;
2777
+ margin-top: -10px;
2778
+ height: 40px;
2779
+ }
2780
+ .android-repair-order > div > ul a {
2781
+ font-size: 12px;
2782
+ color: #333333;
2783
+ padding: 13px 16px;
2784
+ }
2785
+ </style>