<template>
|
<el-dialog
|
title="机床详情"
|
width="80%"
|
class="jcdetails"
|
:visible.sync="visible">
|
<!-- 主轴 进给 机床信息 -->
|
<el-row :gutter="20">
|
<!-- 主轴 进给 -->
|
<el-col :xs="24" :sm="8" :md="5" :lg="5" :xl="5" id="one" class="borderga margin5 backwhite marginr10 marginl10 margint10">
|
<div class="chart-content-xs">
|
<e-charts :options="completenum" auto-resize style="width: 100%;height: 200%;"></e-charts>
|
</div>
|
<div class="chart-content-xs">
|
<e-charts :options="efficiencyjc" auto-resize style="width: 100%;height: 200%;"></e-charts>
|
</div>
|
</el-col>
|
<el-col :xs="24" :sm="8" :md="13" :lg="13" :xl="13" id="two" :class="twoclass?'backwhite':'backgray'" class="borderga marginr10 margint10">
|
<!-- 主轴 -->
|
<el-row :gutter="20">
|
<el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="8" class="textcenter">
|
<div class="content-card-xs">
|
<div class="chart-content-xs">
|
<e-charts :options="spLoad" auto-resize style="width: 100%;height: 200%;"></e-charts>
|
</div>
|
<div class="mdc-machine-name-xs">主轴负载:{{ load }}%</div>
|
<!-- <div class="mdc-machine-name-xs">主轴转速:{{ speed }}</div> -->
|
<!-- <div class="mdc-machine-name-xs">日利用率:{{ utilizationday }}%</div> -->
|
</div>
|
</el-col>
|
<el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="8" class="textcenter">
|
<div class="content-card-xs">
|
<div class="chart-content-xs">
|
<e-charts :options="spRate" auto-resize style="width: 100%;height: 200%"></e-charts>
|
</div>
|
<div class="mdc-machine-name-xs">主轴倍率:{{ ratio }}%</div>
|
<!-- <div class="mdc-machine-name-xs">刀具:{{ cutting }}</div> -->
|
<!-- <div class="mdc-machine-name-xs">周利用率:{{ utilizationweeks }}%</div> -->
|
</div>
|
</el-col>
|
<el-col :xs="24" :sm="12" :md="8" :lg="8" :xl="8" class="textcenter">
|
<div class="content-card-xs">
|
<div class="chart-content-xs">
|
<e-charts :options="feedRate" auto-resize style="width: 100%;height: 200%"></e-charts>
|
</div>
|
<div class="mdc-machine-name-xs">进给倍率:{{ feedratio }}%</div>
|
<!-- <div class="mdc-machine-name-xs">进给速度:{{ feedspeed }}</div> -->
|
<!-- <div class="mdc-machine-name-xs">月利用率:{{ utilizationmonths }}%</div> -->
|
</div>
|
</el-col>
|
</el-row>
|
<!-- 加工数据-->
|
<hr />
|
<p class="processing-data">加工数据</p>
|
<el-form ref="form" class="processing-form" label-width="80px" label-position="left">
|
<el-row>
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
<el-form-item label="程序名称:">
|
<el-input readonly v-model="progName"></el-input>
|
</el-form-item>
|
<el-form-item label="控制模式:">
|
<el-input readonly v-model="progContent"></el-input>
|
</el-form-item>
|
<el-form-item label="主轴转速:">
|
<el-input readonly v-model="speed"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
<el-form-item label="零件号:" style="margin-left: 5px">
|
<el-input readonly v-model="componentId"></el-input>
|
</el-form-item>
|
<el-form-item label="工序号:" style="margin-left: 5px">
|
<el-input readonly v-model="processId"></el-input>
|
</el-form-item>
|
<el-form-item label="进给速度:" style="margin-left: 5px">
|
<el-input readonly v-model="feedspeed"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
</el-col>
|
<!-- 机床信息 -->
|
<el-col :xs="24" :sm="8" :md="5" :lg="5" :xl="5" id="three" class="borderga backwhite margint10">
|
<ul class="machine-information">
|
<li style="height: 147px"><img :src="machineimg"></li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>工段:</label>{{ workshopName }}-{{ sectionName }}</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>名称:</label>{{ machineName }}</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>运行时间:</label>{{ cycleTime }}</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<!-- <li class="heiline40"><label>数控系统:</label></li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/> -->
|
<li class="heiline30"><label>日利用率:</label>{{ utilizationday }}%</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>周利用率:</label>{{ utilizationweeks }}%</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>月利用率:</label>{{ utilizationmonths }}%</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>完工件数:</label>{{ cycleCount }}</li>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<ul class="boote">
|
<li v-if="this.state === 'STOP'">
|
<label class="fl margint05rem">机床状态</label>
|
<span class="bootstate backblack"></span>
|
<label class="fr width2rem margint05rem marginr10"><i>STOP</i>
|
</label>
|
</li>
|
<li v-if="this.state === 'RUN' || this.state === 'FEEDHOLDON'">
|
<label class="fl margint05rem">机床状态</label>
|
<span class="bootstate backgreenyellow"></span>
|
<label class="fr width2rem margint05rem marginr10"><i>RUN</i>
|
</label>
|
</li>
|
<li v-if="this.state === 'IDLE'">
|
<label class="fl margint05rem">机床状态</label>
|
<span class="bootstate backyellow"></span>
|
<label class="fr width2rem margint05rem marginr10"><i>IDLE</i>
|
</label>
|
</li>
|
<li v-if="this.state === 'ALARM'">
|
<label class="fl margint05rem">机床状态</label>
|
<span class="bootstate backgreenred"></span>
|
<label class="fr width2rem margint05rem marginr10"><i>ALARM</i>
|
</label>
|
</li>
|
</ul>
|
<hr style="background-color: gainsboro;border: none;height: 2px;"/>
|
<li class="heiline30"><label>待机原因:</label>{{ }}</li>
|
</ul>
|
</el-col>
|
</el-row>
|
<p class="processing-data"> </p>
|
<el-row :gutter="20">
|
<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6" id="four" class="borderga margin5 backwhite marginr5 marginl10 margint10">
|
<div class="borderga margint10 backwhite">
|
<el-table :data="axislist" id="axis" v-loading="tableDataLoading" height="170px">
|
<!-- <el-table-column type="index" width="100px" align="center" label='轴' prop="name"></el-table-column>-->
|
<el-table-column align="center" label="轴" prop="name"></el-table-column>
|
<el-table-column align="center" label="坐标" prop="position"></el-table-column>
|
<el-table-column align="center" label="扭矩" prop="servoLoad"></el-table-column>
|
</el-table>
|
</div>
|
</el-col>
|
<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6" id="five" class="borderga margin5 backwhite marginr5 marginl5 margint10">
|
<div class="borderga margint10 backwhite">
|
<el-table :data="axislist2" id="axis2" v-loading="tableDataLoading" height="170px">
|
<!-- <el-table-column type="index" width="100px" align="center" label='轴' prop="name"></el-table-column>-->
|
<el-table-column align="center" label="轴" prop="name"></el-table-column>
|
<el-table-column align="center" label="坐标" prop="position"></el-table-column>
|
<el-table-column align="center" label="扭矩" prop="servoLoad"></el-table-column>
|
</el-table>
|
</div>
|
</el-col>
|
<el-col :xs="24" :sm="11" :md="11" :lg="11" :xl="11" id="six" :class="twoclass?'backwhite':'backgray'" class="borderga margin5 backwhite marginr5 marginl5 margint10">
|
<div class="borderga margint10 backwhite">
|
<el-table :data="alarmlist" id="alarm" v-loading="tableDataLoading" height="170px">
|
<!-- <el-table-column type="index" width="100px" align="center" label='序号' prop=""></el-table-column>-->
|
<el-table-column align="center" label='报警号' prop="alarmNo">
|
<template slot-scope="scope">
|
<el-tooltip placement="right" effect="dark" :content="(scope.row.prompt!=null&&scope.row.prompt!=='')?scope.row.prompt:'暂无内容'">
|
<span>{{ scope.row.alarmNo }}</span>
|
</el-tooltip>
|
</template>
|
</el-table-column>
|
<el-table-column align="center" label="报警内容" prop="alarmMsg"></el-table-column>
|
<el-table-column align="center" label="报警时间" prop="time"></el-table-column>
|
</el-table>
|
<!-- 分页 -->
|
<!-- <div style="padding-top: 10px;display: flex;justify-content: flex-end;align-items: center;">-->
|
<!-- <el-button-group>-->
|
<!-- <el-button type="primary" icon="el-icon-arrow-left" size="mini" round @click="prePage()" :disabled="canPaging[0]">上一页</el-button>-->
|
<!-- <el-button disabled size="mini" plain>{{currentPage}}/{{totalPage}}</el-button>-->
|
<!-- <el-button type="primary" size="mini" round @click="nextPage()" :disabled="canPaging[1]">下一页<i class="el-icon-arrow-right el-icon--right"></i></el-button>-->
|
<!-- </el-button-group>-->
|
<!-- </div>-->
|
</div>
|
</el-col>
|
</el-row>
|
<p class="processing-data"> </p>
|
</el-dialog>
|
</template>
|
|
<script>
|
import ECharts from 'vue-echarts/components/ECharts.vue'
|
import 'echarts/lib/chart/gauge'
|
import 'echarts/lib/chart/Pie'
|
import 'echarts/lib/component/tooltip'
|
import { getMachineList } from '@/api/MdcApi'
|
// import { default as Bus, SCROLL_TOP, ON_MESSAGE, ON_VISIBILITY_CHANGE } from '@/bus/EventBus'
|
// import { default as Bus, ON_MESSAGE } from '@/bus/EventBus'
|
export default {
|
name: 'Information',
|
components: {
|
ECharts
|
},
|
data() {
|
return {
|
twoclass: true, // 判断是否未无法采集的机床 变暗
|
visible: false,
|
tableDataLoading: false,
|
timer: null,
|
axislistSize: 3,
|
axislist: [
|
{
|
name: '',
|
position: '',
|
servoLoad: ''
|
},
|
{
|
name: '',
|
position: '',
|
servoLoad: ''
|
},
|
{
|
name: '',
|
position: '',
|
servoLoad: ''
|
}
|
],
|
axislistSize2: 3,
|
axislist2: [
|
{
|
name: '',
|
position: '',
|
servoLoad: ''
|
},
|
{
|
name: '',
|
position: '',
|
servoLoad: ''
|
},
|
{
|
name: '',
|
position: '',
|
servoLoad: ''
|
}
|
],
|
alarmlist: [],
|
machineId: '',
|
currentPage: 1,
|
totalPage: 0,
|
concernFlag: '', // 关注状态
|
load: '', // 主轴负载
|
speed: '', // 主轴转速
|
ratio: '', // 主轴倍率
|
cutting: '', // 刀具
|
feedratio: '', // 进给倍率
|
feedspeed: '', // 进给速度
|
progName: '', // 程序名称
|
progContent: '', // 控制模式
|
componentId: '', // 零件号
|
processId: '', // 工序号
|
machineName: '', // 机床名称
|
workshopName: '', // 车间名
|
sectionName: '', // 工段名
|
cycleTime: '', // 运行时间
|
machineimg: '', // 机床图片
|
machinestate: '', // 机床状态
|
state: '', // 机床具体状态
|
time: '', // 机床状态时间
|
utilizationday: '', // 利用率 日
|
utilizationweeks: '', // 利用率 周
|
utilizationmonths: '', // 利用率 月
|
cycleCount: '', // 完工件数
|
// 开机运行率
|
completenum: {
|
color: ['#3CC4A9', '#888888'],
|
series: [
|
{
|
name: '开机运行率',
|
type: 'pie',
|
radius: ['50%', '70%'],
|
avoidLabelOverlap: false,
|
hoverAnimation: false,
|
labelLine: {
|
normal: { show: false }
|
},
|
data: [
|
{ // 数据值
|
value: 0,
|
name: '开机运行率',
|
selected: false,
|
label: {
|
normal: {
|
show: true,
|
position: 'center',
|
fontSize: '15',
|
// 标签内容格式器,支持字符串模板和回调函数两种形式,字符串模板与回调函数返回的字符串均支持用 \n 换行
|
formatter: '{b}' + '\n\r' + '{c}%'
|
}
|
}
|
},
|
{
|
value: 0,
|
label: { normal: { show: false }}
|
}
|
]
|
}
|
]
|
},
|
// 机床能力利用率
|
efficiencyjc: {
|
color: ['#328978', '#888888'],
|
series: [
|
{
|
name: '能力利用率',
|
type: 'pie',
|
radius: ['50%', '70%'],
|
avoidLabelOverlap: false,
|
hoverAnimation: false,
|
labelLine: {
|
normal: { show: false }
|
},
|
data: [
|
{ // 数据值
|
value: 0,
|
name: '能力利用率',
|
selected: false,
|
label: {
|
normal: {
|
show: true,
|
position: 'center',
|
fontSize: '15',
|
// 标签内容格式器,支持字符串模板和回调函数两种形式,字符串模板与回调函数返回的字符串均支持用 \n 换行
|
formatter: '{b}' + '\n\r' + '{c}%'
|
}
|
}
|
},
|
{
|
value: 0,
|
label: { normal: { show: false }}
|
}
|
]
|
}
|
]
|
},
|
spLoad: {
|
tooltip: {
|
formatter: '{a} <br/>{b} : {c}%'
|
},
|
toolbox: {
|
feature: {
|
restore: {},
|
saveAsImage: {}
|
}
|
},
|
series: [
|
{
|
name: '主轴负载',
|
type: 'gauge',
|
radius: '80%',
|
detail: { formatter: ' ', fontSize: 20 },
|
data: [{ value: 0, name: '' }],
|
axisLine: {
|
lineStyle: {
|
width: 10
|
}
|
},
|
splitLine: {// 分割线
|
length: 15, // 分割线线长
|
lineStyle: {
|
color: 'auto'// 分割线颜色
|
}
|
},
|
pointer: {
|
length: '60%'
|
}
|
}
|
]
|
},
|
spRate: {
|
tooltip: {
|
formatter: '{a} <br/>{b} : {c}%'
|
},
|
toolbox: {
|
feature: {
|
restore: {},
|
saveAsImage: {}
|
}
|
},
|
series: [
|
{
|
name: '主轴倍率',
|
type: 'gauge',
|
radius: '80%',
|
max: 110,
|
detail: { formatter: ' ', fontSize: 20 },
|
data: [{ value: 0, name: '' }],
|
axisLine: {
|
lineStyle: {
|
width: 10
|
}
|
},
|
splitLine: {// 分割线
|
length: 15, // 分割线线长
|
lineStyle: {
|
color: 'auto'// 分割线颜色
|
}
|
},
|
pointer: {
|
length: '60%'
|
}
|
}
|
|
]
|
},
|
feedRate: {
|
tooltip: {
|
formatter: '{a} <br/>{b} : {c}%'
|
},
|
toolbox: {
|
feature: {
|
restore: {},
|
saveAsImage: {}
|
}
|
},
|
series: [
|
{
|
name: '进给倍率',
|
type: 'gauge',
|
radius: '80%',
|
max: 110,
|
detail: { formatter: ' ', fontSize: 20 },
|
data: [{ value: 0, name: '' }],
|
axisLine: {
|
lineStyle: {
|
width: 10
|
}
|
},
|
splitLine: {// 分割线
|
length: 15, // 分割线线长
|
lineStyle: {
|
color: 'auto'// 分割线颜色
|
}
|
},
|
pointer: {
|
length: '60%'
|
}
|
}
|
]
|
}
|
}
|
},
|
|
computed: {
|
canPaging() {
|
const tem = [false, false]
|
tem[0] = (this.currentPage <= 1)
|
tem[1] = (this.currentPage >= this.totalPage)
|
return tem
|
}
|
},
|
methods: {
|
init(obj) {
|
this.machineId = obj.machineId
|
this.machineimg = obj.imgurl
|
this.concernFlag = obj.concernFlag
|
this.visible = true
|
this.getMachineDetail()
|
},
|
/* 获取高度*/
|
showheight() {
|
// var o = document.getElementById('three')
|
// var h = o.clientHeight || o.offsetHeight
|
// h = h + 2
|
document.getElementById('one').style.height = 455 + 'px'
|
document.getElementById('two').style.height = 455 + 'px'
|
},
|
getMachineDetail() {
|
// this.tableDataLoading = true
|
getMachineList(this.currentPage, this.machineId, 0, this.concernFlag).then(res => {
|
// this.tableDataLoading = false
|
var axisNames
|
if (res.status.var4 != null) {
|
axisNames = res.status.var4.split(':')
|
}
|
var positions
|
if (res.status.var5 != null) {
|
positions = res.status.var5.split(':')
|
}
|
var servoLoads
|
if (res.status.var6 != null) {
|
servoLoads = res.status.var6.split(':')
|
}
|
for (let i = 0; i < 3; i++) {
|
if ((axisNames == null) || (axisNames[i] == null) || (axisNames[i] === '')) {
|
this.axislist[i].name = ''
|
} else {
|
this.axislist[i].name = axisNames[i]
|
}
|
if (positions == null) {
|
this.axislist[i].position = ''
|
} else {
|
this.axislist[i].position = positions[i]
|
}
|
if (servoLoads == null) {
|
this.axislist[i].servoLoad = ''
|
} else {
|
this.axislist[i].servoLoad = servoLoads[i]
|
}
|
}
|
for (let i = 3; i < 6; i++) {
|
if ((axisNames == null) || (axisNames[i] == null) || (axisNames[i] === '')) {
|
this.axislist2[i - 3].name = ''
|
} else {
|
this.axislist2[i - 3].name = axisNames[i]
|
}
|
if (positions == null) {
|
this.axislist2[i - 3].position = ''
|
} else {
|
this.axislist2[i - 3].position = positions[i]
|
}
|
if (servoLoads == null) {
|
this.axislist2[i - 3].servoLoad = ''
|
} else {
|
this.axislist2[i - 3].servoLoad = servoLoads[i]
|
}
|
}
|
this.alarmlist = res.list || []
|
this.totalPage = parseInt((res.totalPage || 0))
|
this.load = res.status.spindleLoad// 主轴负载
|
this.ratio = res.status.spindleOverride// 主轴倍率
|
this.cutting = res.status.toolNo// 刀具
|
this.feedratio = res.status.feedrateOverride// 进给倍率
|
this.utilizationday = res.status.utilizationDaily// 利用率日
|
this.utilizationweeks = res.status.utilizationWeekly// 利用率周
|
this.utilizationmonths = res.status.utilizationMonthly// 利用率月
|
this.cycleCount = res.status.cycleCount// 完工件数
|
this.spLoad.series[0].data[0].value = this.load
|
this.spRate.series[0].data[0].value = this.ratio
|
this.feedRate.series[0].data[0].value = this.feedratio
|
this.completenum.series[0].data[0].value = res.status.bootRunningRate
|
this.completenum.series[0].data[1].value = 100 - res.status.bootRunningRate
|
this.efficiencyjc.series[0].data[0].value = res.status.efficiency
|
this.efficiencyjc.series[0].data[1].value = 100 - res.status.efficiency
|
this.progName = res.status.progName// 程序名称
|
this.componentId = res.status.componentId
|
this.processId = res.status.processId
|
// 控制模式
|
if (res.status.mode === 'AUTO') {
|
this.progContent = '自动'
|
} else if (res.status.mode === 'MANUAL') {
|
this.progContent = '手动'
|
} else {
|
this.progContent = ''
|
}
|
this.machineName = res.msg.name// 机床名称
|
this.workshopName = res.msg.workshop
|
this.sectionName = res.msg.section
|
if (this.machineName.indexOf('_PM') !== -1) {
|
this.twoclass = false
|
} else {
|
this.twoclass = true
|
}
|
this.cycleTime = this.formatSeconds(res.msg.cycleTime)// 运行时间
|
this.feedspeed = (res.status.feedRate == null) ? 0 : res.status.feedRate
|
this.speed = (res.status.spindleSpeed == null) ? 0 : res.status.spindleSpeed
|
/* 机床状态*/
|
this.state = res.status.state
|
// if (this.state !== 'RUN' && this.state !== 'FEEDHOLDON') {
|
// this.feedspeed = 0
|
// this.speed = 0
|
// }
|
this.time = res.status.time
|
this.showheight()
|
/* if (res.status.state === 'STOP') { this.machinestate = '关机状态' }
|
if (res.status.state === 'RUN') {
|
this.machinestate = '运行状态'
|
document.getElementById('bootstate').classList.add('backgreenyellow')
|
}
|
if (res.status.state === 'IDLE') {
|
this.machinestate = '空闲状态'
|
document.getElementById('bootstate').classList.add('backyellow')
|
}
|
if (res.status.state === 'ALARM') {
|
this.machinestate = '报警状态'
|
document.getElementById('bootstate').classList.add('backgreenred')
|
} */
|
})
|
},
|
// 前一页
|
prePage() {
|
if (this.currentPage > 1) {
|
this.currentPage--
|
this.getMachineDetail()
|
}
|
},
|
// 后一页
|
nextPage() {
|
if (this.currentPage < this.totalPage) {
|
this.currentPage++
|
this.getMachineDetail()
|
}
|
},
|
/* 秒转换为时分秒*/
|
formatSeconds(value) {
|
var secondTime = parseInt(value)// 秒
|
var minuteTime = 0// 分
|
var hourTime = 0// 小时
|
if (secondTime > 60) { // 如果秒数大于60,将秒数转换成整数
|
// 获取分钟,除以60取整数,得到整数分钟
|
minuteTime = parseInt(secondTime / 60)
|
// 获取秒数,秒数取佘,得到整数秒数
|
secondTime = parseInt(secondTime % 60)
|
// 如果分钟大于60,将分钟转换成小时
|
if (minuteTime > 60) {
|
// 获取小时,获取分钟除以60,得到整数小时
|
hourTime = parseInt(minuteTime / 60)
|
// 获取小时后取佘的分,获取分钟除以60取佘的分
|
minuteTime = parseInt(minuteTime % 60)
|
}
|
}
|
var result = '' + parseInt(secondTime) + '秒'
|
|
if (minuteTime > 0) {
|
result = '' + parseInt(minuteTime) + '分' + result
|
}
|
if (hourTime > 0) {
|
result = '' + parseInt(hourTime) + '小时' + result
|
}
|
return result
|
}
|
},
|
mounted() {
|
// Bus.$on(ON_MESSAGE, res => {
|
// const a = JSON.parse(res)
|
// if (this.machineId === a.machineId) {
|
// if (a.progName != null) { this.progName = a.progName }
|
// if (a.feedrateOverride != null) { this.feedratio = a.feedrateOverride; this.feedRate.series[0].data[0].value = this.feedratio }
|
// if (a.spindleLoad != null) { this.load = a.spindleLoad; this.spLoad.series[0].data[0].value = this.load }
|
// if (a.spindleOverride != null) { this.ratio = a.spindleOverride; this.spRate.series[0].data[0].value = this.ratio }
|
// if (a.cycleCount != null) { this.cycleCount = a.cycleCount }
|
// if (a.cycleTime != null) { this.cycleTime = this.formatSeconds(a.cycleTime) }
|
// if (a.mode != null) {
|
// if (a.mode === 'AUTO') {
|
// this.progContent = '自动'
|
// } else if (a.mode === 'MANUAL') {
|
// this.progContent = '手动'
|
// } else {
|
// this.progContent = ''
|
// }
|
// }
|
// if (a.componentId != null) { this.components = a.componentId }
|
// if (a.processId != null) { this.processId = a.processId }
|
// if (a.bootRunningRate != null) {
|
// this.completenum.series[0].data[0].value = a.bootRunningRate
|
// this.completenum.series[0].data[1].value = 100 - a.bootRunningRate
|
// }
|
// if (a.efficiency != null) {
|
// this.efficiencyjc.series[0].data[0].value = a.efficiency
|
// this.efficiencyjc.series[0].data[1].value = 100 - a.efficiency
|
// }
|
// if (a.utilizationDaily != null) { this.utilizationday = a.utilizationDaily }
|
// if (a.feedRate != null) { this.feedspeed = a.feedRate }
|
// if (a.spindleSpeed != null) { this.speed = a.spindleSpeed }
|
// if (a.state != null) { this.state = a.state }
|
// var axisNames
|
// if (a.axisNames != null) {
|
// axisNames = a.axisNames.split(':')
|
// for (let i = 0; i < 3; i++) {
|
// if ((axisNames == null) || (axisNames[i] == null)) {
|
// this.axislist[i].name = ''
|
// } else {
|
// this.axislist[i].name = axisNames[i]
|
// }
|
// }
|
// for (let i = 3; i < 6; i++) {
|
// if ((axisNames == null) || (axisNames[i] == null)) {
|
// this.axislist2[i - 3].name = ''
|
// } else {
|
// this.axislist2[i - 3].name = axisNames[i]
|
// }
|
// }
|
// }
|
// var positions
|
// if (a.positions != null) {
|
// positions = a.positions.split(':')
|
// for (let i = 0; i < 3; i++) {
|
// if (positions == null) {
|
// this.axislist[i].position = ''
|
// } else {
|
// this.axislist[i].position = positions[i]
|
// }
|
// }
|
// for (let i = 3; i < 6; i++) {
|
// if (positions == null) {
|
// this.axislist2[i - 3].position = ''
|
// } else {
|
// this.axislist2[i - 3].position = positions[i]
|
// }
|
// }
|
// }
|
// var servoLoads
|
// if (a.servoLoads != null) {
|
// servoLoads = a.servoLoads.split(':')
|
// for (let i = 0; i < 3; i++) {
|
// if (servoLoads == null) {
|
// this.axislist[i].servoLoad = ''
|
// } else {
|
// this.axislist[i].servoLoad = servoLoads[i]
|
// }
|
// }
|
// for (let i = 3; i < 6; i++) {
|
// if (servoLoads == null) {
|
// this.axislist2[i - 3].servoLoad = ''
|
// } else {
|
// this.axislist2[i - 3].servoLoad = servoLoads[i]
|
// }
|
// }
|
// }
|
// }
|
// })
|
this.timer = setInterval(() => {
|
this.getMachineDetail()
|
}, 10000)
|
},
|
created() {
|
},
|
beforeDestroy() {
|
// Bus.$off(ON_MESSAGE)
|
clearInterval(this.timer)
|
this.timer = null
|
}
|
}
|
</script>
|
|
<style>
|
.jcdetails .el-dialog__body{padding-top: 0;background-color: gainsboro;}
|
|
.jcdetails .el-button--primary.is-disabled, .el-button--primary.is-disabled:active, .el-button--primary.is-disabled:focus, .el-button--primary.is-disabled:hover {
|
color: #fff;
|
background-color: #39a2e8;
|
border-color: #0a77d4;
|
}
|
</style>
|