Compare commits

..

No commits in common. "1ced104c19e6bd437314480ff7cc0af75e9975c0" and "7d006e87f7b5d945ffdc55599421e40e83c025ed" have entirely different histories.

15 changed files with 422 additions and 468 deletions

View File

@ -6,7 +6,7 @@ import com.inspur.framework.common.pojo.PageParam;
import com.inspur.framework.common.util.json.JsonUtils;
import com.inspur.framework.common.util.object.BeanUtils;
import com.inspur.framework.excel.core.util.ExcelUtils;
import com.inspur.module.data.controller.admin.query.vo.*;
import com.inspur.module.data.controller.admin.query.vo.CurrentDataRespVO;
import com.inspur.module.data.service.IDataQueryService;
import com.inspur.module.system.controller.admin.alarm.vo.AlarmDataPageReqVO;
import com.inspur.module.system.controller.admin.alarm.vo.AlarmDataRespVO;
@ -89,51 +89,4 @@ public class DataQueryController {
BeanUtils.toBean(list, CurrentDataRespVO.class));
}
@GetMapping("/export-press-excel")
@Operation(summary = "导出机床液压传感器参数 Excel")
@PreAuthorize("@ss.hasPermission('data:query:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportPressDataExcel(String equipId,String tableName, String startTime, String endTime,
HttpServletResponse response) throws IOException, ParseException {
List<PressDataRespVO> list = (List<PressDataRespVO>)dataQueryService.selectDataListByPages(equipId,tableName,startTime,endTime,null,null).get("list");
// 导出 Excel
ExcelUtils.write(response, "机床液压参数报警记录.xls", "液压数据", PressDataRespVO.class,
BeanUtils.toBean(list, PressDataRespVO.class));
}
@GetMapping("/export-vibr-excel")
@Operation(summary = "导出机床振动传感器参数 Excel")
@PreAuthorize("@ss.hasPermission('data:query:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportVibrDataExcel(String equipId,String tableName, String startTime, String endTime,
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,
BeanUtils.toBean(list, VibrDataRespVO.class));
}
@GetMapping("/export-temp-excel")
@Operation(summary = "导出机床温度传感器参数 Excel")
@PreAuthorize("@ss.hasPermission('data:query:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportTempDataExcel(String equipId,String tableName, String startTime, String endTime,
HttpServletResponse response) throws IOException, ParseException {
List<TempDataRespVO> list = (List<TempDataRespVO>)dataQueryService.selectDataListByPages(equipId,tableName,startTime,endTime,null,null).get("list");
// 导出 Excel
ExcelUtils.write(response, "机床温度参数报警记录.xls", "温度数据", TempDataRespVO.class,
BeanUtils.toBean(list, TempDataRespVO.class));
}
@GetMapping("/export-process-excel")
@Operation(summary = "导出机床加工参数 Excel")
@PreAuthorize("@ss.hasPermission('data:query:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportProcessDataExcel(String equipId,String tableName, String startTime, String endTime,
HttpServletResponse response) throws IOException, ParseException {
List<ProcessDataRespVO> list = (List<ProcessDataRespVO>)dataQueryService.selectDataListByPages(equipId,tableName,startTime,endTime,null,null).get("list");
// 导出 Excel
ExcelUtils.write(response, "机床加工参数报警记录.xls", "加工数据", ProcessDataRespVO.class,
BeanUtils.toBean(list, ProcessDataRespVO.class));
}
}

View File

@ -1,26 +0,0 @@
package com.inspur.module.data.controller.admin.query.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 液压传感器数据
* @Author zhangjunwen
* @create 2024/9/6
*/
@Data
public class PressDataRespVO {
@ExcelProperty("时间")
private String time;
@ExcelProperty("x轴润滑压力")
private String x_lube_press;
@ExcelProperty("y轴润滑压力")
private String y_lube_press;
@ExcelProperty("z轴润滑压力")
private String z_lube_press;
}

View File

@ -1,28 +0,0 @@
package com.inspur.module.data.controller.admin.query.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 机床加工数据
* @Author zhangjunwen
* @create 2024/9/6
*/
@Data
public class ProcessDataRespVO {
@ExcelProperty("时间")
private String time;
@ExcelProperty("加工总件数")
private String work_total;
@ExcelProperty("加工时长")
private String work_time;
@ExcelProperty("通电时间")
private String on_time;
@ExcelProperty("加工件数")
private String work_items;
}

View File

@ -1,25 +0,0 @@
package com.inspur.module.data.controller.admin.query.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 温度传感器数据
* @Author zhangjunwen
* @create 2024/9/6
*/
@Data
public class TempDataRespVO {
@ExcelProperty("时间")
private String time;
@ExcelProperty("x轴轴承温度")
private String x_bear_temp;
@ExcelProperty("y轴轴承温度")
private String y_bear_temp;
@ExcelProperty("x轴轴承温度")
private String z_bear_temp;
}

View File

@ -1,19 +0,0 @@
package com.inspur.module.data.controller.admin.query.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 振动传感器数据
* @Author zhangjunwen
* @create 2024/9/6
*/
@Data
public class VibrDataRespVO {
@ExcelProperty("时间")
private String time;
@ExcelProperty("y轴熵值")
private String x_entropy;
}

View File

@ -33,7 +33,6 @@ public class Channel4DataProcess implements Runnable{
Map<String, String> tags = new HashMap<>();
fields.put("x_bear_temp", Math.random());
fields.put("y_bear_temp", Math.random());
fields.put("z_bear_temp", Math.random());
fields.put("x_debris_temp", Math.random());
fields.put("z_debris_temp", Math.random());
fields.put("at_temp", Math.random());

View File

@ -72,21 +72,4 @@ public class AlarmDataRespVO {
@Schema(description = "报警类型")
@ExcelProperty("报警类型")
private String alarmType;
@Schema(description = "机床型号")
@ExcelProperty("机床型号")
private String modelName;
@Schema(description = "客户名")
@ExcelProperty("客户名")
private String customerName;
@Schema(description = "设备编号")
@ExcelProperty("设备编号")
private String equipNo;
@Schema(description = "机床组件")
@ExcelProperty("机床组件")
private String componentName;
}

View File

@ -55,7 +55,6 @@ public class AlarmDataServiceImpl implements AlarmDataService {
}
@Override
@TenantIgnore
public void deleteAlarmData(Long id) {
// 校验存在
validateAlarmDataExists(id);
@ -71,13 +70,11 @@ public class AlarmDataServiceImpl implements AlarmDataService {
}
@Override
@TenantIgnore
public AlarmDataDO getAlarmData(Long id) {
return alarmDataMapper.selectAlarmDataById(id);
}
@Override
@TenantIgnore
public PageResult<AlarmDataDO> getAlarmDataPage(AlarmDataPageReqVO pageReqVO) {
IPage<AlarmDataDO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
alarmDataMapper.selectAlarmDataList(page, pageReqVO);

View File

@ -36,7 +36,6 @@ public class AlarmRulesServiceImpl implements AlarmRulesService {
private StringRedisTemplate stringRedisTemplate;
@Override
@TenantIgnore
public String createAlarmRules(AlarmRulesSaveReqVO createReqVO) {
// 插入
AlarmRulesDO alarmRules = BeanUtils.toBean(createReqVO, AlarmRulesDO.class);
@ -48,7 +47,6 @@ public class AlarmRulesServiceImpl implements AlarmRulesService {
}
@Override
@TenantIgnore
public void updateAlarmRules(AlarmRulesSaveReqVO updateReqVO) {
// 校验存在
validateAlarmRulesExists(updateReqVO.getAlarmId());
@ -58,7 +56,6 @@ public class AlarmRulesServiceImpl implements AlarmRulesService {
}
@Override
@TenantIgnore
public void deleteAlarmRules(String id) {
// 校验存在
validateAlarmRulesExists(id);
@ -66,7 +63,6 @@ public class AlarmRulesServiceImpl implements AlarmRulesService {
alarmRulesMapper.deleteById(id);
}
@TenantIgnore
private void validateAlarmRulesExists(String id) {
AlarmRulesDO alarmRule = alarmRulesMapper.selectAlarmRulesById(id);
if (alarmRule == null) {
@ -77,13 +73,11 @@ public class AlarmRulesServiceImpl implements AlarmRulesService {
}
@Override
@TenantIgnore
public AlarmRulesDO getAlarmRules(String id) {
return alarmRulesMapper.selectAlarmRulesById(id);
}
@Override
@TenantIgnore
public PageResult<AlarmRulesDO> getAlarmRulesPage(AlarmRulesPageReqVO pageReqVO) {
IPage<AlarmRulesDO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
alarmRulesMapper.selectAlarmRulesList(page, pageReqVO);

View File

@ -37,7 +37,6 @@ public class EquipAlarmDataServiceImpl implements EquipAlarmDataService {
private EquipAlarmDataMapper equipAlarmDataMapper;
@Override
@TenantIgnore
public String createEquipAlarmData(EquipAlarmDataSaveReqVO createReqVO) {
// 插入
EquipAlarmDataDO equipAlarmData = BeanUtils.toBean(createReqVO, EquipAlarmDataDO.class);
@ -57,7 +56,6 @@ public class EquipAlarmDataServiceImpl implements EquipAlarmDataService {
}
@Override
@TenantIgnore
public void deleteEquipAlarmData(String id) {
// 校验存在
validateEquipAlarmDataExists(id);
@ -73,13 +71,11 @@ public class EquipAlarmDataServiceImpl implements EquipAlarmDataService {
}
@Override
@TenantIgnore
public EquipAlarmDataDO getEquipAlarmData(String id) {
return equipAlarmDataMapper.selectEquipAlarmById(id);
}
@Override
@TenantIgnore
public PageResult<EquipAlarmDataDO> getEquipAlarmDataPage(EquipAlarmDataPageReqVO pageReqVO) {
IPage<EquipAlarmDataDO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
equipAlarmDataMapper.selectEquipAlarmList(page, pageReqVO);

View File

@ -34,7 +34,6 @@ public class GatewayInfoServiceImpl implements GatewayInfoService {
private GatewayInfoMapper gatewayInfoMapper;
@Override
@TenantIgnore
public String createGatewayInfo(GatewayInfoSaveReqVO createReqVO) {
createReqVO.setStatus(0);//默认正常
// 插入
@ -45,7 +44,6 @@ public class GatewayInfoServiceImpl implements GatewayInfoService {
}
@Override
@TenantIgnore
public void updateGatewayInfo(GatewayInfoSaveReqVO updateReqVO) {
// 校验存在
validateGatewayInfoExists(updateReqVO.getGatewayId());
@ -55,7 +53,6 @@ public class GatewayInfoServiceImpl implements GatewayInfoService {
}
@Override
@TenantIgnore
public void deleteGatewayInfo(String id) {
// 校验存在
validateGatewayInfoExists(id);
@ -63,7 +60,6 @@ public class GatewayInfoServiceImpl implements GatewayInfoService {
gatewayInfoMapper.deleteById(id);
}
@TenantIgnore
private void validateGatewayInfoExists(String id) {
if (gatewayInfoMapper.selectById(id) == null) {
throw exception(GATEWAY_INFO_NOT_EXISTS);

View File

@ -18,10 +18,6 @@
<result property="reasonDescription" column="reason_description" />
<result property="equipAlarmId" column="equip_alarm_id" />
<result property="alarmType" column="alarm_type" />
<result property="customerName" column="customer_name" />
<result property="modelName" column="model_name" />
<result property="equipNo" column="equip_no" />
<result property="componentName" column="component_name" />
</resultMap>
<sql id="selectAlarmDataVo">
@ -34,8 +30,7 @@
<select id="selectAlarmDataList" resultMap="AlarmDataResult">
<include refid="selectAlarmDataVo"/>
where ad.deleted = '0'
and ad.status = 0
where deleted = '0'
<if test="reqVO.alarmRulesId != null and reqVO.alarmRulesId != ''"> and ad.alarm_rules_id = #{reqVO.alarmName}</if>
<if test="reqVO.equipId != null and reqVO.equipId != ''"> and ad.equip_id = #{reqVO.equipId}</if>
<if test="reqVO.componentId != null and reqVO.componentId != ''"> and ad.component_id = #{reqVO.componentId}</if>

View File

@ -28,7 +28,6 @@
<select id="selectEquipAlarmList" resultMap="EquipAlarmResult">
<include refid="selectEquipAlarmVo"/>
where iead.deleted = '0'
and iead.status = 0
<if test="reqVO.equipId != null and reqVO.equipId != ''"> and iead.equip_id = #{reqVO.equipId}</if>
<if test="reqVO.componentId != null and reqVO.componentId != ''"> and iead.component_id = #{reqVO.componentId}</if>
<if test="reqVO.alarmLevel != null and reqVO.alarmLevel != ''"> and iead.alarm_level = #{reqVO.alarmLevel}</if>

View File

@ -27,43 +27,3 @@ export function exportCurrentDataExcel(params) {
responseType: "blob",
});
}
// 导出机床液压参数报警记录 Excel
export function exportPressDataExcel(params) {
return request({
url: "/data/query/export-press-excel",
method: "get",
params,
responseType: "blob",
});
}
// 导出机床液压参数报警记录 Excel
export function exportVibrDataExcel(params) {
return request({
url: "/data/query/export-vibr-excel",
method: "get",
params,
responseType: "blob",
});
}
// 导出机床温度参数报警记录 Excel
export function exportTempDataExcel(params) {
return request({
url: "/data/query/export-temp-excel",
method: "get",
params,
responseType: "blob",
});
}
// 导出机床液压参数报警记录 Excel
export function exportProcessDataExcel(params) {
return request({
url: "/data/query/export-process-excel",
method: "get",
params,
responseType: "blob",
});
}

View File

@ -86,7 +86,7 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="y轴推屑电流A"
label="y轴推屑电流A "
align="center"
prop="y_push_temp"
:show-overflow-tooltip="true"
@ -100,9 +100,9 @@
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane
label="液压数据"
name="gateway_channel_hydra_data"
<!-- <el-tab-pane
label="可控中高辊顶辊液压系统"
name="topScoller"
>
<div style="display: flex;justify-content: space-between;">
<el-button
@ -110,8 +110,8 @@
plain
icon="el-icon-download"
size="mini"
@click="handleDataExport"
v-hasPermi="['data:query:export']"
@click="handleTopScollerExport"
v-hasPermi="['dataquery:topscoller:export']"
>导出</el-button>
<div
style="text-align:right;margin-bottom: 1%;"
@ -144,6 +144,8 @@
class="tableCss"
v-loading="loading"
:data="dataList"
:row-class-name="tableRowClassName"
header-row-class-name="header-row"
>
<el-table-column
label="序号"
@ -162,21 +164,221 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="x轴润滑液压"
label="运行状态"
align="center"
prop="x_lube_press"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.equip_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column
label="主电机电流A"
align="center"
prop="sysCur"
:show-overflow-tooltip="true"
/>
<el-table-column
label="y轴润滑液压"
label="系统压力bar"
align="center"
prop="y_lube_press"
prop="sysPress"
:show-overflow-tooltip="true"
/>
<el-table-column
label="z轴润滑液压"
label="泵输出流量L/min"
align="center"
prop="y_lube_press"
prop="sysFlow"
:show-overflow-tooltip="true"
/>
<el-table-column
label="液位cP"
align="center"
prop="sysLevel"
:show-overflow-tooltip="true"
/>
<el-table-column
label="液温(℃)"
align="center"
prop="sysTemp"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油水检测(%"
align="center"
prop="humi"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油品粘度mPa.s"
align="center"
prop="visc"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度4umPM"
align="center"
prop="gran4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度6umPM"
align="center"
prop="gran6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度14umPM"
align="center"
prop="gran14"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度21umPM"
align="center"
prop="gran21"
:show-overflow-tooltip="true"
/>
<el-table-column
label="车速"
align="center"
prop="speed"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一压区压力(bar)"
align="center"
prop="press1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二压区压力(bar)"
align="center"
prop="press2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三压区压力(bar)"
align="center"
prop="press3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四压区压力(bar)"
align="center"
prop="press4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五压区压力(bar)"
align="center"
prop="press5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六压区压力(bar)"
align="center"
prop="press6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七压区压力(bar)"
align="center"
prop="press7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八压区压力(bar)"
align="center"
prop="press8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九压区压力(bar)"
align="center"
prop="press9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十压区压力(bar)"
align="center"
prop="press10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一压区压力(bar)"
align="center"
prop="press11"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一压区流量(L/min)"
align="center"
prop="flow1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二压区流量(L/min)"
align="center"
prop="flow2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三压区流量(L/min)"
align="center"
prop="flow3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四压区流量(L/min)"
align="center"
prop="flow4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五压区流量(L/min)"
align="center"
prop="flow5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六压区流量(L/min)"
align="center"
prop="flow6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七压区流量(L/min)"
align="center"
prop="flow7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八压区流量(L/min)"
align="center"
prop="flow8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九压区流量(L/min)"
align="center"
prop="flow9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十压区流量(L/min)"
align="center"
prop="flow10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一压区流量(L/min)"
align="center"
prop="flow11"
:show-overflow-tooltip="true"
/>
</el-table>
@ -189,8 +391,8 @@
/>
</el-tab-pane>
<el-tab-pane
label="振动数据"
name="gateway_channel_vibr_data"
label="可控中高辊底辊液压系统"
name="bottomScoller"
>
<div style="display: flex;justify-content: space-between;">
<el-button
@ -198,8 +400,8 @@
plain
icon="el-icon-download"
size="mini"
@click="handleDataExport"
v-hasPermi="['data:query:export']"
@click="handleBottomScollerExport"
v-hasPermi="['dataquery:bottomscoller:export']"
>导出</el-button>
<div
style="text-align:right;margin-bottom: 1%;"
@ -232,6 +434,8 @@
class="tableCss"
v-loading="loading"
:data="dataList"
:row-class-name="tableRowClassName"
header-row-class-name="header-row"
>
<el-table-column
label="序号"
@ -250,115 +454,221 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="Y轴熵值g/s"
label="运行状态"
align="center"
prop="x_entropy"
prop="status"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane
label="温度数据"
name="gateway_channel_temp_data"
>
<div style="display: flex;justify-content: space-between;">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleDataExport"
v-hasPermi="['data:query:export']"
>导出</el-button>
<div
style="text-align:right;margin-bottom: 1%;"
class="block"
>
<el-date-picker
v-model="datetime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
style="margin-right:5px"
>
</el-date-picker>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
> </el-button>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button>
</div>
</div>
<el-table
class="tableCss"
v-loading="loading"
:data="dataList"
>
<el-table-column
label="序号"
type="index"
align="center"
>
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
<dict-tag
:options="dict.type.equip_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column
label="时间"
label="主电机电流A"
align="center"
prop="time"
width="200"
prop="sysCur"
:show-overflow-tooltip="true"
/>
<el-table-column
label="x轴轴承温度(℃)"
label="系统压力bar"
align="center"
prop="x_bear_temp"
prop="sysPress"
:show-overflow-tooltip="true"
/>
<el-table-column
label="y轴轴承温度(℃)"
label="泵输出流量L/min"
align="center"
prop="y_bear_temp"
prop="sysFlow"
:show-overflow-tooltip="true"
/>
<el-table-column
label="z轴轴承温度(℃)"
label="液位cP"
align="center"
prop="z_bear_temp"
prop="sysLevel"
:show-overflow-tooltip="true"
/>
<el-table-column
label="x轴排屑温度(℃)"
label="液温(℃)"
align="center"
prop="x_debris_temp"
prop="sysTemp"
:show-overflow-tooltip="true"
/>
<el-table-column
label="z轴排屑温度(℃)"
label="油水检测(%"
align="center"
prop="z_debris_temp"
prop="humi"
:show-overflow-tooltip="true"
/>
<el-table-column
label="室温(℃)"
label="油品粘度mPa.s"
align="center"
prop="at_temp"
prop="visc"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度4umPM"
align="center"
prop="gran4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度6umPM"
align="center"
prop="gran6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度14umPM"
align="center"
prop="gran14"
:show-overflow-tooltip="true"
/>
<el-table-column
label="油液颗粒度21umPM"
align="center"
prop="gran21"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一压区压力(bar)"
align="center"
prop="press1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="车速"
align="center"
prop="speed"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二压区压力(bar)"
align="center"
prop="press2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三压区压力(bar)"
align="center"
prop="press3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四压区压力(bar)"
align="center"
prop="press4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五压区压力(bar)"
align="center"
prop="press5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六压区压力(bar)"
align="center"
prop="press6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七压区压力(bar)"
align="center"
prop="press7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八压区压力(bar)"
align="center"
prop="press8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九压区压力(bar)"
align="center"
prop="press9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十压区压力(bar)"
align="center"
prop="press10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一压区压力(bar)"
align="center"
prop="press11"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一压区流量(L/min)"
align="center"
prop="flow1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二压区流量(L/min)"
align="center"
prop="flow2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三压区流量(L/min)"
align="center"
prop="flow3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四压区流量(L/min)"
align="center"
prop="flow4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五压区流量(L/min)"
align="center"
prop="flow5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六压区流量(L/min)"
align="center"
prop="flow6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七压区流量(L/min)"
align="center"
prop="flow7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八压区流量(L/min)"
align="center"
prop="flow8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九压区流量(L/min)"
align="center"
prop="flow9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十压区流量(L/min)"
align="center"
prop="flow10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一压区流量(L/min)"
align="center"
prop="flow11"
:show-overflow-tooltip="true"
/>
</el-table>
@ -369,114 +679,13 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane
label="CNC加工数据"
name="gateway_channel_work_data"
>
<div style="display: flex;justify-content: space-between;">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleDataExport"
v-hasPermi="['data:query:export']"
>导出</el-button>
<div
style="text-align:right;margin-bottom: 1%;"
class="block"
>
<el-date-picker
v-model="datetime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
style="margin-right:5px"
>
</el-date-picker>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
> </el-button>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button>
</div>
</div>
<el-table
class="tableCss"
v-loading="loading"
:data="dataList"
>
<el-table-column
label="序号"
type="index"
align="center"
>
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column
label="时间"
align="center"
prop="time"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="加工总件数(件)"
align="center"
prop="work_total"
:show-overflow-tooltip="true"
/>
<el-table-column
label="加工时长(小时)"
align="center"
prop="work_time"
:show-overflow-tooltip="true"
/>
<el-table-column
label="通电时间(小时)"
align="center"
prop="on_time"
:show-overflow-tooltip="true"
/>
<el-table-column
label="加工件数(件)"
align="center"
prop="work_items"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</div>
</template>
<script>
import {
getDataList,
exportCurrentDataExcel,
exportPressDataExcel,
exportVibrDataExcel,
exportTempDataExcel,
exportProcessDataExcel,
} from "@/api/data/query.js";
import { getDataList, exportCurrentDataExcel } from "@/api/data/query.js";
export default {
name: "dataLog",
data() {
@ -504,14 +713,12 @@ export default {
};
},
created() {
this.queryParams.startTime = this.datetime[0];
this.queryParams.endTime = this.datetime[1];
this.getList();
// this.startRefresh();
},
methods: {
handleTabClick() {
//this.stopRefresh();
this.stopRefresh();
// this.datetime = this.getDefaultTimeRange();
// this.queryParams = {
// startTime : this.datetime[0],
@ -519,14 +726,9 @@ export default {
// pageSize : 10,
// pageNum : 1,
// }
// this.resetQueryParams();
this.datetime = this.getDefaultTimeRange();
let startTime = new Date(this.datetime[0]);
this.queryParams.startTime = startTime.toISOString();
let endTime = new Date(this.datetime[1]);
this.queryParams.endTime = endTime.toISOString();
this.resetQueryParams();
this.getList();
// this.startRefresh();
this.startRefresh();
},
resetQueryParams() {
this.datetime = this.getDefaultTimeRange();
@ -548,36 +750,16 @@ export default {
type: "warning",
});
} else {
await this.$modal.confirm("是否确认导出机床参数报警记录数据项?");
await this.$modal.confirm("是否确认导出机床电流参数报警记录数据项?");
try {
// this.queryParams.equipId = "2e3d0190e63eda526da89d6c751f08f3"; //
// this.queryParams.tableName = "gateway_channel_current_data";
// this.queryParams.startTime = this.datetime[0];
// this.queryParams.endTime = this.datetime[1];
this.exportLoading = true;
var data = null;
switch (this.activeName) {
case "gateway_channel_current_data":
data = await exportCurrentDataExcel(this.queryParams);
this.$download.excel(data, "机床电流参数报警记录.xls");
break;
case "gateway_channel_hydra_data":
data = await exportPressDataExcel(this.queryParams);
this.$download.excel(data, "机床液压参数报警记录.xls");
break;
case "gateway_channel_vibr_data":
data = await exportVibrDataExcel(this.queryParams);
this.$download.excel(data, "机床振动参数报警记录.xls");
break;
case "gateway_channel_temp_data":
data = await exportTempDataExcel(this.queryParams);
this.$download.excel(data, "机床温度参数报警记录.xls");
break;
case "gateway_channel_work_data":
data = await exportProcessDataExcel(this.queryParams);
this.$download.excel(data, "机床生产参数报警记录.xls");
break;
}
console.log("导出查询数据:", this.queryParams);
const data = await exportCurrentDataExcel(this.queryParams);
this.$download.excel(data, "机床电流参数报警记录.xls");
} catch {
} finally {
this.exportLoading = false;
@ -620,24 +802,20 @@ export default {
// );
// }
// },
async handleQuery() {
handleQuery() {
if (this.datetime == null) {
this.datetime = this.getDefaultTimeRange();
}
// this.stopRefresh();
let startTime = new Date(this.datetime[0]);
this.queryParams.startTime = startTime.toISOString();
this.queryParams.startTime = this.formatDateTime(startTime);
let endTime = new Date(this.datetime[1]);
this.queryParams.endTime = endTime.toISOString();
await this.getList();
this.queryParams.endTime = this.formatDateTime(endTime);
this.loading = true;
this.getList();
},
resetQuery() {
this.datetime = this.getDefaultTimeRange();
let startTime = new Date(this.datetime[0]);
this.queryParams.startTime = startTime.toISOString();
let endTime = new Date(this.datetime[1]);
this.queryParams.endTime = endTime.toISOString();
this.getList();
this.startRefresh();
},
getDefaultTimeRange() {
const now = new Date();
@ -669,6 +847,8 @@ export default {
this.loading = true;
this.queryParams.equipId = "2e3d0190e63eda526da89d6c751f08f3"; //
this.queryParams.tableName = this.activeName;
this.queryParams.startTime = this.datetime[0];
this.queryParams.endTime = this.datetime[1];
const res = await getDataList(this.queryParams);
this.dataList = res.data.list;
this.total = res.data.total;