safecheck-client 3.0.35-5 → 3.0.35-7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/config/dev.env.js +6 -6
  5. package/config/index.js +38 -38
  6. package/config/prod.env.js +3 -3
  7. package/config/test.env.js +6 -6
  8. package/docs/AppBase.md +22 -22
  9. package/docs/Busy.md +14 -14
  10. package/docs/CriteriaPaged.md +47 -47
  11. package/docs/DataGrid.md +54 -54
  12. package/docs/DataModel.md +22 -22
  13. package/docs/Dynamic.md +42 -42
  14. package/docs/GetParams.md +11 -11
  15. package/docs/HttpBusy.md +13 -13
  16. package/docs/HttpStore.md +29 -29
  17. package/docs/MessageBox.md +28 -28
  18. package/docs/PagedList.md +29 -29
  19. package/docs/Pager.md +21 -21
  20. package/docs/Project.md +23 -23
  21. package/docs/Route.md +105 -105
  22. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  23. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  24. package/docs/Task.md +46 -46
  25. package/docs/TreeList.md +28 -28
  26. package/docs/TreeMixin.md +18 -18
  27. package/docs/all.md +10 -10
  28. package/docs/list.md +42 -42
  29. package/docs/partial.md +75 -75
  30. package/docs/selector.md +82 -82
  31. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  32. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
  33. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
  34. package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
  35. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  36. package/examples/AddressList/App.vue +13 -13
  37. package/examples/AddressList/index.html +11 -11
  38. package/examples/DispatchList/App.vue +10 -10
  39. package/examples/DispatchList/BaseTree.vue +13 -13
  40. package/examples/DispatchList/Init.vue +22 -22
  41. package/examples/DispatchList/Test.vue +20 -20
  42. package/examples/DispatchList/index.html +11 -11
  43. package/examples/DispatchList/main.js +18 -18
  44. package/home.html +16 -16
  45. package/package.json +1 -1
  46. package/publish.bat +7 -7
  47. package/release.bat +5 -5
  48. package/src/Widget.vue +13 -13
  49. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  50. package/src/android-bootstrap/less/.csscomb.json +304 -304
  51. package/src/android-bootstrap/less/.csslintrc +19 -19
  52. package/src/android-bootstrap/less/alerts.less +73 -73
  53. package/src/android-bootstrap/less/badges.less +66 -66
  54. package/src/android-bootstrap/less/bootstrap.less +56 -56
  55. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  56. package/src/android-bootstrap/less/button-groups.less +247 -247
  57. package/src/android-bootstrap/less/buttons.less +173 -173
  58. package/src/android-bootstrap/less/carousel.less +269 -269
  59. package/src/android-bootstrap/less/close.less +34 -34
  60. package/src/android-bootstrap/less/code.less +69 -69
  61. package/src/android-bootstrap/less/component-animations.less +33 -33
  62. package/src/android-bootstrap/less/grid.less +84 -84
  63. package/src/android-bootstrap/less/input-groups.less +167 -167
  64. package/src/android-bootstrap/less/jumbotron.less +52 -52
  65. package/src/android-bootstrap/less/labels.less +64 -64
  66. package/src/android-bootstrap/less/list-group.less +141 -141
  67. package/src/android-bootstrap/less/media.less +66 -66
  68. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  69. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  70. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  71. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  72. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  73. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  74. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  75. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  76. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  77. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  78. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  79. package/src/android-bootstrap/less/mixins/image.less +33 -33
  80. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  81. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  82. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  83. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  84. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  85. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  86. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  87. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  88. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  89. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  90. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  91. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  92. package/src/android-bootstrap/less/mixins/size.less +10 -10
  93. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  94. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  95. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  96. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  97. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  98. package/src/android-bootstrap/less/mixins.less +40 -40
  99. package/src/android-bootstrap/less/modals.less +151 -151
  100. package/src/android-bootstrap/less/navbar.less +660 -660
  101. package/src/android-bootstrap/less/navs.less +290 -290
  102. package/src/android-bootstrap/less/normalize.less +424 -424
  103. package/src/android-bootstrap/less/pager.less +76 -76
  104. package/src/android-bootstrap/less/pagination.less +89 -89
  105. package/src/android-bootstrap/less/panels.less +274 -274
  106. package/src/android-bootstrap/less/popovers.less +131 -131
  107. package/src/android-bootstrap/less/print.less +101 -101
  108. package/src/android-bootstrap/less/progress-bars.less +87 -87
  109. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  110. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  111. package/src/android-bootstrap/less/scaffolding.less +161 -161
  112. package/src/android-bootstrap/less/tables.less +262 -262
  113. package/src/android-bootstrap/less/theme.less +291 -291
  114. package/src/android-bootstrap/less/thumbnails.less +36 -36
  115. package/src/android-bootstrap/less/tooltip.less +102 -102
  116. package/src/android-bootstrap/less/type.less +303 -303
  117. package/src/android-bootstrap/less/utilities.less +55 -55
  118. package/src/android-bootstrap/less/variables.less +896 -896
  119. package/src/android-bootstrap/less/wells.less +29 -29
  120. package/src/androidTest.js +20 -20
  121. package/src/bootstrap/less/.csscomb.json +304 -304
  122. package/src/bootstrap/less/.csslintrc +19 -19
  123. package/src/bootstrap/less/alerts.less +73 -73
  124. package/src/bootstrap/less/badges.less +66 -66
  125. package/src/bootstrap/less/breadcrumbs.less +26 -26
  126. package/src/bootstrap/less/button-groups.less +247 -247
  127. package/src/bootstrap/less/buttons.less +172 -172
  128. package/src/bootstrap/less/carousel.less +269 -269
  129. package/src/bootstrap/less/close.less +34 -34
  130. package/src/bootstrap/less/code.less +69 -69
  131. package/src/bootstrap/less/component-animations.less +33 -33
  132. package/src/bootstrap/less/dropdowns.less +216 -216
  133. package/src/bootstrap/less/forms.less +626 -626
  134. package/src/bootstrap/less/grid.less +84 -84
  135. package/src/bootstrap/less/input-groups.less +167 -167
  136. package/src/bootstrap/less/jumbotron.less +52 -52
  137. package/src/bootstrap/less/labels.less +64 -64
  138. package/src/bootstrap/less/list-group.less +141 -141
  139. package/src/bootstrap/less/media.less +66 -66
  140. package/src/bootstrap/less/mixins/alerts.less +14 -14
  141. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  142. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  143. package/src/bootstrap/less/mixins/buttons.less +69 -69
  144. package/src/bootstrap/less/mixins/center-block.less +7 -7
  145. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  146. package/src/bootstrap/less/mixins/forms.less +90 -90
  147. package/src/bootstrap/less/mixins/gradients.less +59 -59
  148. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  149. package/src/bootstrap/less/mixins/grid.less +122 -122
  150. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  151. package/src/bootstrap/less/mixins/image.less +33 -33
  152. package/src/bootstrap/less/mixins/labels.less +12 -12
  153. package/src/bootstrap/less/mixins/list-group.less +30 -30
  154. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  155. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  156. package/src/bootstrap/less/mixins/opacity.less +8 -8
  157. package/src/bootstrap/less/mixins/pagination.less +24 -24
  158. package/src/bootstrap/less/mixins/panels.less +24 -24
  159. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  160. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  161. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  162. package/src/bootstrap/less/mixins/resize.less +6 -6
  163. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  164. package/src/bootstrap/less/mixins/size.less +10 -10
  165. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  166. package/src/bootstrap/less/mixins/table-row.less +44 -44
  167. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  168. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  169. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  170. package/src/bootstrap/less/mixins.less +40 -40
  171. package/src/bootstrap/less/modals.less +151 -151
  172. package/src/bootstrap/less/navbar.less +660 -660
  173. package/src/bootstrap/less/normalize.less +424 -424
  174. package/src/bootstrap/less/pager.less +76 -76
  175. package/src/bootstrap/less/pagination.less +89 -89
  176. package/src/bootstrap/less/panels.less +275 -275
  177. package/src/bootstrap/less/popovers.less +131 -131
  178. package/src/bootstrap/less/print.less +101 -101
  179. package/src/bootstrap/less/progress-bars.less +87 -87
  180. package/src/bootstrap/less/responsive-embed.less +35 -35
  181. package/src/bootstrap/less/responsive-utilities.less +194 -194
  182. package/src/bootstrap/less/scaffolding.less +161 -161
  183. package/src/bootstrap/less/theme.less +291 -291
  184. package/src/bootstrap/less/thumbnails.less +36 -36
  185. package/src/bootstrap/less/tooltip.less +102 -102
  186. package/src/bootstrap/less/type.less +303 -303
  187. package/src/bootstrap/less/utilities.less +55 -55
  188. package/src/bootstrap/less/wells.less +29 -29
  189. package/src/components/FileUpload.vue +696 -696
  190. package/src/components/Hello.vue +39 -39
  191. package/src/components/LeftTree.vue +27 -27
  192. package/src/components/NewDefectList/DefectListNew.vue +617 -617
  193. package/src/components/android/AddPlanItemYy.vue +451 -451
  194. package/src/components/android/AddressList.vue +61 -61
  195. package/src/components/android/AttendanceTally.vue +116 -116
  196. package/src/components/android/Blank.vue +10 -10
  197. package/src/components/android/CheckUnplanPage.vue +56 -56
  198. package/src/components/android/Checker.vue +12 -12
  199. package/src/components/android/CheckerAnnual.vue +81 -81
  200. package/src/components/android/CheckerAvarta.vue +82 -82
  201. package/src/components/android/CivilCurrentCreate.vue +1031 -1026
  202. package/src/components/android/EquipmentInspection.vue +348 -348
  203. package/src/components/android/FootprintMap.vue +120 -120
  204. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  205. package/src/components/android/MasterMain.vue +77 -77
  206. package/src/components/android/Menu.vue +132 -132
  207. package/src/components/android/NavBottom.vue +157 -157
  208. package/src/components/android/PaperAlarm.vue +85 -85
  209. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  210. package/src/components/android/PlumberAnnual.vue +83 -83
  211. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  212. package/src/components/android/PlumberMonthly.vue +84 -84
  213. package/src/components/android/PostMap.vue +83 -83
  214. package/src/components/android/QueryCheckHistory.vue +122 -122
  215. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  216. package/src/components/android/RepairMain.vue +60 -60
  217. package/src/components/android/Repairman.vue +12 -12
  218. package/src/components/android/SafecheckOrderV.vue +2805 -2805
  219. package/src/components/android/StationMaster.vue +12 -12
  220. package/src/components/android/examples/SafeListExamples.vue +296 -296
  221. package/src/components/defects/DefectModal.vue +101 -101
  222. package/src/components/defects/DevicesAndItem.vue +39 -39
  223. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  224. package/src/components/notice/NoticeForm.vue +100 -100
  225. package/src/components/notice/NoticeIssue.vue +20 -20
  226. package/src/components/paper/PicViewer.vue +18 -18
  227. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  228. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  229. package/src/components/phonestate/PostMap.vue +82 -82
  230. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  231. package/src/components/rongcheng/AspiratedAreaPlan.vue +574 -574
  232. package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1236
  233. package/src/components/userfile/MeterFile.vue +145 -145
  234. package/src/components/userfile/MeterModify.vue +46 -46
  235. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  236. package/src/filiale/bayan/android/AddPlanItem.vue +441 -430
  237. package/src/filiale/bayan/android/CheckPlanDown.vue +249 -249
  238. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1380 -1377
  239. package/src/filiale/bayan/android/SafecheckOrderV.vue +2922 -2866
  240. package/src/filiale/bayan/android/SafecheckUserInfo.vue +872 -868
  241. package/src/filiale/bayan/pc/PlanManage.vue +962 -962
  242. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -2807
  243. package/src/filiale/qianneng/android/SafecheckOrderV.vue +2785 -2785
  244. package/src/filiale/shanxian/android/AddPlanItem.vue +447 -447
  245. package/src/filiale/shanxian/android/SafecheckOrderV.vue +2979 -2979
  246. package/src/filiale/shanxian/pc/checkUserList.vue +700 -700
  247. package/src/filiale/siyang/android/AddPlanItem.vue +450 -450
  248. package/src/filiale/siyang/pc/CheckSearchUser.vue +1035 -1035
  249. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1060
  250. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +735 -735
  251. package/src/filiale/weinan/pc/CheckDetail.vue +278 -278
  252. package/src/filiale/weinan/pc/checkUserList.vue +712 -712
  253. package/src/filiale/xilan/android/AddPlanItem.vue +461 -461
  254. package/src/filiale/xilan/android/CurrentCreate.vue +1067 -1067
  255. package/src/filiale/xilan/android.js +11 -11
  256. package/src/main.js +33 -33
  257. package/src/plugins/LoadData.js +10 -10
  258. package/src/plugins/LoadParams.js +24 -24
  259. package/src/safecheck-android.js +307 -307
  260. package/src/stores/wxconfig.js +10 -10
  261. package/src/utils/getNowDate.js +33 -33
  262. package/test/e2e/custom-assertions/elementCount.js +26 -26
  263. package/test/e2e/nightwatch.conf.js +40 -40
  264. package/test/e2e/runner.js +30 -30
  265. package/test/e2e/specs/test.js +13 -13
  266. package/test/unit/.eslintrc +5 -5
  267. package/test/unit/TestUtil.js +62 -62
  268. package/test/unit/context.html +20 -20
  269. package/test/unit/index.js +13 -13
@@ -1,962 +1,962 @@
1
- <template>
2
- <work-busy :is-busy="isSend"></work-busy>
3
- <div class="binary" style="background-color: #e8f4ff">
4
- <!--左侧安检计划列表******************************************************-->
5
- <div class="binary-left flex flex-column" style="width: 16%">
6
- <div style="height: 9%">
7
- <div class="row auto">
8
- <img style="width: 20px;margin: 0 5px" src="../../../../static/images/searchhover.png" @click="showUserCondition()"/>
9
- <v-select :width="'80%'"
10
- class="select select_list"
11
- :search="false"
12
- :value.sync="currentorder"
13
- v-model="currentorder"
14
- @change="loadCheckPlan"
15
- :options='opt'
16
- close-on-select value-single >
17
- </v-select>
18
- </div>
19
- <div class="row auto safe-div-p"><!--<span style="margin-right: 5px" @click="refresh()" style="cursor:default">测试</span>--><span style="margin-right: 5px" @click="delCheckPlan()" style="cursor:default">删除</span> <span @click="sendCheckPlan()" style="cursor:default">下发</span></div>
20
- </div>
21
- <div class="leftplan-center safe_plan_list">
22
- <div class="row safe-leftplan safe_list_li" :class="{'safe-selectplan':selectPlan.id==row.id}" v-for="row in checkplan.list.data" @click="selectPlanChange(row)">
23
- <table style="width:100%;table-layout:fixed" >
24
- <tr class="safe-planfont">
25
- <td rowspan="6"><input type="checkbox" style="pointer-events:auto" v-show="row.plan_count==0 || row.f_issued=='未下发'" onClick="event.cancelBubble = true" :checked="checkplan.check.isChecked(row.f_check_item_id)" @change="checkplan.check.setCheckes(row.id)"/></td>
26
- <td colspan="6" class="safe_p">{{row.f_plan_name}}</td>
27
- <td colspan="2" style="text-align: center"><img width="20px" style="pointer-events:auto" onClick="event.cancelBubble = true" @click="showUpPlans(row)" src="../../../../static/images/edit.png"/></td>
28
- </tr>
29
- <tr class="safe-bodyfont" style="color:#4792de">
30
- <td colspan="6">{{row.f_issued}}</td>
31
- <td colspan="2" class="safe_p">{{row.f_checker?row.f_checker:'共享'}}</td>
32
- </tr>
33
- <tr class="safe-bodyfont">
34
- <td colspan="4">{{row.f_plan_year}}-{{row.f_plan_month}}</td>
35
- <td colspan="2">总 :</td>
36
- <td colspan="2">{{row.plan_count}}</td>
37
- </tr>
38
- <tr class="safe-bodyfont">
39
- <td colspan="2">未检 :</td>
40
- <td colspan="2">{{row.unchecked}}</td>
41
- <td colspan="2">已检 :</td>
42
- <td colspan="2">{{row.checked}}</td>
43
- </tr>
44
- <tr class="safe-bodyfont" v-if="row.f_create_time">
45
- <td colspan="3">创建时间 :</td>
46
- <td colspan="5" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" :title="row.f_create_time">{{row.f_create_time}}</td>
47
- </tr>
48
- <tr class="safe-bodyfont" v-if="row.f_safecheck_type">
49
- <td colspan="3">安检类型 :</td>
50
- <td colspan="5" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" :title="row.f_safecheck_type">{{row.f_safecheck_type}}</td>
51
- </tr>
52
- </table>
53
- </div>
54
- </div>
55
- <div style="height: 11%">
56
- <div class="row auto leftplan-center" style="padding: 8px">
57
- <div class="col-sm-6" style="">
58
- <span>共{{checkplan.list.count}}条</span>
59
- </div>
60
- <div class="col-sm-6" style="text-align: end">
61
- <span @click="loadMore('checkplan')"><img src="../../../../static/images/doubledown.png"/>&ensp;更多</span>
62
- </div>
63
- </div>
64
- <div class="row auto" style="padding: 10px;text-align: center">
65
- <img src="../../../../static/images/addnew.png" @click="showcCreatePlan()"/>
66
- </div>
67
- </div>
68
- </div>
69
- <!--右侧列表**************************************************************************-->
70
- <div class="binary-right" style="width: 84%;overflow: auto">
71
- <div style="height: 5%">
72
- <div class="col-sm-4">
73
- <label class="font_normal_body">公&emsp;&emsp;司</label>
74
- <right-tree-safe :islist="false" :width="'60%'" @re-res="getRes"></right-tree-safe>
75
- </div>
76
- </div>
77
- <div style="height: 95%">
78
- <div style="height: 50%" class="leftplan-center">
79
- <check-plan-list :selectplan="selectPlan" :userlogin="userlogin" v-ref:item></check-plan-list>
80
- </div>
81
- <div style="height: 50%">
82
- <check-user-list :selectplan="selectPlan" :userlogin="userlogin" v-ref:user></check-user-list>
83
- </div>
84
- </div>
85
- </div>
86
- <modal :show.sync="showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
87
- <div slot="modal-header" class="modal-header">
88
- <h4 class="modal-title">
89
- 计划查询条件
90
- </h4>
91
- </div>
92
- <div slot="modal-body" class="modal-body">
93
- <div class="row">
94
- <div class="form-group col-sm-4" >
95
- <label class="font_normal_body">计划名称:</label>
96
- <input type="text" class="input_search" v-model="planCondition.f_plan_name" @change="setProperty('checkplan','f_plan_name',planCondition.f_plan_name)"
97
- style="width: 60%" placeholder="请选择" />
98
- </div>
99
- <div class="form-group col-sm-4" >
100
- <label class="font_normal_body">计划年份:</label>
101
- <v-select
102
- class="select select_list"
103
- :value.sync="planCondition.f_plan_year"
104
- v-model="planCondition.f_plan_year"
105
- @change="setProperty('checkplan','f_plan_year',planCondition.f_plan_year)"
106
- :search="false"
107
- :options='getConList("yearList")'
108
- placeholder='请选择'
109
- close-on-select
110
- value-single
111
- >
112
- </v-select>
113
- </div>
114
- <div class="form-group col-sm-4" >
115
- <label class="font_normal_body">计划月份:</label>
116
- <v-select
117
- class="select select_list"
118
- :value.sync="planCondition.f_plan_month"
119
- v-model="planCondition.f_plan_month"
120
- @change="setProperty('checkplan','f_plan_month',planCondition.f_plan_month)"
121
- :search="false"
122
- :options='getConList("monthList")'
123
- placeholder='请选择'
124
- close-on-select
125
- value-single>
126
- </v-select>
127
- </div>
128
- <div class="form-group col-sm-4" >
129
- <label class="font_normal_body">是否共享:</label>
130
- <v-select
131
- class="select select_list"
132
- :value.sync="planCondition.isShare"
133
- v-model="planCondition.isShare"
134
- @change="setProperty('checkplan','isAndNot',planCondition.isShare)"
135
- :options='getConList("conIsAndNot")'
136
- :search="false"
137
- placeholder='请选择'
138
- close-on-select
139
- value-single
140
- >
141
- </v-select>
142
- </div>
143
- <div class="form-group col-sm-4" >
144
- <label class="font_normal_body">是否下发:</label>
145
- <v-select
146
- class="select select_list"
147
- :value.sync="planCondition.issued"
148
- v-model="planCondition.issued"
149
- :options='getConList("isAndNot")'
150
- @change="setProperty('checkplan','issude',planCondition.issued)"
151
- placeholder='请选择'
152
- :search="false"
153
- close-on-select
154
- value-single
155
- >
156
- </v-select>
157
- </div>
158
- <div class="form-group col-sm-4" >
159
- <label class="font_normal_body">安&ensp;检&ensp;员:</label>
160
- <v-select
161
- class="select select_list"
162
- :value.sync="planCondition.f_checker"
163
- v-model="planCondition.f_checker"
164
- @change="setProperty('checkplan','checkerid',planCondition.f_checker.id)"
165
- :options='getConList("checker")'
166
- placeholder='请选择'
167
- close-on-select
168
- value-single
169
- >
170
- </v-select>
171
- </div>
172
-
173
- <div class="form-group col-sm-4" >
174
- <label class="font_normal_body">安检类型:</label>
175
- <v-select
176
- class="select select_list"
177
- :value.sync="planCondition.f_safecheck_type"
178
- v-model="planCondition.f_safecheck_type"
179
- @change="setProperty('checkplan','safechecktype',planCondition.f_safecheck_type)"
180
- :options='getConList("safechecktype")'
181
- placeholder='请选择'
182
- :search="false"
183
- close-on-select
184
- value-single
185
- >
186
- </v-select>
187
- </div>
188
- <div class="form-group col-sm-4" >
189
- <label class="font_normal_body">创&ensp;建&ensp;人:</label>
190
- <input type="text" class="input_search" v-model="planCondition.f_create_operator" @change="setProperty('checkplan','f_create_operator',planCondition.f_create_operator)"
191
- style="width: 60%" placeholder="创建人" />
192
- </div>
193
- </div>
194
- </div>
195
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
196
- <button class="button_search" @click="loadCheckPlan" style="margin-right: 15px">查询</button>
197
- <button class="button_search" @click="cancel">取消</button>
198
- </div>
199
- </modal>
200
- <modal :show.sync="showCreatePlan" v-ref:modal1 :width="'50%'" :backdrop="false">
201
- <div slot="modal-header" class="modal-header">
202
- <h4 class="modal-title">
203
- 新建计划
204
- </h4>
205
- </div>
206
- <div slot="modal-body" class="modal-body">
207
- <div class="row">
208
- <div class="form-group col-sm-4" >
209
- <label class="font_normal_body">计划名称:</label>
210
- <input type="text" class="input_search" v-model="createPlan.f_plan_name"
211
- style="width: 60%" placeholder="请选择" />
212
- </div>
213
- <div class="form-group col-sm-4" >
214
- <label class="font_normal_body">计划年份:</label>
215
- <v-select
216
- class="select select_list"
217
- :value.sync="createPlan.f_plan_year"
218
- v-model="createPlan.f_plan_year"
219
- :search="false"
220
- :options='yearList'
221
- placeholder='请选择'
222
- close-on-select
223
- value-single
224
- >
225
- </v-select>
226
- </div>
227
- <div class="form-group col-sm-4" >
228
- <label class="font_normal_body">计划月份:</label>
229
- <v-select
230
- class="select select_list"
231
- :value.sync="createPlan.f_plan_month"
232
- v-model="createPlan.f_plan_month"
233
- :search="false"
234
- :options='monthList'
235
- placeholder='请选择'
236
- close-on-select
237
- value-single>
238
- </v-select>
239
- </div>
240
- <div class="form-group col-sm-4" >
241
- <label class="font_normal_body">计划开始:</label>
242
- <datepicker
243
- placeholder='请选择'
244
- style="width:60%"
245
- :disabled-days-of-week="[]"
246
- :format="'yyyy-MM-dd'"
247
- :show-rest-button="reset"
248
- :value.sync="createPlan.f_start_time"
249
- v-model="createPlan.f_start_time">
250
- </datepicker>
251
- </div>
252
- <div class="form-group col-sm-4" >
253
- <label class="font_normal_body">计划结束:</label>
254
- <datepicker
255
- placeholder='请选择'
256
- style="width:60%"
257
- :disabled-days-of-week="[]"
258
- :format="'yyyy-MM-dd'"
259
- :show-rest-button="reset"
260
- :value.sync="createPlan.f_end_time"
261
- v-model="createPlan.f_end_time">
262
- </datepicker>
263
- </div>
264
- <div class="form-group col-sm-4" >
265
- <label class="font_normal_body">是否共享:</label>
266
- <v-select
267
- class="select select_list"
268
- :search="false"
269
- :value.sync="createPlan.isShare"
270
- v-model="createPlan.isShare"
271
- :options='isAndNot'
272
- placeholder='请选择'
273
- close-on-select
274
- value-single
275
- >
276
- </v-select>
277
- </div>
278
- <div class="form-group col-sm-4">
279
- <label class=" font_normal_body">选择部门</label>
280
- <input style="width: 60%" type="text" v-show="false" v-model="createPlan.f_outlets">
281
- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点">
282
-
283
- </right-tree>
284
- </div>
285
- <div class="form-group col-sm-4" v-show="createPlan.isShare=='是'">
286
- <label class=" font_normal_body">选择班组</label>
287
- <v-select
288
- class="select select_list"
289
- :value.sync="createPlan.f_class"
290
- v-model="createPlan.f_class"
291
- :options='classes'
292
- placeholder='请选择'
293
- close-on-select
294
- value-single
295
- >
296
- </v-select>
297
- </div>
298
- <div class="form-group col-sm-4" v-show="createPlan.isShare=='否'">
299
- <label class="font_normal_body">安&ensp;检&ensp;员:</label>
300
- <v-select
301
- class="select select_list"
302
- :value.sync="createPlan.checker"
303
- v-model="createPlan.checker"
304
- :options='checker'
305
- placeholder='请选择'
306
- close-on-select
307
- value-single
308
- >
309
- </v-select>
310
- </div>
311
-
312
- <div class="form-group col-sm-4" >
313
- <label class="font_normal_body">安检类型:</label>
314
- <v-select
315
- class="select select_list"
316
- :value.sync="createPlan.f_safecheck_type"
317
- v-model="createPlan.f_safecheck_type"
318
- :search="false"
319
- :options='ntoway'
320
- placeholder='请选择'
321
- close-on-select
322
- value-single
323
- >
324
- </v-select>
325
- </div>
326
- </div>
327
- </div>
328
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
329
- <button class="button_search" style="margin-right: 15px" @click="addNewPlan()">创建计划</button>
330
- <button class="button_search" @click="cancel">取消</button>
331
- </div>
332
- </modal>
333
- <modal :show.sync="showUpPlan" v-ref:modal2 :backdrop="false">
334
- <div slot="modal-header" class="modal-header">
335
- <h4 class="modal-title">
336
- 修改计划
337
- </h4>
338
- </div>
339
- <div slot="modal-body" class="modal-body">
340
- <div class="row">
341
- <div class="form-group col-sm-4" >
342
- <label class="font_normal_body">计划名称:</label>
343
- <input type="text" class="input_search" v-model="upCheckPlan.f_plan_name"
344
- style="width: 60%" />
345
- </div>
346
- <div class="form-group col-sm-4" >
347
- <label class="font_normal_body">计划年份:</label>
348
- <v-select
349
- class="select select_list"
350
- :value.sync="upCheckPlan.f_plan_year"
351
- v-model="upCheckPlan.f_plan_year"
352
- :search="false"
353
- :value="upCheckPlan.f_plan_year"
354
- :options='yearList'
355
-
356
- close-on-select
357
- value-single>
358
-
359
-
360
- </v-select>
361
- <!-- <datepicker
362
- placeholder='请选择'
363
- style="width:60%"
364
- :disabled-days-of-week="[]"
365
- :format="'yyyy'"
366
- :show-rest-button="reset"
367
- :value.sync="upCheckPlan.f_plan_year"
368
- v-model="upCheckPlan.f_plan_year">
369
- </datepicker>-->
370
- </div>
371
- <div class="form-group col-sm-4" >
372
- <label class="font_normal_body">计划月份:</label>
373
- <v-select
374
- class="select select_list"
375
- :value.sync="upCheckPlan.f_plan_month"
376
- v-model="upCheckPlan.f_plan_month"
377
-
378
- :options='monthList'
379
- close-on-select
380
- value-single>
381
- </v-select>
382
- </div>
383
- <div class="form-group col-sm-4" >
384
- <label class="font_normal_body">计划开始:</label>
385
- <datepicker
386
- placeholder='请选择'
387
- style="width:60%"
388
- :disabled-days-of-week="[]"
389
- :format="'yyyy-MM-dd'"
390
- :show-rest-button="reset"
391
- :value.sync="upCheckPlan.f_start_time"
392
- v-model="upCheckPlan.f_start_time">
393
- </datepicker>
394
- </div>
395
- <div class="form-group col-sm-4" >
396
- <label class="font_normal_body">计划结束:</label>
397
- <datepicker
398
- placeholder='请选择'
399
- style="width:60%"
400
- :disabled-days-of-week="[]"
401
- :format="'yyyy-MM-dd'"
402
- :show-rest-button="reset"
403
- :value.sync="upCheckPlan.f_end_time"
404
- v-model="upCheckPlan.f_end_time">
405
- </datepicker>
406
- </div>
407
- <div class="form-group col-sm-4" >
408
- <label class="font_normal_body">是否共享:</label>
409
- <v-select
410
- class="select select_list"
411
- :search="false"
412
- :value.sync="upCheckPlan.isShare"
413
- v-model="upCheckPlan.isShare"
414
- :options='isAndNot'
415
- placeholder='请选择'
416
- close-on-select
417
- value-single
418
- >
419
- </v-select>
420
- </div>
421
- <div class="form-group col-sm-4" v-show="upCheckPlan.isShare=='否'">
422
- <label class="font_normal_body">安&ensp;检&ensp;员:</label>
423
- <v-select
424
- class="select select_list"
425
- :value.sync="upCheckPlan.checker"
426
- v-model="upCheckPlan.checker"
427
- :options='checker'
428
- close-on-select
429
- value-single
430
- >
431
- </v-select>
432
- </div>
433
-
434
- <div class="form-group col-sm-4">
435
- <label class="font_normal_body">安检类型:</label>
436
- <v-select
437
- class="select select_list"
438
- :value.sync="upCheckPlan.f_safecheck_type"
439
- v-model="upCheckPlan.f_safecheck_type"
440
- :options='ntoway'
441
- close-on-select
442
- value-single
443
- >
444
- </v-select>
445
- </div>
446
- </div>
447
- </div>
448
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
449
- <button class="button_search" style="margin-right: 15px" @click="upPlan()">保存修改</button>
450
- <button class="button_search" @click="cancel">取消</button>
451
- </div>
452
- </modal>
453
- </div>
454
- </template>
455
-
456
- <script>
457
- import {SearchList,HttpResetClass, PagedList} from "vue-client";
458
- import * as Util from "../../Util";
459
- import Vue from "vue";
460
-
461
- export default {
462
- name: "PlanManage",
463
- title: '计划管理',
464
- data() {
465
- return {
466
- classes:[],
467
- source:
468
- 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
469
- 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
470
- userid: this.$login.f.id,
471
- a:'1',
472
- opt:[{label:"按时间降序",value:"按时间降序"},{label:"按时间升序",value:"按时间升序"}],
473
- currentorder:'按时间降序',
474
- checkplan : new SearchList(true),
475
- selectPlan:{id:''},
476
- upCheckPlan:{
477
- f_plan_name:'',
478
- f_end_time:'',
479
- f_start_time:'',
480
- f_safecheck_type:'',
481
- f_plan_year:'',
482
- f_plan_month:'',
483
- f_checker_id:'',
484
- isShare:'',
485
- f_checker:'',
486
- checker:{}
487
- },
488
- isSend:false,
489
- createPlan:{
490
- f_outlets:'',
491
- f_class:'',
492
- f_end_time:'',
493
- f_start_time:'',
494
- f_plan_name:'',
495
- f_plan_year:'',
496
- f_plan_month:'',
497
- isShare:'否',
498
- f_issued:'否',
499
- f_checker_id:null,
500
- checker:{},
501
- f_checker:null,
502
- f_safecheck_type:'',
503
- },
504
- planCondition:{},
505
- showCondtion:false,
506
- showCreatePlan:false,
507
- showUpPlan:false,
508
- isAndNot:[{label:'是',value:'是'},{label:'否',value:'否'}],
509
- conIsAndNot:[{label:'是',value:'is null'},{label:'否',value:'is not null'}],
510
- yearList:[{label:2020,value:2020},{label:2021,value:2021},{label:2022,value:2022},{label:2023,value:2023},{label:2024,value:2024},{label:2025,value:2025},{label:2026,value:2026},{label:2027,value:2027},{label:2028,value:2028},{label:2029,value:2029},{label:2030,value:2030}],
511
- monthList:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9},{label:"10",value:10},{label:"11",value:11},{label:"12",value:12}],
512
- safechecktype:[{label:'年度普检',value:'年度普检'}],
513
- checker:[],
514
- checkertCon:[],
515
- userlogin:{
516
- id:this.$login.f.id,
517
- name:this.$login.f.name,
518
- orgid:this.$login.f.orgid,
519
- orgstr:this.$login.f.orgs,
520
- }
521
- //需要测试直接把下面放开即可
522
- /*userlogin:{
523
- id:'141701',
524
- name:'hwq',
525
- orgid:'35526',
526
- orgstr:'西华县天然气有限公司'
527
- }*/
528
- }
529
- },
530
- async ready(){
531
- await this.loadpage()
532
- },
533
- computed: {
534
- ntoway() {
535
- /*/!* return AppData.getParam('安检类型')*!/*/
536
- return this.$appdata.getParam('安检类型')
537
- }
538
- },
539
- methods:{
540
- // 选中部门
541
- reres(val){
542
- if(val.res == undefined || val.res[0] == undefined || val.res[0] == '' || val.res.length > 1){
543
- return
544
- }
545
- this.createPlan.f_outlets = val.res[0]
546
- if (this.createPlan.isShare=='否'){
547
- this.checker = []
548
- let vali = {
549
- source: `this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$)!=-1)`,
550
- userid: `${val.resids[0]}`
551
- }
552
- let http = new HttpResetClass()
553
- http.load('POST', '/rs/search', {data: vali}, {resolveMsg: null, rejectMsg: null}).then((res) => {
554
- res.data.forEach((item) => {
555
- if (item.state == '在职'){
556
- this.checker.push({label:item.name,value:item})
557
- }
558
- })
559
- })
560
- }else {
561
- this.classes = this.$appdata.getParam(`工单-` + val.res[0]) ? [{
562
- label: '请选择',
563
- value: ''
564
- }, ...this.$appdata.getParam(`工单-` + val.res[0])] : [{label: '请选择', value: ''}]
565
- }
566
- },
567
- /* ntoway() {
568
- /!* return AppData.getParam('安检类型')*!/
569
- return Vue.$appdata.getParam('安检类型')
570
- },*/
571
- async loadpage(){
572
- //await this.checkplan.searchList("/rs/sql/预约计划下发", {},{groupitem:"",f_filialeids:"('"+this.userlogin.orgid+"')",orderitem:"f_create_time desc"})
573
- await this.loadCheckPlan()
574
- // await this.searchChecker(this.userlogin.id)
575
- },
576
- getRes(obj) {
577
- console.log("----obj"+JSON.stringify(obj.resids))
578
- console.log(obj)
579
- if(obj.resids.length>0 && obj.resids[0]!=this.userlogin.orgid && obj.resids[0]){
580
- this.userlogin.orgid=obj.resids[0]
581
- this.userlogin.orgstr=obj.res[0]
582
- if(this.$refs.item && this.$refs.user){
583
- this.loadpage()
584
- this.selectPlan={id:""}
585
- this.$refs.item.model.rows=[]
586
- this.$refs.user.model.rows=[]
587
- this.$refs.user.loadpage()
588
- }
589
- }
590
- },
591
- getConList(field){
592
- return [{label:'全部',value:''}, ...this[field]]
593
- },
594
- selectPlanChange(plan){
595
- this.selectPlan=plan
596
- //this.upCheckPlan=plan
597
- },
598
- showUserCondition(){
599
- this.showCondtion=true
600
- },
601
- showcCreatePlan(){
602
- this.showCreatePlan=true
603
- },
604
- cancel(){
605
- this.showCondtion=false
606
- this.showCreatePlan=false
607
- this.showUpPlan=false
608
- },
609
- //新建计划
610
- async addNewPlan() {
611
- if(!this.validationCreatePlan()){
612
- return
613
- }
614
- this.isSend=true
615
- let res=await new HttpResetClass().load("POST","/rs/sql/getCheckplan", {data: {condition:"f_plan_name='"+this.createPlan.f_plan_name+"'",sortfield:'f_create_time desc'}})
616
- console.log("结果-"+res.data.length)
617
- if(res.data.length>0){
618
- Vue.showMessage("计划名称不能重复!")
619
- this.isSend=false
620
- return
621
- }
622
- if(this.createPlan.isShare=="是"){
623
- this.createPlan.f_checker_id=null
624
- this.createPlan.f_checker=null
625
- }else{
626
- this.createPlan.f_checker_id=this.createPlan.checker.id
627
- this.createPlan.f_checker=this.createPlan.checker.name
628
- this.createPlan.f_outlets=this.createPlan.f_outlets
629
- }
630
- console.log("this.createPlan.f_checker:"+this.createPlan.f_checker)
631
- this.createPlan.f_plan_type='预约计划'
632
- this.createPlan.f_subcompany=this.userlogin.orgstr
633
- this.createPlan.f_filialeid=this.userlogin.orgid
634
- this.createPlan.f_create_operator=this.userlogin.name
635
- this.createPlan.f_create_time=Util.toStandardTimeString()
636
- await new HttpResetClass().load('POST',"/rs/logic/createCheckPlan", {"data": this.createPlan},{resolveMsg : '新建计划成功!', rejectMsg : '新建计划失败!'})
637
- //await this.loadCheckPlan('',()=>{})
638
- this.createPlan={
639
- f_plan_name:'',
640
- f_plan_year:'',
641
- f_plan_month:'',
642
- f_class:'',
643
- f_outlets:'',
644
- isShare:'否',
645
- f_issued:'否',
646
- f_checker_id:null,
647
- checker:{},
648
- f_checker:null,
649
- f_safecheck_type:'',
650
- f_create_operator:''
651
- }
652
- await this.loadCheckPlan()
653
- this.isSend=false
654
-
655
- },
656
- validationCreatePlan(){
657
- if(!this.createPlan.f_plan_name){
658
- Vue.showMessage("请输入安检计划名称!")
659
- return false
660
- }
661
- if(!this.createPlan.f_plan_year){
662
- Vue.showMessage("请选择安检年份!")
663
- return false
664
- }
665
- if(!this.createPlan.f_start_time){
666
- Vue.showMessage("请选择计划开始时间!")
667
- return false
668
- }
669
- if(!this.createPlan.f_end_time){
670
- Vue.showMessage("请选择计划结束时间!")
671
- return false
672
- }
673
- if( this.createPlan.f_start_time > this.createPlan.f_end_time){
674
- Vue.showMessage("计划结束时间不能早于计划开始时间!")
675
- return false
676
- }
677
- if(!this.createPlan.f_plan_month){
678
- Vue.showMessage("请选择安检月份!")
679
- return false
680
- }
681
- if(this.createPlan.isShare=="否"){
682
- if(JSON.stringify(this.createPlan.checker)=='{}'){
683
- Vue.showMessage("请选择安检人员!")
684
- return false
685
- }
686
- }else{
687
- this.createPlan.f_checker=''
688
- }
689
- if(!this.createPlan.f_safecheck_type){
690
- Vue.showMessage("请选择安检类型!")
691
- return false
692
- }
693
- return true
694
- },
695
- //查询安检员selectChanged
696
- async searchChecker(id){
697
- let res=await new HttpResetClass().load('POST', '/rs/search', {
698
- source: `root.getResourceById($${this.userlogin.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)`,
699
- userid: id
700
- }, {resolveMsg: null, rejectMsg: null})
701
- this.checker=[]
702
- res.data.forEach((resRow) => {
703
- this.checker.push({label:resRow.name,value:resRow})
704
- })
705
- },
706
- //设置属性值
707
- setProperty(modulename, property, value) {
708
- console.log(modulename+"新添--"+property+"--"+value)
709
- if(value=='全部'){
710
- this[modulename].search.setField(property, '')
711
- }else{
712
- this[modulename].search.setField(property, value)
713
- }
714
- },
715
- //按条件查询所有安检计划
716
- async loadCheckPlan() {
717
- this.isSend=true
718
- this.checkplan.check.checkes=[]
719
- let fieldValue=''
720
- switch(this.currentorder){
721
- case "按时间降序":
722
- fieldValue='f_create_time desc'
723
- break
724
- case "按时间升序":
725
- fieldValue='f_create_time'
726
- break
727
- }
728
- console.log("--------fieldValue"+fieldValue)
729
- this.cancel()
730
- await this.checkplan.searchList("/rs/sql/预约计划下发",
731
- {"f_plan_name": "f_plan_name like '%{}%'",
732
- "f_plan_year":"f_plan_year={}",
733
- "f_plan_month":"f_plan_month={}",
734
- "checkerid":"f_checker_id='{}'",
735
- "isAndNot":"f_checker {}",
736
- "safechecktype":"f_safecheck_type='{}'",
737
- "issude":"f_issued = '{}'",
738
- "f_create_operator": "f_create_operator like '%{}%'"
739
- },
740
- {orderitem:fieldValue,
741
- f_filialeids:"('"+this.userlogin.orgid+"')",
742
- groupitem:""
743
- }
744
- )
745
-
746
- this.isSend=false
747
- },
748
- //加载更多数据
749
- async loadMore(modelname) {
750
- this.isSend=true
751
- await this[modelname].list.loadMore()
752
- this.isSend=false
753
- },
754
- showUpPlans(row){
755
- this.upCheckPlan.id=row.id
756
- this.upCheckPlan.f_safecheck_type=row.f_safecheck_type
757
- this.upCheckPlan.f_plan_name=row.f_plan_name
758
- this.upCheckPlan.f_plan_year=row.f_plan_year
759
- this.upCheckPlan.f_plan_month=row.f_plan_month
760
- this.upCheckPlan.f_end_time=row.f_end_time
761
- this.upCheckPlan.f_start_time=row.f_start_time
762
- this.upCheckPlan.f_checker_id=row.f_checker_id?row.f_checker_id:null
763
- this.upCheckPlan.f_checker=row.f_checker?row.f_checker:null
764
- this.upCheckPlan.isShare=row.f_checker_id?'否':'是'
765
- this.upCheckPlan.f_issued=row.f_issued
766
- this.upCheckPlan.checker={id:row.f_checker_id,name:row.f_checker}
767
- this.showUpPlan=true
768
- },
769
- async upPlan(){
770
- if(this.upCheckPlan.f_issued=='已下发'){
771
- this.$showMessage("该计划已下发,无法进行修改!")
772
- return
773
- }
774
- if(!this.upCheckPlan.f_plan_name){
775
- Vue.showMessage("请输入安检计划名称!")
776
- return false
777
- }
778
- if(!this.upCheckPlan.f_plan_year){
779
- Vue.showMessage("请选择安检年份!")
780
- return false
781
- }
782
- if(!this.upCheckPlan.f_plan_month){
783
- Vue.showMessage("请选择安检月份!")
784
- return false
785
- }
786
- if(!this.upCheckPlan.f_end_time){
787
- Vue.showMessage("请选择安检结束时间!")
788
- return false
789
- }
790
- if(!this.upCheckPlan.f_start_time){
791
- Vue.showMessage("请选择安检起始时间!")
792
- return false
793
- }
794
- console.log(this.upCheckPlan)
795
-
796
- if(this.upCheckPlan.isShare=="是"){
797
- this.upCheckPlan.f_checker_id=null
798
- this.upCheckPlan.f_checker=null
799
- }else{
800
- this.upCheckPlan.f_checker_id=this.upCheckPlan.checker.id
801
- this.upCheckPlan.f_checker=this.upCheckPlan.checker.name
802
- }
803
- this.isSend=true
804
- let res=await new HttpResetClass().load("POST", "/rs/logic/updateCheckPlan", {
805
- data:{
806
- f_end_time:this.upCheckPlan.f_end_time,
807
- f_start_time:this.upCheckPlan.f_start_time,
808
- f_checker:this.upCheckPlan.f_checker,
809
- f_safecheck_type:this.upCheckPlan.f_safecheck_type,
810
- f_checker_id:this.upCheckPlan.f_checker_id,
811
- f_plan_name:this.upCheckPlan.f_plan_name,
812
- f_plan_year:this.upCheckPlan.f_plan_year,
813
- f_plan_month:this.upCheckPlan.f_plan_month,
814
- f_plan_id:this.upCheckPlan.id
815
- }
816
- }, {resolveMsg: null, rejectMsg: null})
817
- if(res.data.code==200){
818
- this.$showMessage("修改成功!")
819
- this.cancel()
820
- await this.loadCheckPlan()
821
- }else{
822
- this.$showMessage("修改失败!")
823
- }
824
- this.isSend=false
825
- },
826
- //下发安检计划
827
- async sendCheckPlan(f){
828
- if(this.checkplan.check.checkes.length<1){
829
- this.$showMessage("请选择要下发的安检计划")
830
- return
831
- }
832
- this.isSend=true
833
- let res=await new HttpResetClass().load("POST", "/rs/logic/NewBespeakCheckPlan", {
834
- data:{
835
- f_issued:'是',
836
- f_issue_time:Util.toStandardTimeString(),
837
- f_send_operator:this.userlogin.name,
838
- param:this.checkplan.check.checkes,
839
- }
840
- }, {resolveMsg: null, rejectMsg: null})
841
- if(res.data.code==200){
842
- //Vue.showMessage("下发成功!其中有"+res.data.repet+"个计划己经是下发状态")
843
- this.$showMessage("下发成功!")
844
- }else{
845
- this.$showMessage("下发失败!")
846
- }
847
- await this.loadCheckPlan()
848
- this.isSend=false
849
- },
850
- //删除安检计划
851
- async delCheckPlan(f){
852
- if(this.checkplan.check.checkes.length<1){
853
- this.$showMessage("请选择要删除的安检计划")
854
- return
855
- }
856
- this.isSend=true
857
- let res=await new HttpResetClass().load("POST", "/rs/logic/deleteCheckPlan", {
858
- data:{
859
- f_operator:this.userlogin.orgstr,//global.login.name,
860
- condition:"",
861
- switchCheckAll:true,
862
- checkAll:false,
863
- param:this.checkplan.check.checkes,
864
- columnName: "f_plan_id"
865
- }
866
- }, {resolveMsg: null, rejectMsg: null})
867
- console.log(JSON.stringify(res))
868
- if(res.data.code==200){
869
- this.$showMessage("删除成功!")
870
- }else{
871
- this.$showMessage("删除失败!")
872
- }
873
- if(this.checkplan.check.checkes.indexOf(this.selectPlan.id)!= -1){
874
- this.selectPlan={id:''}
875
- console.log("包含了清空selectplan")
876
- }
877
- await this.loadCheckPlan()
878
- this.isSend=false
879
- },
880
- async refresh(){
881
- this.$refs.item.$refs.paged.$refs.criteria.search()
882
- this.$refs.user.$refs.paged.$refs.criteria.search()
883
- await this.loadCheckPlan()
884
- },
885
- async refreshPlan(){
886
- this.$refs.item.$refs.paged.$refs.criteria.search()
887
- await this.loadCheckPlan()
888
- }
889
- }
890
- }
891
- </script>
892
-
893
- <style scoped>
894
- .safe-planfont{
895
- font-family: MicrosoftYaHei;
896
- font-size: 15px;
897
- font-weight: normal;
898
- font-stretch: normal;
899
- letter-spacing: 2px;
900
- color: #333333;
901
- line-height: 25px;
902
- }
903
- .safe-bodyfont{
904
- font-family: MicrosoftYaHei;
905
- font-size: 14px;
906
- font-weight: normal;
907
- font-stretch: normal;
908
- letter-spacing: 0px;
909
- color: #999999;
910
- line-height: 30px;
911
- }
912
- .safe-leftplan{
913
- height:auto;
914
- border-bottom:1px solid #ececec;
915
- padding: 10px 5px
916
- }
917
- .leftplan-center{
918
- border-top:1px solid #ececec;
919
- border-bottom:1px solid #ececec;
920
- }
921
- .safe_p{
922
- white-space: nowrap;
923
- overflow: hidden;
924
- text-overflow: ellipsis;
925
- }
926
- .safe-div-p{
927
- color: #4792de;
928
- text-align: end;
929
- padding: 8px 15px;
930
- }
931
- .safe_list_li:hover{
932
- background-color: rgb(245,246,247);
933
- }
934
- .safe-selectplan{
935
- pointer-events: none;
936
- background-color: rgb(216,234,251);
937
- }
938
- .safe_plan_list{
939
- height: 80%;
940
- overflow: scroll;
941
- }
942
-
943
- </style>
944
- <style>
945
- .safe_plan_list::-webkit-scrollbar{
946
- background-color: #F5F5F5;
947
- }
948
-
949
- /*定义滚动条轨道 内阴影+圆角*/
950
- .safe_plan_list::-webkit-scrollbar-track{
951
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
952
- border-radius: 10px;
953
- background-color: #F5F5F5;
954
- }
955
-
956
- /*定义滑块 内阴影+圆角*/
957
- .safe_plan_list::-webkit-scrollbar-thumb{
958
- border-radius: 10px;
959
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
960
- background-color: #F5F5F5;
961
- }
962
- </style>
1
+ <template>
2
+ <work-busy :is-busy="isSend"></work-busy>
3
+ <div class="binary" style="background-color: #e8f4ff">
4
+ <!--左侧安检计划列表******************************************************-->
5
+ <div class="binary-left flex flex-column" style="width: 16%">
6
+ <div style="height: 9%">
7
+ <div class="row auto">
8
+ <img style="width: 20px;margin: 0 5px" src="../../../../static/images/searchhover.png" @click="showUserCondition()"/>
9
+ <v-select :width="'80%'"
10
+ class="select select_list"
11
+ :search="false"
12
+ :value.sync="currentorder"
13
+ v-model="currentorder"
14
+ @change="loadCheckPlan"
15
+ :options='opt'
16
+ close-on-select value-single >
17
+ </v-select>
18
+ </div>
19
+ <div class="row auto safe-div-p"><!--<span style="margin-right: 5px" @click="refresh()" style="cursor:default">测试</span>--><span style="margin-right: 5px" @click="delCheckPlan()" style="cursor:default">删除</span> <span @click="sendCheckPlan()" style="cursor:default">下发</span></div>
20
+ </div>
21
+ <div class="leftplan-center safe_plan_list">
22
+ <div class="row safe-leftplan safe_list_li" :class="{'safe-selectplan':selectPlan.id==row.id}" v-for="row in checkplan.list.data" @click="selectPlanChange(row)">
23
+ <table style="width:100%;table-layout:fixed" >
24
+ <tr class="safe-planfont">
25
+ <td rowspan="6"><input type="checkbox" style="pointer-events:auto" v-show="row.plan_count==0 || row.f_issued=='未下发'" onClick="event.cancelBubble = true" :checked="checkplan.check.isChecked(row.f_check_item_id)" @change="checkplan.check.setCheckes(row.id)"/></td>
26
+ <td colspan="6" class="safe_p">{{row.f_plan_name}}</td>
27
+ <td colspan="2" style="text-align: center"><img width="20px" style="pointer-events:auto" onClick="event.cancelBubble = true" @click="showUpPlans(row)" src="../../../../static/images/edit.png"/></td>
28
+ </tr>
29
+ <tr class="safe-bodyfont" style="color:#4792de">
30
+ <td colspan="6">{{row.f_issued}}</td>
31
+ <td colspan="2" class="safe_p">{{row.f_checker?row.f_checker:'共享'}}</td>
32
+ </tr>
33
+ <tr class="safe-bodyfont">
34
+ <td colspan="4">{{row.f_plan_year}}-{{row.f_plan_month}}</td>
35
+ <td colspan="2">总 :</td>
36
+ <td colspan="2">{{row.plan_count}}</td>
37
+ </tr>
38
+ <tr class="safe-bodyfont">
39
+ <td colspan="2">未检 :</td>
40
+ <td colspan="2">{{row.unchecked}}</td>
41
+ <td colspan="2">已检 :</td>
42
+ <td colspan="2">{{row.checked}}</td>
43
+ </tr>
44
+ <tr class="safe-bodyfont" v-if="row.f_create_time">
45
+ <td colspan="3">创建时间 :</td>
46
+ <td colspan="5" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" :title="row.f_create_time">{{row.f_create_time}}</td>
47
+ </tr>
48
+ <tr class="safe-bodyfont" v-if="row.f_safecheck_type">
49
+ <td colspan="3">安检类型 :</td>
50
+ <td colspan="5" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" :title="row.f_safecheck_type">{{row.f_safecheck_type}}</td>
51
+ </tr>
52
+ </table>
53
+ </div>
54
+ </div>
55
+ <div style="height: 11%">
56
+ <div class="row auto leftplan-center" style="padding: 8px">
57
+ <div class="col-sm-6" style="">
58
+ <span>共{{checkplan.list.count}}条</span>
59
+ </div>
60
+ <div class="col-sm-6" style="text-align: end">
61
+ <span @click="loadMore('checkplan')"><img src="../../../../static/images/doubledown.png"/>&ensp;更多</span>
62
+ </div>
63
+ </div>
64
+ <div class="row auto" style="padding: 10px;text-align: center">
65
+ <img src="../../../../static/images/addnew.png" @click="showcCreatePlan()"/>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ <!--右侧列表**************************************************************************-->
70
+ <div class="binary-right" style="width: 84%;overflow: auto">
71
+ <div style="height: 5%">
72
+ <div class="col-sm-4">
73
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
74
+ <right-tree-safe :islist="false" :width="'60%'" @re-res="getRes"></right-tree-safe>
75
+ </div>
76
+ </div>
77
+ <div style="height: 95%">
78
+ <div style="height: 50%" class="leftplan-center">
79
+ <check-plan-list :selectplan="selectPlan" :userlogin="userlogin" v-ref:item></check-plan-list>
80
+ </div>
81
+ <div style="height: 50%">
82
+ <check-user-list :selectplan="selectPlan" :userlogin="userlogin" v-ref:user></check-user-list>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ <modal :show.sync="showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
87
+ <div slot="modal-header" class="modal-header">
88
+ <h4 class="modal-title">
89
+ 计划查询条件
90
+ </h4>
91
+ </div>
92
+ <div slot="modal-body" class="modal-body">
93
+ <div class="row">
94
+ <div class="form-group col-sm-4" >
95
+ <label class="font_normal_body">计划名称:</label>
96
+ <input type="text" class="input_search" v-model="planCondition.f_plan_name" @change="setProperty('checkplan','f_plan_name',planCondition.f_plan_name)"
97
+ style="width: 60%" placeholder="请选择" />
98
+ </div>
99
+ <div class="form-group col-sm-4" >
100
+ <label class="font_normal_body">计划年份:</label>
101
+ <v-select
102
+ class="select select_list"
103
+ :value.sync="planCondition.f_plan_year"
104
+ v-model="planCondition.f_plan_year"
105
+ @change="setProperty('checkplan','f_plan_year',planCondition.f_plan_year)"
106
+ :search="false"
107
+ :options='getConList("yearList")'
108
+ placeholder='请选择'
109
+ close-on-select
110
+ value-single
111
+ >
112
+ </v-select>
113
+ </div>
114
+ <div class="form-group col-sm-4" >
115
+ <label class="font_normal_body">计划月份:</label>
116
+ <v-select
117
+ class="select select_list"
118
+ :value.sync="planCondition.f_plan_month"
119
+ v-model="planCondition.f_plan_month"
120
+ @change="setProperty('checkplan','f_plan_month',planCondition.f_plan_month)"
121
+ :search="false"
122
+ :options='getConList("monthList")'
123
+ placeholder='请选择'
124
+ close-on-select
125
+ value-single>
126
+ </v-select>
127
+ </div>
128
+ <div class="form-group col-sm-4" >
129
+ <label class="font_normal_body">是否共享:</label>
130
+ <v-select
131
+ class="select select_list"
132
+ :value.sync="planCondition.isShare"
133
+ v-model="planCondition.isShare"
134
+ @change="setProperty('checkplan','isAndNot',planCondition.isShare)"
135
+ :options='getConList("conIsAndNot")'
136
+ :search="false"
137
+ placeholder='请选择'
138
+ close-on-select
139
+ value-single
140
+ >
141
+ </v-select>
142
+ </div>
143
+ <div class="form-group col-sm-4" >
144
+ <label class="font_normal_body">是否下发:</label>
145
+ <v-select
146
+ class="select select_list"
147
+ :value.sync="planCondition.issued"
148
+ v-model="planCondition.issued"
149
+ :options='getConList("isAndNot")'
150
+ @change="setProperty('checkplan','issude',planCondition.issued)"
151
+ placeholder='请选择'
152
+ :search="false"
153
+ close-on-select
154
+ value-single
155
+ >
156
+ </v-select>
157
+ </div>
158
+ <div class="form-group col-sm-4" >
159
+ <label class="font_normal_body">安&ensp;检&ensp;员:</label>
160
+ <v-select
161
+ class="select select_list"
162
+ :value.sync="planCondition.f_checker"
163
+ v-model="planCondition.f_checker"
164
+ @change="setProperty('checkplan','checkerid',planCondition.f_checker.id)"
165
+ :options='getConList("checker")'
166
+ placeholder='请选择'
167
+ close-on-select
168
+ value-single
169
+ >
170
+ </v-select>
171
+ </div>
172
+
173
+ <div class="form-group col-sm-4" >
174
+ <label class="font_normal_body">安检类型:</label>
175
+ <v-select
176
+ class="select select_list"
177
+ :value.sync="planCondition.f_safecheck_type"
178
+ v-model="planCondition.f_safecheck_type"
179
+ @change="setProperty('checkplan','safechecktype',planCondition.f_safecheck_type)"
180
+ :options='getConList("safechecktype")'
181
+ placeholder='请选择'
182
+ :search="false"
183
+ close-on-select
184
+ value-single
185
+ >
186
+ </v-select>
187
+ </div>
188
+ <div class="form-group col-sm-4" >
189
+ <label class="font_normal_body">创&ensp;建&ensp;人:</label>
190
+ <input type="text" class="input_search" v-model="planCondition.f_create_operator" @change="setProperty('checkplan','f_create_operator',planCondition.f_create_operator)"
191
+ style="width: 60%" placeholder="创建人" />
192
+ </div>
193
+ </div>
194
+ </div>
195
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
196
+ <button class="button_search" @click="loadCheckPlan" style="margin-right: 15px">查询</button>
197
+ <button class="button_search" @click="cancel">取消</button>
198
+ </div>
199
+ </modal>
200
+ <modal :show.sync="showCreatePlan" v-ref:modal1 :width="'50%'" :backdrop="false">
201
+ <div slot="modal-header" class="modal-header">
202
+ <h4 class="modal-title">
203
+ 新建计划
204
+ </h4>
205
+ </div>
206
+ <div slot="modal-body" class="modal-body">
207
+ <div class="row">
208
+ <div class="form-group col-sm-4" >
209
+ <label class="font_normal_body">计划名称:</label>
210
+ <input type="text" class="input_search" v-model="createPlan.f_plan_name"
211
+ style="width: 60%" placeholder="请选择" />
212
+ </div>
213
+ <div class="form-group col-sm-4" >
214
+ <label class="font_normal_body">计划年份:</label>
215
+ <v-select
216
+ class="select select_list"
217
+ :value.sync="createPlan.f_plan_year"
218
+ v-model="createPlan.f_plan_year"
219
+ :search="false"
220
+ :options='yearList'
221
+ placeholder='请选择'
222
+ close-on-select
223
+ value-single
224
+ >
225
+ </v-select>
226
+ </div>
227
+ <div class="form-group col-sm-4" >
228
+ <label class="font_normal_body">计划月份:</label>
229
+ <v-select
230
+ class="select select_list"
231
+ :value.sync="createPlan.f_plan_month"
232
+ v-model="createPlan.f_plan_month"
233
+ :search="false"
234
+ :options='monthList'
235
+ placeholder='请选择'
236
+ close-on-select
237
+ value-single>
238
+ </v-select>
239
+ </div>
240
+ <div class="form-group col-sm-4" >
241
+ <label class="font_normal_body">计划开始:</label>
242
+ <datepicker
243
+ placeholder='请选择'
244
+ style="width:60%"
245
+ :disabled-days-of-week="[]"
246
+ :format="'yyyy-MM-dd'"
247
+ :show-rest-button="reset"
248
+ :value.sync="createPlan.f_start_time"
249
+ v-model="createPlan.f_start_time">
250
+ </datepicker>
251
+ </div>
252
+ <div class="form-group col-sm-4" >
253
+ <label class="font_normal_body">计划结束:</label>
254
+ <datepicker
255
+ placeholder='请选择'
256
+ style="width:60%"
257
+ :disabled-days-of-week="[]"
258
+ :format="'yyyy-MM-dd'"
259
+ :show-rest-button="reset"
260
+ :value.sync="createPlan.f_end_time"
261
+ v-model="createPlan.f_end_time">
262
+ </datepicker>
263
+ </div>
264
+ <div class="form-group col-sm-4" >
265
+ <label class="font_normal_body">是否共享:</label>
266
+ <v-select
267
+ class="select select_list"
268
+ :search="false"
269
+ :value.sync="createPlan.isShare"
270
+ v-model="createPlan.isShare"
271
+ :options='isAndNot'
272
+ placeholder='请选择'
273
+ close-on-select
274
+ value-single
275
+ >
276
+ </v-select>
277
+ </div>
278
+ <div class="form-group col-sm-4">
279
+ <label class=" font_normal_body">选择部门</label>
280
+ <input style="width: 60%" type="text" v-show="false" v-model="createPlan.f_outlets">
281
+ <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点">
282
+
283
+ </right-tree>
284
+ </div>
285
+ <div class="form-group col-sm-4" v-show="createPlan.isShare=='是'">
286
+ <label class=" font_normal_body">选择班组</label>
287
+ <v-select
288
+ class="select select_list"
289
+ :value.sync="createPlan.f_class"
290
+ v-model="createPlan.f_class"
291
+ :options='classes'
292
+ placeholder='请选择'
293
+ close-on-select
294
+ value-single
295
+ >
296
+ </v-select>
297
+ </div>
298
+ <div class="form-group col-sm-4" v-show="createPlan.isShare=='否'">
299
+ <label class="font_normal_body">安&ensp;检&ensp;员:</label>
300
+ <v-select
301
+ class="select select_list"
302
+ :value.sync="createPlan.checker"
303
+ v-model="createPlan.checker"
304
+ :options='checker'
305
+ placeholder='请选择'
306
+ close-on-select
307
+ value-single
308
+ >
309
+ </v-select>
310
+ </div>
311
+
312
+ <div class="form-group col-sm-4" >
313
+ <label class="font_normal_body">安检类型:</label>
314
+ <v-select
315
+ class="select select_list"
316
+ :value.sync="createPlan.f_safecheck_type"
317
+ v-model="createPlan.f_safecheck_type"
318
+ :search="false"
319
+ :options='ntoway'
320
+ placeholder='请选择'
321
+ close-on-select
322
+ value-single
323
+ >
324
+ </v-select>
325
+ </div>
326
+ </div>
327
+ </div>
328
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
329
+ <button class="button_search" style="margin-right: 15px" @click="addNewPlan()">创建计划</button>
330
+ <button class="button_search" @click="cancel">取消</button>
331
+ </div>
332
+ </modal>
333
+ <modal :show.sync="showUpPlan" v-ref:modal2 :backdrop="false">
334
+ <div slot="modal-header" class="modal-header">
335
+ <h4 class="modal-title">
336
+ 修改计划
337
+ </h4>
338
+ </div>
339
+ <div slot="modal-body" class="modal-body">
340
+ <div class="row">
341
+ <div class="form-group col-sm-4" >
342
+ <label class="font_normal_body">计划名称:</label>
343
+ <input type="text" class="input_search" v-model="upCheckPlan.f_plan_name"
344
+ style="width: 60%" />
345
+ </div>
346
+ <div class="form-group col-sm-4" >
347
+ <label class="font_normal_body">计划年份:</label>
348
+ <v-select
349
+ class="select select_list"
350
+ :value.sync="upCheckPlan.f_plan_year"
351
+ v-model="upCheckPlan.f_plan_year"
352
+ :search="false"
353
+ :value="upCheckPlan.f_plan_year"
354
+ :options='yearList'
355
+
356
+ close-on-select
357
+ value-single>
358
+
359
+
360
+ </v-select>
361
+ <!-- <datepicker
362
+ placeholder='请选择'
363
+ style="width:60%"
364
+ :disabled-days-of-week="[]"
365
+ :format="'yyyy'"
366
+ :show-rest-button="reset"
367
+ :value.sync="upCheckPlan.f_plan_year"
368
+ v-model="upCheckPlan.f_plan_year">
369
+ </datepicker>-->
370
+ </div>
371
+ <div class="form-group col-sm-4" >
372
+ <label class="font_normal_body">计划月份:</label>
373
+ <v-select
374
+ class="select select_list"
375
+ :value.sync="upCheckPlan.f_plan_month"
376
+ v-model="upCheckPlan.f_plan_month"
377
+
378
+ :options='monthList'
379
+ close-on-select
380
+ value-single>
381
+ </v-select>
382
+ </div>
383
+ <div class="form-group col-sm-4" >
384
+ <label class="font_normal_body">计划开始:</label>
385
+ <datepicker
386
+ placeholder='请选择'
387
+ style="width:60%"
388
+ :disabled-days-of-week="[]"
389
+ :format="'yyyy-MM-dd'"
390
+ :show-rest-button="reset"
391
+ :value.sync="upCheckPlan.f_start_time"
392
+ v-model="upCheckPlan.f_start_time">
393
+ </datepicker>
394
+ </div>
395
+ <div class="form-group col-sm-4" >
396
+ <label class="font_normal_body">计划结束:</label>
397
+ <datepicker
398
+ placeholder='请选择'
399
+ style="width:60%"
400
+ :disabled-days-of-week="[]"
401
+ :format="'yyyy-MM-dd'"
402
+ :show-rest-button="reset"
403
+ :value.sync="upCheckPlan.f_end_time"
404
+ v-model="upCheckPlan.f_end_time">
405
+ </datepicker>
406
+ </div>
407
+ <div class="form-group col-sm-4" >
408
+ <label class="font_normal_body">是否共享:</label>
409
+ <v-select
410
+ class="select select_list"
411
+ :search="false"
412
+ :value.sync="upCheckPlan.isShare"
413
+ v-model="upCheckPlan.isShare"
414
+ :options='isAndNot'
415
+ placeholder='请选择'
416
+ close-on-select
417
+ value-single
418
+ >
419
+ </v-select>
420
+ </div>
421
+ <div class="form-group col-sm-4" v-show="upCheckPlan.isShare=='否'">
422
+ <label class="font_normal_body">安&ensp;检&ensp;员:</label>
423
+ <v-select
424
+ class="select select_list"
425
+ :value.sync="upCheckPlan.checker"
426
+ v-model="upCheckPlan.checker"
427
+ :options='checker'
428
+ close-on-select
429
+ value-single
430
+ >
431
+ </v-select>
432
+ </div>
433
+
434
+ <div class="form-group col-sm-4">
435
+ <label class="font_normal_body">安检类型:</label>
436
+ <v-select
437
+ class="select select_list"
438
+ :value.sync="upCheckPlan.f_safecheck_type"
439
+ v-model="upCheckPlan.f_safecheck_type"
440
+ :options='ntoway'
441
+ close-on-select
442
+ value-single
443
+ >
444
+ </v-select>
445
+ </div>
446
+ </div>
447
+ </div>
448
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
449
+ <button class="button_search" style="margin-right: 15px" @click="upPlan()">保存修改</button>
450
+ <button class="button_search" @click="cancel">取消</button>
451
+ </div>
452
+ </modal>
453
+ </div>
454
+ </template>
455
+
456
+ <script>
457
+ import {SearchList,HttpResetClass, PagedList} from "vue-client";
458
+ import * as Util from "../../Util";
459
+ import Vue from "vue";
460
+
461
+ export default {
462
+ name: "PlanManage",
463
+ title: '计划管理',
464
+ data() {
465
+ return {
466
+ classes:[],
467
+ source:
468
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
469
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
470
+ userid: this.$login.f.id,
471
+ a:'1',
472
+ opt:[{label:"按时间降序",value:"按时间降序"},{label:"按时间升序",value:"按时间升序"}],
473
+ currentorder:'按时间降序',
474
+ checkplan : new SearchList(true),
475
+ selectPlan:{id:''},
476
+ upCheckPlan:{
477
+ f_plan_name:'',
478
+ f_end_time:'',
479
+ f_start_time:'',
480
+ f_safecheck_type:'',
481
+ f_plan_year:'',
482
+ f_plan_month:'',
483
+ f_checker_id:'',
484
+ isShare:'',
485
+ f_checker:'',
486
+ checker:{}
487
+ },
488
+ isSend:false,
489
+ createPlan:{
490
+ f_outlets:'',
491
+ f_class:'',
492
+ f_end_time:'',
493
+ f_start_time:'',
494
+ f_plan_name:'',
495
+ f_plan_year:'',
496
+ f_plan_month:'',
497
+ isShare:'否',
498
+ f_issued:'否',
499
+ f_checker_id:null,
500
+ checker:{},
501
+ f_checker:null,
502
+ f_safecheck_type:'',
503
+ },
504
+ planCondition:{},
505
+ showCondtion:false,
506
+ showCreatePlan:false,
507
+ showUpPlan:false,
508
+ isAndNot:[{label:'是',value:'是'},{label:'否',value:'否'}],
509
+ conIsAndNot:[{label:'是',value:'is null'},{label:'否',value:'is not null'}],
510
+ yearList:[{label:2020,value:2020},{label:2021,value:2021},{label:2022,value:2022},{label:2023,value:2023},{label:2024,value:2024},{label:2025,value:2025},{label:2026,value:2026},{label:2027,value:2027},{label:2028,value:2028},{label:2029,value:2029},{label:2030,value:2030}],
511
+ monthList:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9},{label:"10",value:10},{label:"11",value:11},{label:"12",value:12}],
512
+ safechecktype:[{label:'年度普检',value:'年度普检'}],
513
+ checker:[],
514
+ checkertCon:[],
515
+ userlogin:{
516
+ id:this.$login.f.id,
517
+ name:this.$login.f.name,
518
+ orgid:this.$login.f.orgid,
519
+ orgstr:this.$login.f.orgs,
520
+ }
521
+ //需要测试直接把下面放开即可
522
+ /*userlogin:{
523
+ id:'141701',
524
+ name:'hwq',
525
+ orgid:'35526',
526
+ orgstr:'西华县天然气有限公司'
527
+ }*/
528
+ }
529
+ },
530
+ async ready(){
531
+ await this.loadpage()
532
+ },
533
+ computed: {
534
+ ntoway() {
535
+ /*/!* return AppData.getParam('安检类型')*!/*/
536
+ return this.$appdata.getParam('安检类型')
537
+ }
538
+ },
539
+ methods:{
540
+ // 选中部门
541
+ reres(val){
542
+ if(val.res == undefined || val.res[0] == undefined || val.res[0] == '' || val.res.length > 1){
543
+ return
544
+ }
545
+ this.createPlan.f_outlets = val.res[0]
546
+ if (this.createPlan.isShare=='否'){
547
+ this.checker = []
548
+ let vali = {
549
+ source: `this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$)!=-1)`,
550
+ userid: `${val.resids[0]}`
551
+ }
552
+ let http = new HttpResetClass()
553
+ http.load('POST', '/rs/search', {data: vali}, {resolveMsg: null, rejectMsg: null}).then((res) => {
554
+ res.data.forEach((item) => {
555
+ if (item.state == '在职'){
556
+ this.checker.push({label:item.name,value:item})
557
+ }
558
+ })
559
+ })
560
+ }else {
561
+ this.classes = this.$appdata.getParam(`工单-` + val.res[0]) ? [{
562
+ label: '请选择',
563
+ value: ''
564
+ }, ...this.$appdata.getParam(`工单-` + val.res[0])] : [{label: '请选择', value: ''}]
565
+ }
566
+ },
567
+ /* ntoway() {
568
+ /!* return AppData.getParam('安检类型')*!/
569
+ return Vue.$appdata.getParam('安检类型')
570
+ },*/
571
+ async loadpage(){
572
+ //await this.checkplan.searchList("/rs/sql/预约计划下发", {},{groupitem:"",f_filialeids:"('"+this.userlogin.orgid+"')",orderitem:"f_create_time desc"})
573
+ await this.loadCheckPlan()
574
+ // await this.searchChecker(this.userlogin.id)
575
+ },
576
+ getRes(obj) {
577
+ console.log("----obj"+JSON.stringify(obj.resids))
578
+ console.log(obj)
579
+ if(obj.resids.length>0 && obj.resids[0]!=this.userlogin.orgid && obj.resids[0]){
580
+ this.userlogin.orgid=obj.resids[0]
581
+ this.userlogin.orgstr=obj.res[0]
582
+ if(this.$refs.item && this.$refs.user){
583
+ this.loadpage()
584
+ this.selectPlan={id:""}
585
+ this.$refs.item.model.rows=[]
586
+ this.$refs.user.model.rows=[]
587
+ this.$refs.user.loadpage()
588
+ }
589
+ }
590
+ },
591
+ getConList(field){
592
+ return [{label:'全部',value:''}, ...this[field]]
593
+ },
594
+ selectPlanChange(plan){
595
+ this.selectPlan=plan
596
+ //this.upCheckPlan=plan
597
+ },
598
+ showUserCondition(){
599
+ this.showCondtion=true
600
+ },
601
+ showcCreatePlan(){
602
+ this.showCreatePlan=true
603
+ },
604
+ cancel(){
605
+ this.showCondtion=false
606
+ this.showCreatePlan=false
607
+ this.showUpPlan=false
608
+ },
609
+ //新建计划
610
+ async addNewPlan() {
611
+ if(!this.validationCreatePlan()){
612
+ return
613
+ }
614
+ this.isSend=true
615
+ let res=await new HttpResetClass().load("POST","/rs/sql/getCheckplan", {data: {condition:"f_plan_name='"+this.createPlan.f_plan_name+"'",sortfield:'f_create_time desc'}})
616
+ console.log("结果-"+res.data.length)
617
+ if(res.data.length>0){
618
+ Vue.showMessage("计划名称不能重复!")
619
+ this.isSend=false
620
+ return
621
+ }
622
+ if(this.createPlan.isShare=="是"){
623
+ this.createPlan.f_checker_id=null
624
+ this.createPlan.f_checker=null
625
+ }else{
626
+ this.createPlan.f_checker_id=this.createPlan.checker.id
627
+ this.createPlan.f_checker=this.createPlan.checker.name
628
+ this.createPlan.f_outlets=this.createPlan.f_outlets
629
+ }
630
+ console.log("this.createPlan.f_checker:"+this.createPlan.f_checker)
631
+ this.createPlan.f_plan_type='预约计划'
632
+ this.createPlan.f_subcompany=this.userlogin.orgstr
633
+ this.createPlan.f_filialeid=this.userlogin.orgid
634
+ this.createPlan.f_create_operator=this.userlogin.name
635
+ this.createPlan.f_create_time=Util.toStandardTimeString()
636
+ await new HttpResetClass().load('POST',"/rs/logic/createCheckPlan", {"data": this.createPlan},{resolveMsg : '新建计划成功!', rejectMsg : '新建计划失败!'})
637
+ //await this.loadCheckPlan('',()=>{})
638
+ this.createPlan={
639
+ f_plan_name:'',
640
+ f_plan_year:'',
641
+ f_plan_month:'',
642
+ f_class:'',
643
+ f_outlets:'',
644
+ isShare:'否',
645
+ f_issued:'否',
646
+ f_checker_id:null,
647
+ checker:{},
648
+ f_checker:null,
649
+ f_safecheck_type:'',
650
+ f_create_operator:''
651
+ }
652
+ await this.loadCheckPlan()
653
+ this.isSend=false
654
+
655
+ },
656
+ validationCreatePlan(){
657
+ if(!this.createPlan.f_plan_name){
658
+ Vue.showMessage("请输入安检计划名称!")
659
+ return false
660
+ }
661
+ if(!this.createPlan.f_plan_year){
662
+ Vue.showMessage("请选择安检年份!")
663
+ return false
664
+ }
665
+ if(!this.createPlan.f_start_time){
666
+ Vue.showMessage("请选择计划开始时间!")
667
+ return false
668
+ }
669
+ if(!this.createPlan.f_end_time){
670
+ Vue.showMessage("请选择计划结束时间!")
671
+ return false
672
+ }
673
+ if( this.createPlan.f_start_time > this.createPlan.f_end_time){
674
+ Vue.showMessage("计划结束时间不能早于计划开始时间!")
675
+ return false
676
+ }
677
+ if(!this.createPlan.f_plan_month){
678
+ Vue.showMessage("请选择安检月份!")
679
+ return false
680
+ }
681
+ if(this.createPlan.isShare=="否"){
682
+ if(JSON.stringify(this.createPlan.checker)=='{}'){
683
+ Vue.showMessage("请选择安检人员!")
684
+ return false
685
+ }
686
+ }else{
687
+ this.createPlan.f_checker=''
688
+ }
689
+ if(!this.createPlan.f_safecheck_type){
690
+ Vue.showMessage("请选择安检类型!")
691
+ return false
692
+ }
693
+ return true
694
+ },
695
+ //查询安检员selectChanged
696
+ async searchChecker(id){
697
+ let res=await new HttpResetClass().load('POST', '/rs/search', {
698
+ source: `root.getResourceById($${this.userlogin.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)`,
699
+ userid: id
700
+ }, {resolveMsg: null, rejectMsg: null})
701
+ this.checker=[]
702
+ res.data.forEach((resRow) => {
703
+ this.checker.push({label:resRow.name,value:resRow})
704
+ })
705
+ },
706
+ //设置属性值
707
+ setProperty(modulename, property, value) {
708
+ console.log(modulename+"新添--"+property+"--"+value)
709
+ if(value=='全部'){
710
+ this[modulename].search.setField(property, '')
711
+ }else{
712
+ this[modulename].search.setField(property, value)
713
+ }
714
+ },
715
+ //按条件查询所有安检计划
716
+ async loadCheckPlan() {
717
+ this.isSend=true
718
+ this.checkplan.check.checkes=[]
719
+ let fieldValue=''
720
+ switch(this.currentorder){
721
+ case "按时间降序":
722
+ fieldValue='f_create_time desc'
723
+ break
724
+ case "按时间升序":
725
+ fieldValue='f_create_time'
726
+ break
727
+ }
728
+ console.log("--------fieldValue"+fieldValue)
729
+ this.cancel()
730
+ await this.checkplan.searchList("/rs/sql/预约计划下发",
731
+ {"f_plan_name": "f_plan_name like '%{}%'",
732
+ "f_plan_year":"f_plan_year={}",
733
+ "f_plan_month":"f_plan_month={}",
734
+ "checkerid":"f_checker_id='{}'",
735
+ "isAndNot":"f_checker {}",
736
+ "safechecktype":"f_safecheck_type='{}'",
737
+ "issude":"f_issued = '{}'",
738
+ "f_create_operator": "f_create_operator like '%{}%'"
739
+ },
740
+ {orderitem:fieldValue,
741
+ f_filialeids:"('"+this.userlogin.orgid+"')",
742
+ groupitem:""
743
+ }
744
+ )
745
+
746
+ this.isSend=false
747
+ },
748
+ //加载更多数据
749
+ async loadMore(modelname) {
750
+ this.isSend=true
751
+ await this[modelname].list.loadMore()
752
+ this.isSend=false
753
+ },
754
+ showUpPlans(row){
755
+ this.upCheckPlan.id=row.id
756
+ this.upCheckPlan.f_safecheck_type=row.f_safecheck_type
757
+ this.upCheckPlan.f_plan_name=row.f_plan_name
758
+ this.upCheckPlan.f_plan_year=row.f_plan_year
759
+ this.upCheckPlan.f_plan_month=row.f_plan_month
760
+ this.upCheckPlan.f_end_time=row.f_end_time
761
+ this.upCheckPlan.f_start_time=row.f_start_time
762
+ this.upCheckPlan.f_checker_id=row.f_checker_id?row.f_checker_id:null
763
+ this.upCheckPlan.f_checker=row.f_checker?row.f_checker:null
764
+ this.upCheckPlan.isShare=row.f_checker_id?'否':'是'
765
+ this.upCheckPlan.f_issued=row.f_issued
766
+ this.upCheckPlan.checker={id:row.f_checker_id,name:row.f_checker}
767
+ this.showUpPlan=true
768
+ },
769
+ async upPlan(){
770
+ if(this.upCheckPlan.f_issued=='已下发'){
771
+ this.$showMessage("该计划已下发,无法进行修改!")
772
+ return
773
+ }
774
+ if(!this.upCheckPlan.f_plan_name){
775
+ Vue.showMessage("请输入安检计划名称!")
776
+ return false
777
+ }
778
+ if(!this.upCheckPlan.f_plan_year){
779
+ Vue.showMessage("请选择安检年份!")
780
+ return false
781
+ }
782
+ if(!this.upCheckPlan.f_plan_month){
783
+ Vue.showMessage("请选择安检月份!")
784
+ return false
785
+ }
786
+ if(!this.upCheckPlan.f_end_time){
787
+ Vue.showMessage("请选择安检结束时间!")
788
+ return false
789
+ }
790
+ if(!this.upCheckPlan.f_start_time){
791
+ Vue.showMessage("请选择安检起始时间!")
792
+ return false
793
+ }
794
+ console.log(this.upCheckPlan)
795
+
796
+ if(this.upCheckPlan.isShare=="是"){
797
+ this.upCheckPlan.f_checker_id=null
798
+ this.upCheckPlan.f_checker=null
799
+ }else{
800
+ this.upCheckPlan.f_checker_id=this.upCheckPlan.checker.id
801
+ this.upCheckPlan.f_checker=this.upCheckPlan.checker.name
802
+ }
803
+ this.isSend=true
804
+ let res=await new HttpResetClass().load("POST", "/rs/logic/updateCheckPlan", {
805
+ data:{
806
+ f_end_time:this.upCheckPlan.f_end_time,
807
+ f_start_time:this.upCheckPlan.f_start_time,
808
+ f_checker:this.upCheckPlan.f_checker,
809
+ f_safecheck_type:this.upCheckPlan.f_safecheck_type,
810
+ f_checker_id:this.upCheckPlan.f_checker_id,
811
+ f_plan_name:this.upCheckPlan.f_plan_name,
812
+ f_plan_year:this.upCheckPlan.f_plan_year,
813
+ f_plan_month:this.upCheckPlan.f_plan_month,
814
+ f_plan_id:this.upCheckPlan.id
815
+ }
816
+ }, {resolveMsg: null, rejectMsg: null})
817
+ if(res.data.code==200){
818
+ this.$showMessage("修改成功!")
819
+ this.cancel()
820
+ await this.loadCheckPlan()
821
+ }else{
822
+ this.$showMessage("修改失败!")
823
+ }
824
+ this.isSend=false
825
+ },
826
+ //下发安检计划
827
+ async sendCheckPlan(f){
828
+ if(this.checkplan.check.checkes.length<1){
829
+ this.$showMessage("请选择要下发的安检计划")
830
+ return
831
+ }
832
+ this.isSend=true
833
+ let res=await new HttpResetClass().load("POST", "/rs/logic/NewBespeakCheckPlan", {
834
+ data:{
835
+ f_issued:'是',
836
+ f_issue_time:Util.toStandardTimeString(),
837
+ f_send_operator:this.userlogin.name,
838
+ param:this.checkplan.check.checkes,
839
+ }
840
+ }, {resolveMsg: null, rejectMsg: null})
841
+ if(res.data.code==200){
842
+ //Vue.showMessage("下发成功!其中有"+res.data.repet+"个计划己经是下发状态")
843
+ this.$showMessage("下发成功!")
844
+ }else{
845
+ this.$showMessage("下发失败!")
846
+ }
847
+ await this.loadCheckPlan()
848
+ this.isSend=false
849
+ },
850
+ //删除安检计划
851
+ async delCheckPlan(f){
852
+ if(this.checkplan.check.checkes.length<1){
853
+ this.$showMessage("请选择要删除的安检计划")
854
+ return
855
+ }
856
+ this.isSend=true
857
+ let res=await new HttpResetClass().load("POST", "/rs/logic/deleteCheckPlan", {
858
+ data:{
859
+ f_operator:this.userlogin.orgstr,//global.login.name,
860
+ condition:"",
861
+ switchCheckAll:true,
862
+ checkAll:false,
863
+ param:this.checkplan.check.checkes,
864
+ columnName: "f_plan_id"
865
+ }
866
+ }, {resolveMsg: null, rejectMsg: null})
867
+ console.log(JSON.stringify(res))
868
+ if(res.data.code==200){
869
+ this.$showMessage("删除成功!")
870
+ }else{
871
+ this.$showMessage("删除失败!")
872
+ }
873
+ if(this.checkplan.check.checkes.indexOf(this.selectPlan.id)!= -1){
874
+ this.selectPlan={id:''}
875
+ console.log("包含了清空selectplan")
876
+ }
877
+ await this.loadCheckPlan()
878
+ this.isSend=false
879
+ },
880
+ async refresh(){
881
+ this.$refs.item.$refs.paged.$refs.criteria.search()
882
+ this.$refs.user.$refs.paged.$refs.criteria.search()
883
+ await this.loadCheckPlan()
884
+ },
885
+ async refreshPlan(){
886
+ this.$refs.item.$refs.paged.$refs.criteria.search()
887
+ await this.loadCheckPlan()
888
+ }
889
+ }
890
+ }
891
+ </script>
892
+
893
+ <style scoped>
894
+ .safe-planfont{
895
+ font-family: MicrosoftYaHei;
896
+ font-size: 15px;
897
+ font-weight: normal;
898
+ font-stretch: normal;
899
+ letter-spacing: 2px;
900
+ color: #333333;
901
+ line-height: 25px;
902
+ }
903
+ .safe-bodyfont{
904
+ font-family: MicrosoftYaHei;
905
+ font-size: 14px;
906
+ font-weight: normal;
907
+ font-stretch: normal;
908
+ letter-spacing: 0px;
909
+ color: #999999;
910
+ line-height: 30px;
911
+ }
912
+ .safe-leftplan{
913
+ height:auto;
914
+ border-bottom:1px solid #ececec;
915
+ padding: 10px 5px
916
+ }
917
+ .leftplan-center{
918
+ border-top:1px solid #ececec;
919
+ border-bottom:1px solid #ececec;
920
+ }
921
+ .safe_p{
922
+ white-space: nowrap;
923
+ overflow: hidden;
924
+ text-overflow: ellipsis;
925
+ }
926
+ .safe-div-p{
927
+ color: #4792de;
928
+ text-align: end;
929
+ padding: 8px 15px;
930
+ }
931
+ .safe_list_li:hover{
932
+ background-color: rgb(245,246,247);
933
+ }
934
+ .safe-selectplan{
935
+ pointer-events: none;
936
+ background-color: rgb(216,234,251);
937
+ }
938
+ .safe_plan_list{
939
+ height: 80%;
940
+ overflow: scroll;
941
+ }
942
+
943
+ </style>
944
+ <style>
945
+ .safe_plan_list::-webkit-scrollbar{
946
+ background-color: #F5F5F5;
947
+ }
948
+
949
+ /*定义滚动条轨道 内阴影+圆角*/
950
+ .safe_plan_list::-webkit-scrollbar-track{
951
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
952
+ border-radius: 10px;
953
+ background-color: #F5F5F5;
954
+ }
955
+
956
+ /*定义滑块 内阴影+圆角*/
957
+ .safe_plan_list::-webkit-scrollbar-thumb{
958
+ border-radius: 10px;
959
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
960
+ background-color: #F5F5F5;
961
+ }
962
+ </style>