diff --git a/ruoyi-ui/src/components/RuoYi/Git/index.vue b/ruoyi-ui/src/components/RuoYi/Git/index.vue
index bb30cc0..bcd85fb 100644
--- a/ruoyi-ui/src/components/RuoYi/Git/index.vue
+++ b/ruoyi-ui/src/components/RuoYi/Git/index.vue
@@ -14,6 +14,10 @@ export default {
},
methods: {
goto() {
+ console.log(this.$store.state.user.permissions)
+ console.log(this.$store.state.user.permissions.includes('business:monitor:index'))
+ console.log( this.$store.state.user.permissions.includes('*:*:*'))
+ console.log( this.$store.state.user.permissions.filter(e=>e.includes('business:monitor')))
if (this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')) {
this.$router.push({path: "/board/index"});
} else {
diff --git a/ruoyi-ui/src/store/modules/app.js b/ruoyi-ui/src/store/modules/app.js
index 09a384a..8ef0a6c 100644
--- a/ruoyi-ui/src/store/modules/app.js
+++ b/ruoyi-ui/src/store/modules/app.js
@@ -9,7 +9,7 @@ const state = {
device: 'desktop',
size: Cookies.get('size') || 'medium',
language: Cookies.get('language') || 'en_US',
- sceneId:0
+ sceneId:null
}
const mutations = {
diff --git a/ruoyi-ui/src/views/board/senso/index.vue b/ruoyi-ui/src/views/board/senso/index.vue
index 58ee37e..9af1d55 100644
--- a/ruoyi-ui/src/views/board/senso/index.vue
+++ b/ruoyi-ui/src/views/board/senso/index.vue
@@ -27,32 +27,38 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
开始时间:
+
+
+
+
+
搜索
+
重置
+
+
+
+
-
@@ -110,7 +116,8 @@ export default {
currentPage: 1,
deviceDataColumns: [],
show: false,
- isMap:false
+ isMap: false,
+ date: new Date().getTime()
}
},
async mounted() {
@@ -125,6 +132,15 @@ export default {
await this.getData()
},
methods: {
+ async search() {
+ this.currentPage = 1
+ await this.setHistoryData()
+ },
+ async reset() {
+ this.currentPage = 1
+ this.date = new Date().getTime()
+ await this.setHistoryData()
+ },
setPolyline(e) {
let polyline = new AMap.Polyline({
path: e,
@@ -136,7 +152,10 @@ export default {
setMarker(e, i) {
let marker = new AMap.Marker({
position: e, // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
- title: i
+ title: `
+ 经度:${e[0]}
+ 纬度:${e[1]}
+ 时间:${i}`
});
map.add(marker);
map.setFitView()
@@ -171,9 +190,10 @@ export default {
deviceModeId: this.deviceModeId,
"offset": this.currentPage - 1,
"limit": 10,
- "startTime": 0
+ startTime: this.date,
+ endTime: this.date + (1000 * 60 * 60 * 24)
})
- let dataList = data.historyData.dataList
+ let dataList = data.historyData?.dataList || []
if (dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('longitude'))).length > 0) {
this.isMap = true
dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('longitude'))).forEach(e => {
@@ -182,16 +202,16 @@ export default {
this.setPolyline(dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('longitude'))).map(e => {
return [e.longitude, e.latitude]
}))
- this.tableData = data.historyData.dataList
- this.total = data.historyData.count
- this.currentPage = 1
- this.deviceDataColumns = data.deviceDataColumns
- this.$nextTick(() => {
- this.show = true
- })
+ // this.tableData = data.historyData?.dataList
+ // this.total = data.historyData?.count
+ // this.currentPage = 1
+ // this.deviceDataColumns = data.deviceDataColumns
+ // this.$nextTick(() => {
+ // this.show = true
+ // })
} else {
- this.tableData = data.historyData.dataList
- this.total = data.historyData.count
+ this.tableData = data.historyData?.dataList
+ this.total = data.historyData?.count
this.currentPage = 1
this.deviceDataColumns = data.deviceDataColumns
this.$nextTick(() => {
diff --git a/ruoyi-ui/src/views/board/smartScene/index.vue b/ruoyi-ui/src/views/board/smartScene/index.vue
index f8d3fef..fd5546a 100644
--- a/ruoyi-ui/src/views/board/smartScene/index.vue
+++ b/ruoyi-ui/src/views/board/smartScene/index.vue
@@ -125,15 +125,18 @@ export default {
},
watch:{
jtData:{
- handler() {
- this.getData(this.$store.getters.sceneId)
+ async handler() {
+ console.log(this.$store.getters.sceneId)
+ if(this.$store.getters.sceneId !== null){
+ await this.getData(this.$store.getters.sceneId)
+ }
},
deep: true,
immediate: true
}
},
- mounted() {
- this.getData(this.$store.getters.sceneId)
+ async mounted() {
+ // await this.getData(this.$store.getters.sceneId)
},
methods: {
toMonitor(e){