eoss-mobiles 0.3.97 → 0.3.99

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 (213) hide show
  1. package/lib/checkbox.js +21 -0
  2. package/lib/eoss-mobile.common.js +284 -123
  3. package/lib/flow-btn.js +21 -0
  4. package/lib/flow-list.js +21 -0
  5. package/lib/flow.js +244 -83
  6. package/lib/index.js +1 -1
  7. package/lib/picker.js +27 -6
  8. package/lib/radio.js +26 -5
  9. package/lib/retrial-auth.js +21 -0
  10. package/lib/selector.js +49 -28
  11. package/lib/table-column.js +21 -0
  12. package/lib/table.js +21 -0
  13. package/lib/theme-chalk/fonts/iconfont.scss +98 -98
  14. package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
  15. package/lib/uploader.js +21 -0
  16. package/lib/utils/util.js +21 -0
  17. package/package.json +1 -1
  18. package/packages/action-sheet/index.js +5 -5
  19. package/packages/action-sheet/src/main.vue +32 -32
  20. package/packages/button/index.js +5 -5
  21. package/packages/button/src/main.vue +15 -15
  22. package/packages/button-group/index.js +5 -5
  23. package/packages/button-group/src/main.vue +80 -80
  24. package/packages/calendar/index.js +5 -5
  25. package/packages/calendar/src/main.vue +34 -34
  26. package/packages/cascader/index.js +5 -5
  27. package/packages/cascader/src/main.vue +39 -39
  28. package/packages/cell/index.js +5 -5
  29. package/packages/cell/src/main.vue +77 -77
  30. package/packages/checkbox/index.js +5 -5
  31. package/packages/checkbox/src/main.vue +232 -232
  32. package/packages/circle/index.js +5 -5
  33. package/packages/circle/src/main.vue +27 -27
  34. package/packages/count-down/index.js +5 -5
  35. package/packages/count-down/src/main.vue +27 -27
  36. package/packages/date/index.js +5 -5
  37. package/packages/date/src/date-time.vue +290 -290
  38. package/packages/date/src/main.vue +401 -401
  39. package/packages/empty/index.js +5 -5
  40. package/packages/empty/src/main.vue +16 -16
  41. package/packages/esign/index.js +5 -5
  42. package/packages/esign/src/main.vue +144 -144
  43. package/packages/field/index.js +5 -5
  44. package/packages/flow/index.js +5 -5
  45. package/packages/flow/src/components/Circulate.vue +595 -595
  46. package/packages/flow/src/components/Handle.vue +2404 -2404
  47. package/packages/flow/src/components/Message.vue +208 -208
  48. package/packages/flow/src/components/ProcessSettings.vue +342 -342
  49. package/packages/flow/src/components/TaskRead.vue +100 -4
  50. package/packages/flow/src/components/supervise.vue +139 -139
  51. package/packages/flow/src/flowMix.js +288 -288
  52. package/packages/flow/src/main.vue +116 -116
  53. package/packages/flow-btn/index.js +5 -5
  54. package/packages/flow-btn/src/main.vue +494 -494
  55. package/packages/flow-list/index.js +5 -5
  56. package/packages/flow-list/src/main.vue +248 -248
  57. package/packages/form/index.js +5 -5
  58. package/packages/grid/index.js +5 -5
  59. package/packages/grid/src/main.vue +486 -486
  60. package/packages/grid-item/index.js +5 -5
  61. package/packages/grid-item/src/main.vue +16 -16
  62. package/packages/image/index.js +5 -5
  63. package/packages/image/src/main.vue +12 -12
  64. package/packages/image-preview/index.js +5 -5
  65. package/packages/list/index.js +5 -5
  66. package/packages/list/src/main.vue +32 -32
  67. package/packages/loading/index.js +5 -5
  68. package/packages/loading/src/main.vue +19 -19
  69. package/packages/nav-bar/index.js +5 -5
  70. package/packages/nav-bar/src/main.vue +24 -24
  71. package/packages/notice-bar/index.js +5 -5
  72. package/packages/notice-bar/src/main.vue +15 -15
  73. package/packages/pagination/index.js +5 -5
  74. package/packages/pagination/src/main.vue +73 -73
  75. package/packages/picker/index.js +5 -5
  76. package/packages/picker/src/main.vue +604 -604
  77. package/packages/popover/index.js +5 -5
  78. package/packages/popover/src/main.vue +32 -32
  79. package/packages/popup/index.js +5 -5
  80. package/packages/popup/src/main.vue +27 -27
  81. package/packages/pull-refresh/index.js +5 -5
  82. package/packages/pull-refresh/src/main.vue +31 -31
  83. package/packages/radio/index.js +5 -5
  84. package/packages/radio/src/main.vue +179 -179
  85. package/packages/rate/index.js +5 -5
  86. package/packages/rate/src/main.vue +26 -26
  87. package/packages/retrial-auth/index.js +5 -5
  88. package/packages/retrial-auth/src/main.vue +257 -257
  89. package/packages/search/index.js +5 -5
  90. package/packages/search/src/main.vue +39 -39
  91. package/packages/selector/index.js +5 -5
  92. package/packages/selector/src/main.vue +186 -186
  93. package/packages/selector/src/selector-tree.vue +1117 -1117
  94. package/packages/selector/src/tree.vue +405 -405
  95. package/packages/skeleton/index.js +5 -5
  96. package/packages/skeleton/src/main.vue +17 -17
  97. package/packages/stepper/index.js +5 -5
  98. package/packages/stepper/src/main.vue +25 -25
  99. package/packages/swipe/index.js +5 -5
  100. package/packages/swipe/src/main.vue +42 -42
  101. package/packages/switch/index.js +5 -5
  102. package/packages/switch/src/main.vue +38 -38
  103. package/packages/tab/index.js +5 -5
  104. package/packages/tab/src/main.vue +16 -16
  105. package/packages/table/index.js +5 -5
  106. package/packages/table/src/main.vue +1006 -1006
  107. package/packages/table-column/index.js +5 -5
  108. package/packages/table-column/src/main.vue +931 -931
  109. package/packages/table-column/src/mixins/table.js +12 -12
  110. package/packages/tabs/index.js +5 -5
  111. package/packages/tabs/src/main.vue +34 -34
  112. package/packages/tag/index.js +5 -5
  113. package/packages/tag/src/main.vue +16 -16
  114. package/packages/theme-chalk/gulpfile.js +25 -0
  115. package/packages/theme-chalk/src/base.scss +195 -195
  116. package/packages/theme-chalk/src/button-group.scss +25 -25
  117. package/packages/theme-chalk/src/button.scss +2 -2
  118. package/packages/theme-chalk/src/calendar.scss +11 -11
  119. package/packages/theme-chalk/src/cascader.scss +11 -11
  120. package/packages/theme-chalk/src/cell.scss +14 -14
  121. package/packages/theme-chalk/src/checkbox.scss +9 -9
  122. package/packages/theme-chalk/src/circle.scss +6 -6
  123. package/packages/theme-chalk/src/common/var.scss +1525 -1525
  124. package/packages/theme-chalk/src/esign.scss +51 -51
  125. package/packages/theme-chalk/src/field.scss +98 -98
  126. package/packages/theme-chalk/src/flow-btn.scss +99 -99
  127. package/packages/theme-chalk/src/flow-list.scss +122 -122
  128. package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
  129. package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
  130. package/packages/theme-chalk/src/form.scss +33 -33
  131. package/packages/theme-chalk/src/grid-item.scss +16 -16
  132. package/packages/theme-chalk/src/grid.scss +46 -46
  133. package/packages/theme-chalk/src/icon.scss +1661 -1661
  134. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  135. package/packages/theme-chalk/src/navbar.scss +5 -5
  136. package/packages/theme-chalk/src/pagination.scss +12 -12
  137. package/packages/theme-chalk/src/picker.scss +31 -31
  138. package/packages/theme-chalk/src/radio.scss +6 -6
  139. package/packages/theme-chalk/src/retrial-auth.scss +28 -28
  140. package/packages/theme-chalk/src/selector.scss +247 -247
  141. package/packages/theme-chalk/src/stepper.scss +9 -9
  142. package/packages/theme-chalk/src/switch.scss +5 -5
  143. package/packages/theme-chalk/src/table.scss +86 -86
  144. package/packages/theme-chalk/src/tabs.scss +31 -31
  145. package/packages/theme-chalk/src/tag.scss +12 -12
  146. package/packages/theme-chalk/src/theme.scss +1 -1
  147. package/packages/theme-chalk/src/tree.scss +127 -127
  148. package/packages/uploader/index.js +5 -5
  149. package/src/config/api.js +190 -190
  150. package/src/index.js +1 -1
  151. package/src/utils/axios.js +217 -217
  152. package/src/utils/date-util.js +312 -312
  153. package/src/utils/http.js +106 -106
  154. package/src/utils/rules.js +18 -18
  155. package/src/utils/store.js +21 -21
  156. package/src/utils/util.js +21 -0
  157. package/CHANGELOG.md +0 -95
  158. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  159. package/packages/theme-chalk/lib/base.css +0 -1
  160. package/packages/theme-chalk/lib/button-group.css +0 -1
  161. package/packages/theme-chalk/lib/button.css +0 -1
  162. package/packages/theme-chalk/lib/calendar.css +0 -1
  163. package/packages/theme-chalk/lib/cascader.css +0 -1
  164. package/packages/theme-chalk/lib/cell.css +0 -1
  165. package/packages/theme-chalk/lib/checkbox.css +0 -1
  166. package/packages/theme-chalk/lib/circle.css +0 -1
  167. package/packages/theme-chalk/lib/count-down.css +0 -0
  168. package/packages/theme-chalk/lib/date.css +0 -0
  169. package/packages/theme-chalk/lib/empty.css +0 -0
  170. package/packages/theme-chalk/lib/esign.css +0 -1
  171. package/packages/theme-chalk/lib/field.css +0 -1
  172. package/packages/theme-chalk/lib/flow-btn.css +0 -1
  173. package/packages/theme-chalk/lib/flow-list-task-read.css +0 -1
  174. package/packages/theme-chalk/lib/flow-list.css +0 -1
  175. package/packages/theme-chalk/lib/flow.css +0 -1
  176. package/packages/theme-chalk/lib/fonts/iconfont.scss +0 -98
  177. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  178. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  179. package/packages/theme-chalk/lib/fonts/iconfont1.scss +0 -90
  180. package/packages/theme-chalk/lib/form.css +0 -1
  181. package/packages/theme-chalk/lib/grid-item.css +0 -1
  182. package/packages/theme-chalk/lib/grid.css +0 -1
  183. package/packages/theme-chalk/lib/icon.css +0 -1
  184. package/packages/theme-chalk/lib/image-preview.css +0 -0
  185. package/packages/theme-chalk/lib/image.css +0 -0
  186. package/packages/theme-chalk/lib/index.css +0 -1
  187. package/packages/theme-chalk/lib/list.css +0 -0
  188. package/packages/theme-chalk/lib/loading.css +0 -0
  189. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  190. package/packages/theme-chalk/lib/navbar.css +0 -1
  191. package/packages/theme-chalk/lib/notice-bar.css +0 -0
  192. package/packages/theme-chalk/lib/pagination.css +0 -1
  193. package/packages/theme-chalk/lib/picker.css +0 -1
  194. package/packages/theme-chalk/lib/popover.css +0 -0
  195. package/packages/theme-chalk/lib/popup.css +0 -0
  196. package/packages/theme-chalk/lib/pull-refresh.css +0 -0
  197. package/packages/theme-chalk/lib/radio.css +0 -1
  198. package/packages/theme-chalk/lib/rate.css +0 -0
  199. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  200. package/packages/theme-chalk/lib/search.css +0 -0
  201. package/packages/theme-chalk/lib/selector.css +0 -1
  202. package/packages/theme-chalk/lib/skeleton.css +0 -0
  203. package/packages/theme-chalk/lib/stepper.css +0 -1
  204. package/packages/theme-chalk/lib/swipe.css +0 -0
  205. package/packages/theme-chalk/lib/switch.css +0 -1
  206. package/packages/theme-chalk/lib/tab.css +0 -0
  207. package/packages/theme-chalk/lib/table-column.css +0 -0
  208. package/packages/theme-chalk/lib/table.css +0 -1
  209. package/packages/theme-chalk/lib/tabs.css +0 -1
  210. package/packages/theme-chalk/lib/tag.css +0 -1
  211. package/packages/theme-chalk/lib/theme.css +0 -0
  212. package/packages/theme-chalk/lib/tree.css +0 -1
  213. package/packages/theme-chalk/lib/uploader.css +0 -0
@@ -99,6 +99,19 @@
99
99
  type="textarea"
100
100
  rows="3"
101
101
  />
102
+ </div>
103
+ <div class="item" v-if="withSubmitCurrentTaskReadEnabled">
104
+ <em-input class="read-type" label="同步提交" readonly>
105
+ <template slot="input">
106
+ <div class="template-input-two" style="width: 100%">
107
+ <em-radio-group
108
+ v-model="isWith"
109
+ :data="withRadioData"
110
+ direction="horizontal"
111
+ />
112
+ </div>
113
+ </template>
114
+ </em-input>
102
115
  </div>
103
116
  <div class="item">
104
117
  <Message
@@ -140,15 +153,23 @@ import {
140
153
  import util from '../../../../src/utils/util.js';
141
154
  import Opinion from './Opinion.vue';
142
155
  import request from '../../../../src/utils/http.js';
156
+ import $ from '../../../../src/utils/util';
143
157
  export default {
144
158
  data() {
145
159
  return {
160
+ withSubmitCurrentTaskReadEnabled:false,
161
+ taskReadOpinionRequired:false,
146
162
  nextNode: {},
147
163
  isSync: '0',
148
164
  radioData: [
149
165
  { name: '普通分阅', value: '0' },
150
166
  { name: '同步办理', value: '1' }
151
167
  ],
168
+ isWith: '0',
169
+ withRadioData: [
170
+ { name: '提交', value: '0' },
171
+ { name: '不提交', value: '1' }
172
+ ],
152
173
  isSyncCopy: false,
153
174
  readOnlyNotificationType: '',
154
175
  defaultNotificationMessage: '',
@@ -178,6 +199,10 @@ export default {
178
199
  Opinion
179
200
  },
180
201
  props: {
202
+ opinionType: {
203
+ type: String,
204
+ default: 'picker'
205
+ },
181
206
  appid: String,
182
207
  orgId: String,
183
208
  beforeSubmit: Function,
@@ -186,6 +211,10 @@ export default {
186
211
  baseUrl: String,
187
212
  apiBaseUrl: String,
188
213
  type: String,
214
+ taskAction:{
215
+ type: String,
216
+ default: ''
217
+ },
189
218
  readParams: {
190
219
  type: Object,
191
220
  default: undefined
@@ -267,6 +296,66 @@ export default {
267
296
  },
268
297
 
269
298
  methods: {
299
+ subRead() {
300
+ const { businessId, appId, processDefinitionId, pendingId } =
301
+ this.taskExamine;
302
+ if (this.taskReadOpinionRequired == 'true' && !this.form.handleExplain)
303
+ return this.$toast('分阅阅结必须输入意见!');
304
+ let params = {
305
+ businessId,
306
+ appId,
307
+ processDefinitionId,
308
+ pendingId,
309
+ opinion: this.form.handleExplain,
310
+ taskAction: 'complete',
311
+ mobileKey: $.getStorage('deviceId') || '123',
312
+ userId: this.userId || $.getStorage('userId')
313
+ };
314
+ let formData = new FormData();
315
+
316
+ for (let key in params) {
317
+ if (params[key] !== '' && params[key] !== undefined) {
318
+ formData.append(key, params[key]);
319
+ }
320
+ }
321
+ this.$toast.loading({
322
+ message: '加载中...',
323
+ forbidClick: true,
324
+ loadingType: 'spinner',
325
+ overlay: true,
326
+ duration: 0
327
+ });
328
+ request({
329
+ url: this.baseUrl
330
+ ? this.baseUrl + taskReadHtml
331
+ : taskReadHtml,
332
+ headers: {
333
+ Accept: 'application/json,text/plain'
334
+ },
335
+ type: 'post',
336
+ params: formData,
337
+ format: false
338
+ })
339
+ .then((res) => {
340
+ const { status, message } = res;
341
+ this.$toast.clear();
342
+ if (status === 'success') {
343
+ this.$toast.success('提交成功');
344
+ this.$parent.$emit('success','submit');
345
+ } else {
346
+ this.$toast(message || '系统错误,请联系管理员!');
347
+ setTimeout(() => {
348
+ this.$parent.$emit('error');
349
+ }, 1000);
350
+ }
351
+ })
352
+ .catch((err) => {
353
+ this.loading.close();
354
+ if (err.message && err.message !== 'canceled') {
355
+ this.$toast(err.message);
356
+ }
357
+ });
358
+ },
270
359
  handlePop(val) {
271
360
  this.$parent.$emit('opinion-change', val);
272
361
  },
@@ -511,7 +600,7 @@ export default {
511
600
  let params = {
512
601
  appId: this.processObj.taskExamine.appId,
513
602
  businessId: this.processObj.taskExamine.businessId,
514
- // taskAction: this.newType,
603
+ taskAction: this.taskAction,
515
604
  userId: this.userId,
516
605
  mobileKey: util.getStorage('deviceId') || '123'
517
606
  };
@@ -523,6 +612,7 @@ export default {
523
612
  }).then((res) => {
524
613
  if (res.status == 'success' || res.rCode == 0) {
525
614
  this.selectPersonValue = res.data.selectPersonValue;
615
+ this.withSubmitCurrentTaskReadEnabled = res.data.withSubmitCurrentTaskReadEnabled;
526
616
  this.isSyncCopy = res.data.isSyncCopy == 1;
527
617
  if (res.data.taskHandleReadUserSelectLabelName) {
528
618
  this.radioData[1].name = res.data.taskHandleReadUserSelectLabelName;
@@ -533,13 +623,14 @@ export default {
533
623
  },
534
624
  getProcessObjNew() {
535
625
  const _that = this;
626
+ console.log('pendingId', this.taskAction);
536
627
  let params = {
537
628
  pendingId: this.pendingId,
538
629
  taskAction: _that.newType,
539
630
  userId: _that.userId,
540
631
  mobileKey: util.getStorage('deviceId') || '123'
541
632
  };
542
- if (_that.newType != 'taskReadAndEnd') delete params.taskAction;
633
+ if (_that.newType != 'taskReadAndEnd' ) delete params.taskAction;
543
634
 
544
635
  request({
545
636
  url: _that.baseUrl
@@ -552,7 +643,7 @@ export default {
552
643
  this.processObj = res.data;
553
644
  // this.notificationMsgType = res.data.defaultNotificationType.split(',');
554
645
  // this.isMultiple()
555
-
646
+ this.taskReadOpinionRequired = res.data.taskReadOpinionRequired == 'true';
556
647
  this.getTaskRead();
557
648
  this.taskExamine = res.data.taskExamine;
558
649
  // console.log(this.taskExamine, 'taskExaminetaskExaminetaskExamine');
@@ -740,6 +831,7 @@ export default {
740
831
  this.beforeSubmit(params.params);
741
832
  return;
742
833
  }
834
+
743
835
  this.$toast.loading({
744
836
  message: '加载中...',
745
837
  forbidClick: true,
@@ -751,7 +843,11 @@ export default {
751
843
  .then((res) => {
752
844
  if (res.status == 'success') {
753
845
  this.$toast('操作成功');
754
- this.$parent.$emit('success');
846
+ if(this.isWith == '0' && this.withSubmitCurrentTaskReadEnabled){
847
+ this.subRead()
848
+ }else{
849
+ this.$parent.$emit('success');
850
+ }
755
851
  } else {
756
852
  this.$toast(res.message);
757
853
  }
@@ -1,139 +1,139 @@
1
- <template>
2
- <div class="flow-supervise">
3
- <!-- <em-input v-model="form.pendTitle" label-width="90" label="标题" readonly />
4
- <em-input v-model="form.currentHandleNode" label-width="90" label="当前办理节点" readonly />
5
- <em-input v-model="form.pendingUserNames" label-width="90" label="当前办理人" readonly /> -->
6
- <Message
7
- v-if="!hideMessage"
8
- ref="message"
9
- :code="msgCode"
10
- :baseUrl="baseUrl"
11
- :showCheckType="false"
12
- :showMsg="true"
13
- label=""
14
- :defaultNotificationType="form.noticeType"
15
- :defaultNotificationMsg="form.notifyMessage"
16
- onlyShowType
17
- @onInputMsg="onInputMsg"
18
- ></Message>
19
- <em-flow-list
20
- v-if="showFlowList"
21
- style="flex: 1; overflow-y: auto"
22
- type="4"
23
- :data="flowList"
24
- ref="flowList"
25
- businessId="7358f2ba425d49018e13386eb987cd45"
26
- :show-btn="false"
27
- />
28
- <div class="btn-list">
29
- <div class="btn" @click="goBack">取消</div>
30
- <div class="btn" @click="onSubmit">发送</div>
31
- </div>
32
- </div>
33
- </template>
34
-
35
- <script>
36
- import Message from './Message.vue';
37
- import {
38
- toTaskSupervise,
39
- toTaskSuperviseSub
40
- } from '../../../../src/config/api';
41
- import request from '../../../../src/utils/http.js';
42
- import util from '../../../../src/utils/util.js';
43
- export default {
44
- components: { Message },
45
- props: {
46
- baseUrl: String,
47
- businessId: String,
48
- msgCode: {
49
- type: String,
50
- default: 'notification_type'
51
- },
52
- appId:{type:String,default:''},
53
- hideMessage:{type:Boolean,default:false}
54
- },
55
- data() {
56
- return {
57
- form: {
58
- title: '',
59
- },
60
- flowList:[],
61
- showFlowList:false,
62
- };
63
- },
64
- mounted() {
65
- this.getFlowInfo();
66
- },
67
- methods: {
68
- onSubmit() {
69
- let selectInfo = this.$refs.flowList.$children[0].selectedData;
70
- if(selectInfo.length == 0) return this.$toast('请选择需要督办的流程');
71
-
72
- let { noticeType, notificationMsg, pendingUserIds } = this.form;
73
- let params = {
74
- url: toTaskSuperviseSub,
75
- params: {
76
- userId: util.getStorage('userId'),
77
- urgeUserIds: selectInfo.map(item=>item.userid).join(','),
78
- notificationType: Array.isArray(noticeType) ? noticeType.join(',') : noticeType,
79
- notificationMessage: notificationMsg,
80
- businessId: this.businessId,
81
- appId:this.appId
82
- }
83
- };
84
-
85
- this.$toast.loading({
86
- duration: 0,
87
- forbidClick: true,
88
- message: '提交中...'
89
- });
90
- request(params).then((res) => {
91
- this.$toast.clear();
92
- if (res.rCode == 0 || res.status == 'success') {
93
- this.$toast('发送成功');
94
- this.$parent.$emit('success');
95
- } else {
96
- this.$message.error(res.message || '系统错误,请联系管理员!');
97
- }
98
- });
99
- },
100
- goBack() {
101
- this.$parent.$emit('close');
102
- },
103
- getFlowInfo() {
104
- this.$toast.loading({
105
- duration: 0,
106
- forbidClick: true,
107
- message: '加载中...'
108
- });
109
- request({
110
- url: toTaskSupervise,
111
- params: {
112
- businessId: this.businessId,
113
- userId: util.getStorage('userId')
114
- }
115
- }).then((res) => {
116
- this.$toast.clear();
117
- if (res.rCode == 0) {
118
- this.form = res.results;
119
- this.form.notificationMsg = res.results.notifyMessage
120
- this.flowList = res.results.taskSuperviseHistories;
121
- if(!this.hideMessage){
122
- this.form.noticeType = res.results.fixedNotificationType.split(',');
123
- }
124
-
125
- this.showFlowList = true;
126
- } else {
127
- this.$toast(res.msg);
128
- this.goBack();
129
- }
130
- });
131
- },
132
- // 通知消息回调
133
- onInputMsg(obj) {
134
- this.form.noticeType = obj.notificationType.join(',');
135
- this.form.notificationMsg = obj.notificationMsg;
136
- }
137
- }
138
- };
139
- </script>
1
+ <template>
2
+ <div class="flow-supervise">
3
+ <!-- <em-input v-model="form.pendTitle" label-width="90" label="标题" readonly />
4
+ <em-input v-model="form.currentHandleNode" label-width="90" label="当前办理节点" readonly />
5
+ <em-input v-model="form.pendingUserNames" label-width="90" label="当前办理人" readonly /> -->
6
+ <Message
7
+ v-if="!hideMessage"
8
+ ref="message"
9
+ :code="msgCode"
10
+ :baseUrl="baseUrl"
11
+ :showCheckType="false"
12
+ :showMsg="true"
13
+ label=""
14
+ :defaultNotificationType="form.noticeType"
15
+ :defaultNotificationMsg="form.notifyMessage"
16
+ onlyShowType
17
+ @onInputMsg="onInputMsg"
18
+ ></Message>
19
+ <em-flow-list
20
+ v-if="showFlowList"
21
+ style="flex: 1; overflow-y: auto"
22
+ type="4"
23
+ :data="flowList"
24
+ ref="flowList"
25
+ businessId="7358f2ba425d49018e13386eb987cd45"
26
+ :show-btn="false"
27
+ />
28
+ <div class="btn-list">
29
+ <div class="btn" @click="goBack">取消</div>
30
+ <div class="btn" @click="onSubmit">发送</div>
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <script>
36
+ import Message from './Message.vue';
37
+ import {
38
+ toTaskSupervise,
39
+ toTaskSuperviseSub
40
+ } from '../../../../src/config/api';
41
+ import request from '../../../../src/utils/http.js';
42
+ import util from '../../../../src/utils/util.js';
43
+ export default {
44
+ components: { Message },
45
+ props: {
46
+ baseUrl: String,
47
+ businessId: String,
48
+ msgCode: {
49
+ type: String,
50
+ default: 'notification_type'
51
+ },
52
+ appId:{type:String,default:''},
53
+ hideMessage:{type:Boolean,default:false}
54
+ },
55
+ data() {
56
+ return {
57
+ form: {
58
+ title: '',
59
+ },
60
+ flowList:[],
61
+ showFlowList:false,
62
+ };
63
+ },
64
+ mounted() {
65
+ this.getFlowInfo();
66
+ },
67
+ methods: {
68
+ onSubmit() {
69
+ let selectInfo = this.$refs.flowList.$children[0].selectedData;
70
+ if(selectInfo.length == 0) return this.$toast('请选择需要督办的流程');
71
+
72
+ let { noticeType, notificationMsg, pendingUserIds } = this.form;
73
+ let params = {
74
+ url: toTaskSuperviseSub,
75
+ params: {
76
+ userId: util.getStorage('userId'),
77
+ urgeUserIds: selectInfo.map(item=>item.userid).join(','),
78
+ notificationType: Array.isArray(noticeType) ? noticeType.join(',') : noticeType,
79
+ notificationMessage: notificationMsg,
80
+ businessId: this.businessId,
81
+ appId:this.appId
82
+ }
83
+ };
84
+
85
+ this.$toast.loading({
86
+ duration: 0,
87
+ forbidClick: true,
88
+ message: '提交中...'
89
+ });
90
+ request(params).then((res) => {
91
+ this.$toast.clear();
92
+ if (res.rCode == 0 || res.status == 'success') {
93
+ this.$toast('发送成功');
94
+ this.$parent.$emit('success');
95
+ } else {
96
+ this.$message.error(res.message || '系统错误,请联系管理员!');
97
+ }
98
+ });
99
+ },
100
+ goBack() {
101
+ this.$parent.$emit('close');
102
+ },
103
+ getFlowInfo() {
104
+ this.$toast.loading({
105
+ duration: 0,
106
+ forbidClick: true,
107
+ message: '加载中...'
108
+ });
109
+ request({
110
+ url: toTaskSupervise,
111
+ params: {
112
+ businessId: this.businessId,
113
+ userId: util.getStorage('userId')
114
+ }
115
+ }).then((res) => {
116
+ this.$toast.clear();
117
+ if (res.rCode == 0) {
118
+ this.form = res.results;
119
+ this.form.notificationMsg = res.results.notifyMessage
120
+ this.flowList = res.results.taskSuperviseHistories;
121
+ if(!this.hideMessage){
122
+ this.form.noticeType = res.results.fixedNotificationType.split(',');
123
+ }
124
+
125
+ this.showFlowList = true;
126
+ } else {
127
+ this.$toast(res.msg);
128
+ this.goBack();
129
+ }
130
+ });
131
+ },
132
+ // 通知消息回调
133
+ onInputMsg(obj) {
134
+ this.form.noticeType = obj.notificationType.join(',');
135
+ this.form.notificationMsg = obj.notificationMsg;
136
+ }
137
+ }
138
+ };
139
+ </script>