From b7ad54294da15dccc59f7b6c879af3e000024d9d Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 19 六月 2025 17:51:30 +0800 Subject: [PATCH] 1、全局树组件多选设备抽屉组件增加点击树节点名称也可以选中当前节点 2、设备监控页面布局图查看设备详情时首次进入清空上一次设备信息(由于数据为定时刷新不能每次获取数据均清空) 3、设备类型管理页面调整设备类型图片尺寸以解决表格错行问题 4、设备管理页面添加或编辑设备弹窗选择设备时增加点击行即可选中 --- src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue | 2453 ++++++++++++++++++++++++++++++----------------------------- 1 files changed, 1,231 insertions(+), 1,222 deletions(-) diff --git a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue index 3e1b58a..92c9192 100644 --- a/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue +++ b/src/views/mdc/base/modules/DeviceBaseInfo/EquipmentDetailModal.vue @@ -99,8 +99,7 @@ <a-descriptions title="杩愯鏁版嵁" - v-show="runData" - v-if="resultData.driveType != 'PLC'" + v-if="runData&&runData.length>0&&resultData.driveType != 'PLC'" :column="4" class="operationData" > @@ -155,1259 +154,1269 @@ </template> <script> -import { - getAction, - postAction -} from '@/api/manage' -import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' + import { + getAction, + postAction + } from '@/api/manage' + import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' -export default { - name: 'EquipmentDetailModal', - components: {}, - props: {}, - data() { - return { - runData: [], - // xyzAliasesList: [], - //涓昏酱鍊嶇巼 - spindlebeilv: 0, - //杩涚粰鍊嶇巼 - feedbeilv: 0, - // 涓昏酱璐熻嵎 - spindleload: 0, - //蹇�熻繘缁欏�嶇巼 - rapidfeed: 0, - visible: false, - resultData: {}, - url: { - mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' + export default { + name: 'EquipmentDetailModal', + components: {}, + props: {}, + data() { + return { + runData: [], + // xyzAliasesList: [], + //涓昏酱鍊嶇巼 + spindlebeilv: null, + //杩涚粰鍊嶇巼 + feedbeilv: null, + // 涓昏酱璐熻嵎 + spindleload: null, + //蹇�熻繘缁欏�嶇巼 + rapidfeed: null, + visible: false, + resultData: {}, + url: { + mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' + }, + modalTimer: null, + xyzList: null + } + }, + beforeDestroy() { + clearInterval(this.modalTimer) + this.modalTimer = null + }, + methods: { + drawLine() { + let _this = this + if (_this.spindlebeilv) { + //鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥 + let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons') + let mdcEquiMoniGaugeOption1 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 300, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 300, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.spindlebeilv / 300, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.spindlebeilv + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1) + } + if (_this.feedbeilv) { + let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons') + let mdcEquiMoniGaugeOption2 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 300, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 300, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.feedbeilv / 300, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.feedbeilv + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2) + } + if (_this.spindleload) { + let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons') + let mdcEquiMoniGaugeOption3 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 100, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 100, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.spindleload + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3) + } + if (_this.rapidfeed) { + let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons') + let mdcEquiMoniGaugeOption4 = { + tooltip: { + formatter: '{a} <br/>{b} : {c}%' + }, + + series: [{ + name: '澶栭儴绾�', + type: 'gauge', + radius: '65%', // 鍔ㄦ�� + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#31F3FF'] // 鍔ㄦ�� + ], + width: 1 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { //鏍囬 + show: false + } + }, + { + name: '澶栭儴鍒诲害', + type: 'gauge', + radius: '80%', + min: 0, //鏈�灏忓埢搴� + max: 300, //鏈�澶у埢搴� + splitNumber: 10, //鍒诲害鏁伴噺 + startAngle: 225, + endAngle: -45, + axisLine: { + show: false, + lineStyle: { + color: [ + [1, 'rgba(0,0,0,0)'] + ] + } + }, //浠〃鐩樿酱绾� + axisLabel: { + show: true, + color: '#31F3FF', + fontSize: 10, // 鍔ㄦ�� + distance: -20 // 鍔ㄦ�� + + }, //鍒诲害鏍囩銆� + axisTick: { + show: false + }, //鍒诲害鏍峰紡 + splitLine: { + show: false + } + }, + { + name: '鍐呴儴瀹界嚎鏉�', + type: 'gauge', + radius: '55%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 4 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鍐呴儴缁嗙嚎鏉�', + type: 'gauge', + radius: '40%', + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [1, '#122B3C'] + ], + width: 3 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '闂撮殧鏉″舰', + type: 'gauge', + radius: '52.5%', + z: 4, + splitNumber: 35, + startAngle: 225, + endAngle: -45, + axisLine: { + lineStyle: { + opacity: 0 + } + }, + axisLabel: { + show: false + }, + axisTick: { + show: false, + length: 20, + splitNumber: 1, + lineStyle: { + color: '#122B3C', + width: 1 + } + }, + splitLine: { + show: false + }, + detail: { + show: false + }, + title: { + show: false + } + }, + { + name: '鏁版嵁', + type: 'gauge', + radius: '52.5%', + z: 3, + startAngle: 225, + max: 300, + endAngle: -45, + axisLine: { + lineStyle: { + color: [ + [_this.rapidfeed / 300, '#31F3FF'], // 鍔ㄦ�� + [1, '#185363'] + ], + width: 4 + } + }, + tooltip: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + }, + detail: { + show: true, + fontWeight: 'bold', + fontSize: 12, + color: '#fff' + }, + pointer: { + show: true, + width: 3, + itemStyle: { + color: '#fff' + } + }, + data: [{ + name: '', + value: _this.rapidfeed + }] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�', + 'type': 'pie', + 'radius': ['4%', '2%'], + 'hoverAnimation': false, + tooltip: { + show: false + }, + cursor: 'default', + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#fff' + }, + animation: false, + 'data': [1] + }, + // 鍐呭渾 + { + 'name': '鍐呭渾鐜�2', + 'type': 'pie', + 'radius': '2%', + 'hoverAnimation': false, + cursor: 'default', + tooltip: { + show: false + }, + 'labelLine': { + 'normal': { + 'show': false + } + }, + itemStyle: { + color: '#31F3FF' + }, + animation: false, + 'data': [1] + } + ] + } + mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4) + } }, - modalTimer: null, - xyzList: null - } - }, - beforeDestroy() { - clearInterval(this.modalTimer) - this.modalTimer = null - }, - methods: { - drawLine() { - let _this = this - if (_this.spindlebeilv) { - //鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥 - let mdcEquiMoniGauge1 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge1'), 'macarons') - let mdcEquiMoniGaugeOption1 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, + close() { + this.$emit('close') + this.visible = false + clearInterval(this.modalTimer) + this.modalTimer = null + }, + handleCancel() { + this.close() + clearInterval(this.modalTimer) + this.modalTimer = null + }, + timerModel(id) { + this.modalTimer = setInterval(() => { + setTimeout(this.initData(id), 0) + }, 1000 * 4) + }, - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 300, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� + initData(id) { + let _this = this + this.visible = true + getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { + if (res.success) { + _this.resultData = res.result.equipment + _this.spindlebeilv = res.result.spindlebeilv + _this.feedbeilv = res.result.feedbeilv + _this.spindleload = res.result.spindleload + _this.rapidfeed = res.result.rapidfeed + _this.runData = res.result.runData + _this.xyzList = res.result.xyzList - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 300, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.spindlebeilv / 300, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.spindlebeilv - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] + // _this.xyzAliasesList = res.result.xyzAliasesList + this.$nextTick(() => { + _this.drawLine() + }) + } else { + _this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + + }, + + resetData() { + this.resultData = {} + this.spindlebeilv = null + this.feedbeilv = null + this.spindleload = null + this.rapidfeed = null + this.runData = [] + this.xyzList = null + }, + + mouseEnterItem(e) { + console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth) + if (e.target.clientWidth >= e.target.scrollWidth) { + e.target.style.pointerEvents = 'none' // 闃绘榧犳爣浜嬩欢 pointer-events 灞炴�х敤浜庤缃厓绱犳槸鍚﹀榧犳爣浜嬩欢鍋氬嚭鍙嶅簲銆� } - mdcEquiMoniGauge1.setOption(mdcEquiMoniGaugeOption1) - } - if (_this.feedbeilv) { - let mdcEquiMoniGauge2 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge2'), 'macarons') - let mdcEquiMoniGaugeOption2 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, - - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 300, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� - - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 300, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.feedbeilv / 300, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.feedbeilv - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] - } - mdcEquiMoniGauge2.setOption(mdcEquiMoniGaugeOption2) - } - if (_this.spindleload) { - let mdcEquiMoniGauge3 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge3'), 'macarons') - let mdcEquiMoniGaugeOption3 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, - - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 100, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� - - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 100, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.spindleload - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] - } - mdcEquiMoniGauge3.setOption(mdcEquiMoniGaugeOption3) - } - if (_this.rapidfeed) { - let mdcEquiMoniGauge4 = this.$echarts.init(document.getElementById('mdcEquiMoniGauge4'), 'macarons') - let mdcEquiMoniGaugeOption4 = { - tooltip: { - formatter: '{a} <br/>{b} : {c}%' - }, - - series: [{ - name: '澶栭儴绾�', - type: 'gauge', - radius: '65%', // 鍔ㄦ�� - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#31F3FF'] // 鍔ㄦ�� - ], - width: 1 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { //鏍囬 - show: false - } - }, - { - name: '澶栭儴鍒诲害', - type: 'gauge', - radius: '80%', - min: 0, //鏈�灏忓埢搴� - max: 300, //鏈�澶у埢搴� - splitNumber: 10, //鍒诲害鏁伴噺 - startAngle: 225, - endAngle: -45, - axisLine: { - show: false, - lineStyle: { - color: [ - [1, 'rgba(0,0,0,0)'] - ] - } - }, //浠〃鐩樿酱绾� - axisLabel: { - show: true, - color: '#31F3FF', - fontSize: 10, // 鍔ㄦ�� - distance: -20 // 鍔ㄦ�� - - }, //鍒诲害鏍囩銆� - axisTick: { - show: false - }, //鍒诲害鏍峰紡 - splitLine: { - show: false - } - }, - { - name: '鍐呴儴瀹界嚎鏉�', - type: 'gauge', - radius: '55%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 4 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鍐呴儴缁嗙嚎鏉�', - type: 'gauge', - radius: '40%', - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [1, '#122B3C'] - ], - width: 3 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '闂撮殧鏉″舰', - type: 'gauge', - radius: '52.5%', - z: 4, - splitNumber: 35, - startAngle: 225, - endAngle: -45, - axisLine: { - lineStyle: { - opacity: 0 - } - }, - axisLabel: { - show: false - }, - axisTick: { - show: false, - length: 20, - splitNumber: 1, - lineStyle: { - color: '#122B3C', - width: 1 - } - }, - splitLine: { - show: false - }, - detail: { - show: false - }, - title: { - show: false - } - }, - { - name: '鏁版嵁', - type: 'gauge', - radius: '52.5%', - z: 3, - startAngle: 225, - max: 300, - endAngle: -45, - axisLine: { - lineStyle: { - color: [ - [_this.rapidfeed / 300, '#31F3FF'], // 鍔ㄦ�� - [1, '#185363'] - ], - width: 4 - } - }, - tooltip: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - splitLine: { - show: false - }, - detail: { - show: true, - fontWeight: 'bold', - fontSize: 12, - color: '#fff' - }, - pointer: { - show: true, - width: 3, - itemStyle: { - color: '#fff' - } - }, - data: [{ - name: '', - value: _this.rapidfeed - }] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�', - 'type': 'pie', - 'radius': ['4%', '2%'], - 'hoverAnimation': false, - tooltip: { - show: false - }, - cursor: 'default', - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#fff' - }, - animation: false, - 'data': [1] - }, - // 鍐呭渾 - { - 'name': '鍐呭渾鐜�2', - 'type': 'pie', - 'radius': '2%', - 'hoverAnimation': false, - cursor: 'default', - tooltip: { - show: false - }, - 'labelLine': { - 'normal': { - 'show': false - } - }, - itemStyle: { - color: '#31F3FF' - }, - animation: false, - 'data': [1] - } - ] - } - mdcEquiMoniGauge4.setOption(mdcEquiMoniGaugeOption4) - } - }, - close() { - this.$emit('close') - this.visible = false - clearInterval(this.modalTimer) - this.modalTimer = null - }, - handleCancel() { - this.close() - clearInterval(this.modalTimer) - this.modalTimer = null - }, - timerModel(id) { - this.modalTimer = setInterval(() => { - setTimeout(this.initData(id), 0) - }, 1000 * 4) - }, - - initData(id) { - let _this = this - this.visible = true - getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { - if (res.success) { - _this.resultData = res.result.equipment - _this.spindlebeilv = res.result.spindlebeilv - _this.feedbeilv = res.result.feedbeilv - _this.spindleload = res.result.spindleload - _this.rapidfeed = res.result.rapidfeed - _this.runData = res.result.runData - _this.xyzList = res.result.xyzList - - // _this.xyzAliasesList = res.result.xyzAliasesList - this.$nextTick(() => { - _this.drawLine() - }) - } else { - _this.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - - }, - - mouseEnterItem(e) { - console.log(e, e.target, e.target.clientWidth, e.target.scrollWidth) - if (e.target.clientWidth >= e.target.scrollWidth) { - e.target.style.pointerEvents = 'none' // 闃绘榧犳爣浜嬩欢 pointer-events 灞炴�х敤浜庤缃厓绱犳槸鍚﹀榧犳爣浜嬩欢鍋氬嚭鍙嶅簲銆� } } } -} </script> <style scoped lang="less"> -body { - overflow-y: hidden !important; -} - -.full-modal { - .ant-modal { - top: 0; - padding-bottom: 0; - margin: 0; - background-color: #4a4a48 !important; - opacity: 0.5; + body { + overflow-y: hidden !important; } + + .full-modal { + .ant-modal { + top: 0; + padding-bottom: 0; + margin: 0; + background-color: #4a4a48 !important; + opacity: 0.5; + } + /deep/ .ant-modal-content { + display: flex; + flex-direction: column; + background-color: #4a4a48; + } + .ant-modal-body { + flex: 1; + } + } + /deep/ .ant-modal-content { - display: flex; - flex-direction: column; - background-color: #4a4a48; + background-color: #312c2c; + opacity: 0.9; } - .ant-modal-body { - flex: 1; + + /deep/ .ant-modal-close { + color: #1191b0; + font-size: 24px; } -} -/deep/ .ant-modal-content { - background-color: #312c2c; - opacity: 0.9; -} + /deep/ .ant-modal-close-x { + font-size: 24px; + } -/deep/ .ant-modal-close { - color: #1191b0; - font-size: 24px; -} + /deep/ .ant-modal-footer { + border-top: none; + } -/deep/ .ant-modal-close-x { - font-size: 24px; -} + /deep/ .ant-descriptions { + border: 1px solid #16738d; + margin: 10px 0; + } -/deep/ .ant-modal-footer { - border-top: none; -} + /deep/ .ant-descriptions-title { + color: #fff; + padding: 10px; + margin-bottom: 0; + } -/deep/ .ant-descriptions { - border: 1px solid #16738d; - margin: 10px 0; -} + /deep/ .ant-descriptions-view { + padding: 0 20px; + } -/deep/ .ant-descriptions-title { - color: #fff; - padding: 10px; - margin-bottom: 0; -} + /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { + padding-bottom: 5px; + } -/deep/ .ant-descriptions-view { - padding: 0 20px; -} + /deep/ .ant-descriptions-item-colon { + color: #fff; + width: 5.1vw; + } -/deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { - padding-bottom: 5px; -} + /deep/ .ant-descriptions-item-content { + color: #fff; + border: 1px solid #4bcfc8; + padding: 0 10px; + width: auto; + min-width: 130px; + /*max-width: 300px;*/ + height: 25px; + } -/deep/ .ant-descriptions-item-colon { - color: #fff; - width: 5.1vw; -} + .mdcEquipMon { + color: #fff; + } -/deep/ .ant-descriptions-item-content { - color: #fff; - border: 1px solid #4bcfc8; - padding: 0 10px; - width: auto; - min-width: 130px; - /*max-width: 300px;*/ - height: 25px; -} + fieldset { + border: 1px solid #16738d; + padding: 17px; + margin: 14px; + } -.mdcEquipMon { - color: #fff; -} + fieldset legend { + display: inline; + width: 88px; + } -fieldset { - border: 1px solid #16738d; - padding: 17px; - margin: 14px; -} + table tr td { + text-align: left; + color: #fff; + } -fieldset legend { - display: inline; - width: 88px; -} + table tr td input { + border: 1px solid #a6eff9; + } -table tr td { - text-align: left; - color: #fff; -} + .ant-btn { + padding: 0 10px; + margin-left: 3px; + color: #fff !important; + background-color: #1191b0; + border: none; + } -table tr td input { - border: 1px solid #a6eff9; -} + .ant-form-item-control { + line-height: 0px; + } -.ant-btn { - padding: 0 10px; - margin-left: 3px; - color: #fff !important; - background-color: #1191b0; - border: none; -} + /** 涓昏〃鍗曡闂磋窛 */ + .ant-form .ant-form-item { + margin-bottom: 10px; + } -.ant-form-item-control { - line-height: 0px; -} + /** Tab椤甸潰琛岄棿璺� */ + .ant-tabs-content .ant-form-item { + margin-bottom: 0px; + } -/** 涓昏〃鍗曡闂磋窛 */ -.ant-form .ant-form-item { - margin-bottom: 10px; -} + /deep/ .ant-descriptions-item-label { + width: 6.7vw; + text-align: right; + margin-right: 10px; + } -/** Tab椤甸潰琛岄棿璺� */ -.ant-tabs-content .ant-form-item { - margin-bottom: 0px; -} + /deep/ .operationData .ant-descriptions-item-content { + width: 130px; + overflow: hidden; + } -/deep/ .ant-descriptions-item-label { - width: 6.7vw; - text-align: right; - margin-right: 10px; -} - -/deep/ .operationData .ant-descriptions-item-content { - width: 130px; - overflow: hidden; -} - -.description-item-class { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} + .description-item-class { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } </style> -- Gitblit v1.9.3