feat: 切换All Data和Focus Data的顺序

This commit is contained in:
Xu Zhimeng 2024-10-31 14:40:53 +08:00
parent e362cbf69a
commit 1a7519324d

View File

@ -6,8 +6,40 @@
<template slot="expandIcon">
<img src="@/assets/images/station-operation/toggle.png" alt="" />
</template>
<!-- All Data -->
<!-- Focus Data -->
<a-collapse-panel key="1">
<template slot="header">
<div class="title">
<div class="title-text" style="width: 180px">Focus Data</div>
<div class="title-rect">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</template>
<ScrollContainer ref="scrollContainer2Ref" direction="verticle" class="data-list">
<div class="data-list-content">
<a-spin v-if="isGettingFollowedDataList"></a-spin>
<template v-else>
<DataListItem
v-for="item of followedDataList"
:key="item.id"
:item="item"
@click.native="locateFacility(item)"
></DataListItem>
<custom-empty v-if="!followedDataList.length" style="margin-top: 40px"></custom-empty>
</template>
</div>
<div class="shadow"></div>
</ScrollContainer>
</a-collapse-panel>
<!-- Focus Data 结束 -->
<!-- All Data -->
<a-collapse-panel key="2">
<template slot="header">
<div class="title">
<div class="title-text">All Data</div>
@ -97,38 +129,6 @@
</ScrollContainer>
</a-collapse-panel>
<!-- All Data 结束 -->
<!-- Focus Data -->
<a-collapse-panel key="2">
<template slot="header">
<div class="title">
<div class="title-text" style="width: 180px">Focus Data</div>
<div class="title-rect">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</template>
<ScrollContainer ref="scrollContainer2Ref" direction="verticle" class="data-list">
<div class="data-list-content">
<a-spin v-if="isGettingFollowedDataList"></a-spin>
<template v-else>
<DataListItem
v-for="item of followedDataList"
:key="item.id"
:item="item"
@click.native="locateFacility(item)"
></DataListItem>
<custom-empty v-if="!followedDataList.length" style="margin-top: 40px"></custom-empty>
</template>
</div>
<div class="shadow"></div>
</ScrollContainer>
</a-collapse-panel>
<!-- Focus Data 结束 -->
</a-collapse>
<!-- 展开左侧配置栏按钮开始 -->
@ -268,7 +268,7 @@ export default {
// }, 0);
// }, 15000);
this.$nextTick(() => {
this.$refs.scrollContainerRef.checkScrollEnd()
this.$refs.scrollContainer2Ref.checkScrollEnd()
})
} catch (error) {
console.error(error)
@ -412,7 +412,7 @@ export default {
//
handleShowSearch() {
this.activeKey = 1
this.activeKey = 2
if (this.filterVisible) {
this.searchVisible = true
this.filterVisible = false
@ -427,7 +427,7 @@ export default {
//
handleShowFilter() {
this.activeKey = 1
this.activeKey = 2
if (this.searchVisible) {
this.searchVisible = false
this.filterVisible = true