safecheck-client 3.0.30-62-t10 → 3.0.30-62-t12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/examples/SafePlan/comp.js +1527 -1527
  2. package/examples/SafePlan-liaoyuan/comp.js +1432 -1432
  3. package/examples/SafePlan-shaoguan/comp.js +1190 -1190
  4. package/examples/SafePlan-tongchuan/comp.js +1480 -1480
  5. package/examples/SafePlan-wenxi/comp.js +1545 -1545
  6. package/examples/SafePlan-zhoukou/comp.js +1525 -1525
  7. package/examples/SafePlanrongcheng/comp.js +1141 -1141
  8. package/examples/SafePlanrongcheng-gs/comp.js +1140 -1140
  9. package/examples/SafePlanrongcheng-gssq/comp.js +1143 -1143
  10. package/examples/SafePlanrongcheng-mysq/comp.js +1144 -1144
  11. package/package.json +1 -1
  12. package/src/components/CheckerCount/ZhouKouCheckCount.vue +272 -272
  13. package/src/components/DefectDealMain/DefectPaperNew.vue +1052 -1052
  14. package/src/components/NewDefectList/DefectPaperNew.vue +1079 -1079
  15. package/src/components/checkplan/CheckDetail.vue +205 -205
  16. package/src/components/checkplan/SelectCheckPlan.vue +311 -311
  17. package/src/components/createcheckplan/PlanUersList.vue +137 -137
  18. package/src/components/defect/DefectPaper.vue +764 -764
  19. package/src/components/defect/DefectPaperWeiXiu.vue +508 -508
  20. package/src/components/inspections/InspectionList.vue +476 -476
  21. package/src/components/inspections/InspectionLists.vue +478 -478
  22. package/src/components/inspections/InspectionListss.vue +477 -477
  23. package/src/components/noplan/NoPlanSearchUser.vue +300 -300
  24. package/src/components/olddata/OldPaperList.vue +340 -340
  25. package/src/components/paper/PaperList.vue +790 -790
  26. package/src/components/paper/filialeCheckInfo.vue +111 -111
  27. package/src/components/pc/CheckNoDetail.vue +209 -209
  28. package/src/components/pc/DefectDeal.vue +997 -997
  29. package/src/components/pc/NewCheckpaper.vue +16 -60
  30. package/src/components/pc/PaperChazhiMain.vue +504 -504
  31. package/src/components/pc/PaperDefectMain.vue +879 -866
  32. package/src/components/pc/PaperEdit.vue +151 -151
  33. package/src/components/pc/PaperVisitMain.vue +179 -179
  34. package/src/components/pc/SafeVisitHistory.vue +208 -208
  35. package/src/components/pc/SafecheckDeviceList.vue +260 -260
  36. package/src/components/pc/SecurityCheckLedger.vue +133 -133
  37. package/src/components/pc/SelectCheckNoPlan.vue +278 -278
  38. package/src/components/pc/SelectCheckPlanAndNoPLan.vue +281 -281
  39. package/src/components/planmanage/checkPlanList.vue +369 -369
  40. package/src/components/planmanage/checkUserList.vue +773 -773
  41. package/src/components/querycheckpaper/CheckSearchUser.vue +1067 -1067
  42. package/src/components/querycheckpaper/CheckSearchUserNew.vue +1109 -1109
  43. package/src/components/querycheckpaper/ShebeiSearchUser.vue +690 -690
  44. package/src/components/report/CheckPlanAreaList.vue +505 -505
  45. package/src/components/report/CheckPlanUserList.vue +216 -216
  46. package/src/components/report/NoCheckplanSafecheck.vue +212 -212
  47. package/src/components/rongcheng/CheckSearchArea.vue +703 -703
  48. package/src/components/rongcheng/CheckSearchUser.vue +936 -936
  49. package/src/components/rongcheng/CheckSearchUserNo.vue +778 -778
  50. package/src/components/rongcheng/CheckUserList.vue +205 -205
  51. package/src/components/rongcheng/DefectPaper.vue +676 -676
  52. package/src/components/rongcheng/PaperListAJ.vue +434 -434
  53. package/src/components/rongcheng/PaperListNPAJ.vue +431 -431
  54. package/src/components/rongcheng/PaperListNPSQ.vue +455 -455
  55. package/src/components/rongcheng/PaperListSQ.vue +444 -444
  56. package/src/components/rongcheng/checkerplan/SelectCheckPlan.vue +271 -271
  57. package/src/components/rongcheng/report/CheckPlanUserList.vue +228 -228
  58. package/src/components/safecheckNew/PaperList.vue +785 -785
  59. package/src/components/shaoguan/DefectPaper.vue +217 -217
  60. package/src/components/shaoguan/PaperList.vue +466 -466
  61. package/src/components/userfile/UserInfoAudit.vue +316 -316
  62. package/src/filiale/ALshan/pc/CheckSearchUser.vue +927 -927
  63. package/src/filiale/ALshan/pc/checkUserList.vue +714 -714
  64. package/src/filiale/ancheng/pc/PaperList.vue +659 -659
  65. package/src/filiale/ankangyihua/pc/CheckPlanAreaList.vue +512 -512
  66. package/src/filiale/ankangyihua/pc/CheckSearchUser.vue +1039 -1039
  67. package/src/filiale/ankangyihua/pc/DefectPaperWeiXiu.vue +545 -545
  68. package/src/filiale/ankangyihua/pc/PaperDefectMain.vue +864 -864
  69. package/src/filiale/ankangyihua/pc/PaperList.vue +656 -656
  70. package/src/filiale/ankangyihua/pc/checkUserList.vue +697 -697
  71. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
  72. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
  73. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
  74. package/src/filiale/baiyin/pc/PaperList.vue +790 -790
  75. package/src/filiale/baiyin/pc/checkUserList.vue +771 -771
  76. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1376 -1376
  77. package/src/filiale/bayan/pc/CheckDetail.vue +205 -205
  78. package/src/filiale/bayan/pc/CheckSearchUser.vue +1110 -1110
  79. package/src/filiale/bayan/pc/DefectPaperNew.vue +1239 -1239
  80. package/src/filiale/bayan/pc/PaperList.vue +900 -900
  81. package/src/filiale/bayan/pc/SelectCheckPlan.vue +396 -396
  82. package/src/filiale/dexin/pc/DefectPaperNew.vue +1066 -1066
  83. package/src/filiale/dexin/pc/PaperList.vue +805 -805
  84. package/src/filiale/fugou/pc/DefectPaperNew.vue +1085 -1085
  85. package/src/filiale/fugou/pc/PaperDefectMain.vue +928 -928
  86. package/src/filiale/fugou/pc/PaperList.vue +911 -911
  87. package/src/filiale/fugou/pc/checkPlanList.vue +371 -371
  88. package/src/filiale/fugou/pc/checkUserList.vue +904 -904
  89. package/src/filiale/fugu/pc/CheckSearchUser.vue +977 -977
  90. package/src/filiale/fugu/pc/SelectCheckPlan.vue +273 -273
  91. package/src/filiale/fugu/pc/planmanage/checkUserList.vue +688 -688
  92. package/src/filiale/ganquan/pc/DefectPaperNew.vue +1009 -1009
  93. package/src/filiale/ganquan/pc/PaperList.vue +654 -654
  94. package/src/filiale/ganquan/pc/PaperVisitMain.vue +166 -166
  95. package/src/filiale/ganquan/pc/SelectCheckPlan.vue +234 -234
  96. package/src/filiale/ganquan/pc/checkUserList.vue +681 -681
  97. package/src/filiale/gehua/pc/PaperList.vue +558 -558
  98. package/src/filiale/gehua/pc/checkUserList.vue +720 -720
  99. package/src/filiale/guangxi/pc/CheckPlanAreaList.vue +471 -471
  100. package/src/filiale/guangxi/pc/DefectPaperNew.vue +988 -988
  101. package/src/filiale/hanzhong/pc/CheckSearchUser.vue +1127 -1127
  102. package/src/filiale/hanzhong/pc/CheckUserList.vue +755 -755
  103. package/src/filiale/hanzhong/pc/PaperList.vue +702 -702
  104. package/src/filiale/huaran/pc/PaperList.vue +843 -843
  105. package/src/filiale/huaran/pc/checkPlanList.vue +419 -419
  106. package/src/filiale/huaran/pc/checkUserList.vue +900 -900
  107. package/src/filiale/huatong/pc/PaperDefectMain.vue +800 -800
  108. package/src/filiale/huatong/pc/PaperList.vue +789 -789
  109. package/src/filiale/huayin/pc/PaperList.vue +621 -621
  110. package/src/filiale/jiaocheng/pc/CheckSearchUser.vue +1011 -1011
  111. package/src/filiale/jinbin/pc/CheckPlanAreaList.vue +479 -479
  112. package/src/filiale/jingyang/pc/CheckSearchUser.vue +1062 -1062
  113. package/src/filiale/jingyang/pc/PaperList.vue +793 -793
  114. package/src/filiale/jingyang/pc/ReportCheckItemList.vue +543 -543
  115. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +476 -476
  116. package/src/filiale/kelai/pc/CheckSearchUser.vue +1011 -1011
  117. package/src/filiale/kelai/pc/DefectPaperNew.vue +1090 -1090
  118. package/src/filiale/kelai/pc/FaultLimitGas/FaultLimitGasPaper.vue +897 -897
  119. package/src/filiale/kelai/pc/PaperList.vue +596 -596
  120. package/src/filiale/kelai/pc/checkUserList.vue +698 -698
  121. package/src/filiale/liaoyuan/pc/CheckSearchUser.vue +963 -963
  122. package/src/filiale/liaoyuan/pc/DefectPaperWeiXiu.vue +1011 -1011
  123. package/src/filiale/liaoyuan/pc/PaperList.vue +637 -637
  124. package/src/filiale/liaoyuan/pc/checkPlanList.vue +373 -373
  125. package/src/filiale/lixian/pc/CheckPlanAreaList.vue +467 -467
  126. package/src/filiale/lixian/pc/CheckSearchUser.vue +927 -927
  127. package/src/filiale/lixian/pc/PaperChazhiMain.vue +540 -540
  128. package/src/filiale/lixian/pc/PaperDefectMain.vue +551 -551
  129. package/src/filiale/lixian/pc/PaperList.vue +620 -620
  130. package/src/filiale/lixian/pc/checkPlanList.vue +366 -366
  131. package/src/filiale/lixian/pc/checkUserList.vue +761 -761
  132. package/src/filiale/minsheng/pc/CheckSearchUser.vue +976 -976
  133. package/src/filiale/minsheng/pc/checkUserList.vue +806 -806
  134. package/src/filiale/pingxiang/pc/DefectPaperNew.vue +1012 -1012
  135. package/src/filiale/pingxiang/pc/PaperList.vue +595 -595
  136. package/src/filiale/qianneng/pc/DefectPaperNew.vue +1072 -1072
  137. package/src/filiale/qianneng/pc/NoCheckplanSafecheck.vue +220 -220
  138. package/src/filiale/qianneng/pc/PaperList.vue +777 -777
  139. package/src/filiale/qianneng/pc/checkPlanList.vue +429 -429
  140. package/src/filiale/qianneng/pc/checkUserList.vue +871 -871
  141. package/src/filiale/qingjian/pc/PaperDefectMain.vue +895 -895
  142. package/src/filiale/qingtongxia/pc/PaperDefectMain.vue +858 -858
  143. package/src/filiale/rizhao/pc/PaperList.vue +714 -714
  144. package/src/filiale/rongchuang/pc/PaperList.vue +812 -812
  145. package/src/filiale/rongchuang/pc/checkUserList.vue +621 -621
  146. package/src/filiale/shanxian/android/AddPlanItem.vue +447 -447
  147. package/src/filiale/shanxian/pc/CheckDetail.vue +205 -205
  148. package/src/filiale/shanxian/pc/CheckSearchUser.vue +1114 -1114
  149. package/src/filiale/shanxian/pc/DefectPaperNew.vue +1096 -1096
  150. package/src/filiale/shanxian/pc/PaperList.vue +785 -785
  151. package/src/filiale/shanxian/pc/SelectCheckPlan.vue +324 -324
  152. package/src/filiale/shanxian/pc/checkUserList.vue +700 -700
  153. package/src/filiale/shaoguan/pc/PaperList.vue +589 -589
  154. package/src/filiale/shexian/pc/DefectPaperNew.vue +1161 -1161
  155. package/src/filiale/shexian/pc/PaperDefectMain.vue +893 -893
  156. package/src/filiale/shexian/pc/PaperList.vue +822 -822
  157. package/src/filiale/shimen/pc/CheckPlanAreaList.vue +463 -463
  158. package/src/filiale/shimen/pc/CheckSearchUser.vue +927 -927
  159. package/src/filiale/shimen/pc/PaperDefectMain.vue +589 -589
  160. package/src/filiale/shimen/pc/PaperList.vue +547 -547
  161. package/src/filiale/shiquan/pc/checkUserList.vue +755 -755
  162. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -512
  163. package/src/filiale/siyang/pc/CheckSearchUser.vue +1035 -1035
  164. package/src/filiale/siyang/pc/PaperDefectMain.vue +864 -864
  165. package/src/filiale/siyang/pc/PaperList.vue +834 -834
  166. package/src/filiale/siyang/pc/checkPlanList.vue +367 -367
  167. package/src/filiale/siyang/pc/checkUserList.vue +765 -765
  168. package/src/filiale/tianke/pc/PaperDefectMain.vue +891 -891
  169. package/src/filiale/tongchuan/pc/CheckDetail.vue +205 -205
  170. package/src/filiale/tongchuan/pc/CheckPlanAreaList.vue +502 -502
  171. package/src/filiale/tongchuan/pc/CheckPlanUserList.vue +246 -246
  172. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1045 -1045
  173. package/src/filiale/tongchuan/pc/DefectPaper.vue +764 -764
  174. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +593 -593
  175. package/src/filiale/tongchuan/pc/NoCheckplanSafecheck.vue +213 -213
  176. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1060
  177. package/src/filiale/tongchuan/pc/PaperList.vue +670 -670
  178. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +296 -296
  179. package/src/filiale/tongchuan/pc/checkUserList.vue +639 -639
  180. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +735 -735
  181. package/src/filiale/weinan/pc/CheckDetail.vue +278 -278
  182. package/src/filiale/weinan/pc/CheckDetailOutHelp.vue +297 -297
  183. package/src/filiale/weinan/pc/CheckNoDetail.vue +259 -259
  184. package/src/filiale/weinan/pc/CheckPlanUserList.vue +338 -338
  185. package/src/filiale/weinan/pc/CheckSearchUser.vue +1078 -1078
  186. package/src/filiale/weinan/pc/DefectPaperNew.vue +1096 -1096
  187. package/src/filiale/weinan/pc/PaperDefectMain.vue +576 -576
  188. package/src/filiale/weinan/pc/PaperList.vue +674 -674
  189. package/src/filiale/weinan/pc/SelectCheckNoPlan.vue +299 -299
  190. package/src/filiale/weinan/pc/SelectCheckPlan.vue +389 -389
  191. package/src/filiale/weinan/pc/SelectCheckPlanOutHelp.vue +446 -446
  192. package/src/filiale/weinan/pc/checkPlanList.vue +456 -456
  193. package/src/filiale/weinan/pc/checkUserList.vue +712 -712
  194. package/src/filiale/weinanct/pc/PaperList.vue +593 -593
  195. package/src/filiale/wensu/pc/CheckDetail.vue +205 -205
  196. package/src/filiale/wensu/pc/CheckSearchUser.vue +1238 -1238
  197. package/src/filiale/wensu/pc/DefectPaperNew.vue +1148 -1148
  198. package/src/filiale/wensu/pc/SelectCheckPlan.vue +342 -342
  199. package/src/filiale/wensu/pc/checkUserList.vue +650 -650
  200. package/src/filiale/wenxi/pc/CheckPlanAreaList.vue +456 -456
  201. package/src/filiale/wenxi/pc/CheckPlanUserList.vue +217 -217
  202. package/src/filiale/wenxi/pc/CheckSearchUser.vue +991 -991
  203. package/src/filiale/wenxi/pc/DefectPaper.vue +663 -663
  204. package/src/filiale/wenxi/pc/PaperDefectMain.vue +790 -790
  205. package/src/filiale/wenxi/pc/PaperList.vue +949 -949
  206. package/src/filiale/wenxi/pc/checkPlanList.vue +517 -517
  207. package/src/filiale/wenxi/pc/checkUserList.vue +695 -695
  208. package/src/filiale/wuan/pc/DefectPaperWeiXiu.vue +515 -515
  209. package/src/filiale/wuan/pc/PaperList.vue +562 -562
  210. package/src/filiale/wuhai/pc/CheckSearchUser.vue +959 -959
  211. package/src/filiale/wuhai/pc/PaperList.vue +785 -785
  212. package/src/filiale/wuhai/pc/checkUserList.vue +611 -611
  213. package/src/filiale/xilan/pc/PaperList.vue +795 -795
  214. package/src/filiale/xilan/pc/checkUserList.vue +772 -772
  215. package/src/filiale/xinkang/pc/CheckPlanAreaList.vue +425 -425
  216. package/src/filiale/xinkang/pc/CheckPlanUserList.vue +216 -216
  217. package/src/filiale/xinkang/pc/CheckSearchUser.vue +1026 -1026
  218. package/src/filiale/xinkang/pc/DefectPaperWeiXiu.vue +538 -538
  219. package/src/filiale/xinkang/pc/PaperDefectMain.vue +525 -525
  220. package/src/filiale/xinkang/pc/PaperList.vue +603 -603
  221. package/src/filiale/xinkang/pc/checkUserList.vue +639 -639
  222. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +269 -269
  223. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +642 -642
  224. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  225. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1128 -1128
  226. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1046 -1046
  227. package/src/filiale/yangchunboneng/pc/PaperList.vue +773 -773
  228. package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1092 -1092
  229. package/src/filiale/yongzhou/pc/DefectPaperNew.vue +1105 -1105
  230. package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +557 -557
  231. package/src/filiale/yongzhou/pc/PaperDefectMain.vue +872 -872
  232. package/src/filiale/yongzhou/pc/PaperList.vue +798 -798
  233. package/src/filiale/yongzhou/pc/SelectCheckPlan.vue +364 -364
  234. package/src/filiale/yongzhou/pc/checkUserList.vue +752 -752
  235. package/src/filiale/yongzhou/pc/communityDetail.vue +194 -194
  236. package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +138 -138
  237. package/src/filiale/yongzhou/pc/safeDetail.vue +539 -539
  238. package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +455 -455
  239. package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +267 -267
  240. package/src/filiale/yuansheng/pc/PaperList.vue +621 -621
  241. package/src/filiale/yunchengminsheng/pc/checkUserList.vue +753 -753
  242. package/src/filiale/zhongsheng/pc/CheckPlanAreaList.vue +495 -495
  243. package/src/filiale/zhongsheng/pc/DefectPaperWeiXiu.vue +515 -515
  244. package/src/filiale/zhongsheng/pc/PaperList.vue +644 -644
  245. package/src/filiale/zhoukou/pc/CheckSearchUser.vue +923 -923
  246. package/src/filiale/zhoukou/pc/PaperDefectMain.vue +465 -465
@@ -1,1012 +1,1012 @@
1
- <template>
2
- <div class="flex">
3
- <work-busy :is-busy="isbusy"></work-busy>
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
- <div :class="$parent.$parent.style">
9
- <label class="font_normal_body">安检计划</label>
10
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
11
- @click="$parent.$parent.showChooser"
12
- style="width: 60%" placeholder="安检计划" readonly="readonly">
13
- </div>
14
- <div :class="$parent.$parent.style">
15
- <label class="font_normal_body">存在隐患</label>
16
- <v-select style="width:60% "
17
- class="select select_list"
18
- :value.sync="model.f_has_defect"
19
- v-model="model.f_has_defect"
20
- :options='$parent.$parent.hasDefectOptions'
21
- :placeholder='model.f_has_defect'
22
- condition="f_has_defect = '{}'"
23
- close-on-select>
24
- </v-select>
25
- </div>
26
- <div :class="$parent.$parent.style">
27
- <label class="font_normal_body">用户编号</label>
28
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
29
- condition="f_userinfo_code = '{}'"
30
- style="width: 60%" placeholder="用户编号">
31
- </div>
32
- <div :class="$parent.$parent.style">
33
- <label class="font_normal_body">结果查询</label>
34
- <v-select
35
- placeholder='维修结果查询'
36
- :value-single="true"
37
- class="select select_list" style="width: 60%"
38
- v-model='model.f_is_repair'
39
- :value.sync="model.f_is_repair"
40
- :options='$parent.$parent.repaired'
41
- condition="f_is_repair = '{}'"
42
- close-on-select clear-button> </v-select>
43
- </div>
44
- <div class=" col-sm-4 form-group button-range" >
45
- <div class="span" style="float: right;margin-top: 8px">
46
- <div style="float: right" class="button_spacing"
47
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
48
- @click="$parent.$parent.hiddenr()"></div>
49
- <div style="float: right" class="button_spacing"
50
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
51
- @click="$parent.$parent.hidden()"></div>
52
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
53
- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
54
- <div style="float: right">
55
- <export-excel :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
56
- :field="$parent.$parent.getfield"
57
- progress="safeGetExportProgress"
58
- sqlurl="api/af-safecheck/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew" template-name='安检隐患明细' :choose-col="true"></export-excel>
59
- </div>
60
- </div>
61
- </div>
62
- </div>
63
- <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
64
- <div :class="$parent.$parent.style">
65
- <label class="font_normal_body">片&emsp;&emsp;区</label>
66
- <v-select class="select_list select"
67
- placeholder='片区/管理站' style="width: 60%"
68
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
69
- :options='$parent.$parent.sliceArea'
70
- filer-key="name"
71
- close-on-select clear-button
72
- condition="f_slice_area='{}'"
73
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
74
- :value-single="true">
75
- </v-select>
76
- </div>
77
- <div :class="$parent.$parent.style2" style="margin: 0">
78
- <role-selector-safe
79
- role-name="安检员"
80
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
81
- :resobjprop.sync="$parent.$parent.resids"
82
- @re-res="$parent.$parent.getRes"
83
- :value.sync="model.f_checker_id"
84
- v-model="model.f_checker_id"
85
- condition="f_checker_name = '{}'">
86
- </role-selector-safe>
87
- </div>
88
-
89
- <div :class="$parent.$parent.style">
90
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
91
- <v-select class="select_list select"
92
- placeholder='抄表册' style="width: 60%"
93
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
94
- :options='$parent.$parent.cbc'
95
- filer-key="name"
96
- close-on-select clear-button
97
- condition="f_meter_book_num={}"
98
- :value-single="true">
99
- </v-select>
100
- </div>
101
- <div :class="$parent.$parent.style">
102
- <label class="font_normal_body">起始时间</label>
103
- <datepicker
104
- placeholder='起始时间' style="width:60%"
105
- :disabled-days-of-week="[]"
106
- :format="'yyyy-MM-dd'"
107
- :show-rest-button="reset"
108
- :value.sync="model.f_start_time"
109
- v-model="model.f_start_time"
110
- condition="f_offsite_time >= '{} 00:00:00'">
111
- </datepicker>
112
- </div>
113
- <div :class="$parent.$parent.style">
114
- <label class="font_normal_body">结束时间</label>
115
- <datepicker
116
- placeholder='结束时间' style="width:60%"
117
- :disabled-days-of-week="[]"
118
- :format="'yyyy-MM-dd'"
119
- :show-rest-button="reset"
120
- :value.sync="model.f_end_time"
121
- v-model="model.f_end_time"
122
- condition="f_offsite_time <= '{} 23:59:59'">
123
- </datepicker>
124
- </div>
125
-
126
-
127
- </div>
128
- <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
129
-
130
- <div :class="$parent.$parent.style">
131
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
132
- <input type="text" class="input_search" v-model="model.f_repairman"
133
- condition="f_repairman = '{}'"
134
- style="width: 60%" placeholder="维修员">
135
- </div>
136
- <div :class="$parent.$parent.style">
137
- <label class="font_normal_body">处理查询</label>
138
- <v-select
139
- placeholder='处理结果查询'
140
- :value-single="true"
141
- class="select select_list" style="width: 60%"
142
- v-model='model.f_is_deal'
143
- :value.sync="model.f_is_deal"
144
- :options='$parent.$parent.deals'
145
- condition="f_is_deal = '{}'"
146
- close-on-select clear-button> </v-select>
147
- </div>
148
- <div :class="$parent.$parent.style">
149
- <label class="font_normal_body">是否维修</label>
150
- <v-select
151
- placeholder='是否维修'
152
- :value-single="true"
153
- class="select select_list" style="width: 60%"
154
- v-model='model.f_repaired'
155
- :value.sync="model.f_repaired"
156
- :options='$parent.$parent.repairedOptions'
157
- condition="f_repaired = '{}'"
158
- close-on-select clear-button> </v-select>
159
- </div>
160
- <div :class="$parent.$parent.style">
161
- <label class="font_normal_body">用户小区</label>
162
- <input type="text" class="input_search" v-model="model.f_residential_area"
163
- condition="f_residential_area = '{}'"
164
- style="width: 60%" placeholder="用户小区">
165
- </div>
166
-
167
- </div>
168
-
169
-
170
-
171
- <div class="row" v-show="$parent.$parent.$parent.showItem">
172
- <div :class="$parent.$parent.style">
173
- <label class="font_normal_body">安检计划</label>
174
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
175
- @click="$parent.$parent.showChooser"
176
- style="width: 60%" placeholder="安检计划" readonly="readonly">
177
- </div>
178
- <div :class="$parent.$parent.style">
179
- <label class="font_normal_body">存在隐患</label>
180
- <v-select style="width:60% "
181
- class="select select_list"
182
- :value.sync="model.f_has_defect"
183
- v-model="model.f_has_defect"
184
- :options='$parent.$parent.hasDefectOptions'
185
- :placeholder='model.f_has_defect'
186
- condition="f_has_defect = '{}'"
187
- close-on-select>
188
- </v-select>
189
- </div>
190
-
191
- <div class=" col-sm-4 form-group button-range">
192
- <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
193
- <div style="float: right" class="button_spacing"
194
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
195
- @click="$parent.$parent.hiddenr()"></div>
196
- <div style="float: right" class="button_spacing"
197
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
198
- @click="$parent.$parent.hidden()"></div>
199
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
200
- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
201
- <div style="float: right">
202
- <export-excel-old :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids}"
203
- :field="$parent.$parent.getfield"
204
- progress="safeGetExportProgress"
205
- sqlurl="api/af-safecheck/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew" template-name='安检计划明细' :choose-col="true"></export-excel-old>
206
- </div>
207
- </div>
208
- </div>
209
-
210
-
211
-
212
- </div>
213
- <div class="row" v-show="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
214
- <div :class="$parent.$parent.style">
215
- <label class="font_normal_body">用户编号</label>
216
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
217
- condition="f_userinfo_code = '{}'"
218
- style="width: 60%" placeholder="用户编号">
219
- </div>
220
- <div :class="$parent.$parent.style">
221
- <label class="font_normal_body">结果查询</label>
222
- <v-select
223
- placeholder='处理结果查询'
224
- :value-single="true"
225
- class="select select_list" style="width: 60%"
226
- v-model='model.f_repaired'
227
- :value.sync="model.f_repaired"
228
- :options='$parent.$parent.repaired'
229
- condition="f_repaired = '{}'"
230
- close-on-select clear-button> </v-select>
231
- </div>
232
-
233
- <div :class="$parent.$parent.style2" style="margin: 0">
234
- <role-selector-safe
235
- role-name="安检员"
236
- :resobjprop.sync="$parent.$parent.resids"
237
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
238
- @re-res="$parent.$parent.getRes"
239
- :value.sync="model.f_checker_id"
240
- v-model="model.f_checker_id"
241
- condition="f_checker_name = '{}'">
242
- </role-selector-safe>
243
- </div>
244
- </div>
245
- <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
246
- <div :class="$parent.$parent.style">
247
- <label class="font_normal_body">片&emsp;&emsp;区</label>
248
- <v-select class="select_list select"
249
- placeholder='片区/管理站' style="width: 60%"
250
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
251
- :options='$parent.$parent.sliceArea'
252
- filer-key="name"
253
- close-on-select clear-button
254
- condition="f_slice_area='{}'"
255
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
256
- :value-single="true">
257
- </v-select>
258
- </div>
259
- <div :class="$parent.$parent.style">
260
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
261
- <v-select class="select_list select"
262
- placeholder='抄表册' style="width: 60%"
263
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
264
- :options='$parent.$parent.cbc'
265
- filer-key="name"
266
- close-on-select clear-button
267
- condition="f_meter_book_num={}"
268
- :value-single="true">
269
- </v-select>
270
- </div>
271
- <div :class="$parent.$parent.style">
272
- <label class="font_normal_body">起始时间</label>
273
- <datepicker
274
- placeholder='起始时间' style="width:60%"
275
- :disabled-days-of-week="[]"
276
- :format="'yyyy-MM-dd'"
277
- :show-rest-button="reset"
278
- :value.sync="model.f_start_time"
279
- v-model="model.f_start_time"
280
- condition="f_offsite_time >= '{} 00:00:00'">
281
- </datepicker>
282
- </div>
283
- <div :class="$parent.$parent.style">
284
- <label class="font_normal_body">结束时间</label>
285
- <datepicker
286
- placeholder='结束时间' style="width:60%"
287
- :disabled-days-of-week="[]"
288
- :format="'yyyy-MM-dd'"
289
- :show-rest-button="reset"
290
- :value.sync="model.f_end_time"
291
- v-model="model.f_end_time"
292
- condition="f_offsite_time <= '{} 23:59:59'">
293
- </datepicker>
294
- </div>
295
-
296
-
297
- </div>
298
- <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
299
-
300
- <div :class="$parent.$parent.style">
301
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
302
- <input type="text" class="input_search" v-model="model.f_repairman"
303
- condition="f_repairman = '{}'"
304
- style="width: 60%" placeholder="维修员">
305
- </div>
306
- <div :class="$parent.$parent.style">
307
- <label class="font_normal_body">处理查询</label>
308
- <v-select
309
- placeholder='处理结果查询'
310
- :value-single="true"
311
- class="select select_list" style="width: 60%"
312
- v-model='model.f_is_deal'
313
- :value.sync="model.f_is_deal"
314
- :options='$parent.$parent.deals'
315
- condition="f_is_deal = '{}'"
316
- close-on-select clear-button> </v-select>
317
- </div>
318
- <div :class="$parent.$parent.style">
319
- <label class="font_normal_body">是否维修</label>
320
- <v-select
321
- placeholder='是否维修'
322
- :value-single="true"
323
- class="select select_list" style="width: 60%"
324
- v-model='model.f_repaired'
325
- :value.sync="model.f_repaired"
326
- :options='$parent.$parent.repairedOptions'
327
- condition="f_repaired = '{}'"
328
- close-on-select clear-button> </v-select>
329
- </div>
330
- <div :class="$parent.$parent.style">
331
- <label class="font_normal_body">用户小区</label>
332
- <input type="text" class="input_search" v-model="model.f_residential_area"
333
- condition="f_residential_area = '{}'"
334
- style="width: 60%" placeholder="用户小区">
335
- </div>
336
- </div>
337
- </div>
338
- </criteria>
339
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
340
- <template partial='head'>
341
- <tr>
342
- <!-- <th><nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />全选</nobr></th>-->
343
- <th><nobr>入户状态</nobr></th>
344
- <th><nobr>用户编号</nobr></th>
345
- <th><nobr>用户名</nobr></th>
346
- <th><nobr>用户电话</nobr></th>
347
- <th><nobr>用户小区</nobr></th>
348
- <th><nobr>用户地址</nobr></th>
349
- <th><nobr>安检时间</nobr></th>
350
- <th><nobr>安检员</nobr></th>
351
- <th><nobr>计划名</nobr></th>
352
- <th><nobr>是否有隐患</nobr></th>
353
- <th><nobr>隐患数</nobr></th>
354
- <th><nobr>处理数</nobr></th>
355
- <th><nobr>完成数</nobr></th>
356
- <th><nobr>处理情况</nobr></th>
357
- <th><nobr>完成情况</nobr></th>
358
- <th><nobr>维修情况</nobr></th>
359
- <th><nobr>维修员</nobr></th>
360
- <th><nobr>隐患明细</nobr></th>
361
- </tr>
362
- </template>
363
- <template partial='body'>
364
- <!-- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>-->
365
- <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
366
- <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
367
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
368
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
369
- <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
370
- <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
371
- <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
372
- <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
373
- <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
374
- <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
375
- <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
376
- <td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
377
- <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
378
- <td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
379
- <td style="text-align: center;white-space:nowrap;">{{row.f_is_repair}}</td>
380
- <td style="text-align: center;white-space:nowrap;">{{row.f_repaired}}</td>
381
- <td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
382
- <td style="text-align: center;white-space:nowrap;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</td>
383
- </template>
384
- </data-grid>
385
- </criteria-paged>
386
-
387
- <modal :show.sync="showModal" v-ref:modal>
388
- <div slot="modal-header" class="modal-header">
389
- <h4 class="modal-title">
390
- 选择计划
391
- </h4>
392
- </div>
393
- <div slot="modal-body" class="modal-body">
394
- <plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
395
- </div>
396
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
397
- <button class="button_search" @click="ok">确认</button>
398
- <button class="button_search" @click="cancel">取消</button>
399
- </div>
400
- </modal>
401
- <modal :show.sync="showModal2" :backdrop="false">
402
- <div slot="modal-header" class="modal-header">
403
- <h4 class="modal-title">
404
- 转维修
405
- </h4>
406
- </div>
407
- <div slot="modal-body" class="modal-body">
408
- <div v-if="true">
409
- <div class="row" style="margin-top: 10px">
410
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
411
- <div class="col-xs-8 col-md-8">
412
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
413
- :options='dispatchTypeOptions' placeholder='派发类型'
414
- close-on-select>
415
- </v-select>
416
- </div>
417
- </div>
418
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
419
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
420
- <div class="col-xs-8 col-md-8">
421
- <v-select
422
- :value.sync="selectData.f_repairman"
423
- :value-single="true"
424
- :options='repairers'
425
- placeholder='请选择维修员'
426
- close-on-select></v-select>
427
- </div>
428
- </div>
429
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
430
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
431
- <div class="col-xs-8 col-md-8">
432
- <right-tree
433
- islist
434
- :userid="userid"
435
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
436
- @re-res="getSiteRes"></right-tree>
437
- </div>
438
- </div>
439
- <div class="row" style="margin-top: 10px">
440
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
441
- <div class="col-xs-8 col-md-8">
442
- <v-select :value.sync="selectData.f_repairtype" style="width:60%"
443
- class="select select_list"
444
- :value-single="true"
445
- :options='repairTypeOptions'
446
- close-on-select>
447
- </v-select>
448
- </div>
449
- </div>
450
- <div class="row" style="margin-top: 10px">
451
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
452
- <div class="col-xs-8 col-md-8">
453
- <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
454
- </div>
455
- </div>
456
- </div>
457
- </div>
458
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
459
- <button class="button_search" @click="rectification">转维修</button>
460
- <button class="button_search" @click="cancel1">取消</button>
461
- </div>
462
- </modal>
463
- <modal :show.sync="showModal3">
464
- <div slot="modal-header" class="modal-header">
465
- <h4 class="modal-title">
466
- 转维修进度{{ progressbarWidth }}%
467
- </h4>
468
- </div>
469
- <div slot="modal-body" class="modal-body">
470
- <div class="progress">
471
- <div class="progress-bar" role="progressbar" aria-valuenow="60"
472
- aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
473
- <!-- <span class="sr-only">40% 完成</span>-->
474
- </div>
475
- </div>
476
- </div>
477
- <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
478
- </modal>
479
- </div>
480
- </template>
481
- <script>
482
- import {PagedList} from 'vue-client'
483
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
484
- import co from 'co'
485
- import Vue from 'vue'
486
- import * as Util from '../../../components/Util'
487
-
488
- let select = function* (self) {
489
- let http = new HttpResetClass()
490
- let getGasman = yield http.load('POST', '/rs/search', {
491
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
492
- userid: self.$login.f.id
493
- }, {resolveMsg: null, rejectMsg: null})
494
- //tag
495
- self.checkersid.push({label: '全部', value: ''})
496
- getGasman.data.forEach((checker) => {
497
- self.checkersid.push({label: checker.name, value: checker.name})
498
- })
499
- }
500
- export default {
501
- title: '隐患查询',
502
- data() {
503
- let model = new PagedList('api/af-safecheck/sql/GetCheckPaperByDefectNew', 20, {
504
- f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
505
- })
506
- model.f_filialeids = '(' + this.$login.f.orgid + ')'
507
- model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
508
- return {
509
- repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
510
- deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'}],
511
- hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
512
- f: this.$login.f,
513
- model: model,
514
- criteriaShow: false,
515
- checkAll:false,
516
- timercount:0,
517
- showModal2:false,
518
- repairTypeOptions:this.$appdata.getParam('转维修类型'),
519
- dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
520
- checkes:[],
521
- showModal: false,
522
- f_check_plan: {f_plan_name: '', id: ''},
523
- sumsmodel: {},
524
- resids:{},
525
- all: false,
526
- fields: {},
527
-
528
- selectData:{
529
- dispatchType:'',
530
- f_repairman:'',
531
- f_remarks:'',
532
- f_repairtype:''
533
- },
534
- progressbarWidth:'0',
535
- modelval: [],
536
- isbusy:false,
537
- checkersid: [],
538
- showModal3:false,
539
- toRepairCount:0,
540
- sliceArea: [],
541
- callSends:[],
542
- cbc:[],
543
- repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
544
- repairers:[],
545
- cbcs:[],
546
- thead: '',
547
- headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细'],
548
- bodyData: ['f_entry_status','f_userinfo_code','f_user_name','f_user_phone','f_residential_area','f_address','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext'],
549
- }
550
- },
551
- props:{
552
- style: {
553
- type: String,
554
- default: 'col-sm-2 form-group'
555
- },
556
- style2: {
557
- type: String,
558
- default: 'col-sm-4 form-group'
559
- }
560
-
561
- },
562
-
563
- methods: {
564
- trouble(val) {
565
- // return val.replaceAll("'",'')
566
- // .replaceAll("\"",'')
567
- // .replaceAll("{",'')
568
- // .replaceAll("}",'')
569
- // .replaceAll("]",'')
570
- // .replaceAll("[",'')
571
- // .replaceAll("result:",'')
572
- // .replaceAll("data:",'')
573
- // .replaceAll("有隐患",'')
574
- // .replaceAll(",",'')
575
-
576
-
577
- const defect_content = JSON.parse(val)
578
- let result = ''
579
- if (defect_content.data) {
580
- const jsonData = defect_content.data
581
- for (const itemdata of jsonData) {
582
- const keys = Object.keys(itemdata)
583
- for (const itm of keys) {
584
- const value = itemdata[itm]
585
- result += itm + ':' + value
586
- }
587
- }
588
- }
589
- return result
590
- },
591
- getEmp() {
592
- let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
593
- let http = new HttpResetClass()
594
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
595
- let str=''
596
- res.data.forEach((item,idx,arr) => {
597
- //tag
598
- if(idx+1==arr.length){
599
- str += item.id
600
- }else{
601
- str += item.id+','
602
- }
603
-
604
- })
605
- let http1 = new HttpResetClass()
606
- http1.load('POST', 'api/af-safecheck/sql/safe_singleTable_OrderBy', {
607
- data: {
608
- items: 'id,f_user_telephone',
609
- tablename: 't_user',
610
- condition: `id in (${str})`,
611
- orderitem: 'id'
612
- }
613
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
614
-
615
- res.data.forEach((user)=>{
616
- try {
617
- ress.data.forEach((tel,tidx,arr)=>{
618
- //tag
619
- if(user.id==tel.id){
620
- this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
621
- ress.data.splice(tidx,1)
622
- //tag
623
- throw new Error("跳出循环");
624
- }
625
- })
626
- }catch (e) {
627
- //tag
628
- }
629
- })
630
- })
631
-
632
- })
633
- },
634
- toRepair(){
635
- //tag
636
- this.showModal2=true
637
- },
638
- async rectification(){
639
- this.isbusy =true
640
- // if (this.checkAll){
641
- let data={
642
- f_filialeids: this.model.params.f_filialeids,
643
- f_defect_content: this.model.params.f_defect_content,
644
- condition:this.model.params.condition
645
- }
646
- let res1= await new HttpResetClass().load('post','api/af-safecheck/sql/GetCheckPaperByDefectNew',{data: data })
647
- for (let i = 0; i < res1.data.length; i++) {
648
- let data1={
649
- f_paper_id: res1.data[i].id,
650
- condition:`f_repaire_type != '无隐患'`
651
- }
652
- let res2 = await new HttpResetClass().load('POST' , 'api/af-safecheck/sql/GetDefectByPaperIdNew' , {data: data1 } )
653
- //tag
654
- const uploadData = {
655
- model: {
656
- serviceacitivity: [{
657
- f_service_acitivity_type: '派单'
658
- }],
659
- f_repairitems: {},
660
- failure: '',
661
- f_source: '安检',
662
- f_service_id: '',
663
- f_contact_phone: '',
664
- f_meetunit: '',
665
- f_phone: '',
666
- f_user_name: '',
667
- f_address: '',
668
- f_repair_date: '',
669
- f_reciever: '',
670
- f_remarks: '',
671
- f_user_type: '',
672
- f_area: '',
673
- f_unit_name: '',
674
- f_street: '',
675
- f_residential_area: '',
676
- f_building: '',
677
- f_unit: '',
678
- f_floor: '',
679
- f_room: '',
680
- aState: '',
681
- f_repairtype: '',
682
- f_userinfo_id: '',
683
- f_userinfo_code: '',
684
- f_orgstr: '',
685
- f_outlets: '',
686
- f_attendant: this.$login.f.name
687
- },
688
- loginUser: {
689
- name: this.$login.f.name,
690
- ename: this.$login.f.ename
691
- },
692
- user: {
693
- f_userinfo_id: ''
694
- },
695
- callObj: null
696
- }
697
-
698
- uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
699
- // uploadData.model.f_meetunit = self.$login.f.orgpathnames
700
- // uploadData.model.f_orgstr = self.$login.f.orgpathstr
701
- // uploadData.model.f_outlets = self.$login.f.f_parentname
702
- uploadData.model.f_meetunit = this.$login.f.deps
703
- uploadData.model.f_orgid = this.$login.f.orgid
704
- uploadData.model.f_filiale = this.$login.f.org
705
- uploadData.model.f_outlets = this.$login.f.deps
706
- uploadData.model.f_filiale_id = this.$login.f.orgid
707
- uploadData.toRepair = '一级派单'
708
- let res3 = await new HttpResetClass().load('post','/api/af-safecheck/sql/GetUserForRepaireNew', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
709
- uploadData.model = Object.assign(uploadData.model, res3.data[0])
710
- uploadData.user.f_userinfo_id = res3.data[0].f_userinfo_id
711
- uploadData.model.f_repair_date = Util.getNowDate()
712
- uploadData.model.f_repairtype = res3.data[0].f_repairtype
713
- uploadData.model.f_remarks = res3.data[0].f_remarks
714
- let failure = []
715
- res2.data.forEach(row => {
716
- if (row.f_repaire_type == '隐患未处理') {
717
- console.log('row.f_item_value',row.f_item_value)
718
- failure.push({
719
- f_failure_type: row.f_item_name,
720
- failurecase: row.f_item_value?row.f_item_value.split(','):''
721
- })
722
- }
723
- })
724
- uploadData.model.failure = failure
725
- // 拼接repairitems
726
- let rows = JSON.parse(JSON.stringify(res2.data))
727
- let repairitems = {
728
- data: []
729
- }
730
- let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
731
- // 取隐患未处理的
732
- rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
733
- //tag)
734
- // 开始拼接
735
- rows.forEach(row => {
736
- let existIndex = -1
737
- // 判断该设备是否已经存在
738
- for (let i = 0; i < repairitems.data.length; i++) {
739
- if (repairitems.data[i].f_type == row.f_device_type) {
740
- existIndex = i
741
- break
742
- }
743
- }
744
- if (existIndex == -1) {
745
- // 不存在则新建
746
- let newItem = {
747
- f_type: row.f_device_type,
748
- details: [{
749
- f_defect_id: row.id,
750
- f_project: `${row.f_item_name}:${row.f_item_value}`,
751
- type: 'selector',
752
- options: safecheckOptions
753
- }]
754
- }
755
- repairitems.data.push(newItem)
756
- } else {
757
- // 存在则追加
758
- repairitems.data[existIndex].details.push({
759
- f_defect_id: row.id,
760
- f_project: `${row.f_item_name}:${row.f_item_value}`,
761
- type: 'selector',
762
- options: safecheckOptions
763
- })
764
- }
765
- })
766
- uploadData.model.f_repairitems = repairitems
767
- uploadData.rows=rows
768
- //tag)
769
- //tag
770
- if (uploadData.model.f_repairitems.data.length>0){
771
- this.callSends.push(uploadData)
772
- }else{
773
- //tag
774
- }
775
- }
776
- //tag)
777
- let timer = setInterval(async ()=>{
778
- this.showModal3=true
779
- this.isbusy=false
780
- if (this.timercount<this.callSends.length){
781
- //tag)
782
- let rows=this.callSends[this.timercount].rows
783
- //tag)
784
- let result = await this.$resetpost('/api/af-safecheck/logic/callerSend', this.callSends[this.timercount])
785
- //tag)
786
- if (result.data.f_service_id) {
787
- const data = {
788
- f_paper_id: rows[0].f_paper_id,
789
- f_service_id: result.data.f_service_id,
790
- itemsId: this.$login.convertToIn(rows.map(row => row.id))
791
- }
792
- //tag
793
- let updateRes = await this.$resetpost('/api/af-safecheck/logic/updateDefectStateNew', data)
794
- }
795
- this.toRepairCount++
796
- //tag
797
- this.timercount++
798
- }else{
799
- clearInterval(timer)
800
- //tag
801
- this.callSends=[]
802
- this.timercount=0
803
- this.showModal3=false
804
- this.cancel1()
805
- this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
806
- this.toRepairCount=0
807
- }
808
- }, 3000)
809
- },
810
- cancel1(){
811
- this.showModal2=false
812
- this.selectData={
813
- dispatchType:'',
814
- f_repairman:'',
815
- f_remarks:'',
816
- f_repairtype:''
817
- }
818
- },
819
- sleep(d){
820
- //tag)
821
- var t = Date.now()
822
- while(Date.now - t <= d){
823
-
824
- }
825
- //tag)
826
- },
827
- isChecked(v) {
828
- // 如果全选,不在的按选中算,否则,在的按选中算
829
- if (this.checkAll) {
830
- return this.checkes.indexOf(v) == -1
831
- } else {
832
- return this.checkes.indexOf(v) != -1
833
- }
834
- },
835
- setCheckAll() {
836
- this.checkAll=this.checkAll?false:true;
837
- // 全选改变后,清空选中数据
838
- this.checkes = []
839
- },
840
- setCheckes(id) {
841
- let index=this.checkes.indexOf(id)
842
- if(index<0){
843
- this.checkes.push(id)
844
- }else{
845
- this.checkes.splice(index,1)
846
- }
847
- },
848
-
849
- getmeterbook(val){
850
- this.cbc=[]
851
- this.cbc.push({
852
- label:'全部',
853
- value:''
854
- })
855
- if (val==''){
856
-
857
- this.cbcs.forEach(res=>{
858
- this.cbc.push({
859
- label:res.f_book_name,
860
- value:res.id
861
- })
862
- })
863
- }else{
864
- this.cbcs.forEach(res=>{
865
- if (res.f_book_slice_area==val){
866
- this.cbc.push({
867
- label:res.f_book_name,
868
- value:res.id
869
- })
870
- }
871
- })
872
- }
873
- },
874
-
875
- Mreadibook(val){
876
- //tag
877
- //tag
878
- this.sliceArea=[]
879
- if (val){
880
- new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
881
- items: 'name',
882
- tablename: 't_zone',
883
- condition: `parentid in ${val}`,
884
- orderitem: 'id'
885
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
886
- this.sliceArea.push({
887
- label:'全部',
888
- value:''
889
- })
890
- res.data.forEach(ress=>{
891
- this.sliceArea.push({
892
- label:ress.name,
893
- value:ress.name
894
- })
895
- })
896
-
897
- })
898
- }
899
- },
900
- getAllMeterBook(val){
901
- //tag
902
- //tag
903
- this.cbcs=[]
904
- if (val){
905
- new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
906
- items: 'f_book_name,f_book_slice_area,id',
907
- tablename: 't_meter_book',
908
- condition: `f_filiale_id in ${val}`,
909
- orderitem: 'id'
910
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
911
- res.data.forEach(ress=>{
912
- this.cbcs.push({
913
- id:ress.id,
914
- f_book_name:ress.f_book_name,
915
- f_book_slice_area:ress.f_book_slice_area
916
- })
917
- })
918
- this.cbc=[]
919
- this.cbc.push({
920
- label:'全部',
921
- value:''
922
- })
923
- this.cbcs.forEach(res=>{
924
- this.cbc.push({
925
- label:res.f_book_name,
926
- value:res.id
927
- })
928
- })
929
- })
930
- }
931
- },
932
- hiddenr() {
933
- this.$parent.showItem = !this.$parent.showItem
934
- },
935
- hidden() {
936
- this.criteriaShow = !this.criteriaShow
937
- },
938
- search(args) {
939
- //tag
940
- if (this.f_check_plan.f_plan_name) {
941
- args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
942
- }
943
- this.checkes = []
944
- this.checkAll=false
945
- this.model.search(args.condition, args.model)
946
- },
947
- getRes(obj) {
948
- //tag
949
- this.resids = {res:obj.res[0], resids:obj.resids[0]}
950
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
951
- this.Mreadibook(this.model.f_filialeids)
952
- this.getAllMeterBook(this.model.f_filialeids)
953
- },
954
- showChooser() {
955
- this.showModal = true
956
- },
957
- ok() {
958
- this.showModal = false
959
- if (this.$refs.modal.$children[0].selectedRow.id) {
960
- this.f_check_plan = this.$refs.modal.$children[0].selectedRow
961
- }
962
- },
963
- cancel() {
964
- this.showModal = false
965
- this.f_check_plan = {f_plan_name: '', id: ''}
966
- }
967
- },
968
- ready() {
969
- //tag
970
- this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
971
- this.getEmp()
972
- let gen = select(this)
973
- // this.Mreadibook(`('${this.$login.f.orgid}')`)
974
- co(gen)
975
- },
976
- watch:{
977
- 'timercount'(){
978
- if (this.timercount===0){
979
- this.progressbarWidth = '0'
980
- }else {
981
- //tag
982
- //tag
983
- this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
984
- }
985
-
986
- }
987
- },
988
- computed: {
989
- selected() {
990
- return this.$refs.paged.$refs.grid.selected
991
- },
992
- getfield () {
993
- //tag
994
- let data = {}
995
- this.bodyData.forEach((value, index) => {
996
- data[this.bodyData[index]] = this.headData[index]
997
- })
998
- //合计字段打印
999
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
1000
- if (this.sumsmodel) {
1001
- Object.keys(this.sumsmodel).forEach((key) => {
1002
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
1003
- })
1004
- } else {
1005
- this.tfoot += '暂无'
1006
- }
1007
- this.tfoot += '</th></tr>'
1008
- return data
1009
- }
1010
- }
1011
- }
1012
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <work-busy :is-busy="isbusy"></work-busy>
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
+ <div :class="$parent.$parent.style">
9
+ <label class="font_normal_body">安检计划</label>
10
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
11
+ @click="$parent.$parent.showChooser"
12
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
13
+ </div>
14
+ <div :class="$parent.$parent.style">
15
+ <label class="font_normal_body">存在隐患</label>
16
+ <v-select style="width:60% "
17
+ class="select select_list"
18
+ :value.sync="model.f_has_defect"
19
+ v-model="model.f_has_defect"
20
+ :options='$parent.$parent.hasDefectOptions'
21
+ :placeholder='model.f_has_defect'
22
+ condition="f_has_defect = '{}'"
23
+ close-on-select>
24
+ </v-select>
25
+ </div>
26
+ <div :class="$parent.$parent.style">
27
+ <label class="font_normal_body">用户编号</label>
28
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
29
+ condition="f_userinfo_code = '{}'"
30
+ style="width: 60%" placeholder="用户编号">
31
+ </div>
32
+ <div :class="$parent.$parent.style">
33
+ <label class="font_normal_body">结果查询</label>
34
+ <v-select
35
+ placeholder='维修结果查询'
36
+ :value-single="true"
37
+ class="select select_list" style="width: 60%"
38
+ v-model='model.f_is_repair'
39
+ :value.sync="model.f_is_repair"
40
+ :options='$parent.$parent.repaired'
41
+ condition="f_is_repair = '{}'"
42
+ close-on-select clear-button> </v-select>
43
+ </div>
44
+ <div class=" col-sm-4 form-group button-range" >
45
+ <div class="span" style="float: right;margin-top: 8px">
46
+ <div style="float: right" class="button_spacing"
47
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
48
+ @click="$parent.$parent.hiddenr()"></div>
49
+ <div style="float: right" class="button_spacing"
50
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
51
+ @click="$parent.$parent.hidden()"></div>
52
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
53
+ <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
54
+ <div style="float: right">
55
+ <export-excel :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
56
+ :field="$parent.$parent.getfield"
57
+ progress="safeGetExportProgress"
58
+ sqlurl="api/af-safecheck/logic/exportfile" sql-name="GetCheckPaperByDefectNew" template-name='安检隐患明细' :choose-col="true"></export-excel>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
64
+ <div :class="$parent.$parent.style">
65
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
66
+ <v-select class="select_list select"
67
+ placeholder='片区/管理站' style="width: 60%"
68
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
69
+ :options='$parent.$parent.sliceArea'
70
+ filer-key="name"
71
+ close-on-select clear-button
72
+ condition="f_slice_area='{}'"
73
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
74
+ :value-single="true">
75
+ </v-select>
76
+ </div>
77
+ <div :class="$parent.$parent.style2" style="margin: 0">
78
+ <role-selector-safe
79
+ role-name="安检员"
80
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
81
+ :resobjprop.sync="$parent.$parent.resids"
82
+ @re-res="$parent.$parent.getRes"
83
+ :value.sync="model.f_checker_id"
84
+ v-model="model.f_checker_id"
85
+ condition="f_checker_name = '{}'">
86
+ </role-selector-safe>
87
+ </div>
88
+
89
+ <div :class="$parent.$parent.style">
90
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
91
+ <v-select class="select_list select"
92
+ placeholder='抄表册' style="width: 60%"
93
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
94
+ :options='$parent.$parent.cbc'
95
+ filer-key="name"
96
+ close-on-select clear-button
97
+ condition="f_meter_book_num={}"
98
+ :value-single="true">
99
+ </v-select>
100
+ </div>
101
+ <div :class="$parent.$parent.style">
102
+ <label class="font_normal_body">起始时间</label>
103
+ <datepicker
104
+ placeholder='起始时间' style="width:60%"
105
+ :disabled-days-of-week="[]"
106
+ :format="'yyyy-MM-dd'"
107
+ :show-rest-button="reset"
108
+ :value.sync="model.f_start_time"
109
+ v-model="model.f_start_time"
110
+ condition="f_offsite_time >= '{} 00:00:00'">
111
+ </datepicker>
112
+ </div>
113
+ <div :class="$parent.$parent.style">
114
+ <label class="font_normal_body">结束时间</label>
115
+ <datepicker
116
+ placeholder='结束时间' style="width:60%"
117
+ :disabled-days-of-week="[]"
118
+ :format="'yyyy-MM-dd'"
119
+ :show-rest-button="reset"
120
+ :value.sync="model.f_end_time"
121
+ v-model="model.f_end_time"
122
+ condition="f_offsite_time <= '{} 23:59:59'">
123
+ </datepicker>
124
+ </div>
125
+
126
+
127
+ </div>
128
+ <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
129
+
130
+ <div :class="$parent.$parent.style">
131
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
132
+ <input type="text" class="input_search" v-model="model.f_repairman"
133
+ condition="f_repairman = '{}'"
134
+ style="width: 60%" placeholder="维修员">
135
+ </div>
136
+ <div :class="$parent.$parent.style">
137
+ <label class="font_normal_body">处理查询</label>
138
+ <v-select
139
+ placeholder='处理结果查询'
140
+ :value-single="true"
141
+ class="select select_list" style="width: 60%"
142
+ v-model='model.f_is_deal'
143
+ :value.sync="model.f_is_deal"
144
+ :options='$parent.$parent.deals'
145
+ condition="f_is_deal = '{}'"
146
+ close-on-select clear-button> </v-select>
147
+ </div>
148
+ <div :class="$parent.$parent.style">
149
+ <label class="font_normal_body">是否维修</label>
150
+ <v-select
151
+ placeholder='是否维修'
152
+ :value-single="true"
153
+ class="select select_list" style="width: 60%"
154
+ v-model='model.f_repaired'
155
+ :value.sync="model.f_repaired"
156
+ :options='$parent.$parent.repairedOptions'
157
+ condition="f_repaired = '{}'"
158
+ close-on-select clear-button> </v-select>
159
+ </div>
160
+ <div :class="$parent.$parent.style">
161
+ <label class="font_normal_body">用户小区</label>
162
+ <input type="text" class="input_search" v-model="model.f_residential_area"
163
+ condition="f_residential_area = '{}'"
164
+ style="width: 60%" placeholder="用户小区">
165
+ </div>
166
+
167
+ </div>
168
+
169
+
170
+
171
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
172
+ <div :class="$parent.$parent.style">
173
+ <label class="font_normal_body">安检计划</label>
174
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
175
+ @click="$parent.$parent.showChooser"
176
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
177
+ </div>
178
+ <div :class="$parent.$parent.style">
179
+ <label class="font_normal_body">存在隐患</label>
180
+ <v-select style="width:60% "
181
+ class="select select_list"
182
+ :value.sync="model.f_has_defect"
183
+ v-model="model.f_has_defect"
184
+ :options='$parent.$parent.hasDefectOptions'
185
+ :placeholder='model.f_has_defect'
186
+ condition="f_has_defect = '{}'"
187
+ close-on-select>
188
+ </v-select>
189
+ </div>
190
+
191
+ <div class=" col-sm-4 form-group button-range">
192
+ <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
193
+ <div style="float: right" class="button_spacing"
194
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
195
+ @click="$parent.$parent.hiddenr()"></div>
196
+ <div style="float: right" class="button_spacing"
197
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
198
+ @click="$parent.$parent.hidden()"></div>
199
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
200
+ <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
201
+ <div style="float: right">
202
+ <export-excel-old :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids}"
203
+ :field="$parent.$parent.getfield"
204
+ progress="safeGetExportProgress"
205
+ sqlurl="api/af-safecheck/logic/exportfile" sql-name="GetCheckPaperByDefectNew" template-name='安检计划明细' :choose-col="true"></export-excel-old>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+
211
+
212
+ </div>
213
+ <div class="row" v-show="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
214
+ <div :class="$parent.$parent.style">
215
+ <label class="font_normal_body">用户编号</label>
216
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
217
+ condition="f_userinfo_code = '{}'"
218
+ style="width: 60%" placeholder="用户编号">
219
+ </div>
220
+ <div :class="$parent.$parent.style">
221
+ <label class="font_normal_body">结果查询</label>
222
+ <v-select
223
+ placeholder='处理结果查询'
224
+ :value-single="true"
225
+ class="select select_list" style="width: 60%"
226
+ v-model='model.f_repaired'
227
+ :value.sync="model.f_repaired"
228
+ :options='$parent.$parent.repaired'
229
+ condition="f_repaired = '{}'"
230
+ close-on-select clear-button> </v-select>
231
+ </div>
232
+
233
+ <div :class="$parent.$parent.style2" style="margin: 0">
234
+ <role-selector-safe
235
+ role-name="安检员"
236
+ :resobjprop.sync="$parent.$parent.resids"
237
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
238
+ @re-res="$parent.$parent.getRes"
239
+ :value.sync="model.f_checker_id"
240
+ v-model="model.f_checker_id"
241
+ condition="f_checker_name = '{}'">
242
+ </role-selector-safe>
243
+ </div>
244
+ </div>
245
+ <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
246
+ <div :class="$parent.$parent.style">
247
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
248
+ <v-select class="select_list select"
249
+ placeholder='片区/管理站' style="width: 60%"
250
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
251
+ :options='$parent.$parent.sliceArea'
252
+ filer-key="name"
253
+ close-on-select clear-button
254
+ condition="f_slice_area='{}'"
255
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
256
+ :value-single="true">
257
+ </v-select>
258
+ </div>
259
+ <div :class="$parent.$parent.style">
260
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
261
+ <v-select class="select_list select"
262
+ placeholder='抄表册' style="width: 60%"
263
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
264
+ :options='$parent.$parent.cbc'
265
+ filer-key="name"
266
+ close-on-select clear-button
267
+ condition="f_meter_book_num={}"
268
+ :value-single="true">
269
+ </v-select>
270
+ </div>
271
+ <div :class="$parent.$parent.style">
272
+ <label class="font_normal_body">起始时间</label>
273
+ <datepicker
274
+ placeholder='起始时间' style="width:60%"
275
+ :disabled-days-of-week="[]"
276
+ :format="'yyyy-MM-dd'"
277
+ :show-rest-button="reset"
278
+ :value.sync="model.f_start_time"
279
+ v-model="model.f_start_time"
280
+ condition="f_offsite_time >= '{} 00:00:00'">
281
+ </datepicker>
282
+ </div>
283
+ <div :class="$parent.$parent.style">
284
+ <label class="font_normal_body">结束时间</label>
285
+ <datepicker
286
+ placeholder='结束时间' style="width:60%"
287
+ :disabled-days-of-week="[]"
288
+ :format="'yyyy-MM-dd'"
289
+ :show-rest-button="reset"
290
+ :value.sync="model.f_end_time"
291
+ v-model="model.f_end_time"
292
+ condition="f_offsite_time <= '{} 23:59:59'">
293
+ </datepicker>
294
+ </div>
295
+
296
+
297
+ </div>
298
+ <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
299
+
300
+ <div :class="$parent.$parent.style">
301
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
302
+ <input type="text" class="input_search" v-model="model.f_repairman"
303
+ condition="f_repairman = '{}'"
304
+ style="width: 60%" placeholder="维修员">
305
+ </div>
306
+ <div :class="$parent.$parent.style">
307
+ <label class="font_normal_body">处理查询</label>
308
+ <v-select
309
+ placeholder='处理结果查询'
310
+ :value-single="true"
311
+ class="select select_list" style="width: 60%"
312
+ v-model='model.f_is_deal'
313
+ :value.sync="model.f_is_deal"
314
+ :options='$parent.$parent.deals'
315
+ condition="f_is_deal = '{}'"
316
+ close-on-select clear-button> </v-select>
317
+ </div>
318
+ <div :class="$parent.$parent.style">
319
+ <label class="font_normal_body">是否维修</label>
320
+ <v-select
321
+ placeholder='是否维修'
322
+ :value-single="true"
323
+ class="select select_list" style="width: 60%"
324
+ v-model='model.f_repaired'
325
+ :value.sync="model.f_repaired"
326
+ :options='$parent.$parent.repairedOptions'
327
+ condition="f_repaired = '{}'"
328
+ close-on-select clear-button> </v-select>
329
+ </div>
330
+ <div :class="$parent.$parent.style">
331
+ <label class="font_normal_body">用户小区</label>
332
+ <input type="text" class="input_search" v-model="model.f_residential_area"
333
+ condition="f_residential_area = '{}'"
334
+ style="width: 60%" placeholder="用户小区">
335
+ </div>
336
+ </div>
337
+ </div>
338
+ </criteria>
339
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
340
+ <template partial='head'>
341
+ <tr>
342
+ <!-- <th><nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />全选</nobr></th>-->
343
+ <th><nobr>入户状态</nobr></th>
344
+ <th><nobr>用户编号</nobr></th>
345
+ <th><nobr>用户名</nobr></th>
346
+ <th><nobr>用户电话</nobr></th>
347
+ <th><nobr>用户小区</nobr></th>
348
+ <th><nobr>用户地址</nobr></th>
349
+ <th><nobr>安检时间</nobr></th>
350
+ <th><nobr>安检员</nobr></th>
351
+ <th><nobr>计划名</nobr></th>
352
+ <th><nobr>是否有隐患</nobr></th>
353
+ <th><nobr>隐患数</nobr></th>
354
+ <th><nobr>处理数</nobr></th>
355
+ <th><nobr>完成数</nobr></th>
356
+ <th><nobr>处理情况</nobr></th>
357
+ <th><nobr>完成情况</nobr></th>
358
+ <th><nobr>维修情况</nobr></th>
359
+ <th><nobr>维修员</nobr></th>
360
+ <th><nobr>隐患明细</nobr></th>
361
+ </tr>
362
+ </template>
363
+ <template partial='body'>
364
+ <!-- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>-->
365
+ <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
366
+ <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
367
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
368
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
369
+ <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
370
+ <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
371
+ <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
372
+ <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
373
+ <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
374
+ <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
375
+ <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
376
+ <td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
377
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
378
+ <td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
379
+ <td style="text-align: center;white-space:nowrap;">{{row.f_is_repair}}</td>
380
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repaired}}</td>
381
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
382
+ <td style="text-align: center;white-space:nowrap;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</td>
383
+ </template>
384
+ </data-grid>
385
+ </criteria-paged>
386
+
387
+ <modal :show.sync="showModal" v-ref:modal>
388
+ <div slot="modal-header" class="modal-header">
389
+ <h4 class="modal-title">
390
+ 选择计划
391
+ </h4>
392
+ </div>
393
+ <div slot="modal-body" class="modal-body">
394
+ <plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
395
+ </div>
396
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
397
+ <button class="button_search" @click="ok">确认</button>
398
+ <button class="button_search" @click="cancel">取消</button>
399
+ </div>
400
+ </modal>
401
+ <modal :show.sync="showModal2" :backdrop="false">
402
+ <div slot="modal-header" class="modal-header">
403
+ <h4 class="modal-title">
404
+ 转维修
405
+ </h4>
406
+ </div>
407
+ <div slot="modal-body" class="modal-body">
408
+ <div v-if="true">
409
+ <div class="row" style="margin-top: 10px">
410
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
411
+ <div class="col-xs-8 col-md-8">
412
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
413
+ :options='dispatchTypeOptions' placeholder='派发类型'
414
+ close-on-select>
415
+ </v-select>
416
+ </div>
417
+ </div>
418
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
419
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
420
+ <div class="col-xs-8 col-md-8">
421
+ <v-select
422
+ :value.sync="selectData.f_repairman"
423
+ :value-single="true"
424
+ :options='repairers'
425
+ placeholder='请选择维修员'
426
+ close-on-select></v-select>
427
+ </div>
428
+ </div>
429
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
430
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
431
+ <div class="col-xs-8 col-md-8">
432
+ <right-tree
433
+ islist
434
+ :userid="userid"
435
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
436
+ @re-res="getSiteRes"></right-tree>
437
+ </div>
438
+ </div>
439
+ <div class="row" style="margin-top: 10px">
440
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
441
+ <div class="col-xs-8 col-md-8">
442
+ <v-select :value.sync="selectData.f_repairtype" style="width:60%"
443
+ class="select select_list"
444
+ :value-single="true"
445
+ :options='repairTypeOptions'
446
+ close-on-select>
447
+ </v-select>
448
+ </div>
449
+ </div>
450
+ <div class="row" style="margin-top: 10px">
451
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
452
+ <div class="col-xs-8 col-md-8">
453
+ <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
454
+ </div>
455
+ </div>
456
+ </div>
457
+ </div>
458
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
459
+ <button class="button_search" @click="rectification">转维修</button>
460
+ <button class="button_search" @click="cancel1">取消</button>
461
+ </div>
462
+ </modal>
463
+ <modal :show.sync="showModal3">
464
+ <div slot="modal-header" class="modal-header">
465
+ <h4 class="modal-title">
466
+ 转维修进度{{ progressbarWidth }}%
467
+ </h4>
468
+ </div>
469
+ <div slot="modal-body" class="modal-body">
470
+ <div class="progress">
471
+ <div class="progress-bar" role="progressbar" aria-valuenow="60"
472
+ aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
473
+ <!-- <span class="sr-only">40% 完成</span>-->
474
+ </div>
475
+ </div>
476
+ </div>
477
+ <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
478
+ </modal>
479
+ </div>
480
+ </template>
481
+ <script>
482
+ import {PagedList} from 'vue-client'
483
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
484
+ import co from 'co'
485
+ import Vue from 'vue'
486
+ import * as Util from '../../../components/Util'
487
+
488
+ let select = function* (self) {
489
+ let http = new HttpResetClass()
490
+ let getGasman = yield http.load('POST', '/rs/search', {
491
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
492
+ userid: self.$login.f.id
493
+ }, {resolveMsg: null, rejectMsg: null})
494
+ //tag
495
+ self.checkersid.push({label: '全部', value: ''})
496
+ getGasman.data.forEach((checker) => {
497
+ self.checkersid.push({label: checker.name, value: checker.name})
498
+ })
499
+ }
500
+ export default {
501
+ title: '隐患查询',
502
+ data() {
503
+ let model = new PagedList('api/af-safecheck/sql/GetCheckPaperByDefectNew', 20, {
504
+ f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
505
+ })
506
+ model.f_filialeids = '(' + this.$login.f.orgid + ')'
507
+ model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
508
+ return {
509
+ repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
510
+ deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'}],
511
+ hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
512
+ f: this.$login.f,
513
+ model: model,
514
+ criteriaShow: false,
515
+ checkAll:false,
516
+ timercount:0,
517
+ showModal2:false,
518
+ repairTypeOptions:this.$appdata.getParam('转维修类型'),
519
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
520
+ checkes:[],
521
+ showModal: false,
522
+ f_check_plan: {f_plan_name: '', id: ''},
523
+ sumsmodel: {},
524
+ resids:{},
525
+ all: false,
526
+ fields: {},
527
+
528
+ selectData:{
529
+ dispatchType:'',
530
+ f_repairman:'',
531
+ f_remarks:'',
532
+ f_repairtype:''
533
+ },
534
+ progressbarWidth:'0',
535
+ modelval: [],
536
+ isbusy:false,
537
+ checkersid: [],
538
+ showModal3:false,
539
+ toRepairCount:0,
540
+ sliceArea: [],
541
+ callSends:[],
542
+ cbc:[],
543
+ repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
544
+ repairers:[],
545
+ cbcs:[],
546
+ thead: '',
547
+ headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细'],
548
+ bodyData: ['f_entry_status','f_userinfo_code','f_user_name','f_user_phone','f_residential_area','f_address','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext'],
549
+ }
550
+ },
551
+ props:{
552
+ style: {
553
+ type: String,
554
+ default: 'col-sm-2 form-group'
555
+ },
556
+ style2: {
557
+ type: String,
558
+ default: 'col-sm-4 form-group'
559
+ }
560
+
561
+ },
562
+
563
+ methods: {
564
+ trouble(val) {
565
+ // return val.replaceAll("'",'')
566
+ // .replaceAll("\"",'')
567
+ // .replaceAll("{",'')
568
+ // .replaceAll("}",'')
569
+ // .replaceAll("]",'')
570
+ // .replaceAll("[",'')
571
+ // .replaceAll("result:",'')
572
+ // .replaceAll("data:",'')
573
+ // .replaceAll("有隐患",'')
574
+ // .replaceAll(",",'')
575
+
576
+
577
+ const defect_content = JSON.parse(val)
578
+ let result = ''
579
+ if (defect_content.data) {
580
+ const jsonData = defect_content.data
581
+ for (const itemdata of jsonData) {
582
+ const keys = Object.keys(itemdata)
583
+ for (const itm of keys) {
584
+ const value = itemdata[itm]
585
+ result += itm + ':' + value
586
+ }
587
+ }
588
+ }
589
+ return result
590
+ },
591
+ getEmp() {
592
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
593
+ let http = new HttpResetClass()
594
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
595
+ let str=''
596
+ res.data.forEach((item,idx,arr) => {
597
+ //tag
598
+ if(idx+1==arr.length){
599
+ str += item.id
600
+ }else{
601
+ str += item.id+','
602
+ }
603
+
604
+ })
605
+ let http1 = new HttpResetClass()
606
+ http1.load('POST', 'api/af-safecheck/sql/safe_singleTable_OrderBy', {
607
+ data: {
608
+ items: 'id,f_user_telephone',
609
+ tablename: 't_user',
610
+ condition: `id in (${str})`,
611
+ orderitem: 'id'
612
+ }
613
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
614
+
615
+ res.data.forEach((user)=>{
616
+ try {
617
+ ress.data.forEach((tel,tidx,arr)=>{
618
+ //tag
619
+ if(user.id==tel.id){
620
+ this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
621
+ ress.data.splice(tidx,1)
622
+ //tag
623
+ throw new Error("跳出循环");
624
+ }
625
+ })
626
+ }catch (e) {
627
+ //tag
628
+ }
629
+ })
630
+ })
631
+
632
+ })
633
+ },
634
+ toRepair(){
635
+ //tag
636
+ this.showModal2=true
637
+ },
638
+ async rectification(){
639
+ this.isbusy =true
640
+ // if (this.checkAll){
641
+ let data={
642
+ f_filialeids: this.model.params.f_filialeids,
643
+ f_defect_content: this.model.params.f_defect_content,
644
+ condition:this.model.params.condition
645
+ }
646
+ let res1= await new HttpResetClass().load('post','api/af-safecheck/sql/GetCheckPaperByDefectNew',{data: data })
647
+ for (let i = 0; i < res1.data.length; i++) {
648
+ let data1={
649
+ f_paper_id: res1.data[i].id,
650
+ condition:`f_repaire_type != '无隐患'`
651
+ }
652
+ let res2 = await new HttpResetClass().load('POST' , 'api/af-safecheck/sql/GetDefectByPaperIdNew' , {data: data1 } )
653
+ //tag
654
+ const uploadData = {
655
+ model: {
656
+ serviceacitivity: [{
657
+ f_service_acitivity_type: '派单'
658
+ }],
659
+ f_repairitems: {},
660
+ failure: '',
661
+ f_source: '安检',
662
+ f_service_id: '',
663
+ f_contact_phone: '',
664
+ f_meetunit: '',
665
+ f_phone: '',
666
+ f_user_name: '',
667
+ f_address: '',
668
+ f_repair_date: '',
669
+ f_reciever: '',
670
+ f_remarks: '',
671
+ f_user_type: '',
672
+ f_area: '',
673
+ f_unit_name: '',
674
+ f_street: '',
675
+ f_residential_area: '',
676
+ f_building: '',
677
+ f_unit: '',
678
+ f_floor: '',
679
+ f_room: '',
680
+ aState: '',
681
+ f_repairtype: '',
682
+ f_userinfo_id: '',
683
+ f_userinfo_code: '',
684
+ f_orgstr: '',
685
+ f_outlets: '',
686
+ f_attendant: this.$login.f.name
687
+ },
688
+ loginUser: {
689
+ name: this.$login.f.name,
690
+ ename: this.$login.f.ename
691
+ },
692
+ user: {
693
+ f_userinfo_id: ''
694
+ },
695
+ callObj: null
696
+ }
697
+
698
+ uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
699
+ // uploadData.model.f_meetunit = self.$login.f.orgpathnames
700
+ // uploadData.model.f_orgstr = self.$login.f.orgpathstr
701
+ // uploadData.model.f_outlets = self.$login.f.f_parentname
702
+ uploadData.model.f_meetunit = this.$login.f.deps
703
+ uploadData.model.f_orgid = this.$login.f.orgid
704
+ uploadData.model.f_filiale = this.$login.f.org
705
+ uploadData.model.f_outlets = this.$login.f.deps
706
+ uploadData.model.f_filiale_id = this.$login.f.orgid
707
+ uploadData.toRepair = '一级派单'
708
+ let res3 = await new HttpResetClass().load('post','/api/af-safecheck/sql/GetUserForRepaireNew', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
709
+ uploadData.model = Object.assign(uploadData.model, res3.data[0])
710
+ uploadData.user.f_userinfo_id = res3.data[0].f_userinfo_id
711
+ uploadData.model.f_repair_date = Util.getNowDate()
712
+ uploadData.model.f_repairtype = res3.data[0].f_repairtype
713
+ uploadData.model.f_remarks = res3.data[0].f_remarks
714
+ let failure = []
715
+ res2.data.forEach(row => {
716
+ if (row.f_repaire_type == '隐患未处理') {
717
+ console.log('row.f_item_value',row.f_item_value)
718
+ failure.push({
719
+ f_failure_type: row.f_item_name,
720
+ failurecase: row.f_item_value?row.f_item_value.split(','):''
721
+ })
722
+ }
723
+ })
724
+ uploadData.model.failure = failure
725
+ // 拼接repairitems
726
+ let rows = JSON.parse(JSON.stringify(res2.data))
727
+ let repairitems = {
728
+ data: []
729
+ }
730
+ let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
731
+ // 取隐患未处理的
732
+ rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
733
+ //tag)
734
+ // 开始拼接
735
+ rows.forEach(row => {
736
+ let existIndex = -1
737
+ // 判断该设备是否已经存在
738
+ for (let i = 0; i < repairitems.data.length; i++) {
739
+ if (repairitems.data[i].f_type == row.f_device_type) {
740
+ existIndex = i
741
+ break
742
+ }
743
+ }
744
+ if (existIndex == -1) {
745
+ // 不存在则新建
746
+ let newItem = {
747
+ f_type: row.f_device_type,
748
+ details: [{
749
+ f_defect_id: row.id,
750
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
751
+ type: 'selector',
752
+ options: safecheckOptions
753
+ }]
754
+ }
755
+ repairitems.data.push(newItem)
756
+ } else {
757
+ // 存在则追加
758
+ repairitems.data[existIndex].details.push({
759
+ f_defect_id: row.id,
760
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
761
+ type: 'selector',
762
+ options: safecheckOptions
763
+ })
764
+ }
765
+ })
766
+ uploadData.model.f_repairitems = repairitems
767
+ uploadData.rows=rows
768
+ //tag)
769
+ //tag
770
+ if (uploadData.model.f_repairitems.data.length>0){
771
+ this.callSends.push(uploadData)
772
+ }else{
773
+ //tag
774
+ }
775
+ }
776
+ //tag)
777
+ let timer = setInterval(async ()=>{
778
+ this.showModal3=true
779
+ this.isbusy=false
780
+ if (this.timercount<this.callSends.length){
781
+ //tag)
782
+ let rows=this.callSends[this.timercount].rows
783
+ //tag)
784
+ let result = await this.$resetpost('/api/af-safecheck/logic/callerSend', this.callSends[this.timercount])
785
+ //tag)
786
+ if (result.data.f_service_id) {
787
+ const data = {
788
+ f_paper_id: rows[0].f_paper_id,
789
+ f_service_id: result.data.f_service_id,
790
+ itemsId: this.$login.convertToIn(rows.map(row => row.id))
791
+ }
792
+ //tag
793
+ let updateRes = await this.$resetpost('/api/af-safecheck/logic/updateDefectStateNew', data)
794
+ }
795
+ this.toRepairCount++
796
+ //tag
797
+ this.timercount++
798
+ }else{
799
+ clearInterval(timer)
800
+ //tag
801
+ this.callSends=[]
802
+ this.timercount=0
803
+ this.showModal3=false
804
+ this.cancel1()
805
+ this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
806
+ this.toRepairCount=0
807
+ }
808
+ }, 3000)
809
+ },
810
+ cancel1(){
811
+ this.showModal2=false
812
+ this.selectData={
813
+ dispatchType:'',
814
+ f_repairman:'',
815
+ f_remarks:'',
816
+ f_repairtype:''
817
+ }
818
+ },
819
+ sleep(d){
820
+ //tag)
821
+ var t = Date.now()
822
+ while(Date.now - t <= d){
823
+
824
+ }
825
+ //tag)
826
+ },
827
+ isChecked(v) {
828
+ // 如果全选,不在的按选中算,否则,在的按选中算
829
+ if (this.checkAll) {
830
+ return this.checkes.indexOf(v) == -1
831
+ } else {
832
+ return this.checkes.indexOf(v) != -1
833
+ }
834
+ },
835
+ setCheckAll() {
836
+ this.checkAll=this.checkAll?false:true;
837
+ // 全选改变后,清空选中数据
838
+ this.checkes = []
839
+ },
840
+ setCheckes(id) {
841
+ let index=this.checkes.indexOf(id)
842
+ if(index<0){
843
+ this.checkes.push(id)
844
+ }else{
845
+ this.checkes.splice(index,1)
846
+ }
847
+ },
848
+
849
+ getmeterbook(val){
850
+ this.cbc=[]
851
+ this.cbc.push({
852
+ label:'全部',
853
+ value:''
854
+ })
855
+ if (val==''){
856
+
857
+ this.cbcs.forEach(res=>{
858
+ this.cbc.push({
859
+ label:res.f_book_name,
860
+ value:res.id
861
+ })
862
+ })
863
+ }else{
864
+ this.cbcs.forEach(res=>{
865
+ if (res.f_book_slice_area==val){
866
+ this.cbc.push({
867
+ label:res.f_book_name,
868
+ value:res.id
869
+ })
870
+ }
871
+ })
872
+ }
873
+ },
874
+
875
+ Mreadibook(val){
876
+ //tag
877
+ //tag
878
+ this.sliceArea=[]
879
+ if (val){
880
+ new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
881
+ items: 'name',
882
+ tablename: 't_zone',
883
+ condition: `parentid in ${val}`,
884
+ orderitem: 'id'
885
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
886
+ this.sliceArea.push({
887
+ label:'全部',
888
+ value:''
889
+ })
890
+ res.data.forEach(ress=>{
891
+ this.sliceArea.push({
892
+ label:ress.name,
893
+ value:ress.name
894
+ })
895
+ })
896
+
897
+ })
898
+ }
899
+ },
900
+ getAllMeterBook(val){
901
+ //tag
902
+ //tag
903
+ this.cbcs=[]
904
+ if (val){
905
+ new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
906
+ items: 'f_book_name,f_book_slice_area,id',
907
+ tablename: 't_meter_book',
908
+ condition: `f_filiale_id in ${val}`,
909
+ orderitem: 'id'
910
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
911
+ res.data.forEach(ress=>{
912
+ this.cbcs.push({
913
+ id:ress.id,
914
+ f_book_name:ress.f_book_name,
915
+ f_book_slice_area:ress.f_book_slice_area
916
+ })
917
+ })
918
+ this.cbc=[]
919
+ this.cbc.push({
920
+ label:'全部',
921
+ value:''
922
+ })
923
+ this.cbcs.forEach(res=>{
924
+ this.cbc.push({
925
+ label:res.f_book_name,
926
+ value:res.id
927
+ })
928
+ })
929
+ })
930
+ }
931
+ },
932
+ hiddenr() {
933
+ this.$parent.showItem = !this.$parent.showItem
934
+ },
935
+ hidden() {
936
+ this.criteriaShow = !this.criteriaShow
937
+ },
938
+ search(args) {
939
+ //tag
940
+ if (this.f_check_plan.f_plan_name) {
941
+ args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
942
+ }
943
+ this.checkes = []
944
+ this.checkAll=false
945
+ this.model.search(args.condition, args.model)
946
+ },
947
+ getRes(obj) {
948
+ //tag
949
+ this.resids = {res:obj.res[0], resids:obj.resids[0]}
950
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
951
+ this.Mreadibook(this.model.f_filialeids)
952
+ this.getAllMeterBook(this.model.f_filialeids)
953
+ },
954
+ showChooser() {
955
+ this.showModal = true
956
+ },
957
+ ok() {
958
+ this.showModal = false
959
+ if (this.$refs.modal.$children[0].selectedRow.id) {
960
+ this.f_check_plan = this.$refs.modal.$children[0].selectedRow
961
+ }
962
+ },
963
+ cancel() {
964
+ this.showModal = false
965
+ this.f_check_plan = {f_plan_name: '', id: ''}
966
+ }
967
+ },
968
+ ready() {
969
+ //tag
970
+ this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
971
+ this.getEmp()
972
+ let gen = select(this)
973
+ // this.Mreadibook(`('${this.$login.f.orgid}')`)
974
+ co(gen)
975
+ },
976
+ watch:{
977
+ 'timercount'(){
978
+ if (this.timercount===0){
979
+ this.progressbarWidth = '0'
980
+ }else {
981
+ //tag
982
+ //tag
983
+ this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
984
+ }
985
+
986
+ }
987
+ },
988
+ computed: {
989
+ selected() {
990
+ return this.$refs.paged.$refs.grid.selected
991
+ },
992
+ getfield () {
993
+ //tag
994
+ let data = {}
995
+ this.bodyData.forEach((value, index) => {
996
+ data[this.bodyData[index]] = this.headData[index]
997
+ })
998
+ //合计字段打印
999
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
1000
+ if (this.sumsmodel) {
1001
+ Object.keys(this.sumsmodel).forEach((key) => {
1002
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
1003
+ })
1004
+ } else {
1005
+ this.tfoot += '暂无'
1006
+ }
1007
+ this.tfoot += '</th></tr>'
1008
+ return data
1009
+ }
1010
+ }
1011
+ }
1012
+ </script>