eoss-ui 0.6.59 → 0.6.60

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