Commit 4ff950f8 authored by zhengke's avatar zhengke

优化 移动 组件

parent 1f554245
...@@ -5,6 +5,27 @@ import Api,{ HttpResponse, Result } from './../utils/request'; ...@@ -5,6 +5,27 @@ import Api,{ HttpResponse, Result } from './../utils/request';
*/ */
class ConfigService{ class ConfigService{
/**
* 我的回收站
*/
static async GetTripOtherRecycleBinPage(params : any):Promise<HttpResponse>{
return Api.Post("triptemplate_GetTripOtherRecycleBinPage",params)
}
/**
* 共享给我的文件
*/
static async GetShareMyFile(params : any):Promise<HttpResponse>{
return Api.Post("triptemplate_GetShareMyFile",params)
}
/**
* 获取我的收藏
*/
static async GetTripCollectListPage(params : any):Promise<HttpResponse>{
return Api.Post("triptemplate_GetTripCollectListPage",params)
}
/** /**
* 获取行程广告最近版本 * 获取行程广告最近版本
*/ */
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</th> </th>
<th class="text-light" style="min-width: 150px; width: 150px"> <th class="text-light" style="min-width: 150px; width: 150px">
<div class="row items-center just-center pointer" @click.stop="clickSort"> <div class="row items-center just-center pointer" @click.stop="clickSort">
<span>最近浏览 </span> <span>最近修改 </span>
<span class="column"> <span class="column">
<el-icon class="reactive" <el-icon class="reactive"
style="top: 3px" :class="[datas.Sort==2?'active':'']"><CaretTop /></el-icon> style="top: 3px" :class="[datas.Sort==2?'active':'']"><CaretTop /></el-icon>
...@@ -92,11 +92,11 @@ ...@@ -92,11 +92,11 @@
:style="{'opacity':item.singleChoice?1:''}"> :style="{'opacity':item.singleChoice?1:''}">
<el-checkbox size="sm" class="SelectAllBox" v-model="item.singleChoice" <el-checkbox size="sm" class="SelectAllBox" v-model="item.singleChoice"
@click.stop="singleChoice(item)"/></div></td> @click.stop="singleChoice(item)"/></div></td>
<td style="width: 30px;" @click.stop="OffEdit()"> <td style="width: 30px;" @click.stop="OffEdit()" valign="middle" >
<img v-if="item.FileType" class="q-px-md" :src="item.FileType==1?datas.pdfImg:datas.adsImg" <div :class="{'share-icon-box':item.IsShare}" style="display: inline-block;">
style="height: 25px;" /> <img v-if="item.FileType" class="q-px-md " :src="item.FileType==1?datas.pdfImg:datas.adsImg" style="height: 25px;" />
<img v-else class="q-px-md" src="@/assets/img/file.png" <img v-else class="q-px-md" src="@/assets/img/file.png" style="height: 23px;" />
style="height: 23px;" /> </div>
</td> </td>
<td class="journeyAds-title wrap row"> <td class="journeyAds-title wrap row">
<div class="col" v-if="!item.editTitle" @click.stop="OffEdit()"> <div class="col" v-if="!item.editTitle" @click.stop="OffEdit()">
...@@ -132,7 +132,8 @@ ...@@ -132,7 +132,8 @@
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit"> <el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
<el-dropdown-item v-if="item.FileType" icon="EditPen" @click.stop="startEditTitle(item)">重命名</el-dropdown-item> <el-dropdown-item v-if="item.FileType" icon="EditPen" @click.stop="startEditTitle(item)">重命名</el-dropdown-item>
<el-dropdown-item v-if="item.FileType" icon="Clock" @click.stop="history(item)">历史版本</el-dropdown-item> <el-dropdown-item v-if="item.FileType" icon="Clock" @click.stop="history(item)">历史版本</el-dropdown-item>
<el-dropdown-item v-if="item.FileType" icon="Position" @click.stop="()=>shareId=item.FileId">分享</el-dropdown-item> <el-dropdown-item icon="Position" @click.stop="()=>shareId=item.FileId">分享</el-dropdown-item>
<el-dropdown-item v-if="item.IsShare" icon="Hide" @click.stop="removeShareHandler(item)">取消分享</el-dropdown-item>
<el-dropdown-item icon="Delete" @click="editDelete(item,1)">删除</el-dropdown-item> <el-dropdown-item icon="Delete" @click="editDelete(item,1)">删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
...@@ -217,6 +218,7 @@ ...@@ -217,6 +218,7 @@
const searchData = ref({} as any); const searchData = ref({} as any);
searchData.value = inject(injectKeyTemplate); searchData.value = inject(injectKeyTemplate);
const deleteLoading = ref<any>(null); const deleteLoading = ref<any>(null);
const removeShareLoading = ref<any>(null);
const datas = reactive({ const datas = reactive({
Sort: 0, Sort: 0,
selectedDatas: [] as Array, selectedDatas: [] as Array,
...@@ -334,6 +336,32 @@ ...@@ -334,6 +336,32 @@
editObj.value = JSON.parse(JSON.stringify(row)); editObj.value = JSON.parse(JSON.stringify(row));
}; };
const removeShareHandler= async (item:any) =>{
if(removeShareLoading.value) return
removeShareLoading.value=ElLoading.service({
lock: true,
text: "正在处理",
})
let errmsg=''
try {
let response = await ConfigService.RemoveFileShareAsync([item.FileId])
if(response.data.resultCode==ApiResult.SUCCESS){
ElMessage.success({
message:'设置成功'
})
item.IsShare=false
} else errmsg='取消分享失败,请刷新重试'
} catch (error) {
errmsg = '取消分享失败,请刷新重试'
}
if(errmsg!='') {
ElMessage.error({
message:errmsg
})
}
removeShareLoading.value.close();
removeShareLoading.value = null;
}
// 全选按钮 // 全选按钮
const clickSelectAll = () => { const clickSelectAll = () => {
...@@ -525,7 +553,7 @@ ...@@ -525,7 +553,7 @@
.journeyAds-TitleCenter { .journeyAds-TitleCenter {
width: 100%; width: 100%;
height: 18px; height: 18px;
padding-bottom: 21px; margin-bottom: 3px;
overflow: hidden; /* 隐藏超出部分 */ overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 显示省略号 */ text-overflow: ellipsis; /* 显示省略号 */
white-space: wrap; /* 不换行 */ white-space: wrap; /* 不换行 */
...@@ -580,6 +608,20 @@ ...@@ -580,6 +608,20 @@
.journeyAdsple-table:hover .hoverShow { .journeyAdsple-table:hover .hoverShow {
opacity: 1; opacity: 1;
} }
.share-icon-box{
position: relative;
}
.share-icon-box::after{
display: block;
position: absolute;
bottom: -4px;
right: 6px;
content: " ";
background: url('../../../assets/img/share.png');
width: 14px;
height: 14px;
z-index: 2;
}
.active { .active {
color: $themeColor; color: $themeColor;
} }
......
...@@ -56,13 +56,12 @@ ...@@ -56,13 +56,12 @@
:props="defaultProps" :props="defaultProps"
v-model="datas.FolderId" v-model="datas.FolderId"
:data="dataList" :data="dataList"
default-expand-all
check-strictly check-strictly
:render-after-expand="false" :render-after-expand="false"
show-checkbox
check-on-click-node
style="width: 220px" style="width: 220px"
default-expand-all
:filter-node-method="filterNode" :filter-node-method="filterNode"
@check="handleTreeNodeClick"
/> />
</div> </div>
...@@ -137,16 +136,13 @@ import FolderService from "@/services/FolderService"; ...@@ -137,16 +136,13 @@ import FolderService from "@/services/FolderService";
// 树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性 // 树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性
if (checkObj.checkedKeys.length != 0) { if (checkObj.checkedKeys.length != 0) {
datas.FolderObj = data datas.FolderObj = data
if (checkObj.checkedKeys.length == 2) { // if (checkObj.checkedKeys.length == 2) {
// 如果选择超过一个节点,则只保留最后一个节点 // datas.FolderId = data.FileId
//单选实现 // treeRef.value.setCheckedKeys([data.FileId]);
datas.FolderId = data.FileId // }else{
// if(checkObj.checkedNodes.length>1) // datas.FolderId = data.FileId
treeRef.value.setCheckedKeys([data.FileId]); // treeRef.value.setCheckedKeys([data.FileId]);
}else{ // }
datas.FolderId = data.FileId
treeRef.value.setCheckedKeys([data.FileId]);
}
} }
} }
const filterNode = (value: string, data: Tree) => { const filterNode = (value: string, data: Tree) => {
......
...@@ -494,7 +494,7 @@ const singleChoice = (row: any) => { ...@@ -494,7 +494,7 @@ const singleChoice = (row: any) => {
}; };
const DeleteFile = async (item: any) => { const DeleteFile = async (item: any) => {
ElMessageBox.confirm("此操作将删除该文件夹,是否确定?", "提示", { ElMessageBox.confirm("此操作将删除该文件夹及其下的文件,是否确定?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment