From df92698251415fda7d6e728fad1ea7d4da3123c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 21 Feb 2024 17:32:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/api/board/firstFloor.js | 20 +- hw-ui/src/api/login.js | 17 +- hw-ui/src/permission.js | 2 +- hw-ui/src/router/index.js | 5 + hw-ui/src/store/modules/permission.js | 1 - hw-ui/src/store/modules/user.js | 3 +- hw-ui/src/views/board/firstFloor/index.vue | 23 ++- hw-ui/src/views/login.vue | 91 ++++++--- hw-ui/src/views/login2.vue | 219 +++++++++++++++++++++ 9 files changed, 326 insertions(+), 55 deletions(-) create mode 100644 hw-ui/src/views/login2.vue diff --git a/hw-ui/src/api/board/firstFloor.js b/hw-ui/src/api/board/firstFloor.js index 1677d98..e4ca08c 100644 --- a/hw-ui/src/api/board/firstFloor.js +++ b/hw-ui/src/api/board/firstFloor.js @@ -1,26 +1,10 @@ import request from '@/utils/request' -export function getMaterialBoms(query) { +export function getProductPlans(query) { return request({ - url: '/mes/api/getMaterialBoms', + url: '/mes/api/getProductPlans', method: 'get', params: query }) } - -export function getWarehouses(query) { - return request({ - url: '/wms/api/getWarehouses', - method: 'get', - params: query - }) -} - -export function applyRawOutstock(query) { - return request({ - url: '/wms/api/applyRawOutstock', - method: 'post', - data: query - }) -} diff --git a/hw-ui/src/api/login.js b/hw-ui/src/api/login.js index 2b3e325..1dd9e9a 100644 --- a/hw-ui/src/api/login.js +++ b/hw-ui/src/api/login.js @@ -1,7 +1,7 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid, stationId) { return request({ url: '/auth/login', headers: { @@ -9,7 +9,7 @@ export function login(username, password, code, uuid) { repeatSubmit: false }, method: 'post', - data: { username, password, code, uuid } + data: {username, password, code, uuid, stationId} }) } @@ -59,4 +59,15 @@ export function getCodeImg() { method: 'get', timeout: 20000 }) -} \ No newline at end of file +} + +// 获取验证码 +export function getStations() { + return request({ + headers: { + isToken: false + }, + url: '/auth/getStations', + method: 'get', + }) +} diff --git a/hw-ui/src/permission.js b/hw-ui/src/permission.js index c568979..459ce6d 100644 --- a/hw-ui/src/permission.js +++ b/hw-ui/src/permission.js @@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/register'] +const whiteList = ['/login', '/login2', '/register'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/hw-ui/src/router/index.js b/hw-ui/src/router/index.js index bf6e92b..3676c3a 100644 --- a/hw-ui/src/router/index.js +++ b/hw-ui/src/router/index.js @@ -46,6 +46,11 @@ export const constantRoutes = [ component: () => import('@/views/login'), hidden: true }, + { + path: '/login2', + component: () => import('@/views/login2'), + hidden: true + }, { path: '/register', component: () => import('@/views/register'), diff --git a/hw-ui/src/store/modules/permission.js b/hw-ui/src/store/modules/permission.js index d32a794..5bfd2cf 100644 --- a/hw-ui/src/store/modules/permission.js +++ b/hw-ui/src/store/modules/permission.js @@ -72,7 +72,6 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { } } if(route.name === 'Board'){ - console.log(route) route.component = Layout2 } if (route.children != null && route.children && route.children.length) { diff --git a/hw-ui/src/store/modules/user.js b/hw-ui/src/store/modules/user.js index 909c135..0f6fbc9 100644 --- a/hw-ui/src/store/modules/user.js +++ b/hw-ui/src/store/modules/user.js @@ -42,8 +42,9 @@ const user = { const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid + const stationId = userInfo.stationId || '' return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid,stationId).then(res => { let data = res.data setToken(data.access_token) commit('SET_TOKEN', data.access_token) diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue index a03925d..f563e87 100644 --- a/hw-ui/src/views/board/firstFloor/index.vue +++ b/hw-ui/src/views/board/firstFloor/index.vue @@ -20,18 +20,24 @@ > + + @@ -41,9 +47,12 @@ label="差异" width="100" > + @@ -261,7 +270,7 @@ -