Commit fe11a6a9 authored by 刘殿昕's avatar 刘殿昕

修改健康传参,换logo,恢复侧边栏

parent cc16c44e
......@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Beagle aPaaS Platform v3.0</title>
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" />
<!-- <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" /> -->
<style>
body{
background-color: #f6f7fb;
......
<template>
<div class="menu">
<img src="../assets/imgs/home_img_logo.png" alt class="logo" />
<img src="../assets/imgs/nav-logo.png" alt class="logo" />
<div
style="float: right; cursor: pointer; position: relative"
class="user_hover"
......@@ -320,7 +320,7 @@ export default {
}
.logo {
float: left;
margin: 15px 0 0 40px;
margin: 22px 0 0 40px;
cursor: pointer;
}
.user {
......
......@@ -65,32 +65,32 @@ export default {
}
switch (uri) {
case "data_service_list":
item.active = "shop_tool_ic_sjfw_sel";
item.default = "shop_tool_ic_sjfw";
item.active = "tool_ic_shujufw_sel";
item.default = "tool_ic_shujufw";
break;
case "space_time_service_list":
item.active = "shop_tool_ic_skfw_sel";
item.default = "shop_tool_ic_skfw";
item.active = "tool_ic_shikongfw_sel";
item.default = "tool_ic_shikongfw";
break;
case "video_service_list":
item.active = "shop_tool_ic_spfw_sel";
item.default = "shop_tool_ic_spfw";
item.active = "tool_ic_shipinfw_sel";
item.default = "tool_ic_shipinfw";
break;
case "perception_service_list":
item.active = "shop_tool_ic_ganzhifw_sel";
item.default = "shop_tool_ic_ganzhifw";
item.active = "tool_ic_ganzhifw_sel";
item.default = "tool_ic_ganzhifw";
break;
case "comprehensive_app_list":
item.active = "shop_tool_ic_zhyyfw_sel";
item.default = "shop_tool_ic_zhyyfw";
item.active = "tool_ic_zongheyyfw_sel";
item.default = "tool_ic_zongheyyfw";
break;
case "cloud":
item.active = "shop_tool_ic_yzyfw_sel";
item.default = "shop_tool_ic_yzyfw";
item.active = "tool_ic_yunziyuanfw_sel";
item.default = "tool_ic_yunziyuanfw";
break;
case "app_store_list":
item.active = "shop_ic_yysd_sel";
item.default = "shop_ic_yysd";
item.active = "tool_ic_yingyongsd_sel";
item.default = "tool_ic_yingyongsd";
break;
default:
item.active = "1";
......@@ -111,25 +111,24 @@ export default {
.service_shop_menu {
background-color: #0d1847;
position: fixed;
top: 76px;
left: calc(50% - 600px);
top: 58px;
left: 0;
width: 180px;
padding: 8px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
rgba(15, 19, 65, 0.04);
border-radius: 8px;
height: 100%;
padding-top: 30px;
}
.service_shop_menu_list > li {
padding: 16px 10px 8px 22px;
border-left: 5px solid #0d1847;
font-size: 15px;
line-height: 24px;
cursor: pointer;
}
.service_shop_menu_list > li:hover,
.service_shop_menu_list > li.current {
background-color: rgba(242, 246, 253, 0.4);
color: #515fe7;
border-left: 5px solid #e56600;
background-color: #182665;
color: #e6ebfe;
}
.menu_img {
width: 25px;
......@@ -137,16 +136,12 @@ export default {
}
.menu_item {
position: relative;
font-weight: bold;
font-size: 15px;
color: #96a0c5;
color: #6573ae;
top: -6px;
}
.menu_item_active {
position: relative;
font-weight: bold;
font-size: 15px;
color: #515fe7;
color: #e6ebfe;
top: -6px;
}
</style>
<template>
<div class="service_shop_menu">
<ul class="service_shop_menu_list">
<li v-for="(item, index) in menuList" :key="index" @click="active(item.visit_url)">
<img
v-if="item.visit_url == actives"
:src="item.active != '' ? require('@/assets/imgs/' + item.active + '.png') : ''"
class="menu_img"
/>
<img v-else :src="require('@/assets/imgs/' + item.default + '.png')" class="menu_img" />
<span
:class="item.visit_url == actives ? 'menu_item_active':'menu_item'"
>{{ item.menu_name }}</span>
</li>
</ul>
</div>
</template>
<script>
export default {
props: {},
data() {
return {
actives: "",
menuList: [],
};
},
computed: {
getActive() {
return this.$store.state.serviceShopMenu;
},
},
watch: {
getActive(newVal) {
this.getActiveMenu(newVal);
},
},
mounted() {
this.getShopMenu();
this.$store.commit("serviceShopMenuAct", this.$route.path);
this.actives = this.$store.state.serviceShopMenu;
},
methods: {
active(val) {
this.$store.commit("serviceShopMenuAct", val);
this.$router.push(val);
},
getActiveMenu(val) {
this.actives = val;
},
getShopMenu() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => {
if (response.data.success == 1) {
let arr = response.data.data[0].Child;
let shopArr = [];
let asd = arr.find(item => {
return item.visit_url == "/services_shop"
})
shopArr = asd.Child;
if (shopArr && shopArr.length != 0) {
Array.from(shopArr).forEach((item) => {
let uri = item.visit_url.substring(6);
if (uri.indexOf("/") != -1) {
uri = uri.substring(0, uri.indexOf("/"));
}
switch (uri) {
case "data_service_list":
item.active = "shop_tool_ic_sjfw_sel";
item.default = "shop_tool_ic_sjfw";
break;
case "space_time_service_list":
item.active = "shop_tool_ic_skfw_sel";
item.default = "shop_tool_ic_skfw";
break;
case "video_service_list":
item.active = "shop_tool_ic_spfw_sel";
item.default = "shop_tool_ic_spfw";
break;
case "perception_service_list":
item.active = "shop_tool_ic_ganzhifw_sel";
item.default = "shop_tool_ic_ganzhifw";
break;
case "comprehensive_app_list":
item.active = "shop_tool_ic_zhyyfw_sel";
item.default = "shop_tool_ic_zhyyfw";
break;
case "cloud":
item.active = "shop_tool_ic_yzyfw_sel";
item.default = "shop_tool_ic_yzyfw";
break;
case "app_store_list":
item.active = "shop_ic_yysd_sel";
item.default = "shop_ic_yysd";
break;
default:
item.active = "1";
item.default = "1";
break;
}
});
}
this.menuList = shopArr;
}
});
},
},
};
</script>
<style scoped>
.service_shop_menu {
background-color: #0d1847;
position: fixed;
top: 76px;
left: calc(50% - 600px);
width: 180px;
padding: 8px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
rgba(15, 19, 65, 0.04);
border-radius: 8px;
}
.service_shop_menu_list > li {
padding: 16px 10px 8px 22px;
font-size: 15px;
line-height: 24px;
cursor: pointer;
}
.service_shop_menu_list > li:hover,
.service_shop_menu_list > li.current {
background-color: rgba(242, 246, 253, 0.4);
color: #515fe7;
}
.menu_img {
width: 25px;
margin-right: 6px;
}
.menu_item {
position: relative;
font-weight: bold;
font-size: 15px;
color: #96a0c5;
top: -6px;
}
.menu_item_active {
position: relative;
font-weight: bold;
font-size: 15px;
color: #515fe7;
top: -6px;
}
</style>
This diff is collapsed.
......@@ -315,10 +315,10 @@ export default {
right_3_state: 0,
last_id: 0,
mult_data_state: [
{ name: "正常", value: 0 },
{ name: "警告", value: 0 },
{ name: "错误", value: 0 },
{ name: "健康", value: 0 },
{ name: "未使用", value: 0 },
{ name: "故障", value: 0 },
{ name: "警告", value: 0 },
],
mult_data: [
{ name: "数据服务", value: 0 },
......@@ -535,7 +535,25 @@ export default {
getServiceHealth() {
this.$api.dataAnalysis.getServiceHealth().then((response) => {
if (response.data.success == 1) {
this.mult_data_state = response.data.data.seriesData;
let data = response.data.data.seriesData;
let jk = data.find((item) => {
return item.name == "健康";
});
let wsy = data.find((item) => {
return item.name == "未使用";
});
let gz = data.find((item) => {
return item.name == "故障";
});
let jg = data.find((item) => {
return item.name == "警告";
});
this.mult_data_state = [
{ name: "健康", value: jk.value },
{ name: "未使用", value: wsy.value },
{ name: "故障", value: gz.value },
{ name: "警告", value: jg.value },
];
}
});
},
......
......@@ -309,10 +309,10 @@ export default {
right_3_state: 0,
last_id: 0,
mult_data_state: [
{ name: "正常", value: 0 },
{ name: "警告", value: 0 },
{ name: "错误", value: 0 },
{ name: "健康", value: 0 },
{ name: "未使用", value: 0 },
{ name: "故障", value: 0 },
{ name: "警告", value: 0 },
],
mult_data: [
{ name: "数据服务", value: 0 },
......@@ -529,7 +529,25 @@ export default {
getServiceHealth() {
this.$api.dataAnalysis.getServiceHealth().then((response) => {
if (response.data.success == 1) {
this.mult_data_state = response.data.data.seriesData;
let data = response.data.data.seriesData;
let jk = data.find((item) => {
return item.name == "健康";
});
let wsy = data.find((item) => {
return item.name == "未使用";
});
let gz = data.find((item) => {
return item.name == "故障";
});
let jg = data.find((item) => {
return item.name == "警告";
});
this.mult_data_state = [
{ name: "健康", value: jk.value },
{ name: "未使用", value: wsy.value },
{ name: "故障", value: gz.value },
{ name: "警告", value: jg.value },
];
}
});
},
......
<template>
<div class="shop_list_cont">
<!-- <div class="shop_list_cont"> -->
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment