去除部分移动端的属性。去除部分getters。未下载完成时,将按钮从隐藏改为禁用,修改接口路径(同步更新)
This commit is contained in:
+24
-19
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="side" style="width: 100%">
|
||||
<span>{{showType}}历史</span>
|
||||
<span v-show="loadComplete">{{showType}}历史</span>
|
||||
<div v-show="loadComplete" class="load_complete">
|
||||
<el-table :data="galleryTasks" v-show="isShowGalleryHistory">
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
<el-table-column label="操作" width="250">
|
||||
<template #default="scoped">
|
||||
<span v-show="scoped.row.download">
|
||||
<el-button @click="downloadTask(scoped.row.download)">下载</el-button>
|
||||
<el-button @click="deleteGallery(scoped.row.gid)">删除</el-button>
|
||||
<el-button @click="onlineGalleryReader(scoped.row.name)">在线看</el-button>
|
||||
<span>
|
||||
<el-button @click="downloadTask(scoped.row.download)" :disabled="operational(scoped.row.download)">下载</el-button>
|
||||
<el-button @click="deleteGallery(scoped.row.gid)" :disabled="operational(scoped.row.download)">删除</el-button>
|
||||
<el-button @click="onlineGalleryReader(scoped.row.name)" :disabled="operational(scoped.row.download)">在线看</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -57,10 +57,10 @@
|
||||
|
||||
<el-table-column label="操作" width="250">
|
||||
<template #default="scoped">
|
||||
<span v-show="scoped.row.download">
|
||||
<el-button @click="downloadTask(scoped.row.download)">下载</el-button>
|
||||
<el-button @click="deleteVideo(scoped.row.id)">删除</el-button>
|
||||
<el-button @click="onlineVideoViewer(scoped.row.name)">在线看</el-button>
|
||||
<span>
|
||||
<el-button @click="downloadTask(scoped.row.download)" :disabled="operational(scoped.row.download)">下载</el-button>
|
||||
<el-button @click="deleteVideo(scoped.row.id)" :disabled="operational(scoped.row.download)">删除</el-button>
|
||||
<el-button @click="onlineVideoViewer()" :disabled="operational(scoped.row.download)">在线看</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -123,11 +123,11 @@ export default {
|
||||
})
|
||||
|
||||
let isShowVideoHistory = computed(() => {
|
||||
return store.getters.showType === "video"
|
||||
return store.state.showType === "video"
|
||||
})
|
||||
|
||||
let isShowGalleryHistory = computed(() => {
|
||||
return store.getters.showType === "gallery"
|
||||
return store.state.showType === "gallery"
|
||||
})
|
||||
|
||||
let min = computed(() => {
|
||||
@@ -141,8 +141,12 @@ export default {
|
||||
})
|
||||
|
||||
let page = computed(() => {
|
||||
targetPage.value = store.getters.page
|
||||
return store.getters.page
|
||||
targetPage.value = store.state.page
|
||||
return store.state.page
|
||||
})
|
||||
|
||||
let loadComplete = computed(() => {
|
||||
return store.state.loadComplete
|
||||
})
|
||||
|
||||
function next() {
|
||||
@@ -169,10 +173,6 @@ export default {
|
||||
targetPage.value = min.value
|
||||
}
|
||||
|
||||
let loadComplete = computed(() => {
|
||||
return store.getters.loadComplete
|
||||
})
|
||||
|
||||
|
||||
function changePage(){
|
||||
if(targetPage.value >= min.value && targetPage.value <= max.value)
|
||||
@@ -203,8 +203,8 @@ export default {
|
||||
window.open("http://zfile.lionwebsite.xyz/1/gallery/" + encodeURI(name))
|
||||
}
|
||||
|
||||
function onlineVideoViewer(name){
|
||||
window.open("http://zfile.lionwebsite.xyz/1/video/" + encodeURI(name + ".mp4"))
|
||||
function onlineVideoViewer(){
|
||||
window.open("http://zfile.lionwebsite.xyz/1/video/")
|
||||
}
|
||||
|
||||
function changeShowType(){
|
||||
@@ -218,6 +218,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
function operational(download){
|
||||
return download === undefined
|
||||
}
|
||||
|
||||
|
||||
return {galleryTasks,
|
||||
videoTasks,
|
||||
@@ -243,6 +247,7 @@ export default {
|
||||
deleteVideo,
|
||||
onlineGalleryReader,
|
||||
onlineVideoViewer,
|
||||
operational,
|
||||
store
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user