Browse Source

优化

master
4670101279 2 years ago
parent
commit
2a10e66220
  1. 10
      src/views/basic/station/index.vue
  2. 7
      src/views/data/photo/index.vue
  3. 13
      src/views/index.vue
  4. 10
      src/views/web/camera/index.vue

10
src/views/basic/station/index.vue

@ -100,8 +100,8 @@
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.page"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.limit"
@pagination="getList" @pagination="getList"
/> />
@ -192,8 +192,8 @@ export default {
open: false, open: false,
// //
queryParams: { queryParams: {
pageNum: 1, page: 1,
pageSize: 10, limit: 10,
stnm: null, stnm: null,
}, },
// //
@ -275,7 +275,7 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.page = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

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

@ -161,10 +161,9 @@ export default {
if (e.imgName == '' || e.imgName == null) { if (e.imgName == '' || e.imgName == null) {
e.imgName = errorImg e.imgName = errorImg
} else { }
else {
e.imgName = 'https://www.huastech.com.cn' + e.imgName e.imgName = process.env.VUE_APP_BASE_API + e.imgName
} }
}) })
this.loading = false; this.loading = false;

13
src/views/index.vue

@ -92,6 +92,9 @@
import echarts from 'echarts' import echarts from 'echarts'
import "../utils/flexible" import "../utils/flexible"
import "../utils/infoBox_min" import "../utils/infoBox_min"
import markerpng from '@/assets/images/marker.png'
import closepng from '@/assets/images/close.png'
import borderpng from '@/assets/images/border.png'
export default { export default {
name: "Index", name: "Index",
data() { data() {
@ -99,9 +102,9 @@ export default {
// //
version: "3.8.2", version: "3.8.2",
// //
api: ' http://localhost/control-api/api/daping/station/', api: '/control-api/api/daping/station/',
// //
imgapi: 'https://www.huastech.com.cn', imgapi: process.env.VUE_APP_BASE_API,
// //
station: [], station: [],
level: {}, level: {},
@ -545,7 +548,7 @@ export default {
this.markers = [] this.markers = []
} }
// //
var ico = new BMap.Icon('../assets/images/marker.png', new BMap.Size(50, 24), { anchor: new BMap.Size(25, 12) }) var ico = new BMap.Icon(markerpng, new BMap.Size(50, 24), { anchor: new BMap.Size(25, 12) })
// //
this.station.forEach(item => { this.station.forEach(item => {
var p = new BMap.Point(item.longitude,item.latitude); var p = new BMap.Point(item.longitude,item.latitude);
@ -572,7 +575,7 @@ export default {
let htmlStr = ` let htmlStr = `
<div style="height: 100%; position: relative;"> <div style="height: 100%; position: relative;">
<div style="position: absolute; left: 14px; top: 33px; z-index: -1; background: hsla(200, 88%, 33%, .6); box-shadow: 0 0 16px hsl(200, 88%, 33%); width: 336px; height: 135px;"></div> <div style="position: absolute; left: 14px; top: 33px; z-index: -1; background: hsla(200, 88%, 33%, .6); box-shadow: 0 0 16px hsl(200, 88%, 33%); width: 336px; height: 135px;"></div>
<div style="background: url('../assets/images/border.png') center center; width: 100%; height: 100%; color: #effaff; font-size: 18px; text-shadow: 2px 2px 4px #17263C; display: flex;"> <div style="background: url('`+borderpng+`') center center; width: 100%; height: 100%; color: #effaff; font-size: 18px; text-shadow: 2px 2px 4px #17263C; display: flex;">
<div style="flex: 1; padding: 66px 0 0 20px;"> <div style="flex: 1; padding: 66px 0 0 20px;">
<div style="height: 30px; white-space: nowrap; word-wrap: ellipsis; overflow: hidden;">站点: ${item.stnm}</div> <div style="height: 30px; white-space: nowrap; word-wrap: ellipsis; overflow: hidden;">站点: ${item.stnm}</div>
<div style="height: 30px;">水位: ${item.value}m</div> <div style="height: 30px;">水位: ${item.value}m</div>
@ -588,7 +591,7 @@ export default {
width: "363px", width: "363px",
height: "210px" height: "210px"
}, },
closeIconUrl: '../assets/images/close.png', //url closeIconUrl: closepng, //url
}) })
infobox.open(marker) infobox.open(marker)

10
src/views/web/camera/index.vue

@ -33,7 +33,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column min-width="60" align="center" label="序号"> <el-table-column min-width="60" align="center" label="序号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span> <span>{{ (queryParams.page - 1) * queryParams.limit + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备名" align="center" prop="name" /> <el-table-column label="设备名" align="center" prop="name" />
@ -109,7 +109,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.limit"
@pagination="getList" /> @pagination="getList" />
<!-- 添加或修改摄像机对话框 --> <!-- 添加或修改摄像机对话框 -->
@ -346,8 +346,8 @@ export default {
open: false, open: false,
// //
queryParams: { queryParams: {
pageNum: 1, page: 1,
pageSize: 10, limit: 10,
name: null, name: null,
ip: null, ip: null,
port: null, port: null,
@ -542,7 +542,7 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.page = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

Loading…
Cancel
Save