safecheck-client 4.0.1-43 → 4.0.1-45

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