safecheck-client 3.0.30-62-t11 → 3.0.30-62-t12

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