修复一些bug
This commit is contained in:
parent
29fbe13c04
commit
f1d3ee3c44
@ -4,6 +4,7 @@ ENV = 'development'
|
|||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = '/api'
|
VUE_APP_BASE_API = '/api'
|
||||||
VUE_APP_BASE_FILE_API = '/file'
|
VUE_APP_BASE_FILE_API = '/file'
|
||||||
|
VUE_APP_BASE_PRIVIEW_API = '/priview'
|
||||||
|
|
||||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||||
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
||||||
|
|||||||
@ -4,3 +4,4 @@ ENV = 'production'
|
|||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = '/api'
|
VUE_APP_BASE_API = '/api'
|
||||||
VUE_APP_BASE_FILE_API = '/file'
|
VUE_APP_BASE_FILE_API = '/file'
|
||||||
|
VUE_APP_BASE_PRIVIEW_API = '/priview'
|
||||||
|
|||||||
@ -6,3 +6,4 @@ ENV = 'staging'
|
|||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = '/api'
|
VUE_APP_BASE_API = '/api'
|
||||||
VUE_APP_BASE_FILE_API = '/file'
|
VUE_APP_BASE_FILE_API = '/file'
|
||||||
|
VUE_APP_BASE_PRIVIEW_API = '/priview'
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB |
@ -339,3 +339,14 @@
|
|||||||
height: 60px;
|
height: 60px;
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-operation {
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: start;
|
||||||
|
-ms-flex-pack: start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
.select-operation-button {
|
||||||
|
margin-top: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -8,13 +8,13 @@
|
|||||||
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
|
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
|
||||||
</div>
|
</div>
|
||||||
<div class="bullshit">
|
<div class="bullshit">
|
||||||
<div class="bullshit__oops">OOPS!</div>
|
<div class="bullshit__oops">哎呦!</div>
|
||||||
<div class="bullshit__info">All rights reserved
|
<!--<div class="bullshit__info">All rights reserved-->
|
||||||
<a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>
|
<!--<a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="bullshit__headline">{{ message }}</div>
|
<div class="bullshit__headline">{{ message }}</div>
|
||||||
<div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to return to the homepage.</div>
|
<div class="bullshit__info">请检查您输入的URL是否正确,或单击下面的按钮返回首页。</div>
|
||||||
<a href="" class="bullshit__return-home">Back to home</a>
|
<a href="/" class="bullshit__return-home">返回首页</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -26,7 +26,7 @@ export default {
|
|||||||
name: 'Page404',
|
name: 'Page404',
|
||||||
computed: {
|
computed: {
|
||||||
message() {
|
message() {
|
||||||
return 'The webmaster said that you can not enter this page...'
|
return '网站管理员说您无法进入此页面...'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,9 +57,6 @@
|
|||||||
<el-button slot="prepend" @click="searchFile(searchFileName)">
|
<el-button slot="prepend" @click="searchFile(searchFileName)">
|
||||||
<svg-icon icon-class="search" />
|
<svg-icon icon-class="search" />
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button slot="append" @click="changeVmode">-->
|
|
||||||
<!-- <svg-icon :icon-class="grid ? 'menu-list' : 'menu-grid'" />-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button class="vmode" @click="changeVmode">
|
<el-button class="vmode" @click="changeVmode">
|
||||||
<svg-icon :icon-class="grid ? 'menu-list' : 'menu-grid'" />
|
<svg-icon :icon-class="grid ? 'menu-list' : 'menu-grid'" />
|
||||||
@ -123,7 +120,7 @@
|
|||||||
<!--分享-->
|
<!--分享-->
|
||||||
<el-dialog :title="'分享:'+shareFileName" :visible.sync="shareDialog" center>
|
<el-dialog :title="'分享:'+shareFileName" :visible.sync="shareDialog" center>
|
||||||
<div v-loading="generateShareLinkLoading">
|
<div v-loading="generateShareLinkLoading">
|
||||||
<el-input v-model="shareLink"></el-input>
|
<el-input readonly="readonly" v-model="shareLink"></el-input>
|
||||||
<div slot="footer" class="dialog-footer share-dialog-footer">
|
<div slot="footer" class="dialog-footer share-dialog-footer">
|
||||||
<el-button type="primary" class="tag-share-link" @click="copyShareLink" :data-clipboard-text="shareLink">复制链接</el-button>
|
<el-button type="primary" class="tag-share-link" @click="copyShareLink" :data-clipboard-text="shareLink">复制链接</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -202,7 +199,7 @@
|
|||||||
|
|
||||||
<el-table-column v-if="index === 3" :key="index" width="50" :index="index" align="center" header-align="center">
|
<el-table-column v-if="index === 3" :key="index" width="50" :index="index" align="center" header-align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg-icon v-if="scope.row.index === cellMouseIndex" class="button-class" icon-class="share" />
|
<svg-icon v-if="scope.row.index === cellMouseIndex" class="button-class" icon-class="share" @click="share(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@ -258,7 +255,23 @@
|
|||||||
element-loading-spinner="el-icon-loading"
|
element-loading-spinner="el-icon-loading"
|
||||||
element-loading-background="#f6f7fa88">
|
element-loading-background="#f6f7fa88">
|
||||||
<div class="checkbox-group-header">
|
<div class="checkbox-group-header">
|
||||||
<van-checkbox class="grid-all-checkbox" @click="clickGridAllCheckBox()" v-model="allChecked">{{indexList.length>0 ? '已选择 '+this.tableHead[2].label : "选择"}}</van-checkbox>
|
<div class="select-operation">
|
||||||
|
<van-checkbox class="grid-all-checkbox" @click="clickGridAllCheckBox()" v-model="allChecked">{{indexList.length>0 ? '已选择 '+this.tableHead[2].label : "选择"}}</van-checkbox>
|
||||||
|
<div>
|
||||||
|
<el-button class="select-operation-button" icon="el-icon-download" v-if="indexList.length > 0" @click="downloadFile">
|
||||||
|
下载
|
||||||
|
</el-button>
|
||||||
|
<el-button class="select-operation-button" icon="el-icon-share" v-if="indexList.length === 1" @click="share">
|
||||||
|
分享
|
||||||
|
</el-button>
|
||||||
|
<el-button class="select-operation-button" icon="el-icon-document-copy" v-if="indexList.length > 0" @click="moveOrCopy">
|
||||||
|
移动或复制
|
||||||
|
</el-button>
|
||||||
|
<el-button class="select-operation-button" icon="el-icon-delete" v-if="indexList.length > 0" type="danger" @click="deleteFile">
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -435,7 +448,7 @@ export default {
|
|||||||
positionX:0,
|
positionX:0,
|
||||||
positionY:0,
|
positionY:0,
|
||||||
grid: true,
|
grid: true,
|
||||||
vmode: 'list',
|
vmode: 'grid',
|
||||||
gridColumnNum: -1,
|
gridColumnNum: -1,
|
||||||
gridHoverItemIndex: -1,
|
gridHoverItemIndex: -1,
|
||||||
gridHoverIntermediate: -1,
|
gridHoverIntermediate: -1,
|
||||||
@ -563,6 +576,9 @@ export default {
|
|||||||
},10)
|
},10)
|
||||||
},
|
},
|
||||||
clickGridItemCheckBox(item,index) {
|
clickGridItemCheckBox(item,index) {
|
||||||
|
if(this.indexList.length === 0){
|
||||||
|
this.selectRowData = []
|
||||||
|
}
|
||||||
// 同步列表的checkbox
|
// 同步列表的checkbox
|
||||||
if(this.indexList.includes(index)){
|
if(this.indexList.includes(index)){
|
||||||
this.$refs.fileListTable.toggleRowSelection(item,false)
|
this.$refs.fileListTable.toggleRowSelection(item,false)
|
||||||
@ -1394,37 +1410,27 @@ export default {
|
|||||||
menusOperations(operation) {
|
menusOperations(operation) {
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
case 'share':
|
case 'share':
|
||||||
this.shareDialog = true
|
// 分享
|
||||||
this.shareFileName = this.rowContextData.name
|
this.share()
|
||||||
api.generate({
|
|
||||||
userId: this.rowContextData.userId,
|
|
||||||
fileId: this.rowContextData.id
|
|
||||||
}).then(res => {
|
|
||||||
if (res.data) {
|
|
||||||
this.shareLink = 'http://'+window.location.host+'/s?s='+res.data
|
|
||||||
this.generateShareLinkLoading = false
|
|
||||||
console.log(window.location.host, this.$route)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break
|
break
|
||||||
case 'favorite':
|
case 'favorite':
|
||||||
console.log('operation', '收藏')
|
// 收藏
|
||||||
this.favoriteOperating(true)
|
this.favoriteOperating(true)
|
||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
console.log('edit', '编辑')
|
// 编辑
|
||||||
this.$router.push(`/markdown/editor?id=${this.rowContextData.id}`)
|
this.$router.push(`/markdown/editor?id=${this.rowContextData.id}`)
|
||||||
break
|
break
|
||||||
case 'open':d
|
case 'open':
|
||||||
console.log('open', '打开')
|
// 打开
|
||||||
this.fileClick(this.rowContextData)
|
this.fileClick(this.rowContextData)
|
||||||
break
|
break
|
||||||
case 'deselect':
|
case 'deselect':
|
||||||
console.log('deselect', '取消选定')
|
// 取消选定
|
||||||
this.$refs.fileListTable.toggleRowSelection(this.rowContextData)
|
this.$refs.fileListTable.toggleRowSelection(this.rowContextData)
|
||||||
break
|
break
|
||||||
case 'unFavorite':
|
case 'unFavorite':
|
||||||
console.log('unFavorite', '取消收藏')
|
// 取消收藏
|
||||||
this.favoriteOperating(false)
|
this.favoriteOperating(false)
|
||||||
break
|
break
|
||||||
case 'details':
|
case 'details':
|
||||||
@ -1435,25 +1441,20 @@ export default {
|
|||||||
console.log('详情', this.rowContextData)
|
console.log('详情', this.rowContextData)
|
||||||
break
|
break
|
||||||
case 'rename':
|
case 'rename':
|
||||||
console.log('重命名')
|
// 重命名
|
||||||
this.renameFileName = this.rowContextData.name
|
this.renameFileName = this.rowContextData.name
|
||||||
this.editingIndex = this.rowContextData.index
|
this.editingIndex = this.rowContextData.index
|
||||||
break
|
break
|
||||||
case 'copy':
|
case 'copy':
|
||||||
console.log('移动或复制')
|
// 移动或复制
|
||||||
this.dialogMoveOrCopyVisible = true
|
this.moveOrCopy()
|
||||||
const that = this
|
|
||||||
setTimeout(function () {
|
|
||||||
that.selectTreeNode = that.$refs.directoryTree.getCurrentNode()
|
|
||||||
that.selectTreeNode.showName = ' "' + that.selectTreeNode.name + '"'
|
|
||||||
},100)
|
|
||||||
break
|
break
|
||||||
case 'download':
|
case 'download':
|
||||||
console.log('下载')
|
// 下载
|
||||||
this.downloadFile()
|
this.downloadFile()
|
||||||
break
|
break
|
||||||
case 'remove':
|
case 'remove':
|
||||||
console.log('operation', '删除')
|
// 删除
|
||||||
this.deleteFile()
|
this.deleteFile()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -1499,6 +1500,14 @@ export default {
|
|||||||
copyFileTree() {
|
copyFileTree() {
|
||||||
this.copyOrMove('copy');
|
this.copyOrMove('copy');
|
||||||
},
|
},
|
||||||
|
moveOrCopy(){
|
||||||
|
this.dialogMoveOrCopyVisible = true
|
||||||
|
const that = this
|
||||||
|
setTimeout(function () {
|
||||||
|
that.selectTreeNode = that.$refs.directoryTree.getCurrentNode()
|
||||||
|
that.selectTreeNode.showName = ' "' + that.selectTreeNode.name + '"'
|
||||||
|
},100)
|
||||||
|
},
|
||||||
copyOrMove(operating){
|
copyOrMove(operating){
|
||||||
let operation = '复制'
|
let operation = '复制'
|
||||||
if(operating === 'move'){
|
if(operating === 'move'){
|
||||||
@ -1510,7 +1519,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let fileIds = [];
|
let fileIds = [];
|
||||||
if (this.menusIsMultiple) {
|
if (this.menusIsMultiple || this.indexList.length > 1) {
|
||||||
const exits = this.selectRowData.some(value => {
|
const exits = this.selectRowData.some(value => {
|
||||||
fileIds.push(value.id)
|
fileIds.push(value.id)
|
||||||
const thisParentPath = value.path
|
const thisParentPath = value.path
|
||||||
@ -1526,7 +1535,11 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fileIds.push(this.rowContextData.id)
|
if(this.rowContextData.id){
|
||||||
|
fileIds.push(this.rowContextData.id)
|
||||||
|
}else{
|
||||||
|
fileIds.push(this.rowContextData[0].id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.copyOrMoveApi(operating,fileIds,this.selectTreeNode.id)
|
this.copyOrMoveApi(operating,fileIds,this.selectTreeNode.id)
|
||||||
},
|
},
|
||||||
@ -1593,6 +1606,27 @@ export default {
|
|||||||
</span>);
|
</span>);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
share(row) {
|
||||||
|
if(!row || !row.id){
|
||||||
|
if(this.rowContextData.id){
|
||||||
|
row = this.rowContextData
|
||||||
|
} else {
|
||||||
|
row = this.selectRowData[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.shareDialog = true
|
||||||
|
this.shareFileName = row.name
|
||||||
|
api.generate({
|
||||||
|
userId: row.userId,
|
||||||
|
fileId: row.id
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data) {
|
||||||
|
this.shareLink = 'http://'+window.location.host+'/s?s='+res.data
|
||||||
|
this.generateShareLinkLoading = false
|
||||||
|
console.log(window.location.host, this.$route)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 复制分享链接
|
// 复制分享链接
|
||||||
copyShareLink() {
|
copyShareLink() {
|
||||||
var clipboard = new Clipboard('.tag-share-link')
|
var clipboard = new Clipboard('.tag-share-link')
|
||||||
@ -1624,12 +1658,16 @@ export default {
|
|||||||
})
|
})
|
||||||
if (totalSize > 0) {
|
if (totalSize > 0) {
|
||||||
var fileIds = [];
|
var fileIds = [];
|
||||||
if (this.menusIsMultiple) {
|
if (this.indexList.length > 1) {
|
||||||
this.selectRowData.forEach(value => {
|
this.selectRowData.forEach(value => {
|
||||||
fileIds.push(value.id)
|
fileIds.push(value.id)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
if (this.rowContextData.id) {
|
||||||
fileIds.push(this.rowContextData.id)
|
fileIds.push(this.rowContextData.id)
|
||||||
|
} else {
|
||||||
|
fileIds.push(this.selectRowData[0].id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + 'download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
window.open(process.env.VUE_APP_BASE_FILE_API + 'download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
||||||
} else {
|
} else {
|
||||||
@ -1654,7 +1692,7 @@ export default {
|
|||||||
deleteFile() {
|
deleteFile() {
|
||||||
let fileList = []
|
let fileList = []
|
||||||
const fileIds = []
|
const fileIds = []
|
||||||
if (this.menusIsMultiple) {
|
if (this.menusIsMultiple || this.indexList.length > 1) {
|
||||||
fileList = this.selectRowData
|
fileList = this.selectRowData
|
||||||
this.selectRowData.forEach(value => {
|
this.selectRowData.forEach(value => {
|
||||||
fileIds.push(value.id)
|
fileIds.push(value.id)
|
||||||
@ -1662,6 +1700,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
fileIds.push(this.selectRowData[0].id)
|
fileIds.push(this.selectRowData[0].id)
|
||||||
}
|
}
|
||||||
|
console.log(fileIds)
|
||||||
const str = this.getShowSumFileAndFolder(fileList)
|
const str = this.getShowSumFileAndFolder(fileList)
|
||||||
|
|
||||||
this.$confirm('此操作将永久删除' + str + ', 是否继续?', '提示', {
|
this.$confirm('此操作将永久删除' + str + ', 是否继续?', '提示', {
|
||||||
@ -1738,9 +1777,14 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
// 打开文件
|
// 打开文件
|
||||||
const fileIds = [row.id]
|
const fileIds = [row.id]
|
||||||
const url = process.env.VUE_APP_BASE_FILE_API + 'preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds
|
let url = process.env.VUE_APP_BASE_FILE_API + 'preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds
|
||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
}
|
}
|
||||||
|
// const fileIds = [row.id]
|
||||||
|
// let url = 'http://localhost:10010/preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds
|
||||||
|
// url = process.env.VUE_APP_BASE_PRIVIEW_API+'/onlinePreview?url='+encodeURIComponent(url);
|
||||||
|
// console.log("url",url)
|
||||||
|
// window.open(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
<div class="searchClass">
|
<div class="searchClass">
|
||||||
<el-button v-if="indexList.length > 0" type="primary" @click="downloadFile">
|
<el-button v-if="indexList.length > 0" type="primary" @click="downloadFile">
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="vmode" @click="changeVmode">
|
<el-button class="vmode" @click="changeVmode">
|
||||||
<svg-icon :icon-class="grid ? 'menu-list' : 'menu-grid'" />
|
<svg-icon :icon-class="grid ? 'menu-list' : 'menu-grid'" />
|
||||||
|
|||||||
@ -52,6 +52,14 @@ module.exports = {
|
|||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_FILE_API]: ''
|
['^' + process.env.VUE_APP_BASE_FILE_API]: ''
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
[process.env.VUE_APP_BASE_PRIVIEW_API]: {
|
||||||
|
target: 'http://localhost:8012/',
|
||||||
|
// target: `http://127.0.0.1:${port}/mock`,
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
['^' + process.env.VUE_APP_BASE_PRIVIEW_API]: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// before: require('./mock/mock-server.js')
|
// before: require('./mock/mock-server.js')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user