😎大屏标题和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 SysAuthService _sysAuthService;
|
||||
private readonly SysCacheService _sysCacheService;
|
||||
private readonly SysTenantService _sysTenantService;
|
||||
|
||||
public GoViewSysService(SqlSugarRepository<SysUser> sysUserRep,
|
||||
SysAuthService sysAuthService,
|
||||
SysCacheService sysCacheService)
|
||||
SysCacheService sysCacheService,
|
||||
SysTenantService sysTenantService)
|
||||
{
|
||||
_sysUserRep = sysUserRep;
|
||||
_sysAuthService = sysAuthService;
|
||||
_sysCacheService = sysCacheService;
|
||||
_sysTenantService = sysTenantService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -90,4 +93,15 @@ public class GoViewSysService : IDynamicApiController
|
||||
{
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
// * 获取系统基本信息
|
||||
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',
|
||||
icon: renderIcon(SettingsSharpIcon)
|
||||
},
|
||||
{
|
||||
label: renderLang('global.contact'),
|
||||
key: 'contact',
|
||||
icon: renderIcon(ChatboxEllipsesIcon)
|
||||
},
|
||||
// {
|
||||
// label: renderLang('global.contact'),
|
||||
// key: 'contact',
|
||||
// icon: renderIcon(ChatboxEllipsesIcon)
|
||||
// },
|
||||
{
|
||||
type: 'divider',
|
||||
key: 'd3'
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<div class="go-footer">
|
||||
<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-a>{{ $t('global.doc_addr') }}: </n-a>
|
||||
<n-a italic :href="docPath" target="_blank">
|
||||
@ -13,13 +17,19 @@
|
||||
京ICP备2021034585号-1
|
||||
</n-a>
|
||||
</n-text>
|
||||
</n-space>
|
||||
</n-space> -->
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { docPath } from '@/settings/pathConst'
|
||||
|
||||
const props = defineProps({
|
||||
sysinfo: {
|
||||
type: Object,
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -31,4 +41,10 @@ import { docPath } from '@/settings/pathConst'
|
||||
padding: 0 40px;
|
||||
height: $--footer-height;
|
||||
}
|
||||
|
||||
.textScc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
<template>
|
||||
<n-layout-header bordered class="go-header">
|
||||
<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">
|
||||
<n-space>
|
||||
<slot name="left"></slot>
|
||||
<slot name="left"> </slot>
|
||||
</n-space>
|
||||
</div>
|
||||
<div class="header-item center">
|
||||
@ -23,13 +27,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
||||
import { GoLangSelect } from '@/components/GoLangSelect'
|
||||
import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
||||
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 isProject = computed(() => {
|
||||
|
||||
@ -17,6 +17,13 @@
|
||||
</div>
|
||||
<layout-header></layout-header>
|
||||
<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">
|
||||
<n-carousel autoplay dot-type="line" :interval="Number(carouselInterval)">
|
||||
<img
|
||||
@ -33,7 +40,7 @@
|
||||
<n-collapse-transition :appear="true" :show="show">
|
||||
<n-card class="login-account-card" :title="$t('login.desc')">
|
||||
<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>
|
||||
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
|
||||
<n-form-item path="username">
|
||||
@ -87,7 +94,7 @@
|
||||
</div>
|
||||
|
||||
<div class="go-login-box-footer">
|
||||
<layout-footer></layout-footer>
|
||||
<layout-footer :sysinfo="sysinfo"></layout-footer>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -106,7 +113,7 @@ import { PageEnum } from '@/enums/pageEnum'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { icon } from '@/plugins'
|
||||
import { routerTurnByName } from '@/utils'
|
||||
import { loginApi } from '@/api/path'
|
||||
import { loginApi, sysInfoApi } from '@/api/path'
|
||||
|
||||
const { PersonOutlineIcon, LockClosedOutlineIcon } = icon.ionicons5
|
||||
|
||||
@ -116,6 +123,8 @@ const autoLogin = ref(true)
|
||||
const show = ref(false)
|
||||
const showBg = ref(false)
|
||||
const systemStore = useSystemStore()
|
||||
const sysinfo = ref()
|
||||
const basePath = import.meta.env.VITE_PRO_PATH
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// 处理服务器URL
|
||||
const getImageUrl2 = () => {
|
||||
var logo = import.meta.env.VITE_PRO_PATH + sysinfo.value?.logo
|
||||
return logo
|
||||
}
|
||||
|
||||
// 打乱图片顺序
|
||||
const shuffleHandle = () => {
|
||||
shuffleTimiing.value = setInterval(() => {
|
||||
@ -194,7 +209,7 @@ const handleSubmit = async (e: Event) => {
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
setTimeout(() => {
|
||||
show.value = true
|
||||
}, 300)
|
||||
@ -204,6 +219,11 @@ onMounted(() => {
|
||||
}, 100)
|
||||
|
||||
shuffleHandle()
|
||||
|
||||
// 获取系统信息
|
||||
const res = await sysInfoApi()
|
||||
sysinfo.value = res?.data
|
||||
console.log(res)
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -322,4 +342,21 @@ $carousel-image-height: 60vh;
|
||||
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>
|
||||
|
||||
@ -1,17 +1,12 @@
|
||||
<template>
|
||||
<div class="go-project">
|
||||
<n-layout has-sider position="absolute">
|
||||
<n-space vertical>
|
||||
<n-space vertical style="display: none">
|
||||
<project-layout-sider></project-layout-sider>
|
||||
</n-space>
|
||||
<n-layout>
|
||||
<layout-header-pro></layout-header-pro>
|
||||
<n-layout
|
||||
id="go-project-content-top"
|
||||
class="content-top"
|
||||
position="absolute"
|
||||
:native-scrollbar="false"
|
||||
>
|
||||
<n-layout id="go-project-content-top" class="content-top" position="absolute" :native-scrollbar="false">
|
||||
<n-layout-content>
|
||||
<layout-transition-main>
|
||||
<router-view></router-view>
|
||||
@ -29,14 +24,14 @@ import { LayoutHeaderPro } from '@/layout/components/LayoutHeaderPro'
|
||||
import { LayoutTransitionMain } from '@/layout/components/LayoutTransitionMain/index'
|
||||
import { goDialog } from '@/utils'
|
||||
|
||||
// 提示
|
||||
goDialog({
|
||||
message: '不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!',
|
||||
isMaskClosable: true,
|
||||
closeNegativeText: true,
|
||||
transformOrigin: 'center',
|
||||
onPositiveCallback: () => {}
|
||||
})
|
||||
// // 提示
|
||||
// goDialog({
|
||||
// message: '不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!',
|
||||
// isMaskClosable: true,
|
||||
// closeNegativeText: true,
|
||||
// transformOrigin: 'center',
|
||||
// onPositiveCallback: () => {}
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user