Merge remote-tracking branch 'origin/build' into build

This commit is contained in:
aixianling
2023-03-09 11:09:01 +08:00
18 changed files with 578 additions and 9 deletions

View File

@@ -17,10 +17,11 @@ import Border2 from "./borders/border2";
import Border3 from "./borders/border3";
import Border4 from "./borders/border4";
import Border5 from "./borders/border5";
import border6 from "./borders/border6";
export default {
name: "AiDvPanel",
components: { Border0, Border1, Border2, Border3, Border4, Border5 },
components: { Border0, Border1, Border2, Border3, Border4, Border5, border6 },
props: {
title: {default: "请传入标题"},
border: {default: "border0"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,53 @@
<template>
<section class="border6">
<h2>{{ title }}</h2>
<div class="slot">
<slot/>
</div>
</section>
</template>
<script>
export default {
name: 'border6',
props: {
title: String
}
}
</script>
<style lang="scss" scoped>
.border6 {
height: 100%;
h2 {
position: relative;
height: 40px;
line-height: 26px;
padding: 4px 0 0 22px;
color: #fff;
font-size: 22px;
background-image: url(../asset/title6.png);
background-position: bottom;
background-size: 100% 7px;
background-repeat: no-repeat;
&:after {
position: absolute;
top: 16px;
left: 0;
z-index: 1;
width: 6px;
height: 6px;
border-radius: 50%;
background: #52575aff;
content: '';
}
}
.slot {
height: calc(100% - 40px);
padding-top: 19px;
}
}
</style>

View File

@@ -17,6 +17,7 @@
import Summary9 from './components/Summary9'
import Summary10 from './components/Summary10'
import Summary11 from './components/Summary11'
import Summary12 from './components/Summary12'
export default {
name: 'AiDvSummary',
@@ -33,7 +34,8 @@
Summary8,
Summary9,
Summary10,
Summary11
Summary11,
Summary12
},
props: {

View File

@@ -0,0 +1,76 @@
<template>
<div class="summary12">
<div class="summary12-item" v-for="(item, index) in data" :key="index" v-if="index < 4">
<h2>{{ item[keys] }}</h2>
<p>{{ item[value] }}</p>
</div>
</div>
</template>
<script>
export default {
name: 'summary6',
props: {
data: {
type: Array,
default: () => []
},
keys: {
type: String,
default: 'key'
},
value: {
type: String,
default: 'value'
}
},
data () {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.summary12 {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
width: 100%;
height: 100%;
div {
box-sizing: border-box;
}
.summary12-item {
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
h2 {
line-height: 20px;
margin-bottom: 12px;
color: #C4D8DB;
font-size: 16px;
font-weight: normal;
}
p {
font-size: 44px;
color: #02FEFF;
font-weight: 700;
text-align: left;
}
}
}
</style>

View File

@@ -0,0 +1,200 @@
<template>
<div class="aiDvTable">
<div class="header">
<span
v-for="(item, index) in header"
:key="index"
:style="{
width: item.width + 'px',
textAlign: item.align,
flex: item.width ? 'inherit' : 1
}">
{{ item.v }}
</span>
</div>
<div class="body">
<div class="row" v-for="(item, index) in body" :class="[stripe === '1' ? 'stripe' : '']" :key="index">
<div
v-for="(column, i) in item"
:key="i"
:style="{
color: column.color,
textAlign: column.align,
width: column.width + 'px',
flex: column.width ? 'inherit' : 1
}">
<i v-if="isShowIndex === '1' && i === 0">{{ index + 1 }}</i>
<span>{{ column.v }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'AiDvTable',
props: {
data: {
type: Array,
default: () => []
},
isShowIndex: {
type: String,
default: '0'
},
stripe: {
type: String,
default: '1'
}
},
data () {
return {
header: [],
body: [],
colorIndex: ''
}
},
watch: {
data: {
handler (v) {
this.init(v)
},
deep: true,
immediate: true
}
},
mounted () {
},
methods: {
init (value) {
if (!value.length) {
this.header = []
this.body = []
return false
}
const headerKey = Object.keys(value[0])[0]
const bodyKey = Object.keys(value[0]).filter(v => {
return v !== headerKey && v !== 'color' && v !== 'width'
})
this.header = value.map(v => {
return {
v: v[headerKey],
align: v.align,
width: Number(v.width || 0) ? (Number(v.width || 0) + (this.isShowIndex === '1' ? 0 : 0)) : ''
}
})
this.body = bodyKey.map(v => {
return value.map(e => {
return {
v: e[v],
color: e.color,
align: e.align,
width: e.width || ''
}
})
})
}
}
}
</script>
<style lang="scss" scoped>
.aiDvTable {
height: 100%;
overflow: hidden;
.header {
display: flex;
align-items: center;
width: 100%;
height: 40px;
padding: 0 20px;
background: rgba(70, 70, 70, 0.35);
span {
flex: 1;
font-size: 16px;
text-align: center;
color: rgba(255, 255, 255, 0.7);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
&:first-child {
text-align: left;
}
}
}
.body {
height: calc(100% - 40px);
padding: 10px 0;
overflow-y: auto;
box-sizing: border-box;
.row {
display: flex;
align-items: center;
width: 100%;
height: 52px;
padding: 0 20px;
box-sizing: border-box;
&.stripe:nth-of-type(2n) {
background: rgba(48, 48, 48, 0.4);
}
div {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
font-size: 16px;
text-align: center;
color: #ffffff;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
span {
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
i {
width: 20px;
height: 20px;
line-height: 20px;
margin-right: 10px;
text-align: center;
font-size: 12px;
color: #18FEFE;
font-style: normal;
background: url(./asset/rankbg.png) no-repeat;
background-size: 100% 100%;
}
&:first-child {
justify-content: start;
text-align: left;
}
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

View File

@@ -0,0 +1,142 @@
<template>
<div class="AiRanking">
<div class="AiRanking-item" v-for="(item, index) in list" :key="index">
<i>{{ index + 1 }}</i>
<h2>{{ item.name }}</h2>
<span>{{ item.value }}</span>
<div class="AiRanking-item__rate" :style="{width: item.rate + '%'}">
<div class="bar">
<span></span>
<i></i>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'AiRanking',
props: {
data: {
type: Array,
default: () => []
}
},
watch: {
data: {
handler (v) {
this.init(v)
},
deep: true,
immediate: true
}
},
data () {
return {
list: []
}
},
methods: {
init (v) {
if (!v.length) {
this.list = []
return false
}
const total = this.sum(v.map(v => v.value))
this.list = v.map(e => {
return {
...e,
rate: ((Number(e.value) / total) * 100).toFixed(2)
}
})
},
sum (arr) {
return arr.reduce((x, y) => x + y)
}
}
}
</script>
<style lang="scss" scoped>
.AiRanking {
* {
box-sizing: border-box;
}
.AiRanking-item {
display: flex;
align-items: center;
height: 36px;
margin-bottom: 16px;
padding-right: 18px;
background: url(./asset/ranking1.png) no-repeat;
background-size: 100% 100%;
.AiRanking-item__rate {
position: relative;
.bar {
position: relative;
width: calc(100% - 6px);
height: 6px;
background: linear-gradient(90deg, #ffbb45ff 0%, #76f7b8ff 98%);
i {
position: absolute;
right: 0;
top: 50%;
z-index: 12;
width: 22px;
height: 22px;
border: 1px solid #596269;
border-radius: 50%;
transform: translate(50%, -50%);
}
span {
position: absolute;
right: 0;
top: 50%;
z-index: 11;
width: 10px;
height: 10px;
border-radius: 50%;
background: #e1ffee;
box-shadow: 0 0 10px 0 #26F0F7;
transform: translate(50%, -50%);
}
}
}
i {
width: 40px;
text-align: center;
font-size: 18px;
color: #fff;
font-weight: 600;
font-style: normal;
}
h2 {
width: 90px;
margin-left: 20px;
color: #fff;
font-size: 18px;
}
span {
width: 90px;
text-align: left;
font-size: 18px;
color: #fff;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB