feat: 文件库

This commit is contained in:
wf 2024-07-04 11:38:52 +08:00
parent b776821bf0
commit 7d69764529
4 changed files with 137 additions and 47 deletions

View File

@ -0,0 +1,58 @@
class fileTreeData {
static tree: any = [
{
title: "三国地域分布",
key: "0-0",
children: [
{
title: "魏国",
key: "0-0-0",
children: [
{ title: "司隶", key: "0-0-0-0" },
{ title: "徐州", key: "0-0-0-1" },
{ title: "青州", key: "0-0-0-2" },
{ title: "豫州", key: "0-0-0-3" },
{ title: "冀州", key: "0-0-0-4" },
{ title: "并州", key: "0-0-0-5" },
{ title: "幽州", key: "0-0-0-6" },
{ title: "兖州", key: "0-0-0-7" },
{ title: "凉州", key: "0-0-0-8" },
{ title: "雍州", key: "0-0-0-9" }
]
},
{
title: "吴国",
key: "0-0-1",
children: [
{ title: "荆州", key: "0-0-1-0" },
{ title: "扬州", key: "0-0-1-1" },
{ title: "交州", key: "0-0-1-2" },
{ title: "广州", key: "0-0-1-3" }
]
},
{
title: "蜀国",
key: "0-0-2",
children: [
{ title: "益州", key: "0-0-2-0" },
{ title: "汉中", key: "0-0-2-1" },
{ title: "云南", key: "0-0-2-2" }
]
}
]
}
];
}
export { fileTreeData };
// 三国220年280年是上承东汉下启西晋的一段历史时期分为曹魏、蜀汉、东吴三个政权。赤壁之战时曹操被孙刘联军击败奠定了三国鼎立的雏型。这三国大致继承东汉的疆域及政区制度为州、郡、县三级制。州设刺史或州牧。郡设太守。县大者置令小者置长。
// 魏国领地
// 曹魏的疆域主要在曹操时即大幅发展至曹丕称帝建国后定型约占有整个华北地区。大致上北至山西、河北及辽东与南匈奴、鲜卑及高句丽相邻东至黄海。东南与孙吴对峙于长江淮河一带及汉江长江一带以寿春、襄阳为重镇西至甘肃与河西鲜卑、羌及氐相邻。西南与蜀汉对峙于秦岭、河西一带以长安为重镇。在立国后原有87郡及十二州司隶、徐州、青州、豫州、冀州、并州、幽州、兖州、凉州、雍州、荆州占荆州北部、扬州占扬州北部。于西域设置管辖海头今新疆罗布泊西的西域长史和管辖高昌的戊己校尉。221年孙权称藩后曹魏让孙权领有荆州牧将荆扬等孙权势力则定为荆州曹魏原直辖的荆州北部改称为郢州。双方决裂后曹魏复改郢州为荆州。220年至226年分陇右置秦州最后并入雍州。
// 吴国领地
// 孙吴的疆域在孙策时即拥有大部分的扬州。孙权在赤壁之战后陆续获得荆州西部、交州并在击败关羽后获得整个荆州南部。至孙权称帝后疆域方稳定下来。孙吴北与曹魏对峙在长江淮河一带及汉江长江一带以建业、江陵为重镇西与蜀汉相邻于三峡西陵为重镇东及南至东海南海其中最南达现在越南的中部。孙吴原有32郡及三州荆州、扬州、交州。于226年设置广州后并入交州。至264年复设共增加一州。
// 蜀国领地
// 蜀汉疆域仅有益州。其创建者刘备直到赤壁之战后才在诸葛亮协助下由荆州南部开始发展。其势力一度涵盖荆州占荆州西部、益州及汉中。立国前后与孙吴发生多次战争并损失荆州于诸葛亮南定南中后获得云南一带疆域至此渐渐稳定。疆域范围北方与曹魏对峙于秦岭汉中为重镇东与孙吴相邻于三峡巴西为重镇西南至岷江、南中与羌、氐及南蛮相邻。蜀汉共有22郡、仅益州一州。于益州下设庲降都督治味县今云南曲靖专辖益州南部。

View File

@ -1,35 +1,66 @@
class fileTreeData {
static tree: any = [
{
title: "三国地域分布",
title: "总公司",
key: "0-0",
children: [
{
title: "魏国领地",
title: "行政部门",
key: "0-0-0",
children: [
{ title: "leaf", key: "0-0-0-0" },
{
title: "leaf",
key: "0-0-0-1",
children: [{ title: "leaf", key: "0-0-0-1-0" }]
title: "人力资源部",
key: "0-0-0-0",
children: [{ title: "员工出差申请表", key: "0-0-0-0-0" }]
},
{ title: "leaf", key: "0-0-0-2" }
{
title: "财务部",
key: "0-0-0-1",
children: [{ title: "行政费用预算分析-第一季度", key: "0-0-0-0-1" }]
},
{
title: "法务部",
key: "0-0-0-2",
children: [{ title: "公司章程", key: "0-0-0-0-2" }]
},
{ title: "行政工作计划", key: "0-0-0-3" },
{ title: "会议室预订统计", key: "0-0-0-4" },
{ title: "月度工作总结", key: "0-0-0-5" }
]
},
{
title: "吴国领地",
key: "0-0-1"
title: "业务部门",
key: "0-0-1",
children: [
{ title: "客户反馈集锦", key: "0-0-1-0" },
{ title: "市场分析报告-季度", key: "0-0-1-1" }
]
},
{
title: "蜀国领地",
title: "技术部门",
key: "0-0-2",
children: [
{ title: "leaf", key: "0-0-2-0" },
{
title: "leaf",
key: "0-0-2-1"
}
{ title: "代码审查记录", key: "0-0-2-0" },
{ title: "数据库优化方案", key: "0-0-2-1" },
{ title: "技术支持工单", key: "0-0-2-2" },
{ title: "安全漏洞扫描报告", key: "0-0-2-3" },
{ title: "系统性能调优总结", key: "0-0-2-4" },
{ title: "软件版本发布计划", key: "0-0-2-5" },
{ title: "技术培训材料", key: "0-0-2-6" },
{ title: "技术文档更新计划", key: "0-0-2-7" }
]
},
{
title: "后勤部门",
key: "0-0-3",
children: [
{ title: "设施维护报告", key: "0-0-3-0" },
{ title: "物流运输安排", key: "0-0-3-1" },
{ title: "仓库库存清单", key: "0-0-3-2" },
{ title: "办公室布局设计", key: "0-0-3-3" },
{ title: "设备采购申请表", key: "0-0-3-4" },
{ title: "食品安全检查记录", key: "0-0-3-5" }
]
}
]
@ -38,14 +69,3 @@ class fileTreeData {
}
export { fileTreeData };
// 三国220年280年是上承东汉下启西晋的一段历史时期分为曹魏、蜀汉、东吴三个政权。赤壁之战时曹操被孙刘联军击败奠定了三国鼎立的雏型。这三国大致继承东汉的疆域及政区制度为州、郡、县三级制。州设刺史或州牧。郡设太守。县大者置令小者置长。
// 魏国领地
// 曹魏的疆域主要在曹操时即大幅发展至曹丕称帝建国后定型约占有整个华北地区。大致上北至山西、河北及辽东与南匈奴、鲜卑及高句丽相邻东至黄海。东南与孙吴对峙于长江淮河一带及汉江长江一带以寿春、襄阳为重镇西至甘肃与河西鲜卑、羌及氐相邻。西南与蜀汉对峙于秦岭、河西一带以长安为重镇。在立国后原有87郡及十二州司隶、徐州、青州、豫州、冀州、并州、幽州、兖州、凉州、雍州、荆州占荆州北部、扬州占扬州北部。于西域设置管辖海头今新疆罗布泊西的西域长史和管辖高昌的戊己校尉。221年孙权称藩后曹魏让孙权领有荆州牧将荆扬等孙权势力则定为荆州曹魏原直辖的荆州北部改称为郢州。双方决裂后曹魏复改郢州为荆州。220年至226年分陇右置秦州最后并入雍州。
// 吴国领地
// 孙吴的疆域在孙策时即拥有大部分的扬州。孙权在赤壁之战后陆续获得荆州西部、交州并在击败关羽后获得整个荆州南部。至孙权称帝后疆域方稳定下来。孙吴北与曹魏对峙在长江淮河一带及汉江长江一带以建业、江陵为重镇西与蜀汉相邻于三峡西陵为重镇东及南至东海南海其中最南达现在越南的中部。孙吴原有32郡及三州荆州、扬州、交州。于226年设置广州后并入交州。至264年复设共增加一州。
// 蜀国领地
// 蜀汉疆域仅有益州。其创建者刘备直到赤壁之战后才在诸葛亮协助下由荆州南部开始发展。其势力一度涵盖荆州占荆州西部、益州及汉中。立国前后与孙吴发生多次战争并损失荆州于诸葛亮南定南中后获得云南一带疆域至此渐渐稳定。疆域范围北方与曹魏对峙于秦岭汉中为重镇东与孙吴相邻于三峡巴西为重镇西南至岷江、南中与羌、氐及南蛮相邻。蜀汉共有22郡、仅益州一州。于益州下设庲降都督治味县今云南曲靖专辖益州南部。

View File

@ -1,17 +1,24 @@
<template>
<div>
<div class="container-page">
<a-input class="search-tree" v-model="searchKey" placeholder="请输入搜索关键词">
<template #prefix>
<icon-search />
</template>
</a-input>
<a-tree :data="treeData" :show-line="true">
<template #icon="node">
<SvgIcon name="folder-close" :size="16" v-if="!node.isLeaf && !node.expanded"></SvgIcon>
<SvgIcon name="folder-open" :size="16" v-if="!node.isLeaf && node.expanded"></SvgIcon>
<SvgIcon name="txt" :size="16" v-if="node.isLeaf"></SvgIcon>
</template>
</a-tree>
<div class="tree-box">
<a-scrollbar style="height: 100%; overflow: auto" outer-class="scrollbar">
<a-tree :data="treeData" :show-line="true">
<template #title="node">
<span class="tree-title">{{ node.title }}</span>
</template>
<template #icon="node">
<SvgIcon name="folder-close" :size="16" v-if="!node.isLeaf && !node.expanded"></SvgIcon>
<SvgIcon name="folder-open" :size="16" v-if="!node.isLeaf && node.expanded"></SvgIcon>
<SvgIcon name="txt" :size="16" v-if="node.isLeaf"></SvgIcon>
</template>
</a-tree>
</a-scrollbar>
</div>
</div>
</template>
@ -56,7 +63,22 @@ const sourceTree = ref(fileTreeData.tree);
</script>
<style lang="scss" scoped>
.search-tree {
margin-bottom: $margin;
.container-page {
box-sizing: border-box;
padding: $padding;
height: 100%;
.search-tree {
height: 32px;
margin-bottom: $margin;
}
.tree-box {
height: calc(100% - 32px - $margin);
.scrollbar {
height: 100%;
.tree-title {
white-space: nowrap;
}
}
}
}
</style>

View File

@ -3,11 +3,7 @@
<div class="container">
<div class="container-main">
<div class="left-box">
<a-scrollbar style="height: 100%; overflow: auto" outer-class="scrollbar">
<div class="left-tree-box">
<FileTree />
</div>
</a-scrollbar>
<FileTree />
</div>
<div class="right-box"></div>
</div>
@ -34,12 +30,6 @@ import FileTree from "@/views/file-management/document-library/components/file-t
width: 300px;
height: 100%;
background: $color-bg-1;
.scrollbar {
height: 100%;
}
.left-tree-box {
padding: $padding;
}
}
.right-box {
margin-left: $padding;