eoss-ui 0.6.60 → 0.6.62

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 (265) hide show
  1. package/lib/button-group.js +118 -114
  2. package/lib/button.js +118 -114
  3. package/lib/checkbox-group.js +120 -116
  4. package/lib/config/api.js +3 -1
  5. package/lib/data-table-form.js +120 -116
  6. package/lib/data-table.js +123 -119
  7. package/lib/date-picker.js +118 -114
  8. package/lib/dialog.js +118 -114
  9. package/lib/eoss-ui.common.js +2085 -1334
  10. package/lib/flow-group.js +118 -114
  11. package/lib/flow-list.js +246 -208
  12. package/lib/flow.js +1712 -995
  13. package/lib/form.js +120 -116
  14. package/lib/handle-user.js +119 -115
  15. package/lib/handler.js +119 -115
  16. package/lib/icon.js +119 -115
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +118 -114
  19. package/lib/input.js +118 -114
  20. package/lib/login.js +131 -127
  21. package/lib/main.js +285 -281
  22. package/lib/nav.js +118 -114
  23. package/lib/notify.js +121 -117
  24. package/lib/page.js +118 -114
  25. package/lib/pagination.js +118 -114
  26. package/lib/player.js +118 -114
  27. package/lib/qr-code.js +131 -127
  28. package/lib/radio-group.js +120 -116
  29. package/lib/retrial-auth.js +121 -117
  30. package/lib/select-ganged.js +120 -116
  31. package/lib/select.js +120 -116
  32. package/lib/selector-panel.js +136 -132
  33. package/lib/selector.js +119 -115
  34. package/lib/sizer.js +120 -116
  35. package/lib/steps.js +118 -114
  36. package/lib/switch.js +118 -114
  37. package/lib/table-form.js +118 -114
  38. package/lib/tabs.js +118 -114
  39. package/lib/tips.js +119 -115
  40. package/lib/tree-group.js +118 -114
  41. package/lib/tree.js +119 -115
  42. package/lib/upload.js +130 -126
  43. package/lib/wujie.js +118 -114
  44. package/lib/wxlogin.js +118 -114
  45. package/package.json +159 -159
  46. package/packages/button/index.js +5 -5
  47. package/packages/button/src/main.vue +418 -418
  48. package/packages/button-group/index.js +5 -5
  49. package/packages/button-group/src/main.vue +298 -298
  50. package/packages/calendar/index.js +5 -5
  51. package/packages/card/index.js +5 -5
  52. package/packages/card/src/main.vue +156 -156
  53. package/packages/cascader/index.js +5 -5
  54. package/packages/cascader/src/main.vue +168 -168
  55. package/packages/checkbox-group/index.js +5 -5
  56. package/packages/checkbox-group/src/main.vue +333 -333
  57. package/packages/clients/index.js +5 -5
  58. package/packages/clients/src/main.vue +151 -151
  59. package/packages/data-table/index.js +5 -5
  60. package/packages/data-table/src/children.vue +39 -39
  61. package/packages/data-table/src/column.vue +989 -989
  62. package/packages/data-table/src/main.vue +1822 -1822
  63. package/packages/data-table/src/sizer.vue +195 -195
  64. package/packages/data-table-form/index.js +5 -5
  65. package/packages/data-table-form/src/checkbox.vue +101 -101
  66. package/packages/data-table-form/src/colgroup.vue +17 -17
  67. package/packages/data-table-form/src/main.vue +181 -181
  68. package/packages/data-table-form/src/radio.vue +65 -65
  69. package/packages/data-table-form/src/table.vue +233 -233
  70. package/packages/data-table-form/src/tbody.vue +336 -336
  71. package/packages/data-table-form/src/thead.vue +68 -68
  72. package/packages/date-picker/index.js +5 -5
  73. package/packages/date-picker/src/main.vue +236 -236
  74. package/packages/dialog/index.js +5 -5
  75. package/packages/enable-drag/index.js +5 -5
  76. package/packages/enterprise/index.js +5 -5
  77. package/packages/enterprise/src/main.vue +66 -66
  78. package/packages/error-page/index.js +5 -5
  79. package/packages/error-page/src/main.vue +44 -44
  80. package/packages/flow/index.js +5 -5
  81. package/packages/flow/src/component/Circulate.vue +322 -0
  82. package/packages/flow/src/component/CommonOpinions.vue +346 -345
  83. package/packages/flow/src/component/CustomPreset.vue +322 -322
  84. package/packages/flow/src/component/FileList.vue +99 -99
  85. package/packages/flow/src/component/Preset.vue +255 -255
  86. package/packages/flow/src/component/SendMsg.vue +241 -229
  87. package/packages/flow/src/component/TimeLimit.vue +190 -190
  88. package/packages/flow/src/component/taskUnionExamine.vue +619 -611
  89. package/packages/flow/src/form.vue +121 -121
  90. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  91. package/packages/flow/src/main.vue +3275 -3175
  92. package/packages/flow/src/processForm.vue +1091 -1087
  93. package/packages/flow/src/processReject.vue +294 -293
  94. package/packages/flow/src/reset.vue +900 -900
  95. package/packages/flow/src/startTaskRead.vue +659 -646
  96. package/packages/flow/src/supervise.vue +149 -144
  97. package/packages/flow/src/table.vue +58 -58
  98. package/packages/flow-group/index.js +5 -5
  99. package/packages/flow-group/src/main.vue +688 -688
  100. package/packages/flow-list/index.js +5 -5
  101. package/packages/flow-list/src/main.vue +1718 -1691
  102. package/packages/form/index.js +5 -5
  103. package/packages/form/src/main.vue +3583 -3583
  104. package/packages/form/src/table.vue +1426 -1426
  105. package/packages/handle-user/index.js +5 -5
  106. package/packages/handle-user/src/main.vue +138 -138
  107. package/packages/handler/index.js +5 -5
  108. package/packages/handler/src/main.vue +493 -493
  109. package/packages/icon/index.js +5 -5
  110. package/packages/icon/src/main.vue +101 -101
  111. package/packages/icons/index.js +5 -5
  112. package/packages/icons/src/main.vue +81 -81
  113. package/packages/input/index.js +5 -5
  114. package/packages/input/src/main.vue +356 -356
  115. package/packages/input-number/index.js +5 -5
  116. package/packages/input-number/src/main.vue +106 -106
  117. package/packages/label/index.js +5 -5
  118. package/packages/label/src/main.vue +457 -457
  119. package/packages/layout/index.js +5 -5
  120. package/packages/layout/src/item.vue +152 -152
  121. package/packages/layout/src/main.vue +31 -31
  122. package/packages/login/index.js +5 -5
  123. package/packages/login/src/main.vue +1942 -1942
  124. package/packages/login/src/resetPassword.vue +562 -562
  125. package/packages/main/index.js +5 -5
  126. package/packages/main/src/default/message.vue +249 -249
  127. package/packages/main/src/default/notice.vue +157 -157
  128. package/packages/main/src/default/userinfo.vue +503 -503
  129. package/packages/main/src/public/online.vue +89 -89
  130. package/packages/main/src/public/search.vue +462 -462
  131. package/packages/main/src/public/settings.vue +221 -221
  132. package/packages/main/src/simplicity/apps.vue +388 -388
  133. package/packages/main/src/simplicity/avatar.vue +82 -82
  134. package/packages/main/src/simplicity/handler.vue +259 -259
  135. package/packages/main/src/simplicity/index.vue +2086 -2086
  136. package/packages/main/src/simplicity/lists.vue +84 -84
  137. package/packages/main/src/simplicity/menu-list.vue +135 -135
  138. package/packages/main/src/simplicity/message.vue +259 -259
  139. package/packages/main/src/simplicity/notice.vue +190 -190
  140. package/packages/main/src/simplicity/router-page.vue +45 -45
  141. package/packages/main/src/simplicity/sub-menu.vue +264 -264
  142. package/packages/main/src/simplicity/user.vue +257 -257
  143. package/packages/main/src/simplicity/userinfo.vue +312 -312
  144. package/packages/menu/index.js +5 -5
  145. package/packages/menu/src/main.vue +584 -584
  146. package/packages/nav/index.js +5 -5
  147. package/packages/nav/src/main.vue +351 -351
  148. package/packages/notify/index.js +5 -5
  149. package/packages/notify/src/main.vue +538 -538
  150. package/packages/page/index.js +5 -5
  151. package/packages/page/src/main.vue +167 -167
  152. package/packages/pagination/index.js +5 -5
  153. package/packages/pagination/src/main.vue +96 -96
  154. package/packages/player/index.js +5 -5
  155. package/packages/player/src/main.vue +194 -194
  156. package/packages/qr-code/index.js +5 -5
  157. package/packages/qr-code/src/main.vue +170 -170
  158. package/packages/radio-group/index.js +6 -6
  159. package/packages/radio-group/src/main.vue +319 -319
  160. package/packages/retrial-auth/index.js +5 -5
  161. package/packages/retrial-auth/src/main.vue +280 -280
  162. package/packages/select/index.js +5 -5
  163. package/packages/select/src/main.vue +778 -778
  164. package/packages/select-ganged/index.js +5 -5
  165. package/packages/select-ganged/src/main.vue +724 -724
  166. package/packages/selector/index.js +5 -5
  167. package/packages/selector/src/main.vue +687 -687
  168. package/packages/selector-panel/index.js +5 -5
  169. package/packages/selector-panel/src/main.vue +1027 -1027
  170. package/packages/selector-panel/src/selection.vue +177 -177
  171. package/packages/selector-panel/src/tree.vue +129 -129
  172. package/packages/sizer/index.js +5 -5
  173. package/packages/sizer/src/main.vue +254 -254
  174. package/packages/steps/index.js +5 -5
  175. package/packages/steps/src/main.vue +181 -181
  176. package/packages/switch/index.js +5 -5
  177. package/packages/switch/src/main.vue +154 -154
  178. package/packages/table-form/index.js +5 -5
  179. package/packages/tabs/index.js +5 -5
  180. package/packages/tabs/src/main.vue +788 -788
  181. package/packages/tabs-panel/index.js +5 -5
  182. package/packages/tabs-panel/src/main.vue +29 -29
  183. package/packages/theme-chalk/src/base.scss +260 -260
  184. package/packages/theme-chalk/src/button-group.scss +176 -176
  185. package/packages/theme-chalk/src/button.scss +24 -24
  186. package/packages/theme-chalk/src/calendar.scss +113 -113
  187. package/packages/theme-chalk/src/card.scss +99 -99
  188. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  189. package/packages/theme-chalk/src/clients.scss +87 -87
  190. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  191. package/packages/theme-chalk/src/data-table.scss +293 -293
  192. package/packages/theme-chalk/src/date-picker.scss +7 -7
  193. package/packages/theme-chalk/src/dialog.scss +77 -77
  194. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  195. package/packages/theme-chalk/src/enterprise.scss +5 -5
  196. package/packages/theme-chalk/src/error-page.scss +18 -18
  197. package/packages/theme-chalk/src/flow-group.scss +110 -110
  198. package/packages/theme-chalk/src/flow-list.scss +39 -39
  199. package/packages/theme-chalk/src/flow.scss +343 -343
  200. package/packages/theme-chalk/src/form.scss +496 -496
  201. package/packages/theme-chalk/src/handle-user.scss +40 -40
  202. package/packages/theme-chalk/src/handler.scss +143 -143
  203. package/packages/theme-chalk/src/icon.scss +1792 -1792
  204. package/packages/theme-chalk/src/icons.scss +99 -99
  205. package/packages/theme-chalk/src/input.scss +9 -9
  206. package/packages/theme-chalk/src/label.scss +24 -24
  207. package/packages/theme-chalk/src/layout.scss +46 -46
  208. package/packages/theme-chalk/src/login.scss +969 -969
  209. package/packages/theme-chalk/src/main.scss +663 -663
  210. package/packages/theme-chalk/src/menu.scss +222 -222
  211. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  212. package/packages/theme-chalk/src/nav.scss +111 -111
  213. package/packages/theme-chalk/src/page.scss +3 -3
  214. package/packages/theme-chalk/src/pagination.scss +29 -29
  215. package/packages/theme-chalk/src/player.scss +9 -9
  216. package/packages/theme-chalk/src/qr-code.scss +17 -17
  217. package/packages/theme-chalk/src/radio-group.scss +9 -9
  218. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  219. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  220. package/packages/theme-chalk/src/select.scss +8 -8
  221. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  222. package/packages/theme-chalk/src/selector.scss +91 -91
  223. package/packages/theme-chalk/src/simplicity.scss +1351 -1351
  224. package/packages/theme-chalk/src/sizer.scss +36 -36
  225. package/packages/theme-chalk/src/steps.scss +88 -88
  226. package/packages/theme-chalk/src/switch.scss +3 -3
  227. package/packages/theme-chalk/src/table-form.scss +1 -1
  228. package/packages/theme-chalk/src/tabs.scss +87 -87
  229. package/packages/theme-chalk/src/tips.scss +7 -7
  230. package/packages/theme-chalk/src/toolbar.scss +179 -179
  231. package/packages/theme-chalk/src/tree-group.scss +72 -72
  232. package/packages/theme-chalk/src/tree.scss +165 -165
  233. package/packages/theme-chalk/src/upload.scss +168 -168
  234. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  235. package/packages/tips/index.js +5 -5
  236. package/packages/tips/src/main.vue +141 -141
  237. package/packages/toolbar/index.js +5 -5
  238. package/packages/toolbar/src/main.vue +430 -430
  239. package/packages/tree/index.js +5 -5
  240. package/packages/tree-group/index.js +5 -5
  241. package/packages/upload/index.js +5 -5
  242. package/packages/upload/src/main.vue +1347 -1347
  243. package/packages/upload/src/picture.js +15 -15
  244. package/packages/wujie/index.js +5 -5
  245. package/packages/wujie/src/main.vue +145 -145
  246. package/packages/wxlogin/index.js +5 -5
  247. package/packages/wxlogin/src/main.vue +128 -128
  248. package/src/config/api.js +290 -286
  249. package/src/config/image.js +2 -2
  250. package/src/index.js +160 -160
  251. package/src/utils/bus.js +3 -3
  252. package/src/utils/date-util.js +312 -312
  253. package/src/utils/http.js +50 -50
  254. package/src/utils/rules.js +18 -18
  255. package/src/utils/store.js +21 -21
  256. package/src/utils/webSocket.js +107 -107
  257. package/packages/.DS_Store +0 -0
  258. package/packages/autocomplete/.DS_Store +0 -0
  259. package/packages/menu/.DS_Store +0 -0
  260. package/packages/scrollbar/.DS_Store +0 -0
  261. package/packages/select/.DS_Store +0 -0
  262. package/packages/theme-chalk/src/.DS_Store +0 -0
  263. package/packages/upload/.DS_Store +0 -0
  264. package/src/.DS_Store +0 -0
  265. package/src/utils/.DS_Store +0 -0
@@ -1,646 +1,659 @@
1
- <template>
2
- <div
3
- v-loading="loading"
4
- class="task-read"
5
- element-loading-text="加载中..."
6
- element-loading-spinner="el-icon-loading"
7
- element-loading-background="rgba(255, 255,255, 0.8)"
8
- >
9
- <el-form
10
- ref="nextNode"
11
- :model="nextNode"
12
- class="demo-dynamic"
13
- label-width="110px"
14
- >
15
- <div
16
- :style="`max-height: ${
17
- typeCode ? 'unset' : '290px'
18
- }; overflow-y: auto; margin-bottom: 10px`"
19
- >
20
- <el-form-item
21
- prop="handleExplain"
22
- label="当前步骤"
23
- v-if="type === 'transfer'"
24
- >
25
- <el-input readonly v-model="nextNode.nodeName"></el-input>
26
- </el-form-item>
27
- <el-form-item
28
- v-if="type == 'transfer' && transferInfo.isSinglePage"
29
- prop="handleExplain"
30
- label="意见"
31
- >
32
- <el-input
33
- v-model="nextNode.handleExplain"
34
- placeholder="请填写意见"
35
- ></el-input>
36
- </el-form-item>
37
- <el-form-item
38
- prop="nextUser"
39
- :label="
40
- type === 'transfer'
41
- ? '转办对象'
42
- : configInfo.isCdjxjTaskHandle == 'true'
43
- ? '接收人'
44
- : '办理用户'
45
- "
46
- >
47
- <SelectUser
48
- :nextUser="nextNode.nextUser"
49
- :options="userOptions"
50
- :multiple="type != 'transfer' ? multiple : false"
51
- :mix="type != 'transfer'"
52
- :selectUserList="selectUserList"
53
- :types="
54
- type == 'transfer'
55
- ? ['employee', 'persongroup']
56
- : ['employee', 'enterprise', 'department', 'persongroup']
57
- "
58
- @change="changeSelectUser($event, 'nextUser')"
59
- :tabs="tabs"
60
- :where="{ type: 'user' }"
61
- />
62
- </el-form-item>
63
-
64
- <el-form-item
65
- v-if="configInfo.isCdjxjTaskHandle != 'true' && type != 'transfer'"
66
- prop="cy"
67
- label="常用群组"
68
- ><el-checkbox-group v-model="selectCheck">
69
- <el-checkbox
70
- @change="handleSelectCheck($event, item)"
71
- v-for="item in configInfo.groups"
72
- :label="item.name"
73
- :key="item.id"
74
- >{{ item.name }}</el-checkbox
75
- >
76
- </el-checkbox-group>
77
- </el-form-item>
78
- <el-form-item
79
- v-if="configInfo.fyDoresult == 'true'"
80
- prop="showDoresult"
81
- label="流程意见"
82
- ><el-radio v-model="nextNode.showDoresult" label="0">分阅</el-radio>
83
- <el-radio v-model="nextNode.showDoresult" label="1">不分阅</el-radio>
84
- </el-form-item>
85
- <el-form-item
86
- v-if="configInfo.fyeh == 'true'"
87
- prop="isInHistory"
88
- label="分阅记录"
89
- ><el-radio v-model="nextNode.isInHistory" label="0">记录</el-radio>
90
- <el-radio v-model="nextNode.isInHistory" label="1">不记录</el-radio>
91
- </el-form-item>
92
- <el-form-item
93
- v-if="configInfo.download"
94
- prop="isDownload"
95
- label="打印下载文件"
96
- ><el-radio v-model="nextNode.isDownload" label="0">允许</el-radio>
97
- <el-radio v-model="nextNode.isDownload" label="1">不允许</el-radio>
98
- </el-form-item>
99
- <el-form-item
100
- prop="handleExplain"
101
- :label="configInfo.isCdjxjTaskHandle == 'true' ? '附言' : '办理说明'"
102
- v-if="type != 'transfer'"
103
- >
104
- <el-input
105
- v-model="nextNode.handleExplain"
106
- placeholder="请填写办理说明"
107
- ></el-input>
108
- </el-form-item>
109
- <el-form-item
110
- v-if="configInfo.isCdjxjTaskHandle != 'true'"
111
- prop="noticeType"
112
- label="通知方式"
113
- :rules="[
114
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
115
- ]"
116
- >
117
- <el-checkbox-group
118
- v-model="nextNode.noticeType"
119
- style="display: contents"
120
- >
121
- <el-checkbox
122
- v-for="item of noticeList"
123
- :key="item.cciValue"
124
- :label="item.cciValue"
125
- :disabled="
126
- readOnlyNotificationType
127
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
128
- : false
129
- "
130
- >
131
- {{ item.shortName }}
132
- </el-checkbox>
133
- </el-checkbox-group>
134
- </el-form-item>
135
- <el-form-item
136
- v-show="
137
- nextNode.noticeType.length != 0 &&
138
- configInfo.isCdjxjTaskHandle != 'true'
139
- "
140
- prop="nextNode"
141
- label="通知消息"
142
- >
143
- <es-input
144
- style="
145
- border-color: #ccc;
146
- padding: 5px;
147
- border-radius: 5px;
148
- font-size: 13px;
149
- "
150
- type="textarea"
151
- v-model="newsNoice"
152
- :readonly="notificationMessageReadOnly == 'true'"
153
- />
154
- <!-- <span>{{ newsInfo }}</span> -->
155
- </el-form-item>
156
- </div>
157
- <el-form-item>
158
- <div style="text-align: right">
159
- <el-button type="primary" size="small" @click="submit('nextNode')">
160
- 提交
161
- </el-button>
162
- </div>
163
- </el-form-item>
164
- </el-form>
165
- </div>
166
- </template>
167
-
168
- <script>
169
- import {
170
- findSysCodes,
171
- taskReadHtml,
172
- toStartTaskRead,
173
- toTaskTransferIndex,
174
- getNotificationMsg,
175
- taskTransfer,
176
- findCodeValues
177
- } from 'eoss-ui/src/config/api';
178
- import util from 'eoss-ui/src/utils/util';
179
- import SelectUser from './selectUser.vue';
180
- export default {
181
- name: 'StartTaskRead',
182
- components: {
183
- [Option.name]: Option,
184
- [SelectUser.name]: SelectUser
185
- },
186
- props: {
187
- pendingId: { type: String, default: '' },
188
- newsInfo: { type: String, default: '' },
189
- type: { type: String, default: '' },
190
- option: { type: String, default: '' },
191
- typeCode: { type: String, default: '' },
192
- resetAppId: { type: String, default: '' },
193
- taskExamine: { type: Object, default: () => {} },
194
- readParams: {
195
- type: [Object,undefined],
196
- default: undefined
197
- },
198
- },
199
- data() {
200
- return {
201
- loading: false,
202
- newsNoice: '',
203
- readOnlyNotificationType: '',
204
- notificationMessageReadOnly: false,
205
- nextNode: {
206
- nextUser: [],
207
- userInfo: [],
208
- noticeType: [],
209
- handleExplain: '',
210
- showDoresult: '0',
211
- isInHistory: '0',
212
- isDownload: '0'
213
- },
214
- mixList: [],
215
- newSelectUserList: [],
216
- orgId: '',
217
- noticeList: [],
218
- userOptions: [],
219
- selectCheck: [],
220
- selectUserList: [],
221
- transferInfo: {},
222
- multiple: true,
223
- params: { filid: 'all' },
224
- configInfo: {}
225
- };
226
- },
227
- computed: {
228
- tabs() {
229
- let tab = {};
230
- if (this.type != 'transfer') {
231
- tab = {
232
- employee: {
233
- param: {
234
- filid: this.orgId,
235
- name: '本单位用户'
236
- }
237
- },
238
- department: { param: { filid: this.orgId } },
239
- enterprise: {}
240
- };
241
- } else {
242
- tab = {
243
- employee: {
244
- param: {
245
- filid: this.orgId
246
- }
247
- }
248
- };
249
- }
250
- return tab;
251
- }
252
- },
253
- mounted() {
254
- this.newsNoice = this.newsInfo;
255
- if(this.readParams){
256
- this.getMessage()
257
- }
258
- this.getFind();
259
- if (util.getStorage('mainConfig')) {
260
- this.orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
261
- }
262
- },
263
- methods: {
264
- //获取通知信息
265
- getMessage() {
266
- let params = {
267
- appId: this.readParams.appId
268
- };
269
- util
270
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
271
- .then((res) => {
272
- if (res.status === 'success') {
273
- this.newsNoice = res.message;
274
- }
275
- })
276
- .catch((err) => {
277
- this.loading = false;
278
- if (err.message && err.message !== 'canceled') {
279
- this.$message.error(err.message);
280
- }
281
- });
282
- },
283
- toTaskTransfer() {
284
- const { opinion, pendingId, taskExamine } = this;
285
- let params = {
286
- url: toTaskTransferIndex,
287
- params: {
288
- opinion,
289
- pendingId,
290
- isSubFlow: taskExamine.isSubFlow,
291
- isSinglePage: taskExamine.isSinglePage
292
- }
293
- };
294
- util
295
- .ajax(params)
296
- .then((res) => {
297
- const {
298
- status,
299
- message,
300
- data: { choiceDeptId, choiceOrgId, nodeInfoMap, taskExamine }
301
- } = res;
302
- if (status == 'success') {
303
- this.isMultipleTransfer(
304
- nodeInfoMap.nodeExtAttr.userSelectionType,
305
- choiceOrgId,
306
- choiceDeptId
307
- );
308
- this.nextNode.nodeName = taskExamine.nodeName;
309
- this.transferInfo = taskExamine;
310
- } else {
311
- this.$message.error(message || '系统错误,请联系管理员!');
312
- }
313
- })
314
- .catch((err) => {
315
- this.loading = false;
316
- if (err.message && err.message !== 'canceled') {
317
- this.$message.error(err.message);
318
- }
319
- });
320
- },
321
- isMultipleTransfer(val, choiceOrgId, choiceDeptId, pOrgId) {
322
- if (val == 2 || val == 4 || val == 6 || val == 16) {
323
- this.multiple = true;
324
- } else {
325
- this.multiple = false;
326
- }
327
- if (val == 1 || val == 2 || val == 5) {
328
- this.params.filid = this.orgId;
329
- if (choiceOrgId) {
330
- this.params.filid = choiceOrgId;
331
- }
332
- }
333
- if (val == 5 || val == 6) {
334
- this.params.filid = this.orgId;
335
- this.params.deptid = this.orgId;
336
- if (choiceDeptId) {
337
- this.params.deptid = choiceDeptId;
338
- }
339
- if (choiceOrgId) {
340
- this.params.filid = choiceOrgId;
341
- }
342
- }
343
- if (val == 15 || val == 16) {
344
- this.params.filid = this.orgId;
345
- if (pOrgId) {
346
- this.params.filid = pOrgId;
347
- }
348
- }
349
- },
350
- isMultiple() {
351
- let orgId = this.orgId;
352
- if (this.configInfo.selectPersonValue == 1) {
353
- this.multiple = false;
354
- this.params.filid = orgId;
355
- } else if (this.configInfo.selectPersonValue == 2) {
356
- this.multiple = true;
357
- this.params.filid = orgId;
358
- } else if (this.configInfo.selectPersonValue == 3) {
359
- this.multiple = false;
360
- this.params.filid = 'all';
361
- } else if (this.configInfo.selectPersonValue == 4) {
362
- this.multiple = true;
363
- this.params.filid = 'all';
364
- } else if (this.configInfo.selectPersonValue == 5) {
365
- this.multiple = false;
366
- this.params.filid = '';
367
- } else if (this.configInfo.selectPersonValue == 6) {
368
- this.multiple = true;
369
- this.params.filid = '';
370
- }
371
- },
372
- handleSelectCheck(val, data) {
373
- let { userIds, userNames } = data;
374
- if (val) {
375
- let newUserIds = userIds.split(',');
376
- let newUserNames = userNames.split(',');
377
- newUserIds.map((item, index) => {
378
- this.nextNode.nextUser.push(item);
379
- this.userOptions.push({ id: item, name: newUserNames[index] });
380
-
381
- this.selectUserList.push({
382
- showid: item,
383
- showname: newUserNames[index]
384
- });
385
- });
386
- // this.selectUserList = this.newSelectUserList
387
- } else {
388
- let newUserIds = userIds.split(',');
389
- for (let i = 0; i < this.nextNode.nextUser.length; i++) {
390
- for (let j = 0; j < newUserIds.length; j++) {
391
- if (this.nextNode.nextUser[i] == newUserIds[j]) {
392
- this.nextNode.nextUser.splice(i, 1);
393
- }
394
- }
395
- }
396
- for (let z = 0; z < this.userOptions.length; z++) {
397
- for (let x = 0; x < newUserIds.length; x++) {
398
- if (this.userOptions[z].id == newUserIds[x]) {
399
- this.userOptions.splice(z, 1);
400
- this.selectUserList.splice(z, 1);
401
- }
402
- }
403
- }
404
- // this.newSelectUserList = this.selectUserList
405
- }
406
- },
407
- toStartTaskRead() {
408
- let params = {
409
- url: toStartTaskRead,
410
- params: { pendingId: this.pendingId, taskAction: this.type }
411
- };
412
- if(this.typeCode == 'read'){
413
- delete params.params.pendingId;
414
- params.params.appid = this.resetAppId;
415
- }
416
- if (this.type != 'taskReadAndEnd') delete params.params.taskAction;
417
- util
418
- .ajax(params)
419
- .then((res) => {
420
- const { status, data } = res;
421
- if (status === 'success') {
422
- this.configInfo = data;
423
- this.isMultiple();
424
- }
425
- })
426
- .catch((err) => {
427
- this.loading = false;
428
- if (err.message && err.message !== 'canceled') {
429
- this.$message.error(err.message);
430
- }
431
- });
432
- },
433
- changeSelectUser(val, type) {
434
- const { nextUser, options, mixList } = val;
435
- this.nextNode[type] = nextUser;
436
- this.mixList = mixList;
437
- options.map((item) => {
438
- this.newSelectUserList.push({
439
- showname: item.showname,
440
- showid: item.showid
441
- });
442
- });
443
- },
444
- getNodeType() {
445
- util
446
- .ajax({
447
- url: findCodeValues,
448
- params: {
449
- ccCode: 'notification_type',
450
- userId: util.getStorage('userId')
451
- }
452
- })
453
- .then((res) => {
454
- const { status, data } = res;
455
- if (status === 'success') {
456
- this.noticeList = data;
457
- let arr = [];
458
- this.noticeList.map((item) => {
459
- this.nextNode.noticeType.map((x) => {
460
- if (x == item.cciValue) {
461
- arr.push(x);
462
- }
463
- });
464
- });
465
- this.nextNode.noticeType = arr;
466
- }
467
- })
468
- .catch((err) => {
469
- this.loading = false;
470
- if (err.message && err.message !== 'canceled') {
471
- this.$message.error(err.message);
472
- }
473
- });
474
- },
475
- // 转办提交
476
- subTaskTransfer() {
477
- const { choiceDeptId, choiceOrgId, bCode, bName } = this.taskExamine;
478
- const { opinion, pendingId, nextNode, newsNoice, multiple, type } = this;
479
- let params = {
480
- url: taskTransfer,
481
- data: {
482
- choiceDeptId,
483
- choiceOrgId,
484
- bCode,
485
- bName,
486
- nextUserId:
487
- multiple && type != 'transfer'
488
- ? nextNode.nextUser.join(',')
489
- : nextNode.nextUser,
490
- opinion,
491
- pendingId,
492
- notificationType: nextNode.noticeType.join(','),
493
- notificationMsg: newsNoice
494
- },
495
- headers: { Accept: 'application/json,text/plain' },
496
- method: 'post'
497
- };
498
- util
499
- .ajax(params)
500
- .then((res) => {
501
- const { message, status } = res;
502
- if (status === 'success') {
503
- this.$message.success('操作成功');
504
- this.quit(true);
505
- } else {
506
- this.$message.error(message || '系统错误,请联系管理员!');
507
- }
508
- this.loading = false;
509
- })
510
- .catch((err) => {
511
- this.loading = false;
512
- if (err.message && err.message !== 'canceled') {
513
- this.$message.error(err.message);
514
- }
515
- });
516
- },
517
- // 提交表单
518
- submit(formName) {
519
- this.$refs[formName].validate((valid) => {
520
- if (valid) {
521
- if (!this.option && this.isOpinionRequired === 1) {
522
- this.$message.warning('请选择输入审批意见');
523
- return;
524
- }
525
- // let nextUser = [];
526
- // this.nextNode.nextUser.map(item => {
527
- // nextUser.push(item);
528
- // });
529
- let noticeType = '';
530
- noticeType = this.nextNode.noticeType.join(',');
531
- this.loading = true;
532
- if (this.type === 'transfer') {
533
- this.subTaskTransfer();
534
- } else {
535
- const {
536
- appId,
537
- businessId,
538
- bCode,
539
- bName,
540
- choiceDeptId,
541
- choiceOrgId,
542
- businessName,
543
- processDefinitionId
544
- } = this.taskExamine;
545
- let params = {
546
- ...this.nextNode,
547
- bCode,
548
- bName,
549
- appId,
550
- businessId,
551
- choiceDeptId,
552
- choiceOrgId,
553
- businessName,
554
- processDefinitionId,
555
- currentOrgProcessKey: processDefinitionId,
556
- pendingId: this.pendingId,
557
- opinion: this.option, // 审批意见
558
- userId: util.getStorage('userId'),
559
- nextReadUserId: this.mixList.join('|'),
560
- noticeType,
561
- taskAction: this.type
562
- // nextNodeId: this.form.nextNodeId
563
- };
564
- delete params.nextUser;
565
- const { fyDoresult, fyeh, download, isCdjxjTaskHandle } =
566
- this.configInfo;
567
- fyDoresult != 'true' && delete params.showDoresult;
568
- fyeh != 'true' && delete params.isInHistory;
569
- !download && delete params.isDownload;
570
- isCdjxjTaskHandle == 'true' && delete params.noticeType;
571
- if (this.readParams) {
572
- params = { ...params, ...this.readParams };
573
- }
574
- util
575
- .ajax({
576
- url: taskReadHtml,
577
- params: { taskAction: this.type },
578
- headers: {
579
- Accept: 'application/json,text/plain'
580
- },
581
- method: 'post',
582
- data: params
583
- })
584
- .then((res) => {
585
- const { message, status } = res;
586
- this.loading = false;
587
- if (status === 'success') {
588
- this.$message.success('操作成功');
589
- this.quit(true);
590
- } else {
591
- this.$message.error(message || '系统错误,请联系管理员!');
592
- }
593
- })
594
- .catch((err) => {
595
- this.loading = false;
596
- if (err.message && err.message !== 'canceled') {
597
- this.$message.error(err.message);
598
- }
599
- });
600
- }
601
- } else {
602
- return false;
603
- }
604
- });
605
- },
606
- quit(val) {
607
- if (val === true) return this.$emit('cancel', this.type);
608
- this.$emit('cancel');
609
- },
610
-
611
- getFind() {
612
- this.loading = true;
613
- util
614
- .ajax({
615
- url: findSysCodes
616
- })
617
- .then((res) => {
618
- const { status, message, data } = res;
619
- this.loading = false;
620
- if (status === 'success') {
621
- this.nextNode.noticeType = message.split(',');
622
- if (data) {
623
- this.notificationMessageReadOnly =
624
- data.notificationMessageReadOnly;
625
- this.readOnlyNotificationType = data.readOnlyNotificationType;
626
- }
627
- } else {
628
- this.$message.error(message || '系统错误,请联系管理员!');
629
- }
630
- this.getNodeType();
631
- if (this.type === 'transfer') {
632
- this.toTaskTransfer();
633
- } else if(!this.readParams) {
634
- this.toStartTaskRead();
635
- }
636
- })
637
- .catch((err) => {
638
- this.loading = false;
639
- if (err.message && err.message !== 'canceled') {
640
- this.$message.error(err.message);
641
- }
642
- });
643
- }
644
- }
645
- };
646
- </script>
1
+ <template>
2
+ <div
3
+ v-loading="loading"
4
+ class="task-read"
5
+ element-loading-text="加载中..."
6
+ element-loading-spinner="el-icon-loading"
7
+ element-loading-background="rgba(255, 255,255, 0.8)"
8
+ >
9
+ <el-form
10
+ ref="nextNode"
11
+ :model="nextNode"
12
+ class="demo-dynamic"
13
+ label-width="110px"
14
+ >
15
+ <div
16
+ :style="`max-height: ${
17
+ typeCode ? 'unset' : '290px'
18
+ }; overflow-y: auto; margin-bottom: 10px`"
19
+ >
20
+ <el-form-item
21
+ prop="handleExplain"
22
+ label="当前步骤"
23
+ v-if="type === 'transfer'"
24
+ >
25
+ <el-input readonly v-model="nextNode.nodeName"></el-input>
26
+ </el-form-item>
27
+ <el-form-item
28
+ v-if="type == 'transfer' && transferInfo.isSinglePage"
29
+ prop="handleExplain"
30
+ label="意见"
31
+ >
32
+ <el-input
33
+ v-model="nextNode.handleExplain"
34
+ placeholder="请填写意见"
35
+ ></el-input>
36
+ </el-form-item>
37
+ <el-form-item
38
+ prop="nextUser"
39
+ :label="
40
+ type === 'transfer'
41
+ ? '转办对象'
42
+ : configInfo.isCdjxjTaskHandle == 'true'
43
+ ? '接收人'
44
+ : '办理用户'
45
+ "
46
+ >
47
+ <SelectUser
48
+ :nextUser="nextNode.nextUser"
49
+ :options="userOptions"
50
+ :multiple="type != 'transfer' ? multiple : false"
51
+ :mix="type != 'transfer'"
52
+ :selectUserList="selectUserList"
53
+ :types="
54
+ type == 'transfer'
55
+ ? ['employee', 'persongroup']
56
+ : ['employee', 'enterprise', 'department', 'persongroup']
57
+ "
58
+ @change="changeSelectUser($event, 'nextUser')"
59
+ :tabs="tabs"
60
+ :where="{ type: 'user' }"
61
+ />
62
+ </el-form-item>
63
+
64
+ <el-form-item
65
+ v-if="configInfo.isCdjxjTaskHandle != 'true' && type != 'transfer'"
66
+ prop="cy"
67
+ label="常用群组"
68
+ ><el-checkbox-group v-model="selectCheck">
69
+ <el-checkbox
70
+ @change="handleSelectCheck($event, item)"
71
+ v-for="item in configInfo.groups"
72
+ :label="item.name"
73
+ :key="item.id"
74
+ >{{ item.name }}</el-checkbox
75
+ >
76
+ </el-checkbox-group>
77
+ </el-form-item>
78
+ <el-form-item
79
+ v-if="configInfo.fyDoresult == 'true'"
80
+ prop="showDoresult"
81
+ label="流程意见"
82
+ ><el-radio v-model="nextNode.showDoresult" label="0">分阅</el-radio>
83
+ <el-radio v-model="nextNode.showDoresult" label="1">不分阅</el-radio>
84
+ </el-form-item>
85
+ <el-form-item
86
+ v-if="configInfo.fyeh == 'true'"
87
+ prop="isInHistory"
88
+ label="分阅记录"
89
+ ><el-radio v-model="nextNode.isInHistory" label="0">记录</el-radio>
90
+ <el-radio v-model="nextNode.isInHistory" label="1">不记录</el-radio>
91
+ </el-form-item>
92
+ <el-form-item
93
+ v-if="configInfo.download"
94
+ prop="isDownload"
95
+ label="打印下载文件"
96
+ ><el-radio v-model="nextNode.isDownload" label="0">允许</el-radio>
97
+ <el-radio v-model="nextNode.isDownload" label="1">不允许</el-radio>
98
+ </el-form-item>
99
+ <el-form-item
100
+ prop="handleExplain"
101
+ :label="configInfo.isCdjxjTaskHandle == 'true' ? '附言' : '办理说明'"
102
+ v-if="type != 'transfer'"
103
+ >
104
+ <el-input
105
+ v-model="nextNode.handleExplain"
106
+ placeholder="请填写办理说明"
107
+ ></el-input>
108
+ </el-form-item>
109
+ <el-form-item
110
+ v-if="configInfo.isCdjxjTaskHandle != 'true'"
111
+ prop="noticeType"
112
+ label="通知方式"
113
+ :rules="[
114
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
115
+ ]"
116
+ >
117
+ <el-checkbox-group
118
+ v-model="nextNode.noticeType"
119
+ style="display: contents"
120
+ >
121
+ <el-checkbox
122
+ v-for="item of noticeList"
123
+ :key="item.cciValue"
124
+ :label="item.cciValue"
125
+ :disabled="
126
+ readOnlyNotificationType
127
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
128
+ : false
129
+ "
130
+ >
131
+ {{ item.shortName }}
132
+ </el-checkbox>
133
+ </el-checkbox-group>
134
+ </el-form-item>
135
+ <el-form-item
136
+ v-show="
137
+ nextNode.noticeType.length != 0 &&
138
+ configInfo.isCdjxjTaskHandle != 'true'
139
+ "
140
+ prop="nextNode"
141
+ label="通知消息"
142
+ >
143
+ <es-input
144
+ style="
145
+ border-color: #ccc;
146
+ padding: 5px;
147
+ border-radius: 5px;
148
+ font-size: 13px;
149
+ "
150
+ type="textarea"
151
+ v-model="newsNoice"
152
+ :readonly="notificationMessageReadOnly == 'true'"
153
+ />
154
+ <!-- <span>{{ newsInfo }}</span> -->
155
+ </el-form-item>
156
+ </div>
157
+ <el-form-item>
158
+ <div style="text-align: right">
159
+ <el-button type="primary" size="small" @click="submit('nextNode')">
160
+ 提交
161
+ </el-button>
162
+ </div>
163
+ </el-form-item>
164
+ </el-form>
165
+ </div>
166
+ </template>
167
+
168
+ <script>
169
+ import {
170
+ findSysCodes,
171
+ taskReadHtml,
172
+ toStartTaskRead,
173
+ toTaskTransferIndex,
174
+ getNotificationMsg,
175
+ taskTransfer,
176
+ findCodeValues
177
+ } from 'eoss-ui/src/config/api';
178
+ import util from 'eoss-ui/src/utils/util';
179
+ import SelectUser from './selectUser.vue';
180
+ export default {
181
+ name: 'StartTaskRead',
182
+ components: {
183
+ [Option.name]: Option,
184
+ [SelectUser.name]: SelectUser
185
+ },
186
+ props: {
187
+ pendingId: { type: String, default: '' },
188
+ simpleTips:{type:Boolean,default:true},
189
+ newsInfo: { type: String, default: '' },
190
+ type: { type: String, default: '' },
191
+ option: { type: String, default: '' },
192
+ typeCode: { type: String, default: '' },
193
+ resetAppId: { type: String, default: '' },
194
+ param: { type: Object, default: () => {} },
195
+ taskExamine: { type: Object, default: () => {} },
196
+ readParams: {
197
+ type: [Object,undefined],
198
+ default: undefined
199
+ },
200
+ },
201
+ data() {
202
+ return {
203
+ loading: false,
204
+ newsNoice: '',
205
+ readOnlyNotificationType: '',
206
+ notificationMessageReadOnly: false,
207
+ nextNode: {
208
+ nextUser: [],
209
+ userInfo: [],
210
+ noticeType: [],
211
+ handleExplain: '',
212
+ showDoresult: '0',
213
+ isInHistory: '0',
214
+ isDownload: '0'
215
+ },
216
+ mixList: [],
217
+ newSelectUserList: [],
218
+ orgId: '',
219
+ noticeList: [],
220
+ userOptions: [],
221
+ selectCheck: [],
222
+ selectUserList: [],
223
+ transferInfo: {},
224
+ multiple: true,
225
+ params: { filid: 'all' },
226
+ configInfo: {}
227
+ };
228
+ },
229
+ computed: {
230
+ tabs() {
231
+ let tab = {};
232
+ if (this.type != 'transfer') {
233
+ tab = {
234
+ employee: {
235
+ param: {
236
+ filid: this.orgId,
237
+ name: '本单位用户'
238
+ }
239
+ },
240
+ department: { param: { filid: this.orgId } },
241
+ enterprise: {}
242
+ };
243
+ } else {
244
+ tab = {
245
+ employee: {
246
+ param: {
247
+ filid: this.orgId
248
+ }
249
+ }
250
+ };
251
+ }
252
+ return tab;
253
+ }
254
+ },
255
+ mounted() {
256
+ this.newsNoice = this.newsInfo;
257
+ if(this.readParams || this.typeCode=='read'){
258
+ this.getMessage()
259
+ }
260
+ this.getFind();
261
+ if (util.getStorage('mainConfig')) {
262
+ this.orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
263
+ }
264
+ },
265
+ methods: {
266
+ //获取通知信息
267
+ getMessage() {
268
+ let params = {};
269
+ if(this.typeCode=='read'){
270
+ params = {
271
+ processDefinitionId: this.param.processDefinitionId,
272
+ businessId: this.param.businessId,
273
+ businessName: this.param.businessName,
274
+ bCode: this.param.bCode,
275
+ bName:this.param.bName
276
+ };
277
+ }else{
278
+ params.appId = this.readParams.appId
279
+ }
280
+ util
281
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
282
+ .then((res) => {
283
+ if (res.status === 'success') {
284
+ this.newsNoice = res.message;
285
+ }
286
+ })
287
+ .catch((err) => {
288
+ this.loading = false;
289
+ if (err.message && err.message !== 'canceled') {
290
+ this.$message.error(err.message);
291
+ }
292
+ });
293
+ },
294
+ toTaskTransfer() {
295
+ const { opinion, pendingId, taskExamine } = this;
296
+ let params = {
297
+ url: toTaskTransferIndex,
298
+ params: {
299
+ opinion,
300
+ pendingId,
301
+ isSubFlow: taskExamine.isSubFlow,
302
+ isSinglePage: taskExamine.isSinglePage
303
+ }
304
+ };
305
+ util
306
+ .ajax(params)
307
+ .then((res) => {
308
+ const {
309
+ status,
310
+ message,
311
+ data: { choiceDeptId, choiceOrgId, nodeInfoMap, taskExamine }
312
+ } = res;
313
+ if (status == 'success') {
314
+ this.isMultipleTransfer(
315
+ nodeInfoMap.nodeExtAttr.userSelectionType,
316
+ choiceOrgId,
317
+ choiceDeptId
318
+ );
319
+ this.nextNode.nodeName = taskExamine.nodeName;
320
+ this.transferInfo = taskExamine;
321
+ } else {
322
+ this.$message.error(message || '系统错误,请联系管理员!');
323
+ }
324
+ })
325
+ .catch((err) => {
326
+ this.loading = false;
327
+ if (err.message && err.message !== 'canceled') {
328
+ this.$message.error(err.message);
329
+ }
330
+ });
331
+ },
332
+ isMultipleTransfer(val, choiceOrgId, choiceDeptId, pOrgId) {
333
+ if (val == 2 || val == 4 || val == 6 || val == 16) {
334
+ this.multiple = true;
335
+ } else {
336
+ this.multiple = false;
337
+ }
338
+ if (val == 1 || val == 2 || val == 5) {
339
+ this.params.filid = this.orgId;
340
+ if (choiceOrgId) {
341
+ this.params.filid = choiceOrgId;
342
+ }
343
+ }
344
+ if (val == 5 || val == 6) {
345
+ this.params.filid = this.orgId;
346
+ this.params.deptid = this.orgId;
347
+ if (choiceDeptId) {
348
+ this.params.deptid = choiceDeptId;
349
+ }
350
+ if (choiceOrgId) {
351
+ this.params.filid = choiceOrgId;
352
+ }
353
+ }
354
+ if (val == 15 || val == 16) {
355
+ this.params.filid = this.orgId;
356
+ if (pOrgId) {
357
+ this.params.filid = pOrgId;
358
+ }
359
+ }
360
+ },
361
+ isMultiple() {
362
+ let orgId = this.orgId;
363
+ if (this.configInfo.selectPersonValue == 1) {
364
+ this.multiple = false;
365
+ this.params.filid = orgId;
366
+ } else if (this.configInfo.selectPersonValue == 2) {
367
+ this.multiple = true;
368
+ this.params.filid = orgId;
369
+ } else if (this.configInfo.selectPersonValue == 3) {
370
+ this.multiple = false;
371
+ this.params.filid = 'all';
372
+ } else if (this.configInfo.selectPersonValue == 4) {
373
+ this.multiple = true;
374
+ this.params.filid = 'all';
375
+ } else if (this.configInfo.selectPersonValue == 5) {
376
+ this.multiple = false;
377
+ this.params.filid = '';
378
+ } else if (this.configInfo.selectPersonValue == 6) {
379
+ this.multiple = true;
380
+ this.params.filid = '';
381
+ }
382
+ },
383
+ handleSelectCheck(val, data) {
384
+ let { userIds, userNames } = data;
385
+ if (val) {
386
+ let newUserIds = userIds.split(',');
387
+ let newUserNames = userNames.split(',');
388
+ newUserIds.map((item, index) => {
389
+ this.nextNode.nextUser.push(item);
390
+ this.userOptions.push({ id: item, name: newUserNames[index] });
391
+
392
+ this.selectUserList.push({
393
+ showid: item,
394
+ showname: newUserNames[index]
395
+ });
396
+ });
397
+ // this.selectUserList = this.newSelectUserList
398
+ } else {
399
+ let newUserIds = userIds.split(',');
400
+ for (let i = 0; i < this.nextNode.nextUser.length; i++) {
401
+ for (let j = 0; j < newUserIds.length; j++) {
402
+ if (this.nextNode.nextUser[i] == newUserIds[j]) {
403
+ this.nextNode.nextUser.splice(i, 1);
404
+ }
405
+ }
406
+ }
407
+ for (let z = 0; z < this.userOptions.length; z++) {
408
+ for (let x = 0; x < newUserIds.length; x++) {
409
+ if (this.userOptions[z].id == newUserIds[x]) {
410
+ this.userOptions.splice(z, 1);
411
+ this.selectUserList.splice(z, 1);
412
+ }
413
+ }
414
+ }
415
+ // this.newSelectUserList = this.selectUserList
416
+ }
417
+ },
418
+ toStartTaskRead() {
419
+ let params = {
420
+ url: toStartTaskRead,
421
+ params: { pendingId: this.pendingId, taskAction: this.type,...this.param }
422
+ };
423
+ if(this.typeCode == 'read'){
424
+ delete params.params.pendingId;
425
+ // params.params.appid = this.resetAppId;
426
+ }
427
+ if (this.type != 'taskReadAndEnd') delete params.params.taskAction;
428
+ util
429
+ .ajax(params)
430
+ .then((res) => {
431
+ const { status, data } = res;
432
+ if (status === 'success') {
433
+ this.configInfo = data;
434
+ this.isMultiple();
435
+ }
436
+ })
437
+ .catch((err) => {
438
+ this.loading = false;
439
+ if (err.message && err.message !== 'canceled') {
440
+ this.$message.error(err.message);
441
+ }
442
+ });
443
+ },
444
+ changeSelectUser(val, type) {
445
+ const { nextUser, options, mixList } = val;
446
+ this.nextNode[type] = nextUser;
447
+ this.mixList = mixList;
448
+ options.map((item) => {
449
+ this.newSelectUserList.push({
450
+ showname: item.showname,
451
+ showid: item.showid
452
+ });
453
+ });
454
+ },
455
+ getNodeType() {
456
+ util
457
+ .ajax({
458
+ url: findCodeValues,
459
+ params: {
460
+ ccCode: 'notification_type',
461
+ userId: util.getStorage('userId')
462
+ }
463
+ })
464
+ .then((res) => {
465
+ const { status, data } = res;
466
+ if (status === 'success') {
467
+ this.noticeList = data;
468
+ let arr = [];
469
+ this.noticeList.map((item) => {
470
+ this.nextNode.noticeType.map((x) => {
471
+ if (x == item.cciValue) {
472
+ arr.push(x);
473
+ }
474
+ });
475
+ });
476
+ this.nextNode.noticeType = arr;
477
+ }
478
+ })
479
+ .catch((err) => {
480
+ this.loading = false;
481
+ if (err.message && err.message !== 'canceled') {
482
+ this.$message.error(err.message);
483
+ }
484
+ });
485
+ },
486
+ // 转办提交
487
+ subTaskTransfer() {
488
+ const { choiceDeptId, choiceOrgId, bCode, bName } = this.taskExamine;
489
+ const { opinion, pendingId, nextNode, newsNoice, multiple, type } = this;
490
+ let params = {
491
+ url: taskTransfer,
492
+ data: {
493
+ choiceDeptId,
494
+ choiceOrgId,
495
+ bCode,
496
+ bName,
497
+ nextUserId:
498
+ multiple && type != 'transfer'
499
+ ? nextNode.nextUser.join(',')
500
+ : nextNode.nextUser,
501
+ opinion,
502
+ pendingId,
503
+ notificationType: nextNode.noticeType.join(','),
504
+ notificationMsg: newsNoice
505
+ },
506
+ headers: { Accept: 'application/json,text/plain' },
507
+ method: 'post'
508
+ };
509
+ util
510
+ .ajax(params)
511
+ .then((res) => {
512
+ const { message, status } = res;
513
+ if (status === 'success') {
514
+ this.simpleTips && this.$message.success('操作成功');
515
+ this.quit(true);
516
+ } else {
517
+ this.$message.error(message || '系统错误,请联系管理员!');
518
+ }
519
+ this.loading = false;
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
+ // 提交表单
529
+ submit(formName) {
530
+ this.$refs[formName].validate((valid) => {
531
+ if (valid) {
532
+ if (!this.option && this.isOpinionRequired === 1) {
533
+ this.$message.warning('请选择输入审批意见');
534
+ return;
535
+ }
536
+ // let nextUser = [];
537
+ // this.nextNode.nextUser.map(item => {
538
+ // nextUser.push(item);
539
+ // });
540
+ let noticeType = '';
541
+ noticeType = this.nextNode.noticeType.join(',');
542
+ this.loading = true;
543
+ if (this.type === 'transfer') {
544
+ this.subTaskTransfer();
545
+ } else {
546
+ const {
547
+ appId,
548
+ businessId,
549
+ bCode,
550
+ bName,
551
+ choiceDeptId,
552
+ choiceOrgId,
553
+ businessName,
554
+ processDefinitionId
555
+ } = this.taskExamine;
556
+ let params = {
557
+ ...this.nextNode,
558
+ bCode,
559
+ bName,
560
+ appId,
561
+ businessId:businessId || this.param.businessId,
562
+ choiceDeptId,
563
+ choiceOrgId,
564
+ businessName,
565
+ processDefinitionId,
566
+ currentOrgProcessKey: processDefinitionId || this.param.currentOrgProcessKey,
567
+ pendingId: this.pendingId,
568
+ opinion: this.option, // 审批意见
569
+ userId: util.getStorage('userId'),
570
+ nextReadUserId: this.mixList.join('|'),
571
+ notificationType:noticeType,
572
+ notificationMsg:this.newsNoice,
573
+ taskAction: this.type
574
+ // nextNodeId: this.form.nextNodeId
575
+ };
576
+ delete params.nextUser;
577
+ delete params.noticeType;
578
+ const { fyDoresult, fyeh, download, isCdjxjTaskHandle } =
579
+ this.configInfo;
580
+ fyDoresult != 'true' && delete params.showDoresult;
581
+ fyeh != 'true' && delete params.isInHistory;
582
+ !download && delete params.isDownload;
583
+ isCdjxjTaskHandle == 'true' && delete params.noticeType;
584
+ if (this.readParams) {
585
+ params = { ...params, ...this.readParams };
586
+ }
587
+ util
588
+ .ajax({
589
+ url: taskReadHtml,
590
+ params: { taskAction: this.type },
591
+ headers: {
592
+ Accept: 'application/json,text/plain'
593
+ },
594
+ method: 'post',
595
+ data: params
596
+ })
597
+ .then((res) => {
598
+ const { message, status } = res;
599
+ this.loading = false;
600
+ if (status === 'success') {
601
+ this.simpleTips && this.$message.success('操作成功');
602
+ this.quit(true);
603
+ } else {
604
+ this.$message.error(message || '系统错误,请联系管理员!');
605
+ }
606
+ })
607
+ .catch((err) => {
608
+ this.loading = false;
609
+ if (err.message && err.message !== 'canceled') {
610
+ this.$message.error(err.message);
611
+ }
612
+ });
613
+ }
614
+ } else {
615
+ return false;
616
+ }
617
+ });
618
+ },
619
+ quit(val) {
620
+ if (val === true) return this.$emit('cancel', this.type);
621
+ this.$emit('cancel');
622
+ },
623
+
624
+ getFind() {
625
+ this.loading = true;
626
+ util
627
+ .ajax({
628
+ url: findSysCodes
629
+ })
630
+ .then((res) => {
631
+ const { status, message, data } = res;
632
+ this.loading = false;
633
+ if (status === 'success') {
634
+ this.nextNode.noticeType = message.split(',');
635
+ if (data) {
636
+ this.notificationMessageReadOnly =
637
+ data.notificationMessageReadOnly;
638
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
639
+ }
640
+ } else {
641
+ this.$message.error(message || '系统错误,请联系管理员!');
642
+ }
643
+ this.getNodeType();
644
+ if (this.type === 'transfer') {
645
+ this.toTaskTransfer();
646
+ } else if(!this.readParams) {
647
+ this.toStartTaskRead();
648
+ }
649
+ })
650
+ .catch((err) => {
651
+ this.loading = false;
652
+ if (err.message && err.message !== 'canceled') {
653
+ this.$message.error(err.message);
654
+ }
655
+ });
656
+ }
657
+ }
658
+ };
659
+ </script>