eoss-ui 0.5.81-beta3 → 0.5.81-beta4

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.
@@ -50984,8 +50984,8 @@ mainvue_type_template_id_0794c41f_render._withStripped = true
50984
50984
 
50985
50985
  // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=0794c41f&
50986
50986
 
50987
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=4d97469e&scoped=true&
50988
- var simplicityvue_type_template_id_4d97469e_scoped_true_render = function () {
50987
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=110cff37&scoped=true&
50988
+ var simplicityvue_type_template_id_110cff37_scoped_true_render = function () {
50989
50989
  var _vm = this
50990
50990
  var _h = _vm.$createElement
50991
50991
  var _c = _vm._self._c || _h
@@ -51173,7 +51173,7 @@ var simplicityvue_type_template_id_4d97469e_scoped_true_render = function () {
51173
51173
  attrs: {
51174
51174
  direction: "ltr",
51175
51175
  "modal-class": "es-simplicity-apps-modal",
51176
- size: _vm.width,
51176
+ size: _vm.width + "px",
51177
51177
  "modal-append-to-body": false,
51178
51178
  "with-header": false,
51179
51179
  visible: _vm.showMenu,
@@ -51378,7 +51378,6 @@ var simplicityvue_type_template_id_4d97469e_scoped_true_render = function () {
51378
51378
  staticClass: "es-simplicity-iframe",
51379
51379
  attrs: { closable: "", "hide-bar": "" },
51380
51380
  on: {
51381
- "tab-click": _vm.handleTab,
51382
51381
  "tab-remove": _vm.handleRemove,
51383
51382
  "tab-contextmenu": _vm.handleContextmenu,
51384
51383
  },
@@ -51554,11 +51553,11 @@ var simplicityvue_type_template_id_4d97469e_scoped_true_render = function () {
51554
51553
  ),
51555
51554
  ])
51556
51555
  }
51557
- var simplicityvue_type_template_id_4d97469e_scoped_true_staticRenderFns = []
51558
- simplicityvue_type_template_id_4d97469e_scoped_true_render._withStripped = true
51556
+ var simplicityvue_type_template_id_110cff37_scoped_true_staticRenderFns = []
51557
+ simplicityvue_type_template_id_110cff37_scoped_true_render._withStripped = true
51559
51558
 
51560
51559
 
51561
- // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=4d97469e&scoped=true&
51560
+ // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=110cff37&scoped=true&
51562
51561
 
51563
51562
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=2597c13a&scoped=true&
51564
51563
  var avatarvue_type_template_id_2597c13a_scoped_true_render = function () {
@@ -54989,7 +54988,6 @@ var simplicityvue_type_script_lang_js_this = undefined;
54989
54988
  //
54990
54989
  //
54991
54990
  //
54992
- //
54993
54991
 
54994
54992
 
54995
54993
 
@@ -55138,7 +55136,11 @@ var events = [function (tabs, index) {
55138
55136
  //无界微前端Props属性
55139
55137
  wjProps: Object,
55140
55138
  //无界微前端Attrs属性
55141
- wjAttrs: Object
55139
+ wjAttrs: Object,
55140
+ menuWidth: {
55141
+ type: Number,
55142
+ default: 220
55143
+ }
55142
55144
  },
55143
55145
  data: function data() {
55144
55146
  return {
@@ -55157,7 +55159,7 @@ var events = [function (tabs, index) {
55157
55159
  //展示菜单导航
55158
55160
  showMenu: false,
55159
55161
  //展示菜单导航宽度
55160
- width: '296px',
55162
+ width: this.menuWidth,
55161
55163
  //人工智能配置
55162
55164
  aiConfig: null,
55163
55165
  //公用窗口面板配置
@@ -55342,7 +55344,6 @@ var events = [function (tabs, index) {
55342
55344
  this.setConfig(results);
55343
55345
  if (this.remote) {
55344
55346
  this.getApplications();
55345
- this.getMenus();
55346
55347
  }
55347
55348
  },
55348
55349
 
@@ -55459,6 +55460,7 @@ var events = [function (tabs, index) {
55459
55460
  getApplications: function getApplications() {
55460
55461
  var _this2 = this;
55461
55462
 
55463
+ var loading = utils_util["a" /* default */].loading('', '加载中...');
55462
55464
  utils_util["a" /* default */].ajax({
55463
55465
  url: this.appsUrl,
55464
55466
  defaults: true
@@ -55484,11 +55486,14 @@ var events = [function (tabs, index) {
55484
55486
  } else {
55485
55487
  _this2.$message.error('未分配应用菜单权限,请联系管理员!');
55486
55488
  }
55489
+ _this2.getMenus(loading);
55487
55490
  } else {
55491
+ loading.close();
55488
55492
  var msg = res.msg || '系统错误,请联系管理员!';
55489
55493
  _this2.$message.error(msg);
55490
55494
  }
55491
55495
  }).catch(function (err) {
55496
+ loading.close();
55492
55497
  if (err.message && err.message !== 'canceled') {
55493
55498
  _this2.$message.error(err.message);
55494
55499
  }
@@ -55500,21 +55505,81 @@ var events = [function (tabs, index) {
55500
55505
  * @author huangbo
55501
55506
  * @date 2024年9月7日
55502
55507
  **/
55503
- getMenus: function getMenus() {
55508
+ getMenus: function getMenus(loading) {
55504
55509
  var _this3 = this;
55505
55510
 
55506
55511
  utils_util["a" /* default */].ajax({ url: this._menuUrl }).then(function (res) {
55512
+ loading.close();
55507
55513
  if (res.rCode === 0) {
55508
55514
  if (res.results && res.results.length) {
55509
55515
  _this3.menus = res.results;
55510
55516
  _this3.setTips(_this3.menus);
55511
55517
  utils_store.set('nav', _this3.menus);
55518
+ console.log(12121);
55519
+ if (_this3.appCode) {
55520
+ var app = _this3.userApps.filter(function (item) {
55521
+ return item.code === _this3.appCode;
55522
+ })[0];
55523
+ if (app) {
55524
+ _this3.active = app.id;
55525
+ if (app.url) {
55526
+ var _obj = _this3.getMenu(_this3.menus, app.url);
55527
+ if (_obj) {
55528
+ var tab = _this3.setIframeType(_obj);
55529
+ _this3.tabs = [tab];
55530
+ _this3.activeName = tab.id;
55531
+ if (tab.method == 'router') {
55532
+ var params = utils_util["a" /* default */].getParams({ url: tab.url });
55533
+ _this3.$router.push({
55534
+ path: tab.path,
55535
+ query: params
55536
+ });
55537
+ }
55538
+ }
55539
+ }
55540
+ }
55541
+ if (_this3.tabs.length == 0) {
55542
+ var subMenus = _this3.getMenu(_this3.menus, _this3.appCode, 'appCode');
55543
+ if (subMenus) {
55544
+ // this.subMenus = subMenus;
55545
+ // this.showMenu = true;
55546
+ var _obj2 = _this3.getFirst(subMenus);
55547
+ if (_obj2) {
55548
+ var _tab = _this3.setIframeType(_obj2);
55549
+ _this3.tabs = [_tab];
55550
+ _this3.activeName = _tab.id;
55551
+ if (_tab.method == 'router') {
55552
+ var _params = utils_util["a" /* default */].getParams({ url: _tab.url });
55553
+ _this3.$router.push({
55554
+ path: _tab.path,
55555
+ query: _params
55556
+ });
55557
+ }
55558
+ }
55559
+ } else {
55560
+ _this3.subMenus = null;
55561
+ _this3.showMenu = false;
55562
+ }
55563
+ }
55564
+ // this.width = this.menuWidth;
55565
+ // this.$refs.subMenus && this.$refs.subMenus.clearSubmenu();
55566
+ }
55512
55567
  if (_this3.indexUrl) {
55513
- var obj = _this3.getMenu(_this3.menus, _this3.indexUrl);
55514
- if (obj) {
55515
- _this3.tabs = [_this3.setIframeType(obj)];
55516
- _this3.activeName = obj.id;
55517
- _this3.homePage = obj;
55568
+ var _obj3 = _this3.getMenu(_this3.menus, _this3.indexUrl);
55569
+ if (_obj3) {
55570
+ if (!_this3.appCode) {
55571
+ var _tab2 = _this3.setIframeType(_obj3);
55572
+ _this3.tabs = [_tab2];
55573
+ _this3.activeName = _tab2.id;
55574
+ if (_tab2.method == 'router') {
55575
+ var _params2 = utils_util["a" /* default */].getParams({ url: _tab2.url });
55576
+ _this3.$router.push({
55577
+ path: _tab2.path,
55578
+ query: _params2
55579
+ });
55580
+ }
55581
+ }
55582
+ _this3.homePage = _obj3;
55518
55583
  } else {
55519
55584
  _this3.homePage = _this3.setIframeType({
55520
55585
  url: _this3.indexUrl,
@@ -55522,25 +55587,33 @@ var events = [function (tabs, index) {
55522
55587
  id: '0',
55523
55588
  appCode: 'indexUrl'
55524
55589
  });
55525
- _this3.tabs = [_this3.homePage];
55526
- _this3.activeName = '0';
55590
+ if (!_this3.appCode) {
55591
+ _this3.tabs = [_this3.homePage];
55592
+ _this3.activeName = '0';
55593
+ if (_this3.homePage.method == 'router') {
55594
+ var _params3 = utils_util["a" /* default */].getParams({ url: _this3.homePage.url });
55595
+ _this3.$router.push({
55596
+ path: _this3.homePage.path,
55597
+ query: _params3
55598
+ });
55599
+ }
55600
+ }
55527
55601
  }
55528
- }
55529
- if (_this3.initApps && _this3.initApps.length) {
55530
- var _obj = _this3.getMenu(_this3.menus, _this3.initApps[_this3.initApps.length - 1]);
55531
- if (_obj) {
55532
- _this3.tabs.push(_this3.setIframeType(_obj));
55533
- _this3.activeName = _obj.id;
55602
+ } else if (_this3.initApps && _this3.initApps.length && !_this3.appCode) {
55603
+ var _obj4 = _this3.getMenu(_this3.menus, _this3.initApps[_this3.initApps.length - 1]);
55604
+ if (_obj4) {
55605
+ var _tab3 = _this3.setIframeType(_obj4);
55606
+ _this3.tabs.push(_tab3);
55607
+ _this3.activeName = _tab3.id;
55608
+ if (_tab3.method == 'router') {
55609
+ var _params4 = utils_util["a" /* default */].getParams({ url: _tab3.url });
55610
+ _this3.$router.push({
55611
+ path: _tab3.path,
55612
+ query: _params4
55613
+ });
55614
+ }
55534
55615
  }
55535
55616
  }
55536
- if (_this3.appCode) {
55537
- var subMenus = _this3.getMenu(_this3.menus, res.code, 'appCode');
55538
- _this3.subMenus = subMenus ? subMenus : null;
55539
- _this3.showMenu = subMenus !== false;
55540
- _this3.showApps = false;
55541
- _this3.width = '296px';
55542
- _this3.$refs.subMenus && _this3.$refs.subMenus.clearSubmenu();
55543
- }
55544
55617
  } else {
55545
55618
  _this3.$message.error('未分配菜单权限,请联系管理员!');
55546
55619
  }
@@ -55549,6 +55622,7 @@ var events = [function (tabs, index) {
55549
55622
  _this3.$message.error(msg);
55550
55623
  }
55551
55624
  }).catch(function (err) {
55625
+ loading.close();
55552
55626
  if (err.message && err.message !== 'canceled') {
55553
55627
  _this3.$message.error(err.message);
55554
55628
  }
@@ -55566,9 +55640,6 @@ var events = [function (tabs, index) {
55566
55640
  var urls = url.split('?');
55567
55641
  if (urls[0].indexOf('.js') > 1 && !isIE) {
55568
55642
  res.method = 'wujie';
55569
- this.$nextTick(function () {
55570
- res.refresh = true;
55571
- });
55572
55643
  } else if (urls[0].indexOf('.dhtml') > 0 || urls[0].indexOf('.html') > 0 && urls[0].indexOf('.html#') === -1) {
55573
55644
  res.method = 'iframe';
55574
55645
  } else {
@@ -55580,14 +55651,7 @@ var events = [function (tabs, index) {
55580
55651
  var path = this.hasRouter(routes, urls[0], res.appCode);
55581
55652
  if (path) {
55582
55653
  res.method = 'router';
55583
- var params = utils_util["a" /* default */].getParams({ url: url });
55584
- this.$router.push({
55585
- path: path,
55586
- query: params
55587
- });
55588
- this.$nextTick(function () {
55589
- res.refresh = true;
55590
- });
55654
+ res.path = path;
55591
55655
  } else {
55592
55656
  var urlopenmode = utils_util["a" /* default */].getParams({
55593
55657
  url: url,
@@ -55597,21 +55661,16 @@ var events = [function (tabs, index) {
55597
55661
  res.method = 'iframe';
55598
55662
  } else {
55599
55663
  res.method = 'wujie';
55600
- this.$nextTick(function () {
55601
- res.refresh = true;
55602
- });
55603
55664
  }
55604
55665
  }
55605
55666
  } else if (urls[0].indexOf('.html') > -1 && urls[0].indexOf('#/') > -1 || urls[0].indexOf('/#/') > -1) {
55606
55667
  res.method = 'wujie';
55607
- this.$nextTick(function () {
55608
- res.refresh = true;
55609
- });
55610
55668
  } else {
55611
55669
  res.method = 'iframe';
55612
55670
  }
55613
55671
  }
55614
55672
  }
55673
+ res.refresh = true;
55615
55674
  return res;
55616
55675
  },
55617
55676
 
@@ -55632,14 +55691,14 @@ var events = [function (tabs, index) {
55632
55691
  return item;
55633
55692
  }
55634
55693
  if (Object.prototype.hasOwnProperty.call(item, 'children') && item.children.length) {
55635
- var obj = this.getMenu(item.children, res, key);
55636
- if (obj) {
55637
- return obj;
55694
+ var _obj5 = this.getMenu(item.children, res, key);
55695
+ if (_obj5) {
55696
+ return _obj5;
55638
55697
  }
55639
55698
  } else if (Object.prototype.hasOwnProperty.call(item, 'fourthTabs') && item.fourthTabs.length) {
55640
- var _obj2 = this.getMenu(item.fourthTabs, res, key);
55641
- if (_obj2) {
55642
- return _obj2;
55699
+ var _obj6 = this.getMenu(item.fourthTabs, res, key);
55700
+ if (_obj6) {
55701
+ return _obj6;
55643
55702
  }
55644
55703
  }
55645
55704
  }
@@ -55647,6 +55706,28 @@ var events = [function (tabs, index) {
55647
55706
  return false;
55648
55707
  },
55649
55708
 
55709
+ /**
55710
+ * @desc:获取菜单第一条数据
55711
+ * @author huangbo
55712
+ * @date 2024年9月7日
55713
+ **/
55714
+ getFirst: function getFirst(obj) {
55715
+ if (!obj) {
55716
+ return '';
55717
+ }
55718
+ var openIdex = 0;
55719
+ if (obj.extendData && (obj.extendData.subDefOpenIndex || obj.extendData.subDefOpen)) {
55720
+ openIdex = parseInt(obj.extendData.subDefOpenIndex || obj.extendData.subDefOpen, 10);
55721
+ }
55722
+ if (obj.children && obj.children.length && obj.children[openIdex]) {
55723
+ return this.getFirst(obj.children[openIdex]);
55724
+ } else if (obj.fourthTabs && obj.fourthTabs.length && obj.fourthTabs[openIdex]) {
55725
+ return this.getFirst(obj.fourthTabs[openIdex]);
55726
+ } else if (obj.url) {
55727
+ return obj;
55728
+ }
55729
+ },
55730
+
55650
55731
  /**
55651
55732
  * @desc:遍历设置菜单气泡提醒
55652
55733
  * @author huangbo
@@ -55774,7 +55855,7 @@ var events = [function (tabs, index) {
55774
55855
  this.subMenus = res;
55775
55856
  this.showMenu = true;
55776
55857
  this.showApps = false;
55777
- this.width = '296px';
55858
+ this.width = this.menuWidth;
55778
55859
  this.$refs.subMenus && this.$refs.subMenus.clearSubmenu();
55779
55860
  } else {
55780
55861
  var set = true;
@@ -55789,16 +55870,25 @@ var events = [function (tabs, index) {
55789
55870
  var i = utils_util["a" /* default */].indexOfObj(this.tabs, res, 'id');
55790
55871
  this.activeName = res.id;
55791
55872
  if (i == -1) {
55792
- this.tabs.push(this.setIframeType(res));
55873
+ var tab = this.setIframeType(res);
55874
+ this.tabs.push(obj);
55875
+ if (tab.method == 'router') {
55876
+ var params = utils_util["a" /* default */].getParams({ url: tab.url });
55877
+ this.$router.push({
55878
+ path: tab.path,
55879
+ query: params
55880
+ });
55881
+ }
55793
55882
  }
55794
55883
  }
55795
55884
  }
55796
55885
  if (set && res.code) {
55797
55886
  var subMenus = this.getMenu(this.menus, res.code, 'appCode');
55887
+ console.log(subMenus);
55798
55888
  this.subMenus = subMenus ? subMenus : null;
55799
55889
  this.showMenu = subMenus !== false;
55800
55890
  this.showApps = false;
55801
- this.width = '296px';
55891
+ this.width = this.menuWidth;
55802
55892
  this.$refs.subMenus && this.$refs.subMenus.clearSubmenu();
55803
55893
  }
55804
55894
  }
@@ -55848,13 +55938,21 @@ var events = [function (tabs, index) {
55848
55938
  **/
55849
55939
  handlerClickMenu: function handlerClickMenu(res) {
55850
55940
  if (typeof res === 'number') {
55851
- var num = 296;
55852
- this.width = num * res + 'px';
55941
+ var num = this.menuWidth;
55942
+ this.width = num * res;
55853
55943
  } else {
55854
55944
  var i = utils_util["a" /* default */].indexOfObj(this.tabs, res, 'id');
55855
55945
  this.activeName = res.id;
55856
55946
  if (i == -1) {
55857
- this.tabs.push(this.setIframeType(res));
55947
+ var tab = this.setIframeType(res);
55948
+ this.tabs.push(tab);
55949
+ if (tab.method == 'router') {
55950
+ var params = utils_util["a" /* default */].getParams({ url: tab.url });
55951
+ this.$router.push({
55952
+ path: tab.path,
55953
+ query: params
55954
+ });
55955
+ }
55858
55956
  }
55859
55957
  this.showMenu = false;
55860
55958
  }
@@ -55890,29 +55988,6 @@ var events = [function (tabs, index) {
55890
55988
  }
55891
55989
  },
55892
55990
 
55893
- /**
55894
- * @desc:选中iframe页签刷新
55895
- * @author huangbo
55896
- * @date 2024年9月7日
55897
- **/
55898
- handleTab: function handleTab(res) {
55899
- var index = void 0;
55900
- if (res) {
55901
- index = parseInt(res.index);
55902
- } else {
55903
- index = utils_util["a" /* default */].indexOfObj(this.tabs, this.activeName, 'id');
55904
- }
55905
- var item = this.tabs[index];
55906
- if (item.method == 'iframe') {
55907
- item.url = utils_util["a" /* default */].handlerUrl(item.url);
55908
- } else {
55909
- item.refresh = false;
55910
- this.$nextTick(function () {
55911
- item.refresh = true;
55912
- });
55913
- }
55914
- },
55915
-
55916
55991
  /**
55917
55992
  * @desc:刷新选中iframe页签
55918
55993
  * @author huangbo
@@ -56259,10 +56334,19 @@ var events = [function (tabs, index) {
56259
56334
  var obj = this.getMenu(this.menus, apps[apps.length - 1]);
56260
56335
  if (obj) {
56261
56336
  var i = utils_util["a" /* default */].indexOfObj(this.tabs, obj, 'id');
56337
+ var n = utils_util["a" /* default */].indexOfObj(this.tabs, this.activeName, 'id');
56338
+ this.activeName = obj.id;
56262
56339
  if (i == -1) {
56263
- this.tabs.push(this.setIframeType(obj));
56340
+ var tab = this.setIframeType(obj);
56341
+ this.tabs.splice(n + 1, 0, tab);
56342
+ if (tab.method == 'router') {
56343
+ var params = utils_util["a" /* default */].getParams({ url: tab.url });
56344
+ this.$router.push({
56345
+ path: tab.path,
56346
+ query: params
56347
+ });
56348
+ }
56264
56349
  }
56265
- this.activeName = obj.id;
56266
56350
  } else {
56267
56351
  this.$message.error('没有此菜单!');
56268
56352
  }
@@ -56355,11 +56439,11 @@ var events = [function (tabs, index) {
56355
56439
 
56356
56440
  var simplicity_component = normalizeComponent(
56357
56441
  src_simplicityvue_type_script_lang_js_,
56358
- simplicityvue_type_template_id_4d97469e_scoped_true_render,
56359
- simplicityvue_type_template_id_4d97469e_scoped_true_staticRenderFns,
56442
+ simplicityvue_type_template_id_110cff37_scoped_true_render,
56443
+ simplicityvue_type_template_id_110cff37_scoped_true_staticRenderFns,
56360
56444
  false,
56361
56445
  null,
56362
- "4d97469e",
56446
+ "110cff37",
56363
56447
  null
56364
56448
 
56365
56449
  )
@@ -80754,7 +80838,7 @@ if (typeof window !== 'undefined' && window.Vue) {
80754
80838
  }
80755
80839
 
80756
80840
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
80757
- version: '0.5.81-beta2',
80841
+ version: '0.5.81-beta4',
80758
80842
  install: install,
80759
80843
  Button: packages_button,
80760
80844
  ButtonGroup: button_group,