diff --git a/packages/screen/src/assets/xiangying/农村公路icon.png b/packages/screen/src/assets/xiangying/农村公路icon.png new file mode 100644 index 0000000..c4547a4 Binary files /dev/null and b/packages/screen/src/assets/xiangying/农村公路icon.png differ diff --git a/packages/screen/src/assets/xiangying/国省道icon.png b/packages/screen/src/assets/xiangying/国省道icon.png new file mode 100644 index 0000000..a779d7a Binary files /dev/null and b/packages/screen/src/assets/xiangying/国省道icon.png differ diff --git a/packages/screen/src/views/RiskWarning/Dialog/clearanceSituationDialog.vue b/packages/screen/src/views/RiskWarning/Dialog/clearanceSituationDialog.vue index 9f74ff6..c20f086 100644 --- a/packages/screen/src/views/RiskWarning/Dialog/clearanceSituationDialog.vue +++ b/packages/screen/src/views/RiskWarning/Dialog/clearanceSituationDialog.vue @@ -119,6 +119,10 @@ const props = defineProps({ type: Array, default: () => [], }, + itemFilterForm: { + type: Object, + default: () => {}, + }, }); const emit = defineEmits(['update:visible', 'close', 'detail', 'itemdata']); @@ -129,6 +133,15 @@ const filterForm = ref({ type: '', roadConditionType: '', }); +watch( + () => props.itemFilterForm, + newVal => { + console.log('newVal', newVal); + filterForm.value.roadConditionType = newVal.label.substring(0, newVal.label.length - 1) || ''; + currentPage.value = 1; + fetchData(); + } +); // 影响区域选项 // 已从 index.js 导入 @@ -283,16 +296,6 @@ const fetchData = async () => { } }; -// 监听visible变化 -watch( - () => props.visible, - newVal => { - if (newVal) { - currentPage.value = 1; - fetchData(); - } - } -); watch( () => filterForm.value, newVal => { diff --git a/packages/screen/src/views/RiskWarning/Dialog/dispatchDistrictDialog.vue b/packages/screen/src/views/RiskWarning/Dialog/dispatchDistrictDialog.vue index d709bdb..8778c1a 100644 --- a/packages/screen/src/views/RiskWarning/Dialog/dispatchDistrictDialog.vue +++ b/packages/screen/src/views/RiskWarning/Dialog/dispatchDistrictDialog.vue @@ -180,6 +180,7 @@ watch( margin-bottom: 16px; .filter-row { + width: 700px; display: flex; gap: 12px; flex-wrap: wrap; diff --git a/packages/screen/src/views/RiskWarning/Dialog/impactPointDetailDialog.vue b/packages/screen/src/views/RiskWarning/Dialog/impactPointDetailDialog.vue index a5d20fd..5c59cd0 100644 --- a/packages/screen/src/views/RiskWarning/Dialog/impactPointDetailDialog.vue +++ b/packages/screen/src/views/RiskWarning/Dialog/impactPointDetailDialog.vue @@ -58,7 +58,7 @@
发现时间 - {{ basicInfo.discoverTime }} + {{ basicInfo.findTime }}
@@ -177,7 +177,17 @@ const basicInfo = ref({ riskDesc: '', discoverTime: '', }); - +watch( + () => props.item, + newVal => { + if (newVal) { + // 当弹窗打开时获取数据 + getAffectedObjectTypeId(props.item); + console.log(basicInfo.value); + console.log(props.item); + } + } +); // 照片列表 const photoList = ref([]); @@ -363,13 +373,13 @@ const getAffectedObjectTypeId = data => { } else if (pointType === '路段') { // 更新基本信息 - 根据路段数据库字段映射 basicInfo.value = { - district: data.GL1_QDMC || '-', // 起点名称(区县) - level: data.GL1_JSDJ || '未评定', // 技术等级 - levelClass: data.GL1_JSDJ, // 一二级为一般,三四五级为重大 - roadCode: data.GL1_LXBH || '-', // 路线编号 - location: `${data.GL1_QDMC || '-'} - ${data.GL1_ZDMC || '-'}`, // 起点到终点 - riskDesc: '-', // 风险点 - discoverTime: '-', // 发现时间 + district: data.rawData.GL1_QXMC || '-', // 起点名称(区县) + level: data.rawData.GL1_FXDJ || '未评定', // 技术等级 + levelClass: data.rawData.GL1_FXDJ, // 一二级为一般,三四五级为重大 + roadCode: data.rawData.GL1_LXBH || '-', // 路线编号 + location: data.pointLocation, // 起点到终点 + riskDesc: data.rawData.GL1_FXMS || '-', // 风险点 + discoverTime: data.rawData.GL1_SBSJ || '-', // 发现时间 }; // 更新照片列表 - 路段一般没有照片 @@ -435,7 +445,7 @@ watch( newVal => { if (newVal) { // 当弹窗打开时获取数据 - getAffectedObjectDetail(); + // getAffectedObjectDetail(); } } ); diff --git a/packages/screen/src/views/RiskWarning/Dialog/impactPointDialog.vue b/packages/screen/src/views/RiskWarning/Dialog/impactPointDialog.vue index 0c49829..f2af079 100644 --- a/packages/screen/src/views/RiskWarning/Dialog/impactPointDialog.vue +++ b/packages/screen/src/views/RiskWarning/Dialog/impactPointDialog.vue @@ -42,22 +42,6 @@ @@ -308,6 +324,8 @@ import tongnanProjectPersonDialog from './Dialog/tongnanProjectPersonDialog.vue' import hazardPointSituationDialog from './Dialog/hazardPointSituationDialog.vue'; import offlineHelpDialog from './Dialog/offlineHelpDialog.vue'; import imageInspectionDialog from './Dialog/imageInspectionDialog.vue'; +import patrolMileageDialog from './Dialog/patrolMileageDialog.vue'; +import patrolSituationDialog from './Dialog/patrolSituationDialog.vue'; import './component/el-select.scss'; import './component/date-picker-theme.scss'; @@ -338,6 +356,8 @@ const dialogVisible = ref({ hazardPointSituation: false, offlineHelp: false, imageInspection: false, + patrolMileage: false, + patrolSituation: false, }); const activeitem = ref({}); @@ -508,6 +528,11 @@ const updateDateRange = range => { console.log('更新日期范围:', range); rightDateRange.value = range; }; +const filterForm = ref({}); +const updateFilterForm = item => { + console.log('更新筛选表单:', item); + filterForm.value = item; +}; // 确认对话框配置 const confirmConfig = ref({ @@ -529,7 +554,7 @@ const allCountyData = ref({}); const handleDistrictClick = item => { console.log('区县点击:', item); allCountyData.value = item; - if (item.data.roadType == 'national') { + if (item.data.roadType == 'national') { // 国省道 openDialog('tongnanTeam'); } else if (item.data.roadType == 'rural') { diff --git a/packages/screen/src/views/RiskWarning/left.vue b/packages/screen/src/views/RiskWarning/left.vue index fa6908e..1e88766 100644 --- a/packages/screen/src/views/RiskWarning/left.vue +++ b/packages/screen/src/views/RiskWarning/left.vue @@ -680,8 +680,9 @@ const getBarHeight = value => { if (!actualValue || actualValue == 0) return '0'; // 确保最小高度为10%,最大高度为100% const height = (actualValue / totalValue.value) * 200; - // 确保高度差异明显,至少有5%的差异 - return Math.min(100, Math.max(10, Math.round(height))); + // 确保高度差异明显,至少有3%的最小差异 + // 最大高度为100% 最新高度为3%的最小差异 + return Math.min(100, Math.max(3, Math.round(height))); }; const handleAIClick = () => { emit('openAIResult'); diff --git a/packages/screen/src/views/RiskWarning/right.vue b/packages/screen/src/views/RiskWarning/right.vue index a1a6044..7c5cd25 100644 --- a/packages/screen/src/views/RiskWarning/right.vue +++ b/packages/screen/src/views/RiskWarning/right.vue @@ -48,6 +48,7 @@
{{ item.label }}
+
@@ -68,18 +69,18 @@
-
+
-
+
巡查公路里程 - 234882km + {{ roadInspectionMileage }}km
巡查项目数 - 6处 + 0处
-
+
{{ item.value }}
{{ item.label }}
@@ -220,6 +221,9 @@ const emit = defineEmits([ 'openControlSituation', 'openResourceDetail', 'update:dateRange', + 'openPatrolMileage', + 'openPatrolSituation', + 'update:filterForm', ]); // 注入兄弟组件通信机制 @@ -533,6 +537,7 @@ const handleControlClick = item => { ) { emit('openClearanceSituation'); emit('update:dateRange', getdateRange.value || []); + emit('update:filterForm', item || {}); } else if (item.label === '停工项目数' || item.label === '关闭驻地数') { emit('openControlSituation'); } @@ -544,6 +549,16 @@ const handleBlockClick = () => { emit('update:dateRange', dateRange.value); }; +// 点击巡查公路里程 +const handlePatrolClick = () => { + emit('openPatrolMileage'); +}; + +// 点击巡查情况 +const handlePatrolSituationClick = () => { + emit('openPatrolSituation'); +}; + // 日期范围选择器 const dateRange = ref([]); @@ -630,13 +645,57 @@ const getAffectedCountByProject = async () => { }; // 巡查数据 -const patrolData = [ - { label: '巡查路段数', value: '2' }, - { label: '巡查桥梁数', value: '1' }, - { label: '巡查边坡数', value: '6' }, - { label: '巡查隧道数', value: '10' }, - { label: '发现隐患数', value: '6' }, -]; +const patrolData = ref([ + { label: '巡查路段数', value: '0', key: 'roadSectionInspectionCount' }, + { label: '巡查桥梁数', value: '0', key: 'bridgeInspectionCount' }, + { label: '巡查边坡数', value: '0', key: 'slopeInspectionCount' }, + { label: '巡查隧道数', value: '0', key: 'tunnelInspectionCount' }, + { label: '发现隐患数', value: '0', key: 'hiddenDangerCount' }, +]); + +// 巡查公路里程 +const roadInspectionMileage = ref('0'); + +// 获取巡查统计数据 +const getInspectionStats = async () => { + try { + let params = { + start: '', + end: '', + }; + if (getdateRange.value && getdateRange.value.length === 2) { + params.start = formatDateTime(getdateRange.value[0]); + params.end = formatDateTime(getdateRange.value[1]); + } + const res = await request({ + url: '/snow-ops-platform/yhWgxc/weather-warning/inspection-stats', + method: 'GET', + params: params, + }); + console.log('巡查统计数据:', res); + if (res.code == '00000' && res.data) { + const data = res.data; + // 更新巡查公路里程 + roadInspectionMileage.value = data.roadInspectionMileage || '0'; + // 更新patrolData数组的value值 + patrolData.value.forEach(item => { + if (item.key === 'roadSectionInspectionCount') { + item.value = data.roadSectionInspectionCount || '0'; + } else if (item.key === 'bridgeInspectionCount') { + item.value = data.bridgeInspectionCount || '0'; + } else if (item.key === 'slopeInspectionCount') { + item.value = data.slopeInspectionCount || '0'; + } else if (item.key === 'tunnelInspectionCount') { + item.value = data.tunnelInspectionCount || '0'; + } else if (item.key === 'hiddenDangerCount') { + item.value = data.hiddenDangerCount || '0'; + } + }); + } + } catch (error) { + console.error('获取巡查统计数据失败:', error); + } +}; // 抢险投入数据 const rescueData = ref([ @@ -696,6 +755,7 @@ const init = () => { getRescueInputStats(); // 获取抢险投入统计数据 getDisasterStats(); // 获取灾害统计数据 + getInspectionStats(); // 获取巡查统计数据 }; // 组件挂载时获取数据并注册刷新函数