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

地图修改

parent be221996
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</div> </div>
<div v-show="isShowVideo" v-drag <div v-show="isShowVideo" v-drag
style="display: none;position:absolute;left:1000px;top:10px;z-index: 30;padding: 5px; background-color: rgba(2, 40, 90, 0.8);width: 400px;height: 255px;border-radius: 5px;border: 1px solid #000;"> style="display: none;position:absolute;left:1000px;top:10px;z-index: 30;padding: 5px; background-color: rgba(2, 40, 90, 0.8);width: 400px;height: 255px;border-radius: 5px;border: 1px solid #000;">
<div style="width: 100%;height: 30px;"> <div style="width: 100%;height: 30px;">
<span style="float: left;color: #fff;font-size: 1rem;">{{deviceVideo.deviceName}}</span> <span style="float: left;color: #fff;font-size: 1rem;">{{deviceVideo.deviceName}}</span>
<span @click="closeVideo" style="float: right;margin-right: 10px;font-size: 1.5rem;color: #fff;" <span @click="closeVideo" style="float: right;margin-right: 10px;font-size: 1.5rem;color: #fff;"
class="el-icon-close"></span> class="el-icon-close"></span>
</div> </div>
<div id="div_video"></div> <div id="div_video"></div>
</div> </div>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</div> </div>
<div style=""> <div style="">
<div <div
style="width: 500px;height: 100%;z-index: 11;background-color: rgba(2, 40, 90, 0.7);position: absolute;top: 0;left: 10px;float: left;"> style="width: 500px;height: 100%;z-index: 11;background-color: rgba(2, 40, 90, 0.7);position: absolute;top: 0;left: 10px;float: left;">
<QyMapone></QyMapone> <QyMapone></QyMapone>
</div> </div>
<div class="markBox"> <div class="markBox">
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="markbox-click" ref="qyimg" @click="mapqiye" style="position: relative;"> <div class="markbox-click" ref="qyimg" @click="mapqiye" style="position: relative;">
<img width="15px" style="margin-top: 10px;" src="@/assets/mark/markqy.png" /> <img width="15px" style="margin-top: 10px;" src="@/assets/mark/markqy.png" />
<img src="@/assets/mark/selected.png" alt="" <img src="@/assets/mark/selected.png" alt=""
style="position: absolute;width: 16px; top: 0;right: 0"> style="position: absolute;width: 16px; top: 0;right: 0">
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div @click="mapwxy" ref="wxyimg" style="position: relative;"> <div @click="mapwxy" ref="wxyimg" style="position: relative;">
<img width="20px" style="margin-top: 10px;" src="@/assets/mark/weixianyuan.png" /> <img width="20px" style="margin-top: 10px;" src="@/assets/mark/weixianyuan.png" />
<img src="@/assets/mark/selected.png" alt="" <img src="@/assets/mark/selected.png" alt=""
style="position: absolute;width: 16px; top: 0;right: 0"> style="position: absolute;width: 16px; top: 0;right: 0">
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<div @click="mapshipin" ref="shipinimg" style="position: relative;"> <div @click="mapshipin" ref="shipinimg" style="position: relative;">
<img width="20px" style="margin-top: 10px;" src="@/assets/mark/jiankong.png" /> <img width="20px" style="margin-top: 10px;" src="@/assets/mark/jiankong.png" />
<img src="@/assets/mark/selected.png" alt="" <img src="@/assets/mark/selected.png" alt=""
style="position: absolute;width: 16px; top: 0;right: 0"> style="position: absolute;width: 16px; top: 0;right: 0">
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<div @click="yinhuan" ref="yhimg" style="position: relative;"> <div @click="yinhuan" ref="yhimg" style="position: relative;">
<img width="20px" style="margin-top: 10px;" src="@/assets/mark/yinhuan.png" /> <img width="20px" style="margin-top: 10px;" src="@/assets/mark/yinhuan.png" />
<img src="@/assets/mark/selected.png" alt="" <img src="@/assets/mark/selected.png" alt=""
style="position: absolute;width: 16px; top: 0;right: 0"> style="position: absolute;width: 16px; top: 0;right: 0">
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible2 = false">取 消</el-button> <el-button @click="cancel()">取 消</el-button>
<el-button type="primary" @click="dialogVisible2 = false">确 定</el-button> <el-button type="primary" @click="submit2()">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -179,9 +179,9 @@ ...@@ -179,9 +179,9 @@
pName: "MapType", pName: "MapType",
defaultType: 1, defaultType: 1,
}, },
{ {
pName: "ToolBar", pName: "ToolBar",
}, },
], ],
center: [115, 28], center: [115, 28],
zoom: 10, zoom: 10,
...@@ -205,10 +205,6 @@ ...@@ -205,10 +205,6 @@
// city: "石家庄", // city: "石家庄",
// citylimit: true, // citylimit: true,
// }; // };
@Prop(Object) goods!: {
};
@Prop(Object) trouble!: {
};
@Provide() lastVideoPlayId: any = ""; @Provide() lastVideoPlayId: any = "";
@Provide() markersB: any = []; @Provide() markersB: any = [];
@Provide() dialogVisible1: Boolean = false; @Provide() dialogVisible1: Boolean = false;
...@@ -224,16 +220,18 @@ ...@@ -224,16 +220,18 @@
@Provide() weihaiVisble: boolean = true; @Provide() weihaiVisble: boolean = true;
@Provide() yinhuanVisble: boolean = true; @Provide() yinhuanVisble: boolean = true;
@Provide() treecheckedObj: any = {}; @Provide() treecheckedObj: any = {};
@Provide() goods: any = {};
@Provide() trouble: any = {};
getMapData() { getMapData() {
let that = this; let that = this;
METHOD.axiosPost( METHOD.axiosPost(
that, that,
`/enterpriseInfo/queryEnterpriseInfo`, { `/enterpriseInfo/queryEnterpriseInfo`, {
page: 1, page: 1,
size: 1000, size: 1000,
accountStatus: "0" accountStatus: "0"
}, },
function (res: any) { function (res: any) {
if (res.code == 0 && res.data.pageData.length > 0) { if (res.code == 0 && res.data.pageData.length > 0) {
that.mapData = res.data.pageData; that.mapData = res.data.pageData;
...@@ -303,7 +301,7 @@ ...@@ -303,7 +301,7 @@
getWxyWindowInfo(goodsId: string) { getWxyWindowInfo(goodsId: string) {
let that = this; let that = this;
(window as any).dialogVisible1Change = function () { (window as any).dialogVisible1Change = function () {
that.dialogVisible1Change() that.dialogVisible1Change(goodsId);
}; };
METHOD.axiosGet( METHOD.axiosGet(
that, that,
...@@ -319,7 +317,7 @@ ...@@ -319,7 +317,7 @@
`<p><span>联系电话:</span>${goods.phone}</p>` + `<p><span>联系电话:</span>${goods.phone}</p>` +
`<p><span>危险等级:</span>${goods.dangerGrade}</p>` + `<p><span>危险等级:</span>${goods.dangerGrade}</p>` +
`</div>` + `</div>` +
`<p class="gengxin"><el-button onClick="dialogVisible1Change()" size="small">修改</el-button></p>`; `<p class="gengxin"><el-button onClick="dialogVisible1Change(${goods.id})" size="small">修改</el-button></p>`;
that.Mutil.addPopup(html, goods.id, goods.longitude, goods.latitude) that.Mutil.addPopup(html, goods.id, goods.longitude, goods.latitude)
} }
...@@ -348,7 +346,7 @@ ...@@ -348,7 +346,7 @@
getyinhuanWindowInfo(troubleId: string) { getyinhuanWindowInfo(troubleId: string) {
let that = this; let that = this;
(window as any).dialogVisible2Change = function () { (window as any).dialogVisible2Change = function () {
that.dialogVisible2Change() that.dialogVisible2Change(troubleId);
}; };
this.closeVideo(); this.closeVideo();
METHOD.axiosGet( METHOD.axiosGet(
...@@ -364,7 +362,7 @@ ...@@ -364,7 +362,7 @@
`<p><span>隐患等级:</span>${trouble.troubleLevel}</p >` + `<p><span>隐患等级:</span>${trouble.troubleLevel}</p >` +
`<p><span>地址:</span>${trouble.address}</p >` + `<p><span>地址:</span>${trouble.address}</p >` +
`</div>` + `</div>` +
`<p class="gengxin"><el-button onClick="dialogVisible2Change()" size="small">修改</el-button></p>`; `<p class="gengxin"><el-button onClick="dialogVisible2Change(${trouble.id})" size="small">修改</el-button></p>`;
that.Mutil.addPopup(html, trouble.id, trouble.longitude, trouble.latitude) that.Mutil.addPopup(html, trouble.id, trouble.longitude, trouble.latitude)
} }
...@@ -588,11 +586,72 @@ ...@@ -588,11 +586,72 @@
created() { created() {
this.getMapData(); this.getMapData();
} }
dialogVisible1Change() { cancel(){
this.dialogVisible1 = true; this.goods={};
this.trouble={};
this.dialogVisible1 = false;
this.dialogVisible2 = false;
}
dialogVisible1Change(goodsId: string) {
let that = this;
METHOD.axiosGet(
that,
`/enterpriseGoods/getMapEnterpriseGoodsById/${goodsId}`,
function (res: any) {
if (res.code == 0) {
console.log(res.data)
that.goods = res.data;
that.dialogVisible1 = true;
}
}
);
}
submit1() {
let that = this;
(that as any).$refs["goods"].validate((valid: Boolean) => {
if (valid) {
let param = Object.assign(that.goods);
METHOD.axiosPost(that, `/enterpriseGoods/editMapEnterpriseGoods`, param, function (res: any) {
if (res.code == 0) {
that.$message({
type: "success",
message: "修改危险源成功",
});
that.dialogVisible1 = false;
}
});
}
});
}
dialogVisible2Change(troubleId: string) {
let that = this;
METHOD.axiosGet(
that,
`/hiddenTrouble/getMapHiddenTroubleById/${troubleId}`,
function (res: any) {
if (res.code == 0) {
that.trouble = res.data;
that.dialogVisible2 = true;
}
}
);
} }
dialogVisible2Change() { submit2() {
this.dialogVisible2 = true; let that = this;
(that as any).$refs["trouble"].validate((valid: Boolean) => {
if (valid) {
let param = Object.assign(that.trouble);
METHOD.axiosPost(that, `/hiddenTrouble/editMapHiddenTrouble`, param, function (res: any) {
if (res.code == 0) {
that.$message({
type: "success",
message: "修改隐患成功",
});
}
that.dialogVisible2 = false;
});
}
});
} }
mounted() { mounted() {
......
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