Commit 1ed1ce44 authored by 纪泽龙's avatar 纪泽龙

gis搜索优化完成

parent 59af78cf
...@@ -83,6 +83,11 @@ ...@@ -83,6 +83,11 @@
<div> <div>
详细信息:<span>{{ alarmValue ? alarmValue : "-" }}</span> 详细信息:<span>{{ alarmValue ? alarmValue : "-" }}</span>
</div> </div>
<div v-if="!orderId">
工单编号:<span>{{
obj.polyline.getExtData().lineData.orderId
}}</span>
</div>
</div> </div>
<div @click.stop="stopPropatation" class="btn"> <div @click.stop="stopPropatation" class="btn">
<span @mousedown.stop="deviceMore"> <span @mousedown.stop="deviceMore">
...@@ -91,6 +96,9 @@ ...@@ -91,6 +96,9 @@
<span v-if="orderId" @mousedown.stop="createWork"> <span v-if="orderId" @mousedown.stop="createWork">
<el-button class="elbtn" type="primary">生成工单</el-button> <el-button class="elbtn" type="primary">生成工单</el-button>
</span> </span>
<span v-else @mousedown.stop="checkWork">
<el-button class="elbtn" type="primary">查看工单</el-button>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -151,29 +159,35 @@ export default { ...@@ -151,29 +159,35 @@ export default {
this.obj.polyline.getExtData().lineData.alarmId; this.obj.polyline.getExtData().lineData.alarmId;
this.obj.polyline.getExtData().lineData.view.$refs.CreateWork.open = true; this.obj.polyline.getExtData().lineData.view.$refs.CreateWork.open = true;
// 改变外层回调 // 改变外层回调
this.obj.polyline.getExtData().lineData.view.alarmObjChange({
this.obj.polyline.getExtData().lineData.view.CreateWorkCallBack = alarmId: this.obj.polyline.getExtData().lineData.alarmId,
this.CreateWorkCallBack; type: "pipe",
}, });
close() { // this.obj.polyline.getExtData().lineData.view.CreateWorkCallBack(this.CreateWorkCallBack)
this.obj.polyline.infoWindow.close();
}, },
CreateWorkCallBack() { checkWork() {
console.log("polylineCallBack"); this.obj.polyline.getExtData().class.view.$router.push({
const polyline = this.obj.polyline path: "/basicsInfo/detail",
.getExtData() query: {
.lineData.view.gaoMap.polyLines.filter((item) => { orderId: this.obj.polyline.getExtData().lineData.orderId,
return ( },
item.getExtData().lineData.alarmId == });
this.obj.polyline.getExtData().lineData.alarmId
);
})[0];
console.log("polyline.getExtData()", polyline.getExtData().lineData);
let options = polyline.getExtData();
// 暂时传值,到时候回重新刷新
options.lineData.orderId = "1";
polyline.setExtData(options);
}, },
// // CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
// // const polyline = this.obj.polyline
// // .getExtData()
// // .lineData.view.gaoMap.polyLines.filter((item) => {
// // return (
// // item.getExtData().lineData.alarmId ==
// // this.obj.polyline.getExtData().lineData.alarmId
// // );
// // })[0];
// // let options = polyline.getExtData();
// // // 暂时传值,到时候回重新刷新
// // options.lineData.orderId = e;
// // polyline.setExtData(options);
// },
deviceMore() { deviceMore() {
console.log(this.obj.polyline.getExtData().lineData); console.log(this.obj.polyline.getExtData().lineData);
this.obj.polyline.getExtData().class.view.$router.push({ this.obj.polyline.getExtData().class.view.$router.push({
...@@ -183,6 +197,9 @@ export default { ...@@ -183,6 +197,9 @@ export default {
}, },
}); });
}, },
close() {
this.obj.polyline.infoWindow.close();
},
}, },
}; };
</script> </script>
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
<div> <div>
详细信息:<span>{{ data.alarmValue ? data.alarmValue : "-" }}</span> 详细信息:<span>{{ data.alarmValue ? data.alarmValue : "-" }}</span>
</div> </div>
<div v-if="!orderId">
工单编号:<span>{{ data.orderId }}</span>
</div>
</div> </div>
<div class="btn"> <div class="btn">
<span @mousedown.stop="deviceMore"> <span @mousedown.stop="deviceMore">
...@@ -83,6 +86,9 @@ ...@@ -83,6 +86,9 @@
>生成工单</el-button >生成工单</el-button
> >
</span> </span>
<span v-else @mousedown.stop="checkWork">
<el-button class="elbtn" type="primary">查看工单</el-button>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -115,19 +121,24 @@ export default { ...@@ -115,19 +121,24 @@ export default {
this.data.view.$refs.CreateWork.open = true; this.data.view.$refs.CreateWork.open = true;
this.data.view.$refs.CreateWork.gaoMap = this.data.view.gaoMap; this.data.view.$refs.CreateWork.gaoMap = this.data.view.gaoMap;
// 改变外层回调 // 改变外层回调
this.data.view.CreateWorkCallBack = this.CreateWorkCallBack; // this.data.view.CreateWorkCallBack = this.CreateWorkCallBack;
}, this.data.view.alarmObjChange({
CreateWorkCallBack() { alarmId: this.data.alarmId,
// console.log("markerCallBack") type: "device",
const marker = this.data.view.gaoMap.markers.filter((item) => { });
return item.getExtData().alarmId == this.data.alarmId;
})[0];
// console.log("marer.getExtData()", marker.getExtData());
let options = marker.getExtData();
// 暂时传值,到时候回重新刷新
options.orderId = "1";
marker.setExtData(options);
}, },
// CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
// // console.log("markerCallBack");
// const marker = this.data.view.gaoMap.markers.filter((item) => {
// return item.getExtData().alarmId == this.data.alarmId;
// })[0];
// console.log("marer.getExtData()", marker.getExtData());
// let options = marker.getExtData();
// // 暂时传值,到时候回重新刷新
// options.orderId = e;
// marker.setExtData(options);
// },
deviceMore() { deviceMore() {
this.data.view.$router.push({ this.data.view.$router.push({
path: "/deviceAlarm/alarmdetail", path: "/deviceAlarm/alarmdetail",
...@@ -136,6 +147,15 @@ export default { ...@@ -136,6 +147,15 @@ export default {
}, },
}); });
}, },
// 查看工单
checkWork() {
this.data.view.$router.push({
path: "/basicsInfo/detail",
query: {
orderId: this.data.orderId,
},
});
},
}, },
beforeDestroy() { beforeDestroy() {
// this.data.view.createWorkOpen = false; // this.data.view.createWorkOpen = false;
......
...@@ -334,7 +334,7 @@ class gaodeMap { ...@@ -334,7 +334,7 @@ class gaodeMap {
map.setZoom("11"); map.setZoom("11");
} }
//map.setFitView(); //map.setFitView();
function infoClose(e) { function infoClose(e) {
let options = map.getStatus(); let options = map.getStatus();
options.scrollWheel = true; options.scrollWheel = true;
...@@ -351,6 +351,7 @@ class gaodeMap { ...@@ -351,6 +351,7 @@ class gaodeMap {
e.target.content = this.getMarketContent( e.target.data); e.target.content = this.getMarketContent( e.target.data);
e.target.infoWindow.setContent(e.target.content); e.target.infoWindow.setContent(e.target.content);
e.target.infoWindow.open(map, e.target.getPosition()); e.target.infoWindow.open(map, e.target.getPosition());
console.log("e.target.getPosition()",e.target.getExtData())
this.boxCollision(e.target.infoWindow.dom); this.boxCollision(e.target.infoWindow.dom);
// that.addCloneDome(e.target, infoWindow); // that.addCloneDome(e.target, infoWindow);
// infoWindow.close(); // infoWindow.close();
......
...@@ -48,11 +48,10 @@ ...@@ -48,11 +48,10 @@
>确 定</el-button >确 定</el-button
> >
<!-- <el-button @click="cancel">取 消</el-button> --> <!-- <el-button @click="cancel">取 消</el-button> -->
<el-button>取 消</el-button> <el-button @click.stop="close">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo"; import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
...@@ -76,12 +75,12 @@ export default { ...@@ -76,12 +75,12 @@ export default {
appointInspector: "", appointInspector: "",
remarks: "", remarks: "",
}, },
gaoMap:"", gaoMap: "",
open: false, open: false,
title: "", title: "",
inspector: [], inspector: [],
loading: false, loading: false,
alarmId:"", alarmId: "",
rules: { rules: {
orderName: [ orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" }, { required: true, message: "工单名称不能为空", trigger: "blur" },
...@@ -100,7 +99,7 @@ export default { ...@@ -100,7 +99,7 @@ export default {
open(value, oldValue) { open(value, oldValue) {
if (value) { if (value) {
console.log(this.alarmId); console.log(this.alarmId);
this.handleIssue(this.alarmId) this.handleIssue(this.alarmId);
} }
}, },
}, },
...@@ -130,14 +129,18 @@ export default { ...@@ -130,14 +129,18 @@ export default {
this.form.resourceId = this.form.alarmId; this.form.resourceId = this.form.alarmId;
this.form.orderType = "3"; this.form.orderType = "3";
addBasicsInfo(this.form).then((response) => { addBasicsInfo(this.form).then((response) => {
this.msgSuccess("生成工单成功"); if (response.code == 200) {
this.open = false; console.log(response.msg);
this.$emit("callback"); this.msgSuccess("生成工单成功");
this.open = false;
}
this.$emit("callback", 999);
}); });
} }
}); });
}, },
close() { close() {
console.log("关闭");
this.open = false; this.open = false;
}, },
}, },
......
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