From 274f9aca33a27e801a81999e10e673056c9e46cf Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Wed, 7 Jun 2023 15:48:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/alarmHandling/index.vue | 82 +++++++++++++++++++++++++---- src/views/pictureRotation/index.vue | 5 +- vue.config.js | 6 +-- 3 files changed, 78 insertions(+), 15 deletions(-) diff --git a/src/views/alarmHandling/index.vue b/src/views/alarmHandling/index.vue index 1ccd487..6739ffb 100644 --- a/src/views/alarmHandling/index.vue +++ b/src/views/alarmHandling/index.vue @@ -57,6 +57,7 @@ +
@@ -159,7 +160,9 @@
-
+
+ +
主动拍照 历史图片 @@ -167,6 +170,12 @@
+
+
+ + +
+
@@ -195,6 +204,7 @@ export default { total: 0, //总条数 loading: false, isreadshow: false, + showBigpic: false, }; }, mounted() { @@ -207,6 +217,12 @@ export default { this.getSearchgj(); }, methods: { + handleBigPicbox() { + this.showBigpic = true; + }, + closePic() { + this.showBigpic = false; + }, //获取电压信息 getSearchdy() { getSearchInfo({ type: 1 }) @@ -288,15 +304,19 @@ export default { console.log(row); this.photoPic = row.path; //未读变已读 - readAlarm({ - id: row.id, - }) - .then((res) => { - console.log(res); + if (row.isread == 0) { + readAlarm({ + id: row.id, }) - .catch((err) => { - console.log(err); - }); + .then((res) => { + console.log(res); + row.isread = 1; + console.log(row.isread); + }) + .catch((err) => { + console.log(err); + }); + } }, dateFormat(row, column) { var date = row[column.property]; @@ -314,6 +334,45 @@ export default { height: calc(100% - 32px); padding: 16px 16px; background: #ffffff; + .showPic { + position: fixed; + background-color: rgba(0, 0, 0, 50%); + bottom: 0; + left: 0; + overflow: hidden; + right: 0; + top: 0; + z-index: 9999; + display: flex; + cursor: pointer; + .picboxI { + position: relative; + max-width: 1280px; + max-height: 720px; + margin: auto; + animation-name: scaleDraw; + /*关键帧名称*/ + animation-timing-function: ease; + /*动画的速度曲线*/ + animation-iteration-count: 1; + /*动画播放的次数*/ + animation-duration: 0.65s; + + img { + max-width: 1366px; + max-height: 768px; + margin: auto; + } + .el-icon-circle-close { + position: absolute; + right: -10px; + font-size: 48px; + color: #fff; + cursor: pointer; + top: -24px; + } + } + } .searchMain { border: 1px solid #dddddd; height: calc(100% - 34px); @@ -370,6 +429,7 @@ export default { .imgshow { width: 100%; height: 100%; + img { width: 100%; height: 100%; diff --git a/src/views/pictureRotation/index.vue b/src/views/pictureRotation/index.vue index 082790a..9c36fae 100644 --- a/src/views/pictureRotation/index.vue +++ b/src/views/pictureRotation/index.vue @@ -21,7 +21,7 @@ 设置 -
+
diff --git a/vue.config.js b/vue.config.js index 3e6b409..e3ab0d5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -28,11 +28,11 @@ module.exports = defineConfig({ proxy: { "/api": { //表示拦截以/api开头的请求路径 - //target: "http://47.96.238.157:8093", //阿里云服务器环境 - target: "http://180.166.218.222:40080", //dell + target: "http://47.96.238.157:8093", //阿里云服务器环境 + //target: "http://180.166.218.222:40080", //dell changOrigin: true, //是否开启跨域 pathRewrite: { - "^/api": "/api", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的 + "^/api": "", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的 }, }, },