bri-components 1.3.98 → 1.4.1
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 +17 -2
- package/src/components/controls/base/BriUpload/uploadList.vue +271 -56
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +1 -1
- package/src/components/controls/base/DshSelect/DshSelect.vue +1 -1
- package/src/components/controls/mixins/controlMixin.js +29 -29
- package/src/components/controls/mixins/selectMixin.js +1 -1
- 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/form/DshForm.vue +1 -1
- package/src/components/list/DshBox/DshCrossTable.vue +0 -3
- package/src/components/list/mixins/DshCascaderTableMixin.js +227 -332
- package/src/components/list/mixins/DshFlatTableMixin.js +44 -8
- package/src/components/list/mixins/DshTreeTableMixin.js +14 -14
- package/src/components/list/mixins/tableBaseMixin.js +209 -193
- package/src/components/list/mixins/treeTableBaseMixin.js +57 -20
- package/src/components/small/DshDropdown.vue +2 -1
- package/src/styles/components/list/BriTable.less +3 -2
|
@@ -6,30 +6,56 @@ export default {
|
|
|
6
6
|
props: {},
|
|
7
7
|
data () {
|
|
8
8
|
return {
|
|
9
|
-
searchMode: "flat" // "flat", "tree"
|
|
9
|
+
searchMode: "flat", // "flat", "tree"
|
|
10
|
+
|
|
11
|
+
baseOperationMap: {
|
|
12
|
+
canCreateChild: {
|
|
13
|
+
name: "添加一行下级",
|
|
14
|
+
type: "canCreateChild",
|
|
15
|
+
btnType: "default",
|
|
16
|
+
icon: "md-add-circle",
|
|
17
|
+
size: "default",
|
|
18
|
+
color: "#3DB8C5",
|
|
19
|
+
disabled: false,
|
|
20
|
+
event: "clickCreateChild"
|
|
21
|
+
}
|
|
22
|
+
// canDeleteChilds: {
|
|
23
|
+
// name: "删除所有子级",
|
|
24
|
+
// type: "canDeleteChilds",
|
|
25
|
+
// btnType: "errorText",
|
|
26
|
+
// icon: "ios-trash-outline",
|
|
27
|
+
// size: "small",
|
|
28
|
+
// color: "#E83636",
|
|
29
|
+
// disabled: false,
|
|
30
|
+
// event: "clickDeleteChilds"
|
|
31
|
+
// }
|
|
32
|
+
}
|
|
10
33
|
};
|
|
11
34
|
},
|
|
12
35
|
computed: {
|
|
13
|
-
|
|
36
|
+
treeTableBasePropsObj () {
|
|
14
37
|
return {
|
|
15
38
|
_treeForm: [],
|
|
16
|
-
|
|
17
|
-
...this.commonPropsObj,
|
|
18
|
-
|
|
19
|
-
_maxLevel: this.commonPropsObj._maxLevel || 3 // 最大级数
|
|
39
|
+
_maxLevel: 3 // 最大级数
|
|
20
40
|
};
|
|
21
41
|
},
|
|
42
|
+
treeForm () {
|
|
43
|
+
return this.selfPropsObj._treeForm;
|
|
44
|
+
},
|
|
45
|
+
treeFormKeys () {
|
|
46
|
+
return this.treeForm.map(treeFormItem => treeFormItem._key);
|
|
47
|
+
},
|
|
22
48
|
maxLevel () {
|
|
23
|
-
return this.selfPropsObj._maxLevel;
|
|
49
|
+
return this.selfPropsObj._maxLevel || 3;
|
|
24
50
|
},
|
|
25
51
|
|
|
26
52
|
selfColumns () {
|
|
27
53
|
return this.columns.map(column => {
|
|
28
|
-
// 层级表格类型,level字段的进行特殊处理(
|
|
54
|
+
// 层级表格类型,level字段的进行特殊处理(treeForm加工成_data)
|
|
29
55
|
return column._key === "level"
|
|
30
56
|
? {
|
|
31
57
|
...column,
|
|
32
|
-
_data: this.
|
|
58
|
+
_data: this.treeForm.map((treeFormItem, treeFormIndex) => ({
|
|
33
59
|
name: treeFormItem._name,
|
|
34
60
|
_key: (treeFormIndex + 1),
|
|
35
61
|
color: Object.keys(resourceData.colorMap)[treeFormIndex + 1]
|
|
@@ -37,6 +63,17 @@ export default {
|
|
|
37
63
|
}
|
|
38
64
|
: column;
|
|
39
65
|
});
|
|
66
|
+
},
|
|
67
|
+
selfAllOperationMap () {
|
|
68
|
+
return {
|
|
69
|
+
canCreateChild: {
|
|
70
|
+
...this.baseOperationMap.canCreateChild,
|
|
71
|
+
name: this.showMode === "form"
|
|
72
|
+
? this.baseOperationMap.canCreateChild.name.replace("行", "条")
|
|
73
|
+
: this.baseOperationMap.canCreateChild.name
|
|
74
|
+
// disabled: !!this.disabledCreateBtn
|
|
75
|
+
}
|
|
76
|
+
};
|
|
40
77
|
}
|
|
41
78
|
},
|
|
42
79
|
created () { },
|
|
@@ -85,18 +122,18 @@ export default {
|
|
|
85
122
|
}
|
|
86
123
|
});
|
|
87
124
|
},
|
|
88
|
-
// 节点操作 -删除所有子行
|
|
89
|
-
clickDeleteChilds (operationItem, row, rowIndex, col) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
125
|
+
// // 节点操作 -删除所有子行
|
|
126
|
+
// clickDeleteChilds (operationItem, row, rowIndex, col) {
|
|
127
|
+
// this.$Modal.confirm({
|
|
128
|
+
// title: "警告",
|
|
129
|
+
// content: "确定删除所有下级吗?",
|
|
130
|
+
// onOk: () => {
|
|
131
|
+
// row.children.splice(0);
|
|
95
132
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
133
|
+
// this.change("deleteChildRows", row, rowIndex, null);
|
|
134
|
+
// }
|
|
135
|
+
// });
|
|
136
|
+
// },
|
|
100
137
|
|
|
101
138
|
// 展开/隐藏节点
|
|
102
139
|
toggleExpand (row, bool = true) {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
class="list"
|
|
49
49
|
>
|
|
50
50
|
<DropdownItem
|
|
51
|
-
v-for="dropdownItem in showList"
|
|
51
|
+
v-for="(dropdownItem, dropdownIndex) in showList"
|
|
52
52
|
:key="dropdownItem._id || dropdownItem._key || dropdownItem.type"
|
|
53
53
|
:class="{
|
|
54
54
|
'list-item': true,
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
<slot
|
|
64
64
|
name="dropdownItem"
|
|
65
65
|
:dropdownItem="dropdownItem"
|
|
66
|
+
:dropdownIndex="dropdownIndex"
|
|
66
67
|
>
|
|
67
68
|
<dsh-icons
|
|
68
69
|
v-if="dropdownItem.icon || dropdownItem.customIcon"
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
&-expand {
|
|
172
172
|
|
|
173
173
|
}
|
|
174
|
-
&-
|
|
174
|
+
&-treeIndex {
|
|
175
175
|
padding: 4px 16px 4px 12px!important;
|
|
176
176
|
}
|
|
177
177
|
&-operation {
|
|
@@ -224,8 +224,9 @@
|
|
|
224
224
|
display: none!important;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
&-tree,
|
|
228
227
|
&-merge {
|
|
228
|
+
background-color: #fbfbfb!important;
|
|
229
|
+
|
|
229
230
|
textarea.ivu-input {
|
|
230
231
|
min-height: 18px;
|
|
231
232
|
padding: 0px;
|