safecheck-client 3.0.35-56 → 3.0.35-57

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