eoss-ui 0.7.22 → 0.7.24

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 (119) hide show
  1. package/lib/button-group.js +48 -7
  2. package/lib/button.js +48 -7
  3. package/lib/calogin.js +48 -7
  4. package/lib/checkbox-group.js +48 -7
  5. package/lib/data-table-form.js +48 -7
  6. package/lib/data-table.js +48 -7
  7. package/lib/date-picker.js +48 -7
  8. package/lib/dialog.js +48 -7
  9. package/lib/eoss-ui.common.js +608 -525
  10. package/lib/flow-group.js +70 -9
  11. package/lib/flow-list.js +129 -88
  12. package/lib/flow.js +340 -294
  13. package/lib/form.js +48 -7
  14. package/lib/handle-user.js +48 -7
  15. package/lib/handler.js +48 -7
  16. package/lib/icon.js +48 -7
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +48 -7
  19. package/lib/input.js +48 -7
  20. package/lib/login.js +74 -16
  21. package/lib/main.js +176 -135
  22. package/lib/nav.js +48 -7
  23. package/lib/page.js +48 -7
  24. package/lib/pagination.js +48 -7
  25. package/lib/player.js +48 -7
  26. package/lib/qr-code.js +48 -7
  27. package/lib/radio-group.js +48 -7
  28. package/lib/retrial-auth.js +48 -7
  29. package/lib/select-ganged.js +48 -7
  30. package/lib/select.js +48 -7
  31. package/lib/selector-panel.js +48 -7
  32. package/lib/selector.js +48 -7
  33. package/lib/sizer.js +48 -7
  34. package/lib/steps.js +48 -7
  35. package/lib/switch.js +48 -7
  36. package/lib/table-form.js +48 -7
  37. package/lib/tabs.js +48 -7
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/login.css +1 -1
  40. package/lib/tips.js +48 -7
  41. package/lib/tree-group.js +48 -7
  42. package/lib/tree.js +48 -7
  43. package/lib/upload.js +48 -7
  44. package/lib/utils/util.js +48 -7
  45. package/lib/wujie.js +48 -7
  46. package/lib/wxlogin.js +48 -7
  47. package/package.json +160 -160
  48. package/packages/.DS_Store +0 -0
  49. package/packages/button-group/src/main.vue +346 -346
  50. package/packages/calogin/.DS_Store +0 -0
  51. package/packages/calogin/src/main.vue +412 -412
  52. package/packages/data-table/src/column.vue +988 -988
  53. package/packages/data-table/src/main.vue +1831 -1831
  54. package/packages/date-picker/.DS_Store +0 -0
  55. package/packages/date-picker/src/.DS_Store +0 -0
  56. package/packages/flow/.DS_Store +0 -0
  57. package/packages/flow/src/.DS_Store +0 -0
  58. package/packages/flow/src/component/Circulate.vue +413 -413
  59. package/packages/flow/src/component/CommonOpinions.vue +373 -373
  60. package/packages/flow/src/component/FileList.vue +97 -97
  61. package/packages/flow/src/component/FreeCirculation.vue +240 -240
  62. package/packages/flow/src/component/SendMsg.vue +242 -242
  63. package/packages/flow/src/component/taskUnionExamine.vue +738 -738
  64. package/packages/flow/src/freeStartFlow.vue +2847 -2847
  65. package/packages/flow/src/main.vue +3843 -3843
  66. package/packages/flow/src/processForm.vue +1370 -1366
  67. package/packages/flow/src/processReject.vue +308 -308
  68. package/packages/flow/src/reset.vue +941 -941
  69. package/packages/flow/src/startTaskRead.vue +691 -691
  70. package/packages/flow/src/supervise.vue +159 -159
  71. package/packages/flow-group/src/main.vue +717 -696
  72. package/packages/flow-list/.DS_Store +0 -0
  73. package/packages/flow-list/src/main.vue +1770 -1770
  74. package/packages/form/.DS_Store +0 -0
  75. package/packages/form/src/main.vue +3901 -3901
  76. package/packages/form/src/table.vue +1512 -1512
  77. package/packages/handle-user/src/main.vue +137 -137
  78. package/packages/handler/src/main.vue +496 -496
  79. package/packages/icon/src/main.vue +104 -104
  80. package/packages/login/.DS_Store +0 -0
  81. package/packages/login/src/main.vue +2020 -1994
  82. package/packages/login/src/resetPassword.vue +557 -557
  83. package/packages/main/.DS_Store +0 -0
  84. package/packages/main/src/.DS_Store +0 -0
  85. package/packages/main/src/default/userinfo.vue +502 -502
  86. package/packages/main/src/public/search.vue +464 -464
  87. package/packages/main/src/simplicity/avatar.vue +82 -82
  88. package/packages/main/src/simplicity/handler.vue +263 -263
  89. package/packages/main/src/simplicity/index.vue +2125 -2125
  90. package/packages/main/src/simplicity/user.vue +259 -259
  91. package/packages/main/src/simplicity/userinfo.vue +398 -398
  92. package/packages/menu/.DS_Store +0 -0
  93. package/packages/select/.DS_Store +0 -0
  94. package/packages/select/src/main.vue +782 -782
  95. package/packages/selector/.DS_Store +0 -0
  96. package/packages/selector/src/main.vue +761 -761
  97. package/packages/selector-panel/.DS_Store +0 -0
  98. package/packages/selector-panel/src/main.vue +1027 -1027
  99. package/packages/selector-panel/src/selection.vue +170 -170
  100. package/packages/switch/src/main.vue +170 -170
  101. package/packages/theme-chalk/lib/index.css +1 -1
  102. package/packages/theme-chalk/lib/login.css +1 -1
  103. package/packages/theme-chalk/src/.DS_Store +0 -0
  104. package/packages/theme-chalk/src/flow.scss +351 -351
  105. package/packages/theme-chalk/src/form.scss +501 -501
  106. package/packages/theme-chalk/src/handler.scss +148 -148
  107. package/packages/theme-chalk/src/icon.scss +1817 -1817
  108. package/packages/theme-chalk/src/login.scss +987 -984
  109. package/packages/theme-chalk/src/selector.scss +92 -92
  110. package/packages/theme-chalk/src/simplicity.scss +1366 -1366
  111. package/packages/theme-chalk/src/upload.scss +172 -172
  112. package/packages/upload/.DS_Store +0 -0
  113. package/packages/upload/src/main.vue +1343 -1343
  114. package/src/.DS_Store +0 -0
  115. package/src/config/api.js +315 -315
  116. package/src/index.js +163 -163
  117. package/src/utils/.DS_Store +0 -0
  118. package/src/utils/rules.js +18 -18
  119. package/src/utils/util.js +49 -9
@@ -243,16 +243,17 @@ var ajax = function ajax(_ref) {
243
243
  http.interceptors.response.use(function (response) {
244
244
  // delPendingRequest(response.config);
245
245
  loading && loading.close();
246
- if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
247
- setStorage({
246
+ if (response.headers.authorization) {
247
+ response.headers.authorization !== getStorage('token') && setStorage({
248
+
248
249
  key: ['token', 'Authorization'],
249
250
  value: response.headers.authorization
250
251
  });
251
252
  }
252
253
  var ssId = response.headers.ssId || response.headers.Ssid || response.headers.ssid;
253
254
 
254
- if (ssId && ssId !== getStorage('ssId')) {
255
- setStorage({
255
+ if (ssId) {
256
+ ssId !== getStorage('ssId') && setStorage({
256
257
  key: 'ssId',
257
258
  value: ssId
258
259
  });
@@ -3450,6 +3451,9 @@ var getStorage = function getStorage(key) {
3450
3451
  if (key === 'host' && !res) {
3451
3452
  return win.location.origin;
3452
3453
  }
3454
+ if (!res && key === 'token') {
3455
+ res = getCookie('token');
3456
+ }
3453
3457
  return res;
3454
3458
  }
3455
3459
  var defaults = {};
@@ -3503,11 +3507,48 @@ var removeStorage = function removeStorage(key) {
3503
3507
  * @desc 设置cookie
3504
3508
  * @author huangbo
3505
3509
  * @param {string} [name] cookie名称
3506
- * @return {string} [value] cookie值
3510
+ * @param {string} [value] cookie值
3511
+ * @param {boolean} [isSession] 是否是会话cookie
3507
3512
  **/
3508
3513
  var setCookie = function setCookie(name, value) {
3509
- // 不设置 expires max-age,默认为会话 Cookie
3510
- document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) + '; path=/';
3514
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3515
+ var time = arguments[3];
3516
+
3517
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
3518
+ try {
3519
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
3520
+ ];
3521
+ // 会话/持久Cookie设置
3522
+ if (!isSession) {
3523
+ if (isIE) {
3524
+ // IE使用expires
3525
+ var date = new Date();
3526
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
3527
+ cookieParts.push('expires=' + date.toUTCString());
3528
+ } else {
3529
+ // 其他浏览器使用max-age
3530
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
3531
+ }
3532
+ }
3533
+ // 内核兼容处理
3534
+ if (isIE) {
3535
+ // IE特殊处理:添加P3P协议头
3536
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
3537
+ } else {
3538
+ // 现代浏览器设置
3539
+ cookieParts.push('samesite=lax');
3540
+ if (window.location.protocol === 'https:') {
3541
+ cookieParts.push('secure');
3542
+ }
3543
+ }
3544
+
3545
+ // 设置Cookie
3546
+ document.cookie = cookieParts.join('; ');
3547
+ return true;
3548
+ } catch (e) {
3549
+ console.error('Cookie设置失败:', e);
3550
+ return false;
3551
+ }
3511
3552
  };
3512
3553
 
3513
3554
  /**
package/lib/input.js CHANGED
@@ -243,16 +243,17 @@ var ajax = function ajax(_ref) {
243
243
  http.interceptors.response.use(function (response) {
244
244
  // delPendingRequest(response.config);
245
245
  loading && loading.close();
246
- if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
247
- setStorage({
246
+ if (response.headers.authorization) {
247
+ response.headers.authorization !== getStorage('token') && setStorage({
248
+
248
249
  key: ['token', 'Authorization'],
249
250
  value: response.headers.authorization
250
251
  });
251
252
  }
252
253
  var ssId = response.headers.ssId || response.headers.Ssid || response.headers.ssid;
253
254
 
254
- if (ssId && ssId !== getStorage('ssId')) {
255
- setStorage({
255
+ if (ssId) {
256
+ ssId !== getStorage('ssId') && setStorage({
256
257
  key: 'ssId',
257
258
  value: ssId
258
259
  });
@@ -3450,6 +3451,9 @@ var getStorage = function getStorage(key) {
3450
3451
  if (key === 'host' && !res) {
3451
3452
  return win.location.origin;
3452
3453
  }
3454
+ if (!res && key === 'token') {
3455
+ res = getCookie('token');
3456
+ }
3453
3457
  return res;
3454
3458
  }
3455
3459
  var defaults = {};
@@ -3503,11 +3507,48 @@ var removeStorage = function removeStorage(key) {
3503
3507
  * @desc 设置cookie
3504
3508
  * @author huangbo
3505
3509
  * @param {string} [name] cookie名称
3506
- * @return {string} [value] cookie值
3510
+ * @param {string} [value] cookie值
3511
+ * @param {boolean} [isSession] 是否是会话cookie
3507
3512
  **/
3508
3513
  var setCookie = function setCookie(name, value) {
3509
- // 不设置 expires max-age,默认为会话 Cookie
3510
- document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) + '; path=/';
3514
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3515
+ var time = arguments[3];
3516
+
3517
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
3518
+ try {
3519
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
3520
+ ];
3521
+ // 会话/持久Cookie设置
3522
+ if (!isSession) {
3523
+ if (isIE) {
3524
+ // IE使用expires
3525
+ var date = new Date();
3526
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
3527
+ cookieParts.push('expires=' + date.toUTCString());
3528
+ } else {
3529
+ // 其他浏览器使用max-age
3530
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
3531
+ }
3532
+ }
3533
+ // 内核兼容处理
3534
+ if (isIE) {
3535
+ // IE特殊处理:添加P3P协议头
3536
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
3537
+ } else {
3538
+ // 现代浏览器设置
3539
+ cookieParts.push('samesite=lax');
3540
+ if (window.location.protocol === 'https:') {
3541
+ cookieParts.push('secure');
3542
+ }
3543
+ }
3544
+
3545
+ // 设置Cookie
3546
+ document.cookie = cookieParts.join('; ');
3547
+ return true;
3548
+ } catch (e) {
3549
+ console.error('Cookie设置失败:', e);
3550
+ return false;
3551
+ }
3511
3552
  };
3512
3553
 
3513
3554
  /**
package/lib/login.js CHANGED
@@ -242,16 +242,17 @@ var ajax = function ajax(_ref) {
242
242
  http.interceptors.response.use(function (response) {
243
243
  // delPendingRequest(response.config);
244
244
  loading && loading.close();
245
- if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
246
- setStorage({
245
+ if (response.headers.authorization) {
246
+ response.headers.authorization !== getStorage('token') && setStorage({
247
+
247
248
  key: ['token', 'Authorization'],
248
249
  value: response.headers.authorization
249
250
  });
250
251
  }
251
252
  var ssId = response.headers.ssId || response.headers.Ssid || response.headers.ssid;
252
253
 
253
- if (ssId && ssId !== getStorage('ssId')) {
254
- setStorage({
254
+ if (ssId) {
255
+ ssId !== getStorage('ssId') && setStorage({
255
256
  key: 'ssId',
256
257
  value: ssId
257
258
  });
@@ -3449,6 +3450,9 @@ var getStorage = function getStorage(key) {
3449
3450
  if (key === 'host' && !res) {
3450
3451
  return win.location.origin;
3451
3452
  }
3453
+ if (!res && key === 'token') {
3454
+ res = getCookie('token');
3455
+ }
3452
3456
  return res;
3453
3457
  }
3454
3458
  var defaults = {};
@@ -3502,11 +3506,48 @@ var removeStorage = function removeStorage(key) {
3502
3506
  * @desc 设置cookie
3503
3507
  * @author huangbo
3504
3508
  * @param {string} [name] cookie名称
3505
- * @return {string} [value] cookie值
3509
+ * @param {string} [value] cookie值
3510
+ * @param {boolean} [isSession] 是否是会话cookie
3506
3511
  **/
3507
3512
  var setCookie = function setCookie(name, value) {
3508
- // 不设置 expires max-age,默认为会话 Cookie
3509
- document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) + '; path=/';
3513
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3514
+ var time = arguments[3];
3515
+
3516
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
3517
+ try {
3518
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
3519
+ ];
3520
+ // 会话/持久Cookie设置
3521
+ if (!isSession) {
3522
+ if (isIE) {
3523
+ // IE使用expires
3524
+ var date = new Date();
3525
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
3526
+ cookieParts.push('expires=' + date.toUTCString());
3527
+ } else {
3528
+ // 其他浏览器使用max-age
3529
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
3530
+ }
3531
+ }
3532
+ // 内核兼容处理
3533
+ if (isIE) {
3534
+ // IE特殊处理:添加P3P协议头
3535
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
3536
+ } else {
3537
+ // 现代浏览器设置
3538
+ cookieParts.push('samesite=lax');
3539
+ if (window.location.protocol === 'https:') {
3540
+ cookieParts.push('secure');
3541
+ }
3542
+ }
3543
+
3544
+ // 设置Cookie
3545
+ document.cookie = cookieParts.join('; ');
3546
+ return true;
3547
+ } catch (e) {
3548
+ console.error('Cookie设置失败:', e);
3549
+ return false;
3550
+ }
3510
3551
  };
3511
3552
 
3512
3553
  /**
@@ -4475,7 +4516,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
4475
4516
  // ESM COMPAT FLAG
4476
4517
  __webpack_require__.r(__webpack_exports__);
4477
4518
 
4478
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=e19b01ac&
4519
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=710e2bf9&
4479
4520
  var render = function () {
4480
4521
  var _vm = this
4481
4522
  var _h = _vm.$createElement
@@ -5769,7 +5810,7 @@ var staticRenderFns = [
5769
5810
  render._withStripped = true
5770
5811
 
5771
5812
 
5772
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=e19b01ac&
5813
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=710e2bf9&
5773
5814
 
5774
5815
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
5775
5816
  var regenerator_ = __webpack_require__(4);
@@ -6883,7 +6924,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
6883
6924
 
6884
6925
 
6885
6926
 
6886
- var ceshi = util["a" /* default */].getParams('ceshi');
6927
+ var mainvue_type_script_lang_js_params = util["a" /* default */].getParams();
6887
6928
 
6888
6929
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
6889
6930
  name: 'EsLogin',
@@ -6892,6 +6933,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
6892
6933
  resetPassword: resetPassword
6893
6934
  },
6894
6935
  props: {
6936
+ ceshi: String,
6895
6937
  //初始登录配置接口地址
6896
6938
  initLogin: {
6897
6939
  type: String,
@@ -7218,6 +7260,9 @@ var ceshi = util["a" /* default */].getParams('ceshi');
7218
7260
  },
7219
7261
  showForget: function showForget() {
7220
7262
  return this.forgetUrl && typeof this.forgetUrl === 'string' ? true : this.forgetUrl === true && this.loginModel.indexOf('0') > -1;
7263
+ },
7264
+ isCeshi: function isCeshi() {
7265
+ return this.ceshi ? mainvue_type_script_lang_js_params[this.ceshi] : false;
7221
7266
  }
7222
7267
  },
7223
7268
  watch: {
@@ -7356,7 +7401,8 @@ var ceshi = util["a" /* default */].getParams('ceshi');
7356
7401
  launchTime: 2000,
7357
7402
  switchActive: this.switchsActive,
7358
7403
  loginDownloadApp: this.loginDownloadApps,
7359
- installPath: this.caInstallPath
7404
+ installPath: this.caInstallPath,
7405
+ storageType: this.storage
7360
7406
  };
7361
7407
  },
7362
7408
  beforeCreate: function beforeCreate() {
@@ -7367,8 +7413,8 @@ var ceshi = util["a" /* default */].getParams('ceshi');
7367
7413
  },
7368
7414
  created: function created() {
7369
7415
  this.launchKey = 5 < new Date().getHours() < 18 ? 'day' : 'night';
7370
- if (ceshi) {
7371
- this.loginModel = ceshi == 'true' || ceshi == true ? '0' : ceshi;
7416
+ if (this.isCeshi) {
7417
+ this.loginModel = this.isCeshi == 'true' || this.isCeshi == true ? '0' : this.isCeshi;
7372
7418
  }
7373
7419
  if (this.isScale || util["a" /* default */].getParams('scale')) {
7374
7420
  util["a" /* default */].setScale();
@@ -7682,7 +7728,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
7682
7728
  document.title = res.subsystemName;
7683
7729
  }
7684
7730
  this.app = res.appName || res.subsystemName;
7685
- if (res.loginModel && !ceshi) {
7731
+ if (res.loginModel && !this.isCeshi) {
7686
7732
  this.loginModel = (res.firstLoginModel || this.firstLoginModel) && !isLogined ? res.firstLoginModel || this.firstLoginModel : res.loginModel;
7687
7733
  }
7688
7734
 
@@ -7776,6 +7822,9 @@ var ceshi = util["a" /* default */].getParams('ceshi');
7776
7822
  if (res.subsystemExtend.caInstallPath) {
7777
7823
  this.installPath = res.subsystemExtend.caInstallPath;
7778
7824
  }
7825
+ if (res.subsystemExtend.storageType) {
7826
+ this.storageType = res.subsystemExtend.storageType;
7827
+ }
7779
7828
  }
7780
7829
  this.passModifyModel = res.passModifyModel;
7781
7830
  this.wechatAppid = res.wechatAppid;
@@ -8043,7 +8092,16 @@ var ceshi = util["a" /* default */].getParams('ceshi');
8043
8092
  if (results.statusCode === 0 || results.statusCode === 2) {
8044
8093
  // statusCode为2时 代表密码过期,也应执行handleResults
8045
8094
  clearTimeout(_this12.interval);
8046
- _this12.handleResults(results, 3);
8095
+ if (results.statusCode === 2) {
8096
+ _this12.$alert(results.msg ? results.msg : '您的初始密码已过期,请及时修改!', '提示', {
8097
+ confirmButtonText: '确定',
8098
+ type: 'warning'
8099
+ }).then(function () {
8100
+ _this12.handleResults(results, 3);
8101
+ }).catch(function (e) {});
8102
+ } else {
8103
+ _this12.handleResults(results, 3);
8104
+ }
8047
8105
  } else {
8048
8106
  _this12.loginInfo(true);
8049
8107
  }
@@ -8062,7 +8120,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
8062
8120
  case 0:
8063
8121
  this.userName = results.userName;
8064
8122
  util["a" /* default */].setStorage({
8065
- type: this.storage,
8123
+ type: this.storageType,
8066
8124
  key: {
8067
8125
  ssId: results.ssId,
8068
8126
  token: results.token,