eoss-ui 0.5.74 → 0.5.76

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 (72) hide show
  1. package/lib/button-group.js +125 -23
  2. package/lib/button.js +125 -23
  3. package/lib/checkbox-group.js +125 -23
  4. package/lib/data-table-form.js +125 -23
  5. package/lib/data-table.js +155 -40
  6. package/lib/date-picker.js +125 -23
  7. package/lib/dialog.js +125 -23
  8. package/lib/eoss-ui.common.js +520 -296
  9. package/lib/flow-group.js +125 -23
  10. package/lib/flow-list.js +136 -31
  11. package/lib/flow.js +125 -23
  12. package/lib/form.js +125 -23
  13. package/lib/handle-user.js +125 -23
  14. package/lib/handler.js +125 -23
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +124 -22
  17. package/lib/input.js +141 -29
  18. package/lib/login.js +293 -143
  19. package/lib/main.js +125 -23
  20. package/lib/nav.js +125 -23
  21. package/lib/page.js +125 -23
  22. package/lib/player.js +125 -23
  23. package/lib/qr-code.js +178 -59
  24. package/lib/radio-group.js +125 -23
  25. package/lib/retrial-auth.js +125 -23
  26. package/lib/select-ganged.js +125 -23
  27. package/lib/select.js +140 -28
  28. package/lib/selector-panel.js +125 -23
  29. package/lib/selector.js +125 -23
  30. package/lib/sizer.js +125 -23
  31. package/lib/steps.js +125 -23
  32. package/lib/switch.js +124 -22
  33. package/lib/table-form.js +125 -23
  34. package/lib/tabs.js +125 -23
  35. package/lib/theme-chalk/base.css +1 -1
  36. package/lib/theme-chalk/index.css +1 -1
  37. package/lib/theme-chalk/login.css +1 -1
  38. package/lib/theme-chalk/main.css +1 -1
  39. package/lib/theme-chalk/menu.css +1 -1
  40. package/lib/theme-chalk/sizer.css +1 -1
  41. package/lib/theme-chalk/upload.css +1 -1
  42. package/lib/tips.js +125 -23
  43. package/lib/toolbar.js +3 -2
  44. package/lib/tree-group.js +159 -57
  45. package/lib/tree.js +140 -26
  46. package/lib/upload.js +125 -23
  47. package/lib/utils/util.js +124 -22
  48. package/lib/wujie.js +125 -23
  49. package/lib/wxlogin.js +152 -34
  50. package/package.json +2 -2
  51. package/packages/data-table/src/main.vue +25 -15
  52. package/packages/flow-list/src/main.vue +63 -41
  53. package/packages/input/src/main.vue +7 -6
  54. package/packages/login/src/main.vue +42 -14
  55. package/packages/qr-code/src/main.vue +48 -37
  56. package/packages/select/src/main.vue +6 -5
  57. package/packages/theme-chalk/lib/base.css +1 -1
  58. package/packages/theme-chalk/lib/index.css +1 -1
  59. package/packages/theme-chalk/lib/login.css +1 -1
  60. package/packages/theme-chalk/lib/main.css +1 -1
  61. package/packages/theme-chalk/lib/menu.css +1 -1
  62. package/packages/theme-chalk/lib/sizer.css +1 -1
  63. package/packages/theme-chalk/lib/upload.css +1 -1
  64. package/packages/theme-chalk/src/base.scss +3 -0
  65. package/packages/theme-chalk/src/login.scss +862 -376
  66. package/packages/theme-chalk/src/main.scss +5 -2
  67. package/packages/toolbar/src/main.vue +16 -6
  68. package/packages/tree/src/main.vue +13 -1
  69. package/packages/tree-group/src/main.vue +24 -37
  70. package/packages/wxlogin/src/main.vue +30 -12
  71. package/src/index.js +1 -1
  72. package/src/utils/util.js +138 -23
package/lib/login.js CHANGED
@@ -620,6 +620,35 @@ var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
620
620
  return workdays;
621
621
  };
622
622
 
623
+ /**
624
+ * chunkToChinese
625
+ * @desc 将四位数的整数转换为中文大写
626
+ * @param {number} chunk - 数字
627
+ **/
628
+ function chunkToChinese(chunk) {
629
+ var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
630
+ var capitalDigits = ['', '拾', '佰', '仟'];
631
+
632
+ var result = '';
633
+ var digitIndex = 0;
634
+
635
+ while (chunk > 0) {
636
+ var digit = chunk % 10;
637
+ if (digit > 0) {
638
+ result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
639
+ } else {
640
+ // 当前数字是零,需要判断是否需要添加零
641
+ if (result.charAt(0) !== '零') {
642
+ result = '零' + result;
643
+ }
644
+ }
645
+ chunk = Math.floor(chunk / 10);
646
+ digitIndex++;
647
+ }
648
+
649
+ return result;
650
+ }
651
+
623
652
  /**
624
653
  * concatenate
625
654
  * @desc 指定连接符合并文本
@@ -1815,6 +1844,31 @@ var getWeekday = function getWeekday(date) {
1815
1844
  return adjustedDay === 0 ? 7 : adjustedDay;
1816
1845
  };
1817
1846
 
1847
+ /**
1848
+ * getZoom
1849
+ * @desc 获取缩放比
1850
+ * @param {number} n - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
1851
+ **/
1852
+ var getZoom = function getZoom() {
1853
+ var ratio = 0;
1854
+ var screen = window.screen;
1855
+ var ua = navigator.userAgent.toLowerCase();
1856
+ if (window.devicePixelRatio !== undefined) {
1857
+ ratio = window.devicePixelRatio;
1858
+ } else if (~ua.indexOf('msie')) {
1859
+ if (screen.deviceXDPI && screen.logicalXDPI) {
1860
+ ratio = screen.deviceXDPI / screen.logicalXDPI;
1861
+ }
1862
+ } else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
1863
+ ratio = window.outerWidth / window.innerWidth;
1864
+ }
1865
+
1866
+ if (ratio) {
1867
+ ratio = Math.round(ratio * 100);
1868
+ }
1869
+
1870
+ return ratio / 100;
1871
+ };
1818
1872
  /**
1819
1873
  * handlerUrl
1820
1874
  * @desc:更新url参数中的时间戳
@@ -2249,6 +2303,31 @@ var isObject = function isObject(obj) {
2249
2303
  return typeof Ctor === 'function' && Object.prototype.hasOwnProperty.toString.call(Ctor) === ObjectFunctionString;
2250
2304
  };
2251
2305
 
2306
+ /**
2307
+ * isObjectEqual
2308
+ * @desc:判断对象是否相等
2309
+ * @author huangbo
2310
+ * @date 2022年5月7日
2311
+ * @param {Object} [obj] - 对象
2312
+ * @param {Object} [_obj] - 对象
2313
+ **/
2314
+ var isObjectEqual = function isObjectEqual(obj, _obj) {
2315
+ if (obj === undefined && _obj || obj && _obj === undefined) {
2316
+ return false;
2317
+ }
2318
+ var aProps = Object.getOwnPropertyNames(obj);
2319
+ var bProps = Object.getOwnPropertyNames(_obj);
2320
+ if (aProps.length !== bProps.length) {
2321
+ return false;
2322
+ }
2323
+ for (var i in obj) {
2324
+ if (obj[i] !== _obj[i]) {
2325
+ return false;
2326
+ }
2327
+ }
2328
+ return true;
2329
+ };
2330
+
2252
2331
  /**
2253
2332
  * jointUrl
2254
2333
  * @desc:判断url地址是否以字符开头,没有则添加
@@ -2557,32 +2636,53 @@ var rmbToCapital = function rmbToCapital(number) {
2557
2636
 
2558
2637
  return result;
2559
2638
  };
2560
-
2561
- // 辅助函数,将四位数的整数转换为中文大写
2562
- function chunkToChinese(chunk) {
2563
- var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
2564
- var capitalDigits = ['', '拾', '佰', '仟'];
2565
-
2566
- var result = '';
2567
- var digitIndex = 0;
2568
-
2569
- while (chunk > 0) {
2570
- var digit = chunk % 10;
2571
- if (digit > 0) {
2572
- result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
2639
+ /**
2640
+ * setScale
2641
+ * @desc 设置缩放
2642
+ * @param {number} width - 分辨率宽度
2643
+ * @param {number} height - 分辨率高度
2644
+ **/
2645
+ var setScale = function setScale() {
2646
+ var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1920;
2647
+ var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1080;
2648
+
2649
+ var n = 1;
2650
+ var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
2651
+ var zoom = getZoom();
2652
+ if (isMac) {
2653
+ n = 2;
2654
+ } else {
2655
+ n = 1;
2656
+ }
2657
+ if (zoom === 1) {
2658
+ document.body.style.removeProperty('transform');
2659
+ document.body.style.removeProperty('width');
2660
+ document.body.style.removeProperty('height');
2661
+ document.body.style.removeProperty('transform-origin');
2662
+ return;
2663
+ }
2664
+ if (Math.abs(parseInt(width - window.innerWidth * zoom / n, 10)) > 15 && window.innerWidth * zoom / n !== width) {
2665
+ var scale = 'scale(' + window.innerWidth * zoom / width / zoom + ',' + window.innerHeight * zoom / height / zoom + ')';
2666
+ document.body.style.transform = scale;
2667
+ document.body.style.width = width + 'px';
2668
+ document.body.style.height = height + 'px';
2669
+ document.body.style.transformOrigin = '0 0';
2670
+ } else {
2671
+ if (isMac) {
2672
+ var _scale = 'scale(' + 1 * n / zoom + ')';
2673
+ document.body.style.transform = _scale;
2674
+ document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
2675
+ document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
2676
+ document.body.style.transformOrigin = '0 0';
2573
2677
  } else {
2574
- // 当前数字是零,需要判断是否需要添加零
2575
- if (result.charAt(0) !== '零') {
2576
- result = '零' + result;
2577
- }
2678
+ var _scale2 = 'scale(' + 1 * n / zoom + ')';
2679
+ document.body.style.transform = _scale2;
2680
+ document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
2681
+ document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
2682
+ document.body.style.transformOrigin = '0 0';
2578
2683
  }
2579
- chunk = Math.floor(chunk / 10);
2580
- digitIndex++;
2581
2684
  }
2582
-
2583
- return result;
2584
- }
2585
-
2685
+ };
2586
2686
  /**
2587
2687
  * sendMessage
2588
2688
  * @desc:向iframe发送信息
@@ -3104,6 +3204,7 @@ var watermark = function watermark(option) {
3104
3204
  isLogged: isLogged,
3105
3205
  isLogined: isLogined,
3106
3206
  isObject: isObject,
3207
+ isObjectEqual: isObjectEqual,
3107
3208
  jointUrl: jointUrl,
3108
3209
  loadJs: loadJs,
3109
3210
  loading: loading,
@@ -3118,6 +3219,7 @@ var watermark = function watermark(option) {
3118
3219
  rmbToCapital: rmbToCapital,
3119
3220
  sendMessage: sendMessage,
3120
3221
  setFavicon: setFavicon,
3222
+ setScale: setScale,
3121
3223
  setStorage: setStorage,
3122
3224
  socket: socket,
3123
3225
  startWith: startWith,
@@ -3773,7 +3875,12 @@ module.exports = require("stompjs");
3773
3875
  module.exports = require("sm-crypto");
3774
3876
 
3775
3877
  /***/ }),
3776
- /* 11 */,
3878
+ /* 11 */
3879
+ /***/ (function(module, exports) {
3880
+
3881
+ module.exports = require("throttle-debounce");
3882
+
3883
+ /***/ }),
3777
3884
  /* 12 */
3778
3885
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3779
3886
 
@@ -3853,7 +3960,7 @@ var bankCard = { pattern: new RegExp('^([1-9]{1})(\\d{14}|\\d{18})$'), message:
3853
3960
  // ESM COMPAT FLAG
3854
3961
  __webpack_require__.r(__webpack_exports__);
3855
3962
 
3856
- // 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=249fae96&
3963
+ // 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=0b26efc4&
3857
3964
  var render = function () {
3858
3965
  var _vm = this
3859
3966
  var _h = _vm.$createElement
@@ -3886,7 +3993,10 @@ var render = function () {
3886
3993
  },
3887
3994
  ],
3888
3995
  staticClass: "es-login",
3889
- class: { "es-simple": _vm.mode == "simple" },
3996
+ class: {
3997
+ "es-simple": _vm.mode == "simple",
3998
+ "es-adaptive": !_vm.isScale,
3999
+ },
3890
4000
  style: _vm.transform,
3891
4001
  attrs: {
3892
4002
  "element-loading-text": "登录中...",
@@ -3905,24 +4015,21 @@ var render = function () {
3905
4015
  "div",
3906
4016
  {
3907
4017
  staticClass: "es-login-main",
4018
+ class: {
4019
+ "es-switchs": _vm.switchs > 2,
4020
+ },
3908
4021
  style: _vm.getBackground(_vm.loginMainImg),
3909
4022
  },
3910
4023
  [
3911
- _vm.loginTitleImg
3912
- ? _c("div", { staticClass: "es-login-title-image" }, [
3913
- _c("img", {
3914
- staticClass: "es-login-title-img",
3915
- attrs: { src: _vm.loginTitleImg },
3916
- }),
3917
- ])
3918
- : _vm._e(),
3919
4024
  _vm.switchs > 1
3920
4025
  ? _c(
3921
4026
  "div",
3922
4027
  {
3923
4028
  class: {
3924
4029
  "es-login-switch": _vm.switchs == 2,
3925
- "es-login-switchs": _vm.switchs > 2,
4030
+ "es-login-switchs":
4031
+ _vm.switchs > 2 ||
4032
+ (_vm.switchs == 2 && _vm.loginTitleImg),
3926
4033
  },
3927
4034
  },
3928
4035
  _vm._l(_vm.icons, function (item, index) {
@@ -3954,6 +4061,14 @@ var render = function () {
3954
4061
  0
3955
4062
  )
3956
4063
  : _vm._e(),
4064
+ _vm.loginTitleImg
4065
+ ? _c("div", { staticClass: "es-login-title-image" }, [
4066
+ _c("img", {
4067
+ staticClass: "es-login-title-img",
4068
+ attrs: { src: _vm.loginTitleImg },
4069
+ }),
4070
+ ])
4071
+ : _vm._e(),
3957
4072
  _c(
3958
4073
  "div",
3959
4074
  { staticClass: "es-login-form-box" },
@@ -3964,7 +4079,7 @@ var render = function () {
3964
4079
  _c(
3965
4080
  "el-form",
3966
4081
  {
3967
- ref: "login",
4082
+ ref: "login" + _vm.active,
3968
4083
  staticClass: "es-login-form",
3969
4084
  attrs: { model: _vm.formData },
3970
4085
  },
@@ -4181,9 +4296,10 @@ var render = function () {
4181
4296
  rawName: "v-show",
4182
4297
  value:
4183
4298
  _vm.imgCode &&
4184
- _vm.active == 0,
4299
+ (_vm.active == "0" ||
4300
+ _vm.active == "12"),
4185
4301
  expression:
4186
- "imgCode && active == 0",
4302
+ "imgCode && (active == '0' || active == '12')",
4187
4303
  },
4188
4304
  ],
4189
4305
  staticClass: "es-img-code",
@@ -4381,6 +4497,7 @@ var render = function () {
4381
4497
  attrs: {
4382
4498
  content: _vm.identifyingId,
4383
4499
  logo: _vm.qrimg,
4500
+ auto: "",
4384
4501
  },
4385
4502
  })
4386
4503
  : _vm._e(),
@@ -4392,7 +4509,7 @@ var render = function () {
4392
4509
  _c("es-wxlogin", {
4393
4510
  attrs: {
4394
4511
  href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7CiAgICB3aWR0aDogMTAwJSAhaW1wb3J0YW50OwogICAgYm94LXNpemluZzogYm9yZGVyLWJveCAhaW1wb3J0YW50OwogICAgbWFyZ2luOiAwICFpbXBvcnRhbnQ7Cn0KCi5pbXBvd2VyQm94IC5pbmZvLAouaW1wb3dlckJveCAudGl0bGUgewogICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50Owp9",
4395
- height: "300px",
4512
+ auto: "",
4396
4513
  appid: _vm.wechatAppid,
4397
4514
  scope: _vm.wechatScope,
4398
4515
  redirect_uri: _vm.redirectUri,
@@ -4413,7 +4530,7 @@ var render = function () {
4413
4530
  _c(
4414
4531
  "el-form",
4415
4532
  {
4416
- ref: "login",
4533
+ ref: "login" + _vm.active,
4417
4534
  staticClass: "es-login-form es-login-verify",
4418
4535
  attrs: { model: _vm.formData },
4419
4536
  },
@@ -4788,7 +4905,10 @@ var staticRenderFns = []
4788
4905
  render._withStripped = true
4789
4906
 
4790
4907
 
4791
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=249fae96&
4908
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=0b26efc4&
4909
+
4910
+ // EXTERNAL MODULE: external "throttle-debounce"
4911
+ var external_throttle_debounce_ = __webpack_require__(11);
4792
4912
 
4793
4913
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=579bc87d&
4794
4914
  var resetPasswordvue_type_template_id_579bc87d_render = function () {
@@ -5716,6 +5836,21 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
5716
5836
  //
5717
5837
  //
5718
5838
  //
5839
+ //
5840
+ //
5841
+ //
5842
+ //
5843
+ //
5844
+ //
5845
+ //
5846
+ //
5847
+ //
5848
+ //
5849
+ //
5850
+ //
5851
+ //
5852
+ //
5853
+
5719
5854
 
5720
5855
 
5721
5856
 
@@ -5910,7 +6045,8 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
5910
6045
  scanIntervalTime: {
5911
6046
  type: Number,
5912
6047
  default: 1500
5913
- }
6048
+ },
6049
+ isScale: Boolean
5914
6050
  },
5915
6051
  computed: {
5916
6052
  transform: function transform() {
@@ -6103,9 +6239,16 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6103
6239
  };
6104
6240
  },
6105
6241
  beforeCreate: function beforeCreate() {
6242
+ this.setScale = Object(external_throttle_debounce_["debounce"])(300, function () {
6243
+ util["a" /* default */].setScale();
6244
+ });
6106
6245
  util["a" /* default */].removeStorage(['remind', 'ssId', 'token', 'Authorization', 'deviceUnique', 'userId', 'userName', 'useCaseCodes']);
6107
6246
  },
6108
6247
  created: function created() {
6248
+ if (this.isScale) {
6249
+ util["a" /* default */].setScale();
6250
+ window.addEventListener('resize', this.setScale);
6251
+ }
6109
6252
  this.code = util["a" /* default */].getParams('code');
6110
6253
  if (this.code) {
6111
6254
  this.doWechatLogin(this.code);
@@ -6275,8 +6418,8 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6275
6418
  }
6276
6419
  },
6277
6420
  switchLogin: function switchLogin(res) {
6278
- //this.$refs.login && this.$refs.login.resetFields();
6279
- this.$refs.login && this.$refs.login.clearValidate();
6421
+ var _this3 = this;
6422
+
6280
6423
  if (res != 1) {
6281
6424
  this.active = res.type;
6282
6425
  this.title = res.name;
@@ -6284,12 +6427,16 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6284
6427
  }
6285
6428
  this.countdown = 0;
6286
6429
  this.$emit('change-type', res, this.identifyingId);
6430
+ this.$nextTick(function () {
6431
+ var ref = 'login' + _this3.active;
6432
+ _this3.$refs[ref] && _this3.$refs[ref].clearValidate();
6433
+ });
6287
6434
  },
6288
6435
  isShow: function isShow(res) {
6289
6436
  return this.loginModel.indexOf(res) > -1;
6290
6437
  },
6291
6438
  getLogin: function getLogin() {
6292
- var _this3 = this;
6439
+ var _this4 = this;
6293
6440
 
6294
6441
  var config = util["a" /* default */].getStorage('initLogin');
6295
6442
  if (config) {
@@ -6303,9 +6450,9 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6303
6450
  key: 'initLogin',
6304
6451
  value: JSON.stringify(res.results)
6305
6452
  });
6306
- _this3.setConfig(res.results);
6453
+ _this4.setConfig(res.results);
6307
6454
  } else {
6308
- _this3.$message({
6455
+ _this4.$message({
6309
6456
  message: res.msg || '系统错误,请联系管理员!',
6310
6457
  type: 'error',
6311
6458
  duration: 2000
@@ -6313,7 +6460,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6313
6460
  }
6314
6461
  }).catch(function (err) {
6315
6462
  if (err.message && err.message !== 'canceled') {
6316
- _this3.$message.error(err.message);
6463
+ _this4.$message.error(err.message);
6317
6464
  }
6318
6465
  });
6319
6466
  },
@@ -6343,7 +6490,9 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6343
6490
  this.setup = res.setup;
6344
6491
  this.sysName = res.subsystemName;
6345
6492
  this.downloadSetup = res.downloadSetup;
6346
- document.title = res.subsystemName;
6493
+ if (res.subsystemName) {
6494
+ document.title = res.subsystemName;
6495
+ }
6347
6496
  this.app = res.appName || res.subsystemName;
6348
6497
  if (res.qrimg || res.qrImg) {
6349
6498
  this.qrimg = res.qrimg || res.qrImg;
@@ -6419,7 +6568,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6419
6568
  return this.imageCode;
6420
6569
  },
6421
6570
  getCode: function getCode() {
6422
- var _this4 = this;
6571
+ var _this5 = this;
6423
6572
 
6424
6573
  if (this.countdown) {
6425
6574
  return false;
@@ -6460,14 +6609,14 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6460
6609
  }
6461
6610
  this.countdown = 60;
6462
6611
  this.timer = setInterval(function () {
6463
- if (_this4.countdown > 0) {
6464
- _this4.countdown--;
6465
- _this4.disabled = true;
6466
- _this4.btnText = '重新获取' + _this4.countdown + 's';
6612
+ if (_this5.countdown > 0) {
6613
+ _this5.countdown--;
6614
+ _this5.disabled = true;
6615
+ _this5.btnText = '重新获取' + _this5.countdown + 's';
6467
6616
  } else {
6468
- _this4.btnText = '重新获取';
6469
- _this4.disabled = false;
6470
- _this4.submit = false;
6617
+ _this5.btnText = '重新获取';
6618
+ _this5.disabled = false;
6619
+ _this5.submit = false;
6471
6620
  }
6472
6621
  }, 1000);
6473
6622
  util["a" /* default */].ajax({
@@ -6475,66 +6624,66 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6475
6624
  url: this.active == 12 ? this.getTwoFactorLoginCode : this.getLoginCode,
6476
6625
  data: data
6477
6626
  }).then(function (res) {
6478
- _this4.$message({
6627
+ _this5.$message({
6479
6628
  message: res.msg,
6480
6629
  duration: 2000,
6481
6630
  type: res.rCode == 0 ? 'success' : 'error'
6482
6631
  });
6483
6632
 
6484
6633
  if (res.rCode === 2) {
6485
- _this4.btnText = '获取验证码';
6486
- _this4.disabled = false;
6487
- _this4.countdown = 0;
6488
- clearInterval(_this4.timer);
6634
+ _this5.btnText = '获取验证码';
6635
+ _this5.disabled = false;
6636
+ _this5.countdown = 0;
6637
+ clearInterval(_this5.timer);
6489
6638
  }
6490
6639
  }).catch(function (err) {
6491
6640
  if (err.message && err.message !== 'canceled') {
6492
- _this4.$message.error(err.message);
6641
+ _this5.$message.error(err.message);
6493
6642
  }
6494
6643
  });
6495
6644
  },
6496
6645
  handleLogin: function handleLogin() {
6497
- var _this5 = this;
6646
+ var _this6 = this;
6498
6647
 
6499
6648
  if (this.submit) {
6500
6649
  return false;
6501
6650
  }
6502
6651
  this.$refs['login'].validate(function (valid) {
6503
6652
  if (valid) {
6504
- _this5.submit = true;
6653
+ _this6.submit = true;
6505
6654
  var param = util["a" /* default */].getParams() || {};
6506
- var data = _this5.active == '0' ? {
6507
- username: _this5.formData.username,
6508
- password: _this5.secret && _this5.isEncrypt ? util["a" /* default */].esmEncrypt({
6509
- data: _this5.formData.password,
6510
- key: _this5.secret
6511
- }) : _this5.formData.password,
6512
- identifyingCode: _this5.formData.identifyingCode,
6513
- identifyingId: _this5.identifyingId
6514
- } : _this5.active == '12' ? {
6515
- username: _this5.formData.username,
6516
- password: _this5.secret && _this5.isEncrypt ? util["a" /* default */].esmEncrypt({
6517
- data: _this5.formData.password,
6518
- key: _this5.secret
6519
- }) : _this5.formData.password,
6520
- targetType: _this5.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS',
6521
- verificationCode: _this5.formData.identifyingCode
6655
+ var data = _this6.active == '0' ? {
6656
+ username: _this6.formData.username,
6657
+ password: _this6.secret && _this6.isEncrypt ? util["a" /* default */].esmEncrypt({
6658
+ data: _this6.formData.password,
6659
+ key: _this6.secret
6660
+ }) : _this6.formData.password,
6661
+ identifyingCode: _this6.formData.identifyingCode,
6662
+ identifyingId: _this6.identifyingId
6663
+ } : _this6.active == '12' ? {
6664
+ username: _this6.formData.username,
6665
+ password: _this6.secret && _this6.isEncrypt ? util["a" /* default */].esmEncrypt({
6666
+ data: _this6.formData.password,
6667
+ key: _this6.secret
6668
+ }) : _this6.formData.password,
6669
+ targetType: _this6.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS',
6670
+ verificationCode: _this6.formData.identifyingCode
6522
6671
  } : {
6523
- target: _this5.formData.target,
6524
- verificationCode: _this5.formData.verificationCode,
6525
- targetType: _this5.active == '6' ? 'SMS' : 'EMAIL'
6672
+ target: _this6.formData.target,
6673
+ verificationCode: _this6.formData.verificationCode,
6674
+ targetType: _this6.active == '6' ? 'SMS' : 'EMAIL'
6526
6675
  };
6527
- if (_this5.onLogin) {
6528
- if (_this5.active == '0') {
6529
- _this5.onLogin(mainvue_type_script_lang_js_extends({}, param, data), _this5.getImgCode, _this5.handleRemember);
6676
+ if (_this6.onLogin) {
6677
+ if (_this6.active == '0') {
6678
+ _this6.onLogin(mainvue_type_script_lang_js_extends({}, param, data), _this6.getImgCode, _this6.handleRemember);
6530
6679
  } else {
6531
- _this5.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
6680
+ _this6.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
6532
6681
  }
6533
6682
  } else {
6534
- _this5.handleUserLogin(mainvue_type_script_lang_js_extends({}, param, _this5.param, data));
6683
+ _this6.handleUserLogin(mainvue_type_script_lang_js_extends({}, param, _this6.param, data));
6535
6684
  }
6536
6685
  } else {
6537
- _this5.submit = false;
6686
+ _this6.submit = false;
6538
6687
  return false;
6539
6688
  }
6540
6689
  });
@@ -6550,7 +6699,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6550
6699
  }
6551
6700
  },
6552
6701
  handleUserLogin: function handleUserLogin(data) {
6553
- var _this6 = this;
6702
+ var _this7 = this;
6554
6703
 
6555
6704
  var extUserBindHandleId = sessionStorage.getItem('extUserBindHandleId');
6556
6705
  util["a" /* default */].ajax({
@@ -6558,68 +6707,68 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6558
6707
  url: this.active == '0' ? this.actionUrl : this.active == '12' ? this.doTwoFactorLogin : this.doCodeLogin,
6559
6708
  data: extUserBindHandleId ? mainvue_type_script_lang_js_extends({}, data, { extUserBindHandleId: extUserBindHandleId }) : data
6560
6709
  }).then(function (res) {
6561
- _this6.submit = false;
6710
+ _this7.submit = false;
6562
6711
  if (res.rCode == 0) {
6563
6712
  util["a" /* default */].removeStorage('extUserBindHandleId');
6564
- _this6.handleRemember();
6713
+ _this7.handleRemember();
6565
6714
  var results = res.results;
6566
- _this6.handleResults(results);
6567
- if (_this6.onSuccess) {
6568
- _this6.onSuccess(res);
6715
+ _this7.handleResults(results);
6716
+ if (_this7.onSuccess) {
6717
+ _this7.onSuccess(res);
6569
6718
  }
6570
6719
  } else {
6571
6720
  var msg = res.results && res.results.msg ? res.results.msg : res.msg;
6572
- _this6.$message({
6721
+ _this7.$message({
6573
6722
  message: msg || '系统错误,请联系管理员!',
6574
6723
  type: 'error',
6575
6724
  duration: 1500,
6576
6725
  onClose: function onClose() {
6577
- _this6.btnText = '获取验证码';
6578
- _this6.disabled = false;
6579
- _this6.countdown = 0;
6580
- clearInterval(_this6.timer);
6581
- _this6.getImgCode();
6726
+ _this7.btnText = '获取验证码';
6727
+ _this7.disabled = false;
6728
+ _this7.countdown = 0;
6729
+ clearInterval(_this7.timer);
6730
+ _this7.getImgCode();
6582
6731
  }
6583
6732
  });
6584
- _this6.onError(res);
6733
+ _this7.onError(res);
6585
6734
  }
6586
6735
  }).catch(function (err) {
6587
- _this6.submit = false;
6736
+ _this7.submit = false;
6588
6737
  if (err.message && err.message !== 'canceled') {
6589
- _this6.$message.error(err.message);
6738
+ _this7.$message.error(err.message);
6590
6739
  }
6591
6740
  });
6592
6741
  },
6593
6742
  caLogin: function caLogin(signedData) {
6594
- var _this7 = this;
6743
+ var _this8 = this;
6595
6744
 
6596
6745
  util["a" /* default */].ajax({
6597
6746
  method: 'post',
6598
6747
  url: this.caAction,
6599
6748
  data: { identifyingId: this.identifyingId, signedData: signedData }
6600
6749
  }).then(function (res) {
6601
- _this7.submit = false;
6750
+ _this8.submit = false;
6602
6751
  if (res.rCode == 0) {
6603
6752
  var results = res.results;
6604
- _this7.handleResults(results);
6605
- if (_this7.onSuccess) {
6606
- _this7.onSuccess(res);
6753
+ _this8.handleResults(results);
6754
+ if (_this8.onSuccess) {
6755
+ _this8.onSuccess(res);
6607
6756
  }
6608
6757
  } else {
6609
6758
  var msg = res.results && res.results.msg ? res.results.msg : res.msg;
6610
- _this7.$message({
6759
+ _this8.$message({
6611
6760
  message: msg || '系统错误,请联系管理员!',
6612
6761
  type: 'error',
6613
6762
  duration: 1500,
6614
6763
  onClose: function onClose() {
6615
- _this7.getImgCode();
6764
+ _this8.getImgCode();
6616
6765
  }
6617
6766
  });
6618
- _this7.onError(res);
6767
+ _this8.onError(res);
6619
6768
  }
6620
6769
  }).catch(function (err) {
6621
6770
  if (err.message && err.message !== 'canceled') {
6622
- _this7.$message.error(err.message);
6771
+ _this8.$message.error(err.message);
6623
6772
  }
6624
6773
  });
6625
6774
  },
@@ -6636,17 +6785,17 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6636
6785
 
6637
6786
  //获取app登录信息
6638
6787
  loginInfo: function loginInfo(res) {
6639
- var _this8 = this;
6788
+ var _this9 = this;
6640
6789
 
6641
6790
  clearTimeout(this.interval);
6642
6791
  if (res) {
6643
6792
  this.interval = setTimeout(function () {
6644
- _this8.initRequestLoginInfo();
6793
+ _this9.initRequestLoginInfo();
6645
6794
  }, this.scanIntervalTime);
6646
6795
  }
6647
6796
  },
6648
6797
  initRequestLoginInfo: function initRequestLoginInfo() {
6649
- var _this9 = this;
6798
+ var _this10 = this;
6650
6799
 
6651
6800
  if (this.identifyingId == '') {
6652
6801
  return false;
@@ -6661,21 +6810,21 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6661
6810
  if (res.rCode === 0) {
6662
6811
  var results = res.results;
6663
6812
  if (results.statusCode === 0) {
6664
- clearTimeout(_this9.interval);
6665
- _this9.handleResults(results, 3);
6813
+ clearTimeout(_this10.interval);
6814
+ _this10.handleResults(results, 3);
6666
6815
  } else {
6667
- _this9.loginInfo(true);
6816
+ _this10.loginInfo(true);
6668
6817
  }
6669
6818
  }
6670
6819
  }).catch(function (err) {
6671
- clearTimeout(_this9.interval);
6820
+ clearTimeout(_this10.interval);
6672
6821
  if (err.message && err.message !== 'canceled') {
6673
- _this9.$message.error(err.message);
6822
+ _this10.$message.error(err.message);
6674
6823
  }
6675
6824
  });
6676
6825
  },
6677
6826
  handleResults: function handleResults(results, type) {
6678
- var _this10 = this;
6827
+ var _this11 = this;
6679
6828
 
6680
6829
  switch (results.statusCode) {
6681
6830
  case 0:
@@ -6696,15 +6845,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6696
6845
  type: 'success',
6697
6846
  duration: 1500,
6698
6847
  onClose: function onClose() {
6699
- if (_this10.toUrl) {
6700
- window.location.href = _this10.toUrl;
6701
- } else if (results.doorIndex && _this10.doorIndex) {
6848
+ if (_this11.toUrl) {
6849
+ window.location.href = _this11.toUrl;
6850
+ } else if (results.doorIndex && _this11.doorIndex) {
6702
6851
  window.location.href = results.doorIndex;
6703
6852
  } else {
6704
6853
  if (window.location.href.indexOf('login.html') > -1) {
6705
6854
  window.location.href = './main.html';
6706
6855
  } else {
6707
- _this10.$router.push({ name: 'main' });
6856
+ _this11.$router.push({ name: 'main' });
6708
6857
  }
6709
6858
  }
6710
6859
  }
@@ -6716,11 +6865,11 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6716
6865
  //cancelButtonText: '取消',
6717
6866
  type: 'warning'
6718
6867
  }).then(function () {
6719
- _this10.operationCheckCode = results.checkCode;
6720
- if (typeof _this10.forget === 'string') {
6721
- util["a" /* default */].win.open(_this10.forgetUrl);
6868
+ _this11.operationCheckCode = results.checkCode;
6869
+ if (typeof _this11.forget === 'string') {
6870
+ util["a" /* default */].win.open(_this11.forgetUrl);
6722
6871
  } else {
6723
- _this10.showResetPassword = true;
6872
+ _this11.showResetPassword = true;
6724
6873
  }
6725
6874
  }).catch(function (e) {});
6726
6875
  break;
@@ -6761,13 +6910,13 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6761
6910
  type: 'error',
6762
6911
  duration: 1500,
6763
6912
  onClose: function onClose() {
6764
- if (_this10.code) {
6913
+ if (_this11.code) {
6765
6914
  window.location.href = util["a" /* default */].delUrlParam({ key: 'code' });
6766
6915
  if (window.location.hash) {
6767
6916
  location.reload();
6768
6917
  }
6769
6918
  } else {
6770
- _this10.getImgCode();
6919
+ _this11.getImgCode();
6771
6920
  }
6772
6921
  }
6773
6922
  });
@@ -6777,15 +6926,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6777
6926
  }
6778
6927
  },
6779
6928
  handleAssistance: function handleAssistance(data) {
6780
- var _this11 = this;
6929
+ var _this12 = this;
6781
6930
 
6782
6931
  clearTimeout(this.doAssistance);
6783
6932
  this.doAssistance = setTimeout(function () {
6784
- _this11.doAssistanceLogin(data);
6933
+ _this12.doAssistanceLogin(data);
6785
6934
  }, this.scanIntervalTime);
6786
6935
  },
6787
6936
  doAssistanceLogin: function doAssistanceLogin(data) {
6788
- var _this12 = this;
6937
+ var _this13 = this;
6789
6938
 
6790
6939
  util["a" /* default */].ajax({
6791
6940
  method: 'post',
@@ -6795,19 +6944,19 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6795
6944
  if (res.rCode === 0) {
6796
6945
  var results = res.results;
6797
6946
  if (results.statusCode === 0) {
6798
- clearTimeout(_this12.doAssistance);
6799
- _this12.handleResults(results, 3);
6947
+ clearTimeout(_this13.doAssistance);
6948
+ _this13.handleResults(results, 3);
6800
6949
  } else {
6801
- _this12.handleAssistance(data);
6950
+ _this13.handleAssistance(data);
6802
6951
  }
6803
6952
  } else {
6804
- clearTimeout(_this12.doAssistance);
6805
- _this12.$message.error(res.msg);
6953
+ clearTimeout(_this13.doAssistance);
6954
+ _this13.$message.error(res.msg);
6806
6955
  }
6807
6956
  }).catch(function (err) {
6808
- clearTimeout(_this12.doAssistance);
6957
+ clearTimeout(_this13.doAssistance);
6809
6958
  if (err.message && err.message !== 'canceled') {
6810
- _this12.$message.error(err.message);
6959
+ _this13.$message.error(err.message);
6811
6960
  }
6812
6961
  });
6813
6962
  },
@@ -6824,6 +6973,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6824
6973
  }
6825
6974
  },
6826
6975
  beforeDestroy: function beforeDestroy() {
6976
+ window.removeEventListener('resize', this.setScale);
6827
6977
  document.removeEventListener('keyup', this.doLogin);
6828
6978
  document.removeEventListener('keydown', this.forbiddenTab);
6829
6979
  }