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