eoss-mobiles 0.4.0 → 0.4.2

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 (232) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/lib/button-group.js +2 -2
  3. package/lib/button.js +2 -2
  4. package/lib/calendar.js +2 -2
  5. package/lib/cell.js +2 -2
  6. package/lib/checkbox.js +2 -2
  7. package/lib/circle.js +2 -2
  8. package/lib/count-down.js +2 -2
  9. package/lib/empty.js +2 -2
  10. package/lib/eoss-mobile.common.js +542 -93
  11. package/lib/field.js +2 -2
  12. package/lib/flow-btn.js +2 -2
  13. package/lib/flow.js +8 -8
  14. package/lib/form.js +593 -144
  15. package/lib/grid-item.js +2 -2
  16. package/lib/grid.js +2 -2
  17. package/lib/index.js +1 -1
  18. package/lib/list.js +2 -2
  19. package/lib/loading.js +85 -85
  20. package/lib/nav-bar.js +2 -2
  21. package/lib/picker.js +12 -11
  22. package/lib/popover.js +2 -2
  23. package/lib/radio.js +8 -7
  24. package/lib/search.js +2 -2
  25. package/lib/selector.js +28 -28
  26. package/lib/switch.js +2 -2
  27. package/lib/tab.js +2 -2
  28. package/lib/table-column.js +3 -2
  29. package/lib/tabs.js +2 -2
  30. package/lib/tag.js +2 -2
  31. package/lib/theme-chalk/fonts/iconfont.scss +98 -98
  32. package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
  33. package/lib/theme-chalk/form.css +1 -1
  34. package/lib/theme-chalk/index.css +1 -1
  35. package/lib/uploader.js +3 -2
  36. package/package.json +1 -1
  37. package/packages/action-sheet/index.js +5 -5
  38. package/packages/action-sheet/src/main.vue +32 -32
  39. package/packages/button/index.js +5 -5
  40. package/packages/button/src/main.vue +15 -15
  41. package/packages/button-group/index.js +5 -5
  42. package/packages/button-group/src/main.vue +80 -80
  43. package/packages/calendar/index.js +5 -5
  44. package/packages/calendar/src/main.vue +34 -34
  45. package/packages/cascader/index.js +5 -5
  46. package/packages/cascader/src/main.vue +39 -39
  47. package/packages/cell/index.js +5 -5
  48. package/packages/cell/src/main.vue +77 -77
  49. package/packages/checkbox/index.js +5 -5
  50. package/packages/checkbox/src/main.vue +232 -232
  51. package/packages/circle/index.js +5 -5
  52. package/packages/circle/src/main.vue +27 -27
  53. package/packages/count-down/index.js +5 -5
  54. package/packages/count-down/src/main.vue +27 -27
  55. package/packages/date/index.js +5 -5
  56. package/packages/date/src/date-time.vue +290 -290
  57. package/packages/date/src/main.vue +401 -401
  58. package/packages/empty/index.js +5 -5
  59. package/packages/empty/src/main.vue +16 -16
  60. package/packages/esign/index.js +5 -5
  61. package/packages/esign/src/main.vue +144 -144
  62. package/packages/field/index.js +5 -5
  63. package/packages/flow/index.js +5 -5
  64. package/packages/flow/src/components/Circulate.vue +595 -595
  65. package/packages/flow/src/components/Handle.vue +2404 -2404
  66. package/packages/flow/src/components/Message.vue +208 -208
  67. package/packages/flow/src/components/ProcessSettings.vue +342 -342
  68. package/packages/flow/src/components/TaskRead.vue +1 -1
  69. package/packages/flow/src/components/supervise.vue +139 -139
  70. package/packages/flow/src/flowMix.js +288 -288
  71. package/packages/flow/src/main.vue +116 -116
  72. package/packages/flow-btn/index.js +5 -5
  73. package/packages/flow-btn/src/main.vue +494 -494
  74. package/packages/flow-list/index.js +5 -5
  75. package/packages/flow-list/src/main.vue +248 -248
  76. package/packages/form/index.js +5 -5
  77. package/packages/form/src/CustomCard.vue +201 -0
  78. package/packages/form/src/main.vue +32 -19
  79. package/packages/grid/index.js +5 -5
  80. package/packages/grid/src/main.vue +486 -486
  81. package/packages/grid-item/index.js +5 -5
  82. package/packages/grid-item/src/main.vue +16 -16
  83. package/packages/image/index.js +5 -5
  84. package/packages/image/src/main.vue +12 -12
  85. package/packages/image-preview/index.js +5 -5
  86. package/packages/list/index.js +5 -5
  87. package/packages/list/src/main.vue +32 -32
  88. package/packages/loading/index.js +5 -5
  89. package/packages/loading/src/main.vue +19 -19
  90. package/packages/nav-bar/index.js +5 -5
  91. package/packages/nav-bar/src/main.vue +24 -24
  92. package/packages/notice-bar/index.js +5 -5
  93. package/packages/notice-bar/src/main.vue +15 -15
  94. package/packages/pagination/index.js +5 -5
  95. package/packages/pagination/src/main.vue +73 -73
  96. package/packages/picker/index.js +5 -5
  97. package/packages/picker/src/main.vue +604 -604
  98. package/packages/popover/index.js +5 -5
  99. package/packages/popover/src/main.vue +32 -32
  100. package/packages/popup/index.js +5 -5
  101. package/packages/popup/src/main.vue +27 -27
  102. package/packages/pull-refresh/index.js +5 -5
  103. package/packages/pull-refresh/src/main.vue +31 -31
  104. package/packages/radio/index.js +5 -5
  105. package/packages/radio/src/main.vue +179 -179
  106. package/packages/rate/index.js +5 -5
  107. package/packages/rate/src/main.vue +26 -26
  108. package/packages/retrial-auth/index.js +5 -5
  109. package/packages/retrial-auth/src/main.vue +257 -257
  110. package/packages/search/index.js +5 -5
  111. package/packages/search/src/main.vue +39 -39
  112. package/packages/selector/index.js +5 -5
  113. package/packages/selector/src/main.vue +186 -186
  114. package/packages/selector/src/selector-tree.vue +1117 -1117
  115. package/packages/selector/src/tree.vue +405 -405
  116. package/packages/skeleton/index.js +5 -5
  117. package/packages/skeleton/src/main.vue +17 -17
  118. package/packages/stepper/index.js +5 -5
  119. package/packages/stepper/src/main.vue +25 -25
  120. package/packages/swipe/index.js +5 -5
  121. package/packages/swipe/src/main.vue +42 -42
  122. package/packages/switch/index.js +5 -5
  123. package/packages/switch/src/main.vue +38 -38
  124. package/packages/tab/index.js +5 -5
  125. package/packages/tab/src/main.vue +16 -16
  126. package/packages/table/index.js +5 -5
  127. package/packages/table/src/main.vue +1006 -1006
  128. package/packages/table-column/index.js +5 -5
  129. package/packages/table-column/src/main.vue +931 -931
  130. package/packages/table-column/src/mixins/table.js +12 -12
  131. package/packages/tabs/index.js +5 -5
  132. package/packages/tabs/src/main.vue +34 -34
  133. package/packages/tag/index.js +5 -5
  134. package/packages/tag/src/main.vue +16 -16
  135. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  136. package/packages/theme-chalk/lib/base.css +1 -0
  137. package/packages/theme-chalk/lib/button-group.css +1 -0
  138. package/packages/theme-chalk/lib/button.css +1 -0
  139. package/packages/theme-chalk/lib/calendar.css +1 -0
  140. package/packages/theme-chalk/lib/cascader.css +1 -0
  141. package/packages/theme-chalk/lib/cell.css +1 -0
  142. package/packages/theme-chalk/lib/checkbox.css +1 -0
  143. package/packages/theme-chalk/lib/circle.css +1 -0
  144. package/packages/theme-chalk/lib/count-down.css +0 -0
  145. package/packages/theme-chalk/lib/date.css +0 -0
  146. package/packages/theme-chalk/lib/empty.css +0 -0
  147. package/packages/theme-chalk/lib/esign.css +1 -0
  148. package/packages/theme-chalk/lib/field.css +1 -0
  149. package/packages/theme-chalk/lib/flow-btn.css +1 -0
  150. package/packages/theme-chalk/lib/flow-list-task-read.css +1 -0
  151. package/packages/theme-chalk/lib/flow-list.css +1 -0
  152. package/packages/theme-chalk/lib/flow.css +1 -0
  153. package/packages/theme-chalk/lib/fonts/iconfont.scss +98 -0
  154. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  155. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  156. package/packages/theme-chalk/lib/fonts/iconfont1.scss +90 -0
  157. package/packages/theme-chalk/lib/form.css +1 -0
  158. package/packages/theme-chalk/lib/grid-item.css +1 -0
  159. package/packages/theme-chalk/lib/grid.css +1 -0
  160. package/packages/theme-chalk/lib/icon.css +1 -0
  161. package/packages/theme-chalk/lib/image-preview.css +0 -0
  162. package/packages/theme-chalk/lib/image.css +0 -0
  163. package/packages/theme-chalk/lib/index.css +1 -0
  164. package/packages/theme-chalk/lib/list.css +0 -0
  165. package/packages/theme-chalk/lib/loading.css +0 -0
  166. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  167. package/packages/theme-chalk/lib/navbar.css +1 -0
  168. package/packages/theme-chalk/lib/notice-bar.css +0 -0
  169. package/packages/theme-chalk/lib/pagination.css +1 -0
  170. package/packages/theme-chalk/lib/picker.css +1 -0
  171. package/packages/theme-chalk/lib/popover.css +0 -0
  172. package/packages/theme-chalk/lib/popup.css +0 -0
  173. package/packages/theme-chalk/lib/pull-refresh.css +0 -0
  174. package/packages/theme-chalk/lib/radio.css +1 -0
  175. package/packages/theme-chalk/lib/rate.css +0 -0
  176. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  177. package/packages/theme-chalk/lib/search.css +0 -0
  178. package/packages/theme-chalk/lib/selector.css +1 -0
  179. package/packages/theme-chalk/lib/skeleton.css +0 -0
  180. package/packages/theme-chalk/lib/stepper.css +1 -0
  181. package/packages/theme-chalk/lib/swipe.css +0 -0
  182. package/packages/theme-chalk/lib/switch.css +1 -0
  183. package/packages/theme-chalk/lib/tab.css +0 -0
  184. package/packages/theme-chalk/lib/table-column.css +0 -0
  185. package/packages/theme-chalk/lib/table.css +1 -0
  186. package/packages/theme-chalk/lib/tabs.css +1 -0
  187. package/packages/theme-chalk/lib/tag.css +1 -0
  188. package/packages/theme-chalk/lib/theme.css +0 -0
  189. package/packages/theme-chalk/lib/tree.css +1 -0
  190. package/packages/theme-chalk/lib/uploader.css +0 -0
  191. package/packages/theme-chalk/src/base.scss +195 -195
  192. package/packages/theme-chalk/src/button-group.scss +25 -25
  193. package/packages/theme-chalk/src/button.scss +2 -2
  194. package/packages/theme-chalk/src/calendar.scss +11 -11
  195. package/packages/theme-chalk/src/cascader.scss +11 -11
  196. package/packages/theme-chalk/src/cell.scss +14 -14
  197. package/packages/theme-chalk/src/checkbox.scss +9 -9
  198. package/packages/theme-chalk/src/circle.scss +6 -6
  199. package/packages/theme-chalk/src/common/var.scss +1525 -1525
  200. package/packages/theme-chalk/src/esign.scss +51 -51
  201. package/packages/theme-chalk/src/field.scss +98 -98
  202. package/packages/theme-chalk/src/flow-btn.scss +99 -99
  203. package/packages/theme-chalk/src/flow-list.scss +122 -122
  204. package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
  205. package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
  206. package/packages/theme-chalk/src/form.scss +107 -33
  207. package/packages/theme-chalk/src/grid-item.scss +16 -16
  208. package/packages/theme-chalk/src/grid.scss +46 -46
  209. package/packages/theme-chalk/src/icon.scss +1661 -1661
  210. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  211. package/packages/theme-chalk/src/navbar.scss +5 -5
  212. package/packages/theme-chalk/src/pagination.scss +12 -12
  213. package/packages/theme-chalk/src/picker.scss +31 -31
  214. package/packages/theme-chalk/src/radio.scss +6 -6
  215. package/packages/theme-chalk/src/retrial-auth.scss +28 -28
  216. package/packages/theme-chalk/src/selector.scss +247 -247
  217. package/packages/theme-chalk/src/stepper.scss +9 -9
  218. package/packages/theme-chalk/src/switch.scss +5 -5
  219. package/packages/theme-chalk/src/table.scss +86 -86
  220. package/packages/theme-chalk/src/tabs.scss +31 -31
  221. package/packages/theme-chalk/src/tag.scss +12 -12
  222. package/packages/theme-chalk/src/theme.scss +1 -1
  223. package/packages/theme-chalk/src/tree.scss +127 -127
  224. package/packages/uploader/index.js +5 -5
  225. package/src/config/api.js +190 -190
  226. package/src/index.js +1 -1
  227. package/src/utils/axios.js +217 -217
  228. package/src/utils/date-util.js +312 -312
  229. package/src/utils/http.js +106 -106
  230. package/src/utils/rules.js +18 -18
  231. package/src/utils/store.js +21 -21
  232. package/packages/theme-chalk/gulpfile.js +0 -25
@@ -1,2404 +1,2404 @@
1
- <template>
2
- <div class="process-handle">
3
- <StartFlow
4
- v-if="showFreeStart"
5
- @close="showFreeStart = false"
6
- :defId="freeStartFlowParams.defId"
7
- :businessId="
8
- freeStartFlowParams.startFlowBusinessId || taskExamineInfo.businessId
9
- "
10
- :taskParams="taskParams"
11
- :is-free-start-flow="
12
- freeStartFlowParams.useScene === 'multiInsMidwayWithSubmitScene'
13
- "
14
- @closePop="showFreeStart = false"
15
- @success="handleSuccess"
16
- :opinion="form.opinion"
17
- :hideMessage="hideMessage"
18
- :flowLabelConfig="flowLabelConfig"
19
- :copy-history="freeStartFlowParams.pendedHistoryHandle"
20
- :formType="processFormType"
21
- :orgId="orgId"
22
- :depId="depId"
23
- />
24
- <div
25
- v-else-if="handleFlow"
26
- style="display: flex; flex-direction: column; height: 100%"
27
- >
28
- <div class="process-content">
29
- <!-- 当前节点 -->
30
- <div class="present-node">
31
- <div class="label">当前节点:</div>
32
- <div>{{ processObj.taskExamine.nodeName }}</div>
33
- </div>
34
- <!-- 意见 -->
35
- <Opinion
36
- :code="processObj.attachedCode"
37
- :ownId="pendingId"
38
- :esign="esign && typeCode != 'endFlow'"
39
- :opinionType="opinionType"
40
- :paddingTop="paddingTop"
41
- :esignLineWidth="
42
- $attrs['esign-line-width'] || $attrs['esignLineWidth']
43
- "
44
- @onInputOpintion="onInputOpintion"
45
- :isOpinionRequired="isOpinionRequired"
46
- :disabled="isBanInputOpinion != 0"
47
- :baseUrl="baseUrl"
48
- :isForceDisplayDefaultOptionForPrefix="
49
- isForceDisplayDefaultOptionForPrefix
50
- "
51
- @click="handlePop"
52
- :showOpinionPop="showOpinionPop"
53
- :pendingItemHandleDescription="pendingItemHandleDescription"
54
- :oldOpinion="form.opinion"
55
- :placeholder="
56
- pendingItemHandleDescription || opinionHandleExplainText
57
- "
58
- :nodeDefaultSubmitOpinion="nodeDefaultSubmitOpinion"
59
- :nodeFixedOpinionSelectList="nodeFixedOpinionSelectList"
60
- :isHiddenOftenOpinion="isHiddenOftenOpinion == 1 ? false : true"
61
- ></Opinion>
62
- <!-- 审核内容 -->
63
- <div
64
- class="special-box input-box"
65
- v-if="
66
- typeCode != 'fenyue' &&
67
- typeCode != 'endFlow' &&
68
- (!endFlow ||
69
- taskOperations.length > 1 ||
70
- taskOperationShiftedNodeList)
71
- "
72
- >
73
- <!-- 加签 -->
74
- <div
75
- class="item"
76
- :class="{ itemRadio: form.isAddSign === '1' }"
77
- v-if="isCanAddSign"
78
- >
79
- <em-input
80
- name="radio"
81
- label="是否增加本环节办理人"
82
- :required="true"
83
- >
84
- <template slot="input">
85
- <em-radio-group
86
- v-model="form.isAddSign"
87
- :data="isAddSignList"
88
- direction="horizontal"
89
- />
90
- </template>
91
- </em-input>
92
- </div>
93
- <div
94
- class="item item-user"
95
- label="增加办理人"
96
- v-if="form.isAddSign === '1'"
97
- >
98
- <em-selector
99
- label="增加办理人"
100
- required
101
- multiple
102
- :isAllCheck="isAllCheck"
103
- :baseUrl="apiBaseUrl"
104
- :isClosePopup="showSelectorPopup"
105
- :paddingTop="paddingTop"
106
- :objType="objType"
107
- v-model="addSignUserSelectList"
108
- @change="disposeAppUser($event, 'addSignUserSelectList')"
109
- @selector-click="handleSelectorClick"
110
- />
111
- <em-input v-if="isCanPreAddSign" label="加签模式">
112
- <template slot="input">
113
- <em-radio-group
114
- v-model="form.addSignMode"
115
- direction="horizontal"
116
- :data="AddSignList"
117
- />
118
- </template>
119
- </em-input>
120
- </div>
121
- <!-- 减签 -->
122
- <div
123
- class="item"
124
- :class="{ itemRadio: form.isRemoveSign === '1' }"
125
- v-if="isCanRemoveSign"
126
- >
127
- <em-input name="radio" label="是否减签" :required="true">
128
- <template slot="input">
129
- <em-radio-group
130
- v-model="form.isRemoveSign"
131
- :data="isAddSignList"
132
- direction="horizontal"
133
- />
134
- </template>
135
- </em-input>
136
- </div>
137
- <div v-if="isSpecial && typeCode != 'fenyue'">
138
- <div
139
- class="item item-user"
140
- label="减少办理人"
141
- v-if="form.isRemoveSign === '1'"
142
- >
143
- <em-selector
144
- label="减少办理人"
145
- :isAllCheck="isAllCheck"
146
- required
147
- :paddingTop="paddingTop"
148
- multiple
149
- :isClosePopup="showSelectorPopup"
150
- :baseUrl="apiBaseUrl"
151
- :objType="objType"
152
- @selector-click="handleSelectorClick"
153
- v-model="removeSignUserSelectList"
154
- @change="disposeAppUser($event, 'removeSignUserSelectList')"
155
- />
156
- </div>
157
- <!-- 下一步所有相关操作-->
158
- <div
159
- v-if="
160
- form.isRemoveSign !== '1' &&
161
- form.isAddSign !== '1' &&
162
- !isHiddenNextStepInfo
163
- "
164
- >
165
- <!-- <div
166
- @click="isNextBox = !isNextBox"
167
- v-if="!isReject"
168
- class="shrink-btn"
169
- >
170
- {{ isNextBox ? '收起下一步操作和节点' : '展开下一步操作和节点' }}
171
- </div> -->
172
- <div class="next-box" v-show="isNextBox || isReject">
173
- <!-- 下一步操作 -->
174
- <div
175
- class="item next-step"
176
- v-if="!isHiddenNextStepInfo && isChooseNextNode == 1"
177
- >
178
- <em-input
179
- value="下步操作"
180
- label="下步操作"
181
- required
182
- class="em-flow-next-steps"
183
- :disabled="true"
184
- label-position="top"
185
- >
186
- <template slot="input">
187
- <span
188
- class="em-flow-tag"
189
- :class="{ 'em-flow-tag-active': tagKey === item.key }"
190
- @click="changeNextOperate(item)"
191
- v-for="item in taskOperations"
192
- :key="item.key"
193
- >
194
- {{ item.value }}
195
- </span>
196
- </template>
197
- </em-input>
198
- <!-- <em-picker
199
- title="下步操作"
200
- label="下步操作"
201
- required
202
- show-toolbar
203
- v-model="form.nextOperateName"
204
- label-width="100%"
205
- :columns="taskOperations"
206
- value-key="key"
207
- label-key="value"
208
- @confirm="changeNextOperate"
209
- /> -->
210
- </div>
211
- <!-- 下步节点 -->
212
- <div
213
- class="item"
214
- v-if="
215
- nodeList && nodeList.length > 0 && !isReject && isShowNode
216
- "
217
- >
218
- <em-picker
219
- v-if="
220
- nextNodeCheckType == 'select' &&
221
- flowSelectType == 'picker'
222
- "
223
- title="下步节点"
224
- label="下步节点"
225
- required
226
- show-toolbar
227
- v-model="form.nextNodeName"
228
- label-width="100%"
229
- :columns="nodeList"
230
- value-key="nodeId"
231
- label-key="nodeName"
232
- @confirm="onConfirmNextNode"
233
- />
234
- <em-input
235
- v-else-if="
236
- nextNodeCheckType == 'select' && flowSelectType == 'popup'
237
- "
238
- label="下步节点"
239
- required
240
- :readonly="true"
241
- @click="showFlowSelect = true"
242
- label-position="top"
243
- right-icon="arrow"
244
- >
245
- <template slot="input">
246
- <div style="width: calc(100% - 40px)">
247
- {{ form.nextNodeName }}
248
- </div>
249
- </template>
250
- </em-input>
251
- <em-input
252
- v-else
253
- value="下步节点"
254
- label="下步节点"
255
- required
256
- class="em-flow-next-steps"
257
- :disabled="true"
258
- label-position="top"
259
- >
260
- <template slot="input">
261
- <em-radio-group
262
- v-model="form.nextNodeId"
263
- :data="nodeList"
264
- value-key="nodeId"
265
- label-key="nodeName"
266
- direction="horizontal"
267
- @change="onConfirmNextNode"
268
- />
269
- </template>
270
- </em-input>
271
- </div>
272
- </div>
273
- <!-- 处理方式提示文字 -->
274
- <div class="item" v-if="countersignaturetypeCode">
275
- <van-field
276
- v-model="countersignaturetypeText"
277
- label="处理方式"
278
- :disabled="true"
279
- />
280
- </div>
281
- <!-- 下一步办理人 -->
282
- <div class="item item-user" v-if="isNextUser">
283
- <em-selector
284
- :multiple="!isRadio"
285
- v-model="nextUserSelectList"
286
- :objType="objType"
287
- :isAllCheck="isAllCheck"
288
- :isClosePopup="showSelectorPopup"
289
- required
290
- @selector-click="handleSelectorClick"
291
- :paddingTop="paddingTop"
292
- :nextUserList="nextUserList"
293
- :baseUrl="apiBaseUrl"
294
- tabs="employee,persongroup"
295
- :disabled="
296
- !isCustomUser || isCurrentNodeForbiddenChangeCandidate == 1
297
- "
298
- :selectDisabled="isCurrentNodeForbiddenChangeCandidate == 1"
299
- :placeholder="`请选择${
300
- flowLabelConfig.nextUser || '下步办理人'
301
- }`"
302
- :param="{
303
- pid: pid,
304
- onlyMyOrg: onlyMyOrg
305
- }"
306
- :label="`${flowLabelConfig.nextUser || '下步办理人'}`"
307
- @change="disposeAppUser($event, 'nextUserSelectList')"
308
- />
309
- </div>
310
- <!-- 办理角色-->
311
- <div class="item" v-if="isDealRole">
312
- <em-input
313
- value="办理角色"
314
- label="办理角色"
315
- :disabled="true"
316
- placeholder="请选择"
317
- />
318
- </div>
319
- <!-- 办理对象-->
320
- <div class="item" v-if="isDealObject">
321
- <em-input
322
- value="办理对象"
323
- label="办理对象"
324
- :disabled="true"
325
- placeholder="请选择"
326
- />
327
- </div>
328
- <!-- 本单位-->
329
- <!-- v-if="isHideCurrentOrg" -->
330
- <div class="item" v-if="isHideCurrentOrg">
331
- <em-selector
332
- v-model="nextCurrentOrgObjSelect"
333
- multiple
334
- :isClosePopup="showSelectorPopup"
335
- :isAllCheck="isAllCheck"
336
- :paddingTop="paddingTop"
337
- isDepartment
338
- @selector-click="handleSelectorClick"
339
- :objType="'enterprise'"
340
- :tabs="currentOrgSelectorTabs"
341
- :param="currentOrgSelectorParams"
342
- :disableds="currentOrgDisabledObjId"
343
- :baseUrl="apiBaseUrl"
344
- :isOtherUnit="false"
345
- :label="currentOrgName ? currentOrgName : '本单位'"
346
- @change="disposeAppUnit($event, 'nextCurrentOrgObjSelect')"
347
- />
348
- </div>
349
- <!-- :nextUserList="nextUserList" -->
350
- <!-- 外单位 -->
351
- <!-- v-if="isHideOtherOrg" -->
352
- <div class="item" v-if="isHideOtherOrg">
353
- <em-selector
354
- v-model="nextOtherOrgObjSelect"
355
- multiple
356
- :isAllCheck="isAllCheck"
357
- :isClosePopup="showSelectorPopup"
358
- :paddingTop="paddingTop"
359
- @selector-click="handleSelectorClick"
360
- :objType="'enterprise'"
361
- :param="foreignOrgSelectorParams"
362
- :tabs="foreignOrgSelectorTabs"
363
- :baseUrl="apiBaseUrl"
364
- :disableds="otherOrgDisabledObjId"
365
- :isOtherUnit="true"
366
- isEnterprise
367
- :label="otherOrgName ? otherOrgName : '外单位'"
368
- @change="disposeAppUnit($event, 'nextOtherOrgObjSelect')"
369
- />
370
- </div>
371
- <div class="item" v-if="enableCustomLimitTimeSetting">
372
- <!-- <van-field
373
- value="主办"
374
- label="主办"
375
- :disabled="true"
376
- placeholder="请选择"
377
- /> -->
378
- <em-picker
379
- v-model="form.customLimitTime"
380
- v-if="!showCustomLimitTimeText"
381
- label="限时办理"
382
- title="限时办理"
383
- placeholder="请选择"
384
- sysAppCode="bpm_custom_limit_time"
385
- show-toolbar
386
- >
387
- <template slot="button">
388
- <em-button
389
- size="small"
390
- type="primary"
391
- @click="
392
- () => {
393
- // form.customLimitTime = '';
394
- showCustomLimitTimeText = !showCustomLimitTimeText;
395
- }
396
- "
397
- >切换文本框</em-button
398
- >
399
- </template>
400
- </em-picker>
401
- <em-input
402
- v-else
403
- v-model="form.customLimitTime"
404
- center
405
- label="限时办理"
406
- clearable
407
- @change="changeCustomLimitTime"
408
- placeholder="请输入限时办理天数"
409
- >
410
- <template slot="button">
411
- <em-button
412
- size="small"
413
- type="primary"
414
- @click="
415
- () => {
416
- // form.customLimitTime = '';
417
- showCustomLimitTimeText = !showCustomLimitTimeText;
418
- }
419
- "
420
- >切换选择框</em-button
421
- >
422
- </template>
423
- </em-input>
424
- </div>
425
- <!-- 主办 -->
426
- <div class="item" v-if="isMainSubProcess && isNodeShowProcess">
427
- <!-- <van-field
428
- value="主办"
429
- label="主办"
430
- :disabled="true"
431
- placeholder="请选择"
432
- /> -->
433
- <em-picker
434
- v-model="form.mainSubId"
435
- label="主办"
436
- title="主办"
437
- placeholder="请选择主办"
438
- show-toolbar
439
- :disabled="subProcessColumns.length == 0"
440
- :columns="subProcessColumns"
441
- />
442
- </div>
443
- <!-- 办理说明 -->
444
- <div class="item" v-if="isHandleExplain">
445
- <van-field
446
- v-model="form.handleExplain"
447
- value="办理说明"
448
- label="办理说明"
449
- placeholder="请输入办理说明"
450
- />
451
- </div>
452
- <div
453
- class="item"
454
- v-if="
455
- currentNodeEnableItemHandleDescription &&
456
- nodeList &&
457
- nodeList.length != 0 &&
458
- isShowNode &&
459
- isNextUser
460
- "
461
- >
462
- <van-field
463
- v-model="form.nextItemHandleDescription"
464
- value="办理说明"
465
- label="办理说明"
466
- placeholder="请输入办理说明"
467
- />
468
- </div>
469
- </div>
470
- <!-- 分阅 -->
471
- <div
472
- class="item"
473
- v-if="
474
- form.isRemoveSign !== '1' &&
475
- form.isAddSign !== '1' &&
476
- isTaskread
477
- "
478
- >
479
- <div class="item item-user">
480
- <em-selector
481
- v-model="nextReadUserSelectList"
482
- multiple
483
- :isAllCheck="isAllCheck"
484
- @selector-click="handleSelectorClick"
485
- :objType="objType"
486
- :param="{
487
- pid: pid
488
- }"
489
- :isClosePopup="showSelectorPopup"
490
- :paddingTop="paddingTop"
491
- :baseUrl="apiBaseUrl"
492
- tabs="employee,persongroup"
493
- label="分阅用户"
494
- @change="disposeAppUser($event, 'nextReadUserSelectList')"
495
- />
496
- </div>
497
- </div>
498
- <!-- 限时办理 -->
499
- <!-- v-if="isLimitedTimeHandling" -->
500
- <div class="item" v-if="isLimitedTimeHandling">
501
- <em-input name="radio" label="是否限时办理" :required="true">
502
- <template slot="input">
503
- <em-radio-group
504
- v-model="form.isLimitedTime"
505
- :data="isAddSignList"
506
- direction="horizontal"
507
- />
508
- </template>
509
- </em-input>
510
- </div>
511
- <div
512
- class="item item-limited-time"
513
- v-if="form.isLimitedTime === '1'"
514
- >
515
- <em-input name="radio" label="限时办理时间" :required="true">
516
- <template slot="input">
517
- <div class="item-limited-time-content">
518
- <div>
519
- <em-input
520
- placeholder="请输入天数"
521
- v-model="form.limitedTimeDay"
522
- type="digit"
523
- />
524
- </div>
525
- <div class="day-text">天</div>
526
- <div>
527
- <em-input
528
- :value="form.limitedTimeHour"
529
- clickable
530
- readonly
531
- placeholder="请选择小时"
532
- @click="openTimeList('limitedTimeHour')"
533
- />
534
- </div>
535
- <div class="day-text">时</div>
536
- </div>
537
- </template>
538
- </em-input>
539
- </div>
540
- <div
541
- class="item item-limited-time"
542
- v-if="form.isLimitedTime === '1'"
543
- >
544
- <em-input name="radio" label="提前通知时间" :required="true">
545
- <template slot="input">
546
- <div class="item-limited-time-content">
547
- <div>
548
- <em-input
549
- placeholder="请输入天数"
550
- v-model="form.advanceNoticeDay"
551
- type="digit"
552
- />
553
- </div>
554
- <div class="day-text">天</div>
555
- <div>
556
- <em-input
557
- :value="form.advanceNoticeHour"
558
- clickable
559
- placeholder="请选择小时"
560
- readonly
561
- @click="openTimeList('advanceNoticeHour')"
562
- />
563
- </div>
564
- <div class="day-text">时</div>
565
- </div>
566
- </template>
567
- </em-input>
568
- </div>
569
- <van-popup v-model="showTimeList" round position="bottom">
570
- <van-picker
571
- show-toolbar
572
- :columns="timeList"
573
- @cancel="showTimeList = false"
574
- @confirm="onConfirmTimeList"
575
- />
576
- </van-popup>
577
- <ProcessSetting
578
- v-if="isCustomPreset && isPreset"
579
- ref="processSetting"
580
- :processDefinitionId="taskExamineInfo.processDefinitionId"
581
- :nodeId="form.nextNodeId"
582
- :hideMessage="hideMessage"
583
- :flowLabelConfig="flowLabelConfig"
584
- :taskId="processObj.taskExamine.taskId"
585
- :pendingId="pendingId"
586
- :businessId="taskExamineInfo.businessId"
587
- :apiBaseUrl="apiBaseUrl"
588
- :paddingTop="paddingTop"
589
- :customPresetHintMessage="customPresetHintMessage"
590
- :choiceOrgId="choiceOrgId"
591
- :pOrgId="pOrgId"
592
- :choiceDeptId="choiceDeptId"
593
- />
594
- <!-- 催办通知方式 -->
595
- <div class="item-msg item-msg1" v-if="form.isLimitedTime === '1'">
596
- <Message
597
- ref="message"
598
- :label="'催办通知方式'"
599
- :code="msgCode"
600
- onlyShowType
601
- :baseUrl="baseUrl"
602
- :pendingId="pendingId"
603
- @onInputMsg="onInputMsgUrge"
604
- :required="true"
605
- ></Message>
606
- </div>
607
-
608
- <!-- 通知方式 -->
609
- <div class="item-msg item-msg2" v-if="!hideMessage">
610
- <Message
611
- ref="message"
612
- :code="msgCode"
613
- :baseUrl="baseUrl"
614
- :readOnlyNotificationType="readOnlyNotificationType"
615
- :notificationMessageReadOnly="notificationMessageReadOnly"
616
- :pendingId="pendingId"
617
- :defaultNotificationType="defaultNotificationType"
618
- :defaultNotificationMsg="form.notificationMsg"
619
- @onInputMsg="onInputMsg"
620
- ></Message>
621
- </div>
622
- </div>
623
- </div>
624
- </div>
625
- <div
626
- v-if="isSubmitButtonShowAgreeAndDisagree && showFlowBtn"
627
- class="btn-list"
628
- >
629
- <div class="btn" @click="handleFlow = false">不同意</div>
630
- <div class="btn" @click="onSubmit()">同意</div>
631
- </div>
632
- <div v-else-if="showFlowBtn" class="btn-list">
633
- <div class="btn" @click="navigateBack">取消</div>
634
- <div class="btn" @click="onSubmit()">
635
- {{ submitButtonName || '确定' }}
636
- </div>
637
- </div>
638
- </div>
639
- <Reject
640
- v-else
641
- :pendingId="pendingId"
642
- :before-submit="beforeSubmit"
643
- :hideMessage="hideMessage"
644
- :flowLabelConfig="flowLabelConfig"
645
- @close="handleFlow = true"
646
- />
647
- <em-popup class="em-flow-popup" v-model="showDefList">
648
- <div class="em-flow-popup-box">
649
- <div class="em-flow-popup-box-top">
650
- <div></div>
651
- <span>发起流程 </span
652
- ><van-icon name="cross" @click="showDefList = false" />
653
- </div>
654
- <div class="em-flow-popup-box-content">
655
- <div
656
- class="em-flow-popup-box-item"
657
- v-for="item in flowDefList"
658
- :key="item.defId"
659
- @click="handleClickDefList(item)"
660
- >
661
- {{ item.defName }}
662
- </div>
663
- </div>
664
- </div>
665
- </em-popup>
666
- <em-popup
667
- lass="em-flow-popup"
668
- v-model="showFlowSelect"
669
- position="center"
670
- style="width: 80%"
671
- >
672
- <div class="em-flow-popup-box">
673
- <div class="em-flow-popup-box-top">
674
- <div></div>
675
- <span>下步节点 </span
676
- ><van-icon name="cross" @click="showFlowSelect = false" />
677
- </div>
678
- <div class="em-flow-popup-box-content">
679
- <div
680
- class="em-flow-popup-box-item"
681
- v-for="item in nodeList"
682
- :key="item.nodeId"
683
- @click="handleClickFlow(item)"
684
- >
685
- {{ item.nodeName }}
686
- </div>
687
- </div>
688
- </div>
689
- </em-popup>
690
- </div>
691
- </template>
692
-
693
- <script>
694
- import {
695
- getHandleInfoHtml,
696
- toStartTaskReadHtml,
697
- taskReadHtml,
698
- taskReadWithHandwrittenOpinion,
699
- getNodeInfoHtml,
700
- taskHandleHtml,
701
- taskHandleHtmlImg,
702
- getProcessDefList,
703
- getFreeStartFlowParams,
704
- endFlowHtml
705
- } from '../../../../src/config/api.js';
706
- import request from '../../../../src/utils/http.js';
707
- import Opinion from './Opinion.vue';
708
- import Reject from './Reject.vue';
709
- import StartFlow from './StartFlow.vue';
710
- import Message from './Message.vue';
711
- import ProcessSetting from './ProcessSettings.vue';
712
- import FlowMix from '../flowMix';
713
- import $ from '../../../../src/utils/util';
714
- export default {
715
- name: 'Handle',
716
- inheritAttrs: false,
717
- components: {
718
- Opinion,
719
- Reject,
720
- ProcessSetting,
721
- Message,
722
- StartFlow
723
- },
724
- mixins: [FlowMix],
725
- props: {
726
- pendingId: String, //待办id
727
- identityIds: String, //用户id
728
- beforeSubmit: Function,
729
- orgId: String, //单位id
730
- depId: String, //部门id
731
- baseUrl: String,
732
- apiBaseUrl: String,
733
- typeCode: String,
734
- type: String,
735
- showOpinionPop: {
736
- type: Boolean,
737
- default: false
738
- },
739
- paddingTop: {
740
- type: [String, Number],
741
- default: 0
742
- },
743
- msgCode: {
744
- type: String,
745
- default: 'notification_type'
746
- },
747
- isAllCheck: {
748
- type: Boolean,
749
- default: false
750
- },
751
- isPreset: {
752
- type: Boolean,
753
- default: false
754
- },
755
- esign: {
756
- type: Boolean,
757
- default: false
758
- },
759
- userId: {
760
- type: String,
761
- default: ''
762
- },
763
- onlyMyOrg: {
764
- type: Boolean,
765
- default: false
766
- },
767
- selectorParams: {
768
- type: Object,
769
- default: () => {}
770
- },
771
- flowLabelConfig: {
772
- type: Object,
773
- default: () => ({})
774
- },
775
- opinionType: {
776
- type: String,
777
- default: 'picker'
778
- },
779
- flowSelectType: {
780
- type: String,
781
- default: 'picker'
782
- },
783
- hideMessage: {
784
- type: Boolean,
785
- default: false
786
- },
787
- isClosePopup: {
788
- type: Boolean,
789
- default: false
790
- }
791
- },
792
- watch: {
793
- isClosePopup: {
794
- handler(val) {
795
- this.showSelectorPopup = !this.showSelectorPopup;
796
- },
797
- deep: true,
798
- immediate: true
799
- }
800
- },
801
- data() {
802
- return {
803
- AddSignList: [
804
- { name: '前置加签', value: 'preAddSign' },
805
- { name: '后置加签', value: 'postAddSign' }
806
- ],
807
-
808
- showFlowBtn: false,
809
- endFlow: false,
810
- submitButtonName: '',
811
- showSelectorPopup: false,
812
- showFlowSelect: false,
813
- currentOrgSelectorParams: {},
814
- currentOrgSelectorTabs: 'department,employee',
815
- foreignOrgSelectorTabs: 'enterprise,filgroupobj',
816
- foreignOrgSelectorParams: { roleid: '' },
817
- otherOrgDisabledObjId: [],
818
- currentOrgDisabledObjId: [],
819
- currentNodeEnableItemHandleDescription: false,
820
- pendingItemHandleDescription: '',
821
- taskOperationShiftedNodeList: null,
822
- oldNextOperate: '',
823
- processFormType: 'freeStart',
824
- nextNodeDefault: 0,
825
- showDefList: false,
826
- deptRoleCode: '',
827
- readOnlyNotificationType: '',
828
- notificationMessageReadOnly: false,
829
- freeStartFlowParams: {}, //自由发起流程参数
830
- taskParams: {},
831
- isCanPreAddSign: false,
832
- nextNodeCheckType: 'select',
833
- showAppUnit: false, // 弹窗单位
834
- handleFlow: true,
835
- freeValid: true,
836
- showFreeStart: false,
837
- freeStartInfo: {},
838
- isReject: false,
839
- opinionHandleExplainText: undefined,
840
- isCurrentNodeForbiddenChangeCandidate: 0,
841
- nodeFixedOpinionSelectList: [],
842
- isChooseNextNode: 1, //是否展示下步操作
843
- pid: 'root', //树选中pid
844
- objType: 'enterprise', //树点击对象
845
- selectType: 'employee', // 树 选择类型
846
- isNextBox: true, // 是否展开隐藏下步操作
847
- isForceDisplayDefaultOptionForPrefix: false,
848
- isOtherUnit: true, //是否是外单位
849
- isShowNode: false,
850
- subProcessInfo: '',
851
- isNodeShowProcess: false, //是否展示主办
852
- isHiddenOftenOpinion: undefined, //是否隐藏常用意见
853
- isAddSignList: [
854
- { name: '是', value: '1' },
855
- { name: '否', value: '2' }
856
- ],
857
- taskReadOpinionRequired: undefined,
858
- form: {
859
- addSignMode: 'postAddSign',
860
- opinion: undefined, // 审批意见
861
- isImageOpinion: 0,
862
- isAddSign: undefined, //是否加签
863
- customLimitTime: '', //限时天数
864
- addSignUserId: undefined, //加签人员id
865
- isRemoveSign: undefined, //是否减签
866
- removeSignUserId: undefined, //减签人员id
867
- nextOperate: undefined, // 下步操作
868
- nextOperateName: undefined, // 下步操作显示
869
- nextNodeId: undefined, // 下步节点,
870
- nextNodeName: undefined, // 下步节点显示
871
- isReturnSubmitter: undefined, //是否返回提交人
872
- isSubFlow: undefined, //是否子流程
873
- isUndertakeReply: undefined, //是否承办回复
874
- isTakeAdviceReply: undefined, //是否征求意见回复回复
875
- isUndertakeEnd: undefined, //是否承办办结
876
- isTakeAdviceEnd: undefined, //是否征求意见办结
877
- isReadDealReply: undefined, //是否阅办回复
878
- isReadDealEnd: undefined, //是否阅办办结
879
- caOpinion: undefined, //加密意见
880
- isReturnRejectNode: undefined, //是否提交驳回节点
881
- isSerialSubmit: undefined, //串行默认提交
882
- loginType: 2, //登录方式
883
- nodeOpinionTemplate: undefined, //意见模板
884
- businessSubCenterCode: undefined, //业务中心编码
885
- nextRoleId: undefined, // 下步办理角色id
886
- nextOrgId: undefined, //下步办理机构
887
- nextCurrentOrgObj: undefined, // 本单位对象
888
- nextCurrentOrgObjSerialId: undefined, //本单位办理对象序列id
889
- nextOtherOrgObj: undefined, //外单位对象
890
- nextOtherOrgObjSerialId: undefined, //外单位办理对象序列id
891
- mainSubId: undefined, //主办id
892
- nextReadUserId: undefined, //分阅用户
893
- handleExplain: undefined, //办理说明
894
- notificationMsg: undefined, //通知消息
895
- nextUserId: undefined, //下步办理人
896
- isLimitedTime: '2', //是否限时办理
897
- limitedTimeDay: undefined, //限时办理时间 天
898
- limitedTimeHour: undefined, //限时办理时间 时
899
- advanceNoticeDay: undefined, //限时办理 天
900
- advanceNoticeHour: undefined, //限时办理 时
901
- advanceNoticeType: [] //催办通知方式
902
- },
903
- isCanFenyue: '0',
904
- isChooseNextNode: 1,
905
- isOpinionRequired: 0, // 意见是否必填
906
- isBanInputOpinion: 0, //意见是否禁用
907
- showTimeList: false, //选择限时办理弹出层
908
- timeList: [], // 选择限时办理时间数组
909
- nextUserList: [], //下步办理人数组
910
- nextCurrentOrgObjSelect: [], // 选中本单位
911
- nextOtherOrgObjSelect: [], //选中外单位
912
- nextReadUserSelectList: [], //分阅选择数组
913
- addSignUserSelectList: [], //增加办理人选择数组
914
- removeSignUserSelectList: [], //减少办理人选择数组
915
- nextUserSelectList: [], //下步办理人选择数组
916
- showAppUser: false, // 办理人遮罩层
917
- showNextOperate: false, // 下一步操作遮罩层
918
- showNextNodeList: false, // 下一步流程节点遮罩层
919
- nodeList: [], // 流程节点列表
920
- selectList: [], // 当前选中办理人
921
- opinionList: [], // 意见列表
922
- processObj: { taskExamine: { nodeName: undefined } }, //流程信息
923
- peopleObj: {}, //办理人信息
924
- userInfo: {}, // 用户信息
925
- isCanAddSign: false, //是否显示加签
926
- isCanRemoveSign: false, //是否显示减签
927
- isSpecial: true, //判断审核内容是否显示(是否是正常的办理页面)
928
- taskOperations: [], //下一步操作
929
- countersignaturetypeCode: false, //用来判断处理方式是否显示
930
- countersignaturetypeText: undefined, // 处理方式
931
- isCustomPreset: false, // 是否允许预设节点
932
- isHideCurrentOrg: false, //是否隐藏本单位(承办)
933
- isHideOtherOrg: false, //是否隐藏外单位(承办)
934
- isHandleExplain: false, // 是否允许办理说明
935
- isTaskread: false, //是否分阅
936
- defaultNotificationType: undefined, ///默认选中通知类型
937
- selectUnitType: 'department', //单位树选择类型
938
- isHiddenNextStepInfo: false, //是否隐藏下一步节点信息和接收人信息
939
- presetEdit: true, //预设是否允许编辑
940
- isLimitedTimeHandling: false, //是否支持发起子流程限时办理
941
- userSelectionType: undefined, //处理人选择方式
942
- orgSelectionType: undefined, //办理机构选择方式
943
- notificationType: undefined, // 通知方式
944
- nodeType: undefined, // 节点类型(普通节点0,承办节点1,会签节点2,阅办节点3)
945
- deptRoleCode: undefined, //本单位角色
946
- orgRoleCode: undefined, //外单位角色
947
- appointNotUserIds: undefined, //业务指定非处理人
948
- handleRoleId: undefined, //办理角色(一般选择范围是部门/单位使用)
949
- nextRole: undefined, //下步节点默认角色
950
- filterCandinateIds: undefined, //节点过滤办理人
951
- selectorDefShowDeptId: undefined, //选择器默认展示部门
952
- isRadio: true, //下步办理人是否单选
953
- otherOrgName: undefined, //外单位名字
954
- currentOrgName: undefined, //本单位名字
955
- isMainSubProcess: false, // 判断是否子-主流程
956
- isNextUser: false, // 判断是否显示下步办理人
957
- isDealObject: false, //判断是否显示办理对象
958
- isDealRole: false, //判断是否显示办理角色
959
- nextUserflag: false,
960
- isSubmitButtonShowAgreeAndDisagree: 0, //是否展示同意和不同意按钮
961
- isCustomUserClick: false, //下步办理人选择是否可以点击
962
- timeListLable: undefined, //用来判断是哪里点开的时间遮罩层
963
- nodeDefaultSubmitOpinion: undefined, //默认提交意见
964
- isCustomUser: 0, //是否可选中办理人
965
- choiceOrgId: '',
966
- choiceDeptId: '',
967
- taskExamineInfo: {},
968
- nodeInfoMapInfo: {},
969
- flowDefList: [],
970
- file: '',
971
- isEndUserTask: '',
972
- tagKey: '',
973
- pOrgId: '',
974
- customPresetHintMessage: '',
975
- enableCustomLimitTimeSetting: false,
976
- showCustomLimitTimeText: false,
977
- needRetrialAuth: false,
978
- defaultNextNode: ''
979
- };
980
- },
981
- created() {
982
- // 获取用户信息
983
- // 生成时间数组
984
- this.currentOrgSelectorParams = {
985
- pid: this.orgId,
986
- only_filid: true,
987
- onlyMyOrg: true
988
- };
989
- this.timeList = new Array();
990
- for (let i = 0; i < 25; i++) {
991
- this.timeList.push(i);
992
- }
993
- this.$toast.loading({
994
- message: '加载中...',
995
- forbidClick: true,
996
- loadingType: 'spinner',
997
- overlay: true,
998
- duration: 0
999
- });
1000
- // 获取审核详情后去获取节点信息和办理人信息。
1001
- if (this.typeCode == 'fenyue') {
1002
- this.getToStartTaskReadIndex();
1003
- } else {
1004
- Promise.all([this.getProcessObjNew()]).then(() => {
1005
- if (this.form.nextNodeId) {
1006
- this.getNodeObj(this.form.nextNodeId);
1007
- } else {
1008
- this.$toast.clear();
1009
- }
1010
- });
1011
- }
1012
- },
1013
- computed: {
1014
- subProcessColumns() {
1015
- if (!this.isMainSubProcess || !this.isNodeShowProcess) return [];
1016
- let data = [];
1017
- let obj = { name: '[部门员工]-' };
1018
- this.nextCurrentOrgObjSelect.map((x) => {
1019
- if (x.objType == 'employee') {
1020
- obj.name = !obj.value
1021
- ? obj.name + x.showname
1022
- : obj.name + ',' + x.showname;
1023
- obj.value = obj.value
1024
- ? obj.value + ',' + x.showid
1025
- : 'employee-' + x.showid;
1026
- } else {
1027
- data.push({
1028
- name: '[部门]' + x.showname,
1029
- value: 'department-' + x.showid
1030
- });
1031
- }
1032
- });
1033
- obj.value && data.push(obj);
1034
- this.nextOtherOrgObjSelect.map((x) => {
1035
- data.push({
1036
- name: '[企业]' + x.showname,
1037
- value: 'enterprise-' + x.showid
1038
- });
1039
- });
1040
- return data;
1041
- }
1042
- },
1043
- methods: {
1044
- handlePop(val) {
1045
- this.$parent.$emit('opinion-change', val);
1046
- },
1047
- handleSelectorClick(val) {
1048
- this.$parent.$emit('selector-click', val);
1049
- },
1050
- handleClickFlow(val) {
1051
- console.log(val);
1052
- if (val.nodeId === this.form.nextNodeId)
1053
- return (this.showFlowSelect = false);
1054
- this.form.nextNodeId = val.nodeId;
1055
- this.form.nextNodeName = val.nodeName;
1056
- this.showFlowSelect = false;
1057
- this.onConfirmNextNode(val);
1058
- },
1059
- handleSuccess() {
1060
- this.$parent.$emit('success');
1061
- },
1062
- handleClickDefList(info) {
1063
- this.freeStartFlowParams.defId = info.defId;
1064
- this.showFreeStart = true;
1065
- this.showDefList = false;
1066
- },
1067
- getFlowDefList() {
1068
- let params = {
1069
- url: getProcessDefList,
1070
- params: {
1071
- flowTypeCode: this.freeStartFlowParams.flowTypeCode,
1072
- onlyFlag: false
1073
- }
1074
- };
1075
- request(params).then((res) => {
1076
- if (res.rCode == 0) {
1077
- this.flowDefList = res.results;
1078
- this.showDefList = true;
1079
- }
1080
- });
1081
- },
1082
- changeCustomLimitTime() {
1083
- const value = this.form.customLimitTime;
1084
- if (
1085
- (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) &&
1086
- value
1087
- ) {
1088
- this.$toast('请输入正确的天数');
1089
- this.form.customLimitTime = '';
1090
- }
1091
- },
1092
- getFreeStartParams() {
1093
- if (
1094
- (!this.form.opinion &&
1095
- this.isOpinionRequired == 1 &&
1096
- !this.nodeDefaultSubmitOpinion &&
1097
- this.form.isImageOpinion == 0) ||
1098
- (!this.file &&
1099
- this.isOpinionRequired == 1 &&
1100
- !this.nodeDefaultSubmitOpinion &&
1101
- this.form.isImageOpinion == 1)
1102
- ) {
1103
- this.$toast('请选择输入审批意见');
1104
- return;
1105
- }
1106
- const { businessId, processDefinitionId, nodeId } = this.taskExamineInfo;
1107
- let param = {
1108
- url: getFreeStartFlowParams,
1109
- params: {
1110
- businessId,
1111
- processDefinitionId,
1112
- pendingId: this.pendingId,
1113
- nodeId
1114
- }
1115
- };
1116
- this.$toast.loading({
1117
- message: '加载中...',
1118
- forbidClick: true,
1119
- loadingType: 'spinner',
1120
- overlay: true,
1121
- duration: 0
1122
- });
1123
- request(param).then((res) => {
1124
- this.$toast.clear();
1125
- if (res.rCode == 0 || res.status == 'success') {
1126
- this.freeStartFlowParams = res.results;
1127
- if (res.results.useScene === 'multiInsMidwayWithSubmitScene')
1128
- this.onSubmit(res.results.useScene);
1129
- if (!this.freeValid) return;
1130
- if (
1131
- (res.results.startFlowIndexProcessKeys &&
1132
- res.results.startFlowIndexProcessKeys.length == 0) ||
1133
- !res.results.startFlowIndexProcessKeys
1134
- )
1135
- return this.$toast('未找到流程定义!');
1136
- if (res.results.startFlowIndexProcessKeys.length == 1) {
1137
- this.freeStartFlowParams.defId =
1138
- res.results.startFlowIndexProcessKeys[0];
1139
- this.freeStartFlowParams.businessId =
1140
- res.results.startFlowBusinessId;
1141
- this.showFreeStart = true;
1142
- } else {
1143
- this.getFlowDefList();
1144
- // this.showFreeStartFlow = true;
1145
- }
1146
- } else {
1147
- this.$toast(res.message || '系统错误,请联系管理员!');
1148
- }
1149
- });
1150
- },
1151
- //限时办理时间确认
1152
- onConfirmTimeList(val) {
1153
- this.form[this.timeListLable] = val;
1154
- this.showTimeList = false;
1155
- },
1156
- // 通知消息回调
1157
- onInputMsg(obj) {
1158
- this.form.notificationType = obj.notificationType.join(',');
1159
- this.form.notificationMsg = obj.notificationMsg;
1160
- },
1161
- // 催办通知消息回调
1162
- onInputMsgUrge(obj) {
1163
- this.form.advanceNoticeType = obj.notificationType.join(',');
1164
- this.form.advanceNoticeMsg = obj.notificationMsg;
1165
- },
1166
- // 打来限时办理时间选择遮罩层
1167
- openTimeList(label) {
1168
- this.timeListLable = label;
1169
- this.showTimeList = true;
1170
- },
1171
-
1172
- // 导航栏左侧按钮
1173
- navigateBack() {
1174
- this.$parent.$emit('close');
1175
- },
1176
- subRead() {
1177
- const { businessId, appId, processDefinitionId, pendingId } =
1178
- this.taskExamineInfo;
1179
- if (this.taskReadOpinionRequired == 'true' && !this.form.opinion)
1180
- return this.$toast('分阅阅结必须输入意见!');
1181
- let params = {
1182
- businessId,
1183
- appId,
1184
- processDefinitionId,
1185
- pendingId,
1186
- opinion: this.form.opinion,
1187
- taskAction: 'complete',
1188
- mobileKey: $.getStorage('deviceId') || '123',
1189
- userId: this.userId || $.getStorage('userId')
1190
- };
1191
- let formData = new FormData();
1192
- if (this.form.isImageOpinion == 1) {
1193
- formData.append('file', this.file);
1194
- }
1195
- for (let key in params) {
1196
- if (params[key] !== '' && params[key] !== undefined) {
1197
- formData.append(key, params[key]);
1198
- }
1199
- }
1200
- this.$toast.loading({
1201
- message: '加载中...',
1202
- forbidClick: true,
1203
- loadingType: 'spinner',
1204
- overlay: true,
1205
- duration: 0
1206
- });
1207
- request({
1208
- url: this.baseUrl
1209
- ? this.baseUrl +
1210
- (this.form.isImageOpinion == 1
1211
- ? taskReadWithHandwrittenOpinion
1212
- : taskReadHtml)
1213
- : this.form.isImageOpinion == 1
1214
- ? taskReadWithHandwrittenOpinion
1215
- : taskReadHtml,
1216
- headers: {
1217
- Accept: 'application/json,text/plain'
1218
- },
1219
- type: 'post',
1220
- params: formData,
1221
- format: false
1222
- })
1223
- .then((res) => {
1224
- const { status, message } = res;
1225
- this.$toast.clear();
1226
- if (status === 'success') {
1227
- this.$toast.success('提交成功');
1228
- this.$parent.$emit('success');
1229
- } else {
1230
- this.$toast(message || '系统错误,请联系管理员!');
1231
- setTimeout(() => {
1232
- this.$parent.$emit('error');
1233
- }, 1000);
1234
- }
1235
- })
1236
- .catch((err) => {
1237
- this.loading.close();
1238
- if (err.message && err.message !== 'canceled') {
1239
- this.$toast(err.message);
1240
- }
1241
- });
1242
- },
1243
- endFlowSubmit() {
1244
- this.$toast.loading({
1245
- message: '加载中...',
1246
- forbidClick: true,
1247
- loadingType: 'spinner',
1248
- overlay: true,
1249
- duration: 0
1250
- });
1251
- let str = '';
1252
- if (this.form.opinion) {
1253
- str = this.form.opinion.replace(/\s+/g, '');
1254
- }
1255
- if ((!this.form.opinion || str === '') && this.nodeDefaultSubmitOpinion) {
1256
- this.form.opinion = this.nodeDefaultSubmitOpinion;
1257
- }
1258
- request({
1259
- url: this.baseUrl ? this.baseUrl + endFlowHtml : endFlowHtml,
1260
- headers: {
1261
- Accept: 'application/json,text/plain'
1262
- },
1263
- type: 'post',
1264
- params: {
1265
- pendingId: this.pendingId,
1266
- opinion: this.form.opinion,
1267
- mobileKey: $.getStorage('deviceId') || '123'
1268
- },
1269
- format: false
1270
- })
1271
- .then((res) => {
1272
- const { status, message } = res;
1273
- this.$toast.clear();
1274
- if (status === 'success') {
1275
- this.$toast.success('提交成功');
1276
- this.$parent.$emit('success');
1277
- } else {
1278
- this.$toast(message || '系统错误,请联系管理员!');
1279
- setTimeout(() => {
1280
- this.$parent.$emit('error');
1281
- }, 1000);
1282
- }
1283
- })
1284
- .catch((err) => {
1285
- this.loading.close();
1286
- if (err.message && err.message !== 'canceled') {
1287
- this.$toast(err.message);
1288
- }
1289
- });
1290
- },
1291
- // 提交流程
1292
- onSubmit(typeVal) {
1293
- if (this.typeCode == 'fenyue') return this.subRead();
1294
- if (this.typeCode == 'endFlow') return this.endFlowSubmit();
1295
- if (this.type == 'freeStart' && !typeVal)
1296
- return this.getFreeStartParams();
1297
- let idStr = '';
1298
- this.nextUserSelectList.map((r, i) => {
1299
- idStr =
1300
- idStr +
1301
- r.showid +
1302
- (i === this.nextUserSelectList.length - 1 ? '' : ',');
1303
- });
1304
- this.form.nextUserId = idStr;
1305
- if (
1306
- (!this.form.opinion &&
1307
- this.isOpinionRequired == 1 &&
1308
- !this.nodeDefaultSubmitOpinion &&
1309
- this.form.isImageOpinion == 0) ||
1310
- (!this.file &&
1311
- this.isOpinionRequired == 1 &&
1312
- !this.nodeDefaultSubmitOpinion &&
1313
- this.form.isImageOpinion == 1)
1314
- ) {
1315
- this.$toast('请选择输入审批意见');
1316
- return;
1317
- }
1318
- if (
1319
- this.isSpecial &&
1320
- this.isNextUser &&
1321
- !this.form.nextUserId &&
1322
- idStr === '' &&
1323
- this.form.isAddSign != '1' &&
1324
- !this.isReject
1325
- ) {
1326
- this.$toast(`请选择${this.flowLabelConfig.nextUser || '办理人'}`);
1327
- return;
1328
- }
1329
- // if (this.form.isAddSign == '1' && !this.form.addSignUserId) {
1330
- // this.$toast('请选择办理人');
1331
- // return;
1332
- // }
1333
- if (
1334
- !this.form.nextNodeId &&
1335
- this.nodeList &&
1336
- this.nodeList.length > 0 &&
1337
- this.isSpecial &&
1338
- !this.isReject &&
1339
- this.isShowNode
1340
- ) {
1341
- this.$toast('请选择流程节点');
1342
- return;
1343
- }
1344
-
1345
- let str = '';
1346
- if (this.form.opinion) {
1347
- str = this.form.opinion.replace(/\s+/g, '');
1348
- }
1349
- if ((!this.form.opinion || str === '') && this.nodeDefaultSubmitOpinion) {
1350
- this.form.opinion = this.nodeDefaultSubmitOpinion;
1351
- }
1352
-
1353
- if (this.form.isLimitedTime === '1' && this.form.limitedTimeDay) {
1354
- this.$toast('请填写限时办理天数');
1355
- return;
1356
- }
1357
- if (this.form.isLimitedTime === '1' && this.form.limitedTimeHour) {
1358
- this.$toast('请选择限时办理时间');
1359
- return;
1360
- }
1361
- if (this.form.isLimitedTime === '1' && this.form.advanceNoticeDay) {
1362
- this.$toast('请填写提前通知天数');
1363
- return;
1364
- }
1365
- if (this.form.isLimitedTime === '1' && this.form.advanceNoticeHour) {
1366
- this.$toast('请选择通知时间');
1367
- return;
1368
- }
1369
- if (this.form.isLimitedTime === '1' && this.form.advanceNoticeType) {
1370
- this.$toast('请选择催办通知方式');
1371
- return;
1372
- }
1373
- if (
1374
- (this.isHideCurrentOrg || this.isHideOtherOrg) &&
1375
- !this.form.nextCurrentOrgObjJson &&
1376
- !this.form.nextOtherOrgObjJson &&
1377
- this.form.isAddSign != '1'
1378
- ) {
1379
- // this.$toast(`请选择${this.currentOrgName || '本单位'}`);
1380
- this.$toast(`请选择办理对象`);
1381
- return;
1382
- }
1383
- delete this.form.nextNodeName;
1384
- delete this.form.nextOperateName;
1385
- if (!this.isSpecial) {
1386
- delete this.form.nextOperate;
1387
- delete this.form.nextNodeId;
1388
- }
1389
- if (this.form.nextOperate == 9 || this.oldNextOperate == 9) {
1390
- this.form.isReturnRejectNode = 1;
1391
- this.form.processDefinitionId =
1392
- this.processObj.taskExamine.processDefinitionId;
1393
- }
1394
- if (this.beforeSubmit) {
1395
- this.beforeSubmit(
1396
- { pendingId: this.pendingId, ...this.form, typeVal },
1397
- this.sendData
1398
- );
1399
- return;
1400
- }
1401
- this.sendData(typeVal);
1402
- },
1403
- sendData(typeVal) {
1404
- if (this.isMainSubProcess && typeof this.form.mainSubId == 'object') {
1405
- this.form.mainSubId = this.form.mainSubId.value;
1406
- }
1407
- if (this.isCustomPreset && this.isPreset && this.isSpecial) {
1408
- if (this.$refs.processSetting.active.length != 0) {
1409
- if (!this.$refs.processSetting.getValue()) return;
1410
- this.form.customPresetUserJson = this.$refs.processSetting.getValue();
1411
- this.form.isCustomPreset = true;
1412
- this.form.presetUserJson = JSON.stringify([]);
1413
- } else {
1414
- delete this.form.customPresetUserJson;
1415
- delete this.form.isCustomPreset;
1416
- delete this.form.presetUserJson;
1417
- }
1418
- }
1419
-
1420
- const _that = this;
1421
- const {
1422
- isEndUserTask,
1423
- choiceOrgId,
1424
- choiceDeptId,
1425
- pOrgId,
1426
- taskExamineInfo,
1427
- needRetrialAuth,
1428
- nodeInfoMapInfo
1429
- } = this;
1430
- _that.form.isEndUserTask = isEndUserTask;
1431
- _that.form.choiceOrgId = choiceOrgId;
1432
- _that.form.customLimitTime =
1433
- typeof this.form.customLimitTime === 'object'
1434
- ? this.form.customLimitTime.cciValue
1435
- : this.form.customLimitTime;
1436
- _that.form.choiceDeptId = choiceDeptId;
1437
- _that.form.needRetrialAuth = needRetrialAuth;
1438
- _that.form.pOrgId = pOrgId;
1439
- _that.form.processType = taskExamineInfo.processType;
1440
- _that.form.businessId = taskExamineInfo.businessId;
1441
- _that.form.appId = taskExamineInfo.appId;
1442
- _that.form.processDefinitionId = taskExamineInfo.processDefinitionId;
1443
- _that.form.isSubFlow = taskExamineInfo.isSubFlow;
1444
- _that.form.nodeId = taskExamineInfo.nodeId;
1445
- _that.form.userId = _that.userId || $.getStorage('userId');
1446
- // _that.form.userId = 'u3a0bc559d4cf4f6ea47106ed7e76cae6';
1447
- _that.form.mobileKey = $.getStorage('deviceId') || '123';
1448
- _that.form.nextNodeId =
1449
- _that.form.nextOperate == 0 ||
1450
- _that.form.nextOperate == 1 ||
1451
- _that.oldNextOperate === 0 ||
1452
- _that.oldNextOperate === 1
1453
- ? _that.form.nextNodeId || nodeInfoMapInfo.nodeExtAttr.defaultNextNode
1454
- : '';
1455
- _that.form.nextOperate =
1456
- _that.oldNextOperate !== ''
1457
- ? _that.oldNextOperate
1458
- : _that.form.nextOperate;
1459
- if (!_that.isCanPreAddSign || _that.form.isAddSign != '1') {
1460
- delete _that.form.addSignMode;
1461
- }
1462
- if (!_that.enableCustomLimitTimeSetting) {
1463
- delete _that.form.customLimitTime;
1464
- }
1465
- if (!this.isSpecial) {
1466
- delete _that.form.nextUserId;
1467
- }
1468
- if (!_that.currentNodeEnableItemHandleDescription) {
1469
- delete _that.form.nextItemHandleDescription;
1470
- }
1471
- let formData = new FormData();
1472
- if (_that.form.isImageOpinion == 1) {
1473
- formData.append('file', _that.file);
1474
- }
1475
- formData.append('pendingId', _that.pendingId);
1476
- for (let key in _that.form) {
1477
- if (_that.form[key] !== '' && _that.form[key] !== undefined) {
1478
- formData.append(key, _that.form[key]);
1479
- }
1480
- }
1481
- if (typeVal) {
1482
- _that.taskParams = _that.form;
1483
- _that.taskParams.pendingId = _that.pendingId;
1484
- return;
1485
- }
1486
- this.$toast.loading({
1487
- message: '加载中...',
1488
- forbidClick: true,
1489
- loadingType: 'spinner',
1490
- overlay: true,
1491
- duration: 0
1492
- });
1493
- request({
1494
- url: _that.baseUrl
1495
- ? _that.baseUrl +
1496
- (_that.form.isImageOpinion == 1
1497
- ? taskHandleHtmlImg
1498
- : taskHandleHtml)
1499
- : _that.form.isImageOpinion == 1
1500
- ? taskHandleHtmlImg
1501
- : taskHandleHtml,
1502
- type: 'post',
1503
- params: formData,
1504
- format: false
1505
- }).then((res) => {
1506
- this.$toast.clear();
1507
- if (res.status == 'success' || res.status == 'readDealBackProcessing') {
1508
- if (res.status == 'readDealBackProcessing') {
1509
- this.$toast(
1510
- '由于阅办人数较多,任务后台执行中,稍后系统将为您推送阅办任务执行结果,请注意查收!'
1511
- );
1512
- setTimeout(() => {
1513
- this.$toast.clear();
1514
- this.$parent.$emit('success');
1515
- }, 1500);
1516
- } else {
1517
- this.$toast('操作成功');
1518
- this.$parent.$emit('success');
1519
- }
1520
- } else {
1521
- this.$toast(res.message);
1522
- setTimeout(() => {
1523
- this.$parent.$emit('error');
1524
- }, 1000);
1525
- }
1526
- });
1527
- },
1528
- // 删除
1529
- delteList(label, i) {
1530
- if (label === 'nextUserSelectList') {
1531
- let _this = this;
1532
- let id = _this.nextUserSelectList[i].showid;
1533
- this.nextUserList.find((i) => {
1534
- if (i.userId === id) {
1535
- _this.$set(i, 'checked', false);
1536
- }
1537
- });
1538
- this[label].splice(i, 1);
1539
- } else {
1540
- this[label].splice(i, 1);
1541
- }
1542
- },
1543
- // 选择办理人
1544
- onClickPeople(id) {
1545
- this.showAppUser = true;
1546
- this.selectList = this[id];
1547
- this.$nextTick(function () {
1548
- this.$refs.selectTree.getContent(id);
1549
- });
1550
- },
1551
- // 选择单位
1552
- onClickOrg(id) {
1553
- this.isOtherUnit = id === 'nextCurrentOrgObjSelect' ? false : true;
1554
- this.selectUnitType =
1555
- id === 'nextCurrentOrgObjSelect' ? 'department,employee' : 'department';
1556
- this.showAppUnit = true;
1557
- this.$nextTick(function () {
1558
- this.$refs.selectTreeUnit.getContent(id);
1559
- });
1560
- },
1561
- // 切换下一步操作
1562
- changeNextOperate(val, isDef) {
1563
- if (!isDef && val.key === this.tagKey) return;
1564
- this.tagKey = val.key;
1565
- //恢复默认
1566
- this.isNextUser = false;
1567
- this.isShowNode = false;
1568
- this.isMainSubProcess = false;
1569
- this.isNodeShowProcess = false;
1570
- this.form.nextNodeId = '';
1571
- this.form.isReturnSubmitter = 0;
1572
- this.form.isUndertakeReply = 0;
1573
- this.form.isTakeAdviceReply = 0;
1574
- this.form.isUndertakeEnd = 0;
1575
- this.form.isTakeAdviceEnd = 0;
1576
- this.form.isReadDealReply = 0;
1577
- this.form.isReadDealEnd = 0;
1578
- this.form.isReturnRejectNode = 0;
1579
- this.form.isSerialSubmit = 0;
1580
- if (val.key == 9) {
1581
- this.isReject = true;
1582
- } else if (val.key == 2) {
1583
- this.isReject = false;
1584
- } else {
1585
- this.isReject = false;
1586
- }
1587
- this.form.nextOperate = val.isNextNode ? val.nextOperate : val.key;
1588
- this.form.nextOperateName = val.value;
1589
- this.nodeList = val.taskNodeList;
1590
- if (this.isSpecial) {
1591
- if (val.key == -1) {
1592
- this.form.isSerialSubmit = 1;
1593
- this.showFlowBtn = true;
1594
- return;
1595
- } else if (val.key == 0) {
1596
- this.isNextUser = true;
1597
- this.isShowNode = true;
1598
- } else if (val.key == 1) {
1599
- this.isNextUser = true;
1600
- this.isShowNode = true;
1601
- } else if (val.key == 2) {
1602
- this.form.isReturnSubmitter = 1;
1603
- this.showFlowBtn = true;
1604
- return;
1605
- } else if (val.key == 3) {
1606
- this.form.isUndertakeReply = 1;
1607
- this.showFlowBtn = true;
1608
- return;
1609
- } else if (val.key == 4) {
1610
- this.form.isTakeAdviceReply = 1;
1611
- this.showFlowBtn = true;
1612
- return;
1613
- } else if (val.key == 5) {
1614
- this.form.isUndertakeEnd = 1;
1615
- this.showFlowBtn = true;
1616
- return;
1617
- } else if (val.key == 6) {
1618
- this.form.isTakeAdviceEnd = 1;
1619
- this.showFlowBtn = true;
1620
- return;
1621
- } else if (val.key == 7) {
1622
- this.form.isReadDealReply = 1;
1623
- this.showFlowBtn = true;
1624
- return;
1625
- } else if (val.key == 8) {
1626
- this.form.isReadDealEnd = 1;
1627
- this.showFlowBtn = true;
1628
- return;
1629
- } else if (val.key == 9) {
1630
- this.form.isReturnRejectNode = 1;
1631
- this.showFlowBtn = true;
1632
- return;
1633
- } else {
1634
- }
1635
- }
1636
- if (this.taskOperationShiftedNodeList && !val.isNextNode) {
1637
- this.nodeList = this.nodeList.filter(
1638
- (x) => this.taskOperationShiftedNodeList.indexOf(x.nodeId) == -1
1639
- );
1640
- }
1641
- if (val.isNextNode) {
1642
- this.oldNextOperate = val.nextOperate;
1643
- } else {
1644
- this.oldNextOperate = '';
1645
- }
1646
- if (val.isNextNode) {
1647
- this.nodeInfos = [];
1648
- this.form.nextNodeId = val.key;
1649
- this.form.nextNodeName = val.value;
1650
- this.$toast.loading({
1651
- message: '加载中...',
1652
- forbidClick: true,
1653
- loadingType: 'spinner',
1654
- overlay: true,
1655
- duration: 0
1656
- });
1657
-
1658
- this.getNodeObj(this.form.nextNodeId);
1659
- } else {
1660
- this.showFlowBtn = true;
1661
- }
1662
- if (this.nodeList && this.nodeList.length > 0) {
1663
- let defNode = this.nodeList.filter(
1664
- (i) => i.nodeId === this.defaultNextNode
1665
- );
1666
- if (defNode.length > 0) {
1667
- this.form.nextNodeId = defNode[0].nodeId;
1668
- this.form.nextNodeName = defNode[0].nodeName;
1669
- } else {
1670
- this.form.nextNodeId = this.nodeList[0].nodeId;
1671
- this.form.nextNodeName = this.nodeList[0].nodeName;
1672
- }
1673
-
1674
- this.$toast.loading({
1675
- message: '加载中...',
1676
- forbidClick: true,
1677
- loadingType: 'spinner',
1678
- overlay: true,
1679
- duration: 0
1680
- });
1681
-
1682
- if (isDef !== true) this.getNodeObj(this.form.nextNodeId);
1683
- } else {
1684
- this.showFlowBtn = true;
1685
- }
1686
-
1687
- this.showNextOperate = false;
1688
- },
1689
-
1690
- // 确认流程节点操作
1691
- onConfirmNextNode(val) {
1692
- if (this.nextNodeCheckType === 'select') {
1693
- this.form.nextNodeId = val.nodeId;
1694
- this.form.nextNodeName = val.nodeName;
1695
- } else {
1696
- this.form.nextNodeId = val;
1697
- }
1698
- this.$toast.loading({
1699
- message: '加载中...',
1700
- forbidClick: true,
1701
- loadingType: 'spinner',
1702
- overlay: true,
1703
- duration: 0
1704
- });
1705
- this.getNodeObj(this.form.nextNodeId);
1706
- this.showNextNodeList = false;
1707
- },
1708
- // 意见回调
1709
- onInputOpintion(val) {
1710
- const { opinion, isImageOpinion, file } = val;
1711
- this.form.opinion = opinion;
1712
- this.form.isImageOpinion = isImageOpinion;
1713
- this.file = file;
1714
- },
1715
- // 办理人选择完回调
1716
- disposeAppUser(res, type) {
1717
- this[type] = res.list;
1718
- let label = '';
1719
- if (type) {
1720
- label = type.substring(0, type.lastIndexOf('SelectList'));
1721
- } else {
1722
- label = res.label.substring(0, res.label.lastIndexOf('SelectList'));
1723
- }
1724
-
1725
- let idStr = '';
1726
- if (res.list) {
1727
- res.list.map((r, i) => {
1728
- idStr = idStr + r.showid + (i === res.list.length - 1 ? '' : ',');
1729
- });
1730
- } else {
1731
- res.map((r, i) => {
1732
- idStr = idStr + r.showid + (i === res.length - 1 ? '' : ',');
1733
- });
1734
- }
1735
- this.form[label + 'Id'] = idStr;
1736
- },
1737
- // 单位选择完回调
1738
- disposeAppUnit(res, type) {
1739
- let label = type.substring(0, type.lastIndexOf('Select'));
1740
- let idStr = '';
1741
- let types = '';
1742
- let SerialId = [];
1743
- this.form[label + 'Name'] = '';
1744
- let obj = {};
1745
- res.list.map((r, i) => {
1746
- if (!types || types.indexOf(r.objType) == -1) {
1747
- idStr = !types
1748
- ? r.objType +
1749
- '-' +
1750
- r.showid +
1751
- (i === res.list.length - 1 ? '' : ',')
1752
- : idStr +
1753
- '|' +
1754
- r.objType +
1755
- '-' +
1756
- r.showid +
1757
- (i === res.list.length - 1 ? '' : ',');
1758
- types = types ? types + ',' + r.objType : r.objType;
1759
- } else {
1760
- idStr = idStr + r.showid + (i === res.list.length - 1 ? '' : ',');
1761
- }
1762
- SerialId.push(r.showid);
1763
- if (obj[r.objType]) {
1764
- obj[r.objType].push(r.showname);
1765
- } else {
1766
- obj[r.objType] = [r.showname];
1767
- }
1768
- });
1769
- this.form[label] = idStr;
1770
- for (let key in obj) {
1771
- if (
1772
- key === 'enterprise' &&
1773
- this.form[label + 'Name'].indexOf('[企业]') == -1
1774
- ) {
1775
- this.form[label + 'Name'] = this.form[label + 'Name']
1776
- ? this.form[label + 'Name'] + '|' + '[企业]-' + obj[key].join(',')
1777
- : '' + '[企业]-' + obj[key].join(',');
1778
- }
1779
- if (
1780
- key === 'department' &&
1781
- this.form[label + 'Name'].indexOf('[部门]') == -1
1782
- ) {
1783
- this.form[label + 'Name'] = this.form[label + 'Name']
1784
- ? this.form[label + 'Name'] + '|' + '[部门]-' + obj[key].join(',')
1785
- : '' + '[部门]-' + obj[key].join(',');
1786
- }
1787
- if (
1788
- key === 'employee' &&
1789
- this.form[label + 'Name'].indexOf('[部门员工]') == -1
1790
- ) {
1791
- this.form[label + 'Name'] = this.form[label + 'Name']
1792
- ? this.form[label + 'Name'] +
1793
- '|' +
1794
- '[部门员工]-' +
1795
- obj[key].join(',')
1796
- : '' + '[部门员工]-' + obj[key].join(',');
1797
- }
1798
- }
1799
- // this.form[label + 'Name'] = obj.enterprise?;
1800
- this.form[label + 'SerialId'] = SerialId.join(',');
1801
- this.form[label + 'Json'] = JSON.stringify(res.list);
1802
- },
1803
- // 获取发起流程信息
1804
- getProcessObjNew() {
1805
- let that = this;
1806
- return new Promise(function (resolve, reiect) {
1807
- request({
1808
- url: that.baseUrl
1809
- ? that.baseUrl + getHandleInfoHtml
1810
- : getHandleInfoHtml,
1811
- params: {
1812
- pendingId: that.pendingId,
1813
- userId: that.userId
1814
- }
1815
- }).then((res) => {
1816
- if (res.status == 'success') {
1817
- const {
1818
- data: {
1819
- nodeInfoMap,
1820
- choiceOrgId,
1821
- choiceDeptId,
1822
- pOrgId,
1823
- opinion,
1824
- taskExamine,
1825
- customPresetHintMessage,
1826
- currentOrgName,
1827
- currentOrgSelectorParams,
1828
- isChoiceOtherOrgDept,
1829
- notificationMessageReadOnly,
1830
- readOnlyNotificationType,
1831
- otherOrgName,
1832
- nextNodeCheckType,
1833
- pendingItemHandleDescription,
1834
- defaultNotificationMessage,
1835
- defaultNotificationType,
1836
- taskOperationShiftedNodeList,
1837
- isCanPreAddSign
1838
- }
1839
- } = res;
1840
- if (opinion) {
1841
- that.form.opinion = opinion;
1842
- }
1843
- if (that.typeCode == 'endFlow') {
1844
- that.$toast.clear();
1845
- that.showFlowBtn = true;
1846
- that.processObj = res.data;
1847
- that.nodeDefaultSubmitOpinion =
1848
- nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
1849
- return;
1850
- }
1851
- if (
1852
- currentOrgSelectorParams &&
1853
- currentOrgSelectorParams.enableCurrentOrgConfig == 'true'
1854
- ) {
1855
- that.currentOrgSelectorTabs =
1856
- currentOrgSelectorParams.currentOrgType.split(',');
1857
- let currentOrgparams =
1858
- currentOrgSelectorParams.currentOrgRange.split(',');
1859
- that.currentOrgSelectorTabs.map((x, i) => {
1860
- that.currentOrgSelectorParams[x] = {
1861
- pid:
1862
- currentOrgparams[i] == 'my'
1863
- ? choiceOrgId
1864
- : currentOrgparams[i],
1865
- only_filid: true,
1866
- onlyMyOrg: true
1867
- };
1868
- });
1869
- that.currentOrgSelectorTabs =
1870
- that.currentOrgSelectorTabs.join(',');
1871
- }
1872
- if (
1873
- currentOrgSelectorParams &&
1874
- currentOrgSelectorParams.enableForeignOrgConfig == 'true'
1875
- ) {
1876
- that.foreignOrgSelectorTabs =
1877
- currentOrgSelectorParams.foreignOrgType.split(',');
1878
- let foreignOrgparams =
1879
- currentOrgSelectorParams.foreignOrgRange.split(',');
1880
- that.foreignOrgSelectorTabs.map((x, i) => {
1881
- that.foreignOrgSelectorParams[x] = {
1882
- pid:
1883
- foreignOrgparams[i] == 'my'
1884
- ? choiceOrgId
1885
- : foreignOrgparams[i] == 'other' ||
1886
- foreignOrgparams[i] == 'nofilidorg'
1887
- ? 'root'
1888
- : foreignOrgparams[i],
1889
- nofilid:
1890
- foreignOrgparams[i] == 'nofilidorg'
1891
- ? that.orgId || JSON.parse($.getStorage('userInfo')).orgId
1892
- : foreignOrgparams[i] == 'other'
1893
- ? 1
1894
- : 0,
1895
- myUserid: x == 'filgroup' ? $.getStorage('userId') : '',
1896
- ...that.selectorParams
1897
- };
1898
- });
1899
- that.foreignOrgSelectorTabs =
1900
- that.foreignOrgSelectorTabs.join(',');
1901
- } else if (isChoiceOtherOrgDept == 'true') {
1902
- that.foreignOrgSelectorTabs = 'enterprise,department';
1903
- that.foreignOrgSelectorParams.pid = 'root';
1904
- that.foreignOrgSelectorParams.nofilid = 1;
1905
- that.foreignOrgSelectorParams = {
1906
- ...that.foreignOrgSelectorParams,
1907
- ...that.selectorParams
1908
- };
1909
- console.log(that.foreignOrgSelectorParams, 1);
1910
- } else {
1911
- that.foreignOrgSelectorTabs = 'enterprise';
1912
- that.foreignOrgSelectorParams.pid = 'root';
1913
- that.foreignOrgSelectorParams.nofilid = 1;
1914
- that.foreignOrgSelectorParams = {
1915
- ...that.foreignOrgSelectorParams,
1916
- ...that.selectorParams
1917
- };
1918
- console.log(that.foreignOrgSelectorParams, 2);
1919
- }
1920
- if (
1921
- taskOperationShiftedNodeList &&
1922
- taskOperationShiftedNodeList.length > 0
1923
- ) {
1924
- that.taskOperationShiftedNodeList = [];
1925
- taskOperationShiftedNodeList.map((x) => {
1926
- that.taskOperationShiftedNodeList.push(x.nodeId);
1927
- that.taskOperations.push({
1928
- key: x.nodeId,
1929
- value: x.nodeName,
1930
- isNextNode: true,
1931
- nextOperate: x.nextOperate
1932
- });
1933
- });
1934
- }
1935
- that.pendingItemHandleDescription = pendingItemHandleDescription;
1936
- nextNodeCheckType && (that.nextNodeCheckType = nextNodeCheckType);
1937
- that.customPresetHintMessage = customPresetHintMessage;
1938
- that.currentOrgName = currentOrgName;
1939
- that.notificationMessageReadOnly =
1940
- notificationMessageReadOnly == 'true';
1941
- that.readOnlyNotificationType = readOnlyNotificationType;
1942
- that.isCanPreAddSign = isCanPreAddSign;
1943
- that.otherOrgName = otherOrgName;
1944
- that.taskExamineInfo = taskExamine;
1945
- that.form.isReturnSubmitter = taskExamine.isReturnSubmitter;
1946
- that.form.isUndertakeReply = taskExamine.isUndertakeReply;
1947
- that.form.isTakeAdviceReply = taskExamine.isTakeAdviceReply;
1948
- that.form.isUndertakeEnd = taskExamine.isUndertakeEnd;
1949
- that.form.isTakeAdviceEnd = taskExamine.isTakeAdviceEnd;
1950
- that.form.isReadDealReply = taskExamine.isReadDealReply;
1951
- that.form.isReadDealEnd = taskExamine.isReadDealEnd;
1952
- that.form.isReturnRejectNode = taskExamine.isReturnRejectNode;
1953
- that.form.isSerialSubmit = taskExamine.isSerialSubmit;
1954
- that.form.notificationMsg = defaultNotificationMessage;
1955
- defaultNotificationType &&
1956
- !that.hideMessage &&
1957
- (that.defaultNotificationType =
1958
- defaultNotificationType.split(','));
1959
- that.nodeInfoMapInfo = nodeInfoMap;
1960
- that.defaultNextNode = nodeInfoMap.nodeExtAttr.defaultNextNode;
1961
- that.opinionHandleExplainText =
1962
- nodeInfoMap.nodeExtAttr.opinionHandleExplainText;
1963
- that.isCanAddSign = res.data.isCanAddSign;
1964
- if (that.isCanAddSign) {
1965
- that.form.isAddSign = '2';
1966
- }
1967
- that.isCanRemoveSign = res.data.isCanRemoveSign;
1968
- if (that.isCanRemoveSign) {
1969
- that.form.isRemoveSign = '2';
1970
- }
1971
- that.isSpecial = res.data.isSpecial;
1972
- that.processObj = res.data;
1973
- that.taskOperations = [
1974
- ...res.data.taskOperations,
1975
- ...that.taskOperations
1976
- ];
1977
- let isSelected = false;
1978
- let isSelectIndex = 0;
1979
- if (that.taskOperations && that.taskOperations.length > 0) {
1980
- that.taskOperations.map((item, index) => {
1981
- if (item.isSelected || that.taskOperations.length == 1) {
1982
- isSelected = true;
1983
- isSelectIndex = index;
1984
- if (that.taskOperations.length == 1) {
1985
- if (that.taskOperations[0].isNextNode) {
1986
- that.form.nextOperate =
1987
- that.taskOperations[0].nextOperate;
1988
- } else {
1989
- that.form.nextOperate = that.taskOperations[0].key;
1990
- }
1991
- that.form.nextOperateName = that.taskOperations[0].value;
1992
- if (
1993
- (!that.taskOperations[0].taskNodeList ||
1994
- that.taskOperations[0].taskNodeList.length === 0) &&
1995
- !that.taskOperations[0].isNextNode
1996
- ) {
1997
- that.form.nextNodeId = undefined;
1998
- that.form.nextNodeName = undefined;
1999
- } else if (that.taskOperations[0].isNextNode) {
2000
- that.form.nextNodeId = that.taskOperations[0].key;
2001
- that.form.nextNodeName = that.taskOperations[0].value;
2002
- } else {
2003
- that.nodeList = that.taskOperations[0].taskNodeList;
2004
- let info = [];
2005
- that.nodeList.map((x) => {
2006
- if (
2007
- x.nodeId === nodeInfoMap.nodeExtAttr.defaultNextNode
2008
- ) {
2009
- info.push(x);
2010
- that.nextNodeDefault =
2011
- nodeInfoMap.nodeExtAttr.defaultNextNode;
2012
- }
2013
- });
2014
- if (info.length == 0 && that.nodeList.length != 0)
2015
- info = [that.nodeList[0]];
2016
- if (info.length > 0) {
2017
- that.form.nextNodeId = info[0].nodeId;
2018
- that.form.nextNodeName = info[0].nodeName;
2019
- }
2020
- // that.form.nextNodeId = that.nodeList[0].nodeId;
2021
- // that.form.nextNodeName = that.nodeList[0].nodeName;
2022
- }
2023
- } else {
2024
- that.form.nextOperate = item.key;
2025
- that.form.nextOperateName = item.value;
2026
- if (!item.taskNodeList || item.taskNodeList.length === 0) {
2027
- that.form.nextNodeId = undefined;
2028
- that.form.nextNodeName = undefined;
2029
- } else {
2030
- that.nodeList = item.taskNodeList;
2031
- let info = [];
2032
- that.nodeList.map((x, y) => {
2033
- if (
2034
- x.nodeId === nodeInfoMap.nodeExtAttr.defaultNextNode
2035
- ) {
2036
- info.push(x);
2037
- that.nextNodeDefault =
2038
- nodeInfoMap.nodeExtAttr.defaultNextNode;
2039
- }
2040
- });
2041
- if (info.length == 0 && that.nodeList.length != 0)
2042
- info = [that.nodeList[0]];
2043
- if (info.length > 0) {
2044
- that.form.nextNodeId = info[0].nodeId;
2045
- that.form.nextNodeName = info[0].nodeName;
2046
- }
2047
- // that.form.nextNodeId = that.nodeList[0].nodeId;
2048
- // that.form.nextNodeName = that.nodeList[0].nodeName;
2049
- }
2050
- }
2051
- if (item.key == 9) {
2052
- that.isReject = true;
2053
- }
2054
- }
2055
- });
2056
-
2057
- if (!isSelected) {
2058
- that.form.nextOperate = that.taskOperations[0].key;
2059
- that.form.nextOperateName = that.taskOperations[0].value;
2060
- that.nodeList = that.taskOperations[0].taskNodeList || [];
2061
- if (that.nodeList && that.nodeList.length > 0) {
2062
- that.form.nextNodeId = that.nodeList[0].nodeId;
2063
- that.form.nextNodeName = that.nodeList[0].nodeName;
2064
- }
2065
- }
2066
- that.tagKey = that.form.nextOperate;
2067
- }
2068
- that.changeNextOperate(
2069
- {
2070
- value: that.form.nextOperateName,
2071
- key: that.taskOperations[isSelectIndex].key,
2072
- nextOperate: that.taskOperations[isSelectIndex].nextOperate,
2073
- isNextNode: that.taskOperations[isSelectIndex].isNextNode,
2074
- taskNodeList: that.nodeList
2075
- },
2076
- true
2077
- );
2078
- if (nodeInfoMap && JSON.stringify(nodeInfoMap) != '{}') {
2079
- that.needRetrialAuth =
2080
- !!nodeInfoMap.nodeExtAttr.isCurrentNodeSubmitNeedRetrialAuth;
2081
- if (nodeInfoMap.nodeExtAttr.nodeFixedOpinionSelectList) {
2082
- let notice = JSON.parse(
2083
- nodeInfoMap.nodeExtAttr.nodeFixedOpinionSelectList
2084
- );
2085
- notice.map((x) => {
2086
- that.nodeFixedOpinionSelectList.push({ content: x });
2087
- });
2088
- }
2089
-
2090
- that.isHiddenOftenOpinion =
2091
- nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
2092
- that.nodeDefaultSubmitOpinion =
2093
- nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
2094
- that.isSubmitButtonShowAgreeAndDisagree =
2095
- nodeInfoMap.nodeExtAttr.isSubmitButtonShowAgreeAndDisagree;
2096
- that.isOpinionRequired =
2097
- nodeInfoMap.nodeExtAttr.isOpinionRequired;
2098
- // that.isChooseNextNode = nodeInfoMap.nodeExtAttr.isChooseNextNode;
2099
- that.isBanInputOpinion =
2100
- nodeInfoMap.nodeExtAttr.isBanInputOpinion;
2101
- that.isForceDisplayDefaultOptionForPrefix =
2102
- nodeInfoMap.nodeExtAttr.isForceDisplayDefaultOptionForPrefix ==
2103
- 1;
2104
- }
2105
- that.choiceOrgId = choiceOrgId;
2106
- that.choiceDeptId = choiceDeptId;
2107
- that.pOrgId = pOrgId;
2108
- that.isEndUserTask = res.data.isEndUserTask;
2109
- if (!that.isOpinionRequired) {
2110
- that.isOpinionRequired = 0;
2111
- }
2112
- if (!that.isBanInputOpinion) {
2113
- that.isBanInputOpinion = 0;
2114
- }
2115
- // that.countersignaturetypeText = res.data.taskExamine.nodeName
2116
- if (res.data.taskExamine) {
2117
- that.countersignaturetypeText = res.data.taskExamine.nodeName;
2118
- }
2119
- that.countersignaturetypeCode =
2120
- res.data.countersignaturetypeCode !== 0 &&
2121
- res.data.countersignaturetypeCode != undefined
2122
- ? true
2123
- : false;
2124
- that.isMainSubProcess = res.data.isMainSubProcess == 'true';
2125
- that.isCustomPreset = res.data.isCustomPreset;
2126
- // form.isRemoveSign !== '1' &&
2127
- // form.isAddSign !== '1' &&
2128
- // nodeList &&
2129
- // nodeList.length > 0 &&
2130
- // isHiddenNextStepInfo
2131
- resolve();
2132
- } else {
2133
- that.$toast(res.message);
2134
- setTimeout(() => {
2135
- // that.navigateBack();
2136
- that.$parent.$emit('error');
2137
- }, 1000);
2138
- reiect();
2139
- }
2140
- });
2141
- });
2142
- },
2143
- getToStartTaskReadIndex() {
2144
- request({
2145
- url: this.baseUrl
2146
- ? this.baseUrl + toStartTaskReadHtml
2147
- : toStartTaskReadHtml,
2148
- params: { pendingId: this.pendingId, userId: this.userId }
2149
- })
2150
- .then((res) => {
2151
- const {
2152
- status,
2153
- message,
2154
- data: {
2155
- isCanFenyue,
2156
- taskExamine,
2157
- taskReadOpinionRequired,
2158
- submitButtonName
2159
- }
2160
- } = res;
2161
- this.showFlowBtn = true;
2162
- if (status === 'success') {
2163
- this.taskExamineInfo = taskExamine;
2164
- this.isCanFenyue = isCanFenyue == 1;
2165
- this.taskReadOpinionRequired = taskReadOpinionRequired == 'true';
2166
- // if (this.nodeName) {
2167
- this.processObj.taskExamine.nodeName = '分阅';
2168
- this.submitButtonName = submitButtonName;
2169
- // }
2170
- } else {
2171
- this.$toast(message || '系统错误,请联系管理员!');
2172
- }
2173
- this.$toast.clear();
2174
- })
2175
- .catch((err) => {
2176
- this.$toast.clear();
2177
-
2178
- this.showFlowBtn = true;
2179
- if (err.message && err.message !== 'canceled') {
2180
- this.$toast(err.message);
2181
- }
2182
- });
2183
- },
2184
- // 获取节点信息(获取节点属性及办理人)
2185
- getNodeObj(res) {
2186
- const _that = this;
2187
- request({
2188
- url: _that.baseUrl ? _that.baseUrl + getNodeInfoHtml : getNodeInfoHtml,
2189
- params: {
2190
- processDefinitionId: this.processObj.taskExamine.processDefinitionId,
2191
- nextNodeId: res,
2192
- taskId: this.processObj.taskExamine.taskId,
2193
- pendingId: this.pendingId,
2194
- businessId: this.taskExamineInfo.businessId,
2195
- userId: _that.userId
2196
- }
2197
- }).then((res) => {
2198
- this.$toast.clear();
2199
- this.showFlowBtn = true;
2200
- if (res.status == 'success') {
2201
- _that.isCurrentNodeForbiddenChangeCandidate =
2202
- res.data.nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
2203
- _that.currentNodeEnableItemHandleDescription =
2204
- res.data.nodeExtAttr.currentNodeEnableItemHandleDescription == 1;
2205
- _that.deptRoleCode = res.data.nodeExtAttr.deptRoleCode;
2206
- _that.enableCustomLimitTimeSetting =
2207
- res.data.nodeExtAttr.enableCustomLimitTimeSetting == 1;
2208
- if (
2209
- _that.enableCustomLimitTimeSetting &&
2210
- res.data.nodeMoreInfo &&
2211
- res.data.nodeMoreInfo.defaultCustomLimitDays
2212
- ) {
2213
- _that.form.customLimitTime =
2214
- res.data.nodeMoreInfo.defaultCustomLimitDays + '';
2215
- }
2216
- if (
2217
- res.data.nodeMoreInfo &&
2218
- res.data.nodeMoreInfo
2219
- .chooseCurrentOrgUserCandidateNeedForbiddenSubDept === true
2220
- ) {
2221
- _that.onlyMyOrg = true;
2222
- }
2223
- res.data.otherOrgDisabledObjId &&
2224
- (this.otherOrgDisabledObjId =
2225
- res.data.otherOrgDisabledObjId.split(','));
2226
- res.data.currentOrgDisabledObjId &&
2227
- (this.currentOrgDisabledObjId =
2228
- res.data.currentOrgDisabledObjId.split(','));
2229
- this.appointNotUserIds = res.data.appointNotUserIds;
2230
- this.handleRoleId = res.data.handleRoleId;
2231
- this.nextRole = res.data.nextRole;
2232
- this.filterCandinateIds = res.data.nodeExtAttr.filterCandinateIds;
2233
- this.selectorDefShowDeptId =
2234
- res.data.nodeExtAttr.selectorDefShowDeptId;
2235
- this.userSelectionType = res.data.nodeExtAttr.userSelectionType;
2236
- // this.changePidObjtype();
2237
- this.orgSelectionType = res.data.nodeExtAttr.orgSelectionType;
2238
- this.notificationType = res.data.nodeExtAttr.notificationType;
2239
- this.nodeType = res.data.nodeExtAttr.nodeType;
2240
- this.deptRoleCode = res.data.nodeExtAttr.deptRoleCode;
2241
- this.orgRoleCode = res.data.nodeExtAttr.orgRoleCode;
2242
- this.isCustomUser = res.data.nodeExtAttr.isCustomUser;
2243
- this.presetEdit = res.data.nodeExtAttr.presetEdit;
2244
- this.isLimitedTimeHandling =
2245
- res.data.nodeExtAttr.isLimitedTimeHandling;
2246
- this.peopleObj = res.data.nodeExtAttr;
2247
- this.nextUserList = res.data.nextUserList.filter(
2248
- (x) => x.userId && x.username
2249
- );
2250
- let _this = this;
2251
- this.nextUserList.map((r) => {
2252
- _this.$set(r, 'checked', false);
2253
- });
2254
- _that.currentOrgSelectorParams.roleid = _that.deptRoleCode;
2255
- this.isHandleExplain =
2256
- res.data.nodeExtAttr.isHandleExplain == 1 ? true : false; //判断是否隐藏办理说明
2257
- this.isCustomUserClick =
2258
- res.data.nodeExtAttr.isCustomUser == 1 ? true : false; // 判断办理人是否可点击显示弹框
2259
- this.isTaskread = res.data.nodeExtAttr.isTaskread == 1 ? true : false; // 判断是否显示分阅
2260
- this.countersignaturetypeCode =
2261
- res.data.countersignaturetypeCode !== 0 ? true : false; //判断是否隐藏处理方式
2262
- this.countersignaturetypeText = res.data.countersignaturetypeText;
2263
- //如果当前为承办节点/会签节点,则展示本单位外单位办理人选择
2264
- if (this.nodeType === 1 || this.nodeType === 2) {
2265
- this.isMainSubProcess === true
2266
- ? (this.isNodeShowProcess = true)
2267
- : (this.isNodeShowProcess = false);
2268
- this.isMainSubProcess === true
2269
- ? (this.isMainSubProcess = true)
2270
- : (this.isMainSubProcess = false);
2271
- this.isNextUser = false;
2272
- this.isHideCurrentOrg =
2273
- res.data.nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
2274
- this.isHideOtherOrg =
2275
- res.data.nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
2276
- } else {
2277
- this.isHideCurrentOrg = false;
2278
- this.isHideOtherOrg = false;
2279
- this.isMainSubProcess = false;
2280
- this.isNodeShowProcess = false;
2281
- this.isNextUser = true;
2282
- // this.isMainSubProcess === true
2283
- // ? (this.isMainSubProcess = true)
2284
- // : (this.isMainSubProcess = false);
2285
- }
2286
- // userSelectionType 机构内单选人1,机构内多选人2,所有机构单选人3,所有部门多选人4,本部门单选人5,本部门多选人6,本单位单选部门7,本单位多选部门8,单选单位9,多选单位10,单选机构11,多选机构12,本部门角色13,本单位角色14
2287
- this.userSelectionType == 2 ||
2288
- this.userSelectionType == 4 ||
2289
- this.userSelectionType == 6 ||
2290
- this.userSelectionType == 8 ||
2291
- this.userSelectionType == 10 ||
2292
- this.userSelectionType == 11 ||
2293
- this.userSelectionType == 12
2294
- ? (this.isRadio = false)
2295
- : (this.isRadio = true); //判断办理人单选多选
2296
-
2297
- if (
2298
- this.userSelectionType == 7 ||
2299
- this.userSelectionType == 8 ||
2300
- this.userSelectionType == 9 ||
2301
- this.userSelectionType == 10 ||
2302
- this.userSelectionType == 11 ||
2303
- this.userSelectionType == 12
2304
- ) {
2305
- this.isDealObject = true;
2306
- this.isNextUser = false;
2307
- }
2308
- if (this.userSelectionType == 13 || this.userSelectionType == 14) {
2309
- this.isNextUser = false;
2310
- this.isDealObject = false;
2311
- this.isDealRole = true;
2312
- this.nextUserflag = true;
2313
- }
2314
- this.isHiddenNextStepInfo =
2315
- res.data.nodeExtAttr.isHiddenNextStepInfo == 1 && this.nextUserflag
2316
- ? true
2317
- : false; // 判断是否隐藏下一步节点信息和接收人信息
2318
- if (res.data.globalNodeType === 'endEvent') {
2319
- this.isNextUser = false;
2320
- _that.endFlow = true;
2321
- this.form.nextUserId = '流程办结';
2322
- } else {
2323
- this.nodeType != 1 &&
2324
- this.nodeType != 2 &&
2325
- (this.isNextUser = true); //判断是否是流程办结 办结下步办理人不显示
2326
- }
2327
- this.changeDefPeople(
2328
- res.data.nodeExtAttr.isDefSelectedObj,
2329
- res.data.nodeExtAttr.isSelectedAllObj
2330
- );
2331
- this.changePidObjtype(
2332
- res.data.nodeExtAttr.userSelectionType,
2333
- this.choiceOrgId,
2334
- this.choiceDeptId,
2335
- this.pOrgId
2336
- );
2337
- } else {
2338
- this.$toast(res.message);
2339
- }
2340
- });
2341
- },
2342
- // 修改默认办理人
2343
- changeDefPeople(def, all) {
2344
- this.nextUserSelectList = [];
2345
- if ((def == 1 && all == 1) || (def == 0 && all == 1)) {
2346
- let ids = '';
2347
- this.nextUserList.map((r, i) => {
2348
- r.showid = r.userId;
2349
- r.showname = r.username;
2350
- this.$set(r, 'checked', true);
2351
- this.nextUserSelectList.push(r);
2352
- ids += r.userId + (i === this.nextUserList.length - 1 ? '' : ',');
2353
- });
2354
- this.form.nextUserId = ids;
2355
- } else if (
2356
- def == 1 &&
2357
- (!all || all == 0) &&
2358
- this.nextUserList.length > 0
2359
- ) {
2360
- this.nextUserList[0].showid = this.nextUserList[0].userId;
2361
- this.nextUserList[0].showname = this.nextUserList[0].username;
2362
- this.$set(this.nextUserList[0], 'checked', true);
2363
- this.nextUserSelectList.push(this.nextUserList[0]);
2364
- this.form.nextUserId = this.nextUserSelectList[0].userId;
2365
- }
2366
- },
2367
- // 根据返回的办理人类型来判断 选择人员树的范围
2368
- changePidObjtype(val, choiceOrgId, choiceDeptId, pOrgId) {
2369
- if (val === 1 || val === 2) {
2370
- this.pid = choiceOrgId || this.orgId;
2371
- this.objType = 'enterprise';
2372
- this.selectType = 'employee';
2373
- } else if (this.userSelectionType === 3 || this.userSelectionType === 4) {
2374
- this.pid = 'root';
2375
- this.objType = 'employee';
2376
- } else if (this.userSelectionType === 5 || this.userSelectionType === 6) {
2377
- this.pid = choiceDeptId || this.depId;
2378
- this.objType = 'department';
2379
- } else if (
2380
- this.userSelectionType === 11 ||
2381
- this.userSelectionType === 12
2382
- ) {
2383
- this.selectType = 'employee';
2384
- this.objType = 'enterprise';
2385
- } else if (this.userSelectionType === 13) {
2386
- this.pid = choiceDeptId || this.depId;
2387
- this.selectType = 'employee';
2388
- this.objType = 'department';
2389
- } else if (this.userSelectionType === 14) {
2390
- this.pid = pOrgId || this.orgId;
2391
- this.selectType = 'employee';
2392
- } else if (
2393
- this.userSelectionType === 15 ||
2394
- this.userSelectionType === 16
2395
- ) {
2396
- this.pid = pOrgId || this.orgId;
2397
- this.selectType = 'employee';
2398
- }
2399
- }
2400
- }
2401
- };
2402
- </script>
2403
-
2404
- <style></style>
1
+ <template>
2
+ <div class="process-handle">
3
+ <StartFlow
4
+ v-if="showFreeStart"
5
+ @close="showFreeStart = false"
6
+ :defId="freeStartFlowParams.defId"
7
+ :businessId="
8
+ freeStartFlowParams.startFlowBusinessId || taskExamineInfo.businessId
9
+ "
10
+ :taskParams="taskParams"
11
+ :is-free-start-flow="
12
+ freeStartFlowParams.useScene === 'multiInsMidwayWithSubmitScene'
13
+ "
14
+ @closePop="showFreeStart = false"
15
+ @success="handleSuccess"
16
+ :opinion="form.opinion"
17
+ :hideMessage="hideMessage"
18
+ :flowLabelConfig="flowLabelConfig"
19
+ :copy-history="freeStartFlowParams.pendedHistoryHandle"
20
+ :formType="processFormType"
21
+ :orgId="orgId"
22
+ :depId="depId"
23
+ />
24
+ <div
25
+ v-else-if="handleFlow"
26
+ style="display: flex; flex-direction: column; height: 100%"
27
+ >
28
+ <div class="process-content">
29
+ <!-- 当前节点 -->
30
+ <div class="present-node">
31
+ <div class="label">当前节点:</div>
32
+ <div>{{ processObj.taskExamine.nodeName }}</div>
33
+ </div>
34
+ <!-- 意见 -->
35
+ <Opinion
36
+ :code="processObj.attachedCode"
37
+ :ownId="pendingId"
38
+ :esign="esign && typeCode != 'endFlow'"
39
+ :opinionType="opinionType"
40
+ :paddingTop="paddingTop"
41
+ :esignLineWidth="
42
+ $attrs['esign-line-width'] || $attrs['esignLineWidth']
43
+ "
44
+ @onInputOpintion="onInputOpintion"
45
+ :isOpinionRequired="isOpinionRequired"
46
+ :disabled="isBanInputOpinion != 0"
47
+ :baseUrl="baseUrl"
48
+ :isForceDisplayDefaultOptionForPrefix="
49
+ isForceDisplayDefaultOptionForPrefix
50
+ "
51
+ @click="handlePop"
52
+ :showOpinionPop="showOpinionPop"
53
+ :pendingItemHandleDescription="pendingItemHandleDescription"
54
+ :oldOpinion="form.opinion"
55
+ :placeholder="
56
+ pendingItemHandleDescription || opinionHandleExplainText
57
+ "
58
+ :nodeDefaultSubmitOpinion="nodeDefaultSubmitOpinion"
59
+ :nodeFixedOpinionSelectList="nodeFixedOpinionSelectList"
60
+ :isHiddenOftenOpinion="isHiddenOftenOpinion == 1 ? false : true"
61
+ ></Opinion>
62
+ <!-- 审核内容 -->
63
+ <div
64
+ class="special-box input-box"
65
+ v-if="
66
+ typeCode != 'fenyue' &&
67
+ typeCode != 'endFlow' &&
68
+ (!endFlow ||
69
+ taskOperations.length > 1 ||
70
+ taskOperationShiftedNodeList)
71
+ "
72
+ >
73
+ <!-- 加签 -->
74
+ <div
75
+ class="item"
76
+ :class="{ itemRadio: form.isAddSign === '1' }"
77
+ v-if="isCanAddSign"
78
+ >
79
+ <em-input
80
+ name="radio"
81
+ label="是否增加本环节办理人"
82
+ :required="true"
83
+ >
84
+ <template slot="input">
85
+ <em-radio-group
86
+ v-model="form.isAddSign"
87
+ :data="isAddSignList"
88
+ direction="horizontal"
89
+ />
90
+ </template>
91
+ </em-input>
92
+ </div>
93
+ <div
94
+ class="item item-user"
95
+ label="增加办理人"
96
+ v-if="form.isAddSign === '1'"
97
+ >
98
+ <em-selector
99
+ label="增加办理人"
100
+ required
101
+ multiple
102
+ :isAllCheck="isAllCheck"
103
+ :baseUrl="apiBaseUrl"
104
+ :isClosePopup="showSelectorPopup"
105
+ :paddingTop="paddingTop"
106
+ :objType="objType"
107
+ v-model="addSignUserSelectList"
108
+ @change="disposeAppUser($event, 'addSignUserSelectList')"
109
+ @selector-click="handleSelectorClick"
110
+ />
111
+ <em-input v-if="isCanPreAddSign" label="加签模式">
112
+ <template slot="input">
113
+ <em-radio-group
114
+ v-model="form.addSignMode"
115
+ direction="horizontal"
116
+ :data="AddSignList"
117
+ />
118
+ </template>
119
+ </em-input>
120
+ </div>
121
+ <!-- 减签 -->
122
+ <div
123
+ class="item"
124
+ :class="{ itemRadio: form.isRemoveSign === '1' }"
125
+ v-if="isCanRemoveSign"
126
+ >
127
+ <em-input name="radio" label="是否减签" :required="true">
128
+ <template slot="input">
129
+ <em-radio-group
130
+ v-model="form.isRemoveSign"
131
+ :data="isAddSignList"
132
+ direction="horizontal"
133
+ />
134
+ </template>
135
+ </em-input>
136
+ </div>
137
+ <div v-if="isSpecial && typeCode != 'fenyue'">
138
+ <div
139
+ class="item item-user"
140
+ label="减少办理人"
141
+ v-if="form.isRemoveSign === '1'"
142
+ >
143
+ <em-selector
144
+ label="减少办理人"
145
+ :isAllCheck="isAllCheck"
146
+ required
147
+ :paddingTop="paddingTop"
148
+ multiple
149
+ :isClosePopup="showSelectorPopup"
150
+ :baseUrl="apiBaseUrl"
151
+ :objType="objType"
152
+ @selector-click="handleSelectorClick"
153
+ v-model="removeSignUserSelectList"
154
+ @change="disposeAppUser($event, 'removeSignUserSelectList')"
155
+ />
156
+ </div>
157
+ <!-- 下一步所有相关操作-->
158
+ <div
159
+ v-if="
160
+ form.isRemoveSign !== '1' &&
161
+ form.isAddSign !== '1' &&
162
+ !isHiddenNextStepInfo
163
+ "
164
+ >
165
+ <!-- <div
166
+ @click="isNextBox = !isNextBox"
167
+ v-if="!isReject"
168
+ class="shrink-btn"
169
+ >
170
+ {{ isNextBox ? '收起下一步操作和节点' : '展开下一步操作和节点' }}
171
+ </div> -->
172
+ <div class="next-box" v-show="isNextBox || isReject">
173
+ <!-- 下一步操作 -->
174
+ <div
175
+ class="item next-step"
176
+ v-if="!isHiddenNextStepInfo && isChooseNextNode == 1"
177
+ >
178
+ <em-input
179
+ value="下步操作"
180
+ label="下步操作"
181
+ required
182
+ class="em-flow-next-steps"
183
+ :disabled="true"
184
+ label-position="top"
185
+ >
186
+ <template slot="input">
187
+ <span
188
+ class="em-flow-tag"
189
+ :class="{ 'em-flow-tag-active': tagKey === item.key }"
190
+ @click="changeNextOperate(item)"
191
+ v-for="item in taskOperations"
192
+ :key="item.key"
193
+ >
194
+ {{ item.value }}
195
+ </span>
196
+ </template>
197
+ </em-input>
198
+ <!-- <em-picker
199
+ title="下步操作"
200
+ label="下步操作"
201
+ required
202
+ show-toolbar
203
+ v-model="form.nextOperateName"
204
+ label-width="100%"
205
+ :columns="taskOperations"
206
+ value-key="key"
207
+ label-key="value"
208
+ @confirm="changeNextOperate"
209
+ /> -->
210
+ </div>
211
+ <!-- 下步节点 -->
212
+ <div
213
+ class="item"
214
+ v-if="
215
+ nodeList && nodeList.length > 0 && !isReject && isShowNode
216
+ "
217
+ >
218
+ <em-picker
219
+ v-if="
220
+ nextNodeCheckType == 'select' &&
221
+ flowSelectType == 'picker'
222
+ "
223
+ title="下步节点"
224
+ label="下步节点"
225
+ required
226
+ show-toolbar
227
+ v-model="form.nextNodeName"
228
+ label-width="100%"
229
+ :columns="nodeList"
230
+ value-key="nodeId"
231
+ label-key="nodeName"
232
+ @confirm="onConfirmNextNode"
233
+ />
234
+ <em-input
235
+ v-else-if="
236
+ nextNodeCheckType == 'select' && flowSelectType == 'popup'
237
+ "
238
+ label="下步节点"
239
+ required
240
+ :readonly="true"
241
+ @click="showFlowSelect = true"
242
+ label-position="top"
243
+ right-icon="arrow"
244
+ >
245
+ <template slot="input">
246
+ <div style="width: calc(100% - 40px)">
247
+ {{ form.nextNodeName }}
248
+ </div>
249
+ </template>
250
+ </em-input>
251
+ <em-input
252
+ v-else
253
+ value="下步节点"
254
+ label="下步节点"
255
+ required
256
+ class="em-flow-next-steps"
257
+ :disabled="true"
258
+ label-position="top"
259
+ >
260
+ <template slot="input">
261
+ <em-radio-group
262
+ v-model="form.nextNodeId"
263
+ :data="nodeList"
264
+ value-key="nodeId"
265
+ label-key="nodeName"
266
+ direction="horizontal"
267
+ @change="onConfirmNextNode"
268
+ />
269
+ </template>
270
+ </em-input>
271
+ </div>
272
+ </div>
273
+ <!-- 处理方式提示文字 -->
274
+ <div class="item" v-if="countersignaturetypeCode">
275
+ <van-field
276
+ v-model="countersignaturetypeText"
277
+ label="处理方式"
278
+ :disabled="true"
279
+ />
280
+ </div>
281
+ <!-- 下一步办理人 -->
282
+ <div class="item item-user" v-if="isNextUser">
283
+ <em-selector
284
+ :multiple="!isRadio"
285
+ v-model="nextUserSelectList"
286
+ :objType="objType"
287
+ :isAllCheck="isAllCheck"
288
+ :isClosePopup="showSelectorPopup"
289
+ required
290
+ @selector-click="handleSelectorClick"
291
+ :paddingTop="paddingTop"
292
+ :nextUserList="nextUserList"
293
+ :baseUrl="apiBaseUrl"
294
+ tabs="employee,persongroup"
295
+ :disabled="
296
+ !isCustomUser || isCurrentNodeForbiddenChangeCandidate == 1
297
+ "
298
+ :selectDisabled="isCurrentNodeForbiddenChangeCandidate == 1"
299
+ :placeholder="`请选择${
300
+ flowLabelConfig.nextUser || '下步办理人'
301
+ }`"
302
+ :param="{
303
+ pid: pid,
304
+ onlyMyOrg: onlyMyOrg
305
+ }"
306
+ :label="`${flowLabelConfig.nextUser || '下步办理人'}`"
307
+ @change="disposeAppUser($event, 'nextUserSelectList')"
308
+ />
309
+ </div>
310
+ <!-- 办理角色-->
311
+ <div class="item" v-if="isDealRole">
312
+ <em-input
313
+ value="办理角色"
314
+ label="办理角色"
315
+ :disabled="true"
316
+ placeholder="请选择"
317
+ />
318
+ </div>
319
+ <!-- 办理对象-->
320
+ <div class="item" v-if="isDealObject">
321
+ <em-input
322
+ value="办理对象"
323
+ label="办理对象"
324
+ :disabled="true"
325
+ placeholder="请选择"
326
+ />
327
+ </div>
328
+ <!-- 本单位-->
329
+ <!-- v-if="isHideCurrentOrg" -->
330
+ <div class="item" v-if="isHideCurrentOrg">
331
+ <em-selector
332
+ v-model="nextCurrentOrgObjSelect"
333
+ multiple
334
+ :isClosePopup="showSelectorPopup"
335
+ :isAllCheck="isAllCheck"
336
+ :paddingTop="paddingTop"
337
+ isDepartment
338
+ @selector-click="handleSelectorClick"
339
+ :objType="'enterprise'"
340
+ :tabs="currentOrgSelectorTabs"
341
+ :param="currentOrgSelectorParams"
342
+ :disableds="currentOrgDisabledObjId"
343
+ :baseUrl="apiBaseUrl"
344
+ :isOtherUnit="false"
345
+ :label="currentOrgName ? currentOrgName : '本单位'"
346
+ @change="disposeAppUnit($event, 'nextCurrentOrgObjSelect')"
347
+ />
348
+ </div>
349
+ <!-- :nextUserList="nextUserList" -->
350
+ <!-- 外单位 -->
351
+ <!-- v-if="isHideOtherOrg" -->
352
+ <div class="item" v-if="isHideOtherOrg">
353
+ <em-selector
354
+ v-model="nextOtherOrgObjSelect"
355
+ multiple
356
+ :isAllCheck="isAllCheck"
357
+ :isClosePopup="showSelectorPopup"
358
+ :paddingTop="paddingTop"
359
+ @selector-click="handleSelectorClick"
360
+ :objType="'enterprise'"
361
+ :param="foreignOrgSelectorParams"
362
+ :tabs="foreignOrgSelectorTabs"
363
+ :baseUrl="apiBaseUrl"
364
+ :disableds="otherOrgDisabledObjId"
365
+ :isOtherUnit="true"
366
+ isEnterprise
367
+ :label="otherOrgName ? otherOrgName : '外单位'"
368
+ @change="disposeAppUnit($event, 'nextOtherOrgObjSelect')"
369
+ />
370
+ </div>
371
+ <div class="item" v-if="enableCustomLimitTimeSetting">
372
+ <!-- <van-field
373
+ value="主办"
374
+ label="主办"
375
+ :disabled="true"
376
+ placeholder="请选择"
377
+ /> -->
378
+ <em-picker
379
+ v-model="form.customLimitTime"
380
+ v-if="!showCustomLimitTimeText"
381
+ label="限时办理"
382
+ title="限时办理"
383
+ placeholder="请选择"
384
+ sysAppCode="bpm_custom_limit_time"
385
+ show-toolbar
386
+ >
387
+ <template slot="button">
388
+ <em-button
389
+ size="small"
390
+ type="primary"
391
+ @click="
392
+ () => {
393
+ // form.customLimitTime = '';
394
+ showCustomLimitTimeText = !showCustomLimitTimeText;
395
+ }
396
+ "
397
+ >切换文本框</em-button
398
+ >
399
+ </template>
400
+ </em-picker>
401
+ <em-input
402
+ v-else
403
+ v-model="form.customLimitTime"
404
+ center
405
+ label="限时办理"
406
+ clearable
407
+ @change="changeCustomLimitTime"
408
+ placeholder="请输入限时办理天数"
409
+ >
410
+ <template slot="button">
411
+ <em-button
412
+ size="small"
413
+ type="primary"
414
+ @click="
415
+ () => {
416
+ // form.customLimitTime = '';
417
+ showCustomLimitTimeText = !showCustomLimitTimeText;
418
+ }
419
+ "
420
+ >切换选择框</em-button
421
+ >
422
+ </template>
423
+ </em-input>
424
+ </div>
425
+ <!-- 主办 -->
426
+ <div class="item" v-if="isMainSubProcess && isNodeShowProcess">
427
+ <!-- <van-field
428
+ value="主办"
429
+ label="主办"
430
+ :disabled="true"
431
+ placeholder="请选择"
432
+ /> -->
433
+ <em-picker
434
+ v-model="form.mainSubId"
435
+ label="主办"
436
+ title="主办"
437
+ placeholder="请选择主办"
438
+ show-toolbar
439
+ :disabled="subProcessColumns.length == 0"
440
+ :columns="subProcessColumns"
441
+ />
442
+ </div>
443
+ <!-- 办理说明 -->
444
+ <div class="item" v-if="isHandleExplain">
445
+ <van-field
446
+ v-model="form.handleExplain"
447
+ value="办理说明"
448
+ label="办理说明"
449
+ placeholder="请输入办理说明"
450
+ />
451
+ </div>
452
+ <div
453
+ class="item"
454
+ v-if="
455
+ currentNodeEnableItemHandleDescription &&
456
+ nodeList &&
457
+ nodeList.length != 0 &&
458
+ isShowNode &&
459
+ isNextUser
460
+ "
461
+ >
462
+ <van-field
463
+ v-model="form.nextItemHandleDescription"
464
+ value="办理说明"
465
+ label="办理说明"
466
+ placeholder="请输入办理说明"
467
+ />
468
+ </div>
469
+ </div>
470
+ <!-- 分阅 -->
471
+ <div
472
+ class="item"
473
+ v-if="
474
+ form.isRemoveSign !== '1' &&
475
+ form.isAddSign !== '1' &&
476
+ isTaskread
477
+ "
478
+ >
479
+ <div class="item item-user">
480
+ <em-selector
481
+ v-model="nextReadUserSelectList"
482
+ multiple
483
+ :isAllCheck="isAllCheck"
484
+ @selector-click="handleSelectorClick"
485
+ :objType="objType"
486
+ :param="{
487
+ pid: pid
488
+ }"
489
+ :isClosePopup="showSelectorPopup"
490
+ :paddingTop="paddingTop"
491
+ :baseUrl="apiBaseUrl"
492
+ tabs="employee,persongroup"
493
+ label="分阅用户"
494
+ @change="disposeAppUser($event, 'nextReadUserSelectList')"
495
+ />
496
+ </div>
497
+ </div>
498
+ <!-- 限时办理 -->
499
+ <!-- v-if="isLimitedTimeHandling" -->
500
+ <div class="item" v-if="isLimitedTimeHandling">
501
+ <em-input name="radio" label="是否限时办理" :required="true">
502
+ <template slot="input">
503
+ <em-radio-group
504
+ v-model="form.isLimitedTime"
505
+ :data="isAddSignList"
506
+ direction="horizontal"
507
+ />
508
+ </template>
509
+ </em-input>
510
+ </div>
511
+ <div
512
+ class="item item-limited-time"
513
+ v-if="form.isLimitedTime === '1'"
514
+ >
515
+ <em-input name="radio" label="限时办理时间" :required="true">
516
+ <template slot="input">
517
+ <div class="item-limited-time-content">
518
+ <div>
519
+ <em-input
520
+ placeholder="请输入天数"
521
+ v-model="form.limitedTimeDay"
522
+ type="digit"
523
+ />
524
+ </div>
525
+ <div class="day-text">天</div>
526
+ <div>
527
+ <em-input
528
+ :value="form.limitedTimeHour"
529
+ clickable
530
+ readonly
531
+ placeholder="请选择小时"
532
+ @click="openTimeList('limitedTimeHour')"
533
+ />
534
+ </div>
535
+ <div class="day-text">时</div>
536
+ </div>
537
+ </template>
538
+ </em-input>
539
+ </div>
540
+ <div
541
+ class="item item-limited-time"
542
+ v-if="form.isLimitedTime === '1'"
543
+ >
544
+ <em-input name="radio" label="提前通知时间" :required="true">
545
+ <template slot="input">
546
+ <div class="item-limited-time-content">
547
+ <div>
548
+ <em-input
549
+ placeholder="请输入天数"
550
+ v-model="form.advanceNoticeDay"
551
+ type="digit"
552
+ />
553
+ </div>
554
+ <div class="day-text">天</div>
555
+ <div>
556
+ <em-input
557
+ :value="form.advanceNoticeHour"
558
+ clickable
559
+ placeholder="请选择小时"
560
+ readonly
561
+ @click="openTimeList('advanceNoticeHour')"
562
+ />
563
+ </div>
564
+ <div class="day-text">时</div>
565
+ </div>
566
+ </template>
567
+ </em-input>
568
+ </div>
569
+ <van-popup v-model="showTimeList" round position="bottom">
570
+ <van-picker
571
+ show-toolbar
572
+ :columns="timeList"
573
+ @cancel="showTimeList = false"
574
+ @confirm="onConfirmTimeList"
575
+ />
576
+ </van-popup>
577
+ <ProcessSetting
578
+ v-if="isCustomPreset && isPreset"
579
+ ref="processSetting"
580
+ :processDefinitionId="taskExamineInfo.processDefinitionId"
581
+ :nodeId="form.nextNodeId"
582
+ :hideMessage="hideMessage"
583
+ :flowLabelConfig="flowLabelConfig"
584
+ :taskId="processObj.taskExamine.taskId"
585
+ :pendingId="pendingId"
586
+ :businessId="taskExamineInfo.businessId"
587
+ :apiBaseUrl="apiBaseUrl"
588
+ :paddingTop="paddingTop"
589
+ :customPresetHintMessage="customPresetHintMessage"
590
+ :choiceOrgId="choiceOrgId"
591
+ :pOrgId="pOrgId"
592
+ :choiceDeptId="choiceDeptId"
593
+ />
594
+ <!-- 催办通知方式 -->
595
+ <div class="item-msg item-msg1" v-if="form.isLimitedTime === '1'">
596
+ <Message
597
+ ref="message"
598
+ :label="'催办通知方式'"
599
+ :code="msgCode"
600
+ onlyShowType
601
+ :baseUrl="baseUrl"
602
+ :pendingId="pendingId"
603
+ @onInputMsg="onInputMsgUrge"
604
+ :required="true"
605
+ ></Message>
606
+ </div>
607
+
608
+ <!-- 通知方式 -->
609
+ <div class="item-msg item-msg2" v-if="!hideMessage">
610
+ <Message
611
+ ref="message"
612
+ :code="msgCode"
613
+ :baseUrl="baseUrl"
614
+ :readOnlyNotificationType="readOnlyNotificationType"
615
+ :notificationMessageReadOnly="notificationMessageReadOnly"
616
+ :pendingId="pendingId"
617
+ :defaultNotificationType="defaultNotificationType"
618
+ :defaultNotificationMsg="form.notificationMsg"
619
+ @onInputMsg="onInputMsg"
620
+ ></Message>
621
+ </div>
622
+ </div>
623
+ </div>
624
+ </div>
625
+ <div
626
+ v-if="isSubmitButtonShowAgreeAndDisagree && showFlowBtn"
627
+ class="btn-list"
628
+ >
629
+ <div class="btn" @click="handleFlow = false">不同意</div>
630
+ <div class="btn" @click="onSubmit()">同意</div>
631
+ </div>
632
+ <div v-else-if="showFlowBtn" class="btn-list">
633
+ <div class="btn" @click="navigateBack">取消</div>
634
+ <div class="btn" @click="onSubmit()">
635
+ {{ submitButtonName || '确定' }}
636
+ </div>
637
+ </div>
638
+ </div>
639
+ <Reject
640
+ v-else
641
+ :pendingId="pendingId"
642
+ :before-submit="beforeSubmit"
643
+ :hideMessage="hideMessage"
644
+ :flowLabelConfig="flowLabelConfig"
645
+ @close="handleFlow = true"
646
+ />
647
+ <em-popup class="em-flow-popup" v-model="showDefList">
648
+ <div class="em-flow-popup-box">
649
+ <div class="em-flow-popup-box-top">
650
+ <div></div>
651
+ <span>发起流程 </span
652
+ ><van-icon name="cross" @click="showDefList = false" />
653
+ </div>
654
+ <div class="em-flow-popup-box-content">
655
+ <div
656
+ class="em-flow-popup-box-item"
657
+ v-for="item in flowDefList"
658
+ :key="item.defId"
659
+ @click="handleClickDefList(item)"
660
+ >
661
+ {{ item.defName }}
662
+ </div>
663
+ </div>
664
+ </div>
665
+ </em-popup>
666
+ <em-popup
667
+ lass="em-flow-popup"
668
+ v-model="showFlowSelect"
669
+ position="center"
670
+ style="width: 80%"
671
+ >
672
+ <div class="em-flow-popup-box">
673
+ <div class="em-flow-popup-box-top">
674
+ <div></div>
675
+ <span>下步节点 </span
676
+ ><van-icon name="cross" @click="showFlowSelect = false" />
677
+ </div>
678
+ <div class="em-flow-popup-box-content">
679
+ <div
680
+ class="em-flow-popup-box-item"
681
+ v-for="item in nodeList"
682
+ :key="item.nodeId"
683
+ @click="handleClickFlow(item)"
684
+ >
685
+ {{ item.nodeName }}
686
+ </div>
687
+ </div>
688
+ </div>
689
+ </em-popup>
690
+ </div>
691
+ </template>
692
+
693
+ <script>
694
+ import {
695
+ getHandleInfoHtml,
696
+ toStartTaskReadHtml,
697
+ taskReadHtml,
698
+ taskReadWithHandwrittenOpinion,
699
+ getNodeInfoHtml,
700
+ taskHandleHtml,
701
+ taskHandleHtmlImg,
702
+ getProcessDefList,
703
+ getFreeStartFlowParams,
704
+ endFlowHtml
705
+ } from '../../../../src/config/api.js';
706
+ import request from '../../../../src/utils/http.js';
707
+ import Opinion from './Opinion.vue';
708
+ import Reject from './Reject.vue';
709
+ import StartFlow from './StartFlow.vue';
710
+ import Message from './Message.vue';
711
+ import ProcessSetting from './ProcessSettings.vue';
712
+ import FlowMix from '../flowMix';
713
+ import $ from '../../../../src/utils/util';
714
+ export default {
715
+ name: 'Handle',
716
+ inheritAttrs: false,
717
+ components: {
718
+ Opinion,
719
+ Reject,
720
+ ProcessSetting,
721
+ Message,
722
+ StartFlow
723
+ },
724
+ mixins: [FlowMix],
725
+ props: {
726
+ pendingId: String, //待办id
727
+ identityIds: String, //用户id
728
+ beforeSubmit: Function,
729
+ orgId: String, //单位id
730
+ depId: String, //部门id
731
+ baseUrl: String,
732
+ apiBaseUrl: String,
733
+ typeCode: String,
734
+ type: String,
735
+ showOpinionPop: {
736
+ type: Boolean,
737
+ default: false
738
+ },
739
+ paddingTop: {
740
+ type: [String, Number],
741
+ default: 0
742
+ },
743
+ msgCode: {
744
+ type: String,
745
+ default: 'notification_type'
746
+ },
747
+ isAllCheck: {
748
+ type: Boolean,
749
+ default: false
750
+ },
751
+ isPreset: {
752
+ type: Boolean,
753
+ default: false
754
+ },
755
+ esign: {
756
+ type: Boolean,
757
+ default: false
758
+ },
759
+ userId: {
760
+ type: String,
761
+ default: ''
762
+ },
763
+ onlyMyOrg: {
764
+ type: Boolean,
765
+ default: false
766
+ },
767
+ selectorParams: {
768
+ type: Object,
769
+ default: () => {}
770
+ },
771
+ flowLabelConfig: {
772
+ type: Object,
773
+ default: () => ({})
774
+ },
775
+ opinionType: {
776
+ type: String,
777
+ default: 'picker'
778
+ },
779
+ flowSelectType: {
780
+ type: String,
781
+ default: 'picker'
782
+ },
783
+ hideMessage: {
784
+ type: Boolean,
785
+ default: false
786
+ },
787
+ isClosePopup: {
788
+ type: Boolean,
789
+ default: false
790
+ }
791
+ },
792
+ watch: {
793
+ isClosePopup: {
794
+ handler(val) {
795
+ this.showSelectorPopup = !this.showSelectorPopup;
796
+ },
797
+ deep: true,
798
+ immediate: true
799
+ }
800
+ },
801
+ data() {
802
+ return {
803
+ AddSignList: [
804
+ { name: '前置加签', value: 'preAddSign' },
805
+ { name: '后置加签', value: 'postAddSign' }
806
+ ],
807
+
808
+ showFlowBtn: false,
809
+ endFlow: false,
810
+ submitButtonName: '',
811
+ showSelectorPopup: false,
812
+ showFlowSelect: false,
813
+ currentOrgSelectorParams: {},
814
+ currentOrgSelectorTabs: 'department,employee',
815
+ foreignOrgSelectorTabs: 'enterprise,filgroupobj',
816
+ foreignOrgSelectorParams: { roleid: '' },
817
+ otherOrgDisabledObjId: [],
818
+ currentOrgDisabledObjId: [],
819
+ currentNodeEnableItemHandleDescription: false,
820
+ pendingItemHandleDescription: '',
821
+ taskOperationShiftedNodeList: null,
822
+ oldNextOperate: '',
823
+ processFormType: 'freeStart',
824
+ nextNodeDefault: 0,
825
+ showDefList: false,
826
+ deptRoleCode: '',
827
+ readOnlyNotificationType: '',
828
+ notificationMessageReadOnly: false,
829
+ freeStartFlowParams: {}, //自由发起流程参数
830
+ taskParams: {},
831
+ isCanPreAddSign: false,
832
+ nextNodeCheckType: 'select',
833
+ showAppUnit: false, // 弹窗单位
834
+ handleFlow: true,
835
+ freeValid: true,
836
+ showFreeStart: false,
837
+ freeStartInfo: {},
838
+ isReject: false,
839
+ opinionHandleExplainText: undefined,
840
+ isCurrentNodeForbiddenChangeCandidate: 0,
841
+ nodeFixedOpinionSelectList: [],
842
+ isChooseNextNode: 1, //是否展示下步操作
843
+ pid: 'root', //树选中pid
844
+ objType: 'enterprise', //树点击对象
845
+ selectType: 'employee', // 树 选择类型
846
+ isNextBox: true, // 是否展开隐藏下步操作
847
+ isForceDisplayDefaultOptionForPrefix: false,
848
+ isOtherUnit: true, //是否是外单位
849
+ isShowNode: false,
850
+ subProcessInfo: '',
851
+ isNodeShowProcess: false, //是否展示主办
852
+ isHiddenOftenOpinion: undefined, //是否隐藏常用意见
853
+ isAddSignList: [
854
+ { name: '是', value: '1' },
855
+ { name: '否', value: '2' }
856
+ ],
857
+ taskReadOpinionRequired: undefined,
858
+ form: {
859
+ addSignMode: 'postAddSign',
860
+ opinion: undefined, // 审批意见
861
+ isImageOpinion: 0,
862
+ isAddSign: undefined, //是否加签
863
+ customLimitTime: '', //限时天数
864
+ addSignUserId: undefined, //加签人员id
865
+ isRemoveSign: undefined, //是否减签
866
+ removeSignUserId: undefined, //减签人员id
867
+ nextOperate: undefined, // 下步操作
868
+ nextOperateName: undefined, // 下步操作显示
869
+ nextNodeId: undefined, // 下步节点,
870
+ nextNodeName: undefined, // 下步节点显示
871
+ isReturnSubmitter: undefined, //是否返回提交人
872
+ isSubFlow: undefined, //是否子流程
873
+ isUndertakeReply: undefined, //是否承办回复
874
+ isTakeAdviceReply: undefined, //是否征求意见回复回复
875
+ isUndertakeEnd: undefined, //是否承办办结
876
+ isTakeAdviceEnd: undefined, //是否征求意见办结
877
+ isReadDealReply: undefined, //是否阅办回复
878
+ isReadDealEnd: undefined, //是否阅办办结
879
+ caOpinion: undefined, //加密意见
880
+ isReturnRejectNode: undefined, //是否提交驳回节点
881
+ isSerialSubmit: undefined, //串行默认提交
882
+ loginType: 2, //登录方式
883
+ nodeOpinionTemplate: undefined, //意见模板
884
+ businessSubCenterCode: undefined, //业务中心编码
885
+ nextRoleId: undefined, // 下步办理角色id
886
+ nextOrgId: undefined, //下步办理机构
887
+ nextCurrentOrgObj: undefined, // 本单位对象
888
+ nextCurrentOrgObjSerialId: undefined, //本单位办理对象序列id
889
+ nextOtherOrgObj: undefined, //外单位对象
890
+ nextOtherOrgObjSerialId: undefined, //外单位办理对象序列id
891
+ mainSubId: undefined, //主办id
892
+ nextReadUserId: undefined, //分阅用户
893
+ handleExplain: undefined, //办理说明
894
+ notificationMsg: undefined, //通知消息
895
+ nextUserId: undefined, //下步办理人
896
+ isLimitedTime: '2', //是否限时办理
897
+ limitedTimeDay: undefined, //限时办理时间 天
898
+ limitedTimeHour: undefined, //限时办理时间 时
899
+ advanceNoticeDay: undefined, //限时办理 天
900
+ advanceNoticeHour: undefined, //限时办理 时
901
+ advanceNoticeType: [] //催办通知方式
902
+ },
903
+ isCanFenyue: '0',
904
+ isChooseNextNode: 1,
905
+ isOpinionRequired: 0, // 意见是否必填
906
+ isBanInputOpinion: 0, //意见是否禁用
907
+ showTimeList: false, //选择限时办理弹出层
908
+ timeList: [], // 选择限时办理时间数组
909
+ nextUserList: [], //下步办理人数组
910
+ nextCurrentOrgObjSelect: [], // 选中本单位
911
+ nextOtherOrgObjSelect: [], //选中外单位
912
+ nextReadUserSelectList: [], //分阅选择数组
913
+ addSignUserSelectList: [], //增加办理人选择数组
914
+ removeSignUserSelectList: [], //减少办理人选择数组
915
+ nextUserSelectList: [], //下步办理人选择数组
916
+ showAppUser: false, // 办理人遮罩层
917
+ showNextOperate: false, // 下一步操作遮罩层
918
+ showNextNodeList: false, // 下一步流程节点遮罩层
919
+ nodeList: [], // 流程节点列表
920
+ selectList: [], // 当前选中办理人
921
+ opinionList: [], // 意见列表
922
+ processObj: { taskExamine: { nodeName: undefined } }, //流程信息
923
+ peopleObj: {}, //办理人信息
924
+ userInfo: {}, // 用户信息
925
+ isCanAddSign: false, //是否显示加签
926
+ isCanRemoveSign: false, //是否显示减签
927
+ isSpecial: true, //判断审核内容是否显示(是否是正常的办理页面)
928
+ taskOperations: [], //下一步操作
929
+ countersignaturetypeCode: false, //用来判断处理方式是否显示
930
+ countersignaturetypeText: undefined, // 处理方式
931
+ isCustomPreset: false, // 是否允许预设节点
932
+ isHideCurrentOrg: false, //是否隐藏本单位(承办)
933
+ isHideOtherOrg: false, //是否隐藏外单位(承办)
934
+ isHandleExplain: false, // 是否允许办理说明
935
+ isTaskread: false, //是否分阅
936
+ defaultNotificationType: undefined, ///默认选中通知类型
937
+ selectUnitType: 'department', //单位树选择类型
938
+ isHiddenNextStepInfo: false, //是否隐藏下一步节点信息和接收人信息
939
+ presetEdit: true, //预设是否允许编辑
940
+ isLimitedTimeHandling: false, //是否支持发起子流程限时办理
941
+ userSelectionType: undefined, //处理人选择方式
942
+ orgSelectionType: undefined, //办理机构选择方式
943
+ notificationType: undefined, // 通知方式
944
+ nodeType: undefined, // 节点类型(普通节点0,承办节点1,会签节点2,阅办节点3)
945
+ deptRoleCode: undefined, //本单位角色
946
+ orgRoleCode: undefined, //外单位角色
947
+ appointNotUserIds: undefined, //业务指定非处理人
948
+ handleRoleId: undefined, //办理角色(一般选择范围是部门/单位使用)
949
+ nextRole: undefined, //下步节点默认角色
950
+ filterCandinateIds: undefined, //节点过滤办理人
951
+ selectorDefShowDeptId: undefined, //选择器默认展示部门
952
+ isRadio: true, //下步办理人是否单选
953
+ otherOrgName: undefined, //外单位名字
954
+ currentOrgName: undefined, //本单位名字
955
+ isMainSubProcess: false, // 判断是否子-主流程
956
+ isNextUser: false, // 判断是否显示下步办理人
957
+ isDealObject: false, //判断是否显示办理对象
958
+ isDealRole: false, //判断是否显示办理角色
959
+ nextUserflag: false,
960
+ isSubmitButtonShowAgreeAndDisagree: 0, //是否展示同意和不同意按钮
961
+ isCustomUserClick: false, //下步办理人选择是否可以点击
962
+ timeListLable: undefined, //用来判断是哪里点开的时间遮罩层
963
+ nodeDefaultSubmitOpinion: undefined, //默认提交意见
964
+ isCustomUser: 0, //是否可选中办理人
965
+ choiceOrgId: '',
966
+ choiceDeptId: '',
967
+ taskExamineInfo: {},
968
+ nodeInfoMapInfo: {},
969
+ flowDefList: [],
970
+ file: '',
971
+ isEndUserTask: '',
972
+ tagKey: '',
973
+ pOrgId: '',
974
+ customPresetHintMessage: '',
975
+ enableCustomLimitTimeSetting: false,
976
+ showCustomLimitTimeText: false,
977
+ needRetrialAuth: false,
978
+ defaultNextNode: ''
979
+ };
980
+ },
981
+ created() {
982
+ // 获取用户信息
983
+ // 生成时间数组
984
+ this.currentOrgSelectorParams = {
985
+ pid: this.orgId,
986
+ only_filid: true,
987
+ onlyMyOrg: true
988
+ };
989
+ this.timeList = new Array();
990
+ for (let i = 0; i < 25; i++) {
991
+ this.timeList.push(i);
992
+ }
993
+ this.$toast.loading({
994
+ message: '加载中...',
995
+ forbidClick: true,
996
+ loadingType: 'spinner',
997
+ overlay: true,
998
+ duration: 0
999
+ });
1000
+ // 获取审核详情后去获取节点信息和办理人信息。
1001
+ if (this.typeCode == 'fenyue') {
1002
+ this.getToStartTaskReadIndex();
1003
+ } else {
1004
+ Promise.all([this.getProcessObjNew()]).then(() => {
1005
+ if (this.form.nextNodeId) {
1006
+ this.getNodeObj(this.form.nextNodeId);
1007
+ } else {
1008
+ this.$toast.clear();
1009
+ }
1010
+ });
1011
+ }
1012
+ },
1013
+ computed: {
1014
+ subProcessColumns() {
1015
+ if (!this.isMainSubProcess || !this.isNodeShowProcess) return [];
1016
+ let data = [];
1017
+ let obj = { name: '[部门员工]-' };
1018
+ this.nextCurrentOrgObjSelect.map((x) => {
1019
+ if (x.objType == 'employee') {
1020
+ obj.name = !obj.value
1021
+ ? obj.name + x.showname
1022
+ : obj.name + ',' + x.showname;
1023
+ obj.value = obj.value
1024
+ ? obj.value + ',' + x.showid
1025
+ : 'employee-' + x.showid;
1026
+ } else {
1027
+ data.push({
1028
+ name: '[部门]' + x.showname,
1029
+ value: 'department-' + x.showid
1030
+ });
1031
+ }
1032
+ });
1033
+ obj.value && data.push(obj);
1034
+ this.nextOtherOrgObjSelect.map((x) => {
1035
+ data.push({
1036
+ name: '[企业]' + x.showname,
1037
+ value: 'enterprise-' + x.showid
1038
+ });
1039
+ });
1040
+ return data;
1041
+ }
1042
+ },
1043
+ methods: {
1044
+ handlePop(val) {
1045
+ this.$parent.$emit('opinion-change', val);
1046
+ },
1047
+ handleSelectorClick(val) {
1048
+ this.$parent.$emit('selector-click', val);
1049
+ },
1050
+ handleClickFlow(val) {
1051
+ console.log(val);
1052
+ if (val.nodeId === this.form.nextNodeId)
1053
+ return (this.showFlowSelect = false);
1054
+ this.form.nextNodeId = val.nodeId;
1055
+ this.form.nextNodeName = val.nodeName;
1056
+ this.showFlowSelect = false;
1057
+ this.onConfirmNextNode(val);
1058
+ },
1059
+ handleSuccess() {
1060
+ this.$parent.$emit('success');
1061
+ },
1062
+ handleClickDefList(info) {
1063
+ this.freeStartFlowParams.defId = info.defId;
1064
+ this.showFreeStart = true;
1065
+ this.showDefList = false;
1066
+ },
1067
+ getFlowDefList() {
1068
+ let params = {
1069
+ url: getProcessDefList,
1070
+ params: {
1071
+ flowTypeCode: this.freeStartFlowParams.flowTypeCode,
1072
+ onlyFlag: false
1073
+ }
1074
+ };
1075
+ request(params).then((res) => {
1076
+ if (res.rCode == 0) {
1077
+ this.flowDefList = res.results;
1078
+ this.showDefList = true;
1079
+ }
1080
+ });
1081
+ },
1082
+ changeCustomLimitTime() {
1083
+ const value = this.form.customLimitTime;
1084
+ if (
1085
+ (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) &&
1086
+ value
1087
+ ) {
1088
+ this.$toast('请输入正确的天数');
1089
+ this.form.customLimitTime = '';
1090
+ }
1091
+ },
1092
+ getFreeStartParams() {
1093
+ if (
1094
+ (!this.form.opinion &&
1095
+ this.isOpinionRequired == 1 &&
1096
+ !this.nodeDefaultSubmitOpinion &&
1097
+ this.form.isImageOpinion == 0) ||
1098
+ (!this.file &&
1099
+ this.isOpinionRequired == 1 &&
1100
+ !this.nodeDefaultSubmitOpinion &&
1101
+ this.form.isImageOpinion == 1)
1102
+ ) {
1103
+ this.$toast('请选择输入审批意见');
1104
+ return;
1105
+ }
1106
+ const { businessId, processDefinitionId, nodeId } = this.taskExamineInfo;
1107
+ let param = {
1108
+ url: getFreeStartFlowParams,
1109
+ params: {
1110
+ businessId,
1111
+ processDefinitionId,
1112
+ pendingId: this.pendingId,
1113
+ nodeId
1114
+ }
1115
+ };
1116
+ this.$toast.loading({
1117
+ message: '加载中...',
1118
+ forbidClick: true,
1119
+ loadingType: 'spinner',
1120
+ overlay: true,
1121
+ duration: 0
1122
+ });
1123
+ request(param).then((res) => {
1124
+ this.$toast.clear();
1125
+ if (res.rCode == 0 || res.status == 'success') {
1126
+ this.freeStartFlowParams = res.results;
1127
+ if (res.results.useScene === 'multiInsMidwayWithSubmitScene')
1128
+ this.onSubmit(res.results.useScene);
1129
+ if (!this.freeValid) return;
1130
+ if (
1131
+ (res.results.startFlowIndexProcessKeys &&
1132
+ res.results.startFlowIndexProcessKeys.length == 0) ||
1133
+ !res.results.startFlowIndexProcessKeys
1134
+ )
1135
+ return this.$toast('未找到流程定义!');
1136
+ if (res.results.startFlowIndexProcessKeys.length == 1) {
1137
+ this.freeStartFlowParams.defId =
1138
+ res.results.startFlowIndexProcessKeys[0];
1139
+ this.freeStartFlowParams.businessId =
1140
+ res.results.startFlowBusinessId;
1141
+ this.showFreeStart = true;
1142
+ } else {
1143
+ this.getFlowDefList();
1144
+ // this.showFreeStartFlow = true;
1145
+ }
1146
+ } else {
1147
+ this.$toast(res.message || '系统错误,请联系管理员!');
1148
+ }
1149
+ });
1150
+ },
1151
+ //限时办理时间确认
1152
+ onConfirmTimeList(val) {
1153
+ this.form[this.timeListLable] = val;
1154
+ this.showTimeList = false;
1155
+ },
1156
+ // 通知消息回调
1157
+ onInputMsg(obj) {
1158
+ this.form.notificationType = obj.notificationType.join(',');
1159
+ this.form.notificationMsg = obj.notificationMsg;
1160
+ },
1161
+ // 催办通知消息回调
1162
+ onInputMsgUrge(obj) {
1163
+ this.form.advanceNoticeType = obj.notificationType.join(',');
1164
+ this.form.advanceNoticeMsg = obj.notificationMsg;
1165
+ },
1166
+ // 打来限时办理时间选择遮罩层
1167
+ openTimeList(label) {
1168
+ this.timeListLable = label;
1169
+ this.showTimeList = true;
1170
+ },
1171
+
1172
+ // 导航栏左侧按钮
1173
+ navigateBack() {
1174
+ this.$parent.$emit('close');
1175
+ },
1176
+ subRead() {
1177
+ const { businessId, appId, processDefinitionId, pendingId } =
1178
+ this.taskExamineInfo;
1179
+ if (this.taskReadOpinionRequired == 'true' && !this.form.opinion)
1180
+ return this.$toast('分阅阅结必须输入意见!');
1181
+ let params = {
1182
+ businessId,
1183
+ appId,
1184
+ processDefinitionId,
1185
+ pendingId,
1186
+ opinion: this.form.opinion,
1187
+ taskAction: 'complete',
1188
+ mobileKey: $.getStorage('deviceId') || '123',
1189
+ userId: this.userId || $.getStorage('userId')
1190
+ };
1191
+ let formData = new FormData();
1192
+ if (this.form.isImageOpinion == 1) {
1193
+ formData.append('file', this.file);
1194
+ }
1195
+ for (let key in params) {
1196
+ if (params[key] !== '' && params[key] !== undefined) {
1197
+ formData.append(key, params[key]);
1198
+ }
1199
+ }
1200
+ this.$toast.loading({
1201
+ message: '加载中...',
1202
+ forbidClick: true,
1203
+ loadingType: 'spinner',
1204
+ overlay: true,
1205
+ duration: 0
1206
+ });
1207
+ request({
1208
+ url: this.baseUrl
1209
+ ? this.baseUrl +
1210
+ (this.form.isImageOpinion == 1
1211
+ ? taskReadWithHandwrittenOpinion
1212
+ : taskReadHtml)
1213
+ : this.form.isImageOpinion == 1
1214
+ ? taskReadWithHandwrittenOpinion
1215
+ : taskReadHtml,
1216
+ headers: {
1217
+ Accept: 'application/json,text/plain'
1218
+ },
1219
+ type: 'post',
1220
+ params: formData,
1221
+ format: false
1222
+ })
1223
+ .then((res) => {
1224
+ const { status, message } = res;
1225
+ this.$toast.clear();
1226
+ if (status === 'success') {
1227
+ this.$toast.success('提交成功');
1228
+ this.$parent.$emit('success');
1229
+ } else {
1230
+ this.$toast(message || '系统错误,请联系管理员!');
1231
+ setTimeout(() => {
1232
+ this.$parent.$emit('error');
1233
+ }, 1000);
1234
+ }
1235
+ })
1236
+ .catch((err) => {
1237
+ this.loading.close();
1238
+ if (err.message && err.message !== 'canceled') {
1239
+ this.$toast(err.message);
1240
+ }
1241
+ });
1242
+ },
1243
+ endFlowSubmit() {
1244
+ this.$toast.loading({
1245
+ message: '加载中...',
1246
+ forbidClick: true,
1247
+ loadingType: 'spinner',
1248
+ overlay: true,
1249
+ duration: 0
1250
+ });
1251
+ let str = '';
1252
+ if (this.form.opinion) {
1253
+ str = this.form.opinion.replace(/\s+/g, '');
1254
+ }
1255
+ if ((!this.form.opinion || str === '') && this.nodeDefaultSubmitOpinion) {
1256
+ this.form.opinion = this.nodeDefaultSubmitOpinion;
1257
+ }
1258
+ request({
1259
+ url: this.baseUrl ? this.baseUrl + endFlowHtml : endFlowHtml,
1260
+ headers: {
1261
+ Accept: 'application/json,text/plain'
1262
+ },
1263
+ type: 'post',
1264
+ params: {
1265
+ pendingId: this.pendingId,
1266
+ opinion: this.form.opinion,
1267
+ mobileKey: $.getStorage('deviceId') || '123'
1268
+ },
1269
+ format: false
1270
+ })
1271
+ .then((res) => {
1272
+ const { status, message } = res;
1273
+ this.$toast.clear();
1274
+ if (status === 'success') {
1275
+ this.$toast.success('提交成功');
1276
+ this.$parent.$emit('success');
1277
+ } else {
1278
+ this.$toast(message || '系统错误,请联系管理员!');
1279
+ setTimeout(() => {
1280
+ this.$parent.$emit('error');
1281
+ }, 1000);
1282
+ }
1283
+ })
1284
+ .catch((err) => {
1285
+ this.loading.close();
1286
+ if (err.message && err.message !== 'canceled') {
1287
+ this.$toast(err.message);
1288
+ }
1289
+ });
1290
+ },
1291
+ // 提交流程
1292
+ onSubmit(typeVal) {
1293
+ if (this.typeCode == 'fenyue') return this.subRead();
1294
+ if (this.typeCode == 'endFlow') return this.endFlowSubmit();
1295
+ if (this.type == 'freeStart' && !typeVal)
1296
+ return this.getFreeStartParams();
1297
+ let idStr = '';
1298
+ this.nextUserSelectList.map((r, i) => {
1299
+ idStr =
1300
+ idStr +
1301
+ r.showid +
1302
+ (i === this.nextUserSelectList.length - 1 ? '' : ',');
1303
+ });
1304
+ this.form.nextUserId = idStr;
1305
+ if (
1306
+ (!this.form.opinion &&
1307
+ this.isOpinionRequired == 1 &&
1308
+ !this.nodeDefaultSubmitOpinion &&
1309
+ this.form.isImageOpinion == 0) ||
1310
+ (!this.file &&
1311
+ this.isOpinionRequired == 1 &&
1312
+ !this.nodeDefaultSubmitOpinion &&
1313
+ this.form.isImageOpinion == 1)
1314
+ ) {
1315
+ this.$toast('请选择输入审批意见');
1316
+ return;
1317
+ }
1318
+ if (
1319
+ this.isSpecial &&
1320
+ this.isNextUser &&
1321
+ !this.form.nextUserId &&
1322
+ idStr === '' &&
1323
+ this.form.isAddSign != '1' &&
1324
+ !this.isReject
1325
+ ) {
1326
+ this.$toast(`请选择${this.flowLabelConfig.nextUser || '办理人'}`);
1327
+ return;
1328
+ }
1329
+ // if (this.form.isAddSign == '1' && !this.form.addSignUserId) {
1330
+ // this.$toast('请选择办理人');
1331
+ // return;
1332
+ // }
1333
+ if (
1334
+ !this.form.nextNodeId &&
1335
+ this.nodeList &&
1336
+ this.nodeList.length > 0 &&
1337
+ this.isSpecial &&
1338
+ !this.isReject &&
1339
+ this.isShowNode
1340
+ ) {
1341
+ this.$toast('请选择流程节点');
1342
+ return;
1343
+ }
1344
+
1345
+ let str = '';
1346
+ if (this.form.opinion) {
1347
+ str = this.form.opinion.replace(/\s+/g, '');
1348
+ }
1349
+ if ((!this.form.opinion || str === '') && this.nodeDefaultSubmitOpinion) {
1350
+ this.form.opinion = this.nodeDefaultSubmitOpinion;
1351
+ }
1352
+
1353
+ if (this.form.isLimitedTime === '1' && this.form.limitedTimeDay) {
1354
+ this.$toast('请填写限时办理天数');
1355
+ return;
1356
+ }
1357
+ if (this.form.isLimitedTime === '1' && this.form.limitedTimeHour) {
1358
+ this.$toast('请选择限时办理时间');
1359
+ return;
1360
+ }
1361
+ if (this.form.isLimitedTime === '1' && this.form.advanceNoticeDay) {
1362
+ this.$toast('请填写提前通知天数');
1363
+ return;
1364
+ }
1365
+ if (this.form.isLimitedTime === '1' && this.form.advanceNoticeHour) {
1366
+ this.$toast('请选择通知时间');
1367
+ return;
1368
+ }
1369
+ if (this.form.isLimitedTime === '1' && this.form.advanceNoticeType) {
1370
+ this.$toast('请选择催办通知方式');
1371
+ return;
1372
+ }
1373
+ if (
1374
+ (this.isHideCurrentOrg || this.isHideOtherOrg) &&
1375
+ !this.form.nextCurrentOrgObjJson &&
1376
+ !this.form.nextOtherOrgObjJson &&
1377
+ this.form.isAddSign != '1'
1378
+ ) {
1379
+ // this.$toast(`请选择${this.currentOrgName || '本单位'}`);
1380
+ this.$toast(`请选择办理对象`);
1381
+ return;
1382
+ }
1383
+ delete this.form.nextNodeName;
1384
+ delete this.form.nextOperateName;
1385
+ if (!this.isSpecial) {
1386
+ delete this.form.nextOperate;
1387
+ delete this.form.nextNodeId;
1388
+ }
1389
+ if (this.form.nextOperate == 9 || this.oldNextOperate == 9) {
1390
+ this.form.isReturnRejectNode = 1;
1391
+ this.form.processDefinitionId =
1392
+ this.processObj.taskExamine.processDefinitionId;
1393
+ }
1394
+ if (this.beforeSubmit) {
1395
+ this.beforeSubmit(
1396
+ { pendingId: this.pendingId, ...this.form, typeVal },
1397
+ this.sendData
1398
+ );
1399
+ return;
1400
+ }
1401
+ this.sendData(typeVal);
1402
+ },
1403
+ sendData(typeVal) {
1404
+ if (this.isMainSubProcess && typeof this.form.mainSubId == 'object') {
1405
+ this.form.mainSubId = this.form.mainSubId.value;
1406
+ }
1407
+ if (this.isCustomPreset && this.isPreset && this.isSpecial) {
1408
+ if (this.$refs.processSetting.active.length != 0) {
1409
+ if (!this.$refs.processSetting.getValue()) return;
1410
+ this.form.customPresetUserJson = this.$refs.processSetting.getValue();
1411
+ this.form.isCustomPreset = true;
1412
+ this.form.presetUserJson = JSON.stringify([]);
1413
+ } else {
1414
+ delete this.form.customPresetUserJson;
1415
+ delete this.form.isCustomPreset;
1416
+ delete this.form.presetUserJson;
1417
+ }
1418
+ }
1419
+
1420
+ const _that = this;
1421
+ const {
1422
+ isEndUserTask,
1423
+ choiceOrgId,
1424
+ choiceDeptId,
1425
+ pOrgId,
1426
+ taskExamineInfo,
1427
+ needRetrialAuth,
1428
+ nodeInfoMapInfo
1429
+ } = this;
1430
+ _that.form.isEndUserTask = isEndUserTask;
1431
+ _that.form.choiceOrgId = choiceOrgId;
1432
+ _that.form.customLimitTime =
1433
+ typeof this.form.customLimitTime === 'object'
1434
+ ? this.form.customLimitTime.cciValue
1435
+ : this.form.customLimitTime;
1436
+ _that.form.choiceDeptId = choiceDeptId;
1437
+ _that.form.needRetrialAuth = needRetrialAuth;
1438
+ _that.form.pOrgId = pOrgId;
1439
+ _that.form.processType = taskExamineInfo.processType;
1440
+ _that.form.businessId = taskExamineInfo.businessId;
1441
+ _that.form.appId = taskExamineInfo.appId;
1442
+ _that.form.processDefinitionId = taskExamineInfo.processDefinitionId;
1443
+ _that.form.isSubFlow = taskExamineInfo.isSubFlow;
1444
+ _that.form.nodeId = taskExamineInfo.nodeId;
1445
+ _that.form.userId = _that.userId || $.getStorage('userId');
1446
+ // _that.form.userId = 'u3a0bc559d4cf4f6ea47106ed7e76cae6';
1447
+ _that.form.mobileKey = $.getStorage('deviceId') || '123';
1448
+ _that.form.nextNodeId =
1449
+ _that.form.nextOperate == 0 ||
1450
+ _that.form.nextOperate == 1 ||
1451
+ _that.oldNextOperate === 0 ||
1452
+ _that.oldNextOperate === 1
1453
+ ? _that.form.nextNodeId || nodeInfoMapInfo.nodeExtAttr.defaultNextNode
1454
+ : '';
1455
+ _that.form.nextOperate =
1456
+ _that.oldNextOperate !== ''
1457
+ ? _that.oldNextOperate
1458
+ : _that.form.nextOperate;
1459
+ if (!_that.isCanPreAddSign || _that.form.isAddSign != '1') {
1460
+ delete _that.form.addSignMode;
1461
+ }
1462
+ if (!_that.enableCustomLimitTimeSetting) {
1463
+ delete _that.form.customLimitTime;
1464
+ }
1465
+ if (!this.isSpecial) {
1466
+ delete _that.form.nextUserId;
1467
+ }
1468
+ if (!_that.currentNodeEnableItemHandleDescription) {
1469
+ delete _that.form.nextItemHandleDescription;
1470
+ }
1471
+ let formData = new FormData();
1472
+ if (_that.form.isImageOpinion == 1) {
1473
+ formData.append('file', _that.file);
1474
+ }
1475
+ formData.append('pendingId', _that.pendingId);
1476
+ for (let key in _that.form) {
1477
+ if (_that.form[key] !== '' && _that.form[key] !== undefined) {
1478
+ formData.append(key, _that.form[key]);
1479
+ }
1480
+ }
1481
+ if (typeVal) {
1482
+ _that.taskParams = _that.form;
1483
+ _that.taskParams.pendingId = _that.pendingId;
1484
+ return;
1485
+ }
1486
+ this.$toast.loading({
1487
+ message: '加载中...',
1488
+ forbidClick: true,
1489
+ loadingType: 'spinner',
1490
+ overlay: true,
1491
+ duration: 0
1492
+ });
1493
+ request({
1494
+ url: _that.baseUrl
1495
+ ? _that.baseUrl +
1496
+ (_that.form.isImageOpinion == 1
1497
+ ? taskHandleHtmlImg
1498
+ : taskHandleHtml)
1499
+ : _that.form.isImageOpinion == 1
1500
+ ? taskHandleHtmlImg
1501
+ : taskHandleHtml,
1502
+ type: 'post',
1503
+ params: formData,
1504
+ format: false
1505
+ }).then((res) => {
1506
+ this.$toast.clear();
1507
+ if (res.status == 'success' || res.status == 'readDealBackProcessing') {
1508
+ if (res.status == 'readDealBackProcessing') {
1509
+ this.$toast(
1510
+ '由于阅办人数较多,任务后台执行中,稍后系统将为您推送阅办任务执行结果,请注意查收!'
1511
+ );
1512
+ setTimeout(() => {
1513
+ this.$toast.clear();
1514
+ this.$parent.$emit('success');
1515
+ }, 1500);
1516
+ } else {
1517
+ this.$toast('操作成功');
1518
+ this.$parent.$emit('success');
1519
+ }
1520
+ } else {
1521
+ this.$toast(res.message);
1522
+ setTimeout(() => {
1523
+ this.$parent.$emit('error');
1524
+ }, 1000);
1525
+ }
1526
+ });
1527
+ },
1528
+ // 删除
1529
+ delteList(label, i) {
1530
+ if (label === 'nextUserSelectList') {
1531
+ let _this = this;
1532
+ let id = _this.nextUserSelectList[i].showid;
1533
+ this.nextUserList.find((i) => {
1534
+ if (i.userId === id) {
1535
+ _this.$set(i, 'checked', false);
1536
+ }
1537
+ });
1538
+ this[label].splice(i, 1);
1539
+ } else {
1540
+ this[label].splice(i, 1);
1541
+ }
1542
+ },
1543
+ // 选择办理人
1544
+ onClickPeople(id) {
1545
+ this.showAppUser = true;
1546
+ this.selectList = this[id];
1547
+ this.$nextTick(function () {
1548
+ this.$refs.selectTree.getContent(id);
1549
+ });
1550
+ },
1551
+ // 选择单位
1552
+ onClickOrg(id) {
1553
+ this.isOtherUnit = id === 'nextCurrentOrgObjSelect' ? false : true;
1554
+ this.selectUnitType =
1555
+ id === 'nextCurrentOrgObjSelect' ? 'department,employee' : 'department';
1556
+ this.showAppUnit = true;
1557
+ this.$nextTick(function () {
1558
+ this.$refs.selectTreeUnit.getContent(id);
1559
+ });
1560
+ },
1561
+ // 切换下一步操作
1562
+ changeNextOperate(val, isDef) {
1563
+ if (!isDef && val.key === this.tagKey) return;
1564
+ this.tagKey = val.key;
1565
+ //恢复默认
1566
+ this.isNextUser = false;
1567
+ this.isShowNode = false;
1568
+ this.isMainSubProcess = false;
1569
+ this.isNodeShowProcess = false;
1570
+ this.form.nextNodeId = '';
1571
+ this.form.isReturnSubmitter = 0;
1572
+ this.form.isUndertakeReply = 0;
1573
+ this.form.isTakeAdviceReply = 0;
1574
+ this.form.isUndertakeEnd = 0;
1575
+ this.form.isTakeAdviceEnd = 0;
1576
+ this.form.isReadDealReply = 0;
1577
+ this.form.isReadDealEnd = 0;
1578
+ this.form.isReturnRejectNode = 0;
1579
+ this.form.isSerialSubmit = 0;
1580
+ if (val.key == 9) {
1581
+ this.isReject = true;
1582
+ } else if (val.key == 2) {
1583
+ this.isReject = false;
1584
+ } else {
1585
+ this.isReject = false;
1586
+ }
1587
+ this.form.nextOperate = val.isNextNode ? val.nextOperate : val.key;
1588
+ this.form.nextOperateName = val.value;
1589
+ this.nodeList = val.taskNodeList;
1590
+ if (this.isSpecial) {
1591
+ if (val.key == -1) {
1592
+ this.form.isSerialSubmit = 1;
1593
+ this.showFlowBtn = true;
1594
+ return;
1595
+ } else if (val.key == 0) {
1596
+ this.isNextUser = true;
1597
+ this.isShowNode = true;
1598
+ } else if (val.key == 1) {
1599
+ this.isNextUser = true;
1600
+ this.isShowNode = true;
1601
+ } else if (val.key == 2) {
1602
+ this.form.isReturnSubmitter = 1;
1603
+ this.showFlowBtn = true;
1604
+ return;
1605
+ } else if (val.key == 3) {
1606
+ this.form.isUndertakeReply = 1;
1607
+ this.showFlowBtn = true;
1608
+ return;
1609
+ } else if (val.key == 4) {
1610
+ this.form.isTakeAdviceReply = 1;
1611
+ this.showFlowBtn = true;
1612
+ return;
1613
+ } else if (val.key == 5) {
1614
+ this.form.isUndertakeEnd = 1;
1615
+ this.showFlowBtn = true;
1616
+ return;
1617
+ } else if (val.key == 6) {
1618
+ this.form.isTakeAdviceEnd = 1;
1619
+ this.showFlowBtn = true;
1620
+ return;
1621
+ } else if (val.key == 7) {
1622
+ this.form.isReadDealReply = 1;
1623
+ this.showFlowBtn = true;
1624
+ return;
1625
+ } else if (val.key == 8) {
1626
+ this.form.isReadDealEnd = 1;
1627
+ this.showFlowBtn = true;
1628
+ return;
1629
+ } else if (val.key == 9) {
1630
+ this.form.isReturnRejectNode = 1;
1631
+ this.showFlowBtn = true;
1632
+ return;
1633
+ } else {
1634
+ }
1635
+ }
1636
+ if (this.taskOperationShiftedNodeList && !val.isNextNode) {
1637
+ this.nodeList = this.nodeList.filter(
1638
+ (x) => this.taskOperationShiftedNodeList.indexOf(x.nodeId) == -1
1639
+ );
1640
+ }
1641
+ if (val.isNextNode) {
1642
+ this.oldNextOperate = val.nextOperate;
1643
+ } else {
1644
+ this.oldNextOperate = '';
1645
+ }
1646
+ if (val.isNextNode) {
1647
+ this.nodeInfos = [];
1648
+ this.form.nextNodeId = val.key;
1649
+ this.form.nextNodeName = val.value;
1650
+ this.$toast.loading({
1651
+ message: '加载中...',
1652
+ forbidClick: true,
1653
+ loadingType: 'spinner',
1654
+ overlay: true,
1655
+ duration: 0
1656
+ });
1657
+
1658
+ this.getNodeObj(this.form.nextNodeId);
1659
+ } else {
1660
+ this.showFlowBtn = true;
1661
+ }
1662
+ if (this.nodeList && this.nodeList.length > 0) {
1663
+ let defNode = this.nodeList.filter(
1664
+ (i) => i.nodeId === this.defaultNextNode
1665
+ );
1666
+ if (defNode.length > 0) {
1667
+ this.form.nextNodeId = defNode[0].nodeId;
1668
+ this.form.nextNodeName = defNode[0].nodeName;
1669
+ } else {
1670
+ this.form.nextNodeId = this.nodeList[0].nodeId;
1671
+ this.form.nextNodeName = this.nodeList[0].nodeName;
1672
+ }
1673
+
1674
+ this.$toast.loading({
1675
+ message: '加载中...',
1676
+ forbidClick: true,
1677
+ loadingType: 'spinner',
1678
+ overlay: true,
1679
+ duration: 0
1680
+ });
1681
+
1682
+ if (isDef !== true) this.getNodeObj(this.form.nextNodeId);
1683
+ } else {
1684
+ this.showFlowBtn = true;
1685
+ }
1686
+
1687
+ this.showNextOperate = false;
1688
+ },
1689
+
1690
+ // 确认流程节点操作
1691
+ onConfirmNextNode(val) {
1692
+ if (this.nextNodeCheckType === 'select') {
1693
+ this.form.nextNodeId = val.nodeId;
1694
+ this.form.nextNodeName = val.nodeName;
1695
+ } else {
1696
+ this.form.nextNodeId = val;
1697
+ }
1698
+ this.$toast.loading({
1699
+ message: '加载中...',
1700
+ forbidClick: true,
1701
+ loadingType: 'spinner',
1702
+ overlay: true,
1703
+ duration: 0
1704
+ });
1705
+ this.getNodeObj(this.form.nextNodeId);
1706
+ this.showNextNodeList = false;
1707
+ },
1708
+ // 意见回调
1709
+ onInputOpintion(val) {
1710
+ const { opinion, isImageOpinion, file } = val;
1711
+ this.form.opinion = opinion;
1712
+ this.form.isImageOpinion = isImageOpinion;
1713
+ this.file = file;
1714
+ },
1715
+ // 办理人选择完回调
1716
+ disposeAppUser(res, type) {
1717
+ this[type] = res.list;
1718
+ let label = '';
1719
+ if (type) {
1720
+ label = type.substring(0, type.lastIndexOf('SelectList'));
1721
+ } else {
1722
+ label = res.label.substring(0, res.label.lastIndexOf('SelectList'));
1723
+ }
1724
+
1725
+ let idStr = '';
1726
+ if (res.list) {
1727
+ res.list.map((r, i) => {
1728
+ idStr = idStr + r.showid + (i === res.list.length - 1 ? '' : ',');
1729
+ });
1730
+ } else {
1731
+ res.map((r, i) => {
1732
+ idStr = idStr + r.showid + (i === res.length - 1 ? '' : ',');
1733
+ });
1734
+ }
1735
+ this.form[label + 'Id'] = idStr;
1736
+ },
1737
+ // 单位选择完回调
1738
+ disposeAppUnit(res, type) {
1739
+ let label = type.substring(0, type.lastIndexOf('Select'));
1740
+ let idStr = '';
1741
+ let types = '';
1742
+ let SerialId = [];
1743
+ this.form[label + 'Name'] = '';
1744
+ let obj = {};
1745
+ res.list.map((r, i) => {
1746
+ if (!types || types.indexOf(r.objType) == -1) {
1747
+ idStr = !types
1748
+ ? r.objType +
1749
+ '-' +
1750
+ r.showid +
1751
+ (i === res.list.length - 1 ? '' : ',')
1752
+ : idStr +
1753
+ '|' +
1754
+ r.objType +
1755
+ '-' +
1756
+ r.showid +
1757
+ (i === res.list.length - 1 ? '' : ',');
1758
+ types = types ? types + ',' + r.objType : r.objType;
1759
+ } else {
1760
+ idStr = idStr + r.showid + (i === res.list.length - 1 ? '' : ',');
1761
+ }
1762
+ SerialId.push(r.showid);
1763
+ if (obj[r.objType]) {
1764
+ obj[r.objType].push(r.showname);
1765
+ } else {
1766
+ obj[r.objType] = [r.showname];
1767
+ }
1768
+ });
1769
+ this.form[label] = idStr;
1770
+ for (let key in obj) {
1771
+ if (
1772
+ key === 'enterprise' &&
1773
+ this.form[label + 'Name'].indexOf('[企业]') == -1
1774
+ ) {
1775
+ this.form[label + 'Name'] = this.form[label + 'Name']
1776
+ ? this.form[label + 'Name'] + '|' + '[企业]-' + obj[key].join(',')
1777
+ : '' + '[企业]-' + obj[key].join(',');
1778
+ }
1779
+ if (
1780
+ key === 'department' &&
1781
+ this.form[label + 'Name'].indexOf('[部门]') == -1
1782
+ ) {
1783
+ this.form[label + 'Name'] = this.form[label + 'Name']
1784
+ ? this.form[label + 'Name'] + '|' + '[部门]-' + obj[key].join(',')
1785
+ : '' + '[部门]-' + obj[key].join(',');
1786
+ }
1787
+ if (
1788
+ key === 'employee' &&
1789
+ this.form[label + 'Name'].indexOf('[部门员工]') == -1
1790
+ ) {
1791
+ this.form[label + 'Name'] = this.form[label + 'Name']
1792
+ ? this.form[label + 'Name'] +
1793
+ '|' +
1794
+ '[部门员工]-' +
1795
+ obj[key].join(',')
1796
+ : '' + '[部门员工]-' + obj[key].join(',');
1797
+ }
1798
+ }
1799
+ // this.form[label + 'Name'] = obj.enterprise?;
1800
+ this.form[label + 'SerialId'] = SerialId.join(',');
1801
+ this.form[label + 'Json'] = JSON.stringify(res.list);
1802
+ },
1803
+ // 获取发起流程信息
1804
+ getProcessObjNew() {
1805
+ let that = this;
1806
+ return new Promise(function (resolve, reiect) {
1807
+ request({
1808
+ url: that.baseUrl
1809
+ ? that.baseUrl + getHandleInfoHtml
1810
+ : getHandleInfoHtml,
1811
+ params: {
1812
+ pendingId: that.pendingId,
1813
+ userId: that.userId
1814
+ }
1815
+ }).then((res) => {
1816
+ if (res.status == 'success') {
1817
+ const {
1818
+ data: {
1819
+ nodeInfoMap,
1820
+ choiceOrgId,
1821
+ choiceDeptId,
1822
+ pOrgId,
1823
+ opinion,
1824
+ taskExamine,
1825
+ customPresetHintMessage,
1826
+ currentOrgName,
1827
+ currentOrgSelectorParams,
1828
+ isChoiceOtherOrgDept,
1829
+ notificationMessageReadOnly,
1830
+ readOnlyNotificationType,
1831
+ otherOrgName,
1832
+ nextNodeCheckType,
1833
+ pendingItemHandleDescription,
1834
+ defaultNotificationMessage,
1835
+ defaultNotificationType,
1836
+ taskOperationShiftedNodeList,
1837
+ isCanPreAddSign
1838
+ }
1839
+ } = res;
1840
+ if (opinion) {
1841
+ that.form.opinion = opinion;
1842
+ }
1843
+ if (that.typeCode == 'endFlow') {
1844
+ that.$toast.clear();
1845
+ that.showFlowBtn = true;
1846
+ that.processObj = res.data;
1847
+ that.nodeDefaultSubmitOpinion =
1848
+ nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
1849
+ return;
1850
+ }
1851
+ if (
1852
+ currentOrgSelectorParams &&
1853
+ currentOrgSelectorParams.enableCurrentOrgConfig == 'true'
1854
+ ) {
1855
+ that.currentOrgSelectorTabs =
1856
+ currentOrgSelectorParams.currentOrgType.split(',');
1857
+ let currentOrgparams =
1858
+ currentOrgSelectorParams.currentOrgRange.split(',');
1859
+ that.currentOrgSelectorTabs.map((x, i) => {
1860
+ that.currentOrgSelectorParams[x] = {
1861
+ pid:
1862
+ currentOrgparams[i] == 'my'
1863
+ ? choiceOrgId
1864
+ : currentOrgparams[i],
1865
+ only_filid: true,
1866
+ onlyMyOrg: true
1867
+ };
1868
+ });
1869
+ that.currentOrgSelectorTabs =
1870
+ that.currentOrgSelectorTabs.join(',');
1871
+ }
1872
+ if (
1873
+ currentOrgSelectorParams &&
1874
+ currentOrgSelectorParams.enableForeignOrgConfig == 'true'
1875
+ ) {
1876
+ that.foreignOrgSelectorTabs =
1877
+ currentOrgSelectorParams.foreignOrgType.split(',');
1878
+ let foreignOrgparams =
1879
+ currentOrgSelectorParams.foreignOrgRange.split(',');
1880
+ that.foreignOrgSelectorTabs.map((x, i) => {
1881
+ that.foreignOrgSelectorParams[x] = {
1882
+ pid:
1883
+ foreignOrgparams[i] == 'my'
1884
+ ? choiceOrgId
1885
+ : foreignOrgparams[i] == 'other' ||
1886
+ foreignOrgparams[i] == 'nofilidorg'
1887
+ ? 'root'
1888
+ : foreignOrgparams[i],
1889
+ nofilid:
1890
+ foreignOrgparams[i] == 'nofilidorg'
1891
+ ? that.orgId || JSON.parse($.getStorage('userInfo')).orgId
1892
+ : foreignOrgparams[i] == 'other'
1893
+ ? 1
1894
+ : 0,
1895
+ myUserid: x == 'filgroup' ? $.getStorage('userId') : '',
1896
+ ...that.selectorParams
1897
+ };
1898
+ });
1899
+ that.foreignOrgSelectorTabs =
1900
+ that.foreignOrgSelectorTabs.join(',');
1901
+ } else if (isChoiceOtherOrgDept == 'true') {
1902
+ that.foreignOrgSelectorTabs = 'enterprise,department';
1903
+ that.foreignOrgSelectorParams.pid = 'root';
1904
+ that.foreignOrgSelectorParams.nofilid = 1;
1905
+ that.foreignOrgSelectorParams = {
1906
+ ...that.foreignOrgSelectorParams,
1907
+ ...that.selectorParams
1908
+ };
1909
+ console.log(that.foreignOrgSelectorParams, 1);
1910
+ } else {
1911
+ that.foreignOrgSelectorTabs = 'enterprise';
1912
+ that.foreignOrgSelectorParams.pid = 'root';
1913
+ that.foreignOrgSelectorParams.nofilid = 1;
1914
+ that.foreignOrgSelectorParams = {
1915
+ ...that.foreignOrgSelectorParams,
1916
+ ...that.selectorParams
1917
+ };
1918
+ console.log(that.foreignOrgSelectorParams, 2);
1919
+ }
1920
+ if (
1921
+ taskOperationShiftedNodeList &&
1922
+ taskOperationShiftedNodeList.length > 0
1923
+ ) {
1924
+ that.taskOperationShiftedNodeList = [];
1925
+ taskOperationShiftedNodeList.map((x) => {
1926
+ that.taskOperationShiftedNodeList.push(x.nodeId);
1927
+ that.taskOperations.push({
1928
+ key: x.nodeId,
1929
+ value: x.nodeName,
1930
+ isNextNode: true,
1931
+ nextOperate: x.nextOperate
1932
+ });
1933
+ });
1934
+ }
1935
+ that.pendingItemHandleDescription = pendingItemHandleDescription;
1936
+ nextNodeCheckType && (that.nextNodeCheckType = nextNodeCheckType);
1937
+ that.customPresetHintMessage = customPresetHintMessage;
1938
+ that.currentOrgName = currentOrgName;
1939
+ that.notificationMessageReadOnly =
1940
+ notificationMessageReadOnly == 'true';
1941
+ that.readOnlyNotificationType = readOnlyNotificationType;
1942
+ that.isCanPreAddSign = isCanPreAddSign;
1943
+ that.otherOrgName = otherOrgName;
1944
+ that.taskExamineInfo = taskExamine;
1945
+ that.form.isReturnSubmitter = taskExamine.isReturnSubmitter;
1946
+ that.form.isUndertakeReply = taskExamine.isUndertakeReply;
1947
+ that.form.isTakeAdviceReply = taskExamine.isTakeAdviceReply;
1948
+ that.form.isUndertakeEnd = taskExamine.isUndertakeEnd;
1949
+ that.form.isTakeAdviceEnd = taskExamine.isTakeAdviceEnd;
1950
+ that.form.isReadDealReply = taskExamine.isReadDealReply;
1951
+ that.form.isReadDealEnd = taskExamine.isReadDealEnd;
1952
+ that.form.isReturnRejectNode = taskExamine.isReturnRejectNode;
1953
+ that.form.isSerialSubmit = taskExamine.isSerialSubmit;
1954
+ that.form.notificationMsg = defaultNotificationMessage;
1955
+ defaultNotificationType &&
1956
+ !that.hideMessage &&
1957
+ (that.defaultNotificationType =
1958
+ defaultNotificationType.split(','));
1959
+ that.nodeInfoMapInfo = nodeInfoMap;
1960
+ that.defaultNextNode = nodeInfoMap.nodeExtAttr.defaultNextNode;
1961
+ that.opinionHandleExplainText =
1962
+ nodeInfoMap.nodeExtAttr.opinionHandleExplainText;
1963
+ that.isCanAddSign = res.data.isCanAddSign;
1964
+ if (that.isCanAddSign) {
1965
+ that.form.isAddSign = '2';
1966
+ }
1967
+ that.isCanRemoveSign = res.data.isCanRemoveSign;
1968
+ if (that.isCanRemoveSign) {
1969
+ that.form.isRemoveSign = '2';
1970
+ }
1971
+ that.isSpecial = res.data.isSpecial;
1972
+ that.processObj = res.data;
1973
+ that.taskOperations = [
1974
+ ...res.data.taskOperations,
1975
+ ...that.taskOperations
1976
+ ];
1977
+ let isSelected = false;
1978
+ let isSelectIndex = 0;
1979
+ if (that.taskOperations && that.taskOperations.length > 0) {
1980
+ that.taskOperations.map((item, index) => {
1981
+ if (item.isSelected || that.taskOperations.length == 1) {
1982
+ isSelected = true;
1983
+ isSelectIndex = index;
1984
+ if (that.taskOperations.length == 1) {
1985
+ if (that.taskOperations[0].isNextNode) {
1986
+ that.form.nextOperate =
1987
+ that.taskOperations[0].nextOperate;
1988
+ } else {
1989
+ that.form.nextOperate = that.taskOperations[0].key;
1990
+ }
1991
+ that.form.nextOperateName = that.taskOperations[0].value;
1992
+ if (
1993
+ (!that.taskOperations[0].taskNodeList ||
1994
+ that.taskOperations[0].taskNodeList.length === 0) &&
1995
+ !that.taskOperations[0].isNextNode
1996
+ ) {
1997
+ that.form.nextNodeId = undefined;
1998
+ that.form.nextNodeName = undefined;
1999
+ } else if (that.taskOperations[0].isNextNode) {
2000
+ that.form.nextNodeId = that.taskOperations[0].key;
2001
+ that.form.nextNodeName = that.taskOperations[0].value;
2002
+ } else {
2003
+ that.nodeList = that.taskOperations[0].taskNodeList;
2004
+ let info = [];
2005
+ that.nodeList.map((x) => {
2006
+ if (
2007
+ x.nodeId === nodeInfoMap.nodeExtAttr.defaultNextNode
2008
+ ) {
2009
+ info.push(x);
2010
+ that.nextNodeDefault =
2011
+ nodeInfoMap.nodeExtAttr.defaultNextNode;
2012
+ }
2013
+ });
2014
+ if (info.length == 0 && that.nodeList.length != 0)
2015
+ info = [that.nodeList[0]];
2016
+ if (info.length > 0) {
2017
+ that.form.nextNodeId = info[0].nodeId;
2018
+ that.form.nextNodeName = info[0].nodeName;
2019
+ }
2020
+ // that.form.nextNodeId = that.nodeList[0].nodeId;
2021
+ // that.form.nextNodeName = that.nodeList[0].nodeName;
2022
+ }
2023
+ } else {
2024
+ that.form.nextOperate = item.key;
2025
+ that.form.nextOperateName = item.value;
2026
+ if (!item.taskNodeList || item.taskNodeList.length === 0) {
2027
+ that.form.nextNodeId = undefined;
2028
+ that.form.nextNodeName = undefined;
2029
+ } else {
2030
+ that.nodeList = item.taskNodeList;
2031
+ let info = [];
2032
+ that.nodeList.map((x, y) => {
2033
+ if (
2034
+ x.nodeId === nodeInfoMap.nodeExtAttr.defaultNextNode
2035
+ ) {
2036
+ info.push(x);
2037
+ that.nextNodeDefault =
2038
+ nodeInfoMap.nodeExtAttr.defaultNextNode;
2039
+ }
2040
+ });
2041
+ if (info.length == 0 && that.nodeList.length != 0)
2042
+ info = [that.nodeList[0]];
2043
+ if (info.length > 0) {
2044
+ that.form.nextNodeId = info[0].nodeId;
2045
+ that.form.nextNodeName = info[0].nodeName;
2046
+ }
2047
+ // that.form.nextNodeId = that.nodeList[0].nodeId;
2048
+ // that.form.nextNodeName = that.nodeList[0].nodeName;
2049
+ }
2050
+ }
2051
+ if (item.key == 9) {
2052
+ that.isReject = true;
2053
+ }
2054
+ }
2055
+ });
2056
+
2057
+ if (!isSelected) {
2058
+ that.form.nextOperate = that.taskOperations[0].key;
2059
+ that.form.nextOperateName = that.taskOperations[0].value;
2060
+ that.nodeList = that.taskOperations[0].taskNodeList || [];
2061
+ if (that.nodeList && that.nodeList.length > 0) {
2062
+ that.form.nextNodeId = that.nodeList[0].nodeId;
2063
+ that.form.nextNodeName = that.nodeList[0].nodeName;
2064
+ }
2065
+ }
2066
+ that.tagKey = that.form.nextOperate;
2067
+ }
2068
+ that.changeNextOperate(
2069
+ {
2070
+ value: that.form.nextOperateName,
2071
+ key: that.taskOperations[isSelectIndex].key,
2072
+ nextOperate: that.taskOperations[isSelectIndex].nextOperate,
2073
+ isNextNode: that.taskOperations[isSelectIndex].isNextNode,
2074
+ taskNodeList: that.nodeList
2075
+ },
2076
+ true
2077
+ );
2078
+ if (nodeInfoMap && JSON.stringify(nodeInfoMap) != '{}') {
2079
+ that.needRetrialAuth =
2080
+ !!nodeInfoMap.nodeExtAttr.isCurrentNodeSubmitNeedRetrialAuth;
2081
+ if (nodeInfoMap.nodeExtAttr.nodeFixedOpinionSelectList) {
2082
+ let notice = JSON.parse(
2083
+ nodeInfoMap.nodeExtAttr.nodeFixedOpinionSelectList
2084
+ );
2085
+ notice.map((x) => {
2086
+ that.nodeFixedOpinionSelectList.push({ content: x });
2087
+ });
2088
+ }
2089
+
2090
+ that.isHiddenOftenOpinion =
2091
+ nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
2092
+ that.nodeDefaultSubmitOpinion =
2093
+ nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
2094
+ that.isSubmitButtonShowAgreeAndDisagree =
2095
+ nodeInfoMap.nodeExtAttr.isSubmitButtonShowAgreeAndDisagree;
2096
+ that.isOpinionRequired =
2097
+ nodeInfoMap.nodeExtAttr.isOpinionRequired;
2098
+ // that.isChooseNextNode = nodeInfoMap.nodeExtAttr.isChooseNextNode;
2099
+ that.isBanInputOpinion =
2100
+ nodeInfoMap.nodeExtAttr.isBanInputOpinion;
2101
+ that.isForceDisplayDefaultOptionForPrefix =
2102
+ nodeInfoMap.nodeExtAttr.isForceDisplayDefaultOptionForPrefix ==
2103
+ 1;
2104
+ }
2105
+ that.choiceOrgId = choiceOrgId;
2106
+ that.choiceDeptId = choiceDeptId;
2107
+ that.pOrgId = pOrgId;
2108
+ that.isEndUserTask = res.data.isEndUserTask;
2109
+ if (!that.isOpinionRequired) {
2110
+ that.isOpinionRequired = 0;
2111
+ }
2112
+ if (!that.isBanInputOpinion) {
2113
+ that.isBanInputOpinion = 0;
2114
+ }
2115
+ // that.countersignaturetypeText = res.data.taskExamine.nodeName
2116
+ if (res.data.taskExamine) {
2117
+ that.countersignaturetypeText = res.data.taskExamine.nodeName;
2118
+ }
2119
+ that.countersignaturetypeCode =
2120
+ res.data.countersignaturetypeCode !== 0 &&
2121
+ res.data.countersignaturetypeCode != undefined
2122
+ ? true
2123
+ : false;
2124
+ that.isMainSubProcess = res.data.isMainSubProcess == 'true';
2125
+ that.isCustomPreset = res.data.isCustomPreset;
2126
+ // form.isRemoveSign !== '1' &&
2127
+ // form.isAddSign !== '1' &&
2128
+ // nodeList &&
2129
+ // nodeList.length > 0 &&
2130
+ // isHiddenNextStepInfo
2131
+ resolve();
2132
+ } else {
2133
+ that.$toast(res.message);
2134
+ setTimeout(() => {
2135
+ // that.navigateBack();
2136
+ that.$parent.$emit('error');
2137
+ }, 1000);
2138
+ reiect();
2139
+ }
2140
+ });
2141
+ });
2142
+ },
2143
+ getToStartTaskReadIndex() {
2144
+ request({
2145
+ url: this.baseUrl
2146
+ ? this.baseUrl + toStartTaskReadHtml
2147
+ : toStartTaskReadHtml,
2148
+ params: { pendingId: this.pendingId, userId: this.userId }
2149
+ })
2150
+ .then((res) => {
2151
+ const {
2152
+ status,
2153
+ message,
2154
+ data: {
2155
+ isCanFenyue,
2156
+ taskExamine,
2157
+ taskReadOpinionRequired,
2158
+ submitButtonName
2159
+ }
2160
+ } = res;
2161
+ this.showFlowBtn = true;
2162
+ if (status === 'success') {
2163
+ this.taskExamineInfo = taskExamine;
2164
+ this.isCanFenyue = isCanFenyue == 1;
2165
+ this.taskReadOpinionRequired = taskReadOpinionRequired == 'true';
2166
+ // if (this.nodeName) {
2167
+ this.processObj.taskExamine.nodeName = '分阅';
2168
+ this.submitButtonName = submitButtonName;
2169
+ // }
2170
+ } else {
2171
+ this.$toast(message || '系统错误,请联系管理员!');
2172
+ }
2173
+ this.$toast.clear();
2174
+ })
2175
+ .catch((err) => {
2176
+ this.$toast.clear();
2177
+
2178
+ this.showFlowBtn = true;
2179
+ if (err.message && err.message !== 'canceled') {
2180
+ this.$toast(err.message);
2181
+ }
2182
+ });
2183
+ },
2184
+ // 获取节点信息(获取节点属性及办理人)
2185
+ getNodeObj(res) {
2186
+ const _that = this;
2187
+ request({
2188
+ url: _that.baseUrl ? _that.baseUrl + getNodeInfoHtml : getNodeInfoHtml,
2189
+ params: {
2190
+ processDefinitionId: this.processObj.taskExamine.processDefinitionId,
2191
+ nextNodeId: res,
2192
+ taskId: this.processObj.taskExamine.taskId,
2193
+ pendingId: this.pendingId,
2194
+ businessId: this.taskExamineInfo.businessId,
2195
+ userId: _that.userId
2196
+ }
2197
+ }).then((res) => {
2198
+ this.$toast.clear();
2199
+ this.showFlowBtn = true;
2200
+ if (res.status == 'success') {
2201
+ _that.isCurrentNodeForbiddenChangeCandidate =
2202
+ res.data.nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
2203
+ _that.currentNodeEnableItemHandleDescription =
2204
+ res.data.nodeExtAttr.currentNodeEnableItemHandleDescription == 1;
2205
+ _that.deptRoleCode = res.data.nodeExtAttr.deptRoleCode;
2206
+ _that.enableCustomLimitTimeSetting =
2207
+ res.data.nodeExtAttr.enableCustomLimitTimeSetting == 1;
2208
+ if (
2209
+ _that.enableCustomLimitTimeSetting &&
2210
+ res.data.nodeMoreInfo &&
2211
+ res.data.nodeMoreInfo.defaultCustomLimitDays
2212
+ ) {
2213
+ _that.form.customLimitTime =
2214
+ res.data.nodeMoreInfo.defaultCustomLimitDays + '';
2215
+ }
2216
+ if (
2217
+ res.data.nodeMoreInfo &&
2218
+ res.data.nodeMoreInfo
2219
+ .chooseCurrentOrgUserCandidateNeedForbiddenSubDept === true
2220
+ ) {
2221
+ _that.onlyMyOrg = true;
2222
+ }
2223
+ res.data.otherOrgDisabledObjId &&
2224
+ (this.otherOrgDisabledObjId =
2225
+ res.data.otherOrgDisabledObjId.split(','));
2226
+ res.data.currentOrgDisabledObjId &&
2227
+ (this.currentOrgDisabledObjId =
2228
+ res.data.currentOrgDisabledObjId.split(','));
2229
+ this.appointNotUserIds = res.data.appointNotUserIds;
2230
+ this.handleRoleId = res.data.handleRoleId;
2231
+ this.nextRole = res.data.nextRole;
2232
+ this.filterCandinateIds = res.data.nodeExtAttr.filterCandinateIds;
2233
+ this.selectorDefShowDeptId =
2234
+ res.data.nodeExtAttr.selectorDefShowDeptId;
2235
+ this.userSelectionType = res.data.nodeExtAttr.userSelectionType;
2236
+ // this.changePidObjtype();
2237
+ this.orgSelectionType = res.data.nodeExtAttr.orgSelectionType;
2238
+ this.notificationType = res.data.nodeExtAttr.notificationType;
2239
+ this.nodeType = res.data.nodeExtAttr.nodeType;
2240
+ this.deptRoleCode = res.data.nodeExtAttr.deptRoleCode;
2241
+ this.orgRoleCode = res.data.nodeExtAttr.orgRoleCode;
2242
+ this.isCustomUser = res.data.nodeExtAttr.isCustomUser;
2243
+ this.presetEdit = res.data.nodeExtAttr.presetEdit;
2244
+ this.isLimitedTimeHandling =
2245
+ res.data.nodeExtAttr.isLimitedTimeHandling;
2246
+ this.peopleObj = res.data.nodeExtAttr;
2247
+ this.nextUserList = res.data.nextUserList.filter(
2248
+ (x) => x.userId && x.username
2249
+ );
2250
+ let _this = this;
2251
+ this.nextUserList.map((r) => {
2252
+ _this.$set(r, 'checked', false);
2253
+ });
2254
+ _that.currentOrgSelectorParams.roleid = _that.deptRoleCode;
2255
+ this.isHandleExplain =
2256
+ res.data.nodeExtAttr.isHandleExplain == 1 ? true : false; //判断是否隐藏办理说明
2257
+ this.isCustomUserClick =
2258
+ res.data.nodeExtAttr.isCustomUser == 1 ? true : false; // 判断办理人是否可点击显示弹框
2259
+ this.isTaskread = res.data.nodeExtAttr.isTaskread == 1 ? true : false; // 判断是否显示分阅
2260
+ this.countersignaturetypeCode =
2261
+ res.data.countersignaturetypeCode !== 0 ? true : false; //判断是否隐藏处理方式
2262
+ this.countersignaturetypeText = res.data.countersignaturetypeText;
2263
+ //如果当前为承办节点/会签节点,则展示本单位外单位办理人选择
2264
+ if (this.nodeType === 1 || this.nodeType === 2) {
2265
+ this.isMainSubProcess === true
2266
+ ? (this.isNodeShowProcess = true)
2267
+ : (this.isNodeShowProcess = false);
2268
+ this.isMainSubProcess === true
2269
+ ? (this.isMainSubProcess = true)
2270
+ : (this.isMainSubProcess = false);
2271
+ this.isNextUser = false;
2272
+ this.isHideCurrentOrg =
2273
+ res.data.nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
2274
+ this.isHideOtherOrg =
2275
+ res.data.nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
2276
+ } else {
2277
+ this.isHideCurrentOrg = false;
2278
+ this.isHideOtherOrg = false;
2279
+ this.isMainSubProcess = false;
2280
+ this.isNodeShowProcess = false;
2281
+ this.isNextUser = true;
2282
+ // this.isMainSubProcess === true
2283
+ // ? (this.isMainSubProcess = true)
2284
+ // : (this.isMainSubProcess = false);
2285
+ }
2286
+ // userSelectionType 机构内单选人1,机构内多选人2,所有机构单选人3,所有部门多选人4,本部门单选人5,本部门多选人6,本单位单选部门7,本单位多选部门8,单选单位9,多选单位10,单选机构11,多选机构12,本部门角色13,本单位角色14
2287
+ this.userSelectionType == 2 ||
2288
+ this.userSelectionType == 4 ||
2289
+ this.userSelectionType == 6 ||
2290
+ this.userSelectionType == 8 ||
2291
+ this.userSelectionType == 10 ||
2292
+ this.userSelectionType == 11 ||
2293
+ this.userSelectionType == 12
2294
+ ? (this.isRadio = false)
2295
+ : (this.isRadio = true); //判断办理人单选多选
2296
+
2297
+ if (
2298
+ this.userSelectionType == 7 ||
2299
+ this.userSelectionType == 8 ||
2300
+ this.userSelectionType == 9 ||
2301
+ this.userSelectionType == 10 ||
2302
+ this.userSelectionType == 11 ||
2303
+ this.userSelectionType == 12
2304
+ ) {
2305
+ this.isDealObject = true;
2306
+ this.isNextUser = false;
2307
+ }
2308
+ if (this.userSelectionType == 13 || this.userSelectionType == 14) {
2309
+ this.isNextUser = false;
2310
+ this.isDealObject = false;
2311
+ this.isDealRole = true;
2312
+ this.nextUserflag = true;
2313
+ }
2314
+ this.isHiddenNextStepInfo =
2315
+ res.data.nodeExtAttr.isHiddenNextStepInfo == 1 && this.nextUserflag
2316
+ ? true
2317
+ : false; // 判断是否隐藏下一步节点信息和接收人信息
2318
+ if (res.data.globalNodeType === 'endEvent') {
2319
+ this.isNextUser = false;
2320
+ _that.endFlow = true;
2321
+ this.form.nextUserId = '流程办结';
2322
+ } else {
2323
+ this.nodeType != 1 &&
2324
+ this.nodeType != 2 &&
2325
+ (this.isNextUser = true); //判断是否是流程办结 办结下步办理人不显示
2326
+ }
2327
+ this.changeDefPeople(
2328
+ res.data.nodeExtAttr.isDefSelectedObj,
2329
+ res.data.nodeExtAttr.isSelectedAllObj
2330
+ );
2331
+ this.changePidObjtype(
2332
+ res.data.nodeExtAttr.userSelectionType,
2333
+ this.choiceOrgId,
2334
+ this.choiceDeptId,
2335
+ this.pOrgId
2336
+ );
2337
+ } else {
2338
+ this.$toast(res.message);
2339
+ }
2340
+ });
2341
+ },
2342
+ // 修改默认办理人
2343
+ changeDefPeople(def, all) {
2344
+ this.nextUserSelectList = [];
2345
+ if ((def == 1 && all == 1) || (def == 0 && all == 1)) {
2346
+ let ids = '';
2347
+ this.nextUserList.map((r, i) => {
2348
+ r.showid = r.userId;
2349
+ r.showname = r.username;
2350
+ this.$set(r, 'checked', true);
2351
+ this.nextUserSelectList.push(r);
2352
+ ids += r.userId + (i === this.nextUserList.length - 1 ? '' : ',');
2353
+ });
2354
+ this.form.nextUserId = ids;
2355
+ } else if (
2356
+ def == 1 &&
2357
+ (!all || all == 0) &&
2358
+ this.nextUserList.length > 0
2359
+ ) {
2360
+ this.nextUserList[0].showid = this.nextUserList[0].userId;
2361
+ this.nextUserList[0].showname = this.nextUserList[0].username;
2362
+ this.$set(this.nextUserList[0], 'checked', true);
2363
+ this.nextUserSelectList.push(this.nextUserList[0]);
2364
+ this.form.nextUserId = this.nextUserSelectList[0].userId;
2365
+ }
2366
+ },
2367
+ // 根据返回的办理人类型来判断 选择人员树的范围
2368
+ changePidObjtype(val, choiceOrgId, choiceDeptId, pOrgId) {
2369
+ if (val === 1 || val === 2) {
2370
+ this.pid = choiceOrgId || this.orgId;
2371
+ this.objType = 'enterprise';
2372
+ this.selectType = 'employee';
2373
+ } else if (this.userSelectionType === 3 || this.userSelectionType === 4) {
2374
+ this.pid = 'root';
2375
+ this.objType = 'employee';
2376
+ } else if (this.userSelectionType === 5 || this.userSelectionType === 6) {
2377
+ this.pid = choiceDeptId || this.depId;
2378
+ this.objType = 'department';
2379
+ } else if (
2380
+ this.userSelectionType === 11 ||
2381
+ this.userSelectionType === 12
2382
+ ) {
2383
+ this.selectType = 'employee';
2384
+ this.objType = 'enterprise';
2385
+ } else if (this.userSelectionType === 13) {
2386
+ this.pid = choiceDeptId || this.depId;
2387
+ this.selectType = 'employee';
2388
+ this.objType = 'department';
2389
+ } else if (this.userSelectionType === 14) {
2390
+ this.pid = pOrgId || this.orgId;
2391
+ this.selectType = 'employee';
2392
+ } else if (
2393
+ this.userSelectionType === 15 ||
2394
+ this.userSelectionType === 16
2395
+ ) {
2396
+ this.pid = pOrgId || this.orgId;
2397
+ this.selectType = 'employee';
2398
+ }
2399
+ }
2400
+ }
2401
+ };
2402
+ </script>
2403
+
2404
+ <style></style>