From 4e6312e3e02d64e82c2c3c534142ca49911a12da Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Tue, 15 Mar 2022 09:27:38 +0800 Subject: [PATCH 1/2] ceshi --- hb_client/src/api/inm.js | 8 + hb_client/src/views/inm/fifo.vue | 656 ++++++++++++++++++++----------- 2 files changed, 425 insertions(+), 239 deletions(-) diff --git a/hb_client/src/api/inm.js b/hb_client/src/api/inm.js index a4ff215..a4d721b 100644 --- a/hb_client/src/api/inm.js +++ b/hb_client/src/api/inm.js @@ -150,3 +150,11 @@ export function itemfiles(id, data) { data }) } +//其他出库 +export function outOther(data) { + return request({ + url: `/inm/fifo/out_other/`, + method: 'POST', + data + }) +} diff --git a/hb_client/src/views/inm/fifo.vue b/hb_client/src/views/inm/fifo.vue index 699ae25..f62acee 100644 --- a/hb_client/src/views/inm/fifo.vue +++ b/hb_client/src/views/inm/fifo.vue @@ -8,7 +8,7 @@ icon="el-icon-plus" @click="handlecgCreate" > - 新增采购入库 + 采购入库 - 新增其他入库 + 其他入库 + + + 其他出库 - - - + + @@ -73,12 +80,11 @@ 已审核 - - + From 0851e0cc843c1ff4fb7c167fbeec68d60842aab5 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 15 Mar 2022 10:29:23 +0800 Subject: [PATCH 2/2] bigScreenData --- hb_client/src/permission.js | 37 +- hb_client/src/utils/request.js | 5 +- hb_client/src/views/bigScreen/center.vue | 107 +++++- .../src/views/bigScreen/centerRight1.vue | 14 +- .../src/views/bigScreen/centerRight2.vue | 10 +- hb_client/src/views/bigScreen/index.vue | 326 ++++++++++++++++-- hb_client/src/views/login/index.vue | 5 +- 7 files changed, 453 insertions(+), 51 deletions(-) diff --git a/hb_client/src/permission.js b/hb_client/src/permission.js index d4a08b6..3414d1b 100644 --- a/hb_client/src/permission.js +++ b/hb_client/src/permission.js @@ -6,68 +6,69 @@ import 'nprogress/nprogress.css' // progress bar style import { getToken } from '@/utils/auth' // get token from cookie import getPageTitle from '@/utils/get-page-title' -NProgress.configure({ showSpinner: false }) // NProgress Configuration +NProgress.configure({ showSpinner: false }) ;// NProgress Configuration -const whiteList = ['/login'] // no redirect whitelist +const whiteList = ['/login']; // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar - NProgress.start() + NProgress.start(); // set page title - document.title = getPageTitle(to.meta.title) + document.title = getPageTitle(to.meta.title); // determine whether the user has logged in - const hasToken = getToken() + const hasToken = getToken(); if (hasToken) { if (to.path === '/login') { // if is logged in, redirect to the home page - next({ path: '/' }) + next({ path: '/' }); NProgress.done() } else { // determine whether the user has obtained his permission perms through getInfo - const hasPerms = store.getters.perms && store.getters.perms.length > 0 + const hasPerms = store.getters.perms && store.getters.perms.length > 0; if (hasPerms) { next() } else { try { // get user info // note: perms must be a object array! such as: ['admin'] or ,['developer','editor'] - const { perms } = await store.dispatch('user/getInfo') + const { perms } = await store.dispatch('user/getInfo'); // generate accessible routes map based on perms - const accessRoutes = await store.dispatch('permission/generateRoutes', perms) + const accessRoutes = await store.dispatch('permission/generateRoutes', perms); // dynamically add accessible routes - router.addRoutes(accessRoutes) + router.addRoutes(accessRoutes); // hack method to ensure that addRoutes is complete // set the replace: true, so the navigation will not leave a history record next({ ...to, replace: true }) } catch (error) { // remove token and go to login page to re-login - await store.dispatch('user/resetToken') - Message.error(error || 'Has Error') - next(`/login?redirect=${to.path}`) + await store.dispatch('user/resetToken'); + Message.error(error || 'Has Error'); + next(`/login?redirect=${to.path}`); NProgress.done() } } } } else { /* has no token*/ - - if (whiteList.indexOf(to.path) !== -1) { + if (to.path === '/index'){ + next() + }else if (whiteList.indexOf(to.path) !== -1) { // in the free login whitelist, go directly next() } else { // other pages that do not have permission to access are redirected to the login page. - next(`/login?redirect=${to.path}`) + next(`/login?redirect=${to.path}`); NProgress.done() } } -}) +}); router.afterEach(() => { // finish progress bar NProgress.done() -}) +}); diff --git a/hb_client/src/utils/request.js b/hb_client/src/utils/request.js index 8db7072..6183457 100644 --- a/hb_client/src/utils/request.js +++ b/hb_client/src/utils/request.js @@ -20,7 +20,7 @@ service.interceptors.request.use( // please modify it according to the actual situation config.headers['Authorization'] = 'Bearer ' + getToken() } - let data = config.data; + let data = config.data?config.data:config.params; /*debugger; console.log(data)*/ if(data){ @@ -28,6 +28,9 @@ service.interceptors.request.use( if(token){ config.headers['Authorization'] = 'Bearer ' + token } + if(data.type==='big_screen'){ + config.headers['Authorization'] = 'big_screen ' + } } /* debugger; console.log(config.headers['Authorization'])*/ diff --git a/hb_client/src/views/bigScreen/center.vue b/hb_client/src/views/bigScreen/center.vue index 14fc87f..ef6c06b 100644 --- a/hb_client/src/views/bigScreen/center.vue +++ b/hb_client/src/views/bigScreen/center.vue @@ -7,7 +7,7 @@ :key="item.title" >

{{ item.title }}

-
+
- 任务完成进度 + 工序生产进度
@@ -49,11 +49,20 @@ diff --git a/hb_client/src/views/bigScreen/centerRight1.vue b/hb_client/src/views/bigScreen/centerRight1.vue index bdb1f85..2b5b409 100644 --- a/hb_client/src/views/bigScreen/centerRight1.vue +++ b/hb_client/src/views/bigScreen/centerRight1.vue @@ -10,7 +10,7 @@
- +
@@ -19,7 +19,7 @@ export default { data() { return { - config: { + /* config: { header: ['姓名', '部门', '到岗情况'], data: [ ['张思', '一车间', "已到岗"], @@ -41,9 +41,17 @@ export default { index: false, // columnWidth: [50], align: ['center'] + }*/ + } + }, + props:{ + userConfig:{ + type:Object, + default:()=>{ + return {} } } - } + }, } diff --git a/hb_client/src/views/bigScreen/centerRight2.vue b/hb_client/src/views/bigScreen/centerRight2.vue index 2d32f13..c54a46e 100644 --- a/hb_client/src/views/bigScreen/centerRight2.vue +++ b/hb_client/src/views/bigScreen/centerRight2.vue @@ -19,7 +19,7 @@ export default { data() { return { - config: { + /*config: { data: [ { name: '冷加工', @@ -50,6 +50,14 @@ export default { value: 100 } ] + }*/ + } + }, + props:{ + config:{ + type:Object, + default:()=>{ + return {} } } }, diff --git a/hb_client/src/views/bigScreen/index.vue b/hb_client/src/views/bigScreen/index.vue index 95cfcbb..ee5698a 100644 --- a/hb_client/src/views/bigScreen/index.vue +++ b/hb_client/src/views/bigScreen/index.vue @@ -4,9 +4,9 @@
- +
- +
航玻生产管理系统 @@ -23,7 +23,7 @@ :color="['#568aea', '#000000']" />
- +
@@ -50,36 +50,45 @@
-
-
+
+
-
- +
+
- +
- +
-
+
- +
- + - +
@@ -90,18 +99,22 @@ diff --git a/hb_client/src/views/login/index.vue b/hb_client/src/views/login/index.vue index 4551caa..392e3ac 100644 --- a/hb_client/src/views/login/index.vue +++ b/hb_client/src/views/login/index.vue @@ -5,7 +5,7 @@
-

航玻生产管理系统

+

航玻生产管理系统