safecheck-client 3.0.34-84 → 3.0.34-87

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