safecheck-client 3.0.35-30 → 3.0.35-31

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