safecheck-client 4.0.1-4 → 4.0.1-5

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 (253) 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/NewDefectList/DefectListNew.vue +663 -663
  6. package/src/components/NewDefectList/DefectPaperNew.vue +1184 -1184
  7. package/src/components/Util/SafecheckUpload.vue +281 -281
  8. package/src/components/android/AddPlanItem.vue +447 -447
  9. package/src/components/android/AddPlanItemYy.vue +451 -451
  10. package/src/components/android/AddSpecialPlanItem.vue +426 -426
  11. package/src/components/android/AndroidDefectDetails.vue +769 -769
  12. package/src/components/android/CurrentCreateYy.vue +1051 -1051
  13. package/src/components/android/Devices.vue +327 -327
  14. package/src/components/android/Devicesm.vue +327 -327
  15. package/src/components/android/PaperFeedbackm.vue +1026 -1026
  16. package/src/components/android/PhoneRecordInfo.vue +113 -113
  17. package/src/components/android/PhoneSellInfo.vue +113 -113
  18. package/src/components/android/PhoneUpDetail.vue +1040 -1040
  19. package/src/components/android/PhoneUpUserinfo.vue +1249 -1249
  20. package/src/components/android/QRCode/QRCodeBinding.vue +300 -300
  21. package/src/components/android/QRCode/QRCodePage.vue +212 -212
  22. package/src/components/android/SafePlanItem.vue +509 -509
  23. package/src/components/android/SafeRightTree.vue +218 -218
  24. package/src/components/android/SafecheckDevices.vue +1340 -1340
  25. package/src/components/android/examples/SafeListExamples.vue +296 -296
  26. package/src/components/android/old/PaperFeedback.vue +1015 -1015
  27. package/src/components/android/recheck/Recheck.vue +402 -402
  28. package/src/components/android/userinfo/SafecheckUserInfo.vue +776 -776
  29. package/src/components/checkplan/checkmsg.vue +459 -459
  30. package/src/components/defect/DefectList.vue +507 -507
  31. package/src/components/defect/DefectListWeixiu.vue +484 -484
  32. package/src/components/filialCircle/CircleList.vue +139 -139
  33. package/src/components/inspections/AddInspectPlanItem.vue +325 -325
  34. package/src/components/inspections/AddInspectPlanItems.vue +325 -325
  35. package/src/components/inspections/AddInspectPlanItemss.vue +317 -317
  36. package/src/components/inspections/DisplayInspectionList.vue +1224 -1224
  37. package/src/components/inspections/inspectionOrderV.vue +1853 -1853
  38. package/src/components/inspections/inspectionOrderVs.vue +1853 -1853
  39. package/src/components/inspections/inspectionOrderVss.vue +1856 -1856
  40. package/src/components/inspections/inspectionUserInfo.vue +398 -398
  41. package/src/components/map/PersonTrack.vue +226 -226
  42. package/src/components/paper/PaperList.vue +797 -797
  43. package/src/components/paper/RegionalList.vue +220 -220
  44. package/src/components/pc/AnnouncementPC.vue +524 -524
  45. package/src/components/pc/CheckBook.vue +303 -303
  46. package/src/components/pc/CheckBookArea.vue +146 -146
  47. package/src/components/pc/CheckBookCompany.vue +144 -144
  48. package/src/components/pc/CheckBookDetails.vue +161 -161
  49. package/src/components/pc/CheckBookEntry.vue +60 -60
  50. package/src/components/pc/CheckBookSearchArea.vue +560 -560
  51. package/src/components/pc/CheckBookSearchUnit.vue +229 -229
  52. package/src/components/pc/CheckBookSearchUser.vue +659 -659
  53. package/src/components/pc/CheckBookSearchUserList.vue +674 -674
  54. package/src/components/pc/CheckBookUser.vue +333 -333
  55. package/src/components/pc/DefectList.vue +742 -742
  56. package/src/components/pc/DeviceChange.vue +1068 -1068
  57. package/src/components/pc/PaperDefectMain.vue +880 -880
  58. package/src/components/pc/SafeVisitInfo.vue +261 -261
  59. package/src/components/querycheckpaper/CheckPaperList.vue +130 -130
  60. package/src/components/report/HiddenSituation.vue +165 -165
  61. package/src/components/rongcheng/AspiratedOrderV.vue +2377 -2377
  62. package/src/components/rongcheng/CurrentCreateOnline.vue +906 -906
  63. package/src/components/rongcheng/DefectList.vue +560 -560
  64. package/src/components/rongcheng/SafecheckOrderVCli.vue +2641 -2641
  65. package/src/components/safecheckNew/android/AddPlanItem.vue +419 -419
  66. package/src/components/safecheckNew/android/CurrentCreate.vue +1050 -1050
  67. package/src/components/safecheckNew/android/Recheck.vue +379 -379
  68. package/src/components/sendsingle/EquipmentManagement.vue +727 -727
  69. package/src/components/shaoguan/DefectList.vue +473 -473
  70. package/src/components/shaoguan/SafecheckOrderV.vue +2140 -2140
  71. package/src/components/tongcheng/PaperFeedback.vue +1061 -1061
  72. package/src/components/userfile/SecurityAudit.vue +243 -243
  73. package/src/filiale/ALshan/pc/DefectListWeixiu.vue +476 -476
  74. package/src/filiale/ancheng/android/SafecheckOrderV.vue +2703 -2703
  75. package/src/filiale/ancheng/android/SafecheckUserInfo.vue +737 -737
  76. package/src/filiale/ancheng/pc/checkScreen.vue +923 -923
  77. package/src/filiale/ankangyihua/android/AddPlanItem.vue +446 -446
  78. package/src/filiale/ankangyihua/android/SafecheckOrderV.vue +2908 -2908
  79. package/src/filiale/ankangyihua/pc/DefectListWeixiu.vue +491 -491
  80. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -2785
  81. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
  82. package/src/filiale/bayan/android/Edit.vue +132 -132
  83. package/src/filiale/bayan/pc/DefectListNew.vue +597 -597
  84. package/src/filiale/bayan/pc/DeviceChange.vue +1838 -1838
  85. package/src/filiale/bayan/pc/HiddenSituation.vue +295 -295
  86. package/src/filiale/dexin/android/CasualSave.vue +1050 -1050
  87. package/src/filiale/dexin/android/SafecheckOrderV.vue +2950 -2950
  88. package/src/filiale/fugou/android/AddPlanItem.vue +413 -413
  89. package/src/filiale/fugou/android/SafecheckOrderV.vue +2796 -2796
  90. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +830 -830
  91. package/src/filiale/fugu/android/SafecheckOrderV.vue +2484 -2484
  92. package/src/filiale/fugu/pc/NewCheckpaper.vue +1287 -1287
  93. package/src/filiale/ganquan/android/AddPlanItem.vue +444 -444
  94. package/src/filiale/ganquan/android/SafecheckOrderV.vue +2485 -2485
  95. package/src/filiale/ganquan/pc/NewCheckpaper.vue +1354 -1354
  96. package/src/filiale/guangxi/pc/DefectListNew.vue +518 -518
  97. package/src/filiale/hanzhong/android/SafecheckOrderV.vue +2683 -2683
  98. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +786 -786
  99. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -2803
  100. package/src/filiale/huatong/android/SafecheckOrderV.vue +2426 -2426
  101. package/src/filiale/huatong/android/SafecheckUserInfo.vue +749 -749
  102. package/src/filiale/huayin/pc/NewCheckpaper.vue +1307 -1307
  103. package/src/filiale/jiaocheng/android/AddPlanItem.vue +435 -435
  104. package/src/filiale/jiaocheng/android/SafecheckUserInfo.vue +737 -737
  105. package/src/filiale/jiaocheng/pc/DefectListNew.vue +576 -576
  106. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -447
  107. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -2807
  108. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -784
  109. package/src/filiale/jinbin/pc/DefectListWeixiu.vue +478 -478
  110. package/src/filiale/jingyang/android/AddPlanItem.vue +458 -458
  111. package/src/filiale/jingyang/android/SafecheckOrderV.vue +2734 -2734
  112. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +781 -781
  113. package/src/filiale/kelai/android/AddPlanItem.vue +488 -488
  114. package/src/filiale/kelai/android/SafecheckUserInfo.vue +774 -774
  115. package/src/filiale/kelai/android/SafecheckUserInfo1.vue +618 -618
  116. package/src/filiale/kelai/pc/DefectListNew.vue +688 -688
  117. package/src/filiale/kelai/pc/FaultLimitGas/FaultLimitGasList.vue +518 -518
  118. package/src/filiale/kelai/pc/NewCheckpaper.vue +1454 -1454
  119. package/src/filiale/liaoyuan/android/AddPlanItem.vue +412 -412
  120. package/src/filiale/liaoyuan/android/CurrentCreate.vue +1066 -1066
  121. package/src/filiale/liaoyuan/android/SafecheckOrderV.vue +2388 -2388
  122. package/src/filiale/liaoyuan/android/SafecheckUserInfo.vue +557 -557
  123. package/src/filiale/liaoyuan/pc/DefectListWeixiu.vue +489 -489
  124. package/src/filiale/liaoyuan/pc/NewCheckpaper.vue +1020 -1020
  125. package/src/filiale/lixian/android/SafecheckOrderV.vue +2404 -2404
  126. package/src/filiale/lixian/android/SafecheckUserInfo.vue +578 -578
  127. package/src/filiale/lixian/pc/NewCheckpaper.vue +1211 -1211
  128. package/src/filiale/meihekou/android/AreaPlan.vue +577 -577
  129. package/src/filiale/meihekou/android/CheckPlanList.vue +198 -198
  130. package/src/filiale/meihekou/android/CheckPlanListArea.vue +190 -190
  131. package/src/filiale/meihekou/android/CurrentCreate.vue +1038 -1038
  132. package/src/filiale/meihekou/android/PaperFeedback.vue +1542 -1542
  133. package/src/filiale/meihekou/android/PhoneUpUserinfo.vue +1306 -1306
  134. package/src/filiale/meihekou/android/SafecheckDevices.vue +1340 -1340
  135. package/src/filiale/meihekou/android/SafecheckOrderV.vue +2433 -2433
  136. package/src/filiale/meihekou/android/SafecheckUserInfo.vue +785 -785
  137. package/src/filiale/meihekou/android.js +22 -22
  138. package/src/filiale/meihekou/pc/NewCheckpaper.vue +2027 -2027
  139. package/src/filiale/meihekou/pc/NewCheckpaperTemp.vue +1288 -1288
  140. package/src/filiale/meihekou/pc.js +13 -13
  141. package/src/filiale/minsheng/android/SafecheckUserInfo.vue +754 -754
  142. package/src/filiale/minsheng/pc/DefectListNew.vue +535 -535
  143. package/src/filiale/pingxiang/android/SafecheckOrderV.vue +2424 -2424
  144. package/src/filiale/pingxiang/android/SafecheckUserInfo.vue +600 -600
  145. package/src/filiale/pingxiang/pc/DefectListNew.vue +519 -519
  146. package/src/filiale/pingxiang/pc/NewCheckpaper.vue +1294 -1294
  147. package/src/filiale/qianneng/android/AddPlanItem.vue +482 -482
  148. package/src/filiale/qianneng/android/SafecheckOrderV.vue +2785 -2785
  149. package/src/filiale/qianneng/android/SafecheckUserInfo.vue +775 -775
  150. package/src/filiale/qianneng/pc/DefectListNew.vue +576 -576
  151. package/src/filiale/qianneng/pc/NewCheckpaper.vue +1546 -1546
  152. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
  153. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +800 -800
  154. package/src/filiale/qingjian/pc/NewCheckpaper.vue +1871 -1870
  155. package/src/filiale/qingjian/pc.js +15 -15
  156. package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -450
  157. package/src/filiale/qingtongxia/android/SafecheckOrderV.vue +2726 -2726
  158. package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -782
  159. package/src/filiale/qingtongxia/pc/DefectListNew.vue +594 -594
  160. package/src/filiale/rizhao/android/AddPlanItem.vue +446 -446
  161. package/src/filiale/rizhao/android/SafecheckOrderV.vue +2430 -2430
  162. package/src/filiale/rizhao/android/SafecheckUserInfo.vue +640 -640
  163. package/src/filiale/rizhao/pc/DefectList.vue +489 -489
  164. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2696 -2696
  165. package/src/filiale/rongchuang/android/checkpapermsg.vue +209 -209
  166. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -2747
  167. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -804
  168. package/src/filiale/shanggao/android/SafecheckOrderV.vue +2426 -2426
  169. package/src/filiale/shanxian/android/SafecheckUserInfo.vue +749 -749
  170. package/src/filiale/shanxian/pc/HiddenSituation.vue +121 -121
  171. package/src/filiale/shanxian/pc/NewCheckpaper.vue +1526 -1526
  172. package/src/filiale/shexian/android/AddPlanItem.vue +444 -444
  173. package/src/filiale/shexian/android/SafecheckOrderV.vue +2879 -2879
  174. package/src/filiale/shexian/pc/DefectListNew.vue +593 -593
  175. package/src/filiale/shexian/pc/NewCheckpaper.vue +1469 -1469
  176. package/src/filiale/shimen/android/SafecheckUserInfo.vue +547 -547
  177. package/src/filiale/shimen/pc/DefectList.vue +473 -473
  178. package/src/filiale/shimen/pc/NewCheckpaper.vue +1275 -1275
  179. package/src/filiale/siyang/android/AddPlanItem.vue +450 -450
  180. package/src/filiale/siyang/android/CurrentCreate.vue +1051 -1051
  181. package/src/filiale/siyang/android/PhoneRecordInfo.vue +214 -214
  182. package/src/filiale/siyang/android/SafecheckOrderV.vue +2796 -2796
  183. package/src/filiale/siyang/android/SafecheckUserInfo.vue +789 -789
  184. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -167
  185. package/src/filiale/tianke/android/AddPlanItem.vue +455 -455
  186. package/src/filiale/tianke/android/SafecheckOrderV.vue +2431 -2431
  187. package/src/filiale/tianke/android/SafecheckUserInfo.vue +744 -744
  188. package/src/filiale/tongchuan/android/AddPlanItem.vue +483 -483
  189. package/src/filiale/tongchuan/android/PhoneRecordInfo.vue +191 -191
  190. package/src/filiale/tongchuan/android/PhoneSellInfo.vue +113 -113
  191. package/src/filiale/tongchuan/android/SafecheckUserInfo.vue +720 -720
  192. package/src/filiale/tongchuan/pc/CheckBookDetails.vue +209 -209
  193. package/src/filiale/tongchuan/pc/DefectListWeixiu.vue +484 -484
  194. package/src/filiale/tongchuan/pc/HiddenSituation.vue +166 -166
  195. package/src/filiale/weinan/android/AddPlanItem.vue +438 -438
  196. package/src/filiale/weinan/android/CurrentCreate.vue +1171 -1171
  197. package/src/filiale/weinan/android/CurrentCreateOnline.vue +911 -911
  198. package/src/filiale/weinan/android/SafePlanItem.vue +440 -440
  199. package/src/filiale/weinan/android/SafecheckUserInfo.vue +778 -778
  200. package/src/filiale/weinan/pc/DefectListNew.vue +617 -617
  201. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -1088
  202. package/src/filiale/weinan/pc/HiddenSituation.vue +167 -167
  203. package/src/filiale/weinan/pc/checkScreen.vue +1094 -1094
  204. package/src/filiale/weinanct/android/SafecheckOrderV.vue +2730 -2730
  205. package/src/filiale/weinanct/pc/NewCheckpaper.vue +1315 -1315
  206. package/src/filiale/wensu/android/AddPlanItem.vue +495 -495
  207. package/src/filiale/wensu/android/AndroidDefectDeal.vue +464 -464
  208. package/src/filiale/wensu/android/PaperFeedback.vue +1358 -1358
  209. package/src/filiale/wensu/android/SafecheckOrderV.vue +2430 -2430
  210. package/src/filiale/wensu/android/SafecheckUserInfo.vue +627 -627
  211. package/src/filiale/wensu/pc/DefectListNew.vue +735 -735
  212. package/src/filiale/wenxi/android/AddPlanItem.vue +431 -431
  213. package/src/filiale/wenxi/android/SafecheckOrderV.vue +2671 -2671
  214. package/src/filiale/wenxi/android/SafecheckUserInfo.vue +673 -673
  215. package/src/filiale/wenxi/pc/DefectList.vue +653 -653
  216. package/src/filiale/wenxi/pc/NewCheckpaper.vue +1358 -1358
  217. package/src/filiale/wuan/android/SafecheckOrderV.vue +2241 -2241
  218. package/src/filiale/wuan/android/SafecheckUserInfo.vue +596 -596
  219. package/src/filiale/wuan/pc/DefectListWeixiu.vue +506 -506
  220. package/src/filiale/wuan/pc/NewCheckpaper.vue +1169 -1169
  221. package/src/filiale/wuhai/android/SafecheckOrderV.vue +2456 -2456
  222. package/src/filiale/wuhai/android/SafecheckUserInfo.vue +573 -573
  223. package/src/filiale/wuhai/pc/NewCheckpaper.vue +1281 -1281
  224. package/src/filiale/xiangyuanzhongai/android/PhoneUpUserinfo.vue +1251 -1251
  225. package/src/filiale/xinkang/android/SafecheckUserInfo.vue +747 -747
  226. package/src/filiale/xinkang/pc/DefectListWeixiu.vue +475 -475
  227. package/src/filiale/xinkang/pc/NewCheckpaper.vue +1498 -1498
  228. package/src/filiale/yangchunboneng/android/AddPlanItem.vue +496 -496
  229. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2865 -2865
  230. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
  231. package/src/filiale/yangchunboneng/pc/DefectListNew.vue +576 -576
  232. package/src/filiale/yongzhou/android/SafecheckOrderV.vue +2774 -2774
  233. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +776 -776
  234. package/src/filiale/yuansheng/android/SafecheckOrderV.vue +2758 -2758
  235. package/src/filiale/yuansheng/android/SafecheckUserInfo.vue +797 -797
  236. package/src/filiale/yuansheng/pc/DefectListNew.vue +524 -524
  237. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +1371 -1371
  238. package/src/filiale/yuansheng/pc/checkmsg.vue +464 -464
  239. package/src/filiale/yunchengminsheng/android/DailyworkloadQuery.vue +491 -491
  240. package/src/filiale/yunchengminsheng/android/PhoneSellInfo.vue +113 -113
  241. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +785 -785
  242. package/src/filiale/yunchengminsheng/android.js +15 -15
  243. package/src/filiale/zhongsheng/android/BuyRecords.vue +122 -122
  244. package/src/filiale/zhongsheng/android/SafecheckOrderV.vue +2461 -2461
  245. package/src/filiale/zhongsheng/android/SafecheckUserInfo.vue +690 -690
  246. package/src/filiale/zhongsheng/pc/DefectListWeixiu.vue +514 -514
  247. package/src/filiale/zhongsheng/pc/NewCheckpaper.vue +1322 -1322
  248. package/src/filiale/zhongyi/android/SafecheckOrderV.vue +2431 -2431
  249. package/src/filiale/zhongyi/pc/DefectListNew.vue +514 -514
  250. package/src/filiale/zhoukou/android/SafecheckOrderV.vue +2502 -2502
  251. package/src/filiale/zhoukou/android/SafecheckUserInfo.vue +588 -588
  252. package/src/main.js +1 -2
  253. package/src/safecheck-android.js +312 -312
@@ -1,560 +1,560 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
-
9
- <div class="col-sm-3 form-group" style="margin-bottom: 0px">
10
- <label class="font_normal_body">公&emsp;&emsp;司</label>
11
- <right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="ta.f_orgid in {}"></right-tree-safe>
12
- </div>
13
- <div class="form-group col-sm-3">
14
- <label class="font_normal_body">小区名称</label>
15
- <input type="text" class="input_search" v-model="model.f_residential_area"
16
- style="width: 60%" placeholder="小区名称" condition="f_residential_area like '%{}%'">
17
- </div>
18
- <div class="form-group col-sm-3">
19
- <label class="font_normal_body">是否在册</label>
20
- <v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
21
- :value-single="true" style="width: 60%"
22
- class="select_list select"
23
- @change="$parent.$parent.changeState"
24
- :options='$parent.$parent.isCheckBook' placeholder='有无所属安检册'
25
- close-on-select
26
- condition="{}"></v-select>
27
- </div>
28
- <div class="form-group col-sm-3">
29
- <button class="button_spacing button_search" @click="search()">查询</button>
30
- <!-- <div style="float: right" class="button_spacing"
31
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
32
- @click="$parent.$parent.hidden()"></div>-->
33
- </div>
34
-
35
-
36
-
37
-
38
- </div>
39
- </div>
40
- </criteria>
41
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
42
- <template partial='head'>
43
- <tr @dblclick.stop="">
44
- <th>
45
- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
46
- </th>
47
- <th>
48
- <nobr>区/县</nobr>
49
- </th>
50
- <th>
51
- <nobr>街道/乡镇</nobr>
52
- </th>
53
- <th>
54
- <nobr>片区/行政村</nobr>
55
- </th>
56
- <th>
57
- <nobr>小区/自然村</nobr>
58
- </th>
59
- <th>
60
- <nobr>所属安检册</nobr>
61
- </th>
62
- </tr>
63
- </template>
64
- <template partial='body'>
65
- <td style="text-align: center">
66
- <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
67
- @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
68
- </nobr>
69
- </td>
70
- <td style="text-align: center">{{ row.f_pcd }}</td>
71
- <td style="text-align: center">{{ row.f_street }}</td>
72
- <td style="text-align: center">{{ row.f_community_name }}</td>
73
- <td style="text-align: center">{{ row.f_residential_area }}</td>
74
- <td style="text-align: center">{{ row.f_check_book_name }}</td>
75
- </template>
76
- </data-grid>
77
- </criteria-paged>
78
- </div>
79
- <modal :show.sync="showModal" :backdrop="false">
80
- <div slot="modal-header" class="modal-header">
81
- <h4 class="modal-title">
82
- 创建安检册
83
- </h4>
84
- </div>
85
- <div slot="modal-body" class="modal-body">
86
- <div v-if="true">
87
- <div class="row" style="margin-top: 10px">
88
-
89
- <div class="col-sm-12 form-group" style="margin: 0">
90
- <role-selector-safe
91
- @re-res="getRes"
92
- role-name="安检员"
93
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
94
- :value.sync="checkBook.f_checker_name"
95
- v-model="checkBook.f_checker_name">
96
- </role-selector-safe>
97
- </div>
98
- <div class="form-group col-sm-6" style="margin-top: 20px">
99
- <label class="font_normal_body">安检册名</label>
100
- <input type="text" class="input_search" v-model="checkBook.f_check_book_name"
101
- style="width: 60%" >
102
- </div>
103
- <div class="form-group col-sm-6" style="margin-top: 20px">
104
- <label class="font_normal_body">执行日期</label>
105
- <datepicker
106
- :value.sync="checkBook.f_run_date"
107
- style="width: 60%"
108
- :format="'yyyy-MM-dd'"
109
- v-model="checkBook.f_run_date"
110
- >
111
- </datepicker>
112
- </div>
113
- <div class="form-group col-sm-6" style="margin-top: 20px">
114
- <label class="font_normal_body">执行周期</label>
115
- <input type="number" class="input_search" v-model="checkBook.f_around_time"
116
- style="width: 60%" >
117
- </div>
118
- <div class="form-group col-sm-6" style="margin-top: 20px">
119
- <label class="font_normal_body">周期单位</label>
120
- <v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
121
- :value-single="true" style="width: 60%"
122
- class="select_list select"
123
- :options='aroundUnit' placeholder=''
124
- close-on-select></v-select>
125
- </div>
126
- </div>
127
- </div>
128
- </div>
129
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
130
- <button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
131
- <button class="button_search" @click="cancel">取消</button>
132
- </div>
133
- </modal>
134
- <modal :show.sync="showModal2" :backdrop="false">
135
- <div slot="modal-header" class="modal-header">
136
- <h4 class="modal-title">
137
- 添加用户
138
- </h4>
139
- </div>
140
- <div slot="modal-body" class="modal-body">
141
- <div v-if="true">
142
- <div class="row" style="margin-top: 10px">
143
- <div class="form-group col-sm-12" style="margin-top: 20px">
144
- <label class="font_normal_body">安&ensp;检&ensp;册</label>
145
- <v-select :value.sync="selectBook" v-model='selectBook'
146
- :value-single="true" style="width: 80%"
147
- class="select_list select"
148
- :options='checkBooks' placeholder=''
149
- close-on-select></v-select>
150
- </div>
151
- </div>
152
- </div>
153
- </div>
154
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
155
- <button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
156
- <button class="button_search" @click="cancel2">取消</button>
157
- </div>
158
- </modal>
159
- <modal :show.sync="showModal3" :backdrop="false">
160
- <div slot="modal-header" class="modal-header">
161
- <h4 class="modal-title">
162
- 调整用户
163
- </h4>
164
- </div>
165
- <div slot="modal-body" class="modal-body">
166
- <div v-if="true">
167
- <div class="row" style="margin-top: 10px;text-align: center">
168
- <div class="form-group col-sm-12" style="margin-top: 20px">
169
- <label class="font_normal_body">安&ensp;检&ensp;册</label>
170
- <v-select :value.sync="selectBook" v-model='selectBook'
171
- :value-single="true" style="width: 80%"
172
- class="select_list select"
173
- :options='checkBooks' placeholder=''
174
- close-on-select></v-select>
175
- </div>
176
- </div>
177
- </div>
178
- </div>
179
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
180
- <button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
181
- <button class="button_search" @click="cancel3">取消</button>
182
- </div>
183
- </modal>
184
-
185
- </div>
186
- </template>
187
-
188
- <script>
189
- import {PagedList, HttpResetClass} from 'vue-client'
190
- import * as Util from '../../components/Util'
191
- import bus from "../../bus";
192
-
193
- export default {
194
- title: '安检册管理',
195
- data () {
196
- let model = new PagedList('api/af-safecheck/sql/safe_singleTable_OrderBy', 20,{
197
- items: "'ta.f_residential_area,ta.id,tcb.f_check_book_name,tcm.f_community_name,tcm.f_street'",
198
- tablename: "'t_area ta left join t_check_book tcb on ta.f_check_book_id=tcb.id left join t_community tcm on ta.f_community_id = tcm.id'",
199
- orderitem: "'id desc'"
200
- })
201
- return {
202
- model: model,
203
- criteriaShow: false,
204
- excelHeaders: {},
205
- checkBooks: [],
206
- f_orgid: '',
207
- bookAll: false,
208
- bookList: [],
209
- selectBook:'',
210
- // init:false,
211
- aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
212
- isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'f_check_book_id is not null'}, {label: '否', value: 'f_check_book_id is null'}],
213
- isSearch: false,
214
- checkBook: {
215
- f_check_book_name: '',
216
- f_run_date: '',
217
- f_around_time: '',
218
- f_around_unit: '',
219
- f_create_date: Util.toStandardDateString(),
220
- f_create_person: this.$login.f.name,
221
- f_orgid: '',
222
- f_checker_name: ''
223
- },
224
- showModal: false,
225
- showModal2: false,
226
- showModal3: false
227
- }
228
- },
229
- beforeDestroy() {
230
- //tag
231
- bus.$off('fresh-area')
232
- },
233
- computed: {
234
- searchData () {
235
- return {condition: this.model.condition}
236
- },
237
- bookCondition () {
238
- return this.model.condition
239
- },
240
- isCreateBook () {
241
- return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
242
- },
243
- isChangeBook () {
244
- return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
245
- }
246
- },
247
- watch:{
248
- 'bookList'(){
249
- this.$emit('book-list',this.bookList)
250
- },
251
- 'bookAll'(val){
252
- if(!val){
253
- this.bookList=[]
254
- }
255
- this.$emit('book-all',this.bookAll)
256
- }
257
- },
258
- methods: {
259
- async ok2() {
260
- if (!this.selectBook) {
261
- this.$showMessage('请选择安检册')
262
- return
263
- }
264
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
265
- let userCondition = ''
266
- if (this.bookList.length < 1) {
267
- //tag
268
- userCondition = this.bookCondition
269
- } else {
270
- //tag)
271
-
272
- userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
273
- userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
274
- //tag
275
- }
276
- let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
277
- FROM
278
- t_userinfo tui
279
- LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
280
- LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
281
- LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
282
- WHERE
283
- tui.f_user_state = '正常'
284
- AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
285
- AND ${userCondition}`
286
- await new HttpResetClass().load('POST', 'api/af-safecheck/logic/runSQL', {data: {sql: addUser}},
287
- {resolveMsg: null, rejectMsg: '添加用户失败'})
288
- this.$showMessage('添加用户成功')
289
- this.selectBook = ''
290
- this.bookAll = false
291
- this.bookList = []
292
- this.showModal2 = false
293
- this.$refs.paged.$refs.criteria.search()
294
- }
295
- },
296
- async ok3() {
297
- if (!this.selectBook) {
298
- this.$showMessage('请选择安检册')
299
- return
300
- }
301
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
302
- let userCondition = ''
303
- if (this.bookList.length < 1) {
304
- //tag
305
- userCondition = this.bookCondition
306
- } else {
307
- //tag)
308
-
309
- userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
310
- userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
311
- //tag
312
- }
313
- let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
314
- FROM
315
- t_userinfo tui
316
- LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
317
- LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
318
- LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
319
- WHERE
320
- tui.f_user_state = '正常'
321
- AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
322
- AND ${userCondition}`
323
- await new HttpResetClass().load('POST', 'api/af-safecheck/logic/runSQL', {data: {sql: upUser}},
324
- {resolveMsg: null, rejectMsg: '调整用户失败'})
325
- this.$showMessage('调整用户成功')
326
- this.selectBook = ''
327
- this.bookAll = false
328
- this.bookList = []
329
- this.showModal3 = false
330
- this.$refs.paged.$refs.criteria.search()
331
- }
332
- },
333
- cancel2(){
334
- this.selectBook = ''
335
- this.bookAll = false
336
- this.bookList = []
337
- this.showModal2 = false
338
- this.$refs.paged.$refs.criteria.search()
339
- },
340
- cancel3(){
341
- this.selectBook = ''
342
- this.bookAll = false
343
- this.bookList = []
344
- this.showModal3 = false
345
- this.$refs.paged.$refs.criteria.search()
346
- },
347
- addUser () {
348
- if (!this.isCreateBook) {
349
- this.$showMessage('请选择查询未划分安检册的用户')
350
- return
351
- }
352
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
353
- this.showModal2 = true
354
- this.freshCheckBook()
355
- return
356
- }
357
- this.$showMessage('请选择用户')
358
- },
359
- upUser () {
360
- if (!this.isChangeBook) {
361
- this.$showMessage('请选择查询已划分安检册的用户')
362
- return
363
- }
364
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
365
- this.showModal3 = true
366
- this.freshCheckBook()
367
- return
368
- }
369
- this.$showMessage('请选择用户')
370
- },
371
- async delUser () {
372
- if (!this.isChangeBook) {
373
- this.$showMessage('请选择查询已划分安检册的用户')
374
- return
375
- }
376
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
377
- let userCondition= ''
378
- if (this.bookList.length < 1) {
379
- //tag
380
- userCondition = this.bookCondition
381
- } else {
382
- //tag)
383
-
384
- userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
385
- userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
386
- //tag
387
- }
388
- let delUser= `update t_user_address set f_check_book_id =null
389
- FROM
390
- t_userinfo tui
391
- LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
392
- LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
393
- LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
394
- WHERE
395
- tui.f_user_state = '正常'
396
- AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
397
- AND ${userCondition}`
398
- await new HttpResetClass().load('POST', 'api/af-safecheck/logic/runSQL', {data: {sql: delUser}},
399
- {resolveMsg: null, rejectMsg: '删除安检册失败'})
400
- this.$showMessage('从安检册删除所选用户成功')
401
- this.selectBook = ''
402
- this.bookAll = false
403
- this.bookList = []
404
- this.showModal3 = false
405
- this.$refs.paged.$refs.criteria.search()
406
- return
407
- }
408
- this.$showMessage('请选择用户')
409
- },
410
- beforeCreateBook () {
411
- if (!this.isCreateBook) {
412
- this.$showMessage('请选择查询未划分安检册的用户')
413
- return
414
- }
415
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
416
- this.showModal = true
417
- return
418
- }
419
- this.$showMessage('请选择用户')
420
- },
421
- ok () {
422
- //tag)
423
- let condition = ''
424
- if (!this.checkBook.f_check_book_name) {
425
- return this.$showMessage('请填写册名')
426
- }
427
- if (!this.checkBook.f_checker_name) {
428
- return this.$showMessage('请选择安检员')
429
- }
430
- if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
431
- return this.$showMessage('请选填写周期信息')
432
- }
433
- if (!this.checkBook.f_run_date) {
434
- return this.$showMessage('执行日期')
435
- }
436
- if (this.bookList.length < 1) {
437
- //tag
438
- condition = this.bookCondition
439
- } else {
440
- //tag)
441
-
442
- condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
443
- condition = 'tui.f_userinfo_id in (' + condition + ')'
444
- //tag
445
- }
446
- let data = {
447
- checkBook: this.checkBook,
448
- sqlStr: condition
449
- }
450
- new HttpResetClass().load('post', 'api/af-safecheck/logic/AddCheckBook', {data}).then(res => {
451
- //tag)
452
- if (res.data.id) {
453
- this.$showMessage('创建成功')
454
- this.showModal = false
455
- this.isSearch = false
456
- this.bookList = []
457
- this.bookAll = false
458
- this.freshCheckBook()
459
- this.$refs.paged.$refs.criteria.search()
460
- }
461
- })
462
- },
463
- changeState (val) {
464
- //tag
465
- //tag
466
- this.bookAll = false
467
- this.bookList = []
468
- if (this.$refs.paged.$refs.criteria.model.f_orgid){
469
- this.$refs.paged.$refs.criteria.search()
470
- }
471
- },
472
- cancel () {
473
- this.bookAll = false
474
- this.bookList = []
475
- this.showModal = false
476
- this.$refs.paged.$refs.criteria.search()
477
- },
478
- checkModel (row) {
479
- if (this.bookAll) {
480
- //tag)
481
- return true
482
- } else {
483
- if (this.bookList.findIndex(res => res === row.id) !== -1) {
484
- return true
485
- } else {
486
- return false
487
- }
488
- }
489
- },
490
- checkChange (row, e) {
491
- //tag
492
- if (e.target.checked) {
493
- this.bookList.push(row.id)
494
- } else {
495
- this.bookList.splice(this.bookList.findIndex(res => res === row.id), 1)
496
- }
497
- // //tag)
498
- },
499
- getRes (obj) {
500
- this.checkBook.f_orgid = obj.resids[0]
501
- },
502
- getResm (obj) {
503
- this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
504
- },
505
- hidden () {
506
- this.criteriaShow = !this.criteriaShow
507
- },
508
- selfSearch (args) {
509
- this.isSearch = true
510
- this.bookAll = false
511
- this.bookList = []
512
-
513
- console.log("查询66666666666666666")
514
- this.$emit('book-condition',args.condition)
515
- // if (this.$refs.paged.$refs.criteria.model.f_orgid){
516
- // args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
517
- // }
518
- this.model.search(args.condition, args.model)
519
- },
520
- freshCheckBook () {
521
- this.checkBooks = []
522
- new HttpResetClass().load('POST', `/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
523
- data: {
524
- items: 'id,f_check_book_name',
525
- tablename: 't_check_book',
526
- condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
527
- orderitem: 'id desc'
528
- }
529
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
530
- this.checkBooks.push({label: '全部', value: ''})
531
- res.data.forEach(ress => {
532
- this.checkBooks.push({
533
- label: ress.f_check_book_name,
534
- value: ress.id
535
- })
536
- })
537
- })
538
- }
539
- },
540
-
541
- ready () {
542
- bus.$on('fresh-area',()=>{
543
- console.log("进入方法",this.bookAll,this.bookList)
544
- this.bookAll = false
545
- this.bookList = []
546
- this.$refs.paged.$refs.criteria.search()
547
- })
548
- this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_id is null'
549
- //tag
550
- // this.init=true
551
- this.freshCheckBook()
552
- }
553
- }
554
- </script>
555
- <style scoped>
556
- /*.btn-group > .btn:first-child {*/
557
- /* margin-left: 0;*/
558
- /* width: 100%;*/
559
- /*}*/
560
- </style>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+
9
+ <div class="col-sm-3 form-group" style="margin-bottom: 0px">
10
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
11
+ <right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="ta.f_orgid in {}"></right-tree-safe>
12
+ </div>
13
+ <div class="form-group col-sm-3">
14
+ <label class="font_normal_body">小区名称</label>
15
+ <input type="text" class="input_search" v-model="model.f_residential_area"
16
+ style="width: 60%" placeholder="小区名称" condition="f_residential_area like '%{}%'">
17
+ </div>
18
+ <div class="form-group col-sm-3">
19
+ <label class="font_normal_body">是否在册</label>
20
+ <v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
21
+ :value-single="true" style="width: 60%"
22
+ class="select_list select"
23
+ @change="$parent.$parent.changeState"
24
+ :options='$parent.$parent.isCheckBook' placeholder='有无所属安检册'
25
+ close-on-select
26
+ condition="{}"></v-select>
27
+ </div>
28
+ <div class="form-group col-sm-3">
29
+ <button class="button_spacing button_search" @click="search()">查询</button>
30
+ <!-- <div style="float: right" class="button_spacing"
31
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
32
+ @click="$parent.$parent.hidden()"></div>-->
33
+ </div>
34
+
35
+
36
+
37
+
38
+ </div>
39
+ </div>
40
+ </criteria>
41
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
42
+ <template partial='head'>
43
+ <tr @dblclick.stop="">
44
+ <th>
45
+ <nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
46
+ </th>
47
+ <th>
48
+ <nobr>区/县</nobr>
49
+ </th>
50
+ <th>
51
+ <nobr>街道/乡镇</nobr>
52
+ </th>
53
+ <th>
54
+ <nobr>片区/行政村</nobr>
55
+ </th>
56
+ <th>
57
+ <nobr>小区/自然村</nobr>
58
+ </th>
59
+ <th>
60
+ <nobr>所属安检册</nobr>
61
+ </th>
62
+ </tr>
63
+ </template>
64
+ <template partial='body'>
65
+ <td style="text-align: center">
66
+ <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
67
+ @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
68
+ </nobr>
69
+ </td>
70
+ <td style="text-align: center">{{ row.f_pcd }}</td>
71
+ <td style="text-align: center">{{ row.f_street }}</td>
72
+ <td style="text-align: center">{{ row.f_community_name }}</td>
73
+ <td style="text-align: center">{{ row.f_residential_area }}</td>
74
+ <td style="text-align: center">{{ row.f_check_book_name }}</td>
75
+ </template>
76
+ </data-grid>
77
+ </criteria-paged>
78
+ </div>
79
+ <modal :show.sync="showModal" :backdrop="false">
80
+ <div slot="modal-header" class="modal-header">
81
+ <h4 class="modal-title">
82
+ 创建安检册
83
+ </h4>
84
+ </div>
85
+ <div slot="modal-body" class="modal-body">
86
+ <div v-if="true">
87
+ <div class="row" style="margin-top: 10px">
88
+
89
+ <div class="col-sm-12 form-group" style="margin: 0">
90
+ <role-selector-safe
91
+ @re-res="getRes"
92
+ role-name="安检员"
93
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
94
+ :value.sync="checkBook.f_checker_name"
95
+ v-model="checkBook.f_checker_name">
96
+ </role-selector-safe>
97
+ </div>
98
+ <div class="form-group col-sm-6" style="margin-top: 20px">
99
+ <label class="font_normal_body">安检册名</label>
100
+ <input type="text" class="input_search" v-model="checkBook.f_check_book_name"
101
+ style="width: 60%" >
102
+ </div>
103
+ <div class="form-group col-sm-6" style="margin-top: 20px">
104
+ <label class="font_normal_body">执行日期</label>
105
+ <datepicker
106
+ :value.sync="checkBook.f_run_date"
107
+ style="width: 60%"
108
+ :format="'yyyy-MM-dd'"
109
+ v-model="checkBook.f_run_date"
110
+ >
111
+ </datepicker>
112
+ </div>
113
+ <div class="form-group col-sm-6" style="margin-top: 20px">
114
+ <label class="font_normal_body">执行周期</label>
115
+ <input type="number" class="input_search" v-model="checkBook.f_around_time"
116
+ style="width: 60%" >
117
+ </div>
118
+ <div class="form-group col-sm-6" style="margin-top: 20px">
119
+ <label class="font_normal_body">周期单位</label>
120
+ <v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
121
+ :value-single="true" style="width: 60%"
122
+ class="select_list select"
123
+ :options='aroundUnit' placeholder=''
124
+ close-on-select></v-select>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
130
+ <button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
131
+ <button class="button_search" @click="cancel">取消</button>
132
+ </div>
133
+ </modal>
134
+ <modal :show.sync="showModal2" :backdrop="false">
135
+ <div slot="modal-header" class="modal-header">
136
+ <h4 class="modal-title">
137
+ 添加用户
138
+ </h4>
139
+ </div>
140
+ <div slot="modal-body" class="modal-body">
141
+ <div v-if="true">
142
+ <div class="row" style="margin-top: 10px">
143
+ <div class="form-group col-sm-12" style="margin-top: 20px">
144
+ <label class="font_normal_body">安&ensp;检&ensp;册</label>
145
+ <v-select :value.sync="selectBook" v-model='selectBook'
146
+ :value-single="true" style="width: 80%"
147
+ class="select_list select"
148
+ :options='checkBooks' placeholder=''
149
+ close-on-select></v-select>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
155
+ <button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
156
+ <button class="button_search" @click="cancel2">取消</button>
157
+ </div>
158
+ </modal>
159
+ <modal :show.sync="showModal3" :backdrop="false">
160
+ <div slot="modal-header" class="modal-header">
161
+ <h4 class="modal-title">
162
+ 调整用户
163
+ </h4>
164
+ </div>
165
+ <div slot="modal-body" class="modal-body">
166
+ <div v-if="true">
167
+ <div class="row" style="margin-top: 10px;text-align: center">
168
+ <div class="form-group col-sm-12" style="margin-top: 20px">
169
+ <label class="font_normal_body">安&ensp;检&ensp;册</label>
170
+ <v-select :value.sync="selectBook" v-model='selectBook'
171
+ :value-single="true" style="width: 80%"
172
+ class="select_list select"
173
+ :options='checkBooks' placeholder=''
174
+ close-on-select></v-select>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
180
+ <button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
181
+ <button class="button_search" @click="cancel3">取消</button>
182
+ </div>
183
+ </modal>
184
+
185
+ </div>
186
+ </template>
187
+
188
+ <script>
189
+ import {PagedList, HttpResetClass} from 'vue-client'
190
+ import * as Util from '../../components/Util'
191
+ import bus from "../../bus";
192
+
193
+ export default {
194
+ title: '安检册管理',
195
+ data () {
196
+ let model = new PagedList('api/af-safecheck/sql/safe_singleTable_OrderBy', 20,{
197
+ items: "'ta.f_residential_area,ta.id,tcb.f_check_book_name,tcm.f_community_name,tcm.f_street'",
198
+ tablename: "'t_area ta left join t_check_book tcb on ta.f_check_book_id=tcb.id left join t_community tcm on ta.f_community_id = tcm.id'",
199
+ orderitem: "'id desc'"
200
+ })
201
+ return {
202
+ model: model,
203
+ criteriaShow: false,
204
+ excelHeaders: {},
205
+ checkBooks: [],
206
+ f_orgid: '',
207
+ bookAll: false,
208
+ bookList: [],
209
+ selectBook:'',
210
+ // init:false,
211
+ aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
212
+ isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'f_check_book_id is not null'}, {label: '否', value: 'f_check_book_id is null'}],
213
+ isSearch: false,
214
+ checkBook: {
215
+ f_check_book_name: '',
216
+ f_run_date: '',
217
+ f_around_time: '',
218
+ f_around_unit: '',
219
+ f_create_date: Util.toStandardDateString(),
220
+ f_create_person: this.$login.f.name,
221
+ f_orgid: '',
222
+ f_checker_name: ''
223
+ },
224
+ showModal: false,
225
+ showModal2: false,
226
+ showModal3: false
227
+ }
228
+ },
229
+ beforeDestroy() {
230
+ //tag
231
+ bus.$off('fresh-area')
232
+ },
233
+ computed: {
234
+ searchData () {
235
+ return {condition: this.model.condition}
236
+ },
237
+ bookCondition () {
238
+ return this.model.condition
239
+ },
240
+ isCreateBook () {
241
+ return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
242
+ },
243
+ isChangeBook () {
244
+ return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
245
+ }
246
+ },
247
+ watch:{
248
+ 'bookList'(){
249
+ this.$emit('book-list',this.bookList)
250
+ },
251
+ 'bookAll'(val){
252
+ if(!val){
253
+ this.bookList=[]
254
+ }
255
+ this.$emit('book-all',this.bookAll)
256
+ }
257
+ },
258
+ methods: {
259
+ async ok2() {
260
+ if (!this.selectBook) {
261
+ this.$showMessage('请选择安检册')
262
+ return
263
+ }
264
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
265
+ let userCondition = ''
266
+ if (this.bookList.length < 1) {
267
+ //tag
268
+ userCondition = this.bookCondition
269
+ } else {
270
+ //tag)
271
+
272
+ userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
273
+ userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
274
+ //tag
275
+ }
276
+ let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
277
+ FROM
278
+ t_userinfo tui
279
+ LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
280
+ LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
281
+ LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
282
+ WHERE
283
+ tui.f_user_state = '正常'
284
+ AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
285
+ AND ${userCondition}`
286
+ await new HttpResetClass().load('POST', 'api/af-safecheck/logic/runSQL', {data: {sql: addUser}},
287
+ {resolveMsg: null, rejectMsg: '添加用户失败'})
288
+ this.$showMessage('添加用户成功')
289
+ this.selectBook = ''
290
+ this.bookAll = false
291
+ this.bookList = []
292
+ this.showModal2 = false
293
+ this.$refs.paged.$refs.criteria.search()
294
+ }
295
+ },
296
+ async ok3() {
297
+ if (!this.selectBook) {
298
+ this.$showMessage('请选择安检册')
299
+ return
300
+ }
301
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
302
+ let userCondition = ''
303
+ if (this.bookList.length < 1) {
304
+ //tag
305
+ userCondition = this.bookCondition
306
+ } else {
307
+ //tag)
308
+
309
+ userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
310
+ userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
311
+ //tag
312
+ }
313
+ let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
314
+ FROM
315
+ t_userinfo tui
316
+ LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
317
+ LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
318
+ LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
319
+ WHERE
320
+ tui.f_user_state = '正常'
321
+ AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
322
+ AND ${userCondition}`
323
+ await new HttpResetClass().load('POST', 'api/af-safecheck/logic/runSQL', {data: {sql: upUser}},
324
+ {resolveMsg: null, rejectMsg: '调整用户失败'})
325
+ this.$showMessage('调整用户成功')
326
+ this.selectBook = ''
327
+ this.bookAll = false
328
+ this.bookList = []
329
+ this.showModal3 = false
330
+ this.$refs.paged.$refs.criteria.search()
331
+ }
332
+ },
333
+ cancel2(){
334
+ this.selectBook = ''
335
+ this.bookAll = false
336
+ this.bookList = []
337
+ this.showModal2 = false
338
+ this.$refs.paged.$refs.criteria.search()
339
+ },
340
+ cancel3(){
341
+ this.selectBook = ''
342
+ this.bookAll = false
343
+ this.bookList = []
344
+ this.showModal3 = false
345
+ this.$refs.paged.$refs.criteria.search()
346
+ },
347
+ addUser () {
348
+ if (!this.isCreateBook) {
349
+ this.$showMessage('请选择查询未划分安检册的用户')
350
+ return
351
+ }
352
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
353
+ this.showModal2 = true
354
+ this.freshCheckBook()
355
+ return
356
+ }
357
+ this.$showMessage('请选择用户')
358
+ },
359
+ upUser () {
360
+ if (!this.isChangeBook) {
361
+ this.$showMessage('请选择查询已划分安检册的用户')
362
+ return
363
+ }
364
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
365
+ this.showModal3 = true
366
+ this.freshCheckBook()
367
+ return
368
+ }
369
+ this.$showMessage('请选择用户')
370
+ },
371
+ async delUser () {
372
+ if (!this.isChangeBook) {
373
+ this.$showMessage('请选择查询已划分安检册的用户')
374
+ return
375
+ }
376
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
377
+ let userCondition= ''
378
+ if (this.bookList.length < 1) {
379
+ //tag
380
+ userCondition = this.bookCondition
381
+ } else {
382
+ //tag)
383
+
384
+ userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
385
+ userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
386
+ //tag
387
+ }
388
+ let delUser= `update t_user_address set f_check_book_id =null
389
+ FROM
390
+ t_userinfo tui
391
+ LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
392
+ LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
393
+ LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
394
+ WHERE
395
+ tui.f_user_state = '正常'
396
+ AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
397
+ AND ${userCondition}`
398
+ await new HttpResetClass().load('POST', 'api/af-safecheck/logic/runSQL', {data: {sql: delUser}},
399
+ {resolveMsg: null, rejectMsg: '删除安检册失败'})
400
+ this.$showMessage('从安检册删除所选用户成功')
401
+ this.selectBook = ''
402
+ this.bookAll = false
403
+ this.bookList = []
404
+ this.showModal3 = false
405
+ this.$refs.paged.$refs.criteria.search()
406
+ return
407
+ }
408
+ this.$showMessage('请选择用户')
409
+ },
410
+ beforeCreateBook () {
411
+ if (!this.isCreateBook) {
412
+ this.$showMessage('请选择查询未划分安检册的用户')
413
+ return
414
+ }
415
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
416
+ this.showModal = true
417
+ return
418
+ }
419
+ this.$showMessage('请选择用户')
420
+ },
421
+ ok () {
422
+ //tag)
423
+ let condition = ''
424
+ if (!this.checkBook.f_check_book_name) {
425
+ return this.$showMessage('请填写册名')
426
+ }
427
+ if (!this.checkBook.f_checker_name) {
428
+ return this.$showMessage('请选择安检员')
429
+ }
430
+ if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
431
+ return this.$showMessage('请选填写周期信息')
432
+ }
433
+ if (!this.checkBook.f_run_date) {
434
+ return this.$showMessage('执行日期')
435
+ }
436
+ if (this.bookList.length < 1) {
437
+ //tag
438
+ condition = this.bookCondition
439
+ } else {
440
+ //tag)
441
+
442
+ condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
443
+ condition = 'tui.f_userinfo_id in (' + condition + ')'
444
+ //tag
445
+ }
446
+ let data = {
447
+ checkBook: this.checkBook,
448
+ sqlStr: condition
449
+ }
450
+ new HttpResetClass().load('post', 'api/af-safecheck/logic/AddCheckBook', {data}).then(res => {
451
+ //tag)
452
+ if (res.data.id) {
453
+ this.$showMessage('创建成功')
454
+ this.showModal = false
455
+ this.isSearch = false
456
+ this.bookList = []
457
+ this.bookAll = false
458
+ this.freshCheckBook()
459
+ this.$refs.paged.$refs.criteria.search()
460
+ }
461
+ })
462
+ },
463
+ changeState (val) {
464
+ //tag
465
+ //tag
466
+ this.bookAll = false
467
+ this.bookList = []
468
+ if (this.$refs.paged.$refs.criteria.model.f_orgid){
469
+ this.$refs.paged.$refs.criteria.search()
470
+ }
471
+ },
472
+ cancel () {
473
+ this.bookAll = false
474
+ this.bookList = []
475
+ this.showModal = false
476
+ this.$refs.paged.$refs.criteria.search()
477
+ },
478
+ checkModel (row) {
479
+ if (this.bookAll) {
480
+ //tag)
481
+ return true
482
+ } else {
483
+ if (this.bookList.findIndex(res => res === row.id) !== -1) {
484
+ return true
485
+ } else {
486
+ return false
487
+ }
488
+ }
489
+ },
490
+ checkChange (row, e) {
491
+ //tag
492
+ if (e.target.checked) {
493
+ this.bookList.push(row.id)
494
+ } else {
495
+ this.bookList.splice(this.bookList.findIndex(res => res === row.id), 1)
496
+ }
497
+ // //tag)
498
+ },
499
+ getRes (obj) {
500
+ this.checkBook.f_orgid = obj.resids[0]
501
+ },
502
+ getResm (obj) {
503
+ this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
504
+ },
505
+ hidden () {
506
+ this.criteriaShow = !this.criteriaShow
507
+ },
508
+ selfSearch (args) {
509
+ this.isSearch = true
510
+ this.bookAll = false
511
+ this.bookList = []
512
+
513
+ console.log("查询66666666666666666")
514
+ this.$emit('book-condition',args.condition)
515
+ // if (this.$refs.paged.$refs.criteria.model.f_orgid){
516
+ // args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
517
+ // }
518
+ this.model.search(args.condition, args.model)
519
+ },
520
+ freshCheckBook () {
521
+ this.checkBooks = []
522
+ new HttpResetClass().load('POST', `/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
523
+ data: {
524
+ items: 'id,f_check_book_name',
525
+ tablename: 't_check_book',
526
+ condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
527
+ orderitem: 'id desc'
528
+ }
529
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
530
+ this.checkBooks.push({label: '全部', value: ''})
531
+ res.data.forEach(ress => {
532
+ this.checkBooks.push({
533
+ label: ress.f_check_book_name,
534
+ value: ress.id
535
+ })
536
+ })
537
+ })
538
+ }
539
+ },
540
+
541
+ ready () {
542
+ bus.$on('fresh-area',()=>{
543
+ console.log("进入方法",this.bookAll,this.bookList)
544
+ this.bookAll = false
545
+ this.bookList = []
546
+ this.$refs.paged.$refs.criteria.search()
547
+ })
548
+ this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_id is null'
549
+ //tag
550
+ // this.init=true
551
+ this.freshCheckBook()
552
+ }
553
+ }
554
+ </script>
555
+ <style scoped>
556
+ /*.btn-group > .btn:first-child {*/
557
+ /* margin-left: 0;*/
558
+ /* width: 100%;*/
559
+ /*}*/
560
+ </style>