|
@@ -2,17 +2,27 @@
|
|
<fs-page class="fs-page-custom">
|
|
<fs-page class="fs-page-custom">
|
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
|
<template #header-middle>
|
|
<template #header-middle>
|
|
- <el-card style="height: 500px;margin-bottom: 5px;" shadow="hover">
|
|
|
|
|
|
+ <el-card style="height: 680px;margin-bottom: 5px;" shadow="hover">
|
|
|
|
|
|
<!--<line-chart :chartData="chartData"/>-->
|
|
<!--<line-chart :chartData="chartData"/>-->
|
|
<el-tabs type="border-card" @click="clickFn">
|
|
<el-tabs type="border-card" @click="clickFn">
|
|
<el-tab-pane label="数据趋势">
|
|
<el-tab-pane label="数据趋势">
|
|
|
|
+ <MetricsCards v-model="metrics" :metric-items="options" @change="changeMetric"></MetricsCards>
|
|
|
|
+ <div style="display: flex; justify-content: flex-end">
|
|
|
|
+ <el-button-group class="ml-4" style="margin-top: 10px; margin-right: 30px">
|
|
|
|
+ <el-button type="primary">日</el-button>
|
|
|
|
+ <el-button type="primary">周</el-button>
|
|
|
|
+ <el-button type="primary">月</el-button>
|
|
|
|
+ </el-button-group>
|
|
|
|
+ </div>
|
|
<BarLineChart ref="barLine" :barLineData="barLineData"/>
|
|
<BarLineChart ref="barLine" :barLineData="barLineData"/>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="广告结构">
|
|
<el-tab-pane label="广告结构">
|
|
<PieBarChart ref="pieBar"/>
|
|
<PieBarChart ref="pieBar"/>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
- <el-tab-pane label="散点透视"><ScatterChart ref="scatter"/></el-tab-pane>
|
|
|
|
|
|
+ <el-tab-pane label="散点透视">
|
|
|
|
+ <ScatterChart ref="scatter" :scatterData="scatterData"/>
|
|
|
|
+ </el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
@@ -22,16 +32,15 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import {ref, onMounted, reactive} from 'vue'
|
|
|
|
-import {useFs, FsPage} from '@fast-crud/fast-crud'
|
|
|
|
-import {createCrudOptions} from './crud'
|
|
|
|
|
|
+import { ref, onMounted, reactive } from 'vue'
|
|
|
|
+import { useFs, FsPage } from '@fast-crud/fast-crud'
|
|
|
|
+import { createCrudOptions } from './crud'
|
|
import BarLineChart from '/@/components/echartsComponents/BarLineChart.vue'
|
|
import BarLineChart from '/@/components/echartsComponents/BarLineChart.vue'
|
|
import PieBarChart from '/@/components/echartsComponents/PieBarChart.vue'
|
|
import PieBarChart from '/@/components/echartsComponents/PieBarChart.vue'
|
|
import ScatterChart from '/@/components/echartsComponents/ScatterChart.vue'
|
|
import ScatterChart from '/@/components/echartsComponents/ScatterChart.vue'
|
|
|
|
+import MetricsCards from "/@/components/MetricsCards/index.vue"
|
|
|
|
|
|
-
|
|
|
|
-const {crudBinding, crudRef, crudExpose} = useFs({createCrudOptions, context: {}})
|
|
|
|
-
|
|
|
|
|
|
+const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} })
|
|
|
|
|
|
let barLineData = reactive({
|
|
let barLineData = reactive({
|
|
xData: ['2023-10-18', '2023-10-19', '2023-10-20', '2023-10-21', '2023-10-22', '2023-10-23', '2023-10-24'],
|
|
xData: ['2023-10-18', '2023-10-19', '2023-10-20', '2023-10-21', '2023-10-22', '2023-10-23', '2023-10-24'],
|
|
@@ -40,6 +49,31 @@ let barLineData = reactive({
|
|
yData2: [14, 15, 12, 16, 15, 13, 14.5]
|
|
yData2: [14, 15, 12, 16, 15, 13, 14.5]
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+let scatterData = [
|
|
|
|
+ [10.0, 8.04],
|
|
|
|
+ [8.07, 6.95],
|
|
|
|
+ [13.0, 7.58],
|
|
|
|
+ [9.05, 8.81],
|
|
|
|
+ [11.0, 8.33],
|
|
|
|
+ [14.0, 7.66],
|
|
|
|
+ [13.4, 6.81],
|
|
|
|
+ [10.0, 6.33],
|
|
|
|
+ [14.0, 8.96],
|
|
|
|
+ [12.5, 6.82],
|
|
|
|
+ [9.15, 7.2],
|
|
|
|
+ [11.5, 7.2],
|
|
|
|
+ [3.03, 4.23],
|
|
|
|
+ [12.2, 7.83],
|
|
|
|
+ [2.02, 4.47],
|
|
|
|
+ [1.05, 3.33],
|
|
|
|
+ [4.05, 4.96],
|
|
|
|
+ [6.03, 7.24],
|
|
|
|
+ [12.0, 6.26],
|
|
|
|
+ [12.0, 8.84],
|
|
|
|
+ [7.08, 5.82],
|
|
|
|
+ [5.02, 5.68]
|
|
|
|
+]
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
crudExpose.doRefresh()
|
|
crudExpose.doRefresh()
|
|
})
|
|
})
|
|
@@ -54,6 +88,23 @@ function clickFn() {
|
|
scatter.value.resizeChart()
|
|
scatter.value.resizeChart()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const metrics = ref([{ metric: 'ACOS', color: 'blue' }])
|
|
|
|
+const options = ref([
|
|
|
|
+ { label: 'ACOS', value: 'ACOS', metricVal: "18.00%", preVal: '20.15%', gapVal: '-2.00%', disabled: true },
|
|
|
|
+ { label: '点击量', value: 'clicks', metricVal: "19.00%", preVal: '20.15%', gapVal: '-1.00%', disabled: true },
|
|
|
|
+ { label: '曝光量', value: 'impression', metricVal: "20.00%", preVal: '15.00%', gapVal: '5.00%', disabled: true },
|
|
|
|
+ { label: '转化率1', value: 'rate1', metricVal: "1.00%", preVal: '15.00%', gapVal: '5.00%', disabled: true },
|
|
|
|
+ { label: '转化率2', value: 'rate2', metricVal: "2.00%", preVal: '15.00%', gapVal: '5.00%', disabled: true },
|
|
|
|
+ { label: '转化率3', value: 'rate3', metricVal: "3.00%", preVal: '15.00%', gapVal: '5.00%', disabled: true },
|
|
|
|
+ { label: '转化率4', value: 'rate4', metricVal: "4.00%", preVal: '15.00%', gapVal: '5.00%' },
|
|
|
|
+ { label: '转化率5', value: 'rate5', metricVal: "5.00%", preVal: '15.00%', gapVal: '5.00%' },
|
|
|
|
+ { label: '转化率6', value: 'rate6', metricVal: "6.00%", preVal: '15.00%', gapVal: '5.00%' },
|
|
|
|
+])
|
|
|
|
+
|
|
|
|
+function changeMetric() {
|
|
|
|
+ console.log(metrics.value)
|
|
|
|
+}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|