fix: modify

develop
时启龙 2024-08-27 17:53:57 +08:00
parent 4ab7fa1c21
commit 4e04b2d068
3 changed files with 40 additions and 83 deletions

View File

@ -7,11 +7,6 @@
<el-container class="main-container"> <el-container class="main-container">
<ThirdMenu :menuData="thirdMenuData" v-if="thirdMenuData.children"></ThirdMenu> <ThirdMenu :menuData="thirdMenuData" v-if="thirdMenuData.children"></ThirdMenu>
<el-main class="main-body"> <el-main class="main-body">
<div style="background-color: red">
<el-select v-model="selectPostion" @change="SET_SELECTED_POSITION">
<el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<el-scrollbar class="custom-scrollbar" style="flex: 1"> <el-scrollbar class="custom-scrollbar" style="flex: 1">
<transition enter-active-class="fadeInUp" mode="out-in"> <transition enter-active-class="fadeInUp" mode="out-in">
<!-- <router-view v-if="$route.path === '/404'"></router-view> --> <!-- <router-view v-if="$route.path === '/404'"></router-view> -->
@ -136,10 +131,6 @@ export default {
function setTime() { function setTime() {
store.commit('SET_OPERATETIME') store.commit('SET_OPERATETIME')
} }
const selectPostion = ref('')
const SET_SELECTED_POSITION = () => {
store.commit('SET_SELECTED_POSITION', selectPostion.value)
}
return { return {
isCollapsed: computed(() => store.state.app.isCollapsed), isCollapsed: computed(() => store.state.app.isCollapsed),
basePath: computed(() => store.state.app.basePath), basePath: computed(() => store.state.app.basePath),
@ -151,9 +142,7 @@ export default {
showSidebar, showSidebar,
thirdMenuData, thirdMenuData,
toggleCollapsed, toggleCollapsed,
setTime, setTime
selectPostion,
SET_SELECTED_POSITION
} }
}, },
methods: { methods: {

View File

@ -1,36 +0,0 @@
import { getSystemConfigs } from 'services'
const state = {
// 是否主阵地
isMainPosition: true,
// 阵地列表
positionList: [
{ name: '主阵地', id: 1 },
{ name: '子阵地 1', id: 2 }
],
selectedPostion: ''
}
const mutations = {
SET_SELECTED_POSITION(state, value) {
state.selectedPostion = value
},
SET_IS_MAIN_POSITION(state, value) {
state.isMainPosition = value
},
SET_POSITION_LIST(state, value) {
state.positionList = value
}
}
const actions = {
async GetPostionList({ commit }) {
const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' })
if (data.success) {
commit('SET_POSITION_LIST', data.data)
}
}
}
export default {
state,
mutations,
actions
}

View File

@ -16,47 +16,51 @@
<el-form :model="loginForm" ref="loginFormRef" label-position="left" label-width="0px" class="card-box login-form" @keyup.enter="activeName === 'normal' ? handleLogin : handleUkeyLogin"> <el-form :model="loginForm" ref="loginFormRef" label-position="left" label-width="0px" class="card-box login-form" @keyup.enter="activeName === 'normal' ? handleLogin : handleUkeyLogin">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="云管登录" name="normal"> <el-tab-pane label="云管登录" name="normal">
<div class="login-title">账号登录</div> <div v-if="activeName === 'normal'">
<el-form-item class="login-form-item" prop="account" :rules="[{ ...required, message: '请输入用户名' }]"> <div class="login-title">账号登录</div>
<el-input v-model="loginForm.account" autocomplete="off" placeholder="登录账户"> <el-form-item class="login-form-item" prop="account" :rules="[{ ...required, message: '请输入用户名' }]">
<template #prefix> <el-input v-model="loginForm.account" autocomplete="off" placeholder="登录账户">
<el-icon>
<icon-ep-user />
</el-icon>
</template>
</el-input>
</el-form-item>
<el-tooltip :visible="capsTooltip" content="大写锁定已打开" placement="right" :manual="true">
<el-form-item class="login-form-item" prop="password" :rules="[{ ...required, message: '请输入密码' }]">
<el-input show-password v-model="loginForm.password" placeholder="密码" @blur="capsTooltip = false" @keyup="checkCapslock">
<template #prefix> <template #prefix>
<el-icon><icon-ep-lock /></el-icon> <el-icon>
<icon-ep-user />
</el-icon>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-tooltip> <el-tooltip :visible="capsTooltip" content="大写锁定已打开" placement="right" :manual="true">
<el-form-item class="login-form-item"> <el-form-item class="login-form-item" prop="password" :rules="[{ ...required, message: '请输入密码' }]">
<div class="operate-region"> <el-input show-password v-model="loginForm.password" placeholder="密码" @blur="capsTooltip = false" @keyup="checkCapslock">
<span class="remember"> <template #prefix>
<el-switch v-model="remember"></el-switch> <el-icon><icon-ep-lock /></el-icon>
<span class="m-l-xs">记住密码</span> </template>
</span> </el-input>
<a :href="`mailto:${configs.helpInformationLink}`" type="text" class="text-info help-info" :title="configs.helpInformationContent">{{ configs.helpInformationContent }}</a> </el-form-item>
</div> </el-tooltip>
</el-form-item> <el-form-item class="login-form-item">
<el-button class="login-btn" type="primary" :loading="loading" @click="handleLogin"></el-button> <div class="operate-region">
<span class="remember">
<el-switch v-model="remember"></el-switch>
<span class="m-l-xs">记住密码</span>
</span>
<a :href="`mailto:${configs.helpInformationLink}`" type="text" class="text-info help-info" :title="configs.helpInformationContent">{{ configs.helpInformationContent }}</a>
</div>
</el-form-item>
<el-button class="login-btn" type="primary" :loading="loading" @click="handleLogin"></el-button>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="UKEY登录待联调" name="UKEY"> <el-tab-pane label="UKEY登录待联调" name="UKEY">
<el-tooltip :visible="capsTooltip" content="大写锁定已打开" placement="right" :manual="true"> <div v-if="activeName === 'UKEY'">
<el-form-item class="login-form-item" prop="ukeyPassword" :rules="[{ ...required, message: '请输入UKEY密码' }]"> <el-tooltip :visible="capsTooltip" content="大写锁定已打开" placement="right" :manual="true">
<el-input show-password v-model="loginForm.ukeyPassword" placeholder="UKEY密码" @blur="capsTooltip = false" @keyup="checkCapslock"> <el-form-item class="login-form-item" prop="ukeyPassword" :rules="[{ ...required, message: '请输入UKEY密码' }]">
<template #prefix> <el-input show-password v-model="loginForm.ukeyPassword" placeholder="UKEY密码" @blur="capsTooltip = false" @keyup="checkCapslock">
<el-icon><icon-ep-lock /></el-icon> <template #prefix>
</template> <el-icon><icon-ep-lock /></el-icon>
</el-input> </template>
</el-form-item> </el-input>
</el-tooltip> </el-form-item>
<el-button class="login-btn" type="primary" :loading="loading" @click="handleUkeyLogin"></el-button> </el-tooltip>
<el-button class="login-btn" type="primary" :loading="loading" @click="handleUkeyLogin"></el-button>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>