eoss-ui 0.6.60 → 0.6.61

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