Commit 3547059e authored by 王晓倩's avatar 王晓倩

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

parents 210f98a3 91ba7080
<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> <template>
<el-dialog <el-dialog
title="新增" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="80%" width="80%"
:before-close="handleClose"> :before-close="handleClose">
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<el-form-item label="地址" prop="c"> <el-form-item label="地址" prop="c">
<el-input></el-input> <el-input></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属管道" prop="c">
<el-input></el-input>
</el-form-item>
<el-form-item label="联系人" prop="d"> <el-form-item label="联系人" prop="d">
<el-input></el-input> <el-input></el-input>
</el-form-item> </el-form-item>
...@@ -48,9 +51,7 @@ ...@@ -48,9 +51,7 @@
<script> <script>
export default { export default {
props: { props: {
title: { type: String }, title: { type: String }
//message: { type: String },
//duration: { type: Number, default: 2000 }
}, },
data () { data () {
return { return {
...@@ -61,20 +62,16 @@ ...@@ -61,20 +62,16 @@
}, },
methods: { methods: {
show () { show () {
//this.isShow = true;
this.dialogVisible = true; this.dialogVisible = true;
/*setTimeout(() => {
this.hide()
}, this.duration)*/
}, },
hide () { hide () {
this.isShow = false
this.remove() this.remove()
}, },
handleClose(done) { handleClose(done) {
this.$confirm('确认关闭?') this.$confirm('确认关闭?')
.then(_ => { .then(_ => {
done(); this.remove();
//done();
}) })
.catch(_ => {}); .catch(_ => {});
} }
...@@ -82,17 +79,4 @@ ...@@ -82,17 +79,4 @@
} }
</script> </script>
<style lang="scss">
.notice {
background: white;
position: fixed;
top: 102px;
right: 0;
left: 0;
margin: auto;
width: 80%;
height: 80%;
border: solid 1px;
}
</style>
<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="b">
<el-input ></el-input>
</el-form-item>
<el-form-item label="地址" prop="c">
<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="f">
<el-input></el-input>
</el-form-item>
<el-form-item label="安装日期" prop="g">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="最后巡检日期" prop="k">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" style="width: 100%;"></el-date-picker>
</el-col>
</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="a">
<el-input></el-input>
</el-form-item>
<el-form-item label="名称" prop="b">
<el-input ></el-input>
</el-form-item>
<el-form-item label="地址" prop="c">
<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="f">
<el-input></el-input>
</el-form-item>
<el-form-item label="安装日期" prop="g">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="最后巡检日期" prop="k">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" style="width: 100%;"></el-date-picker>
</el-col>
</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>
import createPop from "./createPop"; import createPop from "./createPop";
import regulatorBoxOrValveWell from "../components/PopWindow/regulatorBoxOrValveWell.vue" 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"
let defaultCenter = "石家庄"; let defaultCenter = "石家庄";
export let map; export let map;
class gaodeMap { const PIPEPLINE = "1";
const REGEULATORBOX = "2";
const VALUEWELL = "3";
const FLOWMETER = "4";
const DUTYPERSON = "5";
class gaodeMap {
//构造函数中设置中央点默认值 //构造函数中设置中央点默认值
constructor(center) { constructor(center) {
this.center = center?center:defaultCenter; this.center = center?center:defaultCenter;
...@@ -173,25 +181,68 @@ class gaodeMap { ...@@ -173,25 +181,68 @@ class gaodeMap {
this.overlays = []; this.overlays = [];
let that = this; let that = this;
this.mouseTool.on('draw',function(e){ this.mouseTool.on('draw',function(e){
const device = that.createInfowindow();
e.obj.on("click",function (aa) { e.obj.on("click",function (aa) {
console.log(aa.target._position) console.log(aa.target._position)
that.openInfowindow(); device.show();
}) })
that.overlays.push(e.obj); that.overlays.push(e.obj);
that.mouseTool.close(); that.mouseTool.close();
}); });
} }
openInfowindow(){ /**
const notice = createPop(regulatorBoxOrValveWell, { * 创建弹框事件
*/
createInfowindow(){
switch (this.deviceType){
case PIPEPLINE :{
break;
}
case REGEULATORBOX :{
return createPop(regulatorBox, {
title: '调压箱' title: '调压箱'
}) });
notice.show() }
case VALUEWELL :{
return createPop(valveWell, {
title: '阀门井'
});
}
case FLOWMETER :{
return createPop(flowMeter, {
title: '流量计'
});
}
case DUTYPERSON :{
return createPop(dutyPerson, {
title: '值班人员'
});
}
}
} }
draw(type){ /**
* 鼠标画图事件
* @param deviceType 设备类型
*/
draw(deviceType){
let that = this; let that = this;
switch(type){ that.deviceType = deviceType;
if(REGEULATORBOX == deviceType || VALUEWELL == deviceType || FLOWMETER == deviceType || DUTYPERSON == deviceType){
that.mouseTool.marker({
draggable: true
});
}
if(PIPEPLINE == deviceType){
that.mouseTool.polyline({
strokeWeight: 9,
strokeColor:'#80d8ff'
//同Polyline的Option设置
});
}
/*switch(type){
case 'marker':{ case 'marker':{
that.mouseTool.marker({ that.mouseTool.marker({
draggable: true draggable: true
...@@ -206,7 +257,7 @@ class gaodeMap { ...@@ -206,7 +257,7 @@ class gaodeMap {
}); });
break; break;
} }
} }*/
} }
/** /**
......
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
<el-option label="调压箱" value="2"></el-option> <el-option label="调压箱" value="2"></el-option>
<el-option label="阀门井" value="3"></el-option> <el-option label="阀门井" value="3"></el-option>
<el-option label="流量计" value="4"></el-option> <el-option label="流量计" value="4"></el-option>
<el-option label="物联网燃气表" value="5"></el-option> <el-option label="值班人员" value="5"></el-option>
<el-option label="值班人员" value="6"></el-option>
</el-select> </el-select>
</div> </div>
...@@ -76,16 +75,16 @@ ...@@ -76,16 +75,16 @@
this.operationType = "add"; this.operationType = "add";
}, },
editDevice(){ editDevice(){
this.deviceType = true; this.deviceType = false;
this.operationType = "edit"; this.operationType = "edit";
}, },
deleteDevice(){ deleteDevice(){
this.deviceType = true; this.deviceType = false;
this.operationType = "delete"; this.operationType = "delete";
}, },
selectDeviceType(val){ selectDeviceType(val){
if("add" == this.operationType){ if("add" == this.operationType){
this.gaoMap.draw("marker") this.gaoMap.draw(val)
} }
this.deviceType = false; this.deviceType = false;
this.value = ""; this.value = "";
......
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