|
|
|
@ -81,7 +81,7 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { updateCoordinate } from "@/utils/api/index";
|
|
|
|
|
import { updateCoordinate, getCoordinate } from "@/utils/api/index";
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
title: String,
|
|
|
|
@ -125,6 +125,7 @@ export default {
|
|
|
|
|
this.picsrc = obj.path;
|
|
|
|
|
this.channelId = obj.id;
|
|
|
|
|
this.photoId = obj.photoId;
|
|
|
|
|
this.getcanvansPic(this.pictureData, this.channelId);
|
|
|
|
|
// console.log(this.picsrc);
|
|
|
|
|
},
|
|
|
|
|
//获取线宽
|
|
|
|
@ -139,16 +140,36 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
display(val) {
|
|
|
|
|
this.isShow = true;
|
|
|
|
|
console.log(val);
|
|
|
|
|
this.pictureData = val; //获取当前列表数据
|
|
|
|
|
this.picoptions = val.list; //获取所有通道
|
|
|
|
|
this.picvalue = val.list[0].name; //获取第一个通道
|
|
|
|
|
this.picsrc = val.list[0].path;
|
|
|
|
|
this.channelId = val.list[0].id;
|
|
|
|
|
this.termId = val.id;
|
|
|
|
|
this.markId = val.markId;
|
|
|
|
|
this.cmdid = val.cmdid;
|
|
|
|
|
this.photoId = val.list[0].photoId;
|
|
|
|
|
this.picvalue = val.list[0].name; //获取第一个通道
|
|
|
|
|
this.termId = val.id; //装置id
|
|
|
|
|
this.getcanvansPic(val, this.channelId);
|
|
|
|
|
},
|
|
|
|
|
hide() {
|
|
|
|
|
this.isShow = false;
|
|
|
|
|
this.pictureData = "";
|
|
|
|
|
this.picoptions = [];
|
|
|
|
|
this.picvalue = "";
|
|
|
|
|
},
|
|
|
|
|
getcanvansPic(val, channelid) {
|
|
|
|
|
getCoordinate({
|
|
|
|
|
channelId: channelid,
|
|
|
|
|
needPic: "0",
|
|
|
|
|
termId: this.termId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.picsrc = res.data.path;
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
|
|
|
|
|
// this.picsrc = val.list[0].path;
|
|
|
|
|
|
|
|
|
|
// this.markId = val.markId;
|
|
|
|
|
// this.cmdid = val.cmdid;
|
|
|
|
|
// this.photoId = val.list[0].photoId;
|
|
|
|
|
console.log("this.canvas");
|
|
|
|
|
this.$nextTick(function () {
|
|
|
|
|
// codeing
|
|
|
|
@ -166,13 +187,6 @@ export default {
|
|
|
|
|
this.drawline();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
hide() {
|
|
|
|
|
this.isShow = false;
|
|
|
|
|
this.pictureData = "";
|
|
|
|
|
this.picoptions = [];
|
|
|
|
|
this.picvalue = "";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mousedown(e) {
|
|
|
|
|
//console.log("鼠标落下");
|
|
|
|
|
this.saveDrawingSurface();
|
|
|
|
|