eoss-ui 0.7.25 → 0.7.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/lib/calogin.js +233 -233
  2. package/lib/eoss-ui.common.js +976 -1018
  3. package/lib/flow-list.js +106 -88
  4. package/lib/flow.js +464 -532
  5. package/lib/index.js +1 -1
  6. package/lib/main.js +146 -141
  7. package/lib/menu.js +6 -3
  8. package/lib/qr-code.js +13 -13
  9. package/lib/theme-chalk/flow.css +1 -1
  10. package/lib/theme-chalk/index.css +1 -1
  11. package/lib/theme-chalk/main.css +1 -1
  12. package/lib/theme-chalk/menu.css +1 -1
  13. package/lib/theme-chalk/simplicity.css +1 -1
  14. package/package.json +160 -160
  15. package/packages/button/index.js +5 -5
  16. package/packages/button/src/main.vue +418 -418
  17. package/packages/button-group/index.js +5 -5
  18. package/packages/button-group/src/main.vue +346 -346
  19. package/packages/calendar/index.js +5 -5
  20. package/packages/calogin/index.js +5 -5
  21. package/packages/calogin/src/main.vue +412 -412
  22. package/packages/calogin/src/plugin.js +915 -915
  23. package/packages/card/index.js +5 -5
  24. package/packages/card/src/main.vue +156 -156
  25. package/packages/cascader/index.js +5 -5
  26. package/packages/cascader/src/main.vue +168 -168
  27. package/packages/checkbox-group/index.js +5 -5
  28. package/packages/checkbox-group/src/main.vue +333 -333
  29. package/packages/clients/index.js +5 -5
  30. package/packages/clients/src/main.vue +151 -151
  31. package/packages/data-table/index.js +5 -5
  32. package/packages/data-table/src/children.vue +39 -39
  33. package/packages/data-table/src/column.vue +988 -988
  34. package/packages/data-table/src/main.vue +1831 -1831
  35. package/packages/data-table/src/sizer.vue +195 -195
  36. package/packages/data-table-form/index.js +5 -5
  37. package/packages/data-table-form/src/checkbox.vue +101 -101
  38. package/packages/data-table-form/src/colgroup.vue +17 -17
  39. package/packages/data-table-form/src/main.vue +181 -181
  40. package/packages/data-table-form/src/radio.vue +65 -65
  41. package/packages/data-table-form/src/table.vue +233 -233
  42. package/packages/data-table-form/src/tbody.vue +336 -336
  43. package/packages/data-table-form/src/thead.vue +68 -68
  44. package/packages/date-picker/index.js +5 -5
  45. package/packages/date-picker/src/main.vue +236 -236
  46. package/packages/dialog/index.js +5 -5
  47. package/packages/enable-drag/index.js +5 -5
  48. package/packages/enterprise/index.js +5 -5
  49. package/packages/enterprise/src/main.vue +66 -66
  50. package/packages/error-page/index.js +5 -5
  51. package/packages/error-page/src/main.vue +44 -44
  52. package/packages/flow/index.js +5 -5
  53. package/packages/flow/src/component/Circulate.vue +413 -413
  54. package/packages/flow/src/component/CommonOpinions.vue +373 -373
  55. package/packages/flow/src/component/CustomPreset.vue +322 -322
  56. package/packages/flow/src/component/FileList.vue +97 -97
  57. package/packages/flow/src/component/FreeCirculation.vue +240 -240
  58. package/packages/flow/src/component/Preset.vue +255 -255
  59. package/packages/flow/src/component/SendMsg.vue +242 -242
  60. package/packages/flow/src/component/TimeLimit.vue +190 -190
  61. package/packages/flow/src/component/taskUnionExamine.vue +755 -738
  62. package/packages/flow/src/form.vue +121 -121
  63. package/packages/flow/src/freeStartFlow.vue +2847 -2847
  64. package/packages/flow/src/main.vue +3854 -3843
  65. package/packages/flow/src/processForm.vue +1363 -1370
  66. package/packages/flow/src/processReject.vue +309 -308
  67. package/packages/flow/src/reset.vue +941 -941
  68. package/packages/flow/src/startTaskRead.vue +691 -691
  69. package/packages/flow/src/supervise.vue +159 -159
  70. package/packages/flow/src/table.vue +58 -58
  71. package/packages/flow-group/index.js +5 -5
  72. package/packages/flow-group/src/main.vue +717 -717
  73. package/packages/flow-list/index.js +5 -5
  74. package/packages/flow-list/src/main.vue +1787 -1770
  75. package/packages/form/index.js +5 -5
  76. package/packages/form/src/main.vue +3901 -3901
  77. package/packages/form/src/table.vue +1512 -1512
  78. package/packages/handle-user/index.js +5 -5
  79. package/packages/handle-user/src/main.vue +137 -137
  80. package/packages/handler/index.js +5 -5
  81. package/packages/handler/src/main.vue +496 -496
  82. package/packages/icon/index.js +5 -5
  83. package/packages/icon/src/main.vue +104 -104
  84. package/packages/icons/index.js +5 -5
  85. package/packages/icons/src/main.vue +81 -81
  86. package/packages/input/index.js +5 -5
  87. package/packages/input/src/main.vue +356 -356
  88. package/packages/input-number/index.js +5 -5
  89. package/packages/input-number/src/main.vue +106 -106
  90. package/packages/label/index.js +5 -5
  91. package/packages/label/src/main.vue +457 -457
  92. package/packages/layout/index.js +5 -5
  93. package/packages/layout/src/item.vue +152 -152
  94. package/packages/layout/src/main.vue +31 -31
  95. package/packages/login/index.js +5 -5
  96. package/packages/login/src/main.vue +2020 -2020
  97. package/packages/login/src/resetPassword.vue +557 -557
  98. package/packages/main/index.js +5 -5
  99. package/packages/main/src/default/message.vue +249 -249
  100. package/packages/main/src/default/notice.vue +157 -157
  101. package/packages/main/src/default/userinfo.vue +502 -502
  102. package/packages/main/src/public/online.vue +89 -89
  103. package/packages/main/src/public/search.vue +464 -464
  104. package/packages/main/src/public/settings.vue +221 -221
  105. package/packages/main/src/simplicity/apps.vue +388 -388
  106. package/packages/main/src/simplicity/avatar.vue +82 -82
  107. package/packages/main/src/simplicity/handler.vue +263 -263
  108. package/packages/main/src/simplicity/index.vue +2135 -2130
  109. package/packages/main/src/simplicity/lists.vue +84 -84
  110. package/packages/main/src/simplicity/menu-list.vue +135 -135
  111. package/packages/main/src/simplicity/message.vue +259 -259
  112. package/packages/main/src/simplicity/notice.vue +190 -190
  113. package/packages/main/src/simplicity/router-page.vue +45 -45
  114. package/packages/main/src/simplicity/sub-menu.vue +264 -264
  115. package/packages/main/src/simplicity/user.vue +259 -259
  116. package/packages/main/src/simplicity/userinfo.vue +398 -398
  117. package/packages/menu/index.js +5 -5
  118. package/packages/menu/src/main.vue +596 -584
  119. package/packages/nav/index.js +5 -5
  120. package/packages/nav/src/main.vue +351 -351
  121. package/packages/notify/index.js +5 -5
  122. package/packages/notify/src/main.vue +538 -538
  123. package/packages/page/index.js +5 -5
  124. package/packages/page/src/main.vue +167 -167
  125. package/packages/pagination/index.js +5 -5
  126. package/packages/pagination/src/main.vue +96 -96
  127. package/packages/player/index.js +5 -5
  128. package/packages/player/src/main.vue +194 -194
  129. package/packages/qr-code/index.js +5 -5
  130. package/packages/qr-code/src/main.vue +170 -170
  131. package/packages/radio-group/index.js +6 -6
  132. package/packages/radio-group/src/main.vue +319 -319
  133. package/packages/retrial-auth/index.js +5 -5
  134. package/packages/retrial-auth/src/main.vue +280 -280
  135. package/packages/select/index.js +5 -5
  136. package/packages/select/src/main.vue +782 -782
  137. package/packages/select-ganged/index.js +5 -5
  138. package/packages/select-ganged/src/main.vue +724 -724
  139. package/packages/selector/index.js +5 -5
  140. package/packages/selector/src/main.vue +761 -761
  141. package/packages/selector-panel/index.js +5 -5
  142. package/packages/selector-panel/src/main.vue +1027 -1027
  143. package/packages/selector-panel/src/selection.vue +170 -170
  144. package/packages/selector-panel/src/tree.vue +129 -129
  145. package/packages/sizer/index.js +5 -5
  146. package/packages/sizer/src/main.vue +254 -254
  147. package/packages/steps/index.js +5 -5
  148. package/packages/steps/src/main.vue +181 -181
  149. package/packages/switch/index.js +5 -5
  150. package/packages/switch/src/main.vue +170 -170
  151. package/packages/table-form/index.js +5 -5
  152. package/packages/tabs/index.js +5 -5
  153. package/packages/tabs/src/main.vue +788 -788
  154. package/packages/tabs-panel/index.js +5 -5
  155. package/packages/tabs-panel/src/main.vue +29 -29
  156. package/packages/theme-chalk/lib/flow.css +1 -1
  157. package/packages/theme-chalk/lib/index.css +1 -1
  158. package/packages/theme-chalk/lib/main.css +1 -1
  159. package/packages/theme-chalk/lib/menu.css +1 -1
  160. package/packages/theme-chalk/lib/simplicity.css +1 -1
  161. package/packages/theme-chalk/src/base.scss +261 -261
  162. package/packages/theme-chalk/src/button-group.scss +176 -176
  163. package/packages/theme-chalk/src/button.scss +24 -24
  164. package/packages/theme-chalk/src/calendar.scss +113 -113
  165. package/packages/theme-chalk/src/card.scss +99 -99
  166. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  167. package/packages/theme-chalk/src/clients.scss +87 -87
  168. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  169. package/packages/theme-chalk/src/data-table.scss +293 -293
  170. package/packages/theme-chalk/src/date-picker.scss +7 -7
  171. package/packages/theme-chalk/src/dialog.scss +77 -77
  172. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  173. package/packages/theme-chalk/src/enterprise.scss +5 -5
  174. package/packages/theme-chalk/src/error-page.scss +18 -18
  175. package/packages/theme-chalk/src/flow-group.scss +110 -110
  176. package/packages/theme-chalk/src/flow-list.scss +39 -39
  177. package/packages/theme-chalk/src/flow.scss +351 -351
  178. package/packages/theme-chalk/src/form.scss +501 -501
  179. package/packages/theme-chalk/src/handle-user.scss +40 -40
  180. package/packages/theme-chalk/src/handler.scss +148 -148
  181. package/packages/theme-chalk/src/icon.scss +1817 -1817
  182. package/packages/theme-chalk/src/icons.scss +99 -99
  183. package/packages/theme-chalk/src/input.scss +9 -9
  184. package/packages/theme-chalk/src/label.scss +24 -24
  185. package/packages/theme-chalk/src/layout.scss +46 -46
  186. package/packages/theme-chalk/src/login.scss +987 -987
  187. package/packages/theme-chalk/src/main.scss +663 -663
  188. package/packages/theme-chalk/src/menu.scss +224 -222
  189. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  190. package/packages/theme-chalk/src/nav.scss +111 -111
  191. package/packages/theme-chalk/src/page.scss +3 -3
  192. package/packages/theme-chalk/src/pagination.scss +29 -29
  193. package/packages/theme-chalk/src/player.scss +9 -9
  194. package/packages/theme-chalk/src/qr-code.scss +17 -17
  195. package/packages/theme-chalk/src/radio-group.scss +9 -9
  196. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  197. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  198. package/packages/theme-chalk/src/select.scss +8 -8
  199. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  200. package/packages/theme-chalk/src/selector.scss +92 -92
  201. package/packages/theme-chalk/src/simplicity.scss +1370 -1366
  202. package/packages/theme-chalk/src/sizer.scss +36 -36
  203. package/packages/theme-chalk/src/steps.scss +88 -88
  204. package/packages/theme-chalk/src/switch.scss +3 -3
  205. package/packages/theme-chalk/src/table-form.scss +1 -1
  206. package/packages/theme-chalk/src/tabs.scss +87 -87
  207. package/packages/theme-chalk/src/tips.scss +7 -7
  208. package/packages/theme-chalk/src/toolbar.scss +179 -179
  209. package/packages/theme-chalk/src/tree-group.scss +72 -72
  210. package/packages/theme-chalk/src/tree.scss +165 -165
  211. package/packages/theme-chalk/src/upload.scss +172 -172
  212. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  213. package/packages/tips/index.js +5 -5
  214. package/packages/tips/src/main.vue +141 -141
  215. package/packages/toolbar/index.js +5 -5
  216. package/packages/toolbar/src/main.vue +430 -430
  217. package/packages/tree/index.js +5 -5
  218. package/packages/tree-group/index.js +5 -5
  219. package/packages/upload/index.js +5 -5
  220. package/packages/upload/src/main.vue +1343 -1343
  221. package/packages/upload/src/picture.js +15 -15
  222. package/packages/wujie/index.js +5 -5
  223. package/packages/wujie/src/main.vue +145 -145
  224. package/packages/wxlogin/index.js +5 -5
  225. package/packages/wxlogin/src/main.vue +128 -128
  226. package/src/config/api.js +315 -315
  227. package/src/config/image.js +2 -2
  228. package/src/index.js +163 -163
  229. package/src/utils/bus.js +3 -3
  230. package/src/utils/date-util.js +312 -312
  231. package/src/utils/http.js +50 -50
  232. package/src/utils/rules.js +18 -18
  233. package/src/utils/store.js +21 -21
  234. package/src/utils/webSocket.js +107 -107
  235. package/packages/.DS_Store +0 -0
  236. package/packages/calogin/.DS_Store +0 -0
  237. package/packages/date-picker/.DS_Store +0 -0
  238. package/packages/date-picker/src/.DS_Store +0 -0
  239. package/packages/flow/.DS_Store +0 -0
  240. package/packages/flow/src/.DS_Store +0 -0
  241. package/packages/flow-list/.DS_Store +0 -0
  242. package/packages/form/.DS_Store +0 -0
  243. package/packages/login/.DS_Store +0 -0
  244. package/packages/main/.DS_Store +0 -0
  245. package/packages/main/src/.DS_Store +0 -0
  246. package/packages/menu/.DS_Store +0 -0
  247. package/packages/select/.DS_Store +0 -0
  248. package/packages/selector/.DS_Store +0 -0
  249. package/packages/selector-panel/.DS_Store +0 -0
  250. package/packages/theme-chalk/src/.DS_Store +0 -0
  251. package/packages/upload/.DS_Store +0 -0
  252. package/src/.DS_Store +0 -0
  253. package/src/utils/.DS_Store +0 -0
@@ -1,738 +1,755 @@
1
- <template>
2
- <div class="es-flow-index task-union-examine" v-loading="loading">
3
- <el-form
4
- ref="infoList"
5
- :model="infoList"
6
- class="demo-dynamic"
7
- :rules="rules"
8
- label-width="120px"
9
- >
10
- <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
11
- <CommonOpinions @change="(val) => (opinion = val)" />
12
- </el-form-item>
13
- <el-form-item
14
- v-if="isHideCurrentOrg == 0"
15
- :prop="type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'"
16
- :label="
17
- type == 'takeAdvice'
18
- ? currentOrgName
19
- ? currentOrgName
20
- : '本单位'
21
- : type == 'startDraf'
22
- ? '呈送单位/对象'
23
- : type === 'taskReview'
24
- ? '复核人'
25
- : type === 'twoOfficesDispatch'
26
- ? '报送单位'
27
- : '联合单位'
28
- "
29
- >
30
- <SelectUser
31
- :nextUser="
32
- type != 'takeAdvice'
33
- ? infoList.nextOtherOrgObj
34
- : infoList.nextCurrentOrgObj
35
- "
36
- :multiple="newMultiple"
37
- :selectorTags="0"
38
- :mix="currentMix"
39
- :isUnionSeal="type == 'unionSeal'"
40
- :selectUserList="unionSealData || []"
41
- @change="
42
- changeSelectUser(
43
- $event,
44
- type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'
45
- )
46
- "
47
- :types="
48
- type == 'takeAdvice'
49
- ? currentOrgTabs.length > 0
50
- ? currentOrgTabs
51
- : ['department', 'employee']
52
- : type == 'startDraf'
53
- ? ['enterprise', 'employee']
54
- : ['enterprise']
55
- "
56
- :params="
57
- type == 'startDraf' || type == 'unionExamine' ? otherParams : params
58
- "
59
- :tabs="currentOrgTabsParam"
60
- :disabled="disabled"
61
- :onlyName="onlyName"
62
- />
63
- </el-form-item>
64
- <el-form-item
65
- prop="nextOtherOrgObj"
66
- v-if="isHideOtherOrg == 0 && type == 'takeAdvice'"
67
- :label="otherOrgName ? otherOrgName : '外单位'"
68
- >
69
- <SelectUser
70
- :nextUser="infoList.nextOtherOrgObj"
71
- :where="{ filid: 'other', roleid: selectorParams.roleid }"
72
- :multiple="newMultiple"
73
- @change="changeSelectUser($event, 'nextOtherOrgObj')"
74
- :mix="otherMix"
75
- :disableds="otherOrgDisabledObjId"
76
- :types="
77
- foreignOrgTabs.length > 0
78
- ? foreignOrgTabs
79
- : isChoiceOtherOrgDept == 'true'
80
- ? ['enterprise', 'department']
81
- : ['enterprise']
82
- "
83
- :params="otherParams"
84
- :tabs="foreignOrgTabsParam"
85
- />
86
- </el-form-item>
87
- <el-form-item
88
- v-if="enableCustomLimitTimeSetting"
89
- prop="customLimitTime"
90
- label="限时办理"
91
- >
92
- <el-input
93
- v-model="infoList.customLimitTime"
94
- placeholder="请输入限时办理的天数"
95
- class="input-with-select custom-limit-time"
96
- >
97
- <es-select
98
- v-if="!showCustomLimitTimeText"
99
- v-model="infoList.customLimitTime"
100
- placeholder="请选择"
101
- slot="prepend"
102
- sysCode="bpm_custom_limit_time"
103
- ></es-select>
104
- <es-button
105
- type="primary"
106
- slot="append"
107
- @click="
108
- () => {
109
- infoList.customLimitTime = '';
110
- showCustomLimitTimeText = !showCustomLimitTimeText;
111
- }
112
- "
113
- >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
114
- >
115
- </el-input>
116
- </el-form-item>
117
- <!-- :rules="[
118
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
119
- ]" -->
120
- <el-form-item
121
- prop="noticeType"
122
- label="通知方式"
123
- v-show="infoList.noticeList.length != 0"
124
- >
125
- <el-checkbox-group
126
- v-model="infoList.noticeType"
127
- style="display: contents"
128
- >
129
- <el-checkbox
130
- v-for="item of infoList.noticeList"
131
- :key="item.cciValue"
132
- :label="item.cciValue"
133
- :disabled="
134
- readOnlyNotificationType
135
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
136
- : false
137
- "
138
- >
139
- {{ item.shortName }}
140
- </el-checkbox>
141
- </el-checkbox-group>
142
- </el-form-item>
143
- <el-form-item
144
- v-show="infoList.noticeType.length != 0"
145
- prop="noticeInfo"
146
- label="通知消息"
147
- >
148
- <es-input
149
- style="
150
- border-color: #ccc;
151
- padding: 5px;
152
- border-radius: 5px;
153
- font-size: 13px;
154
- "
155
- type="textarea"
156
- v-model="infoList.noticeInfo"
157
- :readonly="notificationMessageReadOnly"
158
- />
159
- <!-- <span>{{ infoList.noticeInfo }}</span> -->
160
- </el-form-item>
161
- </el-form>
162
- <div style="text-align: right">
163
- <el-button type="primary" size="small" @click="subMit"> 确定 </el-button>
164
- <el-button @click="quit" size="small"> 取消 </el-button>
165
- </div>
166
- </div>
167
- </template>
168
-
169
- <script>
170
- import CommonOpinions from './CommonOpinions.vue';
171
- import SelectUser from '../selectUser.vue';
172
- import {
173
- findSysCodes,
174
- getNotificationMsg,
175
- toTaskTakeAdvice,
176
- findCodeValues,
177
- toTaskStartDraft,
178
- toTaskReview,
179
- taskStartDraft,
180
- toTaskUnionSeal,
181
- taskReview,
182
- toTwoOfficesDispatch,
183
- taskUnionSeal,
184
- twoOfficesDispatch,
185
- taskUnionExamine,
186
- taskTakeAdvice,
187
- toTaskUnionExamine
188
- } from 'eoss-ui/src/config/api';
189
- import util from 'eoss-ui/src/utils/util.js';
190
- export default {
191
- name: 'TaskUnionExamine',
192
- components: {
193
- [CommonOpinions.name]: CommonOpinions,
194
- [SelectUser.name]: SelectUser
195
- },
196
- props: {
197
- pendingId: { type: String, default: '' },
198
- type: { type: String, default: '' },
199
- defaultOpinion: { type: String, default: '' },
200
- oldOption: { type: String, default: '' },
201
- disabled: { type: Boolean, default: false },
202
- simpleTips: { type: Boolean, default: true },
203
- multiple: { type: Boolean, default: true },
204
- selectorParams: {
205
- type: Object,
206
- default: () => {
207
- return {};
208
- }
209
- }
210
- },
211
- inheritAttrs: false,
212
- data() {
213
- return {
214
- opinion: '', //办理意见
215
- readOnlyNotificationType: '',
216
- notificationMessageReadOnly: false,
217
- otherMix: false,
218
- enableCustomLimitTimeSetting: false,
219
- showCustomLimitTimeText: false,
220
- currentMix: false,
221
- infoList: {
222
- nextOtherOrgObj: [],
223
- nextCurrentOrgObj: [],
224
- noticeType: [],
225
- noticeList: [],
226
- noticeInfo: '',
227
- opinion: '',
228
- customLimitTime: ''
229
- },
230
- onlyName: '',
231
- unionSealData: [],
232
- currentOrgTabs: [],
233
- foreignOrgTabs: [],
234
- foreignOrgTabsParam: {},
235
- currentOrgTabsParam: {},
236
- currentOrgProcessKey: '',
237
- otherOrgDisabledObjId: [],
238
- isSubFlow: true,
239
- choiceDeptId: '',
240
- choiceOrgId: '',
241
- isSinglePage: false,
242
- isChoiceOtherOrgDept: '',
243
- currentOrgName: '',
244
- otherOrgName: '',
245
- newMultiple: true,
246
- params: { filid: 'all' },
247
- isHideOtherOrg: '',
248
- isHideCurrentOrg: 0,
249
- isOpinionRequired: 0,
250
- otherParams: { filid: 'other' },
251
- loading: false
252
- };
253
- },
254
- computed: {
255
- rules() {
256
- return {
257
- customLimitTime: [
258
- {
259
- required:this.enableCustomLimitTimeSetting,
260
- message: this.showCustomLimitTimeText?'请输入限时办理天数' : '请选择限时办理天数',
261
- trigger: 'blur'
262
- },
263
- {required:this.enableCustomLimitTimeSetting, validator: this.checkCustomLimitTime, trigger: 'change' }
264
- ]
265
- };
266
- }
267
- },
268
- mounted() {
269
- this.loading = true;
270
- this.newMultiple = this.multiple;
271
- this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
272
- this.opinion = this.oldOption;
273
- this.getNodeType();
274
- if (this.type === 'taskReview') return this.getTaskReview();
275
- this.getInfo();
276
- },
277
- methods: {
278
- validate() {
279
- let validSate = true;
280
- this.$refs.infoList.validate((valid) => {
281
- if (valid) {
282
- validSate = true;
283
- } else {
284
- validSate = false;
285
- }
286
- });
287
- return validSate;
288
- },
289
- checkCustomLimitTime(rule, value, callback){
290
- if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
291
- callback(new Error('请输入正确的天数'))
292
- this.infoList.customLimitTime = '';
293
- }else{
294
- callback()
295
- }
296
- },
297
- isMultiple(val) {
298
- if (val == 7 || val == 9 || val == 11) {
299
- this.newMultiple = false;
300
- }
301
- },
302
- subTaskReview() {
303
- let {
304
- infoList: { nextOtherOrgObj, noticeType, noticeInfo },
305
- businessId,
306
- opinion,
307
- isSubFlow,
308
- currentOrgProcessKey,
309
- pendingId
310
- } = this;
311
- let params = {
312
- url: taskReview,
313
- data: {
314
- nextUserId: nextOtherOrgObj.join(','),
315
- notificationType: noticeType.join(','),
316
- notificationMsg: noticeInfo,
317
- opinion,
318
- isSubFlow,
319
- businessId,
320
- currentOrgProcessKey,
321
- pendingId
322
- },
323
- method: 'POST'
324
- };
325
- this.loading = true;
326
- util
327
- .ajax(params)
328
- .then((res) => {
329
- const { message, status } = res;
330
- this.loading = false;
331
- if (status === 'success') {
332
- this.simpleTips && this.$message.success('提交成功');
333
- this.quit(true);
334
- } else {
335
- this.$message.error(message || '系统错误,请联系管理员!');
336
- }
337
- })
338
- .catch((err) => {
339
- this.loading = false;
340
- if (err.message && err.message !== 'canceled') {
341
- this.$message.error(err.message);
342
- }
343
- });
344
- },
345
- getTaskReview() {
346
- let params = {
347
- url: toTaskReview,
348
- params: { pendingId: this.pendingId }
349
- };
350
- util
351
- .ajax(params)
352
- .then((res) => {
353
- const { status, message } = res;
354
- this.loading = false;
355
- if (status === 'success') {
356
- const {
357
- data: { initiatorUser, taskExamine }
358
- } = res;
359
- if (taskExamine.opinion) {
360
- this.opinion = taskExamine.opinion;
361
- }
362
- this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
363
- this.onlyName = initiatorUser.username;
364
- this.isSubFlow = taskExamine.isSubFlow;
365
- this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
366
- this.getFind();
367
- this.getMessage();
368
- } else {
369
- this.$message.error(message || '系统错误,请联系管理员!');
370
- }
371
- })
372
- .catch((err) => {
373
- this.loading = false;
374
- if (err.message && err.message !== 'canceled') {
375
- this.$message.error(err.message);
376
- }
377
- });
378
- },
379
- getInfo() {
380
- let params = {
381
- url:
382
- this.type == 'takeAdvice'
383
- ? toTaskTakeAdvice
384
- : this.type === 'startDraf'
385
- ? toTaskStartDraft
386
- : this.type == 'unionSeal'
387
- ? toTaskUnionSeal
388
- : this.type == 'twoOfficesDispatch'
389
- ? toTwoOfficesDispatch
390
- : toTaskUnionExamine,
391
- params: { pendingId: this.pendingId },
392
- headers: { Accept: 'application/json,text/plain' }
393
- };
394
- util
395
- .ajax(params)
396
- .then((res) => {
397
- const { message, status } = res;
398
- this.loading = false;
399
- if (status == 'success') {
400
- const {
401
- data: {
402
- choiceDeptId,
403
- choiceOrgId,
404
- taskExamine,
405
- unionDispatchOrgName,
406
- readOnlyNotificationType,
407
- notificationMessageReadOnly,
408
- unionDispatchOrgId,
409
- otherOrgDisabledObjId,
410
- orgNames,
411
- enableCustomLimitTimeSetting,
412
- defaultCustomLimitDays,
413
- nodeInfoMap: {
414
- nodeExtAttr: {
415
- userSelectionType,
416
- isHideOtherOrg,
417
- isHideCurrentOrg,
418
- isOpinionRequired
419
- }
420
- }
421
- }
422
- } = res;
423
- if (otherOrgDisabledObjId) {
424
- this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
425
- }
426
- this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
427
- if(this.enableCustomLimitTimeSetting && defaultCustomLimitDays){
428
- this.infoList.customLimitTime = defaultCustomLimitDays + ''
429
- }
430
- if (res.data.customizedConfig) {
431
- if (res.data.customizedConfig.currentOrgSelectorCustomized) {
432
- this.currentMix =
433
- res.data.customizedConfig.currentOrgSelectorSelectMix ==
434
- 'true';
435
- this.currentOrgTabs =
436
- res.data.customizedConfig.currentOrgSelectorItemList.split(
437
- ','
438
- );
439
- let param =
440
- res.data.customizedConfig.currentOrgSelectorRangeList.split(
441
- ','
442
- );
443
- this.currentOrgTabs.map((x, i) => {
444
- this.params[x] = {
445
- filid:
446
- param[i] == 'my'
447
- ? (this.params.filid = JSON.parse(
448
- util.getStorage('mainConfig')
449
- ).userModel.orgId)
450
- : param[i]
451
- };
452
- });
453
- } else {
454
- if (this.type == 'takeAdvice') {
455
- this.params.filid = JSON.parse(
456
- util.getStorage('mainConfig')
457
- ).userModel.orgId;
458
- }
459
- }
460
-
461
- if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
462
- this.otherMix =
463
- res.data.customizedConfig.foreignOrgSelectorSelectMix ==
464
- 'true';
465
- this.foreignOrgTabs =
466
- res.data.customizedConfig.foreignOrgSelectorItemList.split(
467
- ','
468
- );
469
- let param =
470
- res.data.customizedConfig.foreignOrgSelectorRangeList.split(
471
- ','
472
- );
473
- this.foreignOrgTabs.map((x, i) => {
474
- this.otherParams[x] = { filid: param[i] };
475
- });
476
- }
477
- }
478
- this.readOnlyNotificationType = readOnlyNotificationType;
479
- this.notificationMessageReadOnly =
480
- notificationMessageReadOnly == 'true';
481
- this.isSinglePage = taskExamine.isSinglePage;
482
- this.isSubFlow = taskExamine.isSubFlow;
483
- if (taskExamine.opinion) {
484
- this.opinion = taskExamine.opinion;
485
- }
486
- this.choiceDeptId = choiceDeptId;
487
- this.choiceOrgId = choiceOrgId;
488
- if (this.type == 'takeAdvice' || this.type == 'startDraf') {
489
- this.currentOrgName = res.data.currentOrgName;
490
- this.otherOrgName = res.data.otherOrgName;
491
- this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
492
- this.isHideOtherOrg = isHideOtherOrg;
493
- this.isHideCurrentOrg = isHideCurrentOrg;
494
- }
495
- this.isOpinionRequired = isOpinionRequired;
496
- if (this.type == 'unionSeal') {
497
- let names = unionDispatchOrgName.split(',');
498
- let ids = unionDispatchOrgId.split(',');
499
- names.map((x, i) => {
500
- if (x) {
501
- this.unionSealData.push({
502
- showname: x,
503
- showid: ids[i]
504
- });
505
- }
506
- });
507
- // this.onlyName = unionDispatchOrgName;
508
- // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
509
- }
510
- if (this.type == 'twoOfficesDispatch') {
511
- this.onlyName = orgNames;
512
- this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
513
- }
514
- this.isMultiple(userSelectionType);
515
- this.getFind();
516
- this.getMessage();
517
- } else {
518
- this.$message.error(message || '系统错误,请联系管理员!');
519
- }
520
- })
521
- .catch((err) => {
522
- this.loading = false;
523
- if (err.message && err.message !== 'canceled') {
524
- this.$message.error(err.message);
525
- }
526
- });
527
- },
528
- subMit() {
529
- // if (
530
- // this.infoList.nextOtherOrgObjName == '' ||
531
- // this.infoList.nextOtherOrgObjName.length == 0
532
- // )
533
- // return this.$message.warning('请选择联合单位');
534
- if (this.type === 'taskReview') return this.subTaskReview();
535
- let {
536
- infoList: {
537
- nextCurrentOrgObj,
538
- nextOtherOrgObj,
539
- noticeType,
540
- customLimitTime,
541
- noticeInfo
542
- },
543
- isOpinionRequired,
544
- opinion,
545
- type,
546
- isHideOtherOrg,
547
- choiceDeptId,
548
- choiceOrgId,
549
- isHideCurrentOrg,
550
- isSubFlow,
551
- pendingId
552
- } = this;
553
- console.log(nextCurrentOrgObj);
554
- console.log(nextOtherOrgObj);
555
- if (
556
- type == 'takeAdvice' &&
557
- !nextCurrentOrgObj &&
558
- isHideCurrentOrg == 0 &&
559
- nextCurrentOrgObj.length == 0 &&
560
- isHideOtherOrg == 0 &&
561
- (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
562
- ) {
563
- return this.$message.warning('请选择处理对象!');
564
- } else if (
565
- isHideCurrentOrg == 0 &&
566
- (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
567
- (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
568
- ) {
569
- return this.$message.warning('请选择处理对象!');
570
- }
571
-
572
- if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
573
- return this.$message.warning('当前步骤必须输入意见!');
574
- }
575
- // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
576
- // return this.$message.warning('暂未开放,敬请期待!');
577
- const param = {
578
- url:
579
- this.type === 'startDraf'
580
- ? taskStartDraft
581
- : this.type == 'unionSeal'
582
- ? taskUnionSeal
583
- : this.type === 'twoOfficesDispatch'
584
- ? twoOfficesDispatch
585
- : this.type == 'takeAdvice'
586
- ? taskTakeAdvice
587
- : taskUnionExamine,
588
- data: {
589
- opinion,
590
- pendingId,
591
-
592
- nextOtherOrgObj:
593
- this.type == 'unionSeal'
594
- ? this.unionSealData.map((x) => x.showid).join(',')
595
- : Array.isArray(nextOtherOrgObj)
596
- ? nextOtherOrgObj.join(',')
597
- : nextOtherOrgObj,
598
- nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
599
- ? nextCurrentOrgObj.join(',')
600
- : nextCurrentOrgObj,
601
- notificationMsg: noticeInfo,
602
- notificationType: noticeType.join(','),
603
- choiceDeptId,
604
- isSubFlow,
605
- choiceOrgId
606
- },
607
- headers: { Accept: 'application/json,text/plain' },
608
- method: 'POST'
609
- };
610
- if (this.enableCustomLimitTimeSetting) {
611
- param.data.customLimitTime = customLimitTime;
612
- console.log(this.validate(),'this.validate()')
613
- if (!this.validate()) return;
614
- }
615
- this.loading = true;
616
- util
617
- .ajax(param)
618
- .then((res) => {
619
- const { message, status } = res;
620
- this.loading = false;
621
- if (status == 'success') {
622
- this.simpleTips && this.$message.success('提交成功');
623
- this.quit(true);
624
- } else {
625
- this.$message.error(message || '系统错误,请联系管理员!');
626
- }
627
- })
628
- .catch((err) => {
629
- this.loading = false;
630
- if (err.message && err.message !== 'canceled') {
631
- this.$message.error(err.message);
632
- }
633
- });
634
- },
635
- quit(val) {
636
- if (val === true) return this.$emit('cancel', val);
637
- this.$emit('cancel');
638
- },
639
- changeSelectUser(val, type) {
640
- const { nextUser, options } = val;
641
- let newNextUser = [];
642
- let obj = {};
643
- options.map((item) => {
644
- if (obj[item.stype]) {
645
- obj[item.stype].push(item.id);
646
- } else {
647
- obj[item.stype] = [item.id];
648
- }
649
- // if (newNextUser) {
650
- // newNextUser += `,${item.stype}-${item.id}`;
651
- // } else {
652
- // newNextUser = `${item.stype}-${item.id}`;
653
- // }
654
- });
655
- for (let key in obj) {
656
- newNextUser.push(`${key}-${obj[key].join(',')}`);
657
- }
658
-
659
- this.infoList[type] = newNextUser.join('|');
660
- },
661
- getNodeType() {
662
- util
663
- .ajax({
664
- url: findCodeValues,
665
- params: {
666
- ccCode: 'notification_type',
667
- userId: util.getStorage('userId'),
668
- pendingId: this.pendingId
669
- }
670
- })
671
- .then((res) => {
672
- const { status, data } = res;
673
- this.loading = false;
674
- if (status === 'success') {
675
- this.infoList.noticeList = data;
676
- }
677
- })
678
- .catch((err) => {
679
- this.loading = false;
680
- if (err.message && err.message !== 'canceled') {
681
- this.$message.error(err.message);
682
- }
683
- });
684
- },
685
- //获取通知信息
686
- getMessage() {
687
- let params = {
688
- pendingId: this.pendingId
689
- };
690
- util
691
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
692
- .then((res) => {
693
- if (res.status === 'success') {
694
- this.infoList.noticeInfo = res.message;
695
- }
696
- this.loading = false;
697
- })
698
- .catch((err) => {
699
- this.loading = false;
700
- if (err.message && err.message !== 'canceled') {
701
- this.$message.error(err.message);
702
- }
703
- });
704
- },
705
- getFind() {
706
- util
707
- .ajax({
708
- url: findSysCodes
709
- })
710
- .then((res) => {
711
- const { status, message } = res;
712
- if (status === 'success') {
713
- this.infoList.noticeType = message.split(',');
714
- let arr = [];
715
- this.infoList.noticeList.map((item) => {
716
- this.infoList.noticeType.map((x) => {
717
- if (x == item.cciValue) {
718
- arr.push(x);
719
- }
720
- });
721
- });
722
- this.infoList.noticeType = arr;
723
- } else {
724
- this.$message.error(message || '系统错误,请联系管理员!');
725
- }
726
- })
727
- .catch((err) => {
728
- this.loading = false;
729
- if (err.message && err.message !== 'canceled') {
730
- this.$message.error(err.message);
731
- }
732
- });
733
- }
734
- }
735
- };
736
- </script>
737
-
738
- <style></style>
1
+ <template>
2
+ <div class="es-flow-index task-union-examine" v-loading="loading">
3
+ <el-form
4
+ ref="infoList"
5
+ :model="infoList"
6
+ class="demo-dynamic"
7
+ :rules="rules"
8
+ label-width="120px"
9
+ >
10
+ <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
11
+ <CommonOpinions @change="(val) => (opinion = val)" />
12
+ </el-form-item>
13
+ <el-form-item
14
+ v-if="isHideCurrentOrg == 0"
15
+ :prop="type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'"
16
+ :label="
17
+ type == 'takeAdvice'
18
+ ? currentOrgName
19
+ ? currentOrgName
20
+ : '本单位'
21
+ : type == 'startDraf'
22
+ ? '呈送单位/对象'
23
+ : type === 'taskReview'
24
+ ? '复核人'
25
+ : type === 'twoOfficesDispatch'
26
+ ? '报送单位'
27
+ : '联合单位'
28
+ "
29
+ >
30
+ <SelectUser
31
+ :nextUser="
32
+ type != 'takeAdvice'
33
+ ? infoList.nextOtherOrgObj
34
+ : infoList.nextCurrentOrgObj
35
+ "
36
+ :multiple="newMultiple"
37
+ :selectorTags="0"
38
+ :mix="currentMix"
39
+ :isUnionSeal="type == 'unionSeal'"
40
+ :selectUserList="unionSealData || []"
41
+ @change="
42
+ changeSelectUser(
43
+ $event,
44
+ type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'
45
+ )
46
+ "
47
+ :types="
48
+ type == 'takeAdvice'
49
+ ? currentOrgTabs.length > 0
50
+ ? currentOrgTabs
51
+ : ['department', 'employee']
52
+ : type == 'startDraf'
53
+ ? ['enterprise', 'employee']
54
+ : ['enterprise']
55
+ "
56
+ :params="
57
+ type == 'startDraf' || type == 'unionExamine' ? otherParams : params
58
+ "
59
+ :tabs="currentOrgTabsParam"
60
+ :disabled="disabled"
61
+ :onlyName="onlyName"
62
+ />
63
+ </el-form-item>
64
+ <el-form-item
65
+ prop="nextOtherOrgObj"
66
+ v-if="isHideOtherOrg == 0 && type == 'takeAdvice'"
67
+ :label="otherOrgName ? otherOrgName : '外单位'"
68
+ >
69
+ <SelectUser
70
+ :nextUser="infoList.nextOtherOrgObj"
71
+ :where="{ filid: 'other', roleid: selectorParams.roleid }"
72
+ :multiple="newMultiple"
73
+ @change="changeSelectUser($event, 'nextOtherOrgObj')"
74
+ :mix="otherMix"
75
+ :disableds="otherOrgDisabledObjId"
76
+ :types="
77
+ foreignOrgTabs.length > 0
78
+ ? foreignOrgTabs
79
+ : isChoiceOtherOrgDept == 'true'
80
+ ? ['enterprise', 'department']
81
+ : ['enterprise']
82
+ "
83
+ :params="otherParams"
84
+ :tabs="foreignOrgTabsParam"
85
+ />
86
+ </el-form-item>
87
+ <el-form-item
88
+ v-if="enableCustomLimitTimeSetting"
89
+ prop="customLimitTime"
90
+ label="限时办理"
91
+ >
92
+ <!-- style="width: 49%; display: inline-block;" -->
93
+ <es-select
94
+ style="width: 20% !important; display: inline-block;"
95
+ v-model="infoList.customLimitTimeText"
96
+ placeholder="请选择"
97
+ @change="handleChangeTime"
98
+ sysCode="bpm_custom_limit_time"
99
+ ></es-select>
100
+ <el-input
101
+ style="width: 20%; display: inline-block;"
102
+ v-model="infoList.customLimitTime"
103
+ placeholder="请输入限时办理的天数"
104
+ class="input-with-select custom-limit-time"
105
+ >
106
+
107
+ </el-input>
108
+ <!-- <es-button
109
+ type="primary"
110
+ slot="append"
111
+ @click="
112
+ () => {
113
+ infoList.customLimitTime = '';
114
+ showCustomLimitTimeText = !showCustomLimitTimeText;
115
+ }
116
+ "
117
+ >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
118
+ > -->
119
+ </el-form-item>
120
+ <!-- :rules="[
121
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
122
+ ]" -->
123
+ <el-form-item
124
+ prop="noticeType"
125
+ label="通知方式"
126
+ v-show="infoList.noticeList.length != 0"
127
+ >
128
+ <el-checkbox-group
129
+ v-model="infoList.noticeType"
130
+ style="display: contents"
131
+ >
132
+ <el-checkbox
133
+ v-for="item of infoList.noticeList"
134
+ :key="item.cciValue"
135
+ :label="item.cciValue"
136
+ :disabled="
137
+ readOnlyNotificationType
138
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
139
+ : false
140
+ "
141
+ >
142
+ {{ item.shortName }}
143
+ </el-checkbox>
144
+ </el-checkbox-group>
145
+ </el-form-item>
146
+ <el-form-item
147
+ v-show="infoList.noticeType.length != 0"
148
+ prop="noticeInfo"
149
+ label="通知消息"
150
+ >
151
+ <es-input
152
+ style="
153
+ border-color: #ccc;
154
+ padding: 5px;
155
+ border-radius: 5px;
156
+ font-size: 13px;
157
+ "
158
+ type="textarea"
159
+ v-model="infoList.noticeInfo"
160
+ :readonly="notificationMessageReadOnly"
161
+ />
162
+ <!-- <span>{{ infoList.noticeInfo }}</span> -->
163
+ </el-form-item>
164
+ </el-form>
165
+ <div style="text-align: right">
166
+ <el-button type="primary" size="small" @click="subMit"> 确定 </el-button>
167
+ <el-button @click="quit" size="small"> 取消 </el-button>
168
+ </div>
169
+ </div>
170
+ </template>
171
+
172
+ <script>
173
+ import CommonOpinions from './CommonOpinions.vue';
174
+ import SelectUser from '../selectUser.vue';
175
+ import {
176
+ findSysCodes,
177
+ getNotificationMsg,
178
+ toTaskTakeAdvice,
179
+ findCodeValues,
180
+ toTaskStartDraft,
181
+ toTaskReview,
182
+ taskStartDraft,
183
+ toTaskUnionSeal,
184
+ taskReview,
185
+ toTwoOfficesDispatch,
186
+ taskUnionSeal,
187
+ twoOfficesDispatch,
188
+ taskUnionExamine,
189
+ taskTakeAdvice,
190
+ toTaskUnionExamine
191
+ } from 'eoss-ui/src/config/api';
192
+ import util from 'eoss-ui/src/utils/util.js';
193
+ export default {
194
+ name: 'TaskUnionExamine',
195
+ components: {
196
+ [CommonOpinions.name]: CommonOpinions,
197
+ [SelectUser.name]: SelectUser
198
+ },
199
+ props: {
200
+ pendingId: { type: String, default: '' },
201
+ type: { type: String, default: '' },
202
+ defaultOpinion: { type: String, default: '' },
203
+ oldOption: { type: String, default: '' },
204
+ disabled: { type: Boolean, default: false },
205
+ simpleTips: { type: Boolean, default: true },
206
+ multiple: { type: Boolean, default: true },
207
+ selectorParams: {
208
+ type: Object,
209
+ default: () => {
210
+ return {};
211
+ }
212
+ }
213
+ },
214
+ inheritAttrs: false,
215
+ data() {
216
+ return {
217
+ opinion: '', //办理意见
218
+ readOnlyNotificationType: '',
219
+ notificationMessageReadOnly: false,
220
+ otherMix: false,
221
+ enableCustomLimitTimeSetting: false,
222
+ showCustomLimitTimeText: false,
223
+ currentMix: false,
224
+ infoList: {
225
+ nextOtherOrgObj: [],
226
+ nextCurrentOrgObj: [],
227
+ noticeType: [],
228
+ noticeList: [],
229
+ noticeInfo: '',
230
+ opinion: '',
231
+ customLimitTime: '',
232
+ customLimitTimeText:''
233
+ },
234
+ onlyName: '',
235
+ unionSealData: [],
236
+ currentOrgTabs: [],
237
+ foreignOrgTabs: [],
238
+ foreignOrgTabsParam: {},
239
+ currentOrgTabsParam: {},
240
+ currentOrgProcessKey: '',
241
+ otherOrgDisabledObjId: [],
242
+ isSubFlow: true,
243
+ choiceDeptId: '',
244
+ choiceOrgId: '',
245
+ isSinglePage: false,
246
+ isChoiceOtherOrgDept: '',
247
+ currentOrgName: '',
248
+ otherOrgName: '',
249
+ newMultiple: true,
250
+ params: { filid: 'all' },
251
+ isHideOtherOrg: '',
252
+ isHideCurrentOrg: 0,
253
+ isOpinionRequired: 0,
254
+ otherParams: { filid: 'other' },
255
+ loading: false
256
+ };
257
+ },
258
+ computed: {
259
+ rules() {
260
+ return {
261
+ customLimitTime: [
262
+ {
263
+ required: this.enableCustomLimitTimeSetting,
264
+ message: this.showCustomLimitTimeText
265
+ ? '请输入限时办理天数'
266
+ : '请选择限时办理天数',
267
+ trigger: 'blur'
268
+ },
269
+ {
270
+ required: this.enableCustomLimitTimeSetting,
271
+ validator: this.checkCustomLimitTime,
272
+ trigger: 'change'
273
+ }
274
+ ]
275
+ };
276
+ }
277
+ },
278
+ mounted() {
279
+ this.loading = true;
280
+ this.newMultiple = this.multiple;
281
+ this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
282
+ this.opinion = this.oldOption;
283
+ this.getNodeType();
284
+ if (this.type === 'taskReview') return this.getTaskReview();
285
+ this.getInfo();
286
+ },
287
+ methods: {
288
+ handleChangeTime(val){
289
+ this.infoList.customLimitTime = val;
290
+ },
291
+ validate() {
292
+ let validSate = true;
293
+ this.$refs.infoList.validate((valid) => {
294
+ if (valid) {
295
+ validSate = true;
296
+ } else {
297
+ validSate = false;
298
+ }
299
+ });
300
+ return validSate;
301
+ },
302
+ checkCustomLimitTime(rule, value, callback) {
303
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
304
+ callback(new Error('请输入正确的天数'));
305
+ this.infoList.customLimitTime = '';
306
+ } else {
307
+ callback();
308
+ }
309
+ },
310
+ isMultiple(val) {
311
+ if (val == 7 || val == 9 || val == 11) {
312
+ this.newMultiple = false;
313
+ }
314
+ },
315
+ subTaskReview() {
316
+ let {
317
+ infoList: { nextOtherOrgObj, noticeType, noticeInfo },
318
+ businessId,
319
+ opinion,
320
+ isSubFlow,
321
+ currentOrgProcessKey,
322
+ pendingId
323
+ } = this;
324
+ let params = {
325
+ url: taskReview,
326
+ data: {
327
+ nextUserId: nextOtherOrgObj.join(','),
328
+ notificationType: noticeType.join(','),
329
+ notificationMsg: noticeInfo,
330
+ opinion,
331
+ isSubFlow,
332
+ businessId,
333
+ currentOrgProcessKey,
334
+ pendingId
335
+ },
336
+ method: 'POST'
337
+ };
338
+ this.loading = true;
339
+ util
340
+ .ajax(params)
341
+ .then((res) => {
342
+ const { message, status } = res;
343
+ this.loading = false;
344
+ if (status === 'success') {
345
+ this.simpleTips && this.$message.success('提交成功');
346
+ this.quit(true);
347
+ } else {
348
+ this.$message.error(message || '系统错误,请联系管理员!');
349
+ }
350
+ })
351
+ .catch((err) => {
352
+ this.loading = false;
353
+ if (err.message && err.message !== 'canceled') {
354
+ this.$message.error(err.message);
355
+ }
356
+ });
357
+ },
358
+ getTaskReview() {
359
+ let params = {
360
+ url: toTaskReview,
361
+ params: { pendingId: this.pendingId }
362
+ };
363
+ util
364
+ .ajax(params)
365
+ .then((res) => {
366
+ const { status, message } = res;
367
+ this.loading = false;
368
+ if (status === 'success') {
369
+ const {
370
+ data: { initiatorUser, taskExamine }
371
+ } = res;
372
+ if (taskExamine.opinion) {
373
+ this.opinion = taskExamine.opinion;
374
+ }
375
+ this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
376
+ this.onlyName = initiatorUser.username;
377
+ this.isSubFlow = taskExamine.isSubFlow;
378
+ this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
379
+ this.getFind();
380
+ this.getMessage();
381
+ } else {
382
+ this.$message.error(message || '系统错误,请联系管理员!');
383
+ }
384
+ })
385
+ .catch((err) => {
386
+ this.loading = false;
387
+ if (err.message && err.message !== 'canceled') {
388
+ this.$message.error(err.message);
389
+ }
390
+ });
391
+ },
392
+ getInfo() {
393
+ let params = {
394
+ url:
395
+ this.type == 'takeAdvice'
396
+ ? toTaskTakeAdvice
397
+ : this.type === 'startDraf'
398
+ ? toTaskStartDraft
399
+ : this.type == 'unionSeal'
400
+ ? toTaskUnionSeal
401
+ : this.type == 'twoOfficesDispatch'
402
+ ? toTwoOfficesDispatch
403
+ : toTaskUnionExamine,
404
+ params: { pendingId: this.pendingId },
405
+ headers: { Accept: 'application/json,text/plain' }
406
+ };
407
+ util
408
+ .ajax(params)
409
+ .then((res) => {
410
+ const { message, status } = res;
411
+ this.loading = false;
412
+ if (status == 'success') {
413
+ const {
414
+ data: {
415
+ choiceDeptId,
416
+ choiceOrgId,
417
+ taskExamine,
418
+ unionDispatchOrgName,
419
+ readOnlyNotificationType,
420
+ notificationMessageReadOnly,
421
+ unionDispatchOrgId,
422
+ otherOrgDisabledObjId,
423
+ orgNames,
424
+ enableCustomLimitTimeSetting,
425
+ defaultCustomLimitDays,
426
+ nodeInfoMap: {
427
+ nodeExtAttr: {
428
+ userSelectionType,
429
+ isHideOtherOrg,
430
+ isHideCurrentOrg,
431
+ isOpinionRequired
432
+ }
433
+ }
434
+ }
435
+ } = res;
436
+ if (otherOrgDisabledObjId) {
437
+ this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
438
+ }
439
+ this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
440
+ if (this.enableCustomLimitTimeSetting && defaultCustomLimitDays) {
441
+ this.infoList.customLimitTime = this.infoList.customLimitTimeText = defaultCustomLimitDays + '';
442
+
443
+ }
444
+ if (res.data.customizedConfig) {
445
+ if (res.data.customizedConfig.currentOrgSelectorCustomized) {
446
+ this.currentMix =
447
+ res.data.customizedConfig.currentOrgSelectorSelectMix ==
448
+ 'true';
449
+ this.currentOrgTabs =
450
+ res.data.customizedConfig.currentOrgSelectorItemList.split(
451
+ ','
452
+ );
453
+ let param =
454
+ res.data.customizedConfig.currentOrgSelectorRangeList.split(
455
+ ','
456
+ );
457
+ this.currentOrgTabs.map((x, i) => {
458
+ this.params[x] = {
459
+ filid:
460
+ param[i] == 'my'
461
+ ? (this.params.filid = JSON.parse(
462
+ util.getStorage('mainConfig')
463
+ ).userModel.orgId)
464
+ : param[i]
465
+ };
466
+ });
467
+ } else {
468
+ if (this.type == 'takeAdvice') {
469
+ this.params.filid = JSON.parse(
470
+ util.getStorage('mainConfig')
471
+ ).userModel.orgId;
472
+ }
473
+ }
474
+
475
+ if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
476
+ this.otherMix =
477
+ res.data.customizedConfig.foreignOrgSelectorSelectMix ==
478
+ 'true';
479
+ this.foreignOrgTabs =
480
+ res.data.customizedConfig.foreignOrgSelectorItemList.split(
481
+ ','
482
+ );
483
+ let param =
484
+ res.data.customizedConfig.foreignOrgSelectorRangeList.split(
485
+ ','
486
+ );
487
+ this.foreignOrgTabs.map((x, i) => {
488
+ this.otherParams[x] = {
489
+ filid: param[i],
490
+ roleid: this.selectorParams.roleid
491
+ };
492
+ });
493
+ }
494
+ }
495
+ this.readOnlyNotificationType = readOnlyNotificationType;
496
+ this.notificationMessageReadOnly =
497
+ notificationMessageReadOnly == 'true';
498
+ this.isSinglePage = taskExamine.isSinglePage;
499
+ this.isSubFlow = taskExamine.isSubFlow;
500
+ if (taskExamine.opinion) {
501
+ this.opinion = taskExamine.opinion;
502
+ }
503
+ this.choiceDeptId = choiceDeptId;
504
+ this.choiceOrgId = choiceOrgId;
505
+ if (this.type == 'takeAdvice' || this.type == 'startDraf') {
506
+ this.currentOrgName = res.data.currentOrgName;
507
+ this.otherOrgName = res.data.otherOrgName;
508
+ this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
509
+ this.isHideOtherOrg = isHideOtherOrg;
510
+ this.isHideCurrentOrg = isHideCurrentOrg;
511
+ }
512
+ this.isOpinionRequired = isOpinionRequired;
513
+ if (this.type == 'unionSeal') {
514
+ let names = unionDispatchOrgName.split(',');
515
+ let ids = unionDispatchOrgId.split(',');
516
+ names.map((x, i) => {
517
+ if (x) {
518
+ this.unionSealData.push({
519
+ showname: x,
520
+ showid: ids[i]
521
+ });
522
+ }
523
+ });
524
+ // this.onlyName = unionDispatchOrgName;
525
+ // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
526
+ }
527
+ if (this.type == 'twoOfficesDispatch') {
528
+ this.onlyName = orgNames;
529
+ this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
530
+ }
531
+ this.isMultiple(userSelectionType);
532
+ this.getFind();
533
+ this.getMessage();
534
+ } else {
535
+ this.$message.error(message || '系统错误,请联系管理员!');
536
+ }
537
+ })
538
+ .catch((err) => {
539
+ this.loading = false;
540
+ if (err.message && err.message !== 'canceled') {
541
+ this.$message.error(err.message);
542
+ }
543
+ });
544
+ },
545
+ subMit() {
546
+ // if (
547
+ // this.infoList.nextOtherOrgObjName == '' ||
548
+ // this.infoList.nextOtherOrgObjName.length == 0
549
+ // )
550
+ // return this.$message.warning('请选择联合单位');
551
+ if (this.type === 'taskReview') return this.subTaskReview();
552
+ let {
553
+ infoList: {
554
+ nextCurrentOrgObj,
555
+ nextOtherOrgObj,
556
+ noticeType,
557
+ customLimitTime,
558
+ noticeInfo
559
+ },
560
+ isOpinionRequired,
561
+ opinion,
562
+ type,
563
+ isHideOtherOrg,
564
+ choiceDeptId,
565
+ choiceOrgId,
566
+ isHideCurrentOrg,
567
+ isSubFlow,
568
+ pendingId
569
+ } = this;
570
+ console.log(nextCurrentOrgObj);
571
+ console.log(nextOtherOrgObj);
572
+ if (
573
+ type == 'takeAdvice' &&
574
+ !nextCurrentOrgObj &&
575
+ isHideCurrentOrg == 0 &&
576
+ nextCurrentOrgObj.length == 0 &&
577
+ isHideOtherOrg == 0 &&
578
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
579
+ ) {
580
+ return this.$message.warning('请选择处理对象!');
581
+ } else if (
582
+ isHideCurrentOrg == 0 &&
583
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
584
+ (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
585
+ ) {
586
+ return this.$message.warning('请选择处理对象!');
587
+ }
588
+
589
+ if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
590
+ return this.$message.warning('当前步骤必须输入意见!');
591
+ }
592
+ // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
593
+ // return this.$message.warning('暂未开放,敬请期待!');
594
+ const param = {
595
+ url:
596
+ this.type === 'startDraf'
597
+ ? taskStartDraft
598
+ : this.type == 'unionSeal'
599
+ ? taskUnionSeal
600
+ : this.type === 'twoOfficesDispatch'
601
+ ? twoOfficesDispatch
602
+ : this.type == 'takeAdvice'
603
+ ? taskTakeAdvice
604
+ : taskUnionExamine,
605
+ data: {
606
+ opinion,
607
+ pendingId,
608
+
609
+ nextOtherOrgObj:
610
+ this.type == 'unionSeal'
611
+ ? this.unionSealData.map((x) => x.showid).join(',')
612
+ : Array.isArray(nextOtherOrgObj)
613
+ ? nextOtherOrgObj.join(',')
614
+ : nextOtherOrgObj,
615
+ nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
616
+ ? nextCurrentOrgObj.join(',')
617
+ : nextCurrentOrgObj,
618
+ notificationMsg: noticeInfo,
619
+ notificationType: noticeType.join(','),
620
+ choiceDeptId,
621
+ isSubFlow,
622
+ choiceOrgId
623
+ },
624
+ headers: { Accept: 'application/json,text/plain' },
625
+ method: 'POST'
626
+ };
627
+ if (this.enableCustomLimitTimeSetting) {
628
+ param.data.customLimitTime = customLimitTime;
629
+ console.log(this.validate(), 'this.validate()');
630
+ if (!this.validate()) return;
631
+ }
632
+ this.loading = true;
633
+ util
634
+ .ajax(param)
635
+ .then((res) => {
636
+ const { message, status } = res;
637
+ this.loading = false;
638
+ if (status == 'success') {
639
+ this.simpleTips && this.$message.success('提交成功');
640
+ this.quit(true);
641
+ } else {
642
+ this.$message.error(message || '系统错误,请联系管理员!');
643
+ }
644
+ })
645
+ .catch((err) => {
646
+ this.loading = false;
647
+ if (err.message && err.message !== 'canceled') {
648
+ this.$message.error(err.message);
649
+ }
650
+ });
651
+ },
652
+ quit(val) {
653
+ if (val === true) return this.$emit('cancel', val);
654
+ this.$emit('cancel');
655
+ },
656
+ changeSelectUser(val, type) {
657
+ const { nextUser, options } = val;
658
+ let newNextUser = [];
659
+ let obj = {};
660
+ options.map((item) => {
661
+ if (obj[item.stype]) {
662
+ obj[item.stype].push(item.id);
663
+ } else {
664
+ obj[item.stype] = [item.id];
665
+ }
666
+ // if (newNextUser) {
667
+ // newNextUser += `,${item.stype}-${item.id}`;
668
+ // } else {
669
+ // newNextUser = `${item.stype}-${item.id}`;
670
+ // }
671
+ });
672
+ for (let key in obj) {
673
+ newNextUser.push(`${key}-${obj[key].join(',')}`);
674
+ }
675
+
676
+ this.infoList[type] = newNextUser.join('|');
677
+ },
678
+ getNodeType() {
679
+ util
680
+ .ajax({
681
+ url: findCodeValues,
682
+ params: {
683
+ ccCode: 'notification_type',
684
+ userId: util.getStorage('userId'),
685
+ pendingId: this.pendingId
686
+ }
687
+ })
688
+ .then((res) => {
689
+ const { status, data } = res;
690
+ this.loading = false;
691
+ if (status === 'success') {
692
+ this.infoList.noticeList = data;
693
+ }
694
+ })
695
+ .catch((err) => {
696
+ this.loading = false;
697
+ if (err.message && err.message !== 'canceled') {
698
+ this.$message.error(err.message);
699
+ }
700
+ });
701
+ },
702
+ //获取通知信息
703
+ getMessage() {
704
+ let params = {
705
+ pendingId: this.pendingId
706
+ };
707
+ util
708
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
709
+ .then((res) => {
710
+ if (res.status === 'success') {
711
+ this.infoList.noticeInfo = res.message;
712
+ }
713
+ this.loading = false;
714
+ })
715
+ .catch((err) => {
716
+ this.loading = false;
717
+ if (err.message && err.message !== 'canceled') {
718
+ this.$message.error(err.message);
719
+ }
720
+ });
721
+ },
722
+ getFind() {
723
+ util
724
+ .ajax({
725
+ url: findSysCodes
726
+ })
727
+ .then((res) => {
728
+ const { status, message } = res;
729
+ if (status === 'success') {
730
+ this.infoList.noticeType = message.split(',');
731
+ let arr = [];
732
+ this.infoList.noticeList.map((item) => {
733
+ this.infoList.noticeType.map((x) => {
734
+ if (x == item.cciValue) {
735
+ arr.push(x);
736
+ }
737
+ });
738
+ });
739
+ this.infoList.noticeType = arr;
740
+ } else {
741
+ this.$message.error(message || '系统错误,请联系管理员!');
742
+ }
743
+ })
744
+ .catch((err) => {
745
+ this.loading = false;
746
+ if (err.message && err.message !== 'canceled') {
747
+ this.$message.error(err.message);
748
+ }
749
+ });
750
+ }
751
+ }
752
+ };
753
+ </script>
754
+
755
+ <style></style>