Commit 5dae942f authored by zhengke's avatar zhengke

优化组件

parent c768b0b9
......@@ -46,7 +46,7 @@
<td class="text-light text-5B5D62"><span>{{item.FileSize}}KB</span></td>
<td class="text-light">
<span :class="[item.NewTitle?'active':'text-5B5D62']">
{{item.NewTitle?item.NewTitle:item.Title}}</span>
{{item.NewTitle?item.NewTitle:''}}</span>
</td>
<td class="text-center">
<span class="hoverShow">
......@@ -56,7 +56,7 @@
<template #dropdown>
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
<el-dropdown-item icon="Promotion" @click.stop="clickControls(item,1)">另存</el-dropdown-item>
<el-dropdown-item icon="Switch" @click.stop="clickControls(item,2)">替换</el-dropdown-item>
<el-dropdown-item v-if="!item.NewTitle" icon="Switch" @click.stop="clickControls(item,2)">替换</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
......@@ -126,6 +126,7 @@ import CopyFile from "./CopyFile.vue";
const loading = ref(true)
const HistoricalVersion = ref<any>()
const copyDataList = ref([] as Array<any>);
const deleteLoading = ref<any>(null);
const queryObj = reactive({
pageIndex: 1,
pageSize: 30,
......@@ -139,15 +140,62 @@ import CopyFile from "./CopyFile.vue";
const clickControls = (row:any,type:any) => {
if(type){
datas.type = type
journeyAdsDetails.value = row
isCopyTo.value = true
if(type==1){
isCopyTo.value = true
datas.type = type
}else{
ElMessageBox.confirm(
`此操作将替换到当前版本,是否确定?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(async () => {
try {
SaveOverlay()
} catch (error) { }
})
.catch(() => { });
}
}else {
let param = query()
const url = `${process.env.VUE_APP_SHARE_URL}/?uid=${param.uid}&sellId=${row.FileId}&LogId=${row.LogId}&ViewSlideshow=1`
window.open(url);
}
}
const SaveOverlay = async () => {
let queryMsg = {
LogId: journeyAdsDetails.value.LogId,
FileId: journeyAdsDetails.value.FileId,
UpdateType: 2,
FolderId: '',
};
deleteLoading.value = ElLoading.service({
lock: true,
text: "正在处理",
});
let pageRes = await ConfigService.UpdateOtherByHistory(queryMsg);
if (pageRes.data.resultCode == ApiResult.SUCCESS) {
ElMessage({
showClose: true,
message: `替换文件${props.details.FileType ? "" : "夹"}成功`,
type: "success",
});
refreshHandler()
} else {
ElMessage({
showClose: true,
message: `替换文件${props.details.FileType ? "" : "夹"}失败`,
type: "warning",
});
}
deleteLoading.value.close();
deleteLoading.value = null;
};
const closedhandler=()=>{
emit('close')
}
......
......@@ -81,6 +81,7 @@
@UpdateData="UpdateData"
@success="success"
@refreshHandler="refreshHandler"></journeyAdsList>
<!--
<div
v-if="dataList.length == 0 && !loading"
class="q-mt-lg bg-white rounded"
......@@ -104,7 +105,7 @@
background="transparent"
v-loading="loading"
element-loading-text="正在加载中"
></div>
></div> -->
</el-scrollbar>
</div>
<Folder
......
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