更新1.浏览器不点击2.删除风压3.浏览器模型只能左右移动4.鼠标hover显示设备名称

This commit is contained in:
Hcat
2024-03-13 20:50:20 +08:00
19 changed files with 1369 additions and 255 deletions

View File

@@ -76,7 +76,7 @@
@change="changeFanData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center" min-width="86">
<el-table-column prop="state" label="状态" align="center" min-width="86">
<template #default="scope">
<div class="switch">
<div
@@ -135,6 +135,18 @@
@change="changeWindData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="miniRange" label="最小范围" align="center">
<template #default="scope">
<el-input placeholder="最小范围" v-model="scope.row.miniRange"
@change="changeWindData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="maxRange" label="最大范围" align="center">
<template #default="scope">
<el-input placeholder="最大范围" v-model="scope.row.maxRange"
@change="changeWindData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
<template #default="scope">
<div class="switch wind-switch">
@@ -194,6 +206,18 @@
@change="changeOtherData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="miniRange" label="最小范围" align="center">
<template #default="scope">
<el-input placeholder="最小范围" v-model="scope.row.miniRange"
@change="changeOtherData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="maxRange" label="最大范围" align="center">
<template #default="scope">
<el-input placeholder="最大范围" v-model="scope.row.maxRange"
@change="changeOtherData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
<template #default="scope">
<div class="switch wind-switch">
@@ -286,6 +310,7 @@
import {ElLoading, ElMessage} from "element-plus";
import {getEquipmentList, editEquipment, getTunnelDetail} from "@/api/tunnelManage";
import TunnelTitle from "@/components/tunnelTitle/index.vue";
const router = useRouter()
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
const userId = reactive(router.currentRoute.value.params.userId)
@@ -306,45 +331,88 @@ const frequencyData = ref([])
const siteId = ref(0)
const tunnelName = ref('')
const changeFan = (e) => {
const fanObj = {
acquisitionPeriod: e * 1000,
tunnelId: tunnelId,
typeKey: 'frequency'
}
frequencyData.value.push(fanObj)
// const fanObj = {
// acquisitionPeriod: e * 1000,
// tunnelId: tunnelId,
// typeKey: 'frequency'
// }
// frequencyData.value.push(fanObj)
}
const changeFanData = (row) => {
editFanData.value.push(row)
// editFanData.value.push(row)
}
const changeWind = (e) => {
const windObj = {
acquisitionPeriod: e * 1000,
tunnelId: tunnelId,
typeKey: 'windPressure'
}
frequencyData.value.push(windObj)
// const windObj = {
// acquisitionPeriod: e * 1000,
// tunnelId: tunnelId,
// typeKey: 'windPressure'
// }
// frequencyData.value.push(windObj)
}
const changeWindData = (row) => {
editWinData.value.push(row)
// editWinData.value.push(row)
}
const changeOther = (e) => {
const otherObj = {
acquisitionPeriod: e * 1000,
tunnelId: tunnelId,
typeKey: 'sensor'
}
frequencyData.value.push(otherObj)
// const otherObj = {
// acquisitionPeriod: e * 1000,
// tunnelId: tunnelId,
// typeKey: 'sensor'
// }
// frequencyData.value.push(otherObj)
}
const changeOtherData = (row) => {
editOtherData.value.push(row)
// editOtherData.value.push(row)
}
const changeData = (item) => {
return {
equipmentId: item.equipmentId,
unit: item.unit,
alarmValue: item.alarmValue,
miniRange: parseInt(item.miniRange),
maxRange: parseInt(item.maxRange),
state: item.state,
}
}
const editEquip = () => {
let newFrequency = [{
acquisitionPeriod: fanFrequency.value * 1000,
tunnelId: parseInt(tunnelId),
typeKey: 'frequency'
}, {
acquisitionPeriod: windFrequency.value * 1000,
tunnelId: parseInt(tunnelId),
typeKey: 'windPressure'
}, {
acquisitionPeriod: otherFrequency.value * 1000,
tunnelId: parseInt(tunnelId),
typeKey: 'sensor'
}]
let newFan = []
let newWind = []
let newSensor = []
fanData.value.forEach(item => {
let obj = {
equipmentId: item.equipmentId,
ratedPower:parseInt(item.ratedPower),
acurrentValue: parseInt(item.acurrentValue),
bcurrentValue: parseInt(item.bcurrentValue),
ccurrentValue: parseInt(item.ccurrentValue),
state: parseInt(item.state)
}
newFan.push(obj)
})
winData.value.forEach(item => {
newWind.push(changeData(item))
})
otherData.value.forEach(item => {
newSensor.push(changeData(item))
})
const basicData = {
tunnelId: tunnelId,
acquisitionList: frequencyData.value,
frequencyChangerList: editFanData.value,
windPressureSensorList: editWinData.value,
sensorList: editOtherData.value,
acquisitionList: newFrequency,
frequencyChangerList: newFan,
windPressureSensorList: newWind,
sensorList: newSensor,
// shuntList: editFenLiuData.value,
}
editEquipment(basicData).then(res => {
@@ -366,7 +434,7 @@ const getList = () => {
lock: true,
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass:'allLoading'
customClass: 'allLoading'
})
getEquipmentList(tunnelId).then(res => {
if (res.code === 1000) {
@@ -577,7 +645,7 @@ getList()
}
.wind-switch {
margin-left: 65px;
margin-left: 26px;
}
.switch {

View File

@@ -167,7 +167,7 @@ const info = ref({
})
const title = ref('新增站点')
const isVisited = ref(false);
const isUploadVisited = ref(false);
let isUploadVisited = ref(false);
const showFirst = ref(true)
const total = ref(10);
const showAddIcon = ref(true)
@@ -206,7 +206,7 @@ const getList = () => {
lock: true,
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass:'allLoading'
customClass: 'allLoading'
})
getSiteList({
userId: userId,
@@ -272,7 +272,7 @@ const handleEdit = (item) => {
lock: true,
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass:'allLoading'
customClass: 'allLoading'
})
getSiteDetail(item.siteId).then((res) => {
form.value = res.data;
@@ -667,7 +667,7 @@ const handleCurrentChange = (val) => {
.left-img {
margin-top: 50px;
margin-right: 60px;
margin-right: 36px;
width: 500px;
height: 370px;
background-image: url('@/assets/images/site/zdgl_zd.png');
@@ -690,7 +690,7 @@ const handleCurrentChange = (val) => {
.tunnel {
cursor: pointer;
margin-right: 20px;
width: 280px;
width: 320px;
height: 350px;
background: #3FBED1;
border-radius: 16px;
@@ -698,15 +698,24 @@ const handleCurrentChange = (val) => {
flex-direction: column;
align-items: center;
color: #FFFFFF;
text-align: center;
> div:first-child {
height: 37px;
width: 240px;
//height: 37px;
font-size: 32px;
margin-top: 20px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
> div:nth-child(3) {
width: 310px;
margin-bottom: 18px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
> div:nth-child(3), > div:nth-child(4) {

View File

@@ -327,7 +327,7 @@ const getList = () => {
lock: true,
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass:'allLoading'
customClass: 'allLoading'
})
getTunnelList({
siteId: siteId,
@@ -634,6 +634,7 @@ const handleMoreDelete = () => {
color: #fff;
font-size: 38px;
}
.el-input__suffix-inner {
font-size: 30px;
color: #08B7B8;
@@ -770,7 +771,13 @@ const handleMoreDelete = () => {
font-size: 45px;
font-weight: bold;
color: #FFFFFF;
line-height: 42px;
line-height: 50px;
> span {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
> span:nth-child(2) {
font-size: 38px;
@@ -779,6 +786,8 @@ const handleMoreDelete = () => {
> span:last-child {
margin-left: 5px;
width: 95px;
padding: 1px 8px;
font-size: 32px;
border: 2px solid #05FEFF;
@@ -896,8 +905,9 @@ const handleMoreDelete = () => {
color: #60DDDE;
font-size: 38px;
font-weight: bold;
:deep(.el-pagination.is-background ) {
.btn-next,.btn-prev {
.btn-next, .btn-prev {
background-color: transparent;
}

View File

@@ -4,8 +4,8 @@
<manage-btn v-model="selectIndex" @select="manageSelect" :list="routeList" v-if="showMenu" />
<tunnel-title v-if="showTunnelTitle" />
<div class="top-length">
<!-- <span>隧道总长度: {{ tunnelLength }}</span>-->
<span>当前施工长度: {{ constructionLength }}</span>
<span>隧道总长度: {{ tunnelLength }}</span>
<!-- <span>当前施工长度: {{ constructionLength }}</span>-->
</div>
<div class="top-right">
<div class="current-site">
@@ -72,7 +72,7 @@
<div class="arrow right" @click="nextBtn"></div>
</div>
</div>
<div class="alarm-dialog digital-tunnel">
<div class="alarm-dialog alarm-tunnel">
<el-dialog :close-on-click-modal="false" v-model="isDetailVisited" title="报警信息详情" width="1500px">
<div class="detail">
<div>报警时间</div>
@@ -84,7 +84,7 @@
</div>
</el-dialog>
</div>
<div class="digital-tunnel">
<div class="alarm-tunnel">
<el-dialog :close-on-click-modal="false" v-model="isVisited" title="报警信息" width="2175px" :modal="false">
<div class="left-top-icon"></div>
<div class="right-top-icon"></div>
@@ -102,16 +102,12 @@
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<div class="device-table">
<div class="device-table" :style="{ marginTop: roleKey === 'administrator' ? '40px' : '0' }">
<el-table stripe v-loading="loading" :empty-text="tableEmptyText"
style="background-color: #011c29;--el-table-border-color: none;"
:header-cell-style="{ backgroundColor: '#064B66', color: '#fff', fontSize: '40px', borderBottom: 'none' }"
:data="alarmList">
<!-- <el-table-column prop="equipmentId" label="设备名称" align="center" width="400px">-->
<!-- <template #default="scope">-->
<!-- {{ changeName(scope.row.equipmentId) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="tunnelName" label="隧道名称" align="center" width="400px" />
<el-table-column prop="alarmContent" label="告警信息" align="center" />
<el-table-column prop="alarmTime" label="告警时间" align="center" width="480px" />
<el-table-column prop="lookupStatus" label="查阅状态" align="center" width="200px"
@@ -133,7 +129,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination" :style="{ bottom: roleKey === 'administrator' ? '50px' : '' }">
<div class="pagination" :style="{ bottom: roleKey === 'administrator' ? '40px' : '0' }">
<el-pagination background v-model:current-page="pageInfo.pageNum" v-model:page-size="pageInfo.pageSize"
:total="total" prev-text="上一页" next-text="下一页" layout="prev, pager, next"
@current-change="handleCurrentChange" :hide-on-single-page="true" />
@@ -709,30 +705,6 @@ const initWebSocket = () => {
}
}
.digital-tunnel {
.detail {
font-size: 50px;
color: #FFFFFF;
>div {
color: #f5f5f5;
margin-bottom: 10px;
}
}
}
.digital-tunnel {
:deep(.el-dialog) {
height: 1410px;
.el-tag {
font-size: 36px;
height: 60px;
padding: 0 20px;
border-radius: 10px;
}
}
}
.query-form {
:deep(.el-form-item__label) {