文件服务表格高度修改

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