Commit 3760ec89 by 胡悦

修改样式

2 parents eb8188f2 e8efb59a
...@@ -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;
}; };
// 高亮被选中的子集标题 // 高亮被选中的子集标题
...@@ -212,15 +214,17 @@ export default { ...@@ -212,15 +214,17 @@ export default {
} }
// 同步激活样式 // 同步激活样式
resData.forEach((item) => { resData.forEach((item) => {
const { menuName: pMenuName } = item.origin; if(curBreadcrumb) {
item.showSubList = pMenuName === curBreadcrumb[0].name; const { menuName: pMenuName } = item.origin;
item.children.forEach((cItem, cIndex) => { item.showSubList = pMenuName === curBreadcrumb[0].name;
cItem.subItemActive = false; item.children.forEach((cItem, cIndex) => {
if(cItem.origin.menuName === curBreadcrumb[1].name) { cItem.subItemActive = false;
cItem.subItemActive = true; if(cItem.origin.menuName === curBreadcrumb[1].name) {
curBreadcrumb[1].id = cItem.id; cItem.subItemActive = true;
} curBreadcrumb[1].id = cItem.id;
}) }
})
}
}); });
if(isInit && curBreadcrumb) { if(isInit && curBreadcrumb) {
...@@ -228,10 +232,33 @@ export default { ...@@ -228,10 +232,33 @@ export default {
let path = thisBread.path || '/noData'; let path = thisBread.path || '/noData';
let name = thisBread.name || ''; let name = thisBread.name || '';
let id = thisBread.id || ''; let id = thisBread.id || '';
if(!path || path == '/noData') {
showEmpty = true;
};
name && getMenuAuth(id, name); 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 => { }, err => {
......
...@@ -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;
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
const subMircroEle = document.getElementById('sub-system-frame'); const subMircroEle = document.getElementById('sub-system-frame');
subMircroEle.addEventListener('DOMNodeInserted', function (e) { subMircroEle.addEventListener('DOMNodeInserted', function (e) {
const target = e.currentTarget, const target = e.currentTarget,
tarInner = target.innerHTML; tarInner = target.innerHTML;
if (!state.el_sub_innerH !== !tarInner) { if (!state.el_sub_innerH !== !tarInner) {
state.el_sub_innerH = target.innerHTML; state.el_sub_innerH = target.innerHTML;
} }
......
...@@ -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!