Commit fefbae00 authored by caicaicai's avatar caicaicai

修改

parent 110b0e6b
...@@ -2,10 +2,10 @@ ENV = 'development' ...@@ -2,10 +2,10 @@ ENV = 'development'
# 接口地址 # 接口地址
#VUE_APP_BASE_API = 'http://localhost:8000' #VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_BASE_API = 'http://192.168.0.108:8001' VUE_APP_BASE_API = 'http://192.168.0.111:9090'
VUE_APP_WS_API = 'ws://8.143.203.103:9090/webSocket' VUE_APP_WS_API = 'ws://8.143.203.103:9090/webSocket'
VUE_APP_LOCAL_API = 'http://192.168.0.108:8001' VUE_APP_LOCAL_API = 'http://192.168.0.111:9090'
VUE_APP_LOCAL_API2 = 'http://192.168.0.108:8001' VUE_APP_LOCAL_API2 = 'http://192.168.0.111:9090'
# 是否启用 babel-plugin-dynamic-import-node插件 # 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
...@@ -2141,19 +2141,37 @@ var HttpReq = function(){ ...@@ -2141,19 +2141,37 @@ var HttpReq = function(){
params:param, params:param,
}) })
}, },
//大屏智能调度信息——进行中
getLargeScreenUnder1: function(param){
return request({
url: '/api/Order/Under',
method: 'get',
params:param
})
},
//大屏智能调度信息——已完成
getLargeScreenRound1: function(param){
return request({
url: '/api/Order/Round',
method: 'get',
params:param
})
},
//大屏智能调度信息列表
getLargeScreen1: function(param){
return request({
url: '/api/Order/Start',
method: 'get',
params:param
})
},
//大屏智能调度——车辆区域分布
getLargeScreenfenbu1: function(param){
return request({
url: '/api/Dispatch/areaCar',
method: 'get',
params:param
})
}, },
...@@ -2168,8 +2186,7 @@ var HttpReq = function(){ ...@@ -2168,8 +2186,7 @@ var HttpReq = function(){
},
...@@ -2289,7 +2306,6 @@ var HttpReq = function(){ ...@@ -2289,7 +2306,6 @@ var HttpReq = function(){
}) })
}, },
}, },
/** 操作日志 */ /** 操作日志 */
reoperationlog:{ reoperationlog:{
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<div> <div>
<div class="intelligentSchScrView_rightView_title">智能调度信息</div> <div class="intelligentSchScrView_rightView_title">智能调度信息</div>
<div class="intelligentSchScrView_rightView_content"> <div class="intelligentSchScrView_rightView_content">
<!-- <div class="intelligentSchScrView_rightView_content_1_top"> <div class="intelligentSchScrView_rightView_content_1_top">
<div> <div>
<img src="../../../../assets/images/cutGraph/zhengzaijinxing1.png"> <img src="../../../../assets/images/cutGraph/zhengzaijinxing1.png">
<div style="color:#F8D909;text-align: center;"> <div style="color:#F8D909;text-align: center;">
...@@ -85,21 +85,23 @@ ...@@ -85,21 +85,23 @@
<div style="font-size:22px;">{{dispatchFinishNum}}</div> <div style="font-size:22px;">{{dispatchFinishNum}}</div>
</div> </div>
</div> </div>
</div> --> </div>
<div class="intelligentSchScrView_rightView_content_1_bottom"> <div class="intelligentSchScrView_rightView_content_1_bottom">
<div class="intelligentSchScrView_rightView_content_1_bottom_rolling"> <div class="intelligentSchScrView_rightView_content_1_bottom_rolling">
<div class="table-box"> <div class="table-box">
<dl> <dl>
<dt> <dt>
<div>调度车辆</div> <div>车牌号</div>
<div>起点</div>
<div>调度时间</div> <div>调度时间</div>
<div>完成时间</div> <div>状态</div>
<div>目的地</div> <div>目的地</div>
</dt> </dt>
<dd v-for="(item,index) in dispatchDetailsList" :key="index"> <dd v-for="(item,index) in dispatchDetailsList" :key="index">
<div>{{item.carNo}}</div> <div>{{item.carNo}}</div>
<div>{{item.startAdr}}</div>
<div>{{item.createTime}}</div> <div>{{item.createTime}}</div>
<div>{{item.endTime}}</div> <div>{{item.status == 0 ? '接单中' : item.status == 1 ? '已完成' : '未完成'}}</div>
<div>{{item.destination}}</div> <div>{{item.destination}}</div>
</dd> </dd>
</dl> </dl>
...@@ -201,6 +203,7 @@ import 'recorder-core/src/extensions/waveview' ...@@ -201,6 +203,7 @@ import 'recorder-core/src/extensions/waveview'
export default { export default {
data() { data() {
return { return {
intelligentSchedulTimer:null,
heartbeatTimer:null, heartbeatTimer:null,
websocket: null, websocket: null,
whetherShow:false, whetherShow:false,
...@@ -214,6 +217,20 @@ export default { ...@@ -214,6 +217,20 @@ export default {
dispatchDetailsList:[], //智能调度情况表 dispatchDetailsList:[], //智能调度情况表
dispatchBtnTitle:'人工调度', dispatchBtnTitle:'人工调度',
dispatchBtnTitle1:'人工调度', dispatchBtnTitle1:'人工调度',
//车辆区域分布Echarts
carsAreaDistributionData:{
name:['矿区一', '矿区二', '矿区三'],
kache:[320, 302, 301],
chanche:[320, 302, 301],
qitache:[320, 302, 301],
},
//各装点车铲比Echarts
carsProportionData:[
[28, 3, '采区一'],
[50, 7, '采区二'],
[22, 0, '卸区一'],
[2, 0, '卸区二'],
],
guangbo1:'广播', guangbo1:'广播',
jinzhitongzhi1:'紧急通知', jinzhitongzhi1:'紧急通知',
tonghua1:'通话', tonghua1:'通话',
...@@ -235,8 +252,6 @@ export default { ...@@ -235,8 +252,6 @@ export default {
} }
}, },
created(){ },
mounted() { },
methods: { methods: {
//获取总数据 //获取总数据
loadData(text){ loadData(text){
...@@ -265,32 +280,100 @@ export default { ...@@ -265,32 +280,100 @@ export default {
flag0.push(item); flag0.push(item);
} }
}) })
if(flag0.length == 0){
this.dispatchBtnTitle = '人工调度';
}else{
this.dispatchBtnTitle = flag0[0].noticeClass; this.dispatchBtnTitle = flag0[0].noticeClass;
}
}; };
}) })
//智能调度情况 //智能调度情况
HttpReq.truckDispatching.personRecordingQuery({size:20,sort:'createTime,desc',flag:0}).then((res) => { HttpReq.truckDispatching.getLargeScreen1({size:100,sort:'createTime,desc'}).then((res) => {
let finishData = []; this.dispatchDetailsList = res;
let loadingData = []; })
if(res.code == 200){ //获取智能调度情况中的进行中数量
res.data.content.forEach((item,index) => { HttpReq.truckDispatching.getLargeScreenUnder1({size:9999}).then((res) => {
if(item.status == 0){ if(res.length == 0){
finishData.push(item); this.dispatchLoadingNum = 0;
}else{ }else{
loadingData.push(item); this.dispatchLoadingNum = res[0].under;
} }
}); })
this.dispatchLoadingNum = loadingData.length; //获取智能调度情况中的已完成数量
this.dispatchFinishNum = finishData.length; HttpReq.truckDispatching.getLargeScreenRound1({size:9999}).then((res) => {
this.dispatchDetailsList = res.data.content; if(res.length == 0){
this.dispatchFinishNum = 0;
}else{
this.dispatchFinishNum = res[0].round;
} }
}) })
//车辆区域分布Echarts //车辆区域分布Echarts
HttpReq.truckDispatching.getLargeScreenfenbu1({size:9999}).then((res) => {
console.log(res);
})
this.carsAreaDistributionEcharts(); this.carsAreaDistributionEcharts();
this.carsProportionEcharts();
//定时器
this.intelligentSchedulTimer = setInterval(() => {
//车队信息
HttpReq.truckDispatching.carFleetQuery({size:9999}).then((res) => {
if(res.code == 200){
this.carFleetData = res.data.content;
};
})
//车辆信息
this.loadData2();
//近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc'}).then((res) => {
if(res.code == 200){
this.recentNoticeData = res.data.content;
let flag0 = [];
this.recentNoticeData.forEach((item)=>{
if(item.flag == 0){
flag0.push(item);
}
})
if(flag0.length == 0){
this.dispatchBtnTitle = '人工调度';
}else{
this.dispatchBtnTitle = flag0[0].noticeClass;
}
};
})
//智能调度情况
HttpReq.truckDispatching.getLargeScreen1({size:100,sort:'createTime,desc'}).then((res) => {
this.dispatchDetailsList = res;
})
//获取智能调度情况中的进行中数量
HttpReq.truckDispatching.getLargeScreenUnder1({size:9999}).then((res) => {
if(res.length == 0){
this.dispatchLoadingNum = 0;
}else{
this.dispatchLoadingNum = res[0].under;
}
})
//获取智能调度情况中的已完成数量
HttpReq.truckDispatching.getLargeScreenRound1({size:9999}).then((res) => {
if(res.length == 0){
this.dispatchFinishNum = 0;
}else{
this.dispatchFinishNum = res[0].round;
}
})
}, 10000)
}) })
//开启录音 //开启录音
this.recOpen(); this.recOpen();
}else{ }else{
if(this.intelligentSchedulTimer) {
clearInterval(this.intelligentSchedulTimer);
}
//关闭录音 //关闭录音
this.recClose(); this.recClose();
this.whetherShow = false; this.whetherShow = false;
...@@ -381,6 +464,7 @@ export default { ...@@ -381,6 +464,7 @@ export default {
}, },
//车辆区域分布Echarts //车辆区域分布Echarts
carsAreaDistributionEcharts(){ carsAreaDistributionEcharts(){
echarts.init(document.getElementById('carsAreaDistributionView')).dispose();
var myChart = echarts.init(document.getElementById('carsAreaDistributionView')); var myChart = echarts.init(document.getElementById('carsAreaDistributionView'));
var option = { var option = {
tooltip: { tooltip: {
...@@ -396,14 +480,15 @@ export default { ...@@ -396,14 +480,15 @@ export default {
} }
}, },
grid: { grid: {
left: '3%', top: '13%',
right: '4%', left: '1%',
right: '1%',
bottom: '3%', bottom: '3%',
containLabel: true containLabel: true
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['矿区一', '矿区二', '矿区三'], data: this.carsAreaDistributionData.name,
axisLabel: { axisLabel: {
show: true, show: true,
textStyle: { textStyle: {
...@@ -442,8 +527,8 @@ export default { ...@@ -442,8 +527,8 @@ export default {
label: { label: {
show: true show: true
}, },
data: [320, 302, 301], data: this.carsAreaDistributionData.kache,
barWidth: 35, barWidth: 30,
itemStyle: { itemStyle: {
color: '#2BBFA8' color: '#2BBFA8'
}, },
...@@ -455,7 +540,7 @@ export default { ...@@ -455,7 +540,7 @@ export default {
label: { label: {
show: true show: true
}, },
data: [120, 132, 101], data: this.carsAreaDistributionData.chanche,
barWidth: 35, barWidth: 35,
itemStyle: { itemStyle: {
color: '#DB972D' color: '#DB972D'
...@@ -468,7 +553,7 @@ export default { ...@@ -468,7 +553,7 @@ export default {
label: { label: {
show: true show: true
}, },
data: [220, 182, 191], data: this.carsAreaDistributionData.qitache,
barWidth: 35, barWidth: 35,
itemStyle: { itemStyle: {
color: '#158DFD' color: '#158DFD'
...@@ -478,9 +563,90 @@ export default { ...@@ -478,9 +563,90 @@ export default {
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
//各装点车铲比 //各装点车铲比Echarts
carsProportionEcharts(){ carsProportionEcharts(){
echarts.init(document.getElementById('carsProportionView')).dispose();
var myChart = echarts.init(document.getElementById('carsProportionView'));
var option;
const data = [this.carsProportionData];
option = {
grid: {
top:'15%',
left: '5%',
right: '8%',
bottom: '9%',
containLabel: true
},
xAxis: {
name: '',
nameTextStyle: { fontSize: 14 },
splitLine: {
show: false,
lineStyle: {
type: 'dashed'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#A6F6F9',
fontSize:14,
},
},
axisLine: {
lineStyle: {
color: '#A6F6F9',
width: 1
}
},
},
yAxis: {
name: '卡车',
nameTextStyle: { fontSize: 14 },
splitLine: {
lineStyle: {
type: 'dashed'
}
},
scale: true,
axisLabel: {
show: true,
textStyle: {
color: '#A6F6F9',
fontSize:14,
}
},
axisLine: {
lineStyle: {
color: '#A6F6F9',
width: 0
}
},
},
series: [
{
data: data[0],
type: 'scatter',
symbolSize: 15,
emphasis: {
focus: 'series',
label: {
show: true,
formatter: function (param) {
return param.data[2];
},
position: 'top',
fontSize:16,
}
},
itemStyle: {
color: '#4BF3F9',
}
}
]
};
option && myChart.setOption(option);
}, },
//初始化weosocket //初始化weosocket
...@@ -948,12 +1114,9 @@ export default { ...@@ -948,12 +1114,9 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
//页面销毁时关闭长连接 if(this.intelligentSchedulTimer) {
// this.websocketclose(); clearInterval(this.intelligentSchedulTimer);
//关闭心跳 }
// if(this.heartbeatTimer) {
// clearInterval(this.heartbeatTimer);
// }
}, },
} }
</script> </script>
...@@ -1235,11 +1398,11 @@ dd>div{ ...@@ -1235,11 +1398,11 @@ dd>div{
} }
.intelligentSchScrView_rightView_content_1_bottom{ .intelligentSchScrView_rightView_content_1_bottom{
width: 100%; width: 100%;
height: 26.5vh; height: 21.5vh;
} }
.intelligentSchScrView_rightView_content_1_bottom_rolling{ .intelligentSchScrView_rightView_content_1_bottom_rolling{
text-align: center; text-align: center;
height: 26.5vh; height: 21.5vh;
overflow-y:auto; overflow-y:auto;
scrollbar-width: none; scrollbar-width: none;
} }
...@@ -1250,4 +1413,8 @@ dd>div{ ...@@ -1250,4 +1413,8 @@ dd>div{
width: 19vw; width: 19vw;
height: 27.5vh; height: 27.5vh;
} }
#carsProportionView{
width: 19vw;
height: 27.5vh;
}
</style> </style>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!-- <div id="centerDiv" class="mapcontainer1"> <!-- <div id="centerDiv" class="mapcontainer1">
<mars3dViewerMap :url="configUrl" @onload="onMapload"/> <mars3dViewerMap :url="configUrl" @onload="onMapload"/>
</div> --> </div> -->
<iframe src="http://8.143.203.103:9092/#/Index" frameborder="0" class="mapcontainer1"></iframe> <!-- <iframe src="http://8.143.203.103:9092/#/Index" frameborder="0" class="mapcontainer1"></iframe> -->
</div> </div>
</template> </template>
......
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