|
@@ -1,10 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="outer-container">
|
|
<div class="outer-container">
|
|
- <div class="filters">
|
|
|
|
- <el-input placeholder="ASIN/父ASIN/标题/SKU"></el-input>
|
|
|
|
- <el-select style="width: 300px"></el-select>
|
|
|
|
- <DateRangePicker v-model="dateRange"></DateRangePicker>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <TopFilters></TopFilters>
|
|
<div class="table-tips">
|
|
<div class="table-tips">
|
|
<el-icon><Warning /></el-icon>
|
|
<el-icon><Warning /></el-icon>
|
|
<p style="margin-left: 3px">商品中心广告数据统计不包含SB广告</p>
|
|
<p style="margin-left: 3px">商品中心广告数据统计不包含SB广告</p>
|
|
@@ -19,46 +15,62 @@
|
|
</DataTendencyChart>
|
|
</DataTendencyChart>
|
|
</el-card>
|
|
</el-card>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div style="width: 100%; padding: 12px">
|
|
|
|
- <el-scrollbar>
|
|
|
|
- <div class="scrollbar-flex-content">
|
|
|
|
- <el-card v-for="item in 50" :key="item" class="scrollbar-demo-item">
|
|
|
|
- {{ item }}
|
|
|
|
- </el-card>
|
|
|
|
- </div>
|
|
|
|
- </el-scrollbar>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
|
|
+ <ProductTab></ProductTab>
|
|
<div class="pl-and-asin-tables">
|
|
<div class="pl-and-asin-tables">
|
|
<div class="asin-table-container">
|
|
<div class="asin-table-container">
|
|
<div class="xp-radio-group-wrapper">
|
|
<div class="xp-radio-group-wrapper">
|
|
<el-button-group>
|
|
<el-button-group>
|
|
- <el-button bg pain>产品线</el-button>
|
|
|
|
- <el-button bg pain>父ASIN</el-button>
|
|
|
|
- <el-button bg pain>ASIN</el-button>
|
|
|
|
- <el-button bg pain>SKU</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ bg
|
|
|
|
+ text
|
|
|
|
+ v-for="button in buttons"
|
|
|
|
+ :key="button"
|
|
|
|
+ :style="activeButton === button ? activeStyle : {}"
|
|
|
|
+ @click="() => handleClickBtn(button)">
|
|
|
|
+ {{ button }}
|
|
|
|
+ </el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
</div>
|
|
</div>
|
|
- <div style="width: auto">
|
|
|
|
- <el-table :data="tableData">
|
|
|
|
- <el-table-column prop="date" label="Date" />
|
|
|
|
- <el-table-column prop="name" label="Name" />
|
|
|
|
- <el-table-column prop="address" label="Address" />
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <vxe-toolbar ref="toolbarRef" custom>
|
|
|
|
+ <template #buttons>
|
|
|
|
+ <vxe-button type="text" status="primary" content="创建产品线" icon="vxe-icon-add" @click="visibleDialog"></vxe-button>
|
|
|
|
+ </template>
|
|
|
|
+ <template #tools>
|
|
|
|
+ <vxe-button type="text" icon="vxe-icon-undo" class="tool-btn"></vxe-button>
|
|
|
|
+ <vxe-button type="text" icon="vxe-icon-funnel" class="tool-btn" @click="funnelEvent"></vxe-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-toolbar>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="overflow: hidden; width: 100%; height: 600px">
|
|
|
|
+ <vxe-table ref="tableRef" round height="auto" :data="tableData" :column-config="{ resizable: true }" :row-config="{ isHover: true }">
|
|
|
|
+ <vxe-column field="name" title="Name" width="300"></vxe-column>
|
|
|
|
+ <vxe-column field="sex" title="最小列宽" min-width="300"></vxe-column>
|
|
|
|
+ <vxe-column field="age" title="Age"></vxe-column>
|
|
|
|
+ <vxe-column field="time" title="Time"></vxe-column>
|
|
|
|
+ <vxe-column field="address" title="Address" show-overflow></vxe-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <vxe-pager v-model:current-page="pagination.currentPage" v-model:page-size="pagination.pageSize" :total="pagination.total" size="small" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+<ProductLineDialog></ProductLineDialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
|
|
|
+<script setup>
|
|
|
|
+import ProductTab from './components/ProductTab.vue'
|
|
|
|
+import ProductLineDialog from './components/ProductLineDialog.vue'
|
|
|
|
+import TopFilters from './components/TopFilters.vue'
|
|
|
|
+import { ref, reactive, nextTick } from 'vue'
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
import { usePublicData } from '/@/stores/publicData'
|
|
import { usePublicData } from '/@/stores/publicData'
|
|
-import DateRangePicker from '/@/components/DateRangePicker/index.vue'
|
|
|
|
import DataTendencyChart from '/@/views/adManage/sb/chartComponents/dataTendency.vue'
|
|
import DataTendencyChart from '/@/views/adManage/sb/chartComponents/dataTendency.vue'
|
|
import { useShopInfo } from '/@/stores/shopInfo'
|
|
import { useShopInfo } from '/@/stores/shopInfo'
|
|
import { getCardData, getLineData, getLineMonthData, getLineWeekData } from './api'
|
|
import { getCardData, getLineData, getLineMonthData, getLineWeekData } from './api'
|
|
-import { ref } from 'vue'
|
|
|
|
|
|
+import { useButtonGroup } from './hooks/index'
|
|
|
|
+import emitter from '/@/utils/emitter'
|
|
|
|
|
|
const publicData = usePublicData()
|
|
const publicData = usePublicData()
|
|
const { dateRange } = storeToRefs(publicData)
|
|
const { dateRange } = storeToRefs(publicData)
|
|
@@ -69,23 +81,56 @@ const queryParams = ref({
|
|
dateRange,
|
|
dateRange,
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 按钮组
|
|
|
|
+const { buttons, activeButton, activeStyle, handleClickBtn } = useButtonGroup()
|
|
|
|
+
|
|
|
|
+// Table相关
|
|
|
|
+const pagination = reactive({
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ total: 10,
|
|
|
|
+})
|
|
|
|
+const tableRef = ref()
|
|
|
|
+const toolbarRef = ref()
|
|
|
|
+
|
|
|
|
+function funnelEvent() {
|
|
|
|
+ VXETable.modal.alert({ content: '点击事件' })
|
|
|
|
+}
|
|
|
|
+nextTick(() => {
|
|
|
|
+ // 将表格和工具栏进行关联
|
|
|
|
+ const $table = tableRef.value
|
|
|
|
+ const $toolbar = toolbarRef.value
|
|
|
|
+ if ($table && $toolbar) {
|
|
|
|
+ $table.connect($toolbar)
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
const tableData = ref([
|
|
const tableData = ref([
|
|
{ id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
|
|
{ id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
|
|
{ id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
|
|
{ id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
|
|
{ id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
|
|
{ id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
|
|
- { id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' },
|
|
|
|
|
|
+ { id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 23, address: 'test abc' },
|
|
|
|
+ { id: 10005, name: 'Test5', role: 'Develop', sex: 'Women', age: 30, address: 'Shanghai' },
|
|
|
|
+ { id: 10006, name: 'Test6', role: 'Designer', sex: 'Women', age: 21, address: 'test abc' },
|
|
|
|
+ { id: 10007, name: 'Test7', role: 'Test', sex: 'Man', age: 29, address: 'test abc' },
|
|
|
|
+ { id: 10008, name: 'Test8', role: 'Develop', sex: 'Man', age: 35, address: 'test abc' },
|
|
|
|
+ { id: 10009, name: 'Test9', role: 'Develop', sex: 'Man', age: 35, address: 'test abc' },
|
|
|
|
+ { id: 100010, name: 'Test10', role: 'Develop', sex: 'Man', age: 35, address: 'test abc' },
|
|
|
|
+ { id: 100011, name: 'Test11', role: 'Develop', sex: 'Man', age: 35, address: 'test abc' },
|
|
|
|
+ { id: 100012, name: 'Test12', role: 'Develop', sex: 'Man', age: 35, address: 'test abc' },
|
|
|
|
+ { id: 100013, name: 'Test13', role: 'Develop', sex: 'Man', age: 35, address: 'test abc' },
|
|
])
|
|
])
|
|
|
|
+
|
|
|
|
+// 激活弹窗
|
|
|
|
+function visibleDialog() {
|
|
|
|
+ emitter.emit('create-product-dialog', {isVisible: true})
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
.outer-container {
|
|
.outer-container {
|
|
padding: 5px 10px 0 10px;
|
|
padding: 5px 10px 0 10px;
|
|
}
|
|
}
|
|
-.filters {
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- gap: 10px;
|
|
|
|
-}
|
|
|
|
.table-tips {
|
|
.table-tips {
|
|
color: #8d9095;
|
|
color: #8d9095;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -95,9 +140,6 @@ const tableData = ref([
|
|
.pl-and-asin-tables {
|
|
.pl-and-asin-tables {
|
|
padding: 10px 12px 0 12px;
|
|
padding: 10px 12px 0 12px;
|
|
}
|
|
}
|
|
-.product-lines {
|
|
|
|
- display: flex;
|
|
|
|
-}
|
|
|
|
.asin-table-container {
|
|
.asin-table-container {
|
|
width: 100%;
|
|
width: 100%;
|
|
padding: 8px;
|
|
padding: 8px;
|
|
@@ -112,20 +154,5 @@ const tableData = ref([
|
|
margin-bottom: 12px;
|
|
margin-bottom: 12px;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
-.scrollbar-flex-content {
|
|
|
|
- display: flex;
|
|
|
|
-}
|
|
|
|
-.scrollbar-demo-item {
|
|
|
|
- flex-shrink: 0;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- width: 100px;
|
|
|
|
- height: 50px;
|
|
|
|
- margin: 10px;
|
|
|
|
- text-align: center;
|
|
|
|
- border-radius: 4px;
|
|
|
|
- background: var(--el-color-danger-light-9);
|
|
|
|
- color: var(--el-color-danger);
|
|
|
|
-}
|
|
|
|
|
|
+
|
|
</style>
|
|
</style>
|