[add] UI 修改
This commit is contained in:
parent
569785e983
commit
ef34bdb2db
@ -9,6 +9,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@arco-themes/vue-taolu-publishing-platform": "^0.0.2",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.11",
|
||||
"@vue-office/pptx": "^0.0.6",
|
||||
|
||||
43
src/components/breadcrumb/index.vue
Normal file
43
src/components/breadcrumb/index.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="mb-15">
|
||||
<div class="flex flex-center flex-justify-start">
|
||||
<div v-for="(item,index) in history" class="flex flex-center flex-justify-start">
|
||||
<p v-if="index !== history.length - 1" class="p1 pointer" >{{item.title}}</p>
|
||||
<p v-else class=" p2">{{item.title}}</p>
|
||||
|
||||
<icon-right v-if="index !== history.length - 1" style="padding:0 10px"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
history: [
|
||||
{title:'项目库',path:'/system/region'},
|
||||
{title:'项目详情',path:'/system/region'},
|
||||
{title:'项目文件夹',path:'/system/region/info'}
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.p1 {
|
||||
padding: 10px 0 10px 0;
|
||||
}
|
||||
|
||||
.p1:hover{
|
||||
padding: 10px 0 10px 0;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.p2 {
|
||||
padding: 10px 0 10px 0;
|
||||
color:red
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -1,44 +1,76 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="background-color: red">
|
||||
<div>
|
||||
<div class="menu">
|
||||
<div class="flex flex-center flex-justify-start mt-32 ml-15">
|
||||
<img
|
||||
style="height:24px;"
|
||||
src="../assets/vue.svg"
|
||||
/>
|
||||
<p class="font-16 bold">工作台</p>
|
||||
<img style="height: 24px" src="../assets/vue.svg" />
|
||||
<p class="font-16 bold">工作台</p>
|
||||
</div>
|
||||
<div class="mt-20" >
|
||||
<div v-for="item in list" :key="item.id">
|
||||
<div
|
||||
class="row flex flex-center flex-justify-start pointer"
|
||||
@click="goPath(item)"
|
||||
<div class="mt-20 menu2">
|
||||
<a-menu
|
||||
:style="{ width: '200px', height: '100%' }"
|
||||
breakpoint="xl"
|
||||
v-model:selected-keys="keys"
|
||||
:default-selected-keys="keys"
|
||||
@menu-item-click="goPath"
|
||||
>
|
||||
<template v-for="item in list" :key="item.id" @click="goPath(item.id)">
|
||||
<!-- 有子菜单 -->
|
||||
<a-sub-menu v-if="item.children && item.children.length" :key="item.id+'@'+item.value">
|
||||
<template #icon>
|
||||
<icon-apps />
|
||||
</template>
|
||||
<template #title>{{ item.name }}</template>
|
||||
|
||||
<a-menu-item
|
||||
v-for="sub in item.children"
|
||||
:key="sub.id+'@'+sub.value"
|
||||
style="text-align: start;padding-left: 22px"
|
||||
>
|
||||
<div class="flex flex-center">
|
||||
<icon-home />
|
||||
<div class="ml-10" >
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
{{ sub.name }}
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
|
||||
<!-- 没有子菜单(首页这种) -->
|
||||
<a-menu-item v-else :key="item.id+'@'+item.value">
|
||||
<template #icon>
|
||||
<icon-apps />
|
||||
</template>
|
||||
<div class="flex flex-center flex-justify-start">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div v-if="item.children">
|
||||
<div
|
||||
v-for="sub in item.children"
|
||||
class="sub flex flex-center flex-justify-start pointer"
|
||||
:key="sub.id"
|
||||
@click="goPath(sub)"
|
||||
>
|
||||
<div
|
||||
class="flex flex-center flex-justify-between"
|
||||
>
|
||||
<div class="flex-child-average">
|
||||
{{ sub.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</template>
|
||||
</a-menu>
|
||||
</div>
|
||||
<div class="bottom menu2" v-if="user">
|
||||
<a-menu
|
||||
mode="pop"
|
||||
:style="{ width: '200px', height: '100%' }"
|
||||
>
|
||||
<a-sub-menu key="2">
|
||||
<template #icon>
|
||||
<a-avatar :image-url="user.avatar" :size="24">
|
||||
</a-avatar>
|
||||
</template>
|
||||
<template #title>{{user.name}}</template>
|
||||
<a-menu-item key="2_0">
|
||||
<template #icon>
|
||||
<icon-message/>
|
||||
</template>
|
||||
消息中心</a-menu-item>
|
||||
<a-menu-item key="2_1">
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
</template>
|
||||
个人中心</a-menu-item>
|
||||
<a-menu-item key="2_2">
|
||||
<template #icon>
|
||||
<icon-poweroff />
|
||||
</template>
|
||||
退出登录</a-menu-item>
|
||||
</a-sub-menu>
|
||||
</a-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,55 +82,50 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
user: null,
|
||||
list: []
|
||||
list: [],
|
||||
keys: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
this.fetchMenu()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const tmp = localStorage.getItem('user')
|
||||
if (tmp) {
|
||||
this.user = JSON.parse(tmp)
|
||||
}
|
||||
},
|
||||
fetchMenu() {
|
||||
this.$api.sys.menus().then(res => {
|
||||
if (res.code === 200) {
|
||||
this.list = res.data
|
||||
}
|
||||
if (this.list.length > 0) {
|
||||
const path = this.list[0]
|
||||
this.keys[0] = path.id + "@" + path.value
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
goPath(res) {
|
||||
this.$router.push(res.value)
|
||||
const path = res.split("@")
|
||||
this.keys[0] = res
|
||||
this.$router.push(path[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.menu {
|
||||
.menu2 :deep(.arco-menu) {
|
||||
--color-menu-light-bg: #f8f9fb;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 200px;
|
||||
bottom: 200px;
|
||||
|
||||
.row {
|
||||
font-size: 16px;
|
||||
padding: 16px;
|
||||
color:#4c4d4e;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.row:hover {
|
||||
color: #4FAB5F;
|
||||
font-weight: bold;
|
||||
background-color: #f0f1f3;
|
||||
}
|
||||
|
||||
.sub {
|
||||
padding: 16px 62px;
|
||||
}
|
||||
|
||||
.sub:hover {
|
||||
color: #4FAB5F;
|
||||
padding: 16px 62px;
|
||||
background-color: #f0f1f3;
|
||||
}
|
||||
bottom: 16px;
|
||||
background-color: #5dc800;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="bg full-screen flex flex-center">
|
||||
<a-card class="flex flex-center">
|
||||
<div style="padding: 32px">
|
||||
<h1 style="padding-bottom: 32px">👏 欢迎登录工作台</h1>
|
||||
<h1 style="padding-bottom: 32px">👏 欢迎登录植趣工作台</h1>
|
||||
<a-form :model="form" auto-label-width>
|
||||
<a-form-item hide-label>
|
||||
<a-input
|
||||
@ -40,7 +40,7 @@
|
||||
<div class="bottom">
|
||||
<div>
|
||||
Copyright © 2024-{{ new Date().getFullYear() }}
|
||||
科技有限公司 版权所有
|
||||
植趣 版权所有
|
||||
</div>
|
||||
<div class="mt-10">All Rights Reserved.</div>
|
||||
</div>
|
||||
|
||||
26
src/views/system/region/index.vue
Normal file
26
src/views/system/region/index.vue
Normal file
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<navbar title="区域管理"></navbar>
|
||||
<a-card>
|
||||
<a-button type="text" @click="goInfo">查看</a-button>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
},
|
||||
methods: {
|
||||
goInfo() {
|
||||
this.$router.push({ path: "/system/region/info" });
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
22
src/views/system/region/info.vue
Normal file
22
src/views/system/region/info.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<navbar title="区域详情"></navbar>
|
||||
<breadcrumb/>
|
||||
<a-card>info</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar/index.vue'
|
||||
import breadcrumb from "@/components/breadcrumb/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
breadcrumb
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user