bri-components 1.4.52 → 1.4.54
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 +1 -1
- package/src/components/controls/base/DshCascader/DshCascader.vue +4 -2
- package/src/components/controls/base/DshCoordinates.vue +50 -16
- package/src/components/controls/base/DshDate/DshDate.vue +74 -59
- package/src/components/controls/base/DshInput/DshInput.vue +7 -7
- package/src/components/controls/base/DshNumber/DshNumber.vue +47 -133
- package/src/components/controls/base/DshNumber/DshNumberange.vue +3 -56
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +3 -2
- package/src/components/controls/base/DshSelect/DshSelect.vue +3 -2
- package/src/components/controls/base/DshSwitch/DshSwitch.vue +2 -1
- package/src/components/controls/control.less +11 -1
- package/src/components/controls/controlMap.js +2 -2
- package/src/components/controls/mixins/controlMixin.js +0 -10
- package/src/components/controls/mixins/numberMixin.js +112 -0
- package/src/components/controls/senior/{BriLabels.vue → DshLabels.vue} +125 -101
- package/src/components/controls/senior/selectDepartments.vue +3 -11
- package/src/components/controls/senior/selectUsers/selectUsers.vue +3 -13
- package/src/components/list/DshBox/DshBox.vue +2 -1
- package/src/styles/components/BriTable.less +4 -0
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
>
|
|
30
30
|
<!-- 有值 -->
|
|
31
31
|
<template v-if="!$isEmptyData(curValList)">
|
|
32
|
-
<!-- 高度自由时
|
|
32
|
+
<!-- 高度自由时 -->
|
|
33
33
|
<div
|
|
34
34
|
v-if="isHeightAuto"
|
|
35
35
|
:class="{
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
{{ showVal }}
|
|
44
44
|
</div>
|
|
45
45
|
|
|
46
|
+
<!-- 高度不自由(不换行) -->
|
|
46
47
|
<bri-tooltip
|
|
47
48
|
v-else
|
|
48
49
|
:content="showVal"
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
>
|
|
104
105
|
<!-- 有值 -->
|
|
105
106
|
<template v-if="!$isEmptyData(curValList)">
|
|
106
|
-
<!-- 高度自由时
|
|
107
|
+
<!-- 高度自由时 -->
|
|
107
108
|
<dsh-tags
|
|
108
109
|
v-if="isHeightAuto"
|
|
109
110
|
:class="{
|
|
@@ -114,6 +115,7 @@
|
|
|
114
115
|
:list="curValObjList"
|
|
115
116
|
></dsh-tags>
|
|
116
117
|
|
|
118
|
+
<!-- 高度不自由(不换行) -->
|
|
117
119
|
<bri-tooltip
|
|
118
120
|
v-else
|
|
119
121
|
:content="showMulVal"
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<!-- 单选模式 编辑 -->
|
|
3
|
+
<div
|
|
4
|
+
v-if="!multipleMode && canEdit"
|
|
5
|
+
class="DshCoordinates"
|
|
6
|
+
>
|
|
3
7
|
<bri-tooltip
|
|
4
8
|
:content="showVal"
|
|
5
|
-
placement="top"
|
|
6
|
-
maxWidth="200"
|
|
7
9
|
:transfer="true"
|
|
8
10
|
>
|
|
9
11
|
<!-- 编辑 -->
|
|
10
12
|
<dsh-control-input
|
|
11
|
-
v-if="canEdit"
|
|
12
13
|
:class="commonClass"
|
|
13
14
|
:value="curVal"
|
|
14
15
|
:disabled="disabled"
|
|
@@ -16,21 +17,10 @@
|
|
|
16
17
|
@clear="clickClear"
|
|
17
18
|
@click.native="clickInput"
|
|
18
19
|
></dsh-control-input>
|
|
19
|
-
|
|
20
|
-
<!-- 查看 -->
|
|
21
|
-
<div
|
|
22
|
-
v-else
|
|
23
|
-
:class="{
|
|
24
|
-
...commonClass
|
|
25
|
-
}"
|
|
26
|
-
>
|
|
27
|
-
<span class="text"> {{ showVal }}</span>
|
|
28
|
-
</div>
|
|
29
20
|
</bri-tooltip>
|
|
30
21
|
|
|
31
22
|
<!-- 模态框 -->
|
|
32
23
|
<Modal
|
|
33
|
-
v-if="canEdit"
|
|
34
24
|
class="DshCoordinates-modal"
|
|
35
25
|
v-model="showModal"
|
|
36
26
|
:styles="modalStyles"
|
|
@@ -138,6 +128,48 @@
|
|
|
138
128
|
></div>
|
|
139
129
|
</Modal>
|
|
140
130
|
</div>
|
|
131
|
+
|
|
132
|
+
<!-- 单选模式 查看 -->
|
|
133
|
+
<div
|
|
134
|
+
v-else-if="!multipleMode && !canEdit"
|
|
135
|
+
class="DshCoordinates-show"
|
|
136
|
+
>
|
|
137
|
+
<!-- 有值 -->
|
|
138
|
+
<template v-if="!$isEmptyData(curVal)">
|
|
139
|
+
<!-- 高度自由时 -->
|
|
140
|
+
<div
|
|
141
|
+
v-if="isHeightAuto"
|
|
142
|
+
:class="{
|
|
143
|
+
...commonClass,
|
|
144
|
+
'DshCoordinates-show-auto': true
|
|
145
|
+
}"
|
|
146
|
+
>
|
|
147
|
+
{{ showVal }}
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- 高度不自由(不换行) -->
|
|
151
|
+
<bri-tooltip
|
|
152
|
+
v-else
|
|
153
|
+
:content="showVal"
|
|
154
|
+
:transfer="true"
|
|
155
|
+
>
|
|
156
|
+
<div :class="{
|
|
157
|
+
...commonClass,
|
|
158
|
+
'DshCoordinates-show-ellipsis': true
|
|
159
|
+
}">
|
|
160
|
+
{{ showVal }}
|
|
161
|
+
</div>
|
|
162
|
+
</bri-tooltip>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
165
|
+
<!-- 无值 -->
|
|
166
|
+
<div
|
|
167
|
+
v-else
|
|
168
|
+
:class="commonClass"
|
|
169
|
+
>
|
|
170
|
+
{{ emptyShowVal }}
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
141
173
|
</template>
|
|
142
174
|
|
|
143
175
|
<script>
|
|
@@ -477,8 +509,10 @@
|
|
|
477
509
|
</script>
|
|
478
510
|
|
|
479
511
|
<style lang="less">
|
|
512
|
+
@import url("../control.less");
|
|
513
|
+
|
|
480
514
|
.DshCoordinates {
|
|
481
|
-
|
|
515
|
+
#control-show();
|
|
482
516
|
|
|
483
517
|
&-modal {
|
|
484
518
|
&-header {
|
|
@@ -1,59 +1,83 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- 单选模式 -->
|
|
2
|
+
<!-- 单选模式 编辑 -->
|
|
3
3
|
<div
|
|
4
|
-
v-if="!multipleMode"
|
|
4
|
+
v-if="!multipleMode && canEdit"
|
|
5
5
|
class="DshDate"
|
|
6
6
|
>
|
|
7
|
-
<template v-if="
|
|
8
|
-
<!--
|
|
9
|
-
<template v-if="
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@on-change="change"
|
|
21
|
-
></TimePicker>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<!-- 日期、日期时间、年、月 -->
|
|
25
|
-
<template v-else>
|
|
26
|
-
<DatePicker
|
|
27
|
-
class="DshDate-edit"
|
|
28
|
-
v-model="curValDate"
|
|
29
|
-
:type="subType"
|
|
30
|
-
:placeholder="selfPropsObj._placeholder"
|
|
31
|
-
:disabled="disabled"
|
|
32
|
-
:clearable="clearable"
|
|
33
|
-
:options="options"
|
|
34
|
-
:transfer="selfPropsObj._transfer"
|
|
35
|
-
@on-change="change"
|
|
36
|
-
></DatePicker>
|
|
37
|
-
</template>
|
|
7
|
+
<template v-if="canEdit">
|
|
8
|
+
<!-- 时间子类型 -->
|
|
9
|
+
<template v-if="['time'].includes(subType)">
|
|
10
|
+
<TimePicker
|
|
11
|
+
class="DshDate-edit"
|
|
12
|
+
v-model="curValDate"
|
|
13
|
+
:type="subType"
|
|
14
|
+
:placeholder="selfPropsObj._placeholder"
|
|
15
|
+
:disabled="disabled"
|
|
16
|
+
:clearable="clearable"
|
|
17
|
+
:transfer="selfPropsObj._transfer"
|
|
18
|
+
@on-change="change"
|
|
19
|
+
></TimePicker>
|
|
38
20
|
</template>
|
|
39
21
|
|
|
40
|
-
<!--
|
|
22
|
+
<!-- 日期、日期时间、年、月 -->
|
|
41
23
|
<template v-else>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
24
|
+
<DatePicker
|
|
25
|
+
class="DshDate-edit"
|
|
26
|
+
v-model="curValDate"
|
|
27
|
+
:type="subType"
|
|
28
|
+
:placeholder="selfPropsObj._placeholder"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
:clearable="clearable"
|
|
31
|
+
:options="options"
|
|
32
|
+
:transfer="selfPropsObj._transfer"
|
|
33
|
+
@on-change="change"
|
|
34
|
+
></DatePicker>
|
|
53
35
|
</template>
|
|
54
36
|
</template>
|
|
55
37
|
</div>
|
|
56
38
|
|
|
39
|
+
<!-- 单选模式 查看 -->
|
|
40
|
+
<div
|
|
41
|
+
v-else-if="!multipleMode && !canEdit"
|
|
42
|
+
class="DshDate-show"
|
|
43
|
+
>
|
|
44
|
+
<!-- 有值 -->
|
|
45
|
+
<template v-if="!$isEmptyData(curVal)">
|
|
46
|
+
<!-- 高度自由时 -->
|
|
47
|
+
<div
|
|
48
|
+
v-if="isHeightAuto"
|
|
49
|
+
:class="{
|
|
50
|
+
...commonClass,
|
|
51
|
+
'DshDate-show-auto': true
|
|
52
|
+
}"
|
|
53
|
+
>
|
|
54
|
+
{{ showVal }}
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- 高度不自由(不换行) -->
|
|
58
|
+
<bri-tooltip
|
|
59
|
+
v-else
|
|
60
|
+
:content="showVal"
|
|
61
|
+
:transfer="true"
|
|
62
|
+
>
|
|
63
|
+
<div :class="{
|
|
64
|
+
...commonClass,
|
|
65
|
+
'DshDate-show-ellipsis': true
|
|
66
|
+
}">
|
|
67
|
+
{{ showVal }}
|
|
68
|
+
</div>
|
|
69
|
+
</bri-tooltip>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<!-- 无值 -->
|
|
73
|
+
<div
|
|
74
|
+
v-else
|
|
75
|
+
:class="commonClass"
|
|
76
|
+
>
|
|
77
|
+
{{ emptyShowVal }}
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
57
81
|
<!-- 多选模式 -->
|
|
58
82
|
<dsh-daterange
|
|
59
83
|
v-else
|
|
@@ -78,9 +102,7 @@
|
|
|
78
102
|
},
|
|
79
103
|
props: {},
|
|
80
104
|
data () {
|
|
81
|
-
return {
|
|
82
|
-
show: true
|
|
83
|
-
};
|
|
105
|
+
return {};
|
|
84
106
|
},
|
|
85
107
|
computed: {
|
|
86
108
|
selfPropsObj () {
|
|
@@ -126,22 +148,15 @@
|
|
|
126
148
|
}
|
|
127
149
|
},
|
|
128
150
|
created () {},
|
|
129
|
-
methods: {}
|
|
130
|
-
watch: {
|
|
131
|
-
"subType" () {
|
|
132
|
-
this.show = false;
|
|
133
|
-
this.$nextTick(() => {
|
|
134
|
-
this.value[this.controlKey] = this.selfPropsObj._default;
|
|
135
|
-
this.show = true;
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
151
|
+
methods: {}
|
|
139
152
|
};
|
|
140
153
|
</script>
|
|
141
154
|
|
|
142
155
|
<style lang="less">
|
|
156
|
+
@import url("../../control.less");
|
|
157
|
+
|
|
143
158
|
.DshDate {
|
|
144
|
-
|
|
159
|
+
#control-show();
|
|
145
160
|
|
|
146
161
|
&-edit {
|
|
147
162
|
width: 100%;
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
>
|
|
45
45
|
<!-- 有值 -->
|
|
46
46
|
<template v-if="!$isEmptyData(curVal)">
|
|
47
|
-
<!--
|
|
47
|
+
<!-- 高度自由时 -->
|
|
48
48
|
<template v-if="isHeightAuto">
|
|
49
49
|
<a
|
|
50
50
|
v-if="subType === 'url'"
|
|
51
51
|
:class="{
|
|
52
|
-
...
|
|
52
|
+
...commonClass,
|
|
53
53
|
'DshInput-show-auto': true,
|
|
54
54
|
'DshInput-show-auto-url': true
|
|
55
55
|
}"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<div
|
|
62
62
|
v-else
|
|
63
63
|
:class="{
|
|
64
|
-
...
|
|
64
|
+
...commonClass,
|
|
65
65
|
'DshInput-show-auto': true,
|
|
66
66
|
'DshInput-show-auto-detail': isDetailShow,
|
|
67
67
|
'DshInput-show-auto-text': ['text', 'textarea'].includes(subType)
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
></div>
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
|
-
<!--
|
|
73
|
+
<!-- 高度不自由(不换行) -->
|
|
74
74
|
<bri-tooltip
|
|
75
75
|
v-else
|
|
76
76
|
:content="showVal"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<a
|
|
81
81
|
v-if="subType === 'url'"
|
|
82
82
|
:class="{
|
|
83
|
-
...
|
|
83
|
+
...commonClass,
|
|
84
84
|
'DshInput-show-ellipsis': true,
|
|
85
85
|
'DshInput-show-ellipsis-url': true
|
|
86
86
|
}"
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<div
|
|
93
93
|
v-else
|
|
94
94
|
:class="{
|
|
95
|
-
...
|
|
95
|
+
...commonClass,
|
|
96
96
|
'DshInput-show-ellipsis': true
|
|
97
97
|
}"
|
|
98
98
|
>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<!-- 无值 -->
|
|
105
105
|
<div
|
|
106
106
|
v-else
|
|
107
|
-
:class="
|
|
107
|
+
:class="commonClass"
|
|
108
108
|
>
|
|
109
109
|
{{ emptyShowVal }}
|
|
110
110
|
</div>
|
|
@@ -1,60 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- 单选模式 -->
|
|
2
|
+
<!-- 单选模式 编辑 -->
|
|
3
3
|
<div
|
|
4
|
-
v-if="!multipleMode"
|
|
4
|
+
v-if="!multipleMode && canEdit"
|
|
5
5
|
class="DshNumber"
|
|
6
6
|
>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
:precision="digit"
|
|
18
|
-
>
|
|
19
|
-
<div
|
|
20
|
-
v-if="unitStr"
|
|
21
|
-
slot="suffix"
|
|
22
|
-
class="DshNumber-edit-suffix"
|
|
23
|
-
>
|
|
24
|
-
{{ unitStr }}
|
|
25
|
-
</div>
|
|
26
|
-
</BriInputNumber>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<!-- 查看 -->
|
|
30
|
-
<template v-else>
|
|
31
|
-
<!-- 单元格的查看-进度条模式 -->
|
|
7
|
+
<BriInputNumber
|
|
8
|
+
class="DshNumber-edit"
|
|
9
|
+
v-model="curVal"
|
|
10
|
+
:placeholder="selfPropsObj._placeholder"
|
|
11
|
+
:disabled="disabled"
|
|
12
|
+
:formatter="formatterFunc"
|
|
13
|
+
:max="maxNum"
|
|
14
|
+
:min="minNum"
|
|
15
|
+
:precision="digit"
|
|
16
|
+
>
|
|
32
17
|
<div
|
|
33
|
-
v-if="
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[`DshNumber-show-${unitAlign}`]: true
|
|
37
|
-
}"
|
|
18
|
+
v-if="unitStr"
|
|
19
|
+
slot="suffix"
|
|
20
|
+
class="DshNumber-edit-suffix"
|
|
38
21
|
>
|
|
39
|
-
|
|
40
|
-
:percent="progressNum"
|
|
41
|
-
:stroke-width="strokeWidth"
|
|
42
|
-
:stroke-color="[statusColor, statusColor]"
|
|
43
|
-
>
|
|
44
|
-
<span>{{ progressStr }}</span>
|
|
45
|
-
</Progress>
|
|
22
|
+
{{ unitStr }}
|
|
46
23
|
</div>
|
|
24
|
+
</BriInputNumber>
|
|
25
|
+
</div>
|
|
47
26
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
27
|
+
<!-- 单选模式 查看 -->
|
|
28
|
+
<div
|
|
29
|
+
v-else-if="!multipleMode && !canEdit"
|
|
30
|
+
:class="{
|
|
31
|
+
'DshNumber-show': true,
|
|
32
|
+
[`DshNumber-show-${unitAlign}`]: true
|
|
33
|
+
}"
|
|
34
|
+
>
|
|
35
|
+
<!-- 进度条模式 -->
|
|
36
|
+
<Progress
|
|
37
|
+
v-if="showProgress"
|
|
38
|
+
:percent="progressNum"
|
|
39
|
+
:stroke-width="strokeWidth"
|
|
40
|
+
:stroke-color="[statusColor, statusColor]"
|
|
41
|
+
>
|
|
42
|
+
<span>{{ progressStr }}</span>
|
|
43
|
+
</Progress>
|
|
44
|
+
|
|
45
|
+
<!-- 非进度条模式 -->
|
|
46
|
+
<div
|
|
47
|
+
v-else
|
|
48
|
+
:class="commonClass"
|
|
49
|
+
>
|
|
50
|
+
{{ showVal }}
|
|
51
|
+
</div>
|
|
58
52
|
</div>
|
|
59
53
|
|
|
60
54
|
<!-- 多选模式 -->
|
|
@@ -62,20 +56,20 @@
|
|
|
62
56
|
v-else
|
|
63
57
|
:canEdit="canEdit"
|
|
64
58
|
:value="value"
|
|
65
|
-
:propsObj="
|
|
59
|
+
:propsObj="selfPropsObj"
|
|
66
60
|
@change="change"
|
|
67
61
|
></dsh-numberange>
|
|
68
62
|
</template>
|
|
69
63
|
|
|
70
64
|
<script>
|
|
71
|
-
import
|
|
65
|
+
import numberMixin from "../../mixins/numberMixin.js";
|
|
72
66
|
import BriInputNumber from "./BriInputNumber/BriInputNumber.vue";
|
|
73
67
|
import DshNumberange from "./DshNumberange.vue";
|
|
74
68
|
|
|
75
69
|
export default {
|
|
76
70
|
name: "DshNumber",
|
|
77
71
|
mixins: [
|
|
78
|
-
|
|
72
|
+
numberMixin
|
|
79
73
|
],
|
|
80
74
|
components: {
|
|
81
75
|
BriInputNumber,
|
|
@@ -85,87 +79,7 @@
|
|
|
85
79
|
data () {
|
|
86
80
|
return {};
|
|
87
81
|
},
|
|
88
|
-
computed: {
|
|
89
|
-
selfPropsObj () {
|
|
90
|
-
return {
|
|
91
|
-
_strokeWidth: 12, // 参数还没配置
|
|
92
|
-
_overflowColor: "#87d068",
|
|
93
|
-
_compeleteColor: "#87d068",
|
|
94
|
-
_lessColor: "#108ee9",
|
|
95
|
-
|
|
96
|
-
...this.propsObj,
|
|
97
|
-
...this.commonDealPropsObj
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
formatterFunc () {
|
|
101
|
-
return this.separator
|
|
102
|
-
? this.$numToSeparator
|
|
103
|
-
: value => `${value}`;
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
maxNum () {
|
|
107
|
-
return this.selfPropsObj._max || this.selfPropsObj._max === 0
|
|
108
|
-
? this.selfPropsObj._max
|
|
109
|
-
: Infinity;
|
|
110
|
-
},
|
|
111
|
-
minNum () {
|
|
112
|
-
return this.selfPropsObj._min || this.selfPropsObj._min === 0
|
|
113
|
-
? this.selfPropsObj._min
|
|
114
|
-
: -Infinity;
|
|
115
|
-
},
|
|
116
|
-
// round, decimal, 为其他值不处理
|
|
117
|
-
round () {
|
|
118
|
-
return this.selfPropsObj._round;
|
|
119
|
-
},
|
|
120
|
-
digit () {
|
|
121
|
-
return this.round === "round"
|
|
122
|
-
? 0
|
|
123
|
-
: this.round === "decimal"
|
|
124
|
-
? Number(this.selfPropsObj._digit || 2)
|
|
125
|
-
: undefined;
|
|
126
|
-
},
|
|
127
|
-
numberFormat () {
|
|
128
|
-
return this.selfPropsObj._numberFormat;
|
|
129
|
-
},
|
|
130
|
-
unit () {
|
|
131
|
-
return this.selfPropsObj._unit;
|
|
132
|
-
},
|
|
133
|
-
unitStr () {
|
|
134
|
-
return this.numberFormat === "percent"
|
|
135
|
-
? "%"
|
|
136
|
-
: this.unit
|
|
137
|
-
? `${this.unit}`
|
|
138
|
-
: "";
|
|
139
|
-
},
|
|
140
|
-
separator () {
|
|
141
|
-
return this.selfPropsObj._separator;
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
// 进度条方式使用(此处先这样,实际是进度条使用要受0-100的数值范围限制)
|
|
145
|
-
strokeWidth () {
|
|
146
|
-
return this.selfPropsObj._strokeWidth;
|
|
147
|
-
},
|
|
148
|
-
statusColor () {
|
|
149
|
-
return this.curVal > 100
|
|
150
|
-
? this.selfPropsObj._overflowColor
|
|
151
|
-
: this.curVal === 100
|
|
152
|
-
? this.selfPropsObj._compeleteColor
|
|
153
|
-
: this.selfPropsObj._lessColor;
|
|
154
|
-
},
|
|
155
|
-
progressNum () {
|
|
156
|
-
return this.$isEmptyData(this.curVal) || this.curVal < 0
|
|
157
|
-
? 0
|
|
158
|
-
: Math.round((this.curVal > 100 ? 100 : this.curVal) * 100) / 100;
|
|
159
|
-
},
|
|
160
|
-
progressStr () {
|
|
161
|
-
return this.$numToStrAndUnit(this.$isEmptyData(this.curVal) ? 0 : this.curVal, this.selfPropsObj);
|
|
162
|
-
},
|
|
163
|
-
showVal () {
|
|
164
|
-
return this.$isEmptyData(this.curVal)
|
|
165
|
-
? this.emptyShowVal
|
|
166
|
-
: this.$numToStrAndUnit(this.curVal, this.selfPropsObj);
|
|
167
|
-
}
|
|
168
|
-
},
|
|
82
|
+
computed: {},
|
|
169
83
|
created () {},
|
|
170
84
|
methods: {}
|
|
171
85
|
};
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script>
|
|
55
|
-
import
|
|
55
|
+
import numberMixin from "../../mixins/numberMixin.js";
|
|
56
56
|
import BriInputNumber from "./BriInputNumber/BriInputNumber.vue";
|
|
57
57
|
|
|
58
58
|
export default {
|
|
59
59
|
name: "DshNumberange",
|
|
60
60
|
mixins: [
|
|
61
|
-
|
|
61
|
+
numberMixin
|
|
62
62
|
],
|
|
63
63
|
components: {
|
|
64
64
|
BriInputNumber
|
|
@@ -67,60 +67,7 @@
|
|
|
67
67
|
data () {
|
|
68
68
|
return {};
|
|
69
69
|
},
|
|
70
|
-
computed: {
|
|
71
|
-
selfPropsObj () {
|
|
72
|
-
return {
|
|
73
|
-
...this.propsObj,
|
|
74
|
-
...this.commonDealPropsObj
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
formatterFunc () {
|
|
79
|
-
if (this.propsObj._separator) {
|
|
80
|
-
return this.$numToSeparator;
|
|
81
|
-
} else {
|
|
82
|
-
return value => `${value}`;
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
maxNum () {
|
|
87
|
-
return this.selfPropsObj._max || this.selfPropsObj._max === 0 ? this.selfPropsObj._max : Infinity;
|
|
88
|
-
},
|
|
89
|
-
minNum () {
|
|
90
|
-
return this.selfPropsObj._min || this.selfPropsObj._min === 0 ? this.selfPropsObj._min : -Infinity;
|
|
91
|
-
},
|
|
92
|
-
// round, decimal, 为其他值不处理
|
|
93
|
-
round () {
|
|
94
|
-
return this.selfPropsObj._round;
|
|
95
|
-
},
|
|
96
|
-
digit () {
|
|
97
|
-
return this.round === "round"
|
|
98
|
-
? 0
|
|
99
|
-
: this.round === "decimal"
|
|
100
|
-
? Number(this.selfPropsObj._digit || 2)
|
|
101
|
-
: undefined;
|
|
102
|
-
},
|
|
103
|
-
numberFormat () {
|
|
104
|
-
return this.selfPropsObj._numberFormat;
|
|
105
|
-
},
|
|
106
|
-
unit () {
|
|
107
|
-
return this.selfPropsObj._unit;
|
|
108
|
-
},
|
|
109
|
-
unitStr () {
|
|
110
|
-
return this.numberFormat === "percent"
|
|
111
|
-
? "%"
|
|
112
|
-
: this.unit
|
|
113
|
-
? `${this.unit}`
|
|
114
|
-
: "";
|
|
115
|
-
},
|
|
116
|
-
separator () {
|
|
117
|
-
return this.selfPropsObj._separator;
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
step () {
|
|
121
|
-
return this.selfPropsObj._step;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
70
|
+
computed: {},
|
|
124
71
|
created () {},
|
|
125
72
|
methods: {}
|
|
126
73
|
};
|
|
@@ -90,10 +90,11 @@
|
|
|
90
90
|
...commonClass,
|
|
91
91
|
'DshCheckbox-show-auto': true
|
|
92
92
|
}"
|
|
93
|
-
:list="curValObjList"
|
|
94
93
|
itemClass="DshCheckbox-show-auto-tag"
|
|
94
|
+
:list="curValObjList"
|
|
95
95
|
></dsh-tags>
|
|
96
96
|
|
|
97
|
+
<!-- 高度不自由(不换行) -->
|
|
97
98
|
<bri-tooltip
|
|
98
99
|
v-else
|
|
99
100
|
:content="showMulVal"
|
|
@@ -104,8 +105,8 @@
|
|
|
104
105
|
...commonClass,
|
|
105
106
|
'DshCheckbox-show-ellipsis': true
|
|
106
107
|
}"
|
|
107
|
-
:list="curValObjList"
|
|
108
108
|
itemClass="DshCheckbox-show-ellipsis-tag"
|
|
109
|
+
:list="curValObjList"
|
|
109
110
|
></dsh-tags>
|
|
110
111
|
</bri-tooltip>
|
|
111
112
|
</template>
|
|
@@ -96,10 +96,11 @@
|
|
|
96
96
|
...commonClass,
|
|
97
97
|
'DshSelect-show-auto': true
|
|
98
98
|
}"
|
|
99
|
-
:list="[curValObj]"
|
|
100
99
|
itemClass="DshSelect-show-auto-tag"
|
|
100
|
+
:list="[curValObj]"
|
|
101
101
|
></dsh-tags>
|
|
102
102
|
|
|
103
|
+
<!-- 高度不自由(不换行) -->
|
|
103
104
|
<bri-tooltip
|
|
104
105
|
v-else
|
|
105
106
|
:content="showVal"
|
|
@@ -110,8 +111,8 @@
|
|
|
110
111
|
...commonClass,
|
|
111
112
|
'DshSelect-show-ellipsis': true
|
|
112
113
|
}"
|
|
113
|
-
:list="[curValObj]"
|
|
114
114
|
itemClass="DshSelect-show-ellipsis-tag"
|
|
115
|
+
:list="[curValObj]"
|
|
115
116
|
></dsh-tags>
|
|
116
117
|
</bri-tooltip>
|
|
117
118
|
</template>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
>
|
|
31
31
|
<!-- 有值 -->
|
|
32
32
|
<template v-if="!$isEmptyData(curVal)">
|
|
33
|
-
<!-- 高度自由时
|
|
33
|
+
<!-- 高度自由时 -->
|
|
34
34
|
<dsh-tags
|
|
35
35
|
v-if="isHeightAuto"
|
|
36
36
|
:class="{
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
itemClass="DshSwitch-show-auto-tag"
|
|
42
42
|
></dsh-tags>
|
|
43
43
|
|
|
44
|
+
<!-- 高度不自由(不换行) -->
|
|
44
45
|
<bri-tooltip
|
|
45
46
|
v-else
|
|
46
47
|
:content="showVal"
|
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
&-tag {
|
|
19
19
|
.dsh-ellipsis();
|
|
20
|
+
display: inline-block;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
height: 24px;
|
|
23
|
+
min-height: 24px;
|
|
24
|
+
padding: 4px 8px;
|
|
25
|
+
margin: 2px 0px;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
line-height: 16px;
|
|
28
|
+
font-size: 12px;
|
|
20
29
|
}
|
|
21
30
|
}
|
|
22
31
|
}
|
|
@@ -30,8 +39,9 @@
|
|
|
30
39
|
.ivu-@{control-type}-wrapper {
|
|
31
40
|
height: auto;
|
|
32
41
|
padding: 6px 0px;
|
|
42
|
+
margin-top: 2px;
|
|
43
|
+
margin-bottom: 2px;
|
|
33
44
|
margin-right: 12px;
|
|
34
|
-
margin-top: 4px;
|
|
35
45
|
white-space: normal;
|
|
36
46
|
|
|
37
47
|
.ivu-@{control-type} {
|
|
@@ -33,7 +33,7 @@ const componentNameMap = {
|
|
|
33
33
|
|
|
34
34
|
users: "selectUsers",
|
|
35
35
|
departments: "selectDepartments",
|
|
36
|
-
labels: "
|
|
36
|
+
labels: "DshLabels",
|
|
37
37
|
package: "DshPackage",
|
|
38
38
|
flatTable: "flatTable",
|
|
39
39
|
cascaderTable: "cascaderTable",
|
|
@@ -66,7 +66,7 @@ const pathMap = {
|
|
|
66
66
|
senior: {
|
|
67
67
|
selectUsers: "./senior/selectUsers/selectUsers.vue",
|
|
68
68
|
selectDepartments: "./senior/selectDepartments.vue",
|
|
69
|
-
|
|
69
|
+
DshLabels: "./senior/DshLabels.vue",
|
|
70
70
|
DshPackage: "./senior/DshPackage.vue",
|
|
71
71
|
flatTable: "./senior/flatTable.vue",
|
|
72
72
|
cascaderTable: "./senior/cascaderTable"
|
|
@@ -163,16 +163,6 @@ export default {
|
|
|
163
163
|
"bri-control-nodata": this.$isEmptyData(this.curVal)
|
|
164
164
|
};
|
|
165
165
|
},
|
|
166
|
-
commonClass2 () {
|
|
167
|
-
return {
|
|
168
|
-
"bri-control-edit": this.canEdit && !this.disabled,
|
|
169
|
-
"bri-control-disabled": this.canEdit && this.disabled,
|
|
170
|
-
"bri-control-unit": this.isUnitShow,
|
|
171
|
-
"bri-control-show": this.isDetailShow,
|
|
172
|
-
[`control-show-${this.showStatusMode}${this.isTagShow ? "-tag" : ""}`]: this.isDetailShow,
|
|
173
|
-
"bri-control-nodata": this.$isEmptyData(this.curVal)
|
|
174
|
-
};
|
|
175
|
-
},
|
|
176
166
|
|
|
177
167
|
/* ----- 单元格相关 ----- */
|
|
178
168
|
unitAlign () {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import controlMixin from "./controlMixin.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
mixins: [
|
|
5
|
+
controlMixin
|
|
6
|
+
],
|
|
7
|
+
components: {},
|
|
8
|
+
props: {},
|
|
9
|
+
data () {
|
|
10
|
+
return {};
|
|
11
|
+
},
|
|
12
|
+
computed: {
|
|
13
|
+
selfPropsObj () {
|
|
14
|
+
return {
|
|
15
|
+
_numberFormat: "normal", // 子类型 "normal", "percent"
|
|
16
|
+
|
|
17
|
+
_unit: "", // 常规-单位
|
|
18
|
+
_separator: true, // 常规-千位分隔符
|
|
19
|
+
_showProgress: false, // 百分比-进度条展示(列表)
|
|
20
|
+
_strokeWidth: 12, // 百分比-进度条宽(高)
|
|
21
|
+
_overflowColor: "#87d068", // 百分比-进度条超100%颜色
|
|
22
|
+
_compeleteColor: "#87d068", // 百分比-进度条100%颜色
|
|
23
|
+
_lessColor: "#108ee9", // 百分比-进度条低于100%颜色
|
|
24
|
+
|
|
25
|
+
_round: "decimal", // 取值方式 "decimal", "round", "normal"
|
|
26
|
+
_digit: "2", // 保留小数位数 "1", "2", "3", "4"
|
|
27
|
+
_max: null, // 最大值
|
|
28
|
+
_min: null, // 最小值
|
|
29
|
+
|
|
30
|
+
...this.propsObj,
|
|
31
|
+
...this.commonDealPropsObj
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
subType () {
|
|
35
|
+
return this.selfPropsObj._numberFormat;
|
|
36
|
+
},
|
|
37
|
+
step () {
|
|
38
|
+
return this.selfPropsObj._step;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
unit () {
|
|
42
|
+
return this.selfPropsObj._unit;
|
|
43
|
+
},
|
|
44
|
+
unitStr () {
|
|
45
|
+
return this.subType === "percent"
|
|
46
|
+
? "%"
|
|
47
|
+
: this.unit
|
|
48
|
+
? `${this.unit}`
|
|
49
|
+
: "";
|
|
50
|
+
},
|
|
51
|
+
separator () {
|
|
52
|
+
return this.selfPropsObj._separator;
|
|
53
|
+
},
|
|
54
|
+
formatterFunc () {
|
|
55
|
+
return this.separator
|
|
56
|
+
? this.$numToSeparator
|
|
57
|
+
: value => `${value}`;
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
showProgress () {
|
|
61
|
+
return this.selfPropsObj._showProgress;
|
|
62
|
+
},
|
|
63
|
+
// 进度条方式使用(此处先这样,实际是进度条使用要受0-100的数值范围限制)
|
|
64
|
+
strokeWidth () {
|
|
65
|
+
return this.selfPropsObj._strokeWidth;
|
|
66
|
+
},
|
|
67
|
+
statusColor () {
|
|
68
|
+
return this.curVal > 100
|
|
69
|
+
? this.selfPropsObj._overflowColor
|
|
70
|
+
: this.curVal === 100
|
|
71
|
+
? this.selfPropsObj._compeleteColor
|
|
72
|
+
: this.selfPropsObj._lessColor;
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
round () {
|
|
76
|
+
return this.selfPropsObj._round;
|
|
77
|
+
},
|
|
78
|
+
digit () {
|
|
79
|
+
return this.round === "round"
|
|
80
|
+
? 0
|
|
81
|
+
: this.round === "decimal"
|
|
82
|
+
? Number(this.selfPropsObj._digit || 2)
|
|
83
|
+
: undefined;
|
|
84
|
+
},
|
|
85
|
+
maxNum () {
|
|
86
|
+
return this.selfPropsObj._max || this.selfPropsObj._max === 0
|
|
87
|
+
? this.selfPropsObj._max
|
|
88
|
+
: Infinity;
|
|
89
|
+
},
|
|
90
|
+
minNum () {
|
|
91
|
+
return this.selfPropsObj._min || this.selfPropsObj._min === 0
|
|
92
|
+
? this.selfPropsObj._min
|
|
93
|
+
: -Infinity;
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
progressNum () {
|
|
97
|
+
return this.$isEmptyData(this.curVal) || this.curVal < 0
|
|
98
|
+
? 0
|
|
99
|
+
: Math.round((this.curVal > 100 ? 100 : this.curVal) * 100) / 100;
|
|
100
|
+
},
|
|
101
|
+
progressStr () {
|
|
102
|
+
return this.$numToStrAndUnit(this.$isEmptyData(this.curVal) ? 0 : this.curVal, this.selfPropsObj);
|
|
103
|
+
},
|
|
104
|
+
showVal () {
|
|
105
|
+
return this.$isEmptyData(this.curVal)
|
|
106
|
+
? this.emptyShowVal
|
|
107
|
+
: this.$numToStrAndUnit(this.curVal, this.selfPropsObj);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
created () { },
|
|
111
|
+
methods: {}
|
|
112
|
+
};
|
|
@@ -1,118 +1,140 @@
|
|
|
1
|
-
<!-- 动态标签 -->
|
|
2
1
|
<template>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
<!-- 编辑 -->
|
|
3
|
+
<div
|
|
4
|
+
v-if="canEdit"
|
|
5
|
+
class="DshLabels"
|
|
6
|
+
>
|
|
7
|
+
<Dropdown
|
|
8
|
+
class="DshLabels-dropdown"
|
|
9
|
+
trigger="custom"
|
|
10
|
+
placement="bottom-start"
|
|
11
|
+
:visible="isVisible"
|
|
12
|
+
transfer
|
|
13
|
+
@on-clickoutside="clickInput"
|
|
14
|
+
>
|
|
15
|
+
<!-- 可编辑 -->
|
|
16
|
+
<dsh-control-input
|
|
17
|
+
:class="commonClass"
|
|
18
|
+
:value="curValList"
|
|
19
|
+
:disabled="disabled"
|
|
20
|
+
:heightAuto="isHeightAuto"
|
|
21
|
+
:propsObj="selfPropsObj"
|
|
22
|
+
@deleteItem="clickDeleteItem"
|
|
23
|
+
@clear="clickClear"
|
|
24
|
+
@click.native="clickInput"
|
|
25
|
+
></dsh-control-input>
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
<template #list>
|
|
28
|
+
<DropdownMenu class="DshLabels-dropdown-menu">
|
|
29
|
+
<DropdownItem
|
|
30
|
+
v-for="listItem in listData"
|
|
31
|
+
:key="listItem._key"
|
|
32
|
+
:class="{
|
|
33
|
+
'item': true,
|
|
34
|
+
'item-active': !!curValList.find(item => item._key === listItem._key)
|
|
35
|
+
}"
|
|
36
|
+
@click.native="clickItem(listItem)"
|
|
37
|
+
>
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
<div
|
|
40
|
+
v-if="listItem.isEdit"
|
|
41
|
+
class="item-edit"
|
|
42
|
+
>
|
|
43
|
+
<Input
|
|
44
|
+
v-model="listItem.name"
|
|
45
|
+
@click.native="clickEditInput($event)"
|
|
40
46
|
>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/>
|
|
51
|
-
</template>
|
|
52
|
-
</Input>
|
|
53
|
-
</div>
|
|
47
|
+
<template #suffix>
|
|
48
|
+
<Icon
|
|
49
|
+
color="#3DB8C5"
|
|
50
|
+
custom="bri bri-duigou"
|
|
51
|
+
@click.native.stop="clickConfirm(listItem)"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
54
|
+
</Input>
|
|
55
|
+
</div>
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
<div
|
|
58
|
+
v-else
|
|
59
|
+
class="item-show"
|
|
60
|
+
>
|
|
61
|
+
{{ listItem.name }}
|
|
62
|
+
<span class="item-show-icons">
|
|
63
|
+
<Icon
|
|
64
|
+
v-if="!listItem.coreLabel"
|
|
65
|
+
class="item-show-icons-edit"
|
|
66
|
+
custom="bri bri-bianji"
|
|
67
|
+
@click.stop="clickEditIcon(listItem)"
|
|
68
|
+
/>
|
|
69
|
+
<!-- 暂时不需要删除 -->
|
|
70
|
+
<!-- <Icon
|
|
69
71
|
class="item-show-icons-del"
|
|
70
72
|
custom="bri bri-shanchu"
|
|
71
73
|
/> -->
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
</span>
|
|
75
|
+
</div>
|
|
76
|
+
</DropdownItem>
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
<div
|
|
79
|
+
v-if="!onlySelect"
|
|
80
|
+
class="btns"
|
|
81
|
+
>
|
|
82
|
+
<bri-button
|
|
83
|
+
class="btns-add"
|
|
84
|
+
:propsObj="{
|
|
83
85
|
btnType: 'default',
|
|
84
86
|
icon:'md-add'
|
|
85
87
|
}"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
@click.native.stop="clickAddItem"
|
|
89
|
+
>添加选项</bri-button>
|
|
90
|
+
</div>
|
|
91
|
+
</DropdownMenu>
|
|
92
|
+
</template>
|
|
93
|
+
</Dropdown>
|
|
94
|
+
</div>
|
|
93
95
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
<!-- 查看 -->
|
|
97
|
+
<div
|
|
98
|
+
v-else
|
|
99
|
+
class="DshLabels-show"
|
|
100
|
+
>
|
|
101
|
+
<!-- 有值 -->
|
|
102
|
+
<template v-if="!$isEmptyData(curValList)">
|
|
103
|
+
<!-- 高度自由时 -->
|
|
104
|
+
<dsh-tags
|
|
105
|
+
v-if="isHeightAuto"
|
|
106
|
+
:class="{
|
|
107
|
+
...commonClass,
|
|
108
|
+
'DshLabels-show-auto': true
|
|
109
|
+
}"
|
|
110
|
+
itemClass="DshLabels-show-auto-tag"
|
|
111
|
+
:list="curValList"
|
|
112
|
+
></dsh-tags>
|
|
113
|
+
|
|
114
|
+
<!-- 高度不自由(不换行) -->
|
|
96
115
|
<bri-tooltip
|
|
97
|
-
|
|
98
|
-
|
|
116
|
+
v-else
|
|
117
|
+
:content="showMulVal"
|
|
99
118
|
:transfer="true"
|
|
100
119
|
>
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<template v-else>
|
|
111
|
-
{{ emptyShowVal }}
|
|
112
|
-
</template>
|
|
113
|
-
</div>
|
|
120
|
+
<dsh-tags
|
|
121
|
+
:class="{
|
|
122
|
+
...commonClass,
|
|
123
|
+
'DshLabels-show-ellipsis': true
|
|
124
|
+
}"
|
|
125
|
+
itemClass="DshLabels-show-ellipsis-tag"
|
|
126
|
+
:list="curValList"
|
|
127
|
+
></dsh-tags>
|
|
114
128
|
</bri-tooltip>
|
|
115
129
|
</template>
|
|
130
|
+
|
|
131
|
+
<!-- 无值 -->
|
|
132
|
+
<div
|
|
133
|
+
v-else
|
|
134
|
+
:class="commonClass"
|
|
135
|
+
>
|
|
136
|
+
{{ emptyShowVal }}
|
|
137
|
+
</div>
|
|
116
138
|
</div>
|
|
117
139
|
</template>
|
|
118
140
|
|
|
@@ -120,7 +142,7 @@
|
|
|
120
142
|
import controlMixin from "../mixins/controlMixin.js";
|
|
121
143
|
|
|
122
144
|
export default {
|
|
123
|
-
name: "
|
|
145
|
+
name: "DshLabels",
|
|
124
146
|
mixins: [
|
|
125
147
|
controlMixin
|
|
126
148
|
],
|
|
@@ -153,7 +175,7 @@
|
|
|
153
175
|
return this.selfPropsObj._originLabels;
|
|
154
176
|
},
|
|
155
177
|
|
|
156
|
-
|
|
178
|
+
showMulVal () {
|
|
157
179
|
return this.$isEmptyData(this.curValList)
|
|
158
180
|
? this.emptyShowVal
|
|
159
181
|
: this.curValList.map(item => item.name).join("、");
|
|
@@ -246,8 +268,10 @@
|
|
|
246
268
|
</script>
|
|
247
269
|
|
|
248
270
|
<style lang="less">
|
|
249
|
-
.
|
|
250
|
-
|
|
271
|
+
@import url("../control.less");
|
|
272
|
+
|
|
273
|
+
.DshLabels {
|
|
274
|
+
#control-show();
|
|
251
275
|
|
|
252
276
|
&-dropdown {
|
|
253
277
|
width: 100%;
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
>
|
|
7
7
|
<bri-tooltip
|
|
8
8
|
:content="showVal"
|
|
9
|
-
placement="top"
|
|
10
|
-
maxWidth="200"
|
|
11
9
|
:transfer="true"
|
|
12
10
|
>
|
|
13
11
|
<div @click="clickInput">
|
|
@@ -135,8 +133,6 @@
|
|
|
135
133
|
<bri-tooltip
|
|
136
134
|
v-else
|
|
137
135
|
:content="showVal"
|
|
138
|
-
placement="top"
|
|
139
|
-
maxWidth="200"
|
|
140
136
|
:transfer="true"
|
|
141
137
|
>
|
|
142
138
|
<dsh-tags
|
|
@@ -323,23 +319,19 @@
|
|
|
323
319
|
};
|
|
324
320
|
</script>
|
|
325
321
|
|
|
326
|
-
<style lang="less"
|
|
322
|
+
<style lang="less">
|
|
327
323
|
@import url("../control.less");
|
|
328
324
|
|
|
329
325
|
.selectDepartments {
|
|
330
|
-
width: 100%;
|
|
331
|
-
|
|
332
326
|
#control-show();
|
|
327
|
+
|
|
333
328
|
&-show {
|
|
334
329
|
&-auto,
|
|
335
330
|
&-ellipsis {
|
|
336
331
|
margin: 2px 0px;
|
|
337
332
|
}
|
|
338
333
|
}
|
|
339
|
-
|
|
340
|
-
</style>
|
|
341
|
-
<style lang="less">
|
|
342
|
-
.selectDepartments {
|
|
334
|
+
|
|
343
335
|
// 提示框的
|
|
344
336
|
&-tip {
|
|
345
337
|
&-modal {
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
>
|
|
7
7
|
<bri-tooltip
|
|
8
8
|
:content="showVal"
|
|
9
|
-
placement="top"
|
|
10
|
-
maxWidth="200"
|
|
11
9
|
:transfer="true"
|
|
12
10
|
>
|
|
13
11
|
<div @click="clickInput">
|
|
@@ -190,7 +188,7 @@
|
|
|
190
188
|
class="selectUsers-show-unit-img"
|
|
191
189
|
/>
|
|
192
190
|
<span
|
|
193
|
-
:key="item._key + '
|
|
191
|
+
:key="item._key + 'span'"
|
|
194
192
|
class="selectUsers-show-unit-text"
|
|
195
193
|
>
|
|
196
194
|
{{ getShowName(item) }}
|
|
@@ -202,8 +200,6 @@
|
|
|
202
200
|
<bri-tooltip
|
|
203
201
|
v-else
|
|
204
202
|
:content="showVal"
|
|
205
|
-
placement="top"
|
|
206
|
-
maxWidth="200"
|
|
207
203
|
:transfer="true"
|
|
208
204
|
>
|
|
209
205
|
<div :class="{
|
|
@@ -245,8 +241,6 @@
|
|
|
245
241
|
<bri-tooltip
|
|
246
242
|
v-else
|
|
247
243
|
:content="showVal"
|
|
248
|
-
placement="top"
|
|
249
|
-
maxWidth="200"
|
|
250
244
|
:transfer="true"
|
|
251
245
|
>
|
|
252
246
|
<dsh-tags
|
|
@@ -539,9 +533,8 @@
|
|
|
539
533
|
@import url("../../control.less");
|
|
540
534
|
|
|
541
535
|
.selectUsers {
|
|
542
|
-
width: 100%;
|
|
543
|
-
|
|
544
536
|
#control-show();
|
|
537
|
+
|
|
545
538
|
&-show {
|
|
546
539
|
&-auto,
|
|
547
540
|
&-ellipsis {
|
|
@@ -567,10 +560,7 @@
|
|
|
567
560
|
}
|
|
568
561
|
}
|
|
569
562
|
}
|
|
570
|
-
|
|
571
|
-
</style>
|
|
572
|
-
<style lang="less">
|
|
573
|
-
.selectUsers {
|
|
563
|
+
|
|
574
564
|
// 提示框的
|
|
575
565
|
&-tip {
|
|
576
566
|
&-modal {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:extraOperationList="extraOperationList"
|
|
12
12
|
:propsObj="listPropsObj"
|
|
13
13
|
:changedFields="changedFields"
|
|
14
|
-
:isLoading="listPropsObj && listPropsObj.isLoading"
|
|
14
|
+
:isLoading="isLoading ? isLoading : listPropsObj && listPropsObj.isLoading"
|
|
15
15
|
:noDataText="listPropsObj && listPropsObj.noDataText || '暂无数据…'"
|
|
16
16
|
@clickRow="clickRow"
|
|
17
17
|
@sortChange="changeSort"
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
return [];
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
+
isLoading: Boolean,
|
|
115
116
|
listPropsObj: Object,
|
|
116
117
|
|
|
117
118
|
pageMode: String,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
height: 100%;
|
|
10
10
|
overflow: auto;
|
|
11
11
|
word-break: break-word;
|
|
12
|
+
position: relative;
|
|
12
13
|
|
|
13
14
|
td {
|
|
14
15
|
white-space: normal !important;
|
|
@@ -144,6 +145,9 @@
|
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
&-empty {
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0px;
|
|
150
|
+
left: 0px;
|
|
147
151
|
width: 100%;
|
|
148
152
|
height: 100%;
|
|
149
153
|
padding: 9px 16px;
|