|
@@ -124,7 +124,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["plazas", "plazaId", "fmapID", "plazaName", "permissions"]),
|
|
|
+ ...mapGetters([
|
|
|
+ "plazas",
|
|
|
+ "plazaId",
|
|
|
+ "fmapID",
|
|
|
+ "plazaName",
|
|
|
+ "permissions",
|
|
|
+ "userInfo",
|
|
|
+ ]),
|
|
|
},
|
|
|
watch: {
|
|
|
$route: "handleRoute",
|
|
@@ -138,7 +145,6 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.handleRoute(this.$route);
|
|
|
- // console.log(this.fmapID)
|
|
|
// 定时查询草稿箱数量
|
|
|
this.getDraftNum(); //首次查询
|
|
|
this.timer = setInterval(() => {
|
|
@@ -148,7 +154,6 @@ export default {
|
|
|
this.$once("hook:beforeDestroy", () => {
|
|
|
clearInterval(this.timer);
|
|
|
});
|
|
|
- console.log("permissions", this.permissions);
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
@@ -200,6 +205,33 @@ export default {
|
|
|
const { path } = newRouter;
|
|
|
let router = path.split("home/")[1];
|
|
|
this.modelNum(this.dict[router]);
|
|
|
+
|
|
|
+ // 当样式切换时样式设置为初始化
|
|
|
+ if (router == "homepage") {
|
|
|
+ this.showStyleBtn = true;
|
|
|
+ /**
|
|
|
+ * 使用localStorage中储存的, 当前用户的皮肤模式
|
|
|
+ */
|
|
|
+ let skinMode = localStorage.getItem(
|
|
|
+ `${this.userInfo.username}__skinMode`
|
|
|
+ );
|
|
|
+ if (skinMode) {
|
|
|
+ if (skinMode === "light") {
|
|
|
+ this.showStyle = false;
|
|
|
+ // 改变颜色风格
|
|
|
+ bus.$emit("changeStyleColor", false);
|
|
|
+ } else {
|
|
|
+ this.showStyle = true;
|
|
|
+ // 改变颜色风格
|
|
|
+ setTimeout(()=>{
|
|
|
+ bus.$emit("changeStyleColor", true);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.showStyleBtn = false;
|
|
|
+ this.showStyle = false;
|
|
|
+ }
|
|
|
},
|
|
|
formatter(str, arrv) {
|
|
|
if (str && arrv) {
|
|
@@ -423,7 +455,7 @@ export default {
|
|
|
align-items: center;
|
|
|
line-height: 48px;
|
|
|
color: #646c73;
|
|
|
- img{
|
|
|
+ img {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
}
|