<script setup lang="ts">
import { onMounted, ref } from "vue";
import JidiSelectorMod from "@/modules/jidiSelectorMod.vue";
import RightDrawer from "@/components/RightDrawer/index.vue";
import jidiInfoMod from "@/modules/jidiInfoMod/index.vue";
import shuidianhuangjingjieruMod from "@/modules/shuidianhuangjingjieruMod/index.vue";
import { useModelStore } from "@/store/modules/model";

const modelStore = useModelStore();
// import { getQgcStaticData } from "@/api/ecoFlow";
onMounted(() => {
  // const params = {
  //   filter: {
  //     logic: "and",
  //     filters: [
  //       { field: "dtin", operator: "eq", dataType: "string", value: "1" },
  //       { field: "type", operator: "eq", dataType: "string", value: "hour" },
  //       { field: "tm", operator: "gte", dataType: "date", value: "2026-03-02 00:00:00" },
  //       { field: "tm", operator: "lte", dataType: "date", value: "2026-04-02 23:59:59" },
  //     ],
  //   },
  // };
  // getQgcStaticData(params).then((res) => {
  //   console.log(res);
  // });
});

const showMapModal = () => {
  modelStore.modalVisible = true;
  modelStore.params.sttp = "ENG";
  modelStore.title = "三峡 详情信息";
  modelStore.isBasicEdit = true;
};
const showMapModal1 = () => {
  modelStore.modalVisible = true;
  modelStore.params.sttp = "wt_point";
  modelStore.title = "水温 详情信息";
  modelStore.isBasicEdit = true;
};
const showMapModal2 = () => {
  modelStore.modalVisible = true;
  modelStore.params.sttp = "fh_wq_point";
  modelStore.title = "水质 详情信息";
  modelStore.isBasicEdit = true;
};
const showMapModal3 = () => {
  modelStore.modalVisible = true;
  modelStore.params.sttp = "fh_point";
  modelStore.title = "栖息地 详情信息";
  modelStore.isBasicEdit = true;
};//
const showMapModal4 = () => {
  modelStore.modalVisible = true;
  modelStore.params.sttp = "fh_zq_point";
  modelStore.title = "栖息地流量 详情信息";
  modelStore.isBasicEdit = true;
};
</script>

<template>
  <div class="moduleContent">
    <div class="leftContent">
      <JidiSelectorMod />
    </div>
    <div class="rightContent">
      <RightDrawer>
        <a-button @click="showMapModal">打开电站弹窗</a-button>
        <a-button @click="showMapModal1">打开水温弹窗</a-button>
        <!-- <a-button @click="showMapModal2">打开水质弹窗</a-button> -->
        <!-- <a-button @click="showMapModal3">打开栖息地弹窗</a-button> -->
        <a-button @click="showMapModal4">打开栖息地流量弹窗</a-button>
        <jidiInfoMod />
        <shuidianhuangjingjieruMod />
      </RightDrawer>
    </div>
  </div>
</template>
<style scoped lang="scss"></style>
