|
@@ -1,6 +1,26 @@
|
|
<template>
|
|
<template>
|
|
- <div>
|
|
|
|
|
|
+ <div class="content white">
|
|
|
|
+ <v-container>
|
|
|
|
+ <v-row >
|
|
|
|
+ <v-col
|
|
|
|
+ v-for="elevation in elevations"
|
|
|
|
+ :key="elevation.value"
|
|
|
|
+ cols="3"
|
|
|
|
+ >
|
|
|
|
+ <v-card
|
|
|
|
+ class="pa-2"
|
|
|
|
+ tile
|
|
|
|
+ height="200"
|
|
|
|
+ >
|
|
|
|
+ <div class="d-flex align-center justify-center flex-column" style="height: 100%;">
|
|
|
|
+ <div class="text-h3" :class="`${elevation.textColor}--text`">{{ itemData[elevation.value] }}</div>
|
|
|
|
+ <div>{{ elevation.text }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </v-card>
|
|
|
|
+ </v-col>
|
|
|
|
+ </v-row>
|
|
|
|
|
|
|
|
+ </v-container>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -10,6 +30,20 @@ import {
|
|
} from '@/api/dataChart'
|
|
} from '@/api/dataChart'
|
|
export default {
|
|
export default {
|
|
name: 'modelStatistics',
|
|
name: 'modelStatistics',
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ elevations: [
|
|
|
|
+ { text: '总反馈数', value: 'total_feedback', textColor: 'primary' },
|
|
|
|
+ { text: '正向反馈数', value: 'positive_feedback', textColor: 'success' },
|
|
|
|
+ { text: '负向反馈数', value: 'negative_feedback', textColor: 'error' },
|
|
|
|
+ { text: '已训练反馈数', value: 'trained_feedback', textColor: 'indigo' },
|
|
|
|
+ { text: '未训练反馈数', value: 'untrained_feedback', textColor: 'warning' },
|
|
|
|
+ { text: '正向反馈率', value: 'positive_rate', textColor: 'primary' },
|
|
|
|
+ { text: '训练覆盖率', value: 'training_rate', textColor: 'primary' }
|
|
|
|
+ ],
|
|
|
|
+ itemData: {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
created () {
|
|
created () {
|
|
this.init()
|
|
this.init()
|
|
},
|
|
},
|
|
@@ -17,7 +51,7 @@ export default {
|
|
async init () {
|
|
async init () {
|
|
try {
|
|
try {
|
|
const { data } = await getFeedbackStats()
|
|
const { data } = await getFeedbackStats()
|
|
- console.log(data)
|
|
|
|
|
|
+ this.itemData = data
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.$snackbar.error(error)
|
|
this.$snackbar.error(error)
|
|
}
|
|
}
|
|
@@ -27,5 +61,7 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-
|
|
|
|
|
|
+.content {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|