|
@@ -104,6 +104,26 @@
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="异常描述" :visible.sync="dialogVisible" width="50%">
|
|
|
|
+
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableData"
|
|
|
|
+ max-height="500"
|
|
|
|
+ style="width: 100%">
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="analysisTypeName"
|
|
|
|
+ label="类型"
|
|
|
|
+ width="300">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="errDesc"
|
|
|
|
+ label="描述"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -127,6 +147,8 @@ import icon04 from "../../assets/img/icon04.png";
|
|
import icon05 from "../../assets/img/icon05.png";
|
|
import icon05 from "../../assets/img/icon05.png";
|
|
import icon06 from "../../assets/img/icon06.png";
|
|
import icon06 from "../../assets/img/icon06.png";
|
|
import defaultIcon from "../../assets/img/icon05.png";
|
|
import defaultIcon from "../../assets/img/icon05.png";
|
|
|
|
+import { queryErrDescByEngine } from "@/api/ledger.js";
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
windEngineGroupByFieldCodeDetail: {
|
|
windEngineGroupByFieldCodeDetail: {
|
|
@@ -139,6 +161,8 @@ export default {
|
|
name: "T-map",
|
|
name: "T-map",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ dialogVisible: false,
|
|
|
|
+ tableData:[],
|
|
hoverInfo: null,
|
|
hoverInfo: null,
|
|
hoverStyle: {
|
|
hoverStyle: {
|
|
position: "absolute",
|
|
position: "absolute",
|
|
@@ -184,9 +208,9 @@ export default {
|
|
layers: [
|
|
layers: [
|
|
new TileLayer({
|
|
new TileLayer({
|
|
source: new XYZ({
|
|
source: new XYZ({
|
|
- url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
|
|
|
|
|
|
+ // url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
|
|
// url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
|
|
// url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
|
|
- // url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
|
|
|
|
|
|
+ url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
|
|
}),
|
|
}),
|
|
}),
|
|
}),
|
|
new VectorLayer({
|
|
new VectorLayer({
|
|
@@ -274,65 +298,75 @@ export default {
|
|
/**
|
|
/**
|
|
* 初始化地图事件
|
|
* 初始化地图事件
|
|
*/
|
|
*/
|
|
- initEvent() {
|
|
|
|
- this.map.on("pointermove", (evt) => {
|
|
|
|
- const features = this.map.getFeaturesAtPixel(evt.pixel, {
|
|
|
|
- hitTolerance: 1,
|
|
|
|
- });
|
|
|
|
- if (features && features.length > 0) {
|
|
|
|
- const feature = features.at(0);
|
|
|
|
- const val = feature.get("data").val;
|
|
|
|
- if (val == "1") {
|
|
|
|
- this.hoverInfo = feature.get("data");
|
|
|
|
- this.hoverStyle.left = `${evt.pixel[0] + 10}px`;
|
|
|
|
- this.hoverStyle.top = `${evt.pixel[1] - 150}px`;
|
|
|
|
- } else if (val == "4") {
|
|
|
|
- this.hoverfengji = feature.get("data");
|
|
|
|
- this.hoverfengjiStyle.left = `${evt.pixel[0] + 10}px`;
|
|
|
|
- this.hoverfengjiStyle.top = `${evt.pixel[1] - 150}px`;
|
|
|
|
- this.currentFeatureData = feature.get("data");
|
|
|
|
- } else if (val == "5") {
|
|
|
|
- this.hoverta = feature.get("data");
|
|
|
|
- this.hovertaStyle.left = `${evt.pixel[0] + 10}px`;
|
|
|
|
- this.hovertaStyle.top = `${evt.pixel[1] - 150}px`;
|
|
|
|
- this.currentFeatureData = feature.get("data");
|
|
|
|
- } else if (val == "6") {
|
|
|
|
- this.currentFeatureData = feature.get("data");
|
|
|
|
- } else {
|
|
|
|
- this.hoverInfo = null;
|
|
|
|
- this.hoverfengji = false;
|
|
|
|
- this.hoverta = false;
|
|
|
|
- this.currentFeatureData = null;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.hoverInfo = null;
|
|
|
|
- this.hoverfengji = false;
|
|
|
|
- this.hoverta = false;
|
|
|
|
- this.currentFeatureData = null;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ initEvent() {
|
|
|
|
+ this.map.on("pointermove", (evt) => {
|
|
|
|
+ const features = this.map.getFeaturesAtPixel(evt.pixel, {
|
|
|
|
+ hitTolerance: 1,
|
|
|
|
+ });
|
|
|
|
+ if (features && features.length > 0) {
|
|
|
|
+ const feature = features.at(0);
|
|
|
|
+ const val = feature.get("data").val;
|
|
|
|
+ if (val == "1") {
|
|
|
|
+ this.hoverInfo = feature.get("data");
|
|
|
|
+ this.hoverStyle.left = `${evt.pixel[0] + 10}px`;
|
|
|
|
+ this.hoverStyle.top = `${evt.pixel[1] - 150}px`;
|
|
|
|
+ } else if (val == "4") {
|
|
|
|
+ this.hoverfengji = feature.get("data");
|
|
|
|
+ this.hoverfengjiStyle.left = `${evt.pixel[0] + 10}px`;
|
|
|
|
+ this.hoverfengjiStyle.top = `${evt.pixel[1] - 150}px`;
|
|
|
|
+ this.currentFeatureData = feature.get("data");
|
|
|
|
+ } else if (val == "5") {
|
|
|
|
+ this.hoverta = feature.get("data");
|
|
|
|
+ this.hovertaStyle.left = `${evt.pixel[0] + 10}px`;
|
|
|
|
+ this.hovertaStyle.top = `${evt.pixel[1] - 150}px`;
|
|
|
|
+ this.currentFeatureData = feature.get("data");
|
|
|
|
+ } else if (val == "6") {
|
|
|
|
+ this.currentFeatureData = feature.get("data");
|
|
|
|
+ } else {
|
|
|
|
+ this.hoverInfo = null;
|
|
|
|
+ this.hoverfengji = false;
|
|
|
|
+ this.hoverta = false;
|
|
|
|
+ this.currentFeatureData = null;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.hoverInfo = null;
|
|
|
|
+ this.hoverfengji = false;
|
|
|
|
+ this.hoverta = false;
|
|
|
|
+ this.currentFeatureData = null;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
- this.map.on("click", (evt) => {
|
|
|
|
- const features = this.map.getFeaturesAtPixel(evt.pixel, {
|
|
|
|
- hitTolerance: 1,
|
|
|
|
- });
|
|
|
|
- if (features && features.length > 0) {
|
|
|
|
- const feature = features.at(0);
|
|
|
|
- const val = feature.get("data").val;
|
|
|
|
- if (val === "6") {
|
|
|
|
- this.handleFeatureClick(feature.get("data"));
|
|
|
|
- } else {
|
|
|
|
- this.$emit("feature-click", feature.get("data"));
|
|
|
|
- }
|
|
|
|
- } else if (this.currentFeatureData && this.currentFeatureData.val === "6") {
|
|
|
|
- this.handleFeatureClick(this.currentFeatureData);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-},
|
|
|
|
-handleFeatureClick(featureData) {
|
|
|
|
-alert('555555')
|
|
|
|
-},
|
|
|
|
|
|
+ this.map.on("click", (evt) => {
|
|
|
|
+ const features = this.map.getFeaturesAtPixel(evt.pixel, {
|
|
|
|
+ hitTolerance: 1,
|
|
|
|
+ });
|
|
|
|
+ if (features && features.length > 0) {
|
|
|
|
+ const feature = features.at(0);
|
|
|
|
+ const val = feature.get("data").val;
|
|
|
|
+ if (val === "6") {
|
|
|
|
+ this.handleFeatureClick(feature.get("data"));
|
|
|
|
+ } else {
|
|
|
|
+ this.$emit("feature-click", feature.get("data"));
|
|
|
|
+ }
|
|
|
|
+ } else if (
|
|
|
|
+ this.currentFeatureData &&
|
|
|
|
+ this.currentFeatureData.val === "6"
|
|
|
|
+ ) {
|
|
|
|
+ this.handleFeatureClick(this.currentFeatureData);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleFeatureClick(featureData) {
|
|
|
|
|
|
|
|
+ let dateArr = {
|
|
|
|
+ batchCode: this.$route.query.batchCode,
|
|
|
|
+ engineCode: featureData.engineCode,
|
|
|
|
+ };
|
|
|
|
+ queryErrDescByEngine(dateArr).then((res) => {
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
+ this.tableData=res.data
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
|
|
/**
|
|
/**
|
|
* 平移缩放
|
|
* 平移缩放
|