修改浙江无线测试用例bug

This commit is contained in:
GGJ
2024-12-17 20:57:07 +08:00
parent e10ca83ec5
commit 21831dda90
32 changed files with 873 additions and 254 deletions

View File

@@ -7,29 +7,47 @@
<div class="login-container-form">
<div class="title-container">
<div class="title">
<span style="font-size: 28px">电能质量数据监测云平台</span>
<span style="font-size: 28px">{{ getThemeList.name || '电能质量监测系统' }}</span>
</div>
</div>
<el-form :rules="rules" ref="formRef" size="large" class="login-form" :model="form">
<el-form-item prop="username">
<el-input ref="usernameRef" v-model="form.username" type="text"
clearable style="width: 368px" placeholder="用户名" autocomplete="off">
<el-input
ref="usernameRef"
v-model="form.username"
type="text"
clearable
placeholder="用户名"
autocomplete="off"
>
<template #prefix>
<span class="iconfont icon-yonghu" style="color: #003078"></span>
<!-- <span class="iconfont icon-yonghu" style="color: var(--el-color-primary)"></span> -->
<Icon name="fa fa-user" style="color: var(--el-color-primary); font-size: 16px" />
</template>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input ref="passwordRef" v-model="form.password" type="password"
placeholder="密码" show-password style="width: 368px" autocomplete="off">
<el-input
ref="passwordRef"
v-model="form.password"
type="password"
placeholder="密码"
autocomplete="off"
>
<template #prefix>
<span class="iconfont icon-mima" style="color: #003078"></span>
<Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" />
<!-- <span class="iconfont icon-mima" style="color: var(--el-color-primary)"></span> -->
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-button :loading="state.submitLoading" class="submit-btn" round style="width: 368px" type="info"
@click="onSubmit(formRef)">
<el-button
:loading="state.submitLoading"
class="submit-btn"
round
type="info"
@click="onSubmit(formRef)"
>
登录
</el-button>
</el-form-item>
@@ -50,18 +68,19 @@
import { onMounted, onBeforeUnmount, reactive, ref, nextTick } from 'vue'
import * as pageBubble from '@/utils/pageBubble'
import { ElMessage } from 'element-plus'
import { gongkey, login } from '@/api/user-boot/user'
import { gongkey, login,getSysConfig } from '@/api/user-boot/user'
import { useAdminInfo } from '@/stores/adminInfo'
import type { FormInstance, InputInstance, FormRules } from 'element-plus'
import { useRouter } from 'vue-router'
import { ADMIN_INFO } from '@/stores/constant/cacheKey'
import { Local } from '@/utils/storage'
import { getTheme } from '@/api/systerm'
import { useConfig } from '@/stores/config'
import PopupUpdatePwd from './popupUpdatePwd.vue'
import { encrypt } from '@/assets/commjs/sm2.js';
const router = useRouter()
let timer: number
const configStore = useConfig()
const popupUpdatePwdRef = ref()
const formRef = ref<FormInstance>()
const usernameRef = ref<InputInstance>()
@@ -69,7 +88,7 @@ const passwordRef = ref<InputInstance>()
const userInfo = useAdminInfo()
Local.remove(ADMIN_INFO)
userInfo.removeToken()
const getThemeList: any = ref([])
interface RuleForm {
username: string
password: string
@@ -107,7 +126,29 @@ onBeforeUnmount(() => {
clearTimeout(timer)
pageBubble.removeListeners()
})
getTheme().then(res => {
document.title = res.data.name || '电能质量在线监测系统'
let list: any = [
'elementUiPrimary',
'tableHeaderBackground',
'tableHeaderColor',
'tableCurrent',
'menuBackground',
'menuColor',
'menuTopBarBackground',
'menuActiveBackground',
'menuActiveColor',
'headerBarTabColor',
'headerBarBackground'
]
getThemeList.value = res.data
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
for (let i = 0; i < list.length; i++) {
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
}
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
})
const onSubmit = async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
@@ -123,6 +164,9 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
.then(res => {
userInfo.dataFill(res.data)
state.submitLoading = false
getSysConfig().then(res => {
window.localStorage.setItem('sysdata', JSON.stringify(res.data))
})
router.push({
path: '/'
})
@@ -146,7 +190,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
width: 100%;
min-height: 100%;
overflow: hidden;
background-color: #003078 !important;
background-color: var(--el-color-primary) !important;
background-position: center 110px;
background-repeat: repeat;
background-size: 100%;
@@ -264,8 +308,13 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
width: 100%;
margin-top: 0px;
margin-bottom: 20px;
background: #4d6ea1;
background: var(--el-color-primary-light-3);
// background: #009688;
//background: #4d6ea1;
border-radius: 0;
&:hover {
background: var(--el-color-primary-light-5);
}
}
@media screen and (max-width: 720px) {