Commit db002bc2 authored by lei's avatar lei

add:银洞接口联调

parent 9d38b960
# 页面标题
VUE_APP_TITLE = 银洞桐柏自动化
VUE_APP_TITLE = 桐柏银洞坡金矿自动化
# 开发环境端口
port = 7777
......@@ -14,5 +14,6 @@ VUE_APP_BASE_API = '/dev-api'
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 开发环境的后端接口地址
VUE_APP_API_TARGET = http://192.168.2.16:9091
#VUE_APP_API_TARGET = http://192.168.2.16:9091
VUE_APP_API_TARGET = http://192.168.2.13:9091
# VUE_APP_API_TARGET = http://localhost:8080
\ No newline at end of file
# 页面标题
VUE_APP_TITLE = 银洞桐柏自动化
VUE_APP_TITLE = 桐柏银洞坡金矿自动化
# 生产环境端口
port = 7777
......
......@@ -12,7 +12,7 @@ export function listHoistSelectData(query) {
// 查询提升机历史数据列表
export function queryHoistHisData(query) {
return request({
url: '/business/elevator/history/query',
url: '/business/elevator/history/record',
method: 'get',
params: query
})
......
......@@ -6,7 +6,7 @@
height="1080"
:fullScreen="true"
>
<home
<!-- <home
v-if="showMenu === 0"
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0"
></home>
......@@ -34,7 +34,14 @@
<hjjc
v-if="showMenu === 2"
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0"
></hjjc>
></hjjc> -->
<keep-alive>
<component
:is="currentComponent"
:key="currentComponent"
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0"
/>
</keep-alive>
<div class="container" style="pointer-events: none">
<!-- 头部 -->
<div class="header por" style="pointer-events: auto"></div>
......@@ -172,6 +179,20 @@ export default {
return;
},
},
computed: {
currentComponent() {
const componentMap = {
0: "home",
1: "rydw",
2: "hjjc",
3: "psxt",
4: "tsj",
5: "tfxt", // 匹配通风系统组件
6: "dlxt",
};
return componentMap[this.showMenu];
},
},
};
</script>
<style lang="scss" scoped>
......
......@@ -23,7 +23,10 @@
<span>{{ item.dgname }}</span>
</p>
<div class="dlxt-list" :class="`dlxt-list${index + 1}`">
<p v-for="param in item.dataList" :key="param.name">
<p
v-for="param in item.dataList"
:key="param.name + 'param.value'"
>
<span>{{ param.name }}</span
>:<span>{{ param.value }}</span
><span>{{ param.unit }}</span>
......@@ -61,7 +64,7 @@
class="for-box"
:class="`pos${index + 1}`"
v-for="(item, index) in dgList"
:key="index"
:key="index + 'for-box'"
>
<div class="for-box-content"></div>
<div class="for-box-tit">
......@@ -1225,22 +1228,28 @@ export default {
this.init();
},
mounted() {
// 初始化定时器
// // 初始化定时器
// this.timer = setInterval(() => {
// this.init();
// }, 10000);
},
activated() {
// 组件激活时
this.timer = setInterval(() => {
this.init();
}, 10000);
},
beforeDestroy() {
// 组件销毁前清除定时器
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
this.clearTimer();
},
deactivated() {
// 组件离开时
this.clearTimer();
},
methods: {
init() {
this.getdata(this.showBtn - 1);
this.getTemperAndHumidityData(this.showBtn - 1);
},
getdata(index = 0) {
updateSelectEleHistoryData({ name: this.statusNames[index].name })
......@@ -1320,6 +1329,12 @@ export default {
this.showBtn = index;
this.getdata(index - 1);
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
},
};
</script>
......
......@@ -880,6 +880,8 @@ export default {
},
// 初始化eChartDOM
initEchartBox(id, xData = [], yData = [], mkData = 28, step = 4, grid) {
let maxData = yData.length ? Math.ceil(Math.max(...yData)) : 0;
let minData = yData.length ? Math.floor(Math.min(...yData)) : 0; // 添加向下取整
let myChart = null;
myChart = echarts.init(document.getElementById(id));
let option = {
......@@ -911,7 +913,8 @@ export default {
},
yAxis: {
type: "value",
max: 50,
max: maxData,
min: minData,
boundaryGap: false,
axisTick: {
alignWithLabel: true,
......
......@@ -25,8 +25,8 @@ export default {
latitude: 32.54756929901858,
height: 35,
des: {
name: "电所",
height: 100,
name: "35变电所",
height: 550,
},
},
{
......@@ -34,8 +34,8 @@ export default {
latitude: 32.5467314676447,
height: 40,
des: {
name: "西矿厂",
height: 300,
name: "矿厂",
height: 350,
},
},
{
......@@ -44,7 +44,34 @@ export default {
height: 40,
des: {
name: "办公楼",
height: 300,
height: 450,
},
},
{
longitude: 113.41589577353257,
latitude: 32.55852021801037,
height: 89,
des: {
name: "小高尖",
height: 450,
},
},
{
longitude: 113.42033472323261,
latitude: 32.55511520736364,
height: 99,
des: {
name: "中央井",
height: 1450,
},
},
{
longitude: 113.42321929988399,
latitude: 32.55311983314357,
height: 60,
des: {
name: "东风井",
height: 1450,
},
},
],
......@@ -71,16 +98,19 @@ export default {
this.viewer.cesiumWidget.creditContainer.style.display = "none";
// 加载3D Tileset
Cesium.Cesium3DTileset.fromUrl("/terra_b3dms_yd/tileset.json", {
maximumScreenSpaceError: 1,
pickable: true,
})
Cesium.Cesium3DTileset.fromUrl(
"http://192.168.2.188:80/terra_b3dms_yd/tileset.json",
{
maximumScreenSpaceError: 1,
pickable: true,
}
)
.then((tileset) => {
this.tileset = tileset; // 存储tileset供后续使用
this.viewer.scene.primitives.add(tileset);
// 调整模型高度
var heightOffset = -230;
var heightOffset = -250;
var boundingSphere = tileset.boundingSphere;
var cartographic = Cesium.Cartographic.fromCartesian(
boundingSphere.center
......
......@@ -138,6 +138,7 @@
</div>
</div>
</div>
<div class="example"></div>
<pool style="position: absolute; top: 195px; left: 793px"></pool>
<pool style="position: absolute; top: 580px; left: 793px"></pool>
<pool style="position: absolute; top: 962px; left: 795px"></pool>
......@@ -173,12 +174,27 @@ export default {
created() {
this.initPumpList();
},
mounted() {
// 初始化定时器
activated() {
// 激活时启动定时器
this.timer = setInterval(() => {
this.initPumpList();
}, 10000);
},
deactivated() {
// 停用时清除定时器(使用可选链操作符)
if (this.timer) {
clearInterval(this.timer);
this.timer = null; // 必须重置为null
}
},
beforeDestroy() {
// 双重保障清除
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
mounted() {},
methods: {
initPumpList() {
getDraData().then((res) => {
......@@ -604,7 +620,14 @@ export default {
}
}
}
.example {
width: 1070px;
height: 921px;
position: absolute;
left: 50%;
margin-left: -50px;
background: #00deff;
}
@keyframes wave {
0% {
background-position-x: 0;
......
......@@ -316,7 +316,7 @@ import {
monthlyRankings,
} from "@/api/tyler/screen";
export default {
name: "cockpit",
name: "rydw",
data() {
return {
dialogTableVisible: false,
......@@ -423,21 +423,30 @@ export default {
this.perStationInfoList();
this.getrydwMidStation();
this.getMonthlyRankings();
// 初始化定时器
this.timer = setInterval(() => {
this.perStationInfoList();
this.subStationObj();
}, 10000);
},
activated() {
this.startTimer();
},
deactivated() {
this.clearTimer();
},
beforeDestroy() {
this.clearAnimation();
if (this.timer) {
clearInterval(this.timer);
this.timer = null; // 新增清理引用
}
this.clearTimer();
},
methods: {
startTimer() {
this.timer = setInterval(() => {
this.perStationInfoList();
this.subStationObj();
this.getMonthlyRankings();
}, 10000);
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
//当月人员下井次数排行榜数据
getMonthlyRankings() {
monthlyRankings().then((res) => {
......
......@@ -19,7 +19,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -109,7 +109,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -168,7 +168,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -285,7 +285,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -361,7 +361,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -403,7 +403,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -479,7 +479,7 @@
<div class="fengji-control">
<div
class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'"
:class="fengjiIconClass[Number(item.fanRunStatus)]"
></div>
<div
class="fengji-lamp"
......@@ -529,6 +529,10 @@
</div>
</div>
</div>
<div class="example-window" v-show="exampleWindow">
<i class="el-icon-close close-button" @click="exampleWindow = false"></i>
</div>
<div class="example" @click="exampleWindow = true"></div>
</div>
</template>
......@@ -550,6 +554,12 @@ export default {
windowTitle: "", // 新增标题字段
currentDevice: null, // 新增当前设备字段
timer: null, // 新增定时器引用
exampleWindow: false,
fengjiIconClass: {
1: "runing",
2: "runingopps",
3: "",
},
};
},
computed: {},
......@@ -577,6 +587,8 @@ export default {
});
},
remoteControl(item) {
console.log(item);
this.upWindowShow = true;
this.windowTitle = `${item.deviceName}远程操作`; // 直接设置数据
this.currentDevice = item; // 保存当前设备信息
......@@ -627,7 +639,7 @@ export default {
background: url("~@/assets/images/screen/tfxt/bg.png") no-repeat center;
padding-top: 100px;
pointer-events: auto;
position: relative;
.content {
width: 100%;
height: 100%;
......@@ -681,6 +693,18 @@ export default {
}
}
}
&.runingopps {
//需要这个元素做旋转动画,围着自身圆心一直旋转
animation: rotateOpposite 2s linear infinite;
@keyframes rotateOpposite {
from {
transform: rotate(0deg);
}
to {
transform: rotate(-360deg);
}
}
}
}
.fengji-lamp {
width: 53px;
......@@ -922,7 +946,43 @@ export default {
}
}
}
.example-window {
width: 1070px;
height: 921px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: #00deff;
z-index: 999;
background: url("~@/assets/images/screen/bg111.png") no-repeat center;
.close-button {
font-size: 30px;
position: absolute;
top: 16px;
right: 16px;
color: #fff;
cursor: pointer;
&:hover {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: -webkit-transform 1s linear;
transition: transform 1s linear;
}
}
}
.example {
width: 49px;
height: 56px;
position: absolute;
right: 40px;
bottom: 40px;
background: url("~@/assets/images/screen/icon.png") no-repeat center;
&:hover {
background: url("~@/assets/images/screen/icon_click.png") no-repeat center;
cursor: pointer;
}
}
@keyframes wave {
0% {
background-position-x: 0;
......
This diff is collapsed.
......@@ -65,6 +65,12 @@
<el-table-column label="电机后温" align="center" prop="motorRearTemp" />
<el-table-column label="出水压力" align="center" prop="outletPressure" />
<el-table-column label="吸水负压" align="center" prop="inletVacuum" />
<el-table-column label="前振动" align="center" prop="frontVibrateFalse" />
<el-table-column
label="后振动"
align="center"
prop="rearVibrationFalse"
/>
<el-table-column
label="监测时间"
align="center"
......
......@@ -54,6 +54,8 @@
<el-table-column label="电机后温" align="center" prop="motorRearTemp" />
<el-table-column label="出水压力" align="center" prop="outletPressure" />
<el-table-column label="吸水负压" align="center" prop="inletVacuum" />
<el-table-column label="前振动" align="center" prop="frontVibrate" />
<el-table-column label="后振动" align="center" prop="rearVibration" />
<el-table-column
label="监测时间"
align="center"
......
......@@ -59,7 +59,181 @@
align="center"
prop="controlPosition"
/>
<el-table-column label="当前动作" align="center" prop="currentAction">
<template slot-scope="scope">
<span>{{
["去井口", "去一中", "去二中", "去三中", "去四中", "去五中"][
scope.row.currentAction
]
}}</span>
</template>
</el-table-column>
<el-table-column label="运行准备" align="center" prop="runPrepare">
<template slot-scope="scope">
<span v-if="scope.row.runPrepare != null">{{
scope.row.runPrepare == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="主风机启动" align="center" prop="mainFan">
<template slot-scope="scope">
<span v-if="scope.row.mainFan != null">{{
scope.row.mainFan == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="交流器启动" align="center" prop="transformer">
<template slot-scope="scope">
<span v-if="scope.row.transformer != null">{{
scope.row.transformer == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column
label="液压站启动"
align="center"
prop="hydraulicStation"
>
<template slot-scope="scope">
<span v-if="scope.row.hydraulicStation == null">--</span>
<span v-else>{{
scope.row.hydraulicStation == "0" ? "" : ""
}}</span>
</template>
</el-table-column>
<el-table-column label="硬件安全" align="center" prop="hardwareSecurity">
<template slot-scope="scope">
<span v-if="scope.row.hardwareSecurity != null">{{
scope.row.hardwareSecurity == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="软件安全" align="center" prop="softwareSecurity">
<template slot-scope="scope">
<span v-if="scope.row.softwareSecurity != null">{{
scope.row.softwareSecurity == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="操作台安全" align="center" prop="consoleSafety">
<template slot-scope="scope">
<span v-if="scope.row.consoleSafety != null">{{
scope.row.consoleSafety == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="轻故障" align="center" prop="minorMalfunction">
<template slot-scope="scope">
<span v-if="scope.row.minorMalfunction != null">{{
scope.row.minorMalfunction == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="井口信号" align="center" prop="wellheadSignal">
<template slot-scope="scope">
<span v-if="scope.row.wellheadSignal != null">{{
scope.row.wellheadSignal == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="信号继电器" align="center" prop="signalRelay">
<template slot-scope="scope">
<span v-if="scope.row.signalRelay != null">{{
scope.row.signalRelay == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="选择正向" align="center" prop="chooseForward">
<template slot-scope="scope">
<span v-if="scope.row.chooseForward != null">{{
scope.row.chooseForward == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="选择反向" align="center" prop="chooseReverse">
<template slot-scope="scope">
<span v-if="scope.row.chooseReverse != null">{{
scope.row.chooseReverse == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="手动闸" align="center" prop="manualGate">
<template slot-scope="scope">
<span v-if="scope.row.manualGate != null">{{
scope.row.manualGate == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="工作闸" align="center" prop="workGate">
<template slot-scope="scope">
<span v-if="scope.row.workGate != null">{{
scope.row.workGate == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="全敞闸" align="center" prop="openGate">
<template slot-scope="scope">
<span v-if="scope.row.openGate != null">{{
scope.row.openGate == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="一级制动" align="center" prop="firstBraking">
<template slot-scope="scope">
<span v-if="scope.row.firstBraking != null">{{
scope.row.firstBraking == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="选低速" align="center" prop="lowSpeed">
<template slot-scope="scope">
<span v-if="scope.row.lowSpeed != null">{{
scope.row.lowSpeed == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="使能输出" align="center" prop="enableOutput">
<template slot-scope="scope">
<span v-if="scope.row.enableOutput != null">{{
scope.row.enableOutput == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="装置解封" align="center" prop="deviceUnsealed">
<template slot-scope="scope">
<span v-if="scope.row.deviceUnsealed != null">{{
scope.row.deviceUnsealed == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="系统减速" align="center" prop="systemSlowdown">
<template slot-scope="scope">
<span v-if="scope.row.systemSlowdown != null">{{
scope.row.systemSlowdown == "0" ? "" : ""
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="记录时间"
align="center"
prop="recordedAt"
......
......@@ -14,7 +14,12 @@
<el-table-column label="值" align="center" prop="value">
<template slot-scope="scope">
<span v-if="scope.row.comment == '当前动作'">
{{ scope.row.value == "1" ? "正常" : "异常" }}
<span v-if="scope.row.value">{{
["去井口", "去一中", "去二中", "去三中", "去四中", "去五中"][
scope.row.value
]
}}</span
><span v-else>待命</span>
</span>
<span v-else>
{{ scope.row.value }}
......
......@@ -207,10 +207,10 @@ export default {
created() {
this.getCommon();
this.getList();
// 启动定时器,每隔 1 分钟调用一次 getList
// 启动定时器,每隔 20秒调用一次 getList
this.timerId = setInterval(() => {
this.getList();
}, 60000); // 60000 毫秒
}, 20000); // 20000 毫秒
},
filters: {
leaderFilter(value) {
......
......@@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '银洞桐柏自动化' // 网页标题
const name = process.env.VUE_APP_TITLE || '桐柏银洞坡金矿自动化' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口
......
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