Commit 0a55b4b2 authored by xinzhedeai's avatar xinzhedeai

温湿风

parent da4dd73f
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,user-scalable=no" />
<title>露天矿山数据总览</title>
<link rel="stylesheet" href="../css/base.css">
<link rel="stylesheet" href="../css/index.css">
<!-- 引入样式 -->
<link rel="stylesheet" href="../css/element-ui.css">
<!-- 引入样式文件 -->
<link rel="stylesheet" href="../css/vant@4.css" />
<!-- 引入大屏内页公共样式 -->
<link rel="stylesheet" href="./static/css/public-detail.css" />
<!-- 先引入 Vue -->
<script src="../js/vue.min.js"></script>
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
<script src="../js/vue@2.6.14"></script>
<script src="../js/vant.min.js"></script>
<style>
</style>
</head>
<body style="background-image: url('../static/bg-img.png');background-size: 100% 100%;">
<div id="app">
<div class="fixed wp100 hv100" style="background-color: #000000;left: 0;top: 0;z-index: 1999;"
v-show="!isReady"></div>
<div style="height: 80px;">
<div class="flex-text color-theme f30 wp100 relative maxIndex fixed" style="height: 80px;">
<div class="flex-1"
style="background-image: url('../static/title-bg-left.png');background-size: 100% 100%;height: 80px;">
</div>
<div class="flex-text"
style="background-image: url('../static/title-bg-center.png');background-size: 100% 100%;height: 80px;">
<div style="margin-top: -10px;">{{selectedMine.name || ''}}</div>
</div>
<div class="flex-1"
style="background-image: url('../static/title-bg-right.png');background-size: 100% 100%;height: 80px;">
</div>
</div>
</div>
<div class="fixed flex-text maxIndex pointer" style="left: 30px;top: 45px;" @click="history.back()">
<img style="width: 24px;height: 24px;" src="../static/backPage.png" alt="">
<div class="f20 color-theme ml10">返回</div>
</div>
<div class="fixed flex-text maxIndex pointer" style="right: 30px;top: 45px;" @click="gotoManagement()">
<img style="width: 24px;height: 24px;" src="../static/backstage.png" alt="">
<div class="f20 color-theme ml10">后台管理</div>
</div>
<div class="flex-text ml10 mr10 mt15">
<div style="width: 490px;height: calc(100vh - 110px);">
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
<div class="mineInfo">
<p>矿山名称: {{selectedMine.name}}</p>
<p>矿山地址:{{selectedMine.address}}</p>
<p>联系人:{{selectedMine.liablePerson}}</p>
<p>联系方式:{{selectedMine.liablePersonPhone}}</p>
</div>
<div class="menuInfo">
<ul>
<li @click="changeMenu('video')" :class="{active: bigScreenDetailMenu==='video'}">视频监控</li>
<li @click="changeMenu('shape')" :class="{active: bigScreenDetailMenu==='shape'}">变形监测</li>
<li @click="changeMenu('temprate')" :class="{active: bigScreenDetailMenu==='temprate'}">温度监测
</li>
<li @click="changeMenu('wind')" :class="{active: bigScreenDetailMenu==='wind'}">风速监测</li>
<li @click="changeMenu('water')" :class="{active: bigScreenDetailMenu==='water'}">降水监测</li>
<li @click="changeMenu('people')" :class="{active: bigScreenDetailMenu==='people'}">人员定位
</li>
</ul>
</div>
</div>
<!-- 视频监控列表 -->
<div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);">
<section>
<div class="list-wrapper" v-show="showMenu4bianpo">
<div class="list-item" :class="{active: item.equipNo===currentSensorId}" v-for="(item, index) in sensorLIst" @click="changeSensor(item)"><i
class="el-icon-caret-right"></i><span>{{item.equipName}}</span></div>
</div>
</section>
</div>
</div>
<div class="flex-1 ml15 flex-text flex-column ovh"
style="height: calc(100vh - 110px); justify-content: space-between">
<!-- 视频监控 -->
<div class="wp100 relative">
<!-- 井下24小时人数变化趋势 -->
<div class="wp100">
<div class="relative">
<el-date-picker style="width: 350px !important;" v-model="createTime" type="datetimerange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker>
</div>
<div class="mt5" id="line" style="width: 100%;height:400px;"></div>
</div>
<!-- video end -->
</div>
<div class="flex-text wp100">
<!-- 视频ai报警 列表 -->
<div class="flex-1 ml15 ovh tableList">
<div class="h44 f18 flex-text"
style="background: linear-gradient(to bottom, rgba(171,238,255,.15), rgba(171,238,255,.3));border-bottom: 1px solid #abeeff;">
<div class="text-center" style="width: 50%;">监测时间</div>
<div class="text-center" style="width: 50%;">温度(°C)</div>
</div>
<div class="" style="height: 300px;overflow-y: scroll;">
<div class="h44 color-theme flex-text f17 ovh bg-list-item"
:class="'bg-list-' + (index % 2)" :style="{ marginTop: index == 0 ? '' : '2px' }"
v-for="(item,index) in tableList" :key="index">
<div class="text-center" style="width: 50%;">{{ item.time }}</div>
<div class="text-center" style="width: 50%;">{{ item.dispx }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<!-- 引入echarts -->
<script src="../js/echarts.min.js"></script>
<script src="../js/echarts-gl.js"></script>
<!-- 引入组件库 -->
<script src="../js/element-ui.js"></script>
<!-- axios -->
<script src="../js/axios.min.js"></script>
<!-- cookie -->
<script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js -->
<!-- <script src="./static/js/public-detail.js"></script> -->
<script>
let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host;
const token = Cookies.get('ELADMIN-TOEKN');
const Axiosx = axios.create({
headers: { 'Authorization': token }
});
Axiosx.interceptors.response.use(
response => {
return response
}, error => {
console.error(error)
let code = 0
try {
code = error.response.data.status
} catch (e) {
if (error.toString().indexOf('Error: timeout') !== -1) {
console.error('当前网络不佳')
return
}
}
if (!code) {
console.error('当前网络不佳')
return
}
if (code === 401) {
alert('登录信息失效,请重新登录')
window.open(host + '/#/login', '_self')
return
}
if (code === 400) {
alert('您没有权限使用此功能,请联系管理员开通')
return
}
}
);
const host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013';
const selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host;
// 请求 token 用
const request = axios.create({});
request.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
var map; // 地图
new Vue({
el: '#app',
data() {
return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐
showMenu4bianpo: true,
sensorLIst: [],
currentSensorId: '',
showMenu4weikuangku: true,
showMenu4chenjiang: true,
showMenu4diya: true,
// 菜单折叠显隐 - 结束
createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '',
selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据
tableList: []
}
},
mounted() {
if (!token) {
window.open(host + '/#/login', '_self')
return
}
this.bigScreenDetailMenu = window.localStorage.getItem('bigScreenDetailMenu')
// 当前矿山
const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
let noMine = false
if (!selectedMineJson) {
noMine = true
} else {
const selectedMine = JSON.parse(selectedMineJson)
// if (!selectedMine || selectedMine.enterpriseId !== this.user.enterpriseId) {
// noMine = true
// } else {
this.selectedMine = selectedMine
// }
}
// this.getCharts();
// this.getChartsData()
this.getSensorList(() => {
});
this.getTableList();
// this.getChartsData();
},
watch: {
createTime() {
this.getChartsData()
}
},
methods: {
changeSensor(item) {
this.currentSensorId = item.equipNo
this.getTableList()
this.getChartsData();
},
getSensorList(fn) {
// 视频列表
Axiosx.get(host + '/data/sz/sensorList/shi', {
params: {
enterpriseId: this.selectedMine.id,
}
}).then(res => {
this.sensorLIst = res.data.body || [];
if (this.sensorLIst.length) {
this.currentSensorId = this.sensorLIst[0].equipNo
}
console.log('sdfsdf', res)
// fn && fn()
});
this.isReady = true
},
getTableList() {
// 视频列表
Axiosx.get(host + '/data/sz/historyInside/shi', {
params: {
code: this.currentSensorId,
}
}).then(res => {
this.tableList = res.data.body || [];
console.log('sdfsdf', res)
});
},
menuChange(type) {
['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => {
if (item === type) {
this[type] = !this[type]
} else {
this[item] = false
}
})
},
getChartsData() {
const yAxisOption = {
name: "人数",
type: "line",
smooth: true,
data: [],
itemStyle: {
color: '#6dd1b9'
},
markLine: {
silent: true,
data: [
{ name: '最高值', yAxis: 400 },
{ name: '最低值', yAxis: -50 }
],
lineStyle: {
color: 'red', // 警戒线颜色
type: 'solid' // 警戒线样式
}
}
}
var chartsOption = {
legend: {
textStyle: {
color: '#fff', // 设置字体颜色
fontSize: 14 // 设置字体大小
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
xAxis: {
data: [],
axisLine: { lineStyle: { color: '#a3e4f5' } },
axisTick: { show: false }
},
yAxis: {
name: 'Precipitation',
splitLine: { show: false },
axisLabel: { textStyle: { color: '#a3e4f5' } }
},
grid: { right: 45, top: 10, left: 40, bottom: 25 },
dataZoom: [
{
type: "slider",
show: false,
startValue: 14,
endValue: 23, // 一次性展示9个
textStyle: { color: "#ffffff" },
height: 0,
zoomLock: true, // 是否只平移不缩放
},
{
type: "inside", //内置型数据区域缩放组件
moveOnMouseMove: true // 开启鼠标移动窗口平移
}
],
series: [yAxisOption]
}
var loading = this.$loading({
lock: true,
text: '加载中',
// spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
// 视频列表
Axiosx.get(host + '/data/sz/imghistory/shi', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
}
}).then(res => {
const result = res.data.body;
if (result) {
chartsOption.xAxis.data = result.xData.data
chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption));
tempObj.data = item.data
tempObj.name = item.name
tempObj.markLine.data = item.alarm
return tempObj
})
console.log('chartsOption', chartsOption)
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById("line"));
myChart.setOption(chartsOption)
}
});
loading && loading.close();
this.isReady = true
},
changeMenu(menuName) {
localStorage.setItem('bigScreenDetailMenu', menuName)
this.bigScreenDetailMenu = menuName
},
getAccessToken(appKey, appSecret) {
var dataJson = 'appKey=' + appKey + '&appSecret=' + appSecret;
return request.post("/ys7com", dataJson).then(res => {
var data = res.data || {};
if (data['code'] == '200') {
return data['data']['accessToken']
} else {
return null
}
}).catch(err => {
console.log(err);
return err
})
},
},
})
</script>
</html>
\ No newline at end of file
...@@ -96,6 +96,11 @@ section .list-item { ...@@ -96,6 +96,11 @@ section .list-item {
cursor: pointer; cursor: pointer;
} }
section .list-item.active{
color: #0fd1eb;
}
section .list-item span { section .list-item span {
margin-left: 10px; margin-left: 10px;
} }
......
...@@ -56,15 +56,8 @@ ...@@ -56,15 +56,8 @@
<div class="flex-text ml10 mr10 mt15"> <div class="flex-text ml10 mr10 mt15">
<div style="width: 490px;height: calc(100vh - 110px);"> <div style="width: 490px;height: calc(100vh - 110px);">
<!-- 通知公告 -->
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));"> <div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
<!-- <div class="h50 flex-text pointer"
style="background: linear-gradient(to bottom, rgba(171,238,255,0), rgba(171,238,255,.2));border-bottom: 1px solid rgba(171,238,255,.5);">
<div class="flex-1" v-if="isReady">
<van-notice-bar background="none" left-icon="volume-o" color="#ffffff" :speed="80"
:text="notice.title" @click="noticeMask = true" />
</div>
</div> -->
<div class="mineInfo"> <div class="mineInfo">
<p>矿山名称: {{selectedMine.name}}</p> <p>矿山名称: {{selectedMine.name}}</p>
<p>矿山地址:{{selectedMine.address}}</p> <p>矿山地址:{{selectedMine.address}}</p>
...@@ -89,49 +82,11 @@ ...@@ -89,49 +82,11 @@
<!-- 视频监控列表 --> <!-- 视频监控列表 -->
<div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);"> <div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);">
<section> <section>
<div class="header" @click="menuChange('showMenu4bianpo')">
<i class="el-icon-caret-bottom" v-show="showMenu4bianpo"></i>
<i class="el-icon-caret-right" v-show="!showMenu4bianpo"></i>
<span>边坡监测</span>
</div>
<div class="list-wrapper" v-show="showMenu4bianpo"> <div class="list-wrapper" v-show="showMenu4bianpo">
<div class="list-item" v-for="(item, index) in sensorLIst" @click="changeSensor(item)"><i <div class="list-item" :class="{active: item.equipNo===currentSensorId}" v-for="(item, index) in sensorLIst" @click="changeSensor(item)"><i
class="el-icon-caret-right"></i><span>{{item.equipName}}</span></div> class="el-icon-caret-right"></i><span>{{item.equipName}}</span></div>
</div> </div>
</section> </section>
<section>
<div class="header" @click="menuChange('showMenu4weikuangku')">
<i class="el-icon-caret-bottom" v-show="showMenu4weikuangku"></i>
<i class="el-icon-caret-right" v-show="!showMenu4weikuangku"></i>
<span>尾矿库监测</span>
</div>
<div class="list-wrapper" v-show="showMenu4weikuangku">
<div class="list-item"><i class="el-icon-caret-right"></i><span>xxxxx监测点</span></div>
</div>
</section>
<section>
<div class="header" @click="menuChange('showMenu4chenjiang')">
<i class="el-icon-caret-bottom" v-show="showMenu4chenjiang"></i>
<i class="el-icon-caret-right" v-show="!showMenu4chenjiang"></i>
<span>沉降监测</span>
</div>
<div class="list-wrapper" v-show="showMenu4chenjiang">
<div class="list-item"><i class="el-icon-caret-right"></i><span>xxxxx监测点</span></div>
</div>
</section>
<section>
<div class="header" @click="menuChange('showMenu4diya')">
<i class="el-icon-caret-bottom" v-show="showMenu4diya"></i>
<i class="el-icon-caret-right" v-show="!showMenu4diya"></i>
<span>边坡监测</span>
</div>
<div class="list-wrapper" v-show="showMenu4diya">
<div class="list-item"><i class="el-icon-caret-right"></i><span>xxxxx监测点</span></div>
</div>
</section>
</div> </div>
</div> </div>
...@@ -157,21 +112,15 @@ ...@@ -157,21 +112,15 @@
<div class="flex-1 ml15 ovh tableList"> <div class="flex-1 ml15 ovh tableList">
<div class="h44 f18 flex-text" <div class="h44 f18 flex-text"
style="background: linear-gradient(to bottom, rgba(171,238,255,.15), rgba(171,238,255,.3));border-bottom: 1px solid #abeeff;"> style="background: linear-gradient(to bottom, rgba(171,238,255,.15), rgba(171,238,255,.3));border-bottom: 1px solid #abeeff;">
<div class="text-center" style="width: 20%;">监测时间</div> <div class="text-center" style="width: 50%;">监测时间</div>
<div class="text-center" style="width: 20%;">X位移</div> <div class="text-center" style="width: 50%;">温度(°C)</div>
<div class="text-center" style="width: 20%;">Y位移</div>
<div class="text-center" style="width: 20%;">Z位移</div>
<div class="text-center" style="width: 20%;">总变化量</div>
</div> </div>
<div class="" style="height: 300px;overflow-y: scroll;"> <div class="" style="height: 300px;overflow-y: scroll;">
<div class="h44 color-theme flex-text f17 ovh bg-list-item" <div class="h44 color-theme flex-text f17 ovh bg-list-item"
:class="'bg-list-' + (index % 2)" :style="{ marginTop: index == 0 ? '' : '2px' }" :class="'bg-list-' + (index % 2)" :style="{ marginTop: index == 0 ? '' : '2px' }"
v-for="(item,index) in tableList" :key="index"> v-for="(item,index) in tableList" :key="index">
<div class="text-center" style="width: 20%;">{{ item.time }}</div> <div class="text-center" style="width: 50%;">{{ item.time }}</div>
<div class="text-center" style="width: 20%;">{{ item.dispx }}</div> <div class="text-center" style="width: 50%;">{{ item.dispx }}</div>
<div class="text-center" style="width: 20%;">{{ item.dispy }}</div>
<div class="text-center" style="width: 20%;">{{ item.disph }}</div>
<div class="text-center" style="width: 20%;">{{ item.value }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -266,13 +215,6 @@ ...@@ -266,13 +215,6 @@
} }
}, },
mounted() { mounted() {
for (var i = 0; i < 10; i++) {
this.tableList.push({
videoName: 'sdfksdfxxxxx',
warnTypeName: '扣税的交流方',
warnDatetime: 'ksdlfsdf'
})
}
if (!token) { if (!token) {
window.open(host + '/#/login', '_self') window.open(host + '/#/login', '_self')
return return
...@@ -291,16 +233,6 @@ ...@@ -291,16 +233,6 @@
this.selectedMine = selectedMine this.selectedMine = selectedMine
// } // }
} }
if (noMine) {
alert('您当前还未选择矿山,请先选择矿山再查看此大屏')
window.history.go(-1)
return
}
if (this.selectedMine.mineType != 2) {
alert('您当前选择的不是露天矿山,请先选择露天矿山,再查看此大屏')
window.history.go(-1)
return
}
// this.getCharts(); // this.getCharts();
// this.getChartsData() // this.getChartsData()
...@@ -325,7 +257,7 @@ ...@@ -325,7 +257,7 @@
}, },
getSensorList(fn) { getSensorList(fn) {
// 视频列表 // 视频列表
Axiosx.get(host + '/data/mp/sensorList', { Axiosx.get(host + '/data/sz/sensorList/wen', {
params: { params: {
enterpriseId: this.selectedMine.id, enterpriseId: this.selectedMine.id,
} }
...@@ -342,7 +274,7 @@ ...@@ -342,7 +274,7 @@
}, },
getTableList() { getTableList() {
// 视频列表 // 视频列表
Axiosx.get(host + '/data/mp/historyInside', { Axiosx.get(host + '/data/sz/historyInside/wen', {
params: { params: {
code: this.currentSensorId, code: this.currentSensorId,
} }
...@@ -437,7 +369,7 @@ ...@@ -437,7 +369,7 @@
// 视频列表 // 视频列表
Axiosx.get(host + '/data/mp/imghistory', { Axiosx.get(host + '/data/sz/imghistory/wen', {
params: { params: {
code: this.currentSensorId, code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : '' daterange: this.createTime ? this.createTime.join(',') : ''
......
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,user-scalable=no" />
...@@ -18,8 +19,8 @@ ...@@ -18,8 +19,8 @@
<!-- 引入 Vue 和 Vant 的 JS 文件 --> <!-- 引入 Vue 和 Vant 的 JS 文件 -->
<script src="../js/vue@2.6.14"></script> <script src="../js/vue@2.6.14"></script>
<script src="../js/vant.min.js"></script> <script src="../js/vant.min.js"></script>
<style>
<style>
</style> </style>
</head> </head>
...@@ -48,14 +49,20 @@ ...@@ -48,14 +49,20 @@
<div class="f20 color-theme ml10">返回</div> <div class="f20 color-theme ml10">返回</div>
</div> </div>
<div class="fixed flex-text maxIndex pointer" style="right: 30px;top: 45px;" @click="gotoManagement()">
<img style="width: 24px;height: 24px;" src="../static/backstage.png" alt="">
<div class="f20 color-theme ml10">后台管理</div>
</div>
<div class="flex-text ml10 mr10 mt15"> <div class="flex-text ml10 mr10 mt15">
<div style="width: 490px;height: calc(100vh - 110px);"> <div style="width: 490px;height: calc(100vh - 110px);">
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));"> <div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
<div class="mineInfo"> <div class="mineInfo">
<p>矿山名称: 淄博红圈石料厂</p> <p>矿山名称: {{selectedMine.name}}</p>
<p>矿山地质:谁看得见风离开世界的副卡时刻记得发</p> <p>矿山地址:{{selectedMine.address}}</p>
<p>联系人:开始对</p> <p>联系人:{{selectedMine.liablePerson}}</p>
<p>联系方式:xxx</p> <p>联系方式:{{selectedMine.liablePersonPhone}}</p>
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
...@@ -71,19 +78,21 @@ ...@@ -71,19 +78,21 @@
</div> </div>
</div> </div>
<!-- 视频监控列表 -->
<div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);"> <div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);">
<section> <section>
<div class="list-wrapper" v-show="showMenu4bianpo"> <div class="list-wrapper" v-show="showMenu4bianpo">
<div class="list-item"><i class="el-icon-caret-right"></i><span class="ml10">xxxxx监测点</span></div> <div class="list-item" :class="{active: item.equipNo===currentSensorId}" v-for="(item, index) in sensorLIst" @click="changeSensor(item)"><i
<div class="list-item"><i class="el-icon-caret-right"></i><span class="ml10">xxxxx监测点</span></div> class="el-icon-caret-right"></i><span>{{item.equipName}}</span></div>
<div class="list-item"><i class="el-icon-caret-right"></i><span class="ml10">xxxxx监测点</span></div>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
<div class="flex-1 ml15 flex-text flex-column ovh" style="height: calc(100vh - 110px); justify-content: space-between"> <div class="flex-1 ml15 flex-text flex-column ovh"
style="height: calc(100vh - 110px); justify-content: space-between">
<!-- 视频监控 --> <!-- 视频监控 -->
<div class="wp100 relative"> <div class="wp100 relative">
<!-- 井下24小时人数变化趋势 --> <!-- 井下24小时人数变化趋势 -->
...@@ -93,20 +102,6 @@ ...@@ -93,20 +102,6 @@
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right"> range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker> </el-date-picker>
</div> </div>
<div class="flex-text" style="height: 0px;">
<div class="flex-text">
<div class="round" style="width: 10px;height: 10px;background-color: #6dd1b9;"></div>
<div class="color-theme ml10 f14">井下人数</div>
</div>
<div class="flex-text ml20">
<div class="round" style="width: 10px;height: 10px;background-color: #fca83b;"></div>
<div class="color-theme ml10 f14">入井</div>
</div>
<div class="flex-text ml20 mr15">
<div class="round" style="width: 10px;height: 10px;background-color: #0a9fca;"></div>
<div class="color-theme ml10 f14">出井</div>
</div>
</div>
<div class="mt5" id="line" style="width: 100%;height:400px;"></div> <div class="mt5" id="line" style="width: 100%;height:400px;"></div>
</div> </div>
<!-- video end --> <!-- video end -->
...@@ -121,19 +116,17 @@ ...@@ -121,19 +116,17 @@
<div class="text-center" style="width: 50%;">风速(m/s)</div> <div class="text-center" style="width: 50%;">风速(m/s)</div>
</div> </div>
<div class="" style="height: 300px;overflow-y: scroll;"> <div class="" style="height: 300px;overflow-y: scroll;">
<div class="h44 color-theme flex-text f17 ovh bg-list-item" :class="'bg-list-' + (index % 2)" <div class="h44 color-theme flex-text f17 ovh bg-list-item"
:style="{ marginTop: index == 0 ? '' : '2px' }" v-for="(item,index) in aiList" :class="'bg-list-' + (index % 2)" :style="{ marginTop: index == 0 ? '' : '2px' }"
:key="index"> v-for="(item,index) in tableList" :key="index">
<div class="text-center" style="width: 50%;">{{ item.warnDatetime }}</div> <div class="text-center" style="width: 50%;">{{ item.time }}</div>
<div class="text-center" style="width: 50%;">{{ item.warnDatetime }}</div> <div class="text-center" style="width: 50%;">{{ item.dispx }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
...@@ -147,9 +140,9 @@ ...@@ -147,9 +140,9 @@
<script src="../js/axios.min.js"></script> <script src="../js/axios.min.js"></script>
<!-- cookie --> <!-- cookie -->
<script src="../js/js.cookie.js"></script> <script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js -->
<script src="./static/js/public-detail.js"></script>
<!-- 详情内页公用js -->
<!-- <script src="./static/js/public-detail.js"></script> -->
<script> <script>
let jessibucaPlayer = {}; let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host; //const host = location.protocol + '//' + window.location.host;
...@@ -180,51 +173,48 @@ ...@@ -180,51 +173,48 @@
window.open(host + '/#/login', '_self') window.open(host + '/#/login', '_self')
return return
} }
if (code === 400 && message === '不允许访问') { if (code === 400) {
alert('您没有权限使用此功能,请联系管理员开通') alert('您没有权限使用此功能,请联系管理员开通')
return return
} }
} }
); );
const host = location.protocol + '//' + (location.hostname === '192.168.3.226' ? '192.168.3.37' : '192.168.13.200') + ':8013'; const host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013';
const selfHost = location.hostname === '192.168.3.226' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host; const selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host;
// 请求 token 用 // 请求 token 用
const request = axios.create({}); const request = axios.create({});
request.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; request.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
var map; // 地图 var map; // 地图
new Vue({ new Vue({
el: '#app', el: '#app',
data() { data() {
return { return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐 // 菜单折叠显隐
showMenu4bianpo: true, showMenu4bianpo: true,
sensorLIst: [],
currentSensorId: '',
showMenu4weikuangku: true, showMenu4weikuangku: true,
showMenu4chenjiang: true, showMenu4chenjiang: true,
showMenu4diya: true, showMenu4diya: true,
// 菜单折叠显隐 - 结束 // 菜单折叠显隐 - 结束
createTime: '', createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '', bigScreenDetailMenu: '',
selectedMine: {}, selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据 // 表格数据
aiList: [] tableList: []
} }
}, },
mounted() { mounted() {
for(var i=0; i<10; i++){
this.aiList.push({
videoName:'sdfksdfxxxxx',
warnTypeName: '扣税的交流方',
warnDatetime: 'ksdlfsdf'
})
}
if (!token) { if (!token) {
window.open(host + '/#/login', '_self') window.open(host + '/#/login', '_self')
return return
...@@ -243,36 +233,57 @@ ...@@ -243,36 +233,57 @@
this.selectedMine = selectedMine this.selectedMine = selectedMine
// } // }
} }
if (noMine) { // this.getCharts();
alert('您当前还未选择矿山,请先选择矿山再查看此大屏') // this.getChartsData()
window.history.go(-1)
return this.getSensorList(() => {
});
this.getTableList();
// this.getChartsData();
},
watch: {
createTime() {
this.getChartsData()
} }
if (this.selectedMine.mineType != 2) { },
alert('您当前选择的不是露天矿山,请先选择露天矿山,再查看此大屏') methods: {
window.history.go(-1) changeSensor(item) {
return this.currentSensorId = item.equipNo
this.getTableList()
this.getChartsData();
},
getSensorList(fn) {
// 视频列表
Axiosx.get(host + '/data/sz/sensorList/feng', {
params: {
enterpriseId: this.selectedMine.id,
}
}).then(res => {
this.sensorLIst = res.data.body || [];
if (this.sensorLIst.length) {
this.currentSensorId = this.sensorLIst[0].equipNo
} }
this.getData(); console.log('sdfsdf', res)
// fn && fn()
});
this.isReady = true
},
getTableList() {
// 视频列表 // 视频列表
Axiosx.get(host + '/api/video-mine/mineId', { Axiosx.get(host + '/data/sz/historyInside/feng', {
params: { params: {
//mineType: this.selectedMine.mineType, code: this.currentSensorId,
mineId: this.selectedMine.id,
} }
}).then(res => { }).then(res => {
res = res.data.body; this.tableList = res.data.body || [];
this.info = { console.log('sdfsdf', res)
appKey: res.appKey,
appSecret: res.appSecret,
};
this.videos = res.videoChannelList || [];
this.createVideo(res.videoChannelList[0]);
}); });
}, },
methods: {
menuChange(type) { menuChange(type) {
['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => { ['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => {
if (item === type) { if (item === type) {
...@@ -283,29 +294,45 @@ ...@@ -283,29 +294,45 @@
}) })
}, },
async getData(e) { getChartsData() {
var loading const yAxisOption = {
if (!e) { name: "人数",
loading = this.$loading({ type: "line",
lock: true, smooth: true,
text: '加载中', data: [],
// spinner: 'el-icon-loading', itemStyle: {
background: 'rgba(0, 0, 0, 0.7)' color: '#6dd1b9'
}); },
markLine: {
silent: true,
data: [
{ name: '最高值', yAxis: 400 },
{ name: '最低值', yAxis: -50 }
],
lineStyle: {
color: 'red', // 警戒线颜色
type: 'solid' // 警戒线样式
} }
}
// 模拟请求 }
setTimeout(() => { var chartsOption = {
setTimeout(() => this.getData('refesh'), 5000); legend: {
textStyle: {
// 曲线图 color: '#fff', // 设置字体颜色
// 基于准备好的dom,初始化echarts实例 fontSize: 14 // 设置字体大小
var myChart = echarts.init(document.getElementById("line")); }
myChart.clear() // 定时刷新 实际不刷新 演示用 },
// 绘制图表 tooltip: {
myChart.setOption({ trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
xAxis: { xAxis: {
data: ["01时", "02时", "03时", "04时", "05时", "06时", "07时", "08时", "09时", "10时", "11时", "12时", "13时", "14时", "15时", "16时", "17时", "18时", "19时", "20时", "21时", "22时", "23时", "24时"], data: [],
axisLine: { lineStyle: { color: '#a3e4f5' } }, axisLine: { lineStyle: { color: '#a3e4f5' } },
axisTick: { show: false } axisTick: { show: false }
}, },
...@@ -314,23 +341,7 @@ ...@@ -314,23 +341,7 @@
splitLine: { show: false }, splitLine: { show: false },
axisLabel: { textStyle: { color: '#a3e4f5' } } axisLabel: { textStyle: { color: '#a3e4f5' } }
}, },
yAxis22: [ grid: { right: 45, top: 10, left: 40, bottom: 25 },
{
type: 'value',
name: 'Precipitation',
interval: 40,
splitLine: { show: false },
axisLabel: {
textStyle: { color: '#a3e4f5' }
},
nameTextStyle: {
color: '#a3e4f5', // 设置 Y 轴标题颜色为红色
fontSize: 16
},
},
],
grid: { right: 15, top: 10, left: 40, bottom: 25 },
dataZoom: [ dataZoom: [
{ {
type: "slider", type: "slider",
...@@ -346,41 +357,45 @@ ...@@ -346,41 +357,45 @@
moveOnMouseMove: true // 开启鼠标移动窗口平移 moveOnMouseMove: true // 开启鼠标移动窗口平移
} }
], ],
series: [ series: [yAxisOption]
{
name: "人数",
type: "line",
smooth: true,
data: [180, 210, 150, 280, 235, 500, 390, 410, 150, 180, 210, 150, 280, 235, 500, 390, 410, 150, 180, 210, 150, 280, 235, 500],
itemStyle: {
color: '#6dd1b9'
}
},
{
name: "人数",
type: "line",
smooth: true,
data: [60, 90, 80, 100, 60, 65, 45, 50, 48, 60, 90, 80, 100, 60, 65, 45, 50, 48, 60, 90, 80, 100, 60, 65],
itemStyle: {
color: '#0a9fca'
} }
}, var loading = this.$loading({
{ lock: true,
name: "人数", text: '加载中',
type: "line", // spinner: 'el-icon-loading',
smooth: true, background: 'rgba(0, 0, 0, 0.7)'
data: [55, 48, 40, 60, 50, 55, 58, 63, 50, 55, 48, 40, 60, 50, 55, 58, 63, 50, 55, 48, 40, 60, 50, 55], });
itemStyle: {
color: '#fca83b'
// 视频列表
Axiosx.get(host + '/data/sz/imghistory/feng', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
} }
}).then(res => {
const result = res.data.body;
if (result) {
chartsOption.xAxis.data = result.xData.data
chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption));
tempObj.data = item.data
tempObj.name = item.name
tempObj.markLine.data = item.alarm
return tempObj
})
console.log('chartsOption', chartsOption)
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById("line"));
myChart.setOption(chartsOption)
} }
]
}); });
loading && loading.close(); loading && loading.close();
this.isReady = true this.isReady = true
}, 800);
}
}, },
changeMenu(menuName) { changeMenu(menuName) {
...@@ -401,11 +416,6 @@ ...@@ -401,11 +416,6 @@
return err return err
}) })
}, },
create() {
let options = {};
console.log("hasAudio " + this.hasAudio)
}, },
}) })
</script> </script>
......
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