文件服务表格高度修改

This commit is contained in:
zhujiyan
2024-10-22 21:02:06 +08:00
parent f1033f38ec
commit e83d3899ce

View File

@@ -62,65 +62,67 @@
</div>
</div>
<!-- 以列表形式展示 -->
<vxe-table
style="margin-top: 10px"
border
auto-resize
max-height="82%"
:data="dirList"
v-bind="defaultAttribute"
>
<vxe-column type="seq" title="序号" width="80"></vxe-column>
<vxe-column field="prjDataPath" align="center" title="名称" #default="{ row }">
<span
style="cursor: pointer; color: #551a8b"
:style="{
'text-decoration': row.type == 'dir' ? 'underline' : 'none',
color: row.type == 'dir' ? '#551a8b' : '#000'
}"
@click="handleIntoDir(row)"
>
{{
row &&
row?.prjDataPath &&
row?.prjDataPath.includes(activePath) &&
row?.prjDataPath.length > activePath.length
? row?.prjDataPath.replace(activePath, ' ').replace('/', ' ')
: row?.prjDataPath.replace('/', ' ')
}}
</span>
</vxe-column>
<vxe-column field="size" align="center" title="大小" #default="{ row }">
<span>
{{ row.size ? row.size + '字节' : '/' }}
</span>
</vxe-column>
<vxe-column field="type" align="center" title="类型" width="120" #default="{ row }">
<span>
{{ row.type == 'dir' ? '文件夹' : row.type == 'file' ? '文件' : '/' }}
</span>
</vxe-column>
<!-- <vxe-column field="startTime" align="center" title="文件时间" width="120" #default="{ row }">
<div :style="tableHeight">
<vxe-table
style="margin-top: 10px"
border
auto-resize
height="auto"
:data="dirList"
v-bind="defaultAttribute"
>
<vxe-column type="seq" title="序号" width="80"></vxe-column>
<vxe-column field="prjDataPath" align="center" title="名称" #default="{ row }">
<span
style="cursor: pointer; color: #551a8b"
:style="{
'text-decoration': row.type == 'dir' ? 'underline' : 'none',
color: row.type == 'dir' ? '#551a8b' : '#000'
}"
@click="handleIntoDir(row)"
>
{{
row &&
row?.prjDataPath &&
row?.prjDataPath.includes(activePath) &&
row?.prjDataPath.length > activePath.length
? row?.prjDataPath.replace(activePath, ' ').replace('/', ' ')
: row?.prjDataPath.replace('/', ' ')
}}
</span>
</vxe-column>
<vxe-column field="size" align="center" title="大小" #default="{ row }">
<span>
{{ row.size ? row.size + '字节' : '/' }}
</span>
</vxe-column>
<vxe-column field="type" align="center" title="类型" width="120" #default="{ row }">
<span>
{{ row.type == 'dir' ? '文件夹' : row.type == 'file' ? '文件' : '/' }}
</span>
</vxe-column>
<!-- <vxe-column field="startTime" align="center" title="文件时间" width="120" #default="{ row }">
{{ row.startTime ? row.startTime : '/' }}
</vxe-column> -->
<!--<vxe-column field="fileCheck" align="center" title="文件校验码" width="100" #default="{ row }">
<!--<vxe-column field="fileCheck" align="center" title="文件校验码" width="100" #default="{ row }">
{{ row.fileCheck ? row.fileCheck : '/' }}
</vxe-column> -->
<vxe-column title="操作" width="200px">
<template #default="{ row }">
<el-button link size="small" type="danger" @click="handleDelDirOrFile(row)">删除</el-button>
<el-button
v-if="row.type == 'file'"
link
size="small"
type="primary"
@click="handleDownLoad(row)"
>
下载
</el-button>
</template>
</vxe-column>
</vxe-table>
<vxe-column title="操作" width="200px">
<template #default="{ row }">
<el-button link size="small" type="danger" @click="handleDelDirOrFile(row)">删除</el-button>
<el-button
v-if="row.type == 'file'"
link
size="small"
type="primary"
@click="handleDownLoad(row)"
>
下载
</el-button>
</template>
</vxe-column>
</vxe-table>
</div>
<div class="list" v-if="dirList.length != 0 && !loading" style="display: none">
<div class="list_item" v-for="(item, index) in dirList" :key="index">
@@ -227,6 +229,8 @@ defineOptions({
name: 'govern/device/fileService'
})
const pageHeight = mainHeight(20)
const tableHeight = mainHeight(100)
const loading = ref(false)
//nDid
const nDid = ref<string>('')