scorpioyq 2 жил өмнө
parent
commit
e8608c3fbf

+ 1 - 0
src/assets/svg/icon4.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:none;}.b{fill:#f1e1ce;}.c{clip-path:url(#a);}.d{fill:#825618;}.e{fill:#db9c4b;}</style><clipPath id="a"><rect class="a" width="15.78" height="14"/></clipPath></defs><g transform="translate(-43 -473)"><circle class="b" cx="12.5" cy="12.5" r="12.5" transform="translate(43 473)"/><g transform="translate(47.61 478.5)"><g class="c"><path class="d" d="M1.645,11.533V.823A.823.823,0,1,0,0,.823V11.868A2.132,2.132,0,0,0,2.133,14H14.957a.823.823,0,1,0,0-1.645H2.467a.822.822,0,0,1-.822-.822"/><path class="e" d="M4.247,5.268h0a.923.923,0,0,0-.923.923V9.345a.923.923,0,0,0,1.846,0V6.191a.923.923,0,0,0-.923-.923"/><path class="e" d="M8.247,2.268h0a.923.923,0,0,0-.923.923V9.345a.923.923,0,0,0,1.846,0V3.191a.923.923,0,0,0-.923-.923"/><path class="e" d="M12.247.268h0a.923.923,0,0,0-.923.923V9.345a.923.923,0,0,0,1.846,0V1.191a.923.923,0,0,0-.923-.923"/></g></g></g></svg>

+ 14 - 11
src/layout/left.vue

@@ -8,12 +8,15 @@
     <div>
       <div class="flex flex-center flex-col bold font-18 item-bg  padding-bottom full-width ">
         <div v-for="(item,index) in data" :key="item.name" class="full-width  flex flex-col flex-center pointer ">
-          <div class='full-width flex flex-center padding' style='z-index: 2' :class="active === index ? 'item-s' : 'item'" @click="navClick(item,index)">
+          <div class='full-width flex flex-center padding' style='z-index: 2'
+               :class="active === index ? 'item-s' : 'item'" @click="navClick(item,index)">
             <img :src=item.img>
             <span class="flex-child-average">{{ item.name }}</span>
           </div>
-          <div v-if='item.children && item.children.length > 0 && active === index' class=' flex flex-col flex-center item-sub padding'>
-            <div v-for='(sub,subIndex) in item.children' :key='item' class='padding full-width flex flex-center' :class='subIndex === subActive ?  "item-sub-active":"" ' @click='subClick(sub,subIndex)'>
+          <div v-if='item.children && item.children.length > 0 && active === index'
+               class=' flex flex-col flex-center item-sub padding'>
+            <div v-for='(sub,subIndex) in item.children' :key='item' class='padding full-width flex flex-center'
+                 :class='subIndex === subActive ?  "item-sub-active":"" ' @click='subClick(sub,subIndex)'>
               <div class='mr-10 main-color'>·</div>
               <span>{{ sub.name }}</span>
             </div>
@@ -26,7 +29,7 @@
 
 <script>
 export default {
-  data () {
+  data() {
     return {
       active: 0,
       subActive: 0,
@@ -38,7 +41,7 @@ export default {
         },
         {
           name: '年度投资管理',
-          img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+          img: new URL('../assets/svg/icon4.svg', import.meta.url).href,
           path: '/invest'
         },
         {
@@ -52,12 +55,12 @@ export default {
           children: [
             {
               name: '项目资料',
-              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              img: new URL('../assets/svg/icon2.svg', import.meta.url).href,
               path: '/database'
             },
             {
               name: '公司资料',
-              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              img: new URL('../assets/svg/icon2.svg', import.meta.url).href,
               path: '/components'
             }
           ]
@@ -71,12 +74,12 @@ export default {
       currentPage: ''
     }
   },
-  created () {
+  created() {
     this.currentPage = window.location.href
     this.init()
   },
   methods: {
-    init () {
+    init() {
       if (this.currentPage.indexOf('/invest') > -1) {
         this.active = 1
       } else if (this.currentPage.indexOf('/task') > -1) {
@@ -89,7 +92,7 @@ export default {
         this.active = 0
       }
     },
-    navClick (item, index) {
+    navClick(item, index) {
       this.active = index
       if (item.children && item.children.length > 0) {
         this.subActive = 0
@@ -98,7 +101,7 @@ export default {
         this.$router.push(item.path)
       }
     },
-    subClick (item, index) {
+    subClick(item, index) {
       this.subActive = index
       this.$router.push(item.path)
     }

+ 8 - 3
src/views/invest/components/left.vue

@@ -1,13 +1,18 @@
 <template>
   <div>
-    <span>年度资金管理</span>
-    <el-button>总览</el-button>
+    <div class="flex flex-col flex-center">
+      <span class="font-15 grey-6 bold">年度资金管理</span>
+      <base-button class="mt-20" title="全县投资情况" icon=""/>
+    </div>
   </div>
 </template>
 
 <script>
+import baseButton from "@/components/base-button.vue";
+
 export default {
-  name: 'left'
+  name: 'left',
+  components: {baseButton}
 }
 </script>