Commit 3760ec89 by 胡悦

修改样式

2 parents eb8188f2 e8efb59a
......@@ -7,7 +7,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<body style="margin: 0;">
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
......
......@@ -6,7 +6,7 @@
class="section"
v-for="(item, index) in menuList"
: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">
<span>{{item.origin.menuName}}</span>
<!-- :class="{'rotate-deg': item.showSubList}" -->
......@@ -97,11 +97,13 @@ export default {
});
// 点击主菜单标题
const titleClick = (item) => {
state.menuList.forEach(i => {
i.showSubList = false;
const titleClick = (item, idx) => {
state.menuList.forEach((i, index) => {
if(idx !== index) {
i.showSubList = false;
}
})
item.showSubList = true;
item.showSubList = !item.showSubList;
};
// 高亮被选中的子集标题
......@@ -212,15 +214,17 @@ export default {
}
// 同步激活样式
resData.forEach((item) => {
const { menuName: pMenuName } = item.origin;
item.showSubList = pMenuName === curBreadcrumb[0].name;
item.children.forEach((cItem, cIndex) => {
cItem.subItemActive = false;
if(cItem.origin.menuName === curBreadcrumb[1].name) {
cItem.subItemActive = true;
curBreadcrumb[1].id = cItem.id;
}
})
if(curBreadcrumb) {
const { menuName: pMenuName } = item.origin;
item.showSubList = pMenuName === curBreadcrumb[0].name;
item.children.forEach((cItem, cIndex) => {
cItem.subItemActive = false;
if(cItem.origin.menuName === curBreadcrumb[1].name) {
cItem.subItemActive = true;
curBreadcrumb[1].id = cItem.id;
}
})
}
});
if(isInit && curBreadcrumb) {
......@@ -228,10 +232,33 @@ export default {
let path = thisBread.path || '/noData';
let name = thisBread.name || '';
let id = thisBread.id || '';
if(!path || path == '/noData') {
showEmpty = true;
};
name && getMenuAuth(id, name);
history.pushState(null, path, path);
history.pushState({breadcrumb: curBreadcrumb}, path, path);
store.dispatch('app/setCommonData', { showEmpty });
} else {
let firstList = state.menuList[0];
let pOrigin = firstList.origin;
let cOrigin = firstList.children[0].origin;
const breadcrumb = [
{
name: pOrigin.menuName,
path: pOrigin.frontRoute
},
{
name: cOrigin.menuName,
path: cOrigin.frontRoute
}
];
if(!cOrigin.frontRoute || cOrigin.frontRoute == '/noData') {
showEmpty = true;
};
name && getMenuAuth(firstList.children[0].id, cOrigin.menuName);
history.pushState({breadcrumb}, cOrigin.frontRoute, cOrigin.frontRoute);
store.dispatch('app/setCommonData', { showEmpty });
}
}
}, err => {
......
......@@ -142,6 +142,7 @@ export default {
visibility: hidden;
-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);
font-size: 16px !important;
.arrow-icon {
height: 21px;
......
......@@ -40,7 +40,7 @@ export default {
const subMircroEle = document.getElementById('sub-system-frame');
subMircroEle.addEventListener('DOMNodeInserted', function (e) {
const target = e.currentTarget,
tarInner = target.innerHTML;
tarInner = target.innerHTML;
if (!state.el_sub_innerH !== !tarInner) {
state.el_sub_innerH = target.innerHTML;
}
......
......@@ -22,12 +22,16 @@ export default {
.home-content-wrapper {
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%;
height: calc(100% - 278px);
margin-top: 139px;
background: url(../../assets/images/car-bg.png) no-repeat center;
background-size: cover;
padding: 20px 200px;
overflow: hidden;
height: calc(100% - 268px);
min-width: 1000px;
min-height: 650px;
}
</style>
\ No newline at end of file
......@@ -41,7 +41,7 @@
<img class="captcha-img" :src="`data:image/jpeg;base64,${captchaUrl}`" alt="验证码" />
</div>
</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
class="login-button"
type="primary"
......@@ -65,7 +65,7 @@ import LoginService from '@/services/Login';
// 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 { useRouter } from 'vue-router';
......@@ -94,6 +94,14 @@ export default {
const { ctx: _this } = getCurrentInstance()
const loginService = new LoginService();
onBeforeMount(()=>{
document.onkeydown = e => {
if (e.keyCode === 13) {
handleSubmit()
}
}
})
const validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入密码'));
......@@ -203,7 +211,7 @@ export default {
.login-content {
display: flex;
justify-content: space-between;
width: 100%;
width: 95%;
height: 420px;
}
......
......@@ -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 {
namespaced: true,
state,
......@@ -31,7 +41,7 @@ export default {
// 设置面包屑
SET_BREAD_CRUMB(state, data) {
if(!init) {
state.curBreadCrumb = data;
state.curBreadCrumb = checkRepeatedData(data, 'name');
localStorage.setItem('breadcrumb', JSON.stringify(data));
}
init = false;
......
......@@ -35,5 +35,6 @@ export default {
left: 0;
width: 100%;
min-width: 1190px;
overflow-y: scroll;
}
</style>
\ 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!