|
@@ -1,14 +1,23 @@
|
|
<template>
|
|
<template>
|
|
- <div id="serviceLeft">
|
|
|
|
|
|
+ <div id="gainLeft">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="24" class="main">
|
|
|
|
- <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
|
|
|
|
- <el-menu-item index="1">
|
|
|
|
- <span slot="title">需求发布</span>
|
|
|
|
- </el-menu-item>
|
|
|
|
|
|
+ <el-col :span="24" class="gainLeft">
|
|
|
|
+ <el-menu :default-active="path" class="el-menu-vertical-demo" :router="true">
|
|
|
|
+ <template v-for="(item, index) in subMenu">
|
|
|
|
+ <template v-if="item.children&&item.children.length>0">
|
|
|
|
+ <template v-for="(sec) in item.children">
|
|
|
|
+ <el-menu-item :index="sec.path" :key="sec.id" v-if="sec.type !== 'url'">{{ sec.title }}</el-menu-item>
|
|
|
|
+ <el-menu-item :index="``" :key="sec.id" @click="turnTo(sec.url)" v-else> {{ sec.title }}</el-menu-item>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
|
|
+ <el-menu-item :index="item.path" :key="index" v-else-if="item.type === 'content'||item.type==='column'">
|
|
|
|
+ {{ item.title }}</el-menu-item>
|
|
|
|
+ <el-menu-item :index="`${index}-${subIndex}`" :key="index" @click="turnTo(item.url)" v-else>
|
|
|
|
+ {{ item.title }}</el-menu-item>
|
|
|
|
+ </template>
|
|
</el-menu>
|
|
</el-menu>
|
|
<el-col :span="24" class="button">
|
|
<el-col :span="24" class="button">
|
|
- <el-button type="primary" plain>我要发布</el-button>
|
|
|
|
|
|
+ <el-button type="primary">我要发布</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -18,9 +27,10 @@
|
|
<script>
|
|
<script>
|
|
import { mapActions, mapState, mapMutations } from 'vuex';
|
|
import { mapActions, mapState, mapMutations } from 'vuex';
|
|
export default {
|
|
export default {
|
|
- name: 'serviceLeft',
|
|
|
|
|
|
+ name: 'gainLeft',
|
|
props: {},
|
|
props: {},
|
|
components: {},
|
|
components: {},
|
|
|
|
+ data: () => ({}),
|
|
created() { this.getSubMenu() },
|
|
created() { this.getSubMenu() },
|
|
watch: {
|
|
watch: {
|
|
path: 'getSubMenu',
|
|
path: 'getSubMenu',
|
|
@@ -36,23 +46,29 @@ export default {
|
|
getSubMenu() {
|
|
getSubMenu() {
|
|
this.setSubMenu(this.path);
|
|
this.setSubMenu(this.path);
|
|
},
|
|
},
|
|
- handleOpen(key, keyPath) {
|
|
|
|
- console.log(key, keyPath);
|
|
|
|
- },
|
|
|
|
- handleClose(key, keyPath) {
|
|
|
|
- console.log(key, keyPath);
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-.main {
|
|
|
|
|
|
+.gainLeft {
|
|
min-height: 500px;
|
|
min-height: 500px;
|
|
background-color: rgba(255, 255, 255, 0.8);
|
|
background-color: rgba(255, 255, 255, 0.8);
|
|
}
|
|
}
|
|
|
|
+.info {
|
|
|
|
+ height: 44px;
|
|
|
|
+ line-height: 44px;
|
|
|
|
+ padding: 0 15px;
|
|
|
|
+}
|
|
|
|
+.info .title {
|
|
|
|
+ border-bottom: 1px dashed #ccc;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ height: 40px;
|
|
|
|
+ width: 260px;
|
|
|
|
+ padding: 0 0px;
|
|
|
|
+}
|
|
.button {
|
|
.button {
|
|
text-align: right;
|
|
text-align: right;
|
|
- padding: 10px;
|
|
|
|
|
|
+ padding: 20px 10px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|