1.loading问题修改2.上次打开数据清空
3.导航栏显示优化
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
:key="index"
|
||||
@click="handleIntoByPath(item)"
|
||||
>
|
||||
<span>{{ index > 1 ? item.path.replace(activePathList[1].path, ' ') : item.path }}</span>
|
||||
<!-- <span>{{ index > 1 ? item.path.replace(activePathList[1].path, ' '): item.path }}</span> -->
|
||||
<span>{{ outPutPath(item, index) }}</span>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
@@ -27,7 +28,7 @@
|
||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||
<el-button @click="handleRefresh">重置</el-button>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="list" v-if="dirList.length != 0 && !loading">
|
||||
<div class="list_item" v-for="(item, index) in dirList" :key="index">
|
||||
<div class="item_download">
|
||||
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
|
||||
@@ -60,7 +61,7 @@
|
||||
v-if="item?.type == 'file'"
|
||||
src="@/assets/img/wenjian.svg"
|
||||
/>
|
||||
<span v-if="!item.type">暂无内容</span>
|
||||
<!-- <span v-if="!item.type">暂无内容</span> -->
|
||||
<p>
|
||||
{{
|
||||
item &&
|
||||
@@ -73,6 +74,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty v-if="dirList.length != 0" />
|
||||
</div>
|
||||
<popup ref="fileRef"></popup>
|
||||
</div>
|
||||
@@ -171,14 +173,21 @@ const handleIntoDir = (row: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
//上传文件
|
||||
const uploadFile = (file: any) => {
|
||||
const obj = {
|
||||
id: nDid.value,
|
||||
file: file,
|
||||
filePath: '/'
|
||||
//处理导航栏路径
|
||||
const outPutPath = (row: any, key: any) => {
|
||||
let path = ''
|
||||
if (key <= 1) {
|
||||
path = row.path
|
||||
}
|
||||
uploadDeviceFile().then(res => {})
|
||||
if (key > 1) {
|
||||
if (row.path.includes(activePathList.value[1].path)) {
|
||||
path = row.path.replace(activePathList.value[1].path, ' ')
|
||||
}
|
||||
if (row.path.split('/').length !== 0) {
|
||||
path = '/' + row.path.split('/')[row.path.split('/').length - 1]
|
||||
}
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
//根据面包屑导航切换
|
||||
@@ -189,7 +198,7 @@ const handleIntoByPath = async (val: any) => {
|
||||
type: 'dir'
|
||||
}
|
||||
activePath.value = val.path
|
||||
loading.value=true
|
||||
loading.value = true
|
||||
getFileServiceFileOrDir(obj).then(res => {
|
||||
dirList.value = res.data
|
||||
activePathList.value.map((item: any, index: any) => {
|
||||
@@ -197,7 +206,7 @@ const handleIntoByPath = async (val: any) => {
|
||||
activePathList.value.splice(index, 1)
|
||||
}
|
||||
})
|
||||
loading.value=false
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ const handleClose = () => {
|
||||
//文件信息
|
||||
const fileData: any = ref({})
|
||||
const open = async (row: any, id: any) => {
|
||||
fileData.value = {}
|
||||
dialogVisible.value = true
|
||||
loading.value = true
|
||||
const obj = {
|
||||
@@ -50,8 +51,10 @@ const open = async (row: any, id: any) => {
|
||||
}
|
||||
await getFileServiceFileOrDir(obj).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
fileData.value = res.data[0]
|
||||
fileData.value.nDid = id
|
||||
if (res.data && res.data.length != 0) {
|
||||
fileData.value = res.data[0]
|
||||
fileData.value.nDid = id
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user