Commit 7b2a4100 authored by LiXuyang's avatar LiXuyang

api-外样式

parent 1c74c230
<template> <template>
<PageWrapper class="content-padding" contentBackground> <PageWrapper class="content-padding" contentBackground>
<template #headerContent> <template #headerContent>
<div class="modal_top"> <div class="header">
<div> <Icon icon="hugeicons:file-euro" class="h-icon" :color="'#6499e9'" />
<Icon icon="hugeicons:file-euro" :size="50" :color="'#64c6e9'" /> <div class="h-txt">
</div> <div class="h-des">我申请的</div>
<div>
<div class="title">我申请的</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -183,4 +181,21 @@ ...@@ -183,4 +181,21 @@
.selected-row { .selected-row {
background-color: #5cb3ff; /* 可以根据需要调整颜色 */ background-color: #5cb3ff; /* 可以根据需要调整颜色 */
} }
.header {
display: flex;
flex-direction: row;
gap: 10px;
.h-icon {
font-size: 40px !important;
color: #0a208a;
}
.h-des {
font-size: 18px;
font-weight: bolder;
line-height: 40px;
}
.h-path {
font-size: 12px;
}
}
</style> </style>
<template> <template>
<div class=" overflow-hidden bg-white"> <div class="overflow-hidden bg-white">
<BasicTree <BasicTree
title="" title=""
ref="treeRef" ref="treeRef"
...@@ -29,6 +29,12 @@ ...@@ -29,6 +29,12 @@
} }
async function fetch() { async function fetch() {
treeData.value = handleTree(TreeData, 'businessId', undefined, undefined, undefined); treeData.value = handleTree(TreeData, 'businessId', undefined, undefined, undefined);
tabName.value = treeData.value[0].workSpaceName;
path.value = '/' + treeData.value[0].workSpaceName;
emit('select', {
path: path.value,
tabName: tabName.value,
});
await nextTick(() => { await nextTick(() => {
getTree().expandAll(true); getTree().expandAll(true);
}); });
...@@ -63,10 +69,37 @@ ...@@ -63,10 +69,37 @@
} }
/**选中的数据*/ /**选中的数据*/
function handleSelect(keys) { function handleSelect() {
emit('select', keys[0]); const keys = unref(treeRef).getSelectedKeys();
const node = unref(treeRef).getSelectedNode(keys[0]);
console.log('node', node);
console.log('tree', treeData.value);
// 获取标题
tabName.value = node.workSpaceName;
path.value = getPath(treeData.value[0]);
emit('select', {
path: path.value,
tabName: tabName.value,
});
}
const tabName = ref();
const path = ref();
// 嵌套获取路径
function getPath(data) {
if (data.workSpaceName === tabName.value) {
return '/' + data.workSpaceName;
} else {
if (data.children && data.children.length > 0) {
for (let item of data.children) {
const path = getPath(item);
if (path) {
return '/' + data.workSpaceName + path;
}
}
}
return;
}
} }
onMounted(() => { onMounted(() => {
fetch(); fetch();
}); });
......
<template> <template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
<GroupTree class="w-1/4 xl:w-1/5" @select="handleSelect" /> <GroupTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
<div class="w-3/4 xl:w-4/5"> <div class="w-3/4 xl:w-4/5" style="background-color: #ffffff">
<div style="display: flex; align-items: center; background-color: white; padding-top: 20px"> <div class="flex" style="padding: 20px">
<Icon style="margin-left: 30px" icon="ion:folder-outline" :size="50" :color="'#6499e9'" /> <div class="flex-1 header">
<div style="margin-left: 10px"> <Icon icon="ion:folder-outline" class="h-icon" :color="'#6499e9'" />
<span class="title">test</span> <div class="h-txt">
<div> <div class="h-des">{{ data.tabName }}</div>
<span class="path">我创建的</span> <div class="h-path">{{ data.path }}</div>
</div> </div>
</div> </div>
<a-button <div class="h-bt-group">
style="margin-left: 550px" <a-button type="primary" :disabled="getDisabled()" @click="deleteButton">删除</a-button>
type="primary" <a-button type="primary" :disabled="getDisabled()" @click="handleMove(1)">移动</a-button>
:disabled="getDisabled()" <a-button type="primary" :disabled="getDisabled()" @click="batchUploading"
@click="deleteButton"
>删除</a-button
>
<a-button
style="margin-left: 10px"
type="primary"
:disabled="getDisabled()"
@click="handleMove(1)"
>移动</a-button
>
<a-button
style="margin-left: 10px"
type="primary"
:disabled="getDisabled()"
@click="batchUploading"
>批量上架</a-button >批量上架</a-button
> >
<a-button style="margin-left: 10px" type="primary" @click="handleNewFolder" <a-button type="primary" @click="handleNewFolder">新建文件夹</a-button>
>新建文件夹</a-button <a-button type="primary" @click="handleCataloging">新建编目</a-button>
> <a-button type="primary" @click="handleDataEntry">新建文件</a-button>
<a-button style="margin-left: 10px" type="primary" @click="handleCataloging" <a-button type="primary" @click="handleDataEntry">批量新建</a-button>
>新建编目</a-button </div>
>
<a-button style="margin-left: 10px" type="primary" @click="handleDataEntry"
>新建文件</a-button
>
<a-button style="margin-left: 10px" type="primary" @click="handleDataEntry"
>批量新建</a-button
>
</div> </div>
<BasicTable ref="basicTable" style="background-color: white" @register="registerTable"> <BasicTable ref="basicTable" style="background-color: white" @register="registerTable">
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
...@@ -231,20 +209,32 @@ ...@@ -231,20 +209,32 @@
title: '编辑文件', title: '编辑文件',
}); });
} }
/** 部门树的select*/ const data = ref({});
function handleSelect() { function handleSelect(d) {
reload(); data.value = d;
} }
onMounted(() => {}); onMounted(() => {});
</script> </script>
<style scoped> <style scoped>
.title { .header {
font-size: 16px; display: flex;
font-weight: 500; flex-direction: row;
gap: 10px;
.h-icon {
font-size: 40px !important;
color: #0a208a;
}
.h-des {
font-size: 18px;
font-weight: bolder;
}
.h-path {
font-size: 12px;
}
} }
.path { .h-bt-group {
font-size: 14px; display: flex;
color: gray; gap: 10px;
} }
</style> </style>
<template> <template>
<div class="full-page-container"> <div class="full-page-container">
<PageWrapper class="page-wrapper"> <PageWrapper class="page-wrapper">
<div class="headerContainer"> <div class="header">
<div> <Icon icon="mdi:file-chart" class="h-icon" :color="'#61aaff'" />
<Icon icon="mdi:file-chart" :size="40" :color="'#61aaff'" /> <div class="h-txt">
</div> <div class="h-des">部门资源</div>
<div>
<div class="title">部门资源</div>
</div> </div>
</div> </div>
<div class="search"> <div class="search">
...@@ -231,4 +229,22 @@ ...@@ -231,4 +229,22 @@
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
.header {
margin-bottom: 15px;
display: flex;
flex-direction: row;
gap: 10px;
.h-icon {
font-size: 40px !important;
color: #0a208a;
}
.h-des {
font-size: 18px;
font-weight: bolder;
line-height: 40px;
}
.h-path {
font-size: 12px;
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment