feat: 五项目业务实现并对接完成

- MES(B): 工单/BOM/备料/工序字典/PLC下发/拧紧/扫码报工/半成品/AGV/追溯逻辑,WMS与海康RCS客户端,看板Redis缓存API(概览/设备/进度/报警/趋势)+SSE
- WMS(C): JWT滑动续签、Excel导入、盘点、内部API、种子数据、独立Postgres配置
- WMS客户端(E): Go网关8891反向代理+内嵌Vue3十页
- 工位终端(D): SQLite本地缓存+模拟拧紧源+内嵌Vue3页面
- Dashboard(A): 看板数据改接MES内部缓存API,SSE实时刷新+vite代理
- 清理各项目球形磨遗留代码,新增部署手册.md
This commit is contained in:
SunYF
2026-08-27 19:50:57 +08:00
parent c85c3bd6f1
commit a2afd2f6dc
335 changed files with 87495 additions and 7357 deletions
@@ -0,0 +1,134 @@
<template>
<div class="login-page">
<div class="login-card">
<h1 class="title">北京动力 · 工位终端</h1>
<p class="subtitle">产线触屏终端(D 口,端口 8892)</p>
<div class="field">
<span class="lab">账号</span>
<el-input
v-model.trim="username"
size="large"
placeholder="请输入账号"
clearable
@keyup.enter="submit"
/>
</div>
<div class="field">
<span class="lab">密码</span>
<el-input
v-model="password"
size="large"
type="password"
show-password
placeholder="请输入密码"
@keyup.enter="submit"
/>
</div>
<el-button class="btn-login" type="primary" size="large" :loading="loading" @click="submit">
登 录
</el-button>
<p class="hint">内置账号:admin / admin123 &nbsp;&nbsp;operator1 / 123456</p>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { login } from '../api'
import { setAuth } from '../utils/request'
const router = useRouter()
const username = ref('')
const password = ref('')
const loading = ref(false)
async function submit() {
if (!username.value || !password.value) {
ElMessage.warning('请输入账号和密码')
return
}
loading.value = true
try {
const data = await login({ username: username.value, password: password.value })
setAuth(data.token, data.user)
ElMessage.success('登录成功')
router.push('/main')
} catch (e) {
// 错误提示已由 request 封装统一弹出
} finally {
loading.value = false
}
}
</script>
<style scoped>
.login-page {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #0f2b4c 0%, #14385f 60%, #1a4a7a 100%);
}
.login-card {
width: 480px;
padding: 48px 56px;
background: #fff;
border-radius: 16px;
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}
.title {
margin: 0 0 8px;
font-size: 30px;
text-align: center;
color: #16324f;
}
.subtitle {
margin: 0 0 32px;
text-align: center;
font-size: 16px;
color: #7a8aa0;
}
.field {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 22px;
}
.lab {
width: 64px;
font-size: 20px;
font-weight: bold;
color: #16324f;
text-align: right;
}
.field :deep(.el-input__inner) {
height: 52px;
font-size: 20px;
}
.btn-login {
width: calc(100% - 80px);
margin-left: 80px;
height: 54px;
font-size: 24px;
letter-spacing: 12px;
}
.hint {
margin-top: 26px;
text-align: center;
font-size: 14px;
color: #9aa7b8;
}
</style>