修改传感器汇总界面

master
夜笙歌 5 months ago
parent ecdc356fd2
commit 62bf09dd4a

@ -108,7 +108,7 @@ export default {
dialogTableVisible: false, dialogTableVisible: false,
uploadDialog: false, uploadDialog: false,
tableData: [], tableData: [],
tableTh:[], tableTh: [],
api: process.env.VUE_APP_BASE_API, api: process.env.VUE_APP_BASE_API,
token: getToken() token: getToken()
} }
@ -191,16 +191,16 @@ export default {
this.dialogTableVisible = true this.dialogTableVisible = true
const data = await getRedisFile(this.$store.getters.tenantId) const data = await getRedisFile(this.$store.getters.tenantId)
this.tableData = JSON.parse(data.content) this.tableData = JSON.parse(data.content)
this.tableTh = Object.keys(data.Header).map(e=>data.Header[e]) this.tableTh = Object.keys(data.Header).map(e => data.Header[e])
}, },
importf() { importf() {
this.uploadDialog = true this.uploadDialog = true
}, },
async uploadSuccess(e){ async uploadSuccess(e) {
this.uploadDialog = false this.uploadDialog = false
const data = await getRedisFile(this.$store.getters.tenantId) const data = await getRedisFile(this.$store.getters.tenantId)
this.tableData = JSON.parse(data.content) this.tableData = JSON.parse(data.content)
this.tableTh = Object.keys(data.Header).map(e=>data.Header[e]) this.tableTh = Object.keys(data.Header).map(e => data.Header[e])
} }
} }
}; };

@ -98,6 +98,13 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<el-dialog
title="历史"
:visible.sync="dialogVisible"
width="90%">
<Sensor :dialogData="dialogData"/>
</el-dialog>
</div> </div>
</template> </template>
@ -106,9 +113,10 @@ import {
selectLatestDataByDeviceMode, selectLatestDataByDeviceMode,
getDeviceModesBySceneId, getDeviceModesBySceneId,
} from '@/api/board/equipmentMonitoring' } from '@/api/board/equipmentMonitoring'
import Sensor from '@/views/board/senso'
export default { export default {
components: {}, components: {Sensor},
data() { data() {
return { return {
loading: false, loading: false,
@ -127,7 +135,9 @@ export default {
limit: 10, limit: 10,
total: 0, total: 0,
deviceDataColumns: [], deviceDataColumns: [],
tableDataRow: [] tableDataRow: [],
dialogVisible:false,
dialogData:null
} }
}, },
async mounted() { async mounted() {
@ -196,7 +206,10 @@ export default {
toHistory(e, i) { toHistory(e, i) {
console.log(e) console.log(e)
console.log(i) console.log(i)
this.$router.push({path: "/board/senso", query: {id: e, deviceModeId: i}}); this.dialogData = {id: e, deviceModeId: i}
this.dialogVisible = true
// this.$router.push({path: "/board/senso", query: {id: e, deviceModeId: i}});
} }
} }
}; };

@ -780,12 +780,9 @@ export default {
position: [e.longitude, e.latitude], position: [e.longitude, e.latitude],
title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceName}\n`, title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceName}\n`,
offset: new AMap.Pixel(-15, -30), offset: new AMap.Pixel(-15, -30),
content: `<div> content: `<div> <svg t="1718261114618" class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="4305" style="width: 30px;height: 30px;">
<svg t="1718261114618" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4305" style="width: 30px;height: 30px;">
<path d="M512 64.5c-180.5 0-326.9 146.4-326.9 326.9 0 63.3 18 122.3 49.2 172.4 1.1 2 2.1 4 3.2 5.9 34.9 58.2 113.9 128.8 165.5 194.5 66.3 84.4 93.2 158 93.2 158 1.6 1.4 13.1 35.6 15.1 35.8 2.5 0.2 12.6-34 14.5-35.8 0 0 22-69.2 83.7-146.6 56-70.1 142.8-145.7 177-206 0.9-1.6 1.8-3.3 2.6-5 31.5-50.2 49.7-109.6 49.7-173.3 0.1-180.5-146.3-326.8-326.8-326.8z" fill="#3D93FD" p-id="4306"> <path d="M512 64.5c-180.5 0-326.9 146.4-326.9 326.9 0 63.3 18 122.3 49.2 172.4 1.1 2 2.1 4 3.2 5.9 34.9 58.2 113.9 128.8 165.5 194.5 66.3 84.4 93.2 158 93.2 158 1.6 1.4 13.1 35.6 15.1 35.8 2.5 0.2 12.6-34 14.5-35.8 0 0 22-69.2 83.7-146.6 56-70.1 142.8-145.7 177-206 0.9-1.6 1.8-3.3 2.6-5 31.5-50.2 49.7-109.6 49.7-173.3 0.1-180.5-146.3-326.8-326.8-326.8z" fill="#3D93FD" p-id="4306">
</path> </path></svg></div>`
</svg>
</div>`
}); });
marker.on('click', async () => { marker.on('click', async () => {
if (markerIds.includes(e.deviceId)) { if (markerIds.includes(e.deviceId)) {

@ -162,6 +162,7 @@ let mapMarker = null
let flag = true let flag = true
export default { export default {
components: {}, components: {},
props:['dialogData'],
data() { data() {
return { return {
mapOffset: 0, mapOffset: 0,
@ -189,9 +190,9 @@ export default {
zoom: 11, zoom: 11,
center: [113.4, 23.35], center: [113.4, 23.35],
}); });
if (this.$route.query.id) { if (this.$route.query.id || this.dialogData.id) {
this.deviceId = this.$route.query.id this.deviceId = this.$route.query.id || this.dialogData.id
this.deviceModeId = this.$route.query.deviceModeId this.deviceModeId = this.$route.query.deviceModeId || this.dialogData.deviceModeId
} }
await this.getData() await this.getData()
}, },
@ -421,20 +422,22 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.container { .container {
background-image: url("~@/assets/board/senso/bg.jpg"); //background-image: url("~@/assets/board/senso/bg.jpg");
background-image: none;
background-color: #022449;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: calc(100vh); height: calc(80vh);
position: relative; position: relative;
} }
.collapse { .collapse {
position: absolute; position: absolute;
top: 9%; top: 4%;
left: 2%; left: 2%;
width: 96%; width: 96%;
height: 87%; height: 92%;
overflow: auto; overflow: auto;
/deep/ .el-collapse-item__wrap { /deep/ .el-collapse-item__wrap {

Loading…
Cancel
Save