From ec4e860e5fae32aeba0e063fbce5cb943ad2b4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Mon, 10 Mar 2025 10:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shequzhili/Delivery/index.vue | 5 +-- .../shequzhili/event/cpts/event-detail.vue | 38 ++++++++++++++++++- .../shequzhili/event/cpts/event-info.vue | 2 +- .../modules/shequzhili/event/eventList.vue | 2 +- .../shequzhili/eventHandling/index.vue | 10 +---- .../modules/shequzhili/timeOut/index.vue | 4 +- .../modules/shequzhili/workpiece/index.vue | 5 +-- 7 files changed, 42 insertions(+), 24 deletions(-) diff --git a/src/views/modules/shequzhili/Delivery/index.vue b/src/views/modules/shequzhili/Delivery/index.vue index 7b5b6c616..35b8ef321 100644 --- a/src/views/modules/shequzhili/Delivery/index.vue +++ b/src/views/modules/shequzhili/Delivery/index.vue @@ -983,11 +983,8 @@ export default { color: #fff; } .canvas { - - width: 100%; - height: 100%; z-index: 10; - position: absolute; + position: fixed; top: 0; left: 0; pointer-events: none; diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 5a787dca8..917bdb771 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -95,6 +95,7 @@ + @@ -158,7 +159,7 @@ export default { return { minHeight: 'calc(88vh - 50px)', overflow: 'auto', - position: 'relative' + position: 'ab' } } else { return {} @@ -166,9 +167,11 @@ export default { } }, mounted() { + this.user = this.$store.state.user; this.phone = this.$store.state.user.phone; this.realName = this.$store.state.user.realName; + // this.getCanvas() if (this.eventId) { this.info = JSON.parse(JSON.stringify(this.eventDetailData)); } @@ -182,6 +185,30 @@ export default { }, methods: { + // getCanvas() { + // var canvas = document.getElementById('watermarkCanvas1'); + // var ctx = canvas.getContext('2d'); + // canvas.width = window.innerWidth ; // 设置更高的分辨率 + // canvas.height = window.innerHeight ; + // var watermarkText = this.realName+ this.phone; //内容 + // ctx.font = '12px Arial'; //大小 + // ctx.fillStyle = 'rgba(0, 0, 255, 0.2)'; //颜色+透明度 + // // ctx.textBaseline = 'middle'; + // ctx.scale(2, 2); // 缩放上下文以适应更高分辨率 + // var angle = -30 * Math.PI / 180; // 旋转-30度 + // var x = canvas.width / 2; + // var y = canvas.height / 2; + // var space = 150; // 水印间距 + // for (var i = 0; i < canvas.width; i += space) { + // for (var j = 0; j < canvas.height; j += space) { + // ctx.save(); + // ctx.translate(i, j); + // ctx.rotate(angle); + // ctx.fillText(watermarkText, 0, 0); + // ctx.restore(); + // } + // } + // }, watchImg(src) { window.open(src); }, @@ -199,7 +226,14 @@ export default {