动态标题设置
This commit is contained in:
parent
2f325c122c
commit
a329c96704
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 实验室管理系统
|
VITE_APP_TITLE = 实验室信息管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 实验室管理系统
|
VITE_APP_TITLE = 实验室信息管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 实验室管理系统
|
VITE_APP_TITLE = 实验室信息管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'staging'
|
VITE_APP_ENV = 'staging'
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>实验室检验系统</title>
|
<title>实验室信息管理系统</title>
|
||||||
|
|
||||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "czlis",
|
"name": "czlis",
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"description": "实验室管理系统",
|
"description": "实验室信息管理系统",
|
||||||
"author": "工具",
|
"author": "工具",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@ -16,6 +16,9 @@ import {
|
|||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import useSettingsStore from '@/store/modules/settings'
|
import useSettingsStore from '@/store/modules/settings'
|
||||||
import usePermissionStore from '@/store/modules/permission'
|
import usePermissionStore from '@/store/modules/permission'
|
||||||
|
import {
|
||||||
|
useDynamicTitle
|
||||||
|
} from '@/utils/dynamicTitle'
|
||||||
|
|
||||||
NProgress.configure({
|
NProgress.configure({
|
||||||
showSpinner: false
|
showSpinner: false
|
||||||
@ -78,5 +81,6 @@ router.beforeEach((to, from, next) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
NProgress.done()
|
useDynamicTitle();
|
||||||
|
NProgress.done();
|
||||||
})
|
})
|
||||||
@ -18,12 +18,12 @@ const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
|
|||||||
const useSettingsStore = defineStore(
|
const useSettingsStore = defineStore(
|
||||||
'settings', {
|
'settings', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
title: '', //标题
|
title: storageSetting.title || defaultSettings.title, // 页面标题
|
||||||
theme: storageSetting.theme || '#1F6DD3', //主题颜色
|
theme: storageSetting.theme || '#1F6DD3', //主题颜色
|
||||||
sideTheme: storageSetting.sideTheme || sideTheme, //侧边栏主题
|
sideTheme: storageSetting.sideTheme || sideTheme, //侧边栏主题
|
||||||
showSettings: showSettings, //是否显示设置按钮
|
showSettings: showSettings, //是否系统布局配置
|
||||||
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav, //顶部导航
|
topNav: storageSetting.topNav === undefined ? topNav : topNav, //顶部导航
|
||||||
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView, //是否显示标签页
|
tagsView: storageSetting.tagsView === undefined ? tagsView : tagsView, //是否显示标签页
|
||||||
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader, //是否固定头部
|
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader, //是否固定头部
|
||||||
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo, //侧边栏logo
|
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo, //侧边栏logo
|
||||||
dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle //是否动态标题
|
dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle //是否动态标题
|
||||||
|
|||||||
@ -7,9 +7,6 @@ import useSettingsStore from '@/store/modules/settings'
|
|||||||
*/
|
*/
|
||||||
export function useDynamicTitle() {
|
export function useDynamicTitle() {
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
if (settingsStore.dynamicTitle) {
|
const baseTitle = settingsStore.appTitle || defaultSettings.title;
|
||||||
document.title = settingsStore.title + ' - ' + defaultSettings.title;
|
document.title = baseTitle;
|
||||||
} else {
|
|
||||||
document.title = defaultSettings.title;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -96,7 +96,10 @@ import { useFingerprint } from '@/utils/useFingerprint';
|
|||||||
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
import { useCommonStore } from '@/store/modules/commonStore'
|
import { useCommonStore } from '@/store/modules/commonStore'
|
||||||
|
import defaultSettings from '@/settings'
|
||||||
|
import useSettingsStore from '@/store/modules/settings'
|
||||||
const mbStore = useCommonStore();
|
const mbStore = useCommonStore();
|
||||||
|
const settingsStore = useSettingsStore();
|
||||||
// 初始化响应式变量
|
// 初始化响应式变量
|
||||||
const activeName = ref('first');
|
const activeName = ref('first');
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@ -212,8 +215,14 @@ const Localconfig = (localid) => {
|
|||||||
getLocalconfig({ localid }).then(res => {
|
getLocalconfig({ localid }).then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const { localconfig, hosplist, oem: oemData } = res;
|
const { localconfig, hosplist, oem: oemData } = res;
|
||||||
mbStore.setDefaultConfig(localconfig)
|
mbStore.setDefaultConfig(localconfig);
|
||||||
if (oemData) oem.value = oemData;
|
if (oemData) {
|
||||||
|
const appTitle = oemData.appname || '实验室信息管理系统';
|
||||||
|
oem.value = oemData;
|
||||||
|
settingsStore.setTitle(appTitle);
|
||||||
|
defaultSettings.title = appTitle;
|
||||||
|
document.title = appTitle;
|
||||||
|
}
|
||||||
selectOptions.value = hosplist || [];
|
selectOptions.value = hosplist || [];
|
||||||
getCookie();
|
getCookie();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,65 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerRef" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerRef" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">实验室管理系统</h3>
|
<h3 class="title">实验室信息管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input v-model="registerForm.username" type="text" size="large" auto-complete="off" placeholder="账号">
|
||||||
v-model="registerForm.username"
|
|
||||||
type="text"
|
|
||||||
size="large"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="账号"
|
|
||||||
>
|
|
||||||
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input v-model="registerForm.password" type="password" size="large" auto-complete="off" placeholder="密码"
|
||||||
v-model="registerForm.password"
|
@keyup.enter="handleRegister">
|
||||||
type="password"
|
|
||||||
size="large"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="密码"
|
|
||||||
@keyup.enter="handleRegister"
|
|
||||||
>
|
|
||||||
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="confirmPassword">
|
<el-form-item prop="confirmPassword">
|
||||||
<el-input
|
<el-input v-model="registerForm.confirmPassword" type="password" size="large" auto-complete="off"
|
||||||
v-model="registerForm.confirmPassword"
|
placeholder="确认密码" @keyup.enter="handleRegister">
|
||||||
type="password"
|
|
||||||
size="large"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="确认密码"
|
|
||||||
@keyup.enter="handleRegister"
|
|
||||||
>
|
|
||||||
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
<el-input
|
<el-input size="large" v-model="registerForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
|
||||||
size="large"
|
@keyup.enter="handleRegister">
|
||||||
v-model="registerForm.code"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="验证码"
|
|
||||||
style="width: 63%"
|
|
||||||
@keyup.enter="handleRegister"
|
|
||||||
>
|
|
||||||
<template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
|
<template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="register-code">
|
<div class="register-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="register-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="register-code-img" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button :loading="loading" size="large" type="primary" style="width:100%;" @click.prevent="handleRegister">
|
||||||
:loading="loading"
|
|
||||||
size="large"
|
|
||||||
type="primary"
|
|
||||||
style="width:100%;"
|
|
||||||
@click.prevent="handleRegister"
|
|
||||||
>
|
|
||||||
<span v-if="!loading">注 册</span>
|
<span v-if="!loading">注 册</span>
|
||||||
<span v-else>注 册 中...</span>
|
<span v-else>注 册 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -129,7 +99,7 @@ function handleRegister() {
|
|||||||
type: "success",
|
type: "success",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
}).catch(() => {});
|
}).catch(() => { });
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (captchaEnabled) {
|
if (captchaEnabled) {
|
||||||
@ -162,6 +132,7 @@ getCode();
|
|||||||
background-image: url("../assets/images/login-background.jpg");
|
background-image: url("../assets/images/login-background.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 30px auto;
|
margin: 0px auto 30px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -173,32 +144,39 @@ getCode();
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-icon {
|
.input-icon {
|
||||||
height: 39px;
|
height: 39px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-tip {
|
.register-tip {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-code {
|
.register-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-register-footer {
|
.el-register-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
@ -211,6 +189,7 @@ getCode();
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-code-img {
|
.register-code-img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user