qj-common 4.1.44 → 4.1.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qj-common",
3
- "version": "4.1.44",
3
+ "version": "4.1.45",
4
4
  "description": "common files && template for qj-paas",
5
5
  "scripts": {
6
6
  "gulp": "gulp css"
@@ -444,7 +444,7 @@ import templateTableContent from './templateUi/templateTableContent';
444
444
  import tempSelect from './components/temp-select';
445
445
  import templateInput from './templateInput';
446
446
  const querystring = require('querystring');
447
- import { isUndefined, cloneDeep } from "lodash";
447
+ import { isUndefined } from "lodash";
448
448
  import { parseTime } from '#/utils/index'; //时间格式化
449
449
  export default {
450
450
  props: ['temInput', 'params', 'temTable', 'temPage', 'temTab', 'url', 'temPageLayout', 'subtotal'],
@@ -454,7 +454,6 @@ export default {
454
454
  if (!this.temInput) {
455
455
  return this.temInput
456
456
  }
457
-
458
457
  if (isUndefined(this.$route.meta.btnRules)) {
459
458
  return this.temInput;
460
459
  }
@@ -466,7 +465,12 @@ export default {
466
465
  let inputData = this.temInput
467
466
  const result = inputData[index];
468
467
  result.btnArray = result.btnArray.filter(item1 => {
469
- return this.$route.meta.btnRules.includes(item1.label)
468
+ if (item1.menuCode) {
469
+ return this.$route.meta.btnRules.find(items => items.menuCode == item1.menuCode) != undefined ? true : false
470
+ } else {
471
+ return this.$route.meta.btnRules.find(items => items.menuName == item1.label) != undefined ? true : false
472
+ }
473
+
470
474
  })
471
475
  return inputData;
472
476
  },
@@ -484,7 +488,12 @@ export default {
484
488
  let tabBtnData = this.temTable
485
489
 
486
490
  tabBtnData['tableBtn'] = tabBtnData['tableBtn'].filter(item1 => {
487
- return this.$route.meta.btnRules.includes(item1.label)
491
+ if (item1.menuCode) {
492
+
493
+ return this.$route.meta.btnRules.find(items => items.menuCode == item1.menuCode) != undefined ? true : false
494
+ } else {
495
+ return this.$route.meta.btnRules.find(items => items.menuName == item1.label) != undefined ? true : false
496
+ }
488
497
  })
489
498
  return tabBtnData;
490
499
  },