|
@@ -3,17 +3,17 @@
|
|
|
<div class="top-zone">
|
|
|
<div class="button-zone" v-show="tableSelection && tableSelection.length!=0">
|
|
|
<el-button v-permission="permissionBtn.cloudDisk.cloudDisk_download"
|
|
|
- class="download-button" @click="downloadBatch">下载</el-button>
|
|
|
+ class="download-button" @click="downloadBatch">{{$t('ReportManage.CloudPage.column_download_btn')}}</el-button>
|
|
|
<el-button v-permission="permissionBtn.cloudDisk.cloudDisk_del"
|
|
|
- type="danger" style="min-width: 112px;" @click="removeBatch" v-if="buttonPermission.batchDelete">删除</el-button>
|
|
|
+ type="danger" style="min-width: 112px;" @click="removeBatch" v-if="buttonPermission.batchDelete">{{$t('ReportManage.CloudPage.column_delete_btn')}}</el-button>
|
|
|
</div>
|
|
|
<div class="button-zone" v-show="(!tableSelection || tableSelection.length==0) && keyword==''">
|
|
|
<el-button type="primary" v-permission="permissionBtn.cloudDisk.cloudDisk_newDir"
|
|
|
- @click="newFloder" v-if="buttonPermission.createMenuAuth">新建文件夹</el-button>
|
|
|
+ @click="newFloder" v-if="buttonPermission.createMenuAuth">{{ $t('ReportManage.CloudPage.folder_btn') }}</el-button>
|
|
|
<template v-if="buttonPermission.uploadResourceAuth">
|
|
|
<el-button v-permission="permissionBtn.cloudDisk.cloudDisk_uploadFile"
|
|
|
type="primary" style="min-width: 112px;"
|
|
|
- @click="uploadFilePre" :loading="isUploading">上传文件</el-button>
|
|
|
+ @click="uploadFilePre" :loading="isUploading">{{ $t('ReportManage.CloudPage.upload_btn') }}</el-button>
|
|
|
<el-upload
|
|
|
action="#"
|
|
|
ref="upload"
|
|
@@ -27,9 +27,11 @@
|
|
|
</div>
|
|
|
<div class="search-zone">
|
|
|
<el-input v-model.trim="keyword" prefix-icon="el-icon-search"
|
|
|
- style="width: 317px;" placeholder="请输入关键字" clearable @input="getFileList(null,0)" ></el-input>
|
|
|
+ style="width: 317px;" :placeholder="$t('ReportManage.CloudPage.input_content')" clearable @input="getFileList(null,0)" ></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- // 等下删除 -->
|
|
|
+ <el-button @click="ExchangeChinesEnglish">中英互换</el-button>
|
|
|
<div class="table-zone" >
|
|
|
<div class="bread-crumb-row" v-show="keyword==''">
|
|
|
<el-breadcrumb>
|
|
@@ -48,7 +50,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ItemName" show-overflow-tooltip >
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
- {{ tableSelection.length>0?`已选中${tableSelection.length}个文件/文件夹`:'名称' }}
|
|
|
+ {{ tableSelection.length>0?`已选中${tableSelection.length}个文件/文件夹`:$t('ReportManage.CloudPage.column_name') }}
|
|
|
</template>
|
|
|
<template slot-scope="{row}">
|
|
|
<div class="file-name">
|
|
@@ -57,19 +59,19 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="创建人" prop="AdminName" width="112" show-overflow-tooltip>
|
|
|
+ <el-table-column :label="$t('ReportManage.CloudPage.column_author')" prop="AdminName" width="112" show-overflow-tooltip>
|
|
|
<template slot-scope="{row}">
|
|
|
{{ row.AdminName }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="创建时间" prop="CreateTime" sortable="custom" width="190">
|
|
|
+ <el-table-column :label="$t('ReportManage.CloudPage.column_creation_time')" prop="CreateTime" sortable="custom" width="190">
|
|
|
<template slot-scope="{row}">
|
|
|
{{ row.CreateTime }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="大小" prop="SizeName" width="140" show-overflow-tooltip>
|
|
|
+ <el-table-column :label="$t('ReportManage.CloudPage.column_font')" prop="SizeName" width="140" show-overflow-tooltip>
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
- {{ keyword==''?'大小':'所在目录' }}
|
|
|
+ {{ keyword==''? $t('ReportManage.CloudPage.column_font'):'所在目录' }}
|
|
|
</template>
|
|
|
<template slot-scope="{row}">
|
|
|
<span v-show="keyword==''">{{row.SizeName}}</span>
|
|
@@ -85,18 +87,18 @@
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="rename" v-permission="permissionBtn.cloudDisk.cloudDisk_rename"
|
|
|
- v-if="row.ButtonAuth.RenameAuth">重命名</el-dropdown-item>
|
|
|
+ v-if="row.ButtonAuth.RenameAuth">{{$t('ReportManage.CloudPage.column_rename_btn')}}</el-dropdown-item>
|
|
|
<el-dropdown-item command="download" v-permission="permissionBtn.cloudDisk.cloudDisk_download"
|
|
|
- >下载</el-dropdown-item>
|
|
|
+ >{{$t('ReportManage.CloudPage.column_download_btn')}}</el-dropdown-item>
|
|
|
<el-dropdown-item command="remove" v-permission="permissionBtn.cloudDisk.cloudDisk_del"
|
|
|
- ><span style="color:#D1433A ;" v-if="row.ButtonAuth.DelAuth" >删除</span></el-dropdown-item>
|
|
|
+ ><span style="color:#D1433A ;" v-if="row.ButtonAuth.DelAuth" >{{$t('ReportManage.CloudPage.column_delete_btn')}}</span></el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template slot="empty" >
|
|
|
<div style="padding: 140px 0">
|
|
|
- <tableNoData text="暂无文件"/>
|
|
|
+ <tableNoData :text="$t('ReportManage.CloudPage.table_no_file')"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table>
|
|
@@ -106,14 +108,14 @@
|
|
|
<el-dialog :title="dialogTitle" :visible.sync="newDialogShow" :close-on-click-modal="false"
|
|
|
:modal-append-to-body="false" @closed="closeNewDialog" width="408px" id="newOrRename">
|
|
|
<el-form :model="newOrRenameForm" ref="newOrRenameForm">
|
|
|
- <el-form-item prop="itemValue" :rules="{required:true,message:'文件/文件夹名称不能为空',trigger:'blur'}">
|
|
|
- <el-input v-model="newOrRenameForm.itemValue" placeholder="请输入文件/文件夹名称" style="width: 100%;"></el-input>
|
|
|
+ <el-form-item prop="itemValue" :rules="{required:true,message:$t('ReportManage.CloudPage.rules_prompt'),trigger:'blur'}">
|
|
|
+ <el-input v-model="newOrRenameForm.itemValue" :placeholder="$t('ReportManage.CloudPage.input_file_name')" style="width: 100%;"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template slot="footer">
|
|
|
- <el-button @click="newDialogShow=false" size="small" style="width: 60px;">取消</el-button>
|
|
|
+ <el-button @click="newDialogShow=false" size="small" style="width: 60px;">{{$t('Dialog.cancel_btn')}}</el-button>
|
|
|
<el-button type="primary" @click="newOrRenameConFirm" size="small" style="width: 60px;margin-left: 4px;" >
|
|
|
- {{ dialogTitle=='新建文件夹'?'创建':'确定' }}
|
|
|
+ {{ dialogTitle==$t('ReportManage.CloudPage.folder_btn')?$t('ReportManage.CloudPage.create_btn') :$t('Dialog.confirm_btn')}}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -122,7 +124,7 @@
|
|
|
append-to-body width="640px" @closed="closeChooseFolderDia" >
|
|
|
<div class="choose-folder-box" id="choose-folder-box">
|
|
|
<div class="folder-item">
|
|
|
- 所在文件夹:<span>{{ folderPath || '--' }}</span>
|
|
|
+ {{$t('ReportManage.CloudPage.folder_location')}}:<span>{{ folderPath || '--' }}</span>
|
|
|
</div>
|
|
|
<el-scrollbar style="height:470px;overflow-x: hidden;width: 100%;">
|
|
|
<el-tree :data="treeData" icon-class="none" @node-click="chooseFolder"
|
|
@@ -140,8 +142,8 @@
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
<div class="choose-dialog-footer">
|
|
|
- <el-button type="primary" @click="chooseFolderconFirm" size="medium" style="margin-left: 26px;width: 100px;">确定</el-button>
|
|
|
- <el-button @click="chooseFolderDiaShow=false" size="medium" style="width: 100px;">取消</el-button>
|
|
|
+ <el-button type="primary" @click="chooseFolderconFirm" size="medium" style="margin-left: 26px;width: 100px;">{{$t('Dialog.confirm_btn')}}</el-button>
|
|
|
+ <el-button @click="chooseFolderDiaShow=false" size="medium" style="width: 100px;">{{$t('Dialog.cancel_btn')}}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -220,6 +222,10 @@ import 'streamsaver/examples/zip-stream'
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ // 测试等下删除
|
|
|
+ ExchangeChinesEnglish(){
|
|
|
+ this.$i18n.locale = this.$i18n.locale == 'zh' ? 'en' : 'zh'
|
|
|
+ },
|
|
|
// 获取文件夹dom树
|
|
|
getMenuTree(){
|
|
|
cloudDiskInterface.fileTreeList().then(res=>{
|
|
@@ -244,7 +250,7 @@ import 'streamsaver/examples/zip-stream'
|
|
|
this.buttonPermission.uploadResourceAuth = res.Data.UploadResourceAuth
|
|
|
this.buttonPermission.batchDelete = res.Data.BatchDelAuth
|
|
|
let temArr = res.Data.ListPath || []
|
|
|
- this.breadCrumbsList = res.Data.ListPath?[{MenuId:0,MenuName:'全部',Selected:false,Sort:0}].concat(temArr):[]
|
|
|
+ this.breadCrumbsList = res.Data.ListPath?[{MenuId:0,MenuName:this.$t('ReportManage.CloudPage.everything'),Selected:false,Sort:0}].concat(temArr):[]
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -266,14 +272,14 @@ import 'streamsaver/examples/zip-stream'
|
|
|
},
|
|
|
// 新建文件夹
|
|
|
newFloder(){
|
|
|
- this.dialogTitle='新建文件夹'
|
|
|
+ this.dialogTitle= this.$t('ReportManage.CloudPage.folder_btn')
|
|
|
this.newDialogShow=true
|
|
|
this.newOrRenameForm.itemValue=""
|
|
|
},
|
|
|
// 上传文件
|
|
|
uploadFilePre(){
|
|
|
if(this.currentMenuId == 0){
|
|
|
- this.dialogTitle='选择文件夹'
|
|
|
+ this.dialogTitle= this.$t('ReportManage.CloudPage.select_folder_title')
|
|
|
this.chooseFolderDiaShow=true
|
|
|
}else{
|
|
|
this.uploadMenuId = this.currentMenuId
|
|
@@ -296,7 +302,7 @@ import 'streamsaver/examples/zip-stream'
|
|
|
// 选择文件夹确认
|
|
|
chooseFolderconFirm(){
|
|
|
if(!this.uploadMenuId || this.uploadMenuId==0){
|
|
|
- this.$message.error('请选择文件夹目录')
|
|
|
+ this.$message.error( this.$t('ReportManage.CloudPage.upload_folder_error_msg'))
|
|
|
return
|
|
|
}
|
|
|
this.$refs.upload.$el.getElementsByTagName('input')[0].click()
|
|
@@ -334,7 +340,7 @@ import 'streamsaver/examples/zip-stream'
|
|
|
// console.log(haveRepeatFiles);
|
|
|
if(haveRepeatFiles && haveRepeatFiles.length>0){
|
|
|
// 有重复
|
|
|
- this.$confirm(haveRepeatFiles.map(it => it.OriginName).join(',')+'已有同名文件,是否继续上传文件?','提示',{
|
|
|
+ this.$confirm(haveRepeatFiles.map(it => it.OriginName).join(',')+this.$t('ReportManage.CloudPage.upload_please_error_msg'), this.$t('Confirm.prompt'),{
|
|
|
type:'warning',
|
|
|
confirmButtonText: '保留两者',
|
|
|
cancelButtonText: '取消'
|
|
@@ -682,6 +688,7 @@ import 'streamsaver/examples/zip-stream'
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
+ this.$i18n.locale = 'zh'
|
|
|
this.currentMenuId=sessionStorage.getItem('cloudDiskMenuId') || 0
|
|
|
this.getFileList()
|
|
|
this.getMenuTree()
|