eoss-ui 0.5.75 → 0.5.77

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 +371 -264
  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 +177 -123
  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 +34 -18
  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 +915 -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=4971af30&
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=4971af30&
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,67 @@ 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
- this.$refs['login'].validate(function (valid) {
6651
+ var ref = 'login' + this.active;
6652
+ this.$refs[ref].validate(function (valid) {
6599
6653
  if (valid) {
6600
- _this5.submit = true;
6654
+ _this6.submit = true;
6601
6655
  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
6656
+ var data = _this6.active == '0' ? {
6657
+ username: _this6.formData.username,
6658
+ password: _this6.secret && _this6.isEncrypt ? util["a" /* default */].esmEncrypt({
6659
+ data: _this6.formData.password,
6660
+ key: _this6.secret
6661
+ }) : _this6.formData.password,
6662
+ identifyingCode: _this6.formData.identifyingCode,
6663
+ identifyingId: _this6.identifyingId
6664
+ } : _this6.active == '12' ? {
6665
+ username: _this6.formData.username,
6666
+ password: _this6.secret && _this6.isEncrypt ? util["a" /* default */].esmEncrypt({
6667
+ data: _this6.formData.password,
6668
+ key: _this6.secret
6669
+ }) : _this6.formData.password,
6670
+ targetType: _this6.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS',
6671
+ verificationCode: _this6.formData.identifyingCode
6618
6672
  } : {
6619
- target: _this5.formData.target,
6620
- verificationCode: _this5.formData.verificationCode,
6621
- targetType: _this5.active == '6' ? 'SMS' : 'EMAIL'
6673
+ target: _this6.formData.target,
6674
+ verificationCode: _this6.formData.verificationCode,
6675
+ targetType: _this6.active == '6' ? 'SMS' : 'EMAIL'
6622
6676
  };
6623
- if (_this5.onLogin) {
6624
- if (_this5.active == '0') {
6625
- _this5.onLogin(mainvue_type_script_lang_js_extends({}, param, data), _this5.getImgCode, _this5.handleRemember);
6677
+ if (_this6.onLogin) {
6678
+ if (_this6.active == '0') {
6679
+ _this6.onLogin(mainvue_type_script_lang_js_extends({}, param, data), _this6.getImgCode, _this6.handleRemember);
6626
6680
  } else {
6627
- _this5.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
6681
+ _this6.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
6628
6682
  }
6629
6683
  } else {
6630
- _this5.handleUserLogin(mainvue_type_script_lang_js_extends({}, param, _this5.param, data));
6684
+ _this6.handleUserLogin(mainvue_type_script_lang_js_extends({}, param, _this6.param, data));
6631
6685
  }
6632
6686
  } else {
6633
- _this5.submit = false;
6687
+ _this6.submit = false;
6634
6688
  return false;
6635
6689
  }
6636
6690
  });
@@ -6646,7 +6700,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6646
6700
  }
6647
6701
  },
6648
6702
  handleUserLogin: function handleUserLogin(data) {
6649
- var _this6 = this;
6703
+ var _this7 = this;
6650
6704
 
6651
6705
  var extUserBindHandleId = sessionStorage.getItem('extUserBindHandleId');
6652
6706
  util["a" /* default */].ajax({
@@ -6654,68 +6708,68 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6654
6708
  url: this.active == '0' ? this.actionUrl : this.active == '12' ? this.doTwoFactorLogin : this.doCodeLogin,
6655
6709
  data: extUserBindHandleId ? mainvue_type_script_lang_js_extends({}, data, { extUserBindHandleId: extUserBindHandleId }) : data
6656
6710
  }).then(function (res) {
6657
- _this6.submit = false;
6711
+ _this7.submit = false;
6658
6712
  if (res.rCode == 0) {
6659
6713
  util["a" /* default */].removeStorage('extUserBindHandleId');
6660
- _this6.handleRemember();
6714
+ _this7.handleRemember();
6661
6715
  var results = res.results;
6662
- _this6.handleResults(results);
6663
- if (_this6.onSuccess) {
6664
- _this6.onSuccess(res);
6716
+ _this7.handleResults(results);
6717
+ if (_this7.onSuccess) {
6718
+ _this7.onSuccess(res);
6665
6719
  }
6666
6720
  } else {
6667
6721
  var msg = res.results && res.results.msg ? res.results.msg : res.msg;
6668
- _this6.$message({
6722
+ _this7.$message({
6669
6723
  message: msg || '系统错误,请联系管理员!',
6670
6724
  type: 'error',
6671
6725
  duration: 1500,
6672
6726
  onClose: function onClose() {
6673
- _this6.btnText = '获取验证码';
6674
- _this6.disabled = false;
6675
- _this6.countdown = 0;
6676
- clearInterval(_this6.timer);
6677
- _this6.getImgCode();
6727
+ _this7.btnText = '获取验证码';
6728
+ _this7.disabled = false;
6729
+ _this7.countdown = 0;
6730
+ clearInterval(_this7.timer);
6731
+ _this7.getImgCode();
6678
6732
  }
6679
6733
  });
6680
- _this6.onError(res);
6734
+ _this7.onError(res);
6681
6735
  }
6682
6736
  }).catch(function (err) {
6683
- _this6.submit = false;
6737
+ _this7.submit = false;
6684
6738
  if (err.message && err.message !== 'canceled') {
6685
- _this6.$message.error(err.message);
6739
+ _this7.$message.error(err.message);
6686
6740
  }
6687
6741
  });
6688
6742
  },
6689
6743
  caLogin: function caLogin(signedData) {
6690
- var _this7 = this;
6744
+ var _this8 = this;
6691
6745
 
6692
6746
  util["a" /* default */].ajax({
6693
6747
  method: 'post',
6694
6748
  url: this.caAction,
6695
6749
  data: { identifyingId: this.identifyingId, signedData: signedData }
6696
6750
  }).then(function (res) {
6697
- _this7.submit = false;
6751
+ _this8.submit = false;
6698
6752
  if (res.rCode == 0) {
6699
6753
  var results = res.results;
6700
- _this7.handleResults(results);
6701
- if (_this7.onSuccess) {
6702
- _this7.onSuccess(res);
6754
+ _this8.handleResults(results);
6755
+ if (_this8.onSuccess) {
6756
+ _this8.onSuccess(res);
6703
6757
  }
6704
6758
  } else {
6705
6759
  var msg = res.results && res.results.msg ? res.results.msg : res.msg;
6706
- _this7.$message({
6760
+ _this8.$message({
6707
6761
  message: msg || '系统错误,请联系管理员!',
6708
6762
  type: 'error',
6709
6763
  duration: 1500,
6710
6764
  onClose: function onClose() {
6711
- _this7.getImgCode();
6765
+ _this8.getImgCode();
6712
6766
  }
6713
6767
  });
6714
- _this7.onError(res);
6768
+ _this8.onError(res);
6715
6769
  }
6716
6770
  }).catch(function (err) {
6717
6771
  if (err.message && err.message !== 'canceled') {
6718
- _this7.$message.error(err.message);
6772
+ _this8.$message.error(err.message);
6719
6773
  }
6720
6774
  });
6721
6775
  },
@@ -6732,17 +6786,17 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6732
6786
 
6733
6787
  //获取app登录信息
6734
6788
  loginInfo: function loginInfo(res) {
6735
- var _this8 = this;
6789
+ var _this9 = this;
6736
6790
 
6737
6791
  clearTimeout(this.interval);
6738
6792
  if (res) {
6739
6793
  this.interval = setTimeout(function () {
6740
- _this8.initRequestLoginInfo();
6794
+ _this9.initRequestLoginInfo();
6741
6795
  }, this.scanIntervalTime);
6742
6796
  }
6743
6797
  },
6744
6798
  initRequestLoginInfo: function initRequestLoginInfo() {
6745
- var _this9 = this;
6799
+ var _this10 = this;
6746
6800
 
6747
6801
  if (this.identifyingId == '') {
6748
6802
  return false;
@@ -6757,21 +6811,21 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6757
6811
  if (res.rCode === 0) {
6758
6812
  var results = res.results;
6759
6813
  if (results.statusCode === 0) {
6760
- clearTimeout(_this9.interval);
6761
- _this9.handleResults(results, 3);
6814
+ clearTimeout(_this10.interval);
6815
+ _this10.handleResults(results, 3);
6762
6816
  } else {
6763
- _this9.loginInfo(true);
6817
+ _this10.loginInfo(true);
6764
6818
  }
6765
6819
  }
6766
6820
  }).catch(function (err) {
6767
- clearTimeout(_this9.interval);
6821
+ clearTimeout(_this10.interval);
6768
6822
  if (err.message && err.message !== 'canceled') {
6769
- _this9.$message.error(err.message);
6823
+ _this10.$message.error(err.message);
6770
6824
  }
6771
6825
  });
6772
6826
  },
6773
6827
  handleResults: function handleResults(results, type) {
6774
- var _this10 = this;
6828
+ var _this11 = this;
6775
6829
 
6776
6830
  switch (results.statusCode) {
6777
6831
  case 0:
@@ -6792,15 +6846,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6792
6846
  type: 'success',
6793
6847
  duration: 1500,
6794
6848
  onClose: function onClose() {
6795
- if (_this10.toUrl) {
6796
- window.location.href = _this10.toUrl;
6797
- } else if (results.doorIndex && _this10.doorIndex) {
6849
+ if (_this11.toUrl) {
6850
+ window.location.href = _this11.toUrl;
6851
+ } else if (results.doorIndex && _this11.doorIndex) {
6798
6852
  window.location.href = results.doorIndex;
6799
6853
  } else {
6800
6854
  if (window.location.href.indexOf('login.html') > -1) {
6801
6855
  window.location.href = './main.html';
6802
6856
  } else {
6803
- _this10.$router.push({ name: 'main' });
6857
+ _this11.$router.push({ name: 'main' });
6804
6858
  }
6805
6859
  }
6806
6860
  }
@@ -6812,11 +6866,11 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6812
6866
  //cancelButtonText: '取消',
6813
6867
  type: 'warning'
6814
6868
  }).then(function () {
6815
- _this10.operationCheckCode = results.checkCode;
6816
- if (typeof _this10.forget === 'string') {
6817
- util["a" /* default */].win.open(_this10.forgetUrl);
6869
+ _this11.operationCheckCode = results.checkCode;
6870
+ if (typeof _this11.forget === 'string') {
6871
+ util["a" /* default */].win.open(_this11.forgetUrl);
6818
6872
  } else {
6819
- _this10.showResetPassword = true;
6873
+ _this11.showResetPassword = true;
6820
6874
  }
6821
6875
  }).catch(function (e) {});
6822
6876
  break;
@@ -6857,13 +6911,13 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6857
6911
  type: 'error',
6858
6912
  duration: 1500,
6859
6913
  onClose: function onClose() {
6860
- if (_this10.code) {
6914
+ if (_this11.code) {
6861
6915
  window.location.href = util["a" /* default */].delUrlParam({ key: 'code' });
6862
6916
  if (window.location.hash) {
6863
6917
  location.reload();
6864
6918
  }
6865
6919
  } else {
6866
- _this10.getImgCode();
6920
+ _this11.getImgCode();
6867
6921
  }
6868
6922
  }
6869
6923
  });
@@ -6873,15 +6927,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6873
6927
  }
6874
6928
  },
6875
6929
  handleAssistance: function handleAssistance(data) {
6876
- var _this11 = this;
6930
+ var _this12 = this;
6877
6931
 
6878
6932
  clearTimeout(this.doAssistance);
6879
6933
  this.doAssistance = setTimeout(function () {
6880
- _this11.doAssistanceLogin(data);
6934
+ _this12.doAssistanceLogin(data);
6881
6935
  }, this.scanIntervalTime);
6882
6936
  },
6883
6937
  doAssistanceLogin: function doAssistanceLogin(data) {
6884
- var _this12 = this;
6938
+ var _this13 = this;
6885
6939
 
6886
6940
  util["a" /* default */].ajax({
6887
6941
  method: 'post',
@@ -6891,19 +6945,19 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
6891
6945
  if (res.rCode === 0) {
6892
6946
  var results = res.results;
6893
6947
  if (results.statusCode === 0) {
6894
- clearTimeout(_this12.doAssistance);
6895
- _this12.handleResults(results, 3);
6948
+ clearTimeout(_this13.doAssistance);
6949
+ _this13.handleResults(results, 3);
6896
6950
  } else {
6897
- _this12.handleAssistance(data);
6951
+ _this13.handleAssistance(data);
6898
6952
  }
6899
6953
  } else {
6900
- clearTimeout(_this12.doAssistance);
6901
- _this12.$message.error(res.msg);
6954
+ clearTimeout(_this13.doAssistance);
6955
+ _this13.$message.error(res.msg);
6902
6956
  }
6903
6957
  }).catch(function (err) {
6904
- clearTimeout(_this12.doAssistance);
6958
+ clearTimeout(_this13.doAssistance);
6905
6959
  if (err.message && err.message !== 'canceled') {
6906
- _this12.$message.error(err.message);
6960
+ _this13.$message.error(err.message);
6907
6961
  }
6908
6962
  });
6909
6963
  },
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,