修复已知问题

This commit is contained in:
2024-10-11 13:53:41 +08:00
parent 75e959cf4e
commit f63452d433
7 changed files with 49 additions and 17 deletions
+1
View File
@@ -61,5 +61,6 @@ export interface Config {
kefu1?: string;
email?: string;
loginTitle?: string;
sysName?: string;
sysLogo?: string;
}
@@ -60,4 +60,5 @@ export interface Config {
email?: string;
loginTitle?: string;
sysLogo?: string;
sysName?: string;
}
+9 -6
View File
@@ -128,10 +128,16 @@
const themeStore = useThemeStore();
// 租户信息
const { company } = storeToRefs(tenantStore);
// 当前用户信息
const loginUser = computed(() => userStore.info ?? {});
// 菜单数据
const { menus, config } = storeToRefs(userStore);
// 网站名称
const projectName = company.value?.shortName || 'WEBSOFT';
const projectName = ref<string>('控制台');
// 当前用户信息
// const loginUser = computed(() => userStore.info ?? {});
if (localStorage.getItem('TenantName')) {
projectName.value = `${localStorage.getItem('TenantName')}`;
}
// 网站LOGO
const logoPath =
company.value?.companyLogo || 'https://www.gxwebsoft.com/ws-logo.svg';
@@ -139,9 +145,6 @@
// 是否全屏
const fullscreen = ref(false);
// 菜单数据
const { menus } = storeToRefs(userStore);
// 布局风格
const {
tabs,
+9
View File
@@ -8,11 +8,14 @@ import type { User } from '@/api/system/user/model';
import { TOKEN_STORE_NAME, USER_MENUS } from '@/config/setting';
import { getUserInfo } from '@/api/layout';
import { initialization } from '@/api/system/tenant';
import { Config } from '@/api/system/website/field/model';
import { configWebsiteField } from '@/api/system/website/field';
// import { isExternalLink } from 'ele-admin-pro';
// import { message } from 'ant-design-vue';
const EXTRA_MENUS: any = [];
export interface UserState {
config: Config | null;
info: User | null;
menus: MenuItemType[] | null | undefined;
authorities: (string | undefined)[];
@@ -22,6 +25,7 @@ export interface UserState {
export const useUserStore = defineStore({
id: 'user',
state: (): UserState => ({
config: null,
// 当前登录用户的信息
info: null,
// 当前登录用户的菜单
@@ -37,6 +41,11 @@ export const useUserStore = defineStore({
* 请求用户信息、权限、角色、菜单
*/
async fetchUserInfo() {
this.config = await configWebsiteField({});
// await configWebsiteField({}).then((data) => {
// console.log(data, 'data');
// this.config = data;
// });
const result = await getUserInfo().catch(() => {});
if (!result) {
return {};
@@ -42,12 +42,11 @@
/>
</a-form-item>
<a-form-item label="描述" name="comments">
<a-input
allow-clear
:maxlength="100"
<a-textarea
:rows="4"
:maxlength="200"
placeholder="参数描述"
v-model:value="form.comments"
@pressEnter="save"
/>
</a-form-item>
<a-form-item label="css样式" name="style">
@@ -175,6 +174,7 @@
assignFields(data);
form.value = data.defaultValue;
form.template = data.defaultValue;
form.comments = data.comments;
if (data.type == 1) {
images.value.push({
uid: `${data.id}`,
+10 -3
View File
@@ -124,9 +124,9 @@
// 表格列配置
const columns = ref<any[]>([
{
title: '参数名',
dataIndex: 'comments',
key: 'comments',
title: '参数',
dataIndex: 'name',
key: 'name',
width: 250,
ellipsis: true
},
@@ -136,6 +136,13 @@
key: 'value',
ellipsis: true
},
{
title: '描述',
dataIndex: 'comments',
key: 'comments',
width: 250,
ellipsis: true
},
{
title: '排序',
dataIndex: 'sortNumber',
+15 -4
View File
@@ -18,9 +18,9 @@
/>
<h4>{{ config.siteName }}</h4>
</div>
<div class="company-name" v-if="config?.loginTitle">{{
config?.loginTitle
}}</div>
<div class="company-name" v-if="config?.loginTitle"
>{{ config?.loginTitle }}
</div>
<a-form
ref="formRef"
:model="form"
@@ -125,7 +125,7 @@
v-model:value="form.phone"
:placeholder="`请输入手机号码`"
>
<template #addonBefore> +86 </template>
<template #addonBefore> +86</template>
</a-input>
</a-form-item>
<a-form-item name="smsCode">
@@ -502,6 +502,7 @@
background: rgba(0, 0, 0, 0.2);
}
}
.company-name {
position: absolute;
top: 17%;
@@ -510,6 +511,7 @@
font-size: 24px;
color: #ffffff;
}
/* 卡片 */
.login-form {
width: 380px;
@@ -526,18 +528,22 @@
padding: 22px 0;
text-align: center;
}
.title-btn {
cursor: pointer;
}
.login-title {
display: flex;
justify-content: space-around;
line-height: 50px;
.active {
color: #007dff;
}
}
}
.login-form-right .login-form {
margin: 0 15% 0 auto;
}
@@ -578,6 +584,7 @@
border-radius: 50%;
cursor: pointer;
}
.work-icon {
width: 50px;
height: 50px;
@@ -637,9 +644,11 @@
transform: translateX(-50%);
}
}
.wwLogin_qrcode_head {
padding: 10px 0 40px 0 !important;
}
.logo-login {
position: absolute;
top: 20px;
@@ -647,11 +656,13 @@
display: flex;
align-items: center;
cursor: pointer;
img {
width: 28px;
height: 28px;
border-radius: 4px;
}
h4 {
margin-left: 6px;
color: #ffffff;