|
@@ -5,16 +5,17 @@
|
|
<el-tabs v-model="tabActiveName" class="chart-tabs" type="border-card">
|
|
<el-tabs v-model="tabActiveName" class="chart-tabs" type="border-card">
|
|
<el-tab-pane label="数据趋势" name="dataTendency">
|
|
<el-tab-pane label="数据趋势" name="dataTendency">
|
|
<DataTendencyChart
|
|
<DataTendencyChart
|
|
- v-if="tabActiveName === 'dataTendency'"
|
|
|
|
- :query="queryParams"
|
|
|
|
- :fetchCard="getCardData"
|
|
|
|
- :fetchLine="getLineData"
|
|
|
|
- :fetch-line-month="getLineMonthData"
|
|
|
|
- :fetch-line-week="getLineWeekData">
|
|
|
|
|
|
+ v-if="tabActiveName === 'dataTendency'"
|
|
|
|
+ :query="queryParams"
|
|
|
|
+ :fetchCard="getCardData"
|
|
|
|
+ :fetchLine="getLineData"
|
|
|
|
+ :fetch-line-month="getLineMonthData"
|
|
|
|
+ :fetch-line-week="getLineWeekData"
|
|
|
|
+ >
|
|
</DataTendencyChart>
|
|
</DataTendencyChart>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="广告结构" name="adStruct">
|
|
<el-tab-pane label="广告结构" name="adStruct">
|
|
- <AdStructChart v-if="tabActiveName === 'adStruct'"/>
|
|
|
|
|
|
+ <AdStructChart v-if="tabActiveName === 'adStruct'" />
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="散点视图" name="scatterView">
|
|
<el-tab-pane label="散点视图" name="scatterView">
|
|
<div v-if="tabActiveName === 'scatterView'">散点视图</div>
|
|
<div v-if="tabActiveName === 'scatterView'">散点视图</div>
|
|
@@ -22,7 +23,7 @@
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</template>
|
|
</template>
|
|
<template #cell_percentTimeInBudget="scope">
|
|
<template #cell_percentTimeInBudget="scope">
|
|
- <el-progress :percentage="scope.row.percentTimeInBudget > 0 ? scope.row.percentTimeInBudget * 100 : 0"/>
|
|
|
|
|
|
+ <el-progress :percentage="scope.row.percentTimeInBudget > 0 ? scope.row.percentTimeInBudget * 100 : 0" />
|
|
</template>
|
|
</template>
|
|
<template #cell_campaignName="scope">
|
|
<template #cell_campaignName="scope">
|
|
<el-tooltip effect="dark" :content="scope.row.campaignName" placement="top">
|
|
<el-tooltip effect="dark" :content="scope.row.campaignName" placement="top">
|
|
@@ -39,17 +40,18 @@
|
|
|
|
|
|
<template v-for="field of Object.keys(BaseColumn)" #[`cell_${field}`]="scope">
|
|
<template v-for="field of Object.keys(BaseColumn)" #[`cell_${field}`]="scope">
|
|
<DataCompare
|
|
<DataCompare
|
|
- :field="field"
|
|
|
|
- :value="scope.row[field]"
|
|
|
|
- :prev-val="scope.row[`prev${field}`]"
|
|
|
|
- :gap-val="scope.row[`gap${field}`]"
|
|
|
|
- :date-range="dateRange"
|
|
|
|
- :show-compare="showCompare"/>
|
|
|
|
|
|
+ :field="field"
|
|
|
|
+ :value="scope.row[field]"
|
|
|
|
+ :prev-val="scope.row[`prev${field}`]"
|
|
|
|
+ :gap-val="scope.row[`gap${field}`]"
|
|
|
|
+ :date-range="dateRange"
|
|
|
|
+ :show-compare="showCompare"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
<template #toolbar-left>
|
|
<template #toolbar-left>
|
|
<div class="campare-switch">
|
|
<div class="campare-switch">
|
|
<span>数据对比 </span>
|
|
<span>数据对比 </span>
|
|
- <el-switch v-model="showCompare" size="small"/>
|
|
|
|
|
|
+ <el-switch v-model="showCompare" size="small" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</fs-crud>
|
|
</fs-crud>
|
|
@@ -57,35 +59,35 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import {onMounted, ref, watch} from 'vue'
|
|
|
|
-import {FsPage, useFs} from '@fast-crud/fast-crud'
|
|
|
|
-import {createCrudOptions} from './crud'
|
|
|
|
-import {useShopInfo} from '/@/stores/shopInfo'
|
|
|
|
-import {usePublicData} from '/@/stores/publicData'
|
|
|
|
-import {storeToRefs} from 'pinia'
|
|
|
|
-import {useRouter} from 'vue-router'
|
|
|
|
|
|
+import { onMounted, ref, watch } from 'vue'
|
|
|
|
+import { FsPage, useFs } from '@fast-crud/fast-crud'
|
|
|
|
+import { createCrudOptions } from './crud'
|
|
|
|
+import { useShopInfo } from '/@/stores/shopInfo'
|
|
|
|
+import { usePublicData } from '/@/stores/publicData'
|
|
|
|
+import { storeToRefs } from 'pinia'
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
import AdStructChart from './chartComponents/adStruct.vue'
|
|
import AdStructChart from './chartComponents/adStruct.vue'
|
|
import DataTendencyChart from '/@/views/adManage/sp/chartComponents/dataTendency.vue'
|
|
import DataTendencyChart from '/@/views/adManage/sp/chartComponents/dataTendency.vue'
|
|
-import {getCardData, getLineData, getLineMonthData, getLineWeekData} from './api'
|
|
|
|
-import {BaseColumn} from '/@/views/adManage/utils/commonTabColumn.js'
|
|
|
|
|
|
+import { getCardData, getLineData, getLineMonthData, getLineWeekData } from './api'
|
|
|
|
+import { BaseColumn } from '/@/views/adManage/utils/commonTabColumn.js'
|
|
import DataCompare from '/@/components/dataCompare/index.vue'
|
|
import DataCompare from '/@/components/dataCompare/index.vue'
|
|
|
|
|
|
const tabActiveName = ref('dataTendency')
|
|
const tabActiveName = ref('dataTendency')
|
|
const shopInfo = useShopInfo()
|
|
const shopInfo = useShopInfo()
|
|
const publicData = usePublicData()
|
|
const publicData = usePublicData()
|
|
-const {dateRange} = storeToRefs(publicData)
|
|
|
|
-const {profile} = storeToRefs(shopInfo)
|
|
|
|
|
|
+const { dateRange } = storeToRefs(publicData)
|
|
|
|
+const { profile } = storeToRefs(shopInfo)
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
profileId: profile.value.profile_id,
|
|
profileId: profile.value.profile_id,
|
|
- dateRange
|
|
|
|
|
|
+ dateRange,
|
|
})
|
|
})
|
|
-const {crudBinding, crudRef, crudExpose} = useFs({createCrudOptions, context: queryParams})
|
|
|
|
|
|
+const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: queryParams })
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const showCompare = ref(false)
|
|
const showCompare = ref(false)
|
|
const jumpGroup = (row: any) => {
|
|
const jumpGroup = (row: any) => {
|
|
router.push({
|
|
router.push({
|
|
name: 'SpCampaignDetail',
|
|
name: 'SpCampaignDetail',
|
|
- query: {campaignId: row.campaignId, tagsViewName: row.campaignName},
|
|
|
|
|
|
+ query: { campaignId: row.campaignId, tagsViewName: row.campaignName },
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -93,10 +95,21 @@ onMounted(async () => {
|
|
crudExpose.doRefresh()
|
|
crudExpose.doRefresh()
|
|
})
|
|
})
|
|
|
|
|
|
-watch(queryParams, async () => {
|
|
|
|
- crudExpose.doRefresh()
|
|
|
|
-}, {deep: true})
|
|
|
|
|
|
+watch(
|
|
|
|
+ queryParams,
|
|
|
|
+ async () => {
|
|
|
|
+ crudExpose.doRefresh()
|
|
|
|
+ },
|
|
|
|
+ { deep: true }
|
|
|
|
+)
|
|
|
|
|
|
|
|
+watch(
|
|
|
|
+ queryParams,
|
|
|
|
+ async () => {
|
|
|
|
+ crudExpose.doRefresh()
|
|
|
|
+ },
|
|
|
|
+ { deep: true }
|
|
|
|
+)
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -104,7 +117,7 @@ watch(queryParams, async () => {
|
|
flex: none;
|
|
flex: none;
|
|
}
|
|
}
|
|
|
|
|
|
-::v-deep(.el-table__footer-wrapper td.el-table__cell:nth-child(n+3):nth-child(-n+10) .cell) {
|
|
|
|
|
|
+::v-deep(.el-table__footer-wrapper td.el-table__cell:nth-child(n + 3):nth-child(-n + 10) .cell) {
|
|
display: none;
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
|