eoss-ui 0.4.57 → 0.4.59

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 (76) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +19 -5
  3. package/lib/button.js +19 -5
  4. package/lib/checkbox-group.js +19 -5
  5. package/lib/clients.js +95 -4
  6. package/lib/data-table-form.js +19 -5
  7. package/lib/data-table.js +24 -11
  8. package/lib/date-picker.js +19 -5
  9. package/lib/dialog.js +19 -5
  10. package/lib/eoss-ui.common.js +1361 -1074
  11. package/lib/flow-group.js +928 -860
  12. package/lib/flow-list.js +19 -5
  13. package/lib/flow.js +32 -16
  14. package/lib/form.js +19 -5
  15. package/lib/handle-user.js +19 -5
  16. package/lib/handler.js +38 -15
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +19 -5
  19. package/lib/input.js +31 -10
  20. package/lib/login.js +102 -33
  21. package/lib/main.js +71 -36
  22. package/lib/mainComp.js +19 -5
  23. package/lib/nav.js +19 -5
  24. package/lib/page.js +19 -5
  25. package/lib/player.js +19 -5
  26. package/lib/qr-code.js +19 -5
  27. package/lib/radio-group.js +19 -5
  28. package/lib/retrial-auth.js +24 -9
  29. package/lib/select-ganged.js +19 -5
  30. package/lib/select.js +19 -5
  31. package/lib/selector-panel.js +19 -5
  32. package/lib/selector.js +19 -5
  33. package/lib/sizer.js +19 -5
  34. package/lib/steps.js +19 -5
  35. package/lib/switch.js +19 -5
  36. package/lib/table-form.js +26 -11
  37. package/lib/tabs.js +19 -5
  38. package/lib/theme-chalk/clients.css +1 -1
  39. package/lib/theme-chalk/flow-group.css +1 -1
  40. package/lib/theme-chalk/index.css +1 -1
  41. package/lib/theme-chalk/login.css +1 -1
  42. package/lib/theme-chalk/upload.css +1 -1
  43. package/lib/tips.js +19 -5
  44. package/lib/toolbar.js +0 -1
  45. package/lib/tree-group.js +19 -5
  46. package/lib/tree.js +19 -5
  47. package/lib/upload.js +110 -62
  48. package/lib/utils/util.js +19 -5
  49. package/lib/wujie.js +19 -5
  50. package/lib/wxlogin.js +19 -5
  51. package/package.json +2 -2
  52. package/packages/clients/src/main.vue +60 -2
  53. package/packages/data-table/src/main.vue +0 -1
  54. package/packages/flow/src/main.vue +1 -0
  55. package/packages/flow/src/startTaskRead.vue +2 -2
  56. package/packages/flow-group/src/main.vue +284 -265
  57. package/packages/form/src/table.vue +3 -2
  58. package/packages/handler/src/main.vue +20 -10
  59. package/packages/input/src/main.vue +7 -2
  60. package/packages/login/src/main.vue +77 -27
  61. package/packages/main/src/main.vue +28 -16
  62. package/packages/main/src/userinfo.vue +20 -9
  63. package/packages/retrial-auth/src/main.vue +3 -2
  64. package/packages/theme-chalk/lib/clients.css +1 -1
  65. package/packages/theme-chalk/lib/flow-group.css +1 -1
  66. package/packages/theme-chalk/lib/index.css +1 -1
  67. package/packages/theme-chalk/lib/login.css +1 -1
  68. package/packages/theme-chalk/lib/upload.css +1 -1
  69. package/packages/theme-chalk/src/clients.scss +8 -0
  70. package/packages/theme-chalk/src/flow-group.scss +9 -3
  71. package/packages/theme-chalk/src/login.scss +3 -0
  72. package/packages/theme-chalk/src/upload.scss +50 -26
  73. package/packages/toolbar/src/main.vue +0 -1
  74. package/packages/upload/src/main.vue +56 -37
  75. package/src/index.js +1 -1
  76. package/src/utils/util.js +21 -10
@@ -141,7 +141,6 @@ export default {
141
141
  },
142
142
  computed: {
143
143
  lists() {
144
- console.log(111);
145
144
  if (this.data === undefined) {
146
145
  if (Object.keys(this.hide).length) {
147
146
  this.list.forEach((item) => {
@@ -284,7 +283,25 @@ export default {
284
283
  if (this.onQuit && typeof this.onQuit === 'function') {
285
284
  this.onQuit();
286
285
  } else {
287
- if (util.win.top.location.href.indexOf('main.html') > -1) {
286
+ const loginPage =
287
+ util.getStorage('login') || util.getStorage('loginPage');
288
+ if (loginPage) {
289
+ let src;
290
+ if (!util.startWith(loginPage, ['http', '/'])) {
291
+ let pathname = util.win.top.location.pathname;
292
+ if (pathname !== '/') {
293
+ pathname = pathname.split('/');
294
+ pathname.splice(pathname.length - 1);
295
+ pathname = pathname.join('/');
296
+ }
297
+ src = pathname + loginPage.replace('./', '');
298
+ } else {
299
+ src = loginPage;
300
+ }
301
+ util.win.top.location.href = src;
302
+ } else if (
303
+ util.win.top.location.href.indexOf('main.html') > -1
304
+ ) {
288
305
  util.win.top.location.href = './login.html';
289
306
  } else {
290
307
  const hash = util.win.top.location.hash;
@@ -293,14 +310,7 @@ export default {
293
310
  util.win.top.location.href =
294
311
  util.win.location.href.slice(0, len) + '#/login';
295
312
  } else {
296
- const loginPage =
297
- util.getStorage('login') ||
298
- util.getStorage('loginPage');
299
- if (loginPage) {
300
- util.win.top.location.href = loginPage;
301
- } else {
302
- util.win.top.location.href = '/login.html';
303
- }
313
+ util.win.top.location.href = '/login.html';
304
314
  }
305
315
  }
306
316
  }
@@ -45,7 +45,8 @@ export default {
45
45
  readonly: Boolean,
46
46
  plain: Boolean,
47
47
  text: [String, Number],
48
- scope: {}
48
+ scope: {},
49
+ exclude: Boolean
49
50
  },
50
51
  data() {
51
52
  return {
@@ -151,7 +152,11 @@ export default {
151
152
  },
152
153
  searchFilter(query) {
153
154
  return (state) => {
154
- return state.value.toLowerCase().indexOf(query.toLowerCase()) === 0;
155
+ if (this.exclude) {
156
+ return state.value.toLowerCase().indexOf(query.toLowerCase()) === -1;
157
+ } else {
158
+ return state.value.toLowerCase().indexOf(query.toLowerCase()) === 0;
159
+ }
155
160
  };
156
161
  },
157
162
  renderd(doms, h, type) {
@@ -55,19 +55,22 @@
55
55
  prop="username"
56
56
  :rules="username.rules"
57
57
  >
58
- <el-input
58
+ <es-input
59
59
  v-model="formData.username"
60
60
  size="large"
61
61
  type="text"
62
62
  name="username"
63
+ exclude
63
64
  :placeholder="username.placeholder"
64
- @blur="handleBlur"
65
+ :focusShow="focusShow"
66
+ :data="users"
67
+ @select="handleBlur"
65
68
  autocomplete="off"
66
69
  >
67
70
  <template slot="prefix">
68
71
  <i class="es-icon-zhanghao es-label-user"></i>
69
72
  </template>
70
- </el-input>
73
+ </es-input>
71
74
  </el-form-item>
72
75
  <el-form-item
73
76
  size="large"
@@ -132,7 +135,7 @@
132
135
  </el-form-item>
133
136
  <div class="es-password-handle" v-show="remember && forget">
134
137
  <el-checkbox
135
- v-show="remember && active == '0'"
138
+ v-show="remember && (active == '0' || active == '12')"
136
139
  v-model="checked"
137
140
  >记住密码</el-checkbox
138
141
  >
@@ -160,7 +163,11 @@
160
163
  <div class="es-login-down-app">
161
164
  打开
162
165
  <template v-if="active == 3">
163
- <a class="es-login-app-name es-pointer" v-if="downloadApp"
166
+ <a
167
+ class="es-login-app-name es-pointer"
168
+ target="_blank"
169
+ :href="downloadApp"
170
+ v-if="downloadApp"
164
171
  >{{ app }}app</a
165
172
  >
166
173
  <span
@@ -213,7 +220,6 @@
213
220
  :placeholder="
214
221
  active == 6 ? phone.placeholder : email.placeholder
215
222
  "
216
- @blur="handleBlur"
217
223
  autocomplete="off"
218
224
  >
219
225
  <template slot="prefix">
@@ -378,7 +384,9 @@ export default {
378
384
  default: () => {
379
385
  return {
380
386
  placeholder: '请输入账号',
381
- rules: [{ required: true, message: '账号不能为空', trigger: 'blur' }]
387
+ rules: [
388
+ { required: true, message: '账号不能为空', trigger: 'change' }
389
+ ]
382
390
  };
383
391
  }
384
392
  },
@@ -507,6 +515,12 @@ export default {
507
515
  default: true
508
516
  },
509
517
  downloadApp: String,
518
+ downLoadUrls: {
519
+ type: Object,
520
+ default() {
521
+ return {};
522
+ }
523
+ },
510
524
  onDownLoadApp: [Function, Boolean],
511
525
  redirect_uri: String,
512
526
  position: {
@@ -665,7 +679,7 @@ export default {
665
679
  checked(val) {
666
680
  if (!val) {
667
681
  localStorage.removeItem('unpd');
668
- localStorage.removeItem('remember');
682
+ //localStorage.removeItem('remember');
669
683
  }
670
684
  },
671
685
  secret: {
@@ -692,6 +706,8 @@ export default {
692
706
  submit: false,
693
707
  checked: false,
694
708
  formData: this.model,
709
+ focusShow: false,
710
+ users: [],
695
711
  imageCode: '',
696
712
  secret: null,
697
713
  identifyingId: '',
@@ -786,27 +802,38 @@ export default {
786
802
  return url;
787
803
  },
788
804
  getRemember(user) {
789
- if (!user) {
790
- user = localStorage.getItem('remember');
791
- if (user) {
792
- user = util.esDecode(user);
793
- } else {
794
- return false;
795
- }
796
- }
797
805
  let values = localStorage.getItem('unpd');
798
806
  let value = {};
799
807
  if (values) {
800
808
  try {
801
809
  values = JSON.parse(values);
810
+ let users = [];
802
811
  for (let i in values) {
803
- value[util.esDecode(i)] = util.esDecode(values[i]);
812
+ let k = util.esDecode(i);
813
+ value[k] = util.esDecode(values[i]);
814
+ users.push({ value: k });
804
815
  }
805
- if (value[user]) {
816
+ this.users = users;
817
+ let keys = Object.keys(value);
818
+ if (keys.length) {
806
819
  this.checked = true;
807
820
  }
808
- this.$set(this.formData, 'username', user);
809
- this.$set(this.formData, 'password', value[user]);
821
+ if (!user && keys.length == 1) {
822
+ user = keys[0];
823
+ // user = localStorage.getItem('remember');
824
+ // if (user) {
825
+ // user = util.esDecode(user);
826
+ // } else {
827
+ // user = keys[0];
828
+ // }
829
+ }
830
+ if (keys.length > 1) {
831
+ this.focusShow = true;
832
+ }
833
+ if (user) {
834
+ this.$set(this.formData, 'username', user);
835
+ this.$set(this.formData, 'password', value[user]);
836
+ }
810
837
  } catch (error) {
811
838
  localStorage.removeItem('unpd');
812
839
  }
@@ -827,7 +854,7 @@ export default {
827
854
  }
828
855
  }
829
856
  if (this.checked) {
830
- localStorage.setItem('remember', util.esEncode(this.formData.username));
857
+ //localStorage.setItem('remember', util.esEncode(this.formData.username));
831
858
  value[this.formData.username] = this.formData.password;
832
859
  let data = {};
833
860
  for (let i in value) {
@@ -845,7 +872,7 @@ export default {
845
872
  } else {
846
873
  localStorage.removeItem('unpd');
847
874
  }
848
- localStorage.removeItem('remember');
875
+ //localStorage.removeItem('remember');
849
876
  }
850
877
  },
851
878
  // 下载app的弹窗
@@ -865,7 +892,8 @@ export default {
865
892
  this.$refs.login && this.$refs.login.clearValidate();
866
893
  if (res != 1) {
867
894
  this.active = res;
868
- this.formData = JSON.parse(JSON.stringify(this.defaultModel));
895
+ Object.keys(this.defaultModel).length &&
896
+ (this.formData = JSON.parse(JSON.stringify(this.defaultModel)));
869
897
  }
870
898
  this.countdown = 0;
871
899
  this.$emit('change-type', res, this.identifyingId);
@@ -908,10 +936,22 @@ export default {
908
936
  const host = util.getStorage('host');
909
937
  this.identifyingId = res.identifyingId;
910
938
  this.getImgCode();
911
- this.download = {
912
- android: res.androidDownloadUrl,
913
- ios: res.iosDownloadUrl || res.iosDownloadUrl2
914
- };
939
+ let downloads = {};
940
+ if (res.androidDownloadUrl) {
941
+ downloads['android'] = res.androidDownloadUrl;
942
+ }
943
+ if (res.iosDownloadUrl || res.iosDownloadUrl2) {
944
+ downloads['ios'] = res.iosDownloadUrl || res.iosDownloadUrl2;
945
+ }
946
+ if (res.macDownloadUrl) {
947
+ downloads['mac'] = res.macDownloadUrl;
948
+ }
949
+ if (res.winDownloadUrl) {
950
+ downloads['win'] = res.winDownloadUrl;
951
+ }
952
+ if (res.linuxDownloadUrl) {
953
+ downloads['linux'] = res.linuxDownloadUrl;
954
+ }
915
955
  this.secret = res.secret;
916
956
  this.setup = res.setup;
917
957
  this.sysName = res.subsystemName;
@@ -952,10 +992,20 @@ export default {
952
992
  util.updateTheme(res.subsystemExtend.themeColor);
953
993
  localStorage.setItem('theme', res.subsystemExtend.themeColor);
954
994
  }
995
+ if (res.subsystemExtend.macDownloadUrl) {
996
+ downloads.mac = res.subsystemExtend.macDownloadUrl;
997
+ }
998
+ if (res.subsystemExtend.winDownloadUrl) {
999
+ downloads.win = res.subsystemExtend.winDownloadUrl;
1000
+ }
1001
+ if (res.subsystemExtend.linuxDownloadUrl) {
1002
+ downloads.linux = res.subsystemExtend.linuxDownloadUrl;
1003
+ }
955
1004
  }
956
1005
  this.passModifyModel = res.passModifyModel;
957
1006
  this.wechatAppid = res.wechatAppid;
958
1007
  this.wechatScope = res.wechatScope;
1008
+ this.download = { ...this.downLoadUrls, ...downloads };
959
1009
  if (res.sysLogoIco) {
960
1010
  util.setFavicon(res.sysLogoIco);
961
1011
  }
@@ -1354,12 +1354,14 @@ export default {
1354
1354
  }
1355
1355
  break;
1356
1356
  case 'sys':
1357
- this.navIds = [node.id];
1358
- this.tabs = [];
1359
- this.menu = node.children;
1360
- this.title = node.text;
1361
- this.active = this.getFirst(node.children[0]).id;
1362
- this.isSide = true;
1357
+ if (Number(node.urlopenmode) !== 1) {
1358
+ this.navIds = [node.id];
1359
+ this.tabs = [];
1360
+ this.menu = node.children;
1361
+ this.title = node.text;
1362
+ this.active = this.getFirst(node.children[0]).id;
1363
+ this.isSide = true;
1364
+ }
1363
1365
  break;
1364
1366
  case 'sub':
1365
1367
  this.navIds = [node.id];
@@ -1768,22 +1770,32 @@ export default {
1768
1770
  'mainConfig',
1769
1771
  'jump'
1770
1772
  ]);
1771
- if (util.win.top.location.href.indexOf('main.html') > -1) {
1773
+ const loginPage =
1774
+ util.getStorage('login') || util.getStorage('loginPage');
1775
+ if (loginPage) {
1776
+ let src;
1777
+ if (!util.startWith(loginPage, ['http', '/'])) {
1778
+ let pathname = util.win.top.location.pathname;
1779
+ if (pathname !== '/') {
1780
+ pathname = pathname.split('/');
1781
+ pathname.splice(pathname.length - 1);
1782
+ pathname = pathname.join('/');
1783
+ }
1784
+ src = pathname + loginPage.replace('./', '');
1785
+ } else {
1786
+ src = loginPage;
1787
+ }
1788
+ util.win.top.location.href = src;
1789
+ } else if (util.win.top.location.href.indexOf('main.html') > -1) {
1772
1790
  util.win.top.location.href = './login.html';
1773
1791
  } else {
1774
1792
  const hash = util.win.top.location.hash;
1775
1793
  if (hash) {
1776
1794
  const len = util.win.top.location.href.indexOf(hash);
1777
- let href = util.win.top.location.href.slice(0, len) + '#/login';
1778
- util.win.top.location.href = href;
1795
+ util.win.top.location.href =
1796
+ util.win.location.href.slice(0, len) + '#/login';
1779
1797
  } else {
1780
- const loginPage =
1781
- util.getStorage('login') || util.getStorage('loginPage');
1782
- if (loginPage) {
1783
- util.win.top.location.href = loginPage;
1784
- } else {
1785
- util.win.top.location.href = '/login.html';
1786
- }
1798
+ util.win.top.location.href = '/login.html';
1787
1799
  }
1788
1800
  }
1789
1801
  })
@@ -370,7 +370,25 @@ export default {
370
370
  type: 'warning'
371
371
  })
372
372
  .then(() => {
373
- if (util.win.top.location.href.indexOf('main.html') > -1) {
373
+ const loginPage =
374
+ util.getStorage('login') || util.getStorage('loginPage');
375
+ if (loginPage) {
376
+ let src;
377
+ if (!util.startWith(loginPage, ['http', '/'])) {
378
+ let pathname = util.win.top.location.pathname;
379
+ if (pathname !== '/') {
380
+ pathname = pathname.split('/');
381
+ pathname.splice(pathname.length - 1);
382
+ pathname = pathname.join('/');
383
+ }
384
+ src = pathname + loginPage.replace('./', '');
385
+ } else {
386
+ src = loginPage;
387
+ }
388
+ util.win.top.location.href = src;
389
+ } else if (
390
+ util.win.top.location.href.indexOf('main.html') > -1
391
+ ) {
374
392
  util.win.top.location.href = './login.html';
375
393
  } else {
376
394
  const hash = util.win.top.location.hash;
@@ -379,14 +397,7 @@ export default {
379
397
  util.win.top.location.href =
380
398
  util.win.location.href.slice(0, len) + '#/login';
381
399
  } else {
382
- const loginPage =
383
- util.getStorage('login') ||
384
- util.getStorage('loginPage');
385
- if (loginPage) {
386
- util.win.top.location.href = loginPage;
387
- } else {
388
- util.win.top.location.href = '/login.html';
389
- }
400
+ util.win.top.location.href = '/login.html';
390
401
  }
391
402
  }
392
403
  })
@@ -68,6 +68,7 @@ export default {
68
68
  name: 'EsRetrialAuth',
69
69
  inheritAttrs: false,
70
70
  props: {
71
+ reload: Boolean,
71
72
  group: String,
72
73
  type: Array,
73
74
  msgBox: {}
@@ -170,7 +171,7 @@ export default {
170
171
  type: 'success'
171
172
  });
172
173
  this.msgBox.handleClose();
173
- util.win.top.location.reload();
174
+ this.reload && util.win.top.location.reload();
174
175
  } else {
175
176
  this.$message({
176
177
  message: msg,
@@ -248,7 +249,7 @@ export default {
248
249
  type: 'success'
249
250
  });
250
251
  this.msgBox.handleClose();
251
- util.win.top.location.reload();
252
+ this.reload && util.win.top.location.reload();
252
253
  } else {
253
254
  this.scanCode = setTimeout(() => {
254
255
  this.handleScanCodeRetrialAuth();