|
@@ -2,6 +2,10 @@
|
|
|
import {reactive, ref, watch} from 'vue'
|
|
|
import apiChart from '@/api/chart'
|
|
|
import apiFutureChart from '@/api/futureChart'
|
|
|
+import MyETAChart from './MyETAChart.vue'
|
|
|
+import ETAForumChart from './ETAForumChart.vue'
|
|
|
+import StatisticAnalysis from './StatisticAnalysis.vue'
|
|
|
+import PriceChart from './PriceChart.vue'
|
|
|
import { showToast } from 'vant'
|
|
|
import { vInfiniteScroll } from '@vueuse/components'
|
|
|
import { useNoAuth } from '@/hooks/useNoAuth'
|
|
@@ -10,6 +14,7 @@ const emits=defineEmits(['update'])
|
|
|
|
|
|
const searchVal=ref('')
|
|
|
const onlyMe=ref(false)
|
|
|
+const activeType=ref('')
|
|
|
|
|
|
const listState=reactive({
|
|
|
page:1,
|
|
@@ -81,39 +86,59 @@ watch(
|
|
|
}
|
|
|
)
|
|
|
|
|
|
+function handleSelectChart(val){
|
|
|
+ emits('update',val)
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div class="ETA-chart-wrap">
|
|
|
- <div class="sticky-box">
|
|
|
- <van-search v-model="searchVal" shape="round" placeholder="请输入图表名称" @search="handleRefreshList" @clear="handleRefreshList" />
|
|
|
- <van-checkbox v-model="onlyMe" @change="handleRefreshList">只看我的</van-checkbox>
|
|
|
- </div>
|
|
|
- <div class="content-box">
|
|
|
- <div v-if="listState.list.length==0&&listState.finished">
|
|
|
- <img class="list-empty-img" src="https://hzstatic.hzinsights.com/static/ETA_mobile/empty_img.png" alt="">
|
|
|
- <p style="text-align:center;color:#999999;font-size:12px">暂无图表</p>
|
|
|
- </div>
|
|
|
-
|
|
|
- <ul class="chart-list" v-infinite-scroll="[onLoadMore, { 'distance' : 10 }]">
|
|
|
- <li
|
|
|
- :class="['chart-item',selectChartList.includes(item.UniqueCode)&&'active']"
|
|
|
- v-for="item in listState.list"
|
|
|
- :key="item.ChartInfoId"
|
|
|
- @click="handleSelect(item)"
|
|
|
- >
|
|
|
- <div class="van-multi-ellipsis--l2 title" v-html="item.SearchText"></div>
|
|
|
- <img :src="!item.HaveOperaAuth?useNoAuth().noAuthImg:item.ChartImage" alt="">
|
|
|
+ <van-tabs v-model:active="activeType">
|
|
|
+ <van-tab title="图库">
|
|
|
+ <div class="sticky-box">
|
|
|
+ <van-search v-model="searchVal" shape="round" placeholder="请输入图表名称" @search="handleRefreshList" @clear="handleRefreshList" />
|
|
|
+ <van-checkbox v-model="onlyMe" @change="handleRefreshList">只看我的</van-checkbox>
|
|
|
+ </div>
|
|
|
+ <div class="content-box">
|
|
|
+ <div v-if="listState.list.length==0&&listState.finished">
|
|
|
+ <img class="list-empty-img" src="https://hzstatic.hzinsights.com/static/ETA_mobile/empty_img.png" alt="">
|
|
|
+ <p style="text-align:center;color:#999999;font-size:12px">暂无图表</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <ul class="chart-list" v-infinite-scroll="[onLoadMore, { 'distance' : 10 }]">
|
|
|
+ <li
|
|
|
+ :class="['chart-item',selectChartList.includes(item.UniqueCode)&&'active']"
|
|
|
+ v-for="item in listState.list"
|
|
|
+ :key="item.ChartInfoId"
|
|
|
+ @click="handleSelect(item)"
|
|
|
+ >
|
|
|
+ <div class="van-multi-ellipsis--l2 title" v-html="item.SearchText"></div>
|
|
|
+ <img :src="!item.HaveOperaAuth?useNoAuth().noAuthImg:item.ChartImage" alt="">
|
|
|
|
|
|
- <svg v-if="selectChartList.includes(item.UniqueCode)" width="29" height="28" viewBox="0 0 29 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
- <path d="M14.5 28C22.232 28 28.5 21.732 28.5 14C28.5 6.26801 22.232 0 14.5 0C6.76801 0 0.5 6.26801 0.5 14C0.5 21.732 6.76801 28 14.5 28ZM7.5 14.413L8.913 13L12.5 16.586L20.085 9L21.5 10.415L12.5 19.414L7.5 14.413Z" fill="#0052D9"/>
|
|
|
- </svg>
|
|
|
+ <svg v-if="selectChartList.includes(item.UniqueCode)" width="29" height="28" viewBox="0 0 29 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
+ <path d="M14.5 28C22.232 28 28.5 21.732 28.5 14C28.5 6.26801 22.232 0 14.5 0C6.76801 0 0.5 6.26801 0.5 14C0.5 21.732 6.76801 28 14.5 28ZM7.5 14.413L8.913 13L12.5 16.586L20.085 9L21.5 10.415L12.5 19.414L7.5 14.413Z" fill="#0052D9"/>
|
|
|
+ </svg>
|
|
|
|
|
|
- </li>
|
|
|
- <li class="chart-item" style="height:0;border:none;margin-bottom:0;padding:0"></li>
|
|
|
- <li class="chart-item" style="height:0;border:none;margin-bottom:0;padding:0"></li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ </li>
|
|
|
+ <li class="chart-item" style="height:0;border:none;margin-bottom:0;padding:0"></li>
|
|
|
+ <li class="chart-item" style="height:0;border:none;margin-bottom:0;padding:0"></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="我的图库">
|
|
|
+ <MyETAChart @update="handleSelectChart"/>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="ETA社区图库">
|
|
|
+ <ETAForumChart @update="handleSelectChart"/>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="统计分析">
|
|
|
+ <StatisticAnalysis @update="handleSelectChart"/>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="商品价格曲线">
|
|
|
+ <PriceChart @update="handleSelectChart"/>
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
|