Commit e8efb59a by 冒粤蓉

fix

1 parent 68bd6679
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body style="margin: 0;">
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> </noscript>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
class="section" class="section"
v-for="(item, index) in menuList" v-for="(item, index) in menuList"
:key="item.origin.menuNo"> :key="item.origin.menuNo">
<input type="radio" name="accordion-radio" :id="'section-'+index" :checked="item.showSubList" @click="titleClick(item)"/> <input type="radio" name="accordion-radio" :id="'section-'+index" :checked="item.showSubList" @click="titleClick(item, index)"/>
<label :for="'section-'+index"> <label :for="'section-'+index">
<span>{{item.origin.menuName}}</span> <span>{{item.origin.menuName}}</span>
<!-- :class="{'rotate-deg': item.showSubList}" --> <!-- :class="{'rotate-deg': item.showSubList}" -->
...@@ -97,11 +97,13 @@ export default { ...@@ -97,11 +97,13 @@ export default {
}); });
// 点击主菜单标题 // 点击主菜单标题
const titleClick = (item) => { const titleClick = (item, idx) => {
state.menuList.forEach(i => { state.menuList.forEach((i, index) => {
i.showSubList = false; if(idx !== index) {
i.showSubList = false;
}
}) })
item.showSubList = true; item.showSubList = !item.showSubList;
}; };
// 高亮被选中的子集标题 // 高亮被选中的子集标题
......
...@@ -142,6 +142,7 @@ export default { ...@@ -142,6 +142,7 @@ export default {
visibility: hidden; visibility: hidden;
-webkit-transition: all 400ms cubic-bezier(0.34, 1.25, 0.3, 1); -webkit-transition: all 400ms cubic-bezier(0.34, 1.25, 0.3, 1);
transition: all 400ms cubic-bezier(0.34, 1.25, 0.3, 1); transition: all 400ms cubic-bezier(0.34, 1.25, 0.3, 1);
font-size: 16px !important;
.arrow-icon { .arrow-icon {
height: 21px; height: 21px;
......
...@@ -22,12 +22,16 @@ export default { ...@@ -22,12 +22,16 @@ export default {
.home-content-wrapper { .home-content-wrapper {
position: absolute; position: absolute;
z-index: 1;
top: 139px;
left: 0;
background-image: url(../../assets/images/car-bg.png);
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
width: 100%; width: 100%;
height: calc(100% - 278px); height: calc(100% - 268px);
margin-top: 139px; min-width: 1000px;
background: url(../../assets/images/car-bg.png) no-repeat center; min-height: 650px;
background-size: cover;
padding: 20px 200px;
overflow: hidden;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<img class="captcha-img" :src="`data:image/jpeg;base64,${captchaUrl}`" alt="验证码" /> <img class="captcha-img" :src="`data:image/jpeg;base64,${captchaUrl}`" alt="验证码" />
</div> </div>
</a-form-item> --> </a-form-item> -->
<el-form-item class="login-button-wrapper" @click="handleSubmit"> <el-form-item class="login-button-wrapper" @keyup.enter="handleSubmit" @click.native.prevent="handleSubmit">
<el-button <el-button
class="login-button" class="login-button"
type="primary" type="primary"
...@@ -65,7 +65,7 @@ import LoginService from '@/services/Login'; ...@@ -65,7 +65,7 @@ import LoginService from '@/services/Login';
// import { UserOutlined, LockOutlined } from '@ant-design/icons-vue'; // import { UserOutlined, LockOutlined } from '@ant-design/icons-vue';
import { reactive, toRefs, getCurrentInstance, computed } from 'vue'; import { reactive, toRefs, getCurrentInstance, computed, onBeforeMount } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
...@@ -94,6 +94,14 @@ export default { ...@@ -94,6 +94,14 @@ export default {
const { ctx: _this } = getCurrentInstance() const { ctx: _this } = getCurrentInstance()
const loginService = new LoginService(); const loginService = new LoginService();
onBeforeMount(()=>{
document.onkeydown = e => {
if (e.keyCode === 13) {
handleSubmit()
}
}
})
const validatePass = (rule, value, callback) => { const validatePass = (rule, value, callback) => {
if (value === '') { if (value === '') {
callback(new Error('请输入密码')); callback(new Error('请输入密码'));
...@@ -203,7 +211,7 @@ export default { ...@@ -203,7 +211,7 @@ export default {
.login-content { .login-content {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 95%;
height: 420px; height: 420px;
} }
......
...@@ -16,6 +16,16 @@ try { ...@@ -16,6 +16,16 @@ try {
} }
const checkRepeatedData = (data, type) => {
let arr = [];
data.forEach(item => {
if(arr.indexOf(item[type]) < 0) {
arr.push(item);
}
});
return arr;
}
export default { export default {
namespaced: true, namespaced: true,
state, state,
...@@ -31,7 +41,7 @@ export default { ...@@ -31,7 +41,7 @@ export default {
// 设置面包屑 // 设置面包屑
SET_BREAD_CRUMB(state, data) { SET_BREAD_CRUMB(state, data) {
if(!init) { if(!init) {
state.curBreadCrumb = data; state.curBreadCrumb = checkRepeatedData(data, 'name');
localStorage.setItem('breadcrumb', JSON.stringify(data)); localStorage.setItem('breadcrumb', JSON.stringify(data));
} }
init = false; init = false;
......
...@@ -35,5 +35,6 @@ export default { ...@@ -35,5 +35,6 @@ export default {
left: 0; left: 0;
width: 100%; width: 100%;
min-width: 1190px; min-width: 1190px;
overflow-y: scroll;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!