liuQiang 1 жил өмнө
parent
commit
72ba2219fe

BIN
src/assets/images/home/ORC.jpg


BIN
src/assets/images/home/ORC_hover.jpg


BIN
src/assets/images/home/Rectangle.webp


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


BIN
src/assets/images/home/bg.mp4


BIN
src/assets/images/home/bigC.jpg


BIN
src/assets/images/home/p2w.jpg


BIN
src/assets/images/home/p2w_hover.jpg


BIN
src/assets/images/home/scan.jpg


BIN
src/assets/images/home/scan_hover.jpg


+ 2 - 2
src/layout/indexCommon.vue

@@ -252,9 +252,9 @@ const iFrameData = ref(JSON.parse(sessionStorage.getItem('fileTabData')) || [
 ]);
 //--------tabs-----------------
 let tabIndex = 2;
-const editableTabsValue = ref(JSON.parse(sessionStorage.getItem('editableTabsValue')) || "/index");
+const editableTabsValue = ref(JSON.parse(sessionStorage.getItem('editableTabsValue')) || "/home");
 // const editableTabsValue = ref("/index");
-const editableTabs = ref(JSON.parse(sessionStorage.getItem('tabData')) || [{ label: '首页', path: '/reindex' }]);
+const editableTabs = ref(JSON.parse(sessionStorage.getItem('tabData')) || [{ label: '首页', path: '/home' }]);
 
 // const removeTab = (targetName) => {
 //   const tabs = editableTabs.value;

+ 3 - 14
src/router/index.js

@@ -280,20 +280,9 @@ export const constantRoutes = [{
 		name: "allback",
 		meta: { title: "kongbaiye", icon: "department" }
 	}, {
-		path: "/admin",
-		component: Layout,
-		redirect: '/admin/index',
-		children: [{
-			path: 'index',
-			// component: () => import('@/layout/index.vue'),
-			name: 'adminIndex',
-			meta: {
-				title: '首页',
-				icon: 'dashboard',
-				affix: true
-			},
-
-		},]
+		path: "/home",
+		component: () => import('@/views/HomePage/HomePage.vue'),
+		name: 'home'
 	}
 	]
 },

+ 368 - 0
src/views/HomePage/HomePage.vue

@@ -0,0 +1,368 @@
+<template>
+  <div class="homePage">
+    <div class="bg_box">
+      <!-- 动态背景 -->
+      <video autoplay="autoplay" loop class="fillWidth" muted="muted">
+        <source src="@/assets/images/home/bg.mp4" type="video/mp4" />
+      </video>
+      <div class="bigC_box">
+        <!-- 中间的大圆 -->
+        <div class="bigImg_box">
+          <img src="@/assets/images/home/bigC.jpg" class="bigC" alt="" />
+          <div class="bidCText">
+            <span class="percentage">72.1%</span>
+            <span>存储空间</span>
+          </div>
+        </div>
+        <div class="ORC_box">
+          <span class="text">ORC工具</span>
+        </div>
+        <div class="sacn_box">
+          <span class="text">扫描工具</span>
+        </div>
+        <div class="p2w_box">
+          <span class="text">PDF转Word</span>
+        </div>
+      </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 14" :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>
+      <div class="right_box">
+        <div class="title">最近文件</div>
+        <div class="big_box">
+          <el-table
+            :data="tableFileData"
+            style="width: 100%"
+            height="30vh"
+            :scrollbar-always-on="true"
+          >
+            <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>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { onMounted, ref, toRaw, inject } from "vue";
+import { listRecent, getRecent } from "@/api/biz/recent";
+import { getInfo, getInfoByDirId } from "@/api/biz/info";
+import { canPreviewFile, rightMenuRole ,setIcon} from "@/utils/index.js";
+import { getDir } from "@/api/biz/dir";
+const tableFileData = ref([]);
+const tableFolderData = ref([]);
+
+const getList = async () => {
+  const resY = await listRecent({ isFolder: "Y" });
+  const resN = await listRecent({ isFolder: "N" });
+  console.log('resY',resY);
+  console.log('resN',resN);
+  if (resY.code === 200) {
+    var arr = [];
+    resY.rows.map(async (item) => {
+      const detail = await getDir(item.relaId);
+      if (detail.data != null)
+        tableFolderData.value.push(JSON.parse(JSON.stringify(detail.data)));
+    });
+  }
+  if (resN.code === 200) {
+    var arr = [];
+    resN.rows.map(async (item) => {
+      const detail = await getInfo(item.relaId);
+      tableFileData.value.push(detail.data);
+    });
+  }
+};
+const setImg = (type)=>{
+    return setIcon(type)
+}
+onMounted(() => {
+  getList();
+});
+</script>
+
+<style lang="scss" scoped>
+.homePage {
+  width: 100%;
+  height: 88vh;
+  //   background-color: #fff;
+}
+.bg_box {
+  width: 100%;
+  height: 600px;
+  position: relative;
+
+  //   background-image: url("@/assets/images/home/backImg.png");
+  //   background-repeat: no-repeat;
+  //   background-size: contain;
+  .fillWidth {
+    width: 100%;
+    height: 100%;
+    object-fit: fill;
+  }
+  .bigC_box {
+    width: 382px;
+    height: 382px;
+    position: absolute;
+    top: calc(40% - 191px);
+    left: calc(50% - 191px);
+    .bidCText {
+      position: absolute;
+      width: 108px;
+      height: 58px;
+      left: calc(50% - 54px);
+      top: calc(50% - 29px);
+      display: flex;
+      flex-direction: column;
+      color: #fff;
+      align-items: center;
+      z-index: 15;
+      .percentage {
+        font-weight: 800;
+        font-size: 40px;
+        line-height: 52px;
+      }
+    }
+    .ORC_box {
+      width: 118px;
+      height: 118px;
+      position: absolute;
+      top: 15%;
+      left: -10%;
+      background-image: url("@/assets/images/home/ORC.jpg");
+      background-repeat: no-repeat;
+      background-size: contain;
+      z-index: 15;
+      .text {
+        width: 100px;
+        text-align: center;
+        position: absolute;
+        bottom: -15%;
+        left: calc(50% - 50px);
+        font-size: 16px;
+        color: #fff;
+      }
+      &:hover {
+        background-image: url("@/assets/images/home/ORC_hover.jpg");
+      }
+    }
+    .sacn_box {
+      width: 118px;
+      height: 118px;
+      position: absolute;
+      top: 15%;
+      right: -10%;
+      background-image: url("@/assets/images/home/scan.jpg");
+      background-repeat: no-repeat;
+      background-size: contain;
+      z-index: 15;
+      .text {
+        width: 100px;
+        text-align: center;
+        position: absolute;
+        bottom: -15%;
+        left: calc(50% - 50px);
+        font-size: 16px;
+        color: #fff;
+      }
+      &:hover {
+        background-image: url("@/assets/images/home/scan_hover.jpg");
+      }
+    }
+    .p2w_box {
+      width: 118px;
+      height: 118px;
+      position: absolute;
+      bottom: -59px;
+      left: calc(50% - 59px);
+      background-image: url("@/assets/images/home/p2w.jpg");
+      background-repeat: no-repeat;
+      background-size: contain;
+      z-index: 15;
+      .text {
+        width: 100px;
+        text-align: center;
+        position: absolute;
+        bottom: -15%;
+        left: calc(50% - 50px);
+        font-size: 16px;
+        color: #fff;
+      }
+      &:hover {
+        background-image: url("@/assets/images/home/p2w_hover.jpg");
+      }
+    }
+  }
+  .bigC {
+    width: 382px;
+    height: 382px;
+    z-index: 10;
+    position: absolute;
+    top: calc(50% - 191px);
+    left: calc(50% - 191px);
+  }
+}
+.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%;
+    // border-right: 1px solid #000;
+    .title {
+      width: 100%;
+      height: 40px;
+      text-align: center;
+      line-height: 40px;
+      // border-bottom: 1px solid #000;
+      font-size: 16px;
+    }
+    .big_box {
+      width: 100%;
+      // height: 100%;
+      display: flex;
+      flex-wrap: wrap;
+      overflow-y: auto;
+      .one_box {
+        width: 214px;
+        height: 77px;
+        display: flex;
+        align-items: center;
+        .left {
+          width: 64px;
+          height: 64px;
+          img {
+            width: 100%;
+            height: 100%;
+          }
+        }
+        .right {
+          width: 124px;
+          height: 46px;
+          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;
+          }
+          .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;
+      }
+    }
+  }
+  .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;
+    }
+  }
+}
+:deep(.el-table td.el-table__cell) {
+  border: none;
+  font-size: 14px !important;
+  font-weight: 400 !important;
+  color: #000 !important;
+}
+:deep(.el-table__row) {
+  height: 32px !important;
+  vertical-align: middle;
+  // border-bottom: 1px solid #c1cce3;
+}
+
+:deep(.el-table .el-table__header-wrapper th) {
+  border-right: 1px solid #c1cce3;
+  border-bottom: 1px solid #c1cce3;
+  background-color: #fff !important;
+  color: #505870;
+  font-size: 14px;
+}
+</style>

+ 0 - 1
src/views/collect/index.vue

@@ -730,7 +730,6 @@ const tabchange = async (labelId) => {
   console.log("labelId", toRaw(labelId));
   thisFolder.value = null
   const query = {
-    labelId,
     isAsc: isAsc.value,
     orderByColumn: "createTime",
   };

+ 3 - 1
src/views/login.vue

@@ -229,7 +229,9 @@ async function handleLogin() {
             loading.value = false;
             // userStore.logOut();
           } else {
-            router.push({ path: redirect.value || "/" });
+            console.log('redirect',redirect.value);
+            // router.push({ path: redirect.value || "/home" });
+            router.push({ path: "/home" });
           }
         })
         .catch(() => {