update 数据存储-文件管理,baseTable换成FileTable

This commit is contained in:
2026-01-20 15:07:25 +08:00
parent 161540d385
commit 23a4a703bb
3 changed files with 65 additions and 136 deletions

View File

@@ -54,7 +54,7 @@ const props = defineProps({
// 操作栏默认列表,不传默认需要所有
defaultActions: {
type: Array,
dfault: () => ['download', 'preview', 'delete'],
default: () => ['preview', 'download', 'delete'],
},
// 预览方式 如果想用onlyOffice则 fileNameField 必传
previewType: {

View File

@@ -1,6 +1,6 @@
<template>
<div class="setting-page">
<BaseTable
<FileTable
tableName="FILE_STORAGE_MANAGE_TABLE"
ref="baseTableRef"
:api="listBigFileApi"
@@ -9,6 +9,7 @@
v-model:searchParams="searchParams"
:defaultSearchParams="{ fileSizeUnit: 'TB' }"
:actionList="actionList"
:defaultActions="['preview']"
@checkbox-all="checkboxChangeFun"
@checkbox-change="checkboxChangeFun"
:searchAttrs="{
@@ -39,13 +40,14 @@
>批量删除</el-button
>
</template>
</BaseTable>
</FileTable>
</div>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import FileTable from '@/components/common/fileTable/index.vue';
import { listBigFileApi, batchDeleteBigFileApi } from '@/api/data/data';
import StatusDot from '@/components/common/statusDot/index.vue';
import { ElMessage, ElMessageBox } from 'element-plus';

View File

@@ -90,7 +90,6 @@
collapse-tags
@change="initStatisticsOfSubjectStorageSpaceFun"
>
<!-- disciplineOptions -->
<el-option
v-for="item in DISCIPLINE_TYPE.A"
:label="item.label"
@@ -152,7 +151,6 @@
import { ref, reactive, onMounted, nextTick } from 'vue';
import ProjectSelect from '@/components/common/projectSelect/index.vue';
import UserSelect from '@/components/common/userSelect/index.vue';
import { queryNodeListApi } from '@/api/project/node';
import { userQueryGroupApi } from '@/api/system/user';
import { getDirectorySizeByUserIdApi, getNodeSizeByNodeTypeApi } from '@/api/data/data';
import EchartCard from '@/components/common/echartCard/index.vue';
@@ -288,9 +286,12 @@ const initProjectStorageSpaceStatisticsFun = async () => {
}
);
}
if (
!projectStorageSpaceStatisticsRef.value ||
!projectStorageSpaceStatisticsRef.value.commonChartRef
)
return;
projectStorageSpaceStatisticsRef.value.commonChartRef.disposeEchartsByKey('chart1');
projectStorageSpaceStatisticsRef.value.commonChartRef.option = {
color: ['#409eff', '#67c23a'],
title: {
@@ -333,27 +334,7 @@ const initProjectStorageSpaceStatisticsFun = async () => {
type: 'value',
name: '单位GB',
},
dataZoom:
xData.length > 3
? [
{
type: 'slider',
show: true,
xAxisIndex: [0],
start: 0,
end: 100,
textStyle: {
color: 'transparent',
},
maxValueSpan: 3,
minValueSpan: 3,
moveHandleSize: 10,
height: 0,
filterMode: 'empty',
bottom: 15,
},
]
: null,
dataZoom: xData.length > 3 ? [] : null,
series: seriesData,
};
projectStorageSpaceStatisticsRef.value.commonChartRef.initChart();
@@ -434,9 +415,12 @@ const initStatisticsOfSubjectStorageSpaceFun = async () => {
}
);
}
if (
!statisticsOfSubjectStorageSpaceRef.value ||
!statisticsOfSubjectStorageSpaceRef.value.commonChartRef
)
return;
statisticsOfSubjectStorageSpaceRef.value.commonChartRef.disposeEchartsByKey('chart2');
statisticsOfSubjectStorageSpaceRef.value.commonChartRef.option = {
color: ['#409eff', '#67c23a'],
title: {
@@ -479,27 +463,7 @@ const initStatisticsOfSubjectStorageSpaceFun = async () => {
type: 'value',
name: '单位GB',
},
dataZoom:
xData.length > 4
? [
{
type: 'slider',
show: true,
xAxisIndex: [0],
start: 0,
end: 100,
textStyle: {
color: 'transparent',
},
maxValueSpan: 4,
minValueSpan: 4,
moveHandleSize: 10,
height: 0,
filterMode: 'empty',
bottom: 15,
},
]
: null,
dataZoom: xData.length > 4 ? [] : null,
series: seriesData,
};
statisticsOfSubjectStorageSpaceRef.value.commonChartRef.initChart();
@@ -580,93 +544,57 @@ const initUserStorageSpaceStatisticsFun = async () => {
);
}
setTimeout(() => {
userStorageSpaceStatisticsRef.value.commonChartRef.disposeEchartsByKey('chart3');
userStorageSpaceStatisticsRef.value.commonChartRef.option = {
color: ['#409eff', '#67c23a'],
title: {
show: false,
if (!userStorageSpaceStatisticsRef.value || !userStorageSpaceStatisticsRef.value.commonChartRef)
return;
userStorageSpaceStatisticsRef.value.commonChartRef.disposeEchartsByKey('chart3');
userStorageSpaceStatisticsRef.value.commonChartRef.option = {
color: ['#409eff', '#67c23a'],
title: {
show: false,
},
tooltip: {
trigger: 'axis',
formatter: function (params: any) {
return params.reverse().reduce((result: string, param: any, index: number) => {
return (
result +
(index === 0 ? param.name + '<br/>' : '') +
param.marker +
param.seriesName +
' ' +
'<span style="font-weight:bold">' +
param.value +
' GB</span>' +
(index === params.length - 1 ? '' : '<br/>')
);
}, '');
},
tooltip: {
trigger: 'axis',
formatter: function (params: any) {
return params.reverse().reduce((result: string, param: any, index: number) => {
return (
result +
(index === 0 ? param.name + '<br/>' : '') +
param.marker +
param.seriesName +
' ' +
'<span style="font-weight:bold">' +
param.value +
' GB</span>' +
(index === params.length - 1 ? '' : '<br/>')
);
}, '');
},
},
legend: {
show: false,
top: '0%',
left: 'center',
},
grid: {
top: '10%',
bottom: '50',
left: '5%',
right: '5%',
},
xAxis: {
type: 'category',
data: xData,
},
yAxis: {
type: 'value',
name: '单位GB',
},
dataZoom:
xData.length > 2
? [
{
type: 'slider',
show: true,
xAxisIndex: [0],
start: 0,
end: 100,
textStyle: {
color: 'transparent',
},
maxValueSpan: 2,
minValueSpan: 2,
moveHandleSize: 10,
height: 0,
filterMode: 'empty',
bottom: 15,
},
]
: null,
series: seriesData,
};
userStorageSpaceStatisticsRef.value.commonChartRef.initChart();
}, 1000);
},
legend: {
show: false,
top: '0%',
left: 'center',
},
grid: {
top: '10%',
bottom: '50',
left: '5%',
right: '5%',
},
xAxis: {
type: 'category',
data: xData,
},
yAxis: {
type: 'value',
name: '单位GB',
},
dataZoom: xData.length > 2 ? [] : null,
series: seriesData,
};
userStorageSpaceStatisticsRef.value.commonChartRef.initChart();
};
const disciplineOptions = ref<any>([]);
const getDisciplineOptionsFun = async () => {
queryNodeListApi({ current: 1, size: 999, nodeType: 'discipline', pid: null }).then(
(res: any) => {
if (res.code === 200) {
disciplineOptions.value = res.data.data.map((item: any) => {
return {
label: item.nodeName,
value: item.uuid,
};
});
}
}
);
};
const userGroupOptions = ref<any>([]);
const getGroupList = async () => {
@@ -689,7 +617,6 @@ const getGroupList = async () => {
};
onMounted(async () => {
await getDisciplineOptionsFun();
await getGroupList();
nextTick(() => {