Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
87a5b68458
@ -610,7 +610,7 @@ public class TDEngineService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public PageDataInfo<DeviceEventInfo> queryEvent(Integer eventLevel, Long startTime, Long endTime, List<String> deviceCodeList, Integer limit, Integer offset) {
|
||||
public PageDataInfo<DeviceEventInfo> queryEvent(Integer eventLevel, Long startTime, Long endTime, List<String> deviceCodeList, Integer pageSize, Integer offset, Integer limit) {
|
||||
List<DeviceEventInfo> result = new ArrayList<>();
|
||||
StringBuffer sb = new StringBuffer(2048);
|
||||
Integer total = 0;
|
||||
@ -630,8 +630,17 @@ public class TDEngineService {
|
||||
}
|
||||
}
|
||||
sb.append(" order by t.event_time");
|
||||
if (limit != null){
|
||||
sb.append(" limit ").append(offset).append(",").append(limit);
|
||||
if (pageSize == null){
|
||||
if (limit == null){
|
||||
sb.append(" desc limit 100");
|
||||
total = 100;
|
||||
}else {
|
||||
sb.append(" desc limit ").append(limit);
|
||||
total = limit;
|
||||
}
|
||||
}
|
||||
if (pageSize != null){
|
||||
sb.append(" limit ").append(offset).append(",").append(pageSize);
|
||||
total = getEventCount(eventLevel,startTime,endTime,deviceCodeList);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,11 @@ public class EventQueryParam
|
||||
*/
|
||||
private List<String> deviceCode;
|
||||
|
||||
/**
|
||||
* 不分页限制
|
||||
*/
|
||||
private Integer limit;
|
||||
|
||||
/**
|
||||
* pageNum;
|
||||
*/
|
||||
|
@ -27,11 +27,14 @@ public class EventServiceImpl implements EventService {
|
||||
if (param.getStartTime() == null || param.getEndTime() == null) {
|
||||
throw new ServiceException("查询时间不能为空");
|
||||
}
|
||||
if (param.getPageSize() != null && param.getLimit() != null){
|
||||
throw new ServiceException("分页与limit不能同时存在");
|
||||
}
|
||||
Integer offset = null;
|
||||
if (param.getPageNum() != null) {
|
||||
offset = (param.getPageNum() - 1) * param.getPageSize();
|
||||
}
|
||||
PageDataInfo<DeviceEventInfo> deviceEventInfos = tdEngineService.queryEvent(param.getEventLevel(), param.getStartTime(), param.getEndTime(), param.getDeviceCode(), param.getPageSize(), offset);
|
||||
PageDataInfo<DeviceEventInfo> deviceEventInfos = tdEngineService.queryEvent(param.getEventLevel(), param.getStartTime(), param.getEndTime(), param.getDeviceCode(), param.getPageSize(), offset, param.getLimit());
|
||||
return deviceEventInfos;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,7 @@ import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
||||
import com.das.modules.page.service.TemperatureDashboardService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -25,7 +22,7 @@ public class TemperatureDashboardController {
|
||||
* @param device 设备{id:XXX} 只用到id即可
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getTemperatureLimitByDeviceId")
|
||||
@PostMapping("/getTemperatureLimitByDeviceId")
|
||||
public R<List<TemperatureLimitVo>> getTemperatureLimitByDeviceId(@RequestBody SysEquipmentDto device){
|
||||
List<TemperatureLimitVo> windTurbinesPageVos = service.getTemperatureLimitByDeviceId(device.getId());
|
||||
return R.success(windTurbinesPageVos);
|
||||
|
@ -29,8 +29,8 @@ public class TemperatureDashboardServiceImpl implements TemperatureDashboardServ
|
||||
String params = mapping.getParams();
|
||||
if (params != null && !params.isEmpty()) {
|
||||
JSONObject json = JSONObject.parseObject(params);
|
||||
String code = json.getString("code");
|
||||
String name = json.getString("name");
|
||||
String code = json.getString("measPointCode");
|
||||
String name = json.getString("measPointName");
|
||||
Double limit1High=0.0;
|
||||
Double limit1Low=0.0;
|
||||
Double limit2High=0.0;
|
||||
|
@ -33,12 +33,13 @@ POST 请求接口
|
||||
|
||||
| 参数名 | 参数类型 | 必填 | 描述 |
|
||||
| ------------ |---------|-----|--------|
|
||||
| startTime | Long | True | 开始时间 |
|
||||
| endTime | Long | True | 结束时间 |
|
||||
| eventLevel | int | False | 事件等级0:告警,1:故障 |
|
||||
| deviceCode | List | True | 设备编码数组 |
|
||||
| pageNum | Integer | NO | 当前页 |
|
||||
| pageSize | Integer | NO | 每页显示大小 |
|
||||
| startTime | Long | true | 开始时间 |
|
||||
| endTime | Long | true | 结束时间 |
|
||||
| eventLevel | int | false | 事件等级0:告警,1:故障 |
|
||||
| deviceCode | List | true | 设备编码数组 |
|
||||
| limit | int | false | 非分页显示最近数据条数,与pageSize,pageNum不共存 |
|
||||
| pageNum | Integer | false | 当前页 |
|
||||
| pageSize | Integer | false | 每页显示大小 |
|
||||
|
||||
返回报文
|
||||
|
||||
@ -115,4 +116,3 @@ POST 请求接口
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
@ -12,19 +12,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "2.3.1",
|
||||
"@univerjs/core": "^0.2.4",
|
||||
"@univerjs/design": "^0.2.4",
|
||||
"@univerjs/docs": "^0.2.4",
|
||||
"@univerjs/docs-ui": "^0.2.4",
|
||||
"@univerjs/engine-formula": "^0.2.4",
|
||||
"@univerjs/engine-numfmt": "^0.2.4",
|
||||
"@univerjs/engine-render": "^0.2.4",
|
||||
"@univerjs/facade": "^0.2.4",
|
||||
"@univerjs/rpc": "^0.2.4",
|
||||
"@univerjs/sheets": "^0.2.4",
|
||||
"@univerjs/sheets-formula": "^0.2.4",
|
||||
"@univerjs/sheets-ui": "^0.2.4",
|
||||
"@univerjs/ui": "^0.2.4",
|
||||
"@univerjs/core": "^0.4.2",
|
||||
"@univerjs/design": "^0.4.2",
|
||||
"@univerjs/docs": "^0.4.2",
|
||||
"@univerjs/docs-ui": "^0.4.2",
|
||||
"@univerjs/engine-formula": "^0.4.2",
|
||||
"@univerjs/engine-render": "^0.4.2",
|
||||
"@univerjs/facade": "^0.4.2",
|
||||
"@univerjs/sheets": "^0.4.2",
|
||||
"@univerjs/sheets-formula": "^0.4.2",
|
||||
"@univerjs/sheets-formula-ui": "^0.4.2",
|
||||
"@univerjs/sheets-ui": "^0.4.2",
|
||||
"@univerjs/ui": "^0.4.2",
|
||||
"@vueuse/core": "10.10.0",
|
||||
"axios": "1.7.2",
|
||||
"countup.js": "2.8.0",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import createAxios from '/@/utils/axios'
|
||||
import {addDataType, getDataReturnType, getDataType, getTreeDataReturnType} from "/@/views/backend/auth/org/type";
|
||||
import {RequestReturnType} from "/@/views/backend/auth/model/type";
|
||||
import {AlarmsTableType, GetAlarmsTableParam, RequestReturnRowType} from "/@/views/backend/alarms/type";
|
||||
|
||||
export const url = '/admin/Dashboard/'
|
||||
|
||||
@ -21,21 +22,38 @@ export const getInstitutionalListReq = (data: getDataType) => {
|
||||
|
||||
export function getWindFarmRealData(params: object = {}) {
|
||||
return createAxios({
|
||||
url: '/api/home/getWindFarmRealData',
|
||||
url: '/api/page/home/getWindFarmRealData',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export function getWindTurbineMatrixData(params: object = {}) {
|
||||
return createAxios({
|
||||
url: '/api/home/getWindTurbineMatrixData',
|
||||
url: '/api/page/home/getWindTurbineMatrixData',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const getHistoryData = (data: { startTime: number, endTime: number, devices: { deviceId: string, attributes?: string[] }[],interval?:string }) => {
|
||||
return createAxios<never, RequestReturnType<any>>({
|
||||
url: '/api/home/getHistoryData',
|
||||
url: '/api/page/home/getHistoryData',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 告警列表
|
||||
export const getAlarmList = (params: object = {}) => {
|
||||
return createAxios({
|
||||
url: 'api/event/query',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
export const alertComfirm = (data: any) => {
|
||||
return createAxios({
|
||||
url: '/api/event/confirm',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
|
@ -48,7 +48,7 @@ export const getReportTemplateListReq = (data: { category: '单机报表' | '多
|
||||
},
|
||||
success: boolean
|
||||
}>>({
|
||||
url: '/api/report/template/getList',
|
||||
url: '/api/page/report/template/getList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@ -65,7 +65,7 @@ export const addReportTemplateListReq = (data: { category: '单机报表' | '多
|
||||
}[],
|
||||
success: boolean
|
||||
}>>({
|
||||
url: '/api/report/template/add',
|
||||
url: '/api/page/report/template/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@ -77,7 +77,7 @@ export const delReportTemplateListReq = (data: { id: string }) => {
|
||||
msg: string,
|
||||
success: boolean
|
||||
}>>({
|
||||
url: '/api/report/template/del',
|
||||
url: '/api/page/report/template/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -561,6 +561,7 @@ getBlongLineList()
|
||||
|
||||
<style scoped lang="scss">
|
||||
.airBlower {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.containerPart {
|
||||
height: 100%;
|
||||
|
@ -117,7 +117,7 @@ import '@univerjs/design/lib/index.css'
|
||||
import '@univerjs/ui/lib/index.css'
|
||||
import '@univerjs/docs-ui/lib/index.css'
|
||||
import '@univerjs/sheets-ui/lib/index.css'
|
||||
// import '@univerjs/sheets-formula-ui/lib/index.css'
|
||||
import '@univerjs/sheets-formula-ui/lib/index.css'
|
||||
|
||||
import { Univer, UniverInstanceType, Tools, Workbook, LocaleType, IWorkbookData } from '@univerjs/core'
|
||||
import { defaultTheme } from '@univerjs/design'
|
||||
@ -132,7 +132,7 @@ import { UniverDocsUIPlugin } from '@univerjs/docs-ui'
|
||||
|
||||
import { UniverSheetsPlugin } from '@univerjs/sheets'
|
||||
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula'
|
||||
// import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui'
|
||||
import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui'
|
||||
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui'
|
||||
|
||||
import DesignZhCN from '@univerjs/design/locale/zh-CN'
|
||||
@ -140,7 +140,7 @@ import UIZhCN from '@univerjs/ui/locale/zh-CN'
|
||||
import DocsUIZhCN from '@univerjs/docs-ui/locale/zh-CN'
|
||||
import SheetsZhCN from '@univerjs/sheets/locale/zh-CN'
|
||||
import SheetsUIZhCN from '@univerjs/sheets-ui/locale/zh-CN'
|
||||
// import SheetsFormulaUIZhCN from '@univerjs/sheets-formula-ui/locale/zh-CN'
|
||||
import SheetsFormulaUIZhCN from '@univerjs/sheets-formula-ui/locale/zh-CN'
|
||||
import { FUniver } from '@univerjs/facade'
|
||||
|
||||
import { excelDefaultConfig, createWookbookData, createUpLoadExcelData, createSheetData, setExcelNameToLinkId } from './utils'
|
||||
@ -194,8 +194,8 @@ const initExcel = (data = {}) => {
|
||||
theme: defaultTheme,
|
||||
locale: LocaleType.ZH_CN,
|
||||
locales: {
|
||||
// [LocaleType.ZH_CN]: Tools.deepMerge(SheetsZhCN, DocsUIZhCN, SheetsUIZhCN,SheetsFormulaUIZhCN, UIZhCN, DesignZhCN),
|
||||
[LocaleType.ZH_CN]: Tools.deepMerge(SheetsZhCN, DocsUIZhCN, SheetsUIZhCN, UIZhCN, DesignZhCN),
|
||||
[LocaleType.ZH_CN]: Tools.deepMerge(SheetsZhCN, DocsUIZhCN, SheetsUIZhCN, SheetsFormulaUIZhCN, UIZhCN, DesignZhCN),
|
||||
// [LocaleType.ZH_CN]: Tools.deepMerge(SheetsZhCN, DocsUIZhCN, SheetsUIZhCN, UIZhCN, DesignZhCN),
|
||||
},
|
||||
})
|
||||
univerRef.value = univer
|
||||
@ -217,8 +217,7 @@ const initExcel = (data = {}) => {
|
||||
univer.registerPlugin(UniverSheetsPlugin)
|
||||
univer.registerPlugin(UniverSheetsUIPlugin)
|
||||
univer.registerPlugin(UniverSheetsFormulaPlugin)
|
||||
// univer.registerPlugin(UniverSheetsFormulaUIPlugin)
|
||||
|
||||
univer.registerPlugin(UniverSheetsFormulaUIPlugin)
|
||||
// create workbook instance
|
||||
workbook.value = univer.createUnit<IWorkbookData, Workbook>(UniverInstanceType.UNIVER_SHEET, data)
|
||||
|
||||
@ -244,13 +243,11 @@ const initExcel = (data = {}) => {
|
||||
})
|
||||
hasLoading.value = false
|
||||
|
||||
// const wb = univerAPI.getActiveWorkbook()
|
||||
// const worksheet = wb.getActiveSheet()
|
||||
// console.log(worksheet)
|
||||
|
||||
// worksheet.setFrozenRows(1)
|
||||
// const freezeState = worksheet.getFreeze()
|
||||
// console.log('当前冻结状态:', freezeState)
|
||||
// 获取活动工作簿和工作表
|
||||
const wb = univerAPI.getActiveWorkbook()
|
||||
const worksheet = wb!.getActiveSheet()
|
||||
// 冻结第一行
|
||||
worksheet.setFrozenRows(1)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ import { getOperatingListReq } from '/@/api/backend/operatingRecord/request'
|
||||
import type { OperatingReqType, OperatingResType } from '/@/views/backend/operatingRecord/type'
|
||||
import { getAirBlowerListReq } from '/@/api/backend/airBlower/request'
|
||||
|
||||
const datePickerValue = ref('')
|
||||
const datePickerValue = ref<any[]>([])
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '今天',
|
||||
@ -159,6 +159,14 @@ const getAirBlowerList = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getDefaultTimeForYesterday = () => {
|
||||
const start = dayjs().subtract(1, 'day').startOf('day').toDate()
|
||||
const end = dayjs().subtract(1, 'day').endOf('day').toDate()
|
||||
datePickerValue.value = [start, end]
|
||||
}
|
||||
getDefaultTimeForYesterday()
|
||||
search()
|
||||
getAirBlowerList()
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user