人工异常处理

This commit is contained in:
2024-05-22 11:10:20 +08:00
parent e33840b0af
commit 6fcd869b57
9 changed files with 259 additions and 68 deletions

View File

@@ -103,7 +103,7 @@ export default {
.dropdown-menu
position relative
height .9rem
border .02rem solid #dcdfe6
// border .02rem solid #dcdfe6
border-radius 4px
background-color #fff
user-select none
@@ -156,7 +156,7 @@ export default {
width calc(100% - 3rem)
padding 0 .15rem
color #606266
font-size .3rem
font-size .26rem
line-height .86rem
.dropdown-menu__title
position relative
@@ -222,7 +222,7 @@ export default {
height inherit
overflow hidden
span
_font(.3rem, inherit, #606266)
_font(.28rem, inherit, #606266)
.cell__title--active span
color $red
.toggle_disabled

View File

@@ -1,69 +1,51 @@
<template>
<div class="md-modal" v-if="mdShow">
<transition name="bounce">
<div class="modal-inner">
<div class="modal-content">
<!-- <div class="modal-message">{{question}}</div> -->
<slot></slot>
</div>
<div class="mgt15 fxrow">
<button class="fxcol btn btn-disabled submit-button" @click="closeModal">取消</button>
<button class="btn btn-disabled submit-button bl1px" v-if="comfirmDisable">确认</button>
<button class="btn submit-button" v-if="!comfirmDisable" @click="comfirm">确认</button>
</div>
<section class="msg_wrapper" :class="mdShow ? 'popshow' : 'pophide'">
<div class="msg_box">
<div class="modal_header">确认信息</div>
<div class="modal-content">
<slot></slot>
</div>
<div class="zd-row mgt15">
<button class="zd-col-10 btn btn-surround" @click="closeModal">取消</button>
<button class="zd-col-10 btn" @click="comfirm">确认</button>
</div>
</transition>
<transition name="fade">
<div class="overlay"></div>
</transition>
</div>
<div class="mask"></div>
</section>
</template>
<script>
export default {
name: 'Modal',
props: {
// question: String,
mdShow: Boolean,
comfirmDisable: Boolean,
type: String
mdShow: {
type: Boolean,
default: false
}
},
methods: {
closeModal () {
this.$emit('closeModalCallback')
},
comfirm () {
this.$emit('comfirmCallback', this.type)
this.$emit('comfirmCallback')
}
}
}
</script>
<style lang="stylus" scoped>
.modal-inner
position fixed
top 50%
left 50%
width 80%
font-size .28rem
overflow hidden
transition .3s
border-radius 4px
background-color #fff
transform translate3d(-50%, -50%, 0)
z-index 2018
.overlay
position fixed
top 0
left 0
.popshow
transform translateY(0)
.pophide
transform translateY(100%)
.modal_header
font-size .3rem
line-height .5rem
font-weight 700
color #000
text-align left
margin-bottom .3rem
.modal-content
width 100%
height 100%
background-color rgba(0, 0, 0, .7)
z-index 11
>>>.btn
border-radius 0
>>>.submit-button
margin 0
.bl1px
border-left 1px solid #fff
</style>

View File

@@ -154,3 +154,20 @@ export const vehicleUnbind = (code) => post('api/pda/vehicleUnbind', {
export const callDefective = (code) => post('api/pda/callDefective', {
device_code: code
})
/**
* 人工异常处理
*/
// 区域下拉框
export const ExceptionHandlingRegionList = () => post('api/pda/manual/ExceptionHandlingTask/regionList', {})
// 点位下拉框
export const ExceptionHandlingTaskList = () => post('api/pda/manual/ExceptionHandlingTask/list', {})
// 任务信息
export const ExceptionHandlingTaskShow = (code) => post('api/pda/manual/ExceptionHandlingTask/show', {
region_code: code
})
// 确认
export const ExceptionHandlingTask = (id, point) => post('api/pda/manual/ExceptionHandlingTask', {
task_id: id,
end_point: point
})

16
src/config/mork2.js Normal file
View File

@@ -0,0 +1,16 @@
export const ExceptionHandlingRegionList = () => {
let res = {'result': [{'region_name': '混料区', 'region_code': 'HL'}, {'region_name': '压制区', 'region_code': 'YZ'}, {'region_name': '分拣区', 'region_code': 'FJ'}], 'code': '1', 'desc': '操作成功!'}
return res
}
export const ExceptionHandlingTaskList = () => {
let res = {'result': [{'point_name': '困料虚拟库', 'point_code': 'KLXNK'}, {'point_name': '窑前虚拟库', 'point_code': 'YQXNK'}, {'point_name': '出窑虚拟库', 'point_code': 'CYXNK'}], 'code': '1', 'desc': '操作成功!'}
return res
}
export const ExceptionHandlingTaskShow = () => {
let res = {'result': [{'task_name': '钢托库叫空', 'task_status': '5', 'start_point': '叠托位', 'end_point': '拆盘机进对接位', 'task_code': '20240321000003', 'vehicle_type': '2', 'task_id': '1770638391122198528', 'vehicle_code': '0000'}, {'task_name': '钢托库叫空', 'task_status': '5', 'start_point': '叠托位', 'end_point': '拆盘机进对接位', 'task_code': '20240321000003', 'vehicle_type': '2', 'task_id': '1', 'vehicle_code': '0000'}, {'task_name': '钢托库叫空', 'task_status': '5', 'start_point': '叠托位', 'end_point': '拆盘机进对接位', 'task_code': '20240321000003', 'vehicle_type': '2', 'task_id': '2', 'vehicle_code': '0000'}], 'code': '1', 'desc': '操作成功!'}
return res
}
export const ExceptionHandlingTask = () => {
let res = {code: '1', desc: 'ok'}
return res
}

View File

@@ -96,18 +96,17 @@ export default {
<style lang="stylus" scoped>
@import '~@style/mixin'
>>>header
background-color #f5f5f5
background #f5f5f5
span
color #444444
.content
height calc(100% - .86rem)
background-color #f5f5f5
padding-bottom .4rem
overflow-y auto
.userInfo
_fj()
padding .46rem .31rem .41rem .31rem
background-color $red
background-color #ff6800
_bis('../../images/bg2.png',auto,100%,right,bottom)
border-radius: .08rem
color #fff

View File

@@ -127,7 +127,7 @@ export default {
width 100%
border-radius .46rem
_font(.36rem,.92rem,#fff,,center)
background-color $red
background linear-gradient(90deg, #ff6800, #ff9856)
.login-ewm
margin 1.2rem auto .2rem
_wh(.82rem,.82rem)

View File

@@ -0,0 +1,170 @@
<template>
<section>
<nav-bar title="人工异常处理"></nav-bar>
<section class="content mgt86">
<div class="filter-wraper">
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">区域</div>
<div class="fxcol mgl20 visible" >
<el-select v-model="value1" filterable placeholder="请选择">
<el-option
v-for="item in options1"
:key="item.region_code"
:label="item.region_name"
:value="item.region_code">
</el-option>
</el-select>
</div>
</div>
</div>
<div class="zd-row 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" @click="toCheck(e)" :class="{'checked': e.task_id === pkId}">
<td>{{e.task_code}}</td>
</tr>
</table>
</div>
<div class="slide">
<table class="layout-t">
<tr>
<th>任务名</th>
<th>状态</th>
<th>起点</th>
<th>终点</th>
<th>载具类型</th>
<th>载具号</th>
</tr>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_id === pkId}">
<td>{{ e.task_name }}</td>
<td>{{e.task_status}}</td>
<td>{{e.start_point}}</td>
<td>{{e.end_point}}</td>
<td>{{e.vehicle_type}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</table>
</div>
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" @click="_ExceptionHandlingTaskShow">查询</button>
<button class="btn submit-button" :class="{'btn-disabled' : !pkId}" @click="show = true">修改终点</button>
<button class="btn submit-button" :class="{'btn-disabled' : !pkId}" :disabled="disabled" @click="_ExceptionHandlingTask(1)">确认</button>
</section>
<modal :mdShow="show" @closeModalCallback="closeModalCallback" @comfirmCallback="comfirmCallback">
<div class="msg_item">
<div class="label_item">目的位置</div>
<div class="from_item" >
<el-select v-model="value2" filterable placeholder="请选择">
<el-option
v-for="item in options2"
:key="item.point_code"
:label="item.point_name"
:value="item.point_code">
</el-option>
</el-select>
</div>
</div>
</modal>
</section>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import Modal from '@components/Modal.vue'
import {ExceptionHandlingRegionList, ExceptionHandlingTaskList, ExceptionHandlingTaskShow, ExceptionHandlingTask} from '@config/getData2'
export default {
name: 'BindPalletPoint',
components: {
NavBar,
Modal
},
data () {
return {
value1: '',
options1: [],
value2: '',
options2: [],
dataList: [],
pkId: '',
disabled: false,
show: false
}
},
created () {
this._ExceptionHandlingRegionList()
this._ExceptionHandlingTaskList()
},
methods: {
/** 查询区域下拉框 */
async _ExceptionHandlingRegionList () {
let res = await ExceptionHandlingRegionList()
if (res.code === '1') {
this.options1 = [...res.result]
} else {
this.Dialog(res.desc)
}
},
/** 点位下拉框 */
async _ExceptionHandlingTaskList () {
let res = await ExceptionHandlingTaskList()
if (res.code === '1') {
this.options2 = [...res.result]
} else {
this.Dialog(res.desc)
}
},
/** grid */
async _ExceptionHandlingTaskShow () {
let res = await ExceptionHandlingTaskShow(this.value1)
if (res.code === '1') {
this.dataList = [...res.result]
} else {
this.Dialog(res.desc)
}
},
toCheck (e) {
this.pkId = this.pkId === e.task_id ? '' : e.task_id
},
closeModalCallback () {
this.show = false
},
comfirmCallback () {
if (this.valu2 === '') {
this.toast('请选择目的位置')
return
}
this.show = false
this._ExceptionHandlingTask(2)
},
/** 确认 */
async _ExceptionHandlingTask (type) {
this.disabled = true
if (type === 1 && this.pkId === '') {
this.disabled = false
return
}
if (type === 2) {
this.disabled = false
}
try {
let code = type === 1 ? '' : this.value2
let res = await ExceptionHandlingTask(this.pkId, code)
if (res.code === '1') {
this.toast(res.desc)
this._ExceptionHandlingTaskShow()
} else {
this.Dialog(res.desc)
}
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -1,7 +1,7 @@
<template>
<section>
<nav-bar title="指令管理"></nav-bar>
<section class="content mgt86 mgb110 pdt1 grid-wraper">
<section class="content mgt86 mgb110 grid-wraper">
<div class="left_fixed">
<table class="layout-t left_layout_t">
<tr>

View File

@@ -26,7 +26,7 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
html,body
min-height: 100vh
width: 100%
background-color: #fff
background-color: #f5f5f5
.clear:after
content: ''
@@ -88,7 +88,7 @@ html,body
margin-top: .15rem !important
.mgt86
margin-top 0.86rem !important
margin-top 0.96rem !important
.mgl20
margin-left: .2rem !important
@@ -233,7 +233,7 @@ header
width 100%
height .86rem
padding 0 .24rem
background: $red
background linear-gradient(90deg, #ff6800, #ff9856)
span
_font(.36rem,.86rem,#ffffff,bold,center)
.content
@@ -273,11 +273,11 @@ header
a
text-decoration underline
color $red
.layout-t tr.checked
background-image linear-gradient(to top, #ffcb4b, #ffe8ad)
.layout-t tr.checked td
background-color $red
color #fff
a
color #fff
background-color transparent
color #6c5502
.grid-wraper::-webkit-scrollbar, .slide::-webkit-scrollbar
width 0
height 0
@@ -351,7 +351,7 @@ header
.btn
_font(.28rem,.6rem,#fff,,center)
padding 0 .2rem
background-color: $red
background-color#ff6800
border-radius: 5px
cursor pointer
&:disabled
@@ -381,6 +381,8 @@ header
/** **/
.filter-wraper
width 100%
background-color #fff
border-radius 4px
margin-bottom .15rem
.bottom-filter
width 100%
@@ -390,8 +392,8 @@ header
box-shadow 0 0 15px 0 rgba(160,160,160,0.9)
.bottom-filter-tip
_fj(space-between)
padding .1rem 0 0 0
// border-bottom .01rem solid #f0edf1
padding 0 .2rem
border-bottom .02rem solid #f0edf1
&:last-child
border-bottom none
.filed-space
@@ -405,14 +407,14 @@ header
.filter-unit
width .5rem
margin-left .2rem
_font(.26rem,.6rem,#323232)
_font(.26rem,.6rem,#323232,,right)
.filter-input
display block
width 100%
min-width 0
padding 0 .15rem
_font(.3rem,.9rem,#606266)
border .02rem solid #dcdfe6
// border .02rem solid #dcdfe6
border-radius 4px
background-color #fff
// box-sizing border-box
@@ -509,7 +511,7 @@ header
left 0
right 0
text-align center
z-index 100
z-index 98
&::after
content ""
display inline-block
@@ -517,9 +519,10 @@ header
width 0
vertical-align middle
.msg_box
position relative
z-index 100
display inline-block
width 90%
max-width 420px
padding .2rem
vertical-align middle
background-color #fff
@@ -561,6 +564,9 @@ header
.from_item .el-input__inner
height 40px
line-height inherit
border: 1px solid #DCDFE6;
.from_item .el-select .el-input.is-focus .el-input__inner, .from_item .el-select .el-input__inner:focus
border-color #e74f1a
.el-select-dropdown__item span
font-size 14px !important
.el-select .el-input .el-select__caret
@@ -592,6 +598,7 @@ header
.el-input__inner
line-height .6rem
height .6rem
border 0
.el-select .el-input .el-select__caret
line-height .6rem
.el-radio__label