Browse Source

优化

master
4670101279 2 years ago
parent
commit
d5094d6b18
  1. 7
      src/views/data/photo/index.vue
  2. 17
      src/views/data/photo2/index.vue

7
src/views/data/photo/index.vue

@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
<div class="monitor">
<div class="card" v-for="item in currdataList" :key="item.stnmId">
<!-- <img src="../../../assets/images/water.jpg" @click="show('http://localhost:81/control/static/img/water.8d19122d.jpg')"> -->
<el-image style="width: 300px;height: 168.75px;" :src="item.imgName" :preview-src-list="srcList"
<el-image style="width: 300px;height: 168.75px;cursor: pointer;" :src="item.imgName" :preview-src-list="srcList"
@click="show(item.imgName)"></el-image>
<div class="info">
@ -161,9 +161,10 @@ export default { @@ -161,9 +161,10 @@ export default {
if (e.imgName == '' || e.imgName == null) {
e.imgName = errorImg
}
}
else {
e.imgName = process.env.VUE_APP_BASE_API + e.imgName
e.imgName = "https://www.huastech.com.cn" + e.imgName
// e.imgName = process.env.VUE_APP_BASE_API + e.imgName
}
})
this.loading = false;

17
src/views/data/photo2/index.vue

@ -25,25 +25,17 @@ @@ -25,25 +25,17 @@
<el-table-column label="序号" type="index" align="center"/>
<el-table-column label="站点名称" align="center" prop="stnm" />
<el-table-column label="ip地址" align="center" prop="ip" />
<el-table-column label="最新数值" align="center" prop="value" />
<el-table-column label="最新上传时间" align="center" prop="tm"/>
<el-table-column label="最新数值" align="center" prop="value" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="showImg(scope.row)"
>查看图片</el-button>
<el-image style="width: 180px;height: 120px;cursor: pointer;" :src="scope.row.imgName" :preview-src-list="srcList" @click="showImg(scope.row)"/>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.limit"
@pagination="getList" />
<el-dialog title="水尺图片" :visible.sync="open" height="770px" width="800px" append-to-body>
<el-image style="width: 100%;height: 100%;" :src="imgUrl" :preview-src-list="srcList"/>
</el-dialog>
</div>
@ -143,7 +135,8 @@ export default { @@ -143,7 +135,8 @@ export default {
e.imgName = errorImg
}
else {
e.imgName = process.env.VUE_APP_BASE_API + e.imgName
e.imgName = "https://www.huastech.com.cn" + e.imgName
// e.imgName = process.env.VUE_APP_BASE_API + e.imgName
}
})
this.loading = false;
@ -162,8 +155,6 @@ export default { @@ -162,8 +155,6 @@ export default {
this.handleQuery();
},
showImg(item) {
this.open = true;
this.imgUrl = item.imgName
this.srcList = []
this.srcList.push(item.imgName)

Loading…
Cancel
Save