邓洁: 修改bug
This commit is contained in:
@@ -58,3 +58,10 @@ export const editEquipment = (data) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const editAcquisitions = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/tunnel/equipment/frequency/acquisitions',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ const initAirChart = (type, values) => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
width: 824px;
|
width: 824px;
|
||||||
height: 400px;
|
//height: 400px;
|
||||||
top: 1003px;
|
top: 1003px;
|
||||||
right: 72px;
|
right: 72px;
|
||||||
background-image: url(@/assets/images/airInfo/bg.png);
|
background-image: url(@/assets/images/airInfo/bg.png);
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ const initChart = (type, values) => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 824px;
|
width: 824px;
|
||||||
height: 621px;
|
//height: 621px;
|
||||||
top: 1441px;
|
top: 1441px;
|
||||||
right: 72px;
|
right: 72px;
|
||||||
background-image: url(../../../assets/images/badGasInfo/bg.png);
|
background-image: url(../../../assets/images/badGasInfo/bg.png);
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ const getBasicData = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleOnMounted = () => {
|
const handleOnMounted = () => {
|
||||||
|
// console.log('socketData.value[i]',socketData.value)
|
||||||
const chart = document.getElementsByClassName('echart');
|
const chart = document.getElementsByClassName('echart');
|
||||||
for (let i = 0; i < chart.length; i++) {
|
for (let i = 0; i < chart.length; i++) {
|
||||||
Echarts_info1 = echarts.init(chart[i]);
|
Echarts_info1 = echarts.init(chart[i]);
|
||||||
@@ -514,13 +515,13 @@ input[type="number"] {
|
|||||||
|
|
||||||
#fan_info {
|
#fan_info {
|
||||||
//height: 1465px;
|
//height: 1465px;
|
||||||
height: 1000px;
|
//height: 1000px;
|
||||||
width: 830px;
|
width: 830px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
top: 184px;
|
top: 184px;
|
||||||
left: 68px;
|
left: 68px;
|
||||||
padding: 10px;
|
padding: 10px 10px 20px 10px;
|
||||||
background-image: url(../../../assets/images/fanInfo/bg.png);
|
background-image: url(../../../assets/images/fanInfo/bg.png);
|
||||||
color: #2fb0df;
|
color: #2fb0df;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -541,16 +542,17 @@ input[type="number"] {
|
|||||||
.fan-item {
|
.fan-item {
|
||||||
//height: 33.5%;
|
//height: 33.5%;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
|
padding-bottom:10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-bottom: 2px solid rgba(107, 163, 237, 0.4);
|
//border-bottom: 2px solid rgba(107, 163, 237, 0.4);
|
||||||
|
|
||||||
> div:first-child {
|
> div:first-child {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.echart {
|
.echart {
|
||||||
height: 100%;
|
height: 270px;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin: 0px 0px 0px 10px;
|
margin: 0px 0px 0px 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ const initChart = (type, values) => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#wind-pressure {
|
#wind-pressure {
|
||||||
width: 830px;
|
width: 830px;
|
||||||
height: 779px;
|
//height: 779px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 185px;
|
top: 185px;
|
||||||
right: 68px;
|
right: 68px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tunnel-bgc">
|
<div class="tunnel-bgc">
|
||||||
<div class="box-top">
|
<div class="box-top">
|
||||||
<div class="back-tunnel" @click="handleGoTunnelMgr">
|
<div class="back-tunnel" @click="router.back(-1)">
|
||||||
<div class="back-icon"></div>
|
<div class="back-icon"></div>
|
||||||
<span>返回</span>
|
<span>返回</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
v-model="collectionFrequency"
|
v-model="fanFrequency"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,21 +52,21 @@
|
|||||||
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="fanData">
|
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="fanData">
|
||||||
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
||||||
<el-table-column prop="phaseCurrentAOffset" label="A电流偏移量" align="center"/>
|
<el-table-column prop="phaseCurrentAOffset" label="A电流偏移量" align="center"/>
|
||||||
<el-table-column prop="avoltageValue" label="A电流阈值" align="center">
|
<el-table-column prop="acurrentValue" label="A电流阈值" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="A电流" v-model="scope.row.avoltageValue"></el-input>
|
<el-input placeholder="A电流" v-model="scope.row.acurrentValue"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="phaseCurrentBOffset" label="B电流偏移量" align="center"/>
|
<el-table-column prop="phaseCurrentBOffset" label="B电流偏移量" align="center"/>
|
||||||
<el-table-column prop="bvoltageValue" label="B电流阈值" align="center">
|
<el-table-column prop="bcurrentValue" label="B电流阈值" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="B电流" v-model="scope.row.bvoltageValue"></el-input>
|
<el-input placeholder="B电流" v-model="scope.row.bcurrentValue"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="phaseCurrentCOffset" label="C电流偏移量" align="center"/>
|
<el-table-column prop="phaseCurrentCOffset" label="C电流偏移量" align="center"/>
|
||||||
<el-table-column prop="cvoltageValue" label="C电流阈值" align="center">
|
<el-table-column prop="ccurrentValue" label="C电流阈值" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="C电流" v-model="scope.row.cvoltageValue"></el-input>
|
<el-input placeholder="C电流" v-model="scope.row.ccurrentValue"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="state" label="状态" align="center">
|
<el-table-column prop="state" label="状态" align="center">
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="cancel-btn">
|
<div class="cancel-btn" @click="router.back(-1)">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="handleEditFan">
|
<div class="sure-btn" @click="handleEditFan">
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
v-model="collectionFrequency"
|
v-model="windFrequency"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,10 +150,10 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="cancel-btn">
|
<div class="cancel-btn" @click="router.back(-1)">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="handleEditFan">
|
<div class="sure-btn" @click="handleEditWind">
|
||||||
确定
|
确定
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
v-model="collectionFrequency"
|
v-model="otherFrequency"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,10 +210,10 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="cancel-btn" @click="isVisited=false">
|
<div class="cancel-btn" @click="router.back(-1)">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="handleEditFan">
|
<div class="sure-btn" @click="handleEditOther">
|
||||||
确定
|
确定
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
v-model="collectionFrequency"
|
v-model="fenFrequency"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -265,10 +265,10 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="cancel-btn" @click="isVisited=false">
|
<div class="cancel-btn" @click="router.back(-1)">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="handleEditFan">
|
<div class="sure-btn" @click="handleEditFen">
|
||||||
确定
|
确定
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -282,12 +282,15 @@
|
|||||||
import {getEquipmentList, editFan} from "@/api/tunnelManage";
|
import {getEquipmentList, editFan} from "@/api/tunnelManage";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {editEquipment, getTunnelDetail} from "@/api/tunnelManage";
|
import {editEquipment, getTunnelDetail} from "@/api/tunnelManage";
|
||||||
|
import {editAcquisitions} from "../../api/tunnelManage";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
||||||
const userId = reactive(router.currentRoute.value.params.userId)
|
const userId = reactive(router.currentRoute.value.params.userId)
|
||||||
const type = reactive(router.currentRoute.value.params.type)
|
const type = reactive(router.currentRoute.value.params.type)
|
||||||
const collectionFrequency = ref(0)
|
const fanFrequency = ref(0)
|
||||||
|
const windFrequency = ref(0)
|
||||||
|
const otherFrequency = ref(0)
|
||||||
const changeIndex = ref(1)
|
const changeIndex = ref(1)
|
||||||
const fanData = ref([
|
const fanData = ref([
|
||||||
// {
|
// {
|
||||||
@@ -473,25 +476,57 @@ const fenliuData = ref([
|
|||||||
])
|
])
|
||||||
const siteId = ref(0)
|
const siteId = ref(0)
|
||||||
const tunnelName = ref('')
|
const tunnelName = ref('')
|
||||||
|
const changeFrequency = (acquisition, typeKey) => {
|
||||||
const handleEditFan = () => {
|
const data = {
|
||||||
const data = [
|
acquisitionPeriod: acquisition,
|
||||||
...otherData.value,
|
tunnelId: tunnelId,
|
||||||
...winData.value,
|
typeKey: typeKey
|
||||||
...fanData.value,
|
}
|
||||||
]
|
editAcquisitions([data]).then(res => {
|
||||||
editFan(data).then(res => {
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success('修改成功')
|
|
||||||
router.push('/tunnel/' + siteId.value + '/' + type + '/' + userId)
|
} else {
|
||||||
}else {
|
|
||||||
ElMessage.error(res.msg)
|
ElMessage.error(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleEditFan = () => {
|
||||||
|
editFan(fanData.value).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
router.push('/tunnel/' + siteId.value + '/' + type + '/' + userId)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
changeFrequency(fanFrequency.value, 'frequency')
|
||||||
|
}
|
||||||
|
const handleEditWind = () => {
|
||||||
|
editEquipment(winData.value).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
router.push('/tunnel/' + siteId.value + '/' + type + '/' + userId)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
changeFrequency(windFrequency.value, 'windPressure')
|
||||||
|
}
|
||||||
|
const handleEditOther = () => {
|
||||||
|
editEquipment(otherData.value).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
router.push('/tunnel/' + siteId.value + '/' + type + '/' + userId)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
changeFrequency(otherFrequency.value, 'sensor')
|
||||||
|
}
|
||||||
const handleChangeMenu = (e) => {
|
const handleChangeMenu = (e) => {
|
||||||
changeIndex.value = e
|
changeIndex.value = e
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
getEquipmentList(tunnelId).then(res => {
|
getEquipmentList(tunnelId).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
@@ -505,8 +540,12 @@ const getList = () => {
|
|||||||
})
|
})
|
||||||
otherData.value = res.data.sensorList
|
otherData.value = res.data.sensorList
|
||||||
res.data.acquisitionList.map(item => {
|
res.data.acquisitionList.map(item => {
|
||||||
if (item.tunnelId == tunnelId) {
|
if(item.typeKey === 'frequency'){
|
||||||
collectionFrequency.value = item.acquisitionPeriod
|
fanFrequency.value = item.acquisitionPeriod
|
||||||
|
}else if(item.typeKey === 'windPressure'){
|
||||||
|
windFrequency.value = item.acquisitionPeriod
|
||||||
|
}else if(item.typeKey ==='sensor'){
|
||||||
|
otherFrequency.value = item.acquisitionPeriod
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -760,6 +799,8 @@ getList()
|
|||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
|
height: auto;
|
||||||
|
line-height: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import { editTunnel, getTunnelDetail } from "@/api/tunnelManage";
|
|||||||
import { computed, provide } from "vue";
|
import { computed, provide } from "vue";
|
||||||
import { useModelSceneStore } from "@/store/modelSceneStore";
|
import { useModelSceneStore } from "@/store/modelSceneStore";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
import {initSceneData} from "../../api/tunnelScene";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId);
|
const tunnelId = reactive(router.currentRoute.value.params.tunnelId);
|
||||||
@@ -58,21 +59,22 @@ const form = ref({
|
|||||||
isDefault: false,
|
isDefault: false,
|
||||||
remarks: "",
|
remarks: "",
|
||||||
});
|
});
|
||||||
const equipmentList = ref([]);
|
|
||||||
onMounted(async () => {
|
|
||||||
// equipmentList.value = await store.getEquipmentList();
|
|
||||||
});
|
|
||||||
const getTunnel = () => {
|
const getTunnel = () => {
|
||||||
getTunnelDetail(tunnelId).then((res) => {
|
getTunnelDetail(tunnelId).then((res) => {
|
||||||
if (res?.code === 1000) {
|
if (res?.code === 1000) {
|
||||||
form.value = res.data;
|
form.value = res.data;
|
||||||
|
console.log('form.value ',form.value )
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getTunnel();
|
getTunnel();
|
||||||
const tunnelLength = computed(() => form.value.totalLength);
|
const tunnelLength = computed(() => form.value.totalLength);
|
||||||
const handleGotoDevice = () => {
|
const handleGotoDevice = () => {
|
||||||
router.push("/device/" + tunnelId);
|
if (type === 's') {
|
||||||
|
router.push('/device/' + tunnelId + '/s/' + userId)
|
||||||
|
} else if (type === 'i') {
|
||||||
|
router.push('/device/' + tunnelId + '/i/' + userId)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const handleGoTunnelMgr = () => {
|
const handleGoTunnelMgr = () => {
|
||||||
router.push("/tunnel/" + form.value.siteId + "/" + type + "/" + userId);
|
router.push("/tunnel/" + form.value.siteId + "/" + type + "/" + userId);
|
||||||
@@ -87,7 +89,7 @@ const handleSave = async () => {
|
|||||||
// constructionLength: 500,
|
// constructionLength: 500,
|
||||||
tunnelLength: form.value.totalLength,
|
tunnelLength: form.value.totalLength,
|
||||||
isDefault: form.value.isDefault,
|
isDefault: form.value.isDefault,
|
||||||
modelEquipmentList: await modelStore.getEquipmentList(),
|
modelEquipmentList: await modelStore.initModelDataPreview(tunnelId),
|
||||||
};
|
};
|
||||||
editTunnel(data).then((res) => {
|
editTunnel(data).then((res) => {
|
||||||
if (res?.code === 1000) {
|
if (res?.code === 1000) {
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ const getOtherInfo = () => {
|
|||||||
getLargeScreenInfo().then((res) => {
|
getLargeScreenInfo().then((res) => {
|
||||||
if (res?.code === 1000) {
|
if (res?.code === 1000) {
|
||||||
let routeArr = [];
|
let routeArr = [];
|
||||||
console.log(res.data.routeList, "res.data.routeList")
|
|
||||||
res.data.routeList.forEach((item, index) => {
|
res.data.routeList.forEach((item, index) => {
|
||||||
for (let btn of btnList.value) {
|
for (let btn of btnList.value) {
|
||||||
if (item === btn.route) {
|
if (item === btn.route) {
|
||||||
@@ -186,9 +185,9 @@ const getOtherInfo = () => {
|
|||||||
routeList.value = routeArr
|
routeList.value = routeArr
|
||||||
showMenu.value = true
|
showMenu.value = true
|
||||||
siteList.value = res.data.siteOption
|
siteList.value = res.data.siteOption
|
||||||
currentSiteId.value = res.data.siteOption[res.data.siteOption.length - 1].value
|
currentSiteId.value = res.data.siteOption[0].value
|
||||||
currentSite.value = res.data.siteOption[res.data.siteOption.length - 1].label
|
currentSite.value = res.data.siteOption[0].label
|
||||||
getTunnel(res.data.siteOption[res.data.siteOption.length - 1].value)
|
getTunnel(res.data.siteOption[0].value)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user