提交代码
parent
06ceddbd15
commit
f5c0d8e28a
|
@ -77,13 +77,45 @@ public class DevTowerDataWarning extends BaseEntity
|
||||||
@Excel(name = "预警内容")
|
@Excel(name = "预警内容")
|
||||||
private String warnNote;
|
private String warnNote;
|
||||||
|
|
||||||
/** 预警值 */
|
/** 当前高度 */
|
||||||
@Excel(name = "预警值")
|
@Excel(name = "当前高度")
|
||||||
private String warnData;
|
private String height;
|
||||||
|
|
||||||
/** 实际值 */
|
/** 当前幅度 */
|
||||||
@Excel(name = "实际值")
|
@Excel(name = "当前幅度")
|
||||||
private String realData;
|
private String range;
|
||||||
|
|
||||||
|
/** 回转 */
|
||||||
|
@Excel(name = "回转")
|
||||||
|
private String rotation;
|
||||||
|
|
||||||
|
/** 当前吊重 */
|
||||||
|
@Excel(name = "当前吊重")
|
||||||
|
private String load;
|
||||||
|
|
||||||
|
/** 风速 */
|
||||||
|
@Excel(name = "风速")
|
||||||
|
private String windSpeed;
|
||||||
|
|
||||||
|
/** 水平倾角 */
|
||||||
|
@Excel(name = "水平倾角")
|
||||||
|
private String leanAngleX;
|
||||||
|
|
||||||
|
/** 垂直倾角 */
|
||||||
|
@Excel(name = "垂直倾角")
|
||||||
|
private String leanAngleY;
|
||||||
|
|
||||||
|
/** 力矩百分比 */
|
||||||
|
@Excel(name = "力矩百分比")
|
||||||
|
private String momentPercent;
|
||||||
|
|
||||||
|
/** 报警标识 */
|
||||||
|
@Excel(name = "报警标识")
|
||||||
|
private Long alarmed;
|
||||||
|
|
||||||
|
/** 倍率 */
|
||||||
|
@Excel(name = "倍率")
|
||||||
|
private String rate;
|
||||||
|
|
||||||
/** 是否有效 */
|
/** 是否有效 */
|
||||||
@Excel(name = "是否有效")
|
@Excel(name = "是否有效")
|
||||||
|
@ -179,24 +211,79 @@ public class DevTowerDataWarning extends BaseEntity
|
||||||
{
|
{
|
||||||
return warnNote;
|
return warnNote;
|
||||||
}
|
}
|
||||||
public void setWarnData(String warnData)
|
|
||||||
{
|
public String getHeight() {
|
||||||
this.warnData = warnData;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getWarnData()
|
public void setHeight(String height) {
|
||||||
{
|
this.height = height;
|
||||||
return warnData;
|
|
||||||
}
|
|
||||||
public void setRealData(String realData)
|
|
||||||
{
|
|
||||||
this.realData = realData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRealData()
|
public String getRange() {
|
||||||
{
|
return range;
|
||||||
return realData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRange(String range) {
|
||||||
|
this.range = range;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRotation() {
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRotation(String rotation) {
|
||||||
|
this.rotation = rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoad() {
|
||||||
|
return load;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLoad(String load) {
|
||||||
|
this.load = load;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWindSpeed() {
|
||||||
|
return windSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWindSpeed(String windSpeed) {
|
||||||
|
this.windSpeed = windSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeanAngleX() {
|
||||||
|
return leanAngleX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeanAngleX(String leanAngleX) {
|
||||||
|
this.leanAngleX = leanAngleX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeanAngleY() {
|
||||||
|
return leanAngleY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeanAngleY(String leanAngleY) {
|
||||||
|
this.leanAngleY = leanAngleY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMomentPercent() {
|
||||||
|
return momentPercent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMomentPercent(String momentPercent) {
|
||||||
|
this.momentPercent = momentPercent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRate() {
|
||||||
|
return rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRate(String rate) {
|
||||||
|
this.rate = rate;
|
||||||
|
}
|
||||||
|
|
||||||
public void setIsDel(Long isDel)
|
public void setIsDel(Long isDel)
|
||||||
{
|
{
|
||||||
this.isDel = isDel;
|
this.isDel = isDel;
|
||||||
|
@ -215,6 +302,14 @@ public class DevTowerDataWarning extends BaseEntity
|
||||||
this.projectName = projectName;
|
this.projectName = projectName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getAlarmed() {
|
||||||
|
return alarmed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlarmed(Long alarmed) {
|
||||||
|
this.alarmed = alarmed;
|
||||||
|
}
|
||||||
|
|
||||||
public String getComName() {
|
public String getComName() {
|
||||||
return comName;
|
return comName;
|
||||||
}
|
}
|
||||||
|
@ -235,8 +330,6 @@ public class DevTowerDataWarning extends BaseEntity
|
||||||
.append("warnType", getWarnType())
|
.append("warnType", getWarnType())
|
||||||
.append("warnName", getWarnName())
|
.append("warnName", getWarnName())
|
||||||
.append("warnNote", getWarnNote())
|
.append("warnNote", getWarnNote())
|
||||||
.append("warnData", getWarnData())
|
|
||||||
.append("realData", getRealData())
|
|
||||||
.append("isDel", getIsDel())
|
.append("isDel", getIsDel())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
|
|
|
@ -19,8 +19,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="warnType" column="warn_type" />
|
<result property="warnType" column="warn_type" />
|
||||||
<result property="warnName" column="warn_name" />
|
<result property="warnName" column="warn_name" />
|
||||||
<result property="warnNote" column="warn_note" />
|
<result property="warnNote" column="warn_note" />
|
||||||
<result property="warnData" column="warn_data" />
|
<result property="height" column="height" />
|
||||||
<result property="realData" column="real_data" />
|
<result property="range" column="range" />
|
||||||
|
<result property="rotation" column="rotation" />
|
||||||
|
<result property="load" column="load" />
|
||||||
|
<result property="windSpeed" column="wind_speed" />
|
||||||
|
<result property="leanAngleX" column="lean_angle_x" />
|
||||||
|
<result property="leanAngleY" column="lean_angle_y" />
|
||||||
|
<result property="momentPercent" column="moment_percent" />
|
||||||
|
<result property="rate" column="rate" />
|
||||||
|
<result property="alarmed" column="alarmed" />
|
||||||
<result property="isDel" column="is_del" />
|
<result property="isDel" column="is_del" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
|
@ -42,8 +50,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
dtdw.warn_type,
|
dtdw.warn_type,
|
||||||
dtdw.warn_name,
|
dtdw.warn_name,
|
||||||
dtdw.warn_note,
|
dtdw.warn_note,
|
||||||
dtdw.warn_data,
|
dtdw.height,
|
||||||
dtdw.real_data,
|
dtdw.range,
|
||||||
|
dtdw.rotation,
|
||||||
|
dtdw.load,
|
||||||
|
dtdw.wind_speed,
|
||||||
|
dtdw.lean_angle_x,
|
||||||
|
dtdw.lean_angle_y,
|
||||||
|
dtdw.moment_percent,
|
||||||
|
dtdw.rate,
|
||||||
|
dtdw.alarmed,
|
||||||
dtdw.is_del,
|
dtdw.is_del,
|
||||||
dtdw.create_by,
|
dtdw.create_by,
|
||||||
dtdw.create_time,
|
dtdw.create_time,
|
||||||
|
@ -93,8 +109,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="warnType != null">warn_type,</if>
|
<if test="warnType != null">warn_type,</if>
|
||||||
<if test="warnName != null">warn_name,</if>
|
<if test="warnName != null">warn_name,</if>
|
||||||
<if test="warnNote != null">warn_note,</if>
|
<if test="warnNote != null">warn_note,</if>
|
||||||
<if test="warnData != null">warn_data,</if>
|
<if test="height != null">height,</if>
|
||||||
<if test="realData != null">real_data,</if>
|
<if test="range != null">`range`,</if>
|
||||||
|
<if test="rotation != null">rotation,</if>
|
||||||
|
<if test="load != null">`load`,</if>
|
||||||
|
<if test="windSpeed != null">wind_speed,</if>
|
||||||
|
<if test="leanAngleX != null">lean_angle_x,</if>
|
||||||
|
<if test="leanAngleY != null">lean_angle_y,</if>
|
||||||
|
<if test="momentPercent != null">moment_percent,</if>
|
||||||
|
<if test="rate != null">rate,</if>
|
||||||
|
<if test="alarmed != null">alarmed,</if>
|
||||||
<if test="isDel != null">is_del,</if>
|
<if test="isDel != null">is_del,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
|
@ -113,8 +137,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="warnType != null">#{warnType},</if>
|
<if test="warnType != null">#{warnType},</if>
|
||||||
<if test="warnName != null">#{warnName},</if>
|
<if test="warnName != null">#{warnName},</if>
|
||||||
<if test="warnNote != null">#{warnNote},</if>
|
<if test="warnNote != null">#{warnNote},</if>
|
||||||
<if test="warnData != null">#{warnData},</if>
|
<if test="height != null">#{height},</if>
|
||||||
<if test="realData != null">#{realData},</if>
|
<if test="range != null">#{range},</if>
|
||||||
|
<if test="rotation != null">#{rotation},</if>
|
||||||
|
<if test="load != null">#{load},</if>
|
||||||
|
<if test="windSpeed != null">#{windSpeed},</if>
|
||||||
|
<if test="leanAngleX != null">#{leanAngleX},</if>
|
||||||
|
<if test="leanAngleY != null">#{leanAngleY},</if>
|
||||||
|
<if test="momentPercent != null">#{momentPercent},</if>
|
||||||
|
<if test="rate != null">#{rate},</if>
|
||||||
|
<if test="alarmed != null">#{alarmed},</if>
|
||||||
<if test="isDel != null">#{isDel},</if>
|
<if test="isDel != null">#{isDel},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
@ -137,8 +169,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="warnType != null">warn_type = #{warnType},</if>
|
<if test="warnType != null">warn_type = #{warnType},</if>
|
||||||
<if test="warnName != null">warn_name = #{warnName},</if>
|
<if test="warnName != null">warn_name = #{warnName},</if>
|
||||||
<if test="warnNote != null">warn_note = #{warnNote},</if>
|
<if test="warnNote != null">warn_note = #{warnNote},</if>
|
||||||
<if test="warnData != null">warn_data = #{warnData},</if>
|
<if test="height != null">height = #{height},</if>
|
||||||
<if test="realData != null">real_data = #{realData},</if>
|
<if test="range != null">`range` = #{range},</if>
|
||||||
|
<if test="rotation != null">rotation = #{rotation},</if>
|
||||||
|
<if test="load != null">`load` = #{load},</if>
|
||||||
|
<if test="windSpeed != null">wind_speed = #{windSpeed},</if>
|
||||||
|
<if test="leanAngleX != null">lean_angle_x = #{leanAngleX},</if>
|
||||||
|
<if test="leanAngleY != null">lean_angle_y = #{leanAngleY},</if>
|
||||||
|
<if test="momentPercent != null">moment_percent = #{momentPercent},</if>
|
||||||
|
<if test="rate != null">rate = #{rate},</if>
|
||||||
|
<if test="alarmed != null">alarmed = #{alarmed},</if>
|
||||||
<if test="isDel != null">is_del = #{isDel},</if>
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class TowerCraneApiController {
|
||||||
List<String> warnings = (List<String>) dataContent.get("warnings");
|
List<String> warnings = (List<String>) dataContent.get("warnings");
|
||||||
devTowerDataRun.setWarnings(String.join(",", warnings));
|
devTowerDataRun.setWarnings(String.join(",", warnings));
|
||||||
for (String warning : warnings) {
|
for (String warning : warnings) {
|
||||||
pushWarningData(config, warning);
|
pushWarningData(config, warning, devTowerDataRun);
|
||||||
Integer alarm = Convert.toInt(warning);
|
Integer alarm = Convert.toInt(warning);
|
||||||
if (alarm > 100 && alarm < 120) {
|
if (alarm > 100 && alarm < 120) {
|
||||||
devTowerDataRun.setIsAlarm(1L);
|
devTowerDataRun.setIsAlarm(1L);
|
||||||
|
@ -213,7 +213,7 @@ public class TowerCraneApiController {
|
||||||
List<String> warnings = (List<String>) dataContent.get("warning");
|
List<String> warnings = (List<String>) dataContent.get("warning");
|
||||||
devTowerDataRound.setWarnings(String.join(",", warnings));
|
devTowerDataRound.setWarnings(String.join(",", warnings));
|
||||||
for (String warning : warnings) {
|
for (String warning : warnings) {
|
||||||
pushWarningData(config, warning);
|
pushWarningData(config, warning,null);
|
||||||
Integer alarm = Convert.toInt(warning);
|
Integer alarm = Convert.toInt(warning);
|
||||||
if (alarm > 6 && alarm < 10) {
|
if (alarm > 6 && alarm < 10) {
|
||||||
devTowerDataRound.setIsOverload(1L);
|
devTowerDataRound.setIsOverload(1L);
|
||||||
|
@ -232,13 +232,27 @@ public class TowerCraneApiController {
|
||||||
* @param config
|
* @param config
|
||||||
* @param warning
|
* @param warning
|
||||||
*/
|
*/
|
||||||
private void pushWarningData(DevTowerProjectConfig config, Object warning) {
|
private void pushWarningData(DevTowerProjectConfig config, Object warning, DevTowerDataRun devTowerDataRun) {
|
||||||
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
|
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
|
||||||
devTowerDataWarning.setCfgId(config.getId());
|
devTowerDataWarning.setCfgId(config.getId());
|
||||||
devTowerDataWarning.setProjectId(config.getProjectId());
|
devTowerDataWarning.setProjectId(config.getProjectId());
|
||||||
devTowerDataWarning.setComId(config.getComId());
|
devTowerDataWarning.setComId(config.getComId());
|
||||||
devTowerDataWarning.setDeviceKey(config.getDeviceSn());
|
devTowerDataWarning.setDeviceKey(config.getDeviceSn());
|
||||||
devTowerDataWarning.setWarnType(Convert.toLong(warning));
|
devTowerDataWarning.setWarnType(Convert.toLong(warning));
|
||||||
|
if(devTowerDataRun!=null){
|
||||||
|
devTowerDataWarning.setHeight(devTowerDataRun.getHeight());
|
||||||
|
devTowerDataWarning.setRange(devTowerDataRun.getRange());
|
||||||
|
devTowerDataWarning.setRotation(devTowerDataRun.getRotation());
|
||||||
|
devTowerDataWarning.setLoad(devTowerDataRun.getLoad());
|
||||||
|
devTowerDataWarning.setWindSpeed(devTowerDataRun.getWindSpeed());
|
||||||
|
devTowerDataWarning.setLeanAngleX(devTowerDataRun.getLeanAngleX());
|
||||||
|
devTowerDataWarning.setLeanAngleY(devTowerDataRun.getLeanAngleY());
|
||||||
|
devTowerDataWarning.setMomentPercent(devTowerDataRun.getMomentPercent());
|
||||||
|
devTowerDataWarning.setRate(devTowerDataRun.getRate());
|
||||||
|
}
|
||||||
|
if(devTowerDataWarning.getWarnType()>100){
|
||||||
|
devTowerDataWarning.setAlarmed(1L);
|
||||||
|
}
|
||||||
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
|
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,6 +487,18 @@ public class TowerCraneApiController {
|
||||||
String warningType = convertTyTowerWarningType(req.getType_id().toString());
|
String warningType = convertTyTowerWarningType(req.getType_id().toString());
|
||||||
devTowerDataWarning.setWarnType(Convert.toLong(warningType));
|
devTowerDataWarning.setWarnType(Convert.toLong(warningType));
|
||||||
devTowerDataWarning.setWarnNote(req.getType());
|
devTowerDataWarning.setWarnNote(req.getType());
|
||||||
|
devTowerDataWarning.setHeight(Convert.toStr(req.getHeight()));
|
||||||
|
devTowerDataWarning.setRange(Convert.toStr(req.getRange()));
|
||||||
|
devTowerDataWarning.setRotation(Convert.toStr(req.getRotation()));
|
||||||
|
devTowerDataWarning.setLoad(Convert.toStr(req.getLifting_weight()));
|
||||||
|
devTowerDataWarning.setWindSpeed(Convert.toStr(req.getWind_speed()));
|
||||||
|
devTowerDataWarning.setLeanAngleX(Convert.toStr(req.getAnteversion_x()));
|
||||||
|
devTowerDataWarning.setLeanAngleY(Convert.toStr(req.getAnteversion_y()));
|
||||||
|
devTowerDataWarning.setMomentPercent(Convert.toStr(req.getForce_distance()));
|
||||||
|
devTowerDataWarning.setRate(Convert.toStr(req.getMagnification()));
|
||||||
|
if(devTowerDataWarning.getWarnType()>100){
|
||||||
|
devTowerDataWarning.setAlarmed(1L);
|
||||||
|
}
|
||||||
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
|
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,52 +1,129 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container tower-project-config">
|
<div class="app-container tower-project-config">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
<el-form
|
||||||
label-width="68px">
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item label="项目名称" prop="projectId">
|
<el-form-item label="项目名称" prop="projectId">
|
||||||
<el-select v-model="queryParams.projectId" clearable :disabled="currentPrjId ? true : false" filterable
|
<el-select
|
||||||
placeholder="请选择所属项目" style="width: 200px" @change="queryProjectChange">
|
v-model="queryParams.projectId"
|
||||||
<el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
|
clearable
|
||||||
|
:disabled="currentPrjId ? true : false"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择所属项目"
|
||||||
|
style="width: 200px"
|
||||||
|
@change="queryProjectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in projects"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属单位" prop="deptId">
|
<el-form-item label="所属单位" prop="deptId">
|
||||||
<el-select v-model="queryParams.deptId" clearable filterable placeholder="请选择所属单位" style="width: 200px">
|
<el-select
|
||||||
<el-option v-for="item in subDepts" :key="item.id" :label="item.subDeptName" :value="item.id">
|
v-model="queryParams.deptId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择所属单位"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in subDepts"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.subDeptName"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备名称" prop="deviceName">
|
<el-form-item label="设备名称" prop="deviceName">
|
||||||
<el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.deviceName"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备序号" prop="deviceSn">
|
<el-form-item label="设备序号" prop="deviceSn">
|
||||||
<el-input v-model="queryParams.deviceSn" placeholder="请输入设备序列号" clearable @keyup.enter="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.deviceSn"
|
||||||
|
placeholder="请输入设备序列号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery"
|
||||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="small" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
|
<el-button
|
||||||
v-hasPermi="['device:towerProjectConfig:add']">新增</el-button>
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="small"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['device:towerProjectConfig:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single"
|
<el-button
|
||||||
@click="handleUpdate" v-hasPermi="['device:towerProjectConfig:edit']">修改</el-button>
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="small"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['device:towerProjectConfig:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple"
|
<el-button
|
||||||
@click="handleDelete" v-hasPermi="['device:towerProjectConfig:remove']">删除</el-button>
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="small"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['device:towerProjectConfig:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" size="small" @click="handleExport"
|
<el-button
|
||||||
v-hasPermi="['device:towerProjectConfig:export']">导出</el-button>
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="Download"
|
||||||
|
size="small"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['device:towerProjectConfig:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="loading" :data="towerProjectConfigList" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="towerProjectConfigList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="所属单位" align="center" prop="comName" width="150" />
|
<el-table-column label="所属单位" align="center" prop="comName" width="150" />
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" width="150" />
|
<el-table-column label="项目名称" align="center" prop="projectName" width="150" />
|
||||||
|
@ -61,7 +138,12 @@
|
||||||
<el-table-column label="塔机坐标x" align="center" prop="coordinateX" width="100" />
|
<el-table-column label="塔机坐标x" align="center" prop="coordinateX" width="100" />
|
||||||
<el-table-column label="塔机坐标y" align="center" prop="coordinateY" width="100" />
|
<el-table-column label="塔机坐标y" align="center" prop="coordinateY" width="100" />
|
||||||
<el-table-column label="前臂长度" align="center" prop="frontBrachium" />
|
<el-table-column label="前臂长度" align="center" prop="frontBrachium" />
|
||||||
<el-table-column label="平衡臂长度" align="center" prop="afterBrachium" width="100" />
|
<el-table-column
|
||||||
|
label="平衡臂长度"
|
||||||
|
align="center"
|
||||||
|
prop="afterBrachium"
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
<el-table-column label="塔身高度" align="center" prop="towerBodyHeight" />
|
<el-table-column label="塔身高度" align="center" prop="towerBodyHeight" />
|
||||||
<el-table-column label="塔帽高度" align="center" prop="towerCapHeight" />
|
<el-table-column label="塔帽高度" align="center" prop="towerCapHeight" />
|
||||||
<el-table-column label="塔节高度" align="center" prop="towerSectionHeight" />
|
<el-table-column label="塔节高度" align="center" prop="towerSectionHeight" />
|
||||||
|
@ -79,13 +161,20 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="塔机状态" align="center" prop="online">
|
<el-table-column label="塔机状态" align="center" prop="online">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="dict.project_video_signal_state" :value="scope.row.online" />
|
<dict-tag
|
||||||
|
:options="dict.project_video_signal_state"
|
||||||
|
:value="scope.row.online"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="启用状态" align="center" prop="isDel" width="80">
|
<el-table-column label="启用状态" align="center" prop="isDel" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch v-model="scope.row.isDel" active-value="0" inactive-value="1"
|
<el-switch
|
||||||
@change="setStatus(scope.row, $event)"></el-switch>
|
v-model="scope.row.isDel"
|
||||||
|
:active-value="parseInt(0)"
|
||||||
|
:inactive-value="parseInt(1)"
|
||||||
|
@change="setStatus(scope.row, $event)"
|
||||||
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="160">
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="160">
|
||||||
|
@ -93,17 +182,34 @@
|
||||||
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
width="100"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" type="primary" text icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
<el-button
|
||||||
v-hasPermi="['device:towerProjectConfig:edit']">修改</el-button>
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['device:towerProjectConfig:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
<pagination
|
||||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改塔基监测配置对话框 -->
|
<!-- 添加或修改塔基监测配置对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="960px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="960px" append-to-body>
|
||||||
|
@ -124,14 +230,24 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="设备名称" prop="deviceName">
|
<el-form-item label="设备名称" prop="deviceName">
|
||||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" maxlength="32" show-word-limit />
|
<el-input
|
||||||
|
v-model="form.deviceName"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="设备序列号" prop="deviceSn">
|
<el-form-item label="设备序列号" prop="deviceSn">
|
||||||
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" maxlength="32" show-word-limit />
|
<el-input
|
||||||
|
v-model="form.deviceSn"
|
||||||
|
placeholder="请输入设备序列号"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -149,8 +265,8 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="司机电话" prop="driPhone">
|
<el-form-item label="司机电话" prop="driPhone">
|
||||||
<el-input v-model="form.driPhone" placeholder="请输入司机电话" />
|
<el-input v-model="form.driPhone" placeholder="请输入司机电话" />
|
||||||
</el-form-item>
|
</el-form-item> </el-col
|
||||||
</el-col></el-row>
|
></el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="安全员" prop="safName">
|
<el-form-item label="安全员" prop="safName">
|
||||||
|
@ -163,22 +279,35 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-alert title="温馨提示:" type="warning" description="以下数据在设备运行过程中,不定时更新。无需填写,填写后会被定时覆盖!!!" show-icon>
|
<el-alert
|
||||||
|
title="温馨提示:"
|
||||||
|
type="warning"
|
||||||
|
description="以下数据在设备运行过程中,不定时更新。无需填写,填写后会被定时覆盖!!!"
|
||||||
|
show-icon
|
||||||
|
>
|
||||||
</el-alert>
|
</el-alert>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="塔机类型" prop="towerType" style="margin-top: 16px;">
|
<el-form-item label="塔机类型" prop="towerType" style="margin-top: 16px">
|
||||||
<el-select v-model="form.towerType" placeholder="请选择塔机类型" style="width:100%">
|
<el-select
|
||||||
<el-option v-for="dict in dict.device_tower_type" :key="dict.value" :label="dict.label"
|
v-model="form.towerType"
|
||||||
:value="parseInt(dict.value)"></el-option>
|
placeholder="请选择塔机类型"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.device_tower_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="parseInt(dict.value)"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="塔机坐标x" prop="coordinateX">
|
<el-form-item label="塔机坐标x" prop="coordinateX">
|
||||||
<el-input v-model="form.coordinateX" placeholder="请输入塔机坐标x" />
|
<el-input v-model="form.coordinateX" placeholder="请输入塔机坐标x" />
|
||||||
</el-form-item>
|
</el-form-item> </el-col
|
||||||
</el-col></el-row>
|
></el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="塔机坐标y" prop="coordinateY">
|
<el-form-item label="塔机坐标y" prop="coordinateY">
|
||||||
|
@ -188,8 +317,8 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="前臂长度" prop="frontBrachium">
|
<el-form-item label="前臂长度" prop="frontBrachium">
|
||||||
<el-input v-model="form.frontBrachium" placeholder="请输入前臂长度" />
|
<el-input v-model="form.frontBrachium" placeholder="请输入前臂长度" />
|
||||||
</el-form-item>
|
</el-form-item> </el-col
|
||||||
</el-col></el-row>
|
></el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="平衡臂长度" prop="afterBrachium">
|
<el-form-item label="平衡臂长度" prop="afterBrachium">
|
||||||
|
@ -215,7 +344,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot-slot="footer" class="dialog-footer" style="text-align: center;">
|
<div slot-slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -232,7 +361,7 @@ import {
|
||||||
updateTowerProjectConfig,
|
updateTowerProjectConfig,
|
||||||
} from "@/api/device/towerProjectConfig";
|
} from "@/api/device/towerProjectConfig";
|
||||||
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from "@/store/modules/user";
|
||||||
import { findMyProjectList } from "@/api/publics";
|
import { findMyProjectList } from "@/api/publics";
|
||||||
export default {
|
export default {
|
||||||
name: "TowerProjectConfig",
|
name: "TowerProjectConfig",
|
||||||
|
@ -273,9 +402,7 @@ export default {
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
deviceName: [
|
deviceName: [{ required: true, message: "设备名称不能为空", trigger: "blur" }],
|
||||||
{ required: true, message: "设备名称不能为空", trigger: "blur" },
|
|
||||||
],
|
|
||||||
deviceSn: [
|
deviceSn: [
|
||||||
{ required: true, message: "设备序列表不能为空", trigger: "blur" },
|
{ required: true, message: "设备序列表不能为空", trigger: "blur" },
|
||||||
{ max: 64, message: "最多输入64个字符" },
|
{ max: 64, message: "最多输入64个字符" },
|
||||||
|
@ -284,7 +411,7 @@ export default {
|
||||||
dict: {
|
dict: {
|
||||||
sys_common_isdel: [],
|
sys_common_isdel: [],
|
||||||
device_tower_type: [],
|
device_tower_type: [],
|
||||||
project_video_signal_state: []
|
project_video_signal_state: [],
|
||||||
},
|
},
|
||||||
userStore: {},
|
userStore: {},
|
||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
|
@ -295,8 +422,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict = this.useDict('sys_common_isdel', 'device_tower_type', 'project_video_signal_state');
|
this.dict = this.useDict(
|
||||||
this.userStore = useUserStore()
|
"sys_common_isdel",
|
||||||
|
"device_tower_type",
|
||||||
|
"project_video_signal_state"
|
||||||
|
);
|
||||||
|
this.userStore = useUserStore();
|
||||||
this.isAdmin = this.userStore.isAdmin;
|
this.isAdmin = this.userStore.isAdmin;
|
||||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||||
this.queryParams.comId = this.userStore.currentComId;
|
this.queryParams.comId = this.userStore.currentComId;
|
||||||
|
@ -308,32 +439,37 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
queryProjectChange() {
|
queryProjectChange() {
|
||||||
this.subDepts = []
|
this.subDepts = [];
|
||||||
this.queryParams.deptId = "";
|
this.queryParams.deptId = "";
|
||||||
if (this.queryParams.projectId) {
|
if (this.queryParams.projectId) {
|
||||||
this.getSubDepts(this.queryParams.projectId, data => {
|
this.getSubDepts(this.queryParams.projectId, (data) => {
|
||||||
this.subDepts = data;
|
this.subDepts = data;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dlgProjectChange() {
|
dlgProjectChange() {
|
||||||
this.dlgDepts = [];
|
this.dlgDepts = [];
|
||||||
this.form.deptId = "";
|
this.form.deptId = "";
|
||||||
if (this.form.projectId) {
|
if (this.form.projectId) {
|
||||||
this.getSubDepts(this.form.projectId, data => {
|
this.getSubDepts(this.form.projectId, (data) => {
|
||||||
this.dlgDepts = data;
|
this.dlgDepts = data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSubDepts(prjId, cb) {
|
getSubDepts(prjId, cb) {
|
||||||
listProProjectInfoSubdepts({ projectId: prjId, pageNum: 1, pageSize: 100, activeTags: "finished" }).then(d => {
|
listProProjectInfoSubdepts({
|
||||||
|
projectId: prjId,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
activeTags: "finished",
|
||||||
|
}).then((d) => {
|
||||||
let subdepts = d.rows || [];
|
let subdepts = d.rows || [];
|
||||||
cb && cb(subdepts);
|
cb && cb(subdepts);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询项目列表 */
|
/** 查询项目列表 */
|
||||||
getProjectList() {
|
getProjectList() {
|
||||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
findMyProjectList({ pageNum: 1, pageSize: 100 }).then((response) => {
|
||||||
this.projects = response.rows;
|
this.projects = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -423,8 +559,8 @@ export default {
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getTowerProjectConfig(id).then((response) => {
|
getTowerProjectConfig(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.form.towerType = this.form.towerType ? 1 * this.form.towerType : '';
|
this.form.towerType = this.form.towerType ? 1 * this.form.towerType : "";
|
||||||
this.getSubDepts(this.form.projectId, data => {
|
this.getSubDepts(this.form.projectId, (data) => {
|
||||||
this.dlgDepts = data;
|
this.dlgDepts = data;
|
||||||
});
|
});
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
@ -479,7 +615,7 @@ export default {
|
||||||
//修改塔吊配置状态
|
//修改塔吊配置状态
|
||||||
setStatus(row, val) {
|
setStatus(row, val) {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.$confirm(`是否确认${val == 0 ? "启用" : "停用"}当前数据配置?`, "提示", {
|
this.$confirm(`是否确认${val == 0 ? "启用" : "停用"}当前数据配置?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
|
@ -487,24 +623,26 @@ export default {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
delTowerProjectConfig(row.id).then((response) => {
|
let _datas = { id: row.id, isDel: val };
|
||||||
|
updateTowerProjectConfig(_datas).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// 取消时恢复原始开关状态
|
// 取消时恢复原始开关状态
|
||||||
if (val == "0") {
|
if (val == 0) {
|
||||||
row.isDel = "1";
|
row.isDel = 1;
|
||||||
} else {
|
} else {
|
||||||
row.isDel = "0";
|
row.isDel = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.tower-project-config {}
|
.tower-project-config {
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue