Commit e31a824a by 匡雅琴

抽离公共组件

1 parent b2b0fbe5
...@@ -7,10 +7,14 @@ ...@@ -7,10 +7,14 @@
<script> <script>
export default { export default {
name: 'DateTab', name: 'DateTab',
props: {
dateList: {
type: Array,
default: () => []
}
},
data() { data() {
return { return {
dateList: ['近3个月', '近6个月', '近1年', '自定义'],
tabActive: 1 tabActive: 1
} }
}, },
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
}, },
{ {
name: 'merchantname', name: 'merchantname',
width: '13vw' width: '12vw'
}, },
{ {
name: 'num', name: 'num',
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
id: 'goodsPay', id: 'goodsPay',
keys: ['payType', 'orderNum'], keys: ['payType', 'orderNum'],
height: '15.34vh', height: '15.34vh',
colors: ['#34AFFF', '#16E193', '#FFC200'], colors: ['#34AFFF', '#16E193', '#FFC200', '#EB6001'],
formatter: 'total', formatter: 'total',
formatterName: '支付订单', formatterName: '支付订单',
formtUnit: '单' formtUnit: '单'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<box-title title="活动数据明细"></box-title> <box-title title="活动数据明细"></box-title>
<div class="content-box"> <div class="content-box">
<div class="flex"> <div class="flex">
<DateTab @changeDate="changeDate" class="date-tab"></DateTab> <DateTab :dateList="dateList" @changeDate="changeDate" class="date-tab"></DateTab>
<Calendar v-show="showCalendar"></Calendar> <Calendar v-show="showCalendar"></Calendar>
</div> </div>
<ActivityTable class="activity-table" :tableData="tableData" :dataTotal="dataTotal"></ActivityTable> <ActivityTable class="activity-table" :tableData="tableData" :dataTotal="dataTotal"></ActivityTable>
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
</template> </template>
<script> <script>
import DateTab from './DateTab.vue'
import ActivityTable from './ActivityTable.vue' import ActivityTable from './ActivityTable.vue'
import Calendar from './Calendar.vue'
export default { export default {
name: 'ActivityDetail', name: 'ActivityDetail',
components: { components: {
DateTab, ActivityTable
ActivityTable,
Calendar
}, },
data() { data() {
return { return {
dateList: ['近3个月', '近6个月', '近1年', '自定义'],
tableData: [ tableData: [
{ {
activityName: '续保膨胀金活动', activityName: '续保膨胀金活动',
...@@ -59,7 +56,7 @@ export default { ...@@ -59,7 +56,7 @@ export default {
methods: { methods: {
changeDate(val) { changeDate(val) {
console.log(val); console.log(val)
if (val === 3) { if (val === 3) {
this.showCalendar = true this.showCalendar = true
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!