safecheck-client 3.0.39-14 → 3.0.39-16

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 (256) 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/Widget.vue +13 -13
  49. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  50. package/src/android-bootstrap/less/.csscomb.json +304 -304
  51. package/src/android-bootstrap/less/.csslintrc +19 -19
  52. package/src/android-bootstrap/less/alerts.less +73 -73
  53. package/src/android-bootstrap/less/badges.less +66 -66
  54. package/src/android-bootstrap/less/bootstrap.less +56 -56
  55. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  56. package/src/android-bootstrap/less/button-groups.less +247 -247
  57. package/src/android-bootstrap/less/buttons.less +173 -173
  58. package/src/android-bootstrap/less/carousel.less +269 -269
  59. package/src/android-bootstrap/less/close.less +34 -34
  60. package/src/android-bootstrap/less/code.less +69 -69
  61. package/src/android-bootstrap/less/component-animations.less +33 -33
  62. package/src/android-bootstrap/less/grid.less +84 -84
  63. package/src/android-bootstrap/less/input-groups.less +167 -167
  64. package/src/android-bootstrap/less/jumbotron.less +52 -52
  65. package/src/android-bootstrap/less/labels.less +64 -64
  66. package/src/android-bootstrap/less/list-group.less +141 -141
  67. package/src/android-bootstrap/less/media.less +66 -66
  68. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  69. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  70. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  71. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  72. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  73. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  74. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  75. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  76. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  77. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  78. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  79. package/src/android-bootstrap/less/mixins/image.less +33 -33
  80. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  81. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  82. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  83. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  84. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  85. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  86. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  87. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  88. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  89. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  90. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  91. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  92. package/src/android-bootstrap/less/mixins/size.less +10 -10
  93. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  94. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  95. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  96. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  97. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  98. package/src/android-bootstrap/less/mixins.less +40 -40
  99. package/src/android-bootstrap/less/modals.less +151 -151
  100. package/src/android-bootstrap/less/navbar.less +660 -660
  101. package/src/android-bootstrap/less/navs.less +290 -290
  102. package/src/android-bootstrap/less/normalize.less +424 -424
  103. package/src/android-bootstrap/less/pager.less +76 -76
  104. package/src/android-bootstrap/less/pagination.less +89 -89
  105. package/src/android-bootstrap/less/panels.less +274 -274
  106. package/src/android-bootstrap/less/popovers.less +131 -131
  107. package/src/android-bootstrap/less/print.less +101 -101
  108. package/src/android-bootstrap/less/progress-bars.less +87 -87
  109. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  110. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  111. package/src/android-bootstrap/less/scaffolding.less +161 -161
  112. package/src/android-bootstrap/less/tables.less +262 -262
  113. package/src/android-bootstrap/less/theme.less +291 -291
  114. package/src/android-bootstrap/less/thumbnails.less +36 -36
  115. package/src/android-bootstrap/less/tooltip.less +102 -102
  116. package/src/android-bootstrap/less/type.less +303 -303
  117. package/src/android-bootstrap/less/utilities.less +55 -55
  118. package/src/android-bootstrap/less/variables.less +896 -896
  119. package/src/android-bootstrap/less/wells.less +29 -29
  120. package/src/bootstrap/less/.csscomb.json +304 -304
  121. package/src/bootstrap/less/.csslintrc +19 -19
  122. package/src/bootstrap/less/alerts.less +73 -73
  123. package/src/bootstrap/less/badges.less +66 -66
  124. package/src/bootstrap/less/breadcrumbs.less +26 -26
  125. package/src/bootstrap/less/button-groups.less +247 -247
  126. package/src/bootstrap/less/buttons.less +172 -172
  127. package/src/bootstrap/less/carousel.less +269 -269
  128. package/src/bootstrap/less/close.less +34 -34
  129. package/src/bootstrap/less/code.less +69 -69
  130. package/src/bootstrap/less/component-animations.less +33 -33
  131. package/src/bootstrap/less/dropdowns.less +216 -216
  132. package/src/bootstrap/less/grid.less +84 -84
  133. package/src/bootstrap/less/input-groups.less +167 -167
  134. package/src/bootstrap/less/jumbotron.less +52 -52
  135. package/src/bootstrap/less/labels.less +64 -64
  136. package/src/bootstrap/less/list-group.less +141 -141
  137. package/src/bootstrap/less/media.less +66 -66
  138. package/src/bootstrap/less/mixins/alerts.less +14 -14
  139. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  140. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  141. package/src/bootstrap/less/mixins/buttons.less +69 -69
  142. package/src/bootstrap/less/mixins/center-block.less +7 -7
  143. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  144. package/src/bootstrap/less/mixins/forms.less +90 -90
  145. package/src/bootstrap/less/mixins/gradients.less +59 -59
  146. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  147. package/src/bootstrap/less/mixins/grid.less +122 -122
  148. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  149. package/src/bootstrap/less/mixins/image.less +33 -33
  150. package/src/bootstrap/less/mixins/labels.less +12 -12
  151. package/src/bootstrap/less/mixins/list-group.less +30 -30
  152. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  153. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  154. package/src/bootstrap/less/mixins/opacity.less +8 -8
  155. package/src/bootstrap/less/mixins/pagination.less +24 -24
  156. package/src/bootstrap/less/mixins/panels.less +24 -24
  157. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  158. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  159. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  160. package/src/bootstrap/less/mixins/resize.less +6 -6
  161. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  162. package/src/bootstrap/less/mixins/size.less +10 -10
  163. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  164. package/src/bootstrap/less/mixins/table-row.less +44 -44
  165. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  166. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  167. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  168. package/src/bootstrap/less/mixins.less +40 -40
  169. package/src/bootstrap/less/modals.less +151 -151
  170. package/src/bootstrap/less/navbar.less +660 -660
  171. package/src/bootstrap/less/normalize.less +424 -424
  172. package/src/bootstrap/less/pagination.less +89 -89
  173. package/src/bootstrap/less/panels.less +275 -275
  174. package/src/bootstrap/less/popovers.less +131 -131
  175. package/src/bootstrap/less/print.less +101 -101
  176. package/src/bootstrap/less/progress-bars.less +87 -87
  177. package/src/bootstrap/less/responsive-embed.less +35 -35
  178. package/src/bootstrap/less/responsive-utilities.less +194 -194
  179. package/src/bootstrap/less/scaffolding.less +161 -161
  180. package/src/bootstrap/less/theme.less +291 -291
  181. package/src/bootstrap/less/thumbnails.less +36 -36
  182. package/src/bootstrap/less/tooltip.less +102 -102
  183. package/src/bootstrap/less/type.less +303 -303
  184. package/src/bootstrap/less/utilities.less +55 -55
  185. package/src/bootstrap/less/wells.less +29 -29
  186. package/src/components/FileUpload.vue +696 -696
  187. package/src/components/Hello.vue +39 -39
  188. package/src/components/LeftTree.vue +27 -27
  189. package/src/components/android/AttendanceTally.vue +116 -116
  190. package/src/components/android/Blank.vue +10 -10
  191. package/src/components/android/CheckUnplanPage.vue +56 -56
  192. package/src/components/android/Checker.vue +12 -12
  193. package/src/components/android/CheckerAnnual.vue +81 -81
  194. package/src/components/android/CheckerAvarta.vue +82 -82
  195. package/src/components/android/EquipmentInspection.vue +348 -348
  196. package/src/components/android/FootprintMap.vue +120 -120
  197. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  198. package/src/components/android/MasterMain.vue +77 -77
  199. package/src/components/android/Menu.vue +132 -132
  200. package/src/components/android/PaperAlarm.vue +85 -85
  201. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  202. package/src/components/android/PlumberAnnual.vue +83 -83
  203. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  204. package/src/components/android/PlumberMonthly.vue +84 -84
  205. package/src/components/android/PostMap.vue +83 -83
  206. package/src/components/android/QueryCheckHistory.vue +122 -122
  207. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  208. package/src/components/android/RepairMain.vue +60 -60
  209. package/src/components/android/Repairman.vue +12 -12
  210. package/src/components/android/StationMaster.vue +12 -12
  211. package/src/components/defects/DefectModal.vue +101 -101
  212. package/src/components/defects/DevicesAndItem.vue +39 -39
  213. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  214. package/src/components/notice/NoticeForm.vue +100 -100
  215. package/src/components/notice/NoticeIssue.vue +20 -20
  216. package/src/components/paper/PicViewer.vue +18 -18
  217. package/src/components/pc/SafeCheckOrder/SafeCheckOrderList.vue +248 -248
  218. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  219. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  220. package/src/components/phonestate/PostMap.vue +82 -82
  221. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  222. package/src/components/userfile/MeterFile.vue +145 -145
  223. package/src/components/userfile/MeterModify.vue +46 -46
  224. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  225. package/src/filiale/hanzhong/pc/CheckHiddenDanger.vue +713 -713
  226. package/src/filiale/hanzhong/pc/CheckNumberStatistics.vue +499 -499
  227. package/src/filiale/hanzhong/pc/CheckSafeDetail.vue +578 -573
  228. package/src/filiale/hanzhong/pc/CheckSafeStatus.vue +508 -508
  229. package/src/filiale/hanzhong/pc/CheckerSafeDetail.vue +595 -595
  230. package/src/filiale/hanzhong/pc/HomeEcharts.vue +153 -153
  231. package/src/filiale/kelai/android/PaperFeedback.vue +1553 -1553
  232. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +104 -38
  233. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +42 -19
  234. package/src/filiale/tongchuan/pc/AMapTrailShowZk.vue +226 -226
  235. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1091 -1091
  236. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +664 -664
  237. package/src/filiale/tongchuan/pc/NoCheckplanSafecheck.vue +247 -247
  238. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1094 -1094
  239. package/src/filiale/tongchuan/pc/PaperList.vue +718 -718
  240. package/src/filiale/tongchuan/pc/PersonTrack.vue +269 -269
  241. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +336 -336
  242. package/src/filiale/tongchuan/pc.js +37 -37
  243. package/src/filiale/wuan/android/SafecheckOrderV.vue +2242 -2242
  244. package/src/filiale/wuan/android/SafecheckUserInfo.vue +659 -659
  245. package/src/plugins/LoadData.js +10 -10
  246. package/src/plugins/LoadParams.js +24 -24
  247. package/src/stores/wxconfig.js +10 -10
  248. package/src/utils/getNowDate.js +33 -33
  249. package/test/e2e/custom-assertions/elementCount.js +26 -26
  250. package/test/e2e/nightwatch.conf.js +40 -40
  251. package/test/e2e/runner.js +30 -30
  252. package/test/e2e/specs/test.js +13 -13
  253. package/test/unit/.eslintrc +5 -5
  254. package/test/unit/TestUtil.js +62 -62
  255. package/test/unit/context.html +20 -20
  256. package/test/unit/index.js +13 -13
@@ -1,1091 +1,1091 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">用户编号</label>
9
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
- id="f_userinfo_code"
11
-
12
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
13
- </div>
14
- <div :class="$parent.$parent.style">
15
- <label class="font_normal_body">用户姓名</label>
16
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
17
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
18
- </div>
19
- <div :class="$parent.$parent.style">
20
- <label class="font_normal_body">小&emsp;&emsp;区</label>
21
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
22
- id="f_residential_area"
23
- placeholder="小区" condition="f_residential_area like '%{}%'">
24
- </div>
25
- <div :class="$parent.$parent.style">
26
- <label class="font_normal_body">地&emsp;&emsp;址</label>
27
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
28
- placeholder="地址" condition="f_address like '%{}%'">
29
- </div>
30
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
31
- <export-excel-safe :data="$parent.$parent.searchData"
32
- :field="$parent.$parent.excelHeaders"
33
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
34
- template-name='用户安检情况' :choose-col="true"></export-excel-safe>
35
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
36
- <div style="float: right" class="button_spacing"
37
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
38
- @click="$parent.$parent.hiddenr()"></div>
39
- <div style="float: right" class="button_spacing"
40
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
41
- @click="$parent.$parent.hidden()">
42
-
43
- </div>
44
- </div>
45
-
46
-
47
- </div>
48
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
49
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
50
- <label class="font_normal_body">用户类型</label>
51
- <v-select id="f_usertype"
52
- placeholder='用户类型'
53
- class="select select_list"
54
- :value.sync="model.f_usertype"
55
- :value-single="true"
56
- :options='$parent.$parent.usertypes'
57
- v-model="model.f_usertype"
58
- condition="f_user_type = '{}'"
59
- close-on-select clear-button></v-select>
60
- </div>
61
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
62
-
63
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
64
- <label class="font_normal_body" style="color: red;">安检筛选</label>
65
- <v-select
66
- placeholder='安检筛选'
67
- :value-single="true"
68
- class="select select_list"
69
- :value.sync="$parent.$parent.SafeCheckXZ"
70
- :options='$parent.$parent.SafeCheckXZs'
71
- v-model="$parent.$parent.SafeCheckXZ"
72
- close-on-select clear-button></v-select>
73
- </div>
74
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
75
- <label class="font_normal_body">安检起始</label>
76
- <datepicker
77
- :value.sync="model.f_check_start"
78
- placeholder='最后安检时间起始'
79
- style="width: 60%"
80
- :format="'yyyy-MM-dd 00:00:00'"
81
- :show-rest-button="reset"
82
- v-model="model.f_check_start">
83
- </datepicker>
84
- </div>
85
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
86
- <label class="font_normal_body">安检结束</label>
87
- <datepicker
88
- :value.sync="model.f_check_end"
89
- placeholder='最后安检时间结束'
90
- style="width: 60%"
91
- :format="'yyyy-MM-dd 23:59:59'"
92
- :show-rest-button="reset"
93
- v-model="model.f_check_end">
94
- </datepicker>
95
- </div>
96
-
97
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
98
- <label class="font_normal_body">安检状态</label>
99
- <v-select id="f_entry"
100
- placeholder='安检状态'
101
- class="select select_list"
102
- :value.sync="model.f_last_check_state"
103
- :value-single="true"
104
- :options='$parent.$parent.checkstatus'
105
- v-model="model.f_last_check_state"
106
- condition="f_last_check_state = '{}'"
107
- close-on-select clear-button></v-select>
108
- </div>
109
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
110
- <label class="font_normal_body">隐患情况</label>
111
- <v-select
112
- placeholder='隐患情况'
113
- class="select select_list"
114
- :value-single="true"
115
- v-model='model.f_check_result'
116
- :value.sync="model.f_check_result"
117
- :options='$parent.$parent.f_check_results'
118
- condition="f_last_check_result like '%{}%'"
119
- close-on-select clear-button></v-select>
120
- </div>
121
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
122
- </div>
123
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
124
-
125
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
126
- <role-selector-safe
127
- role-name="安检员"
128
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
129
- @re-res="$parent.$parent.getRes"
130
- :value.sync="model.f_checker_id"
131
- v-model="model.f_checker_id"
132
- :value-multiple="true"
133
- condition=" f_checker_name in {}">
134
- </role-selector-safe>
135
- </div>
136
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
137
- <label class="font_normal_body">片&emsp;&emsp;区</label>
138
- <v-select class="select_list select"
139
- placeholder='片区/管理站' style="width: 60%"
140
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
- :options='$parent.$parent.sliceArea'
142
- filer-key="name"
143
- close-on-select clear-button
144
- condition="f_slice_area='{}'"
145
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
146
- :value-single="true">
147
- </v-select>
148
- </div>
149
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
151
- <v-select class="select_list select"
152
- placeholder='抄表册' style="width: 60%"
153
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
154
- :options='$parent.$parent.cbc'
155
- filer-key="name"
156
- close-on-select clear-button
157
- condition="f_meter_book_num={}"
158
- :value-single="true">
159
- </v-select>
160
- </div>
161
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
- <label class="font_normal_body">区&emsp;&emsp;域</label>
163
- <v-select class="select_list select"
164
- placeholder='请选择' style="width: 60%"
165
- :value.sync="model.f_pcd" v-model="model.f_pcd"
166
- :options='$parent.$parent.pcds'
167
- filer-key="name"
168
- close-on-select clear-button
169
- condition="f_pcd_id ='{}'"
170
- :value-single="true">
171
- </v-select>
172
- </div>
173
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
174
- <label class="font_normal_body">用户状态</label>
175
- <v-select class="select_list select"
176
- placeholder='用户状态' style="width: 60%"
177
- :value.sync="model.f_user_state" v-model="model.f_user_state"
178
- :options='$parent.$parent.userstates'
179
- close-on-select clear-button
180
- condition="f_user_state = '{}'"
181
- :value-single="true">
182
- </v-select>
183
- </div>
184
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
185
- <label class="font_normal_body">用气性质</label>
186
- <v-select
187
- class="select_list select"
188
- placeholder='用气性质' style="width: 60%"
189
- v-model='model.userType'
190
- :value.sync="model.userType"
191
- :options='$parent.$parent.userTypes'
192
- condition="f_gasproperties = '{}'"
193
- :value-single="true"
194
- close-on-select clear-button></v-select>
195
- </div>
196
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
197
- <label class="font_normal_body">气表类型</label>
198
- <v-select
199
- class="select_list select"
200
- placeholder='气表类型' style="width: 60%"
201
- v-model='model.tableType'
202
- :value.sync="model.tableType"
203
- :options='$parent.$parent.tableTypes'
204
- condition="f_meter_classify = '{}'"
205
- :value-single="true"
206
- close-on-select clear-button></v-select>
207
- </div>
208
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
209
- <label class="font_normal_body">气表品牌</label>
210
- <v-select
211
- class="select_list select"
212
- placeholder='气表类型' style="width: 60%"
213
- v-model='model.tableBrand'
214
- :value.sync="model.tableBrand"
215
- :options='$parent.$parent.tableBrands'
216
- condition="f_meter_brand = '{}'"
217
- :value-single="true"
218
- close-on-select clear-button></v-select>
219
- </div>
220
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
221
- <label class="font_normal_body">网&ensp;格&ensp;员</label>
222
- <v-select class="select_list select"
223
- placeholder='请选择' style="width: 60%"
224
- :value.sync="model.f_book_checker" v-model="model.f_book_checker"
225
- :options='$parent.$parent.users'
226
- filer-key="name"
227
- close-on-select clear-button
228
- condition="f_book_checker like '%{}%' and f_checker_name = '{}'"
229
- :value-single="true">
230
- </v-select>
231
- </div>
232
- </div>
233
-
234
- <div class="row" v-show="$parent.$parent.$parent.showItem">
235
- <div :class="$parent.$parent.style">
236
- <label class="font_normal_body">用户编号</label>
237
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
238
-
239
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
240
- </div>
241
- <div :class="$parent.$parent.style">
242
- <label class="font_normal_body">用户姓名</label>
243
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
244
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
245
- </div>
246
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
247
- <export-excel-safe :data="$parent.$parent.searchData"
248
- :field="$parent.$parent.excelHeaders"
249
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
250
- template-name='用户安检情况' :choose-col="true"></export-excel-safe>
251
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
252
- <div style="float: right" class="button_spacing"
253
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
254
- @click="$parent.$parent.hiddenr()"></div>
255
- <div style="float: right" class="button_spacing"
256
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
257
- @click="$parent.$parent.hidden()">
258
-
259
- </div>
260
- </div>
261
-
262
- </div>
263
- <div class="row" v-show="$parent.$parent.$parent.showItem">
264
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
265
- <label class="font_normal_body">小&emsp;&emsp;区</label>
266
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
267
-
268
- placeholder="小区" condition="f_residential_area like '%{}%'">
269
- </div>
270
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
271
- <label class="font_normal_body">地&emsp;&emsp;址</label>
272
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
273
-
274
- placeholder="地址" condition="f_address like '%{}%'">
275
- </div>
276
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
277
- <label class="font_normal_body">用户类型</label>
278
- <v-select
279
- placeholder='用户类型'
280
- class="select select_list"
281
-
282
- :value.sync="model.f_usertype"
283
- :value-single="true"
284
- :options='$parent.$parent.usertypes'
285
- v-model="model.f_usertype"
286
- condition="f_user_type = '{}'"
287
- close-on-select clear-button></v-select>
288
- </div>
289
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
290
-
291
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
292
- <label class="font_normal_body" style="color: red;">安检筛选</label>
293
- <v-select
294
- placeholder='安检筛选'
295
- :value-single="true"
296
-
297
- class="select select_list"
298
- :value.sync="$parent.$parent.SafeCheckXZ"
299
- :options='$parent.$parent.SafeCheckXZs'
300
- v-model="$parent.$parent.SafeCheckXZ"
301
- close-on-select clear-button></v-select>
302
- </div>
303
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
304
- <label class="font_normal_body">用气性质</label>
305
- <v-select
306
- class="select_list select"
307
- placeholder='用气性质' style="width: 60%"
308
- v-model='model.userType'
309
- :value.sync="model.userType"
310
- :options='$parent.$parent.userTypes'
311
- condition="f_gasproperties = '{}'"
312
- :value-single="true"
313
- close-on-select clear-button></v-select>
314
- </div>
315
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
316
- <label class="font_normal_body">气表类型</label>
317
- <v-select
318
- class="select_list select"
319
- placeholder='气表类型' style="width: 60%"
320
- v-model='model.tableType'
321
- :value.sync="model.tableType"
322
- :options='$parent.$parent.tableTypes'
323
- condition="f_meter_classify = '{}'"
324
- :value-single="true"
325
- close-on-select clear-button></v-select>
326
- </div>
327
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
328
- <label class="font_normal_body">气表品牌</label>
329
- <v-select
330
- class="select_list select"
331
- placeholder='气表类型' style="width: 60%"
332
- v-model='model.tableBrand'
333
- :value.sync="model.tableBrand"
334
- :options='$parent.$parent.tableBrands'
335
- condition="f_meter_brand = '{}'"
336
- :value-single="true"
337
- close-on-select clear-button></v-select>
338
- </div>
339
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
340
- <label class="font_normal_body">网&ensp;格&ensp;员</label>
341
- <v-select class="select_list select"
342
- placeholder='请选择' style="width: 60%"
343
- :value.sync="model.f_book_checker" v-model="model.f_book_checker"
344
- :options='$parent.$parent.users'
345
- filer-key="name"
346
- close-on-select clear-button
347
- condition="f_book_checker like '%{}%' and f_checker_name = '{}'"
348
- :value-single="true">
349
- </v-select>
350
- </div>
351
- </div>
352
- <div class="row" v-show="$parent.$parent.$parent.showItem">
353
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
354
- <label class="font_normal_body">安检起始</label>
355
- <datepicker
356
- :value.sync="model.f_check_start"
357
- placeholder='最后安检时间起始'
358
- :disabled-days-of-week="[]"
359
- style="width: 60%"
360
- :format="'yyyy-MM-dd'"
361
- :show-rest-button="reset"
362
- v-model="model.f_check_start">
363
- </datepicker>
364
- </div>
365
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
366
- <label class="font_normal_body">安检结束</label>
367
- <datepicker
368
- :value.sync="model.f_check_end"
369
- placeholder='最后安检时间结束'
370
- style="width: 60%"
371
- :disabled-days-of-week="[]"
372
- :format="'yyyy-MM-dd'"
373
- :show-rest-button="reset"
374
- v-model="model.f_check_end">
375
- </datepicker>
376
- </div>
377
-
378
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
379
- <label class="font_normal_body">安检状态</label>
380
- <v-select
381
- placeholder='安检状态'
382
- class="select select_list"
383
-
384
- :value.sync="model.f_last_check_state"
385
- :value-single="true"
386
- :options='$parent.$parent.checkstatus'
387
- v-model="model.f_last_check_state"
388
- condition="f_last_check_state = '{}'"
389
- close-on-select clear-button></v-select>
390
- </div>
391
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
392
- <label class="font_normal_body">隐患情况</label>
393
- <v-select
394
- placeholder='隐患情况'
395
- class="select select_list"
396
-
397
- :value-single="true"
398
- v-model='model.f_check_result'
399
- :value.sync="model.f_check_result"
400
- :options='$parent.$parent.f_check_results'
401
- condition="f_last_check_result like '%{}%'"
402
- close-on-select clear-button></v-select>
403
- </div>
404
-
405
- </div>
406
- <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
407
- <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
408
- <label class="font_normal_body">公&emsp;&emsp;司</label>
409
- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
410
- </right-tree>
411
- </div>
412
-
413
- </div>-->
414
- </div>
415
- </criteria>
416
- <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
417
- <template partial='head'>
418
- <tr>
419
- <th>
420
- <nobr>用户编号</nobr>
421
- </th>
422
- <th>
423
- <nobr>用户名称</nobr>
424
- </th>
425
- <th>
426
- <nobr>用户电话</nobr>
427
- </th>
428
- <th>
429
- <nobr>燃气表号</nobr>
430
- </th>
431
- <th>
432
- <nobr>气表品牌</nobr>
433
- </th>
434
- <th>
435
- <nobr>用户类型</nobr>
436
- </th>
437
- <!-- <th>-->
438
- <!-- <nobr>壁挂炉</nobr>-->
439
- <!-- </th>-->
440
- <!-- <th>-->
441
- <!-- <nobr>灶具</nobr>-->
442
- <!-- </th>-->
443
- <th>
444
- <nobr>区域</nobr>
445
- </th>
446
- <th>
447
- <nobr>小区名称</nobr>
448
- </th>
449
- <th style="padding: 0 40px">
450
- <nobr>地址</nobr>
451
- </th>
452
- <th>
453
- <nobr>安检员</nobr>
454
- </th>
455
- <th>
456
- <nobr>安检员备注</nobr>
457
- </th>
458
- <th>
459
- <nobr>表具出厂日期</nobr>
460
- </th>
461
- <th>
462
- <nobr>最后一次安检日期</nobr>
463
- </th>
464
- <th>
465
- <nobr>最后一次安检状态</nobr>
466
- </th>
467
- <th>
468
- <nobr>安检结果</nobr>
469
- </th>
470
- </tr>
471
- </template>
472
- <template partial='body'>
473
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
474
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
475
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
476
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
477
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
478
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
479
- <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
480
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
481
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
482
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
483
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
484
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
485
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_factory_date }}</td>
486
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
487
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
488
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
489
- {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
490
- </td>
491
- </template>
492
- </data-grid>
493
- </criteria-paged>
494
- </div>
495
- </template>
496
-
497
- <script>
498
- import {PagedList} from 'vue-client'
499
- import {HttpResetClass} from 'vue-client'
500
- import co from 'co'
501
- import * as Util from '../../Util'
502
- import Vue from 'vue'
503
-
504
- // let select = function * (self,userid) {
505
- // let http = new HttpResetClass()
506
- // let getGasman = yield http.load('POST','/rs/search', {
507
- // source: 'this.getChildByName($安检员$).getUsers()',
508
- // userid: userid
509
- // }, {resolveMsg: null, rejectMsg: null})
510
- // //tag
511
- // getGasman.data.forEach((checker)=>{
512
- // self.checkersid.push({label:checker.name,value:checker.id})
513
- // })
514
- // self.checkersid.push({label:'全部',value:''})
515
- // }
516
-
517
-
518
- export default {
519
- title: '用户安检情况',
520
- data() {
521
- let options = []
522
- let year = (new Date()).getFullYear()
523
- for (let i = year; i <= year + 3; i++)
524
- options.push({label: i + '', value: i + ''})
525
- let moptions = []
526
- for (let i = 1; i <= 12; i++)
527
- moptions.push({label: i + '', value: i + ''})
528
-
529
- return {
530
- searchData: {
531
- condition: '1=1',
532
- orderitem: "f_userinfo_code",
533
- timetype: "dd",
534
- f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
535
-
536
- },
537
- excelHeaders: {
538
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
539
-
540
- 'f_userinfo_code': '用户编号',
541
- 'f_user_name': '用户名称',
542
- 'f_user_phone': '用户电话',
543
- 'f_meternumber': '燃气表号',
544
- 'f_meter_brand': '气表品牌',
545
- // 'count_item': '安检次数',
546
- 'f_user_type': '用户类型',
547
- 'f_checker_name': '安检员',
548
- 'f_comments': '安检备注',
549
- 'f_slice_area': '区域',
550
- 'f_residential_area': '小区名称',
551
- 'f_address': '地址',
552
- 'f_factory_date': '表具出厂日期',
553
- 'f_last_check_date': '最后一次安检日期',
554
- 'f_last_check_state': '最后一次安检状态',
555
- 'f_defect_content': '安检结果'
556
- },
557
- model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
558
- orderitem: "'f_last_check_date desc'",
559
- timetype: "'dd'",
560
- f_defect_content: 'this.f_defect_content'
561
- }),
562
- users:[{label: '全部', value: ''}],
563
- f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
564
- orgstrs: [{label: '全部', value: ''}],
565
- checkersid: [],
566
- SafeCheckXZ: '',
567
- civil: '', //民用安检周期
568
- civilian: '', //非民用安检周期
569
- SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
570
- SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
571
- // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
572
- IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
573
- IsShare: '否',
574
- checker: {},
575
- NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
576
- criteriaShow: false,
577
- checkers: [],
578
- chosenOrg: {id: 0},
579
- showModal: false,
580
- checkedAll: false,
581
- checkrows: [],
582
- adjustables: [],
583
- f_plan_year: year + '',
584
- f_plan_month: moptions[new Date().getMonth()].value,
585
- f_effective_start_time: '', //计划有效起始时间
586
- f_effective_end_time: '', //计划有效结束时间
587
- checkboxModel: {},
588
- c_year_list: options,
589
- c_month_list: moptions,
590
- areas: this.areas(),
591
- checkstatus: this.checkstatus(),
592
- usertypes: this.usertypes(),
593
- userstates: this.userstates(),
594
- sqlname: '',
595
- f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
596
- creatPlanWay: '',
597
- userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
598
- tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
599
- tableBrands: [{label: '全部', value: ''}],
600
- sliceArea: [],
601
- cbcs: [],
602
- cbc: [],
603
- pcds: [],
604
-
605
- }
606
- },
607
- props: {
608
- style: {
609
- type: String,
610
- default: 'col-sm-2 form-group'
611
- },
612
- style2: {
613
- type: String,
614
- default: 'col-sm-4 form-group'
615
- },
616
- checkplan: { // 传入一条安检计划信息
617
- type: Object
618
- },
619
- additemshow: {
620
- type: Boolean,
621
- default: false
622
- }
623
- },
624
- ready() {
625
- // 获取分公司信息
626
- this.model.f_defect_content = this.f_defect_content
627
-
628
- //this.getfengongsi()
629
- this.model.chosenOrg = {id: 0}
630
- this.model.f_filialeids = this.$login.f.f_orgids
631
- this.model.f_filiale = this.$login.f.f_fengongsi
632
- this.model.f_OrgStr = this.$login.f.orgpathstr
633
- this.Mreadibook(`('${this.$login.f.orgid}')`)
634
- this.getAllMeterBook(`('${this.$login.f.orgid}')`)
635
- this.getTableBrands()
636
- this.initBookChecker()
637
-
638
- },
639
- methods: {
640
- initBookChecker(){
641
- new HttpResetClass().load('POST', '/rs/search', {
642
- data: {
643
- source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($网格员$) != -1)`,
644
- userid: this.$login.f.id
645
- }
646
- }, {resolveMsg: null, rejectMsg: null}).then(res=>{
647
- let data = res.data
648
- const addedNames = new Set()
649
- this.users = []
650
- data.forEach(user => {
651
- if (user.state === '在职') {
652
- if (!addedNames.has(user.name)) {
653
- this.users.push({ label: user.name, value: user.name })
654
- addedNames.add(user.name)
655
- }
656
- }
657
- });
658
- })
659
- },
660
- getTableBrands() {
661
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
662
- {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
663
- {resolveMsg: null, rejectMsg: null}).then((resp) => {
664
- resp.data.forEach((result) => {
665
- this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
666
- })
667
- })
668
- },
669
- //获取省市区列表
670
- getPcd(val) {
671
- this.pcds = [{label: '全部', value: ''}]
672
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
673
- {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
674
- {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
675
- pcdlist.data.forEach((result) => {
676
- this.pcds.push({label: result.f_pcd, value: result.id})
677
- })
678
- })
679
- },
680
- getmeterbook(val) {
681
-
682
- //tag
683
- this.cbc = []
684
- this.cbc.push({
685
- label: '全部',
686
- value: ''
687
- })
688
- if (val == '') {
689
-
690
- this.cbcs.forEach(res => {
691
- this.cbc.push({
692
- label: res.f_book_name,
693
- value: res.id
694
- })
695
- })
696
- } else {
697
- this.cbcs.forEach(res => {
698
- if (res.f_book_slice_area == val) {
699
- this.cbc.push({
700
- label: res.f_book_name,
701
- value: res.id
702
- })
703
- }
704
- })
705
- }
706
- },
707
- Mreadibook(val) {
708
- ////tag
709
- ////tag
710
- this.sliceArea = []
711
- if (val) {
712
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
713
- data: {
714
- items: 'name',
715
- tablename: 't_zone',
716
- condition: `parentid in ${val}`,
717
- orderitem: 'id'
718
- }
719
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
720
- this.sliceArea.push({
721
- label: '全部',
722
- value: ''
723
- })
724
- res.data.forEach(ress => {
725
- this.sliceArea.push({
726
- label: ress.name,
727
- value: ress.name
728
- })
729
- })
730
-
731
- })
732
- }
733
- },
734
- // 获取县域分公司内容
735
- getfengongsi() {
736
- let val = {
737
- source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
738
- userid: `${this.$login.f.id}`
739
- }
740
- let http = new HttpResetClass()
741
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
742
- res.data.forEach((item) => {
743
- this.orgstrs.push({label: item.name, value: item.id})
744
- })
745
- //tag
746
- })
747
- },
748
- // 县域分公司发生改变
749
- // orgstrchange(val){
750
- // if(val == undefined || val == ''){
751
- // return
752
- // }else {
753
- // this.checkersid = []
754
- // let gen = select(this,val)
755
- // return co(gen)
756
- // }
757
- // },
758
- getDefect(val) {
759
- if (val) {
760
- try {
761
- var defect = JSON.parse(val)
762
- return defect.result
763
- } catch (e) {
764
- //tag
765
- return '正常'
766
- }
767
- }
768
- return '正常'
769
- },
770
- checkerchange(val) {
771
- this.checkboxModel.f_checker = val.name
772
- this.checkboxModel.f_checker_id = val.id
773
- },
774
- search(args) {
775
- if (this.model.f_filialeids){
776
- args.condition += ` and f_orgid in ${this.model.f_filialeids}`
777
- }
778
- if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
779
- this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
780
- return
781
- }
782
- if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
783
- this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
784
- return
785
- }
786
- //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
787
- // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
788
- let con = '1=1'
789
- this.$emit('filiale-change', con)
790
- con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
791
- con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
792
- con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
793
- con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
794
- con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
795
- if (this.SafeCheckXZ) {
796
- con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
797
- if (this.SafeCheckXZ == '未安检') {
798
- args.condition += ' and ruhuid is null'
799
- } else {
800
- args.condition += ' and ruhuid is not null'
801
- }
802
- }
803
- con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
804
- con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
805
- let condition = {
806
- condition1: args.condition,
807
- condition2: con
808
- }
809
- this.searchData.condition = condition
810
- return this.model.search(condition, args.model)
811
- },
812
- checkstatus() {
813
- return this.$appdata.getParam('安检状态') ? [{
814
- label: '全部',
815
- value: ''
816
- }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
817
- },
818
- usertypes() {
819
- return this.$appdata.getParam('用户类型') ? [{
820
- label: '全部',
821
- value: ''
822
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
823
- },
824
- userstates() {
825
- return this.$appdata.getParam('用户状态') ? [{
826
- label: '全部',
827
- value: ''
828
- }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
829
- },
830
- hiddenr() {
831
- this.$parent.showItem = !this.$parent.showItem
832
- },
833
- hidden() {
834
- this.criteriaShow = !this.criteriaShow
835
- },
836
- confirm() {
837
- if (!this.checkboxModel.f_plan_name) {
838
- this.$showMessage('请填写安检计划名称!')
839
- return
840
- }
841
- // if(this.f_effective_start_time == ''){
842
- // this.$showMessage('请选择有效起始日期!')
843
- // return
844
- // }
845
- // if(this.f_effective_end_time == ''){
846
- // this.$showMessage('请选择有效结束日期!')
847
- // return
848
- // }
849
- if (this.IsShare == '否') {
850
- if (!this.checkboxModel.f_checker_id) {
851
- this.$showMessage('请选择安检员!')
852
- return
853
- }
854
- }
855
- let gen = saveGen(this)
856
- return co(gen)
857
- },
858
- changeStates() {
859
- if (this.checkedAll) {//实现反选/
860
- this.checkrows = [];
861
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
862
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
863
- }
864
- } else {//实现全选
865
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
866
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
867
- }
868
- let _this = this
869
- let condition = this.$refs.paged.$refs.criteria.condition
870
- let url = this.model.url
871
- this.$resetpost(`${url}?pageSize=9999999`, {
872
- data: {
873
- condition: condition,
874
- groupitem: '',
875
- orderitem: 'f_residential_area',
876
- f_usertype: this.model.f_usertype,
877
- f_filialeids: this.model.f_filialeids,
878
- month: this.model.month,
879
- safeCycle: this.model.safeCycle,
880
- f_checktime_start: this.model.f_checktime_start,
881
- f_checktime_end: this.model.f_checktime_end,
882
- SafeCheckSX: this.model.SafeCheckSX,
883
- f_last_check_state: this.model.f_last_check_state
884
- },
885
- }, {resolveMsg: null, rejectMsg: null}, -1).then(
886
- (respanse) => {
887
- if (respanse.data.length >= 5000) {
888
- this.$showMessage("数据量太大,请重新选择")
889
- } else {
890
- _this.checkrows = []
891
- for (let j = 0; j < respanse.data.length; j++) {
892
- _this.checkrows.push(respanse.data[j])
893
- }
894
- //tag;
895
- }
896
- })
897
- }
898
- },
899
- addChecked(item) {
900
- //tag;
901
- if (!item.checked) {
902
- this.checkrows.push(item);
903
- //tag;
904
- } else {
905
- for (let i = 0; i < this.checkrows.length; i++) {
906
- if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
907
- this.checkrows.splice(i, 1)
908
- }
909
- }
910
- }
911
- },
912
- ToshowModal() {
913
- this.creatPlanWay = 'single'
914
- if (this.checkrows.length > 0) {
915
- this.showModal = true
916
- } else {
917
- this.$showMessage("请选择需要安检的用户!")
918
- }
919
- },
920
- FiltrationPlan() {
921
- if (this.model.rows.length == 0) {
922
- this.$showMessage("暂无可生成的计划!")
923
- return
924
- }
925
- this.creatPlanWay = 'filtration'
926
- this.showModal = true
927
- },
928
- AllPlan() {
929
- if (this.model.rows.length == 0) {
930
- this.$showMessage("暂无可生成的计划!")
931
- return
932
- }
933
- this.creatPlanWay = 'all'
934
- this.showModal = true
935
- },
936
- cancel() {
937
- this.showModal = false
938
- },
939
- areas() {
940
- let rs = []
941
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
942
- let temp = {
943
- label: this.$login.f.f_allArea[i].label,
944
- value: this.$login.f.f_allArea[i].label
945
- }
946
- rs.push(temp)
947
- }
948
- return [{label: '全部', value: ''}, ...rs]
949
- },
950
- initAdjustables() {
951
- //tag
952
- let arr = []
953
- let filter = this.$login.f.f_orgids
954
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
955
- let temp = {}
956
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
957
- temp.value = `${item.value.id}`
958
- arr.push(temp)
959
- })
960
- this.adjustables = [{label: '全部', value: ''}, ...arr]
961
- },
962
- getAllMeterBook(val) {
963
- ////tag
964
- ////tag
965
- this.cbcs = []
966
- if (val) {
967
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
968
- data: {
969
- items: 'f_book_name,f_book_slice_area,id',
970
- tablename: 't_meter_book',
971
- condition: `f_filiale_id in ${val}`,
972
- orderitem: 'id'
973
- }
974
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
975
- res.data.forEach(ress => {
976
- this.cbcs.push({
977
- id: ress.id,
978
- f_book_name: ress.f_book_name,
979
- f_book_slice_area: ress.f_book_slice_area
980
- })
981
- })
982
- this.cbc = []
983
- this.cbc.push({
984
- label: '全部',
985
- value: ''
986
- })
987
- this.cbcs.forEach(res => {
988
- this.cbc.push({
989
- label: res.f_book_name,
990
- value: res.id
991
- })
992
- })
993
- })
994
- }
995
- },
996
- getRes(obj) {
997
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
998
- this.Mreadibook(this.model.f_filialeids)
999
- this.getAllMeterBook(this.model.f_filialeids)
1000
- this.getPcd(this.model.f_filialeids)
1001
- }
1002
- },
1003
-
1004
- watch: {
1005
- 'model.f_usertype'(val) {
1006
- if (val == '民用') {
1007
- this.model.safeCycle = this.civil
1008
- } else if (val == '非民用') {
1009
- this.model.safeCycle = this.civilian
1010
- }
1011
- },
1012
- 'model.SafeCheckXZ'(val) {
1013
- this.model.SafeCheckSC = ''
1014
- if (val == '已安检') {
1015
- this.model.SafeCheckCQ = ''
1016
- this.model.SafeCheckSX = {
1017
- f_check_end: '', // 安检时间 查询起始条件
1018
- f_check_start: ''// 安检时间 查询终止条件
1019
- }
1020
- } else {
1021
- // 当使用筛选条件时,清空不需要的条件选项
1022
- this.model.f_issue_start = ''
1023
- this.model.f_issue_end = ''
1024
- this.$refs.paged.$refs.criteria.model.f_check_start = ''
1025
- this.$refs.paged.$refs.criteria.model.f_check_end = ''
1026
- this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
1027
- this.model.month = ''
1028
- if (val == '应安检') {
1029
- this.model.SafeCheckSC = '否'
1030
-
1031
- this.model.f_issue_start = Util.toStartDateString()
1032
- this.model.f_issue_end = Util.toStandardDateString()
1033
- }
1034
- // this.model.f_checktime_start = ''
1035
- // this.model.f_checktime_end = ''
1036
- }
1037
- },
1038
- 'model.SafeCheckSC'(val) {
1039
- if (val == '') {
1040
- this.model.f_issue_start = ''
1041
- this.model.f_issue_end = ''
1042
- }
1043
- },
1044
- // 'checker'(val){
1045
- // //tag
1046
- // if(val){
1047
- // this.checkboxModel.f_checker = this.checker[0].name
1048
- // this.checkboxModel.f_checker_id = this.checker[0].id
1049
- // }
1050
- // },
1051
- 'model.rows'() {
1052
- // if (!this.checkedAll) {//实现反选/
1053
- // this.checkrows = [];
1054
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1055
- var k = false
1056
- for (let j = 0; j < this.checkrows.length; j++) {
1057
- if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1058
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1059
- k = true
1060
- continue
1061
- }
1062
- }
1063
- if (!k) {
1064
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1065
- }
1066
- }
1067
- // } else {//实现全选
1068
- // // this.checkboxModel = {};
1069
- // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1070
- // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1071
- // }
1072
- // }
1073
- }
1074
- },
1075
- computed: {
1076
- selected() {
1077
- return this.$refs.paged.$refs.grid.selected
1078
- }
1079
- }
1080
- }
1081
- </script>
1082
- <style scoped>
1083
- .newcolor {
1084
- color: red;
1085
- }
1086
-
1087
- .table th {
1088
- background-color: #f2f6fa;
1089
- color: black;
1090
- }
1091
- </style>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">用户编号</label>
9
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
+ id="f_userinfo_code"
11
+
12
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
13
+ </div>
14
+ <div :class="$parent.$parent.style">
15
+ <label class="font_normal_body">用户姓名</label>
16
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
17
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
18
+ </div>
19
+ <div :class="$parent.$parent.style">
20
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
21
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
22
+ id="f_residential_area"
23
+ placeholder="小区" condition="f_residential_area like '%{}%'">
24
+ </div>
25
+ <div :class="$parent.$parent.style">
26
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
27
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
28
+ placeholder="地址" condition="f_address like '%{}%'">
29
+ </div>
30
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
31
+ <export-excel-safe :data="$parent.$parent.searchData"
32
+ :field="$parent.$parent.excelHeaders"
33
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
34
+ template-name='用户安检情况' :choose-col="true"></export-excel-safe>
35
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
36
+ <div style="float: right" class="button_spacing"
37
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
38
+ @click="$parent.$parent.hiddenr()"></div>
39
+ <div style="float: right" class="button_spacing"
40
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
41
+ @click="$parent.$parent.hidden()">
42
+
43
+ </div>
44
+ </div>
45
+
46
+
47
+ </div>
48
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
49
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
50
+ <label class="font_normal_body">用户类型</label>
51
+ <v-select id="f_usertype"
52
+ placeholder='用户类型'
53
+ class="select select_list"
54
+ :value.sync="model.f_usertype"
55
+ :value-single="true"
56
+ :options='$parent.$parent.usertypes'
57
+ v-model="model.f_usertype"
58
+ condition="f_user_type = '{}'"
59
+ close-on-select clear-button></v-select>
60
+ </div>
61
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
62
+
63
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
64
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
65
+ <v-select
66
+ placeholder='安检筛选'
67
+ :value-single="true"
68
+ class="select select_list"
69
+ :value.sync="$parent.$parent.SafeCheckXZ"
70
+ :options='$parent.$parent.SafeCheckXZs'
71
+ v-model="$parent.$parent.SafeCheckXZ"
72
+ close-on-select clear-button></v-select>
73
+ </div>
74
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
75
+ <label class="font_normal_body">安检起始</label>
76
+ <datepicker
77
+ :value.sync="model.f_check_start"
78
+ placeholder='最后安检时间起始'
79
+ style="width: 60%"
80
+ :format="'yyyy-MM-dd 00:00:00'"
81
+ :show-rest-button="reset"
82
+ v-model="model.f_check_start">
83
+ </datepicker>
84
+ </div>
85
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
86
+ <label class="font_normal_body">安检结束</label>
87
+ <datepicker
88
+ :value.sync="model.f_check_end"
89
+ placeholder='最后安检时间结束'
90
+ style="width: 60%"
91
+ :format="'yyyy-MM-dd 23:59:59'"
92
+ :show-rest-button="reset"
93
+ v-model="model.f_check_end">
94
+ </datepicker>
95
+ </div>
96
+
97
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
98
+ <label class="font_normal_body">安检状态</label>
99
+ <v-select id="f_entry"
100
+ placeholder='安检状态'
101
+ class="select select_list"
102
+ :value.sync="model.f_last_check_state"
103
+ :value-single="true"
104
+ :options='$parent.$parent.checkstatus'
105
+ v-model="model.f_last_check_state"
106
+ condition="f_last_check_state = '{}'"
107
+ close-on-select clear-button></v-select>
108
+ </div>
109
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
110
+ <label class="font_normal_body">隐患情况</label>
111
+ <v-select
112
+ placeholder='隐患情况'
113
+ class="select select_list"
114
+ :value-single="true"
115
+ v-model='model.f_check_result'
116
+ :value.sync="model.f_check_result"
117
+ :options='$parent.$parent.f_check_results'
118
+ condition="f_last_check_result like '%{}%'"
119
+ close-on-select clear-button></v-select>
120
+ </div>
121
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
122
+ </div>
123
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
124
+
125
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
126
+ <role-selector-safe
127
+ role-name="安检员"
128
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
129
+ @re-res="$parent.$parent.getRes"
130
+ :value.sync="model.f_checker_id"
131
+ v-model="model.f_checker_id"
132
+ :value-multiple="true"
133
+ condition=" f_checker_name in {}">
134
+ </role-selector-safe>
135
+ </div>
136
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
137
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
138
+ <v-select class="select_list select"
139
+ placeholder='片区/管理站' style="width: 60%"
140
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
+ :options='$parent.$parent.sliceArea'
142
+ filer-key="name"
143
+ close-on-select clear-button
144
+ condition="f_slice_area='{}'"
145
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
146
+ :value-single="true">
147
+ </v-select>
148
+ </div>
149
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
151
+ <v-select class="select_list select"
152
+ placeholder='抄表册' style="width: 60%"
153
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
154
+ :options='$parent.$parent.cbc'
155
+ filer-key="name"
156
+ close-on-select clear-button
157
+ condition="f_meter_book_num={}"
158
+ :value-single="true">
159
+ </v-select>
160
+ </div>
161
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
+ <label class="font_normal_body">区&emsp;&emsp;域</label>
163
+ <v-select class="select_list select"
164
+ placeholder='请选择' style="width: 60%"
165
+ :value.sync="model.f_pcd" v-model="model.f_pcd"
166
+ :options='$parent.$parent.pcds'
167
+ filer-key="name"
168
+ close-on-select clear-button
169
+ condition="f_pcd_id ='{}'"
170
+ :value-single="true">
171
+ </v-select>
172
+ </div>
173
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
174
+ <label class="font_normal_body">用户状态</label>
175
+ <v-select class="select_list select"
176
+ placeholder='用户状态' style="width: 60%"
177
+ :value.sync="model.f_user_state" v-model="model.f_user_state"
178
+ :options='$parent.$parent.userstates'
179
+ close-on-select clear-button
180
+ condition="f_user_state = '{}'"
181
+ :value-single="true">
182
+ </v-select>
183
+ </div>
184
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
185
+ <label class="font_normal_body">用气性质</label>
186
+ <v-select
187
+ class="select_list select"
188
+ placeholder='用气性质' style="width: 60%"
189
+ v-model='model.userType'
190
+ :value.sync="model.userType"
191
+ :options='$parent.$parent.userTypes'
192
+ condition="f_gasproperties = '{}'"
193
+ :value-single="true"
194
+ close-on-select clear-button></v-select>
195
+ </div>
196
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
197
+ <label class="font_normal_body">气表类型</label>
198
+ <v-select
199
+ class="select_list select"
200
+ placeholder='气表类型' style="width: 60%"
201
+ v-model='model.tableType'
202
+ :value.sync="model.tableType"
203
+ :options='$parent.$parent.tableTypes'
204
+ condition="f_meter_classify = '{}'"
205
+ :value-single="true"
206
+ close-on-select clear-button></v-select>
207
+ </div>
208
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
209
+ <label class="font_normal_body">气表品牌</label>
210
+ <v-select
211
+ class="select_list select"
212
+ placeholder='气表类型' style="width: 60%"
213
+ v-model='model.tableBrand'
214
+ :value.sync="model.tableBrand"
215
+ :options='$parent.$parent.tableBrands'
216
+ condition="f_meter_brand = '{}'"
217
+ :value-single="true"
218
+ close-on-select clear-button></v-select>
219
+ </div>
220
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
221
+ <label class="font_normal_body">网&ensp;格&ensp;员</label>
222
+ <v-select class="select_list select"
223
+ placeholder='请选择' style="width: 60%"
224
+ :value.sync="model.f_book_checker" v-model="model.f_book_checker"
225
+ :options='$parent.$parent.users'
226
+ filer-key="name"
227
+ close-on-select clear-button
228
+ condition="f_book_checker like '%{}%' and f_checker_name = '{}'"
229
+ :value-single="true">
230
+ </v-select>
231
+ </div>
232
+ </div>
233
+
234
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
235
+ <div :class="$parent.$parent.style">
236
+ <label class="font_normal_body">用户编号</label>
237
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
238
+
239
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
240
+ </div>
241
+ <div :class="$parent.$parent.style">
242
+ <label class="font_normal_body">用户姓名</label>
243
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name"
244
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
245
+ </div>
246
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
247
+ <export-excel-safe :data="$parent.$parent.searchData"
248
+ :field="$parent.$parent.excelHeaders"
249
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
250
+ template-name='用户安检情况' :choose-col="true"></export-excel-safe>
251
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
252
+ <div style="float: right" class="button_spacing"
253
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
254
+ @click="$parent.$parent.hiddenr()"></div>
255
+ <div style="float: right" class="button_spacing"
256
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
257
+ @click="$parent.$parent.hidden()">
258
+
259
+ </div>
260
+ </div>
261
+
262
+ </div>
263
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
264
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
265
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
266
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
267
+
268
+ placeholder="小区" condition="f_residential_area like '%{}%'">
269
+ </div>
270
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
271
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
272
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address"
273
+
274
+ placeholder="地址" condition="f_address like '%{}%'">
275
+ </div>
276
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
277
+ <label class="font_normal_body">用户类型</label>
278
+ <v-select
279
+ placeholder='用户类型'
280
+ class="select select_list"
281
+
282
+ :value.sync="model.f_usertype"
283
+ :value-single="true"
284
+ :options='$parent.$parent.usertypes'
285
+ v-model="model.f_usertype"
286
+ condition="f_user_type = '{}'"
287
+ close-on-select clear-button></v-select>
288
+ </div>
289
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
290
+
291
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
292
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
293
+ <v-select
294
+ placeholder='安检筛选'
295
+ :value-single="true"
296
+
297
+ class="select select_list"
298
+ :value.sync="$parent.$parent.SafeCheckXZ"
299
+ :options='$parent.$parent.SafeCheckXZs'
300
+ v-model="$parent.$parent.SafeCheckXZ"
301
+ close-on-select clear-button></v-select>
302
+ </div>
303
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
304
+ <label class="font_normal_body">用气性质</label>
305
+ <v-select
306
+ class="select_list select"
307
+ placeholder='用气性质' style="width: 60%"
308
+ v-model='model.userType'
309
+ :value.sync="model.userType"
310
+ :options='$parent.$parent.userTypes'
311
+ condition="f_gasproperties = '{}'"
312
+ :value-single="true"
313
+ close-on-select clear-button></v-select>
314
+ </div>
315
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
316
+ <label class="font_normal_body">气表类型</label>
317
+ <v-select
318
+ class="select_list select"
319
+ placeholder='气表类型' style="width: 60%"
320
+ v-model='model.tableType'
321
+ :value.sync="model.tableType"
322
+ :options='$parent.$parent.tableTypes'
323
+ condition="f_meter_classify = '{}'"
324
+ :value-single="true"
325
+ close-on-select clear-button></v-select>
326
+ </div>
327
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
328
+ <label class="font_normal_body">气表品牌</label>
329
+ <v-select
330
+ class="select_list select"
331
+ placeholder='气表类型' style="width: 60%"
332
+ v-model='model.tableBrand'
333
+ :value.sync="model.tableBrand"
334
+ :options='$parent.$parent.tableBrands'
335
+ condition="f_meter_brand = '{}'"
336
+ :value-single="true"
337
+ close-on-select clear-button></v-select>
338
+ </div>
339
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
340
+ <label class="font_normal_body">网&ensp;格&ensp;员</label>
341
+ <v-select class="select_list select"
342
+ placeholder='请选择' style="width: 60%"
343
+ :value.sync="model.f_book_checker" v-model="model.f_book_checker"
344
+ :options='$parent.$parent.users'
345
+ filer-key="name"
346
+ close-on-select clear-button
347
+ condition="f_book_checker like '%{}%' and f_checker_name = '{}'"
348
+ :value-single="true">
349
+ </v-select>
350
+ </div>
351
+ </div>
352
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
353
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
354
+ <label class="font_normal_body">安检起始</label>
355
+ <datepicker
356
+ :value.sync="model.f_check_start"
357
+ placeholder='最后安检时间起始'
358
+ :disabled-days-of-week="[]"
359
+ style="width: 60%"
360
+ :format="'yyyy-MM-dd'"
361
+ :show-rest-button="reset"
362
+ v-model="model.f_check_start">
363
+ </datepicker>
364
+ </div>
365
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
366
+ <label class="font_normal_body">安检结束</label>
367
+ <datepicker
368
+ :value.sync="model.f_check_end"
369
+ placeholder='最后安检时间结束'
370
+ style="width: 60%"
371
+ :disabled-days-of-week="[]"
372
+ :format="'yyyy-MM-dd'"
373
+ :show-rest-button="reset"
374
+ v-model="model.f_check_end">
375
+ </datepicker>
376
+ </div>
377
+
378
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
379
+ <label class="font_normal_body">安检状态</label>
380
+ <v-select
381
+ placeholder='安检状态'
382
+ class="select select_list"
383
+
384
+ :value.sync="model.f_last_check_state"
385
+ :value-single="true"
386
+ :options='$parent.$parent.checkstatus'
387
+ v-model="model.f_last_check_state"
388
+ condition="f_last_check_state = '{}'"
389
+ close-on-select clear-button></v-select>
390
+ </div>
391
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
392
+ <label class="font_normal_body">隐患情况</label>
393
+ <v-select
394
+ placeholder='隐患情况'
395
+ class="select select_list"
396
+
397
+ :value-single="true"
398
+ v-model='model.f_check_result'
399
+ :value.sync="model.f_check_result"
400
+ :options='$parent.$parent.f_check_results'
401
+ condition="f_last_check_result like '%{}%'"
402
+ close-on-select clear-button></v-select>
403
+ </div>
404
+
405
+ </div>
406
+ <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
407
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
408
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
409
+ <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
410
+ </right-tree>
411
+ </div>
412
+
413
+ </div>-->
414
+ </div>
415
+ </criteria>
416
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
417
+ <template partial='head'>
418
+ <tr>
419
+ <th>
420
+ <nobr>用户编号</nobr>
421
+ </th>
422
+ <th>
423
+ <nobr>用户名称</nobr>
424
+ </th>
425
+ <th>
426
+ <nobr>用户电话</nobr>
427
+ </th>
428
+ <th>
429
+ <nobr>燃气表号</nobr>
430
+ </th>
431
+ <th>
432
+ <nobr>气表品牌</nobr>
433
+ </th>
434
+ <th>
435
+ <nobr>用户类型</nobr>
436
+ </th>
437
+ <!-- <th>-->
438
+ <!-- <nobr>壁挂炉</nobr>-->
439
+ <!-- </th>-->
440
+ <!-- <th>-->
441
+ <!-- <nobr>灶具</nobr>-->
442
+ <!-- </th>-->
443
+ <th>
444
+ <nobr>区域</nobr>
445
+ </th>
446
+ <th>
447
+ <nobr>小区名称</nobr>
448
+ </th>
449
+ <th style="padding: 0 40px">
450
+ <nobr>地址</nobr>
451
+ </th>
452
+ <th>
453
+ <nobr>安检员</nobr>
454
+ </th>
455
+ <th>
456
+ <nobr>安检员备注</nobr>
457
+ </th>
458
+ <th>
459
+ <nobr>表具出厂日期</nobr>
460
+ </th>
461
+ <th>
462
+ <nobr>最后一次安检日期</nobr>
463
+ </th>
464
+ <th>
465
+ <nobr>最后一次安检状态</nobr>
466
+ </th>
467
+ <th>
468
+ <nobr>安检结果</nobr>
469
+ </th>
470
+ </tr>
471
+ </template>
472
+ <template partial='body'>
473
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_userinfo_code }}</td>
474
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_name }}</td>
475
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_user_phone }}</td>
476
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meternumber }}</td>
477
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{ row.f_meter_brand }}</td>
478
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_user_type }}</td>
479
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
480
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_slice_area }}</td>
481
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_residential_area }}</td>
482
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_address }}</td>
483
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_checker_name }}</td>
484
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_comments }}</td>
485
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_factory_date }}</td>
486
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_date }}</td>
487
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_last_check_state }}</td>
488
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">
489
+ {{ $parent.$parent.$parent.getDefect(row.f_last_check_result) }}
490
+ </td>
491
+ </template>
492
+ </data-grid>
493
+ </criteria-paged>
494
+ </div>
495
+ </template>
496
+
497
+ <script>
498
+ import {PagedList} from 'vue-client'
499
+ import {HttpResetClass} from 'vue-client'
500
+ import co from 'co'
501
+ import * as Util from '../../Util'
502
+ import Vue from 'vue'
503
+
504
+ // let select = function * (self,userid) {
505
+ // let http = new HttpResetClass()
506
+ // let getGasman = yield http.load('POST','/rs/search', {
507
+ // source: 'this.getChildByName($安检员$).getUsers()',
508
+ // userid: userid
509
+ // }, {resolveMsg: null, rejectMsg: null})
510
+ // //tag
511
+ // getGasman.data.forEach((checker)=>{
512
+ // self.checkersid.push({label:checker.name,value:checker.id})
513
+ // })
514
+ // self.checkersid.push({label:'全部',value:''})
515
+ // }
516
+
517
+
518
+ export default {
519
+ title: '用户安检情况',
520
+ data() {
521
+ let options = []
522
+ let year = (new Date()).getFullYear()
523
+ for (let i = year; i <= year + 3; i++)
524
+ options.push({label: i + '', value: i + ''})
525
+ let moptions = []
526
+ for (let i = 1; i <= 12; i++)
527
+ moptions.push({label: i + '', value: i + ''})
528
+
529
+ return {
530
+ searchData: {
531
+ condition: '1=1',
532
+ orderitem: "f_userinfo_code",
533
+ timetype: "dd",
534
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
535
+
536
+ },
537
+ excelHeaders: {
538
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
539
+
540
+ 'f_userinfo_code': '用户编号',
541
+ 'f_user_name': '用户名称',
542
+ 'f_user_phone': '用户电话',
543
+ 'f_meternumber': '燃气表号',
544
+ 'f_meter_brand': '气表品牌',
545
+ // 'count_item': '安检次数',
546
+ 'f_user_type': '用户类型',
547
+ 'f_checker_name': '安检员',
548
+ 'f_comments': '安检备注',
549
+ 'f_slice_area': '区域',
550
+ 'f_residential_area': '小区名称',
551
+ 'f_address': '地址',
552
+ 'f_factory_date': '表具出厂日期',
553
+ 'f_last_check_date': '最后一次安检日期',
554
+ 'f_last_check_state': '最后一次安检状态',
555
+ 'f_defect_content': '安检结果'
556
+ },
557
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
558
+ orderitem: "'f_last_check_date desc'",
559
+ timetype: "'dd'",
560
+ f_defect_content: 'this.f_defect_content'
561
+ }),
562
+ users:[{label: '全部', value: ''}],
563
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', ua.f_last_check_result ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( ua.f_last_check_result, len( ua.f_last_check_result ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
564
+ orgstrs: [{label: '全部', value: ''}],
565
+ checkersid: [],
566
+ SafeCheckXZ: '',
567
+ civil: '', //民用安检周期
568
+ civilian: '', //非民用安检周期
569
+ SafeCheckXZs: [{label: '全部', value: ''}, {label: '未安检', value: '未安检'}, {label: '已安检', value: '已安检'}], // 安检筛选选项
570
+ SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''}],
571
+ // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
572
+ IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
573
+ IsShare: '否',
574
+ checker: {},
575
+ NoBuys: [{label: '是', value: '是'}, {label: '否', value: '否'}],
576
+ criteriaShow: false,
577
+ checkers: [],
578
+ chosenOrg: {id: 0},
579
+ showModal: false,
580
+ checkedAll: false,
581
+ checkrows: [],
582
+ adjustables: [],
583
+ f_plan_year: year + '',
584
+ f_plan_month: moptions[new Date().getMonth()].value,
585
+ f_effective_start_time: '', //计划有效起始时间
586
+ f_effective_end_time: '', //计划有效结束时间
587
+ checkboxModel: {},
588
+ c_year_list: options,
589
+ c_month_list: moptions,
590
+ areas: this.areas(),
591
+ checkstatus: this.checkstatus(),
592
+ usertypes: this.usertypes(),
593
+ userstates: this.userstates(),
594
+ sqlname: '',
595
+ f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '有隐患', value: '有隐患'}],
596
+ creatPlanWay: '',
597
+ userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
598
+ tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
599
+ tableBrands: [{label: '全部', value: ''}],
600
+ sliceArea: [],
601
+ cbcs: [],
602
+ cbc: [],
603
+ pcds: [],
604
+
605
+ }
606
+ },
607
+ props: {
608
+ style: {
609
+ type: String,
610
+ default: 'col-sm-2 form-group'
611
+ },
612
+ style2: {
613
+ type: String,
614
+ default: 'col-sm-4 form-group'
615
+ },
616
+ checkplan: { // 传入一条安检计划信息
617
+ type: Object
618
+ },
619
+ additemshow: {
620
+ type: Boolean,
621
+ default: false
622
+ }
623
+ },
624
+ ready() {
625
+ // 获取分公司信息
626
+ this.model.f_defect_content = this.f_defect_content
627
+
628
+ //this.getfengongsi()
629
+ this.model.chosenOrg = {id: 0}
630
+ this.model.f_filialeids = this.$login.f.f_orgids
631
+ this.model.f_filiale = this.$login.f.f_fengongsi
632
+ this.model.f_OrgStr = this.$login.f.orgpathstr
633
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
634
+ this.getAllMeterBook(`('${this.$login.f.orgid}')`)
635
+ this.getTableBrands()
636
+ this.initBookChecker()
637
+
638
+ },
639
+ methods: {
640
+ initBookChecker(){
641
+ new HttpResetClass().load('POST', '/rs/search', {
642
+ data: {
643
+ source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($网格员$) != -1)`,
644
+ userid: this.$login.f.id
645
+ }
646
+ }, {resolveMsg: null, rejectMsg: null}).then(res=>{
647
+ let data = res.data
648
+ const addedNames = new Set()
649
+ this.users = []
650
+ data.forEach(user => {
651
+ if (user.state === '在职') {
652
+ if (!addedNames.has(user.name)) {
653
+ this.users.push({ label: user.name, value: user.name })
654
+ addedNames.add(user.name)
655
+ }
656
+ }
657
+ });
658
+ })
659
+ },
660
+ getTableBrands() {
661
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
662
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
663
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
664
+ resp.data.forEach((result) => {
665
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
666
+ })
667
+ })
668
+ },
669
+ //获取省市区列表
670
+ getPcd(val) {
671
+ this.pcds = [{label: '全部', value: ''}]
672
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
673
+ {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
674
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
675
+ pcdlist.data.forEach((result) => {
676
+ this.pcds.push({label: result.f_pcd, value: result.id})
677
+ })
678
+ })
679
+ },
680
+ getmeterbook(val) {
681
+
682
+ //tag
683
+ this.cbc = []
684
+ this.cbc.push({
685
+ label: '全部',
686
+ value: ''
687
+ })
688
+ if (val == '') {
689
+
690
+ this.cbcs.forEach(res => {
691
+ this.cbc.push({
692
+ label: res.f_book_name,
693
+ value: res.id
694
+ })
695
+ })
696
+ } else {
697
+ this.cbcs.forEach(res => {
698
+ if (res.f_book_slice_area == val) {
699
+ this.cbc.push({
700
+ label: res.f_book_name,
701
+ value: res.id
702
+ })
703
+ }
704
+ })
705
+ }
706
+ },
707
+ Mreadibook(val) {
708
+ ////tag
709
+ ////tag
710
+ this.sliceArea = []
711
+ if (val) {
712
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
713
+ data: {
714
+ items: 'name',
715
+ tablename: 't_zone',
716
+ condition: `parentid in ${val}`,
717
+ orderitem: 'id'
718
+ }
719
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
720
+ this.sliceArea.push({
721
+ label: '全部',
722
+ value: ''
723
+ })
724
+ res.data.forEach(ress => {
725
+ this.sliceArea.push({
726
+ label: ress.name,
727
+ value: ress.name
728
+ })
729
+ })
730
+
731
+ })
732
+ }
733
+ },
734
+ // 获取县域分公司内容
735
+ getfengongsi() {
736
+ let val = {
737
+ source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
738
+ userid: `${this.$login.f.id}`
739
+ }
740
+ let http = new HttpResetClass()
741
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
742
+ res.data.forEach((item) => {
743
+ this.orgstrs.push({label: item.name, value: item.id})
744
+ })
745
+ //tag
746
+ })
747
+ },
748
+ // 县域分公司发生改变
749
+ // orgstrchange(val){
750
+ // if(val == undefined || val == ''){
751
+ // return
752
+ // }else {
753
+ // this.checkersid = []
754
+ // let gen = select(this,val)
755
+ // return co(gen)
756
+ // }
757
+ // },
758
+ getDefect(val) {
759
+ if (val) {
760
+ try {
761
+ var defect = JSON.parse(val)
762
+ return defect.result
763
+ } catch (e) {
764
+ //tag
765
+ return '正常'
766
+ }
767
+ }
768
+ return '正常'
769
+ },
770
+ checkerchange(val) {
771
+ this.checkboxModel.f_checker = val.name
772
+ this.checkboxModel.f_checker_id = val.id
773
+ },
774
+ search(args) {
775
+ if (this.model.f_filialeids){
776
+ args.condition += ` and f_orgid in ${this.model.f_filialeids}`
777
+ }
778
+ if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
779
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
780
+ return
781
+ }
782
+ if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
783
+ this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
784
+ return
785
+ }
786
+ //args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
787
+ // let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
788
+ let con = '1=1'
789
+ this.$emit('filiale-change', con)
790
+ con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
791
+ con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
792
+ con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
793
+ con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
794
+ con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''
795
+ if (this.SafeCheckXZ) {
796
+ con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
797
+ if (this.SafeCheckXZ == '未安检') {
798
+ args.condition += ' and ruhuid is null'
799
+ } else {
800
+ args.condition += ' and ruhuid is not null'
801
+ }
802
+ }
803
+ con += args.model.f_last_check_state ? ` and f_entry_status = '${args.model.f_last_check_state}'` : ''
804
+ con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ''
805
+ let condition = {
806
+ condition1: args.condition,
807
+ condition2: con
808
+ }
809
+ this.searchData.condition = condition
810
+ return this.model.search(condition, args.model)
811
+ },
812
+ checkstatus() {
813
+ return this.$appdata.getParam('安检状态') ? [{
814
+ label: '全部',
815
+ value: ''
816
+ }, ...this.$appdata.getParam('安检状态')] : [{label: '全部', value: ''}]
817
+ },
818
+ usertypes() {
819
+ return this.$appdata.getParam('用户类型') ? [{
820
+ label: '全部',
821
+ value: ''
822
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
823
+ },
824
+ userstates() {
825
+ return this.$appdata.getParam('用户状态') ? [{
826
+ label: '全部',
827
+ value: ''
828
+ }, ...this.$appdata.getParam('用户状态')] : [{label: '全部', value: ''}]
829
+ },
830
+ hiddenr() {
831
+ this.$parent.showItem = !this.$parent.showItem
832
+ },
833
+ hidden() {
834
+ this.criteriaShow = !this.criteriaShow
835
+ },
836
+ confirm() {
837
+ if (!this.checkboxModel.f_plan_name) {
838
+ this.$showMessage('请填写安检计划名称!')
839
+ return
840
+ }
841
+ // if(this.f_effective_start_time == ''){
842
+ // this.$showMessage('请选择有效起始日期!')
843
+ // return
844
+ // }
845
+ // if(this.f_effective_end_time == ''){
846
+ // this.$showMessage('请选择有效结束日期!')
847
+ // return
848
+ // }
849
+ if (this.IsShare == '否') {
850
+ if (!this.checkboxModel.f_checker_id) {
851
+ this.$showMessage('请选择安检员!')
852
+ return
853
+ }
854
+ }
855
+ let gen = saveGen(this)
856
+ return co(gen)
857
+ },
858
+ changeStates() {
859
+ if (this.checkedAll) {//实现反选/
860
+ this.checkrows = [];
861
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
862
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
863
+ }
864
+ } else {//实现全选
865
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
866
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
867
+ }
868
+ let _this = this
869
+ let condition = this.$refs.paged.$refs.criteria.condition
870
+ let url = this.model.url
871
+ this.$resetpost(`${url}?pageSize=9999999`, {
872
+ data: {
873
+ condition: condition,
874
+ groupitem: '',
875
+ orderitem: 'f_residential_area',
876
+ f_usertype: this.model.f_usertype,
877
+ f_filialeids: this.model.f_filialeids,
878
+ month: this.model.month,
879
+ safeCycle: this.model.safeCycle,
880
+ f_checktime_start: this.model.f_checktime_start,
881
+ f_checktime_end: this.model.f_checktime_end,
882
+ SafeCheckSX: this.model.SafeCheckSX,
883
+ f_last_check_state: this.model.f_last_check_state
884
+ },
885
+ }, {resolveMsg: null, rejectMsg: null}, -1).then(
886
+ (respanse) => {
887
+ if (respanse.data.length >= 5000) {
888
+ this.$showMessage("数据量太大,请重新选择")
889
+ } else {
890
+ _this.checkrows = []
891
+ for (let j = 0; j < respanse.data.length; j++) {
892
+ _this.checkrows.push(respanse.data[j])
893
+ }
894
+ //tag;
895
+ }
896
+ })
897
+ }
898
+ },
899
+ addChecked(item) {
900
+ //tag;
901
+ if (!item.checked) {
902
+ this.checkrows.push(item);
903
+ //tag;
904
+ } else {
905
+ for (let i = 0; i < this.checkrows.length; i++) {
906
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
907
+ this.checkrows.splice(i, 1)
908
+ }
909
+ }
910
+ }
911
+ },
912
+ ToshowModal() {
913
+ this.creatPlanWay = 'single'
914
+ if (this.checkrows.length > 0) {
915
+ this.showModal = true
916
+ } else {
917
+ this.$showMessage("请选择需要安检的用户!")
918
+ }
919
+ },
920
+ FiltrationPlan() {
921
+ if (this.model.rows.length == 0) {
922
+ this.$showMessage("暂无可生成的计划!")
923
+ return
924
+ }
925
+ this.creatPlanWay = 'filtration'
926
+ this.showModal = true
927
+ },
928
+ AllPlan() {
929
+ if (this.model.rows.length == 0) {
930
+ this.$showMessage("暂无可生成的计划!")
931
+ return
932
+ }
933
+ this.creatPlanWay = 'all'
934
+ this.showModal = true
935
+ },
936
+ cancel() {
937
+ this.showModal = false
938
+ },
939
+ areas() {
940
+ let rs = []
941
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
942
+ let temp = {
943
+ label: this.$login.f.f_allArea[i].label,
944
+ value: this.$login.f.f_allArea[i].label
945
+ }
946
+ rs.push(temp)
947
+ }
948
+ return [{label: '全部', value: ''}, ...rs]
949
+ },
950
+ initAdjustables() {
951
+ //tag
952
+ let arr = []
953
+ let filter = this.$login.f.f_orgids
954
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
955
+ let temp = {}
956
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
957
+ temp.value = `${item.value.id}`
958
+ arr.push(temp)
959
+ })
960
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
961
+ },
962
+ getAllMeterBook(val) {
963
+ ////tag
964
+ ////tag
965
+ this.cbcs = []
966
+ if (val) {
967
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
968
+ data: {
969
+ items: 'f_book_name,f_book_slice_area,id',
970
+ tablename: 't_meter_book',
971
+ condition: `f_filiale_id in ${val}`,
972
+ orderitem: 'id'
973
+ }
974
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
975
+ res.data.forEach(ress => {
976
+ this.cbcs.push({
977
+ id: ress.id,
978
+ f_book_name: ress.f_book_name,
979
+ f_book_slice_area: ress.f_book_slice_area
980
+ })
981
+ })
982
+ this.cbc = []
983
+ this.cbc.push({
984
+ label: '全部',
985
+ value: ''
986
+ })
987
+ this.cbcs.forEach(res => {
988
+ this.cbc.push({
989
+ label: res.f_book_name,
990
+ value: res.id
991
+ })
992
+ })
993
+ })
994
+ }
995
+ },
996
+ getRes(obj) {
997
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
998
+ this.Mreadibook(this.model.f_filialeids)
999
+ this.getAllMeterBook(this.model.f_filialeids)
1000
+ this.getPcd(this.model.f_filialeids)
1001
+ }
1002
+ },
1003
+
1004
+ watch: {
1005
+ 'model.f_usertype'(val) {
1006
+ if (val == '民用') {
1007
+ this.model.safeCycle = this.civil
1008
+ } else if (val == '非民用') {
1009
+ this.model.safeCycle = this.civilian
1010
+ }
1011
+ },
1012
+ 'model.SafeCheckXZ'(val) {
1013
+ this.model.SafeCheckSC = ''
1014
+ if (val == '已安检') {
1015
+ this.model.SafeCheckCQ = ''
1016
+ this.model.SafeCheckSX = {
1017
+ f_check_end: '', // 安检时间 查询起始条件
1018
+ f_check_start: ''// 安检时间 查询终止条件
1019
+ }
1020
+ } else {
1021
+ // 当使用筛选条件时,清空不需要的条件选项
1022
+ this.model.f_issue_start = ''
1023
+ this.model.f_issue_end = ''
1024
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
1025
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
1026
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
1027
+ this.model.month = ''
1028
+ if (val == '应安检') {
1029
+ this.model.SafeCheckSC = '否'
1030
+
1031
+ this.model.f_issue_start = Util.toStartDateString()
1032
+ this.model.f_issue_end = Util.toStandardDateString()
1033
+ }
1034
+ // this.model.f_checktime_start = ''
1035
+ // this.model.f_checktime_end = ''
1036
+ }
1037
+ },
1038
+ 'model.SafeCheckSC'(val) {
1039
+ if (val == '') {
1040
+ this.model.f_issue_start = ''
1041
+ this.model.f_issue_end = ''
1042
+ }
1043
+ },
1044
+ // 'checker'(val){
1045
+ // //tag
1046
+ // if(val){
1047
+ // this.checkboxModel.f_checker = this.checker[0].name
1048
+ // this.checkboxModel.f_checker_id = this.checker[0].id
1049
+ // }
1050
+ // },
1051
+ 'model.rows'() {
1052
+ // if (!this.checkedAll) {//实现反选/
1053
+ // this.checkrows = [];
1054
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1055
+ var k = false
1056
+ for (let j = 0; j < this.checkrows.length; j++) {
1057
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1058
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1059
+ k = true
1060
+ continue
1061
+ }
1062
+ }
1063
+ if (!k) {
1064
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1065
+ }
1066
+ }
1067
+ // } else {//实现全选
1068
+ // // this.checkboxModel = {};
1069
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1070
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1071
+ // }
1072
+ // }
1073
+ }
1074
+ },
1075
+ computed: {
1076
+ selected() {
1077
+ return this.$refs.paged.$refs.grid.selected
1078
+ }
1079
+ }
1080
+ }
1081
+ </script>
1082
+ <style scoped>
1083
+ .newcolor {
1084
+ color: red;
1085
+ }
1086
+
1087
+ .table th {
1088
+ background-color: #f2f6fa;
1089
+ color: black;
1090
+ }
1091
+ </style>