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 0000000..2071162 Binary files /dev/null and b/riis-web/src/assets/navigation/u126.png differ diff --git a/riis-web/src/assets/navigation/u157.png b/riis-web/src/assets/navigation/u157.png new file mode 100644 index 0000000..2d3c87e Binary files /dev/null and b/riis-web/src/assets/navigation/u157.png differ diff --git a/riis-web/src/assets/navigation/u331.png b/riis-web/src/assets/navigation/u331.png new file mode 100644 index 0000000..849d258 Binary files /dev/null and b/riis-web/src/assets/navigation/u331.png differ 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 }} +
+