Browse Source

zbytest003-2025-02-28 08:33:06

genlitex 1 month ago
parent
commit
e21b980185

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-BwHjgORa.css


File diff suppressed because it is too large
+ 4 - 0
dist/assets/index-CN-D_q3C.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-CkL0SeDC.css


File diff suppressed because it is too large
+ 0 - 4
dist/assets/index-bv0h5aUD.js


+ 2 - 2
dist/index.html

@@ -5,8 +5,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/6008/assets/index-bv0h5aUD.js"></script>
-    <link rel="stylesheet" crossorigin href="/ide/proxy/6008/assets/index-BwHjgORa.css">
+    <script type="module" crossorigin src="/ide/proxy/6001/assets/index-CN-D_q3C.js"></script>
+    <link rel="stylesheet" crossorigin href="/ide/proxy/6001/assets/index-CkL0SeDC.css">
   </head>
   <body>
     <div id="app"></div>

+ 1 - 121
src/assets/templates/FSG/login.vue

@@ -1,121 +1 @@
-<template>
-  <div class="min-h-screen bg-gradient-to-br from-blue-50 to-blue-100/50">
-    <div class="container mx-auto px-4">
-      <!-- Header -->
-      <header class="flex justify-between items-center py-6">
-        <div class="text-2xl font-bold text-white">
-          <h1>FSG</h1>
-          <div class="text-sm">上海外服</div>
-        </div>
-        <button class="flex items-center text-blue-600 hover:text-blue-700">
-          <Globe class="w-4 h-4 mr-1" />
-          中文
-        </button>
-      </header>
-
-      <!-- Login Form -->
-      <div class="max-w-md mx-auto mt-12 bg-white rounded-lg shadow-lg p-8">
-        <h2 class="text-3xl font-bold text-center mb-2 text-blue-600">
-          "Hello,欢迎回来"
-        </h2>
-        <p class="text-center text-gray-600 mb-8">请登录外包管理系统</p>
-
-        <form @submit.prevent="handleSubmit">
-          <div class="space-y-6">
-            <div>
-              <label class="block text-sm font-medium text-gray-700 mb-1">租户名称</label>
-              <input
-                  v-model="form.tenant"
-                  type="text"
-                  placeholder="请输入"
-                  class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
-              />
-            </div>
-
-            <div>
-              <label class="block text-sm font-medium text-gray-700 mb-1">用户名</label>
-              <input
-                  v-model="form.username"
-                  type="text"
-                  placeholder="输入文字中"
-                  class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
-              />
-            </div>
-
-            <div>
-              <label class="block text-sm font-medium text-gray-700 mb-1">密码</label>
-              <input
-                  v-model="form.password"
-                  type="password"
-                  placeholder="请输入"
-                  class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
-              />
-            </div>
-
-            <div class="flex items-center justify-between">
-              <label class="flex items-center">
-                <input
-                    v-model="form.remember"
-                    type="checkbox"
-                    class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"
-                />
-                <span class="ml-2 text-sm text-gray-600">记住我</span>
-              </label>
-              <a href="#" class="text-sm text-blue-600 hover:text-blue-700">忘记密码?</a>
-            </div>
-
-            <button
-                type="submit"
-                class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
-            >
-              登录
-            </button>
-          </div>
-        </form>
-
-        <div class="mt-6">
-          <div class="relative">
-            <div class="absolute inset-0 flex items-center">
-              <div class="w-full border-t border-gray-300"></div>
-            </div>
-            <div class="relative flex justify-center text-sm">
-              <span class="px-2 bg-white text-gray-500">其他登录方式</span>
-            </div>
-          </div>
-
-          <button
-              class="mt-4 w-full border border-blue-600 text-blue-600 py-2 px-4 rounded-md hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
-          >
-            使用AD域免密自动登录
-          </button>
-        </div>
-      </div>
-
-      <!-- Footer -->
-      <footer class="text-center mt-8 pb-6 text-gray-600 text-sm">
-        © 2023 上海外服. All Rights Reserved.
-      </footer>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { ref } from 'vue'
-import { Globe } from 'lucide-vue-next'
-
-const form = ref({
-  tenant: '',
-  username: '',
-  password: '',
-  remember: false
-})
-
-const handleSubmit = () => {
-  // Handle login logic here
-  console.log('Form submitted:', form.value)
-}
-</script>
-
-<style>
-/* Add any additional custom styles here if needed */
-</style>
+>

+ 12 - 0
src/router/index.js

@@ -1,6 +1,8 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
 import HomeView from '../views/HomeView.vue'
 import PortalView from '../views/PortalView.vue'
+import UserStoryChatView from '../views/UserStoryChatView.vue'
+import LoginView from '../views/LoginView.vue'
 
 const routes = [
   {
@@ -12,6 +14,16 @@ const routes = [
     path: '/portal',
     name: 'Portal',
     component: PortalView
+  },
+  {
+    path: '/login',
+    name: 'Login',
+    component: LoginView
+  },
+  {
+    path: '/user-story-chat',
+    name: 'UserStoryChat',
+    component: UserStoryChatView
   }
 ]
 

+ 122 - 0
src/views/LoginView.vue

@@ -0,0 +1,122 @@
+<template>
+  <div class="login-container">
+    <div class="login-box">
+      <h2>登录</h2>
+      <form @submit.prevent="handleLogin">
+        <div class="input-group">
+          <label for="username">用户名</label>
+          <input type="text" id="username" v-model="username" placeholder="请输入用户名" />
+        </div>
+        <div class="input-group">
+          <label for="password">密码</label>
+          <input type="password" id="password" v-model="password" placeholder="请输入密码" />
+        </div>
+        <div class="remember-forgot">
+          <label>
+            <input type="checkbox" v-model="rememberMe" />
+            记住我
+          </label>
+          <a href="#" @click.prevent="forgotPassword">忘记密码?</a>
+        </div>
+        <div class="language-select">
+          <select v-model="language">
+            <option value="zh-CN">中文</option>
+            <option value="en-US">English</option>
+          </select>
+        </div>
+        <button type="submit" class="login-button">登录</button>
+      </form>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      username: 'admin',
+      password: 'admin',
+      rememberMe: false,
+      language: 'zh-CN'
+    };
+  },
+  methods: {
+    handleLogin() {
+      if (this.username === 'admin' && this.password === 'admin') {
+        this.$router.push('/portal');
+      } else {
+        alert('用户名或密码错误');
+      }
+    },
+    forgotPassword() {
+      alert('忘记密码功能暂未实现');
+    }
+  }
+};
+</script>
+
+<style scoped>
+.login-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100vh;
+  background: linear-gradient(to bottom, white, purple);
+}
+
+.login-box {
+  background-color: white;
+  padding: 20px;
+  border-radius: 8px;
+  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+.input-group {
+  margin-bottom: 15px;
+}
+
+.input-group label {
+  display: block;
+  margin-bottom: 5px;
+}
+
+.input-group input {
+  width: 100%;
+  padding: 8px;
+  box-sizing: border-box;
+}
+
+.language-select select {
+  width: 100%;
+  padding: 8px;
+  box-sizing: border-box;
+  margin-top: 10px;
+}
+
+.login-button {
+  width: 100%;
+  padding: 10px;
+  background-color: #6A5ACD;
+  color: white;
+  border: none;
+  border-radius: 5px;
+  cursor: pointer;
+  margin-top: 10px;
+}
+
+.remember-forgot {
+  display: flex;
+  justify-content: space-between;
+  margin-top: 10px;
+}
+
+.remember-forgot label {
+  display: flex;
+  align-items: center;
+}
+
+.remember-forgot a {
+  color: #6A5ACD;
+  text-decoration: none;
+}
+</style>

+ 81 - 86
src/views/PortalView.vue

@@ -1,95 +1,90 @@
 <template>
-  <div class="min-h-screen bg-gradient-to-r from-white to-purple-100">
-    <!-- Top Navigation -->
-    <header class="bg-white border-b">
-      <div class="flex items-center justify-between px-4 py-2">
-        <div class="flex items-center space-x-2">
-          <div class="text-blue-600">
-            <div class="w-8 h-8">
-              <div class="w-full h-full" />
-            </div>
-          </div>
-          <span class="text-xl font-medium">ProductName</span>
+  <div class="portal-container">
+    <div class="sidebar">
+      <ul>
+        <li><a href="#/portal">首页</a></li>
+        <li><a href="#/project-management">项目管理</a></li>
+        <li><a href="#/data-analysis">数据分析</a></li>
+      </ul>
+    </div>
+    <div class="content">
+      <div class="lightweight-module">
+        <div class="module-item">
+          <h3>生成用户故事</h3>
+          <a href="#/user-story-chat">点击这里</a>
         </div>
-
-        <div class="flex-1 max-w-xl mx-4">
-          <div class="relative">
-            <Search class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400" size={20} />
-            <input
-                type="text"
-                placeholder="输入内容查询"
-                class="w-full pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
-            />
-          </div>
-        </div>
-
-        <div class="flex items-center space-x-4">
-          <MessageCircle class="w-6 h-6 text-blue-500" />
-          <Bell class="w-6 h-6 text-blue-500" />
-          <Settings class="w-6 h-6 text-gray-400" />
-          <div class="w-8 h-8 rounded-full bg-gray-200"></div>
+        <div class="module-item">
+          <h3>生成测试脚本</h3>
+          <a href="#">点击这里</a>
         </div>
       </div>
-    </header>
-
-    <div class="flex">
-      <!-- Sidebar -->
-      <aside class="w-64 min-h-screen bg-[#08002E] text-white border-r">
-        <nav class="p-4">
-          <ul class="space-y-2">
-            <li>
-              <a href="#/" class="flex items-center px-4 py-2 text-white hover:bg-[#11113D] rounded-lg">
-                <Home class="w-5 h-5 mr-3" />
-                首页
-              </a>
-            </li>
-            <li>
-              <a href="#/project-management" class="flex items-center px-4 py-2 text-white hover:bg-[#11113D] rounded-lg">
-                <Box class="w-5 h-5 mr-3" />
-                项目管理
-              </a>
-            </li>
-            <li>
-              <a href="#/data-analysis" class="flex items-center px-4 py-2 text-white hover:bg-[#11113D] rounded-lg">
-                <LayoutGrid class="w-5 h-5 mr-3" />
-                数据分析
-              </a>
-            </li>
-          </ul>
-        </nav>
-      </aside>
-
-      <!-- Main Content -->
-      <main class="flex-1 p-6">
-        <!-- Lightweight and Easy-to-Use Module -->
-        <div class="grid grid-cols-2 gap-6 mb-6">
-          <div class="bg-white rounded-lg p-6 shadow-sm">
-            <h2 class="text-lg font-medium mb-4">生成用户故事模块</h2>
-            <a href="#/user-story" class="text-blue-600 hover:underline">
-              跳转到生成用户故事界面
-            </a>
-          </div>
-          <div class="bg-white rounded-lg p-6 shadow-sm">
-            <h2 class="text-lg font-medium mb-4">生成测试脚本模块</h2>
-            <a href="#/test-script" class="text-blue-600 hover:underline">
-              跳转到生成测试脚本界面
-            </a>
-          </div>
-        </div>
-
-        <!-- Intelligent Project Analysis Module -->
-        <div class="bg-white rounded-lg p-6 shadow-sm">
-          <h2 class="text-lg font-medium mb-4">智能项目分析模块</h2>
-          <!-- Content for intelligent project analysis goes here -->
-        </div>
-      </main>
+      <div class="smart-analysis-module">
+        <h3>智能项目分析</h3>
+        <!-- Placeholder for smart project analysis content -->
+      </div>
     </div>
   </div>
 </template>
 
-<script setup>
-import {
-  Search, MessageCircle, Bell, Settings,
-  Home, Box, LayoutGrid
-} from 'lucide-vue-next'
+<script>
+export default {
+  name: 'PortalView'
+};
 </script>
+
+<style scoped>
+.portal-container {
+  display: flex;
+  height: 100vh;
+}
+
+.sidebar {
+  background-color: #08002E;
+  color: white;
+  width: 200px;
+  padding: 20px;
+}
+
+.sidebar ul {
+  list-style-type: none;
+  padding: 0;
+}
+
+.sidebar li {
+  margin-bottom: 10px;
+}
+
+.sidebar a {
+  color: white;
+  text-decoration: none;
+}
+
+.content {
+  flex-grow: 1;
+  background: linear-gradient(to bottom, white, purple);
+  padding: 20px;
+}
+
+.lightweight-module, .smart-analysis-module {
+  margin-bottom: 20px;
+}
+
+.module-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10px;
+  background-color: #f0f0f0;
+  border-radius: 8px;
+  margin-bottom: 10px;
+}
+
+.module-item h3 {
+  margin: 0;
+}
+
+.module-item a {
+  color: #6A5ACD;
+  text-decoration: none;
+}
+</style>

+ 124 - 0
src/views/UserStoryChatView.vue

@@ -0,0 +1,124 @@
+<template>
+  <div class="user-story-chat-container">
+    <div class="sidebar">
+      <h3>聊天历史记录</h3>
+      <ul>
+        <li v-for="(message, index) in chatHistory" :key="index">{{ message }}</li>
+      </ul>
+    </div>
+    <div class="chat-content">
+      <div class="chat-messages">
+        <div v-for="(message, index) in chatMessages" :key="index" class="message">
+          {{ message }}
+        </div>
+      </div>
+      <div class="chat-input">
+        <input type="text" v-model="newMessage" @keyup.enter="sendMessage" placeholder="输入消息..." />
+        <button @click="sendMessage">发送</button>
+        <input type="file" @change="uploadFile" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      chatHistory: [],
+      chatMessages: [],
+      newMessage: ''
+    };
+  },
+  methods: {
+    sendMessage() {
+      if (this.newMessage.trim()) {
+        this.chatMessages.push(this.newMessage);
+        this.newMessage = '';
+        // Simulate automatic reply
+        setTimeout(() => {
+          this.chatMessages.push('自动回复: 已收到您的消息');
+        }, 1000);
+      }
+    },
+    uploadFile(event) {
+      const file = event.target.files[0];
+      if (file) {
+        this.chatMessages.push(`文件上传: ${file.name}`);
+      }
+    }
+  }
+};
+</script>
+
+<style scoped>
+.user-story-chat-container {
+  display: flex;
+  height: 100vh;
+}
+
+.sidebar {
+  background-color: #08002E;
+  color: white;
+  width: 200px;
+  padding: 20px;
+}
+
+.sidebar h3 {
+  margin-top: 0;
+}
+
+.sidebar ul {
+  list-style-type: none;
+  padding: 0;
+}
+
+.sidebar li {
+  margin-bottom: 10px;
+}
+
+.chat-content {
+  flex-grow: 1;
+  background: linear-gradient(to bottom, white, purple);
+  padding: 20px;
+  display: flex;
+  flex-direction: column;
+}
+
+.chat-messages {
+  flex-grow: 1;
+  overflow-y: auto;
+  margin-bottom: 10px;
+}
+
+.message {
+  margin-bottom: 10px;
+}
+
+.chat-input {
+  display: flex;
+  justify-content: space-between;
+}
+
+.chat-input input[type="text"] {
+  width: 70%;
+  padding: 8px;
+  box-sizing: border-box;
+}
+
+.chat-input button {
+  width: 20%;
+  padding: 8px;
+  background-color: #6A5ACD;
+  color: white;
+  border: none;
+  border-radius: 5px;
+  cursor: pointer;
+}
+
+.chat-input input[type="file"] {
+  width: 10%;
+  padding: 8px;
+  box-sizing: border-box;
+}
+</style>

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