公共弹框添加生态流量,修改公共表格插槽

This commit is contained in:
扈兆增 2026-06-08 09:33:06 +08:00
parent ebf6a57a31
commit 3ecf5c99d3
9 changed files with 785 additions and 132 deletions

View File

@ -3,7 +3,7 @@ NODE_ENV='production'
VITE_APP_TITLE = 'qgc-buji-web' VITE_APP_TITLE = 'qgc-buji-web'
VITE_APP_PORT = 3000 VITE_APP_PORT = 3000
VITE_APP_BASE_API = '/' VITE_APP_BASE_API = '/prod-api'
## 生产环境API地址 ## 生产环境API地址
VITE_APP_BASE_URL = 'http://localhost:8093' VITE_APP_BASE_URL = 'http://localhost:8093'
## 生产环境导入预览地址 ## 生产环境导入预览地址

View File

@ -62,3 +62,19 @@ export function getMonitorData(data: any) {
data data
}); });
} }
// 生态流量 -限制范围查询
export function getEngLimit(data: any) {
return request({
url: '/eq/data/getEngLimit',
method: 'post',
data
});
}
// 生态流量 - 限制范围查询 - 日
export function getEngLimitDay(data: any) {
return request({
url: '/eq/interval/qgc/day/GetKendoListCust',
method: 'post',
data
});
}

View File

@ -11,16 +11,27 @@
:row-key="rowKey" :row-key="rowKey"
@change="handleTableChange" @change="handleTableChange"
> >
<!-- 透传插槽支持自定义列内容 --> <!-- 使用 bodyCell 插槽透传自定义列内容 -->
<template v-for="slot in Object.keys($slots)" #[slot]="scope" :key="slot"> <template #bodyCell="{ column, text, record, index }">
<slot :name="slot" v-bind="scope"></slot> <template v-for="slotName in customSlotNames" :key="slotName">
<slot
v-if="
column._slotName === slotName || column.dataIndex === slotName
"
:name="slotName"
:column="column"
:text="text"
:record="record"
:index="index"
></slot>
</template>
</template> </template>
</a-table> </a-table>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, watch, nextTick, h } from 'vue'; import { ref, computed, onMounted, watch, nextTick, h, useSlots } from 'vue';
import { Tooltip } from 'ant-design-vue'; import { Tooltip } from 'ant-design-vue';
import { calcTableScrollY } from '@/utils/index'; import { calcTableScrollY } from '@/utils/index';
@ -129,6 +140,15 @@ const paginationConfig = computed(() => ({
pageSizeOptions: ['20', '50', '100'] pageSizeOptions: ['20', '50', '100']
})); }));
const $slots = useSlots();
// --- ---
const customSlotNames = computed(() => {
return Object.keys($slots).filter(
name => name !== 'bodyCell' && name !== 'headerCell'
);
});
// --- Methods --- // --- Methods ---
const getList = async (filter?: Record<string, any>) => { const getList = async (filter?: Record<string, any>) => {
if (props.data.length > 0) return; if (props.data.length > 0) return;
@ -242,18 +262,34 @@ const processData = (records: any[]) => {
}); });
}; };
// --- + Tooltip--- // --- + Tooltip + ---
const enhancedColumns = computed(() => { const enhancedColumns = computed(() => {
if (!props.enableEllipsis) return props.columns;
return props.columns.map(col => { return props.columns.map(col => {
if (col.customRender) { // slots.customRender slots bodyCell dataIndex
return col; // if (col.slots?.customRender) {
const { slots, ...restCol } = col;
return {
...restCol,
// slotName bodyCell 使
_slotName: slots.customRender,
...(props.enableEllipsis ? { ellipsis: true } : {})
};
} }
// customRender
if (col.customRender) {
return {
...col,
...(props.enableEllipsis && !col.ellipsis ? { ellipsis: true } : {})
};
}
// ellipsis tooltip
if (!props.enableEllipsis) return col;
return { return {
...col, ...col,
ellipsis: true, // Ant Design Vue ellipsis ellipsis: true,
customRender: ({ text }: any) => { customRender: ({ text }: any) => {
const content = String(text ?? props.emptyPlaceholder); const content = String(text ?? props.emptyPlaceholder);
return h(Tooltip, { title: content }, () => return h(Tooltip, { title: content }, () =>

View File

@ -1,12 +1,550 @@
<template> <template>
<div> <div class="ecological-flow">
生态流量 <!-- 顶部信息区 -->
<div class="top-section">
<div class="top-bar">
<div class="info-row">
<div class="info-item">
<span class="label">累计不达标次数</span>
<span class="value" :style="{ color: '#1890ff' }">{{
unqualifiedCount ?? '-'
}}</span>
</div>
<div class="info-item">
<span class="label">生态流量达标率</span>
<span class="value">{{
complianceRate ? complianceRate + '%' : '-'
}}</span>
</div>
<div class="info-item">
<span class="label">生态流量限值{{ limitInfo || '-' }}</span>
</div>
</div>
<div class="filter-row">
<a-select
v-model:value="timeType"
style="width: 120px"
:options="timeTypeOptions"
/>
<a-range-picker
v-model:value="dateRange"
:format="dateFormat"
:show-time="showTime ? showTimeConfig : false"
:allowClear="false"
style="margin-left: 12px"
:presets="datePresets"
/>
<a-button
type="primary"
style="margin-left: 12px"
@click="handleQuery"
>查询</a-button
>
</div>
</div>
</div> </div>
<!-- 底部图表区 -->
<div class="bottom-section">
<a-spin :spinning="isChartLoading" tip="加载中...">
<div class="chart-wrapper" ref="chartRef"></div>
</a-spin>
</div>
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from 'vue'; import { ref, onMounted, computed, watch, onUnmounted, nextTick } from 'vue';
import * as echarts from 'echarts';
import { getEngLimit, getEngLimitDay } from '@/api/mapModal';
import { useModelStore } from '@/store/modules/model';
import { DateSetting } from '@/utils/enumeration';
import dayjs from 'dayjs';
const modelStore = useModelStore();
const props = defineProps({
isActive: {
type: Boolean,
default: false
},
code: {
type: String,
default: ''
}
});
const hasLoaded = ref<boolean>(false); //
const isChartLoading = ref<boolean>(false);
const unqualifiedCount = ref<number>(0);
const complianceRate = ref<string>('');
const limitInfo = ref<string>('');
//
const timeType = ref<string>('day');
const timeTypeOptions = [
{ label: '日', value: 'day' },
{ label: '小时', value: 'hour' }
];
//
const initDateRange = (): [dayjs.Dayjs, dayjs.Dayjs] => {
const endDate = dayjs();
const startDate = dayjs().subtract(1, 'month');
return [startDate, endDate];
};
const dateRange = ref<[dayjs.Dayjs, dayjs.Dayjs] | undefined>(initDateRange());
//
const showTime = computed(() => timeType.value === 'hour');
const dateFormat = computed(() =>
timeType.value === 'hour' ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD'
);
const datePresets = computed(() =>
timeType.value === 'day'
? DateSetting.RangeButton.month1
: DateSetting.RangeButton.hour
);
const showTimeConfig = {
format: 'HH:mm',
hourStep: 1,
minuteStep: 5,
secondStep: 60
};
//
const getDateRange = (): { startTime: string; endTime: string } => {
if (dateRange.value) {
return {
startTime: dateRange.value[0].format('YYYY-MM-DD HH:mm:ss'),
endTime: dateRange.value[1].format('YYYY-MM-DD HH:mm:ss')
};
}
return {
startTime: dayjs().startOf('month').format('YYYY-MM-DD HH:mm:ss'),
endTime: dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
};
};
//
const fetchLimitInfo = async () => {
try {
const stcd = modelStore.params.stcd;
const { startTime, endTime } = getDateRange();
const res = await getEngLimit({
filter: {
logic: 'and',
filters: [
{ field: 'stcd', operator: 'eq', dataType: 'string', value: stcd },
{
field: 'startTime',
operator: 'gte',
dataType: 'date',
value: startTime
},
{
field: 'endTime',
operator: 'gte',
dataType: 'date',
value: endTime
}
]
}
});
if (res?.data) {
limitInfo.value = res.data.eqmnStr || '';
}
} catch (error) {
console.error('获取限值信息失败:', error);
}
};
//
const fetchDayData = async () => {
try {
const stcd = modelStore.params.stcd;
const { startTime, endTime } = getDateRange();
const res = await getEngLimitDay({
filter: {
logic: 'and',
filters: [
{ field: 'stcd', operator: 'eq', dataType: 'string', value: stcd },
{
field: 'tm',
operator: 'gte',
dataType: 'date',
value: startTime
},
{
field: 'tm',
operator: 'lte',
dataType: 'date',
value: endTime
}
]
}
});
if (res?.data && res?.data?.data && res?.data?.data[0]) {
const record = res.data?.data[0]?.lastTmEngEqDataVo || res.data?.data[0];
if (
res.data?.data[0]?.qecRate !== null &&
res.data?.data[0]?.qecRate !== undefined
) {
complianceRate.value = Number(res.data?.data[0]?.qecRate).toFixed(2);
}
if (record.qecC !== null && record.qecC !== undefined) {
unqualifiedCount.value = record.qecC;
}
}
} catch (error) {
console.error('获取日数据失败:', error);
}
};
// ==================== ====================
const chartRef = ref<HTMLDivElement | null>(null);
let chartInstance: echarts.ECharts | null = null;
//
const getMockData = () => {
const now = dayjs();
const data: any[] = [];
const count = timeType.value === 'hour' ? 48 : 30; // 4830
for (let i = count - 1; i >= 0; i--) {
const tm =
timeType.value === 'hour'
? now.subtract(i, 'hour').format('YYYY-MM-DD HH:mm:ss')
: now.subtract(i, 'day').format('YYYY-MM-DD HH:mm:ss');
data.push({
tm,
qi: Math.round(Math.random() * 100 + 150), // 150-250
qec: Math.round(Math.random() * 50 + 100), // 100-150
qecLimit: 145, //
qecSameLastYear: Math.round(Math.random() * 60 + 90) // 90-150
});
}
return data;
};
//
const updateChart = (data: any[]) => {
if (!chartInstance) return;
if (!data || data.length === 0) {
chartInstance.clear();
return;
}
//
const sorted = [...data].sort(
(a, b) => new Date(a.tm).getTime() - new Date(b.tm).getTime()
);
const xAxisData = sorted.map(item => dayjs(item.tm).format('MM-DD HH:mm'));
const qiData = sorted.map(item => item.qi);
const qecData = sorted.map(item => item.qec);
const qecLimitData = sorted.map(item => item.qecLimit);
const qecSameLastYearData = sorted.map(item => item.qecSameLastYear);
// Y
const flowValues = [
...qiData,
...qecData,
...qecLimitData,
...qecSameLastYearData
].filter(v => v !== null && v !== undefined);
const flowMax = flowValues.length > 0 ? Math.max(...flowValues) : 200;
const flowYMax = Math.ceil(flowMax * 1.1);
const flowYMin = Math.floor(Math.min(...flowValues) * 0.9);
const option = {
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(50, 50, 50, 0.9)',
textStyle: { color: '#fff', fontSize: 12 },
axisPointer: { type: 'cross' },
formatter: (params: any) => {
if (!params || params.length === 0) return '';
const dataIndex = params[0].dataIndex;
const fullTime = sorted[dataIndex]?.tm
? dayjs(sorted[dataIndex].tm).format('YYYY-MM-DD HH:mm:ss')
: '';
let html = `<div style="font-size:16px;margin-bottom:8px;">${fullTime}</div>`;
//
const formatRules: Record<
string,
{ format: (v: number) => string; unit: string }
> = {
入库流量: { format: v => String(Math.round(v)), unit: '(m³/s)' },
生态流量: { format: v => v.toFixed(1), unit: '(m³/s)' },
生态流量限值: { format: v => v.toFixed(1), unit: '(m³/s)' },
去年同期生态流量: { format: v => v.toFixed(1), unit: '(m³/s)' }
};
params.forEach((param: any) => {
if (param.value == null) return;
const rule = Object.entries(formatRules).find(([key]) =>
param.seriesName.includes(key)
);
const displayValue = rule
? rule[1].format(Number(param.value))
: param.value;
const unit = rule ? rule[1].unit : '';
html += `
<div style="display:flex;align-items:center;justify-content:space-between;margin:4px 0;">
<span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${param.color};margin-right:8px;"></span>
<span style="flex:1;font-size:14px;text-align:left;margin-right:6px;">${param.seriesName}: </span>
<span style="font-size:14px;min-width:60px;text-align:right;"><strong>${displayValue}</strong> ${unit}</span>
</div>
`;
});
return html;
}
},
legend: {
type: 'scroll',
top: 10,
data: ['入库流量', '生态流量', '生态流量限值', '去年同期生态流量'],
textStyle: { fontSize: 14, color: '#000' }
},
grid: {
left: 60,
right: 40,
top: 80,
bottom: 60
},
xAxis: {
type: 'category',
data: xAxisData,
axisLine: { lineStyle: { color: '#000000' } },
axisTick: { show: false },
axisLabel: {
fontSize: 12
},
splitLine: {
show: true,
lineStyle: { color: '#bfbfbf', type: 'solid' }
}
},
yAxis: {
name: '流量(m³/s)',
type: 'value',
position: 'left',
axisLine: { lineStyle: { color: '#000000' } },
scale: true,
splitNumber: 9,
boundaryGap: ['10%', 0]
},
series: [
{
name: '入库流量',
type: 'line',
data: qiData,
smooth: true,
symbol: 'circle',
symbolSize: 4,
lineStyle: { color: '#4B79AB', width: 2 },
itemStyle: { color: '#4B79AB' }
},
{
name: '生态流量',
type: 'line',
data: qecData,
smooth: true,
symbol: 'circle',
symbolSize: 4,
lineStyle: { color: '#00A050', width: 2 },
itemStyle: { color: '#00A050' }
},
{
name: '生态流量限值',
type: 'line',
data: qecLimitData,
smooth: true,
symbol: 'circle',
symbolSize: 4,
lineStyle: { color: '#F7A737', width: 2 },
itemStyle: { color: '#F7A737' }
},
{
name: '去年同期生态流量',
type: 'line',
data: qecSameLastYearData,
smooth: true,
symbol: 'circle',
symbolSize: 4,
lineStyle: { color: '#F1AFFF', width: 2 },
itemStyle: { color: '#F1AFFF' }
}
],
dataZoom: [
{
type: 'inside',
xAxisIndex: [0],
throttle: 50,
start: 0,
end: 100
}
],
toolbox: {
show: true,
feature: {
saveAsImage: { title: '保存为图片', type: 'png', pixelRatio: 2 }
},
right: 20,
top: 10
}
};
chartInstance.setOption(option, true);
};
const initChart = () => {
console.log(chartRef.value);
if (!chartRef.value) return;
if (chartInstance) {
chartInstance.dispose();
}
chartInstance = echarts.init(chartRef.value);
};
const handleResize = () => {
if (chartInstance) {
chartInstance.resize();
}
};
const destroyChart = () => {
if (chartInstance) {
chartInstance.dispose();
chartInstance = null;
}
window.removeEventListener('resize', handleResize);
};
//
const fetchChartData = async () => {
isChartLoading.value = true;
try {
// TODO:
// const stcd = modelStore.params.stcd;
// const { startTime, endTime } = getDateRange();
// const res = await getEngChartList({ ... });
// updateChart(res?.data?.data || []);
// 2 loading
await new Promise(resolve => setTimeout(resolve, 2000));
// 使
const mockData = getMockData();
updateChart(mockData);
hasLoaded.value = true;
} catch (error) {
console.error('获取图表数据失败:', error);
} finally {
isChartLoading.value = false;
}
};
//
const handleQuery = () => {
fetchLimitInfo();
fetchDayData();
fetchChartData();
};
// timeType
watch(timeType, () => {
dateRange.value = initDateRange();
});
watch(
() => props.isActive,
active => {
if (active && !hasLoaded.value) {
fetchLimitInfo();
fetchDayData();
//
nextTick(() => {
setTimeout(() => {
initChart();
fetchChartData();
}, 2000);
});
window.addEventListener('resize', handleResize);
}
},
{ immediate: true }
);
onMounted(() => {});
onUnmounted(() => {
destroyChart();
window.removeEventListener('resize', handleResize);
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> .ecological-flow {
.top-section {
padding: 16px;
background: #fff;
.top-bar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
.info-row {
display: flex;
align-items: center;
gap: 24px;
flex-shrink: 0;
.info-item {
font-size: 14px;
white-space: nowrap;
.label {
color: #666;
}
.value {
color: #333;
font-weight: 600;
}
}
}
.filter-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
}
}
.bottom-section {
height: 530px;
background: #fff;
position: relative;
:deep(.ant-spin-nested-loading) {
width: 100%;
height: 100%;
}
:deep(.ant-spin-container) {
width: 100%;
height: 100%;
}
.chart-wrapper {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -10,6 +10,7 @@
:format="dateFormat" :format="dateFormat"
:show-time="showTime ? showTimeConfig : false" :show-time="showTime ? showTimeConfig : false"
:allowClear="false" :allowClear="false"
:presets="DateSetting.RangeButton.month1"
:disabled-date="disabledDate" :disabled-date="disabledDate"
> >
</a-range-picker> </a-range-picker>
@ -49,6 +50,7 @@ import dayjs, { Dayjs } from 'dayjs';
import { getMonitorData } from '@/api/mapModal'; import { getMonitorData } from '@/api/mapModal';
import { useModelStore } from '@/store/modules/model'; import { useModelStore } from '@/store/modules/model';
import BasicTable from '@/components/BasicTable/index.vue'; import BasicTable from '@/components/BasicTable/index.vue';
import { DateSetting } from '@/utils/enumeration';
const modelStore = useModelStore(); const modelStore = useModelStore();
@ -298,13 +300,33 @@ const updateChart = (data: any[]) => {
const fullTime = sorted[dataIndex]?.tm const fullTime = sorted[dataIndex]?.tm
? dayjs(sorted[dataIndex].tm).format('YYYY-MM-DD HH:mm:ss') ? dayjs(sorted[dataIndex].tm).format('YYYY-MM-DD HH:mm:ss')
: ''; : '';
let html = `<div style="font-size:14px;margin-bottom:8px;">${fullTime}</div>`; let html = `<div style="font-size:16px;margin-bottom:8px;">${fullTime}</div>`;
//
const formatRules: Record<
string,
{ format: (v: number) => string; unit: string }
> = {
坝上水位: { format: v => v.toFixed(2), unit: '(m)' },
坝下水位: { format: v => v.toFixed(2), unit: '(m)' },
入库流量: { format: v => String(Math.round(v)), unit: '(m³/s)' },
出库流量: { format: v => String(Number(v)), unit: '(m³/s)' },
生态流量: { format: v => v.toFixed(1), unit: '(m³/s)' },
生态流量限值: { format: v => v.toFixed(1), unit: '(m³/s)' }
};
params.forEach((param: any) => { params.forEach((param: any) => {
const value = param.value != null ? param.value : '-'; if (param.value == null) return;
const rule = Object.entries(formatRules).find(([key]) =>
param.seriesName.includes(key)
);
const displayValue = rule
? rule[1].format(Number(param.value))
: param.value;
const unit = rule ? rule[1].unit : '';
html += ` html += `
<div style="display:flex;align-items:center;margin:4px 0;"> <div style="display:flex;align-items:center;justify-content:space-between;margin:4px 0;">
<span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${param.color};margin-right:8px;"></span> <span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${param.color};margin-right:8px;"></span>
<span style="font-size:14px;">${param.seriesName}: ${value}</span> <span style="flex:1;font-size:14px;text-align:left;margin-right:6px;">${param.seriesName}: </span>
<span style="font-size:14px;min-width:60px;text-align:right;"><strong>${displayValue}</strong> ${unit}</span>
</div> </div>
`; `;
}); });
@ -464,7 +486,7 @@ const updateChart = (data: any[]) => {
smooth: true, smooth: true,
symbol: 'circle', symbol: 'circle',
symbolSize: 4, symbolSize: 4,
lineStyle: { color: '#F7A737', width: 2, type: 'dashed' }, lineStyle: { color: '#F7A737', width: 2 },
itemStyle: { color: '#F7A737' }, itemStyle: { color: '#F7A737' },
markPoint: { markPoint: {
data: [ data: [

View File

@ -19,24 +19,8 @@
:disabled-date="disabledDate" :disabled-date="disabledDate"
:allow-clear="false" :allow-clear="false"
@change="handleDateChange" @change="handleDateChange"
> :presets="DateSetting.RangeButton.month1"
<template #renderExtraFooter> />
<div class="quick-date-options">
<a-button size="small" @click="setQuickRange(7)"
>最近七天</a-button
>
<a-button size="small" @click="setQuickRange(30)"
>最近一个月</a-button
>
<a-button size="small" @click="setQuickRange(90)"
>最近三个月</a-button
>
<a-button size="small" @click="setQuickRange(180)"
>最近六个月</a-button
>
</div>
</template>
</a-range-picker>
</div> </div>
</div> </div>
<div class="body_body"> <div class="body_body">
@ -79,6 +63,7 @@ import dayjs, { Dayjs } from 'dayjs';
import { useModelStore } from '@/store/modules/model'; import { useModelStore } from '@/store/modules/model';
import { infoGetKendoListCust, fishGetKendoListCust } from '@/api/sw'; import { infoGetKendoListCust, fishGetKendoListCust } from '@/api/sw';
import BasicTable from '@/components/BasicTable/index.vue'; import BasicTable from '@/components/BasicTable/index.vue';
import { DateSetting } from '@/utils/enumeration';
const modelStore = useModelStore(); const modelStore = useModelStore();
const selectOption = ref([]); const selectOption = ref([]);
const selectValue = ref([]); const selectValue = ref([]);

View File

@ -9,6 +9,14 @@
:destroyOnClose="true" :destroyOnClose="true"
class="map-modal" class="map-modal"
> >
<!-- 问题
1.基础信息图片展示是什么逻辑
2. 电站专题展示逻辑
3. 实时视频回放 少接口
4. 预警提示 少接口
5. 生态流量 达标率查询不对
6. 鱼类适应性繁殖同期对比NAN ()
-->
<div v-if="modelStore.showStcdSelector" class="stcd-selector-wrapper"> <div v-if="modelStore.showStcdSelector" class="stcd-selector-wrapper">
<a-select <a-select
v-model:value="modelStore.params.stcd" v-model:value="modelStore.params.stcd"
@ -65,6 +73,11 @@
:tabs-items="getTabChildren('tableTabs')" :tabs-items="getTabChildren('tableTabs')"
:is-active="currentActiveKey === 'tableTabs'" :is-active="currentActiveKey === 'tableTabs'"
/> />
<!-- 生态流量 -->
<EcologicalFlow
v-show="currentActiveKey === 'EcologicalFlow'"
:is-active="currentActiveKey === 'EcologicalFlow'"
/>
<!-- 鱼类繁殖适宜性分析 --> <!-- 鱼类繁殖适宜性分析 -->
<WaterTemperatureRep <WaterTemperatureRep
v-show="currentActiveKey === 'WaterTemperatureRep'" v-show="currentActiveKey === 'WaterTemperatureRep'"
@ -99,6 +112,7 @@ import VideoInfo from './components/videoInfo.vue'; // 实时视频
import PanoramaInfo from './components/PanoramaInfo.vue'; // import PanoramaInfo from './components/PanoramaInfo.vue'; //
import MonitorInfo from './components/MonitorInfo.vue'; // import MonitorInfo from './components/MonitorInfo.vue'; //
import EarlyWarningAlert from './components/EarlyWarningAlert.vue'; // import EarlyWarningAlert from './components/EarlyWarningAlert.vue'; //
import EcologicalFlow from './components/EcologicalFlow.vue'; //
import Attachment from './components/Attachment.vue'; // / import Attachment from './components/Attachment.vue'; // /
import WaterTemperatureRep from './components/WaterTemperatureRep.vue'; // import WaterTemperatureRep from './components/WaterTemperatureRep.vue'; //
import { useModelStore } from '@/store/modules/model'; import { useModelStore } from '@/store/modules/model';

View File

@ -108,90 +108,95 @@ const ENGTabs: Array<any> = [
// } // }
].filter(Boolean); ].filter(Boolean);
// // 水电站生态流量 √ // // 水电站生态流量 √
// const ENGEQTabs: Array<any> = [ const ENGEQTabs: Array<any> = [
// { {
// name: '基础信息', name: '基础信息',
// key: 'basicInfo', key: 'basicInfo',
// type: 'basic', type: 'basic',
// url: '/bbi/siteBipc/getSiteBasicInfo' url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo',
// }, default: true // 默认显示
// { },
// name: '实时视频', {
// key: 'videoInfo', name: '实时视频',
// type: 'video', key: 'videoInfo',
// url: '/video/dataStcdFrame/getVideoMonitorList' type: 'video',
// }, url: '/video/dataStcdFrame/getVideoMonitorList'
// { },
// name: '全景影像', {
// key: 'panoramaInfo', name: '全景影像',
// type: 'panorama' key: 'panoramaInfo',
// }, type: 'panorama'
// { },
// name: '监测数据', {
// key: 'monitorInfo', name: '监测数据',
// type: 'tabsWithTwo', key: 'monitorInfo',
// code: 'dzxq.tabs.jcsj' type: 'tabsWithTwo',
// }, code: 'dzxq.tabs.jcsj'
// { },
// name: '预警提示', {
// key: 'tableTabs', name: '预警提示',
// type: 'tableTabs', key: 'tableTabs',
// code: 'dzxq-yjts', type: 'tableTabs',
// tabs: [ code: 'dzxq-yjts',
// { tabs: [
// name: '设计参数变更提示', {
// key: 'DesignParameterChangePrompt', name: '设计参数变更提示',
// type: 'table', key: 'DesignParameterChangePrompt',
// hiddenChart: true, type: 'table',
// tableUrl: '/dec-lygk-base-server/base/engWarning/GetKendoList' hiddenChart: true,
// }, tableUrl: '/dec-lygk-base-server/base/engWarning/GetKendoList'
// { },
// name: '施工期环保措施落实预警', {
// key: 'ImplementEarlyWarning', name: '施工期环保措施落实预警',
// type: 'table', key: 'ImplementEarlyWarning',
// hiddenChart: true, type: 'table',
// tableUrl: '/dec-lygk-base-server/base/engWarning/sgqhbss/GetKendoListCust' hiddenChart: true,
// }, tableUrl:
// { '/dec-lygk-base-server/base/engWarning/sgqhbss/GetKendoListCust'
// name: '环保设施建设预警', },
// key: 'ConstructionEarlyWarning', {
// type: 'table', name: '环保设施建设预警',
// hiddenChart: true, key: 'ConstructionEarlyWarning',
// tableUrl: '/dec-lygk-base-server/base/engWarning/hbssjs/GetKendoListCust' type: 'table',
// }, hiddenChart: true,
// { tableUrl:
// name: '环保设施运行预警', '/dec-lygk-base-server/base/engWarning/hbssjs/GetKendoListCust'
// key: 'RunEarlyWarning', },
// type: 'table', {
// hiddenChart: true, name: '环保设施运行预警',
// tableUrl: '/dec-lygk-base-server/base/engWarning/hbssyx/GetKendoListCust' key: 'RunEarlyWarning',
// }, type: 'table',
// { hiddenChart: true,
// name: '鱼类放流预警', tableUrl:
// key: 'ReleaseEarlyWarning', '/dec-lygk-base-server/base/engWarning/hbssyx/GetKendoListCust'
// type: 'table', },
// hiddenChart: true, {
// tableUrl: '/dec-lygk-base-server/base/engWarning/ylfl/GetKendoListCust' name: '鱼类放流预警',
// } key: 'ReleaseEarlyWarning',
// ] type: 'table',
// }, hiddenChart: true,
// { tableUrl: '/dec-lygk-base-server/base/engWarning/ylfl/GetKendoListCust'
// name: '生态流量', }
// key: 'EcologicalFlow', ]
// type: 'EcologicalFlow' },
// }, {
// Session.getAppCode() === 'hbb' ? { name: '生态流量',
// name: '查看报告', key: 'EcologicalFlow',
// key: 'attachment', type: 'EcologicalFlow'
// type: 'attachment' },
// } : null, {
// { name: '查看报告',
// name: '批复文件', key: 'attachment',
// key: 'approval', type: 'attachment',
// type: 'approval' url: '/eq/fid/GetKendoListCust'
// }, },
{
// ].filter(Boolean) name: '批复文件',
key: 'approval',
type: 'approval',
url: '/eng/base/eiaapproval/GetKendoList'
}
].filter(Boolean);
// // 水电站生态流量 - 江局单独看 √ // // 水电站生态流量 - 江局单独看 √
// const ENGEQTabsJuangJu: Array<any> = [ // const ENGEQTabsJuangJu: Array<any> = [
@ -1199,7 +1204,11 @@ const handleTabs = (modaldata: any) => {
console.log('sttp', sttp); console.log('sttp', sttp);
switch (sttp) { switch (sttp) {
case 'ENG': case 'ENG':
return ENGTabs; if (modaldata?.eqtp == 'QEC') {
return ENGEQTabs;
} else {
return ENGTabs;
}
case 'WT_POINT': case 'WT_POINT':
return WTTabs; return WTTabs;
case 'FH_WQ_POINT': case 'FH_WQ_POINT':
@ -1239,15 +1248,16 @@ const handleTabs = (modaldata: any) => {
return DEVICETABS; return DEVICETABS;
case 'DW_1': case 'DW_1':
return DEVICETABS; return DEVICETABS;
// //
// if (modaldata?.eqtp == 'QEC') { if (modaldata?.eqtp == 'QEC') {
// const { page } = Utility.parseQueryString() // const { page } = Utility.parseQueryString()
// if (page == 'shengTaiLiuLiangManZuQingKuangJiangJu') { // if (page == 'shengTaiLiuLiangManZuQingKuangJiangJu') {
// return ENGEQTabsJuangJu // return ENGEQTabsJuangJu
// } else { // } else {
// return ENGEQTabs return ENGEQTabs;
// } // }
// } else { }
// else {
// return Session.getAppCode() === 'hbb' ? ENGTabs.filter((e) => e.name !== '阶段属性') : ENGTabs // return Session.getAppCode() === 'hbb' ? ENGTabs.filter((e) => e.name !== '阶段属性') : ENGTabs
// } // }
// case 'ENG_ALARM': // case 'ENG_ALARM':

View File

@ -281,6 +281,38 @@ namespace DateSetting {
value: [getStartTime().subtract(1, 'year'), getStartTime()] value: [getStartTime().subtract(1, 'year'), getStartTime()]
} }
], ],
month1: [
{
label: '最近7天',
value: [getStartTime().subtract(6, 'day'), getStartTime()]
},
{
label: '最近1个月',
value: [getStartTime().subtract(1, 'month'), getStartTime()]
},
{
label: '最近3个月',
value: [getStartTime().subtract(3, 'month'), getStartTime()]
},
{
label: '最近6个月',
value: [getStartTime().subtract(6, 'month'), getStartTime()]
}
],
hour: [
{
label: '最近7小时',
value: [getStartTime().subtract(7, 'hour'), getStartTime()]
},
{
label: '最近24小时',
value: [getStartTime().subtract(24, 'hour'), getStartTime()]
},
{
label: '最近一周',
value: [getStartTime().subtract(7, 'day'), getStartTime()]
}
],
season: [ season: [
{ {
label: '第一季度', label: '第一季度',