safecheck-client 3.0.33-161 → 3.0.33-164

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 (302) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/config/dev.env.js +6 -6
  5. package/config/index.js +38 -38
  6. package/config/prod.env.js +3 -3
  7. package/config/test.env.js +6 -6
  8. package/docs/AppBase.md +22 -22
  9. package/docs/Busy.md +14 -14
  10. package/docs/CriteriaPaged.md +47 -47
  11. package/docs/DataGrid.md +54 -54
  12. package/docs/DataModel.md +22 -22
  13. package/docs/Dynamic.md +42 -42
  14. package/docs/FormPrint.md +18 -18
  15. package/docs/GetParams.md +11 -11
  16. package/docs/GridTree.md +47 -47
  17. package/docs/HttpBusy.md +13 -13
  18. package/docs/HttpStore.md +29 -29
  19. package/docs/MessageBox.md +28 -28
  20. package/docs/PagedList.md +29 -29
  21. package/docs/Pager.md +21 -21
  22. package/docs/PrintFile.md +38 -38
  23. package/docs/Project.md +23 -23
  24. package/docs/Route.md +105 -105
  25. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  26. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  27. package/docs/Task.md +46 -46
  28. package/docs/TreeList.md +28 -28
  29. package/docs/TreeMixin.md +18 -18
  30. package/docs/all.md +10 -10
  31. package/docs/list.md +42 -42
  32. package/docs/partial.md +75 -75
  33. package/docs/selector.md +82 -82
  34. package/docs/tree.md +40 -40
  35. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  36. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
  37. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
  38. package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
  39. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  40. package/examples/AddressList/App.vue +13 -13
  41. package/examples/AddressList/index.html +11 -11
  42. package/examples/DispatchList/App.vue +10 -10
  43. package/examples/DispatchList/BaseTree.vue +13 -13
  44. package/examples/DispatchList/Init.vue +22 -22
  45. package/examples/DispatchList/Test.vue +20 -20
  46. package/examples/DispatchList/index.html +11 -11
  47. package/examples/DispatchList/main.js +18 -18
  48. package/home.html +16 -16
  49. package/package.json +1 -1
  50. package/publish.bat +7 -7
  51. package/release.bat +5 -5
  52. package/src/Widget.vue +13 -13
  53. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  54. package/src/android-bootstrap/less/.csscomb.json +304 -304
  55. package/src/android-bootstrap/less/.csslintrc +19 -19
  56. package/src/android-bootstrap/less/alerts.less +73 -73
  57. package/src/android-bootstrap/less/badges.less +66 -66
  58. package/src/android-bootstrap/less/bootstrap.less +56 -56
  59. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  60. package/src/android-bootstrap/less/button-groups.less +247 -247
  61. package/src/android-bootstrap/less/buttons.less +173 -173
  62. package/src/android-bootstrap/less/carousel.less +269 -269
  63. package/src/android-bootstrap/less/close.less +34 -34
  64. package/src/android-bootstrap/less/code.less +69 -69
  65. package/src/android-bootstrap/less/component-animations.less +33 -33
  66. package/src/android-bootstrap/less/grid.less +84 -84
  67. package/src/android-bootstrap/less/input-groups.less +167 -167
  68. package/src/android-bootstrap/less/jumbotron.less +52 -52
  69. package/src/android-bootstrap/less/labels.less +64 -64
  70. package/src/android-bootstrap/less/list-group.less +141 -141
  71. package/src/android-bootstrap/less/media.less +66 -66
  72. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  73. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  74. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  75. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  76. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  77. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  78. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  79. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  80. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  81. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  82. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  83. package/src/android-bootstrap/less/mixins/image.less +33 -33
  84. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  85. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  86. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  87. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  88. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  89. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  90. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  91. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  92. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  93. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  94. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  95. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  96. package/src/android-bootstrap/less/mixins/size.less +10 -10
  97. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  98. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  99. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  100. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  101. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  102. package/src/android-bootstrap/less/mixins.less +40 -40
  103. package/src/android-bootstrap/less/modals.less +151 -151
  104. package/src/android-bootstrap/less/navbar.less +660 -660
  105. package/src/android-bootstrap/less/navs.less +290 -290
  106. package/src/android-bootstrap/less/normalize.less +424 -424
  107. package/src/android-bootstrap/less/pager.less +76 -76
  108. package/src/android-bootstrap/less/pagination.less +89 -89
  109. package/src/android-bootstrap/less/panels.less +274 -274
  110. package/src/android-bootstrap/less/popovers.less +131 -131
  111. package/src/android-bootstrap/less/print.less +101 -101
  112. package/src/android-bootstrap/less/progress-bars.less +87 -87
  113. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  114. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  115. package/src/android-bootstrap/less/scaffolding.less +161 -161
  116. package/src/android-bootstrap/less/tables.less +262 -262
  117. package/src/android-bootstrap/less/theme.less +291 -291
  118. package/src/android-bootstrap/less/thumbnails.less +36 -36
  119. package/src/android-bootstrap/less/tooltip.less +102 -102
  120. package/src/android-bootstrap/less/type.less +303 -303
  121. package/src/android-bootstrap/less/utilities.less +55 -55
  122. package/src/android-bootstrap/less/variables.less +896 -896
  123. package/src/android-bootstrap/less/wells.less +29 -29
  124. package/src/androidTest.js +20 -20
  125. package/src/bootstrap/less/.csscomb.json +304 -304
  126. package/src/bootstrap/less/.csslintrc +19 -19
  127. package/src/bootstrap/less/alerts.less +73 -73
  128. package/src/bootstrap/less/badges.less +66 -66
  129. package/src/bootstrap/less/breadcrumbs.less +26 -26
  130. package/src/bootstrap/less/button-groups.less +247 -247
  131. package/src/bootstrap/less/buttons.less +172 -172
  132. package/src/bootstrap/less/carousel.less +269 -269
  133. package/src/bootstrap/less/close.less +34 -34
  134. package/src/bootstrap/less/code.less +69 -69
  135. package/src/bootstrap/less/component-animations.less +33 -33
  136. package/src/bootstrap/less/dropdowns.less +216 -216
  137. package/src/bootstrap/less/forms.less +626 -626
  138. package/src/bootstrap/less/grid.less +84 -84
  139. package/src/bootstrap/less/input-groups.less +167 -167
  140. package/src/bootstrap/less/jumbotron.less +52 -52
  141. package/src/bootstrap/less/labels.less +64 -64
  142. package/src/bootstrap/less/list-group.less +141 -141
  143. package/src/bootstrap/less/media.less +66 -66
  144. package/src/bootstrap/less/mixins/alerts.less +14 -14
  145. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  146. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  147. package/src/bootstrap/less/mixins/buttons.less +69 -69
  148. package/src/bootstrap/less/mixins/center-block.less +7 -7
  149. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  150. package/src/bootstrap/less/mixins/forms.less +90 -90
  151. package/src/bootstrap/less/mixins/gradients.less +59 -59
  152. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  153. package/src/bootstrap/less/mixins/grid.less +122 -122
  154. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  155. package/src/bootstrap/less/mixins/image.less +33 -33
  156. package/src/bootstrap/less/mixins/labels.less +12 -12
  157. package/src/bootstrap/less/mixins/list-group.less +30 -30
  158. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  159. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  160. package/src/bootstrap/less/mixins/opacity.less +8 -8
  161. package/src/bootstrap/less/mixins/pagination.less +24 -24
  162. package/src/bootstrap/less/mixins/panels.less +24 -24
  163. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  164. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  165. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  166. package/src/bootstrap/less/mixins/resize.less +6 -6
  167. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  168. package/src/bootstrap/less/mixins/size.less +10 -10
  169. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  170. package/src/bootstrap/less/mixins/table-row.less +44 -44
  171. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  172. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  173. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  174. package/src/bootstrap/less/mixins.less +40 -40
  175. package/src/bootstrap/less/modals.less +151 -151
  176. package/src/bootstrap/less/navbar.less +660 -660
  177. package/src/bootstrap/less/normalize.less +424 -424
  178. package/src/bootstrap/less/pager.less +76 -76
  179. package/src/bootstrap/less/pagination.less +89 -89
  180. package/src/bootstrap/less/panels.less +275 -275
  181. package/src/bootstrap/less/popovers.less +131 -131
  182. package/src/bootstrap/less/print.less +101 -101
  183. package/src/bootstrap/less/progress-bars.less +87 -87
  184. package/src/bootstrap/less/responsive-embed.less +35 -35
  185. package/src/bootstrap/less/responsive-utilities.less +194 -194
  186. package/src/bootstrap/less/scaffolding.less +161 -161
  187. package/src/bootstrap/less/theme.less +291 -291
  188. package/src/bootstrap/less/thumbnails.less +36 -36
  189. package/src/bootstrap/less/tooltip.less +102 -102
  190. package/src/bootstrap/less/type.less +303 -303
  191. package/src/bootstrap/less/utilities.less +55 -55
  192. package/src/bootstrap/less/wells.less +29 -29
  193. package/src/components/FileUpload.vue +696 -696
  194. package/src/components/Hello.vue +39 -39
  195. package/src/components/LeftTree.vue +27 -27
  196. package/src/components/android/AddGas.vue +147 -147
  197. package/src/components/android/AddressList.vue +61 -61
  198. package/src/components/android/AreaPlan.vue +572 -572
  199. package/src/components/android/AttendanceTally.vue +116 -116
  200. package/src/components/android/Blank.vue +10 -10
  201. package/src/components/android/CheckUnplanPage.vue +56 -56
  202. package/src/components/android/Checker.vue +12 -12
  203. package/src/components/android/CheckerAnnual.vue +81 -81
  204. package/src/components/android/CheckerAvarta.vue +82 -82
  205. package/src/components/android/CheckerMonthly.vue +84 -84
  206. package/src/components/android/EquipmentInspection.vue +348 -348
  207. package/src/components/android/FootprintMap.vue +120 -120
  208. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  209. package/src/components/android/ImgSelfAndroid.vue +181 -181
  210. package/src/components/android/LcheckUnplan.vue +108 -108
  211. package/src/components/android/MasterMain.vue +77 -77
  212. package/src/components/android/Menu.vue +132 -132
  213. package/src/components/android/NavBottom.vue +157 -157
  214. package/src/components/android/PaperAlarm.vue +85 -85
  215. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  216. package/src/components/android/PlumberAnnual.vue +83 -83
  217. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  218. package/src/components/android/PlumberMonthly.vue +84 -84
  219. package/src/components/android/PostMap.vue +83 -83
  220. package/src/components/android/QueryCheckHistory.vue +122 -122
  221. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  222. package/src/components/android/RepairMain.vue +60 -60
  223. package/src/components/android/Repairman.vue +12 -12
  224. package/src/components/android/SafecheckOrderV.vue +2809 -2809
  225. package/src/components/android/StationMaster.vue +12 -12
  226. package/src/components/android/SwitchValve.vue +323 -323
  227. package/src/components/checkerphonestate/Checker.vue +32 -32
  228. package/src/components/checkerphonestate/CheckerState.vue +97 -97
  229. package/src/components/defects/AddDefectModal.vue +120 -120
  230. package/src/components/defects/AddDevice.vue +95 -95
  231. package/src/components/defects/DefectModal.vue +101 -101
  232. package/src/components/defects/DevicesAndItem.vue +39 -39
  233. package/src/components/defects/DevicesSeting.vue +106 -106
  234. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  235. package/src/components/metterfiles/AddUserfiles.vue +246 -246
  236. package/src/components/metterfiles/MetterFiles.vue +104 -104
  237. package/src/components/notice/NoticeForm.vue +100 -100
  238. package/src/components/notice/NoticeIssue.vue +20 -20
  239. package/src/components/notice/NoticeQuery.vue +76 -76
  240. package/src/components/paper/PicViewer.vue +18 -18
  241. package/src/components/paper/RepairVerifyForm.vue +76 -76
  242. package/src/components/phonestate/DailyTraffic.vue +57 -57
  243. package/src/components/phonestate/LastKnownState.vue +74 -74
  244. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  245. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  246. package/src/components/phonestate/PostMap.vue +82 -82
  247. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  248. package/src/components/safecheckNew/android/SafecheckOrderV.vue +467 -428
  249. package/src/components/task/RepairAnnual.vue +79 -79
  250. package/src/components/task/RepairAnnualDetail.vue +49 -49
  251. package/src/components/task/RepairMonthly.vue +91 -91
  252. package/src/components/task/TaskAnnual.vue +77 -77
  253. package/src/components/task/TaskAnnualDetail.vue +47 -47
  254. package/src/components/task/TaskMonthly.vue +89 -89
  255. package/src/components/userfile/MeterFile.vue +145 -145
  256. package/src/components/userfile/MeterModify.vue +46 -46
  257. package/src/components/userfile/UserfileChange.vue +277 -277
  258. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  259. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
  260. package/src/filiale/baiyin/android.js +10 -10
  261. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
  262. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
  263. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
  264. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
  265. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
  266. package/src/filiale/baiyin/pc/PaperList.vue +790 -790
  267. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
  268. package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
  269. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
  270. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
  271. package/src/filiale/baiyin/pc/checkUserList.vue +771 -0
  272. package/src/filiale/baiyin/pc.js +2 -1
  273. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
  274. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
  275. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +5 -1
  276. package/src/filiale/weinan/pc/DefectListNew.vue +617 -617
  277. package/src/filiale/weinan/pc/DefectMainNew.vue +63 -63
  278. package/src/filiale/weinan/pc.js +46 -46
  279. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1195 -1195
  280. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +477 -477
  281. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  282. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  283. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
  284. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
  285. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2845
  286. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
  287. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +478 -478
  288. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  289. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +944 -944
  290. package/src/main.js +33 -33
  291. package/src/plugins/LoadData.js +10 -10
  292. package/src/plugins/LoadParams.js +24 -24
  293. package/src/stores/wxconfig.js +10 -10
  294. package/src/utils/getNowDate.js +33 -33
  295. package/test/e2e/custom-assertions/elementCount.js +26 -26
  296. package/test/e2e/nightwatch.conf.js +40 -40
  297. package/test/e2e/runner.js +30 -30
  298. package/test/e2e/specs/test.js +13 -13
  299. package/test/unit/.eslintrc +5 -5
  300. package/test/unit/TestUtil.js +62 -62
  301. package/test/unit/context.html +20 -20
  302. package/test/unit/index.js +13 -13
@@ -1,1052 +1,1052 @@
1
- <template>
2
- <div class="flex">
3
- <work-busy :is-busy="isbusy"></work-busy>
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
- <div :class="$parent.$parent.style">
9
- <label class="font_normal_body">安检计划</label>
10
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
11
- @click="$parent.$parent.showChooser"
12
- style="width: 60%" placeholder="安检计划" readonly="readonly">
13
- </div>
14
- <div :class="$parent.$parent.style">
15
- <label class="font_normal_body">存在隐患</label>
16
- <v-select style="width:60% "
17
- class="select select_list"
18
- :value.sync="model.f_has_defect"
19
- v-model="model.f_has_defect"
20
- :options='$parent.$parent.hasDefectOptions'
21
- :placeholder='model.f_has_defect'
22
- condition="f_has_defect = '{}'"
23
- close-on-select>
24
- </v-select>
25
- </div>
26
- <div :class="$parent.$parent.style">
27
- <label class="font_normal_body">用户编号</label>
28
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
29
- condition="f_userinfo_code = '{}'"
30
- style="width: 60%" placeholder="用户编号">
31
- </div>
32
- <div :class="$parent.$parent.style">
33
- <label class="font_normal_body">用户表号</label>
34
- <input type="text" class="input_search" v-model="model.f_meternumber"
35
- condition="f_meternumber = '{}'"
36
- style="width: 60%" placeholder="用户表号">
37
- </div>
38
- <div :class="$parent.$parent.style">
39
- <label class="font_normal_body">结果查询</label>
40
- <v-select
41
- placeholder='维修结果查询'
42
- :value-single="true"
43
- class="select select_list" style="width: 60%"
44
- v-model='model.f_is_repair'
45
- :value.sync="model.f_is_repair"
46
- :options='$parent.$parent.repaired'
47
- condition="f_is_repair = '{}'"
48
- close-on-select clear-button> </v-select>
49
- </div>
50
- <div class=" col-sm-4 form-group button-range" >
51
- <div class="span" style="float: right;margin-top: 8px">
52
- <div style="float: right" class="button_spacing"
53
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
54
- @click="$parent.$parent.hiddenr()"></div>
55
- <div style="float: right" class="button_spacing"
56
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
57
- @click="$parent.$parent.hidden()"></div>
58
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
59
- <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
60
- <div style="float: right">
61
- <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
62
- :field="$parent.$parent.getfield"
63
- progress="safeGetExportProgress"
64
- sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
65
- </div>
66
- </div>
67
- </div>
68
- </div>
69
- <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
70
- <div :class="$parent.$parent.style">
71
- <label class="font_normal_body">片&emsp;&emsp;区</label>
72
- <v-select class="select_list select"
73
- placeholder='片区/管理站' style="width: 60%"
74
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
75
- :options='$parent.$parent.sliceArea'
76
- filer-key="name"
77
- close-on-select clear-button
78
- condition="f_slice_area='{}'"
79
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
80
- :value-single="true">
81
- </v-select>
82
- </div>
83
- <div :class="$parent.$parent.style2" style="margin: 0">
84
- <role-selector-safe
85
- role-name="安检员"
86
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
87
- :resobjprop.sync="$parent.$parent.resids"
88
- @re-res="$parent.$parent.getRes"
89
- :value.sync="model.f_checker_id"
90
- v-model="model.f_checker_id"
91
- condition="f_checker_name = '{}'">
92
- </role-selector-safe>
93
- </div>
94
-
95
- <div :class="$parent.$parent.style">
96
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
97
- <v-select class="select_list select"
98
- placeholder='抄表册' style="width: 60%"
99
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
100
- :options='$parent.$parent.cbc'
101
- filer-key="name"
102
- close-on-select clear-button
103
- condition="f_meter_book_num={}"
104
- :value-single="true">
105
- </v-select>
106
- </div>
107
- <div :class="$parent.$parent.style">
108
- <label class="font_normal_body">起始时间</label>
109
- <datepicker
110
- placeholder='起始时间' style="width:60%"
111
- :disabled-days-of-week="[]"
112
- :format="'yyyy-MM-dd'"
113
- :show-rest-button="reset"
114
- :value.sync="model.f_start_time"
115
- v-model="model.f_start_time"
116
- condition="f_offsite_time >= '{} 00:00:00'">
117
- </datepicker>
118
- </div>
119
- <div :class="$parent.$parent.style">
120
- <label class="font_normal_body">结束时间</label>
121
- <datepicker
122
- placeholder='结束时间' style="width:60%"
123
- :disabled-days-of-week="[]"
124
- :format="'yyyy-MM-dd'"
125
- :show-rest-button="reset"
126
- :value.sync="model.f_end_time"
127
- v-model="model.f_end_time"
128
- condition="f_offsite_time <= '{} 23:59:59'">
129
- </datepicker>
130
- </div>
131
- </div>
132
- <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
133
-
134
- <div :class="$parent.$parent.style">
135
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
136
- <input type="text" class="input_search" v-model="model.f_repairman"
137
- condition="f_repairman = '{}'"
138
- style="width: 60%" placeholder="维修员">
139
- </div>
140
- <div :class="$parent.$parent.style">
141
- <label class="font_normal_body">处理查询</label>
142
- <v-select
143
- placeholder='处理结果查询'
144
- :value-single="true"
145
- class="select select_list" style="width: 60%"
146
- v-model='model.f_is_deal'
147
- :value.sync="model.f_is_deal"
148
- :options='$parent.$parent.deals'
149
- condition="f_is_deal = '{}'"
150
- close-on-select clear-button> </v-select>
151
- </div>
152
- <div :class="$parent.$parent.style">
153
- <label class="font_normal_body">是否维修</label>
154
- <v-select
155
- placeholder='是否维修'
156
- :value-single="true"
157
- class="select select_list" style="width: 60%"
158
- v-model='model.f_repaired'
159
- :value.sync="model.f_repaired"
160
- :options='$parent.$parent.repairedOptions'
161
- condition="f_repaired = '{}'"
162
- close-on-select clear-button> </v-select>
163
- </div>
164
- <div :class="$parent.$parent.style">
165
- <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
166
- <input type="text" class="input_search" v-model="model.f_address"
167
- condition="f_address like '%{}%'"
168
- style="width: 60%" placeholder="地址">
169
- </div>
170
- <div :class="$parent.$parent.style">
171
- <label class="font_normal_body">开户时间</label>
172
- <datepicker
173
- placeholder='起始时间' style="width:60%"
174
- :disabled-days-of-week="[]"
175
- :format="'yyyy-MM-dd'"
176
- :show-rest-button="reset"
177
- :value.sync="model.f_start_gastime"
178
- v-model="model.f_start_gastime"
179
- condition="f_gas_date >= '{} 00:00:00'">
180
- </datepicker>
181
- </div>
182
- <div :class="$parent.$parent.style">
183
- <label class="font_normal_body">开户时间</label>
184
- <datepicker
185
- placeholder='结束时间' style="width:60%"
186
- :disabled-days-of-week="[]"
187
- :format="'yyyy-MM-dd'"
188
- :show-rest-button="reset"
189
- :value.sync="model.f_end_gastime"
190
- v-model="model.f_end_gastime"
191
- condition="f_gas_date <= '{} 23:59:59'">
192
- </datepicker>
193
- </div>
194
- </div>
195
-
196
- <div class="row" v-show="$parent.$parent.$parent.showItem">
197
- <div :class="$parent.$parent.style">
198
- <label class="font_normal_body">安检计划</label>
199
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
200
- @click="$parent.$parent.showChooser"
201
- style="width: 60%" placeholder="安检计划" readonly="readonly">
202
- </div>
203
- <div :class="$parent.$parent.style">
204
- <label class="font_normal_body">存在隐患</label>
205
- <v-select style="width:60% "
206
- class="select select_list"
207
- :value.sync="model.f_has_defect"
208
- v-model="model.f_has_defect"
209
- :options='$parent.$parent.hasDefectOptions'
210
- :placeholder='model.f_has_defect'
211
- condition="f_has_defect = '{}'"
212
- close-on-select>
213
- </v-select>
214
- </div>
215
-
216
- <div class=" col-sm-4 form-group button-range">
217
- <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
218
- <div style="float: right" class="button_spacing"
219
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
220
- @click="$parent.$parent.hiddenr()"></div>
221
- <div style="float: right" class="button_spacing"
222
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
223
- @click="$parent.$parent.hidden()"></div>
224
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
225
- <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
226
- <div style="float: right">
227
- <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
228
- :field="$parent.$parent.getfield"
229
- progress="safeGetExportProgress"
230
- sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检计划明细' :choose-col="true"></export-excel-safe>
231
- </div>
232
- </div>
233
- </div>
234
-
235
-
236
-
237
- </div>
238
- <div class="row" v-show="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
239
- <div :class="$parent.$parent.style">
240
- <label class="font_normal_body">用户编号</label>
241
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
242
- condition="f_userinfo_code = '{}'"
243
- style="width: 60%" placeholder="用户编号">
244
- </div>
245
- <div :class="$parent.$parent.style">
246
- <label class="font_normal_body">用户表号</label>
247
- <input type="text" class="input_search" v-model="model.f_meternumber"
248
- condition="f_meternumber = '{}'"
249
- style="width: 60%" placeholder="用户表号">
250
- </div>
251
- <div :class="$parent.$parent.style">
252
- <label class="font_normal_body">结果查询</label>
253
- <v-select
254
- placeholder='处理结果查询'
255
- :value-single="true"
256
- class="select select_list" style="width: 60%"
257
- v-model='model.f_repaired'
258
- :value.sync="model.f_repaired"
259
- :options='$parent.$parent.repaired'
260
- condition="f_repaired = '{}'"
261
- close-on-select clear-button> </v-select>
262
- </div>
263
-
264
- <div :class="$parent.$parent.style2" style="margin: 0">
265
- <role-selector-safe
266
- role-name="安检员"
267
- :resobjprop.sync="$parent.$parent.resids"
268
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
269
- @re-res="$parent.$parent.getRes"
270
- :value.sync="model.f_checker_id"
271
- v-model="model.f_checker_id"
272
- condition="f_checker_name = '{}'">
273
- </role-selector-safe>
274
- </div>
275
- </div>
276
- <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
277
- <div :class="$parent.$parent.style">
278
- <label class="font_normal_body">片&emsp;&emsp;区</label>
279
- <v-select class="select_list select"
280
- placeholder='片区/管理站' style="width: 60%"
281
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
282
- :options='$parent.$parent.sliceArea'
283
- filer-key="name"
284
- close-on-select clear-button
285
- condition="f_slice_area='{}'"
286
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
287
- :value-single="true">
288
- </v-select>
289
- </div>
290
- <div :class="$parent.$parent.style">
291
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
292
- <v-select class="select_list select"
293
- placeholder='抄表册' style="width: 60%"
294
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
295
- :options='$parent.$parent.cbc'
296
- filer-key="name"
297
- close-on-select clear-button
298
- condition="f_meter_book_num={}"
299
- :value-single="true">
300
- </v-select>
301
- </div>
302
- <div :class="$parent.$parent.style">
303
- <label class="font_normal_body">起始时间</label>
304
- <datepicker
305
- placeholder='起始时间' style="width:60%"
306
- :disabled-days-of-week="[]"
307
- :format="'yyyy-MM-dd'"
308
- :show-rest-button="reset"
309
- :value.sync="model.f_start_time"
310
- v-model="model.f_start_time"
311
- condition="f_offsite_time >= '{} 00:00:00'">
312
- </datepicker>
313
- </div>
314
- <div :class="$parent.$parent.style">
315
- <label class="font_normal_body">结束时间</label>
316
- <datepicker
317
- placeholder='结束时间' style="width:60%"
318
- :disabled-days-of-week="[]"
319
- :format="'yyyy-MM-dd'"
320
- :show-rest-button="reset"
321
- :value.sync="model.f_end_time"
322
- v-model="model.f_end_time"
323
- condition="f_offsite_time <= '{} 23:59:59'">
324
- </datepicker>
325
- </div>
326
- </div>
327
- <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
328
-
329
- <div :class="$parent.$parent.style">
330
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
331
- <input type="text" class="input_search" v-model="model.f_repairman"
332
- condition="f_repairman = '{}'"
333
- style="width: 60%" placeholder="维修员">
334
- </div>
335
- <div :class="$parent.$parent.style">
336
- <label class="font_normal_body">处理查询</label>
337
- <v-select
338
- placeholder='处理结果查询'
339
- :value-single="true"
340
- class="select select_list" style="width: 60%"
341
- v-model='model.f_is_deal'
342
- :value.sync="model.f_is_deal"
343
- :options='$parent.$parent.deals'
344
- condition="f_is_deal = '{}'"
345
- close-on-select clear-button> </v-select>
346
- </div>
347
- <div :class="$parent.$parent.style">
348
- <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
349
- <input type="text" class="input_search" v-model="model.f_address"
350
- condition="f_address like '%{}%'"
351
- style="width: 60%" placeholder="地址">
352
- </div>
353
- <div :class="$parent.$parent.style">
354
- <label class="font_normal_body">开户时间</label>
355
- <datepicker
356
- placeholder='起始时间' style="width:60%"
357
- :disabled-days-of-week="[]"
358
- :format="'yyyy-MM-dd'"
359
- :show-rest-button="reset"
360
- :value.sync="model.f_start_gastime"
361
- v-model="model.f_start_gastime"
362
- condition="f_gas_date >= '{} 00:00:00'">
363
- </datepicker>
364
- </div>
365
- <div :class="$parent.$parent.style">
366
- <label class="font_normal_body">开户时间</label>
367
- <datepicker
368
- placeholder='结束时间' style="width:60%"
369
- :disabled-days-of-week="[]"
370
- :format="'yyyy-MM-dd'"
371
- :show-rest-button="reset"
372
- :value.sync="model.f_end_gastime"
373
- v-model="model.f_end_gastime"
374
- condition="f_gas_date <= '{} 23:59:59'">
375
- </datepicker>
376
- </div>
377
- </div>
378
- </div>
379
- </criteria>
380
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
381
- <template partial='head'>
382
- <tr>
383
- <!-- <th><nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />全选</nobr></th>-->
384
- <th><nobr>入户状态</nobr></th>
385
- <th><nobr>用户编号</nobr></th>
386
- <th><nobr>用户名</nobr></th>
387
- <th><nobr>用户表号</nobr></th>
388
- <th><nobr>用户电话</nobr></th>
389
- <th><nobr>用户小区</nobr></th>
390
- <th><nobr>用户地址</nobr></th>
391
- <th><nobr>开户时间</nobr></th>
392
- <th><nobr>安检时间</nobr></th>
393
- <th><nobr>安检员</nobr></th>
394
- <th><nobr>计划名</nobr></th>
395
- <th><nobr>是否有隐患</nobr></th>
396
- <th><nobr>隐患数</nobr></th>
397
- <th><nobr>处理数</nobr></th>
398
- <th><nobr>处理情况</nobr></th>
399
- <th><nobr>维修员</nobr></th>
400
- <th><nobr>隐患明细</nobr></th>
401
- <!-- <th><nobr>备注</nobr></th>-->
402
- </tr>
403
- </template>
404
- <template partial='body'>
405
- <!-- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>-->
406
- <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
407
- <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
408
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
409
- <td style="text-align: center;white-space:nowrap;">{{row.f_meternumber}}</td>
410
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
411
- <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
412
- <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
413
- <td style="text-align: center;white-space:nowrap;">{{row.f_gas_date}}</td>
414
- <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
415
- <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
416
- <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
417
- <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
418
- <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
419
- <td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
420
- <td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
421
- <td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
422
- <td style="text-align: center;white-space:nowrap;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</td>
423
- <!-- <td style="text-align: center;white-space:nowrap;">{{ row.f_deal_remark}}</td>-->
424
- </template>
425
- </data-grid>
426
- </criteria-paged>
427
- <modal :show.sync="showModal" v-ref:modal backdrop="false">
428
- <div slot="modal-header" class="modal-header">
429
- <h4 class="modal-title">
430
- 选择计划
431
- </h4>
432
- </div>
433
- <div slot="modal-body" class="modal-body">
434
- <plan-chooser :f.sync="$login.f" v-ref:chooser></plan-chooser>
435
- </div>
436
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
437
- <button class="button_search" @click="ok">确认</button>
438
- <button class="button_search" @click="cancel">取消</button>
439
- </div>
440
- </modal>
441
- <modal :show.sync="showModal2" :backdrop="false">
442
- <div slot="modal-header" class="modal-header">
443
- <h4 class="modal-title">
444
- 转维修
445
- </h4>
446
- </div>
447
- <div slot="modal-body" class="modal-body">
448
- <div v-if="true">
449
- <div class="row" style="margin-top: 10px">
450
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
451
- <div class="col-xs-8 col-md-8">
452
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
453
- :options='dispatchTypeOptions' placeholder='派发类型'
454
- close-on-select>
455
- </v-select>
456
- </div>
457
- </div>
458
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
459
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
460
- <div class="col-xs-8 col-md-8">
461
- <v-select
462
- :value.sync="selectData.f_repairman"
463
- :value-single="true"
464
- :options='repairers'
465
- placeholder='请选择维修员'
466
- close-on-select></v-select>
467
- </div>
468
- </div>
469
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
470
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
471
- <div class="col-xs-8 col-md-8">
472
- <right-tree
473
- islist
474
- :userid="userid"
475
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
476
- @re-res="getSiteRes"></right-tree>
477
- </div>
478
- </div>
479
- <div class="row" style="margin-top: 10px">
480
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
481
- <div class="col-xs-8 col-md-8">
482
- <v-select :value.sync="selectData.f_repairtype" style="width:60%"
483
- class="select select_list"
484
- :value-single="true"
485
- :options='repairTypeOptions'
486
- close-on-select>
487
- </v-select>
488
- </div>
489
- </div>
490
- <div class="row" style="margin-top: 10px">
491
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
492
- <div class="col-xs-8 col-md-8">
493
- <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
494
- </div>
495
- </div>
496
- </div>
497
- </div>
498
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
499
- <!-- <button class="button_search" @click="rectification">转维修</button>-->
500
- <button class="button_search" @click="cancel1">取消</button>
501
- </div>
502
- </modal>
503
- <modal :show.sync="showModal3">
504
- <div slot="modal-header" class="modal-header">
505
- <h4 class="modal-title">
506
- 转维修进度{{ progressbarWidth }}%
507
- </h4>
508
- </div>
509
- <div slot="modal-body" class="modal-body">
510
- <div class="progress">
511
- <div class="progress-bar" role="progressbar" aria-valuenow="60"
512
- aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
513
- <!-- <span class="sr-only">40% 完成</span>-->
514
- </div>
515
- </div>
516
- </div>
517
- <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
518
- </modal>
519
- </div>
520
- </template>
521
- <script>
522
- import {PagedList} from 'vue-client'
523
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
524
- import co from 'co'
525
- import Vue from 'vue'
526
- import * as Util from '../../../components/Util'
527
-
528
- let select = function* (self) {
529
- let http = new HttpResetClass()
530
- let getGasman = yield http.load('POST', '/rs/search', {
531
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
532
- userid: self.$login.f.id
533
- }, {resolveMsg: null, rejectMsg: null})
534
- //tag
535
- self.checkersid.push({label: '全部', value: ''})
536
- getGasman.data.forEach((checker) => {
537
- self.checkersid.push({label: checker.name, value: checker.name})
538
- })
539
- }
540
- export default {
541
- title: '隐患查询',
542
- data() {
543
- let model = new PagedList('rs/sql/GetCheckPaperByDefectNew2', 20, {
544
- f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
545
- })
546
- model.f_filialeids = '(' + this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1) + ')'
547
- model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
548
- return {
549
- repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
550
- deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'},{label: '处理中', value: '处理中'}],
551
- hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
552
- f: this.$login.f,
553
- model: model,
554
- criteriaShow: false,
555
- checkAll:false,
556
- timercount:0,
557
- showModal2:false,
558
- repairTypeOptions:this.$appdata.getParam('转维修类型'),
559
- dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
560
- checkes:[],
561
- showModal: false,
562
- f_check_plan: {f_plan_name: '', id: ''},
563
- sumsmodel: {},
564
- resids:{},
565
- all: false,
566
- fields: {},
567
-
568
- selectData:{
569
- dispatchType:'',
570
- f_repairman:'',
571
- f_remarks:'',
572
- f_repairtype:''
573
- },
574
- progressbarWidth:'0',
575
- modelval: [],
576
- isbusy:false,
577
- checkersid: [],
578
- showModal3:false,
579
- toRepairCount:0,
580
- sliceArea: [],
581
- callSends:[],
582
- cbc:[],
583
- repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
584
- repairers:[],
585
- cbcs:[],
586
- thead: '',
587
- headData: ['入户状态','用户编号','用户表号','用户名','用户电话','用户小区','用户地址','开户时间','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细','处理情况'],
588
- bodyData: ['f_entry_status','f_userinfo_code','f_meternumber','f_user_name','f_user_phone','f_residential_area','f_address','f_gas_date','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext','f_is_deal'],
589
- }
590
- },
591
- props:{
592
- style: {
593
- type: String,
594
- default: 'col-sm-2 form-group'
595
- },
596
- style2: {
597
- type: String,
598
- default: 'col-sm-4 form-group'
599
- }
600
-
601
- },
602
-
603
- methods: {
604
- trouble(val) {
605
- // return val.replaceAll("'",'')
606
- // .replaceAll("\"",'')
607
- // .replaceAll("{",'')
608
- // .replaceAll("}",'')
609
- // .replaceAll("]",'')
610
- // .replaceAll("[",'')
611
- // .replaceAll("result:",'')
612
- // .replaceAll("data:",'')
613
- // .replaceAll("有隐患",'')
614
- // .replaceAll(",",'')
615
-
616
-
617
- const defect_content = JSON.parse(val)
618
- let result = ''
619
- if (defect_content.data) {
620
- const jsonData = defect_content.data
621
- for (const itemdata of jsonData) {
622
- const keys = Object.keys(itemdata)
623
- for (const itm of keys) {
624
- const value = itemdata[itm]
625
- result += itm + ':' + value
626
- }
627
- }
628
- }
629
- return result
630
- },
631
- getEmp() {
632
- let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
633
- let http = new HttpResetClass()
634
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
635
- let str=''
636
- res.data.forEach((item,idx,arr) => {
637
- //tag
638
- if(idx+1==arr.length){
639
- str += item.id
640
- }else{
641
- str += item.id+','
642
- }
643
-
644
- })
645
- let http1 = new HttpResetClass()
646
- http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
647
- data: {
648
- items: 'id,f_user_telephone',
649
- tablename: 't_user',
650
- condition: `id in (${str})`,
651
- orderitem: 'id'
652
- }
653
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
654
-
655
- res.data.forEach((user)=>{
656
- try {
657
- ress.data.forEach((tel,tidx,arr)=>{
658
- //tag
659
- if(user.id==tel.id){
660
- this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
661
- ress.data.splice(tidx,1)
662
- //tag
663
- throw new Error("跳出循环");
664
- }
665
- })
666
- }catch (e) {
667
- //tag
668
- }
669
- })
670
- })
671
-
672
- })
673
- },
674
- toRepair(){
675
- //tag
676
- this.showModal2=true
677
- },
678
- async rectification(){
679
- this.isbusy =true
680
- // if (this.checkAll){
681
- let data={
682
- f_filialeids: this.model.params.f_filialeids,
683
- f_defect_content: this.model.params.f_defect_content,
684
- condition:this.model.params.condition
685
- }
686
- let res1= await new HttpResetClass().load('post','rs/sql/GetCheckPaperByDefectNew2',{data: data })
687
- for (let i = 0; i < res1.data.length; i++) {
688
- let data1={
689
- f_paper_id: res1.data[i].id,
690
- condition:`f_repaire_type != '无隐患'`
691
- }
692
- let res2 = await new HttpResetClass().load('POST' , 'rs/sql/GetDefectByPaperIdNew2' , {data: data1 } )
693
- //tag
694
- const uploadData = {
695
- model: {
696
- serviceacitivity: [{
697
- f_service_acitivity_type: '派单'
698
- }],
699
- f_repairitems: {},
700
- failure: '',
701
- f_source: '安检',
702
- f_service_id: '',
703
- f_contact_phone: '',
704
- f_meetunit: '',
705
- f_phone: '',
706
- f_user_name: '',
707
- f_address: '',
708
- f_repair_date: '',
709
- f_reciever: '',
710
- f_remarks: '',
711
- f_user_type: '',
712
- f_area: '',
713
- f_unit_name: '',
714
- f_street: '',
715
- f_residential_area: '',
716
- f_building: '',
717
- f_unit: '',
718
- f_floor: '',
719
- f_room: '',
720
- aState: '',
721
- f_repairtype: '',
722
- f_userinfo_id: '',
723
- f_userinfo_code: '',
724
- f_orgstr: '',
725
- f_outlets: '',
726
- f_attendant: this.$login.f.name
727
- },
728
- loginUser: {
729
- name: this.$login.f.name,
730
- ename: this.$login.f.ename
731
- },
732
- user: {
733
- f_userinfo_id: ''
734
- },
735
- callObj: null
736
- }
737
-
738
- uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
739
- // uploadData.model.f_meetunit = self.$login.f.orgpathnames
740
- // uploadData.model.f_orgstr = self.$login.f.orgpathstr
741
- // uploadData.model.f_outlets = self.$login.f.f_parentname
742
- uploadData.model.f_meetunit = this.$login.f.deps
743
- uploadData.model.f_orgid = this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
744
- uploadData.model.f_filiale = this.$login.f.org
745
- uploadData.model.f_outlets = this.$login.f.deps
746
- uploadData.model.f_filiale_id = this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
747
- uploadData.toRepair = '一级派单'
748
- let res3 = await new HttpResetClass().load('post','/rs/sql/GetUserForRepaireNew2', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
749
- uploadData.model = Object.assign(uploadData.model, res3.data[0])
750
- uploadData.user.f_userinfo_id = res3.data[0].f_userinfo_id
751
- uploadData.model.f_repair_date = Util.getNowDate()
752
- uploadData.model.f_repairtype = res3.data[0].f_repairtype
753
- uploadData.model.f_remarks = res3.data[0].f_remarks
754
- let failure = []
755
- res2.data.forEach(row => {
756
- if (row.f_repaire_type == '隐患未处理') {
757
- console.log('row.f_item_value',row.f_item_value)
758
- failure.push({
759
- f_failure_type: row.f_item_name,
760
- failurecase: row.f_item_value?row.f_item_value.split(','):''
761
- })
762
- }
763
- })
764
- uploadData.model.failure = failure
765
- // 拼接repairitems
766
- let rows = JSON.parse(JSON.stringify(res2.data))
767
- let repairitems = {
768
- data: []
769
- }
770
- let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
771
- // 取隐患未处理的
772
- rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
773
- //tag)
774
- // 开始拼接
775
- rows.forEach(row => {
776
- let existIndex = -1
777
- // 判断该设备是否已经存在
778
- for (let i = 0; i < repairitems.data.length; i++) {
779
- if (repairitems.data[i].f_type == row.f_device_type) {
780
- existIndex = i
781
- break
782
- }
783
- }
784
- if (existIndex == -1) {
785
- // 不存在则新建
786
- let newItem = {
787
- f_type: row.f_device_type,
788
- details: [{
789
- f_defect_id: row.id,
790
- f_project: `${row.f_item_name}:${row.f_item_value}`,
791
- type: 'selector',
792
- options: safecheckOptions
793
- }]
794
- }
795
- repairitems.data.push(newItem)
796
- } else {
797
- // 存在则追加
798
- repairitems.data[existIndex].details.push({
799
- f_defect_id: row.id,
800
- f_project: `${row.f_item_name}:${row.f_item_value}`,
801
- type: 'selector',
802
- options: safecheckOptions
803
- })
804
- }
805
- })
806
- uploadData.model.f_repairitems = repairitems
807
- uploadData.rows=rows
808
- //tag)
809
- //tag
810
- if (uploadData.model.f_repairitems.data.length>0){
811
- this.callSends.push(uploadData)
812
- }else{
813
- //tag
814
- }
815
- }
816
- //tag)
817
- let timer = setInterval(async ()=>{
818
- this.showModal3=true
819
- this.isbusy=false
820
- if (this.timercount<this.callSends.length){
821
- //tag)
822
- let rows=this.callSends[this.timercount].rows
823
- //tag)
824
- let result = await this.$resetpost('/rs/logic/callerSend', this.callSends[this.timercount])
825
- //tag)
826
- if (result.data.f_service_id) {
827
- const data = {
828
- f_paper_id: rows[0].f_paper_id,
829
- f_service_id: result.data.f_service_id,
830
- itemsId: this.$login.convertToIn(rows.map(row => row.id))
831
- }
832
- //tag
833
- let updateRes = await this.$resetpost('/rs/logic/updateDefectStateNew', data)
834
- }
835
- this.toRepairCount++
836
- //tag
837
- this.timercount++
838
- }else{
839
- clearInterval(timer)
840
- //tag
841
- this.callSends=[]
842
- this.timercount=0
843
- this.showModal3=false
844
- this.cancel1()
845
- this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
846
- this.toRepairCount=0
847
- }
848
- }, 3000)
849
- },
850
- cancel1(){
851
- this.showModal2=false
852
- this.selectData={
853
- dispatchType:'',
854
- f_repairman:'',
855
- f_remarks:'',
856
- f_repairtype:''
857
- }
858
- },
859
- sleep(d){
860
- //tag)
861
- var t = Date.now()
862
- while(Date.now - t <= d){
863
-
864
- }
865
- //tag)
866
- },
867
- isChecked(v) {
868
- // 如果全选,不在的按选中算,否则,在的按选中算
869
- if (this.checkAll) {
870
- return this.checkes.indexOf(v) == -1
871
- } else {
872
- return this.checkes.indexOf(v) != -1
873
- }
874
- },
875
- setCheckAll() {
876
- this.checkAll=this.checkAll?false:true;
877
- // 全选改变后,清空选中数据
878
- this.checkes = []
879
- },
880
- setCheckes(id) {
881
- let index=this.checkes.indexOf(id)
882
- if(index<0){
883
- this.checkes.push(id)
884
- }else{
885
- this.checkes.splice(index,1)
886
- }
887
- },
888
-
889
- getmeterbook(val){
890
- this.cbc=[]
891
- this.cbc.push({
892
- label:'全部',
893
- value:''
894
- })
895
- if (val==''){
896
-
897
- this.cbcs.forEach(res=>{
898
- this.cbc.push({
899
- label:res.f_book_name,
900
- value:res.id
901
- })
902
- })
903
- }else{
904
- this.cbcs.forEach(res=>{
905
- if (res.f_book_slice_area==val){
906
- this.cbc.push({
907
- label:res.f_book_name,
908
- value:res.id
909
- })
910
- }
911
- })
912
- }
913
- },
914
-
915
- Mreadibook(val){
916
- //tag
917
- //tag
918
- this.sliceArea=[]
919
- if (val){
920
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
921
- items: 'name',
922
- tablename: 't_zone',
923
- condition: `parentid in ${val}`,
924
- orderitem: 'id'
925
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
926
- this.sliceArea.push({
927
- label:'全部',
928
- value:''
929
- })
930
- res.data.forEach(ress=>{
931
- this.sliceArea.push({
932
- label:ress.name,
933
- value:ress.name
934
- })
935
- })
936
-
937
- })
938
- }
939
- },
940
- getAllMeterBook(val){
941
- //tag
942
- //tag
943
- this.cbcs=[]
944
- if (val){
945
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
946
- items: 'f_book_name,f_book_slice_area,id',
947
- tablename: 't_meter_book',
948
- condition: `f_filiale_id in ${val}`,
949
- orderitem: 'id'
950
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
951
- res.data.forEach(ress=>{
952
- this.cbcs.push({
953
- id:ress.id,
954
- f_book_name:ress.f_book_name,
955
- f_book_slice_area:ress.f_book_slice_area
956
- })
957
- })
958
- this.cbc=[]
959
- this.cbc.push({
960
- label:'全部',
961
- value:''
962
- })
963
- this.cbcs.forEach(res=>{
964
- this.cbc.push({
965
- label:res.f_book_name,
966
- value:res.id
967
- })
968
- })
969
- })
970
- }
971
- },
972
- hiddenr() {
973
- this.$parent.showItem = !this.$parent.showItem
974
- },
975
- hidden() {
976
- this.criteriaShow = !this.criteriaShow
977
- },
978
- search(args) {
979
- //tag
980
- if (this.f_check_plan.f_plan_name) {
981
- args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
982
- }
983
- this.checkes = []
984
- this.checkAll=false
985
- this.model.search(args.condition, args.model)
986
- },
987
- getRes(obj) {
988
- //tag
989
- this.resids = {res:obj.res[0], resids:obj.resids[0]}
990
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
991
- this.Mreadibook(this.model.f_filialeids)
992
- this.getAllMeterBook(this.model.f_filialeids)
993
- },
994
- showChooser() {
995
- this.showModal = true
996
- },
997
- ok() {
998
- this.showModal = false
999
- if (this.$refs.modal.$children[0].selectedRow.id) {
1000
- this.f_check_plan = this.$refs.modal.$children[0].selectedRow
1001
- }
1002
- },
1003
- cancel() {
1004
- this.showModal = false
1005
- this.f_check_plan = {f_plan_name: '', id: ''}
1006
- }
1007
- },
1008
- ready() {
1009
- //tag
1010
- this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
1011
- this.getEmp()
1012
- let gen = select(this)
1013
- // this.Mreadibook(`('${this.$login.f.orgid}')`)
1014
- co(gen)
1015
- },
1016
- watch:{
1017
- 'timercount'(){
1018
- if (this.timercount===0){
1019
- this.progressbarWidth = '0'
1020
- }else {
1021
- //tag
1022
- //tag
1023
- this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
1024
- }
1025
-
1026
- }
1027
- },
1028
- computed: {
1029
- selected() {
1030
- return this.$refs.paged.$refs.grid.selected
1031
- },
1032
- getfield () {
1033
- //tag
1034
- let data = {}
1035
- this.bodyData.forEach((value, index) => {
1036
- data[this.bodyData[index]] = this.headData[index]
1037
- })
1038
- //合计字段打印
1039
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
1040
- if (this.sumsmodel) {
1041
- Object.keys(this.sumsmodel).forEach((key) => {
1042
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
1043
- })
1044
- } else {
1045
- this.tfoot += '暂无'
1046
- }
1047
- this.tfoot += '</th></tr>'
1048
- return data
1049
- }
1050
- }
1051
- }
1052
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <work-busy :is-busy="isbusy"></work-busy>
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
+ <div :class="$parent.$parent.style">
9
+ <label class="font_normal_body">安检计划</label>
10
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
11
+ @click="$parent.$parent.showChooser"
12
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
13
+ </div>
14
+ <div :class="$parent.$parent.style">
15
+ <label class="font_normal_body">存在隐患</label>
16
+ <v-select style="width:60% "
17
+ class="select select_list"
18
+ :value.sync="model.f_has_defect"
19
+ v-model="model.f_has_defect"
20
+ :options='$parent.$parent.hasDefectOptions'
21
+ :placeholder='model.f_has_defect'
22
+ condition="f_has_defect = '{}'"
23
+ close-on-select>
24
+ </v-select>
25
+ </div>
26
+ <div :class="$parent.$parent.style">
27
+ <label class="font_normal_body">用户编号</label>
28
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
29
+ condition="f_userinfo_code = '{}'"
30
+ style="width: 60%" placeholder="用户编号">
31
+ </div>
32
+ <div :class="$parent.$parent.style">
33
+ <label class="font_normal_body">用户表号</label>
34
+ <input type="text" class="input_search" v-model="model.f_meternumber"
35
+ condition="f_meternumber = '{}'"
36
+ style="width: 60%" placeholder="用户表号">
37
+ </div>
38
+ <div :class="$parent.$parent.style">
39
+ <label class="font_normal_body">结果查询</label>
40
+ <v-select
41
+ placeholder='维修结果查询'
42
+ :value-single="true"
43
+ class="select select_list" style="width: 60%"
44
+ v-model='model.f_is_repair'
45
+ :value.sync="model.f_is_repair"
46
+ :options='$parent.$parent.repaired'
47
+ condition="f_is_repair = '{}'"
48
+ close-on-select clear-button> </v-select>
49
+ </div>
50
+ <div class=" col-sm-4 form-group button-range" >
51
+ <div class="span" style="float: right;margin-top: 8px">
52
+ <div style="float: right" class="button_spacing"
53
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
54
+ @click="$parent.$parent.hiddenr()"></div>
55
+ <div style="float: right" class="button_spacing"
56
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
57
+ @click="$parent.$parent.hidden()"></div>
58
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
59
+ <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
60
+ <div style="float: right">
61
+ <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
62
+ :field="$parent.$parent.getfield"
63
+ progress="safeGetExportProgress"
64
+ sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
70
+ <div :class="$parent.$parent.style">
71
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
72
+ <v-select class="select_list select"
73
+ placeholder='片区/管理站' style="width: 60%"
74
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
75
+ :options='$parent.$parent.sliceArea'
76
+ filer-key="name"
77
+ close-on-select clear-button
78
+ condition="f_slice_area='{}'"
79
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
80
+ :value-single="true">
81
+ </v-select>
82
+ </div>
83
+ <div :class="$parent.$parent.style2" style="margin: 0">
84
+ <role-selector-safe
85
+ role-name="安检员"
86
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
87
+ :resobjprop.sync="$parent.$parent.resids"
88
+ @re-res="$parent.$parent.getRes"
89
+ :value.sync="model.f_checker_id"
90
+ v-model="model.f_checker_id"
91
+ condition="f_checker_name = '{}'">
92
+ </role-selector-safe>
93
+ </div>
94
+
95
+ <div :class="$parent.$parent.style">
96
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
97
+ <v-select class="select_list select"
98
+ placeholder='抄表册' style="width: 60%"
99
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
100
+ :options='$parent.$parent.cbc'
101
+ filer-key="name"
102
+ close-on-select clear-button
103
+ condition="f_meter_book_num={}"
104
+ :value-single="true">
105
+ </v-select>
106
+ </div>
107
+ <div :class="$parent.$parent.style">
108
+ <label class="font_normal_body">起始时间</label>
109
+ <datepicker
110
+ placeholder='起始时间' style="width:60%"
111
+ :disabled-days-of-week="[]"
112
+ :format="'yyyy-MM-dd'"
113
+ :show-rest-button="reset"
114
+ :value.sync="model.f_start_time"
115
+ v-model="model.f_start_time"
116
+ condition="f_offsite_time >= '{} 00:00:00'">
117
+ </datepicker>
118
+ </div>
119
+ <div :class="$parent.$parent.style">
120
+ <label class="font_normal_body">结束时间</label>
121
+ <datepicker
122
+ placeholder='结束时间' style="width:60%"
123
+ :disabled-days-of-week="[]"
124
+ :format="'yyyy-MM-dd'"
125
+ :show-rest-button="reset"
126
+ :value.sync="model.f_end_time"
127
+ v-model="model.f_end_time"
128
+ condition="f_offsite_time <= '{} 23:59:59'">
129
+ </datepicker>
130
+ </div>
131
+ </div>
132
+ <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
133
+
134
+ <div :class="$parent.$parent.style">
135
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
136
+ <input type="text" class="input_search" v-model="model.f_repairman"
137
+ condition="f_repairman = '{}'"
138
+ style="width: 60%" placeholder="维修员">
139
+ </div>
140
+ <div :class="$parent.$parent.style">
141
+ <label class="font_normal_body">处理查询</label>
142
+ <v-select
143
+ placeholder='处理结果查询'
144
+ :value-single="true"
145
+ class="select select_list" style="width: 60%"
146
+ v-model='model.f_is_deal'
147
+ :value.sync="model.f_is_deal"
148
+ :options='$parent.$parent.deals'
149
+ condition="f_is_deal = '{}'"
150
+ close-on-select clear-button> </v-select>
151
+ </div>
152
+ <div :class="$parent.$parent.style">
153
+ <label class="font_normal_body">是否维修</label>
154
+ <v-select
155
+ placeholder='是否维修'
156
+ :value-single="true"
157
+ class="select select_list" style="width: 60%"
158
+ v-model='model.f_repaired'
159
+ :value.sync="model.f_repaired"
160
+ :options='$parent.$parent.repairedOptions'
161
+ condition="f_repaired = '{}'"
162
+ close-on-select clear-button> </v-select>
163
+ </div>
164
+ <div :class="$parent.$parent.style">
165
+ <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
166
+ <input type="text" class="input_search" v-model="model.f_address"
167
+ condition="f_address like '%{}%'"
168
+ style="width: 60%" placeholder="地址">
169
+ </div>
170
+ <div :class="$parent.$parent.style">
171
+ <label class="font_normal_body">开户时间</label>
172
+ <datepicker
173
+ placeholder='起始时间' style="width:60%"
174
+ :disabled-days-of-week="[]"
175
+ :format="'yyyy-MM-dd'"
176
+ :show-rest-button="reset"
177
+ :value.sync="model.f_start_gastime"
178
+ v-model="model.f_start_gastime"
179
+ condition="f_gas_date >= '{} 00:00:00'">
180
+ </datepicker>
181
+ </div>
182
+ <div :class="$parent.$parent.style">
183
+ <label class="font_normal_body">开户时间</label>
184
+ <datepicker
185
+ placeholder='结束时间' style="width:60%"
186
+ :disabled-days-of-week="[]"
187
+ :format="'yyyy-MM-dd'"
188
+ :show-rest-button="reset"
189
+ :value.sync="model.f_end_gastime"
190
+ v-model="model.f_end_gastime"
191
+ condition="f_gas_date <= '{} 23:59:59'">
192
+ </datepicker>
193
+ </div>
194
+ </div>
195
+
196
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
197
+ <div :class="$parent.$parent.style">
198
+ <label class="font_normal_body">安检计划</label>
199
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
200
+ @click="$parent.$parent.showChooser"
201
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
202
+ </div>
203
+ <div :class="$parent.$parent.style">
204
+ <label class="font_normal_body">存在隐患</label>
205
+ <v-select style="width:60% "
206
+ class="select select_list"
207
+ :value.sync="model.f_has_defect"
208
+ v-model="model.f_has_defect"
209
+ :options='$parent.$parent.hasDefectOptions'
210
+ :placeholder='model.f_has_defect'
211
+ condition="f_has_defect = '{}'"
212
+ close-on-select>
213
+ </v-select>
214
+ </div>
215
+
216
+ <div class=" col-sm-4 form-group button-range">
217
+ <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
218
+ <div style="float: right" class="button_spacing"
219
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
220
+ @click="$parent.$parent.hiddenr()"></div>
221
+ <div style="float: right" class="button_spacing"
222
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
223
+ @click="$parent.$parent.hidden()"></div>
224
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
225
+ <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
226
+ <div style="float: right">
227
+ <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
228
+ :field="$parent.$parent.getfield"
229
+ progress="safeGetExportProgress"
230
+ sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检计划明细' :choose-col="true"></export-excel-safe>
231
+ </div>
232
+ </div>
233
+ </div>
234
+
235
+
236
+
237
+ </div>
238
+ <div class="row" v-show="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
239
+ <div :class="$parent.$parent.style">
240
+ <label class="font_normal_body">用户编号</label>
241
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
242
+ condition="f_userinfo_code = '{}'"
243
+ style="width: 60%" placeholder="用户编号">
244
+ </div>
245
+ <div :class="$parent.$parent.style">
246
+ <label class="font_normal_body">用户表号</label>
247
+ <input type="text" class="input_search" v-model="model.f_meternumber"
248
+ condition="f_meternumber = '{}'"
249
+ style="width: 60%" placeholder="用户表号">
250
+ </div>
251
+ <div :class="$parent.$parent.style">
252
+ <label class="font_normal_body">结果查询</label>
253
+ <v-select
254
+ placeholder='处理结果查询'
255
+ :value-single="true"
256
+ class="select select_list" style="width: 60%"
257
+ v-model='model.f_repaired'
258
+ :value.sync="model.f_repaired"
259
+ :options='$parent.$parent.repaired'
260
+ condition="f_repaired = '{}'"
261
+ close-on-select clear-button> </v-select>
262
+ </div>
263
+
264
+ <div :class="$parent.$parent.style2" style="margin: 0">
265
+ <role-selector-safe
266
+ role-name="安检员"
267
+ :resobjprop.sync="$parent.$parent.resids"
268
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
269
+ @re-res="$parent.$parent.getRes"
270
+ :value.sync="model.f_checker_id"
271
+ v-model="model.f_checker_id"
272
+ condition="f_checker_name = '{}'">
273
+ </role-selector-safe>
274
+ </div>
275
+ </div>
276
+ <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
277
+ <div :class="$parent.$parent.style">
278
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
279
+ <v-select class="select_list select"
280
+ placeholder='片区/管理站' style="width: 60%"
281
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
282
+ :options='$parent.$parent.sliceArea'
283
+ filer-key="name"
284
+ close-on-select clear-button
285
+ condition="f_slice_area='{}'"
286
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
287
+ :value-single="true">
288
+ </v-select>
289
+ </div>
290
+ <div :class="$parent.$parent.style">
291
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
292
+ <v-select class="select_list select"
293
+ placeholder='抄表册' style="width: 60%"
294
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
295
+ :options='$parent.$parent.cbc'
296
+ filer-key="name"
297
+ close-on-select clear-button
298
+ condition="f_meter_book_num={}"
299
+ :value-single="true">
300
+ </v-select>
301
+ </div>
302
+ <div :class="$parent.$parent.style">
303
+ <label class="font_normal_body">起始时间</label>
304
+ <datepicker
305
+ placeholder='起始时间' style="width:60%"
306
+ :disabled-days-of-week="[]"
307
+ :format="'yyyy-MM-dd'"
308
+ :show-rest-button="reset"
309
+ :value.sync="model.f_start_time"
310
+ v-model="model.f_start_time"
311
+ condition="f_offsite_time >= '{} 00:00:00'">
312
+ </datepicker>
313
+ </div>
314
+ <div :class="$parent.$parent.style">
315
+ <label class="font_normal_body">结束时间</label>
316
+ <datepicker
317
+ placeholder='结束时间' style="width:60%"
318
+ :disabled-days-of-week="[]"
319
+ :format="'yyyy-MM-dd'"
320
+ :show-rest-button="reset"
321
+ :value.sync="model.f_end_time"
322
+ v-model="model.f_end_time"
323
+ condition="f_offsite_time <= '{} 23:59:59'">
324
+ </datepicker>
325
+ </div>
326
+ </div>
327
+ <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
328
+
329
+ <div :class="$parent.$parent.style">
330
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
331
+ <input type="text" class="input_search" v-model="model.f_repairman"
332
+ condition="f_repairman = '{}'"
333
+ style="width: 60%" placeholder="维修员">
334
+ </div>
335
+ <div :class="$parent.$parent.style">
336
+ <label class="font_normal_body">处理查询</label>
337
+ <v-select
338
+ placeholder='处理结果查询'
339
+ :value-single="true"
340
+ class="select select_list" style="width: 60%"
341
+ v-model='model.f_is_deal'
342
+ :value.sync="model.f_is_deal"
343
+ :options='$parent.$parent.deals'
344
+ condition="f_is_deal = '{}'"
345
+ close-on-select clear-button> </v-select>
346
+ </div>
347
+ <div :class="$parent.$parent.style">
348
+ <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
349
+ <input type="text" class="input_search" v-model="model.f_address"
350
+ condition="f_address like '%{}%'"
351
+ style="width: 60%" placeholder="地址">
352
+ </div>
353
+ <div :class="$parent.$parent.style">
354
+ <label class="font_normal_body">开户时间</label>
355
+ <datepicker
356
+ placeholder='起始时间' style="width:60%"
357
+ :disabled-days-of-week="[]"
358
+ :format="'yyyy-MM-dd'"
359
+ :show-rest-button="reset"
360
+ :value.sync="model.f_start_gastime"
361
+ v-model="model.f_start_gastime"
362
+ condition="f_gas_date >= '{} 00:00:00'">
363
+ </datepicker>
364
+ </div>
365
+ <div :class="$parent.$parent.style">
366
+ <label class="font_normal_body">开户时间</label>
367
+ <datepicker
368
+ placeholder='结束时间' style="width:60%"
369
+ :disabled-days-of-week="[]"
370
+ :format="'yyyy-MM-dd'"
371
+ :show-rest-button="reset"
372
+ :value.sync="model.f_end_gastime"
373
+ v-model="model.f_end_gastime"
374
+ condition="f_gas_date <= '{} 23:59:59'">
375
+ </datepicker>
376
+ </div>
377
+ </div>
378
+ </div>
379
+ </criteria>
380
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
381
+ <template partial='head'>
382
+ <tr>
383
+ <!-- <th><nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />全选</nobr></th>-->
384
+ <th><nobr>入户状态</nobr></th>
385
+ <th><nobr>用户编号</nobr></th>
386
+ <th><nobr>用户名</nobr></th>
387
+ <th><nobr>用户表号</nobr></th>
388
+ <th><nobr>用户电话</nobr></th>
389
+ <th><nobr>用户小区</nobr></th>
390
+ <th><nobr>用户地址</nobr></th>
391
+ <th><nobr>开户时间</nobr></th>
392
+ <th><nobr>安检时间</nobr></th>
393
+ <th><nobr>安检员</nobr></th>
394
+ <th><nobr>计划名</nobr></th>
395
+ <th><nobr>是否有隐患</nobr></th>
396
+ <th><nobr>隐患数</nobr></th>
397
+ <th><nobr>处理数</nobr></th>
398
+ <th><nobr>处理情况</nobr></th>
399
+ <th><nobr>维修员</nobr></th>
400
+ <th><nobr>隐患明细</nobr></th>
401
+ <!-- <th><nobr>备注</nobr></th>-->
402
+ </tr>
403
+ </template>
404
+ <template partial='body'>
405
+ <!-- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>-->
406
+ <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
407
+ <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
408
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
409
+ <td style="text-align: center;white-space:nowrap;">{{row.f_meternumber}}</td>
410
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
411
+ <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
412
+ <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
413
+ <td style="text-align: center;white-space:nowrap;">{{row.f_gas_date}}</td>
414
+ <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
415
+ <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
416
+ <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
417
+ <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
418
+ <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
419
+ <td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
420
+ <td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
421
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
422
+ <td style="text-align: center;white-space:nowrap;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</td>
423
+ <!-- <td style="text-align: center;white-space:nowrap;">{{ row.f_deal_remark}}</td>-->
424
+ </template>
425
+ </data-grid>
426
+ </criteria-paged>
427
+ <modal :show.sync="showModal" v-ref:modal backdrop="false">
428
+ <div slot="modal-header" class="modal-header">
429
+ <h4 class="modal-title">
430
+ 选择计划
431
+ </h4>
432
+ </div>
433
+ <div slot="modal-body" class="modal-body">
434
+ <plan-chooser :f.sync="$login.f" v-ref:chooser></plan-chooser>
435
+ </div>
436
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
437
+ <button class="button_search" @click="ok">确认</button>
438
+ <button class="button_search" @click="cancel">取消</button>
439
+ </div>
440
+ </modal>
441
+ <modal :show.sync="showModal2" :backdrop="false">
442
+ <div slot="modal-header" class="modal-header">
443
+ <h4 class="modal-title">
444
+ 转维修
445
+ </h4>
446
+ </div>
447
+ <div slot="modal-body" class="modal-body">
448
+ <div v-if="true">
449
+ <div class="row" style="margin-top: 10px">
450
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
451
+ <div class="col-xs-8 col-md-8">
452
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
453
+ :options='dispatchTypeOptions' placeholder='派发类型'
454
+ close-on-select>
455
+ </v-select>
456
+ </div>
457
+ </div>
458
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
459
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
460
+ <div class="col-xs-8 col-md-8">
461
+ <v-select
462
+ :value.sync="selectData.f_repairman"
463
+ :value-single="true"
464
+ :options='repairers'
465
+ placeholder='请选择维修员'
466
+ close-on-select></v-select>
467
+ </div>
468
+ </div>
469
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
470
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
471
+ <div class="col-xs-8 col-md-8">
472
+ <right-tree
473
+ islist
474
+ :userid="userid"
475
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
476
+ @re-res="getSiteRes"></right-tree>
477
+ </div>
478
+ </div>
479
+ <div class="row" style="margin-top: 10px">
480
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
481
+ <div class="col-xs-8 col-md-8">
482
+ <v-select :value.sync="selectData.f_repairtype" style="width:60%"
483
+ class="select select_list"
484
+ :value-single="true"
485
+ :options='repairTypeOptions'
486
+ close-on-select>
487
+ </v-select>
488
+ </div>
489
+ </div>
490
+ <div class="row" style="margin-top: 10px">
491
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
492
+ <div class="col-xs-8 col-md-8">
493
+ <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
494
+ </div>
495
+ </div>
496
+ </div>
497
+ </div>
498
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
499
+ <!-- <button class="button_search" @click="rectification">转维修</button>-->
500
+ <button class="button_search" @click="cancel1">取消</button>
501
+ </div>
502
+ </modal>
503
+ <modal :show.sync="showModal3">
504
+ <div slot="modal-header" class="modal-header">
505
+ <h4 class="modal-title">
506
+ 转维修进度{{ progressbarWidth }}%
507
+ </h4>
508
+ </div>
509
+ <div slot="modal-body" class="modal-body">
510
+ <div class="progress">
511
+ <div class="progress-bar" role="progressbar" aria-valuenow="60"
512
+ aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
513
+ <!-- <span class="sr-only">40% 完成</span>-->
514
+ </div>
515
+ </div>
516
+ </div>
517
+ <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
518
+ </modal>
519
+ </div>
520
+ </template>
521
+ <script>
522
+ import {PagedList} from 'vue-client'
523
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
524
+ import co from 'co'
525
+ import Vue from 'vue'
526
+ import * as Util from '../../../components/Util'
527
+
528
+ let select = function* (self) {
529
+ let http = new HttpResetClass()
530
+ let getGasman = yield http.load('POST', '/rs/search', {
531
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
532
+ userid: self.$login.f.id
533
+ }, {resolveMsg: null, rejectMsg: null})
534
+ //tag
535
+ self.checkersid.push({label: '全部', value: ''})
536
+ getGasman.data.forEach((checker) => {
537
+ self.checkersid.push({label: checker.name, value: checker.name})
538
+ })
539
+ }
540
+ export default {
541
+ title: '隐患查询',
542
+ data() {
543
+ let model = new PagedList('rs/sql/GetCheckPaperByDefectNew2', 20, {
544
+ f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
545
+ })
546
+ model.f_filialeids = '(' + this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1) + ')'
547
+ model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
548
+ return {
549
+ repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
550
+ deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'},{label: '处理中', value: '处理中'}],
551
+ hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
552
+ f: this.$login.f,
553
+ model: model,
554
+ criteriaShow: false,
555
+ checkAll:false,
556
+ timercount:0,
557
+ showModal2:false,
558
+ repairTypeOptions:this.$appdata.getParam('转维修类型'),
559
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
560
+ checkes:[],
561
+ showModal: false,
562
+ f_check_plan: {f_plan_name: '', id: ''},
563
+ sumsmodel: {},
564
+ resids:{},
565
+ all: false,
566
+ fields: {},
567
+
568
+ selectData:{
569
+ dispatchType:'',
570
+ f_repairman:'',
571
+ f_remarks:'',
572
+ f_repairtype:''
573
+ },
574
+ progressbarWidth:'0',
575
+ modelval: [],
576
+ isbusy:false,
577
+ checkersid: [],
578
+ showModal3:false,
579
+ toRepairCount:0,
580
+ sliceArea: [],
581
+ callSends:[],
582
+ cbc:[],
583
+ repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
584
+ repairers:[],
585
+ cbcs:[],
586
+ thead: '',
587
+ headData: ['入户状态','用户编号','用户表号','用户名','用户电话','用户小区','用户地址','开户时间','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细','处理情况'],
588
+ bodyData: ['f_entry_status','f_userinfo_code','f_meternumber','f_user_name','f_user_phone','f_residential_area','f_address','f_gas_date','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext','f_is_deal'],
589
+ }
590
+ },
591
+ props:{
592
+ style: {
593
+ type: String,
594
+ default: 'col-sm-2 form-group'
595
+ },
596
+ style2: {
597
+ type: String,
598
+ default: 'col-sm-4 form-group'
599
+ }
600
+
601
+ },
602
+
603
+ methods: {
604
+ trouble(val) {
605
+ // return val.replaceAll("'",'')
606
+ // .replaceAll("\"",'')
607
+ // .replaceAll("{",'')
608
+ // .replaceAll("}",'')
609
+ // .replaceAll("]",'')
610
+ // .replaceAll("[",'')
611
+ // .replaceAll("result:",'')
612
+ // .replaceAll("data:",'')
613
+ // .replaceAll("有隐患",'')
614
+ // .replaceAll(",",'')
615
+
616
+
617
+ const defect_content = JSON.parse(val)
618
+ let result = ''
619
+ if (defect_content.data) {
620
+ const jsonData = defect_content.data
621
+ for (const itemdata of jsonData) {
622
+ const keys = Object.keys(itemdata)
623
+ for (const itm of keys) {
624
+ const value = itemdata[itm]
625
+ result += itm + ':' + value
626
+ }
627
+ }
628
+ }
629
+ return result
630
+ },
631
+ getEmp() {
632
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
633
+ let http = new HttpResetClass()
634
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
635
+ let str=''
636
+ res.data.forEach((item,idx,arr) => {
637
+ //tag
638
+ if(idx+1==arr.length){
639
+ str += item.id
640
+ }else{
641
+ str += item.id+','
642
+ }
643
+
644
+ })
645
+ let http1 = new HttpResetClass()
646
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
647
+ data: {
648
+ items: 'id,f_user_telephone',
649
+ tablename: 't_user',
650
+ condition: `id in (${str})`,
651
+ orderitem: 'id'
652
+ }
653
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
654
+
655
+ res.data.forEach((user)=>{
656
+ try {
657
+ ress.data.forEach((tel,tidx,arr)=>{
658
+ //tag
659
+ if(user.id==tel.id){
660
+ this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
661
+ ress.data.splice(tidx,1)
662
+ //tag
663
+ throw new Error("跳出循环");
664
+ }
665
+ })
666
+ }catch (e) {
667
+ //tag
668
+ }
669
+ })
670
+ })
671
+
672
+ })
673
+ },
674
+ toRepair(){
675
+ //tag
676
+ this.showModal2=true
677
+ },
678
+ async rectification(){
679
+ this.isbusy =true
680
+ // if (this.checkAll){
681
+ let data={
682
+ f_filialeids: this.model.params.f_filialeids,
683
+ f_defect_content: this.model.params.f_defect_content,
684
+ condition:this.model.params.condition
685
+ }
686
+ let res1= await new HttpResetClass().load('post','rs/sql/GetCheckPaperByDefectNew2',{data: data })
687
+ for (let i = 0; i < res1.data.length; i++) {
688
+ let data1={
689
+ f_paper_id: res1.data[i].id,
690
+ condition:`f_repaire_type != '无隐患'`
691
+ }
692
+ let res2 = await new HttpResetClass().load('POST' , 'rs/sql/GetDefectByPaperIdNew2' , {data: data1 } )
693
+ //tag
694
+ const uploadData = {
695
+ model: {
696
+ serviceacitivity: [{
697
+ f_service_acitivity_type: '派单'
698
+ }],
699
+ f_repairitems: {},
700
+ failure: '',
701
+ f_source: '安检',
702
+ f_service_id: '',
703
+ f_contact_phone: '',
704
+ f_meetunit: '',
705
+ f_phone: '',
706
+ f_user_name: '',
707
+ f_address: '',
708
+ f_repair_date: '',
709
+ f_reciever: '',
710
+ f_remarks: '',
711
+ f_user_type: '',
712
+ f_area: '',
713
+ f_unit_name: '',
714
+ f_street: '',
715
+ f_residential_area: '',
716
+ f_building: '',
717
+ f_unit: '',
718
+ f_floor: '',
719
+ f_room: '',
720
+ aState: '',
721
+ f_repairtype: '',
722
+ f_userinfo_id: '',
723
+ f_userinfo_code: '',
724
+ f_orgstr: '',
725
+ f_outlets: '',
726
+ f_attendant: this.$login.f.name
727
+ },
728
+ loginUser: {
729
+ name: this.$login.f.name,
730
+ ename: this.$login.f.ename
731
+ },
732
+ user: {
733
+ f_userinfo_id: ''
734
+ },
735
+ callObj: null
736
+ }
737
+
738
+ uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
739
+ // uploadData.model.f_meetunit = self.$login.f.orgpathnames
740
+ // uploadData.model.f_orgstr = self.$login.f.orgpathstr
741
+ // uploadData.model.f_outlets = self.$login.f.f_parentname
742
+ uploadData.model.f_meetunit = this.$login.f.deps
743
+ uploadData.model.f_orgid = this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
744
+ uploadData.model.f_filiale = this.$login.f.org
745
+ uploadData.model.f_outlets = this.$login.f.deps
746
+ uploadData.model.f_filiale_id = this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
747
+ uploadData.toRepair = '一级派单'
748
+ let res3 = await new HttpResetClass().load('post','/rs/sql/GetUserForRepaireNew2', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
749
+ uploadData.model = Object.assign(uploadData.model, res3.data[0])
750
+ uploadData.user.f_userinfo_id = res3.data[0].f_userinfo_id
751
+ uploadData.model.f_repair_date = Util.getNowDate()
752
+ uploadData.model.f_repairtype = res3.data[0].f_repairtype
753
+ uploadData.model.f_remarks = res3.data[0].f_remarks
754
+ let failure = []
755
+ res2.data.forEach(row => {
756
+ if (row.f_repaire_type == '隐患未处理') {
757
+ console.log('row.f_item_value',row.f_item_value)
758
+ failure.push({
759
+ f_failure_type: row.f_item_name,
760
+ failurecase: row.f_item_value?row.f_item_value.split(','):''
761
+ })
762
+ }
763
+ })
764
+ uploadData.model.failure = failure
765
+ // 拼接repairitems
766
+ let rows = JSON.parse(JSON.stringify(res2.data))
767
+ let repairitems = {
768
+ data: []
769
+ }
770
+ let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
771
+ // 取隐患未处理的
772
+ rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
773
+ //tag)
774
+ // 开始拼接
775
+ rows.forEach(row => {
776
+ let existIndex = -1
777
+ // 判断该设备是否已经存在
778
+ for (let i = 0; i < repairitems.data.length; i++) {
779
+ if (repairitems.data[i].f_type == row.f_device_type) {
780
+ existIndex = i
781
+ break
782
+ }
783
+ }
784
+ if (existIndex == -1) {
785
+ // 不存在则新建
786
+ let newItem = {
787
+ f_type: row.f_device_type,
788
+ details: [{
789
+ f_defect_id: row.id,
790
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
791
+ type: 'selector',
792
+ options: safecheckOptions
793
+ }]
794
+ }
795
+ repairitems.data.push(newItem)
796
+ } else {
797
+ // 存在则追加
798
+ repairitems.data[existIndex].details.push({
799
+ f_defect_id: row.id,
800
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
801
+ type: 'selector',
802
+ options: safecheckOptions
803
+ })
804
+ }
805
+ })
806
+ uploadData.model.f_repairitems = repairitems
807
+ uploadData.rows=rows
808
+ //tag)
809
+ //tag
810
+ if (uploadData.model.f_repairitems.data.length>0){
811
+ this.callSends.push(uploadData)
812
+ }else{
813
+ //tag
814
+ }
815
+ }
816
+ //tag)
817
+ let timer = setInterval(async ()=>{
818
+ this.showModal3=true
819
+ this.isbusy=false
820
+ if (this.timercount<this.callSends.length){
821
+ //tag)
822
+ let rows=this.callSends[this.timercount].rows
823
+ //tag)
824
+ let result = await this.$resetpost('/rs/logic/callerSend', this.callSends[this.timercount])
825
+ //tag)
826
+ if (result.data.f_service_id) {
827
+ const data = {
828
+ f_paper_id: rows[0].f_paper_id,
829
+ f_service_id: result.data.f_service_id,
830
+ itemsId: this.$login.convertToIn(rows.map(row => row.id))
831
+ }
832
+ //tag
833
+ let updateRes = await this.$resetpost('/rs/logic/updateDefectStateNew', data)
834
+ }
835
+ this.toRepairCount++
836
+ //tag
837
+ this.timercount++
838
+ }else{
839
+ clearInterval(timer)
840
+ //tag
841
+ this.callSends=[]
842
+ this.timercount=0
843
+ this.showModal3=false
844
+ this.cancel1()
845
+ this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
846
+ this.toRepairCount=0
847
+ }
848
+ }, 3000)
849
+ },
850
+ cancel1(){
851
+ this.showModal2=false
852
+ this.selectData={
853
+ dispatchType:'',
854
+ f_repairman:'',
855
+ f_remarks:'',
856
+ f_repairtype:''
857
+ }
858
+ },
859
+ sleep(d){
860
+ //tag)
861
+ var t = Date.now()
862
+ while(Date.now - t <= d){
863
+
864
+ }
865
+ //tag)
866
+ },
867
+ isChecked(v) {
868
+ // 如果全选,不在的按选中算,否则,在的按选中算
869
+ if (this.checkAll) {
870
+ return this.checkes.indexOf(v) == -1
871
+ } else {
872
+ return this.checkes.indexOf(v) != -1
873
+ }
874
+ },
875
+ setCheckAll() {
876
+ this.checkAll=this.checkAll?false:true;
877
+ // 全选改变后,清空选中数据
878
+ this.checkes = []
879
+ },
880
+ setCheckes(id) {
881
+ let index=this.checkes.indexOf(id)
882
+ if(index<0){
883
+ this.checkes.push(id)
884
+ }else{
885
+ this.checkes.splice(index,1)
886
+ }
887
+ },
888
+
889
+ getmeterbook(val){
890
+ this.cbc=[]
891
+ this.cbc.push({
892
+ label:'全部',
893
+ value:''
894
+ })
895
+ if (val==''){
896
+
897
+ this.cbcs.forEach(res=>{
898
+ this.cbc.push({
899
+ label:res.f_book_name,
900
+ value:res.id
901
+ })
902
+ })
903
+ }else{
904
+ this.cbcs.forEach(res=>{
905
+ if (res.f_book_slice_area==val){
906
+ this.cbc.push({
907
+ label:res.f_book_name,
908
+ value:res.id
909
+ })
910
+ }
911
+ })
912
+ }
913
+ },
914
+
915
+ Mreadibook(val){
916
+ //tag
917
+ //tag
918
+ this.sliceArea=[]
919
+ if (val){
920
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
921
+ items: 'name',
922
+ tablename: 't_zone',
923
+ condition: `parentid in ${val}`,
924
+ orderitem: 'id'
925
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
926
+ this.sliceArea.push({
927
+ label:'全部',
928
+ value:''
929
+ })
930
+ res.data.forEach(ress=>{
931
+ this.sliceArea.push({
932
+ label:ress.name,
933
+ value:ress.name
934
+ })
935
+ })
936
+
937
+ })
938
+ }
939
+ },
940
+ getAllMeterBook(val){
941
+ //tag
942
+ //tag
943
+ this.cbcs=[]
944
+ if (val){
945
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
946
+ items: 'f_book_name,f_book_slice_area,id',
947
+ tablename: 't_meter_book',
948
+ condition: `f_filiale_id in ${val}`,
949
+ orderitem: 'id'
950
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
951
+ res.data.forEach(ress=>{
952
+ this.cbcs.push({
953
+ id:ress.id,
954
+ f_book_name:ress.f_book_name,
955
+ f_book_slice_area:ress.f_book_slice_area
956
+ })
957
+ })
958
+ this.cbc=[]
959
+ this.cbc.push({
960
+ label:'全部',
961
+ value:''
962
+ })
963
+ this.cbcs.forEach(res=>{
964
+ this.cbc.push({
965
+ label:res.f_book_name,
966
+ value:res.id
967
+ })
968
+ })
969
+ })
970
+ }
971
+ },
972
+ hiddenr() {
973
+ this.$parent.showItem = !this.$parent.showItem
974
+ },
975
+ hidden() {
976
+ this.criteriaShow = !this.criteriaShow
977
+ },
978
+ search(args) {
979
+ //tag
980
+ if (this.f_check_plan.f_plan_name) {
981
+ args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
982
+ }
983
+ this.checkes = []
984
+ this.checkAll=false
985
+ this.model.search(args.condition, args.model)
986
+ },
987
+ getRes(obj) {
988
+ //tag
989
+ this.resids = {res:obj.res[0], resids:obj.resids[0]}
990
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
991
+ this.Mreadibook(this.model.f_filialeids)
992
+ this.getAllMeterBook(this.model.f_filialeids)
993
+ },
994
+ showChooser() {
995
+ this.showModal = true
996
+ },
997
+ ok() {
998
+ this.showModal = false
999
+ if (this.$refs.modal.$children[0].selectedRow.id) {
1000
+ this.f_check_plan = this.$refs.modal.$children[0].selectedRow
1001
+ }
1002
+ },
1003
+ cancel() {
1004
+ this.showModal = false
1005
+ this.f_check_plan = {f_plan_name: '', id: ''}
1006
+ }
1007
+ },
1008
+ ready() {
1009
+ //tag
1010
+ this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
1011
+ this.getEmp()
1012
+ let gen = select(this)
1013
+ // this.Mreadibook(`('${this.$login.f.orgid}')`)
1014
+ co(gen)
1015
+ },
1016
+ watch:{
1017
+ 'timercount'(){
1018
+ if (this.timercount===0){
1019
+ this.progressbarWidth = '0'
1020
+ }else {
1021
+ //tag
1022
+ //tag
1023
+ this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
1024
+ }
1025
+
1026
+ }
1027
+ },
1028
+ computed: {
1029
+ selected() {
1030
+ return this.$refs.paged.$refs.grid.selected
1031
+ },
1032
+ getfield () {
1033
+ //tag
1034
+ let data = {}
1035
+ this.bodyData.forEach((value, index) => {
1036
+ data[this.bodyData[index]] = this.headData[index]
1037
+ })
1038
+ //合计字段打印
1039
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
1040
+ if (this.sumsmodel) {
1041
+ Object.keys(this.sumsmodel).forEach((key) => {
1042
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
1043
+ })
1044
+ } else {
1045
+ this.tfoot += '暂无'
1046
+ }
1047
+ this.tfoot += '</th></tr>'
1048
+ return data
1049
+ }
1050
+ }
1051
+ }
1052
+ </script>