fix: 修复页面结构bug

This commit is contained in:
wangdan-fit2cloud 2024-07-18 18:13:38 +08:00
parent 6f8e7e90b6
commit d7612043b9
7 changed files with 22 additions and 26 deletions

View File

@ -1,5 +1,13 @@
<template>
<div class="app-header" :class="!isDefaultTheme ? 'custom-header' : ''">
<el-alert
v-if="user.isExpire()"
title="未上传 License 或 License 已过期。"
type="warning"
class="border-b"
show-icon
:closable="false"
/>
<TopBar />
</div>
</template>

View File

@ -17,7 +17,7 @@
<span class="label">ISV</span><span>{{ licenseInfo?.isv || '-' }}</span>
</div>
<div class="flex">
<span class="label">期时间</span>
<span class="label">期时间</span>
<span
>{{ licenseInfo?.expired || '-' }}
<span class="danger" v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"
@ -28,8 +28,8 @@
<div class="flex">
<span class="label">版本</span
><span>{{
licenseInfo?.edition
? EditionType[licenseInfo.edition as keyof typeof EditionType]
user.isXPack
? EditionType[licenseInfo.edition as keyof typeof EditionType] || '专业版'
: '社区版'
}}</span>
</div>
@ -44,10 +44,7 @@
<span class="label">备注</span><span>{{ licenseInfo?.remark || '-' }}</span>
</div>
<div
class="mt-16 flex align-center"
v-hasPermission="new ComplexPermission(['ADMIN'], ['x-pack'], 'AND')"
>
<div class="mt-16 flex align-center" v-if="user.isXPack">
<el-upload
ref="uploadRef"
action="#"
@ -80,7 +77,7 @@ const loading = ref(false)
const licenseInfo = ref<any>(null)
const open = () => {
if (user.isEnterprise()) {
if (user.isXPack) {
getLicenseInfo()
}

View File

@ -1,13 +1,5 @@
·
<template>
<el-alert
v-if="user.isExpire()"
title="未上传 License 或 License 已过期。"
type="warning"
class="border-b"
show-icon
:closable="false"
/>
<div class="top-bar-container border-b flex-between">
<div class="flex-center h-full">
<div class="app-title-container cursor" @click="router.push('/')">
@ -71,11 +63,8 @@ import Avatar from './avatar/index.vue'
import { useRouter } from 'vue-router'
import { langList } from '@/locales/index'
import { useLocale } from '@/locales/useLocale'
import useStore from '@/stores'
const router = useRouter()
const { user } = useStore()
const { changeLocale } = useLocale()
const changeLang = (lang: string) => {
changeLocale(lang)

View File

@ -1,11 +1,13 @@
<script setup lang="ts">
import { AppHeader, AppMain } from '../components'
import useStore from '@/stores'
const { user } = useStore()
</script>
<template>
<div class="app-layout">
<AppHeader />
<div class="app-main">
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''">
<AppMain />
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="app-layout">
<AppHeader />
<div class="app-main">
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''">
<div class="main-layout h-full flex">
<div class="sidebar-container">
<Sidebar />
@ -16,6 +16,8 @@
<script setup lang="ts">
import { AppHeader, Sidebar, AppMain } from '../components'
import useStore from '@/stores'
const { user } = useStore()
</script>
<style lang="scss" scoped>
@import './index.scss';

View File

@ -9,6 +9,9 @@
padding: var(--app-header-height) 0 0 !important;
box-sizing: border-box;
overflow: auto;
&.isExpire {
padding-top: calc(var(--app-header-height) + 40px) !important;
}
}
.sidebar-container {

View File

@ -14,11 +14,6 @@ export const themeList = [
value: '#00B69D',
loginBackground: 'green'
},
{
label: '商务蓝',
value: '#4954E6',
loginBackground: 'default'
},
{
label: '神秘紫',
value: '#7F3BF5',