点位管理

This commit is contained in:
2024-01-18 16:36:43 +08:00
parent 51cfee116c
commit dc4c464634
5 changed files with 214 additions and 69 deletions

View File

@@ -1,10 +1,10 @@
<template> <template>
<section> <section class="home_wrap">
<header><span class="fxcol">首页</span></header> <header><span class="fxcol">首页</span></header>
<section class="content" style="margin-bottom: 0"> <section class="content">
<div class="userInfo"> <div class="userInfo">
<div class="fxcol"> <div class="fxcol">
<p class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).nickName : ''}}</p> <p class="p1">admin{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).nickName : ''}}</p>
<p class="p2">欢迎进入顺安手持系统</p> <p class="p2">欢迎进入顺安手持系统</p>
</div> </div>
<div class="exit" @click="Quit"> <div class="exit" @click="Quit">
@@ -13,37 +13,61 @@
</div> </div>
</div> </div>
</section> </section>
<div class="con"> <div class="nemu_wrap">
<ul> <ul>
<!-- <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li> --> <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.title}}</li>
<li @click="goInner('/taskmanage')">任务管理</li> <!-- <li @click="goInner('/taskmanage')">任务管理</li>
<li @click="goInner('/zlmanage')">指令管理</li> <li @click="goInner('/zlmanage')">指令管理</li>
<!-- <li @click="goInner('/belowgradereport')">不合格品上报</li> -->
<li @click="goInner('/sendmater')">送料</li> <li @click="goInner('/sendmater')">送料</li>
<li @click="goInner('/callmater')">叫料</li> <li @click="goInner('/callmater')">叫料</li>
<li @click="goInner('/sendempty')">送空</li> <li @click="goInner('/sendempty')">送空</li>
<li @click="goInner('/callempty')">叫空</li> <li @click="goInner('/callempty')">叫空</li>
<li @click="goInner('/KunliaoManage')">困料管理</li> <li @click="goInner('/KunliaoManage')">困料管理</li>
<!-- <li @click="goInner('/RuyaoManage')">入窑管理</li> -->
<li @click="goInner('/VehicleBind')">载具绑定</li> <li @click="goInner('/VehicleBind')">载具绑定</li>
<li @click="goInner('/VehicleUnbind')">载具解绑</li> <li @click="goInner('/VehicleUnbind')">载具解绑</li>
<!-- <li @click="goInner('/CallDefective')">呼叫次品料</li> -->
<!-- <li @click="goInner('/CreateChargingTask')">AGV充电</li> -->
<li @click="goInner('/ManualUnstack')">人工拆垛</li> <li @click="goInner('/ManualUnstack')">人工拆垛</li>
<li @click="goInner('/PointManage')">点位管理</li> <li @click="show = true">点位管理</li>
<li @click="goInner('/CallCarry')">呼叫搬运</li> <li @click="goInner('/CallCarry')">呼叫搬运</li> -->
</ul> </ul>
</div> </div>
<div class="sec_menu_wrap" :class="show ? 'nemu_show' : 'nemu_hidden'">
<div class="nemu_wrap nemu_wrap_1">
<ul>
<li class="menu-name_inner bgc_1" v-for="e in secM" :key="e.sec_menu_id" @click="goInner(e)">{{e.title}}</li>
</ul>
</div>
</div>
<div v-if="show" class="modal" @click.stop="show = false"></div>
</section> </section>
</template> </template>
<script> <script>
import {authority} from '@config/getData2.js'
export default { export default {
name: 'Home', name: 'Home',
data () { data () {
return { return {
menuList: [], menuList: [
{menu_id: 1, path: '/taskmanage', title: '任务管理', icon: 'FR01', sonTree: []},
{menu_id: 2, path: '/zlmanage', title: '指令管理', icon: 'FR02', sonTree: []},
{menu_id: 3, path: '/sendmater', title: '送料', icon: 'FR01', sonTree: []},
{menu_id: 4, path: '/callmater', title: '叫料', icon: 'FR01', sonTree: []},
{menu_id: 5, path: '/sendempty', title: '送空', icon: 'FR01', sonTree: []},
{menu_id: 6, path: '/callempty', title: '叫空', icon: 'FR01', sonTree: []},
{menu_id: 7, path: '/KunliaoManage', title: '困料管理', icon: 'FR01', sonTree: []},
{menu_id: 8, path: '/VehicleBind', title: '载具绑定', icon: 'FR01', sonTree: []},
{menu_id: 9, path: '/VehicleUnbind', title: '载具解绑', icon: 'FR01', sonTree: []},
{menu_id: 10, path: '/ManualUnstack', title: '人工拆垛', icon: 'FR01', sonTree: []},
{menu_id: 11,
path: '',
title: '点位管理',
icon: 'FR01',
sonTree: [
{sec_menu_id: 1, path: '/PointManage?query', title: '困料货架', query: 'KLHJ'},
{sec_menu_id: 2, path: '/PointManage', title: '窑前货架', query: 'YQHJ'},
{sec_menu_id: 3, path: '/PointManage', title: '窑后货架', query: 'YHHJ'}
]},
{menu_id: 12, path: '/CallCarry', title: '呼叫搬运', icon: 'FR01', sonTree: []}
],
show: false, show: false,
secM: [] secM: []
} }
@@ -52,37 +76,28 @@ export default {
document.getElementsByTagName('body')[0].className = 'bgwhite' document.getElementsByTagName('body')[0].className = 'bgwhite'
this.$store.dispatch('receiveMaterObj', {}) this.$store.dispatch('receiveMaterObj', {})
}, },
created () {
// this._authority()
},
methods: { methods: {
toPage (e) {
let name = e.path.substr(2)
if (name === 'CheckManage' || name === 'PressCallMater') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(e.path.substr(2))
},
/** 获取菜单 */
async _authority () {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
let res = await authority(accountId)
if (res.code === '1') {
this.menuList = [...res.result.sonTree]
} else {
this.Dialog(res.desc)
}
},
Quit () { Quit () {
this.$store.dispatch('setSignOut') this.$store.dispatch('setSignOut')
this.$router.push('/login') this.$router.push('/login')
}, },
goInner (path) { toPage (e) {
let name = path.substr(1) // let name = path.substr(1)
if (name === 'CheckManage' || name === 'PressCallMater') { // if (name === 'CheckManage' || name === 'PressCallMater') {
this.$store.dispatch('setKeepAlive', [name]) // this.$store.dispatch('setKeepAlive', [name])
// }
if (!e.sonTree.length) {
this.$router.push(e.path)
} else {
this.secM = e.sonTree
this.show = true
} }
this.$router.push(path) },
goInner (e) {
this.$router.push({
path: e.path,
query: {id: e.query, ids: e.sec_menu_id}
})
} }
} }
} }
@@ -90,54 +105,105 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '~@style/mixin' @import '~@style/mixin'
.home_wrap
max-height 24rem
height 100%
background linear-gradient(to bottom, #f8e6db 0%, #f6f6f6 30%, #f6f6f6 100%)
>>>header >>>header
background-color #ffffff background-color transparent
span span
color #444444 color #444444
.userInfo .userInfo
_fj() _fj()
padding .46rem .31rem .41rem .31rem height 2rem
background-color $red padding .24rem
background-color rgba(231, 79, 26, 0.7)
_bis('../../images/bg2.png',auto,100%,right,bottom) _bis('../../images/bg2.png',auto,100%,right,bottom)
border-radius: .08rem border-radius: .08rem
color #fff color #fff
align-items center align-items center
.p1 .p1
_font(.34rem,1,#fff) _font(16px,1,#fff)
padding-bottom .18rem padding-bottom .18rem
.p2 .p2
_font(.26rem,1,#fff) _font(14px,1,#fff)
.exit .exit
flex 0 0 1.2rem flex 0 0 1.4rem
_fj() _fj()
height .47rem height .5rem
padding 0 .15rem padding 0 .2rem
border 1px solid #FF967C border 1px solid #fff
border-radius .235rem border-radius .2rem
.icon-exit .icon-exit
flex 0 0 .22rem flex 0 0 .22rem
height .22rem height .22rem
_bis('../../images/exit.png',.22rem) _bis('../../images/exit.png',.22rem)
.exit-text .exit-text
flex 1 flex 1
_font(.24rem,.47rem,#fff,,right) _font(14px,.5rem,#fff,,right)
.con .nemu_wrap
width calc(100% - .48rem)
height calc(100% - 3.46rem)
margin .3rem auto
padding .3rem .24rem
background-color #f3f5f7
box-shadow 0 2px 5px 1px rgba(0,0,0,.1)
display flex display flex
font-size .3rem flex-wrap: wrap
text-align center justify-content flex-start
justify-content center align-content: flex-start
align-items flex-start border-radius 6px
height 6rem overflow-y auto
ul ul
width 7rem width 100%
li li
color #e74f1a color #333
width 1.9rem width 30%
height 1.2rem height 1.2rem
line-height 1.2rem line-height 1.2rem
float left float left
font-size 0.26rem font-size 14px
margin 0.2rem text-align center
border 1px solid #e74f1a margin-bottom 15px
border-radius 5px border-radius 5px
background-color #fff
box-shadow 0 2px 6px 0 rgba(0,0,0,.2)
&:nth-child(3n+2)
margin-left 5%
margin-right 5%
.sec_menu_wrap
position fixed
bottom 0
left 0
width 100%
background-color rgba(246, 246, 246, 1)
box-shadow 0 -8px 16px 0 rgba(28,31,33,.1)
border-top-left-radius 6px
border-top-right-radius 6px
z-index 2017
transition all .3s
.modal
position fixed
bottom 0
left 0
_wh(100%, 100%)
background-color rgba(0,0,0,0.8)
z-index 2010
.nemu_wrap_1
background-color transparent
box-shadow none
padding-bottom 0
ul
li
color #fff
.nemu_show
transform: translateY(0)
.nemu_hidden
transform: translateY(100%)
.bgc_1
background linear-gradient(to right, #4966ff 0%, #758eff 100%)
.bgc_2
background linear-gradient(to right, #fea814 0%, #ffb101 100%)
.bgc_3
background linear-gradient(to right, #9946ff 0%, #c6a5fb 100%)
</style> </style>

View File

@@ -91,18 +91,21 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '~@style/mixin' @import '~@style/mixin'
.content
background: linear-gradient(to bottom, #f8e6db 0%, #f6f6f6 30%, #f6f6f6 100%)
.p1 .p1
_font(.6rem,1,#444) _font(20px,1,#444,600)
padding-top: 0.9rem padding-top 45px
.p2 .p2
_font(.5rem,1,#444) _font(26px,1,#444,600)
padding: 0.4rem 0 0.25rem padding 5px 0 27px 0
.input-box .input-box
margin-top .68rem margin-top .68rem
border-bottom 1px solid #e2e2e2 border-bottom 1px solid #e2e2e2
input input
_font(.32rem,.74rem,#999) _font(.32rem,.74rem,#999)
padding-left .1rem padding-left .1rem
background: transparent
.icon-eye .icon-eye
flex 0 0 .35rem flex 0 0 .35rem
height .74rem height .74rem

View File

@@ -1,6 +1,6 @@
<template> <template>
<section> <section>
<nav-bar title="点位管理"></nav-bar> <nav-bar :title="['困料货架', '窑前货架', '窑后货架'][$route.query.ids - 1]"></nav-bar>
<section class="content mgt15 grid-wraper"> <section class="content mgt15 grid-wraper">
<div class="left_fixed"> <div class="left_fixed">
<table class="layout-t left_layout_t"> <table class="layout-t left_layout_t">
@@ -37,7 +37,7 @@
<script> <script>
import NavBar from '@components/NavBar.vue' import NavBar from '@components/NavBar.vue'
import {getAllPointList} from '@config/getData2' import {getPointListByRegion} from '@config/getData2'
export default { export default {
name: 'PointManage', name: 'PointManage',
components: { components: {
@@ -54,7 +54,7 @@ export default {
methods: { methods: {
async _getAllPointList () { async _getAllPointList () {
try { try {
let res = await getAllPointList() let res = await getPointListByRegion(this.$route.query.id)
if (res.code === '1') { if (res.code === '1') {
this.dataList = [...res.result] this.dataList = [...res.result]
} else { } else {

View File

@@ -0,0 +1,75 @@
<template>
<section>
<nav-bar title="点位管理"></nav-bar>
<section class="content mgt15 grid-wraper">
<div class="left_fixed">
<table class="layout-t left_layout_t">
<tr>
<th>区域</th>
</tr>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.region_name}}</td>
</tr>
</table>
</div>
<div class="slide">
<table class="layout-t">
<tr>
<th>点位</th>
<th>点位状态</th>
<th>载具号</th>
<th>载具类型</th>
<th>物料名称</th>
</tr>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.point_name}}</td>
<td>{{e.point_status}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.vehicle_type}}</td>
<td>{{e.material_name}}</td>
</tr>
</table>
</div>
</section>
</section>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import {getAllPointList} from '@config/getData2'
export default {
name: 'PointManage',
components: {
NavBar
},
data () {
return {
dataList: []
}
},
mounted () {
this._getAllPointList()
},
methods: {
async _getAllPointList () {
try {
let res = await getAllPointList()
if (res.code === '1') {
this.dataList = [...res.result]
} else {
this.Dialog(res.desc)
}
} catch (err) {
this.Dialog(err)
}
}
}
}
</script>
<style lang="stylus" scoped>
.left_fixed
flex 0 0 .5rem
.left_layout_t
min-width 1.5rem
</style>

View File

@@ -141,6 +141,7 @@ header
padding: 0 0.24rem padding: 0 0.24rem
.login-bg .login-bg
background: #ffffff center bottom / 100% auto no-repeat url(./images/bg.png) background: #ffffff center bottom / 100% auto no-repeat url(./images/bg.png)
overflow hidden
.loading-tips .loading-tips
_font(.28rem,.53rem,#929292,,center) _font(.28rem,.53rem,#929292,,center)
margin-bottom 1.2rem margin-bottom 1.2rem