t20-common-lib 0.12.11 → 0.12.13

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": "t20-common-lib",
3
- "version": "0.12.11",
3
+ "version": "0.12.13",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -126,15 +126,15 @@
126
126
  </template>
127
127
 
128
128
  <script>
129
- import Tree from "./selectTree/Tree/index.vue";
130
- import ElSelect from "./selectTree/Extends/ElSelect.vue";
129
+ import Tree from "../../../src/common/selectTree/Tree/index.vue";
130
+ import ElSelect from "../../../src/common/selectTree/Extends/ElSelect.vue";
131
131
  import Filters from "../../../src/common/Filters/index.vue"
132
132
  import request from "@/utils/request";
133
133
  import { getCommonConfig } from "../../../src/api/common";
134
- import treeSelectImg from "./selectTree/imgs/tree-select.png";
135
- import treeUnSelectImg from "./selectTree/imgs/tree-unselect.png";
136
- import listSelectImg from "./selectTree/imgs/list-select.png";
137
- import listUnSelectImg from "./selectTree/imgs/list-unselect.png";
134
+ import treeSelectImg from "../../../src/common/selectTree/imgs/tree-select.png";
135
+ import treeUnSelectImg from "../../../src/common/selectTree/imgs/tree-unselect.png";
136
+ import listSelectImg from "../../../src/common/selectTree/imgs/list-select.png";
137
+ import listUnSelectImg from "../../../src/common/selectTree/imgs/list-unselect.png";
138
138
 
139
139
  /** 兼容接口返回体在 res 顶层或 res.data */
140
140
  function unwrapRequestData(res) {
@@ -697,12 +697,14 @@ export default {
697
697
  new Promise((resolve) => {
698
698
  this.getTreeData("1", { resolve, expandFlag: true });
699
699
  }).then((data) => {
700
- // if (data) {
701
- // //默认展开节点
702
- // this.defaultExpandedKeys = [data.id];
703
- // }
700
+ let flatTemp = [];
701
+ this.flatData(this.data, flatTemp);
702
+ //去除没有权限的单位
703
+ flatTemp = flatTemp.filter((s) => {
704
+ return !s.disabled;
705
+ });
704
706
  this.checkD = true;
705
- this.selectData = JSON.parse(JSON.stringify(this.data));
707
+ this.selectData = JSON.parse(JSON.stringify(flatTemp));
706
708
  this.valueShow = this.$t("common_a_0003");
707
709
  this.$nextTick(() => {
708
710
  console.log(11111, this.selectData);
@@ -107,15 +107,15 @@
107
107
 
108
108
  <script>
109
109
  import emitter from "element-ui/src/mixins/emitter";
110
- import Tree from "../../select-tree-unit/src/selectTree/Tree/index.vue";
111
- import ElSelect from "../../select-tree-unit/src/selectTree/Extends/ElSelect.vue";
110
+ import Tree from "./selectTreeForm/Tree/index.vue";
111
+ import ElSelect from "./selectTreeForm/Extends/ElSelect.vue";
112
112
  import Filters from "../../../src/common/Filters/index.vue"
113
113
  import request from "@/utils/request";
114
114
  import { getCommonConfig } from "../../../src/api/common";
115
- import treeSelectImg from "../../select-tree-unit/src/selectTree/imgs/tree-select.png";
116
- import treeUnSelectImg from "../../select-tree-unit/src/selectTree/imgs/tree-unselect.png";
117
- import listSelectImg from "../../select-tree-unit/src/selectTree/imgs/list-select.png";
118
- import listUnSelectImg from "../../select-tree-unit/src/selectTree/imgs/list-unselect.png";
115
+ import treeSelectImg from "./selectTreeForm/imgs/tree-select.png";
116
+ import treeUnSelectImg from "./selectTreeForm/imgs/tree-unselect.png";
117
+ import listSelectImg from "./selectTreeForm/imgs/list-select.png";
118
+ import listUnSelectImg from "./selectTreeForm/imgs/list-unselect.png";
119
119
 
120
120
  /** 兼容接口返回体在 res 顶层或 res.data */
121
121
  function unwrapRequestData(res) {
@@ -653,12 +653,14 @@ export default {
653
653
  new Promise((resolve) => {
654
654
  this.getTreeData("1", { resolve, expandFlag: true });
655
655
  }).then((data) => {
656
- // if (data) {
657
- // //默认展开节点
658
- // this.defaultExpandedKeys = [data.id];
659
- // }
656
+ let flatTemp = [];
657
+ this.flatData(this.data, flatTemp);
658
+ //去除没有权限的单位
659
+ flatTemp = flatTemp.filter((s) => {
660
+ return !s.disabled;
661
+ });
660
662
  this.checkD = true;
661
- this.selectData = JSON.parse(JSON.stringify(this.data));
663
+ this.selectData = JSON.parse(JSON.stringify(flatTemp));
662
664
  this.valueShow = this.$t("common_a_0003");
663
665
  this.$nextTick(() => {
664
666
  console.log(11111, this.selectData);