😎大屏标题和logo默认和系统基本信息匹配一致
This commit is contained in:
parent
e0774a8014
commit
f67569edad
@ -16,14 +16,17 @@ public class GoViewSysService : IDynamicApiController
|
|||||||
private readonly SqlSugarRepository<SysUser> _sysUserRep;
|
private readonly SqlSugarRepository<SysUser> _sysUserRep;
|
||||||
private readonly SysAuthService _sysAuthService;
|
private readonly SysAuthService _sysAuthService;
|
||||||
private readonly SysCacheService _sysCacheService;
|
private readonly SysCacheService _sysCacheService;
|
||||||
|
private readonly SysTenantService _sysTenantService;
|
||||||
|
|
||||||
public GoViewSysService(SqlSugarRepository<SysUser> sysUserRep,
|
public GoViewSysService(SqlSugarRepository<SysUser> sysUserRep,
|
||||||
SysAuthService sysAuthService,
|
SysAuthService sysAuthService,
|
||||||
SysCacheService sysCacheService)
|
SysCacheService sysCacheService,
|
||||||
|
SysTenantService sysTenantService)
|
||||||
{
|
{
|
||||||
_sysUserRep = sysUserRep;
|
_sysUserRep = sysUserRep;
|
||||||
_sysAuthService = sysAuthService;
|
_sysAuthService = sysAuthService;
|
||||||
_sysCacheService = sysCacheService;
|
_sysCacheService = sysCacheService;
|
||||||
|
_sysTenantService = sysTenantService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -90,4 +93,15 @@ public class GoViewSysService : IDynamicApiController
|
|||||||
{
|
{
|
||||||
return Task.FromResult(new GoViewOssUrlOutput { BucketURL = "" });
|
return Task.FromResult(new GoViewOssUrlOutput { BucketURL = "" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统基本信息 🔖
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[DisplayName("获取系统基本信息")]
|
||||||
|
public async Task<dynamic> GetSysInfo([FromQuery] long tenantId)
|
||||||
|
{
|
||||||
|
return await _sysTenantService.GetSysInfo(tenantId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -37,3 +37,18 @@ export const ossUrlApi = async (data: object) => {
|
|||||||
httpErrorHandle()
|
httpErrorHandle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// * 获取系统基本信息
|
||||||
|
export const sysInfoApi = async () => {
|
||||||
|
try {
|
||||||
|
const res = await http(RequestHttpEnum.GET)<{
|
||||||
|
/**
|
||||||
|
* 租户Id
|
||||||
|
*/
|
||||||
|
tenantId?: 0
|
||||||
|
}>(`${ModuleTypeEnum.SYSTEM}/sysInfo`)
|
||||||
|
return res
|
||||||
|
} catch (err) {
|
||||||
|
httpErrorHandle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -98,11 +98,11 @@ const options = ref([
|
|||||||
key: 'sysSet',
|
key: 'sysSet',
|
||||||
icon: renderIcon(SettingsSharpIcon)
|
icon: renderIcon(SettingsSharpIcon)
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: renderLang('global.contact'),
|
// label: renderLang('global.contact'),
|
||||||
key: 'contact',
|
// key: 'contact',
|
||||||
icon: renderIcon(ChatboxEllipsesIcon)
|
// icon: renderIcon(ChatboxEllipsesIcon)
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
type: 'divider',
|
type: 'divider',
|
||||||
key: 'd3'
|
key: 'd3'
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="go-footer">
|
<div class="go-footer">
|
||||||
<slot>
|
<slot>
|
||||||
<n-space :size="50">
|
<div class="textScc">
|
||||||
|
<n-a style="text-align: center"> {{ props.sysinfo?.icp }} </n-a>
|
||||||
|
<n-a> {{ props.sysinfo?.copyright }} </n-a>
|
||||||
|
</div>
|
||||||
|
<!-- <n-space :size="50">
|
||||||
<n-text depth="2">
|
<n-text depth="2">
|
||||||
<n-a>{{ $t('global.doc_addr') }}: </n-a>
|
<n-a>{{ $t('global.doc_addr') }}: </n-a>
|
||||||
<n-a italic :href="docPath" target="_blank">
|
<n-a italic :href="docPath" target="_blank">
|
||||||
@ -13,13 +17,19 @@
|
|||||||
京ICP备2021034585号-1
|
京ICP备2021034585号-1
|
||||||
</n-a>
|
</n-a>
|
||||||
</n-text>
|
</n-text>
|
||||||
</n-space>
|
</n-space> -->
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { docPath } from '@/settings/pathConst'
|
import { docPath } from '@/settings/pathConst'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
sysinfo: {
|
||||||
|
type: Object,
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -31,4 +41,10 @@ import { docPath } from '@/settings/pathConst'
|
|||||||
padding: 0 40px;
|
padding: 0 40px;
|
||||||
height: $--footer-height;
|
height: $--footer-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.textScc {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-layout-header bordered class="go-header">
|
<n-layout-header bordered class="go-header">
|
||||||
<header class="go-header-box" :class="{ 'is-project': isProject }">
|
<header class="go-header-box" :class="{ 'is-project': isProject }">
|
||||||
|
<n-space v-if="isProject" style="padding-top: 13px">
|
||||||
|
<project-layout-create :collapsed="collapsed"></project-layout-create>
|
||||||
|
</n-space>
|
||||||
|
<n-space vertical class="go-project-sider-top"> </n-space>
|
||||||
<div class="header-item left">
|
<div class="header-item left">
|
||||||
<n-space>
|
<n-space>
|
||||||
<slot name="left"></slot>
|
<slot name="left"> </slot>
|
||||||
</n-space>
|
</n-space>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-item center">
|
<div class="header-item center">
|
||||||
@ -23,13 +27,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
||||||
import { GoLangSelect } from '@/components/GoLangSelect'
|
import { GoLangSelect } from '@/components/GoLangSelect'
|
||||||
import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
||||||
import { PageEnum } from '@/enums/pageEnum'
|
import { PageEnum } from '@/enums/pageEnum'
|
||||||
|
// E:\信墨\养老\SmartElder\GoView\src\views\project\layout\components\ProjectLayoutCreate\index.vue
|
||||||
|
import { ProjectLayoutCreate } from '@/views/project/layout/components/ProjectLayoutCreate/index'
|
||||||
|
|
||||||
|
const collapsed = ref<boolean>(false)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const isProject = computed(() => {
|
const isProject = computed(() => {
|
||||||
|
|||||||
@ -17,6 +17,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<layout-header></layout-header>
|
<layout-header></layout-header>
|
||||||
<div class="go-login">
|
<div class="go-login">
|
||||||
|
<div class="go-login-titleBox">
|
||||||
|
<img :src="getImageUrl2()" />
|
||||||
|
<div class="go-login-titleBox-right">
|
||||||
|
<n-a style="font-size: 28px; font-weight: 700">{{ sysinfo?.viceTitle }}</n-a>
|
||||||
|
<n-a>{{ sysinfo?.viceDesc }}</n-a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="go-login-carousel">
|
<div class="go-login-carousel">
|
||||||
<n-carousel autoplay dot-type="line" :interval="Number(carouselInterval)">
|
<n-carousel autoplay dot-type="line" :interval="Number(carouselInterval)">
|
||||||
<img
|
<img
|
||||||
@ -33,7 +40,7 @@
|
|||||||
<n-collapse-transition :appear="true" :show="show">
|
<n-collapse-transition :appear="true" :show="show">
|
||||||
<n-card class="login-account-card" :title="$t('login.desc')">
|
<n-card class="login-account-card" :title="$t('login.desc')">
|
||||||
<div class="login-account-top">
|
<div class="login-account-top">
|
||||||
<img class="login-account-top-logo" src="~@/assets/images/login/input.png" alt="展示图片" />
|
<img class="login-account-top-logo" :src="getImageUrl2()" alt="展示图片" />
|
||||||
</div>
|
</div>
|
||||||
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
|
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
|
||||||
<n-form-item path="username">
|
<n-form-item path="username">
|
||||||
@ -87,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="go-login-box-footer">
|
<div class="go-login-box-footer">
|
||||||
<layout-footer></layout-footer>
|
<layout-footer :sysinfo="sysinfo"></layout-footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -106,7 +113,7 @@ import { PageEnum } from '@/enums/pageEnum'
|
|||||||
import { StorageEnum } from '@/enums/storageEnum'
|
import { StorageEnum } from '@/enums/storageEnum'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
import { routerTurnByName } from '@/utils'
|
import { routerTurnByName } from '@/utils'
|
||||||
import { loginApi } from '@/api/path'
|
import { loginApi, sysInfoApi } from '@/api/path'
|
||||||
|
|
||||||
const { PersonOutlineIcon, LockClosedOutlineIcon } = icon.ionicons5
|
const { PersonOutlineIcon, LockClosedOutlineIcon } = icon.ionicons5
|
||||||
|
|
||||||
@ -116,6 +123,8 @@ const autoLogin = ref(true)
|
|||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const showBg = ref(false)
|
const showBg = ref(false)
|
||||||
const systemStore = useSystemStore()
|
const systemStore = useSystemStore()
|
||||||
|
const sysinfo = ref()
|
||||||
|
const basePath = import.meta.env.VITE_PRO_PATH
|
||||||
|
|
||||||
const t = window['$t']
|
const t = window['$t']
|
||||||
|
|
||||||
@ -151,6 +160,12 @@ const getImageUrl = (name: string, folder: string) => {
|
|||||||
return new URL(`../../assets/images/${folder}/${name}.png`, import.meta.url).href
|
return new URL(`../../assets/images/${folder}/${name}.png`, import.meta.url).href
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理服务器URL
|
||||||
|
const getImageUrl2 = () => {
|
||||||
|
var logo = import.meta.env.VITE_PRO_PATH + sysinfo.value?.logo
|
||||||
|
return logo
|
||||||
|
}
|
||||||
|
|
||||||
// 打乱图片顺序
|
// 打乱图片顺序
|
||||||
const shuffleHandle = () => {
|
const shuffleHandle = () => {
|
||||||
shuffleTimiing.value = setInterval(() => {
|
shuffleTimiing.value = setInterval(() => {
|
||||||
@ -194,7 +209,7 @@ const handleSubmit = async (e: Event) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
show.value = true
|
show.value = true
|
||||||
}, 300)
|
}, 300)
|
||||||
@ -204,6 +219,11 @@ onMounted(() => {
|
|||||||
}, 100)
|
}, 100)
|
||||||
|
|
||||||
shuffleHandle()
|
shuffleHandle()
|
||||||
|
|
||||||
|
// 获取系统信息
|
||||||
|
const res = await sysInfoApi()
|
||||||
|
sysinfo.value = res?.data
|
||||||
|
console.log(res)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -322,4 +342,21 @@ $carousel-image-height: 60vh;
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.go-login-titleBox {
|
||||||
|
position: fixed;
|
||||||
|
top: 8%;
|
||||||
|
left: 2%;
|
||||||
|
display: flex;
|
||||||
|
img {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
&-right {
|
||||||
|
margin-left: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,17 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="go-project">
|
<div class="go-project">
|
||||||
<n-layout has-sider position="absolute">
|
<n-layout has-sider position="absolute">
|
||||||
<n-space vertical>
|
<n-space vertical style="display: none">
|
||||||
<project-layout-sider></project-layout-sider>
|
<project-layout-sider></project-layout-sider>
|
||||||
</n-space>
|
</n-space>
|
||||||
<n-layout>
|
<n-layout>
|
||||||
<layout-header-pro></layout-header-pro>
|
<layout-header-pro></layout-header-pro>
|
||||||
<n-layout
|
<n-layout id="go-project-content-top" class="content-top" position="absolute" :native-scrollbar="false">
|
||||||
id="go-project-content-top"
|
|
||||||
class="content-top"
|
|
||||||
position="absolute"
|
|
||||||
:native-scrollbar="false"
|
|
||||||
>
|
|
||||||
<n-layout-content>
|
<n-layout-content>
|
||||||
<layout-transition-main>
|
<layout-transition-main>
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
@ -29,14 +24,14 @@ import { LayoutHeaderPro } from '@/layout/components/LayoutHeaderPro'
|
|||||||
import { LayoutTransitionMain } from '@/layout/components/LayoutTransitionMain/index'
|
import { LayoutTransitionMain } from '@/layout/components/LayoutTransitionMain/index'
|
||||||
import { goDialog } from '@/utils'
|
import { goDialog } from '@/utils'
|
||||||
|
|
||||||
// 提示
|
// // 提示
|
||||||
goDialog({
|
// goDialog({
|
||||||
message: '不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!',
|
// message: '不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!',
|
||||||
isMaskClosable: true,
|
// isMaskClosable: true,
|
||||||
closeNegativeText: true,
|
// closeNegativeText: true,
|
||||||
transformOrigin: 'center',
|
// transformOrigin: 'center',
|
||||||
onPositiveCallback: () => {}
|
// onPositiveCallback: () => {}
|
||||||
})
|
// })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user