Browse Source

水印问题

feture-12345
是小王呀\24601 1 year ago
parent
commit
ec4e860e5f
  1. 5
      src/views/modules/shequzhili/Delivery/index.vue
  2. 38
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  3. 2
      src/views/modules/shequzhili/event/cpts/event-info.vue
  4. 2
      src/views/modules/shequzhili/event/eventList.vue
  5. 10
      src/views/modules/shequzhili/eventHandling/index.vue
  6. 4
      src/views/modules/shequzhili/timeOut/index.vue
  7. 5
      src/views/modules/shequzhili/workpiece/index.vue

5
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;

38
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -95,6 +95,7 @@
</div>
</div>
</div>
<canvas id="watermarkCanvas1" class="canvas"> </canvas>
</el-card>
</div>
</template>
@ -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 {
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.canvas {
z-index: 10;
position: fixed;
top: 0;
left: 0;
pointer-events: none;
/* 确保canvas不干扰其他元素 */
}
.flex-end {
display: flex;
margin-bottom: 10px;

2
src/views/modules/shequzhili/event/cpts/event-info.vue

@ -360,11 +360,11 @@ export default {
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
mounted() {
},
methods: {
aTagDownload(url, filename){
const a = document.createElement("a"); // a
a.href = url; //

2
src/views/modules/shequzhili/event/eventList.vue

@ -387,9 +387,9 @@ export default {
},
},
mounted() {
var canvas = document.getElementById('watermarkCanvas1');
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.getOrgTreeList()
this.getGridList()
this.getTableData();

10
src/views/modules/shequzhili/eventHandling/index.vue

@ -111,18 +111,12 @@
</el-table-column>
<el-table-column prop="limitStatus" align="center" width="110" label="办理超期"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.deliverystatus === 0">联系当事人超期</span>
<span v-else-if="scope.row.deliverystatus ===1">部门办结超期</span>
<span v-else>--</span>
</template> -->
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200px" prop="status">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.row)" type="text" size="small" v-if="scope.row.operationTypeName!='正常退件'">查看</el-button>
<el-button @click="handleDispose(scope.row,'dispose')" type="text" size="small" v-if=" scope.row.operationType != '11'&&scope.row.operationType!= '12'&&scope.row.operationType!= '14'&&scope.row.operationTypeName!='正常退件'&&scope.row.latestOperationType!='13'&&scope.row.latestOperationType!='14' ">办理</el-button>
<el-button @click="handleDispose(scope.row,'return')" type="text" size="small" v-if="scope.row.status !=='closed_case'&&scope.row.operationTypeName!='正常退件'&&scope.row.operationType!= '14'&&scope.row.latestOperationType!='13'&&scope.row.latestOperationType!='14' ">退件</el-button>
</template>
</el-table-column>
</el-table>
@ -795,10 +789,8 @@ export default {
color: #fff;
}
.canvas {
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
position: fixed;
top: 0;
left: 0;
pointer-events: none;

4
src/views/modules/shequzhili/timeOut/index.vue

@ -824,10 +824,8 @@ export default {
color: #fff;
}
.canvas {
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
position: fixed;
top: 0;
left: 0;
pointer-events: none;

5
src/views/modules/shequzhili/workpiece/index.vue

@ -874,11 +874,8 @@ export default {
color: #fff;
}
.canvas {
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
position: fixed;
top: 0;
left: 0;
pointer-events: none;

Loading…
Cancel
Save