safecheck-client 3.0.39-50 → 3.0.39-52

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