bri-components 1.3.98 → 1.4.0
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 +1 -1
- package/src/components/controls/base/BriUpload/BriUpload.vue +15 -0
- package/src/components/controls/base/BriUpload/uploadList.vue +217 -56
- package/src/components/controls/mixins/controlMixin.js +29 -29
- package/src/components/controls/senior/cascaderTable.vue +4 -2
- package/src/components/controls/senior/flatTable.vue +2 -0
- package/src/components/controls/senior/selectUsers/departMenu.vue +2 -1
- package/src/components/list/DshBox/DshCrossTable.vue +0 -3
- package/src/components/list/mixins/DshCascaderTableMixin.js +305 -240
- package/src/components/list/mixins/DshFlatTableMixin.js +44 -8
- package/src/components/list/mixins/DshTreeTableMixin.js +10 -10
- package/src/components/list/mixins/tableBaseMixin.js +163 -154
- package/src/components/list/mixins/treeTableBaseMixin.js +54 -20
- package/src/components/small/DshDropdown.vue +2 -1
- package/src/styles/components/list/BriTable.less +2 -1
|
@@ -6,6 +6,15 @@ export default {
|
|
|
6
6
|
return {};
|
|
7
7
|
},
|
|
8
8
|
computed: {
|
|
9
|
+
selfBasePropsObj () {
|
|
10
|
+
return {
|
|
11
|
+
_mergeRowColKeys: [] // 合并行的列
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
mergeRowColKeys () {
|
|
15
|
+
return this.selfPropsObj._mergeRowColKeys || []; // 配置端有问题,高级依赖时值成undefined了
|
|
16
|
+
},
|
|
17
|
+
|
|
9
18
|
allListData () {
|
|
10
19
|
this.data.forEach(rowItem => {
|
|
11
20
|
this.fixRowItem(rowItem);
|
|
@@ -45,11 +54,9 @@ export default {
|
|
|
45
54
|
...(this.useIndex === true ? [this.indexColumn] : []),
|
|
46
55
|
...this.$transformToColumns(this.contentColumns),
|
|
47
56
|
...(
|
|
48
|
-
this.isSearching
|
|
49
|
-
? []
|
|
50
|
-
:
|
|
51
|
-
? [this.operationColumn]
|
|
52
|
-
: []
|
|
57
|
+
!this.isSearching && this.$getOperationList(["canDelete"]).length
|
|
58
|
+
? [this.operationColumn]
|
|
59
|
+
: []
|
|
53
60
|
)
|
|
54
61
|
];
|
|
55
62
|
},
|
|
@@ -67,10 +74,13 @@ export default {
|
|
|
67
74
|
h("div", rowIndex + 1),
|
|
68
75
|
|
|
69
76
|
// 添加符
|
|
70
|
-
...this.
|
|
77
|
+
...this.operationIconRender(h, { row, rowIndex, column })
|
|
71
78
|
];
|
|
72
79
|
}
|
|
73
80
|
};
|
|
81
|
+
},
|
|
82
|
+
mergeRowColumns () {
|
|
83
|
+
return this.selfColumns.filter(colItem => this.mergeRowColKeys.includes(colItem._key));
|
|
74
84
|
}
|
|
75
85
|
},
|
|
76
86
|
created () { },
|
|
@@ -130,8 +140,34 @@ export default {
|
|
|
130
140
|
});
|
|
131
141
|
},
|
|
132
142
|
|
|
133
|
-
|
|
134
|
-
|
|
143
|
+
bodyCellSpan ({ row, rowIndex, column }) {
|
|
144
|
+
// 合并单元格(单元格值为空时不合并)
|
|
145
|
+
if (this.mergeRowColKeys.includes(column._key)) {
|
|
146
|
+
if (this.$isEmptyData(row[column._key])) {
|
|
147
|
+
return {
|
|
148
|
+
rowspan: 1,
|
|
149
|
+
colspan: 1
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
if (
|
|
154
|
+
rowIndex !== 0 &&
|
|
155
|
+
row[column._key] === this.showListData[rowIndex - 1][column._key]
|
|
156
|
+
) {
|
|
157
|
+
return {
|
|
158
|
+
rowspan: 0,
|
|
159
|
+
colspan: 0
|
|
160
|
+
};
|
|
161
|
+
} else {
|
|
162
|
+
const newList = this.showListData.slice(rowIndex);
|
|
163
|
+
const newIndex = newList.findIndex(rowItem => row[column._key] !== rowItem[column._key]);
|
|
164
|
+
return {
|
|
165
|
+
rowspan: newIndex === -1 ? newList.length : newIndex,
|
|
166
|
+
colspan: 1
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
135
171
|
}
|
|
136
172
|
}
|
|
137
173
|
};
|
|
@@ -6,6 +6,12 @@ export default {
|
|
|
6
6
|
return {};
|
|
7
7
|
},
|
|
8
8
|
computed: {
|
|
9
|
+
selfBasePropsObj () {
|
|
10
|
+
return {
|
|
11
|
+
...this.treeTableBasePropsObj
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
|
|
9
15
|
allTreeData () {
|
|
10
16
|
return this.getCalcuedTree(this.data, this.selfColumns);
|
|
11
17
|
},
|
|
@@ -47,11 +53,9 @@ export default {
|
|
|
47
53
|
...(this.useIndex === true ? [this.indexColumn] : []),
|
|
48
54
|
...this.$transformToColumns(this.contentColumns),
|
|
49
55
|
...(
|
|
50
|
-
this.isSearching
|
|
51
|
-
? []
|
|
52
|
-
:
|
|
53
|
-
? [this.operationColumn]
|
|
54
|
-
: []
|
|
56
|
+
!this.isSearching && this.$getOperationList(["canDelete"]).length
|
|
57
|
+
? [this.operationColumn]
|
|
58
|
+
: []
|
|
55
59
|
)
|
|
56
60
|
];
|
|
57
61
|
},
|
|
@@ -109,7 +113,7 @@ export default {
|
|
|
109
113
|
}, row.__treeIndex__),
|
|
110
114
|
|
|
111
115
|
// 添加符
|
|
112
|
-
...this.
|
|
116
|
+
...this.operationIconRender(h, { row, rowIndex, column })
|
|
113
117
|
];
|
|
114
118
|
}
|
|
115
119
|
};
|
|
@@ -117,10 +121,6 @@ export default {
|
|
|
117
121
|
},
|
|
118
122
|
created () { },
|
|
119
123
|
methods: {
|
|
120
|
-
change (eventType, row, rowIndex, col, ...params) {
|
|
121
|
-
this.$emit("change", { tree: this.data, rowDefault: this.rowDefault }, eventType, col, row, rowIndex, ...params);
|
|
122
|
-
},
|
|
123
|
-
|
|
124
124
|
/* ------ 工具方法 ------- */
|
|
125
125
|
// 加工树形数据
|
|
126
126
|
getCalcuedTree (treeData = [], cols = []) {
|