tangjunhao hace 3 meses
padre
commit
bf0bdbbaa2

+ 2 - 2
.env.production

@@ -1,5 +1,5 @@
 # 正式环境
 NODE_ENV=production
 VITE_NAME = '生产环境'
-VITE_BASE_URL = '/airopt'
-VITE_WEBSOCKET_URL='wss://www.adicn.com/airoptwebsocket?projectId='
+VITE_BASE_URL = '/eps'
+VITE_WEBSOCKET_URL='wss://www.adicn.com/epswebsocket?projectId='

BIN
src/assets/img/blueplus.png


BIN
src/assets/img/ceng.png


BIN
src/assets/img/eslogo.png


BIN
src/assets/img/help.png


BIN
src/assets/img/open.png


BIN
src/assets/img/set.png


BIN
src/assets/img/user.png


BIN
src/assets/img/zk.png


+ 6 - 6
src/components/header.vue → src/components/layout/header.vue

@@ -12,18 +12,18 @@
             </h3>
         </div>
 
-  </template>
-   <script setup>
+</template>
+<script setup>
 import { ref, onMounted, reactive, } from "vue";
-import logo from "@/assets/logo.png";
+import logo from "@/assets/img/eslogo.png";
 import { ElMessage, ElButton, ElDialog, ElSelect } from 'element-plus'
-let title=ref("民用飞机多学科联合设计优化软件");
-   </script>
+let title=ref("Web-Based Engine System-Level Simulation Software");
+</script>
 <style lang="scss" scoped>
 .ve_menu_logo {
     width: 100%;
     height: 32px;
-    background-color:#2267B1 ;
+    background-color:#075679 ;
       overflow: hidden;
     padding: 0 10px;
  

+ 135 - 0
src/components/layout/openpage.vue

@@ -0,0 +1,135 @@
+<template>
+  <div class="open-page">
+    <el-header>
+        <myheader />
+    </el-header>
+    <el-main>
+      <div>
+        <div class="open-page-header">
+          <div class="open-page-header-title">
+            PLATFORM
+          </div>
+          <div>
+            <el-button class="custom-icon-button">
+              <img :src="zk" style="width: 22px;"/>
+            </el-button>
+            <el-button class="custom-icon-button">
+              <img :src="help" style="width: 22px;"/>
+            </el-button>
+            <el-button class="custom-icon-button">
+              <img :src="user" style="width: 22px;"/>
+              <span>user</span>
+            </el-button>
+          </div>
+        </div>
+        <div class="open-page-content">
+          <div class="open-page-leftside">
+            <el-menu
+              class="open-page-menu"
+              default-active="activeIndex"
+              :router='true'
+            >
+              <el-menu-item index="/project">
+                <img :src="ceng" style="width: 18px; margin-right: 5px;" />
+                <span>Project</span>
+              </el-menu-item>
+              <el-menu-item index="/preference">
+                <img :src="set" style="width: 18px; margin-right: 5px;" />
+                <span>Preference</span>
+              </el-menu-item>
+            </el-menu>
+          </div>
+          <div class="open-page-rightside">
+            <router-view />
+          </div>
+        </div>
+      </div>
+    </el-main>
+  </div>
+</template>
+
+<script setup>
+import myheader from '@/components/layout/header.vue'
+import { RouterView, RouterLink,useRouter } from "vue-router"
+import { request, uploadFile } from "@/utils/request";
+
+import set from '@/assets/img/set.png'
+import ceng from '@/assets/img/ceng.png'
+import zk from '@/assets/img/zk.png'
+import help from '@/assets/img/help.png'
+import user from '@/assets/img/user.png'
+
+const router = useRouter();
+
+const activeIndex = computed(() => {
+  // 获取当前路由的所有匹配路径
+  const matched = router.currentRoute.value.matched
+  // 返回最后一个匹配的路径(最深层级)
+  return matched[matched.length - 1]?.path || '/project'
+})
+
+</script>
+
+<style scoped>
+.open-page-header{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: 42px;
+  padding: 0 30px 0 30px;
+
+  background: #FFFFFF;
+  border-radius: 0px 0px 0px 0px;
+  border: 1px solid #B3B3B3;
+}
+
+.open-page-header-title{
+  font-size: 15px;
+  color: #333333;
+}
+
+.custom-icon-button {
+  padding: 0;
+  border: none;
+}
+
+.open-page-content{
+  display: flex;
+  width: 100%;
+  height: calc(100vh - 32px - 42px);
+
+}
+
+.open-page-leftside{
+  width: 200px;
+  height: 100%;
+  background: #FFFFFF;
+  border-radius: 0px 0px 0px 0px;
+  border: 1px solid #EEEEEE;
+}
+
+.open-page-rightside{
+  flex: 1;
+  height: 100%;
+}
+
+.open-page-menu{
+  margin: 8px 16px;
+}
+
+.open-page-menu .el-menu-item {
+  height: 36px;
+  border-radius: 0px 0px 0px 0px;
+  border: none;
+  margin-bottom: 4px;
+
+  font-weight: 400;
+  font-size: 14px;
+  color: #1A1A1A;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+}
+
+</style>

+ 30 - 9
src/router/index.js

@@ -4,15 +4,36 @@ import { getToken2} from "../utils/token";
 const router = createRouter({
     history: createWebHashHistory(),
     routes: [
-    {
-      path: '/login',
-      name: 'login',
-      component: () => import('@/views/login/index.vue'),
-      meta: {
-        keepAlive: false,
-        title: '登录'
-      }
-    },
+      {
+        path: '/',
+          name:'首页',
+          redirect: '/project',
+          component: () => import('@/components/layout/openpage.vue'),
+          meta:{
+              keepAlive:false,
+              title: '首页'
+          },
+          children: [
+            {
+              path: '/project',
+              name: 'project',
+              component: () => import('@/views/project/index.vue'),
+              meta: {
+                keepAlive: false,
+                title: '项目'
+              }
+            },
+          ]
+      },
+      {
+        path: '/login',
+        name: 'login',
+        component: () => import('@/views/login/index.vue'),
+        meta: {
+          keepAlive: false,
+          title: '登录'
+        }
+      },
     ]
 })
 //修改动态网页标题 beforeEach 导航钩子,路由改变前触发

+ 46 - 0
src/style/index.css

@@ -59,3 +59,49 @@ img{
 .el-dialog__footer{
   padding: 10px 20px 20px 20px;
 }
+
+.lastbtn .el-button:last-of-type {
+  background-color: #12739E !important;
+  color: white !important;
+}
+
+.custom-pagination .el-pagination .el-pager li {
+  font-size: 12px;
+  color: #1A1A1A;
+  font-weight: 400;
+}
+
+.custom-pagination .el-pagination .el-pager li.is-active {
+  background: #12739E;
+  color: white;
+}
+
+.open-page-menu .el-menu-item.is-active {
+  background: #E4F1F7;
+  border-radius: 0px 0px 0px 0px;
+  border: 1px solid rgba(18,115,158,0.4);
+
+}
+
+.custom-table .el-table .cell {
+  font-weight: 400;
+  font-size: 12px;
+  color: #333333;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+  /* line-height: 55px;
+  height: 55px; */
+}
+
+/* 设置表格主体单元格行高为 55px */
+.custom-table .el-table .el-table__body .cell {
+  height: 55px;
+  line-height: 55px;
+}
+
+/* 设置表头单元格行高为 47px */
+.custom-table .el-table .el-table__header .cell {
+  height: 47px;
+  line-height: 47px;
+}

+ 0 - 0
src/views/home.vue


+ 0 - 0
src/views/index.vue


+ 7 - 9
src/views/login/index.vue

@@ -27,7 +27,7 @@
             <el-form-item prop="username" label="Username:" style="margin-bottom: 20px;" label-width="100px">
               <el-input
                 v-model="loginForm.username"
-                placeholder="请输入用户名"
+                placeholder=""
                 prefix-icon="User"
                 clearable
               />
@@ -36,7 +36,7 @@
             <el-form-item prop="password" label="Password:" style="margin-bottom: 20px;" label-width="100px">
               <el-input
                 v-model="loginForm.password"
-                placeholder="请输入密码"
+                placeholder=""
                 prefix-icon="Lock"
                 show-password
                 clearable
@@ -56,17 +56,17 @@
                 class="login-btn"
                 :loading="loading"
                 @click="handleLogin"
-                :disabled="!isverify"
+                
               >
-                登 录
+                Login
               </el-button>
             </el-form-item>
           </el-form>
         
-          <div class="login-footer">
+          <!-- <div class="login-footer">
             <div class="register-prompt">没有账号?点击</div>
             <el-link type="primary" @click="goToRegister">注册</el-link>
-          </div>
+          </div> -->
         </el-card>
       </div>
       
@@ -97,8 +97,6 @@ const loginForm = reactive({
 // 加载状态
 const loading = ref(false)
 
-const isverify = ref(false)
-
 // 表单验证规则
 const loginRules = reactive({
   username: [
@@ -273,7 +271,7 @@ const goToRegister = () => {
   height: 42px;
   margin-top: 10px;
   font-size: 16px;
-  background-color: #2267B1;
+  background-color: #12739E;
 }
 
 .login-footer {

+ 210 - 0
src/views/project/index.vue

@@ -0,0 +1,210 @@
+<template>
+  <div class="project-page">
+    <el-header class="project-header">
+      <div class="boxcontainer">
+        <el-button class="box">
+          <img :src="getImgPath('open.png')" style="width: 20px; margin-right: 5px;" />
+          OPEN
+        </el-button>
+        <el-button class="box">
+          <img :src="getImgPath('blueplus.png')" style="width: 20px; margin-right: 5px;" />
+          New Project
+        </el-button>
+        <el-button class="box">
+          <img :src="getImgPath('blueplus.png')" style="width: 20px; margin-right: 5px;" />
+          New Compound
+        </el-button>
+        <el-button class="box">
+          <img :src="getImgPath('blueplus.png')" style="width: 20px; margin-right: 5px;" />
+          New Library
+        </el-button>
+      </div>
+      
+
+    </el-header>
+    <el-main class="project-main">
+      <div class="project-main-header">
+        <div class="project-main-header-title">
+            Project List
+        </div>
+        <div class="project-main-header-actions">
+          <el-button >New Project</el-button>
+        </div>
+      </div>  
+      <div class="project-main-content custom-table">
+        <el-table
+          :data="projectlists"
+          style="width: 100%;height: 540px;"
+        >
+          <el-table-column type="index" label="Number" width="100"></el-table-column>
+          <el-table-column prop="name" label="File name" ></el-table-column>
+          <el-table-column prop="dirsize" label="Size" ></el-table-column>
+          <el-table-column prop="updateTime" label="Last modified" ></el-table-column>
+          <el-table-column prop="uname" label="Author" ></el-table-column>
+          <el-table-column prop="keywords" label="Keywords" ></el-table-column>
+          <el-table-column prop="description" label="Description" ></el-table-column>
+        </el-table>
+        <div class="custom-pagination" style="margin-top: 14px;">
+            <el-pagination
+                v-model:current-page="gd.currentPage4"
+                v-model:page-size="gd.pageSize4"
+                background
+                size="small"
+                layout="prev, slot, pager, next"
+                :total="parseInt(gd.total)"
+                class="mt-4"
+                @current-change="handleCurrentChange2"
+            >
+              <template #default>
+                <span>总计 {{ gd.total }}</span>
+              </template>
+            </el-pagination>
+        </div>
+      </div>
+      <div class="project-main-footer lastbtn">
+        <el-button >All Select</el-button>
+        <el-button >Delete</el-button>
+        <el-button >OK</el-button>
+      </div>
+    </el-main>
+
+  </div>
+  
+</template>
+
+<script setup>
+import { request } from "@/utils/request";
+import { ElMessage, ElButton, ElDialog, ElSelect, ElMessageBox } from 'element-plus'
+
+let projectlists = ref([]);
+
+let gd = ref({
+    total: 1,
+    currentPage4: 1,
+    pageSize4:5,
+    searchtag: ''
+})
+
+const getImgPath = (url) => {
+  return new URL(`../../assets/img/${url}`, import.meta.url).href
+}
+
+const getprojectlist = () => {
+    const params = {
+        transCode: 'ES0001',
+        count: gd.value.pageSize4,
+        page: gd.value.currentPage4,
+        searchtag: gd.value.searchtag,
+    }
+    request(params)
+        .then((res) => {
+            console.log(res);
+            gd.value.total = res.total;
+            projectlists.value=res.rows;
+        })
+        .catch((err) => {
+            ElMessage.error(err.returnMsg)
+        })
+};
+
+onMounted(() => {
+    getprojectlist();
+});
+</script>
+
+<style scoped>
+.project-page {
+  width: 100%;
+  height: 100%;
+  background: #EEEEEE;
+  padding: 8px 8px 0 8px;
+  overflow: auto;
+}
+
+.project-header{
+  width: 100%;
+  height: 104px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: #FFFFFF;
+}
+
+.project-main{
+  width: 100%;
+  margin-top: 8px;
+  height: calc(100% - 8px - 104px);
+  background: #FFFFFF;
+  padding: 8px;
+}
+
+.boxcontainer {
+  width: 80%;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+}
+
+.box{
+  width: 192px;
+  height: 56px;
+  border-radius: 6px 6px 6px 6px;
+  border: 1px solid #12739E;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  
+  font-weight: 400;
+  font-size: 14px;
+  color: #12739E;
+  font-style: normal;
+}
+
+.boxcontainer .el-button>span {
+  line-height: 18px;
+}
+
+.project-main-header {
+  width: 100%;
+  height: 10%;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.project-main-header-title {
+  margin-left: 32px;
+  font-weight: 400;
+  font-size: 16px;
+  color: #7F7F7F;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+}
+
+.project-main-content{
+  width: 100%;
+  height: 80%;
+  
+}
+.project-main-footer {
+  width: 100%;
+  height: 10%;
+  padding: 0 30px;
+  display: flex;
+  justify-content: end;
+  align-items: center;
+}
+
+.project-main-footer .el-button {
+  width: 100px;
+  height: 32px;
+  background: #FFFFFF;
+  border-radius: 6px 6px 6px 6px;
+  border: 1px solid #12739E;
+
+  font-weight: 400;
+  font-size: 14px;
+  color: #12739E;
+}
+</style>

+ 4 - 4
vite.config.ts

@@ -54,19 +54,19 @@ export default defineConfig(({ mode }) => {
             proxy: {
                 '/api': {
                     // target: 'http://192.168.0.131:8188/TransServlet',//配置文件获取地址
-                   target: 'https://www.adicn.com/airopt',
+                   target: 'https://www.adicn.com/eps',
                     secure: false, //接受使用https
                     changeOrigin: true, //允许跨域
                     ws: false, //使用websocket
                     rewrite: (path) => path.replace(/^\/api/, '')
                 },
-                '/airopt': {
+                '/eps': {
                     // target: 'http://192.168.0.131:8188/TransServlet',//配置文件获取地址
-                   target: 'https://www.adicn.com/airopt',
+                   target: 'https://www.adicn.com/eps',
                     secure: false, //接受使用https
                     changeOrigin: true, //允许跨域
                     ws: false, //使用websocket
-                    rewrite: (path) => path.replace(/^\/airopt/, '')
+                    rewrite: (path) => path.replace(/^\/eps/, '')
                 },
 
                 '/file': {