bri-components 1.2.5 → 1.2.6
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/bri-components.min.js +68 -6
- package/package.json +2 -1
- package/src/components/controls/base/BriUpload/uploadMixin.js +4 -3
- package/src/components/controls/base/DshCoordinates.vue +1 -1
- package/src/components/controls/base/DshDaterange.vue +6 -0
- package/src/components/controls/base/DshInput.vue +24 -2
- package/src/components/controls/base/DshSelect.vue +27 -28
- package/src/components/controls/senior/selectDepartments.vue +60 -57
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"axios": "^0.23.0",
|
|
34
|
+
"ali-oss": "^6.13.1",
|
|
34
35
|
"bri-datas": "^1.0.8-0",
|
|
35
36
|
"jshint": "^2.12.0",
|
|
36
37
|
"minio": "^7.0.26",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
|
|
2
|
+
import Oss from "ali-oss";
|
|
3
3
|
const minio = require("minio");
|
|
4
4
|
const stream = require("stream");
|
|
5
|
+
|
|
5
6
|
export default {
|
|
6
7
|
props: {
|
|
7
8
|
groupKey: {
|
|
@@ -150,7 +151,7 @@ export default {
|
|
|
150
151
|
callbackBodyType: "application/json",
|
|
151
152
|
callbackBody: this.transferCallBody(callbackBody)
|
|
152
153
|
};
|
|
153
|
-
new
|
|
154
|
+
new Oss(res.ossConfig).multipartUpload(remoteName, file, {
|
|
154
155
|
progress: (percentage) => {
|
|
155
156
|
this.inProgress(Number((percentage * 100).toFixed(0)));
|
|
156
157
|
this.handleProgress && this.handleProgress(percentage, file);
|
|
@@ -291,7 +292,7 @@ export default {
|
|
|
291
292
|
refreshSTSTokenInterval: 3600 * 1000
|
|
292
293
|
};
|
|
293
294
|
|
|
294
|
-
new
|
|
295
|
+
new Oss(newOss).multipartUpload(remoteName, file, {
|
|
295
296
|
progress: (percentage) => {
|
|
296
297
|
this.inProgress(Number((percentage * 100).toFixed(0)));
|
|
297
298
|
this.handleProgress && this.handleProgress(percentage, file);
|
|
@@ -166,6 +166,12 @@
|
|
|
166
166
|
numbers: [1],
|
|
167
167
|
dateTypes: ["date", "datetime", "daterange", "datetimerange"]
|
|
168
168
|
},
|
|
169
|
+
{
|
|
170
|
+
_key: "last_month_start",
|
|
171
|
+
name: "上月初",
|
|
172
|
+
numbers: [0],
|
|
173
|
+
dateTypes: ["month", "date", "datetime", "daterange", "datetimerange"]
|
|
174
|
+
},
|
|
169
175
|
{
|
|
170
176
|
_key: "dyn_month_start",
|
|
171
177
|
name: "月初",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<!-- 查看 -->
|
|
39
39
|
<template v-else>
|
|
40
40
|
<!-- 查看页 的textarea单独处理 -->
|
|
41
|
-
<template v-if="
|
|
41
|
+
<template v-if="subType === 'textarea' && !isUnitShow && !$isEmptyData(curVal)">
|
|
42
42
|
<p
|
|
43
43
|
class="DshInput-show-textarea"
|
|
44
44
|
v-text="showVal"
|
|
@@ -57,7 +57,19 @@
|
|
|
57
57
|
'DshInput-unit': isUnitShow,
|
|
58
58
|
'DshInput-show': !isUnitShow
|
|
59
59
|
}">
|
|
60
|
-
|
|
60
|
+
<!-- 有值 -->
|
|
61
|
+
<a
|
|
62
|
+
v-if="!$isEmptyData(curVal) && textType === 'url'"
|
|
63
|
+
class="text"
|
|
64
|
+
@click="goHttpWindow($event)"
|
|
65
|
+
>
|
|
66
|
+
{{ showVal }}
|
|
67
|
+
</a>
|
|
68
|
+
|
|
69
|
+
<!-- 无值 -->
|
|
70
|
+
<template v-else>
|
|
71
|
+
{{ showVal }}
|
|
72
|
+
</template>
|
|
61
73
|
</div>
|
|
62
74
|
</bri-tooltip>
|
|
63
75
|
</template>
|
|
@@ -82,6 +94,7 @@
|
|
|
82
94
|
computed: {
|
|
83
95
|
selfPropsObj () {
|
|
84
96
|
return {
|
|
97
|
+
_textType: "default",
|
|
85
98
|
_readonly: ["serialNumber"].includes(this.propsObj._type),
|
|
86
99
|
// _disabled: ["serialNumber"].includes(this.propsObj._type),
|
|
87
100
|
_showWordLimit: this.propsObj._showWordLimit || (!!this.propsObj._maxlength || this.propsObj._maxlength === 0),
|
|
@@ -99,6 +112,9 @@
|
|
|
99
112
|
: ["text", "textarea", "password", "url", "email", "number", "tel"].includes(this.selfPropsObj._type)
|
|
100
113
|
? this.selfPropsObj._type
|
|
101
114
|
: "text";
|
|
115
|
+
},
|
|
116
|
+
textType () {
|
|
117
|
+
return this.propsObj._textType;
|
|
102
118
|
}
|
|
103
119
|
},
|
|
104
120
|
created () {},
|
|
@@ -127,6 +143,12 @@
|
|
|
127
143
|
},
|
|
128
144
|
onClear () {
|
|
129
145
|
this.change();
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
// 超链接跳转
|
|
149
|
+
goHttpWindow (e) {
|
|
150
|
+
e.stopPropagation();
|
|
151
|
+
window.open(this.curVal);
|
|
130
152
|
}
|
|
131
153
|
}
|
|
132
154
|
};
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
{{ item.name || item._name }}
|
|
29
29
|
</span>
|
|
30
30
|
</Radio>
|
|
31
|
-
|
|
32
31
|
</template>
|
|
33
32
|
|
|
34
33
|
<div
|
|
@@ -121,6 +120,7 @@
|
|
|
121
120
|
_filterable: true,
|
|
122
121
|
_transfer: true,
|
|
123
122
|
_data: [],
|
|
123
|
+
_customData: [],
|
|
124
124
|
|
|
125
125
|
...this.propsObj,
|
|
126
126
|
...this.commonDealPropsObj
|
|
@@ -153,46 +153,24 @@
|
|
|
153
153
|
};
|
|
154
154
|
},
|
|
155
155
|
showVal () {
|
|
156
|
-
return this.$isEmptyData(this.
|
|
156
|
+
return this.$isEmptyData(this.curVal)
|
|
157
157
|
? this.emptyShowVal
|
|
158
158
|
: this.curValObj.name || this.curValObj._name;
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
created () {
|
|
162
|
-
this.
|
|
162
|
+
this.init();
|
|
163
163
|
},
|
|
164
164
|
methods: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this.selfPropsObj._customData.forEach(item => {
|
|
168
|
-
this.getListData(item);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
getListData (_customData) {
|
|
173
|
-
this.$https({
|
|
174
|
-
url: _customData.url,
|
|
175
|
-
params: {
|
|
176
|
-
..._customData.params
|
|
177
|
-
},
|
|
178
|
-
callback: data => {
|
|
179
|
-
this.initListData.push(
|
|
180
|
-
...data.list.map(item => (
|
|
181
|
-
{
|
|
182
|
-
_key: item[_customData._key || "_key"],
|
|
183
|
-
name: item[_customData._name || "name"]
|
|
184
|
-
}
|
|
185
|
-
))
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
});
|
|
165
|
+
init () {
|
|
166
|
+
|
|
189
167
|
},
|
|
168
|
+
|
|
190
169
|
// 取消flat模式的选择项
|
|
191
170
|
cancelSelect (item) {
|
|
192
171
|
if (item._disabled !== true && this.selfPropsObj._clearable !== false) {
|
|
193
172
|
if (item._key === this.curVal) {
|
|
194
173
|
this.value[this.controlKey] = "";
|
|
195
|
-
|
|
196
174
|
this.change();
|
|
197
175
|
}
|
|
198
176
|
}
|
|
@@ -221,6 +199,27 @@
|
|
|
221
199
|
// 获取某项的置灰状态
|
|
222
200
|
getItemDisabled (item) {
|
|
223
201
|
return !!(!this.finalCanEdit || item._disabled);
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
// 接口 -获取自定义的接口数据
|
|
205
|
+
getListData () {
|
|
206
|
+
this.selfPropsObj._customData.forEach(item => {
|
|
207
|
+
this.$https({
|
|
208
|
+
url: item.url,
|
|
209
|
+
params: item.params,
|
|
210
|
+
callback: data => {
|
|
211
|
+
this.initListData = [
|
|
212
|
+
...this.initListData,
|
|
213
|
+
...data.list.map(item =>
|
|
214
|
+
({
|
|
215
|
+
_key: item[item._key || "_key"],
|
|
216
|
+
name: item[item._name || "name"]
|
|
217
|
+
})
|
|
218
|
+
)
|
|
219
|
+
];
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
});
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
225
|
};
|
|
@@ -6,67 +6,70 @@
|
|
|
6
6
|
maxWidth="200"
|
|
7
7
|
:transfer="true"
|
|
8
8
|
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@mouseleave="isHover = false"
|
|
18
|
-
@click="clickInput"
|
|
19
|
-
>
|
|
20
|
-
<!-- 有值 -->
|
|
21
|
-
<template v-if="!$isEmptyData(curValList)">
|
|
22
|
-
<dsh-tags
|
|
23
|
-
class="text"
|
|
24
|
-
:list="curValList"
|
|
25
|
-
:propsObj="{
|
|
26
|
-
disabled: !finalCanEdit,
|
|
27
|
-
closable: true
|
|
9
|
+
<div @click.stop="clickInput">
|
|
10
|
+
<slot>
|
|
11
|
+
<!-- 编辑模式 -->
|
|
12
|
+
<div
|
|
13
|
+
v-if="canEdit"
|
|
14
|
+
:class="{
|
|
15
|
+
...commonClass,
|
|
16
|
+
'selectDepartments-edit': true
|
|
28
17
|
}"
|
|
29
|
-
@
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
@mouseenter="isHover = true"
|
|
19
|
+
@mouseleave="isHover = false"
|
|
20
|
+
>
|
|
21
|
+
<!-- 有值 -->
|
|
22
|
+
<template v-if="!$isEmptyData(curValList)">
|
|
23
|
+
<dsh-tags
|
|
24
|
+
class="text"
|
|
25
|
+
:list="curValList"
|
|
26
|
+
:propsObj="{
|
|
27
|
+
disabled: !finalCanEdit,
|
|
28
|
+
closable: true
|
|
29
|
+
}"
|
|
30
|
+
@delete="clickDeleteItem"
|
|
31
|
+
></dsh-tags>
|
|
32
|
+
</template>
|
|
33
|
+
<!-- 无值 -->
|
|
34
|
+
<template v-else>
|
|
35
|
+
{{ emptyShowVal }}
|
|
36
|
+
</template>
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
<!-- 图标 -->
|
|
39
|
+
<template>
|
|
40
|
+
<Icon
|
|
41
|
+
v-if="!$isEmptyData(curValList) && selfPropsObj._clearable && isHover"
|
|
42
|
+
class="icon-close"
|
|
43
|
+
type="ios-close-circle"
|
|
44
|
+
@click.stop="clickClear"
|
|
45
|
+
/>
|
|
46
|
+
<Icon
|
|
47
|
+
v-else
|
|
48
|
+
class="icon-default"
|
|
49
|
+
:type="inputIcon"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
</div>
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
<!-- 查看模式 -->
|
|
55
|
+
<div
|
|
56
|
+
v-else
|
|
57
|
+
:class="{
|
|
58
|
+
...commonClass,
|
|
59
|
+
'selectDepartments-show': true
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
<dsh-tags
|
|
63
|
+
v-if="!$isEmptyData(curValList)"
|
|
64
|
+
class="text"
|
|
65
|
+
:list="curValList"
|
|
66
|
+
></dsh-tags>
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
<template v-else>
|
|
69
|
+
{{ emptyShowVal }}
|
|
70
|
+
</template>
|
|
71
|
+
</div>
|
|
72
|
+
</slot>
|
|
70
73
|
</div>
|
|
71
74
|
</bri-tooltip>
|
|
72
75
|
|