1、车间看板页面实现鼠标悬浮于设备上出现设备详细信息弹窗,鼠标移出弹窗消失
2、设备参数阈值管理页面新增至mdc模块设备基础配置菜单下并完成所有布局及功能实现
| | |
| | | // -------------------------------------驱å¨åæ°ç®¡ç页é¢---------------------------------------- |
| | | // è·åæ§å¶ç³»ç»ç±»å |
| | | getDriveTypeApi: () => getAction('/mdc/mdcDriveTypeParamConfig/getDriveParamOptions'), |
| | | // -------------------------------------车é´çæ¿é¡µé¢---------------------------------------- |
| | | // -------------------------------------车é´çæ¿é¡µé¢-------------------------------------------- |
| | | // é¦é¡µè·å大å±å
¥å£è½¦é´å表 |
| | | getWorkshopListInHomePageApi: () => getAction('/mdc/mdcWorkshopInfo/getWorkshopList'), |
| | | // æ ¹æ®è½¦é´idæ¥è¯¢è®¾å¤å表 |
| | |
| | | // å é¤å个大å±è½¦é´å设å¤å
³ç³» |
| | | deleteSingleDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipment', params), |
| | | // æ¹éå é¤å¤§å±è½¦é´å设å¤å
³ç³» |
| | | deleteBatchDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', params) |
| | | deleteBatchDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', params), |
| | | // -------------------------------------设å¤åæ°éå¼ç®¡ç页é¢-------------------------------------------- |
| | | // æ ¹æ®é©±å¨ç±»åè·ååæ° |
| | | getParamListByDriveTypeApi: controlSystemType => getAction(`/mdc/mdcDriveTypeParamConfig/getDriveParamOptionsByType?controlSystemType=${controlSystemType}`), |
| | | // å¢å 设å¤åæ°éå¼ |
| | | addParamThresholdApi: params => postAction('/mdc/mdcEquipmentThreshold/add', params), |
| | | // ç¼è¾è®¾å¤åæ°éå¼ |
| | | editParamThresholdApi: params => postAction('/mdc/mdcEquipmentThreshold/edit', params), |
| | | // å é¤è®¾å¤åæ°éå¼ |
| | | deleteParamThresholdApi: id => deleteAction('/mdc/mdcEquipmentThreshold/delete', { id }), |
| | | // å é¤è®¾å¤åæ°éå¼ |
| | | deleteBatchParamThresholdApi: ids => deleteAction('/mdc/mdcEquipmentThreshold/deleteBatch', { ids }) |
| | | } |
| | |
| | | :isResizable="isResizable" |
| | | :stickSize="6" |
| | | > |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }"> |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }" |
| | | @mouseenter="openDetail(item)"> |
| | | <div class="device-status"> |
| | | <div |
| | | v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1" |
| | |
| | | </div> |
| | | </div> |
| | | </dv-border-box-8> |
| | | |
| | | <EquipmentDetailModal ref="EquipmentDetailModal"></EquipmentDetailModal> |
| | | </dv-full-screen-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import VueDragResize from 'vue-drag-resize' |
| | | import api from '@/api/mdc' |
| | | import { getFileAccessHttpUrl } from '@/api/manage' |
| | | import VueDragResize from 'vue-drag-resize' |
| | | import api from '@/api/mdc' |
| | | import { getFileAccessHttpUrl } from '@/api/manage' |
| | | import EquipmentDetailModal from './mdc/base/modules/WorkshopSignage/EquipmentDetailModal' |
| | | import { message } from 'ant-design-vue' |
| | | |
| | | export default { |
| | | components: { |
| | | VueDragResize, |
| | | }, |
| | | data() { |
| | | return { |
| | | workshopDetails: {}, // 车é´è¯¦ç»ä¿¡æ¯, |
| | | isDraggable: false, // æ¯å¦å¼å¯ææ½ |
| | | isResizable: false, // æ¯å¦å¼å¯ç¼©æ¾ |
| | | isSwitchChecked: false, // æ¯å¦å¼å¯åè½ |
| | | timingAcquisition: null, // 宿¶å·æ°æ¯å¦å¼å¯ |
| | | deviceList: [ |
| | | // { |
| | | // equipmentId: '123213213123232',// 设å¤ID |
| | | // equipmentImage: require('@/assets/8.png'), // 设å¤å¾ç |
| | | // coordinateTop: 200, // ææ½å
ç´ è·çåé¡¶è·ç¦» |
| | | // coordinateLeft: 100, // ææ½å
ç´ è·çå左侧è·ç¦» |
| | | // vw: 100, // 缩æ¾å
ç´ å®½åº¦ |
| | | // vh: 100, // 缩æ¾å
ç´ é«åº¦ |
| | | // fontSize: 12, // 缩æ¾å
ç´ åä½å¤§å° |
| | | // equipmentStatus: 1 // 设å¤ç¶æ 0:å
³æº 22:æ¥è¦ 2:å¾
æº 3:è¿è¡ 弿º:1ï¼æ²¡æåè²ç¯æ è¯å½ä¸ºå¾
æºï¼ |
| | | // } |
| | | ], // 设å¤ä¿¡æ¯å表 |
| | | deviceStatusList: [ |
| | | { |
| | | label: 'å
³æº', |
| | | value: 0, |
| | | color: '#A8A8A8', |
| | | }, |
| | | { |
| | | label: 'å¾
æº', |
| | | value: 2, |
| | | color: '#FFFF00', |
| | | }, |
| | | { |
| | | label: 'è¿è¡', |
| | | value: 3, |
| | | color: '#00EE00', |
| | | }, |
| | | { |
| | | label: 'æ¥è¦', |
| | | value: 22, |
| | | color: '#FF0000', |
| | | }, |
| | | ], // 设å¤ç¶ææç¤ºç¯å表 |
| | | } |
| | | }, |
| | | watch: { |
| | | isSwitchChecked: { |
| | | handler(newVal) { |
| | | if (!newVal) { |
| | | console.log('宿¶å¨å¼å¯ä¸') |
| | | this.timingAcquisition = setInterval(() => { |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | }, 2000) |
| | | } else { |
| | | console.log('å
³é宿¶å¨') |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | /** |
| | | * éè¿è½¦é´Idè°ç¨æ¥å£è·å设å¤ä¿¡æ¯å表 |
| | | * @param id 车é´Id |
| | | */ |
| | | getDeviceListByApi(id) { |
| | | console.log('éæ°å·æ°') |
| | | api.getDeviceListInWorkshopSignagePageApi(id).then((res) => { |
| | | if (res.result && res.result.length > 0) { |
| | | this.deviceList = res.result |
| | | } |
| | | }) |
| | | }, |
| | | message.config({ |
| | | maxCount: 3 |
| | | }) |
| | | |
| | | /** |
| | | * éè¿è½¦é´Idè°ç¨æ¥å£è·å车é´è¯¦ç»ä¿¡æ¯ |
| | | * @param id 车é´Id |
| | | */ |
| | | getWorkshopDetailsByApi(id) { |
| | | api.getWorkshopDetailByWorkshopIdApi(id).then((res) => { |
| | | this.workshopDetails = res.result |
| | | this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( |
| | | this.workshopDetails.backgroundImage |
| | | )})` |
| | | }) |
| | | export default { |
| | | components: { |
| | | VueDragResize, |
| | | EquipmentDetailModal |
| | | }, |
| | | |
| | | /** |
| | | * å¾çé¢è§ |
| | | * @param text å¾çå°å |
| | | */ |
| | | getImgView(text) { |
| | | if (text && text.indexOf(',') > 0) { |
| | | text = text.substring(0, text.indexOf(',')) |
| | | data() { |
| | | return { |
| | | workshopDetails: {}, // 车é´è¯¦ç»ä¿¡æ¯, |
| | | isDraggable: false, // æ¯å¦å¼å¯ææ½ |
| | | isResizable: false, // æ¯å¦å¼å¯ç¼©æ¾ |
| | | isSwitchChecked: false, // æ¯å¦å¼å¯åè½ |
| | | timingAcquisition: null, // 宿¶å·æ°æ¯å¦å¼å¯ |
| | | deviceList: [ |
| | | // { |
| | | // equipmentId: '123213213123232',// 设å¤ID |
| | | // equipmentImage: require('@/assets/8.png'), // 设å¤å¾ç |
| | | // coordinateTop: 200, // ææ½å
ç´ è·çåé¡¶è·ç¦» |
| | | // coordinateLeft: 100, // ææ½å
ç´ è·çå左侧è·ç¦» |
| | | // vw: 100, // 缩æ¾å
ç´ å®½åº¦ |
| | | // vh: 100, // 缩æ¾å
ç´ é«åº¦ |
| | | // fontSize: 12, // 缩æ¾å
ç´ åä½å¤§å° |
| | | // equipmentStatus: 1 // 设å¤ç¶æ 0:å
³æº 22:æ¥è¦ 2:å¾
æº 3:è¿è¡ 弿º:1ï¼æ²¡æåè²ç¯æ è¯å½ä¸ºå¾
æºï¼ |
| | | // } |
| | | ], // 设å¤ä¿¡æ¯å表 |
| | | deviceStatusList: [ |
| | | { |
| | | label: 'å
³æº', |
| | | value: 0, |
| | | color: '#A8A8A8' |
| | | }, |
| | | { |
| | | label: 'å¾
æº', |
| | | value: 2, |
| | | color: '#FFFF00' |
| | | }, |
| | | { |
| | | label: 'è¿è¡', |
| | | value: 3, |
| | | color: '#00EE00' |
| | | }, |
| | | { |
| | | label: 'æ¥è¦', |
| | | value: 22, |
| | | color: '#FF0000' |
| | | } |
| | | ] // 设å¤ç¶ææç¤ºç¯å表 |
| | | } |
| | | return getFileAccessHttpUrl(text) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä¿åæé®è°ç¨æ¥å£ä¿åææ½åçä½ç½®ä¸è®¾å¤å¾æ 尺寸 |
| | | */ |
| | | saveDevicePositionAndSizeByApi() { |
| | | console.log('触åä¿å') |
| | | if (this.isOperatingDevice) { |
| | | api.saveDevicePositionAndSizeApi(this.deviceList).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message, |
| | | }) |
| | | this.isOperatingDevice = false |
| | | if (this.isSwitchChecked) { |
| | | this.isSwitchChecked = false |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | } |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | watch: { |
| | | isSwitchChecked: { |
| | | handler(newVal) { |
| | | if (!newVal) { |
| | | console.log('宿¶å¨å¼å¯ä¸') |
| | | this.timingAcquisition = setInterval(() => { |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | }, 2000) |
| | | } else { |
| | | console.log('å
³é宿¶å¨') |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * éè¿è½¦é´Idè°ç¨æ¥å£è·å设å¤ä¿¡æ¯å表 |
| | | * @param id 车é´Id |
| | | */ |
| | | getDeviceListByApi(id) { |
| | | console.log('éæ°å·æ°') |
| | | api.getDeviceListInWorkshopSignagePageApi(id).then((res) => { |
| | | if (res.result && res.result.length > 0) { |
| | | this.deviceList = res.result |
| | | } |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: '请å¼å¯åè½ååè¿è¡ä¿å', |
| | | }, |
| | | |
| | | /** |
| | | * éè¿è½¦é´Idè°ç¨æ¥å£è·å车é´è¯¦ç»ä¿¡æ¯ |
| | | * @param id 车é´Id |
| | | */ |
| | | getWorkshopDetailsByApi(id) { |
| | | api.getWorkshopDetailByWorkshopIdApi(id).then((res) => { |
| | | this.workshopDetails = res.result |
| | | this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( |
| | | this.workshopDetails.backgroundImage |
| | | )})` |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * å¾çé¢è§ |
| | | * @param text å¾çå°å |
| | | */ |
| | | getImgView(text) { |
| | | if (text && text.indexOf(',') > 0) { |
| | | text = text.substring(0, text.indexOf(',')) |
| | | } |
| | | return getFileAccessHttpUrl(text) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä¿åæé®è°ç¨æ¥å£ä¿åææ½åçä½ç½®ä¸è®¾å¤å¾æ 尺寸 |
| | | */ |
| | | saveDevicePositionAndSizeByApi() { |
| | | console.log('触åä¿å') |
| | | if (this.isOperatingDevice) { |
| | | api.saveDevicePositionAndSizeApi(this.deviceList).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.isOperatingDevice = false |
| | | if (this.isSwitchChecked) { |
| | | this.isSwitchChecked = false |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | } |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: '请å¼å¯åè½ååè¿è¡ä¿å' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è®¾å¤ææ½æç¼©æ¾æ¶è§¦åäºä»¶ |
| | | * @param newRect ææ½æç¼©æ¾åç尺寸åè·ç¦» |
| | | * @param index ææ½è®¾å¤å¨æ°ç»ä¸ç䏿 |
| | | */ |
| | | resize(newRect, index) { |
| | | // if (newRect.width > 100) { |
| | | // if (newRect.width / newRect.height < 2) { |
| | | // this.deviceList[index].fontSize = newRect.width / 10 |
| | | // } else { |
| | | // this.deviceList[index].fontSize = newRect.height / 5 |
| | | // } |
| | | // } else { |
| | | // this.deviceList[index].fontSize = 12 |
| | | // } |
| | | this.deviceList[index].vw = newRect.width |
| | | this.deviceList[index].vh = newRect.height |
| | | this.deviceList[index].coordinateTop = newRect.top |
| | | this.deviceList[index].coordinateLeft = newRect.left |
| | | }, |
| | | |
| | | /** |
| | | * æ ¹æ®è®¾å¤ç¶æå¼è·å对åºè®¾å¤æ°é |
| | | * @param value 设å¤ç¶æå¼ |
| | | * @returns {number} è®¾å¤æ°é |
| | | */ |
| | | getDeviceNumberByStatus(value) { |
| | | return this.deviceList.filter((item) => item.equipmentStatus === value).length |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯åè½è§¦åäºä»¶ |
| | | * @param checked å½åswitchç¶æï¼æ¯å¦å¼å¯ï¼åå§ä¸ºfalse |
| | | */ |
| | | handleSwitchChange(checked) { |
| | | this.isOperatingDevice = true |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | }, |
| | | |
| | | openDetail(item) { |
| | | if (item.equipmentStatus == 0) { |
| | | // this.$message.warn("设å¤å¤äºå
³æºç¶æï¼"); |
| | | this.$message.warning('设å¤å¤äºå
³æºç¶æï¼') |
| | | return false |
| | | } |
| | | console.log(item) |
| | | console.log(this.$refs.EquipmentDetailModal) |
| | | this.$refs.EquipmentDetailModal.initData(item.equId) |
| | | this.$refs.EquipmentDetailModal.timerModel(item.equId) |
| | | // this.equipMessageTimer = setInterval(() => { |
| | | // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0) |
| | | // },1000*10) |
| | | }, |
| | | |
| | | }, |
| | | created() { |
| | | if (this.$route.params.id) { |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | this.getWorkshopDetailsByApi(this.$route.params.id) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è®¾å¤ææ½æç¼©æ¾æ¶è§¦åäºä»¶ |
| | | * @param newRect ææ½æç¼©æ¾åç尺寸åè·ç¦» |
| | | * @param index ææ½è®¾å¤å¨æ°ç»ä¸ç䏿 |
| | | */ |
| | | resize(newRect, index) { |
| | | // if (newRect.width > 100) { |
| | | // if (newRect.width / newRect.height < 2) { |
| | | // this.deviceList[index].fontSize = newRect.width / 10 |
| | | // } else { |
| | | // this.deviceList[index].fontSize = newRect.height / 5 |
| | | // } |
| | | // } else { |
| | | // this.deviceList[index].fontSize = 12 |
| | | // } |
| | | this.deviceList[index].vw = newRect.width |
| | | this.deviceList[index].vh = newRect.height |
| | | this.deviceList[index].coordinateTop = newRect.top |
| | | this.deviceList[index].coordinateLeft = newRect.left |
| | | mounted() { |
| | | // ç¦æ¢ç¨æ·éä¸å
容 |
| | | document.onselectstart = () => false |
| | | }, |
| | | |
| | | /** |
| | | * æ ¹æ®è®¾å¤ç¶æå¼è·å对åºè®¾å¤æ°é |
| | | * @param value 设å¤ç¶æå¼ |
| | | * @returns {number} è®¾å¤æ°é |
| | | */ |
| | | getDeviceNumberByStatus(value) { |
| | | return this.deviceList.filter((item) => item.equipmentStatus === value).length |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯åè½è§¦åäºä»¶ |
| | | * @param checked å½åswitchç¶æï¼æ¯å¦å¼å¯ï¼åå§ä¸ºfalse |
| | | */ |
| | | handleSwitchChange(checked) { |
| | | this.isOperatingDevice = true |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | }, |
| | | }, |
| | | created() { |
| | | if (this.$route.params.id) { |
| | | this.getDeviceListByApi(this.$route.params.id) |
| | | this.getWorkshopDetailsByApi(this.$route.params.id) |
| | | beforeDestroy() { |
| | | // ç¡®ä¿éæ¯å®æ¶å¨ååæ¶èµæº |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | } |
| | | }, |
| | | mounted() { |
| | | // ç¦æ¢ç¨æ·éä¸å
容 |
| | | document.onselectstart = () => false |
| | | }, |
| | | beforeDestroy() { |
| | | // ç¡®ä¿éæ¯å®æ¶å¨ååæ¶èµæº |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .full-screen-container { |
| | | background-image: url('../assets/Bj.jpg'); |
| | | background-size: 100% 100%; |
| | | color: #fff; |
| | | |
| | | .page-header { |
| | | height: 80px; |
| | | font-size: 50px; |
| | | text-align: center; |
| | | position: relative; |
| | | |
| | | .header-right { |
| | | width: 450px; |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 35px; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | |
| | | .content-container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-repeat: no-repeat; |
| | | .full-screen-container { |
| | | background-image: url('../assets/Bj.jpg'); |
| | | background-size: 100% 100%; |
| | | color: #fff; |
| | | |
| | | .device-status-info { |
| | | width: 400px; |
| | | position: absolute; |
| | | top: 5px; |
| | | right: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .page-header { |
| | | height: 80px; |
| | | font-size: 50px; |
| | | text-align: center; |
| | | position: relative; |
| | | |
| | | .single-status-info { |
| | | width: 60px; |
| | | .header-right { |
| | | width: 450px; |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 35px; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | |
| | | .content-container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | .device-status-info { |
| | | width: 400px; |
| | | position: absolute; |
| | | top: 5px; |
| | | right: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | .status-square { |
| | | width: 14px; |
| | | height: 14px; |
| | | border: 1px solid #fff; |
| | | border-radius: 2px; |
| | | .single-status-info { |
| | | width: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | .status-square { |
| | | width: 14px; |
| | | height: 14px; |
| | | border: 1px solid #fff; |
| | | border-radius: 2px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .single-device { |
| | | position: absolute; |
| | | border: 1px solid transparent; |
| | | padding: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | cursor: default; |
| | | |
| | | &:active { |
| | | border: 1px solid #1890ff; |
| | | } |
| | | |
| | | .device-status { |
| | | width: 100%; |
| | | height: 100%; |
| | | .single-device { |
| | | position: absolute; |
| | | border: 1px solid transparent; |
| | | padding: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | cursor: default; |
| | | |
| | | .status-image { |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | width: 45px; |
| | | margin-right: 10px; |
| | | &:active { |
| | | border: 1px solid #1890ff; |
| | | } |
| | | |
| | | .device-image { |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | .device-status { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .status-image { |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | width: 45px; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .device-image { |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="12"> |
| | | <a-form-item label="䏿å"> |
| | | <j-input placeholder="请è¾å
¥ä¸æå" v-model="queryParam.chineseName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="è±æå"> |
| | | <j-input placeholder="请è¾å
¥è±æå" v-model="queryParam.englishName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="驱å¨ç±»å"> |
| | | <a-auto-complete |
| | | v-model="queryParam.controlSystemType" |
| | | :data-source="driveTypeList" |
| | | placeholder="è¯·éæ©æ§å¶ç³»ç»ç±»å" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" style="border-top: 5px"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ·»å åæ°éå¼</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay" @click="handleMenuClick"> |
| | | <a-menu-item key="1"> |
| | | <a-icon type="delete" @click="batchDel"/> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i>已鿩 <a style="font-weight: 600">{{ |
| | | selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="avatarslot" slot-scope="text, record, index"> |
| | | <div class="anty-img-wrap"> |
| | | <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </span> |
| | | |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <ParamThresholdModal ref="modalForm" @ok="modalFormOk" :driveTypeList="driveTypeList"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import api from '@/api/mdc' |
| | | import ParamThresholdModal from './modules/DeviceParamThresholdManagement/ParamThresholdModal' |
| | | |
| | | export default { |
| | | name: 'EquipmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | ParamThresholdModal |
| | | }, |
| | | data() { |
| | | return { |
| | | name: 'DeviceParamThresholdManagement', |
| | | description: 'è¿æ¯è®¾å¤åæ°éå¼ç®¡ç页é¢', |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '䏿å', |
| | | align: 'center', |
| | | dataIndex: 'chineseName', |
| | | width: 120 |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: 'è±æå', |
| | | align: 'center', |
| | | width: 150, |
| | | dataIndex: 'englishName' |
| | | }, |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: 'center', |
| | | width: 180, |
| | | dataIndex: 'controlSystemType' |
| | | }, |
| | | { |
| | | title: 'éå¼ä¸é', |
| | | align: 'center', |
| | | width: 120, |
| | | dataIndex: 'maxThreshold' |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | { |
| | | title: 'éå¼ä¸é', |
| | | align: 'center', |
| | | width: 80, |
| | | dataIndex: 'minThreshold' |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 120 |
| | | } |
| | | ], |
| | | driveTypeList: [], |
| | | url: { |
| | | list: '/mdc/mdcEquipmentThreshold/list', |
| | | delete: '/mdc/mdcEquipmentThreshold/delete', |
| | | deleteBatch: '/mdc/mdcEquipmentThreshold/deleteBatch' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | methods: { |
| | | handleEdit: function(record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | |
| | | // è°ç¨æ½å±è¡¨åç»ä»¶ä¸çæ¸
é¤è¡¨åéªè¯æ¹æ³ |
| | | this.$refs.modalForm.removeValidate() |
| | | }, |
| | | |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | }, |
| | | |
| | | handleMenuClick(e) { |
| | | if (e.key == 1) { |
| | | this.batchDel() |
| | | } else if (e.key == 2) { |
| | | this.batchFrozen(2) |
| | | } else if (e.key == 3) { |
| | | this.batchFrozen(1) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è°ç¨æ¥å£è·åæ§å¶ç³»ç»ç±»å |
| | | */ |
| | | getDriveTypeByApi() { |
| | | api.getDriveTypeApi().then((res) => { |
| | | this.driveTypeList = res.result.map(item => item.value) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ) |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :maskClosable="true" |
| | | :width="modalWidth" |
| | | @cancel="visible=false" |
| | | :visible="visible"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules" :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="controlSystemType" label="驱å¨ç±»å"> |
| | | <a-select v-model="model.controlSystemType" @change="handleDriveTypeChange" |
| | | placeholder="è¯·éæ©é©±å¨ç±»å"> |
| | | <a-select-option v-for="(item,index) in driveTypeList" :key="index" :value="item"> |
| | | {{item}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="chineseName" label="åæ°"> |
| | | <a-select v-model="model.chineseName" placeholder="è¯·éæ©åæ°"> |
| | | <a-select-option v-for="item in paramList" :key="item.value" :value="item.value"> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="maxThreshold" label="éå¼ä¸é"> |
| | | <a-input v-model="model.maxThreshold" placeholder="请è¾å
¥éå¼ä¸é"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="minThreshold" label="éå¼ä¸é"> |
| | | <a-input v-model="model.minThreshold" placeholder="请è¾å
¥éå¼ä¸é"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | |
| | | <template slot="footer"> |
| | | <a-popconfirm title="ç¡®å®æ¾å¼æä½ï¼" @confirm="visible=false" okText="ç¡®å®" cancelText="åæ¶"> |
| | | <a-button style="margin-right: .8rem">åæ¶</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">æäº¤</a-button> |
| | | </template> |
| | | |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'ParamThresholdModal', |
| | | components: {}, |
| | | props: { |
| | | driveTypeList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | modalWidth: 700, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | controlSystemType: [ |
| | | { |
| | | required: true, message: 'è¯·éæ©é©±å¨ç±»å' |
| | | } |
| | | ], |
| | | chineseName: [ |
| | | { |
| | | required: true, message: 'è¯·éæ©åæ°' |
| | | } |
| | | ], |
| | | minThreshold: [ |
| | | { |
| | | required: true, message: '请è¾å
¥éå¼ä¸é' |
| | | }, |
| | | { |
| | | pattern: /^[0-9]+$/, |
| | | message: '请è¾å
¥é¿æä¼¯æ°å' |
| | | } |
| | | ], |
| | | maxThreshold: [ |
| | | { |
| | | required: true, message: '请è¾å
¥éå¼ä¸é' |
| | | }, |
| | | { |
| | | pattern: /^[0-9]+$/, |
| | | message: '请è¾å
¥é¿æä¼¯æ°å' |
| | | } |
| | | ] |
| | | }, |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: { |
| | | controlSystemType: '', |
| | | chineseName: '', |
| | | minThreshold: '', |
| | | maxThreshold: '' |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | confirmLoading: false, |
| | | url: { |
| | | userId: '/sys/user/generateUserId' // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | }, |
| | | paramList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.visible = true |
| | | this.model = { |
| | | controlSystemType: '', |
| | | chineseName: '', |
| | | minThreshold: '', |
| | | maxThreshold: '' |
| | | } |
| | | this.paramList = [] |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold')) |
| | | }) |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.visible = true |
| | | this.model = Object.assign({}, record) |
| | | api.getParamListByDriveTypeApi(record.controlSystemType) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.paramList = res.result |
| | | } |
| | | }) |
| | | this.model.chineseName = `${record.englishName}(${record.chineseName})` |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold')) |
| | | }) |
| | | }, |
| | | |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (this.model.maxThreshold > this.model.minThreshold) { |
| | | that.confirmLoading = true |
| | | let obj |
| | | if (this.title == 'æ°å¢') { |
| | | obj = api.addParamThresholdApi(this.model) |
| | | } else { |
| | | obj = api.editParamThresholdApi(this.model) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | this.visible = false |
| | | }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'éå¼ä¸éä¸è½å°äºçäºéå¼ä¸é' |
| | | }) |
| | | } |
| | | |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èæ³è¾å
¥æ¡çéåè½ |
| | | * @param input è¾å
¥çå
容 |
| | | * @param option é
ç½® |
| | | * @returns {boolean} 夿æ¯å¦çé |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ) |
| | | }, |
| | | |
| | | /** |
| | | * 驱å¨åæ°ç±»åéä¸å渲æç¸åºçåæ°å表 |
| | | * @param value 驱å¨åæ°ç±»åéä¸é¡¹ |
| | | */ |
| | | handleDriveTypeChange(value) { |
| | | api.getParamListByDriveTypeApi(value) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.paramList = res.result |
| | | this.model.chineseName = res.result.length ? res.result[0].value : '' |
| | | if (this.model.chineseName) this.$refs.form.clearValidate('chineseName') |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¼è¾ææ¥ç详æ
æ°æ®æ¶æ¸
餿½å±è¡¨åéªè¯ |
| | | */ |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div ref="wrap" @mouseenter="getModalNode"> |
| | | <a-modal |
| | | :title="title" |
| | | width="70%" |
| | | :visible="visible" |
| | | :getContainer="() => this.$refs.wrap" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | wrap-class-name="full-modal" |
| | | centered |
| | | :closable="false" |
| | | :footer="null" |
| | | > |
| | | <div |
| | | id="mdcEquiInfo" |
| | | style="padding:1px;" |
| | | > |
| | | <table |
| | | width="100%" |
| | | style="border-collapse: separate;border-spacing:0px; color: #fff" |
| | | > |
| | | <tr> |
| | | <td v-if="this.spindlebeilv != null"> |
| | | <div |
| | | class="mdcEquipMon" |
| | | style="width: 250px; height: 200px;margin : 0 auto;padding: 0;" |
| | | align="center" |
| | | > |
| | | 主轴åç |
| | | <div |
| | | id="mdcEquiMoniGauge1" |
| | | ref="chart1" |
| | | style="width: 100%; height: 95%;" |
| | | ></div> |
| | | </div> |
| | | </td> |
| | | <td v-if="this.feedbeilv != null"> |
| | | <div |
| | | class="mdcEquipMon" |
| | | style="width: 210px; height: 180px;margin : 0 auto;" |
| | | align="center" |
| | | > |
| | | è¿ç»åç |
| | | <div |
| | | id="mdcEquiMoniGauge2" |
| | | ref="chart2" |
| | | style="width: 100%; height: 95%;" |
| | | ></div> |
| | | </div> |
| | | </td> |
| | | <td v-if="this.spindleload != null"> |
| | | <div |
| | | class="mdcEquipMon" |
| | | style="width: 210px; height: 180px;margin : 0 auto;" |
| | | align="center" |
| | | >主轴è´è· |
| | | <div |
| | | id="mdcEquiMoniGauge3" |
| | | ref="mdcEquiMoniGauge3" |
| | | style="width: 100%; height: 95%;" |
| | | ></div> |
| | | </div> |
| | | </td> |
| | | <td v-if="this.rapidfeed != null"> |
| | | <div |
| | | class="mdcEquipMon" |
| | | style="width: 210px; height: 180px;margin : 0 auto;" |
| | | align="center" |
| | | >å¿«éè¿ç»åç |
| | | <div |
| | | id="mdcEquiMoniGauge4" |
| | | ref="mdcEquiMoniGauge4" |
| | | style="width: 100%; height: 95%;" |
| | | ></div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="5"> |
| | | <a-descriptions |
| | | title="åºç¡ä¿¡æ¯" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="设å¤ç¼å·">{{resultData.equipmentID}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åç§°">{{resultData.equipmentName}}</a-descriptions-item> |
| | | <a-descriptions-item label="IPå°å">{{resultData.equipmentIP}}</a-descriptions-item> |
| | | <a-descriptions-item label="端å£å·">{{resultData.dataPort}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»çæ¬å·">{{resultData.SystemVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="驱å¨ç±»å">{{resultData.driveType}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»åå·">{{resultData.SystemType}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤ç±»å">{{resultData.deviceType}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åç">{{resultData.devicePower}}</a-descriptions-item> |
| | | <a-descriptions-item label="ææè½´æ°">{{resultData.ValidAxis}}</a-descriptions-item> |
| | | <a-descriptions-item label="æå¤§è½´æ°">{{resultData.MaxAxis}}</a-descriptions-item> |
| | | <a-descriptions-item label="夿³¨">{{resultData.remark}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | |
| | | <!-- <a-descriptions |
| | | title="è¿è¡æ°æ®" |
| | | v-if="driverType != 'LSV2' && driverType != 'ZUOLAN' " |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="主轴åç(%)">{{resultData.spindlebeilv}}</a-descriptions-item> |
| | | <a-descriptions-item label="è¿ç»åç(%)">{{resultData.feedbeilv}}</a-descriptions-item> |
| | | <a-descriptions-item label="主轴è´è·(%)">{{resultData.spindleload}}</a-descriptions-item> |
| | | <a-descriptions-item label="主轴转é(rpm)">{{resultData.spindlespeed}}</a-descriptions-item> |
| | | <a-descriptions-item label="è¿ç»é度(mm/min)">{{resultData.feedrate}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | |
| | | <a-descriptions |
| | | title="è¿è¡æ°æ® for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="主轴åç(%)">{{resultData.spindlebeilv}}</a-descriptions-item> |
| | | <a-descriptions-item label="è®¾å¤æ£å¸¸è¿è¡æ¶é´">{{resultData.equipmentNormalTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="å¿«éè¿ç»åç(%)">{{resultData.rapidfeed}}</a-descriptions-item> |
| | | <a-descriptions-item label="NCæ£å¸¸è¿è¡æ¶é´">{{resultData.nCNormalTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="è¿ç»åç(%)">{{resultData.feedbeilv}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤è¿è¡æ¶é´">{{resultData.equipmentTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="å½ååå
·å·">{{resultData.toolNum}}</a-descriptions-item> |
| | | </a-descriptions> --> |
| | | |
| | | <!-- <a-descriptions |
| | | title="ç¨åºä¿¡æ¯" |
| | | v-if="driverType != 'LSV2' && driverType != 'ZUOLAN' " |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="åºåå·">{{resultData.sequencenumber}}</a-descriptions-item> |
| | | <a-descriptions-item |
| | | label="å½åæ§è¡ä»£ç " |
| | | :span="2" |
| | | >{{resultData.executingcode}}</a-descriptions-item> |
| | | <a-descriptions-item label="工件åç§°">{{resultData.productName}}</a-descriptions-item> |
| | | </a-descriptions> --> |
| | | |
| | | <!-- <a-descriptions |
| | | title="ç¨åºä¿¡æ¯ for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="å½åç¨åº">{{resultData.program}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç¨åºæ§è¡ç¹">{{resultData.programPosition}}</a-descriptions-item> |
| | | <a-descriptions-item label="æä½æ¨¡å¼">{{resultData.operationType}}</a-descriptions-item> |
| | | <a-descriptions-item label="é误信æ¯ç¼å·ä¸">{{resultData.firstErrorNum}}</a-descriptions-item> |
| | | <a-descriptions-item label="é误信æ¯ä¸">{{resultData.firstError}}</a-descriptions-item> |
| | | <a-descriptions-item label="é误信æ¯">{{resultData.errorinfo}}</a-descriptions-item> |
| | | <a-descriptions-item label="é误信æ¯ç¼å·äº">{{resultData.secondErrorNum}}</a-descriptions-item> |
| | | <a-descriptions-item label="é误信æ¯äº">{{resultData.secondError}}</a-descriptions-item> |
| | | </a-descriptions> --> |
| | | |
| | | <!--<a-descriptions |
| | | title="è½´çæ§æ°æ® fro SIEMENS840DSL" |
| | | v-if="driverType == 'SIEMENS840DSL'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="X轴温度">{{resultData.temperatureX}}</a-descriptions-item> |
| | | <a-descriptions-item label="Y轴温度">{{resultData.temperatureY}}</a-descriptions-item> |
| | | <a-descriptions-item label="Z轴温度">{{resultData.temperatureZ}}</a-descriptions-item> |
| | | <a-descriptions-item label="A轴温度">{{resultData.temperatureA}}</a-descriptions-item> |
| | | <a-descriptions-item label="B轴温度">{{resultData.temperatureB}}</a-descriptions-item> |
| | | <a-descriptions-item label="Xè½´çµæµ">{{resultData.equipmentCurrentX}}</a-descriptions-item> |
| | | <a-descriptions-item label="Yè½´çµæµ">{{resultData.equipmentCurrentY}}</a-descriptions-item> |
| | | <a-descriptions-item label="Zè½´çµæµ">{{resultData.equipmentCurrentZ}}</a-descriptions-item> |
| | | <a-descriptions-item label="Aè½´çµæµ">{{resultData.equipmentCurrentA}}</a-descriptions-item> |
| | | <a-descriptions-item label="Bè½´çµæµ">{{resultData.equipmentCurrentB}}</a-descriptions-item> |
| | | <a-descriptions-item label="Xè½´éå¨è¯¯å·®">{{resultData.equipmentLagErrorX}}</a-descriptions-item> |
| | | <a-descriptions-item label="Yè½´éå¨è¯¯å·®">{{resultData.equipmentLagErrorY}}</a-descriptions-item> |
| | | <a-descriptions-item label="Zè½´éå¨è¯¯å·®">{{resultData.equipmentLagErrorZ}}</a-descriptions-item> |
| | | <a-descriptions-item label="Aè½´éå¨è¯¯å·®">{{resultData.equipmentLagErrorA}}</a-descriptions-item> |
| | | <a-descriptions-item label="Bè½´éå¨è¯¯å·®">{{resultData.equipmentLagErrorB}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | --> |
| | | <!-- <a-descriptions |
| | | title="åæ ä¿¡æ¯ " |
| | | v-if="driverType == 'FANUC'" |
| | | :column="3" |
| | | > |
| | | <a-descriptions-item label="ç»å¯¹åæ X">{{resultData.xabsolute}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç»å¯¹åæ Y">{{resultData.yabsolute}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç»å¯¹åæ Z">{{resultData.zabsolute}}</a-descriptions-item> |
| | | <a-descriptions-item label="æºåºåæ X">{{resultData.xmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="æºåºåæ Y">{{resultData.ymachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="æºåºåæ Z">{{resultData.zmachine}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | |
| | | <a-descriptions |
| | | title="åæ ä¿¡æ¯ for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="Xåæ ">{{resultData.xmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Yåæ ">{{resultData.ymachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Zåæ ">{{resultData.zmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Aåæ ">{{resultData.amachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Båæ ">{{resultData.bmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Cåæ ">{{resultData.cmachine}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | |
| | | <a-descriptions |
| | | title="åæ ä¿¡æ¯ for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="Xåæ ">{{resultData.xmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Yåæ ">{{resultData.ymachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Zåæ ">{{resultData.zmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Aåæ ">{{resultData.amachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Båæ ">{{resultData.bmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Cåæ ">{{resultData.cmachine}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | |
| | | <a-descriptions |
| | | title="åæ ä¿¡æ¯" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="Xåæ ">{{resultData.xmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Yåæ ">{{resultData.ymachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Zåæ ">{{resultData.zmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Aåæ ">{{resultData.amachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Båæ ">{{resultData.bmachine}}</a-descriptions-item> |
| | | <a-descriptions-item label="Cåæ ">{{resultData.cmachine}}</a-descriptions-item> |
| | | </a-descriptions> --> |
| | | <!---æ°æ®æºè°æ´ 卿å±ç¤º è¿è¡æ°æ®----> |
| | | |
| | | <a-descriptions |
| | | title="è¿è¡æ°æ®" |
| | | v-show="mdcDriveTypeParamConfigList != null" |
| | | v-if="driverType != 'PLC'" |
| | | :column="4" |
| | | > |
| | | |
| | | <a-descriptions-item |
| | | v-for="(item,id) in mdcDriveTypeParamConfigList " |
| | | :key="item.id" |
| | | :label="item.chineseName" |
| | | >{{item.value}} |
| | | </a-descriptions-item> |
| | | |
| | | </a-descriptions> |
| | | |
| | | <!--<a-descriptions--> |
| | | <!--title="åæ ä¿¡æ¯"--> |
| | | <!--v-show="xyzAliasesList != null"--> |
| | | <!--v-if="driverType != 'PLC'"--> |
| | | <!--:column="4"--> |
| | | <!-->--> |
| | | <!--<a-descriptions-item--> |
| | | <!--v-for="(item,id) in xyzAliasesList "--> |
| | | <!--:key="item.id"--> |
| | | <!--:label="item.title"--> |
| | | <!-->{{item.value}}</a-descriptions-item>--> |
| | | <!--</a-descriptions>--> |
| | | |
| | | <a-descriptions |
| | | title="çæ¬ä¿¡æ¯ for lsv2" |
| | | v-if="driverType == 'LSV2'" |
| | | :column="4" |
| | | > |
| | | <a-descriptions-item label="NCçæ¬">{{resultData.nCVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="TNCçæ¬">{{resultData.tNCVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="OPTçæ¬">{{resultData.oPTVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="PLCçæ¬">{{resultData.pLCVersion}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{ marginRight: '8px' }" |
| | | @click="handleCancel" |
| | | style="color: #1191b0;" |
| | | >å
³é |
| | | </a-button> |
| | | </template> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getAction, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'EqumentDetaiModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | mdcDriveTypeParamConfigList: [], |
| | | xyzAliasesList: [], |
| | | title: '', |
| | | //主轴åç |
| | | spindlebeilv: 1, |
| | | //è¿ç»åç |
| | | feedbeilv: 1, |
| | | // 主轴è´è· |
| | | spindleload: 1, |
| | | //å¿«éè¿ç»åç |
| | | rapidfeed: 1, |
| | | visible: false, |
| | | resultData: {}, |
| | | driverType: '', |
| | | deviceTypeDict: '', |
| | | url: { |
| | | mdcEquipmentDetailedInfo: '/mdc/mdcEquipment/mdcEquipmentDetailedInfo' |
| | | }, |
| | | modalTimer: null, |
| | | ee: ' ', |
| | | modalNode: null, |
| | | timeout: null |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: {}, |
| | | 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: true, |
| | | 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 |
| | | }, |
| | | 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: true, |
| | | 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 |
| | | }, |
| | | 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: 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: true, |
| | | 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.spindleload / 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 |
| | | }, |
| | | 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: true, |
| | | 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 |
| | | }, |
| | | 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) |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.modalNode.removeEventListener('mouseleave', this.closeModal) |
| | | if(this.modalTimer){ |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | } |
| | | if (this.timeout) { |
| | | clearTimeout(this.timeout) |
| | | this.timeout = null |
| | | } |
| | | }, |
| | | |
| | | timerModel(id) { |
| | | this.ee = id |
| | | this.modalTimer = setInterval(() => { |
| | | setTimeout(this.initData(this.ee), 0) |
| | | }, 1000 * 4) |
| | | }, |
| | | |
| | | initData(id) { |
| | | let _this = this |
| | | this.visible = true |
| | | // _this.drawLine() |
| | | getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | _this.resultData = res.result |
| | | _this.driverType = res.result.deviceType |
| | | _this.spindlebeilv = res.result.spindlebeilv |
| | | _this.feedbeilv = res.result.feedbeilv |
| | | _this.spindleload = res.result.spindleload |
| | | _this.rapidfeed = res.result.rapidfeed |
| | | _this.mdcDriveTypeParamConfigList = res.result.mdcDriveTypeParamConfigList |
| | | _this.xyzAliasesList = res.result.xyzAliasesList |
| | | this.$nextTick(() => { |
| | | _this.drawLine() |
| | | }) |
| | | // _this.initDeviceType(_this.resultData.deviceType) |
| | | } else { |
| | | // _this.$message.warn(res.message) |
| | | _this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getModalNode() { |
| | | console.log(document.querySelector('.ant-modal-content')) |
| | | this.modalNode = document.querySelector('.ant-modal-content') |
| | | this.timeout = setTimeout(() => { |
| | | this.modalNode.addEventListener('mouseleave', this.closeModal) |
| | | }, 100) |
| | | }, |
| | | |
| | | closeModal() { |
| | | this.handleCancel() |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | | } |
| | | } |
| | | </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; |
| | | } |
| | | /deep/ .ant-modal-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | /*height: calc(100vh);*/ |
| | | background-color: #4a4a48; |
| | | } |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | /deep/ .ant-modal-content { |
| | | /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/ |
| | | /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/ |
| | | /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/ |
| | | background-color: #312c2c; |
| | | opacity: 0.7; |
| | | } |
| | | |
| | | /deep/ .ant-modal-close { |
| | | color: #1191b0; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | /deep/ .ant-modal-close-x { |
| | | font-size: 24px; |
| | | } |
| | | |
| | | /deep/ .ant-modal-footer { |
| | | border-top: none; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions { |
| | | border: 1px solid #16738d; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-title { |
| | | color: #fff; |
| | | padding: 10px; |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-view { |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-view .ant-descriptions-row .ant-descriptions-item { |
| | | padding-bottom: 5px; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-colon { |
| | | color: #fff; |
| | | width: 5.1vw; |
| | | } |
| | | |
| | | /deep/ .ant-descriptions-item-content { |
| | | color: #fff; |
| | | border: 1px solid #4bcfc8; |
| | | padding: 0 10px; |
| | | width: auto; |
| | | min-width: 130px; |
| | | /*max-width: 300px;*/ |
| | | height: 25px; |
| | | } |
| | | |
| | | .mdcEquipMon { |
| | | color: #fff; |
| | | } |
| | | |
| | | fieldset { |
| | | border: 1px solid #16738d; |
| | | padding: 17px; |
| | | margin: 14px; |
| | | } |
| | | |
| | | fieldset legend { |
| | | display: inline; |
| | | width: 88px; |
| | | } |
| | | |
| | | table tr td { |
| | | text-align: left; |
| | | color: #fff; |
| | | } |
| | | |
| | | table tr td input { |
| | | border: 1px solid #a6eff9; |
| | | } |
| | | |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | color: #fff !important; |
| | | background-color: #1191b0; |
| | | border: none; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |