eoss-ui 0.4.87 → 0.4.88

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.
package/lib/main.js CHANGED
@@ -3484,7 +3484,7 @@ module.exports = require("stompjs");
3484
3484
  // ESM COMPAT FLAG
3485
3485
  __webpack_require__.r(__webpack_exports__);
3486
3486
 
3487
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=4b1d4233&
3487
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=5d84af02&
3488
3488
  var render = function () {
3489
3489
  var _vm = this
3490
3490
  var _h = _vm.$createElement
@@ -3914,7 +3914,7 @@ var staticRenderFns = []
3914
3914
  render._withStripped = true
3915
3915
 
3916
3916
 
3917
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=4b1d4233&
3917
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=5d84af02&
3918
3918
 
3919
3919
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=799780ee&
3920
3920
  var userinfovue_type_template_id_799780ee_render = function () {
@@ -6335,13 +6335,9 @@ var log = util["a" /* default */].getParams('console');
6335
6335
  };
6336
6336
  },
6337
6337
  created: function created() {
6338
+ this.homePage = typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
6338
6339
  this.isHeader = util["a" /* default */].getParams('header');
6339
6340
  this.getConfig();
6340
- if (this.remote) {
6341
- this.getMenu();
6342
- } else {
6343
- this.renderMenu();
6344
- }
6345
6341
  if (this.socket) {
6346
6342
  this.initWebSocket();
6347
6343
  }
@@ -6551,12 +6547,8 @@ var log = util["a" /* default */].getParams('console');
6551
6547
  if (i === 'initApplication' && results[i]) {
6552
6548
  this.results[i] = results[i].split(',');
6553
6549
  }
6554
- if (this.loadHomePage) {
6555
- if (typeof this.loadHomePage === 'string') {
6556
- this.homePage = this.loadHomePage;
6557
- } else if (i === 'indexUrl') {
6558
- this.homePage = results[i];
6559
- }
6550
+ if (i === 'indexUrl' && this.loadHomePage) {
6551
+ this.homePage = typeof this.loadHomePage === 'string' ? this.loadHomePage : results[i];
6560
6552
  if (this.isHomePage && this.homePage) {
6561
6553
  if (this.menus && this.menus.length) {
6562
6554
  var ids = null;
@@ -6569,7 +6561,6 @@ var log = util["a" /* default */].getParams('console');
6569
6561
  this.setMenu(this.menus);
6570
6562
  }
6571
6563
  }
6572
- //this.isHomePage && this.handleJump(this.homePage);
6573
6564
  }
6574
6565
  if (i === 'doorIndex' && results[i]) {
6575
6566
  window.open(results[i]);
@@ -6608,11 +6599,21 @@ var log = util["a" /* default */].getParams('console');
6608
6599
  if (util["a" /* default */].getStorage('mainConfig')) {
6609
6600
  var results = JSON.parse(util["a" /* default */].getStorage('mainConfig'));
6610
6601
  this.setConfig(results);
6602
+ if (this.remote) {
6603
+ this.getMenu();
6604
+ } else {
6605
+ this.renderMenu();
6606
+ }
6611
6607
  return true;
6612
6608
  }
6613
6609
  util["a" /* default */].ajax({ url: this.mainConfig }).then(function (res) {
6614
6610
  if (res && res.rCode === 0) {
6615
6611
  _this3.setConfig(res.results, 1);
6612
+ if (_this3.remote) {
6613
+ _this3.getMenu();
6614
+ } else {
6615
+ _this3.renderMenu();
6616
+ }
6616
6617
  } else {
6617
6618
  var msg = res.msg || '系统错误,请联系管理员!';
6618
6619
  _this3.$message.error(msg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.87",
3
+ "version": "0.4.88",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -449,7 +449,12 @@ export default {
449
449
  },
450
450
  theads: {
451
451
  get() {
452
- return typeof this.thead === 'string' ? this.theadData : this.thead;
452
+ if (typeof this.thead === 'string') {
453
+ this.theadData.length && this.setMinWidth(this.theadData);
454
+ return this.theadData;
455
+ }
456
+ this.setMinWidth(this.thead);
457
+ return this.thead;
453
458
  },
454
459
  set(val) {
455
460
  return val;
@@ -602,6 +607,7 @@ export default {
602
607
  this.getOptions(this.thead);
603
608
  }
604
609
  this.immediate && this.getTableData();
610
+ this.chekOpenTotalArea();
605
611
  },
606
612
  mounted() {
607
613
  this.datas.length && this.checkSelect(this.checked);
@@ -627,20 +633,22 @@ export default {
627
633
  }
628
634
  return false;
629
635
  },
630
- getOptions(res) {
631
- res.forEach((item) => {
632
- if (
633
- (!item.childHead || !item.childHead.length) &&
634
- (!item.children || !item.children.length) &&
635
- !item.width &&
636
- !item.minWidth &&
637
- item.title
638
- ) {
636
+ setMinWidth(obj) {
637
+ obj.forEach((item) => {
638
+ if (item.childHead && item.childHead.length) {
639
+ this.setMinWidth(item.childHead);
640
+ } else if (item.children && item.children.length) {
641
+ this.setMinWidth(item.children);
642
+ } else if (!item.width && !item.minWidth && item.title) {
639
643
  let width = item.title.length * 14 + 20;
640
644
  if (width > 80) {
641
645
  this.$set(item, 'minWidth', width);
642
646
  }
643
647
  }
648
+ });
649
+ },
650
+ getOptions(res) {
651
+ res.forEach((item) => {
644
652
  if (item.sysCode || item.url) {
645
653
  let params = util.extend(
646
654
  {},
@@ -5033,7 +5033,7 @@ export default {
5033
5033
  }
5034
5034
  let obj = JSON.parse(JSON.stringify(models));
5035
5035
  if (this.within) {
5036
- //within:把提交数据装到指定属性中
5036
+ //within:把提交数据装到指定属性中(分表)
5037
5037
  let newData = {};
5038
5038
  if (typeof this.within === 'string') {
5039
5039
  newData[this.within] = obj;
@@ -621,13 +621,10 @@ export default {
621
621
  };
622
622
  },
623
623
  created() {
624
+ this.homePage =
625
+ typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
624
626
  this.isHeader = util.getParams('header');
625
627
  this.getConfig();
626
- if (this.remote) {
627
- this.getMenu();
628
- } else {
629
- this.renderMenu();
630
- }
631
628
  if (this.socket) {
632
629
  this.initWebSocket();
633
630
  }
@@ -848,12 +845,11 @@ export default {
848
845
  if (i === 'initApplication' && results[i]) {
849
846
  this.results[i] = results[i].split(',');
850
847
  }
851
- if (this.loadHomePage) {
852
- if (typeof this.loadHomePage === 'string') {
853
- this.homePage = this.loadHomePage;
854
- } else if (i === 'indexUrl') {
855
- this.homePage = results[i];
856
- }
848
+ if (i === 'indexUrl' && this.loadHomePage) {
849
+ this.homePage =
850
+ typeof this.loadHomePage === 'string'
851
+ ? this.loadHomePage
852
+ : results[i];
857
853
  if (this.isHomePage && this.homePage) {
858
854
  if (this.menus && this.menus.length) {
859
855
  let ids = null;
@@ -866,7 +862,6 @@ export default {
866
862
  this.setMenu(this.menus);
867
863
  }
868
864
  }
869
- //this.isHomePage && this.handleJump(this.homePage);
870
865
  }
871
866
  if (i === 'doorIndex' && results[i]) {
872
867
  window.open(results[i]);
@@ -902,6 +897,11 @@ export default {
902
897
  if (util.getStorage('mainConfig')) {
903
898
  const results = JSON.parse(util.getStorage('mainConfig'));
904
899
  this.setConfig(results);
900
+ if (this.remote) {
901
+ this.getMenu();
902
+ } else {
903
+ this.renderMenu();
904
+ }
905
905
  return true;
906
906
  }
907
907
  util
@@ -909,6 +909,11 @@ export default {
909
909
  .then((res) => {
910
910
  if (res && res.rCode === 0) {
911
911
  this.setConfig(res.results, 1);
912
+ if (this.remote) {
913
+ this.getMenu();
914
+ } else {
915
+ this.renderMenu();
916
+ }
912
917
  } else {
913
918
  let msg = res.msg || '系统错误,请联系管理员!';
914
919
  this.$message.error(msg);
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.87',
120
+ version: '0.4.88',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,