master
fanluyan 2 years ago
parent a2cbd3cf60
commit 274f9aca33

@ -57,6 +57,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="alarmContain" v-loading="loading"> <div class="alarmContain" v-loading="loading">
<div class="alarmTable"> <div class="alarmTable">
<el-table <el-table
@ -141,8 +142,8 @@
</el-table-column> </el-table-column>
<el-table-column label="是否已读" min-width="95" fixed="right"> <el-table-column label="是否已读" min-width="95" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.isread == 0 || isreadshow"></span> <span v-if="scope.row.isread == 1">[]</span>
<span v-if="scope.row.isread == 1 || isreadshow"></span> <span v-if="scope.row.isread == 0">[]</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -159,7 +160,9 @@
</div> </div>
</div> </div>
<div class="alarmPic"> <div class="alarmPic">
<div class="imgshow"><img :src="photoPic" /></div> <div class="imgshow" @click="handleBigPicbox(photoPic)">
<img :src="photoPic" />
</div>
<div class="editorBtn"> <div class="editorBtn">
<el-button type="primary">主动拍照</el-button> <el-button type="primary">主动拍照</el-button>
<el-button type="primary">历史图片</el-button> <el-button type="primary">历史图片</el-button>
@ -167,6 +170,12 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="showBigpic" class="showPic" @click="closePic">
<div class="picboxI">
<img class="maskPic" :src="photoPic" />
<i @click="closePic" class="el-icon-circle-close"></i>
</div>
</div>
</div> </div>
</template> </template>
@ -195,6 +204,7 @@ export default {
total: 0, // total: 0, //
loading: false, loading: false,
isreadshow: false, isreadshow: false,
showBigpic: false,
}; };
}, },
mounted() { mounted() {
@ -207,6 +217,12 @@ export default {
this.getSearchgj(); this.getSearchgj();
}, },
methods: { methods: {
handleBigPicbox() {
this.showBigpic = true;
},
closePic() {
this.showBigpic = false;
},
// //
getSearchdy() { getSearchdy() {
getSearchInfo({ type: 1 }) getSearchInfo({ type: 1 })
@ -288,15 +304,19 @@ export default {
console.log(row); console.log(row);
this.photoPic = row.path; this.photoPic = row.path;
// //
readAlarm({ if (row.isread == 0) {
id: row.id, readAlarm({
}) id: row.id,
.then((res) => {
console.log(res);
}) })
.catch((err) => { .then((res) => {
console.log(err); console.log(res);
}); row.isread = 1;
console.log(row.isread);
})
.catch((err) => {
console.log(err);
});
}
}, },
dateFormat(row, column) { dateFormat(row, column) {
var date = row[column.property]; var date = row[column.property];
@ -314,6 +334,45 @@ export default {
height: calc(100% - 32px); height: calc(100% - 32px);
padding: 16px 16px; padding: 16px 16px;
background: #ffffff; 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 { .searchMain {
border: 1px solid #dddddd; border: 1px solid #dddddd;
height: calc(100% - 34px); height: calc(100% - 34px);
@ -370,6 +429,7 @@ export default {
.imgshow { .imgshow {
width: 100%; width: 100%;
height: 100%; height: 100%;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;

@ -21,7 +21,7 @@
<el-button type="primary" @click="setbtn"></el-button> <el-button type="primary" @click="setbtn"></el-button>
</div> </div>
</div> </div>
<div class="imageCenter" v-loading="loading"> <div class="imageCenter" v-loading="loading" v-cloak>
<div class="imgList" v-for="(item, index) in picList" :key="index"> <div class="imgList" v-for="(item, index) in picList" :key="index">
<viewer <viewer
:options="OptionssalseImg" :options="OptionssalseImg"
@ -368,4 +368,7 @@ export default {
} }
} }
} }
[v-cloak] {
display: none;
}
</style> </style>

@ -28,11 +28,11 @@ module.exports = defineConfig({
proxy: { proxy: {
"/api": { "/api": {
//表示拦截以/api开头的请求路径 //表示拦截以/api开头的请求路径
//target: "http://47.96.238.157:8093", //阿里云服务器环境 target: "http://47.96.238.157:8093", //阿里云服务器环境
target: "http://180.166.218.222:40080", //dell //target: "http://180.166.218.222:40080", //dell
changOrigin: true, //是否开启跨域 changOrigin: true, //是否开启跨域
pathRewrite: { pathRewrite: {
"^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的 "^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
}, },
}, },
}, },

Loading…
Cancel
Save