diff --git a/package.json b/package.json index 37ffdc515..6dc3f480a 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,4 @@ -{ + { "name": "epmet-oper-gov", "version": "1.0.0", "private": true, diff --git a/src/views/modules/shequzhili/Delivery/index.vue b/src/views/modules/shequzhili/Delivery/index.vue index 244c79eda..8fea7527f 100644 --- a/src/views/modules/shequzhili/Delivery/index.vue +++ b/src/views/modules/shequzhili/Delivery/index.vue @@ -74,6 +74,7 @@
+
导出 @@ -102,9 +103,11 @@ -->
+ - + + @@ -177,6 +180,8 @@ 删除 + + @@ -203,10 +208,7 @@ import eventInfo from "../event/cpts/event-info.vue"; import axios from "axios"; export default { - - data() { - let orgOptionProps = { multiple: false, value: 'agencyId', @@ -328,7 +330,9 @@ export default { selVoiceUrl: "", multipleSelection: [], importLoading: false, - importType: "1" + importType: "1", + phone:"", + realName:"" }; }, components:{eventInfo}, @@ -355,15 +359,42 @@ export default { }, }, mounted() { + console.log(this.$store.state.user,"dslk;djklsg;ljk"); + this.realName = this.$store.state.user.realName; + this.phone = this.$store.state.user.phone; this.user = this.$store.state.user; this.agencyId = this.user.agencyId; - + this.getCanvas() this.getOrgTreeList() this.getGridList() this.getTableData(); this.getCateOptions(); }, methods: { + getCanvas() { + var canvas = document.getElementById('watermarkCanvas'); + 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(); + } + } + }, async handleDel(rowData) { let message = "确认删除?"; this.$confirm(message, "提示", { @@ -858,4 +889,15 @@ export default { font-size: 40px; color: #fff; } + .canvas { + + width: 100%; + height: 100%; + z-index: 10; + position: absolute; + top: 0; + left: 0; + pointer-events: none; + /* 确保canvas不干扰其他元素 */ + } diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 1de05943a..797443e9e 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -11,7 +11,9 @@ 下载
+
+
工单编号
{{ info.workOrderNum }}
@@ -157,6 +159,9 @@ 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)); } @@ -170,6 +175,30 @@ export default { }, methods: { + getCanvas() { + var canvas = document.getElementById('watermarkCanvas2'); + 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); }, @@ -264,4 +293,14 @@ export default { margin-right: 10px; } } +.canvas { +width: 100%; +height: 100%; +z-index: 10; +position: absolute; +top: 0; +left: 0; +pointer-events: none; +/* 确保canvas不干扰其他元素 */ +} \ No newline at end of file diff --git a/src/views/modules/shequzhili/eventHandling/index.vue b/src/views/modules/shequzhili/eventHandling/index.vue index c4faeee9a..42c26b798 100644 --- a/src/views/modules/shequzhili/eventHandling/index.vue +++ b/src/views/modules/shequzhili/eventHandling/index.vue @@ -91,9 +91,10 @@ -->
- + + @@ -208,7 +209,6 @@ export default { dialogVisible:"false", pageType: "list", // 列表list 新增add 处理dispose 详情info user: {}, - agencyId: "", orgOptions: [], orgOptionProps, @@ -284,6 +284,8 @@ export default { }, ], + phone: "", + realName: "", formData: { agencyId: "", sourceType: "", @@ -345,16 +347,41 @@ export default { }, }, mounted() { + this.realName = this.$store.state.user.realName; + this.phone = this.$store.state.user.phone; this.user = this.$store.state.user; this.agencyId = this.user.agencyId; - + this.getCanvas() this.getOrgTreeList() this.getGridList() this.getTableData(); this.getCateOptions(); }, 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(); + } + } + }, handleSelectionChange(val) { this.multipleSelection = []; val.forEach((element) => { @@ -795,4 +822,14 @@ export default { font-size: 40px; color: #fff; } +.canvas { +width: 100%; +height: 100%; +z-index: 10; +position: absolute; +top: 0; +left: 0; +pointer-events: none; +/* 确保canvas不干扰其他元素 */ +} diff --git a/src/views/modules/shequzhili/peopleOpinons/opinionsDaily.vue b/src/views/modules/shequzhili/peopleOpinons/opinionsDaily.vue index c9fc2deba..2b75eca42 100644 --- a/src/views/modules/shequzhili/peopleOpinons/opinionsDaily.vue +++ b/src/views/modules/shequzhili/peopleOpinons/opinionsDaily.vue @@ -216,6 +216,8 @@ export default { } return { + phone: "", + realName: "", formData: { openFlag:"", publicationPeople:"", diff --git a/src/views/modules/shequzhili/timeOut/index.vue b/src/views/modules/shequzhili/timeOut/index.vue index 00aa9b7ad..9c694503b 100644 --- a/src/views/modules/shequzhili/timeOut/index.vue +++ b/src/views/modules/shequzhili/timeOut/index.vue @@ -91,7 +91,7 @@ -->
- + @@ -310,7 +310,9 @@ export default { selVoiceUrl: "", multipleSelection: [], importLoading: false, - importType: "1" + importType: "1", + phone: "", + realName: "", }; }, components: { Urging, eventInfo }, @@ -337,15 +339,41 @@ export default { }, }, mounted() { + this.phone = this.$store.state.user.phone; + this.realName = this.$store.state.user.realName; this.user = this.$store.state.user; this.agencyId = this.user.agencyId; - + this.getCanvas() this.getOrgTreeList() this.getGridList() this.getTableData(); this.getCateOptions(); }, methods: { + getCanvas() { + var canvas = document.getElementById('watermarkCanvas3'); + 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(); + } + } + }, handleEventType(val) { const nodes = this.$refs.cascaderEvent.getCheckedNodes(); this.formData.firstIdList = []; @@ -837,4 +865,14 @@ export default { font-size: 40px; color: #fff; } +.canvas { +width: 100%; +height: 100%; +z-index: 10; +position: absolute; +top: 0; +left: 0; +pointer-events: none; +/* 确保canvas不干扰其他元素 */ +}