Commit cdc68b51 authored by 王晓倩's avatar 王晓倩

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/gassafety

parents c31e231e f433d7b1
......@@ -39,6 +39,14 @@ public class TPipeController extends BaseController
return getDataTable(list);
}
@GetMapping("/pipeAllInfoList")
public AjaxResult pipeAllInfoList(TPipe tPipe)
{
List<TPipe> list = tPipeService.selectTPipeList(tPipe);
return AjaxResult.success(list);
}
/**
* 导出管道信息列表
*/
......
......@@ -9,6 +9,15 @@ export function listPipe(query) {
})
}
// 查询管道信息列表
export function pipeAllInfoList(query) {
return request({
url: '/device/pipe/pipeAllInfoList',
method: 'get',
params: query
})
}
// 查询管道信息详细
export function getPipe(pipeId) {
return request({
......
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="a">
<el-input></el-input>
</el-form-item>
<el-form-item label="姓名" prop="d">
<el-input></el-input>
</el-form-item>
<el-form-item label="电话" prop="e">
<el-input></el-input>
</el-form-item>
<el-form-item label="备注信息" prop="l">
<el-input type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
}
},
methods: {
show () {
this.dialogVisible = true;
},
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.remove();
//done();
})
.catch(_ => {});
}
}
}
</script>
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="enterpriseId">
<el-input v-model="editForm.enterpriseId"></el-input>
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-form-item label="所属管道" prop="pipeCode">
<el-input v-model="form.pipeCode" placeholder="请输入所属管道" />
</el-form-item>
<el-form-item label="名称" prop="deviceName">
<el-input v-model="editForm.deviceName"></el-input>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="地址" prop="deviceAddr">
<el-input v-model="editForm.deviceAddr"></el-input>
<el-form-item label="所在地址" prop="deviceAddr">
<el-input v-model="form.deviceAddr" placeholder="请输入所在地址" />
</el-form-item>
<el-form-item label="所属管道" prop="pipeId">
<el-input v-model="editForm.pipeId"></el-input>
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="editForm.linkman"></el-input>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
<el-form-item label="型号" prop="deviceModel">
<el-input v-model="editForm.deviceModel"></el-input>
<el-form-item label="物联网编号" prop="iotNo">
<el-input v-model="form.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
<el-form-item label="经纬度" prop="deviceModel">
<el-row>
<el-col :span="6" style="margin-right: 10px">
<el-input v-model="editForm.longitude"></el-input>
</el-col>
<el-col :span="6">
<el-input v-model="editForm.latitude"></el-input>
</el-col>
</el-row>
<el-form-item label="设备图片上传" prop="iconUrl">
<FileUpload :fileArr="fileList" @resFun="getFileInfo"/>
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
</el-col>
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
<el-form-item label="最后巡检日期" prop="inspectionTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
</el-col>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker clearable size="small"
v-model="form.installationTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择安装时间">
</el-date-picker>
</el-form-item>
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { getAllDeviceInfo ,addDeviceInfo, updateDeviceInfo } from "@/api/device/deviceInfo";
import FileUpload from '@/components/FileUpload';
import { DEVICE_TYPE } from "utils/gaodeMap.js";
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
form : {
deviceType : "1"
},
dialogVisible : false,
fileList: [],
// 表单校验
rules: {
},
map : null,
obj : null,
gaoMap : null
}
},
components: {
FileUpload,
},
methods: {
show () {
this.dialogVisible = true;
......@@ -77,13 +91,34 @@
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
getFileInfo(res){
this.form.iconUrl = res.url;
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then(response => {
this.msgSuccess("修改成功");
});
} else {
addDeviceInfo(this.form).then(response => {
if(response.code == 200){
this.remove();
//done();
})
.catch(_ => {});
this.map.remove(this.obj);
this.form.deviceId = response.data;
this.gaoMap.addMarker(this.gaoMap.deviceType,this.form);
this.msgSuccess("新增成功");
}else{
this.msgSuccess("新增失败");
}
});
}
}
});
},
handleClose(done) {
done();
}
}
}
......
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="enterpriseId">
<el-input v-model="editForm.enterpriseId"></el-input>
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-form-item label="所属管道" prop="pipeCode">
<el-input v-model="form.pipeCode" placeholder="请输入所属管道" />
</el-form-item>
<el-form-item label="名称" prop="deviceName">
<el-input v-model="editForm.deviceName"></el-input>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="地址" prop="deviceAddr">
<el-input v-model="editForm.deviceAddr"></el-input>
<el-form-item label="所在地址" prop="deviceAddr">
<el-input v-model="form.deviceAddr" placeholder="请输入所在地址" />
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="editForm.linkman"></el-input>
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="型号" prop="deviceModel">
<el-input v-model="editForm.deviceModel"></el-input>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
<el-form-item label="经纬度" prop="deviceModel">
<el-row>
<el-col :span="6" style="margin-right: 10px">
<el-input v-model="editForm.longitude"></el-input>
</el-col>
<el-col :span="6">
<el-input v-model="editForm.latitude"></el-input>
</el-col>
</el-row>
<el-form-item label="物联网编号" prop="iotNo">
<el-input v-model="form.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
</el-col>
<el-form-item label="设备图片上传" prop="iconUrl">
<FileUpload :fileArr="fileList" @resFun="getFileInfo"/>
</el-form-item>
<el-form-item label="最后巡检日期" prop="inspectionTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
</el-col>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker clearable size="small"
v-model="form.installationTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择安装时间">
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { getAllDeviceInfo ,addDeviceInfo, updateDeviceInfo } from "@/api/device/deviceInfo";
import FileUpload from '@/components/FileUpload';
import { DEVICE_TYPE } from "utils/gaodeMap.js";
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
form : {
deviceType : "1"
},
dialogVisible : false,
fileList: [],
// 表单校验
rules: {
},
map : null,
obj : null,
gaoMap : null
}
},
components: {
FileUpload,
},
methods: {
show () {
this.dialogVisible = true;
......@@ -74,13 +91,34 @@
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
getFileInfo(res){
this.form.iconUrl = res.url;
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then(response => {
this.msgSuccess("修改成功");
});
} else {
addDeviceInfo(this.form).then(response => {
if(response.code == 200){
this.remove();
//done();
})
.catch(_ => {});
this.map.remove(this.obj);
this.form.deviceId = response.data;
this.gaoMap.addMarker(this.gaoMap.deviceType,this.form);
this.msgSuccess("新增成功");
}else{
this.msgSuccess("新增失败");
}
});
}
}
});
},
handleClose(done) {
done();
}
}
}
......
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="enterpriseId">
<el-input v-model="editForm.enterpriseId"></el-input>
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-form-item label="所属管道" prop="pipeCode">
<el-input v-model="form.pipeCode" placeholder="请输入所属管道" />
</el-form-item>
<el-form-item label="名称" prop="deviceName">
<el-input v-model="editForm.deviceName"></el-input>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="地址" prop="deviceAddr">
<el-input v-model="editForm.deviceAddr"></el-input>
<el-form-item label="所在地址" prop="deviceAddr">
<el-input v-model="form.deviceAddr" placeholder="请输入所在地址" />
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="editForm.linkman"></el-input>
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="型号" prop="deviceModel">
<el-input v-model="editForm.deviceModel"></el-input>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
<el-form-item label="经纬度" prop="deviceModel">
<el-row>
<el-col :span="6" style="margin-right: 10px">
<el-input v-model="editForm.longitude"></el-input>
</el-col>
<el-col :span="6">
<el-input v-model="editForm.latitude"></el-input>
</el-col>
</el-row>
<el-form-item label="物联网编号" prop="iotNo">
<el-input v-model="form.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
</el-col>
<el-form-item label="设备图片上传" prop="iconUrl">
<FileUpload :fileArr="fileList" @resFun="getFileInfo"/>
</el-form-item>
<el-form-item label="最后巡检日期" prop="inspectionTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
</el-col>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker clearable size="small"
v-model="form.installationTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择安装时间">
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { getAllDeviceInfo ,addDeviceInfo, updateDeviceInfo } from "@/api/device/deviceInfo";
import FileUpload from '@/components/FileUpload';
import { DEVICE_TYPE } from "utils/gaodeMap.js";
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
form : {
deviceType : "1"
},
dialogVisible : false,
fileList: [],
// 表单校验
rules: {
},
map : null,
obj : null,
gaoMap : null
}
},
components: {
FileUpload,
},
methods: {
show () {
this.dialogVisible = true;
......@@ -74,13 +91,34 @@
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
getFileInfo(res){
this.form.iconUrl = res.url;
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then(response => {
this.msgSuccess("修改成功");
});
} else {
addDeviceInfo(this.form).then(response => {
if(response.code == 200){
this.remove();
//done();
})
.catch(_ => {});
this.map.remove(this.obj);
this.form.deviceId = response.data;
this.gaoMap.addMarker(this.gaoMap.deviceType,this.form);
this.msgSuccess("新增成功");
}else{
this.msgSuccess("新增失败");
}
});
}
}
});
},
handleClose(done) {
done();
}
}
}
......
......@@ -2,9 +2,9 @@
import regulatorBox from "../components/PopWindow/regulatorBox.vue";
import valveWell from "../components/PopWindow/valveWell.vue";
import flowMeter from "../components/PopWindow/flowMeter.vue";
import dutyPerson from "../components/PopWindow/dutyPerson.vue";
import pipelineView from "../components/PopWindow/pipelineView.vue";
import lineInfoWindow from "../components/PopWindow/lineInfoWindow.vue";
import { delDeviceInfo } from "@/api/device/deviceInfo";
import markerInfoWindow from "../components/PopWindow/markerInfoWindow.vue";
import vue from "../main";
let defaultCenter = "石家庄";
......@@ -111,14 +111,17 @@ class gaodeMap {
this.setMarkerIcon(marker);
marker.on("mouseover", infoOpen);
marker.on("mouseout", infoClose);
marker.setExtData(data);
that.deviceType = markerType;
let editWindow = that.createInfowindow();
marker.on("click", function(e) {
if ("edit" == that.mapOperateType) {
editWindow.form = e.target.getExtData();
editWindow.show();
} else if ("delete" == that.mapOperateType) {
if (confirm("确认删除") == true) {
map.remove(marker);
that.deleteMarker(markerType,data.deviceId);
}
} else {
map.setZoomAndCenter(13, e.target.getPosition());
......@@ -130,9 +133,8 @@ class gaodeMap {
}
});
marker.on("dragend", function(e) {
editWindow.editForm.longitude = e.lnglat.lng;
editWindow.editForm.latitude = e.lnglat.lat;
console.log(e.lnglat, "rrrr====");
editWindow.form.longitude = e.lnglat.lng;
editWindow.form.latitude = e.lnglat.lat;
});
this.markers.push(marker);
map.setZoom("11");
......@@ -216,10 +218,19 @@ class gaodeMap {
case DEVICE_TYPE.FLOWMETER :{
return html;
}
case DEVICE_TYPE.DUTYPERSON :{
return html;
}
}
/**
* 删除marker
* @param delType
* @param deviceId
*/
deleteMarker(delType,deviceId){
if(DEVICE_TYPE.REGEULATORBOX == delType || DEVICE_TYPE.VALUEWELL == delType || DEVICE_TYPE.FLOWMETER == delType){
delDeviceInfo(deviceId);
}
}
/**
......@@ -255,7 +266,7 @@ class gaodeMap {
case DEVICE_TYPE.DUTYPERSON: {
let icon = new AMap.Icon({
//size: new AMap.Size(51, 23),
image: require("../assets/images/tiaoyaxiang.png"),
image: require("../assets/images/zhibaorenyuan.png"),
});
marker.setIcon(icon);
break;
......@@ -480,10 +491,13 @@ class gaodeMap {
this.mouseTool.on("draw", function(e) {
if (e.obj.getExtData().type != "newLine") {
const device = that.createInfowindow();
device.map = map;
device.obj = e.obj;
device.gaoMap = that;
e.obj.on("click", function(aa) {
let postion = aa.target._position;
device.editForm.longitude = postion.lng;
device.editForm.latitude = postion.lat;
device.form.longitude = postion.lng;
device.form.latitude = postion.lat;
device.show();
});
}
......@@ -525,11 +539,6 @@ class gaodeMap {
title: "流量计"
});
}
case DEVICE_TYPE.DUTYPERSON: {
return createPop(dutyPerson, {
title: "值班人员"
});
}
}
}
......@@ -543,8 +552,7 @@ class gaodeMap {
if (
DEVICE_TYPE.REGEULATORBOX == deviceType ||
DEVICE_TYPE.VALUEWELL == deviceType ||
DEVICE_TYPE.FLOWMETER == deviceType ||
DEVICE_TYPE.DUTYPERSON == deviceType
DEVICE_TYPE.FLOWMETER == deviceType
) {
that.mouseTool.marker({
draggable: true
......
......@@ -45,7 +45,6 @@
<el-option label="调压箱" value="2"></el-option>
<el-option label="阀门井" value="3"></el-option>
<el-option label="流量计" value="4"></el-option>
<el-option label="值班人员" value="5"></el-option>
</el-select>
</div>
</template>
......@@ -61,8 +60,6 @@ export default {
value: "",
operateType: "",
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
pipeId: null,
deviceName: null,
......
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