<template> <div id="guanwangpoumian"> <div class="echartbody"> <commonUnderGround :componentData="GetpoumianList"></commonUnderGround> </div> </div> </template> <script setup name="guanwangpoumian"> import moment from "moment"; import commonUnderGround from "@/views/pictureOnMap/page/components/DialogTabs/component/commonUnderGround.vue"; const { proxy } = getCurrentInstance(); import { getSectionByWellCode, getSectionByWellCodeDetail, } from "@/api/MonitorAssetsOnMap"; const props = defineProps({ Getproperties: { type: Object, }, }); const GetpoumianList = ref({}); function GWpoumian() { let wellcode = props.Getproperties.wellcode ? props.Getproperties.wellcode : ""; if (wellcode) { if (props.Getproperties.daterange && props.Getproperties.GWDADataNow) { let params = { wellcode, // time:moment(props.Getproperties.daterange[0]).format("YYYY-MM-DD") id: props.Getproperties.id, }; getSectionByWellCodeDetail(params).then((res) => { if (res && res.code == 200) { console.log("res.data", res.data); GetpoumianList.value = res.data; } }); } else { getSectionByWellCode(wellcode).then((res) => { console.log("res.data", res.data); GetpoumianList.value = res.data; }); } } else { console.log("没有wellcode", props.Getproperties); // proxy.$modal.msgSuccess(""); } } onMounted(() => { GWpoumian(); }); </script> <style lang="scss" scoped> #guanwangpoumian { width: 100%; height: 100%; color: #ccefff; .echartbody { width: 100%; height: 100%; } } </style>