From 0183f4e6fd3ab6b1aa053200d36e06f60ddc9ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sat, 5 Apr 2025 12:44:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/constant/ApiConstants.java | 14 + .../yanzhu/common/core/enums/IsDelEnums.java | 12 +- .../yanzhu/device/domain/DevIotConfig.java | 26 +- .../device/domain/DevIotConfigPoint.java | 26 +- .../com/yanzhu/device/domain/DevIotDatas.java | 26 +- .../yanzhu/device/domain/DevIotWarning.java | 26 +- .../mapper/device/DevIotConfigMapper.xml | 36 +- .../mapper/device/DevIotConfigPointMapper.xml | 41 +- .../mapper/device/DevIotDatasMapper.xml | 24 +- .../mapper/device/DevIotWarningMapper.xml | 26 +- .../com/yanzhu/job/task/SadaHzDataTask.java | 36 +- .../device/DevIotConfigController.java | 133 +++++- .../impl/DevIotConfigPointServiceImpl.java | 3 + .../service/impl/DevIotConfigServiceImpl.java | 26 + .../service/impl/DevIotDatasServiceImpl.java | 3 + .../impl/DevIotWarningServiceImpl.java | 3 + yanzhu-ui-vue3/src/App.vue | 28 ++ yanzhu-ui-vue3/src/api/device/iotConfig.js | 8 + .../src/components/CurrentProject/index.vue | 18 +- yanzhu-ui-vue3/src/directive/index.js | 2 + .../src/directive/permission/notHasPermi.js | 28 ++ yanzhu-ui-vue3/src/plugins/auth.js | 4 + .../src/views/device/iotConfig/index.vue | 276 ++++++++--- .../src/views/device/iotConfigPoint/index.vue | 445 +++++++++++++----- .../src/views/device/iotDatas/index.vue | 93 ++-- .../src/views/device/iotWarning/index.vue | 61 +-- .../src/views/manage/busExamUser/index.vue | 9 +- .../views/manage/busTrainingVideo/index.vue | 6 - .../manage/proProjectInfoSubdepts/index.vue | 8 - .../proProjectInfoSubdeptsGroup/index.vue | 10 +- 30 files changed, 1072 insertions(+), 385 deletions(-) create mode 100644 yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/constant/ApiConstants.java create mode 100644 yanzhu-ui-vue3/src/directive/permission/notHasPermi.js diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/constant/ApiConstants.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/constant/ApiConstants.java new file mode 100644 index 00000000..b72e81d7 --- /dev/null +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/constant/ApiConstants.java @@ -0,0 +1,14 @@ +package com.yanzhu.common.core.constant; + +/** + * 接口通讯信息 + * + * @author ruoyi + */ +public class ApiConstants { + + /** + * IOT配电箱数据获取HOST&&萨达 + */ + public static final String IOT_SD_HOST = "https://api.e.v1.i-sada.net"; +} diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/IsDelEnums.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/IsDelEnums.java index ca38dfb8..8bbbf8b1 100644 --- a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/IsDelEnums.java +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/IsDelEnums.java @@ -7,15 +7,17 @@ package com.yanzhu.common.core.enums; */ public enum IsDelEnums { - NO(0L, "有效"), - YES(1L, "删除"); + NO(0L, "0","有效"), + YES(1L, "1", "删除"); private final Long code; + private final String codeStr; private final String info; - IsDelEnums(Long code, String info) + IsDelEnums(Long code, String codeStr, String info) { this.code = code; + this.codeStr = codeStr; this.info = info; } @@ -28,4 +30,8 @@ public enum IsDelEnums { { return info; } + + public String getCodeStr() { + return codeStr; + } } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java index 734e669e..ede6fd80 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java @@ -19,13 +19,19 @@ public class DevIotConfig extends BaseEntity private Long id; /** 公司主键 */ - @Excel(name = "公司主键") private Long comId; + /** 公司名称 */ + @Excel(name = "公司名称") + private String comName; + /** 项目主键 */ - @Excel(name = "项目主键") private Long projectId; + /** 项目名称 */ + @Excel(name = "项目名称") + private String projectName; + /** 通信账号 */ @Excel(name = "通信账号") private String signalName; @@ -106,6 +112,22 @@ public class DevIotConfig extends BaseEntity return isDel; } + public String getComName() { + return comName; + } + + public void setComName(String comName) { + this.comName = comName; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java index db933e67..0463b856 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java @@ -23,13 +23,19 @@ public class DevIotConfigPoint extends BaseEntity private Long cfgId; /** 公司主键 */ - @Excel(name = "公司主键") private Long comId; + /** 公司名称 */ + @Excel(name = "公司名称") + private String comName; + /** 项目主键 */ - @Excel(name = "项目主键") private Long projectId; + /** 项目名称 */ + @Excel(name = "项目名称") + private String projectName; + /** 设备序列号 */ @Excel(name = "设备序列号") private String deviceSn; @@ -236,6 +242,22 @@ public class DevIotConfigPoint extends BaseEntity return isDel; } + public String getComName() { + return comName; + } + + public void setComName(String comName) { + this.comName = comName; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java index 1acf1929..ae101a9e 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java @@ -27,13 +27,19 @@ public class DevIotDatas extends BaseEntity private Long pointId; /** 公司主键 */ - @Excel(name = "公司主键") private Long comId; + /** 公司名称 */ + @Excel(name = "公司名称") + private String comName; + /** 项目主键 */ - @Excel(name = "项目主键") private Long projectId; + /** 项目名称 */ + @Excel(name = "项目名称") + private String projectName; + /** 设备序列号 */ @Excel(name = "设备序列号") private String deviceSn; @@ -444,6 +450,22 @@ public class DevIotDatas extends BaseEntity return frequencyC; } + public String getComName() { + return comName; + } + + public void setComName(String comName) { + this.comName = comName; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java index 06e58205..562064c5 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java @@ -27,13 +27,19 @@ public class DevIotWarning extends BaseEntity private Long pointId; /** 公司主键 */ - @Excel(name = "公司主键") private Long comId; + /** 公司名称 */ + @Excel(name = "公司名称") + private String comName; + /** 项目主键 */ - @Excel(name = "项目主键") private Long projectId; + /** 项目名称 */ + @Excel(name = "项目名称") + private String projectName; + /** 设备序列号 */ @Excel(name = "设备序列号") private String deviceSn; @@ -119,6 +125,22 @@ public class DevIotWarning extends BaseEntity return warningContent; } + public String getComName() { + return comName; + } + + public void setComName(String comName) { + this.comName = comName; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml index 6206a28d..174059ed 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml @@ -7,7 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -20,24 +22,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, com_id, project_id, signal_name, signal_code, factory_name, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config + select dic.id, dic.com_id, dic.project_id, sd.dept_name as com_name, pi.project_name, dic.signal_name, dic.signal_code, dic.factory_name, dic.is_del, dic.create_by, dic.create_time, dic.update_by, dic.update_time, dic.remark from dev_iot_config dic + left join pro_project_info pi on pi.id = dic.project_id + left join sys_dept sd on sd.dept_id = dic.com_id - and com_id = #{comId} - and project_id = #{projectId} - and signal_name like concat('%', #{signalName}, '%') - and signal_code = #{signalCode} - and factory_name like concat('%', #{factoryName}, '%') - and is_del = #{isDel} + and dic.com_id = #{comId} + and dic.project_id = #{projectId} + and dic.com_id = #{activeComId} + and dic.project_id = #{activeProjectId} + and dic.signal_name = #{signalName} + and dic.signal_code = #{signalCode} + and dic.factory_name = #{factoryName} + and dic.is_del = #{isDel} + and dic.is_del != '2' + order by dic.id desc - where id = #{id} + where dic.id = #{id} @@ -88,14 +96,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from dev_iot_config where id = #{id} - + + update dev_iot_config set is_del = '2' where id = #{id} + - - delete from dev_iot_config where id in + + update dev_iot_config set is_del = '2' where id in #{id} - + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml index fc80a919..15b1a287 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml @@ -8,7 +8,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -30,26 +32,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, cfg_id, com_id, project_id, device_sn, device_name, factory_name, contact_person, contact_person_phone, levels, leakage_current, rated_temperature, short_circuit_current, rated_current, rated_voltage, online_status, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config_point + select dicp.id, dicp.cfg_id, dicp.com_id, dicp.project_id, sd.dept_name as com_name, pi.project_name, dicp.device_sn, dicp.device_name, dicp.factory_name, dicp.contact_person, dicp.contact_person_phone, dicp.levels, dicp.leakage_current, dicp.rated_temperature, + dicp.short_circuit_current, dicp.rated_current, dicp.rated_voltage, dicp.online_status, dicp.is_del, dicp.create_by, dicp.create_time, dicp.update_by, dicp.update_time, dicp.remark from dev_iot_config_point dicp + left join pro_project_info pi on pi.id = dicp.project_id + left join sys_dept sd on sd.dept_id = dicp.com_id - and cfg_id = #{cfgId} - and com_id = #{comId} - and project_id = #{projectId} - and device_sn = #{deviceSn} - and device_name like concat('%', #{deviceName}, '%') - and factory_name like concat('%', #{factoryName}, '%') - and online_status = #{onlineStatus} - and is_del = #{isDel} + and dicp.cfg_id = #{cfgId} + and dicp.com_id = #{comId} + and dicp.project_id = #{projectId} + and dicp.com_id = #{activeComId} + and dicp.project_id = #{activeProjectId} + and dicp.device_sn = #{deviceSn} + and dicp.device_name like concat('%', #{deviceName}, '%') + and dicp.factory_name = #{factoryName} + and dicp.online_status = #{onlineStatus} + and dicp.is_del = #{isDel} + and dicp.is_del != '2' + order by dicp.id desc - where id = #{id} + where dicp.id = #{id} @@ -130,14 +139,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from dev_iot_config_point where id = #{id} - + + update dev_iot_config_point set is_del = '2' where id = #{id} + - - delete from dev_iot_config_point where id in + + update dev_iot_config_point set is_del = '2' where id in #{id} - + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml index 75145021..05e3db7c 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml @@ -9,7 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -42,24 +44,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, cfg_id, point_id, com_id, project_id, device_sn, switches_ac, switches_switch, switches_switches, switches_switchStatus, temperature, leakage, voltage_a, voltage_b, voltage_c, voltage_ab, voltage_bc, voltage_ca, current_a, current_b, current_c, power_a, power_b, power_c, energy_a, energy_b, energy_c, factor_a, factor_b, factor_c, frequency_a, frequency_b, frequency_c, create_time from dev_iot_datas + select did.id, did.cfg_id, did.point_id, did.com_id, did.project_id, sd.dept_name as com_name, pi.project_name, did.device_sn, did.switches_ac, did.switches_switch, did.switches_switches, did.switches_switchStatus, did.temperature, did.leakage, did.voltage_a, did.voltage_b, did.voltage_c, did.voltage_ab, did.voltage_bc, did.voltage_ca, did.current_a, did.current_b, did.current_c, did.power_a, power_b, power_c, + did.energy_a, did.energy_b, did.energy_c, did.factor_a, did.factor_b, did.factor_c, did.frequency_a, did.frequency_b, did.frequency_c, did.create_time from dev_iot_datas did + left join pro_project_info pi on pi.id = did.project_id + left join sys_dept sd on sd.dept_id = did.com_id - and cfg_id = #{cfgId} - and point_id = #{pointId} - and com_id = #{comId} - and project_id = #{projectId} - and device_sn = #{deviceSn} - and create_time between #{params.beginCreateTime} and #{params.endCreateTime} + and did.cfg_id = #{cfgId} + and did.point_id = #{pointId} + and did.com_id = #{comId} + and did.project_id = #{projectId} + and did.com_id = #{activeComId} + and did.project_id = #{activeProjectId} + and did.device_sn = #{deviceSn} + and did.create_time between #{params.beginCreateTime} and #{params.endCreateTime} + order by did.id desc - where id = #{id} + where did.id = #{id} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml index 6d65035d..d8de34bb 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml @@ -9,7 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -17,25 +19,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, cfg_id, point_id, com_id, project_id, device_sn, warning_type, warning_content, create_time from dev_iot_warning + select diw.id, diw.cfg_id, diw.point_id, diw.com_id, diw.project_id, sd.dept_name as com_name, pi.project_name, diw.device_sn, diw.warning_type, diw.warning_content, diw.create_time from dev_iot_warning diw + left join pro_project_info pi on pi.id = diw.project_id + left join sys_dept sd on sd.dept_id = diw.com_id - and cfg_id = #{cfgId} - and point_id = #{pointId} - and com_id = #{comId} - and project_id = #{projectId} - and device_sn = #{deviceSn} - and warning_type = #{warningType} - and warning_content = #{warningContent} + and diw.cfg_id = #{cfgId} + and diw.point_id = #{pointId} + and diw.com_id = #{comId} + and diw.project_id = #{projectId} + and diw.com_id = #{activeComId} + and diw.project_id = #{activeProjectId} + and diw.device_sn = #{deviceSn} + and diw.warning_type = #{warningType} + and diw.warning_content = #{warningContent} + and diw.create_time between #{params.beginCreateTime} and #{params.endCreateTime} + order by diw.id desc - where id = #{id} + where diw.id = #{id} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java index 9a491582..6aa0675c 100644 --- a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java @@ -3,6 +3,7 @@ package com.yanzhu.job.task; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSON; +import com.yanzhu.common.core.constant.ApiConstants; import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.core.utils.http.HttpUtils; @@ -13,7 +14,6 @@ import com.yanzhu.job.service.IDevIotService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.util.*; @@ -35,12 +35,8 @@ public class SadaHzDataTask { private static final Logger log = LoggerFactory.getLogger(SadaHzDataTask.class); /** - * IOT配电箱数据获取HOST&&萨达 + * 获取配电箱点位 */ - public static final String SD_HOST = "https://api.e.v1.i-sada.net"; - - public static String SD_TOKEN = ""; - public void getIotConfigPoint() { List> configs = devIotService.selectDevIotConfigList(); if(configs.size()>0){ @@ -51,13 +47,18 @@ public class SadaHzDataTask { String signalCode = Convert.toStr(configMap.get("signal_code")); String projectName = Convert.toStr(configMap.get("project_name")); String projectHashId = getSaDaProjectHashIds(signalName,signalCode,projectName); - // 根据项目主键,查询设备信息 - findSaDaBoxByProjectHashId(configMap,projectHashId); + if(StringUtils.isNotEmpty(projectHashId)){ + // 根据项目主键,查询设备信息 + findSaDaBoxByProjectHashId(configMap,projectHashId); + } } } } } + /** + * 获取配电箱数据/预警 + */ public void getIotPowerDatas() { DevIotConfigPoint pointQuery = new DevIotConfigPoint(); pointQuery.setIsDel("0"); @@ -67,7 +68,7 @@ public class SadaHzDataTask { // 判断是萨达设备 if(StringUtils.eqObj(configPoint.getFactoryName(),"SD")){ if(StringUtils.isNotEmpty(configPoint.getDeviceSn())){ - String resStr = HttpUtils.sendGet(SD_HOST + "/metric/box/"+configPoint.getDeviceSn()); + String resStr = HttpUtils.sendGet(ApiConstants.IOT_SD_HOST + "/metric/box/"+configPoint.getDeviceSn()); JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result"); // 开关检测数据 JSONObject switches = result.getJSONObject("switches"); @@ -168,14 +169,20 @@ public class SadaHzDataTask { } } + /** + * 获取项目配置HashIds + * @param signalName + * @param signalCode + * @param proName + * @return + */ private static String getSaDaProjectHashIds(String signalName, String signalCode, String proName){ try { Map params = new HashMap<>(); params.put("username",signalName); params.put("password",signalCode); - String resStr = HttpUtils.sendPost(SD_HOST+"/v2/api-token-auth", JSON.toJSONString(params)); + String resStr = HttpUtils.sendPost(ApiConstants.IOT_SD_HOST+"/v2/api-token-auth", JSON.toJSONString(params)); JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result"); - SD_TOKEN = result.getString("token"); JSONObject accountJson = result.getJSONObject("account"); if(StringUtils.isNotEmpty(accountJson.getString("canViewProjects"))){ JSONArray canProjects = accountJson.getJSONArray("canViewProjects"); @@ -200,10 +207,15 @@ public class SadaHzDataTask { return null; } + /** + * 获取项目设备 + * @param devIotConfig + * @param proHashId + */ private void findSaDaBoxByProjectHashId(Map configMap, String proHashId){ try { Long cfgId = Convert.toLong(configMap.get("id")); - String resStr = HttpUtils.sendGet(SD_HOST+"/box/project/"+proHashId); + String resStr = HttpUtils.sendGet(ApiConstants.IOT_SD_HOST+"/box/project/"+proHashId); JSONArray result = JSONObject.parseObject(resStr).getJSONArray("result"); if(result.size()>0){ DevIotConfigPoint pointQuery = new DevIotConfigPoint(); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java index 4f62f887..b1baf11e 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java @@ -1,5 +1,13 @@ package com.yanzhu.manage.controller.device; +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; +import com.yanzhu.common.core.constant.ApiConstants; +import com.yanzhu.common.core.enums.IsDelEnums; +import com.yanzhu.common.core.text.Convert; +import com.yanzhu.common.core.utils.StringUtils; +import com.yanzhu.common.core.utils.http.HttpUtils; import com.yanzhu.common.core.utils.poi.ExcelUtil; import com.yanzhu.common.core.web.controller.BaseController; import com.yanzhu.common.core.web.domain.AjaxResult; @@ -8,12 +16,17 @@ import com.yanzhu.common.log.annotation.Log; import com.yanzhu.common.log.enums.BusinessType; import com.yanzhu.common.security.annotation.RequiresPermissions; import com.yanzhu.device.domain.DevIotConfig; +import com.yanzhu.device.domain.DevIotConfigPoint; +import com.yanzhu.manage.service.IDevIotConfigPointService; import com.yanzhu.manage.service.IDevIotConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 配电箱配置Controller @@ -28,6 +41,9 @@ public class DevIotConfigController extends BaseController @Autowired private IDevIotConfigService devIotConfigService; + @Autowired + private IDevIotConfigPointService devIotConfigPointService; + /** * 查询配电箱配置列表 */ @@ -71,7 +87,12 @@ public class DevIotConfigController extends BaseController @PostMapping public AjaxResult add(@RequestBody DevIotConfig devIotConfig) { - return toAjax(devIotConfigService.insertDevIotConfig(devIotConfig)); + int res = devIotConfigService.insertDevIotConfig(devIotConfig); + if(res>0){ + return success(devIotConfig); + }else{ + return error(); + } } /** @@ -95,4 +116,114 @@ public class DevIotConfigController extends BaseController { return toAjax(devIotConfigService.deleteDevIotConfigByIds(ids)); } + + /** + * 获取配电箱配的点位信息 + * @return + */ + @RequiresPermissions("manage:iotConfig:query") + @GetMapping(value = "/findIotConfigPoint/{id}") + public AjaxResult findIotConfigPoint(@PathVariable("id") Long id) { + DevIotConfig devIotConfig = devIotConfigService.selectDevIotConfigById(id); + String projectHashId = getSaDaProjectHashIds(devIotConfig.getSignalName(),devIotConfig.getSignalCode(), devIotConfig.getProjectName()); + if(StringUtils.isNotEmpty(projectHashId)){ + devIotConfig.setIsDel(IsDelEnums.NO.getCodeStr()); + devIotConfigService.updateDevIotConfig(devIotConfig); + // 根据项目主键,查询设备信息 + findSaDaBoxByProjectHashId(devIotConfig,projectHashId); + return success(); + }else{ + return error(); + } + } + + /** + * 获取项目配置HashIds + * @param signalName + * @param signalCode + * @param proName + * @return + */ + private static String getSaDaProjectHashIds(String signalName, String signalCode, String proName){ + try { + Map params = new HashMap<>(); + params.put("username",signalName); + params.put("password",signalCode); + String resStr = HttpUtils.sendPost(ApiConstants.IOT_SD_HOST+"/v2/api-token-auth", JSON.toJSONString(params)); + JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result"); + JSONObject accountJson = result.getJSONObject("account"); + if(StringUtils.isNotEmpty(accountJson.getString("canViewProjects"))){ + JSONArray canProjects = accountJson.getJSONArray("canViewProjects"); + if(canProjects.size()>0){ + // 使用 forEach 和 Lambda 遍历 + for(Object item:canProjects){ + JSONObject obj = (JSONObject) item; + if(StringUtils.eqObj(obj.getString("name"),proName)){ + return obj.getString("hashId"); + } + } + return accountJson.getJSONObject("currentProject").getString("hashId"); + }else{ + return accountJson.getJSONObject("currentProject").getString("hashId"); + } + }else{ + return accountJson.getJSONObject("currentProject").getString("hashId"); + } + }catch (Exception e){ + e.printStackTrace(); + } + return null; + } + + /** + * 获取项目设备 + * @param devIotConfig + * @param proHashId + */ + private void findSaDaBoxByProjectHashId(DevIotConfig devIotConfig, String proHashId){ + try { + String resStr = HttpUtils.sendGet(ApiConstants.IOT_SD_HOST+"/box/project/"+proHashId); + JSONArray result = JSONObject.parseObject(resStr).getJSONArray("result"); + if(result.size()>0){ + DevIotConfigPoint pointQuery = new DevIotConfigPoint(); + pointQuery.setCfgId(devIotConfig.getId()); + List pointList = devIotConfigPointService.selectDevIotConfigPointList(pointQuery); + result.forEach(item -> { + JSONObject obj = (JSONObject) item; + List pointItems = pointList.stream().filter(point -> StringUtils.eqObj(point.getDeviceSn(),obj.getString("hashId"))).collect(Collectors.toList()); + if(pointItems.size()>0){ + DevIotConfigPoint devIotConfigPoint = pointItems.get(0); + devIotConfigPoint.setDeviceName(obj.getString("name")); + devIotConfigPoint.setFactoryName(devIotConfig.getFactoryName()); + devIotConfigPoint.setLevels(obj.getString("level")); + devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent")); + devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature")); + devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent")); + devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent")); + devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage")); + devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus")); + devIotConfigPointService.updateDevIotConfigPoint(devIotConfigPoint); + }else{ + DevIotConfigPoint devIotConfigPoint = new DevIotConfigPoint(); + devIotConfigPoint.setCfgId(devIotConfig.getId()); + devIotConfigPoint.setComId(devIotConfig.getComId()); + devIotConfigPoint.setProjectId(devIotConfig.getProjectId()); + devIotConfigPoint.setDeviceSn(obj.getString("hashId")); + devIotConfigPoint.setDeviceName(obj.getString("name")); + devIotConfigPoint.setFactoryName(devIotConfig.getFactoryName()); + devIotConfigPoint.setLevels(obj.getString("level")); + devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent")); + devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature")); + devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent")); + devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent")); + devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage")); + devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus")); + devIotConfigPointService.insertDevIotConfigPoint(devIotConfigPoint); + } + }); + } + }catch (Exception e){ + e.printStackTrace(); + } + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java index d3c75e1e..a0657050 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java @@ -3,6 +3,7 @@ package com.yanzhu.manage.service.impl; import java.util.List; import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.device.domain.DevIotConfigPoint; import com.yanzhu.device.mapper.DevIotConfigPointMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +43,8 @@ public class DevIotConfigPointServiceImpl implements IDevIotConfigPointService @Override public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint) { + devIotConfigPoint.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId()); + devIotConfigPoint.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId()); return devIotConfigPointMapper.selectDevIotConfigPointList(devIotConfigPoint); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java index a7370fe6..b1454f92 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java @@ -2,7 +2,10 @@ package com.yanzhu.manage.service.impl; import java.util.List; import com.yanzhu.common.core.context.SecurityContextHolder; +import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.core.utils.StringUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.device.domain.DevIotConfig; import com.yanzhu.device.mapper.DevIotConfigMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +45,8 @@ public class DevIotConfigServiceImpl implements IDevIotConfigService @Override public List selectDevIotConfigList(DevIotConfig devIotConfig) { + devIotConfig.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId()); + devIotConfig.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId()); return devIotConfigMapper.selectDevIotConfigList(devIotConfig); } @@ -54,6 +59,16 @@ public class DevIotConfigServiceImpl implements IDevIotConfigService @Override public int insertDevIotConfig(DevIotConfig devIotConfig) { + // 判断设备是否重复 + DevIotConfig configQuery = new DevIotConfig(); + configQuery.setProjectId(devIotConfig.getProjectId()); + configQuery.setSignalName(devIotConfig.getSignalName()); + configQuery.setSignalCode(devIotConfig.getSignalCode()); + List list = devIotConfigMapper.selectDevIotConfigList(configQuery); + if(list.size()>0){ + throw new ServiceException("配置信息重复添加!"); + } + devIotConfig.setIsDel("99"); devIotConfig.setCreateBy(SecurityContextHolder.getUserName()); devIotConfig.setCreateTime(DateUtils.getNowDate()); return devIotConfigMapper.insertDevIotConfig(devIotConfig); @@ -68,6 +83,17 @@ public class DevIotConfigServiceImpl implements IDevIotConfigService @Override public int updateDevIotConfig(DevIotConfig devIotConfig) { + // 判断设备是否重复 + if(StringUtils.isNotEmpty(devIotConfig.getSignalName()) && StringUtils.isNotEmpty(devIotConfig.getSignalCode())){ + DevIotConfig configQuery = new DevIotConfig(); + configQuery.setProjectId(devIotConfig.getProjectId()); + configQuery.setSignalName(devIotConfig.getSignalName()); + configQuery.setSignalCode(devIotConfig.getSignalCode()); + List list = devIotConfigMapper.selectDevIotConfigList(configQuery); + if(list.size()>0 && list.get(0).getId()!=devIotConfig.getId()){ + throw new ServiceException("配置信息重复添加!"); + } + } devIotConfig.setUpdateBy(SecurityContextHolder.getUserName()); devIotConfig.setUpdateTime(DateUtils.getNowDate()); return devIotConfigMapper.updateDevIotConfig(devIotConfig); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java index f7aefc73..a5a433e5 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java @@ -2,6 +2,7 @@ package com.yanzhu.manage.service.impl; import java.util.List; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.device.domain.DevIotDatas; import com.yanzhu.device.mapper.DevIotDatasMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -41,6 +42,8 @@ public class DevIotDatasServiceImpl implements IDevIotDatasService @Override public List selectDevIotDatasList(DevIotDatas devIotDatas) { + devIotDatas.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId()); + devIotDatas.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId()); return devIotDatasMapper.selectDevIotDatasList(devIotDatas); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java index 1a167269..70801483 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java @@ -2,6 +2,7 @@ package com.yanzhu.manage.service.impl; import java.util.List; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.device.domain.DevIotWarning; import com.yanzhu.device.mapper.DevIotWarningMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -41,6 +42,8 @@ public class DevIotWarningServiceImpl implements IDevIotWarningService @Override public List selectDevIotWarningList(DevIotWarning devIotWarning) { + devIotWarning.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId()); + devIotWarning.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId()); return devIotWarningMapper.selectDevIotWarningList(devIotWarning); } diff --git a/yanzhu-ui-vue3/src/App.vue b/yanzhu-ui-vue3/src/App.vue index 522e4201..6e2b68bc 100644 --- a/yanzhu-ui-vue3/src/App.vue +++ b/yanzhu-ui-vue3/src/App.vue @@ -70,4 +70,32 @@ onMounted(() => { .command{ cursor: pointer; } +.el-dialog__body{ + max-height: 720px !important; + overflow-y: scroll !important; + .el-form{ + margin-right: 15px !important; + } +} +/* 自定义垂直滚动条 */ +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-track { + background-color: #FFF3EAEE !important; +} + +::-webkit-scrollbar-thumb { + background-color: #FF990088 !important; + border-radius: 8px !important; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #FF9900EE !important; +} + +.anchorBL{ + display:none !important; +} \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/api/device/iotConfig.js b/yanzhu-ui-vue3/src/api/device/iotConfig.js index 6872fe49..f5bdfcaf 100644 --- a/yanzhu-ui-vue3/src/api/device/iotConfig.js +++ b/yanzhu-ui-vue3/src/api/device/iotConfig.js @@ -17,6 +17,14 @@ export function getIotConfig(id) { }) } +// 配电箱配的点位信息 +export function findIotConfigPoint(id) { + return request({ + url: '/manage/iotConfig/findIotConfigPoint/' + id, + method: 'get' + }) +} + // 新增配电箱配置 export function addIotConfig(data) { return request({ diff --git a/yanzhu-ui-vue3/src/components/CurrentProject/index.vue b/yanzhu-ui-vue3/src/components/CurrentProject/index.vue index 22e9f0b6..33cdb316 100644 --- a/yanzhu-ui-vue3/src/components/CurrentProject/index.vue +++ b/yanzhu-ui-vue3/src/components/CurrentProject/index.vue @@ -3,7 +3,7 @@ {{userStore.currentPrjId?userStore.currentProName:'所有项目'}} - + - \ No newline at end of file + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/directive/index.js b/yanzhu-ui-vue3/src/directive/index.js index 86b8f88a..cb468a5e 100644 --- a/yanzhu-ui-vue3/src/directive/index.js +++ b/yanzhu-ui-vue3/src/directive/index.js @@ -1,9 +1,11 @@ import hasRole from './permission/hasRole' import hasPermi from './permission/hasPermi' +import notHasPermi from './permission/notHasPermi' import copyText from './common/copyText' export default function directive(app){ app.directive('hasRole', hasRole) app.directive('hasPermi', hasPermi) + app.directive('notHasPermi', notHasPermi) app.directive('copyText', copyText) } \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/directive/permission/notHasPermi.js b/yanzhu-ui-vue3/src/directive/permission/notHasPermi.js new file mode 100644 index 00000000..b645fb5e --- /dev/null +++ b/yanzhu-ui-vue3/src/directive/permission/notHasPermi.js @@ -0,0 +1,28 @@ + /** + * v-hasPermi 操作权限处理 + * Copyright (c) 2019 ruoyi + */ + +import useUserStore from '@/store/modules/user' + +export default { + mounted(el, binding, vnode) { + const { value } = binding + const all_permission = "*:*:*"; + const permissions = useUserStore().permissions + + if (value && value instanceof Array && value.length > 0) { + const permissionFlag = value + + const hasPermissions = permissions.some(permission => { + return !(all_permission === permission || permissionFlag.includes(permission)) + }) + + if (!hasPermissions) { + el.parentNode && el.parentNode.removeChild(el) + } + } else { + throw new Error(`请设置操作权限标签值`) + } + } +} diff --git a/yanzhu-ui-vue3/src/plugins/auth.js b/yanzhu-ui-vue3/src/plugins/auth.js index 5e8c28de..3e029407 100644 --- a/yanzhu-ui-vue3/src/plugins/auth.js +++ b/yanzhu-ui-vue3/src/plugins/auth.js @@ -29,6 +29,10 @@ export default { hasPermi(permission) { return authPermission(permission); }, + // 验证用户是否不具备某权限 + notHasPermi(permission) { + return !authPermission(permission); + }, // 验证用户是否含有指定权限,只需包含其中一个 hasPermiOr(permissions) { return permissions.some(item => { diff --git a/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue b/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue index 12d6ec0e..7d0ee8a7 100644 --- a/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue +++ b/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue @@ -1,6 +1,12 @@ - + - + 新增 + >新增 修改 + >修改 删除 + >删除 导出 + >导出 - + + 刷新设备 + + - + + + 1、新增的配置自动刷新设备。 + 2、修改配置后手动刷新设备或等待设备心跳后更新点位。 + 3、初始化失败的配置,常见原因为通信账号、通信密码不匹配! + + + - - - + - 修改 - 删除 + + + + + + + + + 初始化失败 + + + + + + 初始化失败 + + + + + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} + + + + + 修改 + 删除 - + - + - - - - - + + {{ form.projectName }} - + - + - - - - - - - - + + + + @@ -127,13 +229,23 @@ diff --git a/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue b/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue index 07bdd494..3fff0cff 100644 --- a/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue +++ b/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue @@ -9,39 +9,15 @@ @keyup.enter="handleQuery" /> - - - - - - - - - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - 修改 + {{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }} + + + + + 修改 删除 diff --git a/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue b/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue index 1e3ea7f3..8cc39b75 100644 --- a/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue +++ b/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue @@ -9,45 +9,31 @@ @keyup.enter="handleQuery" /> - - - - - - - - - - + + + + 搜索 重置 - + - - - - - - - - + + + + - 修改 + 修改 删除 @@ -163,6 +145,7 @@ const single = ref(true); const multiple = ref(true); const total = ref(0); const title = ref(""); +const daterangeCreateTime = ref([]); const data = reactive({ form: {}, @@ -186,6 +169,11 @@ const { queryParams, form, rules } = toRefs(data); /** 查询配电箱预警列表 */ function getList() { loading.value = true; + queryParams.value.params = {}; + if (null != daterangeCreateTime && '' != daterangeCreateTime) { + queryParams.value.params["beginCreateTime"] = daterangeCreateTime.value[0]; + queryParams.value.params["endCreateTime"] = daterangeCreateTime.value[1]; + } listIotWarning(queryParams.value).then(response => { iotWarningList.value = response.rows; total.value = response.total; @@ -217,6 +205,7 @@ function reset() { /** 搜索按钮操作 */ function handleQuery() { + daterangeCreateTime.value = []; queryParams.value.pageNum = 1; getList(); } diff --git a/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue b/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue index 0de96819..12c79ed1 100644 --- a/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue @@ -156,7 +156,7 @@ /> - + @@ -468,13 +468,6 @@ getList(); color: #409eff; font-weight: 800; } -.busExamUserDlg{ - .el-dialog__body{ - margin-top: -25px; - overflow: auto; - max-height: 680px; - } -} .task_panel { text-align: center; margin-bottom: 20px; diff --git a/yanzhu-ui-vue3/src/views/manage/busTrainingVideo/index.vue b/yanzhu-ui-vue3/src/views/manage/busTrainingVideo/index.vue index 27beb498..3bec8571 100644 --- a/yanzhu-ui-vue3/src/views/manage/busTrainingVideo/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/busTrainingVideo/index.vue @@ -543,12 +543,6 @@ getList(); margin:2px 3px; } } -.bus-training-video-dlg{ - .el-dialog__body{ - overflow: auto; - max-height: 680px; - } -} .bus-training-video-index{ .fitem-craft-type{ .el-select{ diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue index 5dd64c79..d49bedb4 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue @@ -206,7 +206,6 @@ v-model="open" width="680px" append-to-body - modal-class="SubdeptsDlg" > diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsGroup/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsGroup/index.vue index c202e8da..6fae8a4b 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsGroup/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsGroup/index.vue @@ -152,7 +152,7 @@ - + {{ leaderForm.projectName }} @@ -428,12 +428,4 @@ getList(); color: #409eff; font-weight: 800; } - -.SubdeptsDlg { - .el-dialog__body { - margin-top: -25px; - overflow: auto; - max-height: 680px; - } -} \ No newline at end of file