safecheck-client 3.0.39-80 → 3.0.39-81

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 (281) 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/GetParams.md +11 -11
  15. package/docs/HttpBusy.md +13 -13
  16. package/docs/HttpStore.md +29 -29
  17. package/docs/MessageBox.md +28 -28
  18. package/docs/PagedList.md +29 -29
  19. package/docs/Pager.md +21 -21
  20. package/docs/Project.md +23 -23
  21. package/docs/Route.md +105 -105
  22. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  23. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  24. package/docs/Task.md +46 -46
  25. package/docs/TreeList.md +28 -28
  26. package/docs/TreeMixin.md +18 -18
  27. package/docs/all.md +10 -10
  28. package/docs/list.md +42 -42
  29. package/docs/partial.md +75 -75
  30. package/docs/selector.md +82 -82
  31. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  32. 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
  33. 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
  34. 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
  35. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  36. package/examples/AddressList/App.vue +13 -13
  37. package/examples/AddressList/index.html +11 -11
  38. package/examples/DispatchList/App.vue +10 -10
  39. package/examples/DispatchList/BaseTree.vue +13 -13
  40. package/examples/DispatchList/Init.vue +22 -22
  41. package/examples/DispatchList/Test.vue +20 -20
  42. package/examples/DispatchList/index.html +11 -11
  43. package/examples/DispatchList/main.js +18 -18
  44. package/home.html +16 -16
  45. package/package.json +1 -1
  46. package/publish.bat +7 -7
  47. package/release.bat +5 -5
  48. package/src/App.vue +31 -26
  49. package/src/Widget.vue +13 -13
  50. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  51. package/src/android-bootstrap/less/.csscomb.json +304 -304
  52. package/src/android-bootstrap/less/.csslintrc +19 -19
  53. package/src/android-bootstrap/less/alerts.less +73 -73
  54. package/src/android-bootstrap/less/badges.less +66 -66
  55. package/src/android-bootstrap/less/bootstrap.less +56 -56
  56. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  57. package/src/android-bootstrap/less/button-groups.less +247 -247
  58. package/src/android-bootstrap/less/buttons.less +173 -173
  59. package/src/android-bootstrap/less/carousel.less +269 -269
  60. package/src/android-bootstrap/less/close.less +34 -34
  61. package/src/android-bootstrap/less/code.less +69 -69
  62. package/src/android-bootstrap/less/component-animations.less +33 -33
  63. package/src/android-bootstrap/less/grid.less +84 -84
  64. package/src/android-bootstrap/less/input-groups.less +167 -167
  65. package/src/android-bootstrap/less/jumbotron.less +52 -52
  66. package/src/android-bootstrap/less/labels.less +64 -64
  67. package/src/android-bootstrap/less/list-group.less +141 -141
  68. package/src/android-bootstrap/less/media.less +66 -66
  69. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  70. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  71. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  72. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  73. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  74. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  75. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  76. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  77. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  78. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  79. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  80. package/src/android-bootstrap/less/mixins/image.less +33 -33
  81. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  82. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  83. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  84. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  85. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  86. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  87. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  88. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  89. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  90. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  91. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  92. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  93. package/src/android-bootstrap/less/mixins/size.less +10 -10
  94. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  95. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  96. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  97. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  98. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  99. package/src/android-bootstrap/less/mixins.less +40 -40
  100. package/src/android-bootstrap/less/modals.less +151 -151
  101. package/src/android-bootstrap/less/navbar.less +660 -660
  102. package/src/android-bootstrap/less/navs.less +290 -290
  103. package/src/android-bootstrap/less/normalize.less +424 -424
  104. package/src/android-bootstrap/less/pager.less +76 -76
  105. package/src/android-bootstrap/less/pagination.less +89 -89
  106. package/src/android-bootstrap/less/panels.less +274 -274
  107. package/src/android-bootstrap/less/popovers.less +131 -131
  108. package/src/android-bootstrap/less/print.less +101 -101
  109. package/src/android-bootstrap/less/progress-bars.less +87 -87
  110. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  111. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  112. package/src/android-bootstrap/less/scaffolding.less +161 -161
  113. package/src/android-bootstrap/less/tables.less +262 -262
  114. package/src/android-bootstrap/less/theme.less +291 -291
  115. package/src/android-bootstrap/less/thumbnails.less +36 -36
  116. package/src/android-bootstrap/less/tooltip.less +102 -102
  117. package/src/android-bootstrap/less/type.less +303 -303
  118. package/src/android-bootstrap/less/utilities.less +55 -55
  119. package/src/android-bootstrap/less/variables.less +896 -896
  120. package/src/android-bootstrap/less/wells.less +29 -29
  121. package/src/bootstrap/less/.csscomb.json +304 -304
  122. package/src/bootstrap/less/.csslintrc +19 -19
  123. package/src/bootstrap/less/alerts.less +73 -73
  124. package/src/bootstrap/less/badges.less +66 -66
  125. package/src/bootstrap/less/breadcrumbs.less +26 -26
  126. package/src/bootstrap/less/button-groups.less +247 -247
  127. package/src/bootstrap/less/buttons.less +172 -172
  128. package/src/bootstrap/less/carousel.less +269 -269
  129. package/src/bootstrap/less/close.less +34 -34
  130. package/src/bootstrap/less/code.less +69 -69
  131. package/src/bootstrap/less/component-animations.less +33 -33
  132. package/src/bootstrap/less/dropdowns.less +216 -216
  133. package/src/bootstrap/less/grid.less +84 -84
  134. package/src/bootstrap/less/input-groups.less +167 -167
  135. package/src/bootstrap/less/jumbotron.less +52 -52
  136. package/src/bootstrap/less/labels.less +64 -64
  137. package/src/bootstrap/less/list-group.less +141 -141
  138. package/src/bootstrap/less/media.less +66 -66
  139. package/src/bootstrap/less/mixins/alerts.less +14 -14
  140. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  141. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  142. package/src/bootstrap/less/mixins/buttons.less +69 -69
  143. package/src/bootstrap/less/mixins/center-block.less +7 -7
  144. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  145. package/src/bootstrap/less/mixins/forms.less +90 -90
  146. package/src/bootstrap/less/mixins/gradients.less +59 -59
  147. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  148. package/src/bootstrap/less/mixins/grid.less +122 -122
  149. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  150. package/src/bootstrap/less/mixins/image.less +33 -33
  151. package/src/bootstrap/less/mixins/labels.less +12 -12
  152. package/src/bootstrap/less/mixins/list-group.less +30 -30
  153. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  154. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  155. package/src/bootstrap/less/mixins/opacity.less +8 -8
  156. package/src/bootstrap/less/mixins/pagination.less +24 -24
  157. package/src/bootstrap/less/mixins/panels.less +24 -24
  158. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  159. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  160. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  161. package/src/bootstrap/less/mixins/resize.less +6 -6
  162. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  163. package/src/bootstrap/less/mixins/size.less +10 -10
  164. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  165. package/src/bootstrap/less/mixins/table-row.less +44 -44
  166. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  167. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  168. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  169. package/src/bootstrap/less/mixins.less +40 -40
  170. package/src/bootstrap/less/modals.less +151 -151
  171. package/src/bootstrap/less/navbar.less +660 -660
  172. package/src/bootstrap/less/normalize.less +424 -424
  173. package/src/bootstrap/less/pagination.less +89 -89
  174. package/src/bootstrap/less/panels.less +275 -275
  175. package/src/bootstrap/less/popovers.less +131 -131
  176. package/src/bootstrap/less/print.less +101 -101
  177. package/src/bootstrap/less/progress-bars.less +87 -87
  178. package/src/bootstrap/less/responsive-embed.less +35 -35
  179. package/src/bootstrap/less/responsive-utilities.less +194 -194
  180. package/src/bootstrap/less/scaffolding.less +161 -161
  181. package/src/bootstrap/less/theme.less +291 -291
  182. package/src/bootstrap/less/thumbnails.less +36 -36
  183. package/src/bootstrap/less/tooltip.less +102 -102
  184. package/src/bootstrap/less/type.less +303 -303
  185. package/src/bootstrap/less/utilities.less +55 -55
  186. package/src/bootstrap/less/wells.less +29 -29
  187. package/src/components/FileUpload.vue +696 -696
  188. package/src/components/Hello.vue +39 -39
  189. package/src/components/LeftTree.vue +27 -27
  190. package/src/components/android/AttendanceTally.vue +116 -116
  191. package/src/components/android/Blank.vue +10 -10
  192. package/src/components/android/CheckUnplanPage.vue +56 -56
  193. package/src/components/android/Checker.vue +12 -12
  194. package/src/components/android/CheckerAnnual.vue +81 -81
  195. package/src/components/android/CheckerAvarta.vue +82 -82
  196. package/src/components/android/EquipmentInspection.vue +348 -348
  197. package/src/components/android/FootprintMap.vue +120 -120
  198. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  199. package/src/components/android/MasterMain.vue +77 -77
  200. package/src/components/android/Menu.vue +132 -132
  201. package/src/components/android/PaperAlarm.vue +85 -85
  202. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  203. package/src/components/android/PlumberAnnual.vue +83 -83
  204. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  205. package/src/components/android/PlumberMonthly.vue +84 -84
  206. package/src/components/android/PostMap.vue +83 -83
  207. package/src/components/android/QueryCheckHistory.vue +122 -122
  208. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  209. package/src/components/android/RepairMain.vue +60 -60
  210. package/src/components/android/Repairman.vue +12 -12
  211. package/src/components/android/StationMaster.vue +12 -12
  212. package/src/components/android/rejectInspecCheck.vue +322 -322
  213. package/src/components/defects/DefectModal.vue +101 -101
  214. package/src/components/defects/DevicesAndItem.vue +39 -39
  215. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  216. package/src/components/notice/NoticeForm.vue +100 -100
  217. package/src/components/notice/NoticeIssue.vue +20 -20
  218. package/src/components/paper/PicViewer.vue +18 -18
  219. package/src/components/pc/NewCheckpaperTemp.vue +1308 -1295
  220. package/src/components/pc/RoleSelector.vue +172 -172
  221. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  222. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  223. package/src/components/phonestate/PostMap.vue +82 -82
  224. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  225. package/src/components/rongcheng/AddPlanItem.vue +344 -344
  226. package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
  227. package/src/components/rongcheng/PaperDefectMain.vue +828 -828
  228. package/src/components/userfile/MeterFile.vue +145 -145
  229. package/src/components/userfile/MeterModify.vue +46 -46
  230. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  231. package/src/filiale/BFshiye/android/AndroidDefectDeal.vue +652 -652
  232. package/src/filiale/BFshiye/android/SafecheckUserInfo.vue +861 -861
  233. package/src/filiale/BFshiye/pc/DefectListNew.vue +637 -637
  234. package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
  235. package/src/filiale/BFshiye/pc.js +17 -17
  236. package/src/filiale/baiyin/android/SafecheckUserInfo.vue +775 -775
  237. package/src/filiale/baiyin/android.js +12 -12
  238. package/src/filiale/dexin/android/SafecheckDevicesTemp.vue +1419 -1360
  239. package/src/filiale/dexin/pc/PaperList.vue +840 -840
  240. package/src/filiale/jiaocheng/android/AddPlanItem.vue +20 -0
  241. package/src/filiale/jiaocheng/android/CurrentCreate.vue +1083 -0
  242. package/src/filiale/jiaocheng/android.js +1 -0
  243. package/src/filiale/jiaocheng/pc/CheckSearchUser.vue +18 -1
  244. package/src/filiale/jiaocheng/pc/PaperList.vue +803 -0
  245. package/src/filiale/jiaocheng/pc.js +1 -0
  246. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1357 -1357
  247. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -823
  248. package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
  249. package/src/filiale/rongchuang/android/PhoneUpUserinfo.vue +1262 -1262
  250. package/src/filiale/rongchuang/pc/checkPlanList.vue +398 -398
  251. package/src/filiale/rongchuang/pc.js +18 -18
  252. package/src/filiale/siyang/android/PhoneInsurancePurchaseDetail.vue +532 -532
  253. package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
  254. package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
  255. package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
  256. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
  257. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
  258. package/src/filiale/yangchunboneng/android.js +21 -21
  259. package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
  260. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
  261. package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
  262. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
  263. package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
  264. package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
  265. package/src/filiale/yangchunboneng/pc.js +29 -29
  266. package/src/main.js +33 -33
  267. package/src/plugins/LoadData.js +10 -10
  268. package/src/plugins/LoadParams.js +24 -24
  269. package/src/rongcheng.js +319 -319
  270. package/src/safecheck-android.js +316 -316
  271. package/src/stores/wxconfig.js +10 -10
  272. package/src/utils/getNowDate.js +33 -33
  273. package/test/e2e/custom-assertions/elementCount.js +26 -26
  274. package/test/e2e/nightwatch.conf.js +40 -40
  275. package/test/e2e/runner.js +30 -30
  276. package/test/e2e/specs/test.js +13 -13
  277. package/test/unit/.eslintrc +5 -5
  278. package/test/unit/TestUtil.js +62 -62
  279. package/test/unit/context.html +20 -20
  280. package/test/unit/index.js +13 -13
  281. package/yarn-error.log +0 -140
@@ -1,828 +1,828 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged @sort="sort">
5
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}">
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="form-group col-sm-2" >
15
- <label class="font_normal_body">客户编号</label>
16
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
17
- style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
18
- </div>
19
- <div class="form-group col-sm-2" >
20
- <label class="font_normal_body">客户名称</label>
21
- <input type="text" class="input_search" v-model="model.f_user_name"
22
- style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
23
- </div>
24
- <div class="form-group col-sm-2" >
25
- <label class="font_normal_body">用户类型</label>
26
- <v-select :value.sync="model.f_user_type"
27
- v-model="model.f_user_type"
28
- style="width: 60%"
29
- class="select_list select"
30
- :options='$parent.$parent.user_types'
31
- placeholder='用户类型'
32
- :multiple="true"
33
- condition="f_user_type in {}"></v-select>
34
- </div>
35
- <div class="form-group col-sm-4" style="display: flex; gap: 15px">
36
- <export-excel-safe
37
- :data="$parent.$parent.searchData"
38
- :field="$parent.$parent.excelHeaders"
39
- progress="safeGetExportProgress"
40
- sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细'></export-excel-safe>
41
- <button class="button_search" @click="search()">查询</button>
42
- <div class="button_spacing"
43
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
44
- @click="$parent.$parent.hidden()"></div>
45
- </div>
46
- </div>
47
- <div class="row">
48
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
49
- <label class="font_normal_body">用户地址</label>
50
- <input type="text" class="input_search" v-model="model.f_address" id="f_address" style="width:60%;"
51
- placeholder="用户地址" condition="f_address like '%{}%'">
52
- </div>
53
- <div :class="{'col-sm-6':$parent.$parent.$parent.showItem,'col-sm-4':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
54
- <role-selector-safe
55
- :left-width="'60%'"
56
- :right-width="'60%'"
57
- role-name="安检员"
58
- role-lable="安&nbsp;检&nbsp;员"
59
- @re-res="$parent.$parent.getRes"
60
- :value.sync="model.f_checker_id"
61
- v-model="model.f_checker_id"
62
- condition="f_checker_name = '{}'">
63
- </role-selector-safe>
64
- </div>
65
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
66
- <label class="font_normal_body">起始时间</label>
67
- <datepicker
68
- placeholder='起始时间' style="width:60%"
69
- :disabled-days-of-week="[]"
70
- :format="'yyyy-MM-dd'"
71
- :show-rest-button="reset"
72
- :value.sync="model.f_start_time"
73
- v-model="model.f_start_time"
74
- condition="f_offsite_time >= '{} 00:00:00'">
75
- </datepicker>
76
- </div>
77
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
78
- <label class="font_normal_body">结束时间</label>
79
- <datepicker
80
- placeholder='结束时间' style="width:60%"
81
- :disabled-days-of-week="[]"
82
- :format="'yyyy-MM-dd'"
83
- :show-rest-button="reset"
84
- :value.sync="model.f_end_time"
85
- v-model="model.f_end_time"
86
- condition="f_offsite_time <= '{} 23:59:59'">
87
- </datepicker>
88
- </div >
89
-
90
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
91
- <label class="font_normal_body">隐患等级</label>
92
- <v-select :value.sync="model.f_device_type"
93
- v-model='model.f_device_type'
94
- style="width: 60%"
95
- class="select_list select"
96
- :options='$parent.$parent.Defectlevel'
97
- @change="$parent.$parent.changeDefectLevel"
98
- placeholder='隐患等级'
99
- :multiple="true"
100
- condition="f_device_type in {}"></v-select>
101
- </div>
102
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
103
- <label class="font_normal_body">隐患内容</label>
104
- <v-select style="width:60% "
105
- class="select select_list"
106
- :value.sync="model.f_item_name"
107
- v-model="model.f_item_name"
108
- :options='$parent.$parent.getdefectType'
109
- placeholder='隐患内容'
110
- condition="f_item_name in {}"
111
- :multiple="true">
112
- </v-select>
113
- </div>
114
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
115
- <label class="font_normal_body">处理方式</label>
116
- <v-select :value.sync="model.f_is_repaired"
117
- v-model='model.f_is_repaired'
118
- style="width: 60%"
119
- class="select_list select"
120
- :options='$parent.$parent.Defectrepaired'
121
- placeholder='处理方式'
122
- :multiple="true"
123
- condition="f_is_repaired in {}"></v-select>
124
- </div>
125
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
126
- <label class="font_normal_body">所属区域</label>
127
- <v-select style="width:60% "
128
- class="select select_list"
129
- :value.sync="model.f_street"
130
- v-model="model.f_street"
131
- :options='$parent.$parent.streets'
132
- placeholder='所属区域'
133
- condition="f_street = '{}'"
134
- close-on-select>
135
- </v-select>
136
- </div>
137
- <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
138
- <label class="font_normal_body">小&ensp;区&ensp;域</label>
139
- <input type="text" class="input_search" v-model="model.f_small_area" id="f_small_area " style="width:60%;"
140
- placeholder="小区域 " condition="f_small_area like '%{}%'">
141
- </div>
142
-
143
- </div>
144
- </div>
145
- </criteria>
146
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
147
- <template partial='head'>
148
- <tr>
149
- <th>
150
- <nobr>用编号</nobr>
151
- </th>
152
- <th>
153
- <nobr>用户姓名</nobr>
154
- </th>
155
- <th>
156
- <nobr>用户地址</nobr>
157
- </th>
158
- <th>
159
- <nobr>隐患等级</nobr>
160
- </th>
161
- <th>
162
- <nobr>隐患内容</nobr>
163
- </th>
164
- <th>
165
- <nobr>安检人员</nobr>
166
- </th>
167
- <th>
168
- <nobr>安检时间</nobr>
169
- </th>
170
- <th>
171
- <nobr>处理方式</nobr>
172
- </th>
173
- <th>
174
- <nobr>维修员</nobr>
175
- </th>
176
- <th>
177
- <nobr>维修时间</nobr>
178
- </th>
179
- </tr>
180
- </template>
181
- <template partial='body'>
182
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
183
- <td style="text-align: center">{{row.f_user_name}}</td>
184
- <td style="text-align: center">{{row.f_address}}</td>
185
- <td style="text-align: center">{{row.f_device_type}}</td>
186
- <td style="text-align: center">{{row.f_item_name}}</td>
187
- <td style="text-align: center">{{row.f_checker_name}}</td>
188
- <td style="text-align: center">{{row.f_offsite_time}}</td>
189
- <td style="text-align: center">{{row.f_is_repaired}}</td>
190
- <td style="text-align: center">{{row.f_repairman}}</td>
191
- <td style="text-align: center">{{row.f_repair_date}}</td>
192
- </template>
193
- </data-grid>
194
- </criteria-paged>
195
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
196
- <modal :show.sync="showModal" v-ref:modal>
197
- <div slot="modal-header" class="modal-header">
198
- <h4 class="modal-title">
199
- 选择计划
200
- </h4>
201
- </div>
202
- <div slot="modal-body" class="modal-body">
203
- <plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
204
- </div>
205
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
206
- <button class="button_search" @click="ok">确认</button>
207
- <button class="button_search" @click="cancel">取消</button>
208
- </div>
209
- </modal>
210
- <modal :show.sync="showModal2" :backdrop="false">
211
- <div slot="modal-header" class="modal-header">
212
- <h4 class="modal-title">
213
- 转维修
214
- </h4>
215
- </div>
216
- <div slot="modal-body" class="modal-body">
217
- <div v-if="true">
218
- <div>
219
-
220
- </div>
221
- <div class="row" style="margin-top: 10px">
222
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
223
- <div class="col-xs-8 col-md-8">
224
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
225
- :options='dispatchTypeOptions' placeholder='派发类型'
226
- close-on-select>
227
- </v-select>
228
- </div>
229
- </div>
230
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
231
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
232
- <div class="col-xs-8 col-md-8">
233
- <v-select
234
- :value.sync="selectData.f_repairman"
235
- :value-single="true"
236
- :options='repairers'
237
- placeholder='请选择维修员'
238
- close-on-select></v-select>
239
- </div>
240
- </div>
241
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
242
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
243
- <div class="col-xs-8 col-md-8">
244
- <right-tree
245
- islist
246
- :userid="userid"
247
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
248
- @re-res="getSiteRes"></right-tree>
249
- </div>
250
- </div>
251
- <div class="row" style="margin-top: 10px">
252
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
253
- <div class="col-xs-8 col-md-8">
254
- <v-select :value.sync="selectData.f_repairtype" style="width:60%"
255
- class="select select_list"
256
- :value-single="true"
257
- :options='repairTypeOptions'
258
- close-on-select>
259
- </v-select>
260
- </div>
261
- </div>
262
- <div class="row" style="margin-top: 10px">
263
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
264
- <div class="col-xs-8 col-md-8">
265
- <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
266
- </div>
267
- </div>
268
- </div>
269
- </div>
270
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
271
- <button class="button_search" @click="rectification">转维修</button>
272
- <button class="button_search" @click="cancel1">取消</button>
273
- </div>
274
- </modal>
275
- <modal :show.sync="showModal3">
276
- <div slot="modal-header" class="modal-header">
277
- <h4 class="modal-title">
278
- 转维修进度{{ progressbarWidth }}%
279
- </h4>
280
- </div>
281
- <div slot="modal-body" class="modal-body">
282
- <div class="progress">
283
- <div class="progress-bar" role="progressbar" aria-valuenow="60"
284
- aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
285
- </div>
286
- </div>
287
- </div>
288
- <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
289
- </modal>
290
- </div>
291
- </div>
292
- </template>
293
-
294
- <script>
295
- import {PagedList} from 'vue-client'
296
- import Vue from 'vue'
297
- import co from 'co'
298
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
299
- //获取json配置文件
300
- let asyncReady = async function (self) {
301
- // 获取配置信息
302
- try {
303
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
304
- Vue.config = res.data
305
- self.getDefectInfoConfig(res.data)
306
- } catch (error) {
307
- // 忽略704,文件找不到异常R
308
- if (error.status !== 704) {
309
- throw error
310
- }
311
- }
312
- }
313
- let select = function* (self) {
314
- let http = new HttpResetClass()
315
- let getGasman = yield http.load('POST', '/rs/search', {
316
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
317
- userid: self.$login.f.id
318
- }, {resolveMsg: null, rejectMsg: null})
319
- ////tag
320
- self.checkersid.push({label: '全部', value: ''})
321
- getGasman.data.forEach((checker) => {
322
- self.checkersid.push({label: checker.name, value: checker.id})
323
- })
324
- }
325
-
326
- export default {
327
- title: '隐患明细查看',
328
- data() {
329
- let model = new PagedList('rs/sql/defectDetails', 20,{
330
- f_filialeid: 'this.f_filialeid'
331
- })
332
- model.f_plan_id = ''
333
- model.f_approved = ''
334
- model.f_entry = ''
335
- model.f_no_checkplan = ''
336
- model.f_check_type=''
337
- model.f_filialeid = `('${this.$login.f.orgid}')`
338
- return {
339
- audioshow:false,
340
- f_check_plan: {f_plan_name: '', id: ''},
341
- model: model,
342
- deal_dispose:[{label:'全部',value:''},{label:'报修',value:'报修'},{label:'现场整改',value:'现场整改'},{label:'自行处理',value:'自行处理'},{label:'未处理',value:'未处理'}],
343
- repairStateOptions: this.getSafeParam('隐患状态'),
344
- excelHeaders: {
345
- 'f_userinfo_code': '客户编号',
346
- 'f_user_name': '客户姓名',
347
- 'f_user_phone': '客户电话',
348
- 'f_user_type': '客户类型',
349
- 'f_address': '客户地址',
350
- 'f_offsite_time': '安检时间',
351
- 'f_checker_name': '安检员',
352
- 'f_device_type': '隐患等级',
353
- 'f_item_name': '隐患名称',
354
- 'f_is_repaired': '处理方式',
355
- 'f_repairman':'维修员',
356
- 'f_repair_date':'维修时间',
357
- 'f_street':'所属区域',
358
- 'f_small_area':'小区域',
359
- },
360
- fun: this.$login.f,
361
- checkersid: [],
362
- Defectrepaired: this.getSafeParam('隐患处理方式'),
363
- safetype: this.getSafeParam('安检类型'),
364
- Defectlevel:[{label:'全部',value:''},{label:'一级隐患',value:'一级隐患'},{label:'二级隐患',value:'二级隐患'},{label:'三级隐患',value:'三级隐患'},{label: '其他隐患',value:'其他隐患'}],
365
- user_types: this.getSafeParam('用户类型'),
366
- criteriaShow: false,
367
- showModal: false,
368
- f_approval_states: this.getSafeParam('安检单审核状态'),
369
- f_entry_status:this.getSafeParam('安检状态'),
370
- f_checkplans: this.getSafeParam('有无计划'),
371
- showcheckmsg: false,
372
- checkInfo: {},
373
- orderDefault: "'f_offsite_time'",
374
- orderFields: {
375
- f_offsite_time: 'no'
376
- },
377
- sliceArea: [],
378
- cbc:[],
379
- streets:[],
380
- DefectConfig:'' ,
381
- DefectConfigs:[{label:'全部',value:''},{label: '金额异常差值', value: '金额异常差值'},{label: '气量异常差值', value: '气量异常差值'}],
382
- device_types:[{label:'全部',value:''}],
383
- f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
384
- showModal2: false,
385
- selectData:{
386
- dispatchType:'',
387
- f_repairman:'',
388
- f_remarks:'',
389
- f_repairtype:''
390
- },
391
- repairers: [],
392
- getdefectType:[{label:'全部',value:''}],
393
- repairTypeOptions:this.$appdata.getParam('报修类型'),
394
- dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
395
- dangerGroups: [],
396
- showModal3: false,
397
- progressbarWidth:'0',
398
- canToRepair: this.$appdata.getSingleValue('隐患明细转维修'),
399
- checkes: []
400
- }
401
- },
402
- computed :{
403
- searchData() {
404
- return {condition: this.model.condition}
405
- }
406
- },
407
- methods: {
408
- async initstreets(){
409
- this.streetslist = []
410
- let HttpReset = new HttpResetClass()
411
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
412
- data: {
413
- items: '*',
414
- tablename: 't_street',
415
- orderitem: 'id',
416
- condition: `f_orgid = '${this.$login.f.orgid}'`
417
- }
418
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
419
- let redata = []
420
- req.data.forEach((row, n) => {
421
- redata[n] = {
422
- label: row.f_street,
423
- value: row.f_street,
424
- data:row,
425
- id:row.id
426
- }
427
- })
428
- this.streets=redata
429
- },
430
- changeDefectLevel() {
431
- if(this.$refs.paged.$refs.criteria.model.f_device_type && this.$refs.paged.$refs.criteria.model.f_device_type.length>0){
432
- // 初始化为空数组,准备追加数据
433
- this.getdefectType = [];
434
- // 循环追加每个设备类型的缺陷类型
435
- for (let i = 0; i < this.$refs.paged.$refs.criteria.model.f_device_type.length; i++) {
436
- const deviceType = this.$refs.paged.$refs.criteria.model.f_device_type[i];
437
- const defectTypes = this.$appdata.getParam(deviceType);
438
- if (defectTypes && defectTypes.length > 0) {
439
- // 追加当前设备类型的缺陷类型
440
- this.getdefectType = [...this.getdefectType, ...defectTypes];
441
- }
442
- }
443
- // 如果有数据,在开头添加"全部"选项
444
- if (this.getdefectType.length > 0) {
445
- this.getdefectType.unshift({label:'全部',value:''});
446
- } else {
447
- this.getdefectType = [{label:'全部',value:''}];
448
- }
449
- } else {
450
- this.getdefectType = [{label:'全部',value:''}];
451
- }
452
- },
453
- showChooser() {
454
- this.showModal = true
455
- },
456
- isChecked(row) {
457
- return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
458
- },
459
- setCheckes(row) {
460
- let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
461
- if(index<0){
462
- this.checkes.push(row)
463
- }else{
464
- this.checkes.splice(index,1)
465
- }
466
- console.log('this.checkes=', JSON.stringify(this.checkes))
467
- },
468
- toRepair(){
469
- console.log('this.checkes=', JSON.stringify(this.checkes))
470
- if(this.checkes.length==0){
471
- return this.$showMessage('请先选择需要转维修的隐患!')
472
- }
473
-
474
- const dangerGroups = []
475
- for (const danger of this.checkes) {
476
- let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
477
- if (i == -1){
478
- dangerGroups.push({
479
- f_userinfo_code: danger.f_userinfo_code,
480
- dangers: []
481
- })
482
- i = dangerGroups.length - 1
483
- }
484
- dangerGroups[i].dangers.push(danger)
485
- }
486
- this.dangerGroups = dangerGroups
487
- console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
488
- this.showModal2=true
489
- },
490
- getEmp() {
491
- 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}`}
492
- let http = new HttpResetClass()
493
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
494
- if (res.data.length == 0){
495
- this.repairers= []
496
- return
497
- }
498
- let str=``
499
- res.data.forEach((item,idx,arr) => {
500
- if(idx+1==arr.length){
501
- str += item.id
502
- }else{
503
- str += item.id+`','`
504
- }
505
- })
506
- let http1 = new HttpResetClass()
507
- http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
508
- data: {
509
- items: 'id,f_user_telephone',
510
- tablename: 't_user',
511
- condition: `id in ('${str}')`,
512
- orderitem: 'id'
513
- }
514
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
515
- res.data.forEach((user)=>{
516
- try {
517
- ress.data.forEach((tel,tidx,arr)=>{
518
- if(user.id==tel.id){
519
- this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
520
- ress.data.splice(tidx,1)
521
- }
522
- })
523
- }catch (e) {
524
- }
525
- })
526
- }).catch(error=>{
527
- res.data.forEach((user)=>{
528
- this.repairers.push({label: user.name, value: user.name})
529
- })
530
- })
531
-
532
- })
533
- },
534
- getSiteRes(obj) {
535
- console.log('siteRes ---> ')
536
- console.log(obj)
537
- if(obj.resids[0]){
538
- this.selectData.f_meetunit = obj.res.join('.')
539
- this.selectData.f_reciever = obj.resids.join('.')
540
- this.selectData.f_outlets = obj.res[obj.res.length - 1]
541
- }else {
542
- this.selectData.f_meetunit = ''
543
- this.selectData.f_reciever = ''
544
- this.selectData.f_outlets = ''
545
- }
546
- },
547
- cancel1(){
548
- this.showModal2=false
549
- this.selectData={
550
- dispatchType:'',
551
- f_repairman:'',
552
- f_remarks:'',
553
- f_repairtype:''
554
- }
555
- },
556
- async rectification(){
557
- if(this.selectData.dispatchType){
558
- if(this.selectData.dispatchType=='派发给站点'){
559
- if(!this.selectData.f_reciever){
560
- this.$showMessage('请选择部门!')
561
- return
562
- }
563
- }else{
564
- if(!this.selectData.f_repairman){
565
- this.$showMessage('请选择维修员!')
566
- return
567
- }
568
- }
569
- }else {
570
- this.$showMessage('请选择派发类型!')
571
- return
572
- }
573
-
574
- if(!this.selectData.f_repairtype){
575
- this.$showMessage('请选择报修类型!')
576
- return
577
- }
578
- this.showModal3=true
579
- let act={}
580
- let toRepair=''
581
- let successCount=0
582
- if(this.selectData.dispatchType=='派发给站点'){
583
- act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
584
- toRepair=null
585
- }else{
586
- console.log('派发给维修员---------'+this.selectData.f_repairman)
587
- act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
588
- toRepair='一级派单'
589
- }
590
- let rep={
591
- loginUser: {
592
- name: this.$login.f.name,
593
- ename: this.$login.f.ename
594
- },
595
- f_meetunit: this.$login.f.deps,
596
- f_attendant: this.$login.f.name,
597
- f_outlets: this.$login.f.deps,
598
- f_remarks: this.selectData.f_remarks,
599
- f_repairtype: this.selectData.f_repairtype,
600
- toRepair: toRepair,
601
- activity:act
602
- }
603
- for(let i=0; i<this.dangerGroups.length; i++){
604
- let defectIdStr = ''
605
- const defectIds = []
606
- for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
607
- defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
608
- }
609
- defectIdStr = `(${defectIds.join(',')})`
610
- const data = {
611
- id:this.dangerGroups[i].dangers[0].f_paper_id,
612
- repData:rep,
613
- source:'pc',
614
- defectIdStr: defectIdStr
615
- }
616
- console.log('data=', JSON.stringify(data))
617
- try {
618
- let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
619
- if (result.data.code==200) {
620
- successCount += result.data.successcon
621
- this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
622
- }
623
- }catch (e) {
624
- this.showModal3=false
625
- this.$showMessage('网络异常,请稍后再试!')
626
- return
627
- }
628
- }
629
- this.showModal3=false
630
- this.cancel1()
631
- this.$showMessage('本次转维修成功'+successCount+'单')
632
- },
633
- getDefectInfoConfig(val){
634
- try {
635
- if (val.safecheck.DevicesSetConfig != undefined) {
636
- this.DefectConfig = val.safecheck.DevicesConfig
637
- // 获取到配置项,进行遍历,获取每个隐患项
638
- for (var Key1 in this.DefectConfig){
639
- this.device_types.push({label:Key1,value:Key1})
640
- for(var Key2 in this.DefectConfig[Key1].items){
641
- this.DefectConfigs.push({label:Key2,value:Key2})
642
- }
643
- }
644
- // 非民用或其他配置项加入,在进行遍历
645
- }
646
- }catch (e) {
647
- //tag
648
- }
649
- },
650
- showaudio(){
651
- //tag
652
- this.audioshow=!this.audioshow
653
- //tag
654
- },
655
- getmeterbook(val){
656
- this.cbc=[]
657
- this.cbc.push({
658
- label:'全部',
659
- value:''
660
- })
661
- if (val==''){
662
-
663
- this.cbcs.forEach(res=>{
664
- this.cbc.push({
665
- label:res.f_book_name,
666
- value:res.id
667
- })
668
- })
669
- }else{
670
- this.cbcs.forEach(res=>{
671
- if (res.f_book_slice_area==val){
672
- this.cbc.push({
673
- label:res.f_book_name,
674
- value:res.id
675
- })
676
- }
677
- })
678
- }
679
- },
680
- getSafeParam(val){
681
- if(this.$appdata.getParam(val)){
682
- return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
683
- }else{
684
- return [{label: '全部', value: ''}]
685
- }
686
-
687
- },
688
- Mreadibook(val){
689
- ////tag
690
- ////tag
691
- this.sliceArea=[]
692
- if (val){
693
- new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
694
- items: 'name',
695
- tablename: 't_zone',
696
- condition: `parentid in ${val}`,
697
- orderitem: 'id'
698
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
699
- this.sliceArea.push({
700
- label:'全部',
701
- value:''
702
- })
703
- res.data.forEach(ress=>{
704
- this.sliceArea.push({
705
- label:ress.name,
706
- value:ress.name
707
- })
708
- })
709
-
710
- })
711
- }
712
- },
713
- getAllMeterBook(val){
714
- ////tag
715
- ////tag
716
- this.cbcs=[]
717
- if (val){
718
- new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
719
- items: 'f_book_name,f_book_slice_area,id',
720
- tablename: 't_meter_book',
721
- condition: `f_filiale_id in ${val}`,
722
- orderitem: 'id'
723
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
724
- res.data.forEach(ress=>{
725
- this.cbcs.push({
726
- id:ress.id,
727
- f_book_name:ress.f_book_name,
728
- f_book_slice_area:ress.f_book_slice_area
729
- })
730
- })
731
- this.cbc=[]
732
- this.cbc.push({
733
- label:'全部',
734
- value:''
735
- })
736
- this.cbcs.forEach(res=>{
737
- this.cbc.push({
738
- label:res.f_book_name,
739
- value:res.id
740
- })
741
- })
742
- })
743
- }
744
- },
745
- getRes(obj) {
746
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
747
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
748
- this.Mreadibook(this.model.f_filialeid)
749
- this.getAllMeterBook(this.model.f_filialeid)
750
- //this.$refs.paged.$refs.criteria.search()
751
- },
752
-
753
- change(row) {
754
- // Vue.$login = {jwt: row.f_checker_id}
755
- asyncReady(this).then(() => {
756
- ////tag)
757
- row.f_upload_state = '已传'
758
- this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
759
- }).catch(
760
- (respanse) => {
761
- alert('获取配置文件失败')
762
- })
763
- },
764
- readConfig() {
765
- let gen = asyncReady(this)
766
- return co(gen)
767
- },
768
- hidden() {
769
- this.criteriaShow = !this.criteriaShow
770
- },
771
- refresh() {
772
- this.$refs.paged.$refs.criteria.search()
773
- },
774
- ok() {
775
- this.showModal = false
776
- if (this.$refs.modal.$children[0].selectedRow.id) {
777
- this.f_check_plan = this.$refs.modal.$children[0].selectedRow
778
- }
779
- },
780
- cancel() {
781
- this.showModal = false
782
- this.f_check_plan = {f_plan_name: '', id: ''}
783
- },
784
- print(row) {
785
- this.showcheckmsg = true
786
- this.checkInfo = row
787
- },
788
-
789
- sort(field, rule) {
790
- // 将所有排序方式设为不排序,实现相互排斥
791
- for (let key in this.orderFields) {
792
- if (key === field) {
793
- this.orderFields[key] = rule
794
- } else {
795
- this.orderFields[key] = 'no'
796
- }
797
- }
798
- // 如果新规则不排序,还原为默认排序
799
- if (rule === 'no') {
800
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
801
- } else {
802
- this.model.paramSource.orderitem = `'${field} ${rule}'`
803
- }
804
- this.search()
805
- },
806
- search() {
807
- this.$refs.paged.$refs.criteria.search()
808
- },
809
- selfSearch(args) {
810
- if (this.f_check_plan.f_plan_name) {
811
- args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
812
- }
813
- args.condition += ` and f_filialeid in ${this.model.f_filialeid}`
814
- this.model.search(args.condition, args.model, args.condValue)
815
- }
816
- },
817
-
818
- ready() {
819
- this.initstreets()
820
- this.getEmp()
821
- this.readConfig()
822
- this.function = this.f
823
- let gen = select(this)
824
- this.Mreadibook(`('${this.$login.f.orgid}')`)
825
- co(gen)
826
- }
827
- }
828
- </script>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}">
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="form-group col-sm-2" >
15
+ <label class="font_normal_body">客户编号</label>
16
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
17
+ style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
18
+ </div>
19
+ <div class="form-group col-sm-2" >
20
+ <label class="font_normal_body">客户名称</label>
21
+ <input type="text" class="input_search" v-model="model.f_user_name"
22
+ style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
23
+ </div>
24
+ <div class="form-group col-sm-2" >
25
+ <label class="font_normal_body">用户类型</label>
26
+ <v-select :value.sync="model.f_user_type"
27
+ v-model="model.f_user_type"
28
+ style="width: 60%"
29
+ class="select_list select"
30
+ :options='$parent.$parent.user_types'
31
+ placeholder='用户类型'
32
+ :multiple="true"
33
+ condition="f_user_type in {}"></v-select>
34
+ </div>
35
+ <div class="form-group col-sm-4" style="display: flex; gap: 15px">
36
+ <export-excel-safe
37
+ :data="$parent.$parent.searchData"
38
+ :field="$parent.$parent.excelHeaders"
39
+ progress="safeGetExportProgress"
40
+ sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细'></export-excel-safe>
41
+ <button class="button_search" @click="search()">查询</button>
42
+ <div class="button_spacing"
43
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
44
+ @click="$parent.$parent.hidden()"></div>
45
+ </div>
46
+ </div>
47
+ <div class="row">
48
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
49
+ <label class="font_normal_body">用户地址</label>
50
+ <input type="text" class="input_search" v-model="model.f_address" id="f_address" style="width:60%;"
51
+ placeholder="用户地址" condition="f_address like '%{}%'">
52
+ </div>
53
+ <div :class="{'col-sm-6':$parent.$parent.$parent.showItem,'col-sm-4':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
54
+ <role-selector-safe
55
+ :left-width="'60%'"
56
+ :right-width="'60%'"
57
+ role-name="安检员"
58
+ role-lable="安&nbsp;检&nbsp;员"
59
+ @re-res="$parent.$parent.getRes"
60
+ :value.sync="model.f_checker_id"
61
+ v-model="model.f_checker_id"
62
+ condition="f_checker_name = '{}'">
63
+ </role-selector-safe>
64
+ </div>
65
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
66
+ <label class="font_normal_body">起始时间</label>
67
+ <datepicker
68
+ placeholder='起始时间' style="width:60%"
69
+ :disabled-days-of-week="[]"
70
+ :format="'yyyy-MM-dd'"
71
+ :show-rest-button="reset"
72
+ :value.sync="model.f_start_time"
73
+ v-model="model.f_start_time"
74
+ condition="f_offsite_time >= '{} 00:00:00'">
75
+ </datepicker>
76
+ </div>
77
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
78
+ <label class="font_normal_body">结束时间</label>
79
+ <datepicker
80
+ placeholder='结束时间' style="width:60%"
81
+ :disabled-days-of-week="[]"
82
+ :format="'yyyy-MM-dd'"
83
+ :show-rest-button="reset"
84
+ :value.sync="model.f_end_time"
85
+ v-model="model.f_end_time"
86
+ condition="f_offsite_time <= '{} 23:59:59'">
87
+ </datepicker>
88
+ </div >
89
+
90
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
91
+ <label class="font_normal_body">隐患等级</label>
92
+ <v-select :value.sync="model.f_device_type"
93
+ v-model='model.f_device_type'
94
+ style="width: 60%"
95
+ class="select_list select"
96
+ :options='$parent.$parent.Defectlevel'
97
+ @change="$parent.$parent.changeDefectLevel"
98
+ placeholder='隐患等级'
99
+ :multiple="true"
100
+ condition="f_device_type in {}"></v-select>
101
+ </div>
102
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
103
+ <label class="font_normal_body">隐患内容</label>
104
+ <v-select style="width:60% "
105
+ class="select select_list"
106
+ :value.sync="model.f_item_name"
107
+ v-model="model.f_item_name"
108
+ :options='$parent.$parent.getdefectType'
109
+ placeholder='隐患内容'
110
+ condition="f_item_name in {}"
111
+ :multiple="true">
112
+ </v-select>
113
+ </div>
114
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
115
+ <label class="font_normal_body">处理方式</label>
116
+ <v-select :value.sync="model.f_is_repaired"
117
+ v-model='model.f_is_repaired'
118
+ style="width: 60%"
119
+ class="select_list select"
120
+ :options='$parent.$parent.Defectrepaired'
121
+ placeholder='处理方式'
122
+ :multiple="true"
123
+ condition="f_is_repaired in {}"></v-select>
124
+ </div>
125
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
126
+ <label class="font_normal_body">所属区域</label>
127
+ <v-select style="width:60% "
128
+ class="select select_list"
129
+ :value.sync="model.f_street"
130
+ v-model="model.f_street"
131
+ :options='$parent.$parent.streets'
132
+ placeholder='所属区域'
133
+ condition="f_street = '{}'"
134
+ close-on-select>
135
+ </v-select>
136
+ </div>
137
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.showItem,'col-sm-2 form-group':!$parent.$parent.$parent.showItem}" v-show="$parent.$parent.criteriaShow">
138
+ <label class="font_normal_body">小&ensp;区&ensp;域</label>
139
+ <input type="text" class="input_search" v-model="model.f_small_area" id="f_small_area " style="width:60%;"
140
+ placeholder="小区域 " condition="f_small_area like '%{}%'">
141
+ </div>
142
+
143
+ </div>
144
+ </div>
145
+ </criteria>
146
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
147
+ <template partial='head'>
148
+ <tr>
149
+ <th>
150
+ <nobr>用编号</nobr>
151
+ </th>
152
+ <th>
153
+ <nobr>用户姓名</nobr>
154
+ </th>
155
+ <th>
156
+ <nobr>用户地址</nobr>
157
+ </th>
158
+ <th>
159
+ <nobr>隐患等级</nobr>
160
+ </th>
161
+ <th>
162
+ <nobr>隐患内容</nobr>
163
+ </th>
164
+ <th>
165
+ <nobr>安检人员</nobr>
166
+ </th>
167
+ <th>
168
+ <nobr>安检时间</nobr>
169
+ </th>
170
+ <th>
171
+ <nobr>处理方式</nobr>
172
+ </th>
173
+ <th>
174
+ <nobr>维修员</nobr>
175
+ </th>
176
+ <th>
177
+ <nobr>维修时间</nobr>
178
+ </th>
179
+ </tr>
180
+ </template>
181
+ <template partial='body'>
182
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
183
+ <td style="text-align: center">{{row.f_user_name}}</td>
184
+ <td style="text-align: center">{{row.f_address}}</td>
185
+ <td style="text-align: center">{{row.f_device_type}}</td>
186
+ <td style="text-align: center">{{row.f_item_name}}</td>
187
+ <td style="text-align: center">{{row.f_checker_name}}</td>
188
+ <td style="text-align: center">{{row.f_offsite_time}}</td>
189
+ <td style="text-align: center">{{row.f_is_repaired}}</td>
190
+ <td style="text-align: center">{{row.f_repairman}}</td>
191
+ <td style="text-align: center">{{row.f_repair_date}}</td>
192
+ </template>
193
+ </data-grid>
194
+ </criteria-paged>
195
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
196
+ <modal :show.sync="showModal" v-ref:modal>
197
+ <div slot="modal-header" class="modal-header">
198
+ <h4 class="modal-title">
199
+ 选择计划
200
+ </h4>
201
+ </div>
202
+ <div slot="modal-body" class="modal-body">
203
+ <plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
204
+ </div>
205
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
206
+ <button class="button_search" @click="ok">确认</button>
207
+ <button class="button_search" @click="cancel">取消</button>
208
+ </div>
209
+ </modal>
210
+ <modal :show.sync="showModal2" :backdrop="false">
211
+ <div slot="modal-header" class="modal-header">
212
+ <h4 class="modal-title">
213
+ 转维修
214
+ </h4>
215
+ </div>
216
+ <div slot="modal-body" class="modal-body">
217
+ <div v-if="true">
218
+ <div>
219
+
220
+ </div>
221
+ <div class="row" style="margin-top: 10px">
222
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
223
+ <div class="col-xs-8 col-md-8">
224
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
225
+ :options='dispatchTypeOptions' placeholder='派发类型'
226
+ close-on-select>
227
+ </v-select>
228
+ </div>
229
+ </div>
230
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
231
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
232
+ <div class="col-xs-8 col-md-8">
233
+ <v-select
234
+ :value.sync="selectData.f_repairman"
235
+ :value-single="true"
236
+ :options='repairers'
237
+ placeholder='请选择维修员'
238
+ close-on-select></v-select>
239
+ </div>
240
+ </div>
241
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
242
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
243
+ <div class="col-xs-8 col-md-8">
244
+ <right-tree
245
+ islist
246
+ :userid="userid"
247
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
248
+ @re-res="getSiteRes"></right-tree>
249
+ </div>
250
+ </div>
251
+ <div class="row" style="margin-top: 10px">
252
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
253
+ <div class="col-xs-8 col-md-8">
254
+ <v-select :value.sync="selectData.f_repairtype" style="width:60%"
255
+ class="select select_list"
256
+ :value-single="true"
257
+ :options='repairTypeOptions'
258
+ close-on-select>
259
+ </v-select>
260
+ </div>
261
+ </div>
262
+ <div class="row" style="margin-top: 10px">
263
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
264
+ <div class="col-xs-8 col-md-8">
265
+ <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
271
+ <button class="button_search" @click="rectification">转维修</button>
272
+ <button class="button_search" @click="cancel1">取消</button>
273
+ </div>
274
+ </modal>
275
+ <modal :show.sync="showModal3">
276
+ <div slot="modal-header" class="modal-header">
277
+ <h4 class="modal-title">
278
+ 转维修进度{{ progressbarWidth }}%
279
+ </h4>
280
+ </div>
281
+ <div slot="modal-body" class="modal-body">
282
+ <div class="progress">
283
+ <div class="progress-bar" role="progressbar" aria-valuenow="60"
284
+ aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
285
+ </div>
286
+ </div>
287
+ </div>
288
+ <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
289
+ </modal>
290
+ </div>
291
+ </div>
292
+ </template>
293
+
294
+ <script>
295
+ import {PagedList} from 'vue-client'
296
+ import Vue from 'vue'
297
+ import co from 'co'
298
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
299
+ //获取json配置文件
300
+ let asyncReady = async function (self) {
301
+ // 获取配置信息
302
+ try {
303
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
304
+ Vue.config = res.data
305
+ self.getDefectInfoConfig(res.data)
306
+ } catch (error) {
307
+ // 忽略704,文件找不到异常R
308
+ if (error.status !== 704) {
309
+ throw error
310
+ }
311
+ }
312
+ }
313
+ let select = function* (self) {
314
+ let http = new HttpResetClass()
315
+ let getGasman = yield http.load('POST', '/rs/search', {
316
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
317
+ userid: self.$login.f.id
318
+ }, {resolveMsg: null, rejectMsg: null})
319
+ ////tag
320
+ self.checkersid.push({label: '全部', value: ''})
321
+ getGasman.data.forEach((checker) => {
322
+ self.checkersid.push({label: checker.name, value: checker.id})
323
+ })
324
+ }
325
+
326
+ export default {
327
+ title: '隐患明细查看',
328
+ data() {
329
+ let model = new PagedList('rs/sql/defectDetails', 20,{
330
+ f_filialeid: 'this.f_filialeid'
331
+ })
332
+ model.f_plan_id = ''
333
+ model.f_approved = ''
334
+ model.f_entry = ''
335
+ model.f_no_checkplan = ''
336
+ model.f_check_type=''
337
+ model.f_filialeid = `('${this.$login.f.orgid}')`
338
+ return {
339
+ audioshow:false,
340
+ f_check_plan: {f_plan_name: '', id: ''},
341
+ model: model,
342
+ deal_dispose:[{label:'全部',value:''},{label:'报修',value:'报修'},{label:'现场整改',value:'现场整改'},{label:'自行处理',value:'自行处理'},{label:'未处理',value:'未处理'}],
343
+ repairStateOptions: this.getSafeParam('隐患状态'),
344
+ excelHeaders: {
345
+ 'f_userinfo_code': '客户编号',
346
+ 'f_user_name': '客户姓名',
347
+ 'f_user_phone': '客户电话',
348
+ 'f_user_type': '客户类型',
349
+ 'f_address': '客户地址',
350
+ 'f_offsite_time': '安检时间',
351
+ 'f_checker_name': '安检员',
352
+ 'f_device_type': '隐患等级',
353
+ 'f_item_name': '隐患名称',
354
+ 'f_is_repaired': '处理方式',
355
+ 'f_repairman':'维修员',
356
+ 'f_repair_date':'维修时间',
357
+ 'f_street':'所属区域',
358
+ 'f_small_area':'小区域',
359
+ },
360
+ fun: this.$login.f,
361
+ checkersid: [],
362
+ Defectrepaired: this.getSafeParam('隐患处理方式'),
363
+ safetype: this.getSafeParam('安检类型'),
364
+ Defectlevel:[{label:'全部',value:''},{label:'一级隐患',value:'一级隐患'},{label:'二级隐患',value:'二级隐患'},{label:'三级隐患',value:'三级隐患'},{label: '其他隐患',value:'其他隐患'}],
365
+ user_types: this.getSafeParam('用户类型'),
366
+ criteriaShow: false,
367
+ showModal: false,
368
+ f_approval_states: this.getSafeParam('安检单审核状态'),
369
+ f_entry_status:this.getSafeParam('安检状态'),
370
+ f_checkplans: this.getSafeParam('有无计划'),
371
+ showcheckmsg: false,
372
+ checkInfo: {},
373
+ orderDefault: "'f_offsite_time'",
374
+ orderFields: {
375
+ f_offsite_time: 'no'
376
+ },
377
+ sliceArea: [],
378
+ cbc:[],
379
+ streets:[],
380
+ DefectConfig:'' ,
381
+ DefectConfigs:[{label:'全部',value:''},{label: '金额异常差值', value: '金额异常差值'},{label: '气量异常差值', value: '气量异常差值'}],
382
+ device_types:[{label:'全部',value:''}],
383
+ f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
384
+ showModal2: false,
385
+ selectData:{
386
+ dispatchType:'',
387
+ f_repairman:'',
388
+ f_remarks:'',
389
+ f_repairtype:''
390
+ },
391
+ repairers: [],
392
+ getdefectType:[{label:'全部',value:''}],
393
+ repairTypeOptions:this.$appdata.getParam('报修类型'),
394
+ dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
395
+ dangerGroups: [],
396
+ showModal3: false,
397
+ progressbarWidth:'0',
398
+ canToRepair: this.$appdata.getSingleValue('隐患明细转维修'),
399
+ checkes: []
400
+ }
401
+ },
402
+ computed :{
403
+ searchData() {
404
+ return {condition: this.model.condition}
405
+ }
406
+ },
407
+ methods: {
408
+ async initstreets(){
409
+ this.streetslist = []
410
+ let HttpReset = new HttpResetClass()
411
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
412
+ data: {
413
+ items: '*',
414
+ tablename: 't_street',
415
+ orderitem: 'id',
416
+ condition: `f_orgid = '${this.$login.f.orgid}'`
417
+ }
418
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
419
+ let redata = []
420
+ req.data.forEach((row, n) => {
421
+ redata[n] = {
422
+ label: row.f_street,
423
+ value: row.f_street,
424
+ data:row,
425
+ id:row.id
426
+ }
427
+ })
428
+ this.streets=redata
429
+ },
430
+ changeDefectLevel() {
431
+ if(this.$refs.paged.$refs.criteria.model.f_device_type && this.$refs.paged.$refs.criteria.model.f_device_type.length>0){
432
+ // 初始化为空数组,准备追加数据
433
+ this.getdefectType = [];
434
+ // 循环追加每个设备类型的缺陷类型
435
+ for (let i = 0; i < this.$refs.paged.$refs.criteria.model.f_device_type.length; i++) {
436
+ const deviceType = this.$refs.paged.$refs.criteria.model.f_device_type[i];
437
+ const defectTypes = this.$appdata.getParam(deviceType);
438
+ if (defectTypes && defectTypes.length > 0) {
439
+ // 追加当前设备类型的缺陷类型
440
+ this.getdefectType = [...this.getdefectType, ...defectTypes];
441
+ }
442
+ }
443
+ // 如果有数据,在开头添加"全部"选项
444
+ if (this.getdefectType.length > 0) {
445
+ this.getdefectType.unshift({label:'全部',value:''});
446
+ } else {
447
+ this.getdefectType = [{label:'全部',value:''}];
448
+ }
449
+ } else {
450
+ this.getdefectType = [{label:'全部',value:''}];
451
+ }
452
+ },
453
+ showChooser() {
454
+ this.showModal = true
455
+ },
456
+ isChecked(row) {
457
+ return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
458
+ },
459
+ setCheckes(row) {
460
+ let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
461
+ if(index<0){
462
+ this.checkes.push(row)
463
+ }else{
464
+ this.checkes.splice(index,1)
465
+ }
466
+ console.log('this.checkes=', JSON.stringify(this.checkes))
467
+ },
468
+ toRepair(){
469
+ console.log('this.checkes=', JSON.stringify(this.checkes))
470
+ if(this.checkes.length==0){
471
+ return this.$showMessage('请先选择需要转维修的隐患!')
472
+ }
473
+
474
+ const dangerGroups = []
475
+ for (const danger of this.checkes) {
476
+ let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
477
+ if (i == -1){
478
+ dangerGroups.push({
479
+ f_userinfo_code: danger.f_userinfo_code,
480
+ dangers: []
481
+ })
482
+ i = dangerGroups.length - 1
483
+ }
484
+ dangerGroups[i].dangers.push(danger)
485
+ }
486
+ this.dangerGroups = dangerGroups
487
+ console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
488
+ this.showModal2=true
489
+ },
490
+ getEmp() {
491
+ 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}`}
492
+ let http = new HttpResetClass()
493
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
494
+ if (res.data.length == 0){
495
+ this.repairers= []
496
+ return
497
+ }
498
+ let str=``
499
+ res.data.forEach((item,idx,arr) => {
500
+ if(idx+1==arr.length){
501
+ str += item.id
502
+ }else{
503
+ str += item.id+`','`
504
+ }
505
+ })
506
+ let http1 = new HttpResetClass()
507
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
508
+ data: {
509
+ items: 'id,f_user_telephone',
510
+ tablename: 't_user',
511
+ condition: `id in ('${str}')`,
512
+ orderitem: 'id'
513
+ }
514
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
515
+ res.data.forEach((user)=>{
516
+ try {
517
+ ress.data.forEach((tel,tidx,arr)=>{
518
+ if(user.id==tel.id){
519
+ this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
520
+ ress.data.splice(tidx,1)
521
+ }
522
+ })
523
+ }catch (e) {
524
+ }
525
+ })
526
+ }).catch(error=>{
527
+ res.data.forEach((user)=>{
528
+ this.repairers.push({label: user.name, value: user.name})
529
+ })
530
+ })
531
+
532
+ })
533
+ },
534
+ getSiteRes(obj) {
535
+ console.log('siteRes ---> ')
536
+ console.log(obj)
537
+ if(obj.resids[0]){
538
+ this.selectData.f_meetunit = obj.res.join('.')
539
+ this.selectData.f_reciever = obj.resids.join('.')
540
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
541
+ }else {
542
+ this.selectData.f_meetunit = ''
543
+ this.selectData.f_reciever = ''
544
+ this.selectData.f_outlets = ''
545
+ }
546
+ },
547
+ cancel1(){
548
+ this.showModal2=false
549
+ this.selectData={
550
+ dispatchType:'',
551
+ f_repairman:'',
552
+ f_remarks:'',
553
+ f_repairtype:''
554
+ }
555
+ },
556
+ async rectification(){
557
+ if(this.selectData.dispatchType){
558
+ if(this.selectData.dispatchType=='派发给站点'){
559
+ if(!this.selectData.f_reciever){
560
+ this.$showMessage('请选择部门!')
561
+ return
562
+ }
563
+ }else{
564
+ if(!this.selectData.f_repairman){
565
+ this.$showMessage('请选择维修员!')
566
+ return
567
+ }
568
+ }
569
+ }else {
570
+ this.$showMessage('请选择派发类型!')
571
+ return
572
+ }
573
+
574
+ if(!this.selectData.f_repairtype){
575
+ this.$showMessage('请选择报修类型!')
576
+ return
577
+ }
578
+ this.showModal3=true
579
+ let act={}
580
+ let toRepair=''
581
+ let successCount=0
582
+ if(this.selectData.dispatchType=='派发给站点'){
583
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
584
+ toRepair=null
585
+ }else{
586
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
587
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
588
+ toRepair='一级派单'
589
+ }
590
+ let rep={
591
+ loginUser: {
592
+ name: this.$login.f.name,
593
+ ename: this.$login.f.ename
594
+ },
595
+ f_meetunit: this.$login.f.deps,
596
+ f_attendant: this.$login.f.name,
597
+ f_outlets: this.$login.f.deps,
598
+ f_remarks: this.selectData.f_remarks,
599
+ f_repairtype: this.selectData.f_repairtype,
600
+ toRepair: toRepair,
601
+ activity:act
602
+ }
603
+ for(let i=0; i<this.dangerGroups.length; i++){
604
+ let defectIdStr = ''
605
+ const defectIds = []
606
+ for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
607
+ defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
608
+ }
609
+ defectIdStr = `(${defectIds.join(',')})`
610
+ const data = {
611
+ id:this.dangerGroups[i].dangers[0].f_paper_id,
612
+ repData:rep,
613
+ source:'pc',
614
+ defectIdStr: defectIdStr
615
+ }
616
+ console.log('data=', JSON.stringify(data))
617
+ try {
618
+ let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
619
+ if (result.data.code==200) {
620
+ successCount += result.data.successcon
621
+ this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
622
+ }
623
+ }catch (e) {
624
+ this.showModal3=false
625
+ this.$showMessage('网络异常,请稍后再试!')
626
+ return
627
+ }
628
+ }
629
+ this.showModal3=false
630
+ this.cancel1()
631
+ this.$showMessage('本次转维修成功'+successCount+'单')
632
+ },
633
+ getDefectInfoConfig(val){
634
+ try {
635
+ if (val.safecheck.DevicesSetConfig != undefined) {
636
+ this.DefectConfig = val.safecheck.DevicesConfig
637
+ // 获取到配置项,进行遍历,获取每个隐患项
638
+ for (var Key1 in this.DefectConfig){
639
+ this.device_types.push({label:Key1,value:Key1})
640
+ for(var Key2 in this.DefectConfig[Key1].items){
641
+ this.DefectConfigs.push({label:Key2,value:Key2})
642
+ }
643
+ }
644
+ // 非民用或其他配置项加入,在进行遍历
645
+ }
646
+ }catch (e) {
647
+ //tag
648
+ }
649
+ },
650
+ showaudio(){
651
+ //tag
652
+ this.audioshow=!this.audioshow
653
+ //tag
654
+ },
655
+ getmeterbook(val){
656
+ this.cbc=[]
657
+ this.cbc.push({
658
+ label:'全部',
659
+ value:''
660
+ })
661
+ if (val==''){
662
+
663
+ this.cbcs.forEach(res=>{
664
+ this.cbc.push({
665
+ label:res.f_book_name,
666
+ value:res.id
667
+ })
668
+ })
669
+ }else{
670
+ this.cbcs.forEach(res=>{
671
+ if (res.f_book_slice_area==val){
672
+ this.cbc.push({
673
+ label:res.f_book_name,
674
+ value:res.id
675
+ })
676
+ }
677
+ })
678
+ }
679
+ },
680
+ getSafeParam(val){
681
+ if(this.$appdata.getParam(val)){
682
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
683
+ }else{
684
+ return [{label: '全部', value: ''}]
685
+ }
686
+
687
+ },
688
+ Mreadibook(val){
689
+ ////tag
690
+ ////tag
691
+ this.sliceArea=[]
692
+ if (val){
693
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
694
+ items: 'name',
695
+ tablename: 't_zone',
696
+ condition: `parentid in ${val}`,
697
+ orderitem: 'id'
698
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
699
+ this.sliceArea.push({
700
+ label:'全部',
701
+ value:''
702
+ })
703
+ res.data.forEach(ress=>{
704
+ this.sliceArea.push({
705
+ label:ress.name,
706
+ value:ress.name
707
+ })
708
+ })
709
+
710
+ })
711
+ }
712
+ },
713
+ getAllMeterBook(val){
714
+ ////tag
715
+ ////tag
716
+ this.cbcs=[]
717
+ if (val){
718
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
719
+ items: 'f_book_name,f_book_slice_area,id',
720
+ tablename: 't_meter_book',
721
+ condition: `f_filiale_id in ${val}`,
722
+ orderitem: 'id'
723
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
724
+ res.data.forEach(ress=>{
725
+ this.cbcs.push({
726
+ id:ress.id,
727
+ f_book_name:ress.f_book_name,
728
+ f_book_slice_area:ress.f_book_slice_area
729
+ })
730
+ })
731
+ this.cbc=[]
732
+ this.cbc.push({
733
+ label:'全部',
734
+ value:''
735
+ })
736
+ this.cbcs.forEach(res=>{
737
+ this.cbc.push({
738
+ label:res.f_book_name,
739
+ value:res.id
740
+ })
741
+ })
742
+ })
743
+ }
744
+ },
745
+ getRes(obj) {
746
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
747
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
748
+ this.Mreadibook(this.model.f_filialeid)
749
+ this.getAllMeterBook(this.model.f_filialeid)
750
+ //this.$refs.paged.$refs.criteria.search()
751
+ },
752
+
753
+ change(row) {
754
+ // Vue.$login = {jwt: row.f_checker_id}
755
+ asyncReady(this).then(() => {
756
+ ////tag)
757
+ row.f_upload_state = '已传'
758
+ this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
759
+ }).catch(
760
+ (respanse) => {
761
+ alert('获取配置文件失败')
762
+ })
763
+ },
764
+ readConfig() {
765
+ let gen = asyncReady(this)
766
+ return co(gen)
767
+ },
768
+ hidden() {
769
+ this.criteriaShow = !this.criteriaShow
770
+ },
771
+ refresh() {
772
+ this.$refs.paged.$refs.criteria.search()
773
+ },
774
+ ok() {
775
+ this.showModal = false
776
+ if (this.$refs.modal.$children[0].selectedRow.id) {
777
+ this.f_check_plan = this.$refs.modal.$children[0].selectedRow
778
+ }
779
+ },
780
+ cancel() {
781
+ this.showModal = false
782
+ this.f_check_plan = {f_plan_name: '', id: ''}
783
+ },
784
+ print(row) {
785
+ this.showcheckmsg = true
786
+ this.checkInfo = row
787
+ },
788
+
789
+ sort(field, rule) {
790
+ // 将所有排序方式设为不排序,实现相互排斥
791
+ for (let key in this.orderFields) {
792
+ if (key === field) {
793
+ this.orderFields[key] = rule
794
+ } else {
795
+ this.orderFields[key] = 'no'
796
+ }
797
+ }
798
+ // 如果新规则不排序,还原为默认排序
799
+ if (rule === 'no') {
800
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
801
+ } else {
802
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
803
+ }
804
+ this.search()
805
+ },
806
+ search() {
807
+ this.$refs.paged.$refs.criteria.search()
808
+ },
809
+ selfSearch(args) {
810
+ if (this.f_check_plan.f_plan_name) {
811
+ args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
812
+ }
813
+ args.condition += ` and f_filialeid in ${this.model.f_filialeid}`
814
+ this.model.search(args.condition, args.model, args.condValue)
815
+ }
816
+ },
817
+
818
+ ready() {
819
+ this.initstreets()
820
+ this.getEmp()
821
+ this.readConfig()
822
+ this.function = this.f
823
+ let gen = select(this)
824
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
825
+ co(gen)
826
+ }
827
+ }
828
+ </script>