WholeProcessPlatform/frontend/src/store/modules/model.ts

78 lines
2.1 KiB
TypeScript
Raw Normal View History

import { defineStore } from 'pinia';
import { ref } from 'vue';
export const useModelStore = defineStore('model', () => {
// state
const modalVisible = ref(false);
2026-06-15 09:18:00 +08:00
const ylfbModalVisible = ref(false); // 鱼类分布弹窗显示状态
const currentTabKey = ref('basicInfo');
const tabList = ref([]);
const title = ref('');
const isBasicEdit = ref(false);
const showStcdSelector = ref(false); // 是否显示下拉框
2026-06-15 09:18:00 +08:00
const stcdOptions = ref<Array<{ label: string; value: string }>>([]); // 可选测站列表
2026-06-12 16:59:35 +08:00
// 新增:功能迁移所需的状态字段
const baseId = ref<string>(''); // 当前基地 ID
const hasPowerStatData = ref<boolean>(false); // 电站是否有专题数据
const isPowerStatPage = ref<boolean>(false); // 是否在电站专题页面
const verticalWaterStcd = ref<string>(''); // 垂向水温子站点编码
const aiSites = ref<any[]>([]); // AI 识别站点列表
const wtConfig = ref<{ ioWtrv?: boolean; hasRstcdWtvt?: boolean }>({}); // 水温配置
const wqShow = ref<boolean>(false); // 水质 AI 预测显示
const fishTabInfo = ref<any>(null); // 鱼类监测数据信息
2026-06-15 09:18:00 +08:00
const params = ref<{
sttp: string;
2026-05-26 19:30:22 +08:00
stcd: any;
date: any;
2026-06-03 17:10:34 +08:00
show: any;
2026-06-15 09:18:00 +08:00
enfc: any;
eqtp: any;
2026-06-12 16:59:35 +08:00
baseId?: string; // 新增:基地 ID
sttpCode?: string; // 新增:站点类型代码
sttpMap?: string; // 新增:站点类型映射
dtinType?: string;
bldstt: string;
}>({
2026-05-26 19:30:22 +08:00
sttp: 'eng',
stcd: '',
date: '',
show: true,
2026-06-15 09:18:00 +08:00
enfc: '0',
eqtp: '',
2026-06-12 16:59:35 +08:00
baseId: '',
sttpCode: '',
sttpMap: '',
2026-06-15 09:18:00 +08:00
dtinType: '',
bldstt: ''
});
2026-06-15 14:10:19 +08:00
const filter = ref({
stllgzlx: '', // 生态流量 - 规则类型
stllTmType: '', // 生态流量 - 时间类型
tm: '',
rangeTm: []
});
return {
params,
modalVisible,
2026-06-15 09:18:00 +08:00
ylfbModalVisible, // 鱼类分布弹窗显示状态
currentTabKey,
tabList,
title,
isBasicEdit,
2026-06-15 09:18:00 +08:00
showStcdSelector, // 新增
stcdOptions, // 新增
2026-06-15 14:10:19 +08:00
filter,
2026-06-12 16:59:35 +08:00
// 新增返回字段
baseId,
hasPowerStatData,
isPowerStatPage,
verticalWaterStcd,
aiSites,
wtConfig,
wqShow,
2026-06-15 09:18:00 +08:00
fishTabInfo
};
2026-06-15 09:18:00 +08:00
});