eoss-mobiles 0.3.95 → 0.3.97

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 (249) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/lib/action-sheet.js +4 -4
  3. package/lib/button-group.js +4 -4
  4. package/lib/button.js +4 -4
  5. package/lib/calendar.js +4 -4
  6. package/lib/cascader.js +4 -4
  7. package/lib/cell.js +4 -4
  8. package/lib/checkbox.js +200 -173
  9. package/lib/circle.js +4 -4
  10. package/lib/config/api.js +16 -2
  11. package/lib/count-down.js +4 -4
  12. package/lib/date.js +108 -108
  13. package/lib/empty.js +4 -4
  14. package/lib/eoss-mobile.common.js +651 -83
  15. package/lib/esign.js +4 -4
  16. package/lib/field.js +4 -4
  17. package/lib/flow-btn.js +194 -167
  18. package/lib/flow-list.js +196 -167
  19. package/lib/flow.js +241 -212
  20. package/lib/form.js +93 -6
  21. package/lib/grid-item.js +4 -4
  22. package/lib/grid.js +12 -12
  23. package/lib/image-preview.js +15 -7
  24. package/lib/image.js +4 -4
  25. package/lib/index.js +1 -1
  26. package/lib/list.js +4 -4
  27. package/lib/loading.js +86 -86
  28. package/lib/nav-bar.js +4 -4
  29. package/lib/notice-bar.js +4 -4
  30. package/lib/pagination.js +4 -4
  31. package/lib/picker.js +200 -171
  32. package/lib/popover.js +4 -4
  33. package/lib/popup.js +4 -4
  34. package/lib/pull-refresh.js +4 -4
  35. package/lib/radio.js +199 -170
  36. package/lib/rate.js +4 -4
  37. package/lib/retrial-auth.js +194 -167
  38. package/lib/search.js +4 -4
  39. package/lib/selector.js +240 -211
  40. package/lib/skeleton.js +4 -4
  41. package/lib/stepper.js +4 -4
  42. package/lib/swipe.js +4 -4
  43. package/lib/switch.js +4 -4
  44. package/lib/tab.js +4 -4
  45. package/lib/table-column.js +194 -165
  46. package/lib/table.js +16 -16
  47. package/lib/tabs.js +4 -4
  48. package/lib/tag.js +4 -4
  49. package/lib/theme-chalk/fonts/iconfont.scss +98 -98
  50. package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
  51. package/lib/uploader.js +2472 -13
  52. package/package.json +3 -1
  53. package/packages/action-sheet/index.js +5 -5
  54. package/packages/action-sheet/src/main.vue +32 -32
  55. package/packages/button/index.js +5 -5
  56. package/packages/button/src/main.vue +15 -15
  57. package/packages/button-group/index.js +5 -5
  58. package/packages/button-group/src/main.vue +80 -80
  59. package/packages/calendar/index.js +5 -5
  60. package/packages/calendar/src/main.vue +34 -34
  61. package/packages/cascader/index.js +5 -5
  62. package/packages/cascader/src/main.vue +39 -39
  63. package/packages/cell/index.js +5 -5
  64. package/packages/cell/src/main.vue +77 -77
  65. package/packages/checkbox/index.js +5 -5
  66. package/packages/checkbox/src/main.vue +232 -232
  67. package/packages/circle/index.js +5 -5
  68. package/packages/circle/src/main.vue +27 -27
  69. package/packages/count-down/index.js +5 -5
  70. package/packages/count-down/src/main.vue +27 -27
  71. package/packages/date/index.js +5 -5
  72. package/packages/date/src/date-time.vue +290 -290
  73. package/packages/date/src/main.vue +401 -401
  74. package/packages/empty/index.js +5 -5
  75. package/packages/empty/src/main.vue +16 -16
  76. package/packages/esign/index.js +5 -5
  77. package/packages/esign/src/main.vue +144 -144
  78. package/packages/field/index.js +5 -5
  79. package/packages/field/src/main.vue +235 -235
  80. package/packages/flow/index.js +5 -5
  81. package/packages/flow/src/components/Circulate.vue +595 -595
  82. package/packages/flow/src/components/Handle.vue +2404 -2404
  83. package/packages/flow/src/components/Message.vue +208 -208
  84. package/packages/flow/src/components/ProcessSettings.vue +342 -342
  85. package/packages/flow/src/components/supervise.vue +139 -139
  86. package/packages/flow/src/flowMix.js +288 -288
  87. package/packages/flow/src/main.vue +116 -116
  88. package/packages/flow-btn/index.js +5 -5
  89. package/packages/flow-btn/src/main.vue +494 -494
  90. package/packages/flow-list/index.js +5 -5
  91. package/packages/flow-list/src/main.vue +248 -248
  92. package/packages/form/index.js +5 -5
  93. package/packages/form/src/main.vue +548 -523
  94. package/packages/grid/index.js +5 -5
  95. package/packages/grid/src/main.vue +486 -486
  96. package/packages/grid-item/index.js +5 -5
  97. package/packages/grid-item/src/main.vue +16 -16
  98. package/packages/image/index.js +5 -5
  99. package/packages/image/src/main.vue +12 -12
  100. package/packages/image-preview/index.js +5 -5
  101. package/packages/image-preview/src/main.vue +41 -34
  102. package/packages/list/index.js +5 -5
  103. package/packages/list/src/main.vue +32 -32
  104. package/packages/loading/index.js +5 -5
  105. package/packages/loading/src/main.vue +19 -19
  106. package/packages/nav-bar/index.js +5 -5
  107. package/packages/nav-bar/src/main.vue +24 -24
  108. package/packages/notice-bar/index.js +5 -5
  109. package/packages/notice-bar/src/main.vue +15 -15
  110. package/packages/pagination/index.js +5 -5
  111. package/packages/pagination/src/main.vue +73 -73
  112. package/packages/picker/index.js +5 -5
  113. package/packages/picker/src/main.vue +604 -604
  114. package/packages/popover/index.js +5 -5
  115. package/packages/popover/src/main.vue +32 -32
  116. package/packages/popup/index.js +5 -5
  117. package/packages/popup/src/main.vue +27 -27
  118. package/packages/pull-refresh/index.js +5 -5
  119. package/packages/pull-refresh/src/main.vue +31 -31
  120. package/packages/radio/index.js +5 -5
  121. package/packages/radio/src/main.vue +179 -179
  122. package/packages/rate/index.js +5 -5
  123. package/packages/rate/src/main.vue +26 -26
  124. package/packages/retrial-auth/index.js +5 -5
  125. package/packages/retrial-auth/src/main.vue +257 -257
  126. package/packages/search/index.js +5 -5
  127. package/packages/search/src/main.vue +39 -39
  128. package/packages/selector/index.js +5 -5
  129. package/packages/selector/src/main.vue +186 -186
  130. package/packages/selector/src/selector-tree.vue +1117 -1117
  131. package/packages/selector/src/tree.vue +405 -405
  132. package/packages/skeleton/index.js +5 -5
  133. package/packages/skeleton/src/main.vue +17 -17
  134. package/packages/stepper/index.js +5 -5
  135. package/packages/stepper/src/main.vue +25 -25
  136. package/packages/swipe/index.js +5 -5
  137. package/packages/swipe/src/main.vue +42 -42
  138. package/packages/switch/index.js +5 -5
  139. package/packages/switch/src/main.vue +38 -38
  140. package/packages/tab/index.js +5 -5
  141. package/packages/tab/src/main.vue +16 -16
  142. package/packages/table/index.js +5 -5
  143. package/packages/table/src/main.vue +1006 -1006
  144. package/packages/table-column/index.js +5 -5
  145. package/packages/table-column/src/main.vue +931 -931
  146. package/packages/table-column/src/mixins/table.js +12 -12
  147. package/packages/tabs/index.js +5 -5
  148. package/packages/tabs/src/main.vue +34 -34
  149. package/packages/tag/index.js +5 -5
  150. package/packages/tag/src/main.vue +16 -16
  151. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  152. package/packages/theme-chalk/lib/base.css +1 -0
  153. package/packages/theme-chalk/lib/button-group.css +1 -0
  154. package/packages/theme-chalk/lib/button.css +1 -0
  155. package/packages/theme-chalk/lib/calendar.css +1 -0
  156. package/packages/theme-chalk/lib/cascader.css +1 -0
  157. package/packages/theme-chalk/lib/cell.css +1 -0
  158. package/packages/theme-chalk/lib/checkbox.css +1 -0
  159. package/packages/theme-chalk/lib/circle.css +1 -0
  160. package/packages/theme-chalk/lib/count-down.css +0 -0
  161. package/packages/theme-chalk/lib/date.css +0 -0
  162. package/packages/theme-chalk/lib/empty.css +0 -0
  163. package/packages/theme-chalk/lib/esign.css +1 -0
  164. package/packages/theme-chalk/lib/field.css +1 -0
  165. package/packages/theme-chalk/lib/flow-btn.css +1 -0
  166. package/packages/theme-chalk/lib/flow-list-task-read.css +1 -0
  167. package/packages/theme-chalk/lib/flow-list.css +1 -0
  168. package/packages/theme-chalk/lib/flow.css +1 -0
  169. package/packages/theme-chalk/lib/fonts/iconfont.scss +98 -0
  170. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  171. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  172. package/packages/theme-chalk/lib/fonts/iconfont1.scss +90 -0
  173. package/packages/theme-chalk/lib/form.css +1 -0
  174. package/packages/theme-chalk/lib/grid-item.css +1 -0
  175. package/packages/theme-chalk/lib/grid.css +1 -0
  176. package/packages/theme-chalk/lib/icon.css +1 -0
  177. package/packages/theme-chalk/lib/image-preview.css +0 -0
  178. package/packages/theme-chalk/lib/image.css +0 -0
  179. package/packages/theme-chalk/lib/index.css +1 -0
  180. package/packages/theme-chalk/lib/list.css +0 -0
  181. package/packages/theme-chalk/lib/loading.css +0 -0
  182. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  183. package/packages/theme-chalk/lib/navbar.css +1 -0
  184. package/packages/theme-chalk/lib/notice-bar.css +0 -0
  185. package/packages/theme-chalk/lib/pagination.css +1 -0
  186. package/packages/theme-chalk/lib/picker.css +1 -0
  187. package/packages/theme-chalk/lib/popover.css +0 -0
  188. package/packages/theme-chalk/lib/popup.css +0 -0
  189. package/packages/theme-chalk/lib/pull-refresh.css +0 -0
  190. package/packages/theme-chalk/lib/radio.css +1 -0
  191. package/packages/theme-chalk/lib/rate.css +0 -0
  192. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  193. package/packages/theme-chalk/lib/search.css +0 -0
  194. package/packages/theme-chalk/lib/selector.css +1 -0
  195. package/packages/theme-chalk/lib/skeleton.css +0 -0
  196. package/packages/theme-chalk/lib/stepper.css +1 -0
  197. package/packages/theme-chalk/lib/swipe.css +0 -0
  198. package/packages/theme-chalk/lib/switch.css +1 -0
  199. package/packages/theme-chalk/lib/tab.css +0 -0
  200. package/packages/theme-chalk/lib/table-column.css +0 -0
  201. package/packages/theme-chalk/lib/table.css +1 -0
  202. package/packages/theme-chalk/lib/tabs.css +1 -0
  203. package/packages/theme-chalk/lib/tag.css +1 -0
  204. package/packages/theme-chalk/lib/theme.css +0 -0
  205. package/packages/theme-chalk/lib/tree.css +1 -0
  206. package/packages/theme-chalk/lib/uploader.css +0 -0
  207. package/packages/theme-chalk/src/base.scss +195 -195
  208. package/packages/theme-chalk/src/button-group.scss +25 -25
  209. package/packages/theme-chalk/src/button.scss +2 -2
  210. package/packages/theme-chalk/src/calendar.scss +11 -11
  211. package/packages/theme-chalk/src/cascader.scss +11 -11
  212. package/packages/theme-chalk/src/cell.scss +14 -14
  213. package/packages/theme-chalk/src/checkbox.scss +9 -9
  214. package/packages/theme-chalk/src/circle.scss +6 -6
  215. package/packages/theme-chalk/src/common/var.scss +1525 -1525
  216. package/packages/theme-chalk/src/esign.scss +51 -51
  217. package/packages/theme-chalk/src/field.scss +98 -98
  218. package/packages/theme-chalk/src/flow-btn.scss +99 -99
  219. package/packages/theme-chalk/src/flow-list.scss +122 -122
  220. package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
  221. package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
  222. package/packages/theme-chalk/src/form.scss +33 -33
  223. package/packages/theme-chalk/src/grid-item.scss +16 -16
  224. package/packages/theme-chalk/src/grid.scss +46 -46
  225. package/packages/theme-chalk/src/icon.scss +1661 -1661
  226. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  227. package/packages/theme-chalk/src/navbar.scss +5 -5
  228. package/packages/theme-chalk/src/pagination.scss +12 -12
  229. package/packages/theme-chalk/src/picker.scss +31 -31
  230. package/packages/theme-chalk/src/radio.scss +6 -6
  231. package/packages/theme-chalk/src/retrial-auth.scss +28 -28
  232. package/packages/theme-chalk/src/selector.scss +247 -247
  233. package/packages/theme-chalk/src/stepper.scss +9 -9
  234. package/packages/theme-chalk/src/switch.scss +5 -5
  235. package/packages/theme-chalk/src/table.scss +86 -86
  236. package/packages/theme-chalk/src/tabs.scss +31 -31
  237. package/packages/theme-chalk/src/tag.scss +12 -12
  238. package/packages/theme-chalk/src/theme.scss +1 -1
  239. package/packages/theme-chalk/src/tree.scss +127 -127
  240. package/packages/uploader/index.js +5 -5
  241. package/packages/uploader/src/main.vue +586 -31
  242. package/src/config/api.js +18 -0
  243. package/src/index.js +1 -1
  244. package/src/utils/axios.js +217 -217
  245. package/src/utils/date-util.js +312 -312
  246. package/src/utils/http.js +106 -106
  247. package/src/utils/rules.js +18 -18
  248. package/src/utils/store.js +21 -21
  249. package/packages/theme-chalk/gulpfile.js +0 -25
@@ -1,288 +1,288 @@
1
- import {
2
- getHandleInfoHtml,
3
- toStartTaskReadHtml,
4
- handleTaskRead,
5
- toTaskRejectHtml,
6
- taskReadHtml
7
- } from '../../../src/config/api.js';
8
- import request from '../../../src/utils/http.js';
9
- import util from '../../../src/utils/util.js';
10
- export default {
11
- methods: {
12
- // 获取驳回信息
13
- getProcessObjReject() {
14
- const _that = this;
15
- this.$toast.loading({
16
- message: '加载中...',
17
- forbidClick: true,
18
- loadingType: 'spinner',
19
- overlay: true,
20
- duration: 0
21
- });
22
- request({
23
- url: _that.baseUrl
24
- ? _that.baseUrl + toTaskRejectHtml
25
- : toTaskRejectHtml,
26
- params: {
27
- appid: this.appid,
28
- pendingId: this.pendingId,
29
- identityIds: this.userId || util.getStorage('userId')
30
- }
31
- }).then(res => {
32
- if (res.rCode === 0) {
33
- this.$toast.clear();
34
- this.isHiddenOftenOpinion =
35
- res.results.nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
36
- this.nodeDefaultRejectOpinion =
37
- res.results.nodeInfoMap.nodeExtAttr.nodeDefaultRejectOpinion;
38
- this.isBanInputOpinion =
39
- res.results.nodeInfoMap.nodeExtAttr.isBanInputOpinion;
40
- if (!this.isBanInputOpinion) {
41
- this.isBanInputOpinion = 0;
42
- }
43
- this.processObj = res.results;
44
- this.form.notificationMsg = res.results.defaultNotificationMessage;
45
- this.defaultNotificationType = res.results.defaultNotificationType.split(
46
- ','
47
- );
48
- let list = [];
49
- if (res.results.rejectTaskNodes) {
50
- for (let i in res.results.rejectTaskNodes) {
51
- let obj = {
52
- id: i,
53
- name: res.results.rejectTaskNodes[i]
54
- };
55
- list.push(obj);
56
- }
57
- this.rejectObj = list;
58
- if (this.rejectObj.length > 0) {
59
- this.form.nextNodeId = this.rejectObj[0].id;
60
- this.rejectObj.map(item => {
61
- item.value = item.id;
62
- });
63
- }
64
- }
65
- } else {
66
- this.$toast(res.message);
67
- }
68
- });
69
- },
70
- getProcessObj() {
71
- let that = this;
72
- return new Promise(function(resolve, reiect) {
73
- request({
74
- url: that.baseUrl
75
- ? that.baseUrl + getHandleInfoHtml
76
- : getHandleInfoHtml,
77
- params: {
78
- pendingId: that.pendingId,
79
- identityIds: that.identityIds
80
- }
81
- }).then(res => {
82
- if (res.rCode === 0) {
83
- that.isHiddenOftenOpinion =
84
- res.results.nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
85
- that.nodeDefaultSubmitOpinion =
86
- res.results.nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
87
- that.form.notificationMsg = res.results.defaultNotificationMessage;
88
- that.defaultNotificationType = res.results.defaultNotificationType.split(
89
- ','
90
- );
91
- that.isCanAddSign = res.results.isCanAddSign;
92
- if (that.isCanAddSign) {
93
- that.form.isAddSign = '2';
94
- }
95
- that.isCanRemoveSign = res.results.isCanRemoveSign;
96
- if (that.isCanRemoveSign) {
97
- that.form.isRemoveSign = '2';
98
- }
99
- that.isSpecial = res.results.isSpecial;
100
- that.processObj = res.results;
101
- that.taskOperations = res.results.taskOperations;
102
- if (that.taskOperations && that.taskOperations.length > 0) {
103
- let isSelected = false;
104
- that.taskOperations.map(item => {
105
- if (item.isSelected) {
106
- isSelected = true;
107
- that.form.nextOperate = item.key;
108
- that.form.nextOperateName = item.value;
109
- if (!item.taskNodeList || item.taskNodeList.length === 0) {
110
- that.form.nextNodeId = undefined;
111
- that.form.nextNodeName = undefined;
112
- } else {
113
- that.nodeList = item.taskNodeList;
114
- let info = [];
115
- that.nodeList.map((x, y) => {
116
- if (
117
- x.nodeId ===
118
- res.results.nodeInfoMap.nodeExtAttr.defaultNextNode
119
- ) {
120
- info.push(x);
121
- that.nextNodeDefault = y;
122
- }
123
- });
124
- if (info.length > 0) {
125
- that.form.nextNodeId = info[0].nodeId;
126
- that.form.nextNodeName = info[0].nodeName;
127
- }
128
- // that.form.nextNodeId = that.nodeList[0].nodeId;
129
- // that.form.nextNodeName = that.nodeList[0].nodeName;
130
- }
131
- // if (item.key == 9) {
132
- // that.isHiddenNextStepInfo = true;
133
- // }
134
- }
135
- });
136
- if (isSelected) {
137
- that.form.nextOperate = that.taskOperations[0].key;
138
- that.form.nextOperateName = that.taskOperations[0].value;
139
- that.nodeList = that.taskOperations[0].taskNodeList || [];
140
- if (that.nodeList && that.nodeList.length > 0) {
141
- that.form.nextNodeId = that.nodeList[0].nodeId;
142
- that.form.nextNodeName = that.nodeList[0].nodeName;
143
- }
144
- }
145
- }
146
- that.isOpinionRequired =
147
- res.results.nodeInfoMap.nodeExtAttr.isOpinionRequired;
148
- that.isBanInputOpinion =
149
- res.results.nodeInfoMap.nodeExtAttr.isBanInputOpinion;
150
- if (!that.isOpinionRequired) {
151
- that.isOpinionRequired = 0;
152
- }
153
- if (!that.isBanInputOpinion) {
154
- that.isBanInputOpinion = 0;
155
- }
156
- // that.countersignaturetypeText = res.results.taskExamine.nodeName
157
- if (res.results.taskExamine) {
158
- that.countersignaturetypeText = res.results.taskExamine.nodeName;
159
- }
160
- that.countersignaturetypeCode =
161
- res.results.countersignaturetypeCode !== 0 &&
162
- res.results.countersignaturetypeCode !== undefined;
163
- that.isMainSubProcess = res.results.isMainSubProcess === true;
164
- that.isCustomPreset = res.results.isCustomPreset;
165
- // form.isRemoveSign !== '1' &&
166
- // form.isAddSign !== '1' &&
167
- // nodeList &&
168
- // nodeList.length > 0 &&
169
- // isHiddenNextStepInfo
170
- resolve();
171
- } else {
172
- that.$toast(res.message);
173
- reiect();
174
- }
175
- });
176
- });
177
- },
178
- onSubmitReadEnd() {
179
- const _that = this;
180
- let params = {
181
- url: _that.baseUrl ? _that.baseUrl + handleTaskRead : handleTaskRead,
182
- params: {
183
- pendingId: this.pendingId,
184
- businessId: this.businessId,
185
- opinion: this.form.handleExplain,
186
- notificationMsgType: this.form.notificationMsgType,
187
- notificationMsg: this.form.notificationMsg,
188
- isImageOpinion: 0
189
- }
190
- };
191
- if (this.beforeSubmit) {
192
- this.beforeSubmit(params.params);
193
- return;
194
- }
195
- this.$toast.loading({
196
- message: '加载中...',
197
- forbidClick: true,
198
- loadingType: 'spinner',
199
- overlay: true,
200
- duration: 0
201
- });
202
-
203
- request(params)
204
- .then(res => {
205
- if (res.rCode === 0) {
206
- this.$toast('操作成功');
207
- this.$parent.$emit('success');
208
- } else {
209
- this.$toast(res.msg);
210
- }
211
- })
212
- .catch(() => {
213
- this.$toast('数据返回失败');
214
- });
215
- },
216
- onSubmitRead() {
217
- const _that = this;
218
- if (
219
- !this.nextReadUserSelectList ||
220
- this.nextReadUserSelectList.length === 0
221
- ) {
222
- this.$toast('请选择分阅人员');
223
- return;
224
- }
225
- let ids = '';
226
- this.nextReadUserSelectList.map((r, i) => {
227
- ids =
228
- ids +
229
- r.showid +
230
- (i === this.nextReadUserSelectList.length - 1 ? '' : ',');
231
- });
232
- let params = {
233
- url: _that.baseUrl ? _that.baseUrl + taskReadHtml : taskReadHtml,
234
- params: {
235
- pendingId: this.pendingId,
236
- appId: this.appid,
237
- handleExplain: this.form.handleExplain,
238
- notificationMsgType: this.form.notificationMsgType,
239
- notificationMsg: this.form.notificationMsg,
240
- nextReadUserId: ids
241
- }
242
- };
243
- if (this.beforeSubmit) {
244
- this.beforeSubmit(params.params);
245
- return;
246
- }
247
- this.$toast.loading({
248
- message: '加载中...',
249
- forbidClick: true,
250
- loadingType: 'spinner',
251
- overlay: true,
252
- duration: 0
253
- });
254
- request(params)
255
- .then(res => {
256
- if (res.rCode === 0) {
257
- this.$toast('操作成功');
258
- this.$parent.$emit('success');
259
- } else {
260
- this.$toast(res.msg);
261
- }
262
- })
263
- .catch(err => {
264
- console.log(err);
265
- this.$toast('数据返回失败');
266
- });
267
- }
268
- },
269
- getProcessObj() {
270
- const _that = this;
271
- request({
272
- url: _that.baseUrl
273
- ? _that.baseUrl + toStartTaskReadHtml
274
- : toStartTaskReadHtml,
275
- params: {
276
- appId: this.appid,
277
- pendingId: this.pendingId,
278
- identityIds: this.userId
279
- }
280
- }).then(res => {
281
- if (res.status === 'success') {
282
- this.processObj = res.data;
283
- } else {
284
- this.$toast(res.message);
285
- }
286
- });
287
- }
288
- };
1
+ import {
2
+ getHandleInfoHtml,
3
+ toStartTaskReadHtml,
4
+ handleTaskRead,
5
+ toTaskRejectHtml,
6
+ taskReadHtml
7
+ } from '../../../src/config/api.js';
8
+ import request from '../../../src/utils/http.js';
9
+ import util from '../../../src/utils/util.js';
10
+ export default {
11
+ methods: {
12
+ // 获取驳回信息
13
+ getProcessObjReject() {
14
+ const _that = this;
15
+ this.$toast.loading({
16
+ message: '加载中...',
17
+ forbidClick: true,
18
+ loadingType: 'spinner',
19
+ overlay: true,
20
+ duration: 0
21
+ });
22
+ request({
23
+ url: _that.baseUrl
24
+ ? _that.baseUrl + toTaskRejectHtml
25
+ : toTaskRejectHtml,
26
+ params: {
27
+ appid: this.appid,
28
+ pendingId: this.pendingId,
29
+ identityIds: this.userId || util.getStorage('userId')
30
+ }
31
+ }).then(res => {
32
+ if (res.rCode === 0) {
33
+ this.$toast.clear();
34
+ this.isHiddenOftenOpinion =
35
+ res.results.nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
36
+ this.nodeDefaultRejectOpinion =
37
+ res.results.nodeInfoMap.nodeExtAttr.nodeDefaultRejectOpinion;
38
+ this.isBanInputOpinion =
39
+ res.results.nodeInfoMap.nodeExtAttr.isBanInputOpinion;
40
+ if (!this.isBanInputOpinion) {
41
+ this.isBanInputOpinion = 0;
42
+ }
43
+ this.processObj = res.results;
44
+ this.form.notificationMsg = res.results.defaultNotificationMessage;
45
+ this.defaultNotificationType = res.results.defaultNotificationType.split(
46
+ ','
47
+ );
48
+ let list = [];
49
+ if (res.results.rejectTaskNodes) {
50
+ for (let i in res.results.rejectTaskNodes) {
51
+ let obj = {
52
+ id: i,
53
+ name: res.results.rejectTaskNodes[i]
54
+ };
55
+ list.push(obj);
56
+ }
57
+ this.rejectObj = list;
58
+ if (this.rejectObj.length > 0) {
59
+ this.form.nextNodeId = this.rejectObj[0].id;
60
+ this.rejectObj.map(item => {
61
+ item.value = item.id;
62
+ });
63
+ }
64
+ }
65
+ } else {
66
+ this.$toast(res.message);
67
+ }
68
+ });
69
+ },
70
+ getProcessObj() {
71
+ let that = this;
72
+ return new Promise(function(resolve, reiect) {
73
+ request({
74
+ url: that.baseUrl
75
+ ? that.baseUrl + getHandleInfoHtml
76
+ : getHandleInfoHtml,
77
+ params: {
78
+ pendingId: that.pendingId,
79
+ identityIds: that.identityIds
80
+ }
81
+ }).then(res => {
82
+ if (res.rCode === 0) {
83
+ that.isHiddenOftenOpinion =
84
+ res.results.nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
85
+ that.nodeDefaultSubmitOpinion =
86
+ res.results.nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
87
+ that.form.notificationMsg = res.results.defaultNotificationMessage;
88
+ that.defaultNotificationType = res.results.defaultNotificationType.split(
89
+ ','
90
+ );
91
+ that.isCanAddSign = res.results.isCanAddSign;
92
+ if (that.isCanAddSign) {
93
+ that.form.isAddSign = '2';
94
+ }
95
+ that.isCanRemoveSign = res.results.isCanRemoveSign;
96
+ if (that.isCanRemoveSign) {
97
+ that.form.isRemoveSign = '2';
98
+ }
99
+ that.isSpecial = res.results.isSpecial;
100
+ that.processObj = res.results;
101
+ that.taskOperations = res.results.taskOperations;
102
+ if (that.taskOperations && that.taskOperations.length > 0) {
103
+ let isSelected = false;
104
+ that.taskOperations.map(item => {
105
+ if (item.isSelected) {
106
+ isSelected = true;
107
+ that.form.nextOperate = item.key;
108
+ that.form.nextOperateName = item.value;
109
+ if (!item.taskNodeList || item.taskNodeList.length === 0) {
110
+ that.form.nextNodeId = undefined;
111
+ that.form.nextNodeName = undefined;
112
+ } else {
113
+ that.nodeList = item.taskNodeList;
114
+ let info = [];
115
+ that.nodeList.map((x, y) => {
116
+ if (
117
+ x.nodeId ===
118
+ res.results.nodeInfoMap.nodeExtAttr.defaultNextNode
119
+ ) {
120
+ info.push(x);
121
+ that.nextNodeDefault = y;
122
+ }
123
+ });
124
+ if (info.length > 0) {
125
+ that.form.nextNodeId = info[0].nodeId;
126
+ that.form.nextNodeName = info[0].nodeName;
127
+ }
128
+ // that.form.nextNodeId = that.nodeList[0].nodeId;
129
+ // that.form.nextNodeName = that.nodeList[0].nodeName;
130
+ }
131
+ // if (item.key == 9) {
132
+ // that.isHiddenNextStepInfo = true;
133
+ // }
134
+ }
135
+ });
136
+ if (isSelected) {
137
+ that.form.nextOperate = that.taskOperations[0].key;
138
+ that.form.nextOperateName = that.taskOperations[0].value;
139
+ that.nodeList = that.taskOperations[0].taskNodeList || [];
140
+ if (that.nodeList && that.nodeList.length > 0) {
141
+ that.form.nextNodeId = that.nodeList[0].nodeId;
142
+ that.form.nextNodeName = that.nodeList[0].nodeName;
143
+ }
144
+ }
145
+ }
146
+ that.isOpinionRequired =
147
+ res.results.nodeInfoMap.nodeExtAttr.isOpinionRequired;
148
+ that.isBanInputOpinion =
149
+ res.results.nodeInfoMap.nodeExtAttr.isBanInputOpinion;
150
+ if (!that.isOpinionRequired) {
151
+ that.isOpinionRequired = 0;
152
+ }
153
+ if (!that.isBanInputOpinion) {
154
+ that.isBanInputOpinion = 0;
155
+ }
156
+ // that.countersignaturetypeText = res.results.taskExamine.nodeName
157
+ if (res.results.taskExamine) {
158
+ that.countersignaturetypeText = res.results.taskExamine.nodeName;
159
+ }
160
+ that.countersignaturetypeCode =
161
+ res.results.countersignaturetypeCode !== 0 &&
162
+ res.results.countersignaturetypeCode !== undefined;
163
+ that.isMainSubProcess = res.results.isMainSubProcess === true;
164
+ that.isCustomPreset = res.results.isCustomPreset;
165
+ // form.isRemoveSign !== '1' &&
166
+ // form.isAddSign !== '1' &&
167
+ // nodeList &&
168
+ // nodeList.length > 0 &&
169
+ // isHiddenNextStepInfo
170
+ resolve();
171
+ } else {
172
+ that.$toast(res.message);
173
+ reiect();
174
+ }
175
+ });
176
+ });
177
+ },
178
+ onSubmitReadEnd() {
179
+ const _that = this;
180
+ let params = {
181
+ url: _that.baseUrl ? _that.baseUrl + handleTaskRead : handleTaskRead,
182
+ params: {
183
+ pendingId: this.pendingId,
184
+ businessId: this.businessId,
185
+ opinion: this.form.handleExplain,
186
+ notificationMsgType: this.form.notificationMsgType,
187
+ notificationMsg: this.form.notificationMsg,
188
+ isImageOpinion: 0
189
+ }
190
+ };
191
+ if (this.beforeSubmit) {
192
+ this.beforeSubmit(params.params);
193
+ return;
194
+ }
195
+ this.$toast.loading({
196
+ message: '加载中...',
197
+ forbidClick: true,
198
+ loadingType: 'spinner',
199
+ overlay: true,
200
+ duration: 0
201
+ });
202
+
203
+ request(params)
204
+ .then(res => {
205
+ if (res.rCode === 0) {
206
+ this.$toast('操作成功');
207
+ this.$parent.$emit('success');
208
+ } else {
209
+ this.$toast(res.msg);
210
+ }
211
+ })
212
+ .catch(() => {
213
+ this.$toast('数据返回失败');
214
+ });
215
+ },
216
+ onSubmitRead() {
217
+ const _that = this;
218
+ if (
219
+ !this.nextReadUserSelectList ||
220
+ this.nextReadUserSelectList.length === 0
221
+ ) {
222
+ this.$toast('请选择分阅人员');
223
+ return;
224
+ }
225
+ let ids = '';
226
+ this.nextReadUserSelectList.map((r, i) => {
227
+ ids =
228
+ ids +
229
+ r.showid +
230
+ (i === this.nextReadUserSelectList.length - 1 ? '' : ',');
231
+ });
232
+ let params = {
233
+ url: _that.baseUrl ? _that.baseUrl + taskReadHtml : taskReadHtml,
234
+ params: {
235
+ pendingId: this.pendingId,
236
+ appId: this.appid,
237
+ handleExplain: this.form.handleExplain,
238
+ notificationMsgType: this.form.notificationMsgType,
239
+ notificationMsg: this.form.notificationMsg,
240
+ nextReadUserId: ids
241
+ }
242
+ };
243
+ if (this.beforeSubmit) {
244
+ this.beforeSubmit(params.params);
245
+ return;
246
+ }
247
+ this.$toast.loading({
248
+ message: '加载中...',
249
+ forbidClick: true,
250
+ loadingType: 'spinner',
251
+ overlay: true,
252
+ duration: 0
253
+ });
254
+ request(params)
255
+ .then(res => {
256
+ if (res.rCode === 0) {
257
+ this.$toast('操作成功');
258
+ this.$parent.$emit('success');
259
+ } else {
260
+ this.$toast(res.msg);
261
+ }
262
+ })
263
+ .catch(err => {
264
+ console.log(err);
265
+ this.$toast('数据返回失败');
266
+ });
267
+ }
268
+ },
269
+ getProcessObj() {
270
+ const _that = this;
271
+ request({
272
+ url: _that.baseUrl
273
+ ? _that.baseUrl + toStartTaskReadHtml
274
+ : toStartTaskReadHtml,
275
+ params: {
276
+ appId: this.appid,
277
+ pendingId: this.pendingId,
278
+ identityIds: this.userId
279
+ }
280
+ }).then(res => {
281
+ if (res.status === 'success') {
282
+ this.processObj = res.data;
283
+ } else {
284
+ this.$toast(res.message);
285
+ }
286
+ });
287
+ }
288
+ };