|
@@ -2,10 +2,18 @@
|
|
<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>
|
|
- <SearchInput/>
|
|
|
|
<el-card style="height: 500px;margin-bottom: 5px;" shadow="hover">
|
|
<el-card style="height: 500px;margin-bottom: 5px;" shadow="hover">
|
|
- <BarLineChart :barLineData="barLineData"/>
|
|
|
|
|
|
+
|
|
<!--<line-chart :chartData="chartData"/>-->
|
|
<!--<line-chart :chartData="chartData"/>-->
|
|
|
|
+ <el-tabs type="border-card" @click="clickFn">
|
|
|
|
+ <el-tab-pane label="数据趋势">
|
|
|
|
+ <BarLineChart ref="barLine" :barLineData="barLineData"/>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="广告结构">
|
|
|
|
+ <PieBarChart ref="pieBar"/>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="散点透视"><ScatterChart ref="scatter"/></el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
</template>
|
|
</template>
|
|
@@ -13,14 +21,15 @@
|
|
</fs-page>
|
|
</fs-page>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script lang="ts" setup>
|
|
|
|
|
|
+<script setup>
|
|
import {ref, onMounted, defineAsyncComponent, reactive} from 'vue'
|
|
import {ref, onMounted, defineAsyncComponent, reactive} from 'vue'
|
|
import {useFs, FsPage} from '@fast-crud/fast-crud'
|
|
import {useFs, FsPage} from '@fast-crud/fast-crud'
|
|
import {createCrudOptions} from './crud'
|
|
import {createCrudOptions} from './crud'
|
|
import BarLineChart from '/@/components/echartsComponents/BarLineChart.vue'
|
|
import BarLineChart from '/@/components/echartsComponents/BarLineChart.vue'
|
|
-import LineChart from '/@/components/echartsComponents/LineChart.vue'
|
|
|
|
import {useLineStore} from '/@/stores/chartData/line'
|
|
import {useLineStore} from '/@/stores/chartData/line'
|
|
import SearchInput from '/@/components/searchInput/index.vue'
|
|
import SearchInput from '/@/components/searchInput/index.vue'
|
|
|
|
+import PieBarChart from '/@/components/echartsComponents/PieBarChart.vue'
|
|
|
|
+import ScatterChart from '/@/components/echartsComponents/ScatterChart.vue'
|
|
|
|
|
|
|
|
|
|
const {crudBinding, crudRef, crudExpose} = useFs({createCrudOptions, context: {}})
|
|
const {crudBinding, crudRef, crudExpose} = useFs({createCrudOptions, context: {}})
|
|
@@ -29,23 +38,20 @@ const {crudBinding, crudRef, crudExpose} = useFs({createCrudOptions, context: {}
|
|
const lineStore = useLineStore()
|
|
const lineStore = useLineStore()
|
|
let barLineData = lineStore.barLineData
|
|
let barLineData = lineStore.barLineData
|
|
|
|
|
|
-// let barLineData
|
|
|
|
-//
|
|
|
|
-// function initData() {
|
|
|
|
-// barLineData = reactive({
|
|
|
|
-// xData: ['2023-10-18', '2023-10-19', '2023-10-20', '2023-10-21', '2023-10-22', '2023-10-23', '2023-10-24'],
|
|
|
|
-// barData: [12, 13.4, 12.5, 16, 14.5, 15.6, 12.3],
|
|
|
|
-// yData1: [5, 6, 7, 8, 9, 10, 11],
|
|
|
|
-// yData2: [14, 15, 12, 16, 15, 13, 14.5]
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// initData()
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
crudExpose.doRefresh()
|
|
crudExpose.doRefresh()
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+const pieBar = ref(null)
|
|
|
|
+const barLine = ref(null)
|
|
|
|
+const scatter = ref(null)
|
|
|
|
+
|
|
|
|
+function clickFn() {
|
|
|
|
+ pieBar.value.resizeChart()
|
|
|
|
+ barLine.value.resizeChart()
|
|
|
|
+ scatter.value.resizeChart()
|
|
|
|
+}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|