From 3ff3ab3ace20807ef8795a79d4a804b32accbc24 Mon Sep 17 00:00:00 2001 From: yyl <279235553@qq.com> Date: Thu, 18 Jan 2024 16:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AE=BE=E5=A4=87=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=86=E6=9E=90=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/MonthlyEquipment/index.js | 51 ++++ ruoyi-ui/src/utils/request.js | 2 +- .../assets/shexiangtou.png | Bin 0 -> 678 bytes .../components/deviceUptime/assets/charts.js | 10 +- .../components/deviceUptime/index.vue | 25 +- .../components/monthlyEquipment/index.vue | 50 +++- .../statisticalAnalysis/data.js | 119 +++++++++ .../statisticalAnalysis/index.vue | 229 ++++++++++++++++-- ruoyi-ui/vue.config.js | 3 +- 9 files changed, 449 insertions(+), 40 deletions(-) create mode 100644 ruoyi-ui/src/api/MonthlyEquipment/index.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/shexiangtou.png create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/data.js diff --git a/ruoyi-ui/src/api/MonthlyEquipment/index.js b/ruoyi-ui/src/api/MonthlyEquipment/index.js new file mode 100644 index 00000000..1286246f --- /dev/null +++ b/ruoyi-ui/src/api/MonthlyEquipment/index.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' +import { download } from '../../utils/request' +// 全景数据 - 运行环境接口 + + +// 设备状态柱状图按时间和类型 +export function getSystemStatusList(query) { + return request({ + url: '/system/status/list', + method: 'get', + params: { + ...query, + } + }) + } + + //设备状态列表按时间和类型 + export function getSystemStatusTabList(query) { + //system/status/tablist + return request({ + url: '/system/status/tablist', + method: 'get', + params: { + ...query, + } + }) + } + + + //设备状态列表按类型 + export function getSystemStatusType() { + //system/status/tablist + return request({ + url: '/system/status/type', + method: 'get', + params: { + // ...query, + } + }) + } + //system/status/type + + //设备状态列表按类型 + export function getSystemStatusExport(query) { + //system/status/export + return download('/system/status/export',query,"file.xlsx"); + // return request.post('/system/status/export',{ + // ...query + // },{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + // responseType: 'blob'}) + } \ No newline at end of file diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 9db73fdd..d31b22f7 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -19,7 +19,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 10000 + timeout: 30000 }) // request拦截器 diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/shexiangtou.png b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/shexiangtou.png new file mode 100644 index 0000000000000000000000000000000000000000..d9baa59461dc419a066915f3c3aafd87eae36c2a GIT binary patch literal 678 zcmV;X0$KfuP)Px%U`a$lR9Hvtlrd;iVHAbG`%+6pn^e${L7{^nHi(K2ibL(BqHYduc8u7e!GawW z3kr5nj5t^~-72^^2ps~oTLqz!Ce*<}Aw#JdlC)xsdGDG(Skaok_tF%CkbiyWoqO&% z_g|AzyijGhsgR;4Ny$>K7%7?ko>Y>>ADGa3xYgwOkQoq4Oam@8NFh` zGe5)%Q?`)!8j~eI_%)1s1SbCocT^b`2zn7KEQ!TPv0q+zVf_gJda`=mQg#C;fYUyS zUsh}q-wsR83-2Dm2R$HF(x!W3F&1+;j0r@&h=Emv(PB)Vx?w%HU`JM?UCKk?vO>N_ zHV*6u;(lVOx%TF}#Zb9lJ~tBLDj<~6$Eu`P@;u)ek%8`N6KjQ7QD!YoD`?+s2K0H_Dg_g_;u+9sxWeBAU9hJQt{jv!aDIr)3VW;ECv;hLk|1#&8k1}el3X7USi>JTO)K!h?;bxY>eDInXM(pZ`5iu^*CFFdYFM2ioqyPa75DA^2WsF#rGn M07*qoM6N<$g73g8VE_OC literal 0 HcmV?d00001 diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/assets/charts.js index c10c506b..7ef5a96f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/assets/charts.js @@ -82,7 +82,7 @@ let options = { type: 'radar', name: '安全作业', data: [ - [100, 100, 100, 100, 100, 100, 100, 100,100, 100, 100, 100, 100, 100, 100, 100], + [100, 100, 100, 100, 100, 100, 100, 100,100, 100, 100, 100, 100, 100, 100, 100,100, 100, 100], ], symbol: 'none', @@ -102,7 +102,7 @@ let options = { type: 'radar', name: '安全作业', data: [ - [80, 80, 80, 80, 80, 80, 80, 80,80, 80, 80, 80, 80, 80, 80, 80] + [80, 80, 80, 80, 80, 80, 80, 80,80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80] ], symbol: 'none', @@ -122,7 +122,7 @@ let options = { type: 'radar', name: '安全作业', data: [ - [60, 60, 60, 60, 60, 60, 60, 60,60, 60, 60, 60, 60, 60, 60, 60], + [60, 60, 60, 60, 60, 60, 60, 60,60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], ], symbol: 'none', @@ -142,7 +142,7 @@ let options = { type: 'radar', name: '安全作业', data: [ - [40, 40, 40, 40, 40, 40, 40, 40,40, 40, 40, 40, 40, 40, 40, 40], + [40, 40, 40, 40, 40, 40, 40, 40,40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40], ], symbol: 'none', lineStyle: { @@ -161,7 +161,7 @@ let options = { type: 'radar', name: '安全作业', data: [ - [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20], + [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20], ], symbol: 'none', lineStyle: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/index.vue index 2371dd10..f9a96f92 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/deviceUptime/index.vue @@ -16,12 +16,34 @@ components: { WgtTitle }, + props:{ + dataList:{ + type:Array, + default:[], + } + }, data() { return { } }, - + watch:{ + dataList:(newD,oldD)=>{ + let data = []; + let texts = []; + newD.forEach(element => { + data.push(parseInt(element.sucessRate,10)); + texts.push({name:element.text, max: 100 }); + }); + + chartsStatistics.radar.indicator = texts; + chartsStatistics.series[0].data = [data]; + + //console.log("=====aaa=========",this) + var myChart = echarts.init(document.getElementById('deviceUptime')); + myChart.setOption(chartsStatistics); + } + }, created() { }, @@ -33,6 +55,7 @@ this.$nextTick(() => { var myChart = echarts.init(document.getElementById('deviceUptime')); myChart.setOption(chartsStatistics); + this.myChart = myChart; }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/monthlyEquipment/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/monthlyEquipment/index.vue index 4c3ea3a1..a790e505 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/monthlyEquipment/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/monthlyEquipment/index.vue @@ -3,9 +3,9 @@
-
+
- {{ item.num }}% + {{ item.num }}
{{ item.text }} @@ -18,6 +18,7 @@