bri-components 1.2.57 → 1.2.59
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 +2 -2
- package/src/components/controls/base/BriUpload/BriUpload.vue +1 -1
- package/src/components/controls/base/DshCascader/DshCascader.vue +68 -231
- package/src/components/controls/base/DshCascader/{cascaderModal.vue → components/cascaderModal.vue} +22 -31
- package/src/components/controls/base/DshCascader/{cascaderPicker.vue → components/cascaderPicker.vue} +22 -18
- package/src/components/controls/base/DshCascader/components/cascaderSimple.vue +141 -0
- package/src/components/controls/base/DshCoordinates.vue +1 -1
- package/src/components/controls/base/DshDate/DshDate.vue +1 -1
- package/src/components/controls/base/DshDate/DshDaterange.vue +1 -1
- package/src/components/controls/base/DshDivider.vue +1 -1
- package/src/components/controls/base/DshEditor.vue +1 -1
- package/src/components/controls/base/DshInput/BriInputs.vue +1 -1
- package/src/components/controls/base/DshInput/DshInput.vue +1 -1
- package/src/components/controls/base/DshNumber/DshNumber.vue +1 -1
- package/src/components/controls/base/DshNumber/DshNumberange.vue +1 -1
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +187 -185
- package/src/components/controls/base/DshSelect/DshSelect.vue +140 -137
- package/src/components/controls/base/DshSwitch/switchMixin.js +1 -1
- package/src/components/controls/extra/themeColor.vue +1 -1
- package/src/components/controls/extra/themeIcon.vue +1 -1
- package/src/components/controls/{base/DshCascader → mixins}/cascaderMixin.js +16 -33
- package/src/components/controls/{base/DshCascader → mixins}/cascaderPickerMixin.js +52 -44
- package/src/components/controls/{controlMixin.js → mixins/controlMixin.js} +25 -4
- package/src/components/controls/mixins/selectMixin.js +192 -0
- package/src/components/controls/senior/BriLabels.vue +1 -1
- package/src/components/controls/senior/DshPackage.vue +1 -1
- package/src/components/controls/senior/cascaderTable.vue +1 -1
- package/src/components/controls/senior/flatTable.vue +1 -1
- package/src/components/controls/senior/selectDepartments.vue +1 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +1 -1
- package/src/components/controls/special/DshBack.vue +1 -1
- package/src/components/controls/special/DshUndeveloped.vue +1 -1
- package/src/components/form/DshAdvSearch.vue +1 -1
- package/src/components/list/DshBox/DshCard.vue +153 -38
- package/src/components/list/DshBox/DshPanel.vue +260 -93
- package/src/components/small/BriTooltip.vue +2 -3
- package/src/components/unit/DshFormUnit.vue +7 -19
- package/src/styles/components/index.less +0 -2
- package/src/components/controls/base/DshSelect/selectMixin.js +0 -239
- package/src/styles/components/list/DshBox/DshCard.less +0 -59
- package/src/styles/components/list/DshBox/DshPanel.less +0 -107
- package/src/styles/components/small/BriTooltip.less +0 -0
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import controlMixin from "../../controlMixin.js";
|
|
2
|
-
import { resourceData } from "bri-datas";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
mixins: [
|
|
6
|
-
controlMixin
|
|
7
|
-
],
|
|
8
|
-
components: {},
|
|
9
|
-
props: {},
|
|
10
|
-
data () {
|
|
11
|
-
return {
|
|
12
|
-
initListData: [],
|
|
13
|
-
showTipTpl: false,
|
|
14
|
-
showTipModal: false,
|
|
15
|
-
dynamicContent: ""
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
computed: {
|
|
19
|
-
selectPropsObj () {
|
|
20
|
-
return {
|
|
21
|
-
colorMap: resourceData.colorMap,
|
|
22
|
-
_optionKind: "dropdown", // "flat"、"dropdown"
|
|
23
|
-
_useColor: false,
|
|
24
|
-
_filterable: true,
|
|
25
|
-
_data: [],
|
|
26
|
-
_customData: [],
|
|
27
|
-
|
|
28
|
-
...this.propsObj,
|
|
29
|
-
...this.commonDealPropsObj
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
showType () {
|
|
33
|
-
return this.selfPropsObj._optionKind;
|
|
34
|
-
},
|
|
35
|
-
useColor () {
|
|
36
|
-
return this.selfPropsObj._useColor;
|
|
37
|
-
},
|
|
38
|
-
colorMap () {
|
|
39
|
-
return this.selfPropsObj.colorMap;
|
|
40
|
-
},
|
|
41
|
-
listData () {
|
|
42
|
-
const listData = this.selfPropsObj._data.concat(this.initListData);
|
|
43
|
-
|
|
44
|
-
return this.$dataType(this.selfPropsObj._filterFunc, "function")
|
|
45
|
-
? this.selfPropsObj._filterFunc(listData, this.selfPropsObj, this.value)
|
|
46
|
-
: listData;
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
openTip () {
|
|
50
|
-
return this.isOnSearch ? false : this.propsObj._openTip;
|
|
51
|
-
},
|
|
52
|
-
modalTipContent () {
|
|
53
|
-
return this.propsObj._tipContent || this.dynamicContent || "暂无信息";
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
curValObj () {
|
|
57
|
-
return this.$isEmptyData(this.curVal)
|
|
58
|
-
? undefined
|
|
59
|
-
: this.getItemData(this.curVal);
|
|
60
|
-
},
|
|
61
|
-
valStr: {
|
|
62
|
-
get () {
|
|
63
|
-
return this.curValObj
|
|
64
|
-
? this.curValObj.name || this.curValObj._name
|
|
65
|
-
: "";
|
|
66
|
-
},
|
|
67
|
-
set (val) {
|
|
68
|
-
if (!val) {
|
|
69
|
-
this.curVal = "";
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
showVal () {
|
|
74
|
-
return this.$isEmptyData(this.curVal)
|
|
75
|
-
? this.emptyShowVal
|
|
76
|
-
: this.valStr;
|
|
77
|
-
},
|
|
78
|
-
// 已选择项的对象列表
|
|
79
|
-
curValObjList () {
|
|
80
|
-
return this.curValList.map(key => this.getItemData(key));
|
|
81
|
-
},
|
|
82
|
-
valListStr () {
|
|
83
|
-
return this.curValObjList.map(item => item.name || item._name).join("、");
|
|
84
|
-
},
|
|
85
|
-
showMulVal () {
|
|
86
|
-
return this.$isEmptyData(this.curValList)
|
|
87
|
-
? this.emptyShowVal
|
|
88
|
-
: this.valListStr;
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
created () {
|
|
92
|
-
this.init();
|
|
93
|
-
},
|
|
94
|
-
methods: {
|
|
95
|
-
init () {
|
|
96
|
-
this.getTipData();
|
|
97
|
-
this.getListData();
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
getItemData (key) {
|
|
101
|
-
const obj = this.listData.find(item => item._key === key) || {
|
|
102
|
-
_key: key,
|
|
103
|
-
name: `温馨提示:选项${key}已找不到`
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
return {
|
|
107
|
-
...obj,
|
|
108
|
-
style: this.getItemStyle(obj),
|
|
109
|
-
color: undefined
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
getItemStyle (item) {
|
|
113
|
-
const color = this.colorMap[item.color] || this.colorMap["color-1"];
|
|
114
|
-
return {
|
|
115
|
-
"background-color": this.useColor ? this.$getColor(color, 0.1) : "#E5E5E5",
|
|
116
|
-
color: this.useColor ? color : "rgba(0, 0, 0, 0.9)",
|
|
117
|
-
display: "inline-block",
|
|
118
|
-
"max-width": "100%",
|
|
119
|
-
padding: "0px 6px",
|
|
120
|
-
"border-radius": "4px"
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
// 获取某项的置灰状态
|
|
124
|
-
getItemDisabled (item) {
|
|
125
|
-
return !!(this.selfPropsObj._disabled || item._disabled);
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
// 是否打开tip弹窗
|
|
129
|
-
clickOpenTip (item) {
|
|
130
|
-
if (item.__isTip__) {
|
|
131
|
-
if (this.propsObj._tipKind === "dynamic" && !this.propsObj._tipContent) {
|
|
132
|
-
this.getTipUrl();
|
|
133
|
-
} else {
|
|
134
|
-
this.showTipTpl = true;
|
|
135
|
-
this.showTipModal = true;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
getTipUrl () {
|
|
140
|
-
if (this.propsObj._tipUrl) {
|
|
141
|
-
this.$https({
|
|
142
|
-
url: {
|
|
143
|
-
module: "customPath",
|
|
144
|
-
name: this.propsObj._tipUrl
|
|
145
|
-
},
|
|
146
|
-
params: {
|
|
147
|
-
formData: this.value,
|
|
148
|
-
propsObj: this.propsObj
|
|
149
|
-
},
|
|
150
|
-
callback: res => {
|
|
151
|
-
this.dynamicContent = res;
|
|
152
|
-
this.showTipTpl = true;
|
|
153
|
-
this.showTipModal = true;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
} else {
|
|
157
|
-
this.$Message.warning("请配置接口路径!");
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
tipModalRender (h) {
|
|
161
|
-
return this.showTipTpl
|
|
162
|
-
? h("dsh-modal", {
|
|
163
|
-
props: {
|
|
164
|
-
value: this.showTipModal,
|
|
165
|
-
mode: "custom",
|
|
166
|
-
propsObj: {
|
|
167
|
-
title: "温馨提示",
|
|
168
|
-
maskClosable: true,
|
|
169
|
-
class: "DshSelect-modal"
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
on: {
|
|
173
|
-
input: bool => {
|
|
174
|
-
this.showTipModal = bool;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}, [
|
|
178
|
-
h("div", {
|
|
179
|
-
class: "DshSelect-modal-content",
|
|
180
|
-
domProps: {
|
|
181
|
-
innerHTML: this.modalTipContent
|
|
182
|
-
}
|
|
183
|
-
}),
|
|
184
|
-
h("div", {
|
|
185
|
-
class: "DshSelect-modal-footer"
|
|
186
|
-
}, [
|
|
187
|
-
h("Button", {
|
|
188
|
-
props: {
|
|
189
|
-
type: "primary"
|
|
190
|
-
},
|
|
191
|
-
on: {
|
|
192
|
-
click: () => {
|
|
193
|
-
this.showTipModal = false;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}, "我知道了")
|
|
197
|
-
])
|
|
198
|
-
])
|
|
199
|
-
: undefined;
|
|
200
|
-
},
|
|
201
|
-
getTipData () {
|
|
202
|
-
if (
|
|
203
|
-
(this.propsObj._key !== "_default") &&
|
|
204
|
-
this.finalCanEdit &&
|
|
205
|
-
this.openTip
|
|
206
|
-
) {
|
|
207
|
-
let tipObj = {
|
|
208
|
-
_key: "openTip",
|
|
209
|
-
_name: this.propsObj._tipName || "其他",
|
|
210
|
-
__isTip__: true,
|
|
211
|
-
_disabled: true,
|
|
212
|
-
color: "#6991cc",
|
|
213
|
-
class: `Dsh${this.propsObj._type}-tip`
|
|
214
|
-
};
|
|
215
|
-
this.initListData.push(tipObj);
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
// 接口 -获取自定义的接口数据
|
|
219
|
-
getListData () {
|
|
220
|
-
this.selfPropsObj._customData.forEach(item => {
|
|
221
|
-
this.$https({
|
|
222
|
-
url: item.url,
|
|
223
|
-
params: item.params,
|
|
224
|
-
callback: data => {
|
|
225
|
-
this.initListData = [
|
|
226
|
-
...this.initListData,
|
|
227
|
-
...data.list.map(dataItem =>
|
|
228
|
-
({
|
|
229
|
-
_key: dataItem[item._key || "_key"],
|
|
230
|
-
name: dataItem[item._name || "name"]
|
|
231
|
-
})
|
|
232
|
-
)
|
|
233
|
-
];
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
.DshCard {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
background-color: #ffffff;
|
|
5
|
-
padding: 0 40px;
|
|
6
|
-
|
|
7
|
-
&-item {
|
|
8
|
-
width: 250px;
|
|
9
|
-
height: 210px;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
margin: 10px 16px 30px;
|
|
12
|
-
border-radius: 6px;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
box-shadow: 0px 4px 8px 0px rgba(222, 222, 222, 0.75);
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
position: relative;
|
|
19
|
-
|
|
20
|
-
&-dropdown {
|
|
21
|
-
position: absolute;
|
|
22
|
-
top: 5px;
|
|
23
|
-
right: 5px;
|
|
24
|
-
}
|
|
25
|
-
&-image {
|
|
26
|
-
padding-top: 20px;
|
|
27
|
-
height: 122px;
|
|
28
|
-
}
|
|
29
|
-
&-info {
|
|
30
|
-
flex: 1;
|
|
31
|
-
padding: 8px 15px;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
background: #F7FBFF;
|
|
34
|
-
&-title {
|
|
35
|
-
font-size: 14px;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
}
|
|
38
|
-
&-col {
|
|
39
|
-
height: 24px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.unit {
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: row;
|
|
45
|
-
&-label {
|
|
46
|
-
max-width: 60px;
|
|
47
|
-
font-weight: 400;
|
|
48
|
-
color: #515A6E;
|
|
49
|
-
}
|
|
50
|
-
&-colon {
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
&-value {
|
|
54
|
-
flex: 1;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
.DshPanel {
|
|
2
|
-
min-width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
|
|
7
|
-
&-group {
|
|
8
|
-
width: 300px;
|
|
9
|
-
min-width: 300px;
|
|
10
|
-
max-width: 300px;
|
|
11
|
-
height: 100%;
|
|
12
|
-
padding: 10px;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
|
|
17
|
-
&-title {
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 50px;
|
|
20
|
-
padding: 15px 10px;
|
|
21
|
-
display: flex;
|
|
22
|
-
border-radius: 10px 10px 0px 0px;
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
|
|
25
|
-
&-name {
|
|
26
|
-
max-width: 120px;
|
|
27
|
-
}
|
|
28
|
-
&-number {
|
|
29
|
-
font-weight: bold;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-list {
|
|
34
|
-
width: 100%;
|
|
35
|
-
flex: 1;
|
|
36
|
-
min-height: 0px;
|
|
37
|
-
border: 1px dashed #cccccc;
|
|
38
|
-
border-top: none;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
|
|
42
|
-
.list-drag {
|
|
43
|
-
width: 100%;
|
|
44
|
-
flex: 1;
|
|
45
|
-
min-height: 0px;
|
|
46
|
-
|
|
47
|
-
&-transition {
|
|
48
|
-
display: block;
|
|
49
|
-
width: 100%;
|
|
50
|
-
height: 100%;
|
|
51
|
-
padding: 10px;
|
|
52
|
-
overflow: auto;
|
|
53
|
-
|
|
54
|
-
.row-item {
|
|
55
|
-
min-height: 60px;
|
|
56
|
-
padding: 10px 17px;
|
|
57
|
-
margin-bottom: 10px;
|
|
58
|
-
border: 1px solid rgba(102, 110, 126, 0.1);
|
|
59
|
-
border-radius: 4px;
|
|
60
|
-
background: #FFFFFF;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
position: relative;
|
|
63
|
-
|
|
64
|
-
&-dropdown {
|
|
65
|
-
position: absolute;
|
|
66
|
-
top: 5px;
|
|
67
|
-
right: 5px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&-title {
|
|
71
|
-
width: calc(100% - 22px);
|
|
72
|
-
margin-bottom: 2px;
|
|
73
|
-
font-family: Source Han Sans CN;
|
|
74
|
-
font-size: 14px;
|
|
75
|
-
font-weight: 500;
|
|
76
|
-
color: #515A6E;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&-cols {}
|
|
80
|
-
|
|
81
|
-
.unit {
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: row;
|
|
84
|
-
color: #515A6E;
|
|
85
|
-
&-label {
|
|
86
|
-
max-width: 60px;
|
|
87
|
-
}
|
|
88
|
-
&-colon {
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
&-value {
|
|
92
|
-
flex: 1;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.list-btns {
|
|
100
|
-
width: 100%;
|
|
101
|
-
height: 40px;
|
|
102
|
-
padding: 0px 10px;
|
|
103
|
-
text-align: center;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
File without changes
|