Browse Source

普通工位登录 适用鸿蒙。

jiaxiaoqiang 11 months ago
parent
commit
168debddba
6 changed files with 67 additions and 67 deletions
  1. 2 2
      .env.development
  2. 56 56
      index.html
  3. 1 1
      package.json
  4. 1 1
      src/api/auth/index.ts
  5. BIN
      src/assets/images/login-bg.png
  6. 7 7
      src/views/login/index.vue

+ 2 - 2
.env.development

@@ -11,9 +11,9 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 
 # 开发接口地址
-VITE_APP_API_URL = 'http://192.168.101.4:8079'
+VITE_APP_API_URL = 'http://10.88.19.222:8079'
 # Websocket地址
-VITE_WEBSOCKET_URL = 'ws://192.168.101.4:8079'
+VITE_WEBSOCKET_URL = 'ws://10.88.19.222:8079'
 ``
 # 是否启用 Mock 服务
 VITE_MOCK_DEV_SERVER = false

+ 56 - 56
index.html

@@ -1,65 +1,65 @@
 <!doctype html>
 <html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <link rel="icon" href="/logo.png" />
-    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
-    <meta
-      content="Vue3 + Vite5 + TypeScript5 + Element-Plus 的后台管理模板,配套接口文档和后端源码,vue-element-admin 的 Vue3 版本"
-      name="description"
-    />
-    <meta
-      content="vue,element-plus,typescript,vue-element-admin,vue3-element-admin"
-      name="keywords"
-    />
-    <title>生产线综合管控采集平台-一体机</title>
-  </head>
+<head>
+  <meta charset="UTF-8"/>
+  <link href="/logo.png" rel="icon"/>
+  <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
+  <meta
+    content="Vue3 + Vite5 + TypeScript5 + Element-Plus 的后台管理模板,配套接口文档和后端源码,vue-element-admin 的 Vue3 版本"
+    name="description"
+  />
+  <meta
+    content="vue,element-plus,typescript,vue-element-admin,vue3-element-admin"
+    name="keywords"
+  />
+  <title>金陵智造 | 鸿蒙工业系统</title>
+</head>
 
-  <body>
-    <div id="app">
-    </div>
-  </body>
-  <script src="/src/main.ts" type="module"></script>
+<body>
+<div id="app">
+</div>
+</body>
+<script src="/src/main.ts" type="module"></script>
 
-  <style>
-    html,
-    body,
-    #app {
-      position: relative;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      height: 100%;
-    }
+<style>
+  html,
+  body,
+  #app {
+    position: relative;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 100%;
+    height: 100%;
+  }
 
-    .loader {
-      position: relative;
-      width: 40px;
-      aspect-ratio: 0.577;
-      overflow: hidden;
-      clip-path: polygon(0 0, 100% 100%, 0 100%, 100% 0);
-      animation: l19 2s infinite linear;
-    }
+  .loader {
+    position: relative;
+    width: 40px;
+    aspect-ratio: 0.577;
+    overflow: hidden;
+    clip-path: polygon(0 0, 100% 100%, 0 100%, 100% 0);
+    animation: l19 2s infinite linear;
+  }
 
-    .loader::before {
-      position: absolute;
-      inset: -150%;
-      content: "";
-      background: repeating-conic-gradient(
-        from 30deg,
-        #ffabab 0 60deg,
-        #abe4ff 0 120deg,
-        #ff7373 0 180deg
-      );
-      animation: inherit;
-      animation-direction: reverse;
-    }
+  .loader::before {
+    position: absolute;
+    inset: -150%;
+    content: "";
+    background: repeating-conic-gradient(
+      from 30deg,
+      #ffabab 0 60deg,
+      #abe4ff 0 120deg,
+      #ff7373 0 180deg
+    );
+    animation: inherit;
+    animation-direction: reverse;
+  }
 
-    @keyframes l19 {
-      100% {
-        transform: rotate(360deg);
-      }
+  @keyframes l19 {
+    100% {
+      transform: rotate(360deg);
     }
-  </style>
+  }
+</style>
 </html>

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "生产线综合管控采集平台-一体机",
+  "name": "鸿蒙工业系统",
   "version": "1.0.0",
   "private": true,
   "type": "module",

+ 1 - 1
src/api/auth/index.ts

@@ -63,7 +63,7 @@ export function getProductionList(): AxiosPromise<any[]> {
 // 一体机登录通过产线code获取工位信息
 export function stationListByCode(code: string): AxiosPromise<any[]> {
   return request({
-    url: `/api/v1/base/station/getStationList/${code}`,
+    url: `/api/v1/base/station/getStationList/${code}/0`,
     method: "get",
   });
 }

BIN
src/assets/images/login-bg.png


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

@@ -181,8 +181,8 @@ const loginFormRef = ref(ElForm); // 登录表单ref
 const { height } = useWindowSize();
 
 const loginData = ref<LoginData>({
-  userName: "admin",
-  password: "admin@123",
+  userName: "",
+  password: "",
 });
 
 const loginRules = computed?.(() => {
@@ -301,11 +301,11 @@ function handleLogin() {
           userStore.user.proCode = loginData.value.proCode;
 
           // 捡选 装配 测试 维修站 预齐套
-          if (stationType == "5") {
-            router.replace({ name: "PrepareMain" });
-          } else {
-            router.replace({ name: "ProcessMain" });
-          }
+          // if (stationType == "5") {
+          //   router.replace({ name: "PrepareMain" });
+          // } else {
+          router.replace({ name: "ProcessMain" });
+          // }
         })
         .catch(() => {
           // getCaptcha();