|
@@ -1,7 +1,8 @@
|
|
<template>
|
|
<template>
|
|
<div id="baseCanvas" @mouseover="mouseOver" @mouseleave="mouseLeave">
|
|
<div id="baseCanvas" @mouseover="mouseOver" @mouseleave="mouseLeave">
|
|
<!-- <BaseCanvas class="sign-canvas" ref="SignCanvas" :options="options"/> -->
|
|
<!-- <BaseCanvas class="sign-canvas" ref="SignCanvas" :options="options"/> -->
|
|
- <BaseKonvaCanvas class="sign-canvas" ref="SignCanvas" status="line"/>
|
|
|
|
|
|
+ <!-- <BaseCanvas class="sign-canvas" ref="SignCanvas" :options="options" :status="curMode"/> -->
|
|
|
|
+ <BaseKonva class="sign-canvas" ref="SignCanvas" :options="options"/>
|
|
<div class="canvas-tools animated fadeIn" ref="canvasTools">
|
|
<div class="canvas-tools animated fadeIn" ref="canvasTools">
|
|
<span :class="['canvas-tools-item',curMode === 'move' ? 'tools-active' : '']" @click="doMove()" style="border-radius: 15px 0 0 0;">
|
|
<span :class="['canvas-tools-item',curMode === 'move' ? 'tools-active' : '']" @click="doMove()" style="border-radius: 15px 0 0 0;">
|
|
<Icon custom="iconfont icon-left-arrow" size="20"/>
|
|
<Icon custom="iconfont icon-left-arrow" size="20"/>
|
|
@@ -56,11 +57,10 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
- import BaseCanvas from './BaseCanvas.vue';
|
|
|
|
- import BaseKonvaCanvas from '@/view/task/mark/MarkCanvas.vue'
|
|
|
|
|
|
+ import BaseCanvas from '@/view/task/mark/MarkCanvas.vue';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- BaseCanvas,BaseKonvaCanvas
|
|
|
|
|
|
+ BaseCanvas
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
vm:{
|
|
vm:{
|
|
@@ -95,6 +95,8 @@
|
|
activeColor: 'black',
|
|
activeColor: 'black',
|
|
curMode:'paint',
|
|
curMode:'paint',
|
|
options: {
|
|
options: {
|
|
|
|
+ width: 1200, //画布宽度
|
|
|
|
+ height: 480,
|
|
textColor:'red',
|
|
textColor:'red',
|
|
textSize:16,
|
|
textSize:16,
|
|
isDpr: false, //是否使用dpr兼容高分屏 [Boolean] 可选
|
|
isDpr: false, //是否使用dpr兼容高分屏 [Boolean] 可选
|
|
@@ -109,6 +111,8 @@
|
|
borderWidth: 2, // 网格线宽度 [Number] 可选
|
|
borderWidth: 2, // 网格线宽度 [Number] 可选
|
|
borderColor: "#7c7c7c", //网格颜色 [String] 可选
|
|
borderColor: "#7c7c7c", //网格颜色 [String] 可选
|
|
writeWidth: 5, //基础轨迹宽度 [Number] 可选
|
|
writeWidth: 5, //基础轨迹宽度 [Number] 可选
|
|
|
|
+ lineColor: 'red', // 轨迹颜色 [String] 可选
|
|
|
|
+ lineWidth: 5, //基础轨迹宽度 [Number] 可选
|
|
writeColor: 'red', // 轨迹颜色 [String] 可选
|
|
writeColor: 'red', // 轨迹颜色 [String] 可选
|
|
isSign: true, //签名模式 [Boolean] 默认为非签名模式,有线框, 当设置为true的时候没有任何线框
|
|
isSign: true, //签名模式 [Boolean] 默认为非签名模式,有线框, 当设置为true的时候没有任何线框
|
|
imgType: 'png' //下载的图片格式 [String] 可选为 jpeg canvas本是透明背景的
|
|
imgType: 'png' //下载的图片格式 [String] 可选为 jpeg canvas本是透明背景的
|
|
@@ -139,7 +143,7 @@
|
|
},
|
|
},
|
|
|
|
|
|
doPaint(){
|
|
doPaint(){
|
|
- this.curMode = 'paint'
|
|
|
|
|
|
+ this.curMode = 'line'
|
|
this.$refs.SignCanvas.mode = 'paint'
|
|
this.$refs.SignCanvas.mode = 'paint'
|
|
},
|
|
},
|
|
|
|
|
|
@@ -163,6 +167,7 @@
|
|
},
|
|
},
|
|
|
|
|
|
onSelectWriteWidth(val) {
|
|
onSelectWriteWidth(val) {
|
|
|
|
+ this.options.lineWidth = val
|
|
this.options.writeWidth = val
|
|
this.options.writeWidth = val
|
|
this.activeDot = val
|
|
this.activeDot = val
|
|
},
|
|
},
|