- -
- -
-
- - - -
- -
+
+ + +
+
+ + + +
@@ -22,23 +21,25 @@ diff --git a/src/views/kban/index.vue_bak b/src/views/kban/index.vue_bak new file mode 100644 index 0000000..db3c13b --- /dev/null +++ b/src/views/kban/index.vue_bak @@ -0,0 +1,93 @@ + + + + + diff --git a/src/views/zyjhzx/sliao/comps/baifang.js b/src/views/zyjhzx/sliao/comps/baifang.js index dd846a3..63a3759 100644 --- a/src/views/zyjhzx/sliao/comps/baifang.js +++ b/src/views/zyjhzx/sliao/comps/baifang.js @@ -1,5 +1,4 @@ import Konva from "konva"; -import {daoduo} from "@/api/zyjh"; const baifang=function (option={}) { const width=option.width,height=option.height,slList=option.dw,image=require('@/assets/gb.png') diff --git a/src/views/zyjhzx/sliao/comps/container.js b/src/views/zyjhzx/sliao/comps/container.js index be1455b..e33fb56 100644 --- a/src/views/zyjhzx/sliao/comps/container.js +++ b/src/views/zyjhzx/sliao/comps/container.js @@ -13,6 +13,21 @@ const container=function (width=0,height=0,container){ stage.add(layer) // layer.draw(); + const imageObj = new Image(); + const imgSize=width + imageObj.src = require('@/assets/kban/bg.png'); + imageObj.onload = function () { + const shape = new Konva.Image({ + x: 0, + y: 0, + width: imgSize, + height:this.height, + image: imageObj, + }); + layer.add(shape) + shape.zIndex(0) + } + return { stage,layer } diff --git a/src/views/zyjhzx/sliao/comps/sljh.js b/src/views/zyjhzx/sliao/comps/sljh.js index 92fe406..d47c78c 100644 --- a/src/views/zyjhzx/sliao/comps/sljh.js +++ b/src/views/zyjhzx/sliao/comps/sljh.js @@ -10,7 +10,20 @@ export const sljh=function (width,height){ layer.clipFunc(function(ctx) { ctx.rect(0, 0, width-30, height*0.2-60); }); - //layer.draw() + + const imageObj = new Image(); + imageObj.src = require('@/assets/sliao/sljhbg.png'); + imageObj.onload = function () { + const shape = new Konva.Image({ + x: 0, + y: 0, + width: width-30, + height:189, + image: imageObj, + }); + layer.add(shape) + shape.zIndex(0) + } const group=new Konva.Group({ x:0, @@ -26,6 +39,7 @@ export const sljh=function (width,height){ }, }); layer.add(group) + group.zIndex(2) return { layer,group diff --git a/src/views/zyjhzx/sliao/comps/title.js b/src/views/zyjhzx/sliao/comps/title.js index 711a4ae..a048572 100644 --- a/src/views/zyjhzx/sliao/comps/title.js +++ b/src/views/zyjhzx/sliao/comps/title.js @@ -1,18 +1,40 @@ import Konva from "konva"; const title=function (width,height,title) { - return new Konva.Text({ + const group=new Konva.Group({ + x: 0, + y: 8, + width: width, + height: 20, + }) + + const imageObj = new Image(); + imageObj.src = require('@/assets/kban/logo.png'); + imageObj.onload = function () { + const shape = new Konva.Image({ + x: 0, + y: 0, + width: width*0.86, + height:41, + image: imageObj, + }); + group.add(shape) + } + + const text=new Konva.Text({ x: 0, y: 8, width: width, height: 20, - lineHeight: 1, - stroke: 'blue', - strokeWidth: 2, text: title, align: 'center', + fill:'#fff', fontSize: 32, + fontStyle:'bold' }) + group.add(text) + + return group } export default title diff --git a/src/views/zyjhzx/sliao/index.vue b/src/views/zyjhzx/sliao/index.vue index 178fc69..126db7d 100644 --- a/src/views/zyjhzx/sliao/index.vue +++ b/src/views/zyjhzx/sliao/index.vue @@ -6,6 +6,7 @@