ZaiZai 1 年間 前
コミット
6b5de5dc13

+ 8 - 2
src/layout/index.vue

@@ -1,7 +1,7 @@
 <template>
     <el-container class="hc-layout-box">
         <el-header class="hc-layout-header">
-            <div class="hc-layout-header-logo" :style="`width: ${isCollapse ? '90px' : '200px'};`">
+            <div class="hc-layout-header-logo" :style="`width: ${isCollapse ? '90px' : '200px'};`" @click="logoClick">
                 <img id="logo-icon" :src="appLogoIcon" alt="">
                 <img v-show="!isCollapse" id="logo-name" :src="appLogoName" alt="">
             </div>
@@ -47,6 +47,7 @@
 import { nextTick, onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRouter } from 'vue-router'
+import { initButtons } from '~sto/app'
 import HcSocket from '~src/plugins/HcSocket'
 import { getObjValue, isNullES } from 'js-fast-way'
 
@@ -75,7 +76,7 @@ const menuBarData = ref([])
 
 //渲染完成
 onMounted(() => {
-
+    initButtons()
 })
 
 //路由信息
@@ -142,6 +143,11 @@ const cascaderChange = () => {
         reloadRouter.value = true
     })
 }
+
+//首页
+const logoClick = () => {
+    router.push({ name: 'home-index' })
+}
 </script>
 
 <style lang="scss">

+ 1 - 2
src/layout/modules/Cascader.vue

@@ -19,7 +19,7 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getArrValue } from 'js-fast-way'
-import { initButtons, initProjectContract } from '~sto/app'
+import { initProjectContract } from '~sto/app'
 
 //事件
 const emit = defineEmits(['change', 'send'])
@@ -46,7 +46,6 @@ watch(() => store.getProjectContract, (val) => {
 
 //渲染完成
 onMounted(() => {
-    initButtons()
     initProjectContract()
     const info = store.getProjectContract || []
     projectContractData(info)

+ 17 - 2
src/styles/view/home.scss

@@ -1,7 +1,22 @@
 .home-styles-box {
-    position: relative;
-    height: 100%;
+    position: absolute;
+    inset: 0;
     overflow: hidden;
+    margin: -12px;
+    .hc-home-bg-box {
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        top: 0;
+        z-index: 0;
+        display: flex;
+        img {
+            width: 100%;
+            height: 100%;
+            object-fit: cover;
+        }
+    }
     .hc-home-input-box {
         position: relative;
         height: 100%;

+ 3 - 0
src/views/home/index.vue

@@ -1,5 +1,8 @@
 <template>
     <div class="home-styles-box">
+        <div class="hc-home-bg-box">
+            <img v-if="HomeTheme.bg" id="imagebox" :src="HomeTheme.bg" alt="" crossOrigin="anonymous">
+        </div>
         <div class="hc-home-input-box">
             <div class="hc-home-content">
                 <div class="hc-slogan-icon">