| | |
| | | @click="undo" |
| | | :disabled="disableSelect" |
| | | style="position:absolute;left:25px;top:400px;font-size:2rem;cursor:pointer" |
| | | ></span> --> |
| | | ></span>--> |
| | | </el-tooltip> |
| | | <!-- <el-button type="default" @click="undo()">撤销</el-button> --> |
| | | </el-col> |
| | |
| | | class="iconfont icongengxin" |
| | | @click="refresh" |
| | | style="position:absolute;left:930px;font-size:2.5rem;cursor:pointer;color:white" |
| | | ></span> --> |
| | | ></span>--> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | name: "canvasDialog", |
| | | data() { |
| | | return { |
| | | backImg: require("../../assets/baseimg.png"), |
| | | backImg: require("../../assets/img/baseimg.png"), |
| | | url: "", // canvas图片的二进制格式转为dataURL格式 |
| | | type: "0", // 绘图状态 '0'为选中删除,'1'为画线,‘2’为画矩形,‘4’为画箭头,‘5’为画多边形 |
| | | points: [], // 记录绘制多边形时的各点坐标,绘制多边形时由于不是一笔完成,以数组数据做始终闭合的图形,双击后录成快照,把数组内容转移到最终数据中,然后清空数组 |
| | |
| | | src: this.c.toDataURL("image/png") |
| | | }); |
| | | this.delCursor = { type: -1, index: -1, remarksName: "", id: "" } |
| | | |
| | | |
| | | console.log("画布初始化"); |
| | | }, |
| | | // 取消画布清除状态函数 |
| | |
| | | } |
| | | // console.log("撤销!",this.canvasData); |
| | | }, |
| | | disabledOthers(type){ |
| | | console.log("当前type:",type) |
| | | disabledOthers(type) { |
| | | console.log("当前type:", type) |
| | | switch (type) { |
| | | case "1": |
| | | this.disableLine = false |
| | |
| | | this.disableLine = true |
| | | this.disableRect = true |
| | | this.disableArrow = true |
| | | this.disablePolygon = false |
| | | this.disablePolygon = false |
| | | this.disableSelect = true |
| | | break |
| | | } |
| | | console.log("禁用直线:",this.disableLine) |
| | | console.log("禁用矩形:",this.disableRect) |
| | | console.log("禁用箭头:",this.disableArrow) |
| | | console.log("禁用多边形:",this.disablePolygon) |
| | | console.log("禁用直线:", this.disableLine) |
| | | console.log("禁用矩形:", this.disableRect) |
| | | console.log("禁用箭头:", this.disableArrow) |
| | | console.log("禁用多边形:", this.disablePolygon) |
| | | }, |
| | | undisabled() { |
| | | this.disableLine = false |