|
|
|
@ -91,7 +91,7 @@
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handlehistoryPic"
|
|
|
|
|
v-if="showhisButton('/realTimeSearch') && role !== 0"
|
|
|
|
|
v-if="showhisButton('/realTimeSearch')"
|
|
|
|
|
>
|
|
|
|
|
历史图片</el-button
|
|
|
|
|
>
|
|
|
|
@ -247,7 +247,8 @@ export default {
|
|
|
|
|
selectTowerId: "",
|
|
|
|
|
collectFlag: false, //收藏
|
|
|
|
|
btnShowList: [],
|
|
|
|
|
menuList: [],
|
|
|
|
|
hisShowbtn: true,
|
|
|
|
|
menuShowList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -263,24 +264,29 @@ export default {
|
|
|
|
|
return this.$store.state.currentData;
|
|
|
|
|
},
|
|
|
|
|
showButtonMap() {
|
|
|
|
|
return this.btnShowList.reduce((map, button) => {
|
|
|
|
|
map[button.key] = true; // 假设只要key存在,就显示按钮
|
|
|
|
|
return map;
|
|
|
|
|
}, {});
|
|
|
|
|
if (this.roleUser !== "0") {
|
|
|
|
|
return this.btnShowList.reduce((map, button) => {
|
|
|
|
|
map[button.key] = true; // 假设只要key存在,就显示按钮
|
|
|
|
|
return map;
|
|
|
|
|
}, {});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showButtonhisMap() {
|
|
|
|
|
return this.menuList.reduce((map, button) => {
|
|
|
|
|
map[button.key] = true; // 假设只要key存在,就显示按钮
|
|
|
|
|
return map;
|
|
|
|
|
}, {});
|
|
|
|
|
showhisButtonMap() {
|
|
|
|
|
if (this.roleUser !== "0") {
|
|
|
|
|
return this.menuShowList.reduce((map, button) => {
|
|
|
|
|
map[button.key] = true; // 假设只要key存在,就显示按钮
|
|
|
|
|
return map;
|
|
|
|
|
}, {});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.roleUser = localStorage.getItem("role");
|
|
|
|
|
console.log("asdsaddddddddddddddddddddddddd", this.roleUser);
|
|
|
|
|
this.btnShowList = JSON.parse(localStorage.getItem("btnPermission"));
|
|
|
|
|
this.menuList = JSON.parse(localStorage.getItem("menuPermission"));
|
|
|
|
|
console.log(this.btnShowList);
|
|
|
|
|
this.menuShowList = JSON.parse(localStorage.getItem("menuPermission"));
|
|
|
|
|
|
|
|
|
|
console.log(this.btnShowList, this.menuShowList);
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getDateTime();
|
|
|
|
@ -288,11 +294,18 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
//控制显示与隐藏
|
|
|
|
|
showButton(key) {
|
|
|
|
|
return this.showButtonMap[key] || false;
|
|
|
|
|
if (this.roleUser !== "0") {
|
|
|
|
|
return this.showButtonMap[key] || false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//控制显示与隐藏
|
|
|
|
|
showhisButton(key) {
|
|
|
|
|
return this.showButtonhisMap[key] || false;
|
|
|
|
|
if (this.roleUser !== "0") {
|
|
|
|
|
return this.showhisButtonMap[key] || false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//双击选中复制
|
|
|
|
|
handleDblClick(val) {
|
|
|
|
|