邓洁: 修改bug

This commit is contained in:
邓洁
2023-12-30 20:11:32 +08:00
parent 1dd856e2ca
commit 3150343a40
8 changed files with 100 additions and 49 deletions

View File

@@ -45,6 +45,7 @@ import { editTunnel, getTunnelDetail } from "@/api/tunnelManage";
import { computed, provide } from "vue";
import { useModelSceneStore } from "@/store/modelSceneStore";
import { ElMessage } from "element-plus";
import {initSceneData} from "../../api/tunnelScene";
const router = useRouter();
const tunnelId = reactive(router.currentRoute.value.params.tunnelId);
@@ -58,21 +59,22 @@ const form = ref({
isDefault: false,
remarks: "",
});
const equipmentList = ref([]);
onMounted(async () => {
// equipmentList.value = await store.getEquipmentList();
});
const getTunnel = () => {
getTunnelDetail(tunnelId).then((res) => {
if (res?.code === 1000) {
form.value = res.data;
console.log('form.value ',form.value )
}
});
};
getTunnel();
const tunnelLength = computed(() => form.value.totalLength);
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 = () => {
router.push("/tunnel/" + form.value.siteId + "/" + type + "/" + userId);
@@ -87,7 +89,7 @@ const handleSave = async () => {
// constructionLength: 500,
tunnelLength: form.value.totalLength,
isDefault: form.value.isDefault,
modelEquipmentList: await modelStore.getEquipmentList(),
modelEquipmentList: await modelStore.initModelDataPreview(tunnelId),
};
editTunnel(data).then((res) => {
if (res?.code === 1000) {