bug
This commit is contained in:
parent
746657d25f
commit
d4bced25ce
|
@ -83,7 +83,12 @@ export function getWaterRate(data) {
|
||||||
export function getCaptureImg(data) {
|
export function getCaptureImg(data) {
|
||||||
return request({
|
return request({
|
||||||
url:
|
url:
|
||||||
'/device/captureImg?deviceCode=' + data.deviceCode + '&page=' + data.page,
|
'/device/captureImg?deviceCode=' +
|
||||||
|
data.deviceCode +
|
||||||
|
'&page=' +
|
||||||
|
data.page +
|
||||||
|
'&size=' +
|
||||||
|
data.size,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="image-list">
|
<div class="image-list">
|
||||||
<div v-for="img in imageData" :key="img" class="block">
|
<div class="block">
|
||||||
|
<div class="block_item" :key="img" v-for="(img, index) in imageData">
|
||||||
|
<div class="block_text" @click="handleClick(index)">
|
||||||
|
{{ img.turbidity }}
|
||||||
|
</div>
|
||||||
<el-image
|
<el-image
|
||||||
|
ref="imageRef"
|
||||||
style="width: 200px; height: 200px"
|
style="width: 200px; height: 200px"
|
||||||
:src="img"
|
:src="img.img"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
:preview-src-list="imageData"
|
:preview-src-list="imageList"
|
||||||
></el-image>
|
></el-image>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:background="background"
|
:background="background"
|
||||||
|
@ -36,6 +42,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
imageData: [],
|
imageData: [],
|
||||||
|
imageList: [],
|
||||||
fileUrl: baseURL + '/static/capture/',
|
fileUrl: baseURL + '/static/capture/',
|
||||||
background: true,
|
background: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
|
@ -44,6 +51,7 @@ export default {
|
||||||
queryForm: {
|
queryForm: {
|
||||||
deviceCode: '',
|
deviceCode: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
|
size: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -55,6 +63,9 @@ export default {
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(index) {
|
||||||
|
this.$refs.imageRef[index].showViewer = true;
|
||||||
|
},
|
||||||
showData(row) {
|
showData(row) {
|
||||||
this.queryForm.deviceCode = row.deviceCode;
|
this.queryForm.deviceCode = row.deviceCode;
|
||||||
this.fetchData();
|
this.fetchData();
|
||||||
|
@ -66,6 +77,7 @@ export default {
|
||||||
// list[i] = this.fileUrl + list[i];
|
// list[i] = this.fileUrl + list[i];
|
||||||
// }
|
// }
|
||||||
this.imageData = data.items;
|
this.imageData = data.items;
|
||||||
|
this.imageList = data.items.map(item => item.img);
|
||||||
this.total = data.total;
|
this.total = data.total;
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
@ -88,7 +100,31 @@ export default {
|
||||||
.image-list {
|
.image-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.block {
|
.block {
|
||||||
float: left;
|
.block_text {
|
||||||
|
position: absolute;
|
||||||
|
top: 80px;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 1;
|
||||||
|
width: 200px;
|
||||||
|
font-weight: bold;
|
||||||
|
opacity: 0.7;
|
||||||
|
color: #fde2c2;
|
||||||
|
font-size: 48px;
|
||||||
|
transform: rotateZ(-37deg);
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block_item {
|
||||||
|
margin: 0 10px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.image-item {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue