|
@@ -100,7 +100,7 @@
|
|
|
<div class="number">{{ item.profit > 0 ? '+' : '' }} {{ item.init_balance ? (item.profit * 100 / item.init_balance).toFixed(2) : item.profit ? '100.00' : '0.00' }}%</div>
|
|
|
</div>
|
|
|
<div class="char-box">
|
|
|
- <chartView height="35px" :smooth="false" :list="chartList" :id="'ul' + item" />
|
|
|
+ <chartView v-if="chartLoaded && chartLoaded<= pageNum" :list="chartListAll[item.eid]" height="35px" :smooth="false" :id="'ul' + item.eid" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="box2 flex">
|
|
@@ -131,7 +131,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import { getExpertList } from "@/api/copy";
|
|
|
+import { getExpertList, getExpertTradeListByDayGroup } from "@/api/copy";
|
|
|
import chartView from "../components/chart.vue";
|
|
|
export default {
|
|
|
props: ['market'],
|
|
@@ -140,7 +140,8 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- chartList: ['12', '26', '12', '45'],
|
|
|
+ chartListAll: {},
|
|
|
+ chartLoaded: null,
|
|
|
loading: false,
|
|
|
finished: false,
|
|
|
refreshing: false,
|
|
@@ -201,6 +202,7 @@ export default {
|
|
|
} else {
|
|
|
this.list = this.list.concat(list);
|
|
|
}
|
|
|
+ this.getExpertTradeListByDayGroup(list)
|
|
|
this.loading = false;
|
|
|
if (res.endRow == res.total) {
|
|
|
this.finished = true;
|
|
@@ -225,6 +227,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
return html
|
|
|
+ },
|
|
|
+ getExpertTradeListByDayGroup(lists) {
|
|
|
+ var time_start = new Date().getTime()
|
|
|
+ var time_end = new Date()
|
|
|
+ time_end = time_end.setDate(time_end.getDate()-30);
|
|
|
+ getExpertTradeListByDayGroup({
|
|
|
+ eidList: JSON.stringify(lists.map(item => item.eid)),
|
|
|
+ time_start: time_end,
|
|
|
+ time_end: time_start,
|
|
|
+ }).then(res => {
|
|
|
+ var list = (res.list || []).sort((a, b) => new Date(a.date.replace(/-/g, '/')).getTime() - new Date(b.date.replace(/-/g, '/')).getTime())
|
|
|
+ list.forEach(item => {
|
|
|
+ if (this.chartListAll[item.eid]) {
|
|
|
+ this.chartListAll[item.eid].push(item.profit)
|
|
|
+ } else {
|
|
|
+ this.chartListAll[item.eid] = [item.profit]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.chartLoaded = this.pageNum
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|