eoss-ui 0.6.76 → 0.6.78

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