safecheck-client 3.0.34-48 → 3.0.34-49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) 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 +3 -3
  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/androidTest.js +20 -20
  121. package/src/bootstrap/less/.csscomb.json +304 -304
  122. package/src/bootstrap/less/.csslintrc +19 -19
  123. package/src/bootstrap/less/alerts.less +73 -73
  124. package/src/bootstrap/less/badges.less +66 -66
  125. package/src/bootstrap/less/breadcrumbs.less +26 -26
  126. package/src/bootstrap/less/button-groups.less +247 -247
  127. package/src/bootstrap/less/buttons.less +172 -172
  128. package/src/bootstrap/less/carousel.less +269 -269
  129. package/src/bootstrap/less/close.less +34 -34
  130. package/src/bootstrap/less/code.less +69 -69
  131. package/src/bootstrap/less/component-animations.less +33 -33
  132. package/src/bootstrap/less/dropdowns.less +216 -216
  133. package/src/bootstrap/less/forms.less +626 -626
  134. package/src/bootstrap/less/grid.less +84 -84
  135. package/src/bootstrap/less/input-groups.less +167 -167
  136. package/src/bootstrap/less/jumbotron.less +52 -52
  137. package/src/bootstrap/less/labels.less +64 -64
  138. package/src/bootstrap/less/list-group.less +141 -141
  139. package/src/bootstrap/less/media.less +66 -66
  140. package/src/bootstrap/less/mixins/alerts.less +14 -14
  141. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  142. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  143. package/src/bootstrap/less/mixins/buttons.less +69 -69
  144. package/src/bootstrap/less/mixins/center-block.less +7 -7
  145. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  146. package/src/bootstrap/less/mixins/forms.less +90 -90
  147. package/src/bootstrap/less/mixins/gradients.less +59 -59
  148. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  149. package/src/bootstrap/less/mixins/grid.less +122 -122
  150. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  151. package/src/bootstrap/less/mixins/image.less +33 -33
  152. package/src/bootstrap/less/mixins/labels.less +12 -12
  153. package/src/bootstrap/less/mixins/list-group.less +30 -30
  154. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  155. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  156. package/src/bootstrap/less/mixins/opacity.less +8 -8
  157. package/src/bootstrap/less/mixins/pagination.less +24 -24
  158. package/src/bootstrap/less/mixins/panels.less +24 -24
  159. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  160. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  161. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  162. package/src/bootstrap/less/mixins/resize.less +6 -6
  163. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  164. package/src/bootstrap/less/mixins/size.less +10 -10
  165. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  166. package/src/bootstrap/less/mixins/table-row.less +44 -44
  167. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  168. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  169. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  170. package/src/bootstrap/less/mixins.less +40 -40
  171. package/src/bootstrap/less/modals.less +151 -151
  172. package/src/bootstrap/less/navbar.less +660 -660
  173. package/src/bootstrap/less/normalize.less +424 -424
  174. package/src/bootstrap/less/pager.less +76 -76
  175. package/src/bootstrap/less/pagination.less +89 -89
  176. package/src/bootstrap/less/panels.less +275 -275
  177. package/src/bootstrap/less/popovers.less +131 -131
  178. package/src/bootstrap/less/print.less +101 -101
  179. package/src/bootstrap/less/progress-bars.less +87 -87
  180. package/src/bootstrap/less/responsive-embed.less +35 -35
  181. package/src/bootstrap/less/responsive-utilities.less +194 -194
  182. package/src/bootstrap/less/scaffolding.less +161 -161
  183. package/src/bootstrap/less/theme.less +291 -291
  184. package/src/bootstrap/less/thumbnails.less +36 -36
  185. package/src/bootstrap/less/tooltip.less +102 -102
  186. package/src/bootstrap/less/type.less +303 -303
  187. package/src/bootstrap/less/utilities.less +55 -55
  188. package/src/bootstrap/less/wells.less +29 -29
  189. package/src/components/FileUpload.vue +696 -696
  190. package/src/components/Hello.vue +39 -39
  191. package/src/components/LeftTree.vue +27 -27
  192. package/src/components/android/AddressList.vue +61 -61
  193. package/src/components/android/AttendanceTally.vue +116 -116
  194. package/src/components/android/Blank.vue +10 -10
  195. package/src/components/android/CheckUnplanPage.vue +56 -56
  196. package/src/components/android/Checker.vue +12 -12
  197. package/src/components/android/CheckerAnnual.vue +81 -81
  198. package/src/components/android/CheckerAvarta.vue +82 -82
  199. package/src/components/android/EquipmentInspection.vue +348 -348
  200. package/src/components/android/FootprintMap.vue +120 -120
  201. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  202. package/src/components/android/MasterMain.vue +77 -77
  203. package/src/components/android/Menu.vue +132 -132
  204. package/src/components/android/NavBottom.vue +157 -157
  205. package/src/components/android/PaperAlarm.vue +85 -85
  206. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  207. package/src/components/android/PlumberAnnual.vue +83 -83
  208. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  209. package/src/components/android/PlumberMonthly.vue +84 -84
  210. package/src/components/android/PostMap.vue +83 -83
  211. package/src/components/android/QueryCheckHistory.vue +122 -122
  212. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  213. package/src/components/android/RepairMain.vue +60 -60
  214. package/src/components/android/Repairman.vue +12 -12
  215. package/src/components/android/StationMaster.vue +12 -12
  216. package/src/components/defects/DefectModal.vue +101 -101
  217. package/src/components/defects/DevicesAndItem.vue +39 -39
  218. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  219. package/src/components/notice/NoticeForm.vue +100 -100
  220. package/src/components/notice/NoticeIssue.vue +20 -20
  221. package/src/components/paper/PicViewer.vue +18 -18
  222. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  223. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  224. package/src/components/phonestate/PostMap.vue +82 -82
  225. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  226. package/src/components/rongcheng/AddPlanItem.vue +315 -319
  227. package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +1045 -1045
  228. package/src/components/rongcheng/AspiratedPaperMessage.vue +1378 -1378
  229. package/src/components/rongcheng/AspiratedUserInfo.vue +399 -399
  230. package/src/components/rongcheng/CheckSearchUser.vue +906 -932
  231. package/src/components/rongcheng/PaperListNPSQ.vue +455 -455
  232. package/src/components/rongcheng/PaperListSQ.vue +444 -444
  233. package/src/components/rongcheng/PaperStatem.vue +419 -419
  234. package/src/components/rongcheng/PhoneDevicesInfo.vue +233 -248
  235. package/src/components/rongcheng/PhoneUpUserinfo.vue +1328 -1328
  236. package/src/components/rongcheng/SafecheckOrderV.vue +2524 -2533
  237. package/src/components/rongcheng/SafecheckOrderVCli.vue +2632 -2641
  238. package/src/components/userfile/MeterFile.vue +145 -145
  239. package/src/components/userfile/MeterModify.vue +46 -46
  240. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  241. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1060
  242. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +735 -720
  243. package/src/filiale/weinan/pc/checkUserList.vue +712 -697
  244. package/src/main.js +2 -2
  245. package/src/plugins/LoadData.js +10 -10
  246. package/src/plugins/LoadParams.js +24 -24
  247. package/src/rongcheng.js +316 -316
  248. package/src/stores/wxconfig.js +10 -10
  249. package/src/utils/getNowDate.js +33 -33
  250. package/test/e2e/custom-assertions/elementCount.js +26 -26
  251. package/test/e2e/nightwatch.conf.js +40 -40
  252. package/test/e2e/runner.js +30 -30
  253. package/test/e2e/specs/test.js +13 -13
  254. package/test/unit/.eslintrc +5 -5
  255. package/test/unit/TestUtil.js +62 -62
  256. package/test/unit/context.html +20 -20
  257. package/test/unit/index.js +13 -13
@@ -1,932 +1,906 @@
1
- <template>
2
- <div style="flex:1;" class="flex">
3
- <button class="btn btn-xs" v-show="!criteriaShow" @click="show()">
4
- <span class="glyphicon glyphicon-chevron-down" style="color: #000;"></span>
5
- </button>
6
- <criteria-paged :model="model" v-ref:paged>
7
- <criteria partial='criteria' v-show="$parent.criteriaShow" @condition-changed='$parent.search' v-ref:criteria>
8
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
- <div class="row">
10
- <div class="col-sm-4" style="width: 20%">
11
- <label class="font_normal_body">用户编号</label>
12
- <input type="text" class="input_search" v-model="model.f_userinfo_code" id="f_userinfo_code" style="width:60%;"
13
- placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
14
- </div>
15
- <div class="col-sm-4" style="width: 20%">
16
- <label class="font_normal_body">用户姓名</label>
17
- <input type="text" class="input_search" v-model="model.f_user_name" id="f_user_name" style="width:60%;"
18
- placeholder="用户姓名" condition="f_user_name like '%{}%'">
19
- </div>
20
- <div class="col-sm-4" style="width: 20%">
21
- <label class="font_normal_body"> &nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
22
- <!-- <input type="text" class="input_search" v-model="model.f_residential_area" id="f_residential_area" style="width:60%;"
23
- placeholder="小区" condition="f_residential_area like '%{}%'">-->
24
- <v-select
25
- placeholder='小区选择'
26
- :value-single="true"
27
- v-model='model.f_residential_area'
28
- :value.sync="model.f_residential_area"
29
- class="select select_list"
30
- :options='$parent.$parent.villagesChick'
31
- condition="f_residential_area like '%{}%'"
32
- close-on-select clear-button search valueSingle="true"> </v-select>
33
- </div>
34
-
35
- <div class="col-sm-4" style="width: 20%">
36
- <label class="font_normal_body"> &nbsp;&nbsp;&nbsp;楼栋&nbsp;&nbsp;&nbsp;</label>
37
- <v-select
38
- placeholder='楼栋选择'
39
- v-model='model.f_building'
40
- :value.sync="model.f_building"
41
- class="select select_list"
42
- :options='$parent.$parent.buildingChick'
43
- condition="f_building in {}"
44
- clear-button search :multiple="true"> </v-select>
45
- </div>
46
-
47
- <div class="col-sm-4" style="width: 20%">
48
- <label class="font_normal_body"> &nbsp;&nbsp;&nbsp;地址&nbsp;&nbsp;&nbsp;</label>
49
- <input type="text" class="input_search" v-model="model.f_address" id="f_address" style="width:60%;"
50
- placeholder="地址" condition="f_address like '%{}%'">
51
- </div>
52
- <!--<div class="col-sm-3 form-group form-input-group" style="width: 20%">-->
53
- <!--<label class="control-label">用户类型</label>-->
54
- <!--<v-select id="f_usertype"-->
55
- <!--placeholder='用户类型'-->
56
- <!--:value.sync="model.f_usertype"-->
57
- <!--:value-single="true"-->
58
- <!--:options='$parent.$parent.usertypes'-->
59
- <!--v-model="model.f_usertype"-->
60
- <!--condition="f_user_type = '{}'"-->
61
- <!--close-on-select clear-button> </v-select>-->
62
- <!--</div>-->
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 && $parent.$parent.SafeCheckXZ=='未入户'">
75
- <label class="font_normal_body">安检状态</label>
76
- <v-select id="f_entry"
77
- placeholder='安检状态'
78
- class="select select_list"
79
- :value.sync="model.f_check_state"
80
- :value-single="true"
81
- :options='$parent.$parent.checkstatus'
82
- v-model="model.f_check_state"
83
- close-on-select clear-button></v-select>
84
- </div>-->
85
- <div class="col-sm-4" style="width: 20%">
86
- <label class="font_normal_body" style="color: red;">安检筛选</label>
87
- <v-select
88
- placeholder='安检筛选'
89
- :value-single="true"
90
- class="select select_list"
91
- :value.sync="$parent.$parent.SafeCheckXZ"
92
- :options='$parent.$parent.SafeCheckXZs'
93
- v-model="$parent.$parent.SafeCheckXZ"
94
- close-on-select clear-button> </v-select>
95
- </div>
96
- <div class="col-sm-4" style="width: 20% " v-show="$parent.$parent.SafeCheckXZ=='未入户'">
97
- <label class="font_normal_body">安检状态</label>
98
- <v-select id="f_entry"
99
- placeholder='安检状态'
100
- :value.sync="model.f_check_state"
101
- :value-single="true"
102
- class="select select_list"
103
- :options='$parent.$parent.checkstatus'
104
- v-model="model.f_check_state"
105
- close-on-select clear-button> </v-select>
106
- </div>
107
- <div class="col-sm-4" style="width: 20%">
108
- <label class="font_normal_body">安检起始</label>
109
- <datepicker
110
- :value.sync="model.f_check_start"
111
- placeholder='最后安检时间起始'
112
- :disabled-days-of-week="[]"
113
- class="select select_list"
114
- style="width: 60%"
115
- :format="'yyyy-MM-dd'"
116
- :show-rest-button="reset"
117
- v-model = "model.f_check_start">
118
- </datepicker>
119
- </div>
120
- <div class="col-sm-4" style="width: 20%">
121
- <label class="font_normal_body">安检结束</label>
122
- <datepicker
123
- :value.sync="model.f_check_end"
124
- placeholder='最后安检时间结束'
125
- :disabled-days-of-week="[]"
126
- class="select select_list"
127
- style="width: 60%"
128
- :format="'yyyy-MM-dd'"
129
- :show-rest-button="reset"
130
- v-model = "model.f_check_end">
131
- </datepicker>
132
- </div>
133
-
134
-
135
- <div class="col-sm-4" style="width: 20%">
136
- <label class="font_normal_body">隐患情况</label>
137
- <v-select
138
- placeholder='隐患情况'
139
- :value-single="true"
140
- v-model='model.f_check_result'
141
- class="select select_list"
142
- :value.sync="model.f_check_result"
143
- :options='$parent.$parent.f_check_results'
144
- condition="f_last_check_result like '%{}%'"
145
- close-on-select clear-button> </v-select>
146
- </div>
147
- <!--<div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.orgstrs.length > 1">
148
- <label class="font_normal_body">县域公司</label>
149
- <v-select
150
- placeholder='县域分公司'
151
- :value-single="true"
152
- v-model='model.f_orgstr'
153
- :value.sync="model.f_orgstr"
154
- class="select select_list"
155
- :options='$parent.$parent.orgstrs'
156
- condition="f_orgstr like '%{}%'"
157
- close-on-select clear-button> </v-select>
158
- </div>-->
159
- <div class="col-sm-4" style="width: 20%">
160
- <label class="font_normal_body">所属区域</label>
161
- <v-select
162
- placeholder='所属区域'
163
- :value-single="true"
164
- v-model='model.street'
165
- :value.sync="model.street"
166
- class="select select_list"
167
- :options='$parent.$parent.streets'
168
- condition="f_street ='{}'"
169
- close-on-select clear-button> </v-select>
170
- </div>
171
- <div class="row">
172
- <div class="col-sm-4" style="width: 20%">
173
- <label class="font_normal_body">开户起始</label>
174
- <datepicker
175
- :value.sync="model.f_createfile_start"
176
- placeholder='开户起始时间'
177
- :disabled-days-of-week="[]"
178
- class="select select_list"
179
- style="width: 60%"
180
- :format="'yyyy-MM-dd'"
181
- :show-rest-button="reset"
182
- condition="f_createfile_date > '{} 00:00:00'"
183
- v-model = "model.f_createfile_start">
184
- </datepicker>
185
- </div>
186
- <div class="col-sm-4" style="width: 20%">
187
- <label class="font_normal_body">开户结束</label>
188
- <datepicker
189
- :value.sync="model.f_createfile_end"
190
- placeholder='开户结束时间'
191
- :disabled-days-of-week="[]"
192
- class="select select_list"
193
- style="width: 60%"
194
- :format="'yyyy-MM-dd'"
195
- condition="f_createfile_date < '{} 23:59:00'"
196
- :show-rest-button="reset"
197
- v-model = "model.f_createfile_end">
198
- </datepicker>
199
- </div>
200
- <!--<div class="col-sm-4" style="width: 20%">
201
- <label class="font_normal_body">是否入户</label>
202
- <v-select
203
- placeholder='今年是否入户'
204
- :value-single="true"
205
- class="select select_list"
206
- :value.sync="$parent.$parent.hasHousehold"
207
- :options='$parent.$parent.safe_rhs'
208
- v-model="$parent.$parent.hasHousehold"
209
- close-on-select clear-button> </v-select>
210
- </div>-->
211
- <div class="col-sm-4" style="width: 20%">
212
- <label class="font_normal_body">安检项名</label>
213
- <v-select
214
- placeholder='安检项名'
215
- :value-single="true"
216
- class="select select_list"
217
- :value.sync="$parent.$parent.check_item"
218
- :options='$parent.$parent.check_items'
219
- v-model="$parent.$parent.check_item"
220
- close-on-select clear-button> </v-select>
221
- </div>
222
- <div class="col-sm-4" style="width: 20%">
223
- <label class="font_normal_body">安检内容</label>
224
- <v-select
225
- placeholder='安检内容'
226
- :value-single="true"
227
- class="select select_list"
228
- :value.sync="$parent.$parent.check_itemValue"
229
- :options='$parent.$parent.check_itemValues'
230
- v-model="$parent.$parent.check_itemValue"
231
- close-on-select clear-button> </v-select>
232
- </div>
233
- <div class="col-sm-4" style="width: 20%">
234
- <label class="font_normal_body">安检员</label>
235
- <v-select
236
- placeholder='安检员'
237
- :value-single="true"
238
- class="select select_list"
239
- :value.sync="model.f_checker_id"
240
- :options='$parent.$parent.checkersid'
241
- v-model="model.f_checker_id"
242
- condition="f_checker_id = '{}'"
243
- close-on-select clear-button> </v-select>
244
- </div>
245
- <div class="col-sm-4" style="width: 20%">
246
- <label class="font_normal_body">安检状态</label>
247
- <v-select
248
- placeholder='安检状态'
249
- :value-single="true"
250
- class="select select_list"
251
- :value.sync="model.f_entry"
252
- :options='$parent.$parent.f_entry_status'
253
- v-model="model.f_entry"
254
- condition="f_last_check_state= '{}'"
255
- close-on-select clear-button> </v-select>
256
- </div>
257
- <div class="col-sm-8"></div>
258
- <div style="float: right;margin-right: 10px">
259
- <export-excel-safe :data="$parent.$parent.searchData"
260
- :field="$parent.$parent.excelHeaders"
261
- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案" template-name='用户安检情况'></export-excel-safe>
262
- <div style="float: right" class="button_spacing"
263
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
264
- @click="$parent.$parent.hiddenr()"></div>
265
- </div>
266
- <div class="span" style = "float:right;margin-right:10px">
267
- <button class="btn btn-primary width-80" @click="search()">查询</button>
268
- </div>
269
- <div class="span" style = "float:right;margin-right:10px">
270
- <button class="btn btn-primary width-80" @click="$parent.$parent.show1()">年度安检率查看</button>
271
- </div>
272
- </div>
273
- </div>
274
- </div>
275
- </criteria>
276
- <data-grid :model="model" partial="list" class="table table-bordered table table-hover" v-ref:grid>
277
- <template partial='head'>
278
- <tr>
279
- <th><nobr>用户编号</nobr></th>
280
- <th><nobr>用户名称</nobr></th>
281
- <th><nobr>用户电话</nobr></th>
282
- <!--<th><nobr>今年入户次数</nobr></th>-->
283
- <th><nobr>用户类型</nobr></th>
284
- <th><nobr>小区名称</nobr></th>
285
- <th><nobr>地址</nobr></th>
286
- <th><nobr>建档日期</nobr></th>
287
- <th><nobr>安检日期</nobr></th>
288
- <th><nobr>安检状态</nobr></th>
289
- <th><nobr>安检结果</nobr></th>
290
- </tr>
291
- </template>
292
- <template partial='body'>
293
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_userinfo_code}}</td>
294
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_user_name}}</td>
295
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_user_phone}}</td>
296
- <!--<td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.r}}</td>-->
297
- <td v-bind:class="{newcolor:row.code=='1'}" style="text-align: center">{{row.f_user_type}}</td>
298
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_residential_area}}</td>
299
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_address}}</td>
300
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_createfile_date}}</td>
301
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_last_check_date}}</td>
302
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_last_check_state}}</td>
303
- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{$parent.$parent.$parent.getDefect(row.f_last_check_result)}}</td>
304
- </template>
305
- </data-grid>
306
- </criteria-paged>
307
- </div>
308
- <modal :show.sync="showModal" v-ref:modal backdrop="false">
309
- <div slot="modal-header" class="modal-header">
310
- <h4 class="modal-title">
311
- 年度安检率查看
312
- </h4>
313
- </div>
314
- <div slot="modal-body" class="modal-body">
315
- <div>
316
- <form class="form-inline">
317
- <div class="row form-group">
318
- <div class="col-sm-4">
319
- <label class="font_normal_body" >起始时间</label>
320
- <datepicker
321
- :value.sync="y_check_start"
322
- placeholder='安检时间起始'
323
- :disabled-days-of-week="[]"
324
- class="select select_list"
325
- style="width: 60%"
326
- :format="'yyyy-MM-dd'"
327
- :show-rest-button="reset"
328
- v-model = "y_check_start">
329
- </datepicker>
330
- </div>
331
- <div class="col-sm-4">
332
- <label class="font_normal_body" >结束时间</label>
333
- <datepicker
334
- :value.sync="y_check_end"
335
- placeholder='安检时间截止'
336
- :disabled-days-of-week="[]"
337
- class="select select_list"
338
- style="width: 60%"
339
- :format="'yyyy-MM-dd'"
340
- :show-rest-button="reset"
341
- v-model = "y_check_end">
342
- </datepicker>
343
- </div>
344
- <button type="button" style="margin-left: 10px" class="button_search" @click="y_search()">查询</button>
345
- </div>
346
- <div class="row form-group">
347
- <div class="col-sm-4">
348
- <label class="font_normal_body">所属区域</label>
349
- <v-select
350
- placeholder='所属区域'
351
- :value-single="true"
352
- v-model='yearStreet'
353
- :value.sync="yearStreet"
354
- class="select select_list"
355
- :options='streets'
356
- close-on-select clear-button> </v-select>
357
- </div>
358
- </div>
359
-
360
-
361
- <div style="width: 65%;height:100%; display: inline-block">
362
- </div>
363
-
364
- </form>
365
- <hr>
366
- <table class="table table_sy">
367
- <thead>
368
- <tr>
369
- <th></th>
370
- <th>总户数</th>
371
- <th>安检入户数</th>
372
- <th>一次安检率</th>
373
- </tr>
374
- </thead>
375
- <tbody>
376
- <tr v-for="row in yearmodel">
377
- <td></td>
378
- <td style="text-align: center;">{{row.con}}</td>
379
- <td style="text-align: center;">{{row.rhcon}}</td>
380
- <td style="text-align: center;">{{row.f_check_bv}}</td>
381
- </tr>
382
- </tbody>
383
- </table>
384
- </div>
385
- </div>
386
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
387
- <!--<button class="button_search button_spacing" @click="ok()">确认</button>-->
388
- <button class="button_clear button_spacing" @click="cancel()">取消</button>
389
- </div>
390
- </modal>
391
- </template>
392
-
393
- <script>
394
- import { PagedList } from 'vue-client'
395
- import { HttpResetClass } from 'vue-client'
396
- import co from 'co'
397
- import * as Util from './../Util'
398
- import Vue from 'vue'
399
- import {toStandardDateString} from "./../Util";
400
-
401
- let select = function* (self) {
402
- let http = new HttpResetClass()
403
- let getGasman = yield http.load('POST','/rs/search', {
404
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
405
- userid: self.$login.f.id
406
- }, {resolveMsg: null, rejectMsg: null})
407
- //tag
408
- self.checkersid.push({label: '全部', value: ''})
409
- getGasman.data.forEach((checker) => {
410
- self.checkersid.push({label: checker.name, value: checker.id})
411
- })
412
- }
413
-
414
- export default {
415
- title: '民用用户安检情况',
416
- data() {
417
- let options = []
418
- let year = (new Date()).getFullYear()
419
- for (let i = year; i <= year + 3; i++)
420
- options.push({label: i + '', value: i + ''})
421
- let moptions = []
422
- for (let i = 1; i <= 12; i++)
423
- moptions.push({label: i + '', value: i + ''})
424
-
425
- return {
426
- y_check_start:`${new Date().getFullYear()}-01-01`,
427
- y_check_end:`${new Date().getFullYear()}-12-31`,
428
- searchData: {
429
- condition: '1=1',
430
- con1: '1=1',
431
- con2: '1=1',
432
- f_itemvalue:'',
433
- f_itemname:'',
434
- orderitem: "f_userinfo_code",
435
- timetype:"dd" ,
436
- f_filialeids:`(${this.$login.f.orgid})`
437
- },
438
- excelHeaders: {
439
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
440
-
441
- 'f_userinfo_code': '用户编号',
442
- 'f_user_name': '用户名称',
443
- 'f_user_phone': '用户电话',
444
- //'count_item':'安检次数',
445
- 'f_user_type': '用户类型',
446
- 'f_residential_area': '小区名称',
447
- 'f_address':'地址',
448
- 'f_last_check_date':'安检日期',
449
- 'f_last_check_state': '安检状态',
450
- 'f_last_check_result':'安检结果'
451
- },
452
- model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {orderitem: "'f_userinfo_code'",timetype:"'dd'" ,con1:"this.con1",con2:"this.con2",f_itemname:'this.check_item',f_itemvalue:'this.check_itemValue',f_filialeids:`'(${this.$login.f.orgid})'`}),
453
- orgstrs:[{label: '全部', value: ''}],
454
- checkersid:[],
455
- SafeCheckXZ:'',
456
- civil:'', //民用安检周期
457
- civilian:'', //非民用安检周期
458
- SafeCheckXZs: [{label: '全部', value: ''},{label: '已入户', value: '已入户'}, {label: '未入户', value: '未入户'}], // 安检筛选选项
459
- safe_rhs: [{label: '全部', value: ''},{label: '今年已入户', value: '今年已入户'}, {label: '今年未入户', value: '今年未入户'}], // 安检筛选选项
460
- SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''},],
461
- checkstatus:[{label: '全部', value: ''},{label: '到访不遇', value: '到访不遇'}, {label: '拒检', value: '拒检'}],
462
- IsShares: [{label: '', value: '是'}, {label: '否', value: '否'}],
463
- IsShare:'',
464
- checker: {},
465
- NoBuys:[{label: '是', value: '是'},{label: '否', value: '否'}],
466
- criteriaShow: true,
467
- checkers: [],
468
- chosenOrg: {id: 0},
469
- checkedAll: false,
470
- checkrows: [],
471
- yearmodel:[],
472
- streets:[],
473
- adjustables: [],
474
- f_plan_year: year + '',
475
- f_plan_month: moptions[new Date().getMonth()].value,
476
- f_effective_start_time:'', //计划有效起始时间
477
- f_effective_end_time:'', //计划有效结束时间
478
- checkboxModel: {},
479
- c_year_list: options,
480
- c_month_list: moptions,
481
- areas: this.areas(),
482
- //checkstatus: this.checkstatus(),
483
- usertypes: this.usertypes(),
484
- userstates: this.userstates(),
485
- sqlname:'',
486
- f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'},{label: '有隐患', value: '有隐患'}],
487
- creatPlanWay:'',
488
- showModal:false,
489
- yearStreet:'',
490
- villagesModel:'', //小区绑定值
491
- villagesChick:[], //小区选择值
492
- buildingModel:'', //地址绑定值
493
- buildingChick:[], //地址选择值
494
- hasHousehold:'',
495
- check_items:[{label: '全部', value: ''}, ...this.$appdata.getParam('安检项名')],
496
- check_item:'',
497
- check_itemValue:'',
498
- f_entry_status: this.$appdata.getParam('安检状态'),
499
- }
500
- },
501
- props: {
502
- checkplan: { // 传入一条安检计划信息
503
- type: Object
504
- },
505
- additemshow:{
506
- type:Boolean,
507
- default:false
508
- }
509
- },
510
- ready() {
511
- // 获取分公司信息
512
- this.getfengongsi()
513
- this.model.chosenOrg = {id: 0}
514
- this.model.f_filialeids = this.$login.f.f_orgids
515
- this.model.f_filiale = this.$login.f.f_fengongsi
516
- this.model.f_OrgStr = this.$login.f.orgpathstr
517
- this.initstreets()
518
-
519
- //小区初始化
520
- this.initVillage()
521
- this.$refs.paged.$refs.criteria.model.f_check_start = Util.toStandardDateString()
522
- this.$refs.paged.$refs.criteria.model.f_check_end = Util.toStandardDateString()
523
- let gen = select(this)
524
- co(gen)
525
- // this.$refs.paged.$refs.criteria.search();
526
- },
527
- methods: {
528
- show1(){
529
- this.showModal=true
530
- },
531
- y_search(){
532
- let condition=''
533
- if(!this.y_check_start || !this.y_check_end){
534
- this.$showMessage("请选择开始和结束时间")
535
- }
536
- condition += `and f_onsite_time > '${this.y_check_start} 00:00:00' and f_onsite_time < '${this.y_check_end} 23:59:59'`
537
- new HttpResetClass().load('POST', 'rs/sql/FetchYearCheckRatio', {
538
- data: {
539
- condition: condition,
540
- f_createfile_date:this.y_check_end+' 23:59:59',
541
- usertype:'民用',
542
- f_street:this.yearStreet
543
- }
544
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((res)=>{
545
- console.log('---'+JSON.stringify(res))
546
- this.yearmodel=res.data
547
- })
548
- },
549
- //初始化小区
550
- async initVillage(){
551
- this.villagesChick = []
552
- let HttpReset = new HttpResetClass()
553
- let req = await HttpReset.load('POST', 'rs/sql/safe_singleTable_GroupBy', {
554
- data: {
555
- items: 'f_residential_area',
556
- tablename: 't_area',
557
- condition: '1 = 1',
558
- groupitem: 'f_residential_area'
559
- }
560
- }, {resolveMsg: null, rejectMsg: '获取小区列表失败!'})
561
- let redata = []
562
- req.data.forEach((row, n) => {
563
- redata.push({label: row.f_residential_area,value: row.f_residential_area,data:row})
564
- })
565
- redata.unshift({label: '全部', value: '', data: ''})
566
- this.villagesChick=redata
567
- },
568
- //初始化街道 添加小区
569
- async initstreets(){
570
- this.streetslist = []
571
- let HttpReset = new HttpResetClass()
572
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
573
- data: {
574
- items: '*',
575
- tablename: 't_street',
576
- orderitem: 'id',
577
- condition: `f_orgid = '${this.$login.f.orgid}'`
578
- }
579
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
580
- let redata = []
581
- req.data.forEach((row, n) => {
582
- redata.push({label: row.f_street,value: row.f_street,data:row,id:row.id})
583
- })
584
- this.streets=redata
585
- },
586
- hiddenr() {
587
- this.$parent.showItem = !this.$parent.showItem
588
- },
589
- hidden() {
590
- this.criteriaShow = !this.criteriaShow
591
- },
592
- // 获取县域分公司内容
593
- getfengongsi(){
594
- let val = {source: 'this.getParentByType($organization$).getSpecialResByType($organization$)', userid: `${this.$login.f.id}`}
595
- let http = new HttpResetClass()
596
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
597
- res.data.forEach((item) => {
598
- this.orgstrs.push({label: item.name, value: item.id})
599
- })
600
- console.log(this.orgstrs.length)
601
- })
602
- },
603
- // 县域分公司发生改变
604
- // orgstrchange(val){
605
- // if(val == undefined || val == ''){
606
- // return
607
- // }else {
608
- // this.checkersid = []
609
- // let gen = select(this,val)
610
- // return co(gen)
611
- // }
612
- // },
613
- getDefect(val){
614
- if(val){
615
- try {
616
- var defect = JSON.parse(val)
617
- return defect.result
618
- }catch (e) {
619
- console.log(val)
620
- return '正常'
621
- }
622
- }
623
- return '正常'
624
- },
625
- checkerchange(val) {
626
- this.checkboxModel.f_checker = val.name
627
- this.checkboxModel.f_checker_id = val.id
628
- },
629
- search(args) {
630
- if(this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')){
631
- this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始和结束时间!')
632
- return
633
- }
634
- if((args.model.f_check_start || args.model.f_check_end ) && !this.SafeCheckXZ ){
635
- this.$showMessage('如果录入安检起始结束时间,需要选择 安检筛选 选项!')
636
- return
637
- }
638
- let con1='1=1 '
639
- let con2='1=1 '
640
- if(this.SafeCheckXZ == '已入户'){
641
- args.condition += " and r > 0"
642
- con1 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
643
- con2 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
644
- //args.condition += " and ( f_last_check_date > '"+ args.model.f_check_end + " 23:59:00' or f_last_check_date < '"+ args.model.f_check_start + " 00:00:00' or f_last_check_date is null)"
645
- } else if(this.SafeCheckXZ == '未入户') {
646
- args.condition += " and r < 1"
647
- con1 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
648
- con2 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
649
- if(args.model.f_check_state=='到访不遇'){
650
- args.condition += " and d > 0"
651
- }else if(args.model.f_check_state=='拒检'){
652
- args.condition += " and j > 0"
653
- }
654
- }
655
- this.model.check_item=this.check_item
656
- this.model.check_itemValue=this.check_itemValue
657
- /*if(this.hasHousehold=='今年已入户'){
658
- args.condition += " and rhcon is not null"
659
- }else if(this.hasHousehold=='今年未入户'){
660
- args.condition += " and rhcon is null"
661
- }*/
662
- args.condition += " and f_filialeid = '" + this.$login.f.orgid + "' and f_user_type='民用'"
663
- this.searchData.condition=args.condition
664
- this.searchData.con1=con1
665
- this.searchData.con2=con2
666
- this.searchData.f_itemvalue=this.check_item
667
- this.searchData.f_itemname=this.check_itemValue
668
- this.model.con1=con1
669
- this.model.con2=con2
670
- return this.model.search( args.condition, args.model)
671
- },
672
- /*checkstatus() {
673
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]
674
- },*/
675
- usertypes() {
676
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
677
- },
678
- userstates() {
679
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')]
680
- },
681
- show() {
682
- this.criteriaShow = true
683
- },
684
- hidden() {
685
- this.criteriaShow = false
686
- },
687
- confirm() {
688
- if (!this.checkboxModel.f_plan_name) {
689
- this.$showMessage('请填写安检计划名称!')
690
- return
691
- }
692
- // if(this.f_effective_start_time == ''){
693
- // this.$showMessage('请选择有效起始日期!')
694
- // return
695
- // }
696
- // if(this.f_effective_end_time == ''){
697
- // this.$showMessage('请选择有效结束日期!')
698
- // return
699
- // }
700
- if(this.IsShare == ''){
701
- if (!this.checkboxModel.f_checker_id) {
702
- this.$showMessage('请选择安检员!')
703
- return
704
- }
705
- }
706
- let gen = saveGen(this)
707
- return co(gen)
708
- },
709
- changeStates() {
710
- if (this.checkedAll) {//实现反选/
711
- this.checkrows = [];
712
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
713
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
714
- }
715
- } else {//实现全选
716
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
717
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
718
- }
719
- let _this = this
720
- let condition = this.$refs.paged.$refs.criteria.condition
721
- let url = this.model.url
722
- this.$resetpost(`${url}?pageSize=9999999`, {
723
- data: {
724
- condition: condition,
725
- groupitem: '',
726
- orderitem: 'f_residential_area',
727
- f_usertype:this.model.f_usertype,
728
- f_filialeids: this.model.f_filialeids,
729
- month: this.model.month,
730
- safeCycle:this.model.safeCycle,
731
- f_checktime_start:this.model.f_checktime_start,
732
- f_checktime_end:this.model.f_checktime_end,
733
- SafeCheckSX: this.model.SafeCheckSX,
734
- f_last_check_state: this.model.f_last_check_state
735
- },
736
- },{resolveMsg: null, rejectMsg: null}, -1).then(
737
- (respanse) => {
738
- if (respanse.data.length >= 5000) {
739
- this.$showMessage("数据量太大,请重新选择")
740
- } else {
741
- _this.checkrows = []
742
- for (let j = 0; j < respanse.data.length; j++) {
743
- _this.checkrows.push(respanse.data[j])
744
- }
745
- console.log(_this.checkrows);
746
- }
747
- })
748
- }
749
- },
750
- addChecked(item) {
751
- console.log(item);
752
- if (!item.checked) {
753
- this.checkrows.push(item);
754
- console.log(this.checkrows);
755
- } else {
756
- for (let i = 0; i < this.checkrows.length; i++) {
757
- if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
758
- this.checkrows.splice(i, 1)
759
- }
760
- }
761
- }
762
- },
763
- ToshowModal() {
764
- this.creatPlanWay = 'single'
765
- if (this.checkrows.length > 0) {
766
- this.showModal = true
767
- } else {
768
- this.$showMessage("请选择需要安检的用户!")
769
- }
770
- },
771
- FiltrationPlan(){
772
- if(this.model.rows.length == 0){
773
- this.$showMessage("暂无可生成的计划!")
774
- return
775
- }
776
- this.creatPlanWay = 'filtration'
777
- this.showModal = true
778
- },
779
- AllPlan() {
780
- if(this.model.rows.length == 0){
781
- this.$showMessage("暂无可生成的计划!")
782
- return
783
- }
784
- this.creatPlanWay = 'all'
785
- this.showModal = true
786
- },
787
- cancel() {
788
- this.showModal = false
789
- },
790
- areas() {
791
- let rs = []
792
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
793
- let temp = {
794
- label: this.$login.f.f_allArea[i].label,
795
- value: this.$login.f.f_allArea[i].label
796
- }
797
- rs.push(temp)
798
- }
799
- return [{label: '全部', value: ''}, ...rs]
800
- },
801
- initAdjustables() {
802
- console.log('初始化调压箱', this.$GetSaleParam)
803
- let arr = []
804
- let filter = this.$login.f.f_orgids
805
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
806
- let temp = {}
807
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
808
- temp.value = `${item.value.id}`
809
- arr.push(temp)
810
- })
811
- this.adjustables = [{label: '全部', value: ''}, ...arr]
812
- },
813
- },
814
-
815
- watch: {
816
- 'check_item'(){
817
- this.check_itemValue=''
818
- },
819
- 'model.model.f_residential_area'(){
820
- this.model.model.f_building = []
821
- this.buildingChick = []
822
- if (!this.model.model){
823
- return
824
- }
825
- if (!this.model.model.f_residential_area){
826
- return
827
- }
828
- let HttpReset = new HttpResetClass()
829
- let redata = []
830
- HttpReset.load('POST', '/rs/sql/safe_singleTable_GroupBy', {
831
- data: {
832
- items: "f_building",
833
- tablename: "t_user_address",
834
- condition: `f_filialeid = ${this.$login.f.orgid} and f_residential_area= '${this.model.model.f_residential_area}'`,
835
- groupitem: "f_building order by cast((case PATINDEX('%[^0-9]%', f_building) when 0 then f_building else 999 end) as int)"
836
- }
837
- }, {resolveMsg: null, rejectMsg: '获取楼栋列表失败!'}).then(res=>{
838
- res.data.forEach((row, n) => {
839
- redata.push({ label: row.f_building,value: row.f_building,data:row})
840
- })
841
- this.buildingChick = redata;
842
- })
843
- },
844
- 'model.f_usertype'(val){
845
- if(val == '民用'){
846
- this.model.safeCycle = this.civil
847
- }else if(val == '非民用'){
848
- this.model.safeCycle = this.civilian
849
- }
850
- },
851
- 'model.SafeCheckXZ'(val) {
852
- this.model.SafeCheckSC = ''
853
- if (val == '已安检') {
854
- this.model.SafeCheckCQ = ''
855
- this.model.SafeCheckSX = {
856
- f_check_end: '', // 安检时间 查询起始条件
857
- f_check_start: ''// 安检时间 查询终止条件
858
- }
859
- } else {
860
- // 当使用筛选条件时,清空不需要的条件选项
861
- this.model.f_issue_start = ''
862
- this.model.f_issue_end = ''
863
- this.$refs.paged.$refs.criteria.model.f_check_start = ''
864
- this.$refs.paged.$refs.criteria.model.f_check_end = ''
865
- this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
866
- this.model.month = ''
867
- if(val == '应安检'){
868
- this.model.SafeCheckSC = '否'
869
-
870
- this.model.f_issue_start = Util.toStartDateString()
871
- this.model.f_issue_end = Util.toStandardDateString()
872
- }
873
- // this.model.f_checktime_start = ''
874
- // this.model.f_checktime_end = ''
875
- }
876
- },
877
- 'model.SafeCheckSC'(val) {
878
- if (val == '') {
879
- this.model.f_issue_start = ''
880
- this.model.f_issue_end = ''
881
- }
882
- },
883
- // 'checker'(val){
884
- // console.log("checker",this.checker)
885
- // if(val){
886
- // this.checkboxModel.f_checker = this.checker[0].name
887
- // this.checkboxModel.f_checker_id = this.checker[0].id
888
- // }
889
- // },
890
- 'model.rows'() {
891
- // if (!this.checkedAll) {//实现反选/
892
- // this.checkrows = [];
893
- for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
894
- var k = false
895
- for (let j = 0; j < this.checkrows.length; j++) {
896
- if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
897
- this.$set('$refs.paged.model.rows[' + i + '].checked', true)
898
- k = true
899
- continue
900
- }
901
- }
902
- if (!k) {
903
- this.$set('$refs.paged.model.rows[' + i + '].checked', false)
904
- }
905
- }
906
- // } else {//实现全选
907
- // // this.checkboxModel = {};
908
- // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
909
- // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
910
- // }
911
- // }
912
- }
913
- },
914
- computed: {
915
- selected() {
916
- return this.$refs.paged.$refs.grid.selected
917
- },
918
- check_itemValues(){
919
- return [ ...this.$appdata.getParam(this.check_item)]
920
- }
921
- }
922
- }
923
- </script>
924
- <style scoped>
925
- .newcolor{
926
- color:red;
927
- }
928
- .table th{
929
- background-color: #f2f6fa;
930
- color: black;
931
- }
932
- </style>
1
+ <template>
2
+ <div style="flex:1;" class="flex">
3
+ <button class="btn btn-xs" v-show="!criteriaShow" @click="show()">
4
+ <span class="glyphicon glyphicon-chevron-down" style="color: #000;"></span>
5
+ </button>
6
+ <criteria-paged :model="model" v-ref:paged>
7
+ <criteria partial='criteria' v-show="$parent.criteriaShow" @condition-changed='$parent.search' v-ref:criteria>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="col-sm-4" style="width: 20%">
11
+ <label class="font_normal_body">用户编号</label>
12
+ <input type="text" class="input_search" v-model="model.f_userinfo_code" id="f_userinfo_code" style="width:60%;"
13
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
14
+ </div>
15
+ <div class="col-sm-4" style="width: 20%">
16
+ <label class="font_normal_body">用户姓名</label>
17
+ <input type="text" class="input_search" v-model="model.f_user_name" id="f_user_name" style="width:60%;"
18
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
19
+ </div>
20
+ <div class="col-sm-4" style="width: 20%">
21
+ <label class="font_normal_body"> &nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
22
+ <!-- <input type="text" class="input_search" v-model="model.f_residential_area" id="f_residential_area" style="width:60%;"
23
+ placeholder="小区" condition="f_residential_area like '%{}%'">-->
24
+ <v-select
25
+ placeholder='小区选择'
26
+ :value-single="true"
27
+ v-model='model.f_residential_area'
28
+ :value.sync="model.f_residential_area"
29
+ class="select select_list"
30
+ :options='$parent.$parent.villagesChick'
31
+ condition="f_residential_area like '%{}%'"
32
+ close-on-select clear-button search valueSingle="true"> </v-select>
33
+ </div>
34
+
35
+ <div class="col-sm-4" style="width: 20%">
36
+ <label class="font_normal_body"> &nbsp;&nbsp;&nbsp;楼栋&nbsp;&nbsp;&nbsp;</label>
37
+ <v-select
38
+ placeholder='楼栋选择'
39
+ v-model='model.f_building'
40
+ :value.sync="model.f_building"
41
+ class="select select_list"
42
+ :options='$parent.$parent.buildingChick'
43
+ condition="f_building in {}"
44
+ clear-button search :multiple="true"> </v-select>
45
+ </div>
46
+
47
+ <div class="col-sm-4" style="width: 20%">
48
+ <label class="font_normal_body"> &nbsp;&nbsp;&nbsp;地址&nbsp;&nbsp;&nbsp;</label>
49
+ <input type="text" class="input_search" v-model="model.f_address" id="f_address" style="width:60%;"
50
+ placeholder="地址" condition="f_address like '%{}%'">
51
+ </div>
52
+ <!--<div class="col-sm-3 form-group form-input-group" style="width: 20%">-->
53
+ <!--<label class="control-label">用户类型</label>-->
54
+ <!--<v-select id="f_usertype"-->
55
+ <!--placeholder='用户类型'-->
56
+ <!--:value.sync="model.f_usertype"-->
57
+ <!--:value-single="true"-->
58
+ <!--:options='$parent.$parent.usertypes'-->
59
+ <!--v-model="model.f_usertype"-->
60
+ <!--condition="f_user_type = '{}'"-->
61
+ <!--close-on-select clear-button> </v-select>-->
62
+ <!--</div>-->
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 && $parent.$parent.SafeCheckXZ=='未入户'">
75
+ <label class="font_normal_body">安检状态</label>
76
+ <v-select id="f_entry"
77
+ placeholder='安检状态'
78
+ class="select select_list"
79
+ :value.sync="model.f_check_state"
80
+ :value-single="true"
81
+ :options='$parent.$parent.checkstatus'
82
+ v-model="model.f_check_state"
83
+ close-on-select clear-button></v-select>
84
+ </div>-->
85
+ <div class="col-sm-4" style="width: 20%">
86
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
87
+ <v-select
88
+ placeholder='安检筛选'
89
+ :value-single="true"
90
+ class="select select_list"
91
+ :value.sync="$parent.$parent.SafeCheckXZ"
92
+ :options='$parent.$parent.SafeCheckXZs'
93
+ v-model="$parent.$parent.SafeCheckXZ"
94
+ close-on-select clear-button> </v-select>
95
+ </div>
96
+ <div class="col-sm-4" style="width: 20% " v-show="$parent.$parent.SafeCheckXZ=='未入户'">
97
+ <label class="font_normal_body">安检状态</label>
98
+ <v-select id="f_entry"
99
+ placeholder='安检状态'
100
+ :value.sync="model.f_check_state"
101
+ :value-single="true"
102
+ class="select select_list"
103
+ :options='$parent.$parent.checkstatus'
104
+ v-model="model.f_check_state"
105
+ close-on-select clear-button> </v-select>
106
+ </div>
107
+ <div class="col-sm-4" style="width: 20%">
108
+ <label class="font_normal_body">安检起始</label>
109
+ <datepicker
110
+ :value.sync="model.f_check_start"
111
+ placeholder='最后安检时间起始'
112
+ :disabled-days-of-week="[]"
113
+ class="select select_list"
114
+ style="width: 60%"
115
+ :format="'yyyy-MM-dd'"
116
+ :show-rest-button="reset"
117
+ v-model = "model.f_check_start">
118
+ </datepicker>
119
+ </div>
120
+ <div class="col-sm-4" style="width: 20%">
121
+ <label class="font_normal_body">安检结束</label>
122
+ <datepicker
123
+ :value.sync="model.f_check_end"
124
+ placeholder='最后安检时间结束'
125
+ :disabled-days-of-week="[]"
126
+ class="select select_list"
127
+ style="width: 60%"
128
+ :format="'yyyy-MM-dd'"
129
+ :show-rest-button="reset"
130
+ v-model = "model.f_check_end">
131
+ </datepicker>
132
+ </div>
133
+
134
+
135
+ <div class="col-sm-4" style="width: 20%">
136
+ <label class="font_normal_body">隐患情况</label>
137
+ <v-select
138
+ placeholder='隐患情况'
139
+ :value-single="true"
140
+ v-model='model.f_check_result'
141
+ class="select select_list"
142
+ :value.sync="model.f_check_result"
143
+ :options='$parent.$parent.f_check_results'
144
+ condition="f_last_check_result like '%{}%'"
145
+ close-on-select clear-button> </v-select>
146
+ </div>
147
+ <!--<div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.orgstrs.length > 1">
148
+ <label class="font_normal_body">县域公司</label>
149
+ <v-select
150
+ placeholder='县域分公司'
151
+ :value-single="true"
152
+ v-model='model.f_orgstr'
153
+ :value.sync="model.f_orgstr"
154
+ class="select select_list"
155
+ :options='$parent.$parent.orgstrs'
156
+ condition="f_orgstr like '%{}%'"
157
+ close-on-select clear-button> </v-select>
158
+ </div>-->
159
+ <div class="col-sm-4" style="width: 20%">
160
+ <label class="font_normal_body">所属区域</label>
161
+ <v-select
162
+ placeholder='所属区域'
163
+ :value-single="true"
164
+ v-model='model.street'
165
+ :value.sync="model.street"
166
+ class="select select_list"
167
+ :options='$parent.$parent.streets'
168
+ condition="f_street ='{}'"
169
+ close-on-select clear-button> </v-select>
170
+ </div>
171
+ <div class="row">
172
+ <div class="col-sm-4" style="width: 20%">
173
+ <label class="font_normal_body">开户起始</label>
174
+ <datepicker
175
+ :value.sync="model.f_createfile_start"
176
+ placeholder='开户起始时间'
177
+ :disabled-days-of-week="[]"
178
+ class="select select_list"
179
+ style="width: 60%"
180
+ :format="'yyyy-MM-dd'"
181
+ :show-rest-button="reset"
182
+ condition="f_createfile_date > '{} 00:00:00'"
183
+ v-model = "model.f_createfile_start">
184
+ </datepicker>
185
+ </div>
186
+ <div class="col-sm-4" style="width: 20%">
187
+ <label class="font_normal_body">开户结束</label>
188
+ <datepicker
189
+ :value.sync="model.f_createfile_end"
190
+ placeholder='开户结束时间'
191
+ :disabled-days-of-week="[]"
192
+ class="select select_list"
193
+ style="width: 60%"
194
+ :format="'yyyy-MM-dd'"
195
+ condition="f_createfile_date < '{} 23:59:00'"
196
+ :show-rest-button="reset"
197
+ v-model = "model.f_createfile_end">
198
+ </datepicker>
199
+ </div>
200
+ <!--<div class="col-sm-4" style="width: 20%">
201
+ <label class="font_normal_body">是否入户</label>
202
+ <v-select
203
+ placeholder='今年是否入户'
204
+ :value-single="true"
205
+ class="select select_list"
206
+ :value.sync="$parent.$parent.hasHousehold"
207
+ :options='$parent.$parent.safe_rhs'
208
+ v-model="$parent.$parent.hasHousehold"
209
+ close-on-select clear-button> </v-select>
210
+ </div>-->
211
+ <div class="col-sm-4" style="width: 20%">
212
+ <label class="font_normal_body">安检项名</label>
213
+ <v-select
214
+ placeholder='安检项名'
215
+ :value-single="true"
216
+ class="select select_list"
217
+ :value.sync="$parent.$parent.check_item"
218
+ :options='$parent.$parent.check_items'
219
+ v-model="$parent.$parent.check_item"
220
+ close-on-select clear-button> </v-select>
221
+ </div>
222
+ <div class="col-sm-4" style="width: 20%">
223
+ <label class="font_normal_body">安检内容</label>
224
+ <v-select
225
+ placeholder='安检内容'
226
+ :value-single="true"
227
+ class="select select_list"
228
+ :value.sync="$parent.$parent.check_itemValue"
229
+ :options='$parent.$parent.check_itemValues'
230
+ v-model="$parent.$parent.check_itemValue"
231
+ close-on-select clear-button> </v-select>
232
+ </div>
233
+ <div class="col-sm-8"></div>
234
+ <div style="float: right;margin-right: 10px">
235
+ <export-excel-safe :data="$parent.$parent.searchData"
236
+ :field="$parent.$parent.excelHeaders"
237
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案" template-name='用户安检情况'></export-excel-safe>
238
+ <div style="float: right" class="button_spacing"
239
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
240
+ @click="$parent.$parent.hiddenr()"></div>
241
+ </div>
242
+ <div class="span" style = "float:right;margin-right:10px">
243
+ <button class="btn btn-primary width-80" @click="search()">查询</button>
244
+ </div>
245
+ <div class="span" style = "float:right;margin-right:10px">
246
+ <button class="btn btn-primary width-80" @click="$parent.$parent.show1()">年度安检率查看</button>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </criteria>
252
+ <data-grid :model="model" partial="list" class="table table-bordered table table-hover" v-ref:grid>
253
+ <template partial='head'>
254
+ <tr>
255
+ <th><nobr>用户编号</nobr></th>
256
+ <th><nobr>用户名称</nobr></th>
257
+ <th><nobr>用户电话</nobr></th>
258
+ <!--<th><nobr>今年入户次数</nobr></th>-->
259
+ <th><nobr>用户类型</nobr></th>
260
+ <th><nobr>小区名称</nobr></th>
261
+ <th><nobr>地址</nobr></th>
262
+ <th><nobr>建档日期</nobr></th>
263
+ <th><nobr>安检日期</nobr></th>
264
+ <th><nobr>安检状态</nobr></th>
265
+ <th><nobr>安检结果</nobr></th>
266
+ </tr>
267
+ </template>
268
+ <template partial='body'>
269
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_userinfo_code}}</td>
270
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_user_name}}</td>
271
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_user_phone}}</td>
272
+ <!--<td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.r}}</td>-->
273
+ <td v-bind:class="{newcolor:row.code=='1'}" style="text-align: center">{{row.f_user_type}}</td>
274
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_residential_area}}</td>
275
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_address}}</td>
276
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_createfile_date}}</td>
277
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_last_check_date}}</td>
278
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{row.f_last_check_state}}</td>
279
+ <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{$parent.$parent.$parent.getDefect(row.f_last_check_result)}}</td>
280
+ </template>
281
+ </data-grid>
282
+ </criteria-paged>
283
+ </div>
284
+ <modal :show.sync="showModal" v-ref:modal backdrop="false">
285
+ <div slot="modal-header" class="modal-header">
286
+ <h4 class="modal-title">
287
+ 年度安检率查看
288
+ </h4>
289
+ </div>
290
+ <div slot="modal-body" class="modal-body">
291
+ <div>
292
+ <form class="form-inline">
293
+ <div class="row form-group">
294
+ <div class="col-sm-4">
295
+ <label class="font_normal_body" >起始时间</label>
296
+ <datepicker
297
+ :value.sync="y_check_start"
298
+ placeholder='安检时间起始'
299
+ :disabled-days-of-week="[]"
300
+ class="select select_list"
301
+ style="width: 60%"
302
+ :format="'yyyy-MM-dd'"
303
+ :show-rest-button="reset"
304
+ v-model = "y_check_start">
305
+ </datepicker>
306
+ </div>
307
+ <div class="col-sm-4">
308
+ <label class="font_normal_body" >结束时间</label>
309
+ <datepicker
310
+ :value.sync="y_check_end"
311
+ placeholder='安检时间截止'
312
+ :disabled-days-of-week="[]"
313
+ class="select select_list"
314
+ style="width: 60%"
315
+ :format="'yyyy-MM-dd'"
316
+ :show-rest-button="reset"
317
+ v-model = "y_check_end">
318
+ </datepicker>
319
+ </div>
320
+ <button type="button" style="margin-left: 10px" class="button_search" @click="y_search()">查询</button>
321
+ </div>
322
+ <div class="row form-group">
323
+ <div class="col-sm-4">
324
+ <label class="font_normal_body">所属区域</label>
325
+ <v-select
326
+ placeholder='所属区域'
327
+ :value-single="true"
328
+ v-model='yearStreet'
329
+ :value.sync="yearStreet"
330
+ class="select select_list"
331
+ :options='streets'
332
+ close-on-select clear-button> </v-select>
333
+ </div>
334
+ </div>
335
+
336
+
337
+ <div style="width: 65%;height:100%; display: inline-block">
338
+ </div>
339
+
340
+ </form>
341
+ <hr>
342
+ <table class="table table_sy">
343
+ <thead>
344
+ <tr>
345
+ <th></th>
346
+ <th>总户数</th>
347
+ <th>安检入户数</th>
348
+ <th>一次安检率</th>
349
+ </tr>
350
+ </thead>
351
+ <tbody>
352
+ <tr v-for="row in yearmodel">
353
+ <td></td>
354
+ <td style="text-align: center;">{{row.con}}</td>
355
+ <td style="text-align: center;">{{row.rhcon}}</td>
356
+ <td style="text-align: center;">{{row.f_check_bv}}</td>
357
+ </tr>
358
+ </tbody>
359
+ </table>
360
+ </div>
361
+ </div>
362
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
363
+ <!--<button class="button_search button_spacing" @click="ok()">确认</button>-->
364
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
365
+ </div>
366
+ </modal>
367
+ </template>
368
+
369
+ <script>
370
+ import { PagedList } from 'vue-client'
371
+ import { HttpResetClass } from 'vue-client'
372
+ import co from 'co'
373
+ import * as Util from './../Util'
374
+ import Vue from 'vue'
375
+ import {toStandardDateString} from "./../Util";
376
+
377
+ // let select = function * (self,userid) {
378
+ // let http = new HttpResetClass()
379
+ // let getGasman = yield http.load('POST','/rs/search', {
380
+ // source: 'this.getChildByName($安检员$).getUsers()',
381
+ // userid: userid
382
+ // }, {resolveMsg: null, rejectMsg: null})
383
+ // console.log('获取安检员', getGasman)
384
+ // getGasman.data.forEach((checker)=>{
385
+ // self.checkersid.push({label:checker.name,value:checker.id})
386
+ // })
387
+ // self.checkersid.push({label:'全部',value:''})
388
+ // }
389
+
390
+
391
+ export default {
392
+ title: '民用用户安检情况',
393
+ data() {
394
+ let options = []
395
+ let year = (new Date()).getFullYear()
396
+ for (let i = year; i <= year + 3; i++)
397
+ options.push({label: i + '', value: i + ''})
398
+ let moptions = []
399
+ for (let i = 1; i <= 12; i++)
400
+ moptions.push({label: i + '', value: i + ''})
401
+
402
+ return {
403
+ y_check_start:`${new Date().getFullYear()}-01-01`,
404
+ y_check_end:`${new Date().getFullYear()}-12-31`,
405
+ searchData: {
406
+ condition: '1=1',
407
+ con1: '1=1',
408
+ con2: '1=1',
409
+ f_itemvalue:'',
410
+ f_itemname:'',
411
+ orderitem: "f_userinfo_code",
412
+ timetype:"dd" ,
413
+ f_filialeids:`(${this.$login.f.orgid})`
414
+ },
415
+ excelHeaders: {
416
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
417
+
418
+ 'f_userinfo_code': '用户编号',
419
+ 'f_user_name': '用户名称',
420
+ 'f_user_phone': '用户电话',
421
+ //'count_item':'安检次数',
422
+ 'f_user_type': '用户类型',
423
+ 'f_residential_area': '小区名称',
424
+ 'f_address':'地址',
425
+ 'f_last_check_date':'安检日期',
426
+ 'f_last_check_state': '安检状态',
427
+ 'f_last_check_result':'安检结果'
428
+ },
429
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {orderitem: "'f_userinfo_code'",timetype:"'dd'" ,con1:"this.con1",con2:"this.con2",f_itemname:'this.check_item',f_itemvalue:'this.check_itemValue',f_filialeids:`'(${this.$login.f.orgid})'`}),
430
+ orgstrs:[{label: '全部', value: ''}],
431
+ checkersid:[],
432
+ SafeCheckXZ:'',
433
+ civil:'', //民用安检周期
434
+ civilian:'', //非民用安检周期
435
+ SafeCheckXZs: [{label: '全部', value: ''},{label: '已入户', value: '已入户'}, {label: '未入户', value: '未入户'}], // 安检筛选选项
436
+ safe_rhs: [{label: '全部', value: ''},{label: '今年已入户', value: '今年已入户'}, {label: '今年未入户', value: '今年未入户'}], // 安检筛选选项
437
+ SafeCheckSXs: [{label: '是', value: '是'}, {label: '否', value: '否'}, {label: '全部', value: ''},],
438
+ checkstatus:[{label: '全部', value: ''},{label: '到访不遇', value: '到访不遇'}, {label: '拒检', value: '拒检'}],
439
+ IsShares: [{label: '是', value: '是'}, {label: '否', value: '否'}],
440
+ IsShare:'否',
441
+ checker: {},
442
+ NoBuys:[{label: '', value: ''},{label: '否', value: '否'}],
443
+ criteriaShow: true,
444
+ checkers: [],
445
+ chosenOrg: {id: 0},
446
+ checkedAll: false,
447
+ checkrows: [],
448
+ yearmodel:[],
449
+ streets:[],
450
+ adjustables: [],
451
+ f_plan_year: year + '',
452
+ f_plan_month: moptions[new Date().getMonth()].value,
453
+ f_effective_start_time:'', //计划有效起始时间
454
+ f_effective_end_time:'', //计划有效结束时间
455
+ checkboxModel: {},
456
+ c_year_list: options,
457
+ c_month_list: moptions,
458
+ areas: this.areas(),
459
+ //checkstatus: this.checkstatus(),
460
+ usertypes: this.usertypes(),
461
+ userstates: this.userstates(),
462
+ sqlname:'',
463
+ f_check_results: [{label: '全部', value: ''}, {label: '正常', value: '正常'},{label: '有隐患', value: '有隐患'}],
464
+ creatPlanWay:'',
465
+ showModal:false,
466
+ yearStreet:'',
467
+ villagesModel:'', //小区绑定值
468
+ villagesChick:[], //小区选择值
469
+ buildingModel:'', //地址绑定值
470
+ buildingChick:[], //地址选择值
471
+ hasHousehold:'',
472
+ check_items:[{label: '全部', value: ''}, ...this.$appdata.getParam('安检项名')],
473
+ check_item:'',
474
+ check_itemValue:''
475
+ }
476
+ },
477
+ props: {
478
+ checkplan: { // 传入一条安检计划信息
479
+ type: Object
480
+ },
481
+ additemshow:{
482
+ type:Boolean,
483
+ default:false
484
+ }
485
+ },
486
+ ready() {
487
+ // 获取分公司信息
488
+ this.getfengongsi()
489
+ this.model.chosenOrg = {id: 0}
490
+ this.model.f_filialeids = this.$login.f.f_orgids
491
+ this.model.f_filiale = this.$login.f.f_fengongsi
492
+ this.model.f_OrgStr = this.$login.f.orgpathstr
493
+ this.initstreets()
494
+
495
+ //小区初始化
496
+ this.initVillage()
497
+ this.$refs.paged.$refs.criteria.model.f_check_start = Util.toStandardDateString()
498
+ this.$refs.paged.$refs.criteria.model.f_check_end = Util.toStandardDateString()
499
+ // this.$refs.paged.$refs.criteria.search();
500
+ },
501
+ methods: {
502
+ show1(){
503
+ this.showModal=true
504
+ },
505
+ y_search(){
506
+ let condition=''
507
+ if(!this.y_check_start || !this.y_check_end){
508
+ this.$showMessage("请选择开始和结束时间")
509
+ }
510
+ condition += `and f_onsite_time > '${this.y_check_start} 00:00:00' and f_onsite_time < '${this.y_check_end} 23:59:59'`
511
+ new HttpResetClass().load('POST', 'rs/sql/FetchYearCheckRatio', {
512
+ data: {
513
+ condition: condition,
514
+ f_createfile_date:this.y_check_end+' 23:59:59',
515
+ usertype:'民用',
516
+ f_street:this.yearStreet
517
+ }
518
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((res)=>{
519
+ console.log('---'+JSON.stringify(res))
520
+ this.yearmodel=res.data
521
+ })
522
+ },
523
+ //初始化小区
524
+ async initVillage(){
525
+ this.villagesChick = []
526
+ let HttpReset = new HttpResetClass()
527
+ let req = await HttpReset.load('POST', 'rs/sql/safe_singleTable_GroupBy', {
528
+ data: {
529
+ items: 'f_residential_area',
530
+ tablename: 't_area',
531
+ condition: '1 = 1',
532
+ groupitem: 'f_residential_area'
533
+ }
534
+ }, {resolveMsg: null, rejectMsg: '获取小区列表失败!'})
535
+ let redata = []
536
+ req.data.forEach((row, n) => {
537
+ redata.push({label: row.f_residential_area,value: row.f_residential_area,data:row})
538
+ })
539
+ redata.unshift({label: '全部', value: '', data: ''})
540
+ this.villagesChick=redata
541
+ },
542
+ //初始化街道 添加小区
543
+ async initstreets(){
544
+ this.streetslist = []
545
+ let HttpReset = new HttpResetClass()
546
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
547
+ data: {
548
+ items: '*',
549
+ tablename: 't_street',
550
+ orderitem: 'id',
551
+ condition: `f_orgid = '${this.$login.f.orgid}'`
552
+ }
553
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
554
+ let redata = []
555
+ req.data.forEach((row, n) => {
556
+ redata.push({label: row.f_street,value: row.f_street,data:row,id:row.id})
557
+ })
558
+ this.streets=redata
559
+ },
560
+ hiddenr() {
561
+ this.$parent.showItem = !this.$parent.showItem
562
+ },
563
+ hidden() {
564
+ this.criteriaShow = !this.criteriaShow
565
+ },
566
+ // 获取县域分公司内容
567
+ getfengongsi(){
568
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($organization$)', userid: `${this.$login.f.id}`}
569
+ let http = new HttpResetClass()
570
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
571
+ res.data.forEach((item) => {
572
+ this.orgstrs.push({label: item.name, value: item.id})
573
+ })
574
+ console.log(this.orgstrs.length)
575
+ })
576
+ },
577
+ // 县域分公司发生改变
578
+ // orgstrchange(val){
579
+ // if(val == undefined || val == ''){
580
+ // return
581
+ // }else {
582
+ // this.checkersid = []
583
+ // let gen = select(this,val)
584
+ // return co(gen)
585
+ // }
586
+ // },
587
+ getDefect(val){
588
+ if(val){
589
+ try {
590
+ var defect = JSON.parse(val)
591
+ return defect.result
592
+ }catch (e) {
593
+ console.log(val)
594
+ return '正常'
595
+ }
596
+ }
597
+ return '正常'
598
+ },
599
+ checkerchange(val) {
600
+ this.checkboxModel.f_checker = val.name
601
+ this.checkboxModel.f_checker_id = val.id
602
+ },
603
+ search(args) {
604
+ if(this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')){
605
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始和结束时间!')
606
+ return
607
+ }
608
+ if((args.model.f_check_start || args.model.f_check_end ) && !this.SafeCheckXZ ){
609
+ this.$showMessage('如果录入安检起始结束时间,需要选择 安检筛选 选项!')
610
+ return
611
+ }
612
+ let con1='1=1 '
613
+ let con2='1=1 '
614
+ if(this.SafeCheckXZ == '已入户'){
615
+ args.condition += " and r > 0"
616
+ con1 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
617
+ con2 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
618
+ //args.condition += " and ( f_last_check_date > '"+ args.model.f_check_end + " 23:59:00' or f_last_check_date < '"+ args.model.f_check_start + " 00:00:00' or f_last_check_date is null)"
619
+ } else if(this.SafeCheckXZ == '未入户') {
620
+ args.condition += " and r < 1"
621
+ con1 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
622
+ con2 += ` and f_offsite_time > '${args.model.f_check_start}' and f_offsite_time < '${args.model.f_check_end}'`
623
+ if(args.model.f_check_state=='到访不遇'){
624
+ args.condition += " and d > 0"
625
+ }else if(args.model.f_check_state=='拒检'){
626
+ args.condition += " and j > 0"
627
+ }
628
+ }
629
+ this.model.check_item=this.check_item
630
+ this.model.check_itemValue=this.check_itemValue
631
+ /*if(this.hasHousehold=='今年已入户'){
632
+ args.condition += " and rhcon is not null"
633
+ }else if(this.hasHousehold=='今年未入户'){
634
+ args.condition += " and rhcon is null"
635
+ }*/
636
+ args.condition += " and f_filialeid = '" + this.$login.f.orgid + "' and f_user_type='民用'"
637
+ this.searchData.condition=args.condition
638
+ this.searchData.con1=con1
639
+ this.searchData.con2=con2
640
+ this.searchData.f_itemvalue=this.check_item
641
+ this.searchData.f_itemname=this.check_itemValue
642
+ this.model.con1=con1
643
+ this.model.con2=con2
644
+ return this.model.search( args.condition, args.model)
645
+ },
646
+ /*checkstatus() {
647
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]
648
+ },*/
649
+ usertypes() {
650
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
651
+ },
652
+ userstates() {
653
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')]
654
+ },
655
+ show() {
656
+ this.criteriaShow = true
657
+ },
658
+ hidden() {
659
+ this.criteriaShow = false
660
+ },
661
+ confirm() {
662
+ if (!this.checkboxModel.f_plan_name) {
663
+ this.$showMessage('请填写安检计划名称!')
664
+ return
665
+ }
666
+ // if(this.f_effective_start_time == ''){
667
+ // this.$showMessage('请选择有效起始日期!')
668
+ // return
669
+ // }
670
+ // if(this.f_effective_end_time == ''){
671
+ // this.$showMessage('请选择有效结束日期!')
672
+ // return
673
+ // }
674
+ if(this.IsShare == '否'){
675
+ if (!this.checkboxModel.f_checker_id) {
676
+ this.$showMessage('请选择安检员!')
677
+ return
678
+ }
679
+ }
680
+ let gen = saveGen(this)
681
+ return co(gen)
682
+ },
683
+ changeStates() {
684
+ if (this.checkedAll) {//实现反选/
685
+ this.checkrows = [];
686
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
687
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
688
+ }
689
+ } else {//实现全选
690
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
691
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
692
+ }
693
+ let _this = this
694
+ let condition = this.$refs.paged.$refs.criteria.condition
695
+ let url = this.model.url
696
+ this.$resetpost(`${url}?pageSize=9999999`, {
697
+ data: {
698
+ condition: condition,
699
+ groupitem: '',
700
+ orderitem: 'f_residential_area',
701
+ f_usertype:this.model.f_usertype,
702
+ f_filialeids: this.model.f_filialeids,
703
+ month: this.model.month,
704
+ safeCycle:this.model.safeCycle,
705
+ f_checktime_start:this.model.f_checktime_start,
706
+ f_checktime_end:this.model.f_checktime_end,
707
+ SafeCheckSX: this.model.SafeCheckSX,
708
+ f_last_check_state: this.model.f_last_check_state
709
+ },
710
+ },{resolveMsg: null, rejectMsg: null}, -1).then(
711
+ (respanse) => {
712
+ if (respanse.data.length >= 5000) {
713
+ this.$showMessage("数据量太大,请重新选择")
714
+ } else {
715
+ _this.checkrows = []
716
+ for (let j = 0; j < respanse.data.length; j++) {
717
+ _this.checkrows.push(respanse.data[j])
718
+ }
719
+ console.log(_this.checkrows);
720
+ }
721
+ })
722
+ }
723
+ },
724
+ addChecked(item) {
725
+ console.log(item);
726
+ if (!item.checked) {
727
+ this.checkrows.push(item);
728
+ console.log(this.checkrows);
729
+ } else {
730
+ for (let i = 0; i < this.checkrows.length; i++) {
731
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
732
+ this.checkrows.splice(i, 1)
733
+ }
734
+ }
735
+ }
736
+ },
737
+ ToshowModal() {
738
+ this.creatPlanWay = 'single'
739
+ if (this.checkrows.length > 0) {
740
+ this.showModal = true
741
+ } else {
742
+ this.$showMessage("请选择需要安检的用户!")
743
+ }
744
+ },
745
+ FiltrationPlan(){
746
+ if(this.model.rows.length == 0){
747
+ this.$showMessage("暂无可生成的计划!")
748
+ return
749
+ }
750
+ this.creatPlanWay = 'filtration'
751
+ this.showModal = true
752
+ },
753
+ AllPlan() {
754
+ if(this.model.rows.length == 0){
755
+ this.$showMessage("暂无可生成的计划!")
756
+ return
757
+ }
758
+ this.creatPlanWay = 'all'
759
+ this.showModal = true
760
+ },
761
+ cancel() {
762
+ this.showModal = false
763
+ },
764
+ areas() {
765
+ let rs = []
766
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
767
+ let temp = {
768
+ label: this.$login.f.f_allArea[i].label,
769
+ value: this.$login.f.f_allArea[i].label
770
+ }
771
+ rs.push(temp)
772
+ }
773
+ return [{label: '全部', value: ''}, ...rs]
774
+ },
775
+ initAdjustables() {
776
+ console.log('初始化调压箱', this.$GetSaleParam)
777
+ let arr = []
778
+ let filter = this.$login.f.f_orgids
779
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
780
+ let temp = {}
781
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
782
+ temp.value = `${item.value.id}`
783
+ arr.push(temp)
784
+ })
785
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
786
+ },
787
+ },
788
+
789
+ watch: {
790
+ 'check_item'(){
791
+ this.check_itemValue=''
792
+ },
793
+ 'model.model.f_residential_area'(){
794
+ this.model.model.f_building = []
795
+ this.buildingChick = []
796
+ if (!this.model.model){
797
+ return
798
+ }
799
+ if (!this.model.model.f_residential_area){
800
+ return
801
+ }
802
+ let HttpReset = new HttpResetClass()
803
+ let redata = []
804
+ HttpReset.load('POST', '/rs/sql/safe_singleTable_GroupBy', {
805
+ data: {
806
+ items: "f_building",
807
+ tablename: "t_user_address",
808
+ condition: `f_filialeid = ${this.$login.f.orgid} and f_residential_area= '${this.model.model.f_residential_area}'`,
809
+ groupitem: "f_building order by cast((case PATINDEX('%[^0-9]%', f_building) when 0 then f_building else 999 end) as int)"
810
+ }
811
+ }, {resolveMsg: null, rejectMsg: '获取楼栋列表失败!'}).then(res=>{
812
+ res.data.forEach((row, n) => {
813
+ redata.push({ label: row.f_building,value: row.f_building,data:row})
814
+ })
815
+ this.buildingChick = redata;
816
+ })
817
+ },
818
+ 'model.f_usertype'(val){
819
+ if(val == '民用'){
820
+ this.model.safeCycle = this.civil
821
+ }else if(val == '非民用'){
822
+ this.model.safeCycle = this.civilian
823
+ }
824
+ },
825
+ 'model.SafeCheckXZ'(val) {
826
+ this.model.SafeCheckSC = ''
827
+ if (val == '已安检') {
828
+ this.model.SafeCheckCQ = ''
829
+ this.model.SafeCheckSX = {
830
+ f_check_end: '', // 安检时间 查询起始条件
831
+ f_check_start: ''// 安检时间 查询终止条件
832
+ }
833
+ } else {
834
+ // 当使用筛选条件时,清空不需要的条件选项
835
+ this.model.f_issue_start = ''
836
+ this.model.f_issue_end = ''
837
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
838
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
839
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
840
+ this.model.month = ''
841
+ if(val == '应安检'){
842
+ this.model.SafeCheckSC = '否'
843
+
844
+ this.model.f_issue_start = Util.toStartDateString()
845
+ this.model.f_issue_end = Util.toStandardDateString()
846
+ }
847
+ // this.model.f_checktime_start = ''
848
+ // this.model.f_checktime_end = ''
849
+ }
850
+ },
851
+ 'model.SafeCheckSC'(val) {
852
+ if (val == '') {
853
+ this.model.f_issue_start = ''
854
+ this.model.f_issue_end = ''
855
+ }
856
+ },
857
+ // 'checker'(val){
858
+ // console.log("checker",this.checker)
859
+ // if(val){
860
+ // this.checkboxModel.f_checker = this.checker[0].name
861
+ // this.checkboxModel.f_checker_id = this.checker[0].id
862
+ // }
863
+ // },
864
+ 'model.rows'() {
865
+ // if (!this.checkedAll) {//实现反选/
866
+ // this.checkrows = [];
867
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
868
+ var k = false
869
+ for (let j = 0; j < this.checkrows.length; j++) {
870
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
871
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
872
+ k = true
873
+ continue
874
+ }
875
+ }
876
+ if (!k) {
877
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
878
+ }
879
+ }
880
+ // } else {//实现全选
881
+ // // this.checkboxModel = {};
882
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
883
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
884
+ // }
885
+ // }
886
+ }
887
+ },
888
+ computed: {
889
+ selected() {
890
+ return this.$refs.paged.$refs.grid.selected
891
+ },
892
+ check_itemValues(){
893
+ return [ ...this.$appdata.getParam(this.check_item)]
894
+ }
895
+ }
896
+ }
897
+ </script>
898
+ <style scoped>
899
+ .newcolor{
900
+ color:red;
901
+ }
902
+ .table th{
903
+ background-color: #f2f6fa;
904
+ color: black;
905
+ }
906
+ </style>