liuQiang 1 year ago
parent
commit
6e6cbaab61

BIN
src/assets/images/home/btm.png


BIN
src/assets/images/home/homeClose.png


+ 4 - 3
src/components/LeftList/LeftList.vue

@@ -139,9 +139,10 @@ const getTopDir = async () => {
   return;
 };
 const rightFn =async (node, data, e) => {
-  console.log("node", node);
-  console.log("data", data);
-  console.log("e", e);
+  // console.log("node", node);
+  // console.log("data", data);
+  // console.log("e", e);
+  if(node.level === 1)return
   const res = await getDir(data.id);
   emit('treeRClick',res.data,null,e)
 };

+ 27 - 8
src/layout/indexCommon.vue

@@ -69,15 +69,21 @@
               type="card"
               class="common-tabs"
             > -->
-            <el-tabs v-model="editableTabsValue" @tab-add="addTab" type="card" class="common-tabs">
+            <el-tabs v-model="editableTabsValue" @tab-add="addTab" type="card" :class="{ inHome: editableTabsValue == '/home' }" class="common-tabs">
               <!-- <el-tab-pane label="首页" @click="clickTab('/index')"> </el-tab-pane> -->
               <el-tab-pane v-for="(item, index) in toRaw(editableTabs)" :key="item.label" :label="item.label"
                 :name="item.path" :data-item="JSON.stringify(item)">
                 <template #label>
-                  <div class="tab_pane" @click="paneClick(item)">
+                  <div class="tab_pane" :class="{ inHomeLabel: editableTabsValue == '/home' }" @click="paneClick(item)">
                     <div class="tab_text">{{ item.label }}</div>
-                    <img v-if="item.label != '首页'" src="@/assets/images/close.png" @click="closeTab(item, index, $event)"
-                      alt="" />
+                    <div v-if="editableTabsValue == '/home'">
+                      <img v-if="item.label != '首页'" src="@/assets/images/home/homeClose.png" @click="closeTab(item, index, $event)"
+                        alt="" />
+                    </div>
+                    <div v-else>
+                      <img v-if="item.label != '首页'" src="@/assets/images/close.png" @click="closeTab(item, index, $event)"
+                        alt="" />
+                    </div>
                   </div>
                   <!-- <router-link
                     :key="item"
@@ -976,7 +982,7 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
   if (!regExp.test(editableTabsValue.value) && editableTabsValue.value != "identifyFont" && editableTabsValue.value != "search"&& editableTabsValue.value != "pdf2word") {
     isAlive.value = false;
   }
-  // console.log('first  editableTabsValue.value', editableTabsValue.value)
+  console.log('first  editableTabsValue.value', editableTabsValue.value)
 }, {
   immediate: true,
   deep: true
@@ -1010,7 +1016,9 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
 :deep .el-main {
   --el-main-padding: 8px !important;
 }
-
+.inHome{
+  background: linear-gradient(344deg, #010E70 0%, #000918 100%) !important;
+}
 .nav {
   background: #06286c;
   height: 48px;
@@ -1121,12 +1129,17 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
   padding: 0px 8px !important;
   margin-top: 4px !important;
   margin-left: 4px !important;
-  border: 1px solid #c1cce3 !important;
-  color: #505870 !important;
+  border: 1px solid #c1cce3 ;
+  color: #505870 ;
   font-size: 12px !important;
   line-height: 24px;
   font-weight: 400 !important;
 }
+:deep(.inHome .el-tabs__item) {
+  background-color: #4A5C8B !important;
+  border: 1px solid #8BA0BD !important;
+  color: #B7CBE7 !important;
+}
 
 // tag选中颜色
 :deep(.common-tabs .el-tabs__item.is-active) {
@@ -1134,6 +1147,12 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
   font-weight: normal;
   background-color: #6f85b5;
 }
+// tag选中颜色
+:deep(.inHome .el-tabs__item.is-active) {
+  color: #010C3D !important;
+  font-weight: normal;
+  background: #8BA0BD !important;
+}
 
 //侧边栏css
 .acitve-img-style {

+ 157 - 138
src/views/HomePage/HomePage.vue

@@ -26,57 +26,52 @@
       </div>
     </div>
     <div class="list_box">
-      <div class="left_box">
-        <div class="title">快捷访问</div>
-        <div class="big_box">
-          <div class="one_box" v-for="item in 20" :key="item">
-            <div class="left">
-              <img src="@/assets/images/fileBox.png" alt="" />
-            </div>
-            <div class="right">
-              <span class="title">Inceptos</span>
-              <span class="path">Inceptos11111111111111111111111111</span>
+      <div class="top">
+        <div class="left">快捷访问</div>
+        <div class="right">最近文件</div>
+      </div>
+      <div class="btm">
+        <div class="left_box">
+          <div class="big_box">
+            <div class="one_box" v-for="item in 20" :key="item">
+              <div class="left">
+                <img src="@/assets/images/fileBox.png" alt="" />
+              </div>
+              <div class="right">
+                <span class="title">Inceptos</span>
+                <span class="path">Inceptos11111111111111111111111111</span>
+              </div>
             </div>
+            <div class="add_box"></div>
           </div>
-          <div class="add_box"></div>
         </div>
-      </div>
-      <div class="right_box">
-        <div class="title">最近文件</div>
-        <div class="big_box">
-          <el-table
-            :data="tableFileData"
-            style="width: 100%"
-            height="29vh"
-            :scrollbar-always-on="false"
-          >
-            <el-table-column fixed prop="date" label="名称" width="500">
-              <template #default="scope">
-                <div class="title_row">
-                  <img
-                    class="table_icon"
-                    :src="setImg(scope.row == null ? '' : scope.row.fileType)"
-                    alt=""
-                    style=""
-                  />
-                  <span class="shouzhi">
-                    {{ scope.row == null ? "" : scope.row.fileName }}</span
-                  >
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="createTime" label="时间" width="180" />
-            <el-table-column prop="fileType" label="类型" width="180" />
-            <!-- <el-table-column label="大小">
-              <template #default="scope">
-                <span>
-                  {{
-                    formatFileSize(scope.row == null ? "" : scope.row.fileSize)
-                  }}
-                </span>
-              </template>
-            </el-table-column> -->
-          </el-table>
+        <div class="right_box">
+          <div class="big_box">
+            <el-table
+              :data="tableFileData"
+              style="width: 100%"
+              height="29vh"
+              :scrollbar-always-on="false"
+            >
+              <el-table-column fixed prop="date" label="名称" width="500">
+                <template #default="scope">
+                  <div class="title_row">
+                    <img
+                      class="table_icon"
+                      :src="setImg(scope.row == null ? '' : scope.row.fileType)"
+                      alt=""
+                      style=""
+                    />
+                    <span class="shouzhi">
+                      {{ scope.row == null ? "" : scope.row.fileName }}</span
+                    >
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="createTime" label="时间" width="180" />
+              <el-table-column prop="fileType" label="类型" width="230" />
+            </el-table>
+          </div>
         </div>
       </div>
     </div>
@@ -374,106 +369,114 @@ onMounted(() => {
 }
 .list_box {
   margin-top: -70px;
-  padding-left: 24px;
   box-sizing: border-box;
   position: relative;
   z-index: 105;
   width: 100%;
   height: calc(88vh - 600px + 70px);
-  background-image: url("@/assets/images/home/Rectangle.webp");
-  background-repeat: no-repeat;
-  background-size: cover;
-  display: flex;
-  .left_box {
-    width: 50%;
-    // height: 100%;
-    // overflow-y: auto;
-    // border-right: 1px solid #000;
-    .title {
-      width: 100%;
-      height: 40px;
-      text-align: center;
-      line-height: 40px;
-      // border-bottom: 1px solid #000;
-      font-size: 16px;
+  // background-image: url("@/assets/images/home/Rectangle.webp");
+  // background-repeat: no-repeat;
+  // background-size: cover;
+  // display: flex;
+  .top {
+    width: 100%;
+    height: 40px;
+    color: #f4f5ff;
+    display: flex;
+    background-image: url("@/assets/images/home/up.png");
+    background-repeat: no-repeat;
+    background-size: cover;
+    text-align: center;
+    line-height: 40px;
+    .left {
+      width: 50%;
+      height: 100%;
     }
-    .big_box {
-      width: 100%;
-      height: 29vh;
-      display: flex;
-      flex-wrap: wrap;
-      overflow-y: auto;
-      .one_box {
-        width: 214px;
-        height: 77px;
+    .right {
+      width: 50%;
+      height: 100%;
+    }
+  }
+  .btm {
+    background-image: url("@/assets/images/home/btm.png");
+    background-repeat: no-repeat;
+    background-size: cover;
+    display: flex;
+    .left_box {
+      width: 50%;
+      // height: 100%;
+      // overflow-y: auto;
+      // border-right: 1px solid #000;
+      .big_box {
+        width: 100%;
+        height: 29vh;
+        padding-left: 24px;
         display: flex;
-        align-items: center;
-        .left {
-          width: 64px;
-          height: 64px;
-          img {
-            width: 100%;
-            height: 100%;
-          }
-        }
-        .right {
-          width: 124px;
-          height: 46px;
+        flex-wrap: wrap;
+        overflow-y: auto;
+        .one_box {
+          width: 214px;
+          height: 77px;
           display: flex;
-          flex-direction: column;
-          align-items: flex-start;
-          // text-align: left;
-          .title {
-            font-size: 14px;
-            height: 22px;
-            line-height: 22px;
-            width: 100%;
-            text-align: left;
+          align-items: center;
+          .left {
+            width: 64px;
+            height: 64px;
+            img {
+              width: 100%;
+              height: 100%;
+            }
           }
-          .path {
-            font-size: 14px;
-            color: #7a89ba;
-            width: 120px;
-            /*第一步: 溢出隐藏 */
-            overflow: hidden;
-            /* 第二步:让文本不会换行, 在同一行继续 */
-            white-space: nowrap;
-            /* 第三步:用省略号来代表未显示完的文本 */
-            text-overflow: ellipsis;
+          .right {
+            width: 124px;
+            height: 46px;
+            display: flex;
+            flex-direction: column;
+            align-items: flex-start;
+            // text-align: left;
+            .title {
+              color: #f4f5ff;
+            }
+            .path {
+              font-size: 14px;
+              color: #7a89ba;
+              width: 120px;
+              /*第一步: 溢出隐藏 */
+              overflow: hidden;
+              /* 第二步:让文本不会换行, 在同一行继续 */
+              white-space: nowrap;
+              /* 第三步:用省略号来代表未显示完的文本 */
+              text-overflow: ellipsis;
+            }
           }
         }
+        .add_box {
+          width: 214px;
+          height: 77px;
+          background-image: url("@/assets/images/home/addBox.png");
+          background-repeat: no-repeat;
+          background-size: cover;
+        }
       }
-      .add_box {
-        width: 214px;
-        height: 77px;
-        background-image: url("@/assets/images/home/addBox.png");
-        background-repeat: no-repeat;
-        background-size: cover;
+      &::-webkit-scrollbar-track {
+        background-color: rgba(0, 0, 0, 0) !important;
       }
     }
-  }
-  .right_box {
-    width: 50%;
-    // height: 100%;
-    .title {
-      width: 100%;
-      height: 40px;
-      text-align: center;
-      line-height: 40px;
-      // border-bottom: 1px solid #000;
-      font-size: 16px;
-    }
-    .title_row {
-      display: flex;
-      align-items: center;
-      // vertical-align: middle;
-    }
-    .table_icon {
-      width: 32px;
-      height: 32px;
-    }
-    .shouzhi {
-      cursor: pointer;
+    .right_box {
+      width: 50%;
+      // height: 100%;
+      .title_row {
+        display: flex;
+        align-items: center;
+        // vertical-align: middle;
+      }
+      .table_icon {
+        width: 32px;
+        height: 32px;
+      }
+      .shouzhi {
+        cursor: pointer;
+      }
     }
   }
 }
@@ -487,10 +490,20 @@ onMounted(() => {
   display: flex;
   align-items: center;
 }
+:deep(.el-table) {
+  background-color: rgba(0, 0, 0, 0) !important;
+}
+:deep(.el-table__header) {
+  background-color: rgba(0, 0, 0, 0) !important;
+}
+:deep(.el-table__header-wrapper) {
+  background-color: rgba(0, 0, 0, 0) !important;
+}
 :deep(.el-table td.el-table__cell) {
   border: none;
   font-size: 14px !important;
   font-weight: 400 !important;
+
   color: #000 !important;
 }
 :deep(.el-table__row) {
@@ -499,11 +512,17 @@ onMounted(() => {
   // border-bottom: 1px solid #c1cce3;
 }
 
+:deep(.el-table .el-table__header-wrapper tr) {
+  background-color: rgba(50, 79, 153, 0) !important;
+}
 :deep(.el-table .el-table__header-wrapper th) {
-  border-right: 1px solid #c1cce3;
-  border-bottom: 1px solid #c1cce3;
-  background-color: #fff !important;
-  color: #505870;
+  // border-right: 1px solid #c1cce3;
+  border-bottom: 1px solid #324f99;
+  background-color: rgba(50, 79, 153, 0.3) !important;
+  color: #7a89ba;
   font-size: 14px;
 }
+::-webkit-scrollbar-track {
+  background-color: rgba(0, 0, 0, 0) !important;
+}
 </style>