eoss-ui 0.5.93 → 0.5.95

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 (93) hide show
  1. package/lib/.DS_Store +0 -0
  2. package/lib/button-group.js +198 -210
  3. package/lib/button.js +2 -2
  4. package/lib/calendar.js +2 -2
  5. package/lib/card.js +2 -2
  6. package/lib/cascader.js +2 -2
  7. package/lib/checkbox-group.js +3 -2
  8. package/lib/clients.js +2 -2
  9. package/lib/config/image.js +3 -0
  10. package/lib/data-table-form.js +3 -2
  11. package/lib/data-table.js +31 -25
  12. package/lib/date-picker.js +2 -2
  13. package/lib/dialog.js +6 -5
  14. package/lib/enterprise.js +2 -2
  15. package/lib/eoss-ui.common.js +466 -327
  16. package/lib/error-page.js +2 -2
  17. package/lib/flow-group.js +2 -2
  18. package/lib/flow-list.js +4 -4
  19. package/lib/flow.js +6 -5
  20. package/lib/form.js +6 -5
  21. package/lib/handle-user.js +2 -2
  22. package/lib/handler.js +203 -200
  23. package/lib/icon.js +9 -9
  24. package/lib/icons.js +4 -4
  25. package/lib/index.js +1 -1
  26. package/lib/input-number.js +2 -2
  27. package/lib/input.js +2 -2
  28. package/lib/label.js +2 -2
  29. package/lib/layout.js +2 -2
  30. package/lib/login.js +132 -18
  31. package/lib/main.js +91 -54
  32. package/lib/menu.js +2 -2
  33. package/lib/nav.js +2 -2
  34. package/lib/notify.js +2 -2
  35. package/lib/page.js +2 -2
  36. package/lib/pagination.js +2 -2
  37. package/lib/player.js +8 -8
  38. package/lib/qr-code.js +4 -4
  39. package/lib/radio-group.js +2 -2
  40. package/lib/retrial-auth.js +2 -2
  41. package/lib/select-ganged.js +2 -2
  42. package/lib/select.js +2 -2
  43. package/lib/selector-panel.js +6 -5
  44. package/lib/selector.js +11 -11
  45. package/lib/sizer.js +2 -2
  46. package/lib/steps.js +2 -2
  47. package/lib/switch.js +9 -9
  48. package/lib/table-form.js +10 -7
  49. package/lib/tabs-panel.js +2 -2
  50. package/lib/tabs.js +2 -2
  51. package/lib/theme-chalk/base.css +1 -1
  52. package/lib/theme-chalk/index.css +1 -1
  53. package/lib/theme-chalk/main.css +1 -1
  54. package/lib/theme-chalk/menu.css +1 -1
  55. package/lib/theme-chalk/simplicity.css +1 -1
  56. package/lib/theme-chalk/sizer.css +1 -1
  57. package/lib/theme-chalk/upload.css +1 -1
  58. package/lib/tips.js +2 -2
  59. package/lib/toolbar.js +2 -2
  60. package/lib/tree-group.js +2 -2
  61. package/lib/tree.js +2 -2
  62. package/lib/upload.js +14 -13
  63. package/lib/wujie.js +2 -2
  64. package/lib/wxlogin.js +145 -145
  65. package/package.json +1 -1
  66. package/packages/.DS_Store +0 -0
  67. package/packages/data-table/src/main.vue +7 -4
  68. package/packages/form/src/main.vue +1 -1
  69. package/packages/form/src/table.vue +3 -0
  70. package/packages/handler/.DS_Store +0 -0
  71. package/packages/handler/src/main.vue +5 -6
  72. package/packages/login/.DS_Store +0 -0
  73. package/packages/login/src/main.vue +92 -14
  74. package/packages/main/.DS_Store +0 -0
  75. package/packages/main/src/.DS_Store +0 -0
  76. package/packages/main/src/default/index.vue +36 -36
  77. package/packages/main/src/main.vue +27 -4
  78. package/packages/main/src/simplicity/index.vue +2 -3
  79. package/packages/theme-chalk/lib/base.css +1 -1
  80. package/packages/theme-chalk/lib/index.css +1 -1
  81. package/packages/theme-chalk/lib/main.css +1 -1
  82. package/packages/theme-chalk/lib/menu.css +1 -1
  83. package/packages/theme-chalk/lib/simplicity.css +1 -1
  84. package/packages/theme-chalk/lib/sizer.css +1 -1
  85. package/packages/theme-chalk/lib/upload.css +1 -1
  86. package/packages/theme-chalk/src/.DS_Store +0 -0
  87. package/packages/theme-chalk/src/base.scss +41 -0
  88. package/packages/theme-chalk/src/main.scss +3 -0
  89. package/packages/theme-chalk/src/menu.scss +8 -0
  90. package/packages/upload/src/main.vue +8 -3
  91. package/src/.DS_Store +0 -0
  92. package/src/config/image.js +2 -0
  93. package/src/index.js +1 -1
@@ -311,7 +311,7 @@
311
311
  <slot name="button"></slot>
312
312
  <span @click="downloadExe">初次使用请下载一键安装包</span>
313
313
  </div>
314
- <div class="es-warning" v-if="warning">
314
+ <div class="es-warning" v-if="warnInfo">
315
315
  {{ warnInfo }}
316
316
  </div>
317
317
  </div>
@@ -371,6 +371,14 @@
371
371
  >
372
372
  <es-qr-code :content="checkCode" v-if="checkCode"></es-qr-code>
373
373
  </es-dialog>
374
+ <transition name="launch-fade">
375
+ <div class="es-launch-image" :style="_launchImage" v-show="showLaunch">
376
+ <p class="es-launch-text es-launch-user-name">{{ userName }},你好!</p>
377
+ <p class="es-launch-text es-launch-system-name">
378
+ 欢迎进入{{ sysName }}
379
+ </p>
380
+ </div>
381
+ </transition>
374
382
  </div>
375
383
  </template>
376
384
  <script>
@@ -393,6 +401,7 @@ import {
393
401
  doAssistanceQrLogin
394
402
  } from 'eoss-ui/src/config/api.js';
395
403
  const ceshi = util.getParams('ceshi');
404
+ import { dayImg, nightImg } from 'eoss-ui/src/config/image';
396
405
  export default {
397
406
  name: 'EsLogin',
398
407
  inheritAttrs: false,
@@ -410,6 +419,7 @@ export default {
410
419
  type: String,
411
420
  default: 'default'
412
421
  },
422
+ launch: Boolean,
413
423
  param: {
414
424
  type: Object,
415
425
  default() {
@@ -598,7 +608,16 @@ export default {
598
608
  },
599
609
  isScale: Boolean,
600
610
  showIosTips: Boolean,
601
- safe: Boolean
611
+ safe: Boolean,
612
+ launchImage: {
613
+ type: [String, Object],
614
+ default() {
615
+ return {
616
+ day: dayImg,
617
+ night: nightImg
618
+ };
619
+ }
620
+ }
602
621
  },
603
622
  computed: {
604
623
  transform() {
@@ -707,6 +726,12 @@ export default {
707
726
  (this.passModifyModel.indexOf('6') > -1 ||
708
727
  this.passModifyModel.indexOf('11') > -1)
709
728
  );
729
+ },
730
+ _launchImage() {
731
+ let img = util.isObject(this.launchImages)
732
+ ? this.launchImages[this.launchKey]
733
+ : this.launchImages;
734
+ return { 'background-image': `url(${img})` };
710
735
  }
711
736
  },
712
737
  watch: {
@@ -831,7 +856,13 @@ export default {
831
856
  event.preventDefault();
832
857
  return false;
833
858
  }
834
- }
859
+ },
860
+ userName: '',
861
+ launchShow: this.launch,
862
+ showLaunch: false,
863
+ launchImages: this.launchImage,
864
+ launchKey: 'day',
865
+ launchTime: 3000
835
866
  };
836
867
  },
837
868
  beforeCreate() {
@@ -846,11 +877,11 @@ export default {
846
877
  'deviceUnique',
847
878
  'userId',
848
879
  'userName',
849
- 'useCaseCodes',
850
- 'showLaunch'
880
+ 'useCaseCodes'
851
881
  ]);
852
882
  },
853
883
  created() {
884
+ this.launchKey = 5 < new Date().getHours() < 18 ? 'day' : 'night';
854
885
  if (ceshi == 'true' || ceshi == true) {
855
886
  this.loginModel = '0';
856
887
  }
@@ -1046,7 +1077,7 @@ export default {
1046
1077
  async getLogin() {
1047
1078
  const config = util.getStorage('initLogin');
1048
1079
  if (config) {
1049
- this.setConfig(config);
1080
+ this.setConfig(JSON.parse(config));
1050
1081
  }
1051
1082
  await util
1052
1083
  .ajax({ url: this.initLogin })
@@ -1097,9 +1128,9 @@ export default {
1097
1128
  if (res.linuxDownloadUrl) {
1098
1129
  downloads['linux'] = res.linuxDownloadUrl;
1099
1130
  }
1131
+ this.sysName = res.subsystemName;
1100
1132
  this.secret = res.secret;
1101
1133
  this.setup = res.setup;
1102
- this.sysName = res.subsystemName;
1103
1134
  this.downloadSetup = res.downloadSetup;
1104
1135
  if (res.subsystemName) {
1105
1136
  document.title = res.subsystemName;
@@ -1179,6 +1210,27 @@ export default {
1179
1210
  if (res.subsystemExtend.uosDownloadUrl) {
1180
1211
  downloads.uos = res.subsystemExtend.uosDownloadUrl;
1181
1212
  }
1213
+ if (res.subsystemExtend.warningText) {
1214
+ this.warningText = res.subsystemExtend.warningText;
1215
+ }
1216
+ if (res.subsystemExtend.launchTime) {
1217
+ this.launchTime = parseInt(res.subsystemExtend.launchTime, 10);
1218
+ }
1219
+ if (res.subsystemExtend.launchImage) {
1220
+ if (!this.launchShow) {
1221
+ this.launchShow = true;
1222
+ }
1223
+ if (
1224
+ res.subsystemExtend.launchImage != 'true' &&
1225
+ res.subsystemExtend.launchImage != true
1226
+ ) {
1227
+ this.launchImages =
1228
+ res.subsystemExtend.launchImage.indexOf('{') > -1 &&
1229
+ res.subsystemExtend.launchImage.indexOf('}') > -1
1230
+ ? JSON.parse(res.subsystemExtend.launchImage)
1231
+ : res.subsystemExtend.launchImage;
1232
+ }
1233
+ }
1182
1234
  }
1183
1235
  this.passModifyModel = res.passModifyModel;
1184
1236
  this.wechatAppid = res.wechatAppid;
@@ -1493,6 +1545,7 @@ export default {
1493
1545
  handleResults(results, type) {
1494
1546
  switch (results.statusCode) {
1495
1547
  case 0:
1548
+ this.userName = results.userName;
1496
1549
  util.setStorage({
1497
1550
  type: this.storage,
1498
1551
  key: {
@@ -1505,11 +1558,14 @@ export default {
1505
1558
  useCaseCodes: results.resourceCodes
1506
1559
  }
1507
1560
  });
1508
- this.$message({
1509
- message: '登录成功!',
1510
- type: 'success',
1511
- duration: 1500,
1512
- onClose: () => {
1561
+ if (this.launchShow) {
1562
+ this.$message({
1563
+ message: '登录成功!',
1564
+ type: 'success',
1565
+ duration: 1000
1566
+ });
1567
+ this.showLaunch = true;
1568
+ setTimeout(() => {
1513
1569
  if (this.toUrl) {
1514
1570
  window.location.href = this.toUrl;
1515
1571
  } else if (results.doorIndex && this.doorIndex) {
@@ -1523,8 +1579,30 @@ export default {
1523
1579
  this.$router.push({ name: 'main' });
1524
1580
  }
1525
1581
  }
1526
- }
1527
- });
1582
+ this.showLaunch = false;
1583
+ }, this.launchTime);
1584
+ } else {
1585
+ this.$message({
1586
+ message: '登录成功!',
1587
+ type: 'success',
1588
+ duration: 1500,
1589
+ onClose: () => {
1590
+ if (this.toUrl) {
1591
+ window.location.href = this.toUrl;
1592
+ } else if (results.doorIndex && this.doorIndex) {
1593
+ sessionStorage.setItem('doorIndex', results.doorIndex);
1594
+ localStorage.setItem('isLogined', true);
1595
+ window.location.href = results.doorIndex;
1596
+ } else {
1597
+ if (window.location.href.indexOf('login.html') > -1) {
1598
+ window.location.href = './main.html';
1599
+ } else {
1600
+ this.$router.push({ name: 'main' });
1601
+ }
1602
+ }
1603
+ }
1604
+ });
1605
+ }
1528
1606
  break;
1529
1607
  case 2:
1530
1608
  this.$confirm(
Binary file
Binary file
@@ -382,7 +382,7 @@ export default {
382
382
  default: true
383
383
  },
384
384
  loadHomePage: {
385
- type: [Boolean, String],
385
+ type: Boolean,
386
386
  default: true
387
387
  },
388
388
  appCode: String,
@@ -586,6 +586,7 @@ export default {
586
586
  selectPage: '',
587
587
  //主页面
588
588
  homePage: '',
589
+ isLoadHomePage: this.loadHomePage,
589
590
  //header背景
590
591
  mainLogo: null,
591
592
  headerImg: this.headerImage,
@@ -639,8 +640,8 @@ export default {
639
640
  },
640
641
  created() {
641
642
  let params = util.getParams() || {};
642
- if (typeof this.loadHomePage === 'string') {
643
- this.homePage = this.loadHomePage;
643
+ if (params.homePage == 0) {
644
+ this.isLoadHomePage = false;
644
645
  }
645
646
  this.isHeader = params.header;
646
647
  let sysLogoIco = sessionStorage.getItem('sysLogoIco');
@@ -813,39 +814,38 @@ export default {
813
814
  if (i === 'initApplication' && results[i]) {
814
815
  this.results[i] = results[i].split(',');
815
816
  }
816
- if (i === 'indexUrl' && results[i] && this.loadHomePage) {
817
- let applicationid =
818
- util.getParams('applicationid') || util.getParams('applicationId');
819
- let hash = util.win.location.hash;
820
- if (hash) {
821
- hash = hash.split('?')[0];
822
- }
823
- let jump = sessionStorage.getItem('jump');
824
- if (
825
- (!applicationid &&
826
- !this.menuCode &&
827
- (!jump || !this.isHistory) &&
828
- (hash === '#/' || hash === '#/main')) ||
829
- jump == results[i]
830
- ) {
831
- this.homePage =
832
- typeof this.loadHomePage === 'string'
833
- ? this.loadHomePage
834
- : results[i];
835
- if (this.isHomePage && this.homePage) {
836
- if (this.menus && this.menus.length) {
837
- let ids = null;
838
- this.homePage && (ids = this.getId(this.menus, this.homePage));
839
- if (ids) {
840
- this.defaultActive = ids;
841
- } else if (this.homePage) {
842
- this.handleJump(this.homePage);
817
+ if (i === 'indexUrl' && results[i]) {
818
+ this.homePage = results[i];
819
+ if (this.isLoadHomePage) {
820
+ let applicationid =
821
+ util.getParams('applicationid') ||
822
+ util.getParams('applicationId');
823
+ let hash = util.win.location.hash;
824
+ if (hash) {
825
+ hash = hash.split('?')[0];
826
+ }
827
+ let jump = sessionStorage.getItem('jump');
828
+ if (
829
+ (!applicationid &&
830
+ !this.menuCode &&
831
+ (!jump || !this.isHistory) &&
832
+ (hash === '#/' || hash === '#/main')) ||
833
+ jump == results[i]
834
+ ) {
835
+ if (this.isHomePage) {
836
+ if (this.menus && this.menus.length) {
837
+ let ids = (ids = this.getId(this.menus, this.homePage));
838
+ if (ids) {
839
+ this.defaultActive = ids;
840
+ } else {
841
+ this.handleJump(this.homePage);
842
+ }
843
+ this.setMenu(this.menus);
843
844
  }
844
- this.setMenu(this.menus);
845
845
  }
846
+ } else if (this.menus && this.menus.length) {
847
+ this.setMenu(this.menus);
846
848
  }
847
- } else if (this.menus && this.menus.length) {
848
- this.setMenu(this.menus);
849
849
  }
850
850
  }
851
851
  if (i === 'doorIndex' && results[i]) {
@@ -1173,10 +1173,10 @@ export default {
1173
1173
  this.isDefault = false;
1174
1174
  this.setDefault(res, this.defaultActive);
1175
1175
  } else {
1176
- if (this.homePage || !util.getStorage('mainConfig')) {
1177
- this.isDefault = true;
1176
+ if (this.homePage) {
1177
+ this.isDefault = this.isLoadHomePage;
1178
1178
  if (
1179
- this.homePage &&
1179
+ this.isLoadHomePage &&
1180
1180
  (!this.defaultActive || !this.defaultActive.length)
1181
1181
  ) {
1182
1182
  let ids = this.getId(this.menus, this.homePage);
@@ -40,6 +40,7 @@
40
40
  </div>
41
41
  </template>
42
42
  <script>
43
+ import { dayImg, nightImg } from 'eoss-ui/src/config/image';
43
44
  import Simplicity from './simplicity/index.vue';
44
45
  import MainDefault from './default/index.vue';
45
46
  import util from 'eoss-ui/src/utils/util';
@@ -58,9 +59,30 @@ export default {
58
59
  MainDefault
59
60
  },
60
61
  props: {
61
- type: String
62
+ launch: Boolean,
63
+ type: String,
64
+ launchImage: {
65
+ type: [String, Object],
66
+ default() {
67
+ return {
68
+ day: dayImg,
69
+ night: nightImg
70
+ };
71
+ }
72
+ },
73
+ launchTime: {
74
+ type: Number,
75
+ default: 3000
76
+ }
77
+ },
78
+ computed: {
79
+ _launchImage() {
80
+ let img = util.isObject(this.launchImages)
81
+ ? this.launchImages[this.launchKey]
82
+ : this.launchImages;
83
+ return { 'background-image': `url(${img})` };
84
+ }
62
85
  },
63
- computed: {},
64
86
  watch: {},
65
87
  data() {
66
88
  return {
@@ -180,8 +202,7 @@ export default {
180
202
  'menus',
181
203
  'useCaseCodes',
182
204
  'mainConfig',
183
- 'jump',
184
- 'showLaunch'
205
+ 'jump'
185
206
  ]);
186
207
  const loginPage =
187
208
  util.getStorage('login') || util.getStorage('loginPage');
@@ -246,6 +267,8 @@ export default {
246
267
  util.getMainConfig((res) => {
247
268
  this.$refs.main.init(res);
248
269
  });
270
+ } else {
271
+ mainConfig = JSON.parse(mainConfig);
249
272
  }
250
273
  },
251
274
  /**
@@ -765,7 +765,7 @@ export default {
765
765
  depId: results.userModel.depId,
766
766
  orgId: results.userModel.orgId,
767
767
  userId: results.userModel.userId,
768
- userName: results.userModel.username,
768
+ userName: results.userModel.username || results.userModel.userName,
769
769
  useCaseCodes: results.resourceCodes || results.userModel.resourceCodes
770
770
  }
771
771
  });
@@ -1707,8 +1707,7 @@ export default {
1707
1707
  'menus',
1708
1708
  'useCaseCodes',
1709
1709
  'mainConfig',
1710
- 'jump',
1711
- 'showLaunch'
1710
+ 'jump'
1712
1711
  ]);
1713
1712
  if (this.onQuit && typeof this.onQuit === 'function') {
1714
1713
  this.onQuit();