eoss-ui 0.4.58 → 0.4.60

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 (74) hide show
  1. package/lib/button-group.js +20 -5
  2. package/lib/button.js +20 -5
  3. package/lib/checkbox-group.js +20 -5
  4. package/lib/clients.js +95 -4
  5. package/lib/data-table-form.js +20 -5
  6. package/lib/data-table.js +25 -11
  7. package/lib/date-picker.js +20 -5
  8. package/lib/dialog.js +20 -5
  9. package/lib/eoss-ui.common.js +1400 -1086
  10. package/lib/flow-group.js +929 -860
  11. package/lib/flow-list.js +20 -5
  12. package/lib/flow.js +33 -16
  13. package/lib/form.js +20 -5
  14. package/lib/handle-user.js +20 -5
  15. package/lib/handler.js +41 -15
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +20 -5
  18. package/lib/input.js +32 -10
  19. package/lib/login.js +103 -33
  20. package/lib/main.js +85 -38
  21. package/lib/mainComp.js +69 -30
  22. package/lib/nav.js +20 -5
  23. package/lib/page.js +20 -5
  24. package/lib/player.js +20 -5
  25. package/lib/qr-code.js +20 -5
  26. package/lib/radio-group.js +20 -5
  27. package/lib/retrial-auth.js +20 -5
  28. package/lib/select-ganged.js +20 -5
  29. package/lib/select.js +20 -5
  30. package/lib/selector-panel.js +20 -5
  31. package/lib/selector.js +20 -5
  32. package/lib/sizer.js +20 -5
  33. package/lib/steps.js +20 -5
  34. package/lib/switch.js +20 -5
  35. package/lib/table-form.js +27 -11
  36. package/lib/tabs.js +20 -5
  37. package/lib/theme-chalk/clients.css +1 -1
  38. package/lib/theme-chalk/flow-group.css +1 -1
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/login.css +1 -1
  41. package/lib/tips.js +20 -5
  42. package/lib/toolbar.js +0 -1
  43. package/lib/tree-group.js +20 -5
  44. package/lib/tree.js +20 -5
  45. package/lib/upload.js +91 -52
  46. package/lib/utils/util.js +20 -5
  47. package/lib/wujie.js +20 -5
  48. package/lib/wxlogin.js +20 -5
  49. package/package.json +2 -2
  50. package/packages/clients/src/main.vue +60 -2
  51. package/packages/data-table/src/main.vue +0 -1
  52. package/packages/flow/src/main.vue +1 -0
  53. package/packages/flow/src/startTaskRead.vue +2 -2
  54. package/packages/flow-group/src/main.vue +284 -265
  55. package/packages/form/src/table.vue +3 -2
  56. package/packages/handler/src/main.vue +22 -10
  57. package/packages/input/src/main.vue +7 -2
  58. package/packages/login/src/main.vue +77 -27
  59. package/packages/main/src/main.vue +52 -32
  60. package/packages/main/src/userinfo.vue +22 -9
  61. package/packages/mainComp/src/main.vue +23 -10
  62. package/packages/mainComp/src/userinfo.vue +22 -9
  63. package/packages/theme-chalk/lib/clients.css +1 -1
  64. package/packages/theme-chalk/lib/flow-group.css +1 -1
  65. package/packages/theme-chalk/lib/index.css +1 -1
  66. package/packages/theme-chalk/lib/login.css +1 -1
  67. package/packages/theme-chalk/src/clients.scss +8 -0
  68. package/packages/theme-chalk/src/flow-group.scss +9 -3
  69. package/packages/theme-chalk/src/login.scss +3 -0
  70. package/packages/toolbar/src/main.vue +0 -1
  71. package/packages/upload/src/main.vue +43 -26
  72. package/src/index.js +1 -1
  73. package/src/utils/util.js +22 -10
  74. package/CHANGELOG.md +0 -929
@@ -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,27 @@ 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
+ src = pathname + loginPage.replace('./', '/');
297
+ } else {
298
+ src = pathname + loginPage.replace('./', '');
299
+ }
300
+ } else {
301
+ src = loginPage;
302
+ }
303
+ util.win.top.location.href = src;
304
+ } else if (
305
+ util.win.top.location.href.indexOf('main.html') > -1
306
+ ) {
288
307
  util.win.top.location.href = './login.html';
289
308
  } else {
290
309
  const hash = util.win.top.location.hash;
@@ -293,14 +312,7 @@ export default {
293
312
  util.win.top.location.href =
294
313
  util.win.location.href.slice(0, len) + '#/login';
295
314
  } 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
- }
315
+ util.win.top.location.href = '/login.html';
304
316
  }
305
317
  }
306
318
  }
@@ -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
  }
@@ -602,7 +602,8 @@ export default {
602
602
  isTabs: false,
603
603
  isHeader: '',
604
604
  isSide: null,
605
- navIds: null
605
+ navIds: null,
606
+ timer: null
606
607
  };
607
608
  },
608
609
  created() {
@@ -1751,45 +1752,63 @@ export default {
1751
1752
  type: 'warning'
1752
1753
  };
1753
1754
  } else {
1754
- console.log('handleReLogin');
1755
1755
  msg = '登录已过期,请重新登录!';
1756
1756
  }
1757
1757
  }
1758
- this.$confirm(msg, btn)
1759
- .then(() => {
1760
- util.removeStorage([
1761
- 'Authorization',
1762
- 'token',
1763
- 'ssId',
1764
- 'userId',
1765
- 'userName',
1766
- 'auth',
1767
- 'deviceUnique',
1768
- 'menus',
1769
- 'useCaseCodes',
1770
- 'mainConfig',
1771
- 'jump'
1772
- ]);
1773
- if (util.win.top.location.href.indexOf('main.html') > -1) {
1774
- util.win.top.location.href = './login.html';
1775
- } else {
1776
- const hash = util.win.top.location.hash;
1777
- if (hash) {
1778
- const len = util.win.top.location.href.indexOf(hash);
1779
- let href = util.win.top.location.href.slice(0, len) + '#/login';
1780
- util.win.top.location.href = href;
1781
- } else {
1758
+ !this.timer &&
1759
+ (this.timer = setTimeout(() => {
1760
+ console.log('handleReLogin');
1761
+ this.$confirm(msg, btn)
1762
+ .then(() => {
1763
+ util.removeStorage([
1764
+ 'Authorization',
1765
+ 'token',
1766
+ 'ssId',
1767
+ 'userId',
1768
+ 'userName',
1769
+ 'auth',
1770
+ 'deviceUnique',
1771
+ 'menus',
1772
+ 'useCaseCodes',
1773
+ 'mainConfig',
1774
+ 'jump'
1775
+ ]);
1782
1776
  const loginPage =
1783
1777
  util.getStorage('login') || util.getStorage('loginPage');
1784
1778
  if (loginPage) {
1785
- util.win.top.location.href = loginPage;
1779
+ let src;
1780
+ if (!util.startWith(loginPage, ['http', '/'])) {
1781
+ let pathname = util.win.top.location.pathname;
1782
+ if (pathname !== '/') {
1783
+ pathname = pathname.split('/');
1784
+ pathname.splice(pathname.length - 1);
1785
+ pathname = pathname.join('/');
1786
+ src = pathname + loginPage.replace('./', '/');
1787
+ } else {
1788
+ src = pathname + loginPage.replace('./', '');
1789
+ }
1790
+ } else {
1791
+ src = loginPage;
1792
+ }
1793
+ util.win.top.location.href = src;
1794
+ } else if (util.win.top.location.href.indexOf('main.html') > -1) {
1795
+ util.win.top.location.href = './login.html';
1786
1796
  } else {
1787
- util.win.top.location.href = '/login.html';
1797
+ const hash = util.win.top.location.hash;
1798
+ if (hash) {
1799
+ const len = util.win.top.location.href.indexOf(hash);
1800
+ util.win.top.location.href =
1801
+ util.win.location.href.slice(0, len) + '#/login';
1802
+ } else {
1803
+ util.win.top.location.href = '/login.html';
1804
+ }
1788
1805
  }
1789
- }
1790
- }
1791
- })
1792
- .catch((e) => {});
1806
+ })
1807
+ .catch((e) => {
1808
+ clearTimeout(this.timer);
1809
+ this.timer = null;
1810
+ });
1811
+ }, 1000));
1793
1812
  },
1794
1813
  openPage(url, name, width, height) {
1795
1814
  let src = url;
@@ -1816,6 +1835,7 @@ export default {
1816
1835
  }
1817
1836
  },
1818
1837
  beforeDestroy() {
1838
+ this.timer = null;
1819
1839
  if (this.client && this.client.connected) {
1820
1840
  this.client.disconnect();
1821
1841
  }
@@ -370,7 +370,27 @@ 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
+ src = pathname + loginPage.replace('./', '/');
384
+ } else {
385
+ src = pathname + loginPage.replace('./', '');
386
+ }
387
+ } else {
388
+ src = loginPage;
389
+ }
390
+ util.win.top.location.href = src;
391
+ } else if (
392
+ util.win.top.location.href.indexOf('main.html') > -1
393
+ ) {
374
394
  util.win.top.location.href = './login.html';
375
395
  } else {
376
396
  const hash = util.win.top.location.hash;
@@ -379,14 +399,7 @@ export default {
379
399
  util.win.top.location.href =
380
400
  util.win.location.href.slice(0, len) + '#/login';
381
401
  } 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
- }
402
+ util.win.top.location.href = '/login.html';
390
403
  }
391
404
  }
392
405
  })
@@ -1876,22 +1876,35 @@ export default {
1876
1876
  'mainConfig',
1877
1877
  'jump'
1878
1878
  ]);
1879
- if (util.win.top.location.href.indexOf('main.html') > -1) {
1879
+
1880
+ const loginPage =
1881
+ util.getStorage('login') || util.getStorage('loginPage');
1882
+ if (loginPage) {
1883
+ let src;
1884
+ if (!util.startWith(loginPage, ['http', '/'])) {
1885
+ let pathname = util.win.top.location.pathname;
1886
+ if (pathname !== '/') {
1887
+ pathname = pathname.split('/');
1888
+ pathname.splice(pathname.length - 1);
1889
+ pathname = pathname.join('/');
1890
+ src = pathname + loginPage.replace('./', '/');
1891
+ } else {
1892
+ src = pathname + loginPage.replace('./', '');
1893
+ }
1894
+ } else {
1895
+ src = loginPage;
1896
+ }
1897
+ util.win.top.location.href = src;
1898
+ } else if (util.win.top.location.href.indexOf('main.html') > -1) {
1880
1899
  util.win.top.location.href = './login.html';
1881
1900
  } else {
1882
1901
  const hash = util.win.top.location.hash;
1883
1902
  if (hash) {
1884
1903
  const len = util.win.top.location.href.indexOf(hash);
1885
- let href = util.win.top.location.href.slice(0, len) + '#/login';
1886
- util.win.top.location.href = href;
1904
+ util.win.top.location.href =
1905
+ util.win.location.href.slice(0, len) + '#/login';
1887
1906
  } else {
1888
- const loginPage =
1889
- util.getStorage('login') || util.getStorage('loginPage');
1890
- if (loginPage) {
1891
- util.win.top.location.href = loginPage;
1892
- } else {
1893
- util.win.top.location.href = '/login.html';
1894
- }
1907
+ util.win.top.location.href = '/login.html';
1895
1908
  }
1896
1909
  }
1897
1910
  })
@@ -353,7 +353,27 @@ export default {
353
353
  type: 'warning'
354
354
  })
355
355
  .then(() => {
356
- if (util.win.top.location.href.indexOf('main.html') > -1) {
356
+ const loginPage =
357
+ util.getStorage('login') || util.getStorage('loginPage');
358
+ if (loginPage) {
359
+ let src;
360
+ if (!util.startWith(loginPage, ['http', '/'])) {
361
+ let pathname = util.win.top.location.pathname;
362
+ if (pathname !== '/') {
363
+ pathname = pathname.split('/');
364
+ pathname.splice(pathname.length - 1);
365
+ pathname = pathname.join('/');
366
+ src = pathname + loginPage.replace('./', '/');
367
+ } else {
368
+ src = pathname + loginPage.replace('./', '');
369
+ }
370
+ } else {
371
+ src = loginPage;
372
+ }
373
+ util.win.top.location.href = src;
374
+ } else if (
375
+ util.win.top.location.href.indexOf('main.html') > -1
376
+ ) {
357
377
  util.win.top.location.href = './login.html';
358
378
  } else {
359
379
  const hash = util.win.top.location.hash;
@@ -362,14 +382,7 @@ export default {
362
382
  util.win.top.location.href =
363
383
  util.win.location.href.slice(0, len) + '#/login';
364
384
  } else {
365
- const loginPage =
366
- util.getStorage('login') ||
367
- util.getStorage('loginPage');
368
- if (loginPage) {
369
- util.win.top.location.href = loginPage;
370
- } else {
371
- util.win.top.location.href = '/login.html';
372
- }
385
+ util.win.top.location.href = '/login.html';
373
386
  }
374
387
  }
375
388
  })