diff --git a/src/api/tunnelManage.js b/src/api/tunnelManage.js index 9374a38..6d850d2 100644 --- a/src/api/tunnelManage.js +++ b/src/api/tunnelManage.js @@ -42,7 +42,7 @@ export const getEquipmentList = (tunnelId) => { export const editTunnel = (data) => { return request({ url: '/tunnel/model/details', - method: 'post', + method: 'put', data }) -} \ No newline at end of file +} diff --git a/src/store/modelSceneStore.js b/src/store/modelSceneStore.js index dc6d4e3..3767c9b 100644 --- a/src/store/modelSceneStore.js +++ b/src/store/modelSceneStore.js @@ -4,6 +4,7 @@ import { saveEquipment, initSceneData } from "../api/tunnelScene"; import { ElMessage } from "element-plus"; export const useModelSceneStore = defineStore("modelSceneData", () => { let equipmentList = ref("[]"); + let allEditList = ref({}); function initData(tunnelId = 1) { initSceneData(tunnelId) .then((res) => { @@ -43,12 +44,24 @@ export const useModelSceneStore = defineStore("modelSceneData", () => { }); }); } - + function getTunnelEditAllList(tunnelId = 1) { + return new Promise((resolve, reject) => { + initSceneData(tunnelId) + .then((res) => { + allEditList.value = res.data; + resolve(JSON.parse(allEditList.value)); + }) + .catch((Error) => { + reject(); + }); + }); + } return { equipmentList, initData, saveSceneData, deleteEquipment, getEquipmentList, + getTunnelEditAllList, }; }); diff --git a/src/views/edit/edit.vue b/src/views/edit/edit.vue index 8998112..3f44d2d 100644 --- a/src/views/edit/edit.vue +++ b/src/views/edit/edit.vue @@ -1,8 +1,15 @@ - \ No newline at end of file diff --git a/src/views/site/index.vue b/src/views/site/index.vue index 1989098..b25ba6d 100644 --- a/src/views/site/index.vue +++ b/src/views/site/index.vue @@ -34,7 +34,7 @@
{{ item.info.tunnelName }}
施工长度{{ item.info.constructionLength }}米
-
实现长度{{ item.info.totalLength }}公里 +
实现长度{{ item.info.totalLength }}米
@@ -177,6 +177,7 @@ const handleClickSite = (type) => { if (type.checked) { siteIds.value.push(type.siteId) siteNameList.value.push(type.siteName) + } else { siteIds.value.map((item, index) => { if (item === type.siteId) { @@ -408,7 +409,7 @@ const handleCurrentChange = (val) => { flex-wrap: wrap; padding-left: 100px; padding-right: 100px; - justify-content: space-between; + //justify-content: space-between; box-sizing: border-box; overflow: hidden; @@ -432,7 +433,7 @@ const handleCurrentChange = (val) => { .site-box { margin-top: 122px; - //margin-right: 1%; + margin-right: 32px; padding: 40px 50px; width: 1250px; height: 750px; diff --git a/src/views/tunnel-manage/index.vue b/src/views/tunnel-manage/index.vue index 948e2b1..87bf71e 100644 --- a/src/views/tunnel-manage/index.vue +++ b/src/views/tunnel-manage/index.vue @@ -243,6 +243,7 @@ const pageInfo = reactive({ const total = ref(10); const getList = () => { getTunnelList({ + siteId:siteId, ...pageInfo }).then(res => { if (res.code === 1000) { diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index 39b02f2..3ebe473 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -114,7 +114,6 @@ onMounted(() => { }); getUser() getOtherInfo() - }); const getUser = () => { getUserInfo().then(res => { @@ -134,8 +133,8 @@ const getOtherInfo = () => { } }); }; -const getScreenInfo = async (id) => { - await getLargeScreen(id).then((res) => { +const getScreenInfo = (id) => { + getLargeScreen(id).then((res) => { if (res?.code === 1000) { largeScreenData.value = res.data; } @@ -146,7 +145,7 @@ const getTunnel = (id) => { getTunnelBySiteId(id).then((res) => { if (res?.code === 1000) { tunnelList.value = res.data - getScreenInfo(res.data[0].value) + // getScreenInfo(res.data[0].value) } }); }