| | |
| | | /* |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-05-24 11:25:26 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-10-09 09:58:40 |
| | | * @LastEditors: æå(å¼åç») lzhe@yxqiche.com |
| | | * @LastEditTime: 2025-03-10 13:57:44 |
| | | * @FilePath: /src/config/route.js |
| | | * @Description: è¿æ¯é»è®¤è®¾ç½®,请设置`customMade`, æå¼koroFileHeaderæ¥çé
ç½® è¿è¡è®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | */ |
| | |
| | | type: 'menu', |
| | | hidden: true |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | name: "大å±", |
| | | path: "/mdc/forLargeScreen", |
| | | component: "mdc/forLargeScreen", |
| | | meta: { |
| | | icon: "el-icon-menu", |
| | | title: "大å±", |
| | | type: 'menu', |
| | | hidden: true |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | |
| | | //const routes = [] |
| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-11-12 20:39:04 |
| | | * @LastEditors: æå(å¼åç») lzhe@yxqiche.com |
| | | * @LastEditTime: 2025-03-10 13:56:39 |
| | | * @FilePath: /cps-web/src/views/mdc/components/StationLiveSpeed.vue |
| | | --> |
| | | <template> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: æå(å¼åç») lzhe@yxqiche.com |
| | | * @LastEditTime: 2025-03-10 14:06:28 |
| | | * @FilePath: /cps-web/src/views/mdc/components/StationLiveSpeed.vue |
| | | --> |
| | | <template> |
| | | <div class="speed"> |
| | | <div ref="c" style="width: 30%;height:200px;"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | speedChartName: '主轴è´è½½', |
| | | isspeed: false, |
| | | input: '', |
| | | option: { |
| | | graphic: { |
| | | type: 'text', |
| | | enterFrom: { |
| | | style: { opacity: 0 }// æ·¡å
¥ |
| | | }, |
| | | enterAnimation: { |
| | | duration: 1300//å¨ç»æ¶é¿ |
| | | }, |
| | | left: 'center', |
| | | top: 'bottom', |
| | | style: { |
| | | textAlign: 'center', |
| | | textVerticalAlign: 'middle', |
| | | fontSize: 12, |
| | | fontWeight: 'bold', |
| | | fill: '#333' // æåé¢è² |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'gauge', |
| | | axisLine: { |
| | | lineStyle: { |
| | | width: 10, |
| | | color: [ |
| | | [0.3, '#67e0e3'], |
| | | [0.7, '#37a2da'], |
| | | [1, '#fd666d'] |
| | | ] |
| | | } |
| | | }, |
| | | pointer: { |
| | | itemStyle: { |
| | | color: 'auto' |
| | | } |
| | | }, |
| | | axisTick: { //å»åº¦ |
| | | splitNumber: 5, |
| | | distance: -10, //å»åº¦ä¸è½´çº¿çè·ç¦» |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 2 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | distance: -14, //å»åº¦è·ç¦»è¡¨ççè·ç¦» |
| | | length: 10, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 2 //æ¯ä¸ªé¯é½¿çº¿å®½ |
| | | } |
| | | }, |
| | | axisLabel: { //表çå
å»åº¦ |
| | | color: 'inherit', |
| | | distance: 20, //å»åº¦è·ç¦»è¡¨ççè·ç¦» |
| | | fontSize: 12 |
| | | }, |
| | | detail: { |
| | | show: false |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | showCharts(a, b, c) { |
| | | var myChartA = echarts.init(this.$refs.c); |
| | | var optionA = JSON.parse(JSON.stringify(this.option)); |
| | | optionA.graphic.style.text = [this.speedChartName + a + '%',].join('\n'); |
| | | optionA.series[0].data = [{ value: a }]; |
| | | myChartA.setOption(optionA); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.showCharts(0, 0, 0); //è°ç¨ï¼ä¸ä¸ªåæ°ï¼0-100ä¹é´ï¼åªä¼ 第ä¸ä¸ªå°±è¡ |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .speed { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .speed>div { |
| | | flex: 1; |
| | | } |
| | | |
| | | </style> |