eoss-mobiles 0.3.12 → 0.3.13

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.
@@ -110,18 +110,19 @@ export default {
110
110
  // 监听默认消息类型
111
111
  defaultNotificationType(val) {
112
112
  // console.log(val)
113
- // if (val) {
114
- // let arr = [];
115
- // this.newList.map((item) => {
116
- // val.map((x) => {
117
- // if (x == item.cciValue) {
118
- // arr.push(x);
119
- // }
120
- // });
121
- // });
122
- // this.form.notificationType = JSON.parse(JSON.stringify(arr));
123
- // // this.$emit('onInputMsg', this.form);
124
- // }
113
+ if (val) {
114
+ let arr = [];
115
+ this.newList.map((item) => {
116
+ val.map((x) => {
117
+ if (x == item.cciValue) {
118
+ arr.push(x);
119
+ }
120
+ });
121
+ });
122
+ this.form.notificationType = JSON.parse(JSON.stringify(arr));
123
+ this.getNoticeType()
124
+ // this.$emit('onInputMsg', this.form);
125
+ }
125
126
  }
126
127
  },
127
128
  methods: {
@@ -152,6 +152,10 @@ export default {
152
152
  nodeDefaultSubmitOpinion: {
153
153
  type: String,
154
154
  default: ''
155
+ },
156
+ oldOpinion: {
157
+ type: String,
158
+ default: ''
155
159
  }
156
160
  },
157
161
  // components: {
@@ -192,9 +196,19 @@ export default {
192
196
  },
193
197
  deep: true,
194
198
  immediate: true
199
+ },
200
+ oldOpinion: {
201
+ handler(val) {
202
+ if (val) {
203
+ this.opinion = val;
204
+ }
205
+ },
206
+ deep: true,
207
+ immediate: true
195
208
  }
196
209
  },
197
210
  created() {
211
+
198
212
  if (this.nodeFixedOpinionSelectList.length > 0) {
199
213
  this.opinionList = this.nodeFixedOpinionSelectList;
200
214
  this.fixedDisabled = true;
@@ -13,6 +13,7 @@
13
13
  :code="processObj.attachedCode"
14
14
  :ownId="businessId"
15
15
  :esign="esign"
16
+ :oldOpinion="form.opinion"
16
17
  :esignLineWidth="$attrs['esign-line-width'] || $attrs['esignLineWidth']"
17
18
  :isFile="false"
18
19
  :baseUrl="baseUrl"
@@ -80,6 +81,60 @@
80
81
  label="办理人"
81
82
  />
82
83
  </div>
84
+ <div class="item" v-if="enableCustomLimitTimeSetting">
85
+ <!-- <van-field
86
+ value="主办"
87
+ label="主办"
88
+ :disabled="true"
89
+ placeholder="请选择"
90
+ /> -->
91
+ <em-picker
92
+ v-model="form.customLimitTime"
93
+ v-if="!showCustomLimitTimeText"
94
+ label="限时办理"
95
+ title="限时办理"
96
+ placeholder="请选择"
97
+ sysAppCode="bpm_custom_limit_time"
98
+ show-toolbar
99
+ >
100
+ <template slot="button">
101
+ <em-button
102
+ size="small"
103
+ type="primary"
104
+ @click="
105
+ () => {
106
+ form.customLimitTime = '';
107
+ showCustomLimitTimeText = !showCustomLimitTimeText;
108
+ }
109
+ "
110
+ >切换文本框</em-button
111
+ >
112
+ </template>
113
+ </em-picker>
114
+ <em-input
115
+ v-else
116
+ v-model="form.customLimitTime"
117
+ center
118
+ label="限时办理"
119
+ clearable
120
+ @change="changeCustomLimitTime"
121
+ placeholder="请输入限时办理天数"
122
+ >
123
+ <template slot="button">
124
+ <em-button
125
+ size="small"
126
+ type="primary"
127
+ @click="
128
+ () => {
129
+ form.customLimitTime = '';
130
+ showCustomLimitTimeText = !showCustomLimitTimeText;
131
+ }
132
+ "
133
+ >切换选择框</em-button
134
+ >
135
+ </template>
136
+ </em-input>
137
+ </div>
83
138
  <ProcessSetting
84
139
  v-if="processObj.isCustomPreset && isPreset"
85
140
  ref="processSetting"
@@ -129,6 +184,8 @@
129
184
  import {
130
185
  toStartFlow,
131
186
  getNodeInfo,
187
+ startReadTransferHandleFlowWithTaskReadEnd,
188
+ freeStartFlowWithSubmitTask,
132
189
  registerNew
133
190
  } from '../../../../src/config/api';
134
191
  import request from '../../../../src/utils/http.js';
@@ -171,6 +228,26 @@ export default {
171
228
  userId: {
172
229
  type: String,
173
230
  default: ''
231
+ },
232
+ isFreeStartFlow: {
233
+ type: Boolean,
234
+ default: false
235
+ },
236
+ copyHistory: {
237
+ type: String,
238
+ default: ''
239
+ },
240
+ formType: {
241
+ type: String,
242
+ default: 'freeStart'
243
+ },
244
+ taskParams: {
245
+ type: Object,
246
+ default: () => {}
247
+ },
248
+ opinion: {
249
+ type: String,
250
+ default: ''
174
251
  }
175
252
  },
176
253
  data() {
@@ -181,6 +258,7 @@ export default {
181
258
  form: {
182
259
  nextNodeId: undefined, // 流程节点id
183
260
  nextNodeName: undefined, // 流程节点名称
261
+ customLimitTime: '', //限时天数
184
262
  nextUserName: undefined, // 办理人
185
263
  nextUserId: undefined, // 办理人id
186
264
  nextName: undefined, //下一步
@@ -210,6 +288,8 @@ export default {
210
288
  objType: 'enterprise', //办理人树选择objType
211
289
  selectType: '', //办理人树选择selectType
212
290
  nextUserSelectList: [], //选中人数组
291
+ enableCustomLimitTimeSetting: false,
292
+ showCustomLimitTimeText: false,
213
293
  flowObj: {} //流程参数信息
214
294
  };
215
295
  },
@@ -225,11 +305,13 @@ export default {
225
305
  // hideTempSave: true,
226
306
  businessId: this.businessId
227
307
  };
308
+ if (this.formType == 'freeStart' || this.copyHistory) {
309
+ this.form.opinion = this.opinion;
310
+ }
228
311
  this.geAllData(obj);
229
312
  },
230
313
 
231
314
  methods: {
232
-
233
315
  goBack() {
234
316
  this.$parent.$emit('close');
235
317
  this.$emit('close');
@@ -312,6 +394,7 @@ export default {
312
394
  ? ''
313
395
  : this.form.notificationType,
314
396
  opinion: this.form.opinion,
397
+ customLimitTime :typeof this.form.customLimitTime === 'object' ? this.form.customLimitTime.cciValue : this.form.customLimitTime,
315
398
  nodeId: this.form.nodeId,
316
399
  notificationMsg: this.form.notificationMsg,
317
400
  loginType: 2, //登录方式
@@ -319,9 +402,12 @@ export default {
319
402
  userId: this.userId || $.getStorage('userId'),
320
403
  mobileKey: $.getStorage('deviceId') || '123'
321
404
  };
405
+ if(!this.enableCustomLimitTimeSetting){
406
+ delete info.customLimitTime;
407
+ }
322
408
  if (this.processObj.isCustomPreset && this.isPreset) {
323
409
  if (this.$refs.processSetting.active.length != 0) {
324
- if(!this.$refs.processSetting.getValue())return
410
+ if (!this.$refs.processSetting.getValue()) return;
325
411
  info.customPresetUserJson = this.$refs.processSetting.getValue();
326
412
  info.isCustomPreset = true;
327
413
  } else {
@@ -329,6 +415,34 @@ export default {
329
415
  delete info.isCustomPreset;
330
416
  }
331
417
  }
418
+ if (this.isFreeStartFlow || this.formType === 'readTransfer') {
419
+ let newParm = {};
420
+ newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
421
+ newParm.startFlowParamJson = info;
422
+ newParm.startFlowParamJson.businessId = this.businessId; //this.businessId
423
+ newParm.startFlowParamJson = JSON.stringify(newParm.startFlowParamJson);
424
+ for (let key in this.taskParams) {
425
+ if (Array.isArray(this.taskParams[key])) {
426
+ this.taskParams[key] =
427
+ this.taskParams[key].length > 0
428
+ ? this.taskParams[key].join(',')
429
+ : '';
430
+ }
431
+ }
432
+
433
+ newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
434
+ if (this.formType == 'readTransfer') {
435
+ newParm.readTransferHandleStartFlowParamJson = JSON.stringify(info);
436
+ newParm.taskReadEndParamJson = JSON.stringify(this.taskParams);
437
+ delete newParm.copyHistory;
438
+ delete newParm.startFlowParamJson;
439
+ delete newParm.submitTaskParamJson;
440
+ }
441
+ info = newParm;
442
+ }
443
+ if(this.formType == 'freeStart' && !this.isFreeStartFlow){
444
+ info.businessId = this.businessId//this.businessId
445
+ }
332
446
  if (this.beforeSubmit) {
333
447
  this.beforeSubmit(info);
334
448
  return;
@@ -351,20 +465,37 @@ export default {
351
465
  });
352
466
  const _that = this;
353
467
  request({
354
- url: _that.apiBaseUrl ? _that.apiBaseUrl + registerNew : registerNew,
355
- type: 'get',
356
- params: { params: info }
357
- // format: false
468
+ url:
469
+ (_that.apiBaseUrl || '') +
470
+ (_that.isFreeStartFlow
471
+ ? freeStartFlowWithSubmitTask
472
+ : _that.formType == 'readTransfer'
473
+ ? startReadTransferHandleFlowWithTaskReadEnd
474
+ : registerNew),
475
+ type: 'post',
476
+ params:
477
+ _that.isFreeStartFlow || _that.formType == 'readTransfer'
478
+ ? info
479
+ : { params: info },
480
+ format: false
358
481
  }).then((res) => {
359
482
  this.$toast.clear();
360
- if (res.rCode == 0) {
483
+ if (res.rCode == 0 || res.status == "success") {
361
484
  this.$toast('操作成功');
362
- this.$parent.$emit('success');
485
+ if(_that.formType == 'freeStart' && !_that.isFreeStartFlow){
486
+ this.$emit('closePop')
487
+ }else{
488
+ if(_that.formType == 'freeStart'){
489
+ _that.$emit('success');
490
+ }else{
491
+ _that.$parent.$emit('success');
492
+ }
493
+ }
363
494
  } else {
364
495
  this.$toast(res.msg);
365
496
  setTimeout(() => {
366
- this.$parent.$emit('error');
367
- }, 1000);
497
+ this.$parent.$emit('error');
498
+ }, 1000);
368
499
  }
369
500
  });
370
501
  },
@@ -544,6 +675,8 @@ export default {
544
675
  this.$toast.clear();
545
676
  if (res.rCode == 0) {
546
677
  this.peopleObj = res.results.nodeExtr;
678
+ _that.enableCustomLimitTimeSetting =
679
+ this.peopleObj.enableCustomLimitTimeSetting == 1;
547
680
  if (res.results.nodeExtr.userSelectionType) {
548
681
  this.treeType = res.results.nodeExtr.userSelectionType;
549
682
  if (res.results.nodeExtr) {
@@ -22,7 +22,10 @@
22
22
  @click="handlePicker"
23
23
  :disabled="disabled || readonly"
24
24
  :right-icon="disabled || readonly ? '' : 'arrow'"
25
- />
25
+ >
26
+ <template v-for="(index, name) in $slots" :slot="name">
27
+ <slot :name="name" /> </template
28
+ ></em-input>
26
29
  <em-input
27
30
  v-else
28
31
  readonly
@@ -37,7 +40,7 @@
37
40
  :right-icon="disabled || readonly ? '' : 'arrow'"
38
41
  >
39
42
  <template slot="input">
40
- <div style="width:100%">
43
+ <div style="width: 100%">
41
44
  <slot name="textTop"></slot>
42
45
  <div v-if="pickerValue.length > 0">
43
46
  <em-tag
@@ -50,7 +53,7 @@
50
53
  >{{ r[labelKey] || r.name }}</em-tag
51
54
  >
52
55
  </div>
53
- <div v-else style="color:#c8c9cc">
56
+ <div v-else style="color: #c8c9cc">
54
57
  {{
55
58
  (disabled || readonly) && placeholder == undefined
56
59
  ? ' 暂无数据'
@@ -280,7 +283,7 @@ export default {
280
283
  val[this.sysAppCode ? 'cciValue' : this.valueKey]
281
284
  );
282
285
  } else if (!this.objectType && val.length != undefined) {
283
- val.map(x => {
286
+ val.map((x) => {
284
287
  if (typeof x === 'object') {
285
288
  x = x[this.sysAppCode ? 'cciValue' : this.valueKey];
286
289
  }
@@ -351,7 +354,7 @@ export default {
351
354
  }
352
355
  } else if (this.isCheck) {
353
356
  let data = this.value;
354
- data.map(item => {
357
+ data.map((item) => {
355
358
  this.checkList.push(item[this.valueKey] || item.value || item);
356
359
  });
357
360
  }
@@ -362,7 +365,7 @@ export default {
362
365
 
363
366
  if (this.columns.length > 0) {
364
367
  this.newColumns = this.columns.filter(
365
- x => x[this.labelKey].indexOf(this.keyWord) != -1
368
+ (x) => x[this.labelKey].indexOf(this.keyWord) != -1
366
369
  );
367
370
  if (!this.keyWord) {
368
371
  this.newColumns = this.columns;
@@ -401,7 +404,7 @@ export default {
401
404
  deleteList(val, res) {
402
405
  if (this.disabled || this.readonly) return;
403
406
  this.pickerValue.splice(val, 1);
404
- this.checkList = this.checkList.filter(x => x != res.value);
407
+ this.checkList = this.checkList.filter((x) => x != res.value);
405
408
  this.$emit('input', this.pickerValue);
406
409
 
407
410
  this.$emit('tagDelete', this.pickerValue);
@@ -413,8 +416,8 @@ export default {
413
416
  if (isConfirm) {
414
417
  if (this.isCheck) {
415
418
  let data = [];
416
- this.newColumns.filter(x => {
417
- this.checkList.find(y => {
419
+ this.newColumns.filter((x) => {
420
+ this.checkList.find((y) => {
418
421
  if (x.value === y) {
419
422
  data.push(x);
420
423
  }
@@ -427,7 +430,7 @@ export default {
427
430
  } else {
428
431
  if (this.isCheck) {
429
432
  this.checkList = [];
430
- this.pickerValue.map(x => {
433
+ this.pickerValue.map((x) => {
431
434
  this.checkList.push(x.value);
432
435
  });
433
436
  }
@@ -440,8 +443,8 @@ export default {
440
443
  if (this.isCheck) {
441
444
  let val = [];
442
445
  if (this.newColumns && this.newColumns.length > 0) {
443
- this.newColumns.filter(x => {
444
- this.value.find(y => {
446
+ this.newColumns.filter((x) => {
447
+ this.value.find((y) => {
445
448
  if (x[this.valueKey] == y || x[this.valueKey] == y.value) {
446
449
  val.push(x);
447
450
  }
@@ -470,7 +473,7 @@ export default {
470
473
  this.newDefaultIndex = index;
471
474
  } else {
472
475
  let list = [];
473
- this.value.map(item => {
476
+ this.value.map((item) => {
474
477
  if (item[this.labelKey] || item[this.newValueKey]) {
475
478
  list.push(item[this.labelKey] || item[this.newValueKey]);
476
479
  } else if (typeof item === 'string') {
@@ -524,7 +527,7 @@ export default {
524
527
  }
525
528
  this.newLoading = true;
526
529
  request(params)
527
- .then(res => {
530
+ .then((res) => {
528
531
  const { status, data, message, rCode, results } = res;
529
532
  this.listLoading = false;
530
533
  if (status == 'success' || rCode === 0 || status === true) {
@@ -535,7 +538,7 @@ export default {
535
538
  : data
536
539
  ? data
537
540
  : results;
538
- info.map(x => {
541
+ info.map((x) => {
539
542
  if (this.isCheck) {
540
543
  x.name =
541
544
  x[sysAppCode ? 'shortName' : this.labelKey] &&
@@ -575,7 +578,7 @@ export default {
575
578
  }
576
579
  this.newLoading = false;
577
580
  })
578
- .catch(err => {
581
+ .catch((err) => {
579
582
  this.$toast(err.message);
580
583
  });
581
584
  },
package/src/config/api.js CHANGED
@@ -29,7 +29,8 @@ export const taskHandleHtmlImg =
29
29
  pending + '/task/taskHandle/taskHandleWithHandwrittenOpinion.dhtml';
30
30
  // 发起流程
31
31
  // export const registerNew = '/api/v1/mecpItask/registerNew.json';
32
- export const registerNew = '/bpm/v1/mecpItask/registerNew.json';
32
+ // export const registerNew = '/bpm/v1/mecpItask/registerNew.json';
33
+ export const registerNew = '/bpm/task/taskHandle/startFlow.dhtml';
33
34
 
34
35
  // 获取节点信息(获取节点属性及办理人,发起)
35
36
  // export const getNodeInfo = '/api/mecp/v1/mecpItask/getNodeInfo.json';
@@ -113,3 +114,9 @@ export const getSysParam = '/api/v1/mecpSys/getSysParam.json';
113
114
  export const getFreeStartFlowParams = '/bpm/bpmBackend/getFreeStartFlowParams';
114
115
  // 获取发起流程列表
115
116
  export const getProcessDefList = '/bpm/v1/mecpItask/getProcessDefList.json';
117
+ // 阅转办提交流程
118
+ export const startReadTransferHandleFlowWithTaskReadEnd =
119
+ '/bpm/bpmBackend/startReadTransferHandleFlowWithTaskReadEnd';
120
+ // 自由发起流程提交
121
+ export const freeStartFlowWithSubmitTask =
122
+ '/bpm/bpmBackend/freeStartFlowWithSubmitTask';
package/src/index.js CHANGED
@@ -105,7 +105,7 @@ if (typeof window !== 'undefined' && window.Vue) {
105
105
  }
106
106
 
107
107
  export default {
108
- version: '0.3.12',
108
+ version: '0.3.13',
109
109
  install,
110
110
  Button,
111
111
  ButtonGroup,