Commit 037d696b authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents 9ff94ec2 553e71e6
...@@ -78,8 +78,10 @@ public class TDeviceInfoController extends BaseController ...@@ -78,8 +78,10 @@ public class TDeviceInfoController extends BaseController
{ {
//添加设备信息表数据 并且返回新增id //添加设备信息表数据 并且返回新增id
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo()); tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
if (!"null".equals(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定 //将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId()); tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId());
}
TDeviceInfo tDeviceInfo = new TDeviceInfo(); TDeviceInfo tDeviceInfo = new TDeviceInfo();
//根据企业id查询企业名称 //根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId()); String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
...@@ -143,13 +145,22 @@ public class TDeviceInfoController extends BaseController ...@@ -143,13 +145,22 @@ public class TDeviceInfoController extends BaseController
} }
/** /**
* 关联设备批量数据删除接口 * 关联设备数据删除接口
*/ */
@RequestMapping("/deleteDetailInfo") @RequestMapping("/deleteDetailInfo")
public void deleteDetailInfo(@RequestBody int deviceId){ public void deleteDetailInfo(@RequestBody int deviceId){
tDeviceInfoService.deleteDetailinfOS(deviceId); tDeviceInfoService.deleteDetailinfOS(deviceId);
} }
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
@RequestMapping("/deleteDeviceDetailInfo")
public void deleteDeviceDetailInfo(@RequestBody int deviceId){
tDeviceInfoService.deleteDeviceDetailInfo(deviceId);
}
/** /**
* 关联设备批量数据删除接口 * 关联设备批量数据删除接口
* @param deviceId * @param deviceId
...@@ -158,4 +169,29 @@ public class TDeviceInfoController extends BaseController ...@@ -158,4 +169,29 @@ public class TDeviceInfoController extends BaseController
public void deleteeListDetailInfo(@RequestBody Long[] deviceId){ public void deleteeListDetailInfo(@RequestBody Long[] deviceId){
tDeviceInfoService.deleteDetailInfo(deviceId); tDeviceInfoService.deleteDetailInfo(deviceId);
} }
/**
* 查询设备已经关联的关联设备接口
* @param id
* @return
*/
@RequestMapping("/selectDetailInfoList")
public TableDataInfo selectDetailInfoList(@RequestBody int id){
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.selectDetailInfoList(id);
return getDataTable(tDeviceInfoS);
}
/**
* 关联设备绑定接口
* @param listaw
*/
@RequestMapping("/updateDetailInfoList")
public void updateDetailInfoList(@RequestBody Listaw listaw){
if (!"null".equals(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId());
}
}
} }
...@@ -38,7 +38,7 @@ public class TDeviceInfo extends BaseEntity ...@@ -38,7 +38,7 @@ public class TDeviceInfo extends BaseEntity
private String deviceModel; private String deviceModel;
/** 设备类型:1.阀井 2.调压箱 3.巡检员 4.视频 */ /** 设备类型:1.阀井 2.调压箱 3.巡检员 4.视频 */
@Excel(name = "设备类型:1.阀井 2.调压箱 3.巡检员 4.视频") @Excel(name = "设备类型")
private String deviceType; private String deviceType;
/** 权属单位 */ /** 权属单位 */
...@@ -49,18 +49,22 @@ public class TDeviceInfo extends BaseEntity ...@@ -49,18 +49,22 @@ public class TDeviceInfo extends BaseEntity
private String beyondEnterpriseName; private String beyondEnterpriseName;
/** 经度 */ /** 经度 */
private BigDecimal longitude; @Excel(name = "经度")
private String longitude;
/** 纬度 */ /** 纬度 */
private BigDecimal latitude; @Excel(name = "纬度")
private String latitude;
/** 设备图片路径 */ /** 设备图片路径 */
private String iconUrl; private String iconUrl;
/** 联系人 */ /** 联系人 */
@Excel(name = "联系人")
private String linkman; private String linkman;
/** 电话 */ /** 电话 */
@Excel(name = "电话")
private String phone; private String phone;
/** 安装时间 */ /** 安装时间 */
...@@ -149,24 +153,27 @@ public class TDeviceInfo extends BaseEntity ...@@ -149,24 +153,27 @@ public class TDeviceInfo extends BaseEntity
{ {
return beyondEnterpriseName; return beyondEnterpriseName;
} }
public void setLongitude(BigDecimal longitude)
{ public static long getSerialVersionUID() {
this.longitude = longitude; return serialVersionUID;
} }
public BigDecimal getLongitude() public String getLongitude() {
{
return longitude; return longitude;
} }
public void setLatitude(BigDecimal latitude)
{ public void setLongitude(String longitude) {
this.latitude = latitude; this.longitude = longitude;
} }
public BigDecimal getLatitude() public String getLatitude() {
{
return latitude; return latitude;
} }
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public void setIconUrl(String iconUrl) public void setIconUrl(String iconUrl)
{ {
this.iconUrl = iconUrl; this.iconUrl = iconUrl;
......
...@@ -97,4 +97,17 @@ public interface TDeviceInfoMapper ...@@ -97,4 +97,17 @@ public interface TDeviceInfoMapper
* @param gettDeviceInfoS * @param gettDeviceInfoS
*/ */
void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id); void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id);
/**
* 查询设备已经关联的关联设备
* @param id
* @return
*/
List<TDeviceInfoS> selectDetailInfoList(int id);
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
void deleteDeviceDetailInfo(int deviceId);
} }
...@@ -97,4 +97,17 @@ public interface ITDeviceInfoService ...@@ -97,4 +97,17 @@ public interface ITDeviceInfoService
* @param gettDeviceInfoS * @param gettDeviceInfoS
*/ */
void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS") List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id); void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS") List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id);
/**
* 查询设备已经关联的关联设备
* @param id
* @return
*/
List<TDeviceInfoS> selectDetailInfoList(int id);
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
void deleteDeviceDetailInfo(int deviceId);
} }
...@@ -152,4 +152,24 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -152,4 +152,24 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
public void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id) { public void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id) {
tDeviceInfoMapper.updatetRelationDeviceDetailInfo(gettDeviceInfoS,id); tDeviceInfoMapper.updatetRelationDeviceDetailInfo(gettDeviceInfoS,id);
} }
/**
* 查询设备已经关联的关联设备
* @param id
* @return
*/
@Override
public List<TDeviceInfoS> selectDetailInfoList(int id) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.selectDetailInfoList(id);
return tDeviceInfoS;
}
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
@Override
public void deleteDeviceDetailInfo(int deviceId) {
tDeviceInfoMapper.deleteDeviceDetailInfo(deviceId);
}
} }
...@@ -173,6 +173,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -173,6 +173,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by relation_device_detail_id desc group by relation_device_detail_id desc
</select> </select>
<!--查询设备已经关联的关联设备-->
<select id="selectDetailInfoList" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type
from t_relation_device_detail_info where relation_device_id=#{id}
</select>
<!--关联设备数据删除接口--> <!--关联设备数据删除接口-->
<update id="deleteDetailInfo"> <update id="deleteDetailInfo">
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id in update t_relation_device_detail_info set is_del='1' where relation_device_detail_id in
...@@ -197,4 +203,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -197,4 +203,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</update> </update>
<!--解绑 设备与关联设备关系-->
<update id="deleteDeviceDetailInfo">
update t_relation_device_detail_info set relation_device_id='0' where relation_device_detail_id=#{deviceId}
</update>
</mapper> </mapper>
...@@ -87,6 +87,17 @@ export function addDetailInfos(data) { ...@@ -87,6 +87,17 @@ export function addDetailInfos(data) {
}) })
} }
// 解除 设备与关联设备信息
export function deleteDeviceDetailInfo(deviceId) {
return request({
url: '/device/device/deleteDeviceDetailInfo',
method: 'delete',
data:deviceId
})
}
// 删除关联设备信息 // 删除关联设备信息
export function deleteeListDetailInfo(deviceId) { export function deleteeListDetailInfo(deviceId) {
return request({ return request({
...@@ -96,4 +107,20 @@ export function deleteeListDetailInfo(deviceId) { ...@@ -96,4 +107,20 @@ export function deleteeListDetailInfo(deviceId) {
}) })
} }
//查询已经关联的关联设备信息
export function selectDetailInfoList(data){
return request({
url: '/device/device/selectDetailInfoList',
method: 'post',
data: data
})
}
// 新增设备信息
export function updateDetailInfoLists(data) {
return request({
url: '/device/device/updateDetailInfoList',
method: 'post',
data: data
})
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1644901265903" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7343" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M527.053 96.924c-169.131 0.322-306.127 137.496-306.127 306.7 0 157.986 128.978 324.17 278.121 502.935 7.838 9.418 17.977 14.485 28.006 15.061 10.029-0.576 20.168-5.643 28.002-15.061 149.144-178.765 278.123-344.948 278.123-502.935 0-169.205-136.997-306.378-306.126-306.7zM527.053 500.967c-66.070-0.358-119.562-53.956-119.562-120.099s53.492-119.74 119.562-120.099c66.069 0.358 119.557 53.956 119.557 120.099s-53.487 119.74-119.557 120.099z" p-id="7344" fill="#1296db"></path></svg>
\ No newline at end of file
<svg id="组_2449" data-name="组 2449" xmlns="http://www.w3.org/2000/svg" width="23" height="33.9" viewBox="0 0 23 33.9">
<g id="路径_186" data-name="路径 186" fill="none">
<path d="M11.5,0A11.5,11.5,0,0,1,23,11.5c0,6.351-11.6,18.226-11.5,18.3S0,17.851,0,11.5A11.5,11.5,0,0,1,11.5,0Z" stroke="none"/>
<path d="M 11.5 0.9999942779541016 C 5.71027946472168 0.9999942779541016 1 5.710294723510742 1 11.50003433227539 C 1 15.44047451019287 6.295700073242188 22.62868881225586 11.47670364379883 28.30246925354004 C 12.68497562408447 26.95181846618652 15.33078575134277 23.97880172729492 17.65543937683105 20.72857475280762 C 19.63740921020508 17.95747375488281 22 14.10698509216309 22 11.50003433227539 C 22 5.710294723510742 17.28972053527832 0.9999942779541016 11.5 0.9999942779541016 M 11.5 -5.7220458984375e-06 C 17.85127067565918 -5.7220458984375e-06 23 5.148744583129883 23 11.50003433227539 C 23 17.82767868041992 11.48916530609131 29.63789367675781 11.49940204620361 29.80171203613281 C 11.36462783813477 29.63816833496094 0 17.78736114501953 0 11.50003433227539 C 0 5.148744583129883 5.14872932434082 -5.7220458984375e-06 11.5 -5.7220458984375e-06 Z M 11.49940204620361 29.80171203613281 C 11.50076866149902 29.80337142944336 11.50098419189453 29.80383491516113 11.5 29.80305480957031 C 11.49963855743408 29.80276870727539 11.49944019317627 29.80232429504395 11.49940204620361 29.80171203613281 Z" stroke="none" fill="#7bf8f4"/>
</g>
<path id="多边形_33" data-name="多边形 33" d="M4.471,0,8.941,5.961H0Z" transform="translate(16.094 29.804) rotate(180)" fill="#7bf8f4"/>
<path id="路径_966" data-name="路径 966" d="M99.476,156.616a6.028,6.028,0,0,1-1.622,2.267.9.9,0,0,1-.583.252.8.8,0,0,1-.567-.236.765.765,0,0,1-.236-.535.705.705,0,0,1,.236-.535,6.035,6.035,0,0,0,1.748-4.377A5.726,5.726,0,0,0,96.7,149.2a6.645,6.645,0,0,0-9.085.016,5.836,5.836,0,0,0-1.763,4.283,6.134,6.134,0,0,0,1.952,4.346.765.765,0,0,1,.236.535.705.705,0,0,1-.236.535.748.748,0,0,1-.567.236.8.8,0,0,1-.567-.236,7.414,7.414,0,0,1-2.047-2.724,7.528,7.528,0,0,1,1.748-8.266,7.836,7.836,0,0,1,2.629-1.685,9.392,9.392,0,0,1,6.361-.063,6.113,6.113,0,0,1,2.141,1.26c2.866,2.425,3.023,5.9,2.047,8.943Zm-7.337-7.684a4.366,4.366,0,0,0-4.377,4.267.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,5.254,5.254,0,0,1,1.575-3.684,5.533,5.533,0,0,1,7.7,0,5.208,5.208,0,0,1,1.606,3.732.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,4.382,4.382,0,0,0-4.424-4.314Zm.913,5.4a1.113,1.113,0,0,1-1.559-.047,1.054,1.054,0,0,1-.268-1.149l-1.212-1.2a.418.418,0,0,1,0-.6.479.479,0,0,1,.63,0l1.228,1.2a1.162,1.162,0,0,1,1.2.268,1.024,1.024,0,0,1,.331.771A1.093,1.093,0,0,1,93.052,154.333Zm.016-.016" transform="translate(-80.582 -142.727)" fill="#7bf8f4"/>
</svg>
...@@ -248,7 +248,7 @@ export class EditorMap { ...@@ -248,7 +248,7 @@ export class EditorMap {
let device = this.createMarker({ let device = this.createMarker({
map: this.map, map: this.map,
anchor: "bottom-center", anchor: "bottom-center",
icon: require("@/assets/mapImages/yalibiao.svg"), icon: require("@/assets/mapImages/coordinate.svg"),
position: path, position: path,
extData: deviceData, extData: deviceData,
}); });
......
...@@ -193,17 +193,17 @@ ...@@ -193,17 +193,17 @@
v-hasPermi="['device:device:remove']" v-hasPermi="['device:device:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="warning" <!-- type="warning"-->
plain <!-- plain-->
icon="el-icon-download" <!-- icon="el-icon-download"-->
size="mini" <!-- size="mini"-->
:loading="exportLoading" <!-- :loading="exportLoading"-->
@click="handleExport" <!-- @click="handleExport"-->
v-hasPermi="['device:device:export']" <!-- v-hasPermi="['device:device:export']"-->
>导出</el-button> <!-- >导出</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getDataList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getDataList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loadings" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange"> <el-table v-loading="loadings" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange">
...@@ -337,13 +337,13 @@ ...@@ -337,13 +337,13 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="经度" prop="longitude"> <el-form-item label="经度" prop="longitude">
<el-input onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="form.longitude" placeholder="请输入经度" /> <el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="纬度" prop="latitude"> <el-form-item label="纬度" prop="latitude">
<el-input onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="form.latitude" placeholder="请输入纬度" /> <el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -433,7 +433,7 @@ ...@@ -433,7 +433,7 @@
<script> <script>
import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo } from "@/api/regulation/device"; import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo,selectDetailInfoList,deleteDeviceDetailInfo,updateDetailInfoLists} from "@/api/regulation/device";
export default { export default {
name: "Device", name: "Device",
...@@ -631,7 +631,6 @@ export default { ...@@ -631,7 +631,6 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
...@@ -674,6 +673,8 @@ export default { ...@@ -674,6 +673,8 @@ export default {
selectTEnterprise().then(response => { selectTEnterprise().then(response => {
this.test = response.data; this.test = response.data;
}); });
//清空关联设备数据
this.DetailInfoList=''
this.loadings = true; this.loadings = true;
//查询下级设备数据 //查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => { getDdeviceDetailInfo(this.dateQueryParams).then(response => {
...@@ -694,10 +695,13 @@ export default { ...@@ -694,10 +695,13 @@ export default {
this.test = response.data; this.test = response.data;
}); });
const deviceId = row.deviceId || this.ids const deviceId = row.deviceId || this.ids
//查询关联设备信息数据 //查询关联设备信息数据
// getDdeviceDetailInfo(deviceId).then(response => { selectDetailInfoList(deviceId).then(response => {
// this.dynamicValidateForm.domains = response.data; this.DetailInfoList = response.rows;
// }); this.loadings = false;
});
this.reset(); this.reset();
getDevice(deviceId).then(response => { getDevice(deviceId).then(response => {
...@@ -736,7 +740,6 @@ export default { ...@@ -736,7 +740,6 @@ export default {
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
}, },
/**动态添加输入框方法*/ /**动态添加输入框方法*/
addDomain() { addDomain() {
this.dynamicValidateForm.domains.push({ this.dynamicValidateForm.domains.push({
...@@ -764,7 +767,19 @@ export default { ...@@ -764,7 +767,19 @@ export default {
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
if ( this.datalist !=null){
var tDeviceInfon={
tDeviceInfo:this.form,
tDeviceInfoS:this.datalist
}
//重新绑定修改后的关联设备
updateDetailInfoLists(JSON.stringify(tDeviceInfon)).then(response => {
this.open = false;
this.getList();
});
}
} else { } else {
alert("走的新增")
if (valid) { if (valid) {
//获取已经选中的下级设备id //获取已经选中的下级设备id
const deviceIds = this.ids; const deviceIds = this.ids;
...@@ -811,7 +826,6 @@ export default { ...@@ -811,7 +826,6 @@ export default {
}); });
}, },
/**关联设备单条删除方法*/ /**关联设备单条删除方法*/
deleteDetailInfo(row){ deleteDetailInfo(row){
const deviceIds = row.relationDeviceDetailId; const deviceIds = row.relationDeviceDetailId;
...@@ -829,7 +843,18 @@ export default { ...@@ -829,7 +843,18 @@ export default {
}, },
/**关联设备已经选中数据删除方法*/ /**关联设备已经选中数据删除方法*/
deleteDataListilInfo(row,index){ deleteDataListilInfo(row,index){
const deviceIds = row.relationDeviceDetailId;
//判断form表单是否有id来验证是修改的删除还是添加的删除
if (this.form.deviceId != null) {
deleteDeviceDetailInfo(deviceIds).then(response => {
this.msgSuccess("删除成功");
this.DetailInfoList.splice(index,1); this.DetailInfoList.splice(index,1);
});
}else {
this.DetailInfoList.splice(index,1);
this.msgSuccess("删除成功");
}
}, },
/** /**
* 批量删除关联设备方法 * 批量删除关联设备方法
...@@ -860,6 +885,16 @@ export default { ...@@ -860,6 +885,16 @@ export default {
}).then(function() { }).then(function() {
}).then(() => { }).then(() => {
if (this.form.deviceId != null) {
//修改
this.DetailInfoList=this.DetailInfoList.concat(this.datalist)
//添加到数组中 以便下次使用
this.DetailInfoListId.push(deviceIds);
// alert(this.DetailInfoListId)
this.dialogTableVisible=false
this.msgSuccess("添加成功");
}else {
//添加
// this.DetailInfoList.push(this.datalist) // this.DetailInfoList.push(this.datalist)
//清空数组数据 将之前的数据清空 //清空数组数据 将之前的数据清空
this.DetailInfoListId.splice(row); this.DetailInfoListId.splice(row);
...@@ -869,6 +904,7 @@ export default { ...@@ -869,6 +904,7 @@ export default {
// alert(this.DetailInfoListId) // alert(this.DetailInfoListId)
this.dialogTableVisible=false this.dialogTableVisible=false
this.msgSuccess("添加成功"); this.msgSuccess("添加成功");
}
}).catch(() => {}); }).catch(() => {});
}, },
/** /**
......
...@@ -74,13 +74,13 @@ ...@@ -74,13 +74,13 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="equipmentList" > <el-table v-loading="loading" :data="equipmentList" >
<el-table-column label="用户名称" align="center" prop="userName" width="220px"/> <el-table-column label="用户名称" align="center" prop="userName" width="200px"/>
<el-table-column label="身份证号" align="center" prop="idCard"/> <el-table-column label="身份证号" align="center" prop="idCard" width="180px"/>
<el-table-column label="联系电话" align="center" prop="linkMobile"/> <el-table-column label="联系电话" align="center" prop="linkMobile"/>
<el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/> <el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/>
<el-table-column label="安装时间" align="center" prop="installTime"/> <el-table-column label="安装时间" align="center" prop="installTime"/>
<el-table-column label="品牌名称" align="center" prop="brandName" width="130px"/> <el-table-column label="品牌名称" align="center" prop="brandName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<el-table v-loading="loading" :data="hiddenList" > <el-table v-loading="loading" :data="hiddenList" >
<el-table-column label="隐患名称" align="center" prop="hiddenTitle" width="200px"/> <el-table-column label="隐患名称" align="center" prop="hiddenTitle" width="200px"/>
<el-table-column label="隐患等级" align="center" prop="hiddenType" width="150px"> <el-table-column label="隐患等级" align="center" prop="hiddenType">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.hiddenType == '1'">一级隐患</span> <span v-if="scope.row.hiddenType == '1'">一级隐患</span>
<span v-if="scope.row.hiddenType == '2'">二级隐患</span> <span v-if="scope.row.hiddenType == '2'">二级隐患</span>
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="隐患位置" align="center" prop="hiddenLocation" width="300px"/> <el-table-column label="隐患位置" align="center" prop="hiddenLocation" width="300px"/>
<el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople" width="150px"/> <el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople"/>
<el-table-column label="发现时间" align="center" prop="hiddenFindDate" width="150px"/> <el-table-column label="发现时间" align="center" prop="hiddenFindDate" width="150px"/>
<el-table-column label="处理方案" align="center" prop="dealPlanUrl" width="150px"> <el-table-column label="处理方案" align="center" prop="dealPlanUrl">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
class="dbtn" class="dbtn"
...@@ -89,13 +89,13 @@ ...@@ -89,13 +89,13 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整治情况" align="center" prop="remediation" width="180px"> <el-table-column label="整治情况" align="center" prop="remediation">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.remediation != '' && scope.row.remediation != null">{{ scope.row.remediation }}</span> <span v-if="scope.row.remediation != '' && scope.row.remediation != null">{{ scope.row.remediation }}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -233,35 +233,33 @@ ...@@ -233,35 +233,33 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2"> <el-dialog :title="title2" :visible.sync="open2" width="1200px" append-to-body @cancel="cancel2" @close="cancel2">
<el-row>
<el-col :span="14">
<el-form ref="detailForm" :model="detailForm" label-width="120px"> <el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="10">
<el-form-item label="隐患名称:"> <el-form-item label="隐患名称:">
<font>{{detailForm.hiddenTitle}}</font> <font>{{detailForm.hiddenTitle}}</font>
</el-form-item> </el-form-item>
<el-form-item label="隐患发现人员:"> <el-form-item label="隐患发现人员:">
<font>{{detailForm.hiddenFindPeople}}</font> <font>{{detailForm.hiddenFindPeople}}</font>
</el-form-item> </el-form-item>
<el-form-item label="隐患位置:"> <el-form-item label="发现时间:">
<font>{{detailForm.hiddenLocation}}</font> <font>{{detailForm.hiddenFindDate}}</font>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="13">
<el-form-item label="隐患等级:"> <el-form-item label="隐患等级:">
<font v-if="detailForm.hiddenType == '1'">一级隐患</font> <font v-if="detailForm.hiddenType == '1'">一级隐患</font>
<font v-if="detailForm.hiddenType == '2'">二级隐患</font> <font v-if="detailForm.hiddenType == '2'">二级隐患</font>
<font v-if="detailForm.hiddenType == '3'">三级隐患</font> <font v-if="detailForm.hiddenType == '3'">三级隐患</font>
</el-form-item> </el-form-item>
<el-form-item label="发现时间:"> <el-form-item label="隐患位置:">
<font>{{detailForm.hiddenFindDate}}</font> <font>{{detailForm.hiddenLocation}}</font>
</el-form-item> </el-form-item>
<el-form-item label="处理方案:"> <el-form-item label="处理方案:">
<span <span class="dbtn" @click="checkFile(detailForm.dealPlanUrl)" v-if="detailForm.dealPlan != ''">
class="dbtn"
@click="checkFile(detailForm.dealPlanUrl)"
v-if="detailForm.dealPlan != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
<span v-else>-</span> <span v-else>-</span>
...@@ -286,6 +284,14 @@ ...@@ -286,6 +284,14 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
</el-col>
<el-col :span="9">
<div style="width: 100%;height: 390px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="hiddenContainer"></div>
</div>
</el-col>
</el-row>
</el-dialog> </el-dialog>
<GetPos <GetPos
...@@ -301,15 +307,14 @@ ...@@ -301,15 +307,14 @@
<script> <script>
import { listHidden, getHidden, delHidden, addHidden, updateHidden, exportHidden } from "@/api/standingBook/hidden"; import { listHidden, getHidden, delHidden, addHidden, updateHidden, exportHidden } from "@/api/standingBook/hidden";
import Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
import GetPos from '@/components/GetPos'; import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
let uploadfile = require("@/assets/uploadfile.png"); let uploadfile = require("@/assets/uploadfile.png");
export default { export default {
name: "Hidden", name: "Hidden",
components: { components: {
Editor,
FileUpload, FileUpload,
GetPos GetPos
}, },
...@@ -344,6 +349,7 @@ export default { ...@@ -344,6 +349,7 @@ export default {
// 地图 // 地图
dialogTableVisible: false, dialogTableVisible: false,
devicePos: [], devicePos: [],
map: null,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -406,11 +412,11 @@ export default { ...@@ -406,11 +412,11 @@ export default {
this.open1 = false; this.open1 = false;
this.reset1(); this.reset1();
this.fileList = []; this.fileList = [];
this.devicePos = [];
}, },
cancel2() { cancel2() {
this.open2 = false; this.open2 = false;
this.reset2(); this.reset2();
this.map.destroy();
}, },
// 表单重置 // 表单重置
reset1() { reset1() {
...@@ -458,6 +464,7 @@ export default { ...@@ -458,6 +464,7 @@ export default {
remarks: null remarks: null
}; };
this.resetForm("detailForm"); this.resetForm("detailForm");
this.devicePos = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -546,8 +553,16 @@ export default { ...@@ -546,8 +553,16 @@ export default {
this.reset2(); this.reset2();
getHidden(row.hiddenId).then(response => { getHidden(row.hiddenId).then(response => {
this.detailForm = response.data; this.detailForm = response.data;
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
this.open2 = true; this.open2 = true;
this.title2 = "隐患整治台账详情"; this.title2 = "隐患整治台账详情";
this.$nextTick(() => {
this.map = new EditorMap("hiddenContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
}); });
}, },
checkFile(url) { checkFile(url) {
......
...@@ -77,24 +77,24 @@ ...@@ -77,24 +77,24 @@
<el-table v-loading="loading" :data="troubleList" > <el-table v-loading="loading" :data="troubleList" >
<el-table-column label="事故名称" align="center" prop="troubleName" width="200px"/> <el-table-column label="事故名称" align="center" prop="troubleName" width="200px"/>
<el-table-column label="事故类型" align="center" prop="troubleType" width="180px"> <el-table-column label="事故类型" align="center" prop="troubleType">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.troubleType == 1">生产安全事故</span> <span v-if="scope.row.troubleType == 1">生产安全事故</span>
<span v-if="scope.row.troubleType == 2">非生产安全事故</span> <span v-if="scope.row.troubleType == 2">非生产安全事故</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="事故地点" align="center" prop="troubleLocation" width="300px"/> <el-table-column label="事故地点" align="center" prop="troubleLocation" width="300px"/>
<el-table-column label="事故发生时间" align="center" prop="happenDate" width="180px"/> <el-table-column label="事故发生时间" align="center" prop="happenDate" width="150px"/>
<el-table-column label="责任单位" align="center" prop="responsibleUnit" width="150px"/> <el-table-column label="责任单位" align="center" prop="responsibleUnit"/>
<el-table-column label="责任人员" align="center" prop="responsiblePeople" width="150px"/> <el-table-column label="责任人员" align="center" prop="responsiblePeople"/>
<el-table-column label="是否处理" align="center" prop="isDeal" width="120px"> <el-table-column label="是否处理" align="center" prop="isDeal">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.isDeal == 1">已处理</span> <span v-if="scope.row.isDeal == 1">已处理</span>
<span v-if="scope.row.isDeal == 2">未处理</span> <span v-if="scope.row.isDeal == 2">未处理</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="处理完成时间" align="center" prop="dealDate" width="180px"/>--> <!-- <el-table-column label="处理完成时间" align="center" prop="dealDate" width="180px"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -242,10 +242,12 @@ ...@@ -242,10 +242,12 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2"> <el-dialog :title="title2" :visible.sync="open2" width="1200px" append-to-body @cancel="cancel2" @close="cancel2">
<el-row>
<el-col :span="14">
<el-form ref="detailForm" :model="detailForm" label-width="120px"> <el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="10">
<el-form-item label="事故名称:"> <el-form-item label="事故名称:">
<font>{{detailForm.troubleName}}</font> <font>{{detailForm.troubleName}}</font>
</el-form-item> </el-form-item>
...@@ -257,7 +259,7 @@ ...@@ -257,7 +259,7 @@
<font v-else> - </font> <font v-else> - </font>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="13">
<el-form-item label="事故类型:"> <el-form-item label="事故类型:">
<font v-if="detailForm.troubleType == '1'">安全生产事故</font> <font v-if="detailForm.troubleType == '1'">安全生产事故</font>
<font v-if="detailForm.troubleType == '2'">非生产安全事故</font> <font v-if="detailForm.troubleType == '2'">非生产安全事故</font>
...@@ -297,6 +299,14 @@ ...@@ -297,6 +299,14 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
</el-col>
<el-col :span="9">
<div style="width: 100%;height: 390px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="troubleContainer"></div>
</div>
</el-col>
</el-row>
</el-dialog> </el-dialog>
<GetPos <GetPos
...@@ -313,6 +323,7 @@ ...@@ -313,6 +323,7 @@
<script> <script>
import { listTrouble, getTrouble, delTrouble, addTrouble, updateTrouble, exportTrouble } from "@/api/standingBook/trouble"; import { listTrouble, getTrouble, delTrouble, addTrouble, updateTrouble, exportTrouble } from "@/api/standingBook/trouble";
import GetPos from '@/components/GetPos'; import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
export default { export default {
name: "Trouble", name: "Trouble",
...@@ -343,6 +354,7 @@ export default { ...@@ -343,6 +354,7 @@ export default {
// 地图 // 地图
dialogTableVisible: false, dialogTableVisible: false,
devicePos: [], devicePos: [],
map: null,
// 弹出层标题 // 弹出层标题
title1: "", title1: "",
title2: "", title2: "",
...@@ -416,11 +428,11 @@ export default { ...@@ -416,11 +428,11 @@ export default {
cancel1() { cancel1() {
this.open1 = false; this.open1 = false;
this.reset1(); this.reset1();
this.devicePos = [];
}, },
cancel2() { cancel2() {
this.open2 = false; this.open2 = false;
this.reset2(); this.reset2();
this.map.destroy();
}, },
// 表单重置 // 表单重置
reset1() { reset1() {
...@@ -471,6 +483,7 @@ export default { ...@@ -471,6 +483,7 @@ export default {
remarks: null remarks: null
}; };
this.resetForm("detailForm"); this.resetForm("detailForm");
this.devicePos = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -553,8 +566,17 @@ export default { ...@@ -553,8 +566,17 @@ export default {
this.reset2(); this.reset2();
getTrouble(row.troubleId).then(response => { getTrouble(row.troubleId).then(response => {
this.detailForm = response.data; this.detailForm = response.data;
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
console.log("this.devicePos",this.devicePos);
this.open2 = true; this.open2 = true;
this.title2 = "燃气事故台账详情"; this.title2 = "燃气事故台账详情";
this.$nextTick(() => {
this.map = new EditorMap("troubleContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
}); });
}, },
MapdialogFun() { MapdialogFun() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment