Commit db002bc2 authored by lei's avatar lei

add:银洞接口联调

parent 9d38b960
# 页面标题 # 页面标题
VUE_APP_TITLE = 银洞桐柏自动化 VUE_APP_TITLE = 桐柏银洞坡金矿自动化
# 开发环境端口 # 开发环境端口
port = 7777 port = 7777
...@@ -14,5 +14,6 @@ VUE_APP_BASE_API = '/dev-api' ...@@ -14,5 +14,6 @@ VUE_APP_BASE_API = '/dev-api'
VUE_CLI_BABEL_TRANSPILE_MODULES = true 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 # VUE_APP_API_TARGET = http://localhost:8080
\ No newline at end of file
# 页面标题 # 页面标题
VUE_APP_TITLE = 银洞桐柏自动化 VUE_APP_TITLE = 桐柏银洞坡金矿自动化
# 生产环境端口 # 生产环境端口
port = 7777 port = 7777
......
...@@ -12,7 +12,7 @@ export function listHoistSelectData(query) { ...@@ -12,7 +12,7 @@ export function listHoistSelectData(query) {
// 查询提升机历史数据列表 // 查询提升机历史数据列表
export function queryHoistHisData(query) { export function queryHoistHisData(query) {
return request({ return request({
url: '/business/elevator/history/query', url: '/business/elevator/history/record',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
height="1080" height="1080"
:fullScreen="true" :fullScreen="true"
> >
<home <!-- <home
v-if="showMenu === 0" v-if="showMenu === 0"
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0"
></home> ></home>
...@@ -34,7 +34,14 @@ ...@@ -34,7 +34,14 @@
<hjjc <hjjc
v-if="showMenu === 2" v-if="showMenu === 2"
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0" 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="container" style="pointer-events: none">
<!-- 头部 --> <!-- 头部 -->
<div class="header por" style="pointer-events: auto"></div> <div class="header por" style="pointer-events: auto"></div>
...@@ -172,6 +179,20 @@ export default { ...@@ -172,6 +179,20 @@ export default {
return; return;
}, },
}, },
computed: {
currentComponent() {
const componentMap = {
0: "home",
1: "rydw",
2: "hjjc",
3: "psxt",
4: "tsj",
5: "tfxt", // 匹配通风系统组件
6: "dlxt",
};
return componentMap[this.showMenu];
},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
<span>{{ item.dgname }}</span> <span>{{ item.dgname }}</span>
</p> </p>
<div class="dlxt-list" :class="`dlxt-list${index + 1}`"> <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.name }}</span
>:<span>{{ param.value }}</span >:<span>{{ param.value }}</span
><span>{{ param.unit }}</span> ><span>{{ param.unit }}</span>
...@@ -61,7 +64,7 @@ ...@@ -61,7 +64,7 @@
class="for-box" class="for-box"
:class="`pos${index + 1}`" :class="`pos${index + 1}`"
v-for="(item, index) in dgList" v-for="(item, index) in dgList"
:key="index" :key="index + 'for-box'"
> >
<div class="for-box-content"></div> <div class="for-box-content"></div>
<div class="for-box-tit"> <div class="for-box-tit">
...@@ -1225,22 +1228,28 @@ export default { ...@@ -1225,22 +1228,28 @@ export default {
this.init(); this.init();
}, },
mounted() { mounted() {
// 初始化定时器 // // 初始化定时器
// this.timer = setInterval(() => {
// this.init();
// }, 10000);
},
activated() {
// 组件激活时
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.init(); this.init();
}, 10000); }, 10000);
}, },
beforeDestroy() { beforeDestroy() {
// 组件销毁前清除定时器 // 组件销毁前清除定时器
if (this.timer) { this.clearTimer();
clearInterval(this.timer); },
this.timer = null; deactivated() {
} // 组件离开时
this.clearTimer();
}, },
methods: { methods: {
init() { init() {
this.getdata(this.showBtn - 1); this.getdata(this.showBtn - 1);
this.getTemperAndHumidityData(this.showBtn - 1);
}, },
getdata(index = 0) { getdata(index = 0) {
updateSelectEleHistoryData({ name: this.statusNames[index].name }) updateSelectEleHistoryData({ name: this.statusNames[index].name })
...@@ -1320,6 +1329,12 @@ export default { ...@@ -1320,6 +1329,12 @@ export default {
this.showBtn = index; this.showBtn = index;
this.getdata(index - 1); this.getdata(index - 1);
}, },
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
}, },
}; };
</script> </script>
......
...@@ -880,6 +880,8 @@ export default { ...@@ -880,6 +880,8 @@ export default {
}, },
// 初始化eChartDOM // 初始化eChartDOM
initEchartBox(id, xData = [], yData = [], mkData = 28, step = 4, grid) { 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; let myChart = null;
myChart = echarts.init(document.getElementById(id)); myChart = echarts.init(document.getElementById(id));
let option = { let option = {
...@@ -911,7 +913,8 @@ export default { ...@@ -911,7 +913,8 @@ export default {
}, },
yAxis: { yAxis: {
type: "value", type: "value",
max: 50, max: maxData,
min: minData,
boundaryGap: false, boundaryGap: false,
axisTick: { axisTick: {
alignWithLabel: true, alignWithLabel: true,
......
...@@ -25,8 +25,8 @@ export default { ...@@ -25,8 +25,8 @@ export default {
latitude: 32.54756929901858, latitude: 32.54756929901858,
height: 35, height: 35,
des: { des: {
name: "电所", name: "35变电所",
height: 100, height: 550,
}, },
}, },
{ {
...@@ -34,8 +34,8 @@ export default { ...@@ -34,8 +34,8 @@ export default {
latitude: 32.5467314676447, latitude: 32.5467314676447,
height: 40, height: 40,
des: { des: {
name: "西矿厂", name: "矿厂",
height: 300, height: 350,
}, },
}, },
{ {
...@@ -44,7 +44,34 @@ export default { ...@@ -44,7 +44,34 @@ export default {
height: 40, height: 40,
des: { des: {
name: "办公楼", 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 { ...@@ -71,16 +98,19 @@ export default {
this.viewer.cesiumWidget.creditContainer.style.display = "none"; this.viewer.cesiumWidget.creditContainer.style.display = "none";
// 加载3D Tileset // 加载3D Tileset
Cesium.Cesium3DTileset.fromUrl("/terra_b3dms_yd/tileset.json", { Cesium.Cesium3DTileset.fromUrl(
"http://192.168.2.188:80/terra_b3dms_yd/tileset.json",
{
maximumScreenSpaceError: 1, maximumScreenSpaceError: 1,
pickable: true, pickable: true,
}) }
)
.then((tileset) => { .then((tileset) => {
this.tileset = tileset; // 存储tileset供后续使用 this.tileset = tileset; // 存储tileset供后续使用
this.viewer.scene.primitives.add(tileset); this.viewer.scene.primitives.add(tileset);
// 调整模型高度 // 调整模型高度
var heightOffset = -230; var heightOffset = -250;
var boundingSphere = tileset.boundingSphere; var boundingSphere = tileset.boundingSphere;
var cartographic = Cesium.Cartographic.fromCartesian( var cartographic = Cesium.Cartographic.fromCartesian(
boundingSphere.center boundingSphere.center
......
...@@ -138,6 +138,7 @@ ...@@ -138,6 +138,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="example"></div>
<pool style="position: absolute; top: 195px; left: 793px"></pool> <pool style="position: absolute; top: 195px; left: 793px"></pool>
<pool style="position: absolute; top: 580px; left: 793px"></pool> <pool style="position: absolute; top: 580px; left: 793px"></pool>
<pool style="position: absolute; top: 962px; left: 795px"></pool> <pool style="position: absolute; top: 962px; left: 795px"></pool>
...@@ -173,12 +174,27 @@ export default { ...@@ -173,12 +174,27 @@ export default {
created() { created() {
this.initPumpList(); this.initPumpList();
}, },
mounted() { activated() {
// 初始化定时器 // 激活时启动定时器
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.initPumpList(); this.initPumpList();
}, 10000); }, 10000);
}, },
deactivated() {
// 停用时清除定时器(使用可选链操作符)
if (this.timer) {
clearInterval(this.timer);
this.timer = null; // 必须重置为null
}
},
beforeDestroy() {
// 双重保障清除
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
mounted() {},
methods: { methods: {
initPumpList() { initPumpList() {
getDraData().then((res) => { getDraData().then((res) => {
...@@ -604,7 +620,14 @@ export default { ...@@ -604,7 +620,14 @@ export default {
} }
} }
} }
.example {
width: 1070px;
height: 921px;
position: absolute;
left: 50%;
margin-left: -50px;
background: #00deff;
}
@keyframes wave { @keyframes wave {
0% { 0% {
background-position-x: 0; background-position-x: 0;
......
...@@ -316,7 +316,7 @@ import { ...@@ -316,7 +316,7 @@ import {
monthlyRankings, monthlyRankings,
} from "@/api/tyler/screen"; } from "@/api/tyler/screen";
export default { export default {
name: "cockpit", name: "rydw",
data() { data() {
return { return {
dialogTableVisible: false, dialogTableVisible: false,
...@@ -423,21 +423,30 @@ export default { ...@@ -423,21 +423,30 @@ export default {
this.perStationInfoList(); this.perStationInfoList();
this.getrydwMidStation(); this.getrydwMidStation();
this.getMonthlyRankings(); this.getMonthlyRankings();
},
// 初始化定时器 activated() {
this.startTimer();
},
deactivated() {
this.clearTimer();
},
beforeDestroy() {
this.clearTimer();
},
methods: {
startTimer() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.perStationInfoList(); this.perStationInfoList();
this.subStationObj(); this.subStationObj();
this.getMonthlyRankings();
}, 10000); }, 10000);
}, },
beforeDestroy() { clearTimer() {
this.clearAnimation();
if (this.timer) { if (this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; // 新增清理引用 this.timer = null;
} }
}, },
methods: {
//当月人员下井次数排行榜数据 //当月人员下井次数排行榜数据
getMonthlyRankings() { getMonthlyRankings() {
monthlyRankings().then((res) => { monthlyRankings().then((res) => {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -361,7 +361,7 @@ ...@@ -361,7 +361,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -403,7 +403,7 @@ ...@@ -403,7 +403,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -479,7 +479,7 @@ ...@@ -479,7 +479,7 @@
<div class="fengji-control"> <div class="fengji-control">
<div <div
class="fengji-icon" class="fengji-icon"
:class="item.fanRunStatus == 0 ? '' : 'runing'" :class="fengjiIconClass[Number(item.fanRunStatus)]"
></div> ></div>
<div <div
class="fengji-lamp" class="fengji-lamp"
...@@ -529,6 +529,10 @@ ...@@ -529,6 +529,10 @@
</div> </div>
</div> </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> </div>
</template> </template>
...@@ -550,6 +554,12 @@ export default { ...@@ -550,6 +554,12 @@ export default {
windowTitle: "", // 新增标题字段 windowTitle: "", // 新增标题字段
currentDevice: null, // 新增当前设备字段 currentDevice: null, // 新增当前设备字段
timer: null, // 新增定时器引用 timer: null, // 新增定时器引用
exampleWindow: false,
fengjiIconClass: {
1: "runing",
2: "runingopps",
3: "",
},
}; };
}, },
computed: {}, computed: {},
...@@ -577,6 +587,8 @@ export default { ...@@ -577,6 +587,8 @@ export default {
}); });
}, },
remoteControl(item) { remoteControl(item) {
console.log(item);
this.upWindowShow = true; this.upWindowShow = true;
this.windowTitle = `${item.deviceName}远程操作`; // 直接设置数据 this.windowTitle = `${item.deviceName}远程操作`; // 直接设置数据
this.currentDevice = item; // 保存当前设备信息 this.currentDevice = item; // 保存当前设备信息
...@@ -627,7 +639,7 @@ export default { ...@@ -627,7 +639,7 @@ export default {
background: url("~@/assets/images/screen/tfxt/bg.png") no-repeat center; background: url("~@/assets/images/screen/tfxt/bg.png") no-repeat center;
padding-top: 100px; padding-top: 100px;
pointer-events: auto; pointer-events: auto;
position: relative;
.content { .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -681,6 +693,18 @@ export default { ...@@ -681,6 +693,18 @@ export default {
} }
} }
} }
&.runingopps {
//需要这个元素做旋转动画,围着自身圆心一直旋转
animation: rotateOpposite 2s linear infinite;
@keyframes rotateOpposite {
from {
transform: rotate(0deg);
}
to {
transform: rotate(-360deg);
}
}
}
} }
.fengji-lamp { .fengji-lamp {
width: 53px; width: 53px;
...@@ -922,7 +946,43 @@ export default { ...@@ -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 { @keyframes wave {
0% { 0% {
background-position-x: 0; background-position-x: 0;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="" prop="deviceName"> <el-form-item label="" prop="deviceName">
<el-input <el-input
v-model="queryParams.deviceName" v-model="queryParams.deviceName"
...@@ -12,8 +18,16 @@ ...@@ -12,8 +18,16 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -25,7 +39,8 @@ ...@@ -25,7 +39,8 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
>新增</el-button> >新增</el-button
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
...@@ -37,48 +52,106 @@ ...@@ -37,48 +52,106 @@
@click="handleExport" @click="handleExport"
>导出</el-button> >导出</el-button>
</el-col> --> </el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="infoList"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="设备编号" align="center" prop="deviceId" /> <el-table-column label="设备编号" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceName" /> <el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="安装描述" align="center" prop="installationLocation" /> <el-table-column
label="安装描述"
align="center"
prop="installationLocation"
/>
<el-table-column label="设备类型" align="center" prop="deviceType"> <el-table-column label="设备类型" align="center" prop="deviceType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.drainage_dev_type" :value="scope.row.deviceType"/> <dict-tag
:options="dict.type.drainage_dev_type"
:value="scope.row.deviceType"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
<el-table-column label="液位高度预警值" align="center" prop="heghtThreshold" /> label="液位高度预警值"
<el-table-column label="电机电流预警值" align="center" prop="motorCurrentAlert" /> align="center"
<el-table-column label="电机轴承温度预警值" align="center" prop="motorBearingTempAlert" /> prop="heghtThreshold"
<el-table-column label="水泵轴承温度预警值" align="center" prop="pumpBearingTempAlert" /> />
<el-table-column label="水泵流量预警值" align="center" prop="pumpFlowAlert" /> <el-table-column
<el-table-column label="排水管路压力预警值" align="center" prop="drainagePressureAlert" /> label="水泵前温预警值"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> align="center"
prop="pumpFrontTemp"
/>
<el-table-column
label="水泵后温预警值"
align="center"
prop="pumpRearTemp"
/>
<el-table-column
label="电机前温预警值"
align="center"
prop="motorFrontTemp"
/>
<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"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-if="!scope.row.status" v-if="!scope.row.status"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
...@@ -92,14 +165,26 @@ ...@@ -92,14 +165,26 @@
<el-input v-model="form.deviceName" placeholder="请输入设备名称" /> <el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item> </el-form-item>
<el-form-item label="设备编号" prop="deviceId"> <el-form-item label="设备编号" prop="deviceId">
<el-input :disabled="disabledType" v-model="form.deviceId" placeholder="请输入设备编号" /> <el-input
:disabled="disabledType"
v-model="form.deviceId"
placeholder="请输入设备编号"
/>
</el-form-item> </el-form-item>
<el-form-item label="安装描述" prop="installationLocation"> <el-form-item label="安装描述" prop="installationLocation">
<el-input v-model="form.installationLocation" placeholder="请输入安装描述" /> <el-input
v-model="form.installationLocation"
placeholder="请输入安装描述"
/>
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="deviceType"> <el-form-item label="设备类型" prop="deviceType">
<el-select @change="deviceTypeChange" v-model="form.deviceType" placeholder="请选择设备类型" :disabled="disabledType"> <el-select
@change="deviceTypeChange"
v-model="form.deviceType"
placeholder="请选择设备类型"
:disabled="disabledType"
>
<el-option <el-option
v-for="dict in dict.type.drainage_dev_type" v-for="dict in dict.type.drainage_dev_type"
:key="dict.value" :key="dict.value"
...@@ -109,27 +194,63 @@ ...@@ -109,27 +194,63 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<div v-show="form.deviceType==='1'"> <div v-show="form.deviceType === '1'">
<el-form-item label="电机电流预警值" prop="motorCurrentAlert"> <el-form-item label="水泵前温预警值" prop="pumpFrontTemp">
<el-input v-model="form.motorCurrentAlert" placeholder="请输入电机电流预警值" /> <el-input
v-model="form.pumpFrontTemp"
placeholder="请输入水泵前温预警值"
/>
</el-form-item> </el-form-item>
<el-form-item label="电机轴承温度预警值" prop="motorBearingTempAlert"> <el-form-item label="水泵后温预警值" prop="pumpFrontTemp">
<el-input v-model="form.motorBearingTempAlert" placeholder="请输入电机轴承温度预警值" /> <el-input
v-model="form.pumpFrontTemp"
placeholder="请输入水泵后温预警值"
/>
</el-form-item> </el-form-item>
<el-form-item label="水泵轴承温度预警值" prop="pumpBearingTempAlert"> <el-form-item label="电机前温预警值" prop="motorFrontTemp">
<el-input v-model="form.pumpBearingTempAlert" placeholder="请输入水泵轴承温度预警值" /> <el-input
v-model="form.motorFrontTemp"
placeholder="请输入电机前温预警值"
/>
</el-form-item>
<el-form-item label="电机后温预警值" prop="motorRearTemp">
<el-input
v-model="form.motorRearTemp"
placeholder="请输入电机后温预警值"
/>
</el-form-item>
<el-form-item label="出水压力预警值" prop="outletPressure">
<el-input
v-model="form.outletPressure"
placeholder="请输入出水压力预警值"
/>
</el-form-item>
<el-form-item label="吸水负压预警值" prop="inletVacuum">
<el-input
v-model="form.inletVacuum"
placeholder="请输入吸水负压预警值"
/>
</el-form-item> </el-form-item>
<el-form-item label="水泵流量预警值" prop="pumpFlowAlert"> <el-form-item label="前振动预警值" prop="frontVibrate">
<el-input v-model="form.pumpFlowAlert" placeholder="请输入水泵流量预警值" /> <el-input
v-model="form.frontVibrate"
placeholder="请输入前振动预警值"
/>
</el-form-item> </el-form-item>
<el-form-item label="排水管路压力预警值" prop="drainagePressureAlert"> <el-form-item label="后振动预警值" prop="rearVibration">
<el-input v-model="form.drainagePressureAlert" placeholder="请输入排水管路压力预警值" /> <el-input
v-model="form.rearVibration"
placeholder="请输入后振动预警值"
/>
</el-form-item> </el-form-item>
</div> </div>
<div v-show="form.deviceType==='2'"> <div v-show="form.deviceType === '2'">
<el-form-item label="液位高度预警值" prop="heghtThreshold"> <el-form-item label="液位高度预警值" prop="heghtThreshold">
<el-input v-model="form.heghtThreshold" placeholder="请输入液位高度预警值" /> <el-input
v-model="form.heghtThreshold"
placeholder="请输入液位高度预警值"
/>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -142,11 +263,17 @@ ...@@ -142,11 +263,17 @@
</template> </template>
<script> <script>
import {getInfo, listInfo, addInfo, updateInfo, delInfo } from "@/api/tyler/drainageDev"; import {
getInfo,
listInfo,
addInfo,
updateInfo,
delInfo,
} from "@/api/tyler/drainageDev";
export default { export default {
name: "Info", name: "Info",
dicts: ['drainage_dev_type'], dicts: ["drainage_dev_type"],
data() { data() {
return { return {
// 根路径 // 根路径
...@@ -189,19 +316,19 @@ ...@@ -189,19 +316,19 @@
// 表单校验 // 表单校验
rules: { rules: {
deviceName: [ deviceName: [
{ required: true, message: "设备名称不能为空", trigger: "blur" } { required: true, message: "设备名称不能为空", trigger: "blur" },
], ],
deviceId: [ deviceId: [
{ required: true, message: "设备编号不能为空", trigger: "blur" } { required: true, message: "设备编号不能为空", trigger: "blur" },
], ],
installationLocation: [ installationLocation: [
{ required: true, message: "安装描述不能为空", trigger: "blur" } { required: true, message: "安装描述不能为空", trigger: "blur" },
], ],
deviceType: [ deviceType: [
{ required: true, message: "设备类型不能为空", trigger: "change" } { required: true, message: "设备类型不能为空", trigger: "change" },
] ],
}, },
disabledType:false, disabledType: false,
}; };
}, },
created() { created() {
...@@ -211,7 +338,7 @@ ...@@ -211,7 +338,7 @@
/** 查询排水设备信息列表 */ /** 查询排水设备信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listInfo(this.queryParams).then(response => { listInfo(this.queryParams).then((response) => {
this.infoList = response.rows; this.infoList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
...@@ -239,17 +366,16 @@ ...@@ -239,17 +366,16 @@
}; };
this.resetForm("form"); this.resetForm("form");
}, },
deviceTypeChange(val){ deviceTypeChange(val) {
// console.log(val,'val') // console.log(val,'val')
if(val==1){ if (val == 1) {
this.form.heghtThreshold = null this.form.heghtThreshold = null;
}else if(val==2){ } else if (val == 2) {
this.form.motorCurrentAlert = null this.form.motorCurrentAlert = null;
this.form.motorBearingTempAlert = null this.form.motorBearingTempAlert = null;
this.form.pumpBearingTempAlert = null this.form.pumpBearingTempAlert = null;
this.form.pumpFlowAlert = null this.form.pumpFlowAlert = null;
this.form.drainagePressureAlert = null this.form.drainagePressureAlert = null;
} }
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
...@@ -264,9 +390,9 @@ ...@@ -264,9 +390,9 @@
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
...@@ -296,26 +422,25 @@ ...@@ -296,26 +422,25 @@
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if(this.form.deviceType==1){ if (this.form.deviceType == 1) {
this.form.heghtThreshold = null this.form.heghtThreshold = null;
}else if(this.form.deviceType==2){ } else if (this.form.deviceType == 2) {
this.form.motorCurrentAlert = null this.form.motorCurrentAlert = null;
this.form.motorBearingTempAlert = null this.form.motorBearingTempAlert = null;
this.form.pumpBearingTempAlert = null this.form.pumpBearingTempAlert = null;
this.form.pumpFlowAlert = null this.form.pumpFlowAlert = null;
this.form.drainagePressureAlert = null this.form.drainagePressureAlert = null;
} }
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateInfo(this.form).then(response => { updateInfo(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addInfo(this.form).then(response => { addInfo(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
...@@ -327,19 +452,27 @@ ...@@ -327,19 +452,27 @@
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除?').then(function() { this.$modal
.confirm("是否确认删除?")
.then(function () {
return delInfo(ids); return delInfo(ids);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/info/export', { this.download(
...this.queryParams "business/info/export",
}, `info_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`info_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>
...@@ -65,6 +65,12 @@ ...@@ -65,6 +65,12 @@
<el-table-column label="电机后温" align="center" prop="motorRearTemp" /> <el-table-column label="电机后温" align="center" prop="motorRearTemp" />
<el-table-column label="出水压力" align="center" prop="outletPressure" /> <el-table-column label="出水压力" align="center" prop="outletPressure" />
<el-table-column label="吸水负压" align="center" prop="inletVacuum" /> <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 <el-table-column
label="监测时间" label="监测时间"
align="center" align="center"
......
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
<el-table-column label="电机后温" align="center" prop="motorRearTemp" /> <el-table-column label="电机后温" align="center" prop="motorRearTemp" />
<el-table-column label="出水压力" align="center" prop="outletPressure" /> <el-table-column label="出水压力" align="center" prop="outletPressure" />
<el-table-column label="吸水负压" align="center" prop="inletVacuum" /> <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 <el-table-column
label="监测时间" label="监测时间"
align="center" align="center"
......
...@@ -59,7 +59,181 @@ ...@@ -59,7 +59,181 @@
align="center" align="center"
prop="controlPosition" 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 <el-table-column
fixed="right"
label="记录时间" label="记录时间"
align="center" align="center"
prop="recordedAt" prop="recordedAt"
......
...@@ -14,7 +14,12 @@ ...@@ -14,7 +14,12 @@
<el-table-column label="值" align="center" prop="value"> <el-table-column label="值" align="center" prop="value">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.comment == '当前动作'"> <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>
<span v-else> <span v-else>
{{ scope.row.value }} {{ scope.row.value }}
......
...@@ -207,10 +207,10 @@ export default { ...@@ -207,10 +207,10 @@ export default {
created() { created() {
this.getCommon(); this.getCommon();
this.getList(); this.getList();
// 启动定时器,每隔 1 分钟调用一次 getList // 启动定时器,每隔 20秒调用一次 getList
this.timerId = setInterval(() => { this.timerId = setInterval(() => {
this.getList(); this.getList();
}, 60000); // 60000 毫秒 }, 20000); // 20000 毫秒
}, },
filters: { filters: {
leaderFilter(value) { leaderFilter(value) {
......
...@@ -7,7 +7,7 @@ function resolve(dir) { ...@@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin') 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 // 端口 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