eoss-ui 0.5.75 → 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 (58) hide show
  1. package/lib/button-group.js +26 -0
  2. package/lib/button.js +26 -0
  3. package/lib/checkbox-group.js +26 -0
  4. package/lib/data-table-form.js +26 -0
  5. package/lib/data-table.js +46 -16
  6. package/lib/date-picker.js +26 -0
  7. package/lib/dialog.js +26 -0
  8. package/lib/eoss-ui.common.js +369 -263
  9. package/lib/flow-group.js +26 -0
  10. package/lib/flow-list.js +37 -8
  11. package/lib/flow.js +26 -0
  12. package/lib/form.js +26 -0
  13. package/lib/handle-user.js +26 -0
  14. package/lib/handler.js +26 -0
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +26 -0
  17. package/lib/input.js +26 -0
  18. package/lib/login.js +175 -122
  19. package/lib/main.js +26 -0
  20. package/lib/nav.js +26 -0
  21. package/lib/page.js +26 -0
  22. package/lib/player.js +26 -0
  23. package/lib/qr-code.js +79 -36
  24. package/lib/radio-group.js +26 -0
  25. package/lib/retrial-auth.js +26 -0
  26. package/lib/select-ganged.js +26 -0
  27. package/lib/select.js +26 -0
  28. package/lib/selector-panel.js +26 -0
  29. package/lib/selector.js +26 -0
  30. package/lib/sizer.js +26 -0
  31. package/lib/steps.js +26 -0
  32. package/lib/switch.js +26 -0
  33. package/lib/table-form.js +26 -0
  34. package/lib/tabs.js +26 -0
  35. package/lib/theme-chalk/index.css +1 -1
  36. package/lib/theme-chalk/login.css +1 -1
  37. package/lib/tips.js +26 -0
  38. package/lib/toolbar.js +3 -2
  39. package/lib/tree-group.js +60 -34
  40. package/lib/tree.js +41 -3
  41. package/lib/upload.js +26 -0
  42. package/lib/utils/util.js +26 -0
  43. package/lib/wujie.js +26 -0
  44. package/lib/wxlogin.js +54 -12
  45. package/package.json +2 -2
  46. package/packages/data-table/src/main.vue +15 -14
  47. package/packages/flow-list/src/main.vue +63 -41
  48. package/packages/login/src/main.vue +32 -17
  49. package/packages/qr-code/src/main.vue +48 -37
  50. package/packages/theme-chalk/lib/index.css +1 -1
  51. package/packages/theme-chalk/lib/login.css +1 -1
  52. package/packages/theme-chalk/src/login.scss +912 -430
  53. package/packages/toolbar/src/main.vue +16 -6
  54. package/packages/tree/src/main.vue +13 -1
  55. package/packages/tree-group/src/main.vue +24 -37
  56. package/packages/wxlogin/src/main.vue +30 -12
  57. package/src/index.js +1 -1
  58. package/src/utils/util.js +26 -0
package/lib/login.js CHANGED
@@ -2303,6 +2303,31 @@ var isObject = function isObject(obj) {
2303
2303
  return typeof Ctor === 'function' && Object.prototype.hasOwnProperty.toString.call(Ctor) === ObjectFunctionString;
2304
2304
  };
2305
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
+
2306
2331
  /**
2307
2332
  * jointUrl
2308
2333
  * @desc:判断url地址是否以字符开头,没有则添加
@@ -3179,6 +3204,7 @@ var watermark = function watermark(option) {
3179
3204
  isLogged: isLogged,
3180
3205
  isLogined: isLogined,
3181
3206
  isObject: isObject,
3207
+ isObjectEqual: isObjectEqual,
3182
3208
  jointUrl: jointUrl,
3183
3209
  loadJs: loadJs,
3184
3210
  loading: loading,
@@ -3934,7 +3960,7 @@ var bankCard = { pattern: new RegExp('^([1-9]{1})(\\d{14}|\\d{18})$'), message:
3934
3960
  // ESM COMPAT FLAG
3935
3961
  __webpack_require__.r(__webpack_exports__);
3936
3962
 
3937
- // 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=5f60346a&
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&
3938
3964
  var render = function () {
3939
3965
  var _vm = this
3940
3966
  var _h = _vm.$createElement
@@ -3967,7 +3993,10 @@ var render = function () {
3967
3993
  },
3968
3994
  ],
3969
3995
  staticClass: "es-login",
3970
- class: { "es-simple": _vm.mode == "simple" },
3996
+ class: {
3997
+ "es-simple": _vm.mode == "simple",
3998
+ "es-adaptive": !_vm.isScale,
3999
+ },
3971
4000
  style: _vm.transform,
3972
4001
  attrs: {
3973
4002
  "element-loading-text": "登录中...",
@@ -3986,24 +4015,21 @@ var render = function () {
3986
4015
  "div",
3987
4016
  {
3988
4017
  staticClass: "es-login-main",
4018
+ class: {
4019
+ "es-switchs": _vm.switchs > 2,
4020
+ },
3989
4021
  style: _vm.getBackground(_vm.loginMainImg),
3990
4022
  },
3991
4023
  [
3992
- _vm.loginTitleImg
3993
- ? _c("div", { staticClass: "es-login-title-image" }, [
3994
- _c("img", {
3995
- staticClass: "es-login-title-img",
3996
- attrs: { src: _vm.loginTitleImg },
3997
- }),
3998
- ])
3999
- : _vm._e(),
4000
4024
  _vm.switchs > 1
4001
4025
  ? _c(
4002
4026
  "div",
4003
4027
  {
4004
4028
  class: {
4005
4029
  "es-login-switch": _vm.switchs == 2,
4006
- "es-login-switchs": _vm.switchs > 2,
4030
+ "es-login-switchs":
4031
+ _vm.switchs > 2 ||
4032
+ (_vm.switchs == 2 && _vm.loginTitleImg),
4007
4033
  },
4008
4034
  },
4009
4035
  _vm._l(_vm.icons, function (item, index) {
@@ -4035,6 +4061,14 @@ var render = function () {
4035
4061
  0
4036
4062
  )
4037
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(),
4038
4072
  _c(
4039
4073
  "div",
4040
4074
  { staticClass: "es-login-form-box" },
@@ -4045,7 +4079,7 @@ var render = function () {
4045
4079
  _c(
4046
4080
  "el-form",
4047
4081
  {
4048
- ref: "login",
4082
+ ref: "login" + _vm.active,
4049
4083
  staticClass: "es-login-form",
4050
4084
  attrs: { model: _vm.formData },
4051
4085
  },
@@ -4262,9 +4296,10 @@ var render = function () {
4262
4296
  rawName: "v-show",
4263
4297
  value:
4264
4298
  _vm.imgCode &&
4265
- _vm.active == 0,
4299
+ (_vm.active == "0" ||
4300
+ _vm.active == "12"),
4266
4301
  expression:
4267
- "imgCode && active == 0",
4302
+ "imgCode && (active == '0' || active == '12')",
4268
4303
  },
4269
4304
  ],
4270
4305
  staticClass: "es-img-code",
@@ -4462,6 +4497,7 @@ var render = function () {
4462
4497
  attrs: {
4463
4498
  content: _vm.identifyingId,
4464
4499
  logo: _vm.qrimg,
4500
+ auto: "",
4465
4501
  },
4466
4502
  })
4467
4503
  : _vm._e(),
@@ -4473,7 +4509,7 @@ var render = function () {
4473
4509
  _c("es-wxlogin", {
4474
4510
  attrs: {
4475
4511
  href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7CiAgICB3aWR0aDogMTAwJSAhaW1wb3J0YW50OwogICAgYm94LXNpemluZzogYm9yZGVyLWJveCAhaW1wb3J0YW50OwogICAgbWFyZ2luOiAwICFpbXBvcnRhbnQ7Cn0KCi5pbXBvd2VyQm94IC5pbmZvLAouaW1wb3dlckJveCAudGl0bGUgewogICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50Owp9",
4476
- height: "300px",
4512
+ auto: "",
4477
4513
  appid: _vm.wechatAppid,
4478
4514
  scope: _vm.wechatScope,
4479
4515
  redirect_uri: _vm.redirectUri,
@@ -4494,7 +4530,7 @@ var render = function () {
4494
4530
  _c(
4495
4531
  "el-form",
4496
4532
  {
4497
- ref: "login",
4533
+ ref: "login" + _vm.active,
4498
4534
  staticClass: "es-login-form es-login-verify",
4499
4535
  attrs: { model: _vm.formData },
4500
4536
  },
@@ -4869,7 +4905,7 @@ var staticRenderFns = []
4869
4905
  render._withStripped = true
4870
4906
 
4871
4907
 
4872
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=5f60346a&
4908
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=0b26efc4&
4873
4909
 
4874
4910
  // EXTERNAL MODULE: external "throttle-debounce"
4875
4911
  var external_throttle_debounce_ = __webpack_require__(11);
@@ -5800,6 +5836,20 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
5800
5836
  //
5801
5837
  //
5802
5838
  //
5839
+ //
5840
+ //
5841
+ //
5842
+ //
5843
+ //
5844
+ //
5845
+ //
5846
+ //
5847
+ //
5848
+ //
5849
+ //
5850
+ //
5851
+ //
5852
+ //
5803
5853
 
5804
5854
 
5805
5855
 
@@ -5996,10 +6046,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
5996
6046
  type: Number,
5997
6047
  default: 1500
5998
6048
  },
5999
- isScale: {
6000
- type: Boolean,
6001
- default: true
6002
- }
6049
+ isScale: Boolean
6003
6050
  },
6004
6051
  computed: {
6005
6052
  transform: function transform() {
@@ -6371,8 +6418,8 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6371
6418
  }
6372
6419
  },
6373
6420
  switchLogin: function switchLogin(res) {
6374
- //this.$refs.login && this.$refs.login.resetFields();
6375
- this.$refs.login && this.$refs.login.clearValidate();
6421
+ var _this3 = this;
6422
+
6376
6423
  if (res != 1) {
6377
6424
  this.active = res.type;
6378
6425
  this.title = res.name;
@@ -6380,12 +6427,16 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6380
6427
  }
6381
6428
  this.countdown = 0;
6382
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
+ });
6383
6434
  },
6384
6435
  isShow: function isShow(res) {
6385
6436
  return this.loginModel.indexOf(res) > -1;
6386
6437
  },
6387
6438
  getLogin: function getLogin() {
6388
- var _this3 = this;
6439
+ var _this4 = this;
6389
6440
 
6390
6441
  var config = util["a" /* default */].getStorage('initLogin');
6391
6442
  if (config) {
@@ -6399,9 +6450,9 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6399
6450
  key: 'initLogin',
6400
6451
  value: JSON.stringify(res.results)
6401
6452
  });
6402
- _this3.setConfig(res.results);
6453
+ _this4.setConfig(res.results);
6403
6454
  } else {
6404
- _this3.$message({
6455
+ _this4.$message({
6405
6456
  message: res.msg || '系统错误,请联系管理员!',
6406
6457
  type: 'error',
6407
6458
  duration: 2000
@@ -6409,7 +6460,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6409
6460
  }
6410
6461
  }).catch(function (err) {
6411
6462
  if (err.message && err.message !== 'canceled') {
6412
- _this3.$message.error(err.message);
6463
+ _this4.$message.error(err.message);
6413
6464
  }
6414
6465
  });
6415
6466
  },
@@ -6439,7 +6490,9 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6439
6490
  this.setup = res.setup;
6440
6491
  this.sysName = res.subsystemName;
6441
6492
  this.downloadSetup = res.downloadSetup;
6442
- document.title = res.subsystemName;
6493
+ if (res.subsystemName) {
6494
+ document.title = res.subsystemName;
6495
+ }
6443
6496
  this.app = res.appName || res.subsystemName;
6444
6497
  if (res.qrimg || res.qrImg) {
6445
6498
  this.qrimg = res.qrimg || res.qrImg;
@@ -6515,7 +6568,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6515
6568
  return this.imageCode;
6516
6569
  },
6517
6570
  getCode: function getCode() {
6518
- var _this4 = this;
6571
+ var _this5 = this;
6519
6572
 
6520
6573
  if (this.countdown) {
6521
6574
  return false;
@@ -6556,14 +6609,14 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6556
6609
  }
6557
6610
  this.countdown = 60;
6558
6611
  this.timer = setInterval(function () {
6559
- if (_this4.countdown > 0) {
6560
- _this4.countdown--;
6561
- _this4.disabled = true;
6562
- _this4.btnText = '重新获取' + _this4.countdown + 's';
6612
+ if (_this5.countdown > 0) {
6613
+ _this5.countdown--;
6614
+ _this5.disabled = true;
6615
+ _this5.btnText = '重新获取' + _this5.countdown + 's';
6563
6616
  } else {
6564
- _this4.btnText = '重新获取';
6565
- _this4.disabled = false;
6566
- _this4.submit = false;
6617
+ _this5.btnText = '重新获取';
6618
+ _this5.disabled = false;
6619
+ _this5.submit = false;
6567
6620
  }
6568
6621
  }, 1000);
6569
6622
  util["a" /* default */].ajax({
@@ -6571,66 +6624,66 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6571
6624
  url: this.active == 12 ? this.getTwoFactorLoginCode : this.getLoginCode,
6572
6625
  data: data
6573
6626
  }).then(function (res) {
6574
- _this4.$message({
6627
+ _this5.$message({
6575
6628
  message: res.msg,
6576
6629
  duration: 2000,
6577
6630
  type: res.rCode == 0 ? 'success' : 'error'
6578
6631
  });
6579
6632
 
6580
6633
  if (res.rCode === 2) {
6581
- _this4.btnText = '获取验证码';
6582
- _this4.disabled = false;
6583
- _this4.countdown = 0;
6584
- clearInterval(_this4.timer);
6634
+ _this5.btnText = '获取验证码';
6635
+ _this5.disabled = false;
6636
+ _this5.countdown = 0;
6637
+ clearInterval(_this5.timer);
6585
6638
  }
6586
6639
  }).catch(function (err) {
6587
6640
  if (err.message && err.message !== 'canceled') {
6588
- _this4.$message.error(err.message);
6641
+ _this5.$message.error(err.message);
6589
6642
  }
6590
6643
  });
6591
6644
  },
6592
6645
  handleLogin: function handleLogin() {
6593
- var _this5 = this;
6646
+ var _this6 = this;
6594
6647
 
6595
6648
  if (this.submit) {
6596
6649
  return false;
6597
6650
  }
6598
6651
  this.$refs['login'].validate(function (valid) {
6599
6652
  if (valid) {
6600
- _this5.submit = true;
6653
+ _this6.submit = true;
6601
6654
  var param = util["a" /* default */].getParams() || {};
6602
- var data = _this5.active == '0' ? {
6603
- username: _this5.formData.username,
6604
- password: _this5.secret && _this5.isEncrypt ? util["a" /* default */].esmEncrypt({
6605
- data: _this5.formData.password,
6606
- key: _this5.secret
6607
- }) : _this5.formData.password,
6608
- identifyingCode: _this5.formData.identifyingCode,
6609
- identifyingId: _this5.identifyingId
6610
- } : _this5.active == '12' ? {
6611
- username: _this5.formData.username,
6612
- password: _this5.secret && _this5.isEncrypt ? util["a" /* default */].esmEncrypt({
6613
- data: _this5.formData.password,
6614
- key: _this5.secret
6615
- }) : _this5.formData.password,
6616
- targetType: _this5.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS',
6617
- 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
6618
6671
  } : {
6619
- target: _this5.formData.target,
6620
- verificationCode: _this5.formData.verificationCode,
6621
- targetType: _this5.active == '6' ? 'SMS' : 'EMAIL'
6672
+ target: _this6.formData.target,
6673
+ verificationCode: _this6.formData.verificationCode,
6674
+ targetType: _this6.active == '6' ? 'SMS' : 'EMAIL'
6622
6675
  };
6623
- if (_this5.onLogin) {
6624
- if (_this5.active == '0') {
6625
- _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);
6626
6679
  } else {
6627
- _this5.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
6680
+ _this6.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
6628
6681
  }
6629
6682
  } else {
6630
- _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));
6631
6684
  }
6632
6685
  } else {
6633
- _this5.submit = false;
6686
+ _this6.submit = false;
6634
6687
  return false;
6635
6688
  }
6636
6689
  });
@@ -6646,7 +6699,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6646
6699
  }
6647
6700
  },
6648
6701
  handleUserLogin: function handleUserLogin(data) {
6649
- var _this6 = this;
6702
+ var _this7 = this;
6650
6703
 
6651
6704
  var extUserBindHandleId = sessionStorage.getItem('extUserBindHandleId');
6652
6705
  util["a" /* default */].ajax({
@@ -6654,68 +6707,68 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6654
6707
  url: this.active == '0' ? this.actionUrl : this.active == '12' ? this.doTwoFactorLogin : this.doCodeLogin,
6655
6708
  data: extUserBindHandleId ? mainvue_type_script_lang_js_extends({}, data, { extUserBindHandleId: extUserBindHandleId }) : data
6656
6709
  }).then(function (res) {
6657
- _this6.submit = false;
6710
+ _this7.submit = false;
6658
6711
  if (res.rCode == 0) {
6659
6712
  util["a" /* default */].removeStorage('extUserBindHandleId');
6660
- _this6.handleRemember();
6713
+ _this7.handleRemember();
6661
6714
  var results = res.results;
6662
- _this6.handleResults(results);
6663
- if (_this6.onSuccess) {
6664
- _this6.onSuccess(res);
6715
+ _this7.handleResults(results);
6716
+ if (_this7.onSuccess) {
6717
+ _this7.onSuccess(res);
6665
6718
  }
6666
6719
  } else {
6667
6720
  var msg = res.results && res.results.msg ? res.results.msg : res.msg;
6668
- _this6.$message({
6721
+ _this7.$message({
6669
6722
  message: msg || '系统错误,请联系管理员!',
6670
6723
  type: 'error',
6671
6724
  duration: 1500,
6672
6725
  onClose: function onClose() {
6673
- _this6.btnText = '获取验证码';
6674
- _this6.disabled = false;
6675
- _this6.countdown = 0;
6676
- clearInterval(_this6.timer);
6677
- _this6.getImgCode();
6726
+ _this7.btnText = '获取验证码';
6727
+ _this7.disabled = false;
6728
+ _this7.countdown = 0;
6729
+ clearInterval(_this7.timer);
6730
+ _this7.getImgCode();
6678
6731
  }
6679
6732
  });
6680
- _this6.onError(res);
6733
+ _this7.onError(res);
6681
6734
  }
6682
6735
  }).catch(function (err) {
6683
- _this6.submit = false;
6736
+ _this7.submit = false;
6684
6737
  if (err.message && err.message !== 'canceled') {
6685
- _this6.$message.error(err.message);
6738
+ _this7.$message.error(err.message);
6686
6739
  }
6687
6740
  });
6688
6741
  },
6689
6742
  caLogin: function caLogin(signedData) {
6690
- var _this7 = this;
6743
+ var _this8 = this;
6691
6744
 
6692
6745
  util["a" /* default */].ajax({
6693
6746
  method: 'post',
6694
6747
  url: this.caAction,
6695
6748
  data: { identifyingId: this.identifyingId, signedData: signedData }
6696
6749
  }).then(function (res) {
6697
- _this7.submit = false;
6750
+ _this8.submit = false;
6698
6751
  if (res.rCode == 0) {
6699
6752
  var results = res.results;
6700
- _this7.handleResults(results);
6701
- if (_this7.onSuccess) {
6702
- _this7.onSuccess(res);
6753
+ _this8.handleResults(results);
6754
+ if (_this8.onSuccess) {
6755
+ _this8.onSuccess(res);
6703
6756
  }
6704
6757
  } else {
6705
6758
  var msg = res.results && res.results.msg ? res.results.msg : res.msg;
6706
- _this7.$message({
6759
+ _this8.$message({
6707
6760
  message: msg || '系统错误,请联系管理员!',
6708
6761
  type: 'error',
6709
6762
  duration: 1500,
6710
6763
  onClose: function onClose() {
6711
- _this7.getImgCode();
6764
+ _this8.getImgCode();
6712
6765
  }
6713
6766
  });
6714
- _this7.onError(res);
6767
+ _this8.onError(res);
6715
6768
  }
6716
6769
  }).catch(function (err) {
6717
6770
  if (err.message && err.message !== 'canceled') {
6718
- _this7.$message.error(err.message);
6771
+ _this8.$message.error(err.message);
6719
6772
  }
6720
6773
  });
6721
6774
  },
@@ -6732,17 +6785,17 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6732
6785
 
6733
6786
  //获取app登录信息
6734
6787
  loginInfo: function loginInfo(res) {
6735
- var _this8 = this;
6788
+ var _this9 = this;
6736
6789
 
6737
6790
  clearTimeout(this.interval);
6738
6791
  if (res) {
6739
6792
  this.interval = setTimeout(function () {
6740
- _this8.initRequestLoginInfo();
6793
+ _this9.initRequestLoginInfo();
6741
6794
  }, this.scanIntervalTime);
6742
6795
  }
6743
6796
  },
6744
6797
  initRequestLoginInfo: function initRequestLoginInfo() {
6745
- var _this9 = this;
6798
+ var _this10 = this;
6746
6799
 
6747
6800
  if (this.identifyingId == '') {
6748
6801
  return false;
@@ -6757,21 +6810,21 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6757
6810
  if (res.rCode === 0) {
6758
6811
  var results = res.results;
6759
6812
  if (results.statusCode === 0) {
6760
- clearTimeout(_this9.interval);
6761
- _this9.handleResults(results, 3);
6813
+ clearTimeout(_this10.interval);
6814
+ _this10.handleResults(results, 3);
6762
6815
  } else {
6763
- _this9.loginInfo(true);
6816
+ _this10.loginInfo(true);
6764
6817
  }
6765
6818
  }
6766
6819
  }).catch(function (err) {
6767
- clearTimeout(_this9.interval);
6820
+ clearTimeout(_this10.interval);
6768
6821
  if (err.message && err.message !== 'canceled') {
6769
- _this9.$message.error(err.message);
6822
+ _this10.$message.error(err.message);
6770
6823
  }
6771
6824
  });
6772
6825
  },
6773
6826
  handleResults: function handleResults(results, type) {
6774
- var _this10 = this;
6827
+ var _this11 = this;
6775
6828
 
6776
6829
  switch (results.statusCode) {
6777
6830
  case 0:
@@ -6792,15 +6845,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6792
6845
  type: 'success',
6793
6846
  duration: 1500,
6794
6847
  onClose: function onClose() {
6795
- if (_this10.toUrl) {
6796
- window.location.href = _this10.toUrl;
6797
- } else if (results.doorIndex && _this10.doorIndex) {
6848
+ if (_this11.toUrl) {
6849
+ window.location.href = _this11.toUrl;
6850
+ } else if (results.doorIndex && _this11.doorIndex) {
6798
6851
  window.location.href = results.doorIndex;
6799
6852
  } else {
6800
6853
  if (window.location.href.indexOf('login.html') > -1) {
6801
6854
  window.location.href = './main.html';
6802
6855
  } else {
6803
- _this10.$router.push({ name: 'main' });
6856
+ _this11.$router.push({ name: 'main' });
6804
6857
  }
6805
6858
  }
6806
6859
  }
@@ -6812,11 +6865,11 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6812
6865
  //cancelButtonText: '取消',
6813
6866
  type: 'warning'
6814
6867
  }).then(function () {
6815
- _this10.operationCheckCode = results.checkCode;
6816
- if (typeof _this10.forget === 'string') {
6817
- 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);
6818
6871
  } else {
6819
- _this10.showResetPassword = true;
6872
+ _this11.showResetPassword = true;
6820
6873
  }
6821
6874
  }).catch(function (e) {});
6822
6875
  break;
@@ -6857,13 +6910,13 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6857
6910
  type: 'error',
6858
6911
  duration: 1500,
6859
6912
  onClose: function onClose() {
6860
- if (_this10.code) {
6913
+ if (_this11.code) {
6861
6914
  window.location.href = util["a" /* default */].delUrlParam({ key: 'code' });
6862
6915
  if (window.location.hash) {
6863
6916
  location.reload();
6864
6917
  }
6865
6918
  } else {
6866
- _this10.getImgCode();
6919
+ _this11.getImgCode();
6867
6920
  }
6868
6921
  }
6869
6922
  });
@@ -6873,15 +6926,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6873
6926
  }
6874
6927
  },
6875
6928
  handleAssistance: function handleAssistance(data) {
6876
- var _this11 = this;
6929
+ var _this12 = this;
6877
6930
 
6878
6931
  clearTimeout(this.doAssistance);
6879
6932
  this.doAssistance = setTimeout(function () {
6880
- _this11.doAssistanceLogin(data);
6933
+ _this12.doAssistanceLogin(data);
6881
6934
  }, this.scanIntervalTime);
6882
6935
  },
6883
6936
  doAssistanceLogin: function doAssistanceLogin(data) {
6884
- var _this12 = this;
6937
+ var _this13 = this;
6885
6938
 
6886
6939
  util["a" /* default */].ajax({
6887
6940
  method: 'post',
@@ -6891,19 +6944,19 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6891
6944
  if (res.rCode === 0) {
6892
6945
  var results = res.results;
6893
6946
  if (results.statusCode === 0) {
6894
- clearTimeout(_this12.doAssistance);
6895
- _this12.handleResults(results, 3);
6947
+ clearTimeout(_this13.doAssistance);
6948
+ _this13.handleResults(results, 3);
6896
6949
  } else {
6897
- _this12.handleAssistance(data);
6950
+ _this13.handleAssistance(data);
6898
6951
  }
6899
6952
  } else {
6900
- clearTimeout(_this12.doAssistance);
6901
- _this12.$message.error(res.msg);
6953
+ clearTimeout(_this13.doAssistance);
6954
+ _this13.$message.error(res.msg);
6902
6955
  }
6903
6956
  }).catch(function (err) {
6904
- clearTimeout(_this12.doAssistance);
6957
+ clearTimeout(_this13.doAssistance);
6905
6958
  if (err.message && err.message !== 'canceled') {
6906
- _this12.$message.error(err.message);
6959
+ _this13.$message.error(err.message);
6907
6960
  }
6908
6961
  });
6909
6962
  },
package/lib/main.js CHANGED
@@ -2303,6 +2303,31 @@ var isObject = function isObject(obj) {
2303
2303
  return typeof Ctor === 'function' && Object.prototype.hasOwnProperty.toString.call(Ctor) === ObjectFunctionString;
2304
2304
  };
2305
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
+
2306
2331
  /**
2307
2332
  * jointUrl
2308
2333
  * @desc:判断url地址是否以字符开头,没有则添加
@@ -3179,6 +3204,7 @@ var watermark = function watermark(option) {
3179
3204
  isLogged: isLogged,
3180
3205
  isLogined: isLogined,
3181
3206
  isObject: isObject,
3207
+ isObjectEqual: isObjectEqual,
3182
3208
  jointUrl: jointUrl,
3183
3209
  loadJs: loadJs,
3184
3210
  loading: loading,