bri-components 1.1.5 → 1.2.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/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/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +6 -6
- package/lib/styles/bri-components.css +1 -1
- package/package.json +1 -1
- package/src/abolish/DshFileShow.less +61 -0
- package/src/{components/small → abolish}/DshFileShow.vue +30 -105
- package/src/components/controls/base/BriUpload/{index.vue → BriUpload.vue} +3 -3
- package/src/components/controls/base/BriUpload/{upload-list.vue → uploadList.vue} +17 -13
- package/src/components/controls/base/BriUpload/uploadMixin.js +1 -5
- package/src/components/controls/base/DshCascader/DshCascader.vue +91 -90
- package/src/components/controls/base/DshCheckbox.vue +3 -3
- package/src/components/controls/base/DshCoordinates.vue +2 -2
- package/src/components/controls/base/DshDate.vue +21 -10
- package/src/components/controls/base/DshEditor.vue +33 -48
- package/src/components/controls/base/DshInput.vue +21 -19
- package/src/components/controls/base/DshNumber/DshNumber.vue +23 -22
- package/src/components/controls/base/DshSelect.vue +10 -8
- package/src/components/controls/base/DshSwitch.vue +45 -87
- package/src/components/controls/controlMap.js +1 -1
- package/src/components/controls/controlMixin.js +5 -8
- package/src/components/controls/senior/BriLabels.vue +72 -54
- package/src/components/controls/special/DshUndeveloped.vue +0 -6
- package/src/components/form/DshDefaultSearch.vue +1 -1
- package/src/components/form/DshForm.vue +4 -13
- package/src/components/list/BriTable.vue +1 -1
- package/src/components/list/{ZTree.vue → BriTree.vue} +9 -8
- package/src/components/list/DshBox/DshCard.vue +4 -4
- package/src/components/list/DshBox/DshCrossTable.vue +4 -4
- package/src/components/list/DshBox/DshList.vue +2 -2
- package/src/components/list/DshBox/DshPanel.vue +5 -5
- package/src/components/list/DshBox/DshTable.vue +21 -80
- package/src/components/list/DshCascaderTable.vue +2 -2
- package/src/components/other/{ZCode.vue → BriCode.vue} +2 -9
- package/src/components/other/{ZCollapseTree.vue → BriCollapseTree.vue} +37 -16
- package/src/components/other/{ZIframe.vue → BriIframe.vue} +7 -23
- package/src/components/other/{ZLoading.vue → BriLoading.vue} +25 -11
- package/src/components/other/BriSvg.vue +2 -2
- package/src/components/other/DshAvatar.vue +21 -69
- package/src/components/other/DshColorPanel.vue +0 -43
- package/src/components/small/BriButton.vue +2 -2
- package/src/components/small/{Ctooltip.vue → BriTooltip.vue} +2 -2
- package/src/components/small/DshButtons.vue +28 -2
- package/src/components/small/DshCrumbs.vue +1 -0
- package/src/components/small/DshCrumbsItem.vue +5 -3
- package/src/components/small/DshIcons.vue +1 -15
- package/src/components/small/DshTags.vue +7 -2
- package/src/components/unit/DshFormItem.vue +6 -6
- package/src/components/unit/DshUnit.vue +0 -8
- package/src/index.js +93 -104
- package/src/styles/common/control.less +62 -53
- package/src/styles/components/controls/base/BriUpload/BriUpload.less +159 -0
- package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +81 -0
- package/src/styles/components/controls/base/BriUpload/index.less +3 -0
- package/src/styles/components/controls/base/BriUpload/uploadList.less +164 -0
- package/src/styles/components/controls/base/DshCascader/DshCascader.less +124 -0
- package/src/styles/components/controls/base/DshCascader/index.less +2 -0
- package/src/styles/components/controls/{DshCheckbox.less → base/DshCheckbox.less} +3 -2
- package/src/styles/components/controls/base/DshDate.less +15 -0
- package/src/styles/components/controls/{DshEditor.less → base/DshEditor.less} +25 -47
- package/src/styles/components/controls/{DshInput.less → base/DshInput.less} +9 -1
- package/src/styles/components/controls/base/DshNumber.less +68 -0
- package/src/styles/components/controls/{DshSelect.less → base/DshSelect.less} +11 -0
- package/src/styles/components/controls/base/DshSwitch.less +37 -0
- package/src/styles/components/controls/{BriLabels.less → senior/BriLabels.less} +29 -12
- package/src/styles/components/controls/{DshDate.less → special/DshBack.less} +1 -1
- package/src/styles/components/controls/special/DshUndeveloped.less +3 -0
- package/src/styles/components/form/DshAdvSearchForm.less +0 -1
- package/src/styles/components/form/DshDefaultSearch.less +41 -9
- package/src/styles/components/form/DshForm.less +13 -0
- package/src/styles/components/index.less +51 -43
- package/src/styles/components/list/BriTable.less +9 -9
- package/src/styles/components/list/{ZTree.less → BriTree.less} +11 -7
- package/src/styles/components/list/DshBox/DshTable.less +11 -0
- package/src/styles/components/other/BriCode.less +5 -0
- package/src/styles/components/other/{ZCollapseTree.less → BriCollapseTree.less} +2 -2
- package/src/styles/components/other/BriIframe.less +16 -0
- package/src/styles/components/other/{ZLoading.less → BriLoading.less} +3 -3
- package/src/styles/components/other/DshAvatar.less +64 -0
- package/src/styles/components/other/DshBtnModal.less +3 -0
- package/src/styles/components/other/DshColorPanel.less +40 -0
- package/src/styles/components/other/DshEditPanel.less +2 -2
- package/src/styles/components/small/BriButton.less +35 -2
- package/src/styles/components/small/{Ctooltip.less → BriTooltip.less} +2 -1
- package/src/styles/components/small/DshCrumbs.less +0 -0
- package/src/styles/components/small/DshDropdown.less +5 -3
- package/src/styles/components/small/DshIcons.less +7 -0
- package/src/styles/components/small/DshTags.less +17 -0
- package/src/styles/components/unit/DshFormItem.less +5 -6
- package/src/styles/components/unit/DshUnit.less +5 -0
- package/src/utils/table.js +8 -0
- package/src/components/controls/controlShow.vue +0 -44
- package/src/components/other/YNoPermission.vue +0 -45
- package/src/components/small/BriTree.vue +0 -42
- package/src/styles/components/controls/BriUpload.less +0 -436
- package/src/styles/components/controls/DshCascader.less +0 -95
- package/src/styles/components/controls/DshNumber.less +0 -51
- package/src/styles/components/controls/controlShow.less +0 -12
- package/src/styles/components/other/ZCode.less +0 -1
- /package/src/{styles/components/other → abolish}/BriTransfer.less +0 -0
- /package/src/{components/other → abolish}/BriTransfer.vue +0 -0
- /package/src/{styles/components/small → abolish}/BriTree.less +0 -0
- /package/src/components/{small → list}/DshPage.vue +0 -0
- /package/src/components/other/{ZGantt.vue → BriGantt.vue} +0 -0
- /package/src/components/other/{menu/DshMenu.vue → DshMenu.vue} +0 -0
- /package/src/components/other/{menu/DshMenuNav.vue → DshMenuNav.vue} +0 -0
- /package/src/styles/components/controls/{BriInputs.less → base/BriInputs.less} +0 -0
- /package/src/styles/components/controls/{InfoCascader.less → base/DshCascader/InfoCascader.less} +0 -0
- /package/src/styles/components/controls/{DshCoordinates.less → base/DshCoordinates.less} +0 -0
- /package/src/styles/components/controls/{DshDaterange.less → base/DshDaterange.less} +0 -0
- /package/src/styles/components/controls/{DshDivider.less → base/DshDivider.less} +0 -0
- /package/src/styles/components/controls/{DshNumberange.less → base/DshNumberange.less} +0 -0
- /package/src/styles/components/controls/{DshPackage.less → senior/DshPackage.less} +0 -0
- /package/src/styles/components/controls/{cascaderTable.less → senior/cascaderTable.less} +0 -0
- /package/src/styles/components/controls/{flatTable.less → senior/flatTable.less} +0 -0
- /package/src/styles/components/{small → list}/DshPage.less +0 -0
- /package/src/styles/components/other/{ZGantt.less → BriGantt.less} +0 -0
- /package/src/{components/controls/base/BriUpload/upload-listItem.vue → styles/components/small/DshCrumbItem.less} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="DshFileShow">
|
|
3
3
|
<!-- image类型 -->
|
|
4
4
|
<img
|
|
5
5
|
v-for="item in list"
|
|
6
6
|
:key="item._id"
|
|
7
|
-
class="
|
|
7
|
+
class="DshFileShow-img"
|
|
8
8
|
:style="{
|
|
9
9
|
cursor: isClick ? 'pointer' : 'auto'
|
|
10
10
|
}"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<!-- 预览 -->
|
|
20
20
|
<div
|
|
21
21
|
:class="{
|
|
22
|
-
'
|
|
23
|
-
'
|
|
22
|
+
'DshFileShow-wrap': true,
|
|
23
|
+
'DshFileShow-wrap-show': showModal
|
|
24
24
|
}"
|
|
25
25
|
@click.stop="closeModal()"
|
|
26
26
|
>
|
|
27
27
|
<div
|
|
28
|
-
class="
|
|
28
|
+
class="DshFileShow-wrap-preview"
|
|
29
29
|
:style="{
|
|
30
30
|
backgroundImage: `url(${curFile.url})`
|
|
31
31
|
}"
|
|
@@ -35,8 +35,6 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
|
-
import axios from "axios";
|
|
39
|
-
|
|
40
38
|
export default {
|
|
41
39
|
name: "DshFileShow",
|
|
42
40
|
props: {
|
|
@@ -68,6 +66,10 @@
|
|
|
68
66
|
},
|
|
69
67
|
created () {},
|
|
70
68
|
methods: {
|
|
69
|
+
closeModal () {
|
|
70
|
+
this.showModal = false;
|
|
71
|
+
},
|
|
72
|
+
|
|
71
73
|
// 获取不同类型文件的图片
|
|
72
74
|
getFileImage (item) {
|
|
73
75
|
const imageMap = this.$imageSrcMap.fileType;
|
|
@@ -108,105 +110,28 @@
|
|
|
108
110
|
// this.downloadFile(item);
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
|
-
},
|
|
112
|
-
downloadFile (file) {
|
|
113
|
-
axios
|
|
114
|
-
.get(file.url, {
|
|
115
|
-
responseType: "blob"
|
|
116
|
-
})
|
|
117
|
-
.then((res) => {
|
|
118
|
-
if (window.navigator.msSaveOrOpenBlob) {
|
|
119
|
-
// 兼容IE10
|
|
120
|
-
navigator.msSaveBlob(res, file.name);
|
|
121
|
-
} else {
|
|
122
|
-
const href = URL.createObjectURL(res.data); // 创建新的URL表示指定的blob对象
|
|
123
|
-
const a = document.createElement("a");
|
|
124
|
-
a.style.display = "none";
|
|
125
|
-
a.href = href; // 指定下载链接
|
|
126
|
-
a.download = file.name; // 指定下载文件名
|
|
127
|
-
a.click();
|
|
128
|
-
URL.revokeObjectURL(a.href); // 释放URL对象
|
|
129
|
-
a.remove();
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
closeModal () {
|
|
134
|
-
this.showModal = false;
|
|
135
113
|
}
|
|
114
|
+
// downloadFile (file) {
|
|
115
|
+
// axios
|
|
116
|
+
// .get(file.url, {
|
|
117
|
+
// responseType: "blob"
|
|
118
|
+
// })
|
|
119
|
+
// .then((res) => {
|
|
120
|
+
// if (window.navigator.msSaveOrOpenBlob) {
|
|
121
|
+
// // 兼容IE10
|
|
122
|
+
// navigator.msSaveBlob(res, file.name);
|
|
123
|
+
// } else {
|
|
124
|
+
// const href = URL.createObjectURL(res.data); // 创建新的URL表示指定的blob对象
|
|
125
|
+
// const a = document.createElement("a");
|
|
126
|
+
// a.style.display = "none";
|
|
127
|
+
// a.href = href; // 指定下载链接
|
|
128
|
+
// a.download = file.name; // 指定下载文件名
|
|
129
|
+
// a.click();
|
|
130
|
+
// URL.revokeObjectURL(a.href); // 释放URL对象
|
|
131
|
+
// a.remove();
|
|
132
|
+
// }
|
|
133
|
+
// });
|
|
134
|
+
// }
|
|
136
135
|
}
|
|
137
136
|
};
|
|
138
137
|
</script>
|
|
139
|
-
|
|
140
|
-
<style lang="less" scoped>
|
|
141
|
-
.dsh-file-show {
|
|
142
|
-
display: block;
|
|
143
|
-
overflow: hidden;
|
|
144
|
-
word-break: keep-all;
|
|
145
|
-
white-space: nowrap;
|
|
146
|
-
text-overflow: ellipsis;
|
|
147
|
-
display: flex;
|
|
148
|
-
|
|
149
|
-
&-img {
|
|
150
|
-
margin-right: 3px;
|
|
151
|
-
&:hover{
|
|
152
|
-
cursor: pointer;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// 遮罩层
|
|
157
|
-
&-wrap {
|
|
158
|
-
width: 100%;
|
|
159
|
-
height: 100%;
|
|
160
|
-
position: fixed;
|
|
161
|
-
top: 0px;
|
|
162
|
-
left: 0px;
|
|
163
|
-
bottom: 0px;
|
|
164
|
-
right: 0px;
|
|
165
|
-
z-index: 9999;
|
|
166
|
-
text-align: center;
|
|
167
|
-
overflow: auto;
|
|
168
|
-
display: none;
|
|
169
|
-
background: rgba(0,0,0,0);
|
|
170
|
-
|
|
171
|
-
&-show {
|
|
172
|
-
display: block;
|
|
173
|
-
background: rgba(0,0,0,.6);
|
|
174
|
-
animation: animate-show .3s linear;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&-preview {
|
|
178
|
-
position: absolute;
|
|
179
|
-
width: 90%;
|
|
180
|
-
height: 90%;
|
|
181
|
-
top: 5%;
|
|
182
|
-
left: 5%;
|
|
183
|
-
left: 5%;
|
|
184
|
-
right: 5%;
|
|
185
|
-
background-size: contain;
|
|
186
|
-
background-repeat: no-repeat;
|
|
187
|
-
background-position: center;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// &-roll {
|
|
191
|
-
// height: 100%;
|
|
192
|
-
// position: absolute;
|
|
193
|
-
// top: 0;
|
|
194
|
-
// bottom: 0;
|
|
195
|
-
// left: 0;
|
|
196
|
-
// right: 0;
|
|
197
|
-
// margin: auto;
|
|
198
|
-
// }
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
@keyframes animate-show {
|
|
202
|
-
from {
|
|
203
|
-
display: none;
|
|
204
|
-
background: rgba(0,0,0,0);
|
|
205
|
-
}
|
|
206
|
-
to {
|
|
207
|
-
display: block;
|
|
208
|
-
background: rgba(0,0,0,.6);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
</style>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
`BriUpload-${showType}`,
|
|
15
15
|
{
|
|
16
16
|
'BriUpload-readonly': !canEdit,
|
|
17
|
-
'BriUpload-disabled': !
|
|
17
|
+
'BriUpload-disabled': canEdit && !propsObj.canEdit
|
|
18
18
|
}
|
|
19
19
|
]"
|
|
20
20
|
>
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
import controlMixin from "../../controlMixin.js";
|
|
85
85
|
import uploadMixin from "./uploadMixin.js";
|
|
86
86
|
import BriUploadImage from "./BriUploadImage.vue";
|
|
87
|
-
import uploadList from "./
|
|
87
|
+
import uploadList from "./uploadList.vue";
|
|
88
88
|
|
|
89
89
|
const prefixCls = "ivu-upload";
|
|
90
90
|
export default {
|
|
91
|
-
name: "
|
|
91
|
+
name: "BriUpload",
|
|
92
92
|
mixins: [
|
|
93
93
|
controlMixin,
|
|
94
94
|
uploadMixin
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
14
|
v-for="fileItem in files"
|
|
15
|
-
:key="fileItem.
|
|
16
|
-
class="
|
|
15
|
+
:key="fileItem._key || fileItem._id"
|
|
16
|
+
class="item"
|
|
17
17
|
>
|
|
18
18
|
<!-- 展示图 -->
|
|
19
|
-
<div class="
|
|
19
|
+
<div class="item-show">
|
|
20
20
|
<img
|
|
21
21
|
v-if="propsObj._fileType === 'image' || (fileItem.mimetype.indexOf('image') > -1)"
|
|
22
22
|
:data-original="fileItem.url"
|
|
@@ -31,26 +31,27 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<!-- 展示名称 -->
|
|
34
|
-
<
|
|
34
|
+
<bri-tooltip
|
|
35
35
|
v-if="propsObj._fileType != 'image'"
|
|
36
|
-
class="
|
|
36
|
+
class="item-name"
|
|
37
37
|
:content="fileItem.name"
|
|
38
38
|
:transfer="true"
|
|
39
39
|
placement="top-start"
|
|
40
40
|
max-width="300"
|
|
41
41
|
>
|
|
42
|
-
<p class="
|
|
43
|
-
</
|
|
42
|
+
<p class="item-name-title">{{ fileItem.name }}</p>
|
|
43
|
+
</bri-tooltip>
|
|
44
44
|
|
|
45
45
|
<!-- 图标 -->
|
|
46
46
|
<dsh-icons
|
|
47
|
-
class="
|
|
48
|
-
item-class="
|
|
47
|
+
class="item-action"
|
|
48
|
+
item-class="item-action-icon"
|
|
49
49
|
:list="$getOperationList(getBtns((fileItem.mimetype.indexOf('image') > -1) || (fileItem.mimetype.indexOf('application/pdf') > -1)))"
|
|
50
50
|
@click="$dispatchEvent($event,fileItem)"
|
|
51
51
|
></dsh-icons>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
|
+
|
|
54
55
|
<div
|
|
55
56
|
v-else
|
|
56
57
|
class="uploadList-nodata"
|
|
@@ -59,17 +60,18 @@
|
|
|
59
60
|
<span>{{ noText }}</span>
|
|
60
61
|
</div>
|
|
61
62
|
</template>
|
|
63
|
+
|
|
62
64
|
<!-- 自定义新的展示方式 -->
|
|
63
65
|
<template v-else>
|
|
64
66
|
<div
|
|
65
67
|
v-if="files && files.length > 0"
|
|
66
|
-
class="uploadList-inline-list bri-scrollbar6"
|
|
67
68
|
ref="viewerImage"
|
|
69
|
+
class="uploadList-inline-list"
|
|
68
70
|
>
|
|
69
71
|
<div
|
|
70
|
-
class="uploadList-inline-listItem"
|
|
71
72
|
v-for="fileItem in files"
|
|
72
73
|
:key="fileItem.url"
|
|
74
|
+
class="item"
|
|
73
75
|
>
|
|
74
76
|
<img
|
|
75
77
|
v-if="propsObj._fileType === 'image' || (fileItem.mimetype.indexOf('image') > -1)"
|
|
@@ -82,14 +84,16 @@
|
|
|
82
84
|
:src="getFileImage(fileItem)"
|
|
83
85
|
:alt="fileItem.name"
|
|
84
86
|
>
|
|
87
|
+
|
|
85
88
|
<dsh-icons
|
|
86
|
-
class="
|
|
87
|
-
item-class="
|
|
89
|
+
class="item-action"
|
|
90
|
+
item-class="item-action-icon"
|
|
88
91
|
:list="$getOperationList(getBtns((fileItem.mimetype.indexOf('image') > -1) || (fileItem.mimetype.indexOf('application/pdf') > -1) || (fileItem.mimetype=='text/plain')))"
|
|
89
92
|
@click="$dispatchEvent($event,fileItem)"
|
|
90
93
|
></dsh-icons>
|
|
91
94
|
</div>
|
|
92
95
|
</div>
|
|
96
|
+
|
|
93
97
|
<span
|
|
94
98
|
v-else
|
|
95
99
|
class="uploadList-inline-nodata"
|
|
@@ -97,11 +97,7 @@ export default {
|
|
|
97
97
|
}
|
|
98
98
|
})
|
|
99
99
|
.then(response => {
|
|
100
|
-
|
|
101
|
-
data: response,
|
|
102
|
-
res: {}
|
|
103
|
-
};
|
|
104
|
-
this.handleSuccess && this.handleSuccess(newResponse, newResponse.data, file);
|
|
100
|
+
this.handleSuccess && this.handleSuccess(response, response.data, file);
|
|
105
101
|
callback && callback(response.data);
|
|
106
102
|
}).catch(error => {
|
|
107
103
|
this.handleError && this.handleError(error, {}, file);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- 编辑 -->
|
|
4
4
|
<template v-if="canEdit">
|
|
5
5
|
<!-- 多选 多选的filterable必须是false,不然出bug -->
|
|
6
|
-
<template v-if="useMultiple
|
|
6
|
+
<template v-if="useMultiple">
|
|
7
7
|
<Cascader
|
|
8
8
|
class="DshCascader-multiple"
|
|
9
9
|
:value="multipleSelectVal"
|
|
@@ -23,32 +23,29 @@
|
|
|
23
23
|
:class="{
|
|
24
24
|
...commonClass,
|
|
25
25
|
'DshCascader-multiple-input': true,
|
|
26
|
-
'DshCascader-
|
|
26
|
+
'DshCascader-multiple-input-row': isMultipleRow,
|
|
27
27
|
}"
|
|
28
28
|
@click="clickInput"
|
|
29
29
|
>
|
|
30
30
|
<!-- 有值 -->
|
|
31
|
-
<
|
|
31
|
+
<dsh-tags
|
|
32
32
|
v-if="!$isEmptyData(curVal)"
|
|
33
33
|
class="hasdata"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@delete="deleteItem"
|
|
42
|
-
></dsh-tags>
|
|
43
|
-
</div>
|
|
34
|
+
:list="curValNameList"
|
|
35
|
+
:propsObj="{
|
|
36
|
+
disabled: !finalCanEdit,
|
|
37
|
+
size: 'medium'
|
|
38
|
+
}"
|
|
39
|
+
@delete="deleteItem"
|
|
40
|
+
></dsh-tags>
|
|
44
41
|
|
|
45
42
|
<!-- 无值 -->
|
|
46
|
-
<
|
|
43
|
+
<div
|
|
47
44
|
v-else
|
|
48
45
|
class="nodata"
|
|
49
46
|
>
|
|
50
47
|
{{ emptyShowVal }}
|
|
51
|
-
</
|
|
48
|
+
</div>
|
|
52
49
|
</div>
|
|
53
50
|
</Cascader>
|
|
54
51
|
</template>
|
|
@@ -62,39 +59,27 @@
|
|
|
62
59
|
...commonClass,
|
|
63
60
|
'DshCascader-custom-input': true
|
|
64
61
|
}"
|
|
62
|
+
@mouseenter="isHover = true"
|
|
63
|
+
@mouseleave="isHover = false"
|
|
65
64
|
@click="openModal"
|
|
66
65
|
>
|
|
67
|
-
<!--
|
|
68
|
-
<div
|
|
69
|
-
|
|
70
|
-
class="hasdata"
|
|
71
|
-
@mouseenter="isHover = true"
|
|
72
|
-
@mouseleave="isHover = false"
|
|
73
|
-
>
|
|
74
|
-
<span class="hasdata-text">
|
|
75
|
-
{{ curValNameStr }}
|
|
76
|
-
</span>
|
|
77
|
-
|
|
78
|
-
<Icon
|
|
79
|
-
v-if="selfPropsObj._clearable && isHover"
|
|
80
|
-
class="hasdata-clear"
|
|
81
|
-
type="md-close"
|
|
82
|
-
@click.stop="clickClear"
|
|
83
|
-
/>
|
|
84
|
-
<Icon
|
|
85
|
-
v-else
|
|
86
|
-
class="hasdata-clear"
|
|
87
|
-
type="ios-arrow-down"
|
|
88
|
-
/>
|
|
66
|
+
<!-- 内容 -->
|
|
67
|
+
<div class="text">
|
|
68
|
+
{{ showText }}
|
|
89
69
|
</div>
|
|
90
70
|
|
|
91
|
-
<!--
|
|
92
|
-
<
|
|
71
|
+
<!-- 右侧图标 -->
|
|
72
|
+
<Icon
|
|
73
|
+
v-if="selfPropsObj._clearable && isHover"
|
|
74
|
+
class="clear"
|
|
75
|
+
type="md-close"
|
|
76
|
+
@click.stop="clickClear"
|
|
77
|
+
/>
|
|
78
|
+
<Icon
|
|
93
79
|
v-else
|
|
94
|
-
class="
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</span>
|
|
80
|
+
class="clear"
|
|
81
|
+
type="ios-arrow-down"
|
|
82
|
+
/>
|
|
98
83
|
</div>
|
|
99
84
|
|
|
100
85
|
<!-- 内容弹框 -->
|
|
@@ -134,48 +119,60 @@
|
|
|
134
119
|
|
|
135
120
|
<!-- 查看 -->
|
|
136
121
|
<template v-else>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
v-if="!$isEmptyData(curVal)"
|
|
145
|
-
class="hasdata"
|
|
122
|
+
<!-- 多选 -->
|
|
123
|
+
<template v-if="useMultiple">
|
|
124
|
+
<bri-tooltip
|
|
125
|
+
:content="showMultipleText"
|
|
126
|
+
placement="top"
|
|
127
|
+
maxWidth="200"
|
|
128
|
+
:transfer="true"
|
|
146
129
|
>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
130
|
+
<div :class="{
|
|
131
|
+
...commonClass,
|
|
132
|
+
'DshCascader-show-multiple': true,
|
|
133
|
+
'DshCascader-show-multiple-row': isMultipleRow,
|
|
134
|
+
}">
|
|
135
|
+
<!-- 有值 -->
|
|
136
|
+
<dsh-tags
|
|
137
|
+
v-if="!$isEmptyData(curVal)"
|
|
138
|
+
:class="{
|
|
139
|
+
hasdata: true,
|
|
140
|
+
'hasdata-unit': isUnitShow
|
|
141
|
+
}"
|
|
142
|
+
:list="curValNameList"
|
|
143
|
+
:propsObj="{
|
|
144
|
+
disabled: true,
|
|
145
|
+
size: 'medium'
|
|
146
|
+
}"
|
|
147
|
+
></dsh-tags>
|
|
156
148
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
:transfer="true"
|
|
164
|
-
>
|
|
165
|
-
<div class="hasdata-single">
|
|
166
|
-
{{ curValNameStr }}
|
|
149
|
+
<!-- 无值 -->
|
|
150
|
+
<div
|
|
151
|
+
v-else
|
|
152
|
+
class="nodata"
|
|
153
|
+
>
|
|
154
|
+
{{ emptyShowVal }}
|
|
167
155
|
</div>
|
|
168
|
-
</
|
|
169
|
-
</
|
|
156
|
+
</div>
|
|
157
|
+
</bri-tooltip>
|
|
158
|
+
</template>
|
|
170
159
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
160
|
+
<!-- 单选 -->
|
|
161
|
+
<template v-else>
|
|
162
|
+
<bri-tooltip
|
|
163
|
+
:content="showText"
|
|
164
|
+
placement="top"
|
|
165
|
+
maxWidth="200"
|
|
166
|
+
:transfer="true"
|
|
175
167
|
>
|
|
176
|
-
{
|
|
177
|
-
|
|
178
|
-
|
|
168
|
+
<div :class="{
|
|
169
|
+
...commonClass,
|
|
170
|
+
'DshCascader-show-single': true
|
|
171
|
+
}">
|
|
172
|
+
{{ showText }}
|
|
173
|
+
</div>
|
|
174
|
+
</bri-tooltip>
|
|
175
|
+
</template>
|
|
179
176
|
</template>
|
|
180
177
|
</div>
|
|
181
178
|
</template>
|
|
@@ -233,10 +230,6 @@
|
|
|
233
230
|
};
|
|
234
231
|
},
|
|
235
232
|
computed: {
|
|
236
|
-
// 是否多选模式
|
|
237
|
-
useMultiple () {
|
|
238
|
-
return ["regions", "cascaders"].includes(this.propsObj._type);
|
|
239
|
-
},
|
|
240
233
|
selfPropsObj () {
|
|
241
234
|
return {
|
|
242
235
|
_filterable: true,
|
|
@@ -268,16 +261,24 @@
|
|
|
268
261
|
: this.cascaderData;
|
|
269
262
|
},
|
|
270
263
|
|
|
264
|
+
// 是否多选类型
|
|
265
|
+
useMultiple () {
|
|
266
|
+
return ["regions", "cascaders"].includes(this.propsObj._type);
|
|
267
|
+
},
|
|
268
|
+
isMultipleRow () {
|
|
269
|
+
return this.useMultiple && (this.selfPropsObj._span === 24 || !this.selfPropsObj._span);
|
|
270
|
+
},
|
|
271
271
|
showMode () {
|
|
272
272
|
return this.selfPropsObj._showMode;
|
|
273
273
|
},
|
|
274
|
-
isSelfRow () {
|
|
275
|
-
return this.selfPropsObj._span === 24 || !this.selfPropsObj._span;
|
|
276
|
-
},
|
|
277
274
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
275
|
+
showText () {
|
|
276
|
+
return this.$isEmptyData(this.curVal)
|
|
277
|
+
? this.emptyShowVal
|
|
278
|
+
: this.$getTreeLinealDatas(this.curValList, this.cascaderData, "name").join("/");
|
|
279
|
+
},
|
|
280
|
+
showMultipleText () {
|
|
281
|
+
return this.curValNameList.join("、");
|
|
281
282
|
},
|
|
282
283
|
// 多选用的展示文字
|
|
283
284
|
curValNameList () {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
</Select>
|
|
78
78
|
</template>
|
|
79
79
|
|
|
80
|
-
<
|
|
80
|
+
<bri-tooltip
|
|
81
81
|
v-else
|
|
82
82
|
placement="top"
|
|
83
83
|
:transfer="true"
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
>
|
|
109
109
|
{{ emptyShowVal }}
|
|
110
110
|
</div>
|
|
111
|
-
</
|
|
111
|
+
</bri-tooltip>
|
|
112
112
|
|
|
113
113
|
<!-- tip项弹框提示 -->
|
|
114
114
|
<dsh-render :render="tipModalRender"></dsh-render>
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
val.push(item.value);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
this
|
|
194
|
+
this.$emit("change", val);
|
|
195
195
|
},
|
|
196
196
|
|
|
197
197
|
isDisabled (item) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshCoordinates">
|
|
3
|
-
<
|
|
3
|
+
<bri-tooltip
|
|
4
4
|
:content="curValName"
|
|
5
5
|
placement="top"
|
|
6
6
|
maxWidth="200"
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
{{ curValName || emptyShowVal }}
|
|
156
156
|
</span>
|
|
157
157
|
</template>
|
|
158
|
-
</
|
|
158
|
+
</bri-tooltip>
|
|
159
159
|
</div>
|
|
160
160
|
</template>
|
|
161
161
|
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
>
|
|
6
6
|
<!-- 编辑 -->
|
|
7
7
|
<template v-if="canEdit">
|
|
8
|
+
<!-- 时间子类型 -->
|
|
8
9
|
<template v-if="['time'].includes(subType)">
|
|
9
10
|
<TimePicker
|
|
10
|
-
|
|
11
|
-
v-model="
|
|
11
|
+
class="DshDate-edit"
|
|
12
|
+
v-model="curValDate"
|
|
12
13
|
:type="subType"
|
|
13
14
|
:placeholder="selfPropsObj._placeholder"
|
|
14
15
|
:disabled="!finalCanEdit"
|
|
@@ -18,10 +19,11 @@
|
|
|
18
19
|
></TimePicker>
|
|
19
20
|
</template>
|
|
20
21
|
|
|
22
|
+
<!-- 日期、日期时间、年、月 -->
|
|
21
23
|
<template v-else>
|
|
22
24
|
<DatePicker
|
|
23
|
-
|
|
24
|
-
v-model="
|
|
25
|
+
class="DshDate-edit"
|
|
26
|
+
v-model="curValDate"
|
|
25
27
|
:type="subType"
|
|
26
28
|
:placeholder="selfPropsObj._placeholder"
|
|
27
29
|
:disabled="!finalCanEdit"
|
|
@@ -35,11 +37,19 @@
|
|
|
35
37
|
|
|
36
38
|
<!-- 查看 -->
|
|
37
39
|
<template v-else>
|
|
38
|
-
<
|
|
39
|
-
:
|
|
40
|
-
|
|
41
|
-
:
|
|
42
|
-
|
|
40
|
+
<bri-tooltip
|
|
41
|
+
:content="showText"
|
|
42
|
+
maxWidth="200"
|
|
43
|
+
:transfer="true"
|
|
44
|
+
>
|
|
45
|
+
<div :class="{
|
|
46
|
+
...commonClass,
|
|
47
|
+
'DshDate-unit': isUnitShow,
|
|
48
|
+
'DshDate-show': !isUnitShow
|
|
49
|
+
}">
|
|
50
|
+
{{ showText }}
|
|
51
|
+
</div>
|
|
52
|
+
</bri-tooltip>
|
|
43
53
|
</template>
|
|
44
54
|
</div>
|
|
45
55
|
</template>
|
|
@@ -62,12 +72,13 @@
|
|
|
62
72
|
selfPropsObj () {
|
|
63
73
|
return {
|
|
64
74
|
_transfer: true,
|
|
75
|
+
|
|
65
76
|
...this.propsObj,
|
|
66
77
|
...this.commonDealPropsObj
|
|
67
78
|
};
|
|
68
79
|
},
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
curValDate: {
|
|
71
82
|
get () {
|
|
72
83
|
const val = this.value[this.controlKey];
|
|
73
84
|
return this.$transformDateCompatible(val, this.subType);
|