Commit 3a5ead4a by changjin

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

parent 610dac94
......@@ -77,9 +77,9 @@
</el-table-column>
<el-table-column prop="gmtOnline" label="最近上线时间" ></el-table-column>
<el-table-column label="操作" width="160">
<template slot-scope="scope">
<router-link :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>
<template slot-scope="scope" v-if="isAttribute || isEvents">
<router-link v-if="isAttribute" :to="'/equipment/attribute/' + scope.row.iotId" class="line">属性</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>
</el-table-column>
</el-table>
......@@ -106,15 +106,36 @@ export default {
},
size: '10',
typeList: [],
data1: {}
data1: {},
isEvents: false,
isAttribute:false
}),
created () {
this.projectId = window.sessionStorage.getItem('projectId')
this.projectId = 'beijing'
this.getPermissionsBtn()
this.getTypeList(this.projectId)
this.getData()
},
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(){
this.$axios.post('/deviceVehicle/findDeviceList',{
p: this.data.page,
......
......@@ -11,7 +11,7 @@ require('element-ui/lib/theme-chalk/index.css')
require('../static/css/index.css')
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' // 正式
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