Pārlūkot izejas kodu

zbytest003-2025-02-25 01:30:00

genlitex 2 mēneši atpakaļ
vecāks
revīzija
d988d16591

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/assets/index-BXei7OM-.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 4 - 0
dist/assets/index-DrfkfVdl.js


+ 14 - 0
dist/index.html

@@ -0,0 +1,14 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Vite + Vue</title>
+    <script type="module" crossorigin src="/ide/proxy/6003/assets/index-DrfkfVdl.js"></script>
+    <link rel="stylesheet" crossorigin href="/ide/proxy/6003/assets/index-BXei7OM-.css">
+  </head>
+  <body>
+    <div id="app"></div>
+  </body>
+</html>

+ 18 - 0
src/router/index.js

@@ -1,11 +1,29 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
 import HomeView from '../views/HomeView.vue'
+import LoginView from '../views/LoginView.vue'
+import PortalView from '../views/PortalView.vue'
+import UserStoryChatView from '../views/UserStoryChatView.vue'
 
 const routes = [
   {
     path: '/',
     name: 'home',
     component: HomeView
+  },
+  {
+    path: '/login',
+    name: 'login',
+    component: LoginView
+  },
+  {
+    path: '/portal',
+    name: 'portal',
+    component: PortalView
+  },
+  {
+    path: '/user-story-chat',
+    name: 'user-story-chat',
+    component: UserStoryChatView
   }
 ]
 

+ 87 - 0
src/views/LoginView.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="min-h-screen flex bg-gradient-to-br from-white to-purple-500">
+    <!-- Right side - Login Form -->
+    <div class="w-full flex flex-col justify-between p-8 lg:p-12">
+      <div class="max-w-md w-full mx-auto mt-8">
+        <div class="mb-8">
+          <h2 class="text-3xl font-semibold text-gray-900 mb-2">Login</h2>
+          <p class="text-gray-600">Welcome back!</p>
+        </div>
+
+        <form @submit.prevent="handleLogin" class="space-y-4">
+          <div>
+            <input
+                type="text"
+                v-model="username"
+                placeholder="Username"
+                class="w-full px-4 py-3 rounded-lg bg-gray-100 border border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-purple-500"
+            />
+          </div>
+
+          <div>
+            <input
+                type="password"
+                v-model="password"
+                placeholder="Password"
+                class="w-full px-4 py-3 rounded-lg bg-gray-100 border border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-purple-500"
+            />
+          </div>
+
+          <div class="flex items-center">
+            <input
+                type="checkbox"
+                id="remember"
+                v-model="rememberMe"
+                class="w-4 h-4 rounded border-gray-300 bg-gray-100 text-purple-500 focus:ring-purple-500"
+            />
+            <label for="remember" class="ml-2 text-gray-600">Remember me</label>
+          </div>
+
+          <button
+              type="submit"
+              class="w-full py-3 rounded-lg bg-purple-500 hover:bg-purple-600 text-white font-medium transition-colors"
+          >
+            Login
+          </button>
+
+          <div class="text-center">
+            <a href="#" class="text-purple-400 hover:text-purple-300">Forgot password?</a>
+          </div>
+
+          <!-- Language Selector -->
+          <div class="mt-4 flex items-center justify-center gap-2">
+            <span class="text-gray-600">Language:</span>
+            <select
+                v-model="language"
+                class="px-3 py-1.5 rounded bg-gray-100 border border-gray-300 text-gray-900 focus:outline-none focus:border-purple-500"
+            >
+              <option value="en">English</option>
+              <option value="es">Español</option>
+              <option value="fr">Français</option>
+            </select>
+          </div>
+        </form>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+import { useRouter } from 'vue-router'
+
+const router = useRouter()
+
+const username = ref('')
+const password = ref('')
+const rememberMe = ref(false)
+const language = ref('en')
+
+const handleLogin = () => {
+  if (username.value === 'admin' && password.value === 'admin') {
+    router.push('/portal')
+  } else {
+    alert('Invalid credentials')
+  }
+}
+</script>

+ 68 - 0
src/views/PortalView.vue

@@ -0,0 +1,68 @@
+<template>
+  <div class="min-h-screen flex bg-gradient-to-br from-white to-purple-500">
+    <!-- Sidebar -->
+    <nav class="w-64 bg-[#08002E] p-4 space-y-4">
+      <div class="flex items-center gap-2 mb-8">
+        <h1 class="text-xl font-semibold">门户</h1>
+      </div>
+
+      <!-- Navigation Items -->
+      <div class="space-y-2">
+        <a href="#/portal" class="flex items-center gap-3 p-3 rounded-lg bg-[#13063D] text-white hover:bg-[#13063D]/80">
+          <HomeIcon class="w-5 h-5" />
+          <span>首页</span>
+        </a>
+        <a href="#/project-management" class="flex items-center gap-3 p-3 rounded-lg text-white hover:bg-[#13063D]/80">
+          <BriefcaseIcon class="w-5 h-5" />
+          <span>项目管理</span>
+        </a>
+        <a href="#/data-analysis" class="flex items-center gap-3 p-3 rounded-lg text-white hover:bg-[#13063D]/80">
+          <BarChartIcon class="w-5 h-5" />
+          <span>数据分析</span>
+        </a>
+      </div>
+    </nav>
+
+    <!-- Main Content -->
+    <main class="flex-1 p-6 space-y-6">
+      <!-- Lightweight Easy-to-Use Module -->
+      <section class="p-8 rounded-2xl bg-white shadow-lg">
+        <h2 class="text-2xl font-semibold mb-4">轻量易用版模块</h2>
+        <div class="flex space-x-6">
+          <div class="w-1/2 p-4 rounded-lg bg-gray-100 shadow-md">
+            <h3 class="text-lg font-medium mb-2">生成用户故事模块</h3>
+            <p class="text-gray-600">生成详细的用户故事。</p>
+            <button @click="navigateToUserStories" class="mt-4 px-4 py-2 bg-purple-500 rounded-lg text-white hover:bg-purple-600 transition-colors">
+              生成用户故事
+            </button>
+          </div>
+          <div class="w-1/2 p-4 rounded-lg bg-gray-100 shadow-md">
+            <h3 class="text-lg font-medium mb-2">生成测试脚本模块</h3>
+            <p class="text-gray-600">生成测试脚本。</p>
+            <button class="mt-4 px-4 py-2 bg-purple-500 rounded-lg text-white hover:bg-purple-600 transition-colors">
+              生成测试脚本
+            </button>
+          </div>
+        </div>
+      </section>
+
+      <!-- Intelligent Project Analysis Module -->
+      <section class="p-8 rounded-2xl bg-white shadow-lg">
+        <h2 class="text-2xl font-semibold mb-4">智能项目分析模块</h2>
+        <p class="text-gray-600">智能分析项目数据。</p>
+        <!-- Additional content for intelligent project analysis can be added here -->
+      </section>
+    </main>
+  </div>
+</template>
+
+<script setup>
+import { useRouter } from 'vue-router'
+import { Home as HomeIcon, Briefcase as BriefcaseIcon, BarChart as BarChartIcon } from 'lucide-vue-next'
+
+const router = useRouter()
+
+const navigateToUserStories = () => {
+  router.push('/user-story-chat')
+}
+</script>

+ 107 - 0
src/views/UserStoryChatView.vue

@@ -0,0 +1,107 @@
+<template>
+  <div class="flex h-screen bg-gradient-to-br from-white to-purple-500">
+    <!-- Sidebar -->
+    <aside class="w-64 bg-[#08002E] text-white flex flex-col">
+      <!-- Chat History -->
+      <div class="p-6">
+        <h2 class="text-xl font-semibold mb-4">聊天历史记录</h2>
+        <div class="space-y-2">
+          <div v-for="(message, index) in chatHistory" :key="index" class="p-3 rounded-lg bg-gray-700 text-white">
+            {{ message }}
+          </div>
+        </div>
+      </div>
+    </aside>
+
+    <!-- Main Content -->
+    <main class="flex-1 overflow-auto p-6">
+      <div class="max-w-4xl mx-auto">
+        <!-- Header -->
+        <div class="flex justify-between items-center mb-8">
+          <h1 class="text-2xl font-semibold mb-2">用户故事生成</h1>
+        </div>
+
+        <!-- Chat Content -->
+        <div class="bg-white p-6 rounded-lg shadow-sm mb-6">
+          <div class="chat-container">
+            <div v-for="(message, index) in chatMessages" :key="index" class="message">
+              <div :class="{'user-message': message.sender === 'user', 'bot-message': message.sender === 'bot'}">
+                <p>{{ message.text }}</p>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <!-- Chat Input -->
+        <div class="flex gap-2">
+          <div class="flex-1 relative">
+            <input
+                type="text"
+                v-model="userInput"
+                placeholder="与聊天机器人对话..."
+                class="w-full p-3 pr-12 border rounded-lg"
+                @keyup.enter="sendMessage"
+            />
+            <Upload class="absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 cursor-pointer" @click="uploadFile" />
+          </div>
+          <button class="p-3 bg-purple-500 text-white rounded-lg hover:bg-purple-600" @click="sendMessage">
+            <Send class="w-5 h-5" />
+          </button>
+        </div>
+      </div>
+    </main>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+import { Upload, Send } from 'lucide-vue-next'
+
+const chatHistory = ref(['之前的对话记录'])
+const chatMessages = ref([
+  { sender: 'bot', text: '你好!我是GenLiteX聊天机器人,很高兴帮助你生成用户故事。' }
+])
+const userInput = ref('')
+
+const sendMessage = () => {
+  if (userInput.value.trim()) {
+    chatMessages.value.push({ sender: 'user', text: userInput.value })
+    // Simulate bot response
+    setTimeout(() => {
+      chatMessages.value.push({ sender: 'bot', text: '这是你的用户故事:...' })
+    }, 1000)
+    userInput.value = ''
+  }
+}
+
+const uploadFile = () => {
+  // Handle file upload logic here
+  alert('文件上传功能暂未实现')
+}
+</script>
+
+<style scoped>
+.chat-container {
+  max-height: 400px;
+  overflow-y: auto;
+  padding-bottom: 10px;
+}
+
+.message {
+  margin-bottom: 10px;
+}
+
+.user-message {
+  background-color: #f1f1f1;
+  padding: 10px;
+  border-radius: 10px;
+  text-align: right;
+}
+
+.bot-message {
+  background-color: #e0e0ff;
+  padding: 10px;
+  border-radius: 10px;
+  text-align: left;
+}
+</style>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels