邓洁 : 隧道接口部分对接

This commit is contained in:
dengj
2023-12-26 17:08:15 +08:00
parent dd561f21fc
commit 2ba9e761ab
5 changed files with 399 additions and 482 deletions

View File

@@ -26,9 +26,9 @@
<el-menu-item index="3">
<span>其他传感器</span>
</el-menu-item>
<el-menu-item index="4">
<span>分流器</span>
</el-menu-item>
<!-- <el-menu-item index="4">-->
<!-- <span>分流器</span>-->
<!-- </el-menu-item>-->
</el-menu>
</div>
<div class="box-right" v-if="changeIndex==1">
@@ -50,20 +50,20 @@
style="border-bottom: 1px #06e5e5 solid;background-color: #011c29;--el-table-border-color: none;"
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="fanData">
<el-table-column prop="name" label="设备名称" align="center"/>
<el-table-column prop="currentA" label="A电流" align="center">
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
<el-table-column prop="phaseCurrentAOffset" label="A电流" align="center">
<template #default="scope">
<el-input placeholder="请输入A电流" v-model="scope.row.currentA"></el-input>
<el-input placeholder="请输入A电流" v-model="scope.row.phaseCurrentAOffset"></el-input>
</template>
</el-table-column>
<el-table-column prop="currentB" label="B电流" align="center">
<el-table-column prop="phaseCurrentBOffset" label="B电流" align="center">
<template #default="scope">
<el-input placeholder="请输入B电流" v-model="scope.row.currentB"></el-input>
<el-input placeholder="请输入B电流" v-model="scope.row.phaseCurrentBOffset"></el-input>
</template>
</el-table-column>
<el-table-column prop="currentC" label="C电流" align="center">
<el-table-column prop="phaseCurrentCOffset" label="C电流" align="center">
<template #default="scope">
<el-input placeholder="请输入C电流" v-model="scope.row.currentC"></el-input>
<el-input placeholder="请输入C电流" v-model="scope.row.phaseCurrentCOffset"></el-input>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
@@ -90,7 +90,7 @@
<div class="cancel-btn">
取消
</div>
<div class="sure-btn" @click="router.back(-1)">
<div class="sure-btn" @click="router.back(-1)">
确定
</div>
</div>
@@ -114,12 +114,12 @@
style="border-bottom: 1px #06e5e5 solid;background-color: #011c29;--el-table-border-color: none;"
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="winData">
<el-table-column prop="name" label="设备名称" align="center"/>
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
<el-table-column prop="offset" label="偏移量" align="center"/>
<el-table-column prop="unit" label="单位" align="center"/>
<el-table-column prop="thresholdValue" label="阈值" align="center">
<el-table-column prop="alarmValue" label="阈值" align="center">
<template #default="scope">
<el-input placeholder="请输入阈值" v-model="scope.row.thresholdValue"></el-input>
<el-input placeholder="请输入阈值" v-model="scope.row.alarmValue"></el-input>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
@@ -146,7 +146,7 @@
<div class="cancel-btn">
取消
</div>
<div class="sure-btn" @click="router.back(-1)">
<div class="sure-btn" @click="router.back(-1)">
确定
</div>
</div>
@@ -170,16 +170,16 @@
style="border-bottom: 1px #06e5e5 solid;background-color: #011c29;--el-table-border-color: none;"
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="otherData">
<el-table-column prop="name" label="设备名称" align="center"/>
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
<el-table-column prop="offset" label="偏移量" align="center"/>
<el-table-column prop="unit" label="单位" align="center">
<template #default="scope">
<el-input placeholder="请输入单位" v-model="scope.row.unit"></el-input>
</template>
</el-table-column>
<el-table-column prop="thresholdValue" label="阈值" align="center">
<el-table-column prop="alarmValue" label="阈值" align="center">
<template #default="scope">
<el-input placeholder="请输入阈值" v-model="scope.row.thresholdValue"></el-input>
<el-input placeholder="请输入阈值" v-model="scope.row.alarmValue"></el-input>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
@@ -272,195 +272,214 @@
</template>
<script setup>
import {getEquipmentList} from "@/api/tunnelManage";
const router = useRouter()
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
const collectionFrequency = ref(0)
const changeIndex = ref(1)
const fanData = [
{
name: '一号风机',
currentA: '2342',
currentB: '2342',
currentC: '2342',
state: false,
},
{
name: '二号风机',
currentA: '2342',
currentB: '2342',
currentC: '2342',
state: true,
},
{
name: '三号风机',
currentA: '2342',
currentB: '2342',
currentC: '2342',
state: false,
}
]
const winData = [
{
name: '1号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '2号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '3号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '4号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '5号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '6号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '7号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '8号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '9号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
{
name: '10号风压',
offset: '2342',
unit: 'Pa',
thresholdValue: '2342',
state: false,
},
]
const otherData = [
{
name: '风速',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '氧 气',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '温 度',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '湿 度',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '粉 尘',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '二氧化碳',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '一氧化碳',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '二氧化氮',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '一氧化氮',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '二氧化硫',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}, {
name: '硫 化 氢',
offset: '2342',
unit: 'm/s',
thresholdValue: '2342',
state: false,
}
]
const fenliuData = [
{
name: '1号分流器',
offset: '2342',
thresholdValue: '2342',
state: false,
}, {
name: '2号分流器',
offset: '2342',
thresholdValue: '2342',
state: false,
}, {
name: '3号分流器',
offset: '2342',
thresholdValue: '2342',
state: false,
}
]
const fanData = ref([
// {
// name: '一号风机',
// currentA: '2342',
// currentB: '2342',
// currentC: '2342',
// state: false,
// },
// {
// name: '二号风机',
// currentA: '2342',
// currentB: '2342',
// currentC: '2342',
// state: true,
// },
// {
// name: '三号风机',
// currentA: '2342',
// currentB: '2342',
// currentC: '2342',
// state: false,
// }
])
const winData = ref([
// {
// name: '1号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '2号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '3号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '4号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '5号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '6号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '7号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '8号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '9号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
// {
// name: '10号风压',
// offset: '2342',
// unit: 'Pa',
// thresholdValue: '2342',
// state: false,
// },
])
const otherData = ref([
// {
// name: '风速',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '氧 气',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '温 度',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '湿 度',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '粉 尘',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '二氧化碳',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '一氧化碳',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '二氧化氮',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '一氧化氮',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '二氧化硫',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '硫 化 氢',
// offset: '2342',
// unit: 'm/s',
// thresholdValue: '2342',
// state: false,
// }
])
const fenliuData = ref([
// {
// name: '1号分流器',
// offset: '2342',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '2号分流器',
// offset: '2342',
// thresholdValue: '2342',
// state: false,
// }, {
// name: '3号分流器',
// offset: '2342',
// thresholdValue: '2342',
// state: false,
// }
])
const handleChangeMenu = (e) => {
console.log('切换', e)
changeIndex.value = e
}
const getList = () => {
getEquipmentList(tunnelId).then(res => {
console.log('设备列表', res)
if (res.code === 1000) {
fanData.value = res.data.frequencyChangerList
winData.value = res.data.windPressureSensorList
otherData.value = res.data.sensorList
res.data.acquisitionList.map(item=>{
if(item.tunnelId==tunnelId){
collectionFrequency.value=item.acquisitionPeriod
}
})
}
})
}
getList()
</script>
<style scoped lang="scss">
@@ -552,9 +571,10 @@ const handleChangeMenu = (e) => {
&:nth-child(2) {
letter-spacing: 120px;
}
&:last-child{
letter-spacing: 40px;
}
//&:nth-child(4) {
// letter-spacing: 40px;
//}
}
}
}
@@ -589,7 +609,7 @@ const handleChangeMenu = (e) => {
position: relative;
input {
width: 166px;
width: 220px;
height: 50px;
border: 1px solid #05FEFF;
background: transparent;
@@ -669,11 +689,13 @@ const handleChangeMenu = (e) => {
}
:deep(.el-table__row--striped) {
background-color: #13849C!important;
background-color: #13849C !important;
}
:deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell){
background-color: #13849C!important;
:deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell) {
background-color: #13849C !important;
}
:deep(.el-table__cell) {
.el-input {
width: 180px;