Newer
Older
DH_Apicture / src / views / pictureOnMap / page / components / DialogTabs / component / guanwangpoumian.vue
@leishan leishan 25 days ago 1 KB 修改
<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 : "";
  // let wellcode = props.Getproperties.wellcode ? props.Getproperties.wellcode : 'YS77721510';
  if (wellcode) {
    
    if(props.Getproperties.daterange){
      let params={
        wellcode,
        time:moment(props.Getproperties.daterange[0]).format("YYYY-MM-DD")
      }
      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>