From a3ff5082a650ba6f339be147947211d9ca54593a Mon Sep 17 00:00:00 2001 From: fanjia <3278303149@qq.com> Date: Thu, 23 Apr 2026 17:54:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=B1=E5=93=8D=E7=82=B9=E6=83=85=E5=86=B5?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=A2=9E=E5=8A=A0=E7=AD=9B=E9=80=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=B7=A1=E6=9F=A5=E8=B7=AF?= =?UTF-8?q?=E6=AE=B5=E6=8E=A5=E5=8F=A3=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/xiangying/农村公路icon.png | Bin 0 -> 1070 bytes .../src/assets/xiangying/国省道icon.png | Bin 0 -> 798 bytes .../Dialog/clearanceSituationDialog.vue | 23 ++-- .../Dialog/dispatchDistrictDialog.vue | 1 + .../Dialog/impactPointDetailDialog.vue | 30 +++-- .../RiskWarning/Dialog/impactPointDialog.vue | 47 ++++---- .../Dialog/patrolMileageDialog.vue | 109 ++++++++++++------ .../RiskWarning/component/baseDialog.vue | 5 +- .../src/views/RiskWarning/component/index.js | 6 +- .../screen/src/views/RiskWarning/index.vue | 27 ++++- .../screen/src/views/RiskWarning/left.vue | 5 +- .../screen/src/views/RiskWarning/right.vue | 84 ++++++++++++-- 12 files changed, 242 insertions(+), 95 deletions(-) create mode 100644 packages/screen/src/assets/xiangying/农村公路icon.png create mode 100644 packages/screen/src/assets/xiangying/国省道icon.png diff --git a/packages/screen/src/assets/xiangying/农村公路icon.png b/packages/screen/src/assets/xiangying/农村公路icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c4547a426b85fb5c3913f5634d5b3112cec70539 GIT binary patch literal 1070 zcmV+}1kwA6P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91D4+uX1ONa40RR91C;$Ke0D9(TtN;K5m`OxIR9Fe^mtAPhVHm*AnQ1eh zv9W1wK9*L>jVQaYO+w;IK5iH>Tu4c-R*PhaT$tfPYjQQaAWX^4q82I9M94Ol5ylv^ z*c`v-c;D00yZ?Xv&)Tt@^VF~B<9*-feg4mR{~sq5N=mW=$qpnt;MsvlB(eZ*K@U8F zy%6@C{J(<~vJ$?5E7u96$5T&gJd?fVvSA+aHBbo8;S!94G2n{KtAkDMKtg*hbZ?l=7>SSOBJoA}w zazu-=$=ECd+MP{X@wb8$Ua!VZVK0NT(4^vGeu21d7+b@Tnxw}iyOOWi1t5jblEvt& zAm^_b!cb`RL9~b*fyFQfMy^Pb|E6)G;~Qm6#E0DbpY1+Bq%9tpF+?H-{>9<+&}WVs~5 z*M-aQ378J6#Zl7Yw{eQ!fJeNXSei$?n^>+B&o{n2#I@vy!{HAE2F3LxZ3illE0uY> z^g?CJ`ElQ|*0Ka%PjP3x<-L40gZ(Y}d>2uYpLt6W>GZ z543{sYcH%9`Pn46;5TOC@6kw6#W)nKpS*H zAN(|SGu?iIofzRt^Wh@=04=X@_QQIpfj3~~0mfsnU)J*K3wo@EcOh&bpH=JNGU$)i z9{lq#ANHBC`{)TU6PiJ!a(FurV-=gt1L=~MUpVreC*2m=AgR$sQ7;nt7|&KgUv-{2 zIa6}pwm5@h@#T(}XP?O2e=79O=u8TYzG;k~IK@WUaK&`Ss=F9+4BAX!iBy1XUwbbT zSCPrgW>er8^nw=oTFwGFiz2bt8@7#AB&pF literal 0 HcmV?d00001 diff --git a/packages/screen/src/assets/xiangying/国省道icon.png b/packages/screen/src/assets/xiangying/国省道icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a779d7a0655a4d38c226bd4fd57a7daa0961f15e GIT binary patch literal 798 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(t zOZk?7p~;m-ozr5@`ZX=m1)_0>D-yG{8VNi39?r>UQRAI& z_e8d>zD>K!p?taD`4e#~U-@8`SRY1H%O$u_R}7+aEWTEl$$ z+XI=cOh0x#Ud?F~v_$lacH&L$Ik(p^?At8x`X%eCJ*uvHVjL58OY2D&mWJfl6!$8% z_deSB+Hf-8j5D(LDgsVL%x|vs4fK3;*MN1}$@`qwdmb3<)5<9~{A;J*p*5*xSGcQw z>#KQ9x*y!T4}9D8j`!j9$Mt;Ip06}Kt8$xV{(=*E!WoV3$J*Ha?l6j97L{z^jJPyI z>Ai^OwnOO}Mz;H03pOP*TiLU_#n_0iNSz

dzDwYsdP`iB~yv+GP!R7xJ#qI+q;x zK<=~Q_G^-_o$Yr=@V#Syom;YVv()6!zVe-yrRxpjxw#MiZ~w;hI(@?Jvp27@SX)%e z)IFE%`KY?DEP`!)&yJYuQ>O)f55Iq4*5Uc5%|)j8pT5!vf&UjW*E62qBikG|>(EJ1 O+Vphwb6Mw<&;$U=WK1Uj literal 0 HcmV?d00001 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(); // 获取巡查统计数据 }; // 组件挂载时获取数据并注册刷新函数