lambo-design-bi 0.0.182 → 0.0.183
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.
|
@@ -107,7 +107,7 @@ export default {
|
|
|
107
107
|
if (rows && rows.length > 0) {
|
|
108
108
|
let rowData = rows[0]
|
|
109
109
|
if(rowData && Object.prototype.hasOwnProperty.call(rowData, "val")){
|
|
110
|
-
this.chartsNote = rowData["val"]
|
|
110
|
+
this.chartsNote = rowData["val"] || ''
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
} else {
|
package/bi/widget/num/index.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<LamboNumberInfoBi :title="title" :sub-title="subTitle" :num="num" :sub-num1="subNum1" :trend1="trend1"
|
|
3
|
-
:is-drill="isDrill" @on-drill="onDrill" :sub-num2="subNum2" :trend2="trend2" :polar1="polar1" :polar2="polar2">
|
|
3
|
+
:is-drill="isDrill" @on-drill="onDrill" :sub-num2="subNum2" :trend2="trend2" :polar1="polar1" :polar2="polar2" :eva-level="evaLevel">
|
|
4
4
|
</LamboNumberInfoBi>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
@@ -41,7 +41,8 @@ export default {
|
|
|
41
41
|
drillK2: null,
|
|
42
42
|
drillV2: null,
|
|
43
43
|
drillK3: null,
|
|
44
|
-
dirllV3: null
|
|
44
|
+
dirllV3: null,
|
|
45
|
+
evaLevel: null
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
methods: {
|
|
@@ -90,6 +91,9 @@ export default {
|
|
|
90
91
|
this.drillK3 = row['drill_k3'] || ''
|
|
91
92
|
this.drillV3 = row['drill_v3'] || ''
|
|
92
93
|
}
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(row, 'eva_level')) {
|
|
95
|
+
this.evaLevel = row['eva_level'] || ''
|
|
96
|
+
}
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
}
|
|
@@ -8,7 +8,7 @@ import BiRow2 from "../layout/row2.vue"
|
|
|
8
8
|
import BiCol from "../layout/col.vue"
|
|
9
9
|
import BiDetailTable from "../table/detail-table.vue"
|
|
10
10
|
import BiCharts from "../charts/index.vue"
|
|
11
|
-
import BiTextGroup from '../text/text-group.vue'
|
|
11
|
+
import BiTextGroup from '../text/text-group.vue'
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Strictly define the order to prevent circular references. For component reuse, copy new components instead of direct references.
|
package/package.json
CHANGED
|
@@ -1,158 +1,187 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="ivu-number-info">
|
|
3
|
-
<div class="ivu-number-info-title-lambo title-div" :class="{ 'isDrill': isDrill }" v-if="title
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.title-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ivu-number-info">
|
|
3
|
+
<div class="ivu-number-info-title-lambo title-div" :class="{ 'isDrill': isDrill }" v-if="title" @click="drill">
|
|
4
|
+
<slot name="title">{{ title }}</slot>
|
|
5
|
+
<div class="cd-right-top">
|
|
6
|
+
<Icon v-if="isDrill" type="ios-redo-outline" />
|
|
7
|
+
|
|
8
|
+
<img class="badge-img" v-if="evaLevel == 'high'"
|
|
9
|
+
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M32 0 L32 32 L0 0 Z' fill='%2321DA2E'/%3E%3Ctext x='24' y='12' font-size='12' font-weight='bold' text-anchor='end' fill='white' font-family='system-ui, sans-serif'%3E优%3C/text%3E%3C/svg%3E"
|
|
10
|
+
alt="优">
|
|
11
|
+
<img class="badge-img" v-if="evaLevel == 'mid'"
|
|
12
|
+
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M32 0 L32 32 L0 0 Z' fill='%231E58F8'/%3E%3Ctext x='24' y='12' font-size='12' font-weight='bold' text-anchor='end' fill='white' font-family='system-ui, sans-serif'%3E中%3C/text%3E%3C/svg%3E"
|
|
13
|
+
alt="中">
|
|
14
|
+
<img class="badge-img" v-if="evaLevel == 'low'"
|
|
15
|
+
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M32 0 L32 32 L0 0 Z' fill='%23ff9900'/%3E%3Ctext x='24' y='12' font-size='12' font-weight='bold' text-anchor='end' fill='white' font-family='system-ui, sans-serif'%3E低%3C/text%3E%3C/svg%3E"
|
|
16
|
+
alt="低">
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
<div v-if="subTitle" class="ivu-number-info-subTitle">
|
|
21
|
+
<slot name="subTitle">{{ subTitle }}</slot>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="ivu-number-info-value-lambo" :style="valueStyle">
|
|
24
|
+
<span class="ivu-number-info-total">
|
|
25
|
+
<slot name="num">{{ num }}</slot>
|
|
26
|
+
</span>
|
|
27
|
+
<span class="ivu-number-info-subTotal" v-if="subNum1 || subNum2">
|
|
28
|
+
<slot name="subNum">
|
|
29
|
+
<template v-if="subNum1">
|
|
30
|
+
<template v-if="trend1">
|
|
31
|
+
<template v-if="polar1 === 'pos'">
|
|
32
|
+
<Trend :flag="trend1" text-color reverse-color>{{ subNum1 }}</Trend>
|
|
33
|
+
</template>
|
|
34
|
+
<template v-else>
|
|
35
|
+
<Trend :flag="trend1" text-color>{{ subNum1 }}</Trend>
|
|
36
|
+
</template>
|
|
37
|
+
</template>
|
|
38
|
+
<template v-else>
|
|
39
|
+
{{ subNum1 }}
|
|
40
|
+
</template>
|
|
41
|
+
</template>
|
|
42
|
+
<template v-if="subNum2">
|
|
43
|
+
<template v-if="trend2">
|
|
44
|
+
<template v-if="polar2 === 'pos'">
|
|
45
|
+
<Trend :flag="trend2" text-color reverse-color>{{ subNum2 }}</Trend>
|
|
46
|
+
</template>
|
|
47
|
+
<template v-else>
|
|
48
|
+
<Trend :flag="trend2" text-color>{{ subNum2 }}</Trend>
|
|
49
|
+
</template>
|
|
50
|
+
</template>
|
|
51
|
+
<template v-else>
|
|
52
|
+
{{ subNum2 }}
|
|
53
|
+
</template>
|
|
54
|
+
</template>
|
|
55
|
+
</slot>
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
<script>
|
|
61
|
+
import { oneOf } from 'view-ui-plus/src/utils/assist'
|
|
62
|
+
import Trend from 'view-ui-plus/src/components/trend'
|
|
63
|
+
import 'view-ui-plus/dist/styles/viewuiplus.css'
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
name: 'LamboNumberInfoBi',
|
|
67
|
+
components: { Trend },
|
|
68
|
+
props: {
|
|
69
|
+
title: {
|
|
70
|
+
type: String
|
|
71
|
+
},
|
|
72
|
+
subTitle: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: ''
|
|
75
|
+
},
|
|
76
|
+
num: {
|
|
77
|
+
type: [String, Number]
|
|
78
|
+
},
|
|
79
|
+
subNum1: {
|
|
80
|
+
type: [String, Number]
|
|
81
|
+
},
|
|
82
|
+
trend1: {
|
|
83
|
+
validator(value) {
|
|
84
|
+
return oneOf(value, ['up', 'down']);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
polar1: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: false,
|
|
90
|
+
validator(value) {
|
|
91
|
+
return !value || ['pos', 'neg'].includes(value);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
subNum2: {
|
|
95
|
+
type: [String, Number]
|
|
96
|
+
},
|
|
97
|
+
trend2: {
|
|
98
|
+
validator(value) {
|
|
99
|
+
return oneOf(value, ['up', 'down']);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
polar2: {
|
|
103
|
+
type: String,
|
|
104
|
+
required: false,
|
|
105
|
+
validator(value) {
|
|
106
|
+
return !value || ['pos', 'neg'].includes(value);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
gap: {
|
|
110
|
+
type: [String, Number],
|
|
111
|
+
default: 6
|
|
112
|
+
},
|
|
113
|
+
isDrill: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: false
|
|
116
|
+
},
|
|
117
|
+
evaLevel: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: ''
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
computed: {
|
|
123
|
+
valueStyle() {
|
|
124
|
+
return {
|
|
125
|
+
'margin-top': this.gap + 'px'
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
drill() {
|
|
131
|
+
if (this.isDrill) {
|
|
132
|
+
console.log("number-info 点击了下钻按钮")
|
|
133
|
+
this.$emit('on-drill', {})
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
</script>
|
|
139
|
+
<style scoped lang="less">
|
|
140
|
+
.ivu-number-info-value-lambo {
|
|
141
|
+
margin-top: 4px;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
font-size: 0;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
text-overflow: ellipsis;
|
|
146
|
+
word-break: break-all;
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ivu-number-info-title-lambo {
|
|
152
|
+
margin-bottom: 9px;
|
|
153
|
+
color: #17233d;
|
|
154
|
+
font-size: 16px;
|
|
155
|
+
-webkit-transition: all .2s;
|
|
156
|
+
transition: all .2s
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.title-div {
|
|
160
|
+
display: flex;
|
|
161
|
+
justify-content: space-between;
|
|
162
|
+
align-items: center;
|
|
163
|
+
transition: all 0.2s ease;
|
|
164
|
+
border-radius: 5px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.title-div.isDrill {
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.title-div.isDrill:hover {
|
|
172
|
+
transform: scale(1.02);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.cd-right-top {
|
|
176
|
+
display: flex;
|
|
177
|
+
justify-content: end;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.badge-img {
|
|
181
|
+
width: 32px;
|
|
182
|
+
height: 32px;
|
|
183
|
+
margin-top: -8px;
|
|
184
|
+
margin-right: -8px;
|
|
185
|
+
border-top-right-radius: 6px;
|
|
186
|
+
}
|
|
187
|
+
</style>
|