eoss-ui 0.6.47 → 0.6.49

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