|
@@ -20,6 +20,7 @@
|
|
|
color="#222"
|
|
|
></SvgIcons>
|
|
|
</div>
|
|
|
+<<<<<<< HEAD
|
|
|
<span
|
|
|
v-if="!isCollapse"
|
|
|
@click="
|
|
@@ -32,6 +33,14 @@
|
|
|
>
|
|
|
风机运行管理平台
|
|
|
</span>
|
|
|
+=======
|
|
|
+ <span v-if="!isCollapse" @click="
|
|
|
+ handleChangeMenuUrl(
|
|
|
+ { name: '驾驶舱', id: 1, path: 'cockpitManage', iconName: 'gps' },
|
|
|
+ `/home/cockpitManage?name=驾驶舱`
|
|
|
+ )
|
|
|
+ " :class="isCollapse ? 'stop-animation' : 'active-animation'">风机运行管理平台</span>
|
|
|
+>>>>>>> origin/master
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-menu
|
|
@@ -84,6 +93,7 @@
|
|
|
</div>
|
|
|
</el-menu>
|
|
|
<div class="foldBox flexCenter">
|
|
|
+<<<<<<< HEAD
|
|
|
<span
|
|
|
v-show="isCollapse"
|
|
|
class="el-icon-s-unfold icon"
|
|
@@ -98,14 +108,16 @@
|
|
|
>
|
|
|
收起
|
|
|
</span>
|
|
|
+=======
|
|
|
+ <span v-show="isCollapse" class="el-icon-s-unfold icon" @click="isCollapse = false">展开</span>
|
|
|
+ <span v-show="!isCollapse" class="el-icon-s-fold icon" @click="isCollapse = true">收起</span>
|
|
|
+>>>>>>> origin/master
|
|
|
</div>
|
|
|
</el-aside>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import debounce from "lodash/debounce";
|
|
|
import { orgList } from "./mockData";
|
|
|
-
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -117,13 +129,13 @@ export default {
|
|
|
keyObject: {},
|
|
|
routerList: [
|
|
|
{
|
|
|
- id: 1,
|
|
|
+ id:1,
|
|
|
path: "cockpitManage",
|
|
|
name: "驾驶舱",
|
|
|
iconName: "gps",
|
|
|
children: [
|
|
|
{
|
|
|
- id: 11,
|
|
|
+ id:11,
|
|
|
iconName: "gps",
|
|
|
path: "electronic-map",
|
|
|
name: "电子地图",
|
|
@@ -139,24 +151,21 @@ export default {
|
|
|
...this.$store.state.auth.dynamicRouter,
|
|
|
];
|
|
|
console.log(this.routerList, "组件内dynamicRouter");
|
|
|
-
|
|
|
- // Debounce the toggle collapse function to prevent rapid toggling
|
|
|
- this.debouncedToggleCollapse = debounce(this.toggleCollapse, 300);
|
|
|
},
|
|
|
computed: {
|
|
|
- // currentMenuIndex() {
|
|
|
- // return this.$store.state.breadStore?.currentUrl?.routeUrl;
|
|
|
- // },
|
|
|
+ currentMenuIndex() {
|
|
|
+ return this.$store.state.breadStore?.currentUrl?.routeUrl;
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
- // currentMenuIndex: {
|
|
|
- // deep: true,
|
|
|
- // handler(newVale, oldVal) {
|
|
|
- // if (newVale) {
|
|
|
- // this.$refs.menu.close(newVale);
|
|
|
- // }
|
|
|
- // },
|
|
|
- // },
|
|
|
+ currentMenuIndex: {
|
|
|
+ deep: true,
|
|
|
+ handler(newVale, oldVal) {
|
|
|
+ if (newVale) {
|
|
|
+ this.$refs.menu.close(newVale);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
keyObject: {
|
|
|
deep: true,
|
|
|
handler(newVale) {
|
|
@@ -200,16 +209,16 @@ export default {
|
|
|
keyPath,
|
|
|
};
|
|
|
},
|
|
|
- // shrinkTree() {
|
|
|
- // this.$refs.menu.close(`/orgsPage?id=${orgList.id}&name=${orgList.name}`);
|
|
|
- // },
|
|
|
- // handleChangeRouter() {
|
|
|
- // this.activeIndex = true;
|
|
|
- // this.defaultActive = "";
|
|
|
- // this.$store.commit("breadStore/ADD_BREAD", []);
|
|
|
- // this.$refs.menu.close(`/orgsPage?id=${orgList.id}&name=${orgList.name}`);
|
|
|
- // this.$router.push("/");
|
|
|
- // },
|
|
|
+ shrinkTree() {
|
|
|
+ this.$refs.menu.close(`/orgsPage?id=${orgList.id}&name=${orgList.name}`);
|
|
|
+ },
|
|
|
+ handleChangeRouter() {
|
|
|
+ this.activeIndex = true;
|
|
|
+ this.defaultActive = "";
|
|
|
+ this.$store.commit("breadStore/ADD_BREAD", []);
|
|
|
+ this.$refs.menu.close(`/orgsPage?id=${orgList.id}&name=${orgList.name}`);
|
|
|
+ this.$router.push("/");
|
|
|
+ },
|
|
|
handleChangeMenuUrl(item, key) {
|
|
|
this.defaultActive = key;
|
|
|
if (item) {
|
|
@@ -219,9 +228,6 @@ export default {
|
|
|
path: key,
|
|
|
});
|
|
|
},
|
|
|
- toggleCollapse(value) {
|
|
|
- this.isCollapse = value;
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -357,40 +363,17 @@ export default {
|
|
|
justify-content: center !important;
|
|
|
}
|
|
|
|
|
|
-// .foldBox {
|
|
|
-// position: fixed;
|
|
|
-// bottom: 10px;
|
|
|
-// left: 20px;
|
|
|
-// padding: 10px;
|
|
|
-
|
|
|
-// .icon {
|
|
|
-// cursor: pointer;
|
|
|
-// color: #666;
|
|
|
-// font-size: 14px;
|
|
|
-// }
|
|
|
-// }
|
|
|
-/* 添加过渡效果 */
|
|
|
-.foldBox .icon {
|
|
|
- transition: opacity 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-/* 菜单 icon 居中展示 */
|
|
|
.foldBox {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-
|
|
|
-.foldBox .icon {
|
|
|
- cursor: pointer;
|
|
|
- color: #666;
|
|
|
- font-size: 14px;
|
|
|
- margin-right: 8px;
|
|
|
- /* 调整图标与文字之间的间距 */
|
|
|
-}
|
|
|
-
|
|
|
-.foldBox .icon:last-child {
|
|
|
- margin-right: 0;
|
|
|
- /* 最后一个图标不设置右边距 */
|
|
|
+ position: fixed;
|
|
|
+ bottom: 10px;
|
|
|
+ left: 20px;
|
|
|
+ padding: 10px;
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #666;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
::v-deep .el-submenu__title {
|