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

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dcit-hcsystem-hcsystem-master/src/views/qyMap/qyMap.vue
parents 15fd9e26 25fa61ca
......@@ -130,8 +130,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取 消</el-button>
<el-button type="primary" @click="submit2()">确 定</el-button>
<el-button @click="dialogVisible2 = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible2 = false">确 定</el-button>
</div>
</el-dialog>
</div>
......@@ -205,6 +205,10 @@
// city: "石家庄",
// citylimit: true,
// };
@Prop(Object) goods!: {
};
@Prop(Object) trouble!: {
};
@Provide() lastVideoPlayId: any = "";
@Provide() markersB: any = [];
@Provide() dialogVisible1: Boolean = false;
......@@ -220,8 +224,6 @@
@Provide() weihaiVisble: boolean = true;
@Provide() yinhuanVisble: boolean = true;
@Provide() treecheckedObj: any = {};
@Provide() goods: any = {};
@Provide() trouble: any = {};
getMapData() {
let that = this;
......@@ -301,7 +303,7 @@
getWxyWindowInfo(goodsId: string) {
let that = this;
(window as any).dialogVisible1Change = function () {
that.dialogVisible1Change(goodsId);
that.dialogVisible1Change()
};
METHOD.axiosGet(
that,
......@@ -317,7 +319,7 @@
`<p><span>联系电话:</span>${goods.phone}</p>` +
`<p><span>危险等级:</span>${goods.dangerGrade}</p>` +
`</div>` +
`<p class="gengxin"><el-button onClick="dialogVisible1Change(${goods.id})" size="small">修改</el-button></p>`;
`<p class="gengxin"><el-button onClick="dialogVisible1Change()" size="small">修改</el-button></p>`;
that.Mutil.addPopup(html, goods.id, goods.longitude, goods.latitude)
}
......@@ -346,7 +348,7 @@
getyinhuanWindowInfo(troubleId: string) {
let that = this;
(window as any).dialogVisible2Change = function () {
that.dialogVisible2Change(troubleId);
that.dialogVisible2Change()
};
this.closeVideo();
METHOD.axiosGet(
......@@ -362,7 +364,7 @@
`<p><span>隐患等级:</span>${trouble.troubleLevel}</p >` +
`<p><span>地址:</span>${trouble.address}</p >` +
`</div>` +
`<p class="gengxin"><el-button onClick="dialogVisible2Change(${trouble.id})" size="small">修改</el-button></p>`;
`<p class="gengxin"><el-button onClick="dialogVisible2Change()" size="small">修改</el-button></p>`;
that.Mutil.addPopup(html, trouble.id, trouble.longitude, trouble.latitude)
}
......@@ -586,72 +588,11 @@
created() {
this.getMapData();
}
cancel(){
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;
}
dialogVisible1Change() {
this.dialogVisible1 = true;
}
);
}
submit2() {
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;
});
}
});
dialogVisible2Change() {
this.dialogVisible2 = true;
}
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