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,944 +0,0 @@
1
- <template>
2
- <div
3
- v-loading="loading === true"
4
- class="es-flow-form"
5
- element-loading-text="加载中..."
6
- element-loading-spinner="es-icon-loading"
7
- element-loading-background="rgba(255, 255,255, 0.8)"
8
- style="height: 100%"
9
- >
10
- <es-form
11
- ref="nextNode"
12
- :model="nextNode"
13
- class="es-reset-flow demo-dynamic"
14
- label-width="150px"
15
- label-position="left"
16
- >
17
- <div class="es-reset-flow-form-box">
18
- <es-form-item prop="nodeName" label="标题">
19
- <es-input v-model="pendtitle" disabled />
20
- </es-form-item>
21
- <es-form-item prop="nodeName" label="当前步骤">
22
- <es-input v-model="nextNode.nodeName" disabled />
23
- </es-form-item>
24
- <es-form-item prop="newOpinion" label="意见">
25
- <opinions class="opinions" :rows="3" @change="changeOpinion" />
26
- </es-form-item>
27
- <es-form-item
28
- prop="nextNode"
29
- label="下步节点"
30
- :rules="[
31
- { required: true, message: `请选择下步节点`, trigger: 'blur' }
32
- ]"
33
- >
34
- <es-select
35
- v-if="nextNodeCheckType == 'select'"
36
- v-model="nextNode.nextNode"
37
- :placeholder="`请选择下步节点`"
38
- @change="changeSel"
39
- >
40
- <es-option
41
- v-for="items in nextNode.nodeInfo"
42
- :key="items.nodeId"
43
- :label="items.nodeName"
44
- :value="items.nodeId"
45
- ></es-option>
46
- </es-select>
47
- <es-radio-group
48
- v-else-if="nextNodeCheckType == 'radio'"
49
- v-model="nextNode.nextNode"
50
- :data="nextNode.nodeInfo"
51
- @change="changeSel"
52
- value-key="nodeId"
53
- label-key="nodeName"
54
- >
55
- <es-radio
56
- v-for="item of nextNode.nodeInfo"
57
- :key="item.nodeId"
58
- :label="item.nodeId"
59
- >
60
- {{ item.nodeName }}
61
- </es-radio>
62
- </es-radio-group>
63
- </es-form-item>
64
- <es-form-item
65
- v-if="countersignaturetypeCode != 0"
66
- prop="countersignaturetypeText"
67
- label="处理方式"
68
- >
69
- <es-input
70
- v-model="nextNode.countersignaturetypeText"
71
- placeholder="请输入内容"
72
- disabled
73
- />
74
- </es-form-item>
75
- <es-form-item prop="nextNode" label="办理角色" v-if="showRoleUser">
76
- <SelectUser
77
- :nextUser="nextNode.nextRoleId"
78
- :radioList="radioList"
79
- :multiple="multiple"
80
- :isCustomUser="isCustomUser"
81
- :options="options"
82
- :presetEdit="presetEdit"
83
- :isDefSelectedObj="isDefSelectedObj"
84
- :selectUserList="selectUserList"
85
- @change="changeSelectUser"
86
- :types="nextUserTypes"
87
- :params="params"
88
- />
89
- </es-form-item>
90
- <!-- showRoleUser -->
91
- <es-form-item
92
- v-if="
93
- !showRoleUser &&
94
- nodeInfoExtAttr.nodeType != 1 &&
95
- nodeInfoExtAttr.nodeType != 2
96
- "
97
- :prop="isShowNextUser ? 'nextUser' : 'nextOrgId'"
98
- :label="isShowNextUser ? '下步办理人' : '办理对象'"
99
- >
100
- <SelectUser
101
- :nextUser="isShowNextUser ? nextNode.nextUser : nextNode.nextOrgId"
102
- :radioList="radioList"
103
- :multiple="multiple"
104
- :isCustomUser="!isShowNextUser ? 1 : isCustomUser"
105
- :options="options"
106
- :presetEdit="presetEdit"
107
- :mix="multiple"
108
- :isDefSelectedObj="isDefSelectedObj"
109
- :selectUserList="selectUserList"
110
- @change="
111
- changeSelectUser(
112
- $event,
113
- isShowNextUser ? 'nextUser' : 'nextOrgId'
114
- )
115
- "
116
- :types="
117
- !isShowNextUser
118
- ? nextUserTypes
119
- : isCdjxjTaskHandle != 'true'
120
- ? ['employee', 'persongroup']
121
- : ['employee']
122
- "
123
- :params="isShowNextUser ? params : {}"
124
- :tabs="nextUserTabs"
125
- />
126
- </es-form-item>
127
- <es-form-item
128
- prop="nextReadUserId"
129
- v-if="isTaskread == 1"
130
- label="
131
- 分阅用户
132
- "
133
- >
134
- <SelectUser
135
- :nextUser="nextNode.nextReadUserId"
136
- :multiple="true"
137
- :selectUserList="selectReadUserList"
138
- :options="userOptions"
139
- title="分阅用户"
140
- :mix="true"
141
- :types="types"
142
- @change="changeSelectReadUser($event, 'nextReadUserId')"
143
- :tabs="tabs"
144
- />
145
- </es-form-item>
146
- <es-form-item
147
- prop="presetReadUserId"
148
- v-if="canPresetRead"
149
- label="
150
- 自动分阅
151
- "
152
- >
153
- <SelectUser
154
- :nextUser="nextNode.presetReadUserId"
155
- :multiple="true"
156
- :selectUserList="selectPresetUserList"
157
- :options="presetOptions"
158
- title="分阅用户"
159
- :radioList="presetReadUserId"
160
- :presetEdit="1"
161
- :mix="true"
162
- :types="types"
163
- @change="changeSelectReadUser($event, 'presetReadUserId')"
164
- :tabs="tabs"
165
- />
166
- </es-form-item>
167
- <es-form-item
168
- v-if="isHandleExplain == 1"
169
- prop="handleExplain"
170
- label="办理说明"
171
- >
172
- <es-input
173
- placeholder="请输入办理说明"
174
- v-model="nextNode.handleExplain"
175
- />
176
- </es-form-item>
177
- <es-form-item
178
- v-if="
179
- currentNodeEnableItemHandleDescription &&
180
- nextNode.nodeInfo.length != 0
181
- "
182
- prop="nextItemHandleDescription"
183
- label="办理说明"
184
- >
185
- <es-input
186
- placeholder="请输入办理说明"
187
- type="textarea"
188
- :autosize="{ minRows: 2 }"
189
- v-model="nextItemHandleDescription"
190
- />
191
- </es-form-item>
192
- <es-form-item
193
- v-show="nextNode.noticeList.length != 0"
194
- prop="noticeType"
195
- label="通知方式"
196
- >
197
- <es-checkbox-group
198
- v-if="showNoticeType"
199
- v-model="nextNode.noticeType"
200
- >
201
- <es-checkbox
202
- v-for="item of nextNode.noticeList"
203
- :key="item.cciValue"
204
- :label="item.cciValue"
205
- :disabled="
206
- readOnlyNotificationType
207
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
208
- : false
209
- "
210
- >
211
- {{ item.shortName }}
212
- </es-checkbox>
213
- </es-checkbox-group>
214
- </es-form-item>
215
- <es-form-item
216
- v-show="nextNode.noticeType.length != 0"
217
- prop="nextNode"
218
- label="通知消息"
219
- >
220
- <es-input
221
- style="
222
- border-color: #ccc;
223
- padding: 5px;
224
- border-radius: 5px;
225
- font-size: 13px;
226
- "
227
- type="textarea"
228
- v-model="nextNode.noticeInfo"
229
- :readonly="notificationMessageReadOnly"
230
- />
231
- </es-form-item>
232
- </div>
233
- <es-form-item style="margin-bottom: 0px">
234
- <div style="text-align: right">
235
- <es-button
236
- type="primary"
237
- size="small"
238
- @click="subProcess('nextNode')"
239
- >
240
- 确认
241
- </es-button>
242
- <es-button size="small" @click="quit"> 取消 </es-button>
243
- </div>
244
- </es-form-item>
245
- </es-form>
246
- </div>
247
- </template>
248
-
249
- <script>
250
- import {
251
- toResetProcessIndex,
252
- toTaskContinuationIndex,
253
- taskContinuation,
254
- getNodeInfo,
255
- findSysCodes,
256
- getNotificationMsg,
257
- findCodeValues,
258
- loginUserInfo,
259
- resetProcess
260
- } from 'eoss/src/config/api';
261
- import { success, warning, error } from 'eoss/src/utils/util';
262
- import { ajax } from 'eoss/src/utils/ajax';
263
- import { getStorage } from 'eoss/src/utils/storage';
264
- import SelectUser from './selectUser.vue';
265
- import Opinions from './component/opinions.vue';
266
- export default {
267
- name: 'resetForm',
268
-
269
- components: {
270
- Option,
271
- SelectUser,
272
- Opinions
273
- },
274
- props: {
275
- /**
276
- * 流程参数
277
- */
278
- flowParams: {
279
- type: Object,
280
- default: () => {}
281
- },
282
- /**
283
- * 提交流程参数
284
- */
285
- subParams: {
286
- type: Object,
287
- default: () => {}
288
- },
289
- /**
290
- * appID
291
- */
292
- appId: {
293
- type: String,
294
- default: ''
295
- },
296
- /**
297
- * 流程类型
298
- */
299
- type: { type: String }
300
- },
301
- data() {
302
- return {
303
- loading: false,
304
- isCustomUser: 0,
305
- selectUser: false,
306
- nextItemHandleDescription: '',
307
- nextNodeCheckType: 'select',
308
- currentNodeEnableItemHandleDescription: false,
309
- multiple: false,
310
- showNoticeType: false,
311
- readMultiple: true,
312
- customPresetHintMessage: '', //流程预设标题
313
- notificationMessageReadOnly: false,
314
- readOnlyNotificationType: '',
315
- show: true,
316
- radioList: [],
317
- activeNames: '',
318
- selectUserList: [],
319
- defaultNextNode: '',
320
- presetUserJson: [],
321
- isTaskread: 0, //是否显示分阅用户
322
- isHandleExplain: 0, //是否展示办理说明
323
- isOpinionRequired: 0,
324
- options: [],
325
- presetList: [],
326
- presetReadUserId: [], //自动分阅
327
- canPresetRead: false, //是否展示自动分阅
328
- nextUserTypes: ['employee', 'persongroup'],
329
- isSinglePage: false,
330
- presetEdit: 0,
331
- taskExamine: {},
332
- isDefSelectedObj: 0,
333
- isChooseNextNode: 0,
334
- isHideDefaultOperation: 0,
335
- countersignaturetypeCode: 0,
336
- presetTaskNodeKeyStr: '', //预设办理人顺序
337
- presetTaskNodeMap: {}, //预设办理人
338
- params: {
339
- filid: 'all', //选择范围(my:本单位/ "" or all:全部)
340
- selectmix: 'true1',
341
- deptid: '' //指定部门(my:本部门)
342
- },
343
- newOpinion: '',
344
- operationList: [],
345
- tabs: {
346
- employee: {
347
- param: {
348
- filid: JSON.parse(getStorage('mainConfig')).userModel.orgId,
349
- name: '本单位用户'
350
- }
351
- },
352
- department: {
353
- param: {
354
- filid: JSON.parse(getStorage('mainConfig')).userModel.orgId
355
- }
356
- }
357
- },
358
- userModel: {},
359
- nextUserTabs: {},
360
- selectPresetUserList: [],
361
- presetOptions: [],
362
- selectReadUserList: [],
363
- userOptions: [],
364
- mixReadList: [],
365
- mixPresetList: [],
366
- nodeInfoExtAttr: {},
367
- isCdjxjTaskHandle: '',
368
- isShowNextUser: true,
369
- showRoleUser: false,
370
- pendtitle: '',
371
- mixOrgIdList: [], //办理对象混选
372
- nextNode: {
373
- nodeName: '',
374
- newOpinion: '',
375
- countersignaturetypeText: '',
376
- nextNode: '',
377
- nextReadUserId: [],
378
- nextOrgId: [],
379
- noticeType: [],
380
- nextOperate: '1',
381
- nextUser: [],
382
- presetReadUserId: [], //自动分阅
383
- noticeInfo: '',
384
- nodeInfo: [],
385
- userInfo: [],
386
- handleExplain: '',
387
- noticeList: []
388
- }
389
- };
390
- },
391
- computed: {
392
- types() {
393
- if (this.isCdjxjTaskHandle == 'true') {
394
- return ['employee', 'enterprise', 'department'];
395
- } else {
396
- return ['employee', 'enterprise', 'department', 'persongroup'];
397
- }
398
- }
399
- },
400
- created() {
401
- this.getUserInfo();
402
- this.getResetFlow();
403
- },
404
- mounted() {},
405
- methods: {
406
- changeOpinion(val) {
407
- this.nextNode.newOpinion = val;
408
- },
409
- getUserInfo() {
410
- let mainConfig = getStorage('mainConfig');
411
- if (mainConfig) {
412
- this.userModel = JSON.parse(mainConfig).userModel;
413
- } else {
414
- ajax({ url: loginUserInfo })
415
- .then((res) => {
416
- const { status, data } = res;
417
- if (status == 'success') {
418
- this.userModel = data;
419
- } else {
420
- let msg = res.msg || '系统错误,请联系管理员!';
421
- error(msg);
422
- }
423
- })
424
- .catch((err) => {});
425
- }
426
- },
427
- getIsShowNextUser(val) {
428
- if (
429
- val == 7 ||
430
- val == 8 ||
431
- val == 9 ||
432
- val == 10 ||
433
- val == 11 ||
434
- val == 12
435
- ) {
436
- this.isShowNextUser = false;
437
- //设置办理角色
438
- // $("#orgRoleCode").val(handleRoleId);
439
- if (val == 7 || val == 8) {
440
- this.nextUserTypes = ['department'];
441
- this.nextUserTabs = {
442
- department: {
443
- param: {
444
- filid: JSON.parse(getStorage('mainConfig')).userModel.orgId
445
- }
446
- }
447
- };
448
- this.multiple = true;
449
- } else if (val == 9 || val == 10) {
450
- this.nextUserTypes = ['enterprise'];
451
- this.nextUserTabs = { enterprise: { param: { filid: 'other' } } };
452
- this.multiple = true;
453
- } else if (val == 11 || val == 12) {
454
- this.nextUserTypes = ['department', 'enterprise'];
455
- this.nextUserTabs = {
456
- enterprise: { param: { filid: 'other' } },
457
- department: {
458
- param: {
459
- filid: JSON.parse(getStorage('mainConfig')).userModel.orgId
460
- }
461
- }
462
- };
463
- this.multiple = true;
464
- }
465
- }
466
- if (val == 7 || val == 9 || val == 11) {
467
- this.multiple = false;
468
- }
469
- },
470
- // 分阅是否多选
471
- isReadMultiple(nextReadUserSelectType) {
472
- if (nextReadUserSelectType == 1) {
473
- this.readMultiple = false;
474
- } else if (nextReadUserSelectType == 2) {
475
- this.readMultiple = true;
476
- } else if (nextReadUserSelectType == 3) {
477
- this.readMultiple = false;
478
- } else if (nextReadUserSelectType == 4) {
479
- this.readMultiple = true;
480
- } else if (nextReadUserSelectType == 5) {
481
- this.readMultiple = false;
482
- } else if (nextReadUserSelectType == 6) {
483
- this.readMultiple = true;
484
- }
485
- },
486
- changeSelectReadUser(val, type) {
487
- const { nextUser, mixList } = val;
488
- this.nextNode[type] = nextUser;
489
- if (type === 'presetReadUserId') {
490
- this.mixPresetList = mixList;
491
- } else {
492
- this.mixReadList = mixList;
493
- }
494
- },
495
- changeSelectUser(val, type) {
496
- const { nextUser, options, mixList } = val;
497
- this.nextNode[type] = nextUser;
498
- this.mixOrgIdList = mixList;
499
- },
500
- getNodeType() {
501
- ajax({
502
- url: findCodeValues,
503
- params: {
504
- ccCode: 'notification_type',
505
- userId: getStorage('userId')
506
- }
507
- })
508
- .then((res) => {
509
- const { status, data } = res;
510
- if (status === 'success') {
511
- this.nextNode.noticeList = data;
512
- this.getFind();
513
- }
514
- })
515
- .catch((err) => {
516
- this.loading = false;
517
- });
518
- },
519
- //获取通知信息
520
- getMessage() {
521
- let params = {
522
- processDefinitionId: this.processDefinitionId,
523
- nodeId: this.nextNode.nextNode,
524
- businessId: this.taskExamine.businessId
525
- };
526
- ajax({ url: getNotificationMsg, params, methods: 'post' })
527
- .then((res) => {
528
- if (res.status === 'success') {
529
- this.nextNode.noticeInfo = res.message;
530
- }
531
- })
532
- .catch((err) => {
533
- this.loading = false;
534
- });
535
- },
536
- // 提交表单
537
- subProcess(formName) {
538
- this.saveProcess(formName);
539
- },
540
- saveProcess(formName) {
541
- this.$refs[formName].validate((valid) => {
542
- if (valid) {
543
- const {
544
- nextNode,
545
- nextUser,
546
- noticeInfo,
547
- noticeType,
548
- handleExplain,
549
- presetReadUserId,
550
- nextReadUserId,
551
- nextOrgId,
552
- nextRoleId,
553
- nextOperate,
554
- newOpinion
555
- } = this.nextNode;
556
- if (
557
- this.nodeInfoExtAttr.nodeType != 1 &&
558
- this.nodeInfoExtAttr.nodeType != 2 &&
559
- !this.showRoleUser
560
- ) {
561
- if (this.isShowNextUser) {
562
- if (nextUser == '' || (this.multiple && nextUser.length == 0)) {
563
- return warning('请选择下步办理人');
564
- }
565
- } else {
566
- if (nextOrgId == '' || (this.multiple && nextOrgId.length == 0)) {
567
- return warning('请选择办理对象');
568
- }
569
- }
570
- }
571
- if (
572
- (this.showRoleUser && nextRoleId == '') ||
573
- (this.multiple && nextUser.length == 0)
574
- ) {
575
- return warning('请选择办理角色');
576
- }
577
- if (this.isOpinionRequired && !this.newOpinion && !newOpinion) {
578
- return warning('请选择输入审批意见');
579
- }
580
- this.loading = true;
581
- let newNextUser = [];
582
- if (this.multiple) {
583
- nextUser && nextUser.map((item) => newNextUser.push(item));
584
- }
585
- let newNoticeType = '';
586
- if (noticeType) {
587
- newNoticeType = noticeType.join(',');
588
- }
589
- let params = {
590
- processDefinitionId: this.processDefinitionId,
591
- nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
592
- nextNodeId: nextNode,
593
- appId: this.appId,
594
- nextOperate: nextOperate,
595
- businessId: this.taskExamine.businessId,
596
- pendingId: this.taskExamine.pendingId,
597
- notificationType: newNoticeType,
598
- userId: getStorage('userId'),
599
- notificationMsg: noticeInfo,
600
- customPresetUserJson: JSON.stringify(this.presetList),
601
- presetUserJson: JSON.stringify(this.presetUserJson),
602
- nextReadUserId: this.readMultiple
603
- ? this.mixReadList && this.mixReadList.join('|')
604
- : nextReadUserId,
605
- nextOrgId: !this.isShowNextUser
606
- ? this.multiple
607
- ? this.mixOrgIdList && this.mixOrgIdList.join('|')
608
- : nextOrgId
609
- : '',
610
- handleExplain: handleExplain,
611
- presetReadUserId:
612
- this.mixPresetList && this.mixPresetList.length > 0
613
- ? this.mixPresetList.join('|')
614
- : presetReadUserId.join(','),
615
- opinion: this.newOpinion || newOpinion,
616
- nextItemHandleDescription: this.nextItemHandleDescription,
617
- ...this.subParams
618
- };
619
- if (!this.currentNodeEnableItemHandleDescription) {
620
- delete params.nextItemHandleDescription;
621
- }
622
- if (this.activeNames != '1') delete params.customPresetUserJson;
623
- ajax({
624
- url: this.type == 'reset' ? resetProcess : taskContinuation,
625
- method: 'post',
626
- data: params
627
- })
628
- .then((res) => {
629
- const { status, message } = res;
630
- this.loading = false;
631
- if (status === 'success') {
632
- this.quit(true);
633
- this.$message({
634
- message: '操作成功',
635
- type: 'success'
636
- });
637
- } else {
638
- this.$message({
639
- message: message || '系统错误,请联系管理员!',
640
- type: 'error'
641
- });
642
- }
643
- })
644
- .catch((err) => {
645
- this.loading = false;
646
- });
647
- } else {
648
- return false;
649
- }
650
- });
651
- },
652
- getNodeInfos(nodeId, index) {
653
- let params = {
654
- processDefinitionId: this.processDefinitionId,
655
- nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
656
- businessId: this.taskExamine.businessId,
657
- pendingId: this.taskExamine.pendingId
658
- };
659
- ajax({ url: getNodeInfo, params })
660
- .then((res) => {
661
- const {
662
- status,
663
- message,
664
- data: {
665
- nextUserList,
666
- nodeExtAttr,
667
- countersignaturetypeText,
668
- countersignaturetypeCode
669
- }
670
- } = res;
671
- this.loading = false;
672
- if (status === 'success') {
673
- if (this.type == 'reset') {
674
- this.currentNodeEnableItemHandleDescription =
675
- nodeExtAttr.currentNodeEnableItemHandleDescription == 1;
676
- }
677
- this.nextNode.userInfo = nextUserList;
678
- this.countersignaturetypeCode = countersignaturetypeCode;
679
- this.nextNode.countersignaturetypeText = countersignaturetypeText;
680
- this.isTaskread = nodeExtAttr.isTaskread;
681
- this.isHandleExplain = nodeExtAttr.isHandleExplain;
682
- this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
683
- this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
684
- this.nodeInfoExtAttr = nodeExtAttr;
685
- this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
686
-
687
- if (
688
- nodeExtAttr.userSelectionType == 7 ||
689
- nodeExtAttr.userSelectionType == 8 ||
690
- nodeExtAttr.userSelectionType == 9 ||
691
- nodeExtAttr.userSelectionType == 10 ||
692
- nodeExtAttr.userSelectionType == 11 ||
693
- nodeExtAttr.userSelectionType == 12
694
- ) {
695
- this.getIsShowNextUser(
696
- nodeExtAttr && nodeExtAttr.userSelectionType
697
- );
698
- } else if (
699
- nodeExtAttr.userSelectionType == 13 ||
700
- nodeExtAttr.userSelectionType == 14
701
- ) {
702
- this.showRoleUser = true;
703
- if (data.nextRole) {
704
- this.radioList = [
705
- {
706
- showid: data.nextRole.id,
707
- showname: data.nextRole.rolename
708
- }
709
- ];
710
- if (this.isDefSelectedObj == 1) {
711
- this.nextNode.nextRoleId.push(data.nextRole.id);
712
- this.selectUserList.push({
713
- showname: data.nextRole.rolename,
714
- showid: data.nextRole.id
715
- });
716
- }
717
- }
718
- } else {
719
- const { multiple, params } = this.isMultiple(
720
- nodeExtAttr.userSelectionType
721
- );
722
- this.multiple = multiple;
723
- this.params = params;
724
- }
725
- // this.isReadMultiple(nodeExtAttr.userSelectionType);
726
-
727
- nextUserList.map((item) => {
728
- if (
729
- this.multiple &&
730
- nodeExtAttr.isDefSelectedObj == 1 &&
731
- nextUserList !== undefined
732
- ) {
733
- this.nextNode.nextUser.push(item.userId);
734
- this.selectUserList.push({
735
- showname: item.username,
736
- showid: item.userId
737
- });
738
- }
739
-
740
- this.options.push({
741
- showname: item.username,
742
- showid: item.userId
743
- });
744
- });
745
- if (this.multiple) {
746
- this.nextNode.nextReadUserId = [];
747
- } else {
748
- this.nextNode.nextReadUserId = '';
749
- }
750
- if (
751
- nextUserList.length > 0 &&
752
- nodeExtAttr.isDefSelectedObj == 1 &&
753
- !this.multiple
754
- ) {
755
- this.nextNode.nextUser = nextUserList[0].userId;
756
- this.selectUserList.push({
757
- showname: nextUserList[0].username,
758
- showid: nextUserList[0].userId
759
- });
760
- }
761
- this.radioList = this.options;
762
- } else {
763
- error(message || '系统错误,请联系管理员!');
764
- }
765
- nodeId && this.$refs.selectUser[index].changeInfo();
766
- })
767
- .catch((err) => {
768
- this.loading = false;
769
- });
770
- },
771
- changeSel(val) {
772
- this.nextNode.nextUser = [];
773
- this.options = [];
774
- this.selectUserList = [];
775
- this.radioList = [];
776
- this.loading = true;
777
- this.getNodeInfos();
778
- },
779
- // 取消
780
- quit(val) {
781
- if (val === true) return this.$emit('cancel', val);
782
- this.$emit('cancel', false);
783
- },
784
- getFind() {
785
- ajax({
786
- url: findSysCodes
787
- })
788
- .then((res) => {
789
- const { status, message } = res;
790
- if (status === 'success') {
791
- this.nextNode.noticeType = message.split(',');
792
- let arr = [];
793
- this.nextNode.noticeList.map((item) => {
794
- this.nextNode.noticeType.map((x) => {
795
- if (x == item.cciValue) {
796
- arr.push(x);
797
- }
798
- });
799
- });
800
- this.nextNode.noticeType = arr;
801
- this.showNoticeType = true;
802
- } else {
803
- error(message || '系统错误,请联系管理员!');
804
- }
805
- })
806
- .catch((err) => {
807
- this.loading = false;
808
- });
809
- },
810
- /**
811
- * isMultiple
812
- * @desc:是否多选
813
- * @author liufan
814
- * @date 2022年9月13日
815
- **/
816
- isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
817
- let multiple = false;
818
- let params = {};
819
- if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
820
- multiple = true;
821
- }
822
- if (val == 1 || val == 2 || val == 5) {
823
- params.filid = this.userModel.orgId;
824
- params.only_filid = true;
825
- if (choiceOrgId) {
826
- params.filid = choiceOrgId;
827
- }
828
- }
829
- if (val == 5 || val == 6) {
830
- params.filid = this.userModel.orgId;
831
- params.deptid = this.userModel.orgId;
832
- if (choiceDeptId) {
833
- params.deptid = choiceDeptId;
834
- }
835
- if (choiceOrgId) {
836
- params.filid = choiceOrgId;
837
- }
838
- }
839
- if (val == 15 || val == 16) {
840
- params.filid = this.userModel.orgId;
841
- if (pOrgId) {
842
- params.filid = pOrgId;
843
- }
844
- }
845
- return { multiple, params };
846
- },
847
- getResetFlow() {
848
- let params = {
849
- url:
850
- this.type == 'continuation'
851
- ? toTaskContinuationIndex
852
- : toResetProcessIndex,
853
- params: {
854
- appId: this.appId,
855
- ...this.flowParams
856
- }
857
- };
858
- this.loading = true;
859
- // 获取节点
860
- ajax(params)
861
- .then((res) => {
862
- //pc接口返回数据处理
863
- this.loading = false;
864
- const { status, message, data } = res;
865
- if (status == 'success') {
866
- data.nextNodeCheckType &&
867
- (this.nextNodeCheckType = data.nextNodeCheckType);
868
- this.pendtitle = data.pendtitle || data.taskExamine.businessName;
869
- this.customPresetHintMessage = data.customPresetHintMessage;
870
- this.readOnlyNotificationType = data.readOnlyNotificationType;
871
- this.notificationMessageReadOnly =
872
- data.notificationMessageReadOnly == 'true';
873
- let flowList = [];
874
- if (data.taskNodeList && data.taskNodeList.length > 0) {
875
- for (let key in data.taskNodeList[0]) {
876
- flowList.push({
877
- nodeName: data.taskNodeList[0][key],
878
- nodeId: key
879
- });
880
- }
881
- } else {
882
- for (let key in data.taskNodeMap) {
883
- flowList.push({
884
- nodeName: data.taskNodeMap[key],
885
- nodeId: key
886
- });
887
- }
888
- }
889
-
890
- this.nextNode.nodeInfo = flowList;
891
- this.nextNode.nextNode = flowList[0].nodeId;
892
- this.taskExamine = data.taskExamine;
893
- this.processDefinitionId = data.taskExamine.processDefinitionId;
894
- this.isOpinionRequired =
895
- data.nodeInfoMap.nodeExtAttr.isOpinionRequired;
896
- this.isHideDefaultOperation =
897
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
898
- this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
899
- this.isChooseNextNode =
900
- data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
901
- this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
902
- this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
903
- this.presetTaskNodeMap = data.presetTaskNodeMap;
904
- this.isSinglePage = data.taskExamine.isSinglePage;
905
- this.isSinglePage &&
906
- (this.nextNode.opinion = data.taskExamine.opinion);
907
- // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
908
- this.nextNode.nodeName = data.taskExamine.nodeName;
909
- this.canPresetRead = data.canPresetRead;
910
- if (data.canPresetRead) {
911
- let ids =
912
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
913
- let names =
914
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
915
- ','
916
- );
917
- ids.map((item, index) => {
918
- this.presetReadUserId.push({
919
- showid: item,
920
- showname: names[index]
921
- });
922
- this.selectPresetUserList.push({
923
- showid: item,
924
- showname: names[index]
925
- });
926
- this.nextNode.presetReadUserId.push(item);
927
- });
928
- }
929
- this.getNodeInfos();
930
- // this.getPresetFlowInfo();
931
-
932
- this.getNodeType();
933
- this.getMessage();
934
- } else {
935
- error(message || '系统错误,请联系管理员!');
936
- }
937
- })
938
- .catch((err) => {
939
- this.loading = false;
940
- });
941
- }
942
- }
943
- };
944
- </script>