主题颜色以及登录页面样式调整
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 智汇管理系统11
|
VITE_APP_TITLE = 智汇管理系统
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.9.1",
|
"version": "3.9.1",
|
||||||
"description": "智汇管理系统",
|
"description": "智汇管理系统",
|
||||||
"author": "若依",
|
"author": "智汇管理系统",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 21 KiB |
BIN
src/assets/images/loginBg.jpg
Normal file
BIN
src/assets/images/loginBg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 680 KiB |
BIN
src/assets/logo/logo.jpg
Normal file
BIN
src/assets/logo/logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -174,7 +174,7 @@ onMounted(() => {
|
|||||||
float: left;
|
float: left;
|
||||||
height: 50px !important;
|
height: 50px !important;
|
||||||
line-height: 50px !important;
|
line-height: 50px !important;
|
||||||
color: #999093 !important;
|
color: #999093 ;
|
||||||
padding: 0 5px !important;
|
padding: 0 5px !important;
|
||||||
margin: 0 10px !important;
|
margin: 0 10px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import logo from '@/assets/logo/logo.png'
|
import logo from '@/assets/logo/logo.jpg'
|
||||||
import useSettingsStore from '@/store/modules/settings'
|
import useSettingsStore from '@/store/modules/settings'
|
||||||
import variables from '@/assets/styles/variables.module.scss'
|
import variables from '@/assets/styles/variables.module.scss'
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,6 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 底部版权文本内容
|
* 底部版权文本内容
|
||||||
*/
|
*/
|
||||||
footerContent: 'Copyright © 2018-2026 RuoYi. All Rights Reserved.'
|
footerContent: 'Copyright © All Rights Reserved.'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const useSettingsStore = defineStore(
|
|||||||
state: () => ({
|
state: () => ({
|
||||||
title: '',
|
title: '',
|
||||||
topNav: storageSetting.topNav ===undefined ? topNav:storageSetting.topNav,
|
topNav: storageSetting.topNav ===undefined ? topNav:storageSetting.topNav,
|
||||||
theme: storageSetting.theme || '#409EFF',
|
theme: storageSetting.theme || 'RGB(0, 145, 145)',
|
||||||
sideTheme: storageSetting.sideTheme || sideTheme,
|
sideTheme: storageSetting.sideTheme || sideTheme,
|
||||||
showSettings: showSettings,
|
showSettings: showSettings,
|
||||||
navType: storageSetting.navType === undefined ? navType : storageSetting.navType,
|
navType: storageSetting.navType === undefined ? navType : storageSetting.navType,
|
||||||
|
|||||||
1168
src/views/index copy.vue
Normal file
1168
src/views/index copy.vue
Normal file
File diff suppressed because it is too large
Load Diff
1158
src/views/index.vue
1158
src/views/index.vue
File diff suppressed because it is too large
Load Diff
@@ -171,21 +171,27 @@ getCookie()
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: url("../assets/images/login-background.jpg");
|
background-image: url("../assets/images/loginBg.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;
|
||||||
color: #707070;
|
color: #1b222f;
|
||||||
|
font-weight:500;
|
||||||
|
font-size:18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
|
padding: 24px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
.el-button:hover{
|
||||||
|
background-color: RGB(0, 145, 145);
|
||||||
|
}
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
input {
|
input {
|
||||||
@@ -223,6 +229,8 @@ getCookie()
|
|||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
268
src/views/login_bf.vue
Normal file
268
src/views/login_bf.vue
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login">
|
||||||
|
<div class="login-box">
|
||||||
|
<div class="login-left">
|
||||||
|
<h1>登录</h1>
|
||||||
|
<h1> {{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
<div class="login-right">
|
||||||
|
<h1 class="title">账号登录</h1>
|
||||||
|
<el-form class="login-form" ref="loginRef" :model="loginForm" :rules="loginRules">
|
||||||
|
|
||||||
|
<el-form-item prop="username">
|
||||||
|
<el-input v-model="loginForm.username" type="text" size="large" auto-complete="off" placeholder="账号">
|
||||||
|
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input v-model="loginForm.password" type="password" size="large" auto-complete="off" placeholder="密码"
|
||||||
|
@keyup.enter="handleLogin">
|
||||||
|
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
|
<el-input v-model="loginForm.code" size="large" auto-complete="off" placeholder="验证码" style="width: 63%"
|
||||||
|
@keyup.enter="handleLogin">
|
||||||
|
<template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
|
||||||
|
</el-input>
|
||||||
|
<div class="login-code">
|
||||||
|
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
|
||||||
|
<el-form-item style="width:100%;">
|
||||||
|
<el-button :loading="loading" size="large" type="primary" style="width:100%;" @click.prevent="handleLogin">
|
||||||
|
<span v-if="!loading">登 录</span>
|
||||||
|
<span v-else>登 录 中...</span>
|
||||||
|
</el-button>
|
||||||
|
<div style="float: right;" v-if="register">
|
||||||
|
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 底部 -->
|
||||||
|
<div class="el-login-footer">
|
||||||
|
<span>{{ footerContent }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getCodeImg } from "@/api/login"
|
||||||
|
import Cookies from "js-cookie"
|
||||||
|
import { encrypt, decrypt } from "@/utils/jsencrypt"
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import defaultSettings from '@/settings'
|
||||||
|
|
||||||
|
const title = import.meta.env.VITE_APP_TITLE
|
||||||
|
const footerContent = defaultSettings.footerContent
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
|
const loginForm = ref({
|
||||||
|
username: "admin",
|
||||||
|
password: "admin123",
|
||||||
|
rememberMe: false,
|
||||||
|
code: "",
|
||||||
|
uuid: ""
|
||||||
|
})
|
||||||
|
|
||||||
|
const loginRules = {
|
||||||
|
username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
|
||||||
|
password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
|
||||||
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||||
|
}
|
||||||
|
|
||||||
|
const codeUrl = ref("")
|
||||||
|
const loading = ref(false)
|
||||||
|
// 验证码开关
|
||||||
|
const captchaEnabled = ref(true)
|
||||||
|
// 注册开关
|
||||||
|
const register = ref(false)
|
||||||
|
const redirect = ref(undefined)
|
||||||
|
|
||||||
|
watch(route, (newRoute) => {
|
||||||
|
redirect.value = newRoute.query && newRoute.query.redirect
|
||||||
|
}, { immediate: true })
|
||||||
|
|
||||||
|
function handleLogin() {
|
||||||
|
proxy.$refs.loginRef.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
loading.value = true
|
||||||
|
// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
|
||||||
|
if (loginForm.value.rememberMe) {
|
||||||
|
Cookies.set("username", loginForm.value.username, { expires: 30 })
|
||||||
|
Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 })
|
||||||
|
Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 })
|
||||||
|
} else {
|
||||||
|
// 否则移除
|
||||||
|
Cookies.remove("username")
|
||||||
|
Cookies.remove("password")
|
||||||
|
Cookies.remove("rememberMe")
|
||||||
|
}
|
||||||
|
// 调用action的登录方法
|
||||||
|
userStore.login(loginForm.value).then(() => {
|
||||||
|
const query = route.query
|
||||||
|
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
|
||||||
|
if (cur !== "redirect") {
|
||||||
|
acc[cur] = query[cur]
|
||||||
|
}
|
||||||
|
return acc
|
||||||
|
}, {})
|
||||||
|
router.push({ path: redirect.value || "/", query: otherQueryParams })
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
// 重新获取验证码
|
||||||
|
if (captchaEnabled.value) {
|
||||||
|
getCode()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCode() {
|
||||||
|
getCodeImg().then(res => {
|
||||||
|
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
||||||
|
if (captchaEnabled.value) {
|
||||||
|
codeUrl.value = "data:image/gif;base64," + res.img
|
||||||
|
loginForm.value.uuid = res.uuid
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCookie() {
|
||||||
|
const username = Cookies.get("username")
|
||||||
|
const password = Cookies.get("password")
|
||||||
|
const rememberMe = Cookies.get("rememberMe")
|
||||||
|
loginForm.value = {
|
||||||
|
username: username === undefined ? loginForm.value.username : username,
|
||||||
|
password: password === undefined ? loginForm.value.password : decrypt(password),
|
||||||
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getCode()
|
||||||
|
getCookie()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.login {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f1f7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.login-box {
|
||||||
|
width: 1200px;
|
||||||
|
margin: 4% auto 40px;
|
||||||
|
display: flex;
|
||||||
|
height: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-left {
|
||||||
|
width: 50%;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 3%;
|
||||||
|
border-radius: 16px 0 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-right {
|
||||||
|
width: 50%;
|
||||||
|
padding: 3%;
|
||||||
|
border-radius: 0 16px 16px 0;
|
||||||
|
background: RGB(0, 145, 145);
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 80px;
|
||||||
|
margin-top: 21px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
width: 300px;
|
||||||
|
z-index: 1;
|
||||||
|
margin: 0 auto;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
.el-form-item--default {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
background-color: #fff;
|
||||||
|
color: RGB(0, 145, 145);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.el-input {
|
||||||
|
height: 40px;
|
||||||
|
|
||||||
|
input {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-icon {
|
||||||
|
height: 39px;
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-tip {
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-code {
|
||||||
|
width: 33%;
|
||||||
|
height: 40px;
|
||||||
|
float: right;
|
||||||
|
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-login-footer {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-code-img {
|
||||||
|
height: 40px;
|
||||||
|
padding-left: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
import draggable from "vuedraggable/dist/vuedraggable.common"
|
import draggable from "vuedraggable/dist/vuedraggable.common"
|
||||||
import ClipboardJS from 'clipboard'
|
import ClipboardJS from 'clipboard'
|
||||||
import beautifier from 'js-beautify'
|
import beautifier from 'js-beautify'
|
||||||
import logo from '@/assets/logo/logo.png'
|
import logo from '@/assets/logo/logo.jpg'
|
||||||
import { inputComponents, selectComponents, layoutComponents, formConf as formConfData } from '@/utils/generator/config'
|
import { inputComponents, selectComponents, layoutComponents, formConf as formConfData } from '@/utils/generator/config'
|
||||||
import { beautifierConf } from '@/utils/index'
|
import { beautifierConf } from '@/utils/index'
|
||||||
import drawingDefalut from '@/utils/generator/drawingDefalut'
|
import drawingDefalut from '@/utils/generator/drawingDefalut'
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
import { listType, getType, delType, addType, updateType } from "@/api/worn/type"
|
import { listType, getType, delType, addType, updateType } from "@/api/worn/type"
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { queryParams, form, rules } = toRefs(data)
|
|
||||||
|
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
@@ -141,7 +141,7 @@ const data = reactive({
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const { queryParams, form, rules } = toRefs(data)
|
||||||
/** 查询废旧系统物料类型(支持父子级树结构)列表 */
|
/** 查询废旧系统物料类型(支持父子级树结构)列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
import { listUnit, getUnit, delUnit, addUnit, updateUnit } from "@/api/worn/unit"
|
import { listUnit, getUnit, delUnit, addUnit, updateUnit } from "@/api/worn/unit"
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { queryParams, form, rules } = toRefs(data)
|
|
||||||
|
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
@@ -112,7 +112,7 @@ const data = reactive({
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const { queryParams, form, rules } = toRefs(data)
|
||||||
/** 查询物料单位列表 */
|
/** 查询物料单位列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user