eoss-ui 0.8.17 → 0.8.19

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