fix : 修复隧道编辑bug,注释log

This commit is contained in:
2024-09-18 19:52:38 +08:00
parent 2dc7844688
commit 6dcbd23ef4
9 changed files with 36 additions and 14 deletions

View File

@@ -4,13 +4,23 @@ import { apiSaveEquipment, initSceneData } from "../api/tunnelScene";
export const useModelSceneStore = defineStore("modelSceneData", () => {
let equipmentList = ref([]);
let tunnelGatewayDtoList = ref([]);
let serialNumber = ref("");
let tunnelAlias = ref("");
let serialNumberPrefix = ref("");
let requestOtherConfig = ref({});
function initModelData(tunnelId, otherConfig) {
return new Promise((resolve, reject) => {
console.info("🚀 ~method:otherConfig -----", otherConfig)
tunnelAlias.value=otherConfig.tunnelAlias
handleSettingOtherConfig(otherConfig, requestOtherConfig);
initSceneData(tunnelId)
.then((res) => {
console.info("🚀 ~method:res -----", res)
serialNumber.value=res.data.serialNumber
serialNumberPrefix.value=res.data.serialNumberPrefix
tunnelGatewayDtoList.value=res.data.tunnelGatewayVoList
if (res.data.tunnelThreeConfig) {
equipmentList.value = JSON.parse(res.data.tunnelThreeConfig);
} else {
@@ -34,6 +44,10 @@ export const useModelSceneStore = defineStore("modelSceneData", () => {
return new Promise((resolve, reject) => {
initSceneData(tunnelId)
.then((res) => {
console.info("🚀 ~method:initSceneData -----", res)
serialNumber.value=res.data.serialNumber
serialNumberPrefix.value=res.data.serialNumberPrefix
tunnelGatewayDtoList.value=res.data.tunnelGatewayVoList
if (res.data.tunnelThreeConfig) {
equipmentList.value = JSON.parse(res.data.tunnelThreeConfig);
} else {
@@ -61,6 +75,10 @@ export const useModelSceneStore = defineStore("modelSceneData", () => {
pointGap
),
modelEquipmentList: toRaw(equipmentList.value),
serialNumber:serialNumber.value,
tunnelAlias:tunnelAlias.value,
serialNumberPrefix:serialNumberPrefix.value,
tunnelGatewayDtoList:tunnelGatewayDtoList.value,
...requestOtherConfig,
})
.then((res) => {
@@ -91,6 +109,10 @@ export const useModelSceneStore = defineStore("modelSceneData", () => {
pointGap
),
modelEquipmentList: toRaw(equipmentList.value),
serialNumber:serialNumber.value,
tunnelAlias:tunnelAlias.value,
serialNumberPrefix:serialNumberPrefix.value,
tunnelGatewayDtoList:tunnelGatewayDtoList.value,
...requestOtherConfig,
})
.then((res) => {