Commit 3a5ead4a by changjin

修改地址,增加设备列表按钮权限

parent 610dac94
...@@ -77,9 +77,9 @@ ...@@ -77,9 +77,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="gmtOnline" label="最近上线时间" ></el-table-column> <el-table-column prop="gmtOnline" label="最近上线时间" ></el-table-column>
<el-table-column label="操作" width="160"> <el-table-column label="操作" width="160">
<template slot-scope="scope"> <template slot-scope="scope" v-if="isAttribute || isEvents">
<router-link :to="'/equipment/attribute/' + scope.row.iotId" class="line">属性</router-link> <router-link v-if="isAttribute" :to="'/equipment/attribute/' + scope.row.iotId" class="line">属性</router-link>
<router-link :to="'/equipment/events/' + scope.row.iotId + '/' + scope.row.deviceName + '/' +scope.row.site+ '/' + scope.row.status " class="line ml10">事件</router-link> <router-link v-if="isEvents" :to="'/equipment/events/' + scope.row.iotId + '/' + scope.row.deviceName + '/' +scope.row.site+ '/' + scope.row.status " class="line ml10">事件</router-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -106,15 +106,36 @@ export default { ...@@ -106,15 +106,36 @@ export default {
}, },
size: '10', size: '10',
typeList: [], typeList: [],
data1: {} data1: {},
isEvents: false,
isAttribute:false
}), }),
created () { created () {
this.projectId = window.sessionStorage.getItem('projectId') this.projectId = window.sessionStorage.getItem('projectId')
this.projectId = 'beijing' this.projectId = 'beijing'
this.getPermissionsBtn()
this.getTypeList(this.projectId) this.getTypeList(this.projectId)
this.getData() this.getData()
}, },
methods: { methods: {
getPermissionsBtn () {
this.$axios.get('/baseInfo/initPersonalMenu').then((res) =>{
if(res.data.code === '0') {
res.data.data.menuResponseList.forEach(item=>{
item.childrenList.forEach(info=>{
info.childrenList.forEach(btn=>{
if(btn.id === '1003-03-001-001') {
this.isAttribute= true
}
if (btn.id === '1003-03-001-002') {
this.isEvents = true
}
})
})
})
}
})
},
getData(){ getData(){
this.$axios.post('/deviceVehicle/findDeviceList',{ this.$axios.post('/deviceVehicle/findDeviceList',{
p: this.data.page, p: this.data.page,
......
...@@ -11,7 +11,7 @@ require('element-ui/lib/theme-chalk/index.css') ...@@ -11,7 +11,7 @@ require('element-ui/lib/theme-chalk/index.css')
require('../static/css/index.css') require('../static/css/index.css')
Vue.use(uploader) Vue.use(uploader)
Vue.prototype.baseURL = 'http://172.16.2.69:8088/' // 测试 Vue.prototype.baseURL = 'http://39.97.169.207:9200' // 测试
// Vue.prototype.baseURL = 'https://witcase.chinajinmao.cn' // 正式 // Vue.prototype.baseURL = 'https://witcase.chinajinmao.cn' // 正式
axios.defaults.baseURL = Vue.prototype.baseURL axios.defaults.baseURL = Vue.prototype.baseURL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment