生箔站点管理
This commit is contained in:
@@ -290,6 +290,15 @@ uni-button:after {
|
|||||||
border: 2rpx solid #ff6a00;
|
border: 2rpx solid #ff6a00;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
.button-primary1
|
||||||
|
background-color: #E9B451
|
||||||
|
border-color: #E9B451
|
||||||
|
.button-primary2
|
||||||
|
background-color: #6CBE8B
|
||||||
|
border-color: #6CBE8B
|
||||||
|
.button-primary3
|
||||||
|
background-color: #6798ef
|
||||||
|
border-color: #6798ef
|
||||||
.button-info, .submit-button[disabled] {
|
.button-info, .submit-button[disabled] {
|
||||||
background-color: #c9c9c9;
|
background-color: #c9c9c9;
|
||||||
border: 2rpx solid #c9c9c9;
|
border: 2rpx solid #c9c9c9;
|
||||||
|
|||||||
16
pages.json
16
pages.json
@@ -42,6 +42,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/manage/sb-point-manage",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/manage/agv-call-manage",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
// "pageOrientation": "landscape",
|
// "pageOrientation": "landscape",
|
||||||
|
|||||||
@@ -34,7 +34,9 @@
|
|||||||
menuList: [
|
menuList: [
|
||||||
{id: 1, title: '呼叫管理', icon: 'RF01', path: '/pages/manage/call-manage'},
|
{id: 1, title: '呼叫管理', icon: 'RF01', path: '/pages/manage/call-manage'},
|
||||||
{id: 2, title: '指令管理', icon: 'RF02', path: '/pages/manage/inst-manage'},
|
{id: 2, title: '指令管理', icon: 'RF02', path: '/pages/manage/inst-manage'},
|
||||||
{id: 3, title: '任务管理', icon: 'RF03', path: '/pages/manage/task-manage'}
|
{id: 3, title: '任务管理', icon: 'RF03', path: '/pages/manage/task-manage'},
|
||||||
|
{id: 4, title: '生箔站点管理', icon: 'RF04', path: '/pages/manage/sb-point-manage'},
|
||||||
|
{id: 5, title: 'agv呼叫管理', icon: 'RF05', path: '/pages/manage/agv-call-manage'}
|
||||||
],
|
],
|
||||||
show: false,
|
show: false,
|
||||||
secM: []
|
secM: []
|
||||||
|
|||||||
109
pages/manage/sb-point-manage.vue
Normal file
109
pages/manage/sb-point-manage.vue
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="site_block" ref="liCon">
|
||||||
|
<view class="site_item" v-for="(e, i) in pointArr" :key="i" @tap="toCheck(e)">
|
||||||
|
<view class="site_item_box" :class="{'site_checked': pkId === e.device_code}">
|
||||||
|
<view class="title_1">{{e.device_name}}</view>
|
||||||
|
<view class="title_2">{{e.device_code}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-7 button-primary button-primary1" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_updateDeviceStatus('0')">禁止进入</button>
|
||||||
|
<button class="zd-col-7 button-primary button-primary2" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_updateDeviceStatus('1')">允许进入</button>
|
||||||
|
<button class="zd-col-7 button-primary button-primary3" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_updateDeviceStatus('2')">允许离开</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import {queryDevices} from '@/utils/mork2.js'
|
||||||
|
import {updateDeviceStatus} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
pointArr: [],
|
||||||
|
disabled: false,
|
||||||
|
pkId: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this._queryDevices()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _queryDevices () {
|
||||||
|
let res = await queryDevices()
|
||||||
|
this.pointArr = [...res.data]
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.device_code ? '' : e.device_code
|
||||||
|
},
|
||||||
|
async _updateDeviceStatus (type) {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await updateDeviceStatus(this.pkId, type)
|
||||||
|
this.pkId = ''
|
||||||
|
this._queryDevices()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
@import '../../common/style/mixin.styl';
|
||||||
|
.site_block
|
||||||
|
width 100%
|
||||||
|
transition height .3s
|
||||||
|
_fj(flex-start,,,wrap)
|
||||||
|
.site_item
|
||||||
|
width 49%
|
||||||
|
padding 5rpx 5rpx
|
||||||
|
overflow hidden
|
||||||
|
margin-bottom 10rpx
|
||||||
|
_fj(center)
|
||||||
|
&:nth-child(even)
|
||||||
|
margin-left 2%
|
||||||
|
.site_item_box
|
||||||
|
_wh(100%, 100%)
|
||||||
|
padding 20rpx 10rpx 10rpx 10rpx
|
||||||
|
background-color rgb(220, 223, 230)
|
||||||
|
border-radius 10rpx
|
||||||
|
.title_1
|
||||||
|
_wh(100%, 40rpx)
|
||||||
|
overflow hidden
|
||||||
|
_font(26rpx,40rpx,#303133,500, center)
|
||||||
|
.title_2
|
||||||
|
_wh(100%, 40rpx)
|
||||||
|
overflow hidden
|
||||||
|
_font(24rpx,40rpx,#999,500, center)
|
||||||
|
.site_checked
|
||||||
|
background-color #fff
|
||||||
|
border 2rpx solid rgba(255, 106, 0, 0.6)
|
||||||
|
box-shadow 0px 0px 6px 0px rgba(255, 106, 0, 0.6), 0px 0px 6px 0px rgba(255, 106, 0, 0.6);
|
||||||
|
.submit-bar
|
||||||
|
box-shadow none
|
||||||
|
</style>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
static/image/menu/RF04.png
Normal file
BIN
static/image/menu/RF04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/image/menu/RF05.png
Normal file
BIN
static/image/menu/RF05.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -83,4 +83,45 @@ export const handTaskoperation = (type, id) => request({
|
|||||||
type: type,
|
type: type,
|
||||||
task_uuid: id
|
task_uuid: id
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* 生箔站点管理
|
||||||
|
*/
|
||||||
|
// 1.1根据区域查询设备编号及状态
|
||||||
|
export const queryDevices = () => request({
|
||||||
|
url:'api/hands/queryDevices',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 1.3更新设备状态操作
|
||||||
|
export const updateDeviceStatus = (code, option) => request({
|
||||||
|
url:'api/hands/updateDeviceStatus',
|
||||||
|
data: {
|
||||||
|
device_code: code,
|
||||||
|
option: option
|
||||||
|
}
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* agv呼叫管理
|
||||||
|
*/
|
||||||
|
// 1.1查询所有区域信息
|
||||||
|
export const agvqueryDevices = () => request({
|
||||||
|
url:'api/hands/queryArea',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 1.2根据区域查询设备编号及状态
|
||||||
|
export const agvqueryPointByArea = (code) => request({
|
||||||
|
url:'api/hands/queryPointByArea',
|
||||||
|
data: {
|
||||||
|
areaCode: code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 1.2创建任务(生成任务号为-开头)
|
||||||
|
export const agvcallTask = (scode1, ncode1, scode2, ncode2) => request({
|
||||||
|
url:'api/hands/callTask',
|
||||||
|
data: {
|
||||||
|
start_device_code1: scode1,
|
||||||
|
next_device_code1: ncode1,
|
||||||
|
start_device_code2: scode2,
|
||||||
|
next_device_code2: ncode2,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@@ -115,4 +115,32 @@ export const queryPointByArea = () => {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
}
|
||||||
|
export const queryDevices = () => {
|
||||||
|
let res = {
|
||||||
|
data: [{
|
||||||
|
device_code: '1',
|
||||||
|
device_name: 'JLDFJLLJ',
|
||||||
|
seq_num: '1'
|
||||||
|
}, {
|
||||||
|
device_code: '12',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '13',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '14',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '15',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '16',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '17',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user