Commit e7bc9174 authored by caicaicai's avatar caicaicai

修改

parent ebacc494
......@@ -1682,6 +1682,37 @@ var HttpReq = function(){
data:data,
})
},
//大屏——标题菜单
screenTitleMenuQuery: function(param){
return request({
url: '/api/Screen',
method: 'get',
params:param,
})
},
screenTitleMenuAdd: function(data){
return request({
url: '/api/Screen',
method: 'POST',
data:data,
}).then((res) => {
return res
})
},
screenTitleMenuUpdate: function(data){
return request({
url: '/api/Screen',
method: 'PUT',
data:data,
})
},
screenTitleMenuDel: function(data){
return request({
url: '/api/Screen',
method: 'Delete',
data:data,
})
},
......
<template>
<div class="carManView">
车辆管理
</div>
</template>
<script>
export default {
data() {
return {
}
},
mounted() { },
methods: {
},
}
</script>
<style>
.carManView{
width: 100%;
height: 100%;
overflow: hidden;
background-color: aliceblue;
}
</style>
\ No newline at end of file
<template>
<div class="dataAnaView">
数据分析
</div>
</template>
<script>
export default {
data() {
return {
}
},
mounted() { },
methods: {
},
}
</script>
<style>
.dataAnaView{
width: 100%;
height: 100%;
overflow: hidden;
background-color: aliceblue;
}
</style>
\ No newline at end of file
<template>
<div class="dataScrView">
数据总览
</div>
</template>
<script>
export default {
data() {
return {
}
},
mounted() { },
methods: {
},
}
</script>
<style>
.dataScrView{
width: 100%;
height: 100%;
overflow: hidden;
background-color: aliceblue;
}
</style>
\ No newline at end of file
<template>
<div class="intelligentSchView">
智能调度
</div>
</template>
<script>
export default {
data() {
return {
}
},
mounted() { },
methods: {
},
}
</script>
<style>
.intelligentSchView{
width: 100%;
height: 100%;
overflow: hidden;
background-color: aliceblue;
}
</style>
\ No newline at end of file
<template>
<div class="da-ping">
<div class="dp-title"></div>
<div class="body">
<div class="bigScreenView">
<!-- 头部标题 -->
<div class="top_title">
<div class="top_titl_left">
<div v-for="(item,index) in topSmallTitleLeftData" :key="index" style="cursor: pointer;" @click="changeOver(item)">
<div :class="selectModule == item.componentName ? 'top_titl_left_textStyle2' : 'top_titl_left_textStyle1' ">{{item.title}}</div>
<img src="../../assets/images/cutGraph/light7.png" width="85" style="margin-top:-1vh;" v-if="selectModule == item.componentName">
</div>
</div>
<div class="top_titl_right">
<div v-for="(item,index) in topSmallTitleRightData" :key="index" style="cursor: pointer;" @click="changeOver(item)">
<div :class="selectModule == item.componentName ? 'top_titl_left_textStyle2' : 'top_titl_left_textStyle1' ">{{item.title}}</div>
<img src="../../assets/images/cutGraph/light7.png" width="85" style="margin-top:-1vh;" v-if="selectModule == item.componentName">
</div>
</div>
<!-- 时间 -->
<div class="currentTimeStyle">{{currentTime}}</div>
</div>
<!-- 内容 -->
<div class="content_view">
<dataScreening ref="dataScreeningMethod" v-show="selectModule == 'dataScreening'"/>
<carManagement ref="carManagementMethod" v-show="selectModule == 'carManagement'"/>
<intelligentSchedul ref="intelligentSchedulMethod" v-show="selectModule == 'intelligentSchedul'"/>
<dataAnalysis ref="dataAnalysisMethod" v-show="selectModule == 'dataAnalysis'"/>
</div>
</div>
</template>
<script>
import echarts from 'echarts';
import { Tools, HttpReq, CAMap} from '@/assets/js/common.js';
import dataScreening from './components/dataScreening/index.vue' //数据总览
import carManagement from './components/carManagement/index.vue' //车辆管理
import intelligentSchedul from './components/intelligentSchedul/index.vue' //智能调度
import dataAnalysis from './components/dataAnalysis/index.vue' //数据分析
export default {
components: { },
components: {
dataScreening,
carManagement,
intelligentSchedul,
dataAnalysis,
},
data() {
return {
//时间
timer:null,
currentTime:'',
//选择模块
selectModule:'',
//标题菜单数据
topSmallTitleLeftData:[
{
title:'数据总览',
componentName:'dataScreening',
componentRef:'dataScreeningMethod',
status:1,
},
{
title:'车辆管理',
componentName:'carManagement',
componentRef:'carManagementMethod',
status:1,
},
{
title:'智能调度',
componentName:'intelligentSchedul',
componentRef:'intelligentSchedulMethod',
status:1,
}
],
topSmallTitleRightData:[
{
title:'数据分析',
componentName:'dataAnalysis',
componentRef:'dataAnalysisMethod',
status:1,
},
{
title:'后台管理',
componentName:'backstage',
componentRef:'backstageMethod',
status:1,
},
],
}
},
mounted() {
this.setNowTimes();
this.timer = setInterval(() => {
this.setNowTimes();
}, 1000)
},
methods: {
loadData() {
this.$nextTick(()=>{
HttpReq.truckDispatching.screenTitleMenuQuery({size:9999}).then((res) => {
if(res.code == 200){;
console.log(res);
}
})
})
},
changeOver(item){
this.selectModule = item.componentName;
// if(item.componentName == 'dataScreening'){
// this.$refs.dataScreeningMethod.loadData();
// }
},
//获取当前时间
setNowTimes () {
let myDate = new Date();
let wk = myDate.getDay();
let yy = String(myDate.getFullYear());
let mm = String((myDate.getMonth() + 1) < 10 ? '0' + (myDate.getMonth() + 1) : (myDate.getMonth() + 1));
let dd = String(myDate.getDate() < 10 ? '0' + myDate.getDate() : myDate.getDate());
let hou = String(myDate.getHours() < 10 ? '0' + myDate.getHours() : myDate.getHours());
let min = String(myDate.getMinutes() < 10 ? '0' + myDate.getMinutes() : myDate.getMinutes());
let sec = String(myDate.getSeconds() < 10 ? '0' + myDate.getSeconds() : myDate.getSeconds());
let weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
let week = weeks[wk];
this.currentTime = yy + '-' + mm + '-' + dd + ' ' + hou + ':' + min + ':' + sec;
},
},
destroyed(){
this.timer = null;
}
}
</script>
<style scope>
.bigScreenView{
width: 100vw;
height: 100vh;
overflow: hidden;
background:no-repeat center center url('~@/assets/images/cutGraph/wallhaven-4x3j3l.jpg');
background-size:100% 100%;
}
.top_title{
width: 100%;
height: 5.5vh;
overflow: hidden;
background:no-repeat center center url('~@/assets/images/cutGraph/top_title.png');
background-size:100% 100%;
position: relative;
}
.content_view{
width: 100%;
height: 94vh;
overflow: hidden;
}
.top_titl_left{
display: flex;
justify-content: space-evenly;
position: absolute;
top: 2vh;
width: 35%;
font-size: 22px;
}
.top_titl_right{
display: flex;
justify-content: space-evenly;
position: absolute;
top: 2vh;
right: 15vw;
width: 20%;
font-size: 22px;
}
.top_titl_left_textStyle1{
color: gainsboro;
}
.top_titl_left_textStyle2{
color: white;
text-shadow: 1px 1px 1px skyblue
}
.currentTimeStyle{
position: absolute;
top: 2vh;
right: 1vw;
font-size: 24px;
color: #03FEFE;
}
</style>
\ No newline at end of file
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