|
@@ -11,7 +11,12 @@ const {
|
|
|
getPubClassify,
|
|
|
classifyTypeChange,
|
|
|
handleAddClassify,
|
|
|
- handleConfirmEditClassify
|
|
|
+ handleConfirmEditClassify,
|
|
|
+
|
|
|
+ handleShowOpt,
|
|
|
+ handleClassifyShare,
|
|
|
+ handleCopyClassify,
|
|
|
+ handleClassifyDel
|
|
|
}=useClassify()
|
|
|
|
|
|
getMyClassify()
|
|
@@ -44,6 +49,7 @@ function goChooseChart(){
|
|
|
|
|
|
<template>
|
|
|
<div class="myETA-mobile-classify-wrap">
|
|
|
+ <div class="sticky-top">
|
|
|
<div class="search-box">
|
|
|
<van-search
|
|
|
shape="round"
|
|
@@ -54,12 +60,13 @@ function goChooseChart(){
|
|
|
</div>
|
|
|
<div class="classify-type-box">
|
|
|
<span
|
|
|
- class="item"
|
|
|
+ :class="['item',item.type===classifyState.classifyTypeAct?'active':'']"
|
|
|
v-for="item in classifyTypeOpt"
|
|
|
:key="item.id"
|
|
|
@click="classifyTypeChange(item)"
|
|
|
>{{item.name}}</span>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
<ul class="list-box">
|
|
|
<li
|
|
|
class="item"
|
|
@@ -67,47 +74,131 @@ function goChooseChart(){
|
|
|
:key="item.MyChartClassifyId"
|
|
|
@click="goChartList(item)"
|
|
|
>
|
|
|
- <span class="van-ellipsis name">{{item.MyChartClassifyName}}</span>
|
|
|
+ <img class="left-icon" src="@/assets/imgs/ppt/ppt_icon_file.png" alt="">
|
|
|
+ <div style="flex:1">
|
|
|
+ <div class="van-ellipsis name">{{item.MyChartClassifyName}}</div>
|
|
|
+ <div class="share-user" v-if="classifyState.classifyTypeAct==2">分享人: {{item.RealName}}</div>
|
|
|
+ </div>
|
|
|
+ <img class="right-icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="" @click.stop="handleShowOpt(item)">
|
|
|
</li>
|
|
|
</ul>
|
|
|
<!-- 底部操作栏 -->
|
|
|
<div class="fix-bot-box">
|
|
|
- <span @click="handleAddClassify">添加我的分类</span>
|
|
|
- <span @click="goChooseChart">选择图表</span>
|
|
|
+ <div class="item" @click="handleAddClassify">
|
|
|
+ <img class="icon" src="@/assets/imgs/icon_file.png" alt="">
|
|
|
+ <span>添加分类</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="goChooseChart">
|
|
|
+ <img class="icon" src="@/assets/imgs/icon_select.png" alt="">
|
|
|
+ <span>选择图表</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 添加我的分类弹窗 -->
|
|
|
<van-dialog
|
|
|
v-model:show="classifyState.showEidtClassifyName"
|
|
|
- :title="classifyState.isAddClassifyName?'添加我的分类':'重命名'"
|
|
|
+ :title="classifyState.isAddClassifyName?'添加分类':'重命名'"
|
|
|
show-cancel-button
|
|
|
confirmButtonText="确定"
|
|
|
@confirm="handleConfirmEditClassify"
|
|
|
>
|
|
|
<div class="rename-wrap">
|
|
|
- <span>分类名称</span>
|
|
|
<input type="text" placeholder="请输入分类名称!" v-model="classifyState.classifyNameVal">
|
|
|
</div>
|
|
|
</van-dialog>
|
|
|
+
|
|
|
+ <!-- 分类操作弹窗 -->
|
|
|
+ <van-popup
|
|
|
+ v-model:show="classifyState.showClassifyOpt"
|
|
|
+ round
|
|
|
+ position="bottom"
|
|
|
+ >
|
|
|
+ <div class="classify-opt-wrap">
|
|
|
+ <div class="item border">
|
|
|
+ <img src="@/assets/imgs/ppt/ppt_icon_file.png" alt="">
|
|
|
+ <span>{{classifyState.activeClassifyVal.MyChartClassifyName}}</span>
|
|
|
+ </div>
|
|
|
+ <!-- 我的图库分类操作 -->
|
|
|
+ <template v-if="classifyState.classifyTypeAct==1">
|
|
|
+ <div class="item border blue" @click="handleAddClassify(classifyState.activeClassifyVal)">
|
|
|
+ <img src="@/assets/imgs/ppt/ppt_icon_write.png" alt="">
|
|
|
+ <span>重命名</span>
|
|
|
+ </div>
|
|
|
+ <div class="item border blue">
|
|
|
+ <img src="@/assets/imgs/icon_user.png" alt="">
|
|
|
+ <span>所有人可见</span>
|
|
|
+ <van-switch
|
|
|
+ class="switch-box"
|
|
|
+ size="22px"
|
|
|
+ :model-value="classifyState.activeClassifyVal.IsPublic?true:false"
|
|
|
+ @update:model-value="handleClassifyShare"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="item border red" @click="handleClassifyDel(classifyState.activeClassifyVal)">
|
|
|
+ <img src="@/assets/imgs/icon_del.png" alt="">
|
|
|
+ <span>删除</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 公共图库分类操作 -->
|
|
|
+ <template v-if="classifyState.classifyTypeAct==2">
|
|
|
+ <div class="item border blue" @click="handleCopyClassify(classifyState.activeClassifyVal)">
|
|
|
+ <img src="@/assets/imgs/ppt/ppt_icon_copy.png" alt="">
|
|
|
+ <span>复制</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </van-popup>
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.sticky-top{
|
|
|
+ position: sticky;
|
|
|
+ top: 0;
|
|
|
+ z-index: 99;
|
|
|
+ background-color: #fff;
|
|
|
+}
|
|
|
.classify-type-box{
|
|
|
padding: $page-padding;
|
|
|
.item{
|
|
|
display: inline-block;
|
|
|
- margin-right: 20px;
|
|
|
+ width: 172px;
|
|
|
+ height: 64px;
|
|
|
+ line-height: 64px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid $theme-color;
|
|
|
+ color: $theme-color;
|
|
|
+ }
|
|
|
+ .active{
|
|
|
+ background-color: $theme-color;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
.list-box{
|
|
|
padding: $page-padding;
|
|
|
+ padding-bottom: 110px;
|
|
|
.item{
|
|
|
- border-bottom: 1px solid $border-color;
|
|
|
padding: 20px 0;
|
|
|
display: flex;
|
|
|
+ .left-icon{
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ margin-right: 20px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+ .right-icon{
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 4px;
|
|
|
+ height: 20px;
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
.name{
|
|
|
flex: 1;
|
|
|
}
|
|
|
+ .share-user{
|
|
|
+ color: $font-grey_999;
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.fix-bot-box{
|
|
@@ -115,11 +206,28 @@ function goChooseChart(){
|
|
|
left: 0;
|
|
|
right: 0;
|
|
|
bottom: 0;
|
|
|
- height: 80px;
|
|
|
+ height: 100px;
|
|
|
background-color: #fff;
|
|
|
- border-top: 1px solid $border-color;
|
|
|
display: flex;
|
|
|
-
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 99;
|
|
|
+ .item{
|
|
|
+ width: 300px;
|
|
|
+ height: 76px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ color: $theme-color;
|
|
|
+ font-size: 32px;
|
|
|
+ border: 1px solid $theme-color;
|
|
|
+ border-radius: 80px;
|
|
|
+ .icon{
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.rename-wrap{
|
|
|
display: flex;
|
|
@@ -138,4 +246,32 @@ function goChooseChart(){
|
|
|
width: 150px;
|
|
|
}
|
|
|
}
|
|
|
+.classify-opt-wrap{
|
|
|
+ .item{
|
|
|
+ padding: 42px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ img{
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ .switch-box{
|
|
|
+ position: absolute;
|
|
|
+ right: 42px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .border{
|
|
|
+ border-bottom: 1px solid $border-color;
|
|
|
+ }
|
|
|
+ .blue{
|
|
|
+ color: $theme-color;
|
|
|
+ }
|
|
|
+ .red{
|
|
|
+ color: $theme-red;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|