eoss 0.1.0-alpha.21 → 0.1.0-alpha.22

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