数据记录功能更新

This commit is contained in:
zhangjunwen 2024-04-08 15:07:39 +08:00
parent 2ff1f7fa14
commit 609bbe3bd3
8 changed files with 988 additions and 241 deletions

View File

@ -1,13 +1,19 @@
package com.inspur.web.controller.industrial;
import com.inspur.common.annotation.Log;
import com.inspur.common.core.domain.AjaxResult;
import com.inspur.common.enums.BusinessType;
import com.inspur.common.utils.poi.ExcelUtil;
import com.inspur.industrial.domain.BottomCylData;
import com.inspur.industrial.domain.IpcData;
import com.inspur.industrial.domain.ScollerData;
import com.inspur.industrial.service.IDataQueryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 传感器数据查询控制器
@ -125,4 +131,52 @@ public class DataQueryController {
{
return AjaxResult.success(dataQueryService.getBottomScollerDataList(startTime, endTime, pageSize, pageNum));
}
/**
* 超压底缸导出数据记录
*/
@Log(title = "超压底缸数据记录", businessType = BusinessType.EXPORT)
@PostMapping("/bottomCylExport")
public void bottomCylExport(
HttpServletResponse response,
String startTime,
String endTime
)
{
Map<String, Object> resMap = dataQueryService.getBottomCylDataList(startTime, endTime, 0, 0);
ExcelUtil<BottomCylData> util = new ExcelUtil<BottomCylData>(BottomCylData.class);
util.exportExcel(response, (List<BottomCylData>)resMap.get("list"), "超压底缸数据");
}
/**
* 超压底缸导出数据记录
*/
@Log(title = "数据记录", businessType = BusinessType.EXPORT)
@PostMapping("/topScollerExport")
public void topScollerExport(
HttpServletResponse response,
String startTime,
String endTime
)
{
Map<String, Object> resMap = dataQueryService.getTopScollerDataList(startTime, endTime, 0, 0);
ExcelUtil<ScollerData> util = new ExcelUtil<ScollerData>(ScollerData.class);
util.exportExcel(response, (List<ScollerData>)resMap.get("list"), "可控中高辊顶辊数据");
}
/**
* 超压底缸导出数据记录
*/
@Log(title = "数据记录", businessType = BusinessType.EXPORT)
@PostMapping("/bottomScollerExport")
public void export(
HttpServletResponse response,
String startTime,
String endTime)
{
Map<String, Object> resMap = dataQueryService.getBottomScollerDataList(startTime, endTime, 0, 0);
ExcelUtil<ScollerData> util = new ExcelUtil<ScollerData>(ScollerData.class);
util.exportExcel(response, (List<ScollerData>)resMap.get("list"), "可控中高辊底辊数据");
}
}

View File

@ -68,9 +68,9 @@ public class IPCData2SyncThread implements Runnable {
fields.put("sys_press",(float) 0 + Math.random());
// 系统液位
fields.put("sys_level",(float) 0 + Math.random());
fields.put("ywcsz",0.5);
fields.put("ywmin",0.3);
fields.put("ywmax",1);
// fields.put("ywcsz",0.5);
// fields.put("ywmin",0.3);
// fields.put("ywmax",1);
// 系统温度
fields.put("sys_temp",(float) 0 + Math.random());
// 油液颗粒度

View File

@ -67,9 +67,9 @@ public class IPCData3SyncThread implements Runnable {
fields.put("sys_press",(float) 0 + Math.random());
// 系统液位
fields.put("sys_level",(float) 0 + Math.random());
fields.put("ywcsz",0.5);
fields.put("ywmin",0.3);
fields.put("ywmax",1);
// fields.put("ywcsz",0.5);
// fields.put("ywmin",0.3);
// fields.put("ywmax",1);
// 系统温度
fields.put("sys_temp",(float) 0 + Math.random());
// 油液颗粒度

View File

@ -0,0 +1,133 @@
package com.inspur.industrial.domain;
import com.inspur.common.annotation.Excel;
import lombok.Data;
/**
* 底缸数据实体类
* @Author zhangjunwen
* @create 2024/4/8
*/
@Data
public class BottomCylData extends IpcData{
@Excel(name = "操作侧软辊流量")
/**
* 操作侧软辊流量
*/
private double opSoftFlow;
@Excel(name = "操作侧热辊流量")
/**
* 操作侧热辊流量
*/
private double opHotFlow;
@Excel(name = "传动侧软辊流量")
/**
* 传动侧软辊流量
*/
private double tranSoftFlow;
@Excel(name = "传动侧热辊流量")
/**
* 传动侧热辊流量
*/
private double tranHotFlow;
@Excel(name = "操作侧底缸压力")
/**
* 操作侧底缸压力
*/
private double opBottomPress;
@Excel(name = "传动侧底缸压力")
/**
* 传动侧底缸压力
*/
private double tranBottomPress;
@Excel(name = "操作侧软辊实际压力")
/**
* 操作侧软辊实际压力
*/
private double opSoftPress;
@Excel(name = "操作侧软辊合辊压力")
/**
* 操作侧软辊合辊压力
*/
private double opSoftHoldPress;
@Excel(name = "操作侧软辊加压压力")
/**
* 操作侧软辊加压压力
*/
private double opSoftPushPress;
@Excel(name = "操作侧热辊实际压力")
/**
* 操作侧热辊实际压力
*/
private double opHotPress;
@Excel(name = "操作侧热辊合辊压力")
/**
* 操作侧热辊合辊压力
*/
private double opHotHoldPress;
@Excel(name = "操作侧热辊加压压力")
/**
* 操作侧热辊加压压力
*/
private double opHotPushPress;
@Excel(name = "传动侧软辊实际压力")
/**
* 传动侧软辊实际压力
*/
private double tranSoftPress;
@Excel(name = "传动侧软辊合辊压力")
/**
* 传动侧软辊合辊压力
*/
private double tranSoftHoldPress;
@Excel(name = "传动侧软辊加压压力")
/**
* 传动侧软辊加压压力
*/
private double tranSoftPushPress;
@Excel(name = "传动侧热辊实际压力")
/**
* 传动侧热辊实际压力
*/
private double tranHotPress;
@Excel(name = "传动侧热辊合辊压力")
/**
* 传动侧热辊合辊压力
*/
private double tranHotHoldPress;
@Excel(name = "传动侧热辊加压压力")
/**
* 传动侧热辊加压压力
*/
private double tranHotPushPress;
@Excel(name = "操作侧底缸位移")
/**
* 操作侧底缸位移
*/
private double opBottomDis;
@Excel(name = "传动侧底缸位移")
/**
* 传动侧底缸位移
*/
private double tranBottomDis;
}

View File

@ -1,5 +1,7 @@
package com.inspur.industrial.domain;
import com.inspur.common.annotation.Excel;
import com.inspur.common.annotation.Excels;
import lombok.Data;
/**
@ -9,273 +11,77 @@ import lombok.Data;
@Data
public class IpcData {
@Excel(name = "时间")
/**
* 时间
*/
private String time;
@Excel(name = "系统流量")
/**
* 系统流量
*/
private double sysFlow;
@Excel(name = "系统压力")
/**
* 系统压力
*/
private double sysPress;
@Excel(name = "系统液位")
/**
* 系统液位
*/
private double sysLevel;
@Excel(name = "系统电流")
/**
* 系统电流
*/
private double sysCur;
@Excel(name = "系统温度")
/**
* 系统温度
*/
private double sysTemp;
@Excel(name = "4mm颗粒度")
/**
* 4mm颗粒度
*/
private double gran4;
@Excel(name = "6mm颗粒度")
/**
* 6mm颗粒度
*/
private double gran6;
@Excel(name = "14mm颗粒度")
/**
* 14mm颗粒度
*/
private double gran14;
@Excel(name = "21mm颗粒度")
/**
* 21mm颗粒度
*/
private double gran21;
@Excel(name = "湿度")
/**
* 湿度
*/
private double humi;
@Excel(name = "粘度")
/**
* 粘度
*/
private double visc;
/**
* 操作侧软辊流量
*/
private double opSoftFlow;
/**
* 操作侧热辊流量
*/
private double opHotFlow;
/**
* 传动侧软辊流量
*/
private double tranSoftFlow;
/**
* 传动侧热辊流量
*/
private double tranHotFlow;
/**
* 操作侧底缸压力
*/
private double opBottomPress;
/**
* 传动侧底缸压力
*/
private double tranBottomPress;
/**
* 操作侧软辊实际压力
*/
private double opSoftPress;
/**
* 操作侧软辊合辊压力
*/
private double opSoftHoldPress;
/**
* 操作侧软辊加压压力
*/
private double opSoftPushPress;
/**
* 操作侧热辊实际压力
*/
private double opHotPress;
/**
* 操作侧热辊合辊压力
*/
private double opHotHoldPress;
/**
* 操作侧热辊加压压力
*/
private double opHotPushPress;
/**
* 传动侧软辊实际压力
*/
private double tranSoftPress;
/**
* 传动侧软辊合辊压力
*/
private double tranSoftHoldPress;
/**
* 传动侧软辊加压压力
*/
private double tranSoftPushPress;
/**
* 传动侧热辊实际压力
*/
private double tranHotPress;
/**
* 传动侧热辊合辊压力
*/
private double tranHotHoldPress;
/**
* 传动侧热辊加压压力
*/
private double tranHotPushPress;
/**
* 操作侧底缸位移
*/
private double opBottomDis;
/**
* 传动侧底缸位移
*/
private double tranBottomDis;
/**
* 一区压力
*/
private double press1;
/**
* 二区压力
*/
private double press2;
/**
* 三区压力
*/
private double press3;
/**
* 四区压力
*/
private double press4;
/**
* 五区压力
*/
private double press5;
/**
* 六区压力
*/
private double press6;
/**
* 七区压力
*/
private double press7;
/**
* 八区压力
*/
private double press8;
/**
* 九区压力
*/
private double press9;
/**
* 十区压力
*/
private double press10;
/**
* 十一区压力
*/
private double press11;
/**
* 一区流量
*/
private double flow1;
/**
* 二区流量
*/
private double flow2;
/**
* 三区流量
*/
private double flow3;
/**
* 四区流量
*/
private double flow4;
/**
* 五区流量
*/
private double flow5;
/**
* 六区流量
*/
private double flow6;
/**
* 七区流量
*/
private double flow7;
/**
* 八区流量
*/
private double flow8;
/**
* 九区流量
*/
private double flow9;
/**
* 十区流量
*/
private double flow10;
/**
* 十一区流量
*/
private double flow11;
}

View File

@ -0,0 +1,146 @@
package com.inspur.industrial.domain;
import com.inspur.common.annotation.Excel;
import lombok.Data;
/**
* 辊子数据
* @Author zhangjunwen
* @create 2024/4/8
*/
@Data
public class ScollerData extends IpcData{
@Excel(name = "一区压力")
/**
* 一区压力
*/
private double press1;
@Excel(name = "二区压力")
/**
* 二区压力
*/
private double press2;
@Excel(name = "三区压力")
/**
* 三区压力
*/
private double press3;
@Excel(name = "四区压力")
/**
* 四区压力
*/
private double press4;
@Excel(name = "五区压力")
/**
* 五区压力
*/
private double press5;
@Excel(name = "六区压力")
/**
* 六区压力
*/
private double press6;
@Excel(name = "七区压力")
/**
* 七区压力
*/
private double press7;
@Excel(name = "八区压力")
/**
* 八区压力
*/
private double press8;
@Excel(name = "九区压力")
/**
* 九区压力
*/
private double press9;
@Excel(name = "十区压力")
/**
* 十区压力
*/
private double press10;
@Excel(name = "十一区压力")
/**
* 十一区压力
*/
private double press11;
@Excel(name = "一区流量")
/**
* 一区流量
*/
private double flow1;
@Excel(name = "二区流量")
/**
* 二区流量
*/
private double flow2;
@Excel(name = "三区流量")
/**
* 三区流量
*/
private double flow3;
@Excel(name = "四区流量")
/**
* 四区流量
*/
private double flow4;
@Excel(name = "五区流量")
/**
* 五区流量
*/
private double flow5;
@Excel(name = "六区流量")
/**
* 六区流量
*/
private double flow6;
@Excel(name = "七区流量")
/**
* 七区流量
*/
private double flow7;
@Excel(name = "八区流量")
/**
* 八区流量
*/
private double flow8;
@Excel(name = "九区流量")
/**
* 九区流量
*/
private double flow9;
@Excel(name = "十区流量")
/**
* 十区流量
*/
private double flow10;
@Excel(name = "十一区流量")
/**
* 十一区流量
*/
private double flow11;
}

View File

@ -1,6 +1,8 @@
package com.inspur.industrial.service.impl;
import com.inspur.industrial.domain.BottomCylData;
import com.inspur.industrial.domain.IpcData;
import com.inspur.industrial.domain.ScollerData;
import com.inspur.industrial.service.IDataQueryService;
import com.inspur.industrial.utils.InfluxdbTimeUtil;
import com.inspur.system.domain.SysConfig;
@ -236,9 +238,9 @@ public class DataQueryService implements IDataQueryService {
return null;
}
List<IpcData> resList = new ArrayList<>();
List<BottomCylData> resList = new ArrayList<>();
list.forEach(data -> {
IpcData ipcData = new IpcData();
BottomCylData ipcData = new BottomCylData();
ipcData.setTime(InfluxdbTimeUtil.utcToCst(data.get("time").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
ipcData.setSysCur(data.get("sys_cur") == null ? 0 : (double) data.get("sys_cur"));
ipcData.setSysLevel(data.get("sys_level") == null ? 0 : (double) data.get("sys_level"));
@ -301,7 +303,7 @@ public class DataQueryService implements IDataQueryService {
List<Map<String, Object>> list = selectAllDataByEquId("zfipc_industrial_monitor_data2", "5d6c1a1374ea490a91e1361c1f5400aa", startTime, endTime, pageSize, pageNum);
int total = countInfluxdbList("zfipc_industrial_monitor_data2", "5d6c1a1374ea490a91e1361c1f5400aa", startTime, endTime);
List<IpcData> resList = getScollerDataList(list);
List<ScollerData> resList = getScollerDataList(list);
Map<String, Object> resMap = new HashMap<>();
resMap.put("total", total);
@ -315,11 +317,14 @@ public class DataQueryService implements IDataQueryService {
*/
@Override
public Map<String, Object> getBottomScollerDataList(String startTime, String endTime, int pageSize, int pageNum){
startTime = InfluxdbTimeUtil.cstToUtc(startTime);
endTime = InfluxdbTimeUtil.cstToUtc(endTime);
List<Map<String, Object>> list = selectAllDataByEquId("zfipc_industrial_monitor_data3", "8b2d5cb04e254c15ade1e53a4f594f3f", startTime, endTime, pageSize, pageNum);
int total = countInfluxdbList("zfipc_industrial_monitor_data3", "8b2d5cb04e254c15ade1e53a4f594f3f", startTime, endTime);
List<IpcData> resList = getScollerDataList(list);
List<ScollerData> resList = getScollerDataList(list);
Map<String, Object> resMap = new HashMap<>();
resMap.put("total", total);
@ -333,7 +338,6 @@ public class DataQueryService implements IDataQueryService {
* 根据设备id查询最近num条数据
* @param tableName 表名
* @param equipId 设备id
* @param num 条数
* @return 数据
*/
private List<Map<String, Object>> selectAllDataByEquId(String tableName, String equipId,String startTime, String endTime, int pageSize, int pageNum){
@ -496,14 +500,14 @@ public class DataQueryService implements IDataQueryService {
return resMap;
}
private List<IpcData> getScollerDataList(List<Map<String, Object>> list) {
private List<ScollerData> getScollerDataList(List<Map<String, Object>> list) {
if (list.size() == 0){
return null;
}
List<IpcData> resList = new ArrayList<>();
List<ScollerData> resList = new ArrayList<>();
list.forEach(data -> {
IpcData ipcData = new IpcData();
ipcData.setTime(InfluxdbTimeUtil.utcToCst(data.get("time").toString()).toString());
ScollerData ipcData = new ScollerData();
ipcData.setTime(InfluxdbTimeUtil.utcToCst(data.get("time").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
ipcData.setSysCur(data.get("sys_cur") == null ? 0 : (double) data.get("sys_cur"));
ipcData.setSysLevel(data.get("sys_level") == null ? 0 : (double) data.get("sys_level"));
ipcData.setSysTemp(data.get("sys_temp") == null ? 0 : (double) data.get("sys_temp"));

View File

@ -15,6 +15,7 @@
<el-tabs
v-model="activeName"
type="card"
@tab-click="handleTabClick"
>
<el-tab-pane
label="超压底缸加压液压系统"
@ -26,7 +27,7 @@
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
@click="handleBottomCylExport"
>导出</el-button>
<div
style="text-align:right;margin-bottom: 1%;"
@ -277,11 +278,543 @@
<el-tab-pane
label="可控中高辊顶辊液压系统"
name="topScoller"
>可控中高辊顶辊液压系统</el-tab-pane>
>
<div style="display: flex;justify-content: space-between;">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleTopScollerExport"
>导出</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"
:row-class-name="tableRowClassName"
header-row-class-name="header-row"
>
<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="sysCur"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统压力"
align="center"
prop="sysPress"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统流量"
align="center"
prop="sysFlow"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统液位"
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="系统粘度"
align="center"
prop="visc"
:show-overflow-tooltip="true"
/>
<el-table-column
label="4μm颗粒度"
align="center"
prop="gran4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="6μm颗粒度"
align="center"
prop="gran6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="14μm颗粒度"
align="center"
prop="gran14"
:show-overflow-tooltip="true"
/>
<el-table-column
label="21μm颗粒度"
align="center"
prop="gran21"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一区压力"
align="center"
prop="press1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二区压力"
align="center"
prop="press2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三区压力"
align="center"
prop="press3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四区压力"
align="center"
prop="press4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五区压力"
align="center"
prop="press5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六区压力"
align="center"
prop="press6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七区压力"
align="center"
prop="press7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八区压力"
align="center"
prop="press8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九区压力"
align="center"
prop="press9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十区压力"
align="center"
prop="press10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一区压力"
align="center"
prop="press11"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一区流量"
align="center"
prop="flow1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二区流量"
align="center"
prop="flow2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三区流量"
align="center"
prop="flow3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四区流量"
align="center"
prop="flow4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五区流量"
align="center"
prop="flow5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六区流量"
align="center"
prop="flow6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七区流量"
align="center"
prop="flow7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八区流量"
align="center"
prop="flow8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九区流量"
align="center"
prop="flow9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十区流量"
align="center"
prop="flow10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一区流量"
align="center"
prop="flow11"
: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="bottomScoller"
>可控中高辊底辊液压系统</el-tab-pane>
>
<div style="display: flex;justify-content: space-between;">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleBottomScollerExport"
>导出</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"
:row-class-name="tableRowClassName"
header-row-class-name="header-row"
>
<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="sysCur"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统压力"
align="center"
prop="sysPress"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统流量"
align="center"
prop="sysFlow"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统液位"
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="系统粘度"
align="center"
prop="visc"
:show-overflow-tooltip="true"
/>
<el-table-column
label="4μm颗粒度"
align="center"
prop="gran4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="6μm颗粒度"
align="center"
prop="gran6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="14μm颗粒度"
align="center"
prop="gran14"
:show-overflow-tooltip="true"
/>
<el-table-column
label="21μm颗粒度"
align="center"
prop="gran21"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一区压力"
align="center"
prop="press1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二区压力"
align="center"
prop="press2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三区压力"
align="center"
prop="press3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四区压力"
align="center"
prop="press4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五区压力"
align="center"
prop="press5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六区压力"
align="center"
prop="press6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七区压力"
align="center"
prop="press7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八区压力"
align="center"
prop="press8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九区压力"
align="center"
prop="press9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十区压力"
align="center"
prop="press10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一区压力"
align="center"
prop="press11"
:show-overflow-tooltip="true"
/>
<el-table-column
label="一区流量"
align="center"
prop="flow1"
:show-overflow-tooltip="true"
/>
<el-table-column
label="二区流量"
align="center"
prop="flow2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="三区流量"
align="center"
prop="flow3"
:show-overflow-tooltip="true"
/>
<el-table-column
label="四区流量"
align="center"
prop="flow4"
:show-overflow-tooltip="true"
/>
<el-table-column
label="五区流量"
align="center"
prop="flow5"
:show-overflow-tooltip="true"
/>
<el-table-column
label="六区流量"
align="center"
prop="flow6"
:show-overflow-tooltip="true"
/>
<el-table-column
label="七区流量"
align="center"
prop="flow7"
:show-overflow-tooltip="true"
/>
<el-table-column
label="八区流量"
align="center"
prop="flow8"
:show-overflow-tooltip="true"
/>
<el-table-column
label="九区流量"
align="center"
prop="flow9"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十区流量"
align="center"
prop="flow10"
:show-overflow-tooltip="true"
/>
<el-table-column
label="十一区流量"
align="center"
prop="flow11"
: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-tabs>
</div>
</template>
@ -319,15 +852,81 @@ export default {
this.startRefresh();
},
methods: {
/** 导出按钮操作 */
handleExport() {
handleTabClick() {
this.stopRefresh();
// this.datetime = this.getDefaultTimeRange();
// this.queryParams = {
// startTime : this.datetime[0],
// endTime : this.datetime[1],
// pageSize : 10,
// pageNum : 1,
// }
this.resetQueryParams();
this.getList();
this.startRefresh();
},
resetQueryParams() {
this.datetime = this.getDefaultTimeRange();
this.queryParams = {
startTime: this.datetime[0],
endTime: this.datetime[1],
pageSize: 10,
pageNum: 1,
};
},
/** 超压底缸导出按钮操作 */
handleBottomCylExport() {
if (this.total > 10000) {
this.$message({
showClose: true,
message: "数据量过大,请联系管理员进行导出!",
type: "warning",
});
} else {
this.download(
"patrol/card/export",
"dataQuery/bottomCylExport",
{
...this.queryParams,
},
this.activeName + `_${new Date().getTime()}.xlsx`
`超压底缸数据_${new Date().getTime()}.xlsx`
);
}
},
/** 可控中高辊顶辊导出按钮操作 */
handleTopScollerExport() {
if (this.total > 10000) {
this.$message({
showClose: true,
message: "数据量过大,请联系管理员进行导出!",
type: "warning",
});
} else {
this.download(
"dataQuery/topScollerExport",
{
...this.queryParams,
},
`可控中高辊顶辊数据_${new Date().getTime()}.xlsx`
);
}
},
/** 可控中高辊底辊导出按钮操作 */
handleBottomScollerExport() {
if (this.total > 10000) {
this.$message({
showClose: true,
message: "数据量过大,请联系管理员进行导出!",
type: "warning",
});
} else {
this.download(
"dataQuery/bottomScollerExport",
{
...this.queryParams,
},
`可控中高辊底辊数据_${new Date().getTime()}.xlsx`
);
}
},
handleQuery() {
this.stopRefresh();
@ -375,11 +974,16 @@ export default {
});
} else if (this.activeName == "topScoller") {
getTopScollerData(this.queryParams).then((response) => {
console.log("顶辊数据:", response.data);
this.dataList = response.data.list;
this.total = response.data.total;
this.loading = false;
});
} else {
getBottomScollerData(this.queryParams).then((response) => {
console.log("底辊数据:", response.data);
console.log("底辊数据:", response);
this.dataList = response.data.list;
this.total = response.data.total;
this.loading = false;
});
}
},