This commit is contained in:
weipengfei 2024-01-16 10:57:29 +08:00
parent ab83fa876f
commit 6443174f14
4 changed files with 153 additions and 127 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -7,6 +7,8 @@ import {getStore, setStore} from "../assets/js/storage";
import {createRoute, isTokenExpired} from "../assets/js/utils";
import config from "../config/config";
import {refreshAccessToken} from "../api/common/common";
import dataV from "@/views/datav/dataV";
import copyV from "@/views/datav/copyV";
let HOME_PAGE = config.HOME_PAGE;
const currentOrganization = getStore('currentOrganization', true);
@ -21,9 +23,32 @@ const routes = [].concat(
// const router = new Router({
// routes: routers
// });
function checkPropertyValue(obj, targetValue) {
// 检查当前对象是否是目标值
if (obj === targetValue) {
return true;
}
// 检查当前对象是否为对象类型
if (typeof obj === 'object') {
// 遍历对象的所有属性
for (let key in obj) {
// 递归调用检查属性值
if (checkPropertyValue(obj[key], targetValue)) {
return true;
}
}
}
// 如果没有找到目标值,则返回 false
return false;
}
const menu = getStore('menu', true);
if (menu) {
menu.forEach(function (v) {
if(checkPropertyValue(v, 'datasv'))return;
if(checkPropertyValue(v, 'copysv'))return;
routes.push(createRoute(v));
if (v.children) {
v.children.forEach(function (v2) {
@ -48,14 +73,12 @@ const router = new Router({
{
name: 'datasv',
path: '/datasv',
component: resolve => require(['@/views/datav/dataV'], resolve),
meta: {model: 'error'},
component: dataV
},
{
name: 'copysv',
path: '/copysv',
component: resolve => require(['@/views/datav/copyV'], resolve),
meta: {model: 'error'},
component: copyV
},
// {
// name: 'login',
@ -148,6 +171,7 @@ router.beforeEach((to, from, next) => {
}
if (to.name === 'datasv' || to.path === '/datasv' || to.name === 'copysv' || to.path === '/copysv') {
console.log('跳转', to);
next();
return false;
}

View File

@ -175,7 +175,7 @@ export default {
};
</script>
<style lang="less">
<style lang="less" scoped>
.marker-d {
width: 260px;
img {
@ -232,103 +232,103 @@ export default {
}
//
.ant-dropdown-open, .ant-dropdown-open:hover{
background: #0a1a29;
color: #fff !important;
.name{
color: #fff !important;
}
}
.ant-dropdown-trigger, .ant-dropdown-trigger:hover{
background: #0a1a29;
color: #fff !important;
.name{
color: #fff !important;
}
}
.ant-dropdown-content, .ant-dropdown-content:hover{
background: #0a1a29;
color: #fff !important;
.name{
color: #fff !important;
}
}
.ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active{
background: #0a1a29;
color: #fff !important;
.name{
color: #fff !important;
}
}
.ant-dropdown-menu-item:hover{
background-color: rgba(#0c3e6d, 0.8);
color: #fff !important;
.name{
color: #fff !important;
}
}
// ::v-deep .ant-dropdown-open, .ant-dropdown-open:hover{
// background: #0a1a29;
// color: #fff !important;
// .name{
// color: #fff !important;
// }
// }
// ::v-deep .ant-dropdown-trigger, .ant-dropdown-trigger:hover{
// background: #0a1a29;
// color: #fff !important;
// .name{
// color: #fff !important;
// }
// }
// ::v-deep .ant-dropdown-content, .ant-dropdown-content:hover{
// background: #0a1a29;
// color: #fff !important;
// .name{
// color: #fff !important;
// }
// }
// ::v-deep .ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active{
// background: #0a1a29;
// color: #fff !important;
// .name{
// color: #fff !important;
// }
// }
// ::v-deep .ant-dropdown-menu-item:hover{
// background-color: rgba(#0c3e6d, 0.8);
// color: #fff !important;
// .name{
// color: #fff !important;
// }
// }
//
.ant-input{
background: #0a1a29;
color: #fff !important;
}
.anticon.anticon-calendar.ant-calendar-picker-icon{
color: #fff;
}
.ant-calendar.ant-calendar-picker-container-content{
background: #0a1a29;
.ant-calendar-column-header-inner{
color: #fff !important;
}
.ant-calendar-date{
color: #fff !important;
}
.ant-calendar-date:hover{
color: #fff !important;
background-color: rgba(#0c3e6d, 0.8);
}
.ant-calendar-today-btn {
color: #fff !important;
}
.ant-calendar-year-select{
color: #fff !important;
}
.ant-calendar-month-select{
color: #fff !important;
}
}
.ant-calendar-picker-input.ant-input{
// height: 40px;
}
.ant-calendar .ant-calendar-ok-btn{
background: rgba(#0c3e6d, 0.8);
border-color: rgba(#0c3e6d, 0.8);
// //
// ::v-deep .ant-input{
// background: #0a1a29;
// color: #fff !important;
// }
// ::v-deep .anticon.anticon-calendar.ant-calendar-picker-icon{
// color: #fff;
// }
// ::v-deep .ant-calendar.ant-calendar-picker-container-content{
// background: #0a1a29;
// ::v-deep .ant-calendar-column-header-inner{
// color: #fff !important;
// }
// ::v-deep .ant-calendar-date{
// color: #fff !important;
// }
// ::v-deep .ant-calendar-date:hover{
// color: #fff !important;
// background-color: rgba(#0c3e6d, 0.8);
// }
// ::v-deep .ant-calendar-today-btn {
// color: #fff !important;
// }
// ::v-deep .ant-calendar-year-select{
// color: #fff !important;
// }
// ::v-deep .ant-calendar-month-select{
// color: #fff !important;
// }
// }
// ::v-deep .ant-calendar-picker-input.ant-input{
// // height: 40px;
// }
// ::v-deep .ant-calendar .ant-calendar-ok-btn{
// background: rgba(#0c3e6d, 0.8);
// border-color: rgba(#0c3e6d, 0.8);
}
.ant-calendar-today .ant-calendar-date {
background: rgba(#0c3e6d, 0.8);
border-color: rgba(#0c3e6d, 0.8);
color: #fff;
// }
// ::v-deep .ant-calendar-today .ant-calendar-date {
// background: rgba(#0c3e6d, 0.8);
// border-color: rgba(#0c3e6d, 0.8);
// color: #fff;
}
.ant-calendar-selected-day .ant-calendar-date {
background: rgba(#0c3e6d, 0.8);
border-color: #0095bc;
}
.ant-calendar-time .ant-calendar-footer .ant-calendar-time-picker-btn-disabled{
color: #202020;
}
.ant-calendar-today-btn {
color: #202020;
}
.ant-input:hover,
.ant-calendar-picker:hover .ant-calendar-picker-input:not(.ant-input-disabled){
border-color: #0095bc;
}
.ant-input:focus,
.ant-calendar-picker:focus .ant-calendar-picker-input:not(.ant-input-disabled) {
border-color: #0095bc;
box-shadow: none;
}
// }
// ::v-deep .ant-calendar-selected-day .ant-calendar-date {
// background: rgba(#0c3e6d, 0.8);
// border-color: #0095bc;
// }
// ::v-deep .ant-calendar-time .ant-calendar-footer .ant-calendar-time-picker-btn-disabled{
// color: #202020;
// }
// ::v-deep .ant-calendar-today-btn {
// color: #202020;
// }
// ::v-deep .ant-input:hover,
// .ant-calendar-picker:hover .ant-calendar-picker-input:not(.ant-input-disabled){
// border-color: #0095bc;
// }
// ::v-deep .ant-input:focus,
// .ant-calendar-picker:focus .ant-calendar-picker-input:not(.ant-input-disabled) {
// border-color: #0095bc;
// box-shadow: none;
// }
</style>

View File

@ -327,23 +327,27 @@
menuModelClick(event) {
//
console.log('event', event);
if(event.key==179){ //
return this.$router.push('/datasv');
}
if(event.key==181){ //
return this.$router.push('/copysv');
}
// if(event.key==175){ //
// return this.$router.push('/datasv');
// }
// if(event.key==180){ //
// return this.$router.push('/copysv');
// }
let that = this;
that.menu.forEach(function (v, k) {
if (v.id == event.key) {
that.menus = v.children;
that.menus = that.menu.find(v=>v.id == event.key).children;
let turnPath = '/';
if (!v.children) {
if (!that.menus) {
turnPath += v.fullUrl;
} else if (!v.children[0].children) {
turnPath += v.children[0].fullUrl;
} else if (!that.menus[0].children) {
turnPath += that.menus[0].fullUrl;
} else {
turnPath += v.children[0].children[0].fullUrl;
turnPath += that.menus[0].children[0].fullUrl;
}
if(turnPath.includes('datasv')){
return that.$router.push('/datasv');
}
if(turnPath.includes('copysv')){
return that.$router.push('/copysv');
}
if (turnPath == '/home') {
that.toHome();
@ -352,8 +356,6 @@
if (turnPath != '/#') {
that.$router.push(turnPath);
}
}
});
},
onModelOpenChange(openKeys) {
},