From 5aa90c2fccb70b48e6a60a6d957e65b2cb9717fb Mon Sep 17 00:00:00 2001 From: wangxk Date: Wed, 21 May 2025 09:06:33 +0800 Subject: [PATCH] =?UTF-8?q?5-19=E4=BC=9A=E5=90=8Ebug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- riis-web/package.json | 3 + riis-web/public/webconfig.js | 2 + riis-web/src/App.vue | 15 +- riis-web/src/api/datasurvey/index.ts | 9 + riis-web/src/api/task/index.ts | 4 +- riis-web/src/api/taxkSetting/index.ts | 2 +- riis-web/src/assets/navigation/u126.png | Bin 0 -> 428 bytes riis-web/src/assets/navigation/u157.png | Bin 0 -> 449 bytes riis-web/src/assets/navigation/u331.png | Bin 0 -> 473 bytes riis-web/src/components/wavEcharts/index.vue | 41 ++- riis-web/src/layout/components/Navbar.vue | 58 +++- riis-web/src/store/modules/user.ts | 18 +- .../src/views/basedata/3DModelSet/index.vue | 76 ++--- .../src/views/basedata/algorithm/index.vue | 25 +- .../views/basedata/maintenancePlan/index.vue | 9 +- .../views/collectmonitor/datasurvey/index.vue | 60 +++- .../environmentalMonitoring/index.vue | 4 +- .../collectmonitor/videorecord/index.vue | 2 +- .../voiceprintDetection/index.vue | 8 +- riis-web/src/views/dashboard/index.vue | 2 +- .../auxiliarymanage/index.vue | 3 +- .../equipmentsignal/index.vue | 4 +- .../ledgermanagement/systemmanage/index.vue | 5 +- .../views/monitorsystem/alarminformation.vue | 87 +++-- .../src/views/monitorsystem/giveanalarm.vue | 22 +- .../src/views/question/question/index.vue | 316 ++++++++++++------ .../src/views/system/TaskSetting/index.vue | 9 +- riis-web/src/views/task/makeTask/index.vue | 29 +- .../src/views/task/patrolDetails/index.vue | 8 +- .../src/views/task/patrolmonitor/index.vue | 12 +- .../src/views/task/patrolreport/index.vue | 37 +- .../threevisitation/3Dbrowsing/index.vue | 22 +- .../views/videomonitor/videomonitor/index.vue | 2 +- .../views/videomonitor/videorecord/index.vue | 2 +- 34 files changed, 597 insertions(+), 299 deletions(-) create mode 100644 riis-web/src/assets/navigation/u126.png create mode 100644 riis-web/src/assets/navigation/u157.png create mode 100644 riis-web/src/assets/navigation/u331.png diff --git a/riis-web/package.json b/riis-web/package.json index 5dbd7c8..acb31e8 100644 --- a/riis-web/package.json +++ b/riis-web/package.json @@ -22,12 +22,14 @@ "dayjs": "^1.11.10", "default-passive-events": "^2.0.0", "docx-preview": "^0.1.15", + "dompurify": "^3.2.6", "echarts": "^5.2.2", "element-plus": "^2.2.27", "gm-crypt": "^0.0.2", "js-base64": "^3.7.5", "js-cookie": "^3.0.1", "jsencrypt": "^3.3.2", + "markdown-it": "^14.1.0", "moment": "^2.29.4", "nprogress": "^0.2.0", "path-browserify": "^1.0.1", @@ -51,6 +53,7 @@ "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^16.2.1", + "@types/dompurify": "^3.0.5", "@types/node": "^20.3.1", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", diff --git a/riis-web/public/webconfig.js b/riis-web/public/webconfig.js index 1294c0a..d230d93 100644 --- a/riis-web/public/webconfig.js +++ b/riis-web/public/webconfig.js @@ -3,5 +3,7 @@ window.webConfig = { "wsApiBaseUrl": "ws://192.168.1.20:8090/", "webApiMonitorUrl": "http://192.168.1.20:18080", "answeringUrl":"http://121.37.111.42:8080/ui/chat/a9d56e68484c5594", + "pythonUrl":"http://121.37.111.42:8080/api", + "application_id":"6b915c22-351c-11f0-8b7c-0242ac130003", "webSystemTitle":"标题" } \ No newline at end of file diff --git a/riis-web/src/App.vue b/riis-web/src/App.vue index 9fb00e0..7601089 100644 --- a/riis-web/src/App.vue +++ b/riis-web/src/App.vue @@ -1,11 +1,24 @@ diff --git a/riis-web/src/api/datasurvey/index.ts b/riis-web/src/api/datasurvey/index.ts index fb1e911..e2a997d 100644 --- a/riis-web/src/api/datasurvey/index.ts +++ b/riis-web/src/api/datasurvey/index.ts @@ -31,4 +31,13 @@ export function getHistoricalCurve(params:any){ method: 'get', params:params }); + } + //导出环境历史数据 + export function exportDeviceWorkData(params:any){ + return request({ + url: '/auxcontrol/device-work-data/exportDeviceWorkData' , + method: 'get', + params:params, + responseType: 'arraybuffer' + }); } \ No newline at end of file diff --git a/riis-web/src/api/task/index.ts b/riis-web/src/api/task/index.ts index d0a4c22..c6c0cea 100644 --- a/riis-web/src/api/task/index.ts +++ b/riis-web/src/api/task/index.ts @@ -27,9 +27,9 @@ export function getTaskToDo(params:any){ } //分页查询检修计划 -export function getTaskList(params:any){ +export function getExaminePlanPage(params:any){ return request({ - url: '/patroltasks/examine-plan/getTaskList' , + url: '/patroltasks/examine-plan/getExaminePlanPage' , method: 'get', params:params }); diff --git a/riis-web/src/api/taxkSetting/index.ts b/riis-web/src/api/taxkSetting/index.ts index 28ec26d..aefc348 100644 --- a/riis-web/src/api/taxkSetting/index.ts +++ b/riis-web/src/api/taxkSetting/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; //获取表格内容 -export function getTaskList(params: any) { +export function getQuartzJobList(params: any) { return request({ url: '/system/quartzjob/getQuartzJobList', method: 'get', diff --git a/riis-web/src/assets/navigation/u126.png b/riis-web/src/assets/navigation/u126.png new file mode 100644 index 0000000000000000000000000000000000000000..20711623176b90bdd457e8410ddc3c4cb26df398 GIT binary patch literal 428 zcmV;d0aN~oP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0YOPbK~y+TrIH~} z13?gl-!vr{90&vgfj}UTh$bLNYLNH_1)>6r>pv(74cs{pI4pr5fv2uG5Qqvy1>MKn zxh-k0A(ZkZvpY9CH+i!=hMYB!7ckq#Um&~s=S&5{1BfbUx9Mm$jCB|`paMOqXr=J% zT!lkq;W;YksoV{Yt))WyI;s^JW00ScnpCXuSf!xuu>t?9O9@B{~jqAFHHU=m?_pB|%0y(LD zFGZY51#>X@jAgQ*3B`f?aoEh(Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0ai&wK~y+Tol-qZ z13?s=w}@C+q>NUU3Mm8;w9=nou(1&oG?$=)!A1*bA^*RNY7Z;6&RgkKdYWQ4NzkX4YqKFj((*74udxP$tBEzCc@oy zFwFRwp7B`o7|=(kO#AYF!@nM#5)R=VU75h9w31ITLR;p(L-RUEbdOPA!5UOISkbIA rZu8=hP5(TnRH(K&Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0d7e|K~y+TjZ!^J z13?gdvpI-mTK|EKU?Jo>?XeDdruaqQ_5RIhmR z0mTiRq!{T4BK$x%cpqboT^zbJ_aMxvo4ujqqs_)?ww2qgn<{yFk5FkNVLAouv$58u zBAAotC91OQd`*^K*(qQL71_+s0g2qx_7=a|a#ZWSrg>quiddNUGaIpwrVM;~7AaV) z1t||+jP=f^ea`fMbZ8M5_``SpSo3lg9Kzcd*l9!&w&x6Xw*-UeL+5O`VKf zL9X#+Ew6IqtPxgID5b&s1c|#g^XVbCR+C)giCP$PHo|J6-bT~CdpiLCs7jLq5m3u9 P00000NkvXXu0mjf3xCfX literal 0 HcmV?d00001 diff --git a/riis-web/src/components/wavEcharts/index.vue b/riis-web/src/components/wavEcharts/index.vue index 4dd1bc9..4883645 100644 --- a/riis-web/src/components/wavEcharts/index.vue +++ b/riis-web/src/components/wavEcharts/index.vue @@ -400,6 +400,25 @@ onMounted(() => { audioElement.value.addEventListener('ended', () => { analyzer.stopAnalyze(); }); + + // 自动播放逻辑 + if (props.fileUrl) { + // 添加 loadeddata 事件监听器,确保音频加载完成后再播放 + const handleLoaded = () => { + audioElement.value.play().catch(error => { + console.error('自动播放失败:', error); + // 提示用户需手动触发播放 + }); + }; + + // 监听 loadeddata 事件,确保音频加载完成 + audioElement.value.addEventListener('loadeddata', handleLoaded, { once: true }); + + // 如果音频已加载完成,直接播放(如缓存情况) + if (audioElement.value.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA) { + handleLoaded(); + } + } }); onBeforeUnmount(() => { @@ -413,30 +432,40 @@ onBeforeUnmount(() => { /** * 文件URL变更监听器 */ -watch(() => props.fileUrl, async () => { + watch(() => props.fileUrl, async () => { try { - // 停止当前分析 if (analyzer) { analyzer.stopAnalyze(); await analyzer.audioContext.close(); } - // 重置图表 chartInstance.setOption({ series: [{ data: [] }, { data: [] }, { data: [] }], graphic: [{ invisible: true }] }, true); - // 等待DOM更新 await new Promise(resolve => setTimeout(resolve, 50)); - - // 创建新分析器 + analyzer = new AudioAnalyzer(); audioElement.value.load(); // 重新绑定事件监听器 audioElement.value.removeEventListener('play', playHandler); audioElement.value.addEventListener('play', playHandler); + + // 添加 loadeddata 事件监听器,确保新音频加载完成后播放 + const handleLoaded = () => { + audioElement.value.play().catch(error => { + console.error('文件加载后自动播放失败:', error); + }); + }; + + audioElement.value.addEventListener('loadeddata', handleLoaded, { once: true }); + + // 如果音频已加载完成,直接播放(如缓存情况) + if (audioElement.value.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA) { + handleLoaded(); + } } catch (error) { console.error('文件加载失败:', error); } diff --git a/riis-web/src/layout/components/Navbar.vue b/riis-web/src/layout/components/Navbar.vue index 8da862e..9e9e560 100644 --- a/riis-web/src/layout/components/Navbar.vue +++ b/riis-web/src/layout/components/Navbar.vue @@ -25,6 +25,16 @@
+
+ + + +
+ {{ userStore.stationData[0].stationName }} +
+