import { defineStore } from 'pinia'; import { ref } from 'vue'; export const useModelStore = defineStore('model', () => { // state const modalVisible = ref(false); const currentTabKey = ref("basicInfo"); const tabList = ref([]); const title = ref(''); const isBasicEdit = ref(false); const showStcdSelector = ref(false); // 是否显示下拉框 const stcdOptions = ref>([]); // 可选测站列表 // 新增:功能迁移所需的状态字段 const baseId = ref(''); // 当前基地 ID const hasPowerStatData = ref(false); // 电站是否有专题数据 const isPowerStatPage = ref(false); // 是否在电站专题页面 const verticalWaterStcd = ref(''); // 垂向水温子站点编码 const aiSites = ref([]); // AI 识别站点列表 const wtConfig = ref<{ ioWtrv?: boolean; hasRstcdWtvt?: boolean }>({}); // 水温配置 const wqShow = ref(false); // 水质 AI 预测显示 const fishTabInfo = ref(null); // 鱼类监测数据信息 const params = ref<{ sttp: string; stcd: any; date: any; show: any; enfc:any; eqtp:any; baseId?: string; // 新增:基地 ID sttpCode?: string; // 新增:站点类型代码 sttpMap?: string; // 新增:站点类型映射 dtinType?: string; bldstt: string; }>({ sttp: 'eng', stcd: '', date: '', show: true, enfc:'0', eqtp:'', baseId: '', sttpCode: '', sttpMap: '', dtinType:'', bldstt:'', }); const filterStll= ref('') return { params, modalVisible, currentTabKey, tabList, title, isBasicEdit, showStcdSelector, // 新增 stcdOptions, // 新增 filterStll, // 新增返回字段 baseId, hasPowerStatData, isPowerStatPage, verticalWaterStcd, aiSites, wtConfig, wqShow, fishTabInfo, }; });