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