bri-components 1.2.16 → 1.2.18
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +10 -10
- package/package.json +1 -1
- package/src/components/controls/base/DshCascader/InfoCascader.vue +23 -17
- package/src/components/controls/base/DshInput.vue +8 -2
- package/src/components/controls/base/DshSelect.vue +3 -3
- package/src/components/controls/senior/cascaderTable.vue +0 -1
- package/src/components/controls/senior/flatTable.vue +0 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +30 -5
- package/src/components/list/BriTable.vue +12 -5
- package/src/components/list/BriTree.vue +1 -2
- package/src/components/other/BriIframe.vue +14 -19
- package/src/components/other/BriLoading.vue +11 -9
- package/src/components/small/DshBtnModal.vue +12 -14
- package/src/components/small/DshDropdown.vue +1 -1
- package/src/styles/components/controls/senior/selectUsers/selectUsers.less +16 -0
- package/src/styles/components/form/DshForm.less +1 -0
- package/src/styles/components/list/BriTable.less +6 -0
- package/src/styles/components/other/BriIframe.less +1 -0
package/package.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<div class="InfoCascader">
|
|
3
3
|
<dsh-modal
|
|
4
4
|
v-model="modalVal"
|
|
5
|
-
:propsObj="modalPropsObj"
|
|
6
5
|
mode="middle"
|
|
6
|
+
:propsObj="modalPropsObj"
|
|
7
7
|
>
|
|
8
8
|
<dsh-input
|
|
9
9
|
class="InfoCascader-search"
|
|
10
10
|
:value="searchData"
|
|
11
|
-
:propsObj="
|
|
11
|
+
:propsObj="searchPropsObj"
|
|
12
12
|
></dsh-input>
|
|
13
13
|
|
|
14
14
|
<div class="InfoCascader-content">
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
:data="treeData"
|
|
20
20
|
></Tree>
|
|
21
21
|
</div>
|
|
22
|
+
|
|
22
23
|
<div class="InfoCascader-content-right">
|
|
23
24
|
<div class="InfoCascader-content-right-title">
|
|
24
25
|
{{curName}}说明
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
<div class="InfoCascader-footer">
|
|
35
36
|
<dsh-buttons
|
|
36
37
|
class="InfoCascader-footer-btns"
|
|
37
|
-
:list="$getOperationList(['
|
|
38
|
+
:list="$getOperationList(['canCancel', 'canConfirm'])"
|
|
38
39
|
@click="$dispatchEvent($event)"
|
|
39
40
|
></dsh-buttons>
|
|
40
41
|
</div>
|
|
@@ -46,7 +47,10 @@
|
|
|
46
47
|
export default {
|
|
47
48
|
name: "InfoCascader",
|
|
48
49
|
props: {
|
|
49
|
-
showModal:
|
|
50
|
+
showModal: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
50
54
|
|
|
51
55
|
value: {
|
|
52
56
|
type: Array,
|
|
@@ -69,32 +73,34 @@
|
|
|
69
73
|
},
|
|
70
74
|
data () {
|
|
71
75
|
return {
|
|
76
|
+
searchData: {
|
|
77
|
+
search: ""
|
|
78
|
+
},
|
|
79
|
+
searchPropsObj: {
|
|
80
|
+
_key: "search",
|
|
81
|
+
_name: "关键字搜索"
|
|
82
|
+
},
|
|
83
|
+
curSelect: {},
|
|
84
|
+
|
|
85
|
+
show: true,
|
|
86
|
+
curName: "",
|
|
72
87
|
description: "",
|
|
88
|
+
|
|
73
89
|
operationMap: {
|
|
74
|
-
|
|
90
|
+
canCancel: {
|
|
75
91
|
name: "取消",
|
|
76
92
|
type: "clickCancel",
|
|
77
93
|
event: "clickCancel",
|
|
78
94
|
class: "z-default"
|
|
79
95
|
},
|
|
80
|
-
|
|
96
|
+
canConfirm: {
|
|
81
97
|
name: "确定",
|
|
82
98
|
btnType: "primary",
|
|
83
99
|
type: "clickConfirm",
|
|
84
100
|
event: "clickConfirm",
|
|
85
101
|
class: "z-primary"
|
|
86
102
|
}
|
|
87
|
-
}
|
|
88
|
-
curSelect: {},
|
|
89
|
-
curName: "",
|
|
90
|
-
searchData: {
|
|
91
|
-
search: ""
|
|
92
|
-
},
|
|
93
|
-
inputPropsObj: {
|
|
94
|
-
_key: "search",
|
|
95
|
-
_name: "关键字搜索"
|
|
96
|
-
},
|
|
97
|
-
show: true
|
|
103
|
+
}
|
|
98
104
|
};
|
|
99
105
|
},
|
|
100
106
|
computed: {
|
|
@@ -124,7 +124,8 @@
|
|
|
124
124
|
created () {},
|
|
125
125
|
methods: {
|
|
126
126
|
onSearch (...params) {
|
|
127
|
-
this.$emit("search"
|
|
127
|
+
this.$emit("search");
|
|
128
|
+
this.$emit("inputChange");
|
|
128
129
|
},
|
|
129
130
|
// 无参数
|
|
130
131
|
onFocus () {
|
|
@@ -138,12 +139,17 @@
|
|
|
138
139
|
}
|
|
139
140
|
},
|
|
140
141
|
onEnter (event) {
|
|
142
|
+
this.$emit("enter");
|
|
141
143
|
this.$emit("inputChange");
|
|
142
144
|
},
|
|
143
145
|
// 参数event
|
|
144
146
|
onChange (event) {
|
|
145
|
-
this.$emit("inputChange");
|
|
146
147
|
this.changeStatus = true;
|
|
148
|
+
|
|
149
|
+
clearTimeout(this.timer);
|
|
150
|
+
this.timer = setTimeout(() => {
|
|
151
|
+
this.$emit("inputChange");
|
|
152
|
+
}, 1000);
|
|
147
153
|
},
|
|
148
154
|
onClear () {
|
|
149
155
|
this.change();
|
|
@@ -226,10 +226,10 @@
|
|
|
226
226
|
callback: data => {
|
|
227
227
|
this.initListData = [
|
|
228
228
|
...this.initListData,
|
|
229
|
-
...data.list.map(
|
|
229
|
+
...data.list.map(dataItem =>
|
|
230
230
|
({
|
|
231
|
-
_key:
|
|
232
|
-
name:
|
|
231
|
+
_key: dataItem[item._key || "_key"],
|
|
232
|
+
name: dataItem[item._name || "name"]
|
|
233
233
|
})
|
|
234
234
|
)
|
|
235
235
|
];
|
|
@@ -19,11 +19,36 @@
|
|
|
19
19
|
:value="curValList"
|
|
20
20
|
:inputIcon="inputIcon"
|
|
21
21
|
:propsObj="selfPropsObj"
|
|
22
|
-
@
|
|
23
|
-
@
|
|
22
|
+
@deleteItem="clickDeleteItem"
|
|
23
|
+
@clear="clickClear"
|
|
24
24
|
></bri-control-input>
|
|
25
25
|
|
|
26
|
-
<!--
|
|
26
|
+
<!-- 表格查看 -->
|
|
27
|
+
<div
|
|
28
|
+
v-else-if="isUnitShow"
|
|
29
|
+
class="selectUsers-unit"
|
|
30
|
+
>
|
|
31
|
+
<template v-if="!$isEmptyData(curValList)">
|
|
32
|
+
<img
|
|
33
|
+
v-for="item in curValList"
|
|
34
|
+
:src="item.avatarurl || $imageSrcMap.system.boy"
|
|
35
|
+
:key="item._key"
|
|
36
|
+
class="selectUsers-unit-img"
|
|
37
|
+
/>
|
|
38
|
+
<span
|
|
39
|
+
v-if="curValList[0]"
|
|
40
|
+
class="selectUsers-unit-text"
|
|
41
|
+
>
|
|
42
|
+
{{ curValList[0].name || curValList[0].realname || curValList[0].mobile }}
|
|
43
|
+
</span>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<template v-else>
|
|
47
|
+
{{ emptyShowVal }}
|
|
48
|
+
</template>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- 弹窗查看 -->
|
|
27
52
|
<div
|
|
28
53
|
v-else
|
|
29
54
|
:class="{
|
|
@@ -50,8 +75,8 @@
|
|
|
50
75
|
v-if="finalCanEdit"
|
|
51
76
|
class="selectUsers-modal"
|
|
52
77
|
v-model="showModal"
|
|
53
|
-
:propsObj="modalPropsObj"
|
|
54
78
|
mode="custom"
|
|
79
|
+
:propsObj="modalPropsObj"
|
|
55
80
|
@cancel="clickCancel"
|
|
56
81
|
>
|
|
57
82
|
<div class="selectUsers-modal-wrap">
|
|
@@ -65,7 +90,7 @@
|
|
|
65
90
|
<dsh-input
|
|
66
91
|
:value="searchData"
|
|
67
92
|
:propsObj="inputPropsObj"
|
|
68
|
-
@
|
|
93
|
+
@inputChange="search"
|
|
69
94
|
></dsh-input>
|
|
70
95
|
</div>
|
|
71
96
|
|
|
@@ -37,8 +37,11 @@
|
|
|
37
37
|
<bri-loading
|
|
38
38
|
class="bri-table-empty"
|
|
39
39
|
:value="isLoading ? 1 : data.length? 0 : 2"
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
>
|
|
41
|
+
<template slot="nodata">
|
|
42
|
+
{{ noDataText }}
|
|
43
|
+
</template>
|
|
44
|
+
</bri-loading>
|
|
42
45
|
</div>
|
|
43
46
|
</template>
|
|
44
47
|
|
|
@@ -73,6 +76,7 @@
|
|
|
73
76
|
scrollWidth: "0",
|
|
74
77
|
borderY: true,
|
|
75
78
|
fixedHeader: true,
|
|
79
|
+
canClick: false,
|
|
76
80
|
cellSelectionOption: {
|
|
77
81
|
enable: false
|
|
78
82
|
},
|
|
@@ -88,11 +92,14 @@
|
|
|
88
92
|
return this.propsObj.state || this.state;
|
|
89
93
|
},
|
|
90
94
|
selfClassName () {
|
|
95
|
+
let className = "";
|
|
96
|
+
if (this.selfPropsObj.canClick) {
|
|
97
|
+
className += "bri-table-click ";
|
|
98
|
+
}
|
|
91
99
|
if (this.loading || !this.data.length) {
|
|
92
|
-
|
|
93
|
-
} else {
|
|
94
|
-
return "";
|
|
100
|
+
className += "bri-table-onlyhead ";
|
|
95
101
|
}
|
|
102
|
+
return className;
|
|
96
103
|
},
|
|
97
104
|
|
|
98
105
|
rowStyleOption () {
|
|
@@ -19,12 +19,11 @@
|
|
|
19
19
|
<dsh-modal
|
|
20
20
|
class="BriTree-modal"
|
|
21
21
|
v-model="treeFormShow"
|
|
22
|
-
:propsObj="treeFormPropsObj"
|
|
23
22
|
mode="custom"
|
|
23
|
+
:propsObj="treeFormPropsObj"
|
|
24
24
|
>
|
|
25
25
|
<div class="BriTree-modal-content">
|
|
26
26
|
<dsh-form
|
|
27
|
-
v-if="treeFormShow"
|
|
28
27
|
ref="treeForm"
|
|
29
28
|
:formList="treeFormList"
|
|
30
29
|
:formData="treeFormData"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<div
|
|
14
14
|
v-else
|
|
15
|
-
class="
|
|
15
|
+
class="BriIframe-nodata"
|
|
16
16
|
>
|
|
17
17
|
<img
|
|
18
18
|
:src="noData"
|
|
@@ -59,25 +59,20 @@
|
|
|
59
59
|
methods: {
|
|
60
60
|
init () {
|
|
61
61
|
let iframe = this.$refs.BriIframe;
|
|
62
|
-
if (
|
|
63
|
-
|
|
62
|
+
if (iframe) {
|
|
63
|
+
this.loading = true;
|
|
64
|
+
if (iframe.attachEvent) {
|
|
65
|
+
iframe.attachEvent("onreadystatechange", () => {
|
|
66
|
+
if (iframe.readyState === "complete" || iframe.readyState == "loaded") {
|
|
67
|
+
this.loading = false;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
} else {
|
|
71
|
+
iframe.addEventListener("load", () => {
|
|
72
|
+
this.loading = false;
|
|
73
|
+
}, false);
|
|
74
|
+
}
|
|
64
75
|
}
|
|
65
|
-
this.loading = true;
|
|
66
|
-
if (iframe.attachEvent) {
|
|
67
|
-
iframe.attachEvent("onreadystatechange", () => {
|
|
68
|
-
if (iframe.readyState === "complete" || iframe.readyState == "loaded") {
|
|
69
|
-
this.loadingEnd();
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
} else {
|
|
73
|
-
iframe.addEventListener("load", () => {
|
|
74
|
-
this.loadingEnd();
|
|
75
|
-
}, false);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
loadingEnd () {
|
|
80
|
-
this.loading = false;
|
|
81
76
|
},
|
|
82
77
|
/**
|
|
83
78
|
* 在iframe页面使用举例:
|
|
@@ -8,22 +8,24 @@
|
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<div class="BriLoading-main">
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
<!-- loading -->
|
|
12
|
+
<template v-if="value === 1">
|
|
13
|
+
<slot>
|
|
13
14
|
<div
|
|
14
15
|
class="BriLoading-main-loading"
|
|
15
16
|
:style="getStyle"
|
|
16
|
-
>
|
|
17
|
-
</div>
|
|
17
|
+
></div>
|
|
18
18
|
<div
|
|
19
19
|
v-if="showLoadingText"
|
|
20
20
|
class="BriLoading-main-loadingText"
|
|
21
21
|
>
|
|
22
22
|
{{ loadText }}
|
|
23
23
|
</div>
|
|
24
|
-
</
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
</slot>
|
|
25
|
+
</template>
|
|
26
|
+
<!-- nodata -->
|
|
27
|
+
<template v-else-if="value === 2">
|
|
28
|
+
<slot name="nodata">
|
|
27
29
|
<bri-svg :src="imgSrc" />
|
|
28
30
|
<div
|
|
29
31
|
v-if="noText"
|
|
@@ -31,8 +33,8 @@
|
|
|
31
33
|
>
|
|
32
34
|
{{ noText }}
|
|
33
35
|
</div>
|
|
34
|
-
</
|
|
35
|
-
</
|
|
36
|
+
</slot>
|
|
37
|
+
</template>
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
38
40
|
</template>
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshBtnModal">
|
|
3
3
|
<dsh-buttons
|
|
4
|
-
:list="$getOperationList(['
|
|
4
|
+
:list="$getOperationList(['canSet'])"
|
|
5
5
|
@click="$dispatchEvent($event)"
|
|
6
6
|
></dsh-buttons>
|
|
7
7
|
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</dsh-modal>
|
|
18
|
-
</div>
|
|
8
|
+
<dsh-modal
|
|
9
|
+
v-model="showModal"
|
|
10
|
+
:mode="selfModalPropsObj.mode"
|
|
11
|
+
:propsObj="selfModalPropsObj"
|
|
12
|
+
>
|
|
13
|
+
<div style="margin: 10px 30px;">
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</div>
|
|
16
|
+
</dsh-modal>
|
|
19
17
|
</div>
|
|
20
18
|
</template>
|
|
21
19
|
|
|
@@ -34,9 +32,9 @@
|
|
|
34
32
|
return {
|
|
35
33
|
showModal: false,
|
|
36
34
|
operationMap: {
|
|
37
|
-
|
|
35
|
+
canSet: {
|
|
38
36
|
name: "设置默认内容",
|
|
39
|
-
type: "
|
|
37
|
+
type: "canSet",
|
|
40
38
|
btnType: "dashed",
|
|
41
39
|
size: "default",
|
|
42
40
|
long: true,
|
|
@@ -5,6 +5,22 @@
|
|
|
5
5
|
|
|
6
6
|
&-show {}
|
|
7
7
|
|
|
8
|
+
&-unit {
|
|
9
|
+
.dsh-ellipsis();
|
|
10
|
+
|
|
11
|
+
&-img {
|
|
12
|
+
width: 18px;
|
|
13
|
+
height: 18px;
|
|
14
|
+
vertical-align: middle;
|
|
15
|
+
margin-left: -5px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-text {
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
8
24
|
// 弹框部分
|
|
9
25
|
&-modal {
|
|
10
26
|
&-wrap {
|