feat: 系统配置功能新增

This commit is contained in:
kun 2023-07-31 18:55:57 +08:00
parent 3a204335e1
commit c060be6fd6
13 changed files with 343 additions and 158 deletions

View File

@ -186,3 +186,8 @@ export const addProject = (params: FormData) => {
export const addCompany = (params: FormData) => { export const addCompany = (params: FormData) => {
return http.post(BASEURL + `/ent/enterprise/add`, params); return http.post(BASEURL + `/ent/enterprise/add`, params);
}; };
// 获取系统名称配置
export const systemNameConfig = (params: FormData) => {
return http.post(BASEURL + `/xmgl/systemConfig/queryByKey`, params);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -5,7 +5,7 @@
<div @click="goHome" class="logo flx-center"> <div @click="goHome" class="logo flx-center">
<!-- <img src="@/assets/images/logo.svg" alt="logo" /> --> <!-- <img src="@/assets/images/logo.svg" alt="logo" /> -->
<!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> --> <!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> -->
<span>乳山工程建筑管理服务平台</span> <span>{{ globalStore.systemNameConfig }}</span>
<span style="margin: 0 20px">|</span> <span style="margin: 0 20px">|</span>
<span>{{ moduleTitle }}</span> <span>{{ moduleTitle }}</span>
</div> </div>

View File

@ -6,7 +6,7 @@
<div @click="goHome" class="logo flx-center"> <div @click="goHome" class="logo flx-center">
<!-- <img src="@/assets/images/logo.svg" alt="logo" /> --> <!-- <img src="@/assets/images/logo.svg" alt="logo" /> -->
<!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> --> <!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> -->
<span>乳山工程建筑管理服务平台</span> <span>{{ globalStore.systemNameConfig }}</span>
<span v-if="moduleTitle" style="margin: 0 20px">|</span> <span v-if="moduleTitle" style="margin: 0 20px">|</span>
<span class="title">{{ moduleTitle }}</span> <span class="title">{{ moduleTitle }}</span>
</div> </div>

View File

@ -29,6 +29,7 @@ export const GlobalStore = defineStore({
// language // language
language: "", language: "",
path: null, path: null,
systemNameConfig: "", // 系统名称配置
// themeConfig // themeConfig
themeConfig: { themeConfig: {
// 当前页面是否全屏 // 当前页面是否全屏

View File

@ -15,6 +15,7 @@ export interface GlobalState {
openDropdown: boolean | null; openDropdown: boolean | null;
path: string | null; path: string | null;
isManager: string | null; isManager: string | null;
systemNameConfig: string | null; // 系统名称配置
} }
/* themeConfigProp */ /* themeConfigProp */

View File

@ -6,7 +6,7 @@
<div class="logo flx-center"> <div class="logo flx-center">
<!-- <img src="@/assets/images/logo.svg" alt="logo" /> --> <!-- <img src="@/assets/images/logo.svg" alt="logo" /> -->
<!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> --> <!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> -->
<span>乳山工程建筑管理服务平台</span> <span>{{ globalStore.systemNameConfig }}</span>
</div> </div>
<ToolBarLeft /> <ToolBarLeft />
</div> </div>

View File

@ -4,7 +4,7 @@
<div class="logo"> <div class="logo">
<!-- <img src="@/assets/images/logo.svg" alt="logo" /> --> <!-- <img src="@/assets/images/logo.svg" alt="logo" /> -->
<!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> --> <!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> -->
<span>乳山工程建筑管理服务平台</span> <span>{{ globalStore.systemNameConfig }}</span>
<span class="middle">|</span> <span class="middle">|</span>
<span>企业注册</span> <span>企业注册</span>
</div> </div>
@ -36,6 +36,8 @@ import { addCompany } from "@/api/modules/jxjview";
import type { RuleFormData } from "./basic-form.vue"; import type { RuleFormData } from "./basic-form.vue";
import type { EnterpriseMains } from "./entrepreneur.vue"; import type { EnterpriseMains } from "./entrepreneur.vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { GlobalStore } from "@/stores";
const globalStore = GlobalStore();
const router = useRouter(); const router = useRouter();
const datas = reactive(values); const datas = reactive(values);

View File

@ -5,7 +5,7 @@
<!-- <img src="@/assets/images/logo.svg" alt="logo" /> --> <!-- <img src="@/assets/images/logo.svg" alt="logo" /> -->
<div> <div>
<!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> --> <!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> -->
<span>乳山工程建筑管理服务平台</span> <span>{{ globalStore.systemNameConfig }}</span>
</div> </div>
<span class="middle">|</span> <span class="middle">|</span>
@ -77,6 +77,8 @@ import AMap from "@/components/AMap/AMap.vue";
import { ElMessage, FormInstance, ElForm, FormRules } from "element-plus"; import { ElMessage, FormInstance, ElForm, FormRules } from "element-plus";
// import router from "@/routers"; // import router from "@/routers";
import { LOGIN_URL } from "@/config/config"; import { LOGIN_URL } from "@/config/config";
import { GlobalStore } from "@/stores";
const globalStore = GlobalStore();
const router = useRouter(); const router = useRouter();

View File

@ -1,122 +1,112 @@
.flx-center { .login-container {
display: flex; height: 100%;
flex-direction: column; min-height: 550px;
align-items: flex-start; background: url("@/assets/images/login/loginBackground.jpg") center center no-repeat;
} background-color: #eeeeee;
.login-container { background-size: 100% 100%;
height: 100%; background-size: cover;
min-height: 550px; .login-box {
background: url("@/assets/images/login/bglogin_rushan.png") center center no-repeat; position: relative;
background-size: 100% 65%; box-sizing: border-box;
.login-title { display: flex;
color: #2a314b; align-items: center;
font-weight: 600; justify-content: center;
font-size: 22px; width: 96%;
> span { height: 94%;
margin-left: 30px; padding: 0 50px;
}
} // background-color: hsl(0deg 0% 100% / 80%);
.login-box { border-radius: 10px;
position: relative; .dark {
box-sizing: border-box; position: absolute;
display: flex; top: 13px;
align-items: center; right: 18px;
justify-content: flex-end; }
width: 96%; .login-left {
height: 75%; width: 515px;
height: 473px;
// background-color: hsl(0deg 0% 100% / 80%);
border-radius: 10px; // margin: 0 10px 0 0;
.dark { background: url("@/assets/images/login/Group 2585.jpg") repeat-x 0 0;
position: absolute; background-size: 100%;
top: 13px; img {
right: 18px; // width: 100%;
} // height: 100%;
.login-left { margin: 126px 0 65px 190px;
width: 515px; }
height: 473px; div {
text-align: center;
// margin: 0 10px 0 0; font-size: 40px;
background: url("@/assets/images/login/Group 2585.jpg") repeat-x 0 0; font-weight: 600;
background-size: 100%; color: white;
img { }
// width: 100%; }
// height: 100%; .login-form {
margin: 126px 0 65px 190px; width: 420px;
} height: 377px;
span { padding: 50px 40px 45px;
margin: 0 0 65px 88px; background-color: #ffffff;
font-size: 40px;
font-weight: 600; // border-radius: 10px;
color: white; box-shadow: 2px 3px 7px rgb(0 0 0 / 20%);
} .login-logo {
} display: flex;
.login-form { align-items: center;
width: 420px; justify-content: center;
height: 377px; margin-bottom: 45px;
padding: 50px 40px 45px; .login-icon {
background-color: #ffffff; width: 60px;
margin-right: 120px; height: 52px;
// border-radius: 10px; }
box-shadow: 2px 3px 7px rgb(0 0 0 / 20%); .logo-text {
.login-logo { padding: 0 0 0 25px;
display: flex; margin: 0;
align-items: center; font-size: 32px;
justify-content: center; font-weight: 500;
margin-bottom: 45px; color: #333333;
.login-icon { white-space: nowrap;
width: 60px; }
height: 52px; }
} .el-form-item {
.logo-text { margin-bottom: 40px;
padding: 0 0 0 25px; }
margin: 0; .login-btn {
font-size: 32px; display: flex;
font-weight: 500;
color: #333333; // justify-content: space-between;
white-space: nowrap; justify-content: center;
} width: 100%;
} margin-top: 40px;
.el-form-item { white-space: nowrap;
margin-bottom: 40px; .el-button {
} width: 280px;
.login-btn { height: 42px;
display: flex; color: #ffffff;
background-color: #2246b4;
// justify-content: space-between; }
justify-content: center; }
width: 100%; .logon {
margin-top: 40px; display: flex;
white-space: nowrap;
.el-button { // text-align: center;
width: 280px; margin-top: 48px;
height: 42px; margin-left: 29%;
color: #ffffff; }
background-color: #2246b4; }
} }
} }
.logon { .form {
display: flex; padding: 0 17%;
}
// text-align: center;
margin-top: 48px; @media screen and (max-width: 1250px) {
margin-left: 29%; .login-left {
} display: none;
} }
} }
}
.form { @media screen and (max-width: 600px) {
padding: 0 17%; .login-form {
} width: 97% !important;
}
@media screen and (max-width: 1250px) { }
.login-left {
display: none;
}
}
@media screen and (max-width: 600px) {
.login-form {
width: 97% !important;
}
}

View File

@ -1,31 +1,38 @@
<template> <template>
<div class="login-container flx-center"> <div class="login-container flx-center">
<div class="login-title"> <div class="login-box">
<span>乳山工程建筑管理服务平台</span> <div class="login-left">
</div> <!-- <img src="@/assets/images/login_left.png" alt="login" /> -->
<div class="login-box"> <img src="@/assets/images/login/computerIcon.png" alt="" /><br />
<!-- <SwitchDark class="dark" /> --> <!-- 数字化政务监管平台 -->
<!-- <div class="login-left"> <div>{{ globalStore.systemNameConfig }}</div>
<img src="@/assets/images/login_left.png" alt="login" /> </div>
<img src="@/assets/images/login/computerIcon.png" alt="" /><br /> <div class="login-form">
<span>数字化政务监管平台</span> <div class="login-logo">
</div> --> <!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> -->
<div class="login-form"> <h2 class="logo-text">账户登录</h2>
<div class="login-logo"> </div>
<!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> --> <LoginForm />
<h2 class="logo-text">账户登录</h2> </div>
</div> </div>
<LoginForm /> </div>
</div> </template>
</div>
</div> <script setup lang="ts" name="login">
</template> import LoginForm from "./components/LoginForm.vue";
import { onMounted } from "vue";
<script setup lang="ts" name="login"> import { systemNameConfig } from "@/api/modules/jxjview";
import SwitchDark from "@/components/SwitchDark/index.vue"; import { GlobalStore } from "@/stores";
import LoginForm from "./components/LoginForm.vue"; const globalStore = GlobalStore();
</script> onMounted(async () => {
const res = await systemNameConfig({ configKey: "system_name" });
<style scoped lang="scss"> console.log(res);
@import "./index.scss"; if (res && res.result) {
</style> globalStore.systemNameConfig = res.result.configValue;
}
});
</script>
<style scoped lang="scss">
@import "./index.scss";
</style>

144
src/views/login/index1.scss Normal file
View File

@ -0,0 +1,144 @@
.flx-center {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.login-container {
height: 100%;
min-height: 550px;
position: relative;
&::before {
content: "";
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
height: 100%;
background: url("@/assets/images/login/bg.png") center center no-repeat;
background-size: 100% 100%;
z-index: 1;
}
&::after {
content: "";
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
height: 100%;
background-image: linear-gradient(152deg, #2c90ff, #3f2da3);
background-color: rgba(255, 255, 255, 0.54);
}
.login-title {
color: #2a314b;
font-weight: 600;
font-size: 22px;
position: relative;
z-index: 1;
> span {
margin-left: 30px;
}
}
.login-box {
position: relative;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-end;
width: 96%;
height: 75%;
z-index: 1;
// background-color: hsl(0deg 0% 100% / 80%);
border-radius: 10px;
.dark {
position: absolute;
top: 13px;
right: 18px;
}
.login-left {
width: 515px;
height: 473px;
// margin: 0 10px 0 0;
background: url("@/assets/images/login/Group 2585.jpg") repeat-x 0 0;
background-size: 100%;
img {
// width: 100%;
// height: 100%;
margin: 126px 0 65px 190px;
}
span {
margin: 0 0 65px 88px;
font-size: 40px;
font-weight: 600;
color: white;
}
}
.login-form {
width: 420px;
height: 377px;
padding: 50px 40px 45px;
background-color: #ffffff;
margin-right: 120px;
// border-radius: 10px;
box-shadow: 2px 3px 7px rgb(0 0 0 / 20%);
.login-logo {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 45px;
.login-icon {
width: 60px;
height: 52px;
}
.logo-text {
padding: 0 0 0 25px;
margin: 0;
font-size: 32px;
font-weight: 500;
color: #333333;
white-space: nowrap;
}
}
.el-form-item {
margin-bottom: 40px;
}
.login-btn {
display: flex;
// justify-content: space-between;
justify-content: center;
width: 100%;
margin-top: 40px;
white-space: nowrap;
.el-button {
width: 280px;
height: 42px;
color: #ffffff;
background-color: #2246b4;
}
}
.logon {
display: flex;
// text-align: center;
margin-top: 48px;
margin-left: 29%;
}
}
}
}
.form {
padding: 0 17%;
}
@media screen and (max-width: 1250px) {
.login-left {
display: none;
}
}
@media screen and (max-width: 600px) {
.login-form {
width: 97% !important;
}
}

View File

@ -0,0 +1,33 @@
<template>
<div class="login-container flx-center">
<div class="login-title">
<span>{{ globalStore.systemNameConfig }}</span>
</div>
<div class="login-box">
<!-- <SwitchDark class="dark" /> -->
<!-- <div class="login-left">
<img src="@/assets/images/login_left.png" alt="login" />
<img src="@/assets/images/login/computerIcon.png" alt="" /><br />
<span>数字化政务监管平台</span>
</div> -->
<div class="login-form">
<div class="login-logo">
<!-- <img class="login-icon" src="@/assets/images/logo.svg" alt="" /> -->
<h2 class="logo-text">账户登录</h2>
</div>
<LoginForm />
</div>
</div>
</div>
</template>
<script setup lang="ts" name="login">
import SwitchDark from "@/components/SwitchDark/index.vue";
import LoginForm from "./components/LoginForm.vue";
import { GlobalStore } from "@/stores";
const globalStore = GlobalStore();
</script>
<style scoped lang="scss">
@import "./index.scss";
</style>