邓洁: 接口部分对接
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="tunnel-bgc">
|
||||
<div class="box-top">
|
||||
<div class="back-tunnel" @click="router.back(-1)">
|
||||
<div class="back-tunnel" @click="handleGoTunnelMgr">
|
||||
<div class="back-icon"></div>
|
||||
<span>返回</span>
|
||||
</div>
|
||||
<div class="tunnel-name">
|
||||
一号隧道
|
||||
{{ tunnelName }}
|
||||
</div>
|
||||
<div class="tunnel-title"></div>
|
||||
</div>
|
||||
@@ -281,10 +281,10 @@
|
||||
<script setup>
|
||||
import {getEquipmentList, editFan} from "@/api/tunnelManage";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {editEquipment} from "../../api/tunnelManage";
|
||||
|
||||
import {editEquipment, getTunnelDetail} from "@/api/tunnelManage";
|
||||
const router = useRouter()
|
||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
||||
const type = reactive(router.currentRoute.value.params.type)
|
||||
const collectionFrequency = ref(0)
|
||||
const changeIndex = ref(1)
|
||||
const fanData = ref([
|
||||
@@ -472,6 +472,9 @@ const fenliuData = ref([
|
||||
const fanItem=ref({})
|
||||
const windItem=ref({})
|
||||
const sensorItem=ref({})
|
||||
const siteId=ref(0)
|
||||
const tunnelName=ref('')
|
||||
|
||||
const changeCurrent = (row) => {
|
||||
fanItem.value=getFanEditItem(row)
|
||||
windItem.value=getWindEditItem(row)
|
||||
@@ -547,6 +550,19 @@ const getList = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const getTunnel = () => {
|
||||
getTunnelDetail(tunnelId).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
siteId.value = res.data.siteId
|
||||
tunnelName.value = res.data.tunnelName
|
||||
console.log('设备详情',res.data)
|
||||
}
|
||||
});
|
||||
}
|
||||
getTunnel()
|
||||
const handleGoTunnelMgr=()=>{
|
||||
router.push('/tunnel/' + siteId.value+'/'+type)
|
||||
}
|
||||
getList()
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user