diff --git a/psdc-admin/src/main/resources/application-dev.yml b/psdc-admin/src/main/resources/application-dev.yml index e174ccd..40ddff2 100644 --- a/psdc-admin/src/main/resources/application-dev.yml +++ b/psdc-admin/src/main/resources/application-dev.yml @@ -76,7 +76,7 @@ spring: # redis 配置 redis: # 地址 - host: 127.0.0.1 + host: 192.168.10.99 # 端口,默认为6379 port: 6379 # 数据库索引 @@ -139,7 +139,7 @@ mqtt: #QOS等级 0, 1, 2 qos: 1 #客户端id 必须唯一 - clientId: psdc-dev + clientId: psdc-dev1234 #连接超时,默认30000 timeOut: 10 #心跳间隔时间,默认3000 diff --git a/psdc-business/src/main/java/com/psdc/entity/PsdcDevicePowerHdata96.java b/psdc-business/src/main/java/com/psdc/entity/PsdcDevicePowerHdata96.java new file mode 100644 index 0000000..2bc516e --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/entity/PsdcDevicePowerHdata96.java @@ -0,0 +1,216 @@ +package com.psdc.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + + /** + * 用户下属设备功率96点表; + * @author : Stone + * @date : 2023-5-9 + */ + @Data + @AllArgsConstructor + @NoArgsConstructor +public class PsdcDevicePowerHdata96 implements Serializable,Cloneable { + + private Integer userId; + + private Integer deviceId; + + private String samDate; + + private Double val1; + + private Double val2; + + private Double val3; + + private Double val4; + + private Double val5; + + private Double val6; + + private Double val7; + + private Double val8; + + private Double val9; + + private Double val10; + + private Double val11; + + private Double val12; + + private Double val13; + + private Double val14; + + private Double val15; + + private Double val16; + + private Double val17; + + private Double val18; + + private Double val19; + + private Double val20; + + private Double val21; + + private Double val22; + + private Double val23; + + private Double val24; + + private Double val25; + + private Double val26; + + private Double val27; + + private Double val28; + + private Double val29; + + private Double val30; + + private Double val31; + + private Double val32; + + private Double val33; + + private Double val34; + + private Double val35; + + private Double val36; + + private Double val37; + + private Double val38; + + private Double val39; + + private Double val40; + + private Double val41; + + private Double val42; + + private Double val43; + + private Double val44; + + private Double val45; + + private Double val46; + + private Double val47; + + private Double val48; + + private Double val49; + + private Double val50; + + private Double val51; + + private Double val52; + + private Double val53; + + private Double val54; + + private Double val55; + + private Double val56; + + private Double val57; + + private Double val58; + + private Double val59; + + private Double val60; + + private Double val61; + + private Double val62; + + private Double val63; + + private Double val64; + + private Double val65; + + private Double val66; + + private Double val67; + + private Double val68; + + private Double val69; + + private Double val70; + + private Double val71; + + private Double val72; + + private Double val73; + + private Double val74; + + private Double val75; + + private Double val76; + + private Double val77; + + private Double val78; + + private Double val79; + + private Double val80; + + private Double val81; + + private Double val82; + + private Double val83; + + private Double val84; + + private Double val85; + + private Double val86; + + private Double val87; + + private Double val88; + + private Double val89; + + private Double val90; + + private Double val91; + + private Double val92; + + private Double val93; + + private Double val94; + + private Double val95; + + private Double val96; + } \ No newline at end of file diff --git a/psdc-business/src/main/java/com/psdc/entity/res/PsdcDevicePowerRes.java b/psdc-business/src/main/java/com/psdc/entity/res/PsdcDevicePowerRes.java new file mode 100644 index 0000000..bb88ae7 --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/entity/res/PsdcDevicePowerRes.java @@ -0,0 +1,30 @@ +package com.psdc.entity.res; + +import com.psdc.entity.PsdcDevicePowerHdata96; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author:戴仕崑 + * @Project:psdc + * @Filename:PsdcDevicePowerRes + * @Date:2023/5/9 16:20 + * @Version 1.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PsdcDevicePowerRes { + + /** + * 总有功功率 + */ + private Double totp; + /** + * 当前总有功电能 + */ + private Double totwh; + + PsdcDevicePowerHdata96 todayUsePowers; +} diff --git a/psdc-business/src/main/java/com/psdc/entity/res/PsdcThermometerDataRes.java b/psdc-business/src/main/java/com/psdc/entity/res/PsdcThermometerDataRes.java new file mode 100644 index 0000000..c423868 --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/entity/res/PsdcThermometerDataRes.java @@ -0,0 +1,45 @@ +package com.psdc.entity.res; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Author:戴仕崑 + * @Project:psdc + * @Filename:PsdcThermometerDataRes + * @Date:2023/5/9 11:30 + * @Version 1.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PsdcThermometerDataRes { + + /** 设备id */ + private Integer deviceId ; + /** 设备名称 */ + private String deviceName ; + /** 设备运行状态:1-开启,2-关闭 */ + private Integer deviceRunStatus ; + /** 实时温度 */ + private Double thermometerValue ; + /** 目前实时进水温度 */ + private Double thermometerValueIn ; + /** 目前实时出水温度 */ + private Double thermometerValueOut ; + + /** 当天历史温度集合 */ + private List tempTodayList ; + /** 当天历史进水温度集合 */ + private List tempInTodayList ; + /** 当天历史出水温度集合 */ + private List tempOutTodayList ; + /** 当天记录时间轴 */ + private List timeList ; + /** 今日能耗统计量 */ + private Double todayUseEnergy; + +} diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcControlLogMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcControlLogMapper.java index 47e0cb1..dc9792e 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcControlLogMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcControlLogMapper.java @@ -3,6 +3,7 @@ package com.psdc.mapper; import com.psdc.entity.PsdcControlLog; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springframework.data.domain.Pageable; import java.util.List; diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java index 383f656..c19c151 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcDeviceMapper.java @@ -9,7 +9,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.security.access.method.P; -/** + /** * 设备信息表;(psdc_device)表数据库访问层 * @author : http://www.chiner.pro * @date : 2023-4-23 @@ -23,7 +23,13 @@ public interface PsdcDeviceMapper{ * @return 实例对象 */ PsdcDevice queryById(Integer deviceId); - /** + + + List selMyWorkDevices(@Param(value = "devType") Integer devType, + @Param(value = "userId") Long userId); + + + /** * 分页查询指定行数据 * * @param psdcDevice 查询条件 diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcDevicePowerHdata96Mapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcDevicePowerHdata96Mapper.java new file mode 100644 index 0000000..be59595 --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcDevicePowerHdata96Mapper.java @@ -0,0 +1,23 @@ +package com.psdc.mapper; + +import com.psdc.entity.PsdcDevicePowerHdata96; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + * @Author:戴仕崑 + * @Project:psdc + * @Filename:PsdcDevicePowerHdata96Mapper + * @Date:2023/5/9 16:27 + * @Version 1.0 + */ +@Mapper +@Repository +public interface PsdcDevicePowerHdata96Mapper { + + PsdcDevicePowerHdata96 queryById(@Param(value = "userId") Long userId, + @Param(value = "deviceId") Integer deviceId, + @Param(value = "samDate") String samDate); + +} diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricHtdataMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricHtdataMapper.java index aad75fe..0fcbb0a 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricHtdataMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricHtdataMapper.java @@ -18,10 +18,15 @@ public interface PsdcElectricHtdataMapper{ /** * 通过ID查询单条数据 * - * @param electricRtdataId 主键 + * @param electricHtdataId 主键 * @return 实例对象 */ PsdcElectricHtdata queryById(Integer electricHtdataId); + + Double selTodayUseEnergy(@Param(value = "deviceId") Integer deviceId, + @Param(value = "updateTime") String updateTime); + + /** * 分页查询指定行数据 * @@ -54,7 +59,7 @@ public interface PsdcElectricHtdataMapper{ /** * 通过主键删除数据 * - * @param electricRtdataId 主键 + * @param electricHtdataId 主键 * @return 影响行数 */ int deleteById(Integer electricHtdataId); diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricRtdataMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricRtdataMapper.java index eaceb43..3912642 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricRtdataMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcElectricRtdataMapper.java @@ -3,6 +3,7 @@ package com.psdc.mapper; import java.util.List; import com.psdc.entity.PsdcElectricRtdata; +import com.psdc.entity.res.PsdcDevicePowerRes; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.data.domain.Pageable; @@ -21,7 +22,7 @@ public interface PsdcElectricRtdataMapper{ * @param electricRtdataId 主键 * @return 实例对象 */ - PsdcElectricRtdata queryById(Integer electricRtdataId); + PsdcDevicePowerRes queryById(@Param("electricRtdataId") Integer electricRtdataId); /** * 分页查询指定行数据 * diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerHtdataMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerHtdataMapper.java index b487438..1d75f7e 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerHtdataMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerHtdataMapper.java @@ -6,14 +6,16 @@ import com.psdc.entity.PsdcThermometerHtdata; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Repository; - /** +/** * 温度历史数据;(psdc_thermometer_htdata)表数据库访问层 * @author : http://www.chiner.pro * @date : 2023-4-23 */ @Mapper +@Repository public interface PsdcThermometerHtdataMapper{ /** * 通过ID查询单条数据 @@ -30,6 +32,15 @@ public interface PsdcThermometerHtdataMapper{ * @return 对象列表 */ List queryAllByLimit(PsdcThermometerHtdata psdcThermometerHtdata, @Param("pageable") Pageable pageable); + + + List selTodayThermometer(@Param(value = "temp") String temp, + @Param(value = "deviceId") Integer deviceId, + @Param(value = "updateTime") String updateTime); + + List selTodayThermometer2(@Param(value = "deviceId") Integer deviceId, + @Param(value = "updateTime") String updateTime); + /** * 统计总行数 * diff --git a/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerRtdataMapper.java b/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerRtdataMapper.java index 63c0960..aae7553 100644 --- a/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerRtdataMapper.java +++ b/psdc-business/src/main/java/com/psdc/mapper/PsdcThermometerRtdataMapper.java @@ -2,17 +2,20 @@ package com.psdc.mapper; import java.util.List; import com.psdc.entity.PsdcThermometerRtdata; +import com.psdc.entity.res.PsdcThermometerDataRes; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Repository; - /** +/** * 温度实时数据;(psdc_thermometer_rtdata)表数据库访问层 * @author : http://www.chiner.pro * @date : 2023-4-23 */ @Mapper +@Repository public interface PsdcThermometerRtdataMapper{ /** * 通过ID查询单条数据 @@ -20,7 +23,10 @@ public interface PsdcThermometerRtdataMapper{ * @param thermometerRtdataId 主键 * @return 实例对象 */ - PsdcThermometerRtdata queryById(Integer thermometerRtdataId); + PsdcThermometerDataRes queryById(@Param("thermometerRtdataId") Integer thermometerRtdataId); + + List selWenDu(@Param("devType") Integer devType); + /** * 分页查询指定行数据 * diff --git a/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java b/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java new file mode 100644 index 0000000..93b816e --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/service/IPsdcThermometerHtdataService.java @@ -0,0 +1,23 @@ +package com.psdc.service; + +import com.psdc.core.domain.AjaxResult; + +import java.util.List; + +/** + * @Author:戴仕崑 + * @Project:psdc + * @Filename:PsdcThermometerHtdataService + * @Date:2023/5/9 11:10 + * @Version 1.0 + */ +public interface IPsdcThermometerHtdataService { + + + AjaxResult selTodayThermometer(); + + AjaxResult sel8WnDu(); + + AjaxResult selTotalElectricityInfo(); + +} diff --git a/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java b/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java new file mode 100644 index 0000000..7cfdf9e --- /dev/null +++ b/psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java @@ -0,0 +1,87 @@ +package com.psdc.service.impl; + +import com.psdc.core.domain.AjaxResult; +import com.psdc.entity.PsdcDevicePowerHdata96; +import com.psdc.entity.PsdcElectricRtdata; +import com.psdc.entity.res.PsdcDevicePowerRes; +import com.psdc.entity.res.PsdcThermometerDataRes; +import com.psdc.mapper.*; +import com.psdc.service.IPsdcThermometerHtdataService; +import com.psdc.utils.SecurityUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * @Author:戴仕崑 + * @Project:psdc + * @Filename:PsdcThermometerHtdataServiceImpl + * @Date:2023/5/9 11:10 + * @Version 1.0 + */ +@Service +public class PsdcThermometerHtdataServiceImpl implements IPsdcThermometerHtdataService { + + @Resource + PsdcThermometerRtdataMapper mapper1; + @Resource + PsdcThermometerHtdataMapper mapper2; + @Resource + PsdcElectricHtdataMapper mapper3; + @Resource + PsdcDeviceMapper mapper4; + @Resource + PsdcDevicePowerHdata96Mapper mapper5; + @Resource + PsdcElectricRtdataMapper mapper6; + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyyMMdd"); + + @Override + public AjaxResult selTodayThermometer() { + + long userId = SecurityUtils.getUserId(); + List devList = mapper4.selMyWorkDevices(2, userId); + Date date = new Date(); + List ary = new ArrayList(); + + for (Integer d : devList) { + + PsdcThermometerDataRes dataRes = mapper1.queryById(d); + List listIn = mapper2.selTodayThermometer("thermometer_value_in", d, sdf.format(date)); + List listOut = mapper2.selTodayThermometer("thermometer_value_out", d, sdf.format(date)); + List listTemp = mapper2.selTodayThermometer("thermometer_value", d, sdf.format(date)); + List times = mapper2.selTodayThermometer2(d, sdf.format(date)); + Double useEnergy = mapper3.selTodayUseEnergy(d, sdf.format(date)); + dataRes.setTimeList(times); + dataRes.setTempTodayList(listTemp); + dataRes.setTempInTodayList(listIn); + dataRes.setTempOutTodayList(listOut); + dataRes.setTodayUseEnergy(useEnergy); + ary.add(dataRes); + } + + AjaxResult r = new AjaxResult(200, "查询成功", ary); + return r; + } + + @Override + public AjaxResult sel8WnDu() { + List dataResList = mapper1.selWenDu(1); + return AjaxResult.success(dataResList); + } + + @Override + public AjaxResult selTotalElectricityInfo() { + long userId = SecurityUtils.getUserId(); + PsdcDevicePowerHdata96 hdata96 = mapper5.queryById(userId, 13, sdf2.format(new Date())); + PsdcDevicePowerRes rtdata = mapper6.queryById(13); + rtdata.setTodayUsePowers(hdata96); + return AjaxResult.success(rtdata); + } + + +} diff --git a/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml b/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml index 3178cbc..aae305e 100644 --- a/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml +++ b/psdc-business/src/main/resources/mapper/business/PsdcDeviceMapper.xml @@ -2,22 +2,23 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -42,6 +43,18 @@ where device_id = #{deviceId} + + + Select + user_id,device_id,sam_date,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11,val12,val13,val14,val15,val16,val17,val18,val19,val20,val21,val22,val23,val24,val25,val26,val27,val28,val29,val30,val31,val32,val33,val34,val35,val36,val37,val38,val39,val40,val41,val42,val43,val44,val45,val46,val47,val48,val49,val50,val51,val52,val53,val54,val55,val56,val57,val58,val59,val60,val61,val62,val63,val64,val65,val66,val67,val68,val69,val70,val71,val72,val73,val74,val75,val76,val77,val78,val79,val80,val81,val82,val83,val84,val85,val86,val87,val88,val89,val90,val91,val92,val93,val94,val95,val96 + From psdc_device_power_hdata96 pdph96 + + + and user_id = #{userId} + + + and device_id = #{deviceId} + + + and sam_date = #{samDate} + + + + \ No newline at end of file diff --git a/psdc-business/src/main/resources/mapper/business/PsdcElectricHtdataMapper.xml b/psdc-business/src/main/resources/mapper/business/PsdcElectricHtdataMapper.xml index 4ad5700..f018226 100644 --- a/psdc-business/src/main/resources/mapper/business/PsdcElectricHtdataMapper.xml +++ b/psdc-business/src/main/resources/mapper/business/PsdcElectricHtdataMapper.xml @@ -54,6 +54,18 @@ where electric_htdata_id = #{electricHtdataId} + + - select - electric_rtdata_id,device_id,update_time,Ua,Ub,Uc,Ia,Ib,Ic,Pa,Pb,Pc,TotP,Qa,Qb,Qc,TotQ,PFa,PFb,PFc,TotPF,SupWh,RtlWh,SupQh,RtlQh,Sa,Sb,Sc,TotS, - TotWh,TotWh_1,TotWh_2,TotWh_3,TotWh_4,HZ,Uab,Ubc,Uca,CombWh,CombQh - from psdc_electric_rtdata - where electric_rtdata_id = #{electricRtdataId} + diff --git a/psdc-business/src/main/resources/mapper/business/PsdcThermometerHtdataMapper.xml b/psdc-business/src/main/resources/mapper/business/PsdcThermometerHtdataMapper.xml index ff3c4b8..227bc85 100644 --- a/psdc-business/src/main/resources/mapper/business/PsdcThermometerHtdataMapper.xml +++ b/psdc-business/src/main/resources/mapper/business/PsdcThermometerHtdataMapper.xml @@ -18,11 +18,35 @@ where thermometer_htdata_id = #{thermometerHtdataId} + + + + - select - thermometer_rtdata_id,device_id,thermometer_value,thermometer_value_in,thermometer_value_out,update_time - from psdc_thermometer_rtdata - where thermometer_rtdata_id = #{thermometerRtdataId} + + + diff --git a/psdc-ui/src/assets/images/发热电缆.png b/psdc-ui/src/assets/images/发热电缆.png new file mode 100644 index 0000000..f8118fc Binary files /dev/null and b/psdc-ui/src/assets/images/发热电缆.png differ diff --git a/psdc-ui/src/assets/images/电磁锅炉.png b/psdc-ui/src/assets/images/电磁锅炉.png new file mode 100644 index 0000000..cd6f3e6 Binary files /dev/null and b/psdc-ui/src/assets/images/电磁锅炉.png differ diff --git a/psdc-ui/src/assets/images/空气源热泵.png b/psdc-ui/src/assets/images/空气源热泵.png new file mode 100644 index 0000000..3f013c6 Binary files /dev/null and b/psdc-ui/src/assets/images/空气源热泵.png differ diff --git a/psdc-ui/src/assets/images/蓄热锅炉.png b/psdc-ui/src/assets/images/蓄热锅炉.png new file mode 100644 index 0000000..2557e55 Binary files /dev/null and b/psdc-ui/src/assets/images/蓄热锅炉.png differ diff --git a/psdc-ui/src/views/bigview/index.vue b/psdc-ui/src/views/bigview/index.vue index 9f7de75..d234b51 100644 --- a/psdc-ui/src/views/bigview/index.vue +++ b/psdc-ui/src/views/bigview/index.vue @@ -6,15 +6,76 @@
-
+
电磁锅炉
+
+
+ +
+
+
+
+
+
+
+
+
蓄热锅炉
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
空气源热泵
+
+
+ +
+
+
+
+
+
+
+
+
发热电缆
+
+
+ +
+
+
+
+
+
+
@@ -58,7 +119,7 @@ display: flex; justify-content: space-between; flex-wrap: nowrap; - padding: 0 20px; + padding: 0 20px 20px 20px; width: 100%; height: calc(100% - 70px); .left{ @@ -67,33 +128,76 @@ .left_top{ width: 100%; height: 49%; - border: 1px solid red; margin-bottom: 4%; } .left_bottom{ width: 100%; height: 49%; - border: 1px solid red; } } .middle{ + display: flex; + flex-direction: column; width: 50.5%; height: 100%; - border: 1px solid red; + .middle_top{ + display: flex; + justify-content: space-between; + flex-wrap: nowrap; + flex: 2; + width: 100%; + padding-bottom: 20px; + .important_data{ + width: 14%; + height: 100%; + border: 1px solid #fff; + } + .my3D_img{ + width: 72%; + height: 100%; + border: 1px solid #fff; + } + } + .middle_bottom{ + display: flex; + justify-content: space-between; + flex-wrap: nowrap; + flex: 1; + width: 100%; + .chart_box{ + width: 49.5%; + height: 100%; + } + .wendu_box{ + display: flex; + justify-content: space-between; + flex-wrap: wrap; + width: 49%; + height: 100%; + .item{ + width: 24%; + height: 48.5%; + background-color: #1ab394; + &:first-child{ + margin-bottom: 8px; + } + } + } + } } .right{ width: 24%; height: 100%; .right_top{ + display: flex; + flex-direction: column; width: 100%; height: 49%; - border: 1px solid red; margin-bottom: 4%; } .right_bottom{ width: 100%; height: 49%; - border: 1px solid red; } } } @@ -101,7 +205,8 @@ .title{ width: 45%; height: 30px; - margin: 0 auto; + line-height: 30px; + margin: 0 auto 20px auto; color: #19C3F4; font-size: 18px; font-weight: bold; @@ -109,5 +214,39 @@ background-image: url("../../assets/images/wrappertitle.png"); background-size: 100% 100%; } +.info_box{ + display: flex; + width: 100%; + height: 44%; + padding: 10px; + .dev_img{ + width: 50%; + height: 100%; + border: 1px solid #fff; + img{ + width: 100%; + height: 100%; + } + } + .dev_data{ + width: 50%; + height: 100%; + border: 1px solid #fff; + } +} +.chart_box{ + width: 100%; + height: 44%; + padding: 0 10px 10px 10px; + .dev_chart{ + width: 100%; + height: 100%; + border: 1px solid #fff; + } +} +.bgimg{ + background-image: url("../../assets/images/wrapperbox.png"); + background-size: 100% 100%; +} diff --git a/psdc-ui/src/views/login.vue b/psdc-ui/src/views/login.vue index 1f89f9e..dd83af4 100644 --- a/psdc-ui/src/views/login.vue +++ b/psdc-ui/src/views/login.vue @@ -119,7 +119,7 @@ function handleLogin() { } // 调用action的登录方法 userStore.login(loginForm.value).then(() => { - router.push({ path: redirect.value || "/" }); + router.push({ path: redirect.value || "bigview" }); }).catch(() => { loading.value = false; // 重新获取验证码 diff --git a/psdc-web/src/main/java/com/psdc/controller/index/Index.java b/psdc-web/src/main/java/com/psdc/controller/index/Index.java index 760e1c9..788b229 100644 --- a/psdc-web/src/main/java/com/psdc/controller/index/Index.java +++ b/psdc-web/src/main/java/com/psdc/controller/index/Index.java @@ -1,4 +1,34 @@ package com.psdc.controller.index; +import com.psdc.core.domain.AjaxResult; +import com.psdc.service.IPsdcThermometerHtdataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("/api/indexLook") public class Index { + + @Autowired + IPsdcThermometerHtdataService psdcThermometerHtdataService; + + @RequestMapping(value = "/devicesInfo", method = RequestMethod.GET) + public AjaxResult selData() { + return psdcThermometerHtdataService.selTodayThermometer(); + } + + @RequestMapping(value = "/8wd", method = RequestMethod.GET) + public AjaxResult sel8WenDu() { + return psdcThermometerHtdataService.sel8WnDu(); + } + + @RequestMapping(value = "/zdb", method = RequestMethod.GET) + public AjaxResult selzdb() { + return psdcThermometerHtdataService.selTotalElectricityInfo(); + } + }