Browse Source

feat: 项目完成

sunxiao 3 months ago
parent
commit
1712551444

BIN
.DS_Store


+ 8 - 0
.env.development

@@ -0,0 +1,8 @@
+# 页面标题
+VITE_APP_TITLE = LibraAI智能体运营平台
+
+# 开发环境配置
+VITE_APP_ENV = 'development'
+
+# 管理系统/开发环境
+VITE_APP_BASE_API =  ''

+ 11 - 0
.env.production

@@ -0,0 +1,11 @@
+# 页面标题
+VITE_APP_TITLE = LibraAI智能体运营平台
+
+# 生产环境配置
+VITE_APP_ENV = 'production'
+
+# 管理系统/生产环境
+VITE_APP_BASE_API = '/apiServe/'
+
+# 是否在打包时开启压缩,支持 gzip 和 brotli
+VITE_BUILD_COMPRESS = gzip

+ 20 - 44
.gitignore

@@ -1,47 +1,23 @@
-######################################################################
-# Build Tools
-
-.gradle
-/build/
-!gradle/wrapper/gradle-wrapper.jar
-
-target/
-!.mvn/wrapper/maven-wrapper.jar
-
-######################################################################
-# IDE
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### JRebel ###
-rebel.xml
-
-### NetBeans ###
-nbproject/private/
-build/*
-nbbuild/
+.DS_Store
+node_modules/
 dist/
-nbdist/
-.nb-gradle/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+**/*.log
 
-######################################################################
-# Others
-*.log
-*.xml.versionsBackup
-*.swp
+tests/**/coverage/
+tests/e2e/reports
+selenium-debug.log
 
-!*/build/*.java
-!*/build/*.html
-!*/build/*.xml
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.local
+
+package-lock.json
+yarn.lock

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <link rel="icon" href="/favicon.ico">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Vite App</title>
+    <title>红杉天枰系统平台入口</title>
   </head>
   <body>
     <div id="app"></div>

+ 5 - 0
package.json

@@ -9,12 +9,17 @@
     "preview": "vite preview"
   },
   "dependencies": {
+    "dayjs": "^1.11.13",
     "pinia": "^2.2.6",
     "vue": "^3.5.13",
     "vue-router": "^4.4.5"
   },
   "devDependencies": {
     "@vitejs/plugin-vue": "^5.2.1",
+    "autoprefixer": "^10.4.20",
+    "sass": "^1.83.0",
+    "sass-loader": "^16.0.4",
+    "tailwindcss": "^3.4.16",
     "vite": "^6.0.1",
     "vite-plugin-vue-devtools": "^7.6.5"
   }

+ 6 - 0
postcss.config.js

@@ -0,0 +1,6 @@
+export default {
+  plugins: {
+    tailwindcss: {},
+    autoprefixer: {},
+  },
+}

BIN
public/favicon.ico


+ 1 - 79
src/App.vue

@@ -1,85 +1,7 @@
 <script setup>
-import { RouterLink, RouterView } from 'vue-router'
-import HelloWorld from './components/HelloWorld.vue'
+import { RouterView } from 'vue-router'
 </script>
 
 <template>
-  <header>
-    <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
-
-    <div class="wrapper">
-      <HelloWorld msg="You did it!" />
-
-      <nav>
-        <RouterLink to="/">Home</RouterLink>
-        <RouterLink to="/about">About</RouterLink>
-      </nav>
-    </div>
-  </header>
-
   <RouterView />
 </template>
-
-<style scoped>
-header {
-  line-height: 1.5;
-  max-height: 100vh;
-}
-
-.logo {
-  display: block;
-  margin: 0 auto 2rem;
-}
-
-nav {
-  width: 100%;
-  font-size: 12px;
-  text-align: center;
-  margin-top: 2rem;
-}
-
-nav a.router-link-exact-active {
-  color: var(--color-text);
-}
-
-nav a.router-link-exact-active:hover {
-  background-color: transparent;
-}
-
-nav a {
-  display: inline-block;
-  padding: 0 1rem;
-  border-left: 1px solid var(--color-border);
-}
-
-nav a:first-of-type {
-  border: 0;
-}
-
-@media (min-width: 1024px) {
-  header {
-    display: flex;
-    place-items: center;
-    padding-right: calc(var(--section-gap) / 2);
-  }
-
-  .logo {
-    margin: 0 2rem 0 0;
-  }
-
-  header .wrapper {
-    display: flex;
-    place-items: flex-start;
-    flex-wrap: wrap;
-  }
-
-  nav {
-    text-align: left;
-    margin-left: -1rem;
-    font-size: 1rem;
-
-    padding: 1rem 0;
-    margin-top: 1rem;
-  }
-}
-</style>

+ 0 - 86
src/assets/base.css

@@ -1,86 +0,0 @@
-/* color palette from <https://github.com/vuejs/theme> */
-:root {
-  --vt-c-white: #ffffff;
-  --vt-c-white-soft: #f8f8f8;
-  --vt-c-white-mute: #f2f2f2;
-
-  --vt-c-black: #181818;
-  --vt-c-black-soft: #222222;
-  --vt-c-black-mute: #282828;
-
-  --vt-c-indigo: #2c3e50;
-
-  --vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
-  --vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
-  --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
-  --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
-
-  --vt-c-text-light-1: var(--vt-c-indigo);
-  --vt-c-text-light-2: rgba(60, 60, 60, 0.66);
-  --vt-c-text-dark-1: var(--vt-c-white);
-  --vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
-}
-
-/* semantic color variables for this project */
-:root {
-  --color-background: var(--vt-c-white);
-  --color-background-soft: var(--vt-c-white-soft);
-  --color-background-mute: var(--vt-c-white-mute);
-
-  --color-border: var(--vt-c-divider-light-2);
-  --color-border-hover: var(--vt-c-divider-light-1);
-
-  --color-heading: var(--vt-c-text-light-1);
-  --color-text: var(--vt-c-text-light-1);
-
-  --section-gap: 160px;
-}
-
-@media (prefers-color-scheme: dark) {
-  :root {
-    --color-background: var(--vt-c-black);
-    --color-background-soft: var(--vt-c-black-soft);
-    --color-background-mute: var(--vt-c-black-mute);
-
-    --color-border: var(--vt-c-divider-dark-2);
-    --color-border-hover: var(--vt-c-divider-dark-1);
-
-    --color-heading: var(--vt-c-text-dark-1);
-    --color-text: var(--vt-c-text-dark-2);
-  }
-}
-
-*,
-*::before,
-*::after {
-  box-sizing: border-box;
-  margin: 0;
-  font-weight: normal;
-}
-
-body {
-  min-height: 100vh;
-  color: var(--color-text);
-  background: var(--color-background);
-  transition:
-    color 0.5s,
-    background-color 0.5s;
-  line-height: 1.6;
-  font-family:
-    Inter,
-    -apple-system,
-    BlinkMacSystemFont,
-    'Segoe UI',
-    Roboto,
-    Oxygen,
-    Ubuntu,
-    Cantarell,
-    'Fira Sans',
-    'Droid Sans',
-    'Helvetica Neue',
-    sans-serif;
-  font-size: 15px;
-  text-rendering: optimizeLegibility;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}

BIN
src/assets/images/home/bg-page.png


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


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


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


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


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


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


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


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


File diff suppressed because it is too large
+ 1 - 0
src/assets/images/svg/logo-text.svg


+ 0 - 0
src/assets/images/svg/logo.svg


+ 0 - 1
src/assets/logo.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

+ 0 - 35
src/assets/main.css

@@ -1,35 +0,0 @@
-@import './base.css';
-
-#app {
-  max-width: 1280px;
-  margin: 0 auto;
-  padding: 2rem;
-  font-weight: normal;
-}
-
-a,
-.green {
-  text-decoration: none;
-  color: hsla(160, 100%, 37%, 1);
-  transition: 0.4s;
-  padding: 3px;
-}
-
-@media (hover: hover) {
-  a:hover {
-    background-color: hsla(160, 100%, 37%, 0.2);
-  }
-}
-
-@media (min-width: 1024px) {
-  body {
-    display: flex;
-    place-items: center;
-  }
-
-  #app {
-    display: grid;
-    grid-template-columns: 1fr 1fr;
-    padding: 0 2rem;
-  }
-}

+ 1 - 0
src/assets/styles/index.scss

@@ -0,0 +1 @@
+@import "reset.css";

+ 152 - 0
src/assets/styles/reset.css

@@ -0,0 +1,152 @@
+body {
+  height: 100%;
+  -moz-osx-font-smoothing: grayscale;
+  -webkit-font-smoothing: antialiased;
+  text-rendering: optimizeLegibility;
+  font-family: PingFang SC, Noto Sans SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+  overflow: hidden;
+}
+
+/* Helvetica Neue, Helvetica, */
+label {
+  font-weight: 700;
+}
+
+html {
+  /* height: 100%; */
+  box-sizing: border-box;
+}
+
+#app {
+  height: 100%;
+}
+
+*,
+*:before,
+*:after {
+  box-sizing: inherit;
+}
+
+body,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+hr,
+p,
+blockquote,
+dl,
+dt,
+dd,
+ul,
+ol,
+li,
+pre,
+form,
+fieldset,
+legend,
+button,
+input,
+textarea,
+th,
+td {
+  margin: 0;
+  padding: 0;
+}
+
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-size: 100%;
+}
+
+address,
+cite,
+dfn,
+em,
+var {
+  font-style: normal;
+}
+
+ul,
+ol {
+  list-style: none;
+}
+
+a {
+  text-decoration: none;
+}
+
+a:hover {
+  text-decoration: underline;
+}
+
+sup {
+  vertical-align: text-top;
+}
+
+sub {
+  vertical-align: text-bottom;
+}
+
+legend {
+  color: #000;
+}
+
+fieldset,
+img {
+  border: 0;
+}
+
+i {
+  font-style: normal;
+}
+
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+video:focus {
+  outline: none;
+}
+
+::-webkit-scrollbar {
+  width: 5px;
+}
+
+::-webkit-scrollbar-track {
+  background-color: #f1f1f1;
+}
+
+::-webkit-scrollbar-thumb {
+  background-color: rgba(0, 0, 0, .25);
+  border-radius: 5px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+  background-color: rgba(0, 0, 0, 0.4);
+}
+
+::-webkit-scrollbar-button {
+  display: none;
+}
+
+
+a {
+  text-decoration: none;
+}
+
+a:hover,
+a:focus,
+a:active {
+
+  text-decoration: none;
+
+}

+ 3 - 0
src/assets/styles/tailwind.css

@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;

+ 3 - 2
src/main.js

@@ -1,11 +1,12 @@
-import './assets/main.css'
-
 import { createApp } from 'vue'
 import { createPinia } from 'pinia'
 
 import App from './App.vue'
 import router from './router'
 
+import './assets/styles/tailwind.css'
+import './assets/styles/index.scss'
+
 const app = createApp(App)
 
 app.use(createPinia())

+ 3 - 11
src/router/index.js

@@ -2,22 +2,14 @@ import { createRouter, createWebHistory } from 'vue-router'
 import HomeView from '../views/HomeView.vue'
 
 const router = createRouter({
-  history: createWebHistory(import.meta.env.BASE_URL),
+  history: createWebHistory('/index/'),
   routes: [
     {
       path: '/',
       name: 'home',
       component: HomeView,
-    },
-    {
-      path: '/about',
-      name: 'about',
-      // route level code-splitting
-      // this generates a separate chunk (About.[hash].js) for this route
-      // which is lazy-loaded when the route is visited.
-      component: () => import('../views/AboutView.vue'),
-    },
+    }
   ],
 })
 
-export default router
+export default router;

+ 0 - 15
src/views/AboutView.vue

@@ -1,15 +0,0 @@
-<template>
-  <div class="about">
-    <h1>This is an about page</h1>
-  </div>
-</template>
-
-<style>
-@media (min-width: 1024px) {
-  .about {
-    min-height: 100vh;
-    display: flex;
-    align-items: center;
-  }
-}
-</style>

+ 204 - 4
src/views/HomeView.vue

@@ -1,9 +1,209 @@
 <script setup>
-import TheWelcome from '../components/TheWelcome.vue'
+import { ref, onMounted } from 'vue';
+import dayjs from 'dayjs';
+
+import icon01 from '@/assets/images/home/icon1.png';
+import icon02 from '@/assets/images/home/icon2.png';
+import icon03 from '@/assets/images/home/icon3.png';
+import icon04 from '@/assets/images/home/icon4.png';
+import icon05 from '@/assets/images/home/icon5.png';
+import icon06 from '@/assets/images/home/icon6.png';
+import icon07 from '@/assets/images/home/icon7.png';
+
+const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
+const releaseDate = ref(null); 
+const releaseTime = ref(null);
+const dayOfWeek = ref(null);
+
+const categoryList = [
+  {img: icon01, title: 'LibraAl智能体运营平台', subTitle: '(正式)', src: 'http://chat.sequoialibra.com:81'},
+  {img: icon02, title: 'LibraAl智能体运营平台', subTitle: '(正式后台)', src: 'http://chat.sequoialibra.com:81/admin/'},
+  {img: icon03, title: 'LibraAl智能体运营平台', subTitle: '(测试)', src: 'http://192.168.40.21'},
+  {img: icon04, title: 'LibraAl智能体运营平台', subTitle: '(测试后台)', src: 'http://192.168.40.21/admin/'},
+  {img: icon05, title: '智能国标化验室', subTitle: '管理平台', src: 'http://192.168.40.20/'},
+  {img: icon06, title: '数据资产', subTitle: '管理系统', src: 'http://192.168.40.21/sjzc/'},
+  {img: icon07, title: '锡林浩特开发区污水处理', subTitle: '二厂系统', src: 'http://10.1.100.119:8899/'}
+];
+const handleClickLink = ({ src }) => {
+  window.open(src);
+}
+const getReleaseDate = () => {
+  dayOfWeek.value = weekDays[dayjs().day()];
+  releaseDate.value = dayjs().format('YYYY-MM-DD');
+  releaseTime.value = dayjs().format('HH:mm:ss');
+}
+
+onMounted(() => {
+  getReleaseDate();
+  setInterval(() => getReleaseDate(), 1000);
+})
 </script>
 
 <template>
-  <main>
-    <TheWelcome />
-  </main>
+  <div class="app-container">
+    <header class="header">
+      <div class="header-left">
+        <img src="@/assets/images/home/logo.png" alt="" class="logo"></img>
+      </div>
+      <div class="header-right space-x-[16px]">
+        <div class="time space-x-[10px]">
+          <span>{{ releaseDate }}</span>
+          <span>{{ releaseTime }}</span>
+        </div>
+        <div class="week">{{ dayOfWeek }}</div>
+      </div>
+    </header>
+    <main class="main">
+      <ul class="title space-y-[8px]">
+        <li><img src="@/assets/images/svg/logo-text.svg" alt="" /></li>
+        <li><span>LibraAI平台管理入口</span></li>
+      </ul>
+      <div class="category-warp">
+        <div class="category-item space-y-[8px]" v-for="(item, index) in categoryList" :key="index" @click="handleClickLink(item)">
+          <img :src="item.img" alt="" class="block w-[80px] h-[80px]">
+          <div>
+            <p>{{ item.title }}</p>
+            <p>{{ item.subTitle }}</p>
+          </div>
+        </div>
+      </div>
+    </main>
+  </div>
 </template>
+
+<style lang="scss" scoped>
+.app-container {
+  display: flex;
+  flex-flow: column;
+  width: 100vw;
+  height: 100vh;
+  background: url("@/assets/images/home/bg-page.png") center center no-repeat;
+  background-size: cover;
+
+  .header {
+    flex-shrink: 0;
+    display: flex;
+    justify-content: space-between;
+    padding: 22px 40px;
+
+    .header-left {
+      width: 91px;
+      height: 36px;
+
+      .logo {
+        width: 100%;
+        height: 100%;
+      }
+    }
+
+    .header-right {
+      display: flex;
+      align-items: center;
+      .time {
+        display: flex;
+        font-size: 14px;
+        color: #1D2129;
+        span:nth-child(1) {
+          width: 80px;
+        }
+        span:nth-child(2) {
+          width: 60px;
+        }
+      }
+      .week {
+        width: 54px;
+        height: 22px;
+        padding: 1px 9px;
+        border-radius: 4px;
+        background: rgba(188, 204, 229, 0.80);
+        line-height: 22px;
+        font-size: 12px;
+        color: #2F4C6E;
+      }
+    }
+  }
+
+  .main {
+    flex:1;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-flow: column;
+    padding-top: 56px;
+    .title {
+      display: flex;
+      flex-flow: column;
+      align-items: center;
+      color: #637F9C;
+      text-align: center;
+      font-size: 24px;
+    }
+    .category-warp {
+      display: grid;
+      grid-template-columns: 230px 230px 110px 110px 110px 110px 110px 110px;
+      grid-template-rows: 200px 200px;
+      justify-content: center;
+      gap: 20px;
+      padding: 36px 120px 126px 120px;
+      background-clip:content-box;
+
+      .category-item {
+        display: flex;
+        flex-flow: column;
+        align-items: center;
+        justify-content: center;
+        border-radius: 8px;
+        border: 1px solid #FFF;
+        backdrop-filter: blur(2px);
+        box-shadow: 0px 4px 16px 0px rgba(43, 83, 121, 0.16);
+        color: #1D2129;
+        text-align: center;
+        font-size: 16px;
+        font-style: normal;
+        line-height: 24px;
+        cursor: pointer;
+        transition: all .2s ease-in-out;
+
+        &:hover {
+          color: #008afa;
+          transform: translateY(-10px);
+        }
+
+        &:nth-child(1), &:nth-child(2) {
+          grid-row-start: 1;
+          grid-row-end: 3;
+          background: linear-gradient(180deg, rgba(198, 240, 255, 0.40) 0%, rgba(230, 253, 255, 0.40) 9%, rgba(252, 253, 254, 0.80) 21%, rgba(255, 255, 255, 0.80) 100%);
+        }
+        &:nth-child(3) {
+          grid-column-start: 3;
+          grid-column-end: 6;
+          background: linear-gradient(180deg, rgba(233, 242, 251, 0.80) 0%, rgba(243, 248, 253, 0.80) 9%, rgba(252, 253, 254, 0.80) 21%, rgba(255, 255, 255, 0.80) 100%);
+          box-shadow: 0px 4px 8px 0px rgba(43, 83, 121, 0.18);
+        }
+        &:nth-child(4) {
+          grid-column-start: 6;
+          grid-column-end: 9;
+          background: linear-gradient(180deg, rgba(233, 242, 251, 0.80) 0%, rgba(243, 248, 253, 0.80) 9%, rgba(252, 253, 254, 0.80) 21%, rgba(255, 255, 255, 0.80) 100%);
+          box-shadow: 0px 4px 8px 0px rgba(43, 83, 121, 0.18);
+        }
+        &:nth-child(5) {
+          grid-column-start: 3;
+          grid-column-end: 5;
+          background: linear-gradient(180deg, rgba(233, 242, 251, 0.80) 0%, rgba(243, 248, 253, 0.80) 9%, rgba(252, 253, 254, 0.80) 21%, rgba(255, 255, 255, 0.80) 100%);
+          box-shadow: 0px 4px 8px 0px rgba(43, 83, 121, 0.18);
+        }
+        &:nth-child(6) {
+          grid-column-start: 5;
+          grid-column-end: 7;
+          background: linear-gradient(180deg, rgba(233, 242, 251, 0.80) 0%, rgba(243, 248, 253, 0.80) 9%, rgba(252, 253, 254, 0.80) 21%, rgba(255, 255, 255, 0.80) 100%);
+        }
+        &:nth-child(7) {
+          grid-column-start: 7;
+          grid-column-end: 9;
+          background: linear-gradient(180deg, rgba(233, 242, 251, 0.80) 0%, rgba(243, 248, 253, 0.80) 9%, rgba(252, 253, 254, 0.80) 21%, rgba(255, 255, 255, 0.80) 100%);
+        }
+      }
+    }
+  }
+}
+</style>

+ 11 - 0
tailwind.config.js

@@ -0,0 +1,11 @@
+/** @type {import('tailwindcss').Config} */
+export default {
+  // content: [],
+  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
+  // darkMode: false,
+  theme: {
+    extend: {},
+  },
+  plugins: [],
+}
+

+ 1 - 0
vite.config.js

@@ -6,6 +6,7 @@ import vueDevTools from 'vite-plugin-vue-devtools'
 
 // https://vite.dev/config/
 export default defineConfig({
+  base: '/index/',
   plugins: [
     vue(),
     vueDevTools(),

Some files were not shown because too many files changed in this diff