eoss-ui 0.6.65 → 0.6.66

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 (223) hide show
  1. package/lib/calogin.js +204 -204
  2. package/lib/eoss-ui.common.js +765 -747
  3. package/lib/flow-list.js +81 -81
  4. package/lib/flow.js +311 -296
  5. package/lib/form.js +13 -10
  6. package/lib/index.js +1 -1
  7. package/lib/main.js +132 -132
  8. package/lib/qr-code.js +13 -13
  9. package/package.json +160 -160
  10. package/packages/button/index.js +5 -5
  11. package/packages/button/src/main.vue +418 -418
  12. package/packages/button-group/index.js +5 -5
  13. package/packages/button-group/src/main.vue +298 -298
  14. package/packages/calendar/index.js +5 -5
  15. package/packages/calogin/index.js +5 -5
  16. package/packages/calogin/src/main.vue +131 -131
  17. package/packages/calogin/src/plugin.js +748 -748
  18. package/packages/card/index.js +5 -5
  19. package/packages/card/src/main.vue +156 -156
  20. package/packages/cascader/index.js +5 -5
  21. package/packages/cascader/src/main.vue +168 -168
  22. package/packages/checkbox-group/index.js +5 -5
  23. package/packages/checkbox-group/src/main.vue +333 -333
  24. package/packages/clients/index.js +5 -5
  25. package/packages/clients/src/main.vue +151 -151
  26. package/packages/data-table/index.js +5 -5
  27. package/packages/data-table/src/children.vue +39 -39
  28. package/packages/data-table/src/column.vue +989 -989
  29. package/packages/data-table/src/main.vue +1822 -1822
  30. package/packages/data-table/src/sizer.vue +195 -195
  31. package/packages/data-table-form/index.js +5 -5
  32. package/packages/data-table-form/src/checkbox.vue +101 -101
  33. package/packages/data-table-form/src/colgroup.vue +17 -17
  34. package/packages/data-table-form/src/main.vue +181 -181
  35. package/packages/data-table-form/src/radio.vue +65 -65
  36. package/packages/data-table-form/src/table.vue +233 -233
  37. package/packages/data-table-form/src/tbody.vue +336 -336
  38. package/packages/data-table-form/src/thead.vue +68 -68
  39. package/packages/date-picker/index.js +5 -5
  40. package/packages/date-picker/src/main.vue +236 -236
  41. package/packages/dialog/index.js +5 -5
  42. package/packages/enable-drag/index.js +5 -5
  43. package/packages/enterprise/index.js +5 -5
  44. package/packages/enterprise/src/main.vue +66 -66
  45. package/packages/error-page/index.js +5 -5
  46. package/packages/error-page/src/main.vue +44 -44
  47. package/packages/flow/index.js +5 -5
  48. package/packages/flow/src/component/Circulate.vue +346 -332
  49. package/packages/flow/src/component/CommonOpinions.vue +346 -346
  50. package/packages/flow/src/component/CustomPreset.vue +322 -322
  51. package/packages/flow/src/component/FileList.vue +99 -99
  52. package/packages/flow/src/component/Preset.vue +255 -255
  53. package/packages/flow/src/component/SendMsg.vue +241 -241
  54. package/packages/flow/src/component/TimeLimit.vue +190 -190
  55. package/packages/flow/src/component/taskUnionExamine.vue +619 -619
  56. package/packages/flow/src/form.vue +121 -121
  57. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  58. package/packages/flow/src/main.vue +3361 -3359
  59. package/packages/flow/src/processForm.vue +1091 -1091
  60. package/packages/flow/src/processReject.vue +294 -294
  61. package/packages/flow/src/reset.vue +900 -900
  62. package/packages/flow/src/startTaskRead.vue +659 -659
  63. package/packages/flow/src/supervise.vue +149 -149
  64. package/packages/flow/src/table.vue +58 -58
  65. package/packages/flow-group/index.js +5 -5
  66. package/packages/flow-group/src/main.vue +688 -688
  67. package/packages/flow-list/index.js +5 -5
  68. package/packages/flow-list/src/main.vue +1750 -1750
  69. package/packages/form/index.js +5 -5
  70. package/packages/form/src/main.vue +3581 -3581
  71. package/packages/form/src/table.vue +1426 -1426
  72. package/packages/handle-user/index.js +5 -5
  73. package/packages/handle-user/src/main.vue +138 -138
  74. package/packages/handler/index.js +5 -5
  75. package/packages/handler/src/main.vue +493 -493
  76. package/packages/icon/index.js +5 -5
  77. package/packages/icon/src/main.vue +101 -101
  78. package/packages/icons/index.js +5 -5
  79. package/packages/icons/src/main.vue +81 -81
  80. package/packages/input/index.js +5 -5
  81. package/packages/input/src/main.vue +356 -356
  82. package/packages/input-number/index.js +5 -5
  83. package/packages/input-number/src/main.vue +106 -106
  84. package/packages/label/index.js +5 -5
  85. package/packages/label/src/main.vue +457 -457
  86. package/packages/layout/index.js +5 -5
  87. package/packages/layout/src/item.vue +152 -152
  88. package/packages/layout/src/main.vue +31 -31
  89. package/packages/login/index.js +5 -5
  90. package/packages/login/src/main.vue +1988 -1988
  91. package/packages/login/src/resetPassword.vue +562 -562
  92. package/packages/main/index.js +5 -5
  93. package/packages/main/src/default/message.vue +249 -249
  94. package/packages/main/src/default/notice.vue +157 -157
  95. package/packages/main/src/default/userinfo.vue +503 -503
  96. package/packages/main/src/public/online.vue +89 -89
  97. package/packages/main/src/public/search.vue +462 -462
  98. package/packages/main/src/public/settings.vue +221 -221
  99. package/packages/main/src/simplicity/apps.vue +388 -388
  100. package/packages/main/src/simplicity/avatar.vue +83 -83
  101. package/packages/main/src/simplicity/handler.vue +259 -259
  102. package/packages/main/src/simplicity/index.vue +2089 -2089
  103. package/packages/main/src/simplicity/lists.vue +84 -84
  104. package/packages/main/src/simplicity/menu-list.vue +135 -135
  105. package/packages/main/src/simplicity/message.vue +259 -259
  106. package/packages/main/src/simplicity/notice.vue +190 -190
  107. package/packages/main/src/simplicity/router-page.vue +45 -45
  108. package/packages/main/src/simplicity/sub-menu.vue +264 -264
  109. package/packages/main/src/simplicity/user.vue +257 -257
  110. package/packages/main/src/simplicity/userinfo.vue +312 -312
  111. package/packages/menu/index.js +5 -5
  112. package/packages/menu/src/main.vue +584 -584
  113. package/packages/nav/index.js +5 -5
  114. package/packages/nav/src/main.vue +351 -351
  115. package/packages/notify/index.js +5 -5
  116. package/packages/notify/src/main.vue +538 -538
  117. package/packages/page/index.js +5 -5
  118. package/packages/page/src/main.vue +167 -167
  119. package/packages/pagination/index.js +5 -5
  120. package/packages/pagination/src/main.vue +96 -96
  121. package/packages/player/index.js +5 -5
  122. package/packages/player/src/main.vue +194 -194
  123. package/packages/qr-code/index.js +5 -5
  124. package/packages/qr-code/src/main.vue +170 -170
  125. package/packages/radio-group/index.js +6 -6
  126. package/packages/radio-group/src/main.vue +319 -319
  127. package/packages/retrial-auth/index.js +5 -5
  128. package/packages/retrial-auth/src/main.vue +280 -280
  129. package/packages/select/index.js +5 -5
  130. package/packages/select/src/main.vue +778 -778
  131. package/packages/select-ganged/index.js +5 -5
  132. package/packages/select-ganged/src/main.vue +724 -724
  133. package/packages/selector/index.js +5 -5
  134. package/packages/selector/src/main.vue +687 -687
  135. package/packages/selector-panel/index.js +5 -5
  136. package/packages/selector-panel/src/main.vue +1027 -1027
  137. package/packages/selector-panel/src/selection.vue +177 -177
  138. package/packages/selector-panel/src/tree.vue +129 -129
  139. package/packages/sizer/index.js +5 -5
  140. package/packages/sizer/src/main.vue +254 -254
  141. package/packages/steps/index.js +5 -5
  142. package/packages/steps/src/main.vue +181 -181
  143. package/packages/switch/index.js +5 -5
  144. package/packages/switch/src/main.vue +154 -154
  145. package/packages/table-form/index.js +5 -5
  146. package/packages/tabs/index.js +5 -5
  147. package/packages/tabs/src/main.vue +788 -788
  148. package/packages/tabs-panel/index.js +5 -5
  149. package/packages/tabs-panel/src/main.vue +29 -29
  150. package/packages/theme-chalk/src/base.scss +261 -261
  151. package/packages/theme-chalk/src/button-group.scss +176 -176
  152. package/packages/theme-chalk/src/button.scss +24 -24
  153. package/packages/theme-chalk/src/calendar.scss +113 -113
  154. package/packages/theme-chalk/src/card.scss +99 -99
  155. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  156. package/packages/theme-chalk/src/clients.scss +87 -87
  157. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  158. package/packages/theme-chalk/src/data-table.scss +293 -293
  159. package/packages/theme-chalk/src/date-picker.scss +7 -7
  160. package/packages/theme-chalk/src/dialog.scss +77 -77
  161. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  162. package/packages/theme-chalk/src/enterprise.scss +5 -5
  163. package/packages/theme-chalk/src/error-page.scss +18 -18
  164. package/packages/theme-chalk/src/flow-group.scss +110 -110
  165. package/packages/theme-chalk/src/flow-list.scss +39 -39
  166. package/packages/theme-chalk/src/flow.scss +343 -343
  167. package/packages/theme-chalk/src/form.scss +496 -496
  168. package/packages/theme-chalk/src/handle-user.scss +40 -40
  169. package/packages/theme-chalk/src/handler.scss +143 -143
  170. package/packages/theme-chalk/src/icon.scss +1792 -1792
  171. package/packages/theme-chalk/src/icons.scss +99 -99
  172. package/packages/theme-chalk/src/input.scss +9 -9
  173. package/packages/theme-chalk/src/label.scss +24 -24
  174. package/packages/theme-chalk/src/layout.scss +46 -46
  175. package/packages/theme-chalk/src/login.scss +981 -981
  176. package/packages/theme-chalk/src/main.scss +663 -663
  177. package/packages/theme-chalk/src/menu.scss +222 -222
  178. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  179. package/packages/theme-chalk/src/nav.scss +111 -111
  180. package/packages/theme-chalk/src/page.scss +3 -3
  181. package/packages/theme-chalk/src/pagination.scss +29 -29
  182. package/packages/theme-chalk/src/player.scss +9 -9
  183. package/packages/theme-chalk/src/qr-code.scss +17 -17
  184. package/packages/theme-chalk/src/radio-group.scss +9 -9
  185. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  186. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  187. package/packages/theme-chalk/src/select.scss +8 -8
  188. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  189. package/packages/theme-chalk/src/selector.scss +91 -91
  190. package/packages/theme-chalk/src/simplicity.scss +1355 -1355
  191. package/packages/theme-chalk/src/sizer.scss +36 -36
  192. package/packages/theme-chalk/src/steps.scss +88 -88
  193. package/packages/theme-chalk/src/switch.scss +3 -3
  194. package/packages/theme-chalk/src/table-form.scss +1 -1
  195. package/packages/theme-chalk/src/tabs.scss +87 -87
  196. package/packages/theme-chalk/src/tips.scss +7 -7
  197. package/packages/theme-chalk/src/toolbar.scss +179 -179
  198. package/packages/theme-chalk/src/tree-group.scss +72 -72
  199. package/packages/theme-chalk/src/tree.scss +165 -165
  200. package/packages/theme-chalk/src/upload.scss +168 -168
  201. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  202. package/packages/tips/index.js +5 -5
  203. package/packages/tips/src/main.vue +141 -141
  204. package/packages/toolbar/index.js +5 -5
  205. package/packages/toolbar/src/main.vue +430 -430
  206. package/packages/tree/index.js +5 -5
  207. package/packages/tree-group/index.js +5 -5
  208. package/packages/upload/index.js +5 -5
  209. package/packages/upload/src/main.vue +1347 -1347
  210. package/packages/upload/src/picture.js +15 -15
  211. package/packages/wujie/index.js +5 -5
  212. package/packages/wujie/src/main.vue +145 -145
  213. package/packages/wxlogin/index.js +5 -5
  214. package/packages/wxlogin/src/main.vue +128 -128
  215. package/src/config/api.js +290 -290
  216. package/src/config/image.js +2 -2
  217. package/src/index.js +1 -1
  218. package/src/utils/bus.js +3 -3
  219. package/src/utils/date-util.js +312 -312
  220. package/src/utils/http.js +50 -50
  221. package/src/utils/rules.js +18 -18
  222. package/src/utils/store.js +21 -21
  223. package/src/utils/webSocket.js +107 -107
@@ -1,659 +1,659 @@
1
- <template>
2
- <div
3
- v-loading="loading"
4
- class="task-read"
5
- element-loading-text="加载中..."
6
- element-loading-spinner="el-icon-loading"
7
- element-loading-background="rgba(255, 255,255, 0.8)"
8
- >
9
- <el-form
10
- ref="nextNode"
11
- :model="nextNode"
12
- class="demo-dynamic"
13
- label-width="110px"
14
- >
15
- <div
16
- :style="`max-height: ${
17
- typeCode ? 'unset' : '290px'
18
- }; overflow-y: auto; margin-bottom: 10px`"
19
- >
20
- <el-form-item
21
- prop="handleExplain"
22
- label="当前步骤"
23
- v-if="type === 'transfer'"
24
- >
25
- <el-input readonly v-model="nextNode.nodeName"></el-input>
26
- </el-form-item>
27
- <el-form-item
28
- v-if="type == 'transfer' && transferInfo.isSinglePage"
29
- prop="handleExplain"
30
- label="意见"
31
- >
32
- <el-input
33
- v-model="nextNode.handleExplain"
34
- placeholder="请填写意见"
35
- ></el-input>
36
- </el-form-item>
37
- <el-form-item
38
- prop="nextUser"
39
- :label="
40
- type === 'transfer'
41
- ? '转办对象'
42
- : configInfo.isCdjxjTaskHandle == 'true'
43
- ? '接收人'
44
- : '办理用户'
45
- "
46
- >
47
- <SelectUser
48
- :nextUser="nextNode.nextUser"
49
- :options="userOptions"
50
- :multiple="type != 'transfer' ? multiple : false"
51
- :mix="type != 'transfer'"
52
- :selectUserList="selectUserList"
53
- :types="
54
- type == 'transfer'
55
- ? ['employee', 'persongroup']
56
- : ['employee', 'enterprise', 'department', 'persongroup']
57
- "
58
- @change="changeSelectUser($event, 'nextUser')"
59
- :tabs="tabs"
60
- :where="{ type: 'user' }"
61
- />
62
- </el-form-item>
63
-
64
- <el-form-item
65
- v-if="configInfo.isCdjxjTaskHandle != 'true' && type != 'transfer'"
66
- prop="cy"
67
- label="常用群组"
68
- ><el-checkbox-group v-model="selectCheck">
69
- <el-checkbox
70
- @change="handleSelectCheck($event, item)"
71
- v-for="item in configInfo.groups"
72
- :label="item.name"
73
- :key="item.id"
74
- >{{ item.name }}</el-checkbox
75
- >
76
- </el-checkbox-group>
77
- </el-form-item>
78
- <el-form-item
79
- v-if="configInfo.fyDoresult == 'true'"
80
- prop="showDoresult"
81
- label="流程意见"
82
- ><el-radio v-model="nextNode.showDoresult" label="0">分阅</el-radio>
83
- <el-radio v-model="nextNode.showDoresult" label="1">不分阅</el-radio>
84
- </el-form-item>
85
- <el-form-item
86
- v-if="configInfo.fyeh == 'true'"
87
- prop="isInHistory"
88
- label="分阅记录"
89
- ><el-radio v-model="nextNode.isInHistory" label="0">记录</el-radio>
90
- <el-radio v-model="nextNode.isInHistory" label="1">不记录</el-radio>
91
- </el-form-item>
92
- <el-form-item
93
- v-if="configInfo.download"
94
- prop="isDownload"
95
- label="打印下载文件"
96
- ><el-radio v-model="nextNode.isDownload" label="0">允许</el-radio>
97
- <el-radio v-model="nextNode.isDownload" label="1">不允许</el-radio>
98
- </el-form-item>
99
- <el-form-item
100
- prop="handleExplain"
101
- :label="configInfo.isCdjxjTaskHandle == 'true' ? '附言' : '办理说明'"
102
- v-if="type != 'transfer'"
103
- >
104
- <el-input
105
- v-model="nextNode.handleExplain"
106
- placeholder="请填写办理说明"
107
- ></el-input>
108
- </el-form-item>
109
- <el-form-item
110
- v-if="configInfo.isCdjxjTaskHandle != 'true'"
111
- prop="noticeType"
112
- label="通知方式"
113
- :rules="[
114
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
115
- ]"
116
- >
117
- <el-checkbox-group
118
- v-model="nextNode.noticeType"
119
- style="display: contents"
120
- >
121
- <el-checkbox
122
- v-for="item of noticeList"
123
- :key="item.cciValue"
124
- :label="item.cciValue"
125
- :disabled="
126
- readOnlyNotificationType
127
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
128
- : false
129
- "
130
- >
131
- {{ item.shortName }}
132
- </el-checkbox>
133
- </el-checkbox-group>
134
- </el-form-item>
135
- <el-form-item
136
- v-show="
137
- nextNode.noticeType.length != 0 &&
138
- configInfo.isCdjxjTaskHandle != 'true'
139
- "
140
- prop="nextNode"
141
- label="通知消息"
142
- >
143
- <es-input
144
- style="
145
- border-color: #ccc;
146
- padding: 5px;
147
- border-radius: 5px;
148
- font-size: 13px;
149
- "
150
- type="textarea"
151
- v-model="newsNoice"
152
- :readonly="notificationMessageReadOnly == 'true'"
153
- />
154
- <!-- <span>{{ newsInfo }}</span> -->
155
- </el-form-item>
156
- </div>
157
- <el-form-item>
158
- <div style="text-align: right">
159
- <el-button type="primary" size="small" @click="submit('nextNode')">
160
- 提交
161
- </el-button>
162
- </div>
163
- </el-form-item>
164
- </el-form>
165
- </div>
166
- </template>
167
-
168
- <script>
169
- import {
170
- findSysCodes,
171
- taskReadHtml,
172
- toStartTaskRead,
173
- toTaskTransferIndex,
174
- getNotificationMsg,
175
- taskTransfer,
176
- findCodeValues
177
- } from 'eoss-ui/src/config/api';
178
- import util from 'eoss-ui/src/utils/util';
179
- import SelectUser from './selectUser.vue';
180
- export default {
181
- name: 'StartTaskRead',
182
- components: {
183
- [Option.name]: Option,
184
- [SelectUser.name]: SelectUser
185
- },
186
- props: {
187
- pendingId: { type: String, default: '' },
188
- simpleTips:{type:Boolean,default:true},
189
- newsInfo: { type: String, default: '' },
190
- type: { type: String, default: '' },
191
- option: { type: String, default: '' },
192
- typeCode: { type: String, default: '' },
193
- resetAppId: { type: String, default: '' },
194
- param: { type: Object, default: () => {} },
195
- taskExamine: { type: Object, default: () => {} },
196
- readParams: {
197
- type: [Object,undefined],
198
- default: undefined
199
- },
200
- },
201
- data() {
202
- return {
203
- loading: false,
204
- newsNoice: '',
205
- readOnlyNotificationType: '',
206
- notificationMessageReadOnly: false,
207
- nextNode: {
208
- nextUser: [],
209
- userInfo: [],
210
- noticeType: [],
211
- handleExplain: '',
212
- showDoresult: '0',
213
- isInHistory: '0',
214
- isDownload: '0'
215
- },
216
- mixList: [],
217
- newSelectUserList: [],
218
- orgId: '',
219
- noticeList: [],
220
- userOptions: [],
221
- selectCheck: [],
222
- selectUserList: [],
223
- transferInfo: {},
224
- multiple: true,
225
- params: { filid: 'all' },
226
- configInfo: {}
227
- };
228
- },
229
- computed: {
230
- tabs() {
231
- let tab = {};
232
- if (this.type != 'transfer') {
233
- tab = {
234
- employee: {
235
- param: {
236
- filid: this.orgId,
237
- name: '本单位用户'
238
- }
239
- },
240
- department: { param: { filid: this.orgId } },
241
- enterprise: {}
242
- };
243
- } else {
244
- tab = {
245
- employee: {
246
- param: {
247
- filid: this.orgId
248
- }
249
- }
250
- };
251
- }
252
- return tab;
253
- }
254
- },
255
- mounted() {
256
- this.newsNoice = this.newsInfo;
257
- if(this.readParams || this.typeCode=='read'){
258
- this.getMessage()
259
- }
260
- this.getFind();
261
- if (util.getStorage('mainConfig')) {
262
- this.orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
263
- }
264
- },
265
- methods: {
266
- //获取通知信息
267
- getMessage() {
268
- let params = {};
269
- if(this.typeCode=='read'){
270
- params = {
271
- processDefinitionId: this.param.processDefinitionId,
272
- businessId: this.param.businessId,
273
- businessName: this.param.businessName,
274
- bCode: this.param.bCode,
275
- bName:this.param.bName
276
- };
277
- }else{
278
- params.appId = this.readParams.appId
279
- }
280
- util
281
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
282
- .then((res) => {
283
- if (res.status === 'success') {
284
- this.newsNoice = res.message;
285
- }
286
- })
287
- .catch((err) => {
288
- this.loading = false;
289
- if (err.message && err.message !== 'canceled') {
290
- this.$message.error(err.message);
291
- }
292
- });
293
- },
294
- toTaskTransfer() {
295
- const { opinion, pendingId, taskExamine } = this;
296
- let params = {
297
- url: toTaskTransferIndex,
298
- params: {
299
- opinion,
300
- pendingId,
301
- isSubFlow: taskExamine.isSubFlow,
302
- isSinglePage: taskExamine.isSinglePage
303
- }
304
- };
305
- util
306
- .ajax(params)
307
- .then((res) => {
308
- const {
309
- status,
310
- message,
311
- data: { choiceDeptId, choiceOrgId, nodeInfoMap, taskExamine }
312
- } = res;
313
- if (status == 'success') {
314
- this.isMultipleTransfer(
315
- nodeInfoMap.nodeExtAttr.userSelectionType,
316
- choiceOrgId,
317
- choiceDeptId
318
- );
319
- this.nextNode.nodeName = taskExamine.nodeName;
320
- this.transferInfo = taskExamine;
321
- } else {
322
- this.$message.error(message || '系统错误,请联系管理员!');
323
- }
324
- })
325
- .catch((err) => {
326
- this.loading = false;
327
- if (err.message && err.message !== 'canceled') {
328
- this.$message.error(err.message);
329
- }
330
- });
331
- },
332
- isMultipleTransfer(val, choiceOrgId, choiceDeptId, pOrgId) {
333
- if (val == 2 || val == 4 || val == 6 || val == 16) {
334
- this.multiple = true;
335
- } else {
336
- this.multiple = false;
337
- }
338
- if (val == 1 || val == 2 || val == 5) {
339
- this.params.filid = this.orgId;
340
- if (choiceOrgId) {
341
- this.params.filid = choiceOrgId;
342
- }
343
- }
344
- if (val == 5 || val == 6) {
345
- this.params.filid = this.orgId;
346
- this.params.deptid = this.orgId;
347
- if (choiceDeptId) {
348
- this.params.deptid = choiceDeptId;
349
- }
350
- if (choiceOrgId) {
351
- this.params.filid = choiceOrgId;
352
- }
353
- }
354
- if (val == 15 || val == 16) {
355
- this.params.filid = this.orgId;
356
- if (pOrgId) {
357
- this.params.filid = pOrgId;
358
- }
359
- }
360
- },
361
- isMultiple() {
362
- let orgId = this.orgId;
363
- if (this.configInfo.selectPersonValue == 1) {
364
- this.multiple = false;
365
- this.params.filid = orgId;
366
- } else if (this.configInfo.selectPersonValue == 2) {
367
- this.multiple = true;
368
- this.params.filid = orgId;
369
- } else if (this.configInfo.selectPersonValue == 3) {
370
- this.multiple = false;
371
- this.params.filid = 'all';
372
- } else if (this.configInfo.selectPersonValue == 4) {
373
- this.multiple = true;
374
- this.params.filid = 'all';
375
- } else if (this.configInfo.selectPersonValue == 5) {
376
- this.multiple = false;
377
- this.params.filid = '';
378
- } else if (this.configInfo.selectPersonValue == 6) {
379
- this.multiple = true;
380
- this.params.filid = '';
381
- }
382
- },
383
- handleSelectCheck(val, data) {
384
- let { userIds, userNames } = data;
385
- if (val) {
386
- let newUserIds = userIds.split(',');
387
- let newUserNames = userNames.split(',');
388
- newUserIds.map((item, index) => {
389
- this.nextNode.nextUser.push(item);
390
- this.userOptions.push({ id: item, name: newUserNames[index] });
391
-
392
- this.selectUserList.push({
393
- showid: item,
394
- showname: newUserNames[index]
395
- });
396
- });
397
- // this.selectUserList = this.newSelectUserList
398
- } else {
399
- let newUserIds = userIds.split(',');
400
- for (let i = 0; i < this.nextNode.nextUser.length; i++) {
401
- for (let j = 0; j < newUserIds.length; j++) {
402
- if (this.nextNode.nextUser[i] == newUserIds[j]) {
403
- this.nextNode.nextUser.splice(i, 1);
404
- }
405
- }
406
- }
407
- for (let z = 0; z < this.userOptions.length; z++) {
408
- for (let x = 0; x < newUserIds.length; x++) {
409
- if (this.userOptions[z].id == newUserIds[x]) {
410
- this.userOptions.splice(z, 1);
411
- this.selectUserList.splice(z, 1);
412
- }
413
- }
414
- }
415
- // this.newSelectUserList = this.selectUserList
416
- }
417
- },
418
- toStartTaskRead() {
419
- let params = {
420
- url: toStartTaskRead,
421
- params: { pendingId: this.pendingId, taskAction: this.type,...this.param }
422
- };
423
- if(this.typeCode == 'read'){
424
- delete params.params.pendingId;
425
- // params.params.appid = this.resetAppId;
426
- }
427
- if (this.type != 'taskReadAndEnd') delete params.params.taskAction;
428
- util
429
- .ajax(params)
430
- .then((res) => {
431
- const { status, data } = res;
432
- if (status === 'success') {
433
- this.configInfo = data;
434
- this.isMultiple();
435
- }
436
- })
437
- .catch((err) => {
438
- this.loading = false;
439
- if (err.message && err.message !== 'canceled') {
440
- this.$message.error(err.message);
441
- }
442
- });
443
- },
444
- changeSelectUser(val, type) {
445
- const { nextUser, options, mixList } = val;
446
- this.nextNode[type] = nextUser;
447
- this.mixList = mixList;
448
- options.map((item) => {
449
- this.newSelectUserList.push({
450
- showname: item.showname,
451
- showid: item.showid
452
- });
453
- });
454
- },
455
- getNodeType() {
456
- util
457
- .ajax({
458
- url: findCodeValues,
459
- params: {
460
- ccCode: 'notification_type',
461
- userId: util.getStorage('userId')
462
- }
463
- })
464
- .then((res) => {
465
- const { status, data } = res;
466
- if (status === 'success') {
467
- this.noticeList = data;
468
- let arr = [];
469
- this.noticeList.map((item) => {
470
- this.nextNode.noticeType.map((x) => {
471
- if (x == item.cciValue) {
472
- arr.push(x);
473
- }
474
- });
475
- });
476
- this.nextNode.noticeType = arr;
477
- }
478
- })
479
- .catch((err) => {
480
- this.loading = false;
481
- if (err.message && err.message !== 'canceled') {
482
- this.$message.error(err.message);
483
- }
484
- });
485
- },
486
- // 转办提交
487
- subTaskTransfer() {
488
- const { choiceDeptId, choiceOrgId, bCode, bName } = this.taskExamine;
489
- const { opinion, pendingId, nextNode, newsNoice, multiple, type } = this;
490
- let params = {
491
- url: taskTransfer,
492
- data: {
493
- choiceDeptId,
494
- choiceOrgId,
495
- bCode,
496
- bName,
497
- nextUserId:
498
- multiple && type != 'transfer'
499
- ? nextNode.nextUser.join(',')
500
- : nextNode.nextUser,
501
- opinion,
502
- pendingId,
503
- notificationType: nextNode.noticeType.join(','),
504
- notificationMsg: newsNoice
505
- },
506
- headers: { Accept: 'application/json,text/plain' },
507
- method: 'post'
508
- };
509
- util
510
- .ajax(params)
511
- .then((res) => {
512
- const { message, status } = res;
513
- if (status === 'success') {
514
- this.simpleTips && this.$message.success('操作成功');
515
- this.quit(true);
516
- } else {
517
- this.$message.error(message || '系统错误,请联系管理员!');
518
- }
519
- this.loading = false;
520
- })
521
- .catch((err) => {
522
- this.loading = false;
523
- if (err.message && err.message !== 'canceled') {
524
- this.$message.error(err.message);
525
- }
526
- });
527
- },
528
- // 提交表单
529
- submit(formName) {
530
- this.$refs[formName].validate((valid) => {
531
- if (valid) {
532
- if (!this.option && this.isOpinionRequired === 1) {
533
- this.$message.warning('请选择输入审批意见');
534
- return;
535
- }
536
- // let nextUser = [];
537
- // this.nextNode.nextUser.map(item => {
538
- // nextUser.push(item);
539
- // });
540
- let noticeType = '';
541
- noticeType = this.nextNode.noticeType.join(',');
542
- this.loading = true;
543
- if (this.type === 'transfer') {
544
- this.subTaskTransfer();
545
- } else {
546
- const {
547
- appId,
548
- businessId,
549
- bCode,
550
- bName,
551
- choiceDeptId,
552
- choiceOrgId,
553
- businessName,
554
- processDefinitionId
555
- } = this.taskExamine;
556
- let params = {
557
- ...this.nextNode,
558
- bCode,
559
- bName,
560
- appId,
561
- businessId:businessId || this.param.businessId,
562
- choiceDeptId,
563
- choiceOrgId,
564
- businessName,
565
- processDefinitionId,
566
- currentOrgProcessKey: processDefinitionId || this.param.currentOrgProcessKey,
567
- pendingId: this.pendingId,
568
- opinion: this.option, // 审批意见
569
- userId: util.getStorage('userId'),
570
- nextReadUserId: this.mixList.join('|'),
571
- notificationType:noticeType,
572
- notificationMsg:this.newsNoice,
573
- taskAction: this.type
574
- // nextNodeId: this.form.nextNodeId
575
- };
576
- delete params.nextUser;
577
- delete params.noticeType;
578
- const { fyDoresult, fyeh, download, isCdjxjTaskHandle } =
579
- this.configInfo;
580
- fyDoresult != 'true' && delete params.showDoresult;
581
- fyeh != 'true' && delete params.isInHistory;
582
- !download && delete params.isDownload;
583
- isCdjxjTaskHandle == 'true' && delete params.noticeType;
584
- if (this.readParams) {
585
- params = { ...params, ...this.readParams };
586
- }
587
- util
588
- .ajax({
589
- url: taskReadHtml,
590
- params: { taskAction: this.type },
591
- headers: {
592
- Accept: 'application/json,text/plain'
593
- },
594
- method: 'post',
595
- data: params
596
- })
597
- .then((res) => {
598
- const { message, status } = res;
599
- this.loading = false;
600
- if (status === 'success') {
601
- this.simpleTips && this.$message.success('操作成功');
602
- this.quit(true);
603
- } else {
604
- this.$message.error(message || '系统错误,请联系管理员!');
605
- }
606
- })
607
- .catch((err) => {
608
- this.loading = false;
609
- if (err.message && err.message !== 'canceled') {
610
- this.$message.error(err.message);
611
- }
612
- });
613
- }
614
- } else {
615
- return false;
616
- }
617
- });
618
- },
619
- quit(val) {
620
- if (val === true) return this.$emit('cancel', this.type);
621
- this.$emit('cancel');
622
- },
623
-
624
- getFind() {
625
- this.loading = true;
626
- util
627
- .ajax({
628
- url: findSysCodes
629
- })
630
- .then((res) => {
631
- const { status, message, data } = res;
632
- this.loading = false;
633
- if (status === 'success') {
634
- this.nextNode.noticeType = message.split(',');
635
- if (data) {
636
- this.notificationMessageReadOnly =
637
- data.notificationMessageReadOnly;
638
- this.readOnlyNotificationType = data.readOnlyNotificationType;
639
- }
640
- } else {
641
- this.$message.error(message || '系统错误,请联系管理员!');
642
- }
643
- this.getNodeType();
644
- if (this.type === 'transfer') {
645
- this.toTaskTransfer();
646
- } else if(!this.readParams) {
647
- this.toStartTaskRead();
648
- }
649
- })
650
- .catch((err) => {
651
- this.loading = false;
652
- if (err.message && err.message !== 'canceled') {
653
- this.$message.error(err.message);
654
- }
655
- });
656
- }
657
- }
658
- };
659
- </script>
1
+ <template>
2
+ <div
3
+ v-loading="loading"
4
+ class="task-read"
5
+ element-loading-text="加载中..."
6
+ element-loading-spinner="el-icon-loading"
7
+ element-loading-background="rgba(255, 255,255, 0.8)"
8
+ >
9
+ <el-form
10
+ ref="nextNode"
11
+ :model="nextNode"
12
+ class="demo-dynamic"
13
+ label-width="110px"
14
+ >
15
+ <div
16
+ :style="`max-height: ${
17
+ typeCode ? 'unset' : '290px'
18
+ }; overflow-y: auto; margin-bottom: 10px`"
19
+ >
20
+ <el-form-item
21
+ prop="handleExplain"
22
+ label="当前步骤"
23
+ v-if="type === 'transfer'"
24
+ >
25
+ <el-input readonly v-model="nextNode.nodeName"></el-input>
26
+ </el-form-item>
27
+ <el-form-item
28
+ v-if="type == 'transfer' && transferInfo.isSinglePage"
29
+ prop="handleExplain"
30
+ label="意见"
31
+ >
32
+ <el-input
33
+ v-model="nextNode.handleExplain"
34
+ placeholder="请填写意见"
35
+ ></el-input>
36
+ </el-form-item>
37
+ <el-form-item
38
+ prop="nextUser"
39
+ :label="
40
+ type === 'transfer'
41
+ ? '转办对象'
42
+ : configInfo.isCdjxjTaskHandle == 'true'
43
+ ? '接收人'
44
+ : '办理用户'
45
+ "
46
+ >
47
+ <SelectUser
48
+ :nextUser="nextNode.nextUser"
49
+ :options="userOptions"
50
+ :multiple="type != 'transfer' ? multiple : false"
51
+ :mix="type != 'transfer'"
52
+ :selectUserList="selectUserList"
53
+ :types="
54
+ type == 'transfer'
55
+ ? ['employee', 'persongroup']
56
+ : ['employee', 'enterprise', 'department', 'persongroup']
57
+ "
58
+ @change="changeSelectUser($event, 'nextUser')"
59
+ :tabs="tabs"
60
+ :where="{ type: 'user' }"
61
+ />
62
+ </el-form-item>
63
+
64
+ <el-form-item
65
+ v-if="configInfo.isCdjxjTaskHandle != 'true' && type != 'transfer'"
66
+ prop="cy"
67
+ label="常用群组"
68
+ ><el-checkbox-group v-model="selectCheck">
69
+ <el-checkbox
70
+ @change="handleSelectCheck($event, item)"
71
+ v-for="item in configInfo.groups"
72
+ :label="item.name"
73
+ :key="item.id"
74
+ >{{ item.name }}</el-checkbox
75
+ >
76
+ </el-checkbox-group>
77
+ </el-form-item>
78
+ <el-form-item
79
+ v-if="configInfo.fyDoresult == 'true'"
80
+ prop="showDoresult"
81
+ label="流程意见"
82
+ ><el-radio v-model="nextNode.showDoresult" label="0">分阅</el-radio>
83
+ <el-radio v-model="nextNode.showDoresult" label="1">不分阅</el-radio>
84
+ </el-form-item>
85
+ <el-form-item
86
+ v-if="configInfo.fyeh == 'true'"
87
+ prop="isInHistory"
88
+ label="分阅记录"
89
+ ><el-radio v-model="nextNode.isInHistory" label="0">记录</el-radio>
90
+ <el-radio v-model="nextNode.isInHistory" label="1">不记录</el-radio>
91
+ </el-form-item>
92
+ <el-form-item
93
+ v-if="configInfo.download"
94
+ prop="isDownload"
95
+ label="打印下载文件"
96
+ ><el-radio v-model="nextNode.isDownload" label="0">允许</el-radio>
97
+ <el-radio v-model="nextNode.isDownload" label="1">不允许</el-radio>
98
+ </el-form-item>
99
+ <el-form-item
100
+ prop="handleExplain"
101
+ :label="configInfo.isCdjxjTaskHandle == 'true' ? '附言' : '办理说明'"
102
+ v-if="type != 'transfer'"
103
+ >
104
+ <el-input
105
+ v-model="nextNode.handleExplain"
106
+ placeholder="请填写办理说明"
107
+ ></el-input>
108
+ </el-form-item>
109
+ <el-form-item
110
+ v-if="configInfo.isCdjxjTaskHandle != 'true'"
111
+ prop="noticeType"
112
+ label="通知方式"
113
+ :rules="[
114
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
115
+ ]"
116
+ >
117
+ <el-checkbox-group
118
+ v-model="nextNode.noticeType"
119
+ style="display: contents"
120
+ >
121
+ <el-checkbox
122
+ v-for="item of noticeList"
123
+ :key="item.cciValue"
124
+ :label="item.cciValue"
125
+ :disabled="
126
+ readOnlyNotificationType
127
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
128
+ : false
129
+ "
130
+ >
131
+ {{ item.shortName }}
132
+ </el-checkbox>
133
+ </el-checkbox-group>
134
+ </el-form-item>
135
+ <el-form-item
136
+ v-show="
137
+ nextNode.noticeType.length != 0 &&
138
+ configInfo.isCdjxjTaskHandle != 'true'
139
+ "
140
+ prop="nextNode"
141
+ label="通知消息"
142
+ >
143
+ <es-input
144
+ style="
145
+ border-color: #ccc;
146
+ padding: 5px;
147
+ border-radius: 5px;
148
+ font-size: 13px;
149
+ "
150
+ type="textarea"
151
+ v-model="newsNoice"
152
+ :readonly="notificationMessageReadOnly == 'true'"
153
+ />
154
+ <!-- <span>{{ newsInfo }}</span> -->
155
+ </el-form-item>
156
+ </div>
157
+ <el-form-item>
158
+ <div style="text-align: right">
159
+ <el-button type="primary" size="small" @click="submit('nextNode')">
160
+ 提交
161
+ </el-button>
162
+ </div>
163
+ </el-form-item>
164
+ </el-form>
165
+ </div>
166
+ </template>
167
+
168
+ <script>
169
+ import {
170
+ findSysCodes,
171
+ taskReadHtml,
172
+ toStartTaskRead,
173
+ toTaskTransferIndex,
174
+ getNotificationMsg,
175
+ taskTransfer,
176
+ findCodeValues
177
+ } from 'eoss-ui/src/config/api';
178
+ import util from 'eoss-ui/src/utils/util';
179
+ import SelectUser from './selectUser.vue';
180
+ export default {
181
+ name: 'StartTaskRead',
182
+ components: {
183
+ [Option.name]: Option,
184
+ [SelectUser.name]: SelectUser
185
+ },
186
+ props: {
187
+ pendingId: { type: String, default: '' },
188
+ simpleTips:{type:Boolean,default:true},
189
+ newsInfo: { type: String, default: '' },
190
+ type: { type: String, default: '' },
191
+ option: { type: String, default: '' },
192
+ typeCode: { type: String, default: '' },
193
+ resetAppId: { type: String, default: '' },
194
+ param: { type: Object, default: () => {} },
195
+ taskExamine: { type: Object, default: () => {} },
196
+ readParams: {
197
+ type: [Object,undefined],
198
+ default: undefined
199
+ },
200
+ },
201
+ data() {
202
+ return {
203
+ loading: false,
204
+ newsNoice: '',
205
+ readOnlyNotificationType: '',
206
+ notificationMessageReadOnly: false,
207
+ nextNode: {
208
+ nextUser: [],
209
+ userInfo: [],
210
+ noticeType: [],
211
+ handleExplain: '',
212
+ showDoresult: '0',
213
+ isInHistory: '0',
214
+ isDownload: '0'
215
+ },
216
+ mixList: [],
217
+ newSelectUserList: [],
218
+ orgId: '',
219
+ noticeList: [],
220
+ userOptions: [],
221
+ selectCheck: [],
222
+ selectUserList: [],
223
+ transferInfo: {},
224
+ multiple: true,
225
+ params: { filid: 'all' },
226
+ configInfo: {}
227
+ };
228
+ },
229
+ computed: {
230
+ tabs() {
231
+ let tab = {};
232
+ if (this.type != 'transfer') {
233
+ tab = {
234
+ employee: {
235
+ param: {
236
+ filid: this.orgId,
237
+ name: '本单位用户'
238
+ }
239
+ },
240
+ department: { param: { filid: this.orgId } },
241
+ enterprise: {}
242
+ };
243
+ } else {
244
+ tab = {
245
+ employee: {
246
+ param: {
247
+ filid: this.orgId
248
+ }
249
+ }
250
+ };
251
+ }
252
+ return tab;
253
+ }
254
+ },
255
+ mounted() {
256
+ this.newsNoice = this.newsInfo;
257
+ if(this.readParams || this.typeCode=='read'){
258
+ this.getMessage()
259
+ }
260
+ this.getFind();
261
+ if (util.getStorage('mainConfig')) {
262
+ this.orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
263
+ }
264
+ },
265
+ methods: {
266
+ //获取通知信息
267
+ getMessage() {
268
+ let params = {};
269
+ if(this.typeCode=='read'){
270
+ params = {
271
+ processDefinitionId: this.param.processDefinitionId,
272
+ businessId: this.param.businessId,
273
+ businessName: this.param.businessName,
274
+ bCode: this.param.bCode,
275
+ bName:this.param.bName
276
+ };
277
+ }else{
278
+ params.appId = this.readParams.appId
279
+ }
280
+ util
281
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
282
+ .then((res) => {
283
+ if (res.status === 'success') {
284
+ this.newsNoice = res.message;
285
+ }
286
+ })
287
+ .catch((err) => {
288
+ this.loading = false;
289
+ if (err.message && err.message !== 'canceled') {
290
+ this.$message.error(err.message);
291
+ }
292
+ });
293
+ },
294
+ toTaskTransfer() {
295
+ const { opinion, pendingId, taskExamine } = this;
296
+ let params = {
297
+ url: toTaskTransferIndex,
298
+ params: {
299
+ opinion,
300
+ pendingId,
301
+ isSubFlow: taskExamine.isSubFlow,
302
+ isSinglePage: taskExamine.isSinglePage
303
+ }
304
+ };
305
+ util
306
+ .ajax(params)
307
+ .then((res) => {
308
+ const {
309
+ status,
310
+ message,
311
+ data: { choiceDeptId, choiceOrgId, nodeInfoMap, taskExamine }
312
+ } = res;
313
+ if (status == 'success') {
314
+ this.isMultipleTransfer(
315
+ nodeInfoMap.nodeExtAttr.userSelectionType,
316
+ choiceOrgId,
317
+ choiceDeptId
318
+ );
319
+ this.nextNode.nodeName = taskExamine.nodeName;
320
+ this.transferInfo = taskExamine;
321
+ } else {
322
+ this.$message.error(message || '系统错误,请联系管理员!');
323
+ }
324
+ })
325
+ .catch((err) => {
326
+ this.loading = false;
327
+ if (err.message && err.message !== 'canceled') {
328
+ this.$message.error(err.message);
329
+ }
330
+ });
331
+ },
332
+ isMultipleTransfer(val, choiceOrgId, choiceDeptId, pOrgId) {
333
+ if (val == 2 || val == 4 || val == 6 || val == 16) {
334
+ this.multiple = true;
335
+ } else {
336
+ this.multiple = false;
337
+ }
338
+ if (val == 1 || val == 2 || val == 5) {
339
+ this.params.filid = this.orgId;
340
+ if (choiceOrgId) {
341
+ this.params.filid = choiceOrgId;
342
+ }
343
+ }
344
+ if (val == 5 || val == 6) {
345
+ this.params.filid = this.orgId;
346
+ this.params.deptid = this.orgId;
347
+ if (choiceDeptId) {
348
+ this.params.deptid = choiceDeptId;
349
+ }
350
+ if (choiceOrgId) {
351
+ this.params.filid = choiceOrgId;
352
+ }
353
+ }
354
+ if (val == 15 || val == 16) {
355
+ this.params.filid = this.orgId;
356
+ if (pOrgId) {
357
+ this.params.filid = pOrgId;
358
+ }
359
+ }
360
+ },
361
+ isMultiple() {
362
+ let orgId = this.orgId;
363
+ if (this.configInfo.selectPersonValue == 1) {
364
+ this.multiple = false;
365
+ this.params.filid = orgId;
366
+ } else if (this.configInfo.selectPersonValue == 2) {
367
+ this.multiple = true;
368
+ this.params.filid = orgId;
369
+ } else if (this.configInfo.selectPersonValue == 3) {
370
+ this.multiple = false;
371
+ this.params.filid = 'all';
372
+ } else if (this.configInfo.selectPersonValue == 4) {
373
+ this.multiple = true;
374
+ this.params.filid = 'all';
375
+ } else if (this.configInfo.selectPersonValue == 5) {
376
+ this.multiple = false;
377
+ this.params.filid = '';
378
+ } else if (this.configInfo.selectPersonValue == 6) {
379
+ this.multiple = true;
380
+ this.params.filid = '';
381
+ }
382
+ },
383
+ handleSelectCheck(val, data) {
384
+ let { userIds, userNames } = data;
385
+ if (val) {
386
+ let newUserIds = userIds.split(',');
387
+ let newUserNames = userNames.split(',');
388
+ newUserIds.map((item, index) => {
389
+ this.nextNode.nextUser.push(item);
390
+ this.userOptions.push({ id: item, name: newUserNames[index] });
391
+
392
+ this.selectUserList.push({
393
+ showid: item,
394
+ showname: newUserNames[index]
395
+ });
396
+ });
397
+ // this.selectUserList = this.newSelectUserList
398
+ } else {
399
+ let newUserIds = userIds.split(',');
400
+ for (let i = 0; i < this.nextNode.nextUser.length; i++) {
401
+ for (let j = 0; j < newUserIds.length; j++) {
402
+ if (this.nextNode.nextUser[i] == newUserIds[j]) {
403
+ this.nextNode.nextUser.splice(i, 1);
404
+ }
405
+ }
406
+ }
407
+ for (let z = 0; z < this.userOptions.length; z++) {
408
+ for (let x = 0; x < newUserIds.length; x++) {
409
+ if (this.userOptions[z].id == newUserIds[x]) {
410
+ this.userOptions.splice(z, 1);
411
+ this.selectUserList.splice(z, 1);
412
+ }
413
+ }
414
+ }
415
+ // this.newSelectUserList = this.selectUserList
416
+ }
417
+ },
418
+ toStartTaskRead() {
419
+ let params = {
420
+ url: toStartTaskRead,
421
+ params: { pendingId: this.pendingId, taskAction: this.type,...this.param }
422
+ };
423
+ if(this.typeCode == 'read'){
424
+ delete params.params.pendingId;
425
+ // params.params.appid = this.resetAppId;
426
+ }
427
+ if (this.type != 'taskReadAndEnd') delete params.params.taskAction;
428
+ util
429
+ .ajax(params)
430
+ .then((res) => {
431
+ const { status, data } = res;
432
+ if (status === 'success') {
433
+ this.configInfo = data;
434
+ this.isMultiple();
435
+ }
436
+ })
437
+ .catch((err) => {
438
+ this.loading = false;
439
+ if (err.message && err.message !== 'canceled') {
440
+ this.$message.error(err.message);
441
+ }
442
+ });
443
+ },
444
+ changeSelectUser(val, type) {
445
+ const { nextUser, options, mixList } = val;
446
+ this.nextNode[type] = nextUser;
447
+ this.mixList = mixList;
448
+ options.map((item) => {
449
+ this.newSelectUserList.push({
450
+ showname: item.showname,
451
+ showid: item.showid
452
+ });
453
+ });
454
+ },
455
+ getNodeType() {
456
+ util
457
+ .ajax({
458
+ url: findCodeValues,
459
+ params: {
460
+ ccCode: 'notification_type',
461
+ userId: util.getStorage('userId')
462
+ }
463
+ })
464
+ .then((res) => {
465
+ const { status, data } = res;
466
+ if (status === 'success') {
467
+ this.noticeList = data;
468
+ let arr = [];
469
+ this.noticeList.map((item) => {
470
+ this.nextNode.noticeType.map((x) => {
471
+ if (x == item.cciValue) {
472
+ arr.push(x);
473
+ }
474
+ });
475
+ });
476
+ this.nextNode.noticeType = arr;
477
+ }
478
+ })
479
+ .catch((err) => {
480
+ this.loading = false;
481
+ if (err.message && err.message !== 'canceled') {
482
+ this.$message.error(err.message);
483
+ }
484
+ });
485
+ },
486
+ // 转办提交
487
+ subTaskTransfer() {
488
+ const { choiceDeptId, choiceOrgId, bCode, bName } = this.taskExamine;
489
+ const { opinion, pendingId, nextNode, newsNoice, multiple, type } = this;
490
+ let params = {
491
+ url: taskTransfer,
492
+ data: {
493
+ choiceDeptId,
494
+ choiceOrgId,
495
+ bCode,
496
+ bName,
497
+ nextUserId:
498
+ multiple && type != 'transfer'
499
+ ? nextNode.nextUser.join(',')
500
+ : nextNode.nextUser,
501
+ opinion,
502
+ pendingId,
503
+ notificationType: nextNode.noticeType.join(','),
504
+ notificationMsg: newsNoice
505
+ },
506
+ headers: { Accept: 'application/json,text/plain' },
507
+ method: 'post'
508
+ };
509
+ util
510
+ .ajax(params)
511
+ .then((res) => {
512
+ const { message, status } = res;
513
+ if (status === 'success') {
514
+ this.simpleTips && this.$message.success('操作成功');
515
+ this.quit(true);
516
+ } else {
517
+ this.$message.error(message || '系统错误,请联系管理员!');
518
+ }
519
+ this.loading = false;
520
+ })
521
+ .catch((err) => {
522
+ this.loading = false;
523
+ if (err.message && err.message !== 'canceled') {
524
+ this.$message.error(err.message);
525
+ }
526
+ });
527
+ },
528
+ // 提交表单
529
+ submit(formName) {
530
+ this.$refs[formName].validate((valid) => {
531
+ if (valid) {
532
+ if (!this.option && this.isOpinionRequired === 1) {
533
+ this.$message.warning('请选择输入审批意见');
534
+ return;
535
+ }
536
+ // let nextUser = [];
537
+ // this.nextNode.nextUser.map(item => {
538
+ // nextUser.push(item);
539
+ // });
540
+ let noticeType = '';
541
+ noticeType = this.nextNode.noticeType.join(',');
542
+ this.loading = true;
543
+ if (this.type === 'transfer') {
544
+ this.subTaskTransfer();
545
+ } else {
546
+ const {
547
+ appId,
548
+ businessId,
549
+ bCode,
550
+ bName,
551
+ choiceDeptId,
552
+ choiceOrgId,
553
+ businessName,
554
+ processDefinitionId
555
+ } = this.taskExamine;
556
+ let params = {
557
+ ...this.nextNode,
558
+ bCode,
559
+ bName,
560
+ appId,
561
+ businessId:businessId || this.param.businessId,
562
+ choiceDeptId,
563
+ choiceOrgId,
564
+ businessName,
565
+ processDefinitionId,
566
+ currentOrgProcessKey: processDefinitionId || this.param.currentOrgProcessKey,
567
+ pendingId: this.pendingId,
568
+ opinion: this.option, // 审批意见
569
+ userId: util.getStorage('userId'),
570
+ nextReadUserId: this.mixList.join('|'),
571
+ notificationType:noticeType,
572
+ notificationMsg:this.newsNoice,
573
+ taskAction: this.type
574
+ // nextNodeId: this.form.nextNodeId
575
+ };
576
+ delete params.nextUser;
577
+ delete params.noticeType;
578
+ const { fyDoresult, fyeh, download, isCdjxjTaskHandle } =
579
+ this.configInfo;
580
+ fyDoresult != 'true' && delete params.showDoresult;
581
+ fyeh != 'true' && delete params.isInHistory;
582
+ !download && delete params.isDownload;
583
+ isCdjxjTaskHandle == 'true' && delete params.noticeType;
584
+ if (this.readParams) {
585
+ params = { ...params, ...this.readParams };
586
+ }
587
+ util
588
+ .ajax({
589
+ url: taskReadHtml,
590
+ params: { taskAction: this.type },
591
+ headers: {
592
+ Accept: 'application/json,text/plain'
593
+ },
594
+ method: 'post',
595
+ data: params
596
+ })
597
+ .then((res) => {
598
+ const { message, status } = res;
599
+ this.loading = false;
600
+ if (status === 'success') {
601
+ this.simpleTips && this.$message.success('操作成功');
602
+ this.quit(true);
603
+ } else {
604
+ this.$message.error(message || '系统错误,请联系管理员!');
605
+ }
606
+ })
607
+ .catch((err) => {
608
+ this.loading = false;
609
+ if (err.message && err.message !== 'canceled') {
610
+ this.$message.error(err.message);
611
+ }
612
+ });
613
+ }
614
+ } else {
615
+ return false;
616
+ }
617
+ });
618
+ },
619
+ quit(val) {
620
+ if (val === true) return this.$emit('cancel', this.type);
621
+ this.$emit('cancel');
622
+ },
623
+
624
+ getFind() {
625
+ this.loading = true;
626
+ util
627
+ .ajax({
628
+ url: findSysCodes
629
+ })
630
+ .then((res) => {
631
+ const { status, message, data } = res;
632
+ this.loading = false;
633
+ if (status === 'success') {
634
+ this.nextNode.noticeType = message.split(',');
635
+ if (data) {
636
+ this.notificationMessageReadOnly =
637
+ data.notificationMessageReadOnly;
638
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
639
+ }
640
+ } else {
641
+ this.$message.error(message || '系统错误,请联系管理员!');
642
+ }
643
+ this.getNodeType();
644
+ if (this.type === 'transfer') {
645
+ this.toTaskTransfer();
646
+ } else if(!this.readParams) {
647
+ this.toStartTaskRead();
648
+ }
649
+ })
650
+ .catch((err) => {
651
+ this.loading = false;
652
+ if (err.message && err.message !== 'canceled') {
653
+ this.$message.error(err.message);
654
+ }
655
+ });
656
+ }
657
+ }
658
+ };
659
+ </script>