监控数据管理添加设备选择项
This commit is contained in:
parent
cacf21776c
commit
c29371e319
@ -149,7 +149,7 @@ public class DataQueryController {
|
||||
HttpServletResponse response) throws IOException, ParseException {
|
||||
List<VibrDataRespVO> list = (List<VibrDataRespVO>)dataQueryService.selectDataListByPages(equipId,tableName,startTime,endTime,null,null).get("list");
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "机床振动参数报警记录.xls", "振动数据", VibrDataRespVO.class,
|
||||
ExcelUtils.write(response, "机床加速度参数报警记录.xls", "加速度数据", VibrDataRespVO.class,
|
||||
BeanUtils.toBean(list, VibrDataRespVO.class));
|
||||
}
|
||||
|
||||
|
@ -14,10 +14,10 @@ public class CurrentDataRespVO {
|
||||
@ExcelProperty("时间")
|
||||
private String time;
|
||||
|
||||
@ExcelProperty("x轴推屑电流")
|
||||
private String x_push_temp;
|
||||
@ExcelProperty("排屑1电流(A)")
|
||||
private String chip_removal_1;
|
||||
|
||||
@ExcelProperty("y轴推屑电流")
|
||||
private String y_push_temp;
|
||||
@ExcelProperty("排屑2电流(A)")
|
||||
private String chip_removal_2;
|
||||
|
||||
}
|
||||
|
@ -15,12 +15,12 @@ public class PressDataRespVO {
|
||||
@ExcelProperty("时间")
|
||||
private String time;
|
||||
|
||||
@ExcelProperty("x轴润滑压力")
|
||||
private String x_lube_press;
|
||||
@ExcelProperty("液压1(bar)")
|
||||
private String hy_1;
|
||||
|
||||
@ExcelProperty("y轴润滑压力")
|
||||
private String y_lube_press;
|
||||
@ExcelProperty("液压2(bar)")
|
||||
private String hy_2;
|
||||
|
||||
@ExcelProperty("z轴润滑压力")
|
||||
private String z_lube_press;
|
||||
@ExcelProperty("液压3(bar)")
|
||||
private String hy_3;
|
||||
}
|
||||
|
@ -14,15 +14,15 @@ public class ProcessDataRespVO {
|
||||
@ExcelProperty("时间")
|
||||
private String time;
|
||||
|
||||
@ExcelProperty("加工总件数")
|
||||
private String work_total;
|
||||
@ExcelProperty("加工总件数(件)")
|
||||
private String total_process;
|
||||
|
||||
@ExcelProperty("加工时长")
|
||||
@ExcelProperty("加工件数(件)")
|
||||
private String process_num;
|
||||
|
||||
@ExcelProperty("加工时长(分钟)")
|
||||
private String work_time;
|
||||
|
||||
@ExcelProperty("通电时间")
|
||||
private String on_time;
|
||||
|
||||
@ExcelProperty("加工件数")
|
||||
private String work_items;
|
||||
@ExcelProperty("通电时间(分钟)")
|
||||
private String power_time;
|
||||
}
|
||||
|
@ -14,12 +14,36 @@ public class TempDataRespVO {
|
||||
@ExcelProperty("时间")
|
||||
private String time;
|
||||
|
||||
@ExcelProperty("x轴轴承温度")
|
||||
private String x_bear_temp;
|
||||
@ExcelProperty("X+温度(℃)")
|
||||
private String xp_temp;
|
||||
|
||||
@ExcelProperty("y轴轴承温度")
|
||||
private String y_bear_temp;
|
||||
@ExcelProperty("X0温度(℃)")
|
||||
private String x0_temp;
|
||||
|
||||
@ExcelProperty("x轴轴承温度")
|
||||
private String z_bear_temp;
|
||||
@ExcelProperty("X-温度(℃)")
|
||||
private String xn_temp;
|
||||
|
||||
@ExcelProperty("Y+温度(℃)")
|
||||
private String yp_temp;
|
||||
|
||||
@ExcelProperty("Y0温度(℃)")
|
||||
private String y0_temp;
|
||||
|
||||
@ExcelProperty("Y-温度(℃)")
|
||||
private String yn_temp;
|
||||
|
||||
@ExcelProperty("Z+温度(℃)")
|
||||
private String zp_temp;
|
||||
|
||||
@ExcelProperty("Z0温度(℃)")
|
||||
private String z0_temp;
|
||||
|
||||
@ExcelProperty("Z-温度(℃)")
|
||||
private String zn_temp;
|
||||
|
||||
@ExcelProperty("排屑1温度(℃)")
|
||||
private String cr1_temp;
|
||||
|
||||
@ExcelProperty("排屑2温度(℃)")
|
||||
private String cr2_temp;
|
||||
}
|
||||
|
@ -14,6 +14,57 @@ public class VibrDataRespVO {
|
||||
@ExcelProperty("时间")
|
||||
private String time;
|
||||
|
||||
@ExcelProperty("y轴熵值")
|
||||
private String x_entropy;
|
||||
@ExcelProperty("X加速度RMS")
|
||||
private String x_aclr_rms;
|
||||
|
||||
@ExcelProperty("Y加速度RMS")
|
||||
private String y_aclr_rms;
|
||||
|
||||
@ExcelProperty("Z加速度RMS")
|
||||
private String z_aclr_rms;
|
||||
|
||||
@ExcelProperty("X速度RMS")
|
||||
private String x_speed_rms;
|
||||
|
||||
@ExcelProperty("Y速度RMS")
|
||||
private String y_speed_rms;
|
||||
|
||||
@ExcelProperty("Z速度RMS")
|
||||
private String z_speed_rms;
|
||||
|
||||
@ExcelProperty("X位移RMS")
|
||||
private String x_dis_rms;
|
||||
|
||||
@ExcelProperty("Y位移RMS")
|
||||
private String y_dis_rms;
|
||||
|
||||
@ExcelProperty("Z位移RMS")
|
||||
private String z_dis_rms;
|
||||
|
||||
@ExcelProperty("X加速度峰值")
|
||||
private String x_aclr_peak;
|
||||
|
||||
@ExcelProperty("Y加速度峰值")
|
||||
private String y_aclr_peak;
|
||||
|
||||
@ExcelProperty("Z加速度峰值")
|
||||
private String z_aclr_peak;
|
||||
|
||||
@ExcelProperty("X速度峰值")
|
||||
private String x_speed_peak;
|
||||
|
||||
@ExcelProperty("Y速度峰值")
|
||||
private String y_speed_peak;
|
||||
|
||||
@ExcelProperty("Z速度峰值")
|
||||
private String z_speed_peak;
|
||||
|
||||
@ExcelProperty("X位移峰值")
|
||||
private String x_dis_peak;
|
||||
|
||||
@ExcelProperty("Y位移峰值")
|
||||
private String y_dis_peak;
|
||||
|
||||
@ExcelProperty("Z位移峰值")
|
||||
private String z_dis_peak;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.inspur.module.system.service.equip;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.inspur.framework.common.pojo.PageResult;
|
||||
import com.inspur.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.inspur.module.system.controller.baseData.vo.CustomerInfoSelectionVO;
|
||||
@ -97,7 +98,9 @@ public class EquipInfoServiceImpl implements EquipInfoService {
|
||||
List<EquipCascaderVO> list = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(customerList)){
|
||||
//所有机床信息
|
||||
List<EquipInfoDO> equipInfoList = equipInfoMapper.selectList();
|
||||
QueryWrapper<EquipInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.orderBy(true,true,"create_time");
|
||||
List<EquipInfoDO> equipInfoList = equipInfoMapper.selectList(queryWrapper);
|
||||
Map<String, List<EquipInfoDO>> equipInfoMap = equipInfoList.stream().collect(Collectors.groupingBy(EquipInfoDO::getCustomerId));
|
||||
customerList.forEach(item -> {
|
||||
EquipCascaderVO vo = new EquipCascaderVO();
|
||||
@ -109,7 +112,7 @@ public class EquipInfoServiceImpl implements EquipInfoService {
|
||||
equipInfoDOList.forEach(equip -> {
|
||||
EquipCascaderVO equipCascaderVO = new EquipCascaderVO();
|
||||
equipCascaderVO.setId(equip.getEquipId());
|
||||
equipCascaderVO.setName(equip.getEquipNo());
|
||||
equipCascaderVO.setName(equip.getEquipName());
|
||||
children.add(equipCascaderVO);
|
||||
});
|
||||
if (CollUtil.isNotEmpty(children)){
|
||||
|
@ -1,40 +1,81 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-popover placement="bottom" width="600" trigger="click">
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
width="600"
|
||||
trigger="click"
|
||||
>
|
||||
<!-- icon 展示 -->
|
||||
<el-badge slot="reference" :is-dot="unreadCount > 0" type="danger">
|
||||
<svg-icon icon-class="message" @click="getList"/>
|
||||
<el-badge
|
||||
slot="reference"
|
||||
:is-dot="unreadCount > 0"
|
||||
type="danger"
|
||||
>
|
||||
<svg-icon
|
||||
icon-class="message"
|
||||
@click="getList"
|
||||
/>
|
||||
</el-badge>
|
||||
|
||||
<!-- 弹出列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column width="120" property="templateNickname" label="发送人" />
|
||||
<el-table-column width="180" property="createTime" label="发送时间">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
>
|
||||
<el-table-column
|
||||
width="120"
|
||||
property="templateNickname"
|
||||
label="发送人"
|
||||
/>
|
||||
<el-table-column
|
||||
width="180"
|
||||
property="createTime"
|
||||
label="发送时间"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="templateType" width="100">
|
||||
<el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
prop="templateType"
|
||||
width="100"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE" :value="scope.row.templateType" />
|
||||
<dict-tag
|
||||
:type="DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE"
|
||||
:value="scope.row.templateType"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="templateContent" label="内容" />
|
||||
<el-table-column
|
||||
property="title"
|
||||
label="标题"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
|
||||
<!-- 更多 -->
|
||||
<div style="text-align: right; margin-top: 10px">
|
||||
<el-button type="primary" size="mini" @click="goMyList">查看全部</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="goMyList"
|
||||
>查看全部</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUnreadNotifyMessageCount, getUnreadNotifyMessageList} from "@/api/system/notify/message";
|
||||
import {
|
||||
getUnreadNotifyMessageCount,
|
||||
getUnreadNotifyMessageList,
|
||||
} from "@/api/system/notify/message";
|
||||
|
||||
export default {
|
||||
name: 'NotifyMessage',
|
||||
name: "NotifyMessage",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -43,38 +84,38 @@ export default {
|
||||
list: [],
|
||||
// 未读数量,
|
||||
unreadCount: 0,
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 首次加载小红点
|
||||
this.getUnreadCount()
|
||||
this.getUnreadCount();
|
||||
// 轮询刷新小红点
|
||||
setInterval(() => {
|
||||
this.getUnreadCount()
|
||||
},1000 * 60 * 2)
|
||||
this.getUnreadCount();
|
||||
}, 1000 * 60 * 2);
|
||||
},
|
||||
methods: {
|
||||
getList: function() {
|
||||
getList: function () {
|
||||
this.loading = true;
|
||||
getUnreadNotifyMessageList().then(response => {
|
||||
getUnreadNotifyMessageList().then((response) => {
|
||||
this.list = response.data;
|
||||
this.loading = false;
|
||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||
this.unreadCount = 0
|
||||
this.unreadCount = 0;
|
||||
});
|
||||
},
|
||||
getUnreadCount: function() {
|
||||
getUnreadNotifyMessageCount().then(response => {
|
||||
getUnreadCount: function () {
|
||||
getUnreadNotifyMessageCount().then((response) => {
|
||||
this.unreadCount = response.data;
|
||||
})
|
||||
},
|
||||
goMyList: function() {
|
||||
this.$router.push({
|
||||
name: 'MyNotifyMessage'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
goMyList: function () {
|
||||
this.$router.push({
|
||||
name: "MyNotifyMessage",
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-badge__content.is-fixed {
|
||||
|
@ -12,6 +12,18 @@
|
||||
@click="startRefresh"
|
||||
>自动刷新</div>
|
||||
</div> -->
|
||||
<div
|
||||
class="equip-select"
|
||||
style="width:20%;margin-left: 1%;"
|
||||
>
|
||||
<el-cascader
|
||||
v-model="cascaderValue"
|
||||
:options="equipCascader"
|
||||
:props="{emitPath: false,value: 'id',label: 'name',children: 'children'}"
|
||||
@change="cascaderChange"
|
||||
style="width:100%"
|
||||
></el-cascader>
|
||||
</div>
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
type="border-card"
|
||||
@ -20,7 +32,7 @@
|
||||
>
|
||||
<el-tab-pane
|
||||
label="电流数据"
|
||||
name="gateway_channel_current_data"
|
||||
name="gateway_current_data"
|
||||
>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-button
|
||||
@ -80,15 +92,15 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="x轴推屑电流(A)"
|
||||
label="排屑1电流(A)"
|
||||
align="center"
|
||||
prop="x_push_temp"
|
||||
prop="chip_removal_1"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="y轴推屑电流(A)"
|
||||
label="排屑2电流(A)"
|
||||
align="center"
|
||||
prop="y_push_temp"
|
||||
prop="chip_removal_2"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
@ -102,7 +114,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="液压数据"
|
||||
name="gateway_channel_hydra_data"
|
||||
name="gateway_hy_data"
|
||||
>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-button
|
||||
@ -162,21 +174,21 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="x轴润滑液压"
|
||||
label="液压1(bar)"
|
||||
align="center"
|
||||
prop="x_lube_press"
|
||||
prop="hy_1"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="y轴润滑液压"
|
||||
label="液压2(bar)"
|
||||
align="center"
|
||||
prop="y_lube_press"
|
||||
prop="hy_2"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="z轴润滑液压"
|
||||
label="液压3(bar)"
|
||||
align="center"
|
||||
prop="y_lube_press"
|
||||
prop="hy_3"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
@ -189,8 +201,8 @@
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="振动数据"
|
||||
name="gateway_channel_vibr_data"
|
||||
label="加速度数据"
|
||||
name="gateway_aclr_data"
|
||||
>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-button
|
||||
@ -237,6 +249,7 @@
|
||||
label="序号"
|
||||
type="index"
|
||||
align="center"
|
||||
fixed
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.$index + 1}}</span>
|
||||
@ -247,12 +260,115 @@
|
||||
align="center"
|
||||
prop="time"
|
||||
width="200"
|
||||
fixed
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y轴熵值(g/s)"
|
||||
label="X加速度RMS"
|
||||
align="center"
|
||||
prop="x_entropy"
|
||||
prop="x_aclr_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y加速度RMS"
|
||||
align="center"
|
||||
prop="y_aclr_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z加速度RMS"
|
||||
align="center"
|
||||
prop="z_aclr_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="X速度RMS"
|
||||
align="center"
|
||||
prop="x_speed_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y速度RMS"
|
||||
align="center"
|
||||
prop="y_speed_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z速度RMS"
|
||||
align="center"
|
||||
prop="z_speed_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="X位移RMS"
|
||||
align="center"
|
||||
prop="x_dis_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y位移RMS"
|
||||
align="center"
|
||||
prop="y_dis_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z位移RMS"
|
||||
align="center"
|
||||
prop="z_dis_rms"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="X加速度峰值"
|
||||
align="center"
|
||||
prop="x_aclr_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y加速度峰值"
|
||||
align="center"
|
||||
prop="y_aclr_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z加速度峰值"
|
||||
align="center"
|
||||
prop="z_aclr_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="X速度峰值"
|
||||
align="center"
|
||||
prop="x_speed_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y速度峰值"
|
||||
align="center"
|
||||
prop="y_speed_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z速度峰值"
|
||||
align="center"
|
||||
prop="z_speed_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="X位移峰值"
|
||||
align="center"
|
||||
prop="x_dis_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y位移峰值"
|
||||
align="center"
|
||||
prop="y_dis_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z位移峰值"
|
||||
align="center"
|
||||
prop="z_dis_peak"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
@ -266,7 +382,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="温度数据"
|
||||
name="gateway_channel_temp_data"
|
||||
name="gateway_temp_data"
|
||||
>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-button
|
||||
@ -313,6 +429,7 @@
|
||||
label="序号"
|
||||
type="index"
|
||||
align="center"
|
||||
fixed
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.$index + 1}}</span>
|
||||
@ -323,42 +440,73 @@
|
||||
align="center"
|
||||
prop="time"
|
||||
width="200"
|
||||
fixed
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="x轴轴承温度(℃)"
|
||||
label="X+温度(℃)"
|
||||
align="center"
|
||||
prop="x_bear_temp"
|
||||
prop="xp_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="y轴轴承温度(℃)"
|
||||
label="X0温度(℃)"
|
||||
align="center"
|
||||
prop="y_bear_temp"
|
||||
prop="x0_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="z轴轴承温度(℃)"
|
||||
label="X-温度(℃)"
|
||||
align="center"
|
||||
prop="z_bear_temp"
|
||||
prop="xn_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="x轴排屑温度(℃)"
|
||||
label="Y+温度(℃)"
|
||||
align="center"
|
||||
prop="x_debris_temp"
|
||||
prop="yp_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="z轴排屑温度(℃)"
|
||||
label="Y0温度(℃)"
|
||||
align="center"
|
||||
prop="z_debris_temp"
|
||||
prop="y0_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="室温(℃)"
|
||||
label="Y-温度(℃)"
|
||||
align="center"
|
||||
prop="at_temp"
|
||||
prop="yn_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z+温度(℃)"
|
||||
align="center"
|
||||
prop="zp_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z0温度(℃)"
|
||||
align="center"
|
||||
prop="z0_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Z-温度(℃)"
|
||||
align="center"
|
||||
prop="zn_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="排屑1温度(℃)"
|
||||
align="center"
|
||||
prop="cr1_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="排屑2温度(℃)"
|
||||
align="center"
|
||||
prop="cr2_temp"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
@ -372,7 +520,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="CNC加工数据"
|
||||
name="gateway_channel_work_data"
|
||||
name="gateway_fanuc_data"
|
||||
>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-button
|
||||
@ -434,25 +582,25 @@
|
||||
<el-table-column
|
||||
label="加工总件数(件)"
|
||||
align="center"
|
||||
prop="work_total"
|
||||
prop="total_process"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="加工时长(小时)"
|
||||
label="加工时长(分钟)"
|
||||
align="center"
|
||||
prop="work_time"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="通电时间(小时)"
|
||||
label="通电时间(分钟)"
|
||||
align="center"
|
||||
prop="on_time"
|
||||
prop="power_time"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="加工件数(件)"
|
||||
align="center"
|
||||
prop="work_items"
|
||||
prop="process_num"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
@ -477,6 +625,7 @@ import {
|
||||
exportTempDataExcel,
|
||||
exportProcessDataExcel,
|
||||
} from "@/api/data/query.js";
|
||||
import { getEquipCascader } from "@/api/system/equip/equipInfo";
|
||||
export default {
|
||||
name: "dataLog",
|
||||
data() {
|
||||
@ -498,18 +647,38 @@ export default {
|
||||
},
|
||||
dataList: [],
|
||||
refresh: false,
|
||||
activeName: "gateway_channel_current_data",
|
||||
activeName: "gateway_current_data",
|
||||
datetime: this.getDefaultTimeRange(),
|
||||
cascaderValue: null,
|
||||
equipCascader: [],
|
||||
// getDataTimer: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryParams.startTime = this.datetime[0];
|
||||
this.queryParams.endTime = this.datetime[1];
|
||||
this.getList();
|
||||
this.getEquipCascaderInfo();
|
||||
// this.startRefresh();
|
||||
},
|
||||
methods: {
|
||||
getEquipCascaderInfo() {
|
||||
getEquipCascader().then((res) => {
|
||||
res.forEach((item) => {
|
||||
if (item.children == null) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
if (res && res[0].children) {
|
||||
this.queryParams.equipId = this.cascaderValue = res[0].children[0].id;
|
||||
}
|
||||
this.equipCascader = res;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
cascaderChange(value) {
|
||||
this.queryParams.equipId = value;
|
||||
this.getList();
|
||||
},
|
||||
handleTabClick() {
|
||||
//this.stopRefresh();
|
||||
// this.datetime = this.getDefaultTimeRange();
|
||||
@ -557,23 +726,23 @@ export default {
|
||||
this.exportLoading = true;
|
||||
var data = null;
|
||||
switch (this.activeName) {
|
||||
case "gateway_channel_current_data":
|
||||
case "gateway_current_data":
|
||||
data = await exportCurrentDataExcel(this.queryParams);
|
||||
this.$download.excel(data, "机床电流参数报警记录.xls");
|
||||
break;
|
||||
case "gateway_channel_hydra_data":
|
||||
case "gateway_hy_data":
|
||||
data = await exportPressDataExcel(this.queryParams);
|
||||
this.$download.excel(data, "机床液压参数报警记录.xls");
|
||||
break;
|
||||
case "gateway_channel_vibr_data":
|
||||
case "gateway_aclr_data":
|
||||
data = await exportVibrDataExcel(this.queryParams);
|
||||
this.$download.excel(data, "机床振动参数报警记录.xls");
|
||||
this.$download.excel(data, "机床加速度参数报警记录.xls");
|
||||
break;
|
||||
case "gateway_channel_temp_data":
|
||||
case "gateway_temp_data":
|
||||
data = await exportTempDataExcel(this.queryParams);
|
||||
this.$download.excel(data, "机床温度参数报警记录.xls");
|
||||
break;
|
||||
case "gateway_channel_work_data":
|
||||
case "gateway_fanuc_data":
|
||||
data = await exportProcessDataExcel(this.queryParams);
|
||||
this.$download.excel(data, "机床生产参数报警记录.xls");
|
||||
break;
|
||||
@ -666,7 +835,7 @@ export default {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
this.queryParams.equipId = "2e3d0190e63eda526da89d6c751f08f3"; //暂时固定设备
|
||||
//this.queryParams.equipId = "2e3d0190e63eda526da89d6c751f08f3"; //暂时固定设备
|
||||
this.queryParams.tableName = this.activeName;
|
||||
const res = await getDataList(this.queryParams);
|
||||
this.dataList = res.data.list;
|
||||
|
Loading…
Reference in New Issue
Block a user