|
@@ -2,8 +2,8 @@
|
|
|
<div class="eta-chart-wrap">
|
|
|
<div class="top-box">
|
|
|
<div class="left-card">
|
|
|
- <span :class="['item',activeType==='ETA图库'?'active':'']">ETA图库</span>
|
|
|
- <span :class="['item',activeType==='MyETA'?'active':'']">MyETA</span>
|
|
|
+ <span :class="['item',activeType==='ETA图库'?'active':'']" @click="activeTypeChange('ETA图库')">ETA图库</span>
|
|
|
+ <span :class="['item',activeType==='MyETA'?'active':'']" @click="activeTypeChange('MyETA')">MyETA</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="main-box" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
|
|
@@ -11,13 +11,16 @@
|
|
|
class="onlyshowme-box"
|
|
|
v-model="isShowMe"
|
|
|
@change="handleIsShowMeChange"
|
|
|
+ v-if="activeType==='ETA图库'"
|
|
|
>只看我的</el-checkbox>
|
|
|
<draggable
|
|
|
+ v-if="activeType==='ETA图库'"
|
|
|
:list="list"
|
|
|
:group="{ name: 'component', pull: activeType==='ETA图库'?'clone':false, put: false }"
|
|
|
class="chart-list-box"
|
|
|
animation="300"
|
|
|
:sort="false"
|
|
|
+ dragClass="drag-box"
|
|
|
tag="div"
|
|
|
>
|
|
|
<div class="chart-item" :comp-data="getCompData(item)" v-for="item in list" :key="item.UniqueCode">
|
|
@@ -88,6 +91,19 @@ export default {
|
|
|
if(this.finished) return
|
|
|
this.page++
|
|
|
this.getETAChartList()
|
|
|
+ },
|
|
|
+
|
|
|
+ activeTypeChange(e){
|
|
|
+ if(this.activeType===e) return
|
|
|
+ this.activeType=e
|
|
|
+ if(this.activeType==='ETA图库'){
|
|
|
+ this.page=1
|
|
|
+ this.finished=false
|
|
|
+ this.list=[]
|
|
|
+ this.getETAChartList()
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -139,7 +155,8 @@ div{
|
|
|
.onlyshowme-box{
|
|
|
display: block;
|
|
|
position: sticky;
|
|
|
- top: 0;
|
|
|
+ top: -20px;
|
|
|
+ padding: 20px 0;
|
|
|
background-color: #FFF;
|
|
|
}
|
|
|
.chart-list-box{
|