From c58138d3cbc65d70c1a90f3283ff0eb93f546b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Wed, 15 May 2024 17:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=89=8D=E7=AB=AFpc=E3=80=91pad?= =?UTF-8?q?=E5=92=8Cpc=E7=99=BB=E5=BD=95=E9=97=AE=E9=A2=98=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/layout/index.vue | 2 +- fe/PC/src/permission.js | 40 +- fe/PC/src/router/index.js | 27 +- fe/PC/src/styles/padMain.scss | 119 ++++ fe/PC/src/utils/detailsTableColumns/index.js | 2 +- fe/PC/src/utils/tableColumns/index.js | 2 +- fe/PC/src/utils/tabsDesTions/index.js | 2 +- fe/PC/src/views/login/index.vue | 16 +- fe/PC/src/views/login/indexPad.vue | 513 ++++++++++++++++++ ...ittingPack.vue => isPadForKittingPack.vue} | 14 +- .../{padMenuPage.vue => isPadForMenuPage.vue} | 10 +- ...rLibJob.vue => isPadForTransferLibJob.vue} | 50 +- .../padManage/isPadForTransferLibJob_new.vue | 26 + .../padManage/isPadForTransferLibJob_old.vue | 278 ++++++++++ 14 files changed, 1060 insertions(+), 41 deletions(-) create mode 100644 fe/PC/src/styles/padMain.scss create mode 100644 fe/PC/src/views/login/indexPad.vue rename fe/PC/src/views/padManage/{padKittingPack.vue => isPadForKittingPack.vue} (98%) rename fe/PC/src/views/padManage/{padMenuPage.vue => isPadForMenuPage.vue} (72%) rename fe/PC/src/views/padManage/{padTransferLibJob.vue => isPadForTransferLibJob.vue} (86%) create mode 100644 fe/PC/src/views/padManage/isPadForTransferLibJob_new.vue create mode 100644 fe/PC/src/views/padManage/isPadForTransferLibJob_old.vue diff --git a/fe/PC/src/layout/index.vue b/fe/PC/src/layout/index.vue index 13907cdda..7878e3cdb 100644 --- a/fe/PC/src/layout/index.vue +++ b/fe/PC/src/layout/index.vue @@ -57,7 +57,7 @@ export default { data() { return { // 不显示框架页面 - isOnlyAppMainPages:['padTransferLibJob','padKittingPack'] + isOnlyAppMainPages:['isPadForTransferLibJob','isPadForKittingPack'] } }, methods: { diff --git a/fe/PC/src/permission.js b/fe/PC/src/permission.js index 259e30db3..c6e9528e7 100644 --- a/fe/PC/src/permission.js +++ b/fe/PC/src/permission.js @@ -17,7 +17,8 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration -const whiteList = ['/login', '/auth-redirect', '/testForm'] // no redirect whitelist +const whiteList = ['/login','/loginPad', '/auth-redirect', '/testForm'] // no redirect whitelist +const _isPad = 'isPadFor' router.beforeEach(async (to, from, next) => { // 添加路由信息,方便代码修改定位 @@ -42,11 +43,26 @@ router.beforeEach(async (to, from, next) => { // // NProgress.done() // } // } - if (to.path === '/login') { - // if is logged in, redirect to the home page - next({ - path: '/' - }) + if (to.path === '/login' || to.path == '/loginPad') { + // pad + if(to.path == '/loginPad'){ + if(to.query && to.query.redirect){ + next({ + path: to.query.redirect + }) + }else{ + next({ + path: '/isPadForMenuPage' + }) + } + } + // pc + else{ + // if is logged in, redirect to the home page + next({ + path: '/' + }) + } NProgress.done() // hack: https://github.com/PanJiaChen/vue-element-admin/pull/2939 } else { // determine whether the user has obtained his permission roles through getInfo @@ -80,7 +96,11 @@ router.beforeEach(async (to, from, next) => { // 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}`) + if(to.path.indexOf(_isPad) >= 0){ + next(`/loginPad?redirect=${to.path}`) + }else{ + next(`/login?redirect=${to.path}`) + } NProgress.done() } } @@ -93,7 +113,11 @@ router.beforeEach(async (to, from, next) => { next() } else { // other pages that do not have permission to access are redirected to the login page. - next(`/login?redirect=${to.path}`) + if(to.path.indexOf(_isPad) >= 0){ + next(`/loginPad?redirect=${to.path}`) + }else{ + next(`/login?redirect=${to.path}`) + } NProgress.done() } } diff --git a/fe/PC/src/router/index.js b/fe/PC/src/router/index.js index b96cf60b9..fcae55fd8 100644 --- a/fe/PC/src/router/index.js +++ b/fe/PC/src/router/index.js @@ -142,22 +142,29 @@ export const constantRoutes = [ } }] }, + + // 【平板】 登录页 + { + path: '/loginPad', + component: () => import('@/views/login/indexPad'), + hidden: true + }, // 【平板】 菜单页 { - path: '/padMenuPage', - component: () => import('@/views/padManage/padMenuPage'), + path: '/isPadForMenuPage', + component: () => import('@/views/padManage/isPadForMenuPage'), hidden: true }, // 【平板】 业务库移 { path: '/', component: Layout, - redirect: '/padTransferLibJob', + redirect: '/isPadForTransferLibJob', hidden: true, children: [{ - path: 'padTransferLibJob', - component: () => import('@/views/padManage/padTransferLibJob'), - name: 'padTransferLibJob', + path: 'isPadForTransferLibJob', + component: () => import('@/views/padManage/isPadForTransferLibJob'), + name: 'isPadForTransferLibJob', meta: { keepAlive : true, title: '业务库移', @@ -169,12 +176,12 @@ export const constantRoutes = [ { path: '/', component: Layout, - redirect: '/padKittingPack', + redirect: '/isPadForKittingPack', hidden: true, children: [{ - path: 'padKittingPack', - component: () => import('@/views/padManage/padKittingPack'), - name: 'padKittingPack', + path: 'isPadForKittingPack', + component: () => import('@/views/padManage/isPadForKittingPack'), + name: 'isPadForKittingPack', meta: { keepAlive : true, title: 'Kitting组包', diff --git a/fe/PC/src/styles/padMain.scss b/fe/PC/src/styles/padMain.scss new file mode 100644 index 000000000..21da3da03 --- /dev/null +++ b/fe/PC/src/styles/padMain.scss @@ -0,0 +1,119 @@ +@import './variables.scss'; +@import './basicData.scss'; +.padpageBox { + background:#fff; + margin:10px; + height:calc(100% - 20px); + min-width:800px; + overflow:auto; + // ::v-deep .el-dialog { + // .el-dialog__body { + // padding-bottom: 20px; + // } + // .form1, + // .form2 { + // display: flex; + // flex-direction: column; + // width: 100%; + // height: 100%; + // } + + // .form1 .el-form { + // flex: 1; + // padding-left: 70px; + // padding-right: 70px; + // display: flex; + // flex-direction: column; + // overflow: hidden; + + + // .el-row { + // flex: 2; + // padding-left: 30px; + // padding-right: 30px; + // flex-wrap: wrap; + // overflow: hidden; + // overflow-y: auto; + // } + + // .formTable-box { + // flex: 2; + // overflow: hidden; + + // .el-form-item__content { + // width: 100%; + // height: 100%; + // display: flex; + // flex-direction: column; + // overflow: hidden; + // margin: 0 !important; + // } + + // .heder { + // padding: 5px 0; + // text-align: end; + + // span { + // color: rgb(64, 158, 255); + // cursor: pointer; + + // &:hover { + // color: blue; + // } + // } + // } + + // .el-table { + // flex: 1; + + // // white-space: nowrap; + // // display: flex; + // .childTable { + // display: flex; + // justify-content: space-around; + + // span { + // cursor: pointer; + + // &:nth-child(1) { + // color: red; + // } + + // &:nth-child(2) { + // color: green; + // } + // } + // } + // } + // } + // } + // } + + // .form2 .el-form { + // flex: 1; + // padding-left: 100px; + // padding-right: 100px; + // display: flex; + // justify-content: flex-start; + // align-content: flex-start; + // flex-wrap: wrap; + // overflow: hidden; + // overflow-y: auto; + // } + + // .screen-push { + // color: rgb(64, 158, 255); + + // span { + // cursor: pointer; + + // &:hover { + // color: blue; + // } + // } + // } + + // .formButton { + // padding: 20px 20px 20px 0; + // } +} diff --git a/fe/PC/src/utils/detailsTableColumns/index.js b/fe/PC/src/utils/detailsTableColumns/index.js index 1ec52e291..d3384fbda 100644 --- a/fe/PC/src/utils/detailsTableColumns/index.js +++ b/fe/PC/src/utils/detailsTableColumns/index.js @@ -5193,7 +5193,7 @@ export const KittingIssueNote = [ ] // 【pad】业务库移 -export const padTransferLibJob = [ +export const isPadForTransferLibJob = [ { label: "物品代码", prop: "itemCode", fixed: "left" }, { label: "物品名称", prop: "itemName" }, { label: "物品描述1", prop: "itemDesc1" }, diff --git a/fe/PC/src/utils/tableColumns/index.js b/fe/PC/src/utils/tableColumns/index.js index 4c05b51e4..c1688dc43 100644 --- a/fe/PC/src/utils/tableColumns/index.js +++ b/fe/PC/src/utils/tableColumns/index.js @@ -4977,7 +4977,7 @@ export const KittingIssueNote = [ ] // 【pad】业务库移 -export const padTransferLibJob = [ +export const isPadForTransferLibJob = [ { label: "任务单号", prop: "number", fixed: "left", type: "name" }, { label: "申请单号", prop: 'requestNumber',width: orderWidth }, { label: "状态", prop: "jobStatus",type: "tagFilter", filters: "jobStatus" }, diff --git a/fe/PC/src/utils/tabsDesTions/index.js b/fe/PC/src/utils/tabsDesTions/index.js index dc9fba203..1dfdb8685 100644 --- a/fe/PC/src/utils/tabsDesTions/index.js +++ b/fe/PC/src/utils/tabsDesTions/index.js @@ -3746,7 +3746,7 @@ export const KittingIssueNote = [ ] // 【pad】业务库移 -export const padTransferLibJob = [ +export const isPadForTransferLibJob = [ { label: "任务单号", prop: "number", fixed: "left", type: "name" }, { label: "申请单号", prop: 'requestNumber' }, { label: "状态", prop: "jobStatus",type: "filter", filters: "jobStatus" }, diff --git a/fe/PC/src/views/login/index.vue b/fe/PC/src/views/login/index.vue index fa9e183db..1fd74ac66 100644 --- a/fe/PC/src/views/login/index.vue +++ b/fe/PC/src/views/login/index.vue @@ -172,8 +172,20 @@ export default { this.loading = true this.$store.dispatch('user/login', this.loginForm) .then(() => { - this.$router.push({ path: '/'}) - this.loading = false + // 平板 + let _isPad = 'isPadFor' + if(this.$route.query.redirect.indexOf(_isPad) >= 0){ + if(this.$route.query && this.$route.query.redirect){ + this.$router.push({ path: this.$route.query.redirect}) + }else{ + this.$router.push({ path: '/isPadForMenuPage'}) + } + } + else{ + // pc + this.$router.push({ path: '/'}) + this.loading = false + } }) .catch((error) => { this.$message.error('用户名或密码错误!') diff --git a/fe/PC/src/views/login/indexPad.vue b/fe/PC/src/views/login/indexPad.vue new file mode 100644 index 000000000..7f0caa0f2 --- /dev/null +++ b/fe/PC/src/views/login/indexPad.vue @@ -0,0 +1,513 @@ + + + + + + diff --git a/fe/PC/src/views/padManage/padKittingPack.vue b/fe/PC/src/views/padManage/isPadForKittingPack.vue similarity index 98% rename from fe/PC/src/views/padManage/padKittingPack.vue rename to fe/PC/src/views/padManage/isPadForKittingPack.vue index d5bb89e9d..9a76ae3ed 100644 --- a/fe/PC/src/views/padManage/padKittingPack.vue +++ b/fe/PC/src/views/padManage/isPadForKittingPack.vue @@ -1,6 +1,6 @@