eoss-ui 0.4.33 → 0.4.35

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 (53) hide show
  1. package/lib/button-group.js +1 -1
  2. package/lib/button.js +1 -1
  3. package/lib/checkbox-group.js +1 -1
  4. package/lib/data-table-form.js +1 -1
  5. package/lib/data-table.js +1 -1
  6. package/lib/date-picker.js +1 -1
  7. package/lib/dialog.js +1 -1
  8. package/lib/eoss-ui.common.js +133 -112
  9. package/lib/flow-group.js +1 -1
  10. package/lib/flow-list.js +1 -1
  11. package/lib/flow.js +65 -56
  12. package/lib/form.js +1 -1
  13. package/lib/handle-user.js +4 -4
  14. package/lib/handler.js +4 -4
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +1 -1
  17. package/lib/input.js +2 -2
  18. package/lib/login.js +1 -1
  19. package/lib/main.js +5 -5
  20. package/lib/mainComp.js +5 -5
  21. package/lib/nav.js +1 -1
  22. package/lib/page.js +1 -1
  23. package/lib/player.js +1 -1
  24. package/lib/qr-code.js +1 -1
  25. package/lib/radio-group.js +1 -1
  26. package/lib/select-ganged.js +1 -1
  27. package/lib/select.js +1 -1
  28. package/lib/selector-panel.js +1 -1
  29. package/lib/selector.js +1 -1
  30. package/lib/sizer.js +1 -1
  31. package/lib/steps.js +1 -1
  32. package/lib/switch.js +1 -1
  33. package/lib/table-form.js +1 -1
  34. package/lib/tabs.js +1 -1
  35. package/lib/tips.js +1 -1
  36. package/lib/tree-group.js +15 -3
  37. package/lib/tree.js +4 -4
  38. package/lib/upload.js +1 -1
  39. package/lib/utils/util.js +1 -1
  40. package/lib/wujie.js +1 -1
  41. package/lib/wxlogin.js +1 -1
  42. package/package.json +2 -2
  43. package/packages/flow/src/component/taskUnionExamine.vue +30 -25
  44. package/packages/flow/src/main.vue +25 -18
  45. package/packages/handle-user/src/main.vue +4 -4
  46. package/packages/handler/src/main.vue +2 -1
  47. package/packages/input/src/main.vue +12 -5
  48. package/packages/main/src/main.vue +3 -2
  49. package/packages/mainComp/src/main.vue +3 -2
  50. package/packages/tree/src/main.vue +1 -1
  51. package/packages/tree-group/src/main.vue +20 -0
  52. package/src/index.js +1 -1
  53. package/src/utils/util.js +2 -1
@@ -7,7 +7,7 @@
7
7
  label-width="100px"
8
8
  >
9
9
  <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
10
- <CommonOpinions @change="val => (opinion = val)" />
10
+ <CommonOpinions @change="(val) => (opinion = val)" />
11
11
  </el-form-item>
12
12
  <el-form-item
13
13
  v-if="isHideCurrentOrg == 0"
@@ -93,13 +93,11 @@
93
93
  <span>{{ infoList.noticeInfo }}</span>
94
94
  </el-form-item>
95
95
  <el-form-item>
96
- <div style="text-align:right">
96
+ <div style="text-align: right">
97
97
  <el-button type="primary" size="small" @click="subMit">
98
98
  确定
99
99
  </el-button>
100
- <el-button @click="quit" size="small">
101
- 取消
102
- </el-button>
100
+ <el-button @click="quit" size="small"> 取消 </el-button>
103
101
  </div>
104
102
  </el-form-item>
105
103
  </el-form>
@@ -181,7 +179,9 @@ export default {
181
179
  this.newMultiple = false;
182
180
  }
183
181
  if (this.type == 'takeAdvice') {
184
- this.params.filid = sessionStorage.getItem('orgId');
182
+ this.params.filid = JSON.parse(
183
+ sessionStorage.getItem('mainConfig')
184
+ ).userModel.orgId;
185
185
  }
186
186
  },
187
187
  subTaskReview() {
@@ -210,7 +210,7 @@ export default {
210
210
  this.loading = true;
211
211
  util
212
212
  .ajax(params)
213
- .then(res => {
213
+ .then((res) => {
214
214
  const { message, status } = res;
215
215
  this.loading = false;
216
216
  if (status === 'success') {
@@ -220,7 +220,7 @@ export default {
220
220
  this.$message.error(message || '系统错误,请联系管理员!');
221
221
  }
222
222
  })
223
- .catch(err => {
223
+ .catch((err) => {
224
224
  this.loading = false;
225
225
  if (err.message && err.message !== 'canceled') {
226
226
  this.$message.error(err.message);
@@ -234,7 +234,7 @@ export default {
234
234
  };
235
235
  util
236
236
  .ajax(params)
237
- .then(res => {
237
+ .then((res) => {
238
238
  const { status, message } = res;
239
239
  this.loading = false;
240
240
  if (status === 'success') {
@@ -253,7 +253,7 @@ export default {
253
253
  this.$message.error(message || '系统错误,请联系管理员!');
254
254
  }
255
255
  })
256
- .catch(err => {
256
+ .catch((err) => {
257
257
  this.loading = false;
258
258
  if (err.message && err.message !== 'canceled') {
259
259
  this.$message.error(err.message);
@@ -277,7 +277,7 @@ export default {
277
277
  };
278
278
  util
279
279
  .ajax(params)
280
- .then(res => {
280
+ .then((res) => {
281
281
  const { message, status } = res;
282
282
  this.loading = false;
283
283
  if (status == 'success') {
@@ -328,7 +328,7 @@ export default {
328
328
  this.$message.error(message || '系统错误,请联系管理员!');
329
329
  }
330
330
  })
331
- .catch(err => {
331
+ .catch((err) => {
332
332
  this.loading = false;
333
333
  if (err.message && err.message !== 'canceled') {
334
334
  this.$message.error(err.message);
@@ -363,8 +363,8 @@ export default {
363
363
  (type == 'takeAdvice' &&
364
364
  (nextCurrentOrgObj == '' ||
365
365
  (nextCurrentOrgObj == null && isHideCurrentOrg == 0))) ||
366
- ((isHideOtherOrg == 0 && nextOtherOrgObj == '') ||
367
- nextOtherOrgObj == null)
366
+ (isHideOtherOrg == 0 && nextOtherOrgObj == '') ||
367
+ nextOtherOrgObj == null
368
368
  ) {
369
369
  return this.$message.warning('请选择处理对象!');
370
370
  } else if (
@@ -393,8 +393,12 @@ export default {
393
393
  data: {
394
394
  opinion,
395
395
  pendingId,
396
- nextOtherOrgObj: nextOtherOrgObj.join(','),
397
- nextCurrentOrgObj: nextCurrentOrgObj.join(','),
396
+ nextOtherOrgObj: Array.isArray(nextOtherOrgObj)
397
+ ? nextOtherOrgObj.join(',')
398
+ : nextOtherOrgObj,
399
+ nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
400
+ ? nextCurrentOrgObj.join(',')
401
+ : nextCurrentOrgObj,
398
402
  notificationMsg: noticeInfo,
399
403
  notificationType: noticeType.join(','),
400
404
  choiceDeptId,
@@ -407,7 +411,7 @@ export default {
407
411
  this.loading = true;
408
412
  util
409
413
  .ajax(param)
410
- .then(res => {
414
+ .then((res) => {
411
415
  const { message, status } = res;
412
416
  this.loading = false;
413
417
  if (status == 'success') {
@@ -417,7 +421,7 @@ export default {
417
421
  this.$message.error(message || '系统错误,请联系管理员!');
418
422
  }
419
423
  })
420
- .catch(err => {
424
+ .catch((err) => {
421
425
  this.loading = false;
422
426
  if (err.message && err.message !== 'canceled') {
423
427
  this.$message.error(err.message);
@@ -431,13 +435,14 @@ export default {
431
435
  changeSelectUser(val, type) {
432
436
  const { nextUser, options } = val;
433
437
  let newNextUser = '';
434
- options.map(item => {
438
+ options.map((item) => {
435
439
  if (newNextUser) {
436
440
  newNextUser += `,${item.stype}-${item.id}`;
437
441
  } else {
438
442
  newNextUser = `${item.stype}-${item.id}`;
439
443
  }
440
444
  });
445
+ //console.log(options, newNextUser, 'newNextUser');
441
446
  this.infoList[type] = newNextUser;
442
447
  },
443
448
  getNodeType() {
@@ -446,14 +451,14 @@ export default {
446
451
  url: findCodeValues,
447
452
  params: { ccCode: 'notification_type' }
448
453
  })
449
- .then(res => {
454
+ .then((res) => {
450
455
  const { status, data } = res;
451
456
  this.loading = false;
452
457
  if (status === 'success') {
453
458
  this.infoList.noticeList = data;
454
459
  }
455
460
  })
456
- .catch(err => {
461
+ .catch((err) => {
457
462
  this.loading = false;
458
463
  if (err.message && err.message !== 'canceled') {
459
464
  this.$message.error(err.message);
@@ -467,13 +472,13 @@ export default {
467
472
  };
468
473
  util
469
474
  .ajax({ url: getNotificationMsg, params, methods: 'post' })
470
- .then(res => {
475
+ .then((res) => {
471
476
  if (res.status === 'success') {
472
477
  this.infoList.noticeInfo = res.message;
473
478
  }
474
479
  this.loading = false;
475
480
  })
476
- .catch(err => {
481
+ .catch((err) => {
477
482
  this.loading = false;
478
483
  if (err.message && err.message !== 'canceled') {
479
484
  this.$message.error(err.message);
@@ -485,7 +490,7 @@ export default {
485
490
  .ajax({
486
491
  url: findSysCodes
487
492
  })
488
- .then(res => {
493
+ .then((res) => {
489
494
  const { status, message } = res;
490
495
  if (status === 'success') {
491
496
  this.infoList.noticeType = message.split(',');
@@ -493,7 +498,7 @@ export default {
493
498
  this.$message.error(message || '系统错误,请联系管理员!');
494
499
  }
495
500
  })
496
- .catch(err => {
501
+ .catch((err) => {
497
502
  this.loading = false;
498
503
  if (err.message && err.message !== 'canceled') {
499
504
  this.$message.error(err.message);
@@ -368,7 +368,7 @@
368
368
  >暂存</el-button
369
369
  >
370
370
  </div>
371
- <div class="es-user-defined">
371
+ <div class="es-user-defined" v-if="nodeInfo.option.length > 0">
372
372
  <el-button
373
373
  v-show="isSubmitButtonShowAgreeAndDisagree != 1"
374
374
  v-for="item of btnList"
@@ -1098,7 +1098,7 @@ export default {
1098
1098
  .ajax({ url: tempSave, params })
1099
1099
  .then((res) => {
1100
1100
  const { status, message } = res;
1101
- if(!isSave) this.loading.close();
1101
+ if (!isSave) this.loading.close();
1102
1102
  if (status == 'success') {
1103
1103
  // this.$message.success('暂存成功');
1104
1104
  !isSave && this.$emit('save', this.businessIds);
@@ -1107,7 +1107,7 @@ export default {
1107
1107
  }
1108
1108
  })
1109
1109
  .catch((err) => {
1110
- if(!isSave) this.loading.close();
1110
+ if (!isSave) this.loading.close();
1111
1111
  if (err.message && err.message !== 'canceled') {
1112
1112
  this.$message.error(err.message);
1113
1113
  }
@@ -1262,6 +1262,7 @@ export default {
1262
1262
  this.flowMultiple = true;
1263
1263
  this.flowDisabled = false;
1264
1264
  this.flowTitle = res.value;
1265
+
1265
1266
  this.toTakeAdvice(res);
1266
1267
  } else if (res.fun === 'toUnionExamine()') {
1267
1268
  //联合审核
@@ -1300,13 +1301,14 @@ export default {
1300
1301
  * @date 2022年9月29日
1301
1302
  **/
1302
1303
  toTakeAdvice(res) {
1304
+ //console.log(res,this.taskExamineInfo,'this.taskExamineInfo')
1303
1305
  let params = {
1304
1306
  url: isCanStartSubFlow,
1305
- params: {
1307
+ data: {
1306
1308
  appId: this.taskExamineInfo.appId,
1307
1309
  inevitableNode: res.inevitableNode
1308
1310
  },
1309
- method: 'POST',
1311
+ method: 'post',
1310
1312
  headers: { Accept: 'application/json,text/plain' }
1311
1313
  };
1312
1314
  this.loading = util.loading(this.$loading, '加载中...');
@@ -1373,7 +1375,7 @@ export default {
1373
1375
  url: rejectAndEnd,
1374
1376
  headers: { Accept: 'application/json,text/plain' },
1375
1377
  method: 'post',
1376
- params: {
1378
+ data: {
1377
1379
  opinion: this.value,
1378
1380
  pendingId: this.pendingId,
1379
1381
  isSinglePage: false
@@ -1890,17 +1892,24 @@ export default {
1890
1892
  const { status, message, data } = res;
1891
1893
  this.loading.close();
1892
1894
  if (status === 'success') {
1893
- this.nodeInfo.option = data.definitionList;
1894
- this.nodeInfo.nextNode = data.definitionList.filter(
1895
- (item) => item.processDefKey == this.defaultProcessKey
1896
- );
1897
- if (this.nodeInfo.nextNode.length) {
1898
- this.nodeInfo.nextNode = this.nodeInfo.nextNode[0].processDefId;
1895
+ if (
1896
+ !Object.keys(data).length ||
1897
+ (data.definitionList && !data.definitionList.length)
1898
+ ) {
1899
+ this.$message.error('流程不存在或未关联对应流程!');
1899
1900
  } else {
1900
- if (data.definitionList.length == 1) {
1901
- this.nodeInfo.nextNode = data.definitionList[0].processDefId;
1901
+ this.nodeInfo.option = data.definitionList;
1902
+ this.nodeInfo.nextNode = data.definitionList.filter(
1903
+ (item) => item.processDefKey == this.defaultProcessKey
1904
+ );
1905
+ if (this.nodeInfo.nextNode.length) {
1906
+ this.nodeInfo.nextNode = this.nodeInfo.nextNode[0].processDefId;
1902
1907
  } else {
1903
- this.nodeInfo.nextNode = '';
1908
+ if (data.definitionList.length == 1) {
1909
+ this.nodeInfo.nextNode = data.definitionList[0].processDefId;
1910
+ } else {
1911
+ this.nodeInfo.nextNode = '';
1912
+ }
1904
1913
  }
1905
1914
  }
1906
1915
  } else {
@@ -1974,9 +1983,7 @@ export default {
1974
1983
  }
1975
1984
  });
1976
1985
  },
1977
- validInfo(){
1978
-
1979
- },
1986
+ validInfo() {},
1980
1987
  sendData() {
1981
1988
  this.$refs['nextNode'].validate(async (valid) => {
1982
1989
  if (valid) {
@@ -64,7 +64,7 @@ export default {
64
64
  deep: true,
65
65
  handler(val) {
66
66
  if (val) {
67
- this.job = val.identityList.filter(item => {
67
+ this.job = val.identityList.filter((item) => {
68
68
  return item.id === val.identityId;
69
69
  })[0];
70
70
  }
@@ -85,7 +85,7 @@ export default {
85
85
  this.job = item;
86
86
  util
87
87
  .ajax({ url: switchUserTo, params: { userId: item.value } })
88
- .then(res => {
88
+ .then((res) => {
89
89
  if (res.rCode == 0) {
90
90
  util.setStorage({
91
91
  type: this.storage,
@@ -97,7 +97,7 @@ export default {
97
97
  type: 'success',
98
98
  duration: 500,
99
99
  onClose: () => {
100
- util.removeStorage('mainConfig');
100
+ util.removeStorage(['mainConfig', 'jump']);
101
101
  util.win.top.location.reload();
102
102
  }
103
103
  });
@@ -109,7 +109,7 @@ export default {
109
109
  });
110
110
  }
111
111
  })
112
- .catch(err => {
112
+ .catch((err) => {
113
113
  if (err.message && err.message !== 'canceled') {
114
114
  this.$message.error(err.message);
115
115
  }
@@ -280,7 +280,8 @@ export default {
280
280
  'deviceUnique',
281
281
  'menus',
282
282
  'useCaseCodes',
283
- 'mainConfig'
283
+ 'mainConfig',
284
+ 'jump'
284
285
  ]);
285
286
  if (this.onQuit && typeof this.onQuit === 'function') {
286
287
  this.onQuit();
@@ -81,7 +81,7 @@ export default {
81
81
  rule() {
82
82
  if (this.rules) {
83
83
  if (Array.isArray(this.rules)) {
84
- return this.rules.map(item => {
84
+ return this.rules.map((item) => {
85
85
  if (rules[item.type]) {
86
86
  return {
87
87
  pattern: rules[item.type]['pattern'],
@@ -127,7 +127,7 @@ export default {
127
127
  data: this.param,
128
128
  params: this.param
129
129
  })
130
- .then(res => {
130
+ .then((res) => {
131
131
  if (res.rCode === 0) {
132
132
  this.results = JSON.parse(JSON.stringify(res.results));
133
133
  let results = query
@@ -136,7 +136,7 @@ export default {
136
136
  callback(results);
137
137
  }
138
138
  })
139
- .catch(err => {
139
+ .catch((err) => {
140
140
  if (err.message && err.message !== 'canceled') {
141
141
  this.$message.error(err.message);
142
142
  }
@@ -149,7 +149,7 @@ export default {
149
149
  }
150
150
  },
151
151
  searchFilter(query) {
152
- return state => {
152
+ return (state) => {
153
153
  return state.value.toLowerCase().indexOf(query.toLowerCase()) === 0;
154
154
  };
155
155
  },
@@ -226,7 +226,14 @@ export default {
226
226
  { 'es-plain': this.plain }
227
227
  ]
228
228
  },
229
- [this.model || this.text]
229
+ [
230
+ this.model == '' ||
231
+ this.model == null ||
232
+ this.model == undefined ||
233
+ this.model == NaN
234
+ ? this.text
235
+ : this.model
236
+ ]
230
237
  );
231
238
  }
232
239
  if (this.$slots.prefix) {
@@ -1524,7 +1524,7 @@ export default {
1524
1524
  this.page = util.handlerUrl(page);
1525
1525
  } else {
1526
1526
  this.method = 'wujie';
1527
- this.wjName = res.appCode ? res.appCode : 'application';
1527
+ this.wjName = res && res.appCode ? res.appCode : 'application';
1528
1528
  this.page = this.host + page;
1529
1529
  this.$nextTick(() => {
1530
1530
  this.refresh = true;
@@ -1681,7 +1681,8 @@ export default {
1681
1681
  'deviceUnique',
1682
1682
  'menus',
1683
1683
  'useCaseCodes',
1684
- 'mainConfig'
1684
+ 'mainConfig',
1685
+ 'jump'
1685
1686
  ]);
1686
1687
  if (util.win.top.location.href.indexOf('main.html') > -1) {
1687
1688
  util.win.top.location.href = './login.html';
@@ -1719,7 +1719,7 @@ export default {
1719
1719
  this.page = util.handlerUrl(page);
1720
1720
  } else {
1721
1721
  this.method = 'wujie';
1722
- this.wjName = res.appCode ? res.appCode : 'application';
1722
+ this.wjName = res && res.appCode ? res.appCode : 'application';
1723
1723
  this.page = page;
1724
1724
  this.$nextTick(() => {
1725
1725
  this.refresh = true;
@@ -1873,7 +1873,8 @@ export default {
1873
1873
  'deviceUnique',
1874
1874
  'menus',
1875
1875
  'useCaseCodes',
1876
- 'mainConfig'
1876
+ 'mainConfig',
1877
+ 'jump'
1877
1878
  ]);
1878
1879
  if (util.win.top.location.href.indexOf('main.html') > -1) {
1879
1880
  util.win.top.location.href = './login.html';
@@ -385,7 +385,7 @@ export default {
385
385
  if (res.rCode === 0) {
386
386
  this.treeList = JSON.parse(JSON.stringify(res.results));
387
387
  if (this.currentFirst) {
388
- let currentNode = this.treeList[0].children[0].id;
388
+ let currentNode = this.treeList[0].id;
389
389
  this.$emit('current-first', this.treeList[0]);
390
390
  if (!this.currentNodeKey) {
391
391
  this.$nextTick(() => {
@@ -438,6 +438,26 @@ export default {
438
438
  handleCurrentFirst(res) {
439
439
  this.checkeds = res.children[0];
440
440
  this.$emit('current-first', res);
441
+ },
442
+ setCurrentKey(keys, leafOnly) {
443
+ let ref =
444
+ this.tabs && this.tabs.length
445
+ ? this.tabs[Number(this.active)].ref
446
+ ? this.tabs[Number(this.active)].ref
447
+ : 'groupTree' + this.active
448
+ : 'groupTree';
449
+ this.$nextTick(() => {
450
+ this.$refs[ref].setCurrentKey(keys, leafOnly);
451
+ });
452
+ },
453
+ getTree() {
454
+ let ref =
455
+ this.tabs && this.tabs.length
456
+ ? this.tabs[Number(this.active)].ref
457
+ ? this.tabs[Number(this.active)].ref
458
+ : 'groupTree' + this.active
459
+ : 'groupTree';
460
+ return this.$refs[ref];
441
461
  }
442
462
  }
443
463
  };
package/src/index.js CHANGED
@@ -115,7 +115,7 @@ if (typeof window !== 'undefined' && window.Vue) {
115
115
  }
116
116
 
117
117
  export default {
118
- version: '0.4.33',
118
+ version: '0.4.35',
119
119
  install,
120
120
  Button,
121
121
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -167,7 +167,8 @@ const ajax = function ({
167
167
  'menus',
168
168
  'menus',
169
169
  'useCaseCodes',
170
- 'mainConfig'
170
+ 'mainConfig',
171
+ 'jump'
171
172
  ]);
172
173
  if (
173
174
  win.top.location.href.indexOf('#/login') === -1 &&