bri-components 1.2.1 → 1.2.3
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/5.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +5 -5
- package/package.json +1 -1
- package/src/abolish/DshCascaders.vue +3 -0
- package/src/abolish/DshTexts.vue +3 -0
- package/src/components/controls/base/BriUpload/BriUploadImage.vue +45 -32
- package/src/components/controls/base/BriUpload/uploadMixin.js +7 -5
- package/src/components/controls/base/DshCascader/DshCascader.vue +25 -17
- package/src/components/controls/base/DshCheckbox.vue +127 -137
- package/src/components/controls/base/DshCoordinates.vue +121 -147
- package/src/components/controls/base/DshDaterange.vue +3 -3
- package/src/components/controls/base/DshEditor.vue +2 -1
- package/src/components/controls/base/DshSelect.vue +3 -13
- package/src/components/controls/base/DshSwitch.vue +13 -20
- package/src/components/controls/controlMixin.js +19 -1
- package/src/components/controls/senior/BriLabels.vue +98 -93
- package/src/components/controls/senior/selectDepartments.vue +16 -11
- package/src/components/controls/senior/selectUsers/DepartmentMenu.vue +2 -2
- package/src/components/controls/senior/selectUsers/selectUsers.vue +18 -15
- package/src/components/small/BriDrawer.vue +1 -1
- package/src/components/small/DshDropdown.vue +1 -0
- package/src/components/small/DshModal.vue +1 -1
- package/src/components/small/DshTags.vue +135 -8
- package/src/styles/common/control.less +19 -15
- package/src/styles/components/controls/.DS_Store +0 -0
- package/src/styles/components/controls/base/BriUpload/BriUpload.less +1 -1
- package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +6 -0
- package/src/styles/components/controls/base/DshCascader/DshCascader.less +13 -11
- package/src/styles/components/controls/base/DshCheckbox.less +39 -75
- package/src/styles/components/controls/base/DshCoordinates.less +1 -35
- package/src/styles/components/controls/base/DshSelect.less +16 -1
- package/src/styles/components/controls/base/DshSwitch.less +1 -31
- package/src/styles/components/controls/senior/.DS_Store +0 -0
- package/src/styles/components/controls/senior/BriLabels.less +1 -1
- package/src/styles/components/list/BriFlatTable.less +1 -1
- package/src/styles/components/small/DshDropdown.less +6 -5
- package/src/styles/components/small/DshModal.less +20 -42
- package/src/styles/components/small/DshTags.less +32 -14
- package/src/styles/components/unit/DshFormItem.less +3 -25
- package/src/styles/variables.less +2 -1
|
@@ -1,161 +1,135 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshCoordinates">
|
|
3
3
|
<bri-tooltip
|
|
4
|
-
:content="
|
|
4
|
+
:content="showText"
|
|
5
5
|
placement="top"
|
|
6
6
|
maxWidth="200"
|
|
7
7
|
:transfer="true"
|
|
8
8
|
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
<div
|
|
10
|
+
:class="{
|
|
11
|
+
...commonClass,
|
|
12
|
+
'DshCoordinates-edit': true
|
|
13
|
+
}"
|
|
14
|
+
@click.stop="clickOpenModal"
|
|
15
|
+
>
|
|
16
|
+
<div class="text">
|
|
17
|
+
{{ showText }}
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<Icon
|
|
21
|
+
v-if="finalCanEdit && selfPropsObj._clearable"
|
|
22
|
+
class="icon-close"
|
|
23
|
+
type="ios-close-circle"
|
|
24
|
+
@click.stop="clickDelete"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
</bri-tooltip>
|
|
28
|
+
|
|
29
|
+
<!-- 模态框 -->
|
|
30
|
+
<Modal
|
|
31
|
+
v-if="canEdit"
|
|
32
|
+
class="DshCoordinates-modal"
|
|
33
|
+
v-model="showModal"
|
|
34
|
+
title="选择位置"
|
|
35
|
+
:footer-hide="true"
|
|
36
|
+
:styles="modalStyles"
|
|
37
|
+
@on-cancel="clickCancel"
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
slot="header"
|
|
41
|
+
class="DshCoordinates-modal-header"
|
|
42
|
+
>
|
|
43
|
+
<Row
|
|
44
|
+
v-if="finalCanEdit"
|
|
45
|
+
class="edit"
|
|
46
|
+
type="flex"
|
|
47
|
+
justify="center"
|
|
48
|
+
align="bottom"
|
|
17
49
|
>
|
|
18
|
-
|
|
19
|
-
<div
|
|
20
|
-
v-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{{ curValName }}
|
|
25
|
-
</span>
|
|
26
|
-
<Icon
|
|
27
|
-
v-if="selfPropsObj._clearable"
|
|
28
|
-
class="value-icon"
|
|
29
|
-
type="md-close"
|
|
30
|
-
@click.stop="clickDelete"
|
|
31
|
-
/>
|
|
50
|
+
<Col span="8">
|
|
51
|
+
<div>
|
|
52
|
+
<RadioGroup v-model="formData.kind">
|
|
53
|
+
<Radio label="keyword">按关键字搜索</Radio>
|
|
54
|
+
<Radio label="coordinate">按坐标搜索</Radio>
|
|
55
|
+
</RadioGroup>
|
|
32
56
|
</div>
|
|
57
|
+
<Row class="dsh-margin-top5">
|
|
58
|
+
<Col span="16">
|
|
59
|
+
<Input
|
|
60
|
+
v-model="formData.searchText"
|
|
61
|
+
placeholder="请输入..."
|
|
62
|
+
:clearable="true"
|
|
63
|
+
@on-enter="clickSearch"
|
|
64
|
+
/>
|
|
65
|
+
<span class="edit-message">{{ searchMessage }}</span>
|
|
66
|
+
</Col>
|
|
67
|
+
<Col span="8">
|
|
68
|
+
<Button
|
|
69
|
+
type="primary"
|
|
70
|
+
@click="clickSearch"
|
|
71
|
+
>搜索</Button>
|
|
72
|
+
</Col>
|
|
73
|
+
</Row>
|
|
74
|
+
</Col>
|
|
33
75
|
|
|
34
|
-
|
|
35
|
-
<div
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
76
|
+
<Col span="8">
|
|
77
|
+
<div class="edit-text">坐标获取结果</div>
|
|
78
|
+
<Row class="dsh-margin-top5">
|
|
79
|
+
<Col span="16">
|
|
80
|
+
<Input
|
|
81
|
+
:value="curVal.name"
|
|
82
|
+
:readonly="true"
|
|
83
|
+
:clearable="true"
|
|
84
|
+
@on-clear="clickClear"
|
|
85
|
+
@click.native="clickMapFitView"
|
|
86
|
+
/>
|
|
87
|
+
</Col>
|
|
88
|
+
<Col span="8">
|
|
89
|
+
<Button
|
|
90
|
+
type="primary"
|
|
91
|
+
@click="clickConfirm"
|
|
92
|
+
>确认</Button>
|
|
93
|
+
</Col>
|
|
94
|
+
</Row>
|
|
95
|
+
</Col>
|
|
96
|
+
</Row>
|
|
42
97
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@on-cancel="clickCancel"
|
|
98
|
+
<Row
|
|
99
|
+
v-else
|
|
100
|
+
class="show"
|
|
101
|
+
>
|
|
102
|
+
<Col
|
|
103
|
+
span="6"
|
|
104
|
+
class="show-name"
|
|
51
105
|
>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<RadioGroup v-model="formData.kind">
|
|
66
|
-
<Radio label="keyword">按关键字搜索</Radio>
|
|
67
|
-
<Radio label="coordinate">按坐标搜索</Radio>
|
|
68
|
-
</RadioGroup>
|
|
69
|
-
</div>
|
|
70
|
-
<Row class="dsh-margin-top5">
|
|
71
|
-
<Col span="16">
|
|
72
|
-
<Input
|
|
73
|
-
v-model="formData.searchText"
|
|
74
|
-
placeholder="请输入..."
|
|
75
|
-
:clearable="true"
|
|
76
|
-
@on-enter="clickSearch"
|
|
77
|
-
/>
|
|
78
|
-
<span class="edit-message">{{ searchMessage }}</span>
|
|
79
|
-
</Col>
|
|
80
|
-
<Col span="8">
|
|
81
|
-
<Button
|
|
82
|
-
type="primary"
|
|
83
|
-
@click="clickSearch"
|
|
84
|
-
>搜索</Button>
|
|
85
|
-
</Col>
|
|
86
|
-
</Row>
|
|
87
|
-
</Col>
|
|
88
|
-
|
|
89
|
-
<Col span="8">
|
|
90
|
-
<div class="edit-text">坐标获取结果</div>
|
|
91
|
-
<Row class="dsh-margin-top5">
|
|
92
|
-
<Col span="16">
|
|
93
|
-
<Input
|
|
94
|
-
:value="curVal.name"
|
|
95
|
-
:readonly="true"
|
|
96
|
-
:clearable="true"
|
|
97
|
-
@on-clear="clickClear"
|
|
98
|
-
@click.native="clickMapFitView"
|
|
99
|
-
/>
|
|
100
|
-
</Col>
|
|
101
|
-
<Col span="8">
|
|
102
|
-
<Button
|
|
103
|
-
type="primary"
|
|
104
|
-
@click="clickConfirm"
|
|
105
|
-
>确认</Button>
|
|
106
|
-
</Col>
|
|
107
|
-
</Row>
|
|
108
|
-
</Col>
|
|
109
|
-
</Row>
|
|
110
|
-
|
|
111
|
-
<Row
|
|
112
|
-
v-else
|
|
113
|
-
class="show"
|
|
114
|
-
>
|
|
115
|
-
<Col
|
|
116
|
-
span="6"
|
|
117
|
-
class="show-name"
|
|
118
|
-
>
|
|
119
|
-
当前位置:
|
|
120
|
-
</Col>
|
|
121
|
-
<Col span="12">
|
|
122
|
-
<Input
|
|
123
|
-
:value="curVal.name"
|
|
124
|
-
:readonly="true"
|
|
125
|
-
@click.native="clickMapFitView"
|
|
126
|
-
/>
|
|
127
|
-
</Col>
|
|
128
|
-
<Col span="6">
|
|
129
|
-
</Col>
|
|
130
|
-
</Row>
|
|
131
|
-
</div>
|
|
106
|
+
当前位置:
|
|
107
|
+
</Col>
|
|
108
|
+
<Col span="12">
|
|
109
|
+
<Input
|
|
110
|
+
:value="curVal.name"
|
|
111
|
+
:readonly="true"
|
|
112
|
+
@click.native="clickMapFitView"
|
|
113
|
+
/>
|
|
114
|
+
</Col>
|
|
115
|
+
<Col span="6">
|
|
116
|
+
</Col>
|
|
117
|
+
</Row>
|
|
118
|
+
</div>
|
|
132
119
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<div
|
|
142
|
-
ref="divCoordinate"
|
|
143
|
-
style="display: none; position:absolute;background:#fff;padding: 5px 10px"
|
|
144
|
-
></div>
|
|
145
|
-
</Modal>
|
|
146
|
-
</div>
|
|
147
|
-
</template>
|
|
120
|
+
<transition>
|
|
121
|
+
<div
|
|
122
|
+
v-if="showModal"
|
|
123
|
+
id="mapContain"
|
|
124
|
+
class="DshCoordinates-modal-map"
|
|
125
|
+
></div>
|
|
126
|
+
</transition>
|
|
148
127
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}">
|
|
155
|
-
{{ curValName || emptyShowVal }}
|
|
156
|
-
</span>
|
|
157
|
-
</template>
|
|
158
|
-
</bri-tooltip>
|
|
128
|
+
<div
|
|
129
|
+
ref="divCoordinate"
|
|
130
|
+
style="display: none; position:absolute;background:#fff;padding: 5px 10px"
|
|
131
|
+
></div>
|
|
132
|
+
</Modal>
|
|
159
133
|
</div>
|
|
160
134
|
</template>
|
|
161
135
|
|
|
@@ -193,8 +167,8 @@
|
|
|
193
167
|
this.value[this.controlKey] = val;
|
|
194
168
|
}
|
|
195
169
|
},
|
|
196
|
-
|
|
197
|
-
return this.curVal
|
|
170
|
+
showText () {
|
|
171
|
+
return this.$isEmptyData(this.curVal) ? this.emptyShowVal : this.curVal.name;
|
|
198
172
|
},
|
|
199
173
|
curLnglat: {
|
|
200
174
|
get () {
|
|
@@ -248,7 +222,7 @@
|
|
|
248
222
|
methods: {
|
|
249
223
|
// 打开窗体
|
|
250
224
|
clickOpenModal () {
|
|
251
|
-
if (this.
|
|
225
|
+
if (this.finalCanEdit) {
|
|
252
226
|
this.showModal = true;
|
|
253
227
|
this.cloneValue = this.$deepCopy(this.curVal);
|
|
254
228
|
this.getMap();
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<span class="DshDaterange-item-icon">
|
|
41
41
|
<Icon
|
|
42
42
|
v-show="val0"
|
|
43
|
-
type="
|
|
43
|
+
type="ios-close-circle"
|
|
44
44
|
@click.stop="clickClear('', 0)"
|
|
45
45
|
/>
|
|
46
46
|
<Icon
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
<span class="DshDaterange-item-icon">
|
|
78
78
|
<Icon
|
|
79
79
|
v-show="val1"
|
|
80
|
-
type="
|
|
80
|
+
type="ios-close-circle"
|
|
81
81
|
@click.stop="clickClear('', 1)"
|
|
82
82
|
/>
|
|
83
83
|
<Icon
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
{
|
|
170
170
|
_key: "dyn_month_start",
|
|
171
171
|
name: "月初",
|
|
172
|
-
numbers: [0],
|
|
172
|
+
numbers: [0, 1],
|
|
173
173
|
dateTypes: ["month", "date", "datetime", "daterange", "datetimerange"]
|
|
174
174
|
},
|
|
175
175
|
{
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
<div
|
|
42
42
|
v-if="isUnitShow"
|
|
43
43
|
:class="{
|
|
44
|
+
...commonClass,
|
|
44
45
|
'DshEditor-unit': !$isEmptyData(curVal)
|
|
45
46
|
}"
|
|
46
47
|
>
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
});
|
|
145
146
|
} else if (ossType === "local") {
|
|
146
147
|
that.localUpload(fileItem, result.data, res => {
|
|
147
|
-
insertImg(res.url);
|
|
148
|
+
insertImg(res.data.url);
|
|
148
149
|
});
|
|
149
150
|
} else {
|
|
150
151
|
console.log(`请开发这种类型‘${ossType}’的上传模式`);
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
<bri-tooltip
|
|
78
78
|
v-else
|
|
79
|
-
:content="
|
|
79
|
+
:content="showVal"
|
|
80
80
|
maxWidth="200"
|
|
81
81
|
placement="top"
|
|
82
82
|
:transfer="true"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
v-if="curSelectItem"
|
|
86
86
|
class="DshSelect-value-wrapper"
|
|
87
87
|
:style="{
|
|
88
|
-
justifyContent:
|
|
88
|
+
justifyContent: showAlign
|
|
89
89
|
}"
|
|
90
90
|
>
|
|
91
91
|
<span
|
|
@@ -169,20 +169,10 @@
|
|
|
169
169
|
curSelectItem () {
|
|
170
170
|
return this.listData.find(item => item._key === this.value[this.controlKey]);
|
|
171
171
|
},
|
|
172
|
-
|
|
172
|
+
showVal () {
|
|
173
173
|
return this.curSelectItem
|
|
174
174
|
? this.curSelectItem.name || this.curSelectItem._name
|
|
175
175
|
: "";
|
|
176
|
-
},
|
|
177
|
-
showVal () {
|
|
178
|
-
return this.valStr;
|
|
179
|
-
},
|
|
180
|
-
flatShowAlign () {
|
|
181
|
-
return !this.propsObj._align || this.propsObj._align === "left" || !this.isUnitShow
|
|
182
|
-
? "flex-start"
|
|
183
|
-
: this.propsObj._align === "right"
|
|
184
|
-
? "flex-end"
|
|
185
|
-
: "center";
|
|
186
176
|
}
|
|
187
177
|
},
|
|
188
178
|
created () {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
v-model="curVal"
|
|
8
8
|
:disabled="!finalCanEdit"
|
|
9
9
|
:size="propsObj._size"
|
|
10
|
+
false-color="#CCCCCC"
|
|
10
11
|
@on-change="change"
|
|
11
12
|
>
|
|
12
13
|
<span slot="open">
|
|
@@ -19,26 +20,18 @@
|
|
|
19
20
|
</template>
|
|
20
21
|
|
|
21
22
|
<!-- 查看 -->
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
color: curVal ? '#3D84EE' : '#F4A135'
|
|
35
|
-
}"
|
|
36
|
-
>
|
|
37
|
-
{{ showText }}
|
|
38
|
-
</span>
|
|
39
|
-
</div>
|
|
40
|
-
</bri-tooltip>
|
|
41
|
-
</template>
|
|
23
|
+
<span v-else
|
|
24
|
+
:class="{
|
|
25
|
+
'DshSwitch-show': true,
|
|
26
|
+
...commonClass
|
|
27
|
+
}"
|
|
28
|
+
:style="{
|
|
29
|
+
background: curVal ? '#d3f3dcff' : '#FDEDED',
|
|
30
|
+
color: curVal ? '#37C45E' : '#E83636'
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
{{ showText }}
|
|
34
|
+
</span>
|
|
42
35
|
</div>
|
|
43
36
|
</template>
|
|
44
37
|
|
|
@@ -70,6 +70,12 @@ export default {
|
|
|
70
70
|
controlKey () {
|
|
71
71
|
return this.propsObj._key;
|
|
72
72
|
},
|
|
73
|
+
// 字段的真实key
|
|
74
|
+
fieldKey () {
|
|
75
|
+
return this.controlKey === "_default"
|
|
76
|
+
? this.value._key
|
|
77
|
+
: (this.propsObj.__realKey__ || this.controlKey);
|
|
78
|
+
},
|
|
73
79
|
controlType () {
|
|
74
80
|
return this.propsObj._type;
|
|
75
81
|
},
|
|
@@ -97,11 +103,23 @@ export default {
|
|
|
97
103
|
"bri-control-show": !this.canEdit && !this.isUnitShow,
|
|
98
104
|
|
|
99
105
|
"dsh-ellipsis": true,
|
|
100
|
-
"bri-control-nodata":
|
|
106
|
+
"bri-control-nodata": this.$isEmptyData(this.curVal)
|
|
101
107
|
};
|
|
102
108
|
},
|
|
109
|
+
showAlign () {
|
|
110
|
+
return !this.isUnitShow
|
|
111
|
+
? "flex-start"
|
|
112
|
+
: this.propsObj._align === "right"
|
|
113
|
+
? "flex-end"
|
|
114
|
+
: this.propsObj._align === "center"
|
|
115
|
+
? "center"
|
|
116
|
+
: "flex-start";
|
|
117
|
+
},
|
|
103
118
|
|
|
104
119
|
// 部分控件或部分条件下 才使用的属性
|
|
120
|
+
isCore () {
|
|
121
|
+
return !!this.propsObj.isCore;
|
|
122
|
+
},
|
|
105
123
|
inTable () {
|
|
106
124
|
return !!this.propsObj.inTable;
|
|
107
125
|
},
|