diff --git a/src/views/edit/edit.vue b/src/views/edit/edit.vue index eca13aa..8254db5 100644 --- a/src/views/edit/edit.vue +++ b/src/views/edit/edit.vue @@ -25,9 +25,9 @@ - - - + + + @@ -56,7 +56,6 @@ const router = useRouter(); const tunnelId = reactive(router.currentRoute.value.params.tunnelId); const userId = reactive(router.currentRoute.value.params.userId); const type = reactive(router.currentRoute.value.params.type); -const constructionLength = ref(0) const modelEquipmentList = ref(null) const form = ref({ tunnelName: "", @@ -65,13 +64,10 @@ const form = ref({ isDefault: false, remarks: "", }); -const getTunnel = (type) => { +const getTunnel = () => { getTunnelDetail(tunnelId).then((res) => { if (res?.code === 1000) { form.value = res.data; - if (type == 1) { - constructionLength.value = res.data.constructionLength - } } }); }; @@ -89,11 +85,7 @@ const handleGoTunnelMgr = () => { }; const getTunnelInfo = () => { initSceneData(tunnelId).then((res) => { - constructionLength.value = res.data.constructionLength modelEquipmentList.value = JSON.parse(res.data.tunnelThreeConfig) - if(constructionLength.value===null){ - constructionLength.value=0 - } if(modelEquipmentList.value===null){ modelEquipmentList.value=[] } @@ -103,8 +95,7 @@ const getTunnelInfo = () => { tunnelAlias: form.value.tunnelAlias, serialNumber: form.value.serialNumber, remarks: form.value.remarks, - constructionLength: constructionLength.value, - // constructionLength: form.value.constructionLength, + constructionLength: form.value.constructionLength, tunnelLength: form.value.totalLength, isDefault: form.value.isDefault, modelEquipmentList: modelEquipmentList.value, diff --git a/src/views/tunnel-manage/index.vue b/src/views/tunnel-manage/index.vue index be10f9d..e027b80 100644 --- a/src/views/tunnel-manage/index.vue +++ b/src/views/tunnel-manage/index.vue @@ -79,9 +79,9 @@ - - - + + +