eoss-ui 0.7.96 → 0.7.98

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 (187) hide show
  1. package/lib/button-group.js +1 -1
  2. package/lib/button.js +1 -1
  3. package/lib/calogin.js +1 -1
  4. package/lib/checkbox-group.js +1 -1
  5. package/lib/data-table-form.js +1 -1
  6. package/lib/data-table.js +9 -9
  7. package/lib/date-picker.js +1 -1
  8. package/lib/dialog.js +1 -1
  9. package/lib/eoss-ui.common.js +307 -301
  10. package/lib/flow-group.js +1 -1
  11. package/lib/flow-list.js +97 -97
  12. package/lib/flow.js +176 -175
  13. package/lib/form.js +1 -1
  14. package/lib/handle-user.js +1 -1
  15. package/lib/handler.js +1 -1
  16. package/lib/icon.js +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +1 -1
  19. package/lib/input.js +1 -1
  20. package/lib/login.js +1 -1
  21. package/lib/main.js +22 -17
  22. package/lib/nav.js +1 -1
  23. package/lib/page.js +1 -1
  24. package/lib/pagination.js +1 -1
  25. package/lib/player.js +1 -1
  26. package/lib/qr-code.js +1 -1
  27. package/lib/radio-group.js +1 -1
  28. package/lib/retrial-auth.js +1 -1
  29. package/lib/select-ganged.js +1 -1
  30. package/lib/select.js +1 -1
  31. package/lib/selector-panel.js +1 -1
  32. package/lib/selector.js +1 -1
  33. package/lib/sizer.js +1 -1
  34. package/lib/steps.js +1 -1
  35. package/lib/switch.js +1 -1
  36. package/lib/table-form.js +1 -1
  37. package/lib/tabs.js +1 -1
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/login.css +1 -1
  40. package/lib/tips.js +1 -1
  41. package/lib/tree-group.js +1 -1
  42. package/lib/tree.js +1 -1
  43. package/lib/upload.js +1 -1
  44. package/lib/utils/util.js +1 -1
  45. package/lib/wujie.js +1 -1
  46. package/lib/wxlogin.js +1 -1
  47. package/package.json +1 -1
  48. package/packages/button-group/src/main.vue +346 -346
  49. package/packages/calogin/src/main.vue +412 -412
  50. package/packages/clients/src/main.vue +151 -151
  51. package/packages/data-table/src/column.vue +1 -1
  52. package/packages/flow/src/component/Circulate.vue +417 -417
  53. package/packages/flow/src/component/CommonOpinions.vue +376 -376
  54. package/packages/flow/src/component/CustomPreset.vue +324 -324
  55. package/packages/flow/src/component/FileList.vue +97 -97
  56. package/packages/flow/src/component/FreeCirculation.vue +3 -2
  57. package/packages/flow/src/component/Preset.vue +257 -257
  58. package/packages/flow/src/component/SendMsg.vue +242 -242
  59. package/packages/flow/src/component/SortFlow.vue +110 -110
  60. package/packages/flow/src/component/taskUnionExamine.vue +761 -761
  61. package/packages/flow/src/form.vue +123 -123
  62. package/packages/flow/src/freeStartFlow.vue +2855 -2855
  63. package/packages/flow/src/main.vue +1 -1
  64. package/packages/flow/src/processForm.vue +1680 -1680
  65. package/packages/flow/src/processReject.vue +309 -309
  66. package/packages/flow/src/reset.vue +946 -946
  67. package/packages/flow/src/startTaskRead.vue +695 -695
  68. package/packages/flow/src/supervise.vue +159 -159
  69. package/packages/flow/src/table.vue +58 -58
  70. package/packages/flow-list/src/main.vue +2337 -2337
  71. package/packages/form/src/main.vue +3901 -3901
  72. package/packages/form/src/table.vue +1512 -1512
  73. package/packages/icon/src/main.vue +104 -104
  74. package/packages/login/src/resetPassword.vue +557 -557
  75. package/packages/main/src/public/online.vue +89 -89
  76. package/packages/main/src/public/search.vue +464 -464
  77. package/packages/main/src/public/settings.vue +273 -273
  78. package/packages/main/src/simplicity/apps.vue +388 -388
  79. package/packages/main/src/simplicity/avatar.vue +82 -82
  80. package/packages/main/src/simplicity/handler.vue +158 -158
  81. package/packages/main/src/simplicity/menu-list.vue +135 -135
  82. package/packages/main/src/simplicity/message.vue +293 -293
  83. package/packages/main/src/simplicity/notice.vue +222 -222
  84. package/packages/main/src/simplicity/sub-menu.vue +276 -276
  85. package/packages/main/src/simplicity/user.vue +259 -259
  86. package/packages/main/src/simplicityTop/apps.vue +388 -388
  87. package/packages/main/src/simplicityTop/avatar.vue +82 -82
  88. package/packages/main/src/simplicityTop/handler.vue +215 -215
  89. package/packages/main/src/simplicityTop/index.vue +8 -3
  90. package/packages/main/src/simplicityTop/lists.vue +84 -84
  91. package/packages/main/src/simplicityTop/menu-list.vue +135 -135
  92. package/packages/main/src/simplicityTop/message.vue +293 -293
  93. package/packages/main/src/simplicityTop/notice.vue +222 -222
  94. package/packages/main/src/simplicityTop/router-page.vue +45 -45
  95. package/packages/main/src/simplicityTop/sub-menu.vue +274 -274
  96. package/packages/main/src/simplicityTop/user.vue +259 -259
  97. package/packages/menu/src/main.vue +595 -595
  98. package/packages/nav/src/main.vue +351 -351
  99. package/packages/selector/src/main.vue +761 -761
  100. package/packages/selector-panel/src/main.vue +1036 -1036
  101. package/packages/selector-panel/src/selection.vue +174 -174
  102. package/packages/switch/src/main.vue +170 -170
  103. package/packages/theme-chalk/lib/base.css +1 -0
  104. package/packages/theme-chalk/lib/button-group.css +1 -0
  105. package/packages/theme-chalk/lib/button.css +1 -0
  106. package/packages/theme-chalk/lib/calendar.css +1 -0
  107. package/packages/theme-chalk/lib/calogin.css +0 -0
  108. package/packages/theme-chalk/lib/card.css +1 -0
  109. package/packages/theme-chalk/lib/cascader.css +0 -0
  110. package/packages/theme-chalk/lib/checkbox-group.css +1 -0
  111. package/packages/theme-chalk/lib/clients.css +1 -0
  112. package/packages/theme-chalk/lib/data-table-form.css +1 -0
  113. package/packages/theme-chalk/lib/data-table.css +1 -0
  114. package/packages/theme-chalk/lib/date-picker.css +1 -0
  115. package/packages/theme-chalk/lib/dialog.css +1 -0
  116. package/packages/theme-chalk/lib/enable-drag.css +1 -0
  117. package/packages/theme-chalk/lib/enterprise.css +1 -0
  118. package/packages/theme-chalk/lib/error-page.css +1 -0
  119. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  120. package/packages/theme-chalk/lib/flow-group.css +1 -0
  121. package/packages/theme-chalk/lib/flow-list.css +1 -0
  122. package/packages/theme-chalk/lib/flow.css +1 -0
  123. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  124. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  125. package/packages/theme-chalk/lib/form.css +1 -0
  126. package/packages/theme-chalk/lib/handle-user.css +1 -0
  127. package/packages/theme-chalk/lib/handler.css +1 -0
  128. package/packages/theme-chalk/lib/icon.css +1 -0
  129. package/packages/theme-chalk/lib/icons.css +1 -0
  130. package/packages/theme-chalk/lib/index.css +1 -0
  131. package/packages/theme-chalk/lib/input-number.css +0 -0
  132. package/packages/theme-chalk/lib/input.css +1 -0
  133. package/packages/theme-chalk/lib/label.css +1 -0
  134. package/packages/theme-chalk/lib/layout.css +1 -0
  135. package/packages/theme-chalk/lib/login.css +1 -0
  136. package/packages/theme-chalk/lib/main.css +1 -0
  137. package/packages/theme-chalk/lib/menu.css +1 -0
  138. package/packages/theme-chalk/lib/nav.css +1 -0
  139. package/packages/theme-chalk/lib/notify.css +0 -0
  140. package/packages/theme-chalk/lib/page.css +1 -0
  141. package/packages/theme-chalk/lib/pagination.css +1 -0
  142. package/packages/theme-chalk/lib/player.css +1 -0
  143. package/packages/theme-chalk/lib/qr-code.css +1 -0
  144. package/packages/theme-chalk/lib/radio-group.css +1 -0
  145. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  146. package/packages/theme-chalk/lib/select-ganged.css +1 -0
  147. package/packages/theme-chalk/lib/select.css +1 -0
  148. package/packages/theme-chalk/lib/selector-panel.css +1 -0
  149. package/packages/theme-chalk/lib/selector.css +1 -0
  150. package/packages/theme-chalk/lib/simplicity-top.css +1 -0
  151. package/packages/theme-chalk/lib/simplicity.css +1 -0
  152. package/packages/theme-chalk/lib/sizer.css +1 -0
  153. package/packages/theme-chalk/lib/steps.css +1 -0
  154. package/packages/theme-chalk/lib/switch.css +1 -0
  155. package/packages/theme-chalk/lib/table-form.css +0 -0
  156. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  157. package/packages/theme-chalk/lib/tabs.css +1 -0
  158. package/packages/theme-chalk/lib/tips.css +1 -0
  159. package/packages/theme-chalk/lib/toolbar.css +1 -0
  160. package/packages/theme-chalk/lib/tree-group.css +1 -0
  161. package/packages/theme-chalk/lib/tree.css +1 -0
  162. package/packages/theme-chalk/lib/upload.css +1 -0
  163. package/packages/theme-chalk/lib/wujie.css +0 -0
  164. package/packages/theme-chalk/lib/wxlogin.css +1 -0
  165. package/packages/theme-chalk/src/data-table.scss +297 -297
  166. package/packages/theme-chalk/src/flow-list.scss +55 -55
  167. package/packages/theme-chalk/src/flow.scss +373 -373
  168. package/packages/theme-chalk/src/form.scss +501 -501
  169. package/packages/theme-chalk/src/handler.scss +148 -148
  170. package/packages/theme-chalk/src/icon.scss +3452 -3452
  171. package/packages/theme-chalk/src/login.scss +1006 -1006
  172. package/packages/theme-chalk/src/main.scss +664 -664
  173. package/packages/theme-chalk/src/menu.scss +224 -224
  174. package/packages/theme-chalk/src/selector.scss +114 -114
  175. package/packages/theme-chalk/src/simplicity-top.scss +1845 -1845
  176. package/packages/theme-chalk/src/simplicity.scss +1403 -1403
  177. package/packages/theme-chalk/src/tree.scss +165 -165
  178. package/packages/theme-chalk/src/upload.scss +172 -172
  179. package/packages/tips/src/main.vue +141 -141
  180. package/packages/toolbar/src/main.vue +430 -430
  181. package/packages/upload/src/main.vue +1344 -1344
  182. package/packages/wujie/src/main.vue +146 -146
  183. package/src/config/api.js +348 -348
  184. package/src/index.js +163 -163
  185. package/src/utils/rules.js +18 -18
  186. package/src/utils/util.js +18 -19
  187. package/packages/theme-chalk/gulpfile.js +0 -25
@@ -1,761 +1,761 @@
1
- <template>
2
- <div class="task-union-examine" v-loading="loading">
3
- <el-form
4
- ref="infoList"
5
- :model="infoList"
6
- class="demo-dynamic"
7
- :rules="rules"
8
- label-width="120px"
9
- >
10
- <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
11
- <CommonOpinions @change="(val) => (opinion = val)" />
12
- </el-form-item>
13
- <el-form-item
14
- v-if="isHideCurrentOrg == 0"
15
- :prop="type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'"
16
- :label="
17
- type == 'takeAdvice'
18
- ? currentOrgName
19
- ? currentOrgName
20
- : '本单位'
21
- : type == 'startDraf'
22
- ? '呈送单位/对象'
23
- : type === 'taskReview'
24
- ? '复核人'
25
- : type === 'twoOfficesDispatch'
26
- ? '报送单位'
27
- : '联合单位'
28
- "
29
- >
30
- <SelectUser
31
- :nextUser="
32
- type != 'takeAdvice'
33
- ? infoList.nextOtherOrgObj
34
- : infoList.nextCurrentOrgObj
35
- "
36
- :multiple="newMultiple"
37
- :selectorTags="4"
38
- :showTooltip="showTooltip"
39
- :mix="currentMix"
40
- :isUnionSeal="type == 'unionSeal'"
41
- :selectUserList="unionSealData || []"
42
- @change="
43
- changeSelectUser(
44
- $event,
45
- type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'
46
- )
47
- "
48
- :types="
49
- type == 'takeAdvice'
50
- ? currentOrgTabs.length > 0
51
- ? currentOrgTabs
52
- : ['department', 'employee']
53
- : type == 'startDraf'
54
- ? ['employee', 'enterprise']
55
- : ['enterprise']
56
- "
57
- :params="
58
- type == 'startDraf' || type == 'unionExamine' ? otherParams : params
59
- "
60
- :tabs="currentOrgTabsParam"
61
- :disabled="disabled"
62
- :onlyName="onlyName"
63
- />
64
- </el-form-item>
65
- <el-form-item
66
- prop="nextOtherOrgObj"
67
- v-if="isHideOtherOrg == 0 && type == 'takeAdvice'"
68
- :label="otherOrgName ? otherOrgName : '外单位'"
69
- >
70
- <SelectUser
71
- :nextUser="infoList.nextOtherOrgObj"
72
- :where="{ filid: 'all', roleid: selectorParams.roleid }"
73
- :showTooltip="showTooltip"
74
- :multiple="newMultiple"
75
- @change="changeSelectUser($event, 'nextOtherOrgObj')"
76
- :mix="otherMix"
77
- :selectorTags="4"
78
- :disableds="otherOrgDisabledObjId"
79
- :types="
80
- foreignOrgTabs.length > 0
81
- ? foreignOrgTabs
82
- : isChoiceOtherOrgDept == 'true'
83
- ? ['enterprise', 'department']
84
- : ['enterprise']
85
- "
86
- :params="otherParams"
87
- :tabs="foreignOrgTabsParam"
88
- />
89
- </el-form-item>
90
- <el-form-item
91
- v-if="enableCustomLimitTimeSetting"
92
- prop="customLimitTime"
93
- label="限时办理"
94
- >
95
- <!-- style="width: 49%; display: inline-block;" -->
96
- <es-select
97
- style="width: 20% !important; display: inline-block"
98
- v-model="infoList.customLimitTimeText"
99
- placeholder="请选择"
100
- @change="handleChangeTime"
101
- sysCode="bpm_custom_limit_time"
102
- ></es-select>
103
- <el-input
104
- style="width: 20%; display: inline-block"
105
- v-model="infoList.customLimitTime"
106
- placeholder="请输入限时办理的天数"
107
- class="input-with-select custom-limit-time"
108
- >
109
- </el-input>
110
- <span style="margin-left: 5px">天</span>
111
- <!-- <es-button
112
- type="primary"
113
- slot="append"
114
- @click="
115
- () => {
116
- infoList.customLimitTime = '';
117
- showCustomLimitTimeText = !showCustomLimitTimeText;
118
- }
119
- "
120
- >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
121
- > -->
122
- </el-form-item>
123
- <!-- :rules="[
124
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
125
- ]" -->
126
- <el-form-item
127
- prop="noticeType"
128
- label="通知方式"
129
- v-show="infoList.noticeList.length != 0"
130
- >
131
- <el-checkbox-group
132
- v-model="infoList.noticeType"
133
- style="display: contents"
134
- >
135
- <el-checkbox
136
- v-for="item of infoList.noticeList"
137
- :key="item.cciValue"
138
- :label="item.cciValue"
139
- :disabled="
140
- readOnlyNotificationType
141
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
142
- : false
143
- "
144
- >
145
- {{ item.shortName }}
146
- </el-checkbox>
147
- </el-checkbox-group>
148
- </el-form-item>
149
- <el-form-item
150
- v-show="infoList.noticeType.length != 0"
151
- prop="noticeInfo"
152
- label="通知消息"
153
- >
154
- <es-input
155
- style="
156
- border-color: #ccc;
157
- padding: 5px;
158
- border-radius: 5px;
159
- font-size: 13px;
160
- "
161
- type="textarea"
162
- v-model="infoList.noticeInfo"
163
- :readonly="notificationMessageReadOnly"
164
- />
165
- <!-- <span>{{ infoList.noticeInfo }}</span> -->
166
- </el-form-item>
167
- </el-form>
168
- <div style="text-align: right">
169
- <el-button type="primary" @click="subMit"> 确定 </el-button>
170
- <el-button @click="quit" > 取消 </el-button>
171
- </div>
172
- </div>
173
- </template>
174
-
175
- <script>
176
- import CommonOpinions from './CommonOpinions.vue';
177
- import SelectUser from '../selectUser.vue';
178
- import {
179
- findSysCodes,
180
- getNotificationMsg,
181
- toTaskTakeAdvice,
182
- findCodeValues,
183
- toTaskStartDraft,
184
- toTaskReview,
185
- taskStartDraft,
186
- toTaskUnionSeal,
187
- taskReview,
188
- toTwoOfficesDispatch,
189
- taskUnionSeal,
190
- twoOfficesDispatch,
191
- taskUnionExamine,
192
- taskTakeAdvice,
193
- toTaskUnionExamine
194
- } from 'eoss-ui/src/config/api';
195
- import util from 'eoss-ui/src/utils/util.js';
196
- export default {
197
- name: 'TaskUnionExamine',
198
- components: {
199
- [CommonOpinions.name]: CommonOpinions,
200
- [SelectUser.name]: SelectUser
201
- },
202
- props: {
203
- pendingId: { type: String, default: '' },
204
- showTooltip: { type: Boolean, default: true },
205
- type: { type: String, default: '' },
206
- defaultOpinion: { type: String, default: '' },
207
- oldOption: { type: String, default: '' },
208
- disabled: { type: Boolean, default: false },
209
- simpleTips: { type: Boolean, default: true },
210
- multiple: { type: Boolean, default: true },
211
- selectorParams: {
212
- type: Object,
213
- default: () => {
214
- return {};
215
- }
216
- }
217
- },
218
- inheritAttrs: false,
219
- data() {
220
- return {
221
- opinion: '', //办理意见
222
- readOnlyNotificationType: '',
223
- notificationMessageReadOnly: false,
224
- otherMix: false,
225
- enableCustomLimitTimeSetting: false,
226
- showCustomLimitTimeText: false,
227
- currentMix: false,
228
- infoList: {
229
- nextOtherOrgObj: [],
230
- nextCurrentOrgObj: [],
231
- noticeType: [],
232
- noticeList: [],
233
- noticeInfo: '',
234
- opinion: '',
235
- customLimitTime: '',
236
- customLimitTimeText: ''
237
- },
238
- onlyName: '',
239
- unionSealData: [],
240
- currentOrgTabs: [],
241
- foreignOrgTabs: [],
242
- foreignOrgTabsParam: {},
243
- currentOrgTabsParam: {},
244
- currentOrgProcessKey: '',
245
- otherOrgDisabledObjId: [],
246
- isSubFlow: true,
247
- choiceDeptId: '',
248
- choiceOrgId: '',
249
- isSinglePage: false,
250
- isChoiceOtherOrgDept: '',
251
- currentOrgName: '',
252
- otherOrgName: '',
253
- newMultiple: true,
254
- params: { filid: 'all',only_filid:true },
255
- isHideOtherOrg: '',
256
- isHideCurrentOrg: 0,
257
- isOpinionRequired: 0,
258
- otherParams: { filid: 'all', roleid: '', nofilid: sessionStorage.getItem('orgId') },
259
- loading: false
260
- };
261
- },
262
- computed: {
263
- rules() {
264
- return {
265
- customLimitTime: [
266
- {
267
- required: this.enableCustomLimitTimeSetting,
268
- message: this.showCustomLimitTimeText
269
- ? '请输入限时办理天数'
270
- : '请选择限时办理天数',
271
- trigger: 'blur'
272
- },
273
- {
274
- required: this.enableCustomLimitTimeSetting,
275
- validator: this.checkCustomLimitTime,
276
- trigger: 'change'
277
- }
278
- ]
279
- };
280
- }
281
- },
282
- mounted() {
283
- this.loading = true;
284
- this.newMultiple = this.multiple;
285
- this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
286
- this.opinion = this.oldOption;
287
- this.getNodeType();
288
- if (this.type === 'taskReview') return this.getTaskReview();
289
- this.getInfo();
290
- },
291
- methods: {
292
- handleChangeTime(val) {
293
- this.infoList.customLimitTime = val;
294
- },
295
- validate() {
296
- let validSate = true;
297
- this.$refs.infoList.validate((valid) => {
298
- if (valid) {
299
- validSate = true;
300
- } else {
301
- validSate = false;
302
- }
303
- });
304
- return validSate;
305
- },
306
- checkCustomLimitTime(rule, value, callback) {
307
- if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
308
- callback(new Error('请输入正确的天数'));
309
- this.infoList.customLimitTime = '';
310
- } else {
311
- callback();
312
- }
313
- },
314
- isMultiple(val) {
315
- if (val == 7 || val == 9 || val == 11) {
316
- this.newMultiple = false;
317
- }
318
- },
319
- subTaskReview() {
320
- let {
321
- infoList: { nextOtherOrgObj, noticeType, noticeInfo },
322
- businessId,
323
- opinion,
324
- isSubFlow,
325
- currentOrgProcessKey,
326
- pendingId
327
- } = this;
328
- let params = {
329
- url: taskReview,
330
- data: {
331
- nextUserId: nextOtherOrgObj.join(','),
332
- notificationType: noticeType.join(','),
333
- notificationMsg: noticeInfo,
334
- opinion,
335
- isSubFlow,
336
- businessId,
337
- currentOrgProcessKey,
338
- pendingId
339
- },
340
- method: 'POST'
341
- };
342
- this.loading = true;
343
- util
344
- .ajax(params)
345
- .then((res) => {
346
- const { message, status } = res;
347
- this.loading = false;
348
- if (status === 'success') {
349
- this.simpleTips && this.$message.success('提交成功');
350
- this.quit(true);
351
- } else {
352
- this.$message.error(message || '系统错误,请联系管理员!');
353
- }
354
- })
355
- .catch((err) => {
356
- this.loading = false;
357
- if (err.message && err.message !== 'canceled') {
358
- this.$message.error(err.message);
359
- }
360
- });
361
- },
362
- getTaskReview() {
363
- let params = {
364
- url: toTaskReview,
365
- params: { pendingId: this.pendingId }
366
- };
367
- util
368
- .ajax(params)
369
- .then((res) => {
370
- const { status, message } = res;
371
- this.loading = false;
372
- if (status === 'success') {
373
- const {
374
- data: { initiatorUser, taskExamine }
375
- } = res;
376
- if (taskExamine.opinion) {
377
- this.opinion = taskExamine.opinion;
378
- }
379
- this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
380
- this.onlyName = initiatorUser.username;
381
- this.isSubFlow = taskExamine.isSubFlow;
382
- this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
383
- this.getFind();
384
- this.getMessage();
385
- } else {
386
- this.$message.error(message || '系统错误,请联系管理员!');
387
- }
388
- })
389
- .catch((err) => {
390
- this.loading = false;
391
- if (err.message && err.message !== 'canceled') {
392
- this.$message.error(err.message);
393
- }
394
- });
395
- },
396
- getInfo() {
397
- let params = {
398
- url:
399
- this.type == 'takeAdvice'
400
- ? toTaskTakeAdvice
401
- : this.type === 'startDraf'
402
- ? toTaskStartDraft
403
- : this.type == 'unionSeal'
404
- ? toTaskUnionSeal
405
- : this.type == 'twoOfficesDispatch'
406
- ? toTwoOfficesDispatch
407
- : toTaskUnionExamine,
408
- params: { pendingId: this.pendingId },
409
- headers: { Accept: 'application/json,text/plain' }
410
- };
411
- util
412
- .ajax(params)
413
- .then((res) => {
414
- const { message, status } = res;
415
- this.loading = false;
416
- if (status == 'success') {
417
- const {
418
- data: {
419
- choiceDeptId,
420
- choiceOrgId,
421
- taskExamine,
422
- unionDispatchOrgName,
423
- readOnlyNotificationType,
424
- notificationMessageReadOnly,
425
- unionDispatchOrgId,
426
- otherOrgDisabledObjId,
427
- orgNames,
428
- enableCustomLimitTimeSetting,
429
- defaultCustomLimitDays,
430
- nodeInfoMap: {
431
- nodeExtAttr: {
432
- userSelectionType,
433
- isHideOtherOrg,
434
- isHideCurrentOrg,
435
- isOpinionRequired
436
- }
437
- }
438
- }
439
- } = res;
440
- if (otherOrgDisabledObjId) {
441
- this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
442
- }
443
- this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
444
- if (this.enableCustomLimitTimeSetting && defaultCustomLimitDays) {
445
- this.infoList.customLimitTime =
446
- this.infoList.customLimitTimeText = defaultCustomLimitDays + '';
447
- }
448
- if (res.data.customizedConfig) {
449
- if (res.data.customizedConfig.currentOrgSelectorCustomized) {
450
- this.currentMix =
451
- res.data.customizedConfig.currentOrgSelectorSelectMix ==
452
- 'true';
453
- this.currentOrgTabs =
454
- res.data.customizedConfig.currentOrgSelectorItemList.split(
455
- ','
456
- );
457
- let param =
458
- res.data.customizedConfig.currentOrgSelectorRangeList.split(
459
- ','
460
- );
461
- this.currentOrgTabs.map((x, i) => {
462
- this.params[x] = {
463
- filid:
464
- param[i] == 'my'
465
- ? (this.params.filid = JSON.parse(
466
- util.getStorage('mainConfig')
467
- ).userModel.orgId)
468
- : param[i],
469
- only_filid:true
470
- };
471
- });
472
- } else {
473
- if (this.type == 'takeAdvice') {
474
- this.params.filid = JSON.parse(
475
- util.getStorage('mainConfig')
476
- ).userModel.orgId;
477
- }
478
- }
479
-
480
- if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
481
- this.otherMix =
482
- res.data.customizedConfig.foreignOrgSelectorSelectMix ==
483
- 'true';
484
- this.foreignOrgTabs =
485
- res.data.customizedConfig.foreignOrgSelectorItemList.split(
486
- ','
487
- );
488
- let param =
489
- res.data.customizedConfig.foreignOrgSelectorRangeList.split(
490
- ','
491
- );
492
- this.foreignOrgTabs.map((x, i) => {
493
- this.otherParams[x] = {
494
- filid: 'all',
495
- roleid: this.selectorParams.roleid,
496
- nofilid: sessionStorage.getItem('orgId')
497
- };
498
- });
499
- }
500
- }
501
- this.readOnlyNotificationType = readOnlyNotificationType;
502
- this.notificationMessageReadOnly =
503
- notificationMessageReadOnly == 'true';
504
- this.isSinglePage = taskExamine.isSinglePage;
505
- this.isSubFlow = taskExamine.isSubFlow;
506
- if (taskExamine.opinion) {
507
- this.opinion = taskExamine.opinion;
508
- }
509
- this.choiceDeptId = choiceDeptId;
510
- this.choiceOrgId = choiceOrgId;
511
- if (this.type == 'takeAdvice' || this.type == 'startDraf') {
512
- this.currentOrgName = res.data.currentOrgName;
513
- this.otherOrgName = res.data.otherOrgName;
514
- this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
515
- this.isHideOtherOrg = isHideOtherOrg;
516
- this.isHideCurrentOrg = isHideCurrentOrg;
517
- }
518
- this.isOpinionRequired = isOpinionRequired;
519
- if (this.type == 'unionSeal') {
520
- let names = unionDispatchOrgName.split(',');
521
- let ids = unionDispatchOrgId.split(',');
522
- names.map((x, i) => {
523
- if (x) {
524
- this.unionSealData.push({
525
- showname: x,
526
- showid: ids[i]
527
- });
528
- }
529
- });
530
- // this.onlyName = unionDispatchOrgName;
531
- // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
532
- }
533
- if (this.type == 'twoOfficesDispatch') {
534
- this.onlyName = orgNames;
535
- this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
536
- }
537
- this.isMultiple(userSelectionType);
538
- this.getFind();
539
- this.getMessage();
540
- } else {
541
- this.$message.error(message || '系统错误,请联系管理员!');
542
- }
543
- })
544
- .catch((err) => {
545
- this.loading = false;
546
- if (err.message && err.message !== 'canceled') {
547
- this.$message.error(err.message);
548
- }
549
- });
550
- },
551
- subMit() {
552
- // if (
553
- // this.infoList.nextOtherOrgObjName == '' ||
554
- // this.infoList.nextOtherOrgObjName.length == 0
555
- // )
556
- // return this.$message.warning('请选择联合单位');
557
- if (this.type === 'taskReview') return this.subTaskReview();
558
- let {
559
- infoList: {
560
- nextCurrentOrgObj,
561
- nextOtherOrgObj,
562
- noticeType,
563
- customLimitTime,
564
- noticeInfo
565
- },
566
- isOpinionRequired,
567
- opinion,
568
- type,
569
- isHideOtherOrg,
570
- choiceDeptId,
571
- choiceOrgId,
572
- isHideCurrentOrg,
573
- isSubFlow,
574
- pendingId
575
- } = this;
576
- console.log(nextCurrentOrgObj);
577
- console.log(nextOtherOrgObj);
578
- if (
579
- type == 'takeAdvice' &&
580
- !nextCurrentOrgObj &&
581
- isHideCurrentOrg == 0 &&
582
- nextCurrentOrgObj.length == 0 &&
583
- isHideOtherOrg == 0 &&
584
- (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
585
- ) {
586
- return this.$message.warning('请选择处理对象!');
587
- } else if (
588
- isHideCurrentOrg == 0 &&
589
- (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
590
- (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
591
- ) {
592
- return this.$message.warning('请选择处理对象!');
593
- }
594
-
595
- if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
596
- return this.$message.warning('当前步骤必须输入意见!');
597
- }
598
- // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
599
- // return this.$message.warning('暂未开放,敬请期待!');
600
- const param = {
601
- url:
602
- this.type === 'startDraf'
603
- ? taskStartDraft
604
- : this.type == 'unionSeal'
605
- ? taskUnionSeal
606
- : this.type === 'twoOfficesDispatch'
607
- ? twoOfficesDispatch
608
- : this.type == 'takeAdvice'
609
- ? taskTakeAdvice
610
- : taskUnionExamine,
611
- data: {
612
- opinion,
613
- pendingId,
614
-
615
- nextOtherOrgObj:
616
- this.type == 'unionSeal'
617
- ? this.unionSealData.map((x) => x.showid).join(',')
618
- : Array.isArray(nextOtherOrgObj)
619
- ? nextOtherOrgObj.join(',')
620
- : nextOtherOrgObj,
621
- nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
622
- ? nextCurrentOrgObj.join(',')
623
- : nextCurrentOrgObj,
624
- notificationMsg: noticeInfo,
625
- notificationType: noticeType.join(','),
626
- choiceDeptId,
627
- isSubFlow,
628
- choiceOrgId
629
- },
630
- headers: { Accept: 'application/json,text/plain' },
631
- method: 'POST'
632
- };
633
- if (this.enableCustomLimitTimeSetting) {
634
- param.data.customLimitTime = customLimitTime;
635
- console.log(this.validate(), 'this.validate()');
636
- if (!this.validate()) return;
637
- }
638
- this.loading = true;
639
- util
640
- .ajax(param)
641
- .then((res) => {
642
- const { message, status } = res;
643
- this.loading = false;
644
- if (status == 'success') {
645
- this.simpleTips && this.$message.success('提交成功');
646
- this.quit(true);
647
- } else {
648
- this.$message.error(message || '系统错误,请联系管理员!');
649
- }
650
- })
651
- .catch((err) => {
652
- this.loading = false;
653
- if (err.message && err.message !== 'canceled') {
654
- this.$message.error(err.message);
655
- }
656
- });
657
- },
658
- quit(val) {
659
- if (val === true) return this.$emit('cancel', val);
660
- this.$emit('cancel');
661
- },
662
- changeSelectUser(val, type) {
663
- const { nextUser, options } = val;
664
- let newNextUser = [];
665
- let obj = {};
666
- options.map((item) => {
667
- if (obj[item.stype]) {
668
- obj[item.stype].push(item.id);
669
- } else {
670
- obj[item.stype] = [item.id];
671
- }
672
- // if (newNextUser) {
673
- // newNextUser += `,${item.stype}-${item.id}`;
674
- // } else {
675
- // newNextUser = `${item.stype}-${item.id}`;
676
- // }
677
- });
678
- for (let key in obj) {
679
- newNextUser.push(`${key}-${obj[key].join(',')}`);
680
- }
681
-
682
- this.infoList[type] = newNextUser.join('|');
683
- },
684
- getNodeType() {
685
- util
686
- .ajax({
687
- url: findCodeValues,
688
- params: {
689
- ccCode: 'notification_type',
690
- userId: util.getStorage('userId'),
691
- pendingId: this.pendingId
692
- }
693
- })
694
- .then((res) => {
695
- const { status, data } = res;
696
- this.loading = false;
697
- if (status === 'success') {
698
- this.infoList.noticeList = data;
699
- }
700
- })
701
- .catch((err) => {
702
- this.loading = false;
703
- if (err.message && err.message !== 'canceled') {
704
- this.$message.error(err.message);
705
- }
706
- });
707
- },
708
- //获取通知信息
709
- getMessage() {
710
- let params = {
711
- pendingId: this.pendingId
712
- };
713
- util
714
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
715
- .then((res) => {
716
- if (res.status === 'success') {
717
- this.infoList.noticeInfo = res.message;
718
- }
719
- this.loading = false;
720
- })
721
- .catch((err) => {
722
- this.loading = false;
723
- if (err.message && err.message !== 'canceled') {
724
- this.$message.error(err.message);
725
- }
726
- });
727
- },
728
- getFind() {
729
- util
730
- .ajax({
731
- url: findSysCodes
732
- })
733
- .then((res) => {
734
- const { status, message } = res;
735
- if (status === 'success') {
736
- this.infoList.noticeType = message.split(',');
737
- let arr = [];
738
- this.infoList.noticeList.map((item) => {
739
- this.infoList.noticeType.map((x) => {
740
- if (x == item.cciValue) {
741
- arr.push(x);
742
- }
743
- });
744
- });
745
- this.infoList.noticeType = arr;
746
- } else {
747
- this.$message.error(message || '系统错误,请联系管理员!');
748
- }
749
- })
750
- .catch((err) => {
751
- this.loading = false;
752
- if (err.message && err.message !== 'canceled') {
753
- this.$message.error(err.message);
754
- }
755
- });
756
- }
757
- }
758
- };
759
- </script>
760
-
761
- <style></style>
1
+ <template>
2
+ <div class="task-union-examine" v-loading="loading">
3
+ <el-form
4
+ ref="infoList"
5
+ :model="infoList"
6
+ class="demo-dynamic"
7
+ :rules="rules"
8
+ label-width="120px"
9
+ >
10
+ <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
11
+ <CommonOpinions @change="(val) => (opinion = val)" />
12
+ </el-form-item>
13
+ <el-form-item
14
+ v-if="isHideCurrentOrg == 0"
15
+ :prop="type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'"
16
+ :label="
17
+ type == 'takeAdvice'
18
+ ? currentOrgName
19
+ ? currentOrgName
20
+ : '本单位'
21
+ : type == 'startDraf'
22
+ ? '呈送单位/对象'
23
+ : type === 'taskReview'
24
+ ? '复核人'
25
+ : type === 'twoOfficesDispatch'
26
+ ? '报送单位'
27
+ : '联合单位'
28
+ "
29
+ >
30
+ <SelectUser
31
+ :nextUser="
32
+ type != 'takeAdvice'
33
+ ? infoList.nextOtherOrgObj
34
+ : infoList.nextCurrentOrgObj
35
+ "
36
+ :multiple="newMultiple"
37
+ :selectorTags="4"
38
+ :showTooltip="showTooltip"
39
+ :mix="currentMix"
40
+ :isUnionSeal="type == 'unionSeal'"
41
+ :selectUserList="unionSealData || []"
42
+ @change="
43
+ changeSelectUser(
44
+ $event,
45
+ type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'
46
+ )
47
+ "
48
+ :types="
49
+ type == 'takeAdvice'
50
+ ? currentOrgTabs.length > 0
51
+ ? currentOrgTabs
52
+ : ['department', 'employee']
53
+ : type == 'startDraf'
54
+ ? ['employee', 'enterprise']
55
+ : ['enterprise']
56
+ "
57
+ :params="
58
+ type == 'startDraf' || type == 'unionExamine' ? otherParams : params
59
+ "
60
+ :tabs="currentOrgTabsParam"
61
+ :disabled="disabled"
62
+ :onlyName="onlyName"
63
+ />
64
+ </el-form-item>
65
+ <el-form-item
66
+ prop="nextOtherOrgObj"
67
+ v-if="isHideOtherOrg == 0 && type == 'takeAdvice'"
68
+ :label="otherOrgName ? otherOrgName : '外单位'"
69
+ >
70
+ <SelectUser
71
+ :nextUser="infoList.nextOtherOrgObj"
72
+ :where="{ filid: 'all', roleid: selectorParams.roleid }"
73
+ :showTooltip="showTooltip"
74
+ :multiple="newMultiple"
75
+ @change="changeSelectUser($event, 'nextOtherOrgObj')"
76
+ :mix="otherMix"
77
+ :selectorTags="4"
78
+ :disableds="otherOrgDisabledObjId"
79
+ :types="
80
+ foreignOrgTabs.length > 0
81
+ ? foreignOrgTabs
82
+ : isChoiceOtherOrgDept == 'true'
83
+ ? ['enterprise', 'department']
84
+ : ['enterprise']
85
+ "
86
+ :params="otherParams"
87
+ :tabs="foreignOrgTabsParam"
88
+ />
89
+ </el-form-item>
90
+ <el-form-item
91
+ v-if="enableCustomLimitTimeSetting"
92
+ prop="customLimitTime"
93
+ label="限时办理"
94
+ >
95
+ <!-- style="width: 49%; display: inline-block;" -->
96
+ <es-select
97
+ style="width: 20% !important; display: inline-block"
98
+ v-model="infoList.customLimitTimeText"
99
+ placeholder="请选择"
100
+ @change="handleChangeTime"
101
+ sysCode="bpm_custom_limit_time"
102
+ ></es-select>
103
+ <el-input
104
+ style="width: 20%; display: inline-block"
105
+ v-model="infoList.customLimitTime"
106
+ placeholder="请输入限时办理的天数"
107
+ class="input-with-select custom-limit-time"
108
+ >
109
+ </el-input>
110
+ <span style="margin-left: 5px">天</span>
111
+ <!-- <es-button
112
+ type="primary"
113
+ slot="append"
114
+ @click="
115
+ () => {
116
+ infoList.customLimitTime = '';
117
+ showCustomLimitTimeText = !showCustomLimitTimeText;
118
+ }
119
+ "
120
+ >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
121
+ > -->
122
+ </el-form-item>
123
+ <!-- :rules="[
124
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
125
+ ]" -->
126
+ <el-form-item
127
+ prop="noticeType"
128
+ label="通知方式"
129
+ v-show="infoList.noticeList.length != 0"
130
+ >
131
+ <el-checkbox-group
132
+ v-model="infoList.noticeType"
133
+ style="display: contents"
134
+ >
135
+ <el-checkbox
136
+ v-for="item of infoList.noticeList"
137
+ :key="item.cciValue"
138
+ :label="item.cciValue"
139
+ :disabled="
140
+ readOnlyNotificationType
141
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
142
+ : false
143
+ "
144
+ >
145
+ {{ item.shortName }}
146
+ </el-checkbox>
147
+ </el-checkbox-group>
148
+ </el-form-item>
149
+ <el-form-item
150
+ v-show="infoList.noticeType.length != 0"
151
+ prop="noticeInfo"
152
+ label="通知消息"
153
+ >
154
+ <es-input
155
+ style="
156
+ border-color: #ccc;
157
+ padding: 5px;
158
+ border-radius: 5px;
159
+ font-size: 13px;
160
+ "
161
+ type="textarea"
162
+ v-model="infoList.noticeInfo"
163
+ :readonly="notificationMessageReadOnly"
164
+ />
165
+ <!-- <span>{{ infoList.noticeInfo }}</span> -->
166
+ </el-form-item>
167
+ </el-form>
168
+ <div style="text-align: right">
169
+ <el-button type="primary" @click="subMit"> 确定 </el-button>
170
+ <el-button @click="quit" > 取消 </el-button>
171
+ </div>
172
+ </div>
173
+ </template>
174
+
175
+ <script>
176
+ import CommonOpinions from './CommonOpinions.vue';
177
+ import SelectUser from '../selectUser.vue';
178
+ import {
179
+ findSysCodes,
180
+ getNotificationMsg,
181
+ toTaskTakeAdvice,
182
+ findCodeValues,
183
+ toTaskStartDraft,
184
+ toTaskReview,
185
+ taskStartDraft,
186
+ toTaskUnionSeal,
187
+ taskReview,
188
+ toTwoOfficesDispatch,
189
+ taskUnionSeal,
190
+ twoOfficesDispatch,
191
+ taskUnionExamine,
192
+ taskTakeAdvice,
193
+ toTaskUnionExamine
194
+ } from 'eoss-ui/src/config/api';
195
+ import util from 'eoss-ui/src/utils/util.js';
196
+ export default {
197
+ name: 'TaskUnionExamine',
198
+ components: {
199
+ [CommonOpinions.name]: CommonOpinions,
200
+ [SelectUser.name]: SelectUser
201
+ },
202
+ props: {
203
+ pendingId: { type: String, default: '' },
204
+ showTooltip: { type: Boolean, default: true },
205
+ type: { type: String, default: '' },
206
+ defaultOpinion: { type: String, default: '' },
207
+ oldOption: { type: String, default: '' },
208
+ disabled: { type: Boolean, default: false },
209
+ simpleTips: { type: Boolean, default: true },
210
+ multiple: { type: Boolean, default: true },
211
+ selectorParams: {
212
+ type: Object,
213
+ default: () => {
214
+ return {};
215
+ }
216
+ }
217
+ },
218
+ inheritAttrs: false,
219
+ data() {
220
+ return {
221
+ opinion: '', //办理意见
222
+ readOnlyNotificationType: '',
223
+ notificationMessageReadOnly: false,
224
+ otherMix: false,
225
+ enableCustomLimitTimeSetting: false,
226
+ showCustomLimitTimeText: false,
227
+ currentMix: false,
228
+ infoList: {
229
+ nextOtherOrgObj: [],
230
+ nextCurrentOrgObj: [],
231
+ noticeType: [],
232
+ noticeList: [],
233
+ noticeInfo: '',
234
+ opinion: '',
235
+ customLimitTime: '',
236
+ customLimitTimeText: ''
237
+ },
238
+ onlyName: '',
239
+ unionSealData: [],
240
+ currentOrgTabs: [],
241
+ foreignOrgTabs: [],
242
+ foreignOrgTabsParam: {},
243
+ currentOrgTabsParam: {},
244
+ currentOrgProcessKey: '',
245
+ otherOrgDisabledObjId: [],
246
+ isSubFlow: true,
247
+ choiceDeptId: '',
248
+ choiceOrgId: '',
249
+ isSinglePage: false,
250
+ isChoiceOtherOrgDept: '',
251
+ currentOrgName: '',
252
+ otherOrgName: '',
253
+ newMultiple: true,
254
+ params: { filid: 'all',only_filid:true },
255
+ isHideOtherOrg: '',
256
+ isHideCurrentOrg: 0,
257
+ isOpinionRequired: 0,
258
+ otherParams: { filid: 'all', roleid: '', nofilid: sessionStorage.getItem('orgId') },
259
+ loading: false
260
+ };
261
+ },
262
+ computed: {
263
+ rules() {
264
+ return {
265
+ customLimitTime: [
266
+ {
267
+ required: this.enableCustomLimitTimeSetting,
268
+ message: this.showCustomLimitTimeText
269
+ ? '请输入限时办理天数'
270
+ : '请选择限时办理天数',
271
+ trigger: 'blur'
272
+ },
273
+ {
274
+ required: this.enableCustomLimitTimeSetting,
275
+ validator: this.checkCustomLimitTime,
276
+ trigger: 'change'
277
+ }
278
+ ]
279
+ };
280
+ }
281
+ },
282
+ mounted() {
283
+ this.loading = true;
284
+ this.newMultiple = this.multiple;
285
+ this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
286
+ this.opinion = this.oldOption;
287
+ this.getNodeType();
288
+ if (this.type === 'taskReview') return this.getTaskReview();
289
+ this.getInfo();
290
+ },
291
+ methods: {
292
+ handleChangeTime(val) {
293
+ this.infoList.customLimitTime = val;
294
+ },
295
+ validate() {
296
+ let validSate = true;
297
+ this.$refs.infoList.validate((valid) => {
298
+ if (valid) {
299
+ validSate = true;
300
+ } else {
301
+ validSate = false;
302
+ }
303
+ });
304
+ return validSate;
305
+ },
306
+ checkCustomLimitTime(rule, value, callback) {
307
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
308
+ callback(new Error('请输入正确的天数'));
309
+ this.infoList.customLimitTime = '';
310
+ } else {
311
+ callback();
312
+ }
313
+ },
314
+ isMultiple(val) {
315
+ if (val == 7 || val == 9 || val == 11) {
316
+ this.newMultiple = false;
317
+ }
318
+ },
319
+ subTaskReview() {
320
+ let {
321
+ infoList: { nextOtherOrgObj, noticeType, noticeInfo },
322
+ businessId,
323
+ opinion,
324
+ isSubFlow,
325
+ currentOrgProcessKey,
326
+ pendingId
327
+ } = this;
328
+ let params = {
329
+ url: taskReview,
330
+ data: {
331
+ nextUserId: nextOtherOrgObj.join(','),
332
+ notificationType: noticeType.join(','),
333
+ notificationMsg: noticeInfo,
334
+ opinion,
335
+ isSubFlow,
336
+ businessId,
337
+ currentOrgProcessKey,
338
+ pendingId
339
+ },
340
+ method: 'POST'
341
+ };
342
+ this.loading = true;
343
+ util
344
+ .ajax(params)
345
+ .then((res) => {
346
+ const { message, status } = res;
347
+ this.loading = false;
348
+ if (status === 'success') {
349
+ this.simpleTips && this.$message.success('提交成功');
350
+ this.quit(true);
351
+ } else {
352
+ this.$message.error(message || '系统错误,请联系管理员!');
353
+ }
354
+ })
355
+ .catch((err) => {
356
+ this.loading = false;
357
+ if (err.message && err.message !== 'canceled') {
358
+ this.$message.error(err.message);
359
+ }
360
+ });
361
+ },
362
+ getTaskReview() {
363
+ let params = {
364
+ url: toTaskReview,
365
+ params: { pendingId: this.pendingId }
366
+ };
367
+ util
368
+ .ajax(params)
369
+ .then((res) => {
370
+ const { status, message } = res;
371
+ this.loading = false;
372
+ if (status === 'success') {
373
+ const {
374
+ data: { initiatorUser, taskExamine }
375
+ } = res;
376
+ if (taskExamine.opinion) {
377
+ this.opinion = taskExamine.opinion;
378
+ }
379
+ this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
380
+ this.onlyName = initiatorUser.username;
381
+ this.isSubFlow = taskExamine.isSubFlow;
382
+ this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
383
+ this.getFind();
384
+ this.getMessage();
385
+ } else {
386
+ this.$message.error(message || '系统错误,请联系管理员!');
387
+ }
388
+ })
389
+ .catch((err) => {
390
+ this.loading = false;
391
+ if (err.message && err.message !== 'canceled') {
392
+ this.$message.error(err.message);
393
+ }
394
+ });
395
+ },
396
+ getInfo() {
397
+ let params = {
398
+ url:
399
+ this.type == 'takeAdvice'
400
+ ? toTaskTakeAdvice
401
+ : this.type === 'startDraf'
402
+ ? toTaskStartDraft
403
+ : this.type == 'unionSeal'
404
+ ? toTaskUnionSeal
405
+ : this.type == 'twoOfficesDispatch'
406
+ ? toTwoOfficesDispatch
407
+ : toTaskUnionExamine,
408
+ params: { pendingId: this.pendingId },
409
+ headers: { Accept: 'application/json,text/plain' }
410
+ };
411
+ util
412
+ .ajax(params)
413
+ .then((res) => {
414
+ const { message, status } = res;
415
+ this.loading = false;
416
+ if (status == 'success') {
417
+ const {
418
+ data: {
419
+ choiceDeptId,
420
+ choiceOrgId,
421
+ taskExamine,
422
+ unionDispatchOrgName,
423
+ readOnlyNotificationType,
424
+ notificationMessageReadOnly,
425
+ unionDispatchOrgId,
426
+ otherOrgDisabledObjId,
427
+ orgNames,
428
+ enableCustomLimitTimeSetting,
429
+ defaultCustomLimitDays,
430
+ nodeInfoMap: {
431
+ nodeExtAttr: {
432
+ userSelectionType,
433
+ isHideOtherOrg,
434
+ isHideCurrentOrg,
435
+ isOpinionRequired
436
+ }
437
+ }
438
+ }
439
+ } = res;
440
+ if (otherOrgDisabledObjId) {
441
+ this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
442
+ }
443
+ this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
444
+ if (this.enableCustomLimitTimeSetting && defaultCustomLimitDays) {
445
+ this.infoList.customLimitTime =
446
+ this.infoList.customLimitTimeText = defaultCustomLimitDays + '';
447
+ }
448
+ if (res.data.customizedConfig) {
449
+ if (res.data.customizedConfig.currentOrgSelectorCustomized) {
450
+ this.currentMix =
451
+ res.data.customizedConfig.currentOrgSelectorSelectMix ==
452
+ 'true';
453
+ this.currentOrgTabs =
454
+ res.data.customizedConfig.currentOrgSelectorItemList.split(
455
+ ','
456
+ );
457
+ let param =
458
+ res.data.customizedConfig.currentOrgSelectorRangeList.split(
459
+ ','
460
+ );
461
+ this.currentOrgTabs.map((x, i) => {
462
+ this.params[x] = {
463
+ filid:
464
+ param[i] == 'my'
465
+ ? (this.params.filid = JSON.parse(
466
+ util.getStorage('mainConfig')
467
+ ).userModel.orgId)
468
+ : param[i],
469
+ only_filid:true
470
+ };
471
+ });
472
+ } else {
473
+ if (this.type == 'takeAdvice') {
474
+ this.params.filid = JSON.parse(
475
+ util.getStorage('mainConfig')
476
+ ).userModel.orgId;
477
+ }
478
+ }
479
+
480
+ if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
481
+ this.otherMix =
482
+ res.data.customizedConfig.foreignOrgSelectorSelectMix ==
483
+ 'true';
484
+ this.foreignOrgTabs =
485
+ res.data.customizedConfig.foreignOrgSelectorItemList.split(
486
+ ','
487
+ );
488
+ let param =
489
+ res.data.customizedConfig.foreignOrgSelectorRangeList.split(
490
+ ','
491
+ );
492
+ this.foreignOrgTabs.map((x, i) => {
493
+ this.otherParams[x] = {
494
+ filid: 'all',
495
+ roleid: this.selectorParams.roleid,
496
+ nofilid: sessionStorage.getItem('orgId')
497
+ };
498
+ });
499
+ }
500
+ }
501
+ this.readOnlyNotificationType = readOnlyNotificationType;
502
+ this.notificationMessageReadOnly =
503
+ notificationMessageReadOnly == 'true';
504
+ this.isSinglePage = taskExamine.isSinglePage;
505
+ this.isSubFlow = taskExamine.isSubFlow;
506
+ if (taskExamine.opinion) {
507
+ this.opinion = taskExamine.opinion;
508
+ }
509
+ this.choiceDeptId = choiceDeptId;
510
+ this.choiceOrgId = choiceOrgId;
511
+ if (this.type == 'takeAdvice' || this.type == 'startDraf') {
512
+ this.currentOrgName = res.data.currentOrgName;
513
+ this.otherOrgName = res.data.otherOrgName;
514
+ this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
515
+ this.isHideOtherOrg = isHideOtherOrg;
516
+ this.isHideCurrentOrg = isHideCurrentOrg;
517
+ }
518
+ this.isOpinionRequired = isOpinionRequired;
519
+ if (this.type == 'unionSeal') {
520
+ let names = unionDispatchOrgName.split(',');
521
+ let ids = unionDispatchOrgId.split(',');
522
+ names.map((x, i) => {
523
+ if (x) {
524
+ this.unionSealData.push({
525
+ showname: x,
526
+ showid: ids[i]
527
+ });
528
+ }
529
+ });
530
+ // this.onlyName = unionDispatchOrgName;
531
+ // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
532
+ }
533
+ if (this.type == 'twoOfficesDispatch') {
534
+ this.onlyName = orgNames;
535
+ this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
536
+ }
537
+ this.isMultiple(userSelectionType);
538
+ this.getFind();
539
+ this.getMessage();
540
+ } else {
541
+ this.$message.error(message || '系统错误,请联系管理员!');
542
+ }
543
+ })
544
+ .catch((err) => {
545
+ this.loading = false;
546
+ if (err.message && err.message !== 'canceled') {
547
+ this.$message.error(err.message);
548
+ }
549
+ });
550
+ },
551
+ subMit() {
552
+ // if (
553
+ // this.infoList.nextOtherOrgObjName == '' ||
554
+ // this.infoList.nextOtherOrgObjName.length == 0
555
+ // )
556
+ // return this.$message.warning('请选择联合单位');
557
+ if (this.type === 'taskReview') return this.subTaskReview();
558
+ let {
559
+ infoList: {
560
+ nextCurrentOrgObj,
561
+ nextOtherOrgObj,
562
+ noticeType,
563
+ customLimitTime,
564
+ noticeInfo
565
+ },
566
+ isOpinionRequired,
567
+ opinion,
568
+ type,
569
+ isHideOtherOrg,
570
+ choiceDeptId,
571
+ choiceOrgId,
572
+ isHideCurrentOrg,
573
+ isSubFlow,
574
+ pendingId
575
+ } = this;
576
+ console.log(nextCurrentOrgObj);
577
+ console.log(nextOtherOrgObj);
578
+ if (
579
+ type == 'takeAdvice' &&
580
+ !nextCurrentOrgObj &&
581
+ isHideCurrentOrg == 0 &&
582
+ nextCurrentOrgObj.length == 0 &&
583
+ isHideOtherOrg == 0 &&
584
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
585
+ ) {
586
+ return this.$message.warning('请选择处理对象!');
587
+ } else if (
588
+ isHideCurrentOrg == 0 &&
589
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
590
+ (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
591
+ ) {
592
+ return this.$message.warning('请选择处理对象!');
593
+ }
594
+
595
+ if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
596
+ return this.$message.warning('当前步骤必须输入意见!');
597
+ }
598
+ // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
599
+ // return this.$message.warning('暂未开放,敬请期待!');
600
+ const param = {
601
+ url:
602
+ this.type === 'startDraf'
603
+ ? taskStartDraft
604
+ : this.type == 'unionSeal'
605
+ ? taskUnionSeal
606
+ : this.type === 'twoOfficesDispatch'
607
+ ? twoOfficesDispatch
608
+ : this.type == 'takeAdvice'
609
+ ? taskTakeAdvice
610
+ : taskUnionExamine,
611
+ data: {
612
+ opinion,
613
+ pendingId,
614
+
615
+ nextOtherOrgObj:
616
+ this.type == 'unionSeal'
617
+ ? this.unionSealData.map((x) => x.showid).join(',')
618
+ : Array.isArray(nextOtherOrgObj)
619
+ ? nextOtherOrgObj.join(',')
620
+ : nextOtherOrgObj,
621
+ nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
622
+ ? nextCurrentOrgObj.join(',')
623
+ : nextCurrentOrgObj,
624
+ notificationMsg: noticeInfo,
625
+ notificationType: noticeType.join(','),
626
+ choiceDeptId,
627
+ isSubFlow,
628
+ choiceOrgId
629
+ },
630
+ headers: { Accept: 'application/json,text/plain' },
631
+ method: 'POST'
632
+ };
633
+ if (this.enableCustomLimitTimeSetting) {
634
+ param.data.customLimitTime = customLimitTime;
635
+ console.log(this.validate(), 'this.validate()');
636
+ if (!this.validate()) return;
637
+ }
638
+ this.loading = true;
639
+ util
640
+ .ajax(param)
641
+ .then((res) => {
642
+ const { message, status } = res;
643
+ this.loading = false;
644
+ if (status == 'success') {
645
+ this.simpleTips && this.$message.success('提交成功');
646
+ this.quit(true);
647
+ } else {
648
+ this.$message.error(message || '系统错误,请联系管理员!');
649
+ }
650
+ })
651
+ .catch((err) => {
652
+ this.loading = false;
653
+ if (err.message && err.message !== 'canceled') {
654
+ this.$message.error(err.message);
655
+ }
656
+ });
657
+ },
658
+ quit(val) {
659
+ if (val === true) return this.$emit('cancel', val);
660
+ this.$emit('cancel');
661
+ },
662
+ changeSelectUser(val, type) {
663
+ const { nextUser, options } = val;
664
+ let newNextUser = [];
665
+ let obj = {};
666
+ options.map((item) => {
667
+ if (obj[item.stype]) {
668
+ obj[item.stype].push(item.id);
669
+ } else {
670
+ obj[item.stype] = [item.id];
671
+ }
672
+ // if (newNextUser) {
673
+ // newNextUser += `,${item.stype}-${item.id}`;
674
+ // } else {
675
+ // newNextUser = `${item.stype}-${item.id}`;
676
+ // }
677
+ });
678
+ for (let key in obj) {
679
+ newNextUser.push(`${key}-${obj[key].join(',')}`);
680
+ }
681
+
682
+ this.infoList[type] = newNextUser.join('|');
683
+ },
684
+ getNodeType() {
685
+ util
686
+ .ajax({
687
+ url: findCodeValues,
688
+ params: {
689
+ ccCode: 'notification_type',
690
+ userId: util.getStorage('userId'),
691
+ pendingId: this.pendingId
692
+ }
693
+ })
694
+ .then((res) => {
695
+ const { status, data } = res;
696
+ this.loading = false;
697
+ if (status === 'success') {
698
+ this.infoList.noticeList = data;
699
+ }
700
+ })
701
+ .catch((err) => {
702
+ this.loading = false;
703
+ if (err.message && err.message !== 'canceled') {
704
+ this.$message.error(err.message);
705
+ }
706
+ });
707
+ },
708
+ //获取通知信息
709
+ getMessage() {
710
+ let params = {
711
+ pendingId: this.pendingId
712
+ };
713
+ util
714
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
715
+ .then((res) => {
716
+ if (res.status === 'success') {
717
+ this.infoList.noticeInfo = res.message;
718
+ }
719
+ this.loading = false;
720
+ })
721
+ .catch((err) => {
722
+ this.loading = false;
723
+ if (err.message && err.message !== 'canceled') {
724
+ this.$message.error(err.message);
725
+ }
726
+ });
727
+ },
728
+ getFind() {
729
+ util
730
+ .ajax({
731
+ url: findSysCodes
732
+ })
733
+ .then((res) => {
734
+ const { status, message } = res;
735
+ if (status === 'success') {
736
+ this.infoList.noticeType = message.split(',');
737
+ let arr = [];
738
+ this.infoList.noticeList.map((item) => {
739
+ this.infoList.noticeType.map((x) => {
740
+ if (x == item.cciValue) {
741
+ arr.push(x);
742
+ }
743
+ });
744
+ });
745
+ this.infoList.noticeType = arr;
746
+ } else {
747
+ this.$message.error(message || '系统错误,请联系管理员!');
748
+ }
749
+ })
750
+ .catch((err) => {
751
+ this.loading = false;
752
+ if (err.message && err.message !== 'canceled') {
753
+ this.$message.error(err.message);
754
+ }
755
+ });
756
+ }
757
+ }
758
+ };
759
+ </script>
760
+
761
+ <style></style>