退桶任务
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<header class="zd-row">
|
<header class="zd-row">
|
||||||
<div class="zd-col-8 zd-row jcflexstart">
|
<div class="zd-col-8 zd-row jcflexstart">
|
||||||
<div v-if="!type" class="exit_btn" @click="toExit">退出</div>
|
<div v-if="type === '1'" class="exit_btn" @click="toExit">退出</div>
|
||||||
<div v-if="type" class="exit_btn" @click="toBack">返回</div>
|
<div v-if="type === '2'" class="exit_btn" @click="toHome">返回</div>
|
||||||
|
<div v-if="type === '3'" class="exit_btn" @click="toBack">返回</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="zd-col-8 title_1">{{ title }}</div>
|
<div class="zd-col-8 title_1">{{ title }}</div>
|
||||||
<div class="zd-col-8">
|
<div class="zd-col-8">
|
||||||
@@ -23,8 +24,8 @@ export default {
|
|||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: Boolean,
|
type: String,
|
||||||
default: false
|
default: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -41,11 +42,14 @@ export default {
|
|||||||
document.msExitFullscreen()
|
document.msExitFullscreen()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
localStorage.removeItem('keepAlive')
|
|
||||||
this.$router.push('/setup')
|
this.$router.push('/setup')
|
||||||
},
|
},
|
||||||
|
toHome () {
|
||||||
|
this.$store.dispatch('delKeepAlive', [])
|
||||||
|
this.$router.push('/home')
|
||||||
|
},
|
||||||
toBack () {
|
toBack () {
|
||||||
this.$router.back()
|
this.$router.push('/index')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,3 +35,8 @@ export const finishWork = (code) => post('api/pda/finishWork', {
|
|||||||
export const pdaPause = (code) => post('api/pda/pause', {
|
export const pdaPause = (code) => post('api/pda/pause', {
|
||||||
work_code: code
|
work_code: code
|
||||||
})
|
})
|
||||||
|
// 生成退桶任务
|
||||||
|
export const callTask = (scode, ncode) => post('api/pda/callTask', {
|
||||||
|
start_device_code: scode,
|
||||||
|
next_device_code: ncode
|
||||||
|
})
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 439 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB |
BIN
src/images/menu/RF1.png
Normal file
BIN
src/images/menu/RF1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/menu/RF2.png
Normal file
BIN
src/images/menu/RF2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
59
src/pages/call-task.vue
Normal file
59
src/pages/call-task.vue
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<div class="contianer">
|
||||||
|
<jxHeader type="2" title="退桶任务"></jxHeader>
|
||||||
|
<div class="contianer content">
|
||||||
|
<div class="zd-row jccenter contianer">
|
||||||
|
<div class="setup-wrap">
|
||||||
|
<div class="zd-row filter-item">
|
||||||
|
<div class="zd-col-6 filter-label">起 点</div>
|
||||||
|
<input type="text" class="zd-col-18 filter-value" v-model="val1">
|
||||||
|
</div>
|
||||||
|
<div class="zd-row filter-item">
|
||||||
|
<div class="zd-col-6 filter-label">终 点</div>
|
||||||
|
<input type="text" class="zd-col-18 filter-value" v-model="val2">
|
||||||
|
</div>
|
||||||
|
<div class="zd-row jccenter button-wrap">
|
||||||
|
<button class="button btn-primary" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @click="_callTask">生成任务</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import jxHeader from '@components/header.vue'
|
||||||
|
import {callTask} from '@config/getData.js'
|
||||||
|
export default {
|
||||||
|
name: 'index',
|
||||||
|
components: {
|
||||||
|
jxHeader
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
disabled: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _callTask () {
|
||||||
|
this.disabled = true
|
||||||
|
try {
|
||||||
|
let res = await callTask(this.val1, this.val2)
|
||||||
|
this.$message({
|
||||||
|
message: res.message,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.disabled = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
// @import '~@style/mixin'
|
||||||
|
</style>
|
||||||
54
src/pages/home.vue
Normal file
54
src/pages/home.vue
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<div class="contianer">
|
||||||
|
<jxHeader type="1" title="工单明细"></jxHeader>
|
||||||
|
<div class="contianer content">
|
||||||
|
<div class="zd-row jccenter contianer content_wraper">
|
||||||
|
<div class="nav" v-for="(e, i) in menu" :key="i" @click="toPage(e)">
|
||||||
|
<img class="nav_icon" :src="require('../images/menu/' + e.icon + '.png')" alt="e.title" :style="{'background-color': ['#ff814a', '#4982fd'][i]}">
|
||||||
|
<div class="nav_txt">{{ e.title }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import jxHeader from '@components/header.vue'
|
||||||
|
export default {
|
||||||
|
name: 'home',
|
||||||
|
components: {
|
||||||
|
jxHeader
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
menu: [
|
||||||
|
{title: '工单管理', icon: 'RF1', path: 'index'},
|
||||||
|
{title: '退桶任务', icon: 'RF2', path: 'calltask'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toPage (e) {
|
||||||
|
if (e.path === 'index') {
|
||||||
|
this.$store.dispatch('setKeepAlive', [e.path])
|
||||||
|
}
|
||||||
|
this.$router.push('/' + e.path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '~@style/mixin'
|
||||||
|
.nav
|
||||||
|
width 25%
|
||||||
|
padding 0 2%
|
||||||
|
.nav_icon
|
||||||
|
display block
|
||||||
|
max-width 90px
|
||||||
|
border-radius 10%
|
||||||
|
margin 0 auto
|
||||||
|
.nav_txt
|
||||||
|
_font(.4rem, .4rem, #fff,,center)
|
||||||
|
margin-top .6rem
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contianer">
|
<div class="contianer">
|
||||||
<jxHeader title="工单明细"></jxHeader>
|
<jxHeader type="2" title="工单明细"></jxHeader>
|
||||||
<div class="contianer content">
|
<div class="contianer content">
|
||||||
<div class="contianer content_wraper">
|
<div class="contianer content_wraper">
|
||||||
<div class="zd-row filter_wraper">
|
<div class="zd-row filter_wraper">
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
<div class="zd-col-6 filter-label">域名地址</div>
|
<div class="zd-col-6 filter-label">域名地址</div>
|
||||||
<input type="text" class="zd-col-18 filter-value" v-model="baseUrl">
|
<input type="text" class="zd-col-18 filter-value" v-model="baseUrl">
|
||||||
</div>
|
</div>
|
||||||
<div class="zd-row filter-item">
|
<!-- <div class="zd-row filter-item">
|
||||||
<div class="zd-col-6 filter-label">刷新时间(秒)</div>
|
<div class="zd-col-6 filter-label">刷新时间(秒)</div>
|
||||||
<input type="number" class="zd-col-18 filter-value" v-model="setTime">
|
<input type="number" class="zd-col-18 filter-value" v-model="setTime">
|
||||||
</div>
|
</div> -->
|
||||||
<div class="zd-row jccenter button-wrap">
|
<div class="zd-row jccenter button-wrap">
|
||||||
<button class="button btn-primary" @click="_config">配置</button>
|
<button class="button btn-primary" @click="_config">配置</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
setTime: this.setTime * 1000
|
setTime: this.setTime * 1000
|
||||||
}
|
}
|
||||||
this.$store.dispatch('setConfig', obj)
|
this.$store.dispatch('setConfig', obj)
|
||||||
this.$router.push('/index')
|
this.$router.push('/home')
|
||||||
let element = document.documentElement
|
let element = document.documentElement
|
||||||
if (!(document.fullscreenElement || document.mozFullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement)) {
|
if (!(document.fullscreenElement || document.mozFullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement)) {
|
||||||
if (element.requestFullscreen) {
|
if (element.requestFullscreen) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contianer">
|
<div class="contianer">
|
||||||
<jxHeader :type="type" title="配料作业"></jxHeader>
|
<jxHeader type="3" title="配料作业"></jxHeader>
|
||||||
<div class="contianer content">
|
<div class="contianer content">
|
||||||
<div class="contianer content_wraper">
|
<div class="contianer content_wraper">
|
||||||
<div class="contianer mgt2 grid_wraper">
|
<div class="contianer mgt2 grid_wraper">
|
||||||
@@ -57,7 +57,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
type: true,
|
|
||||||
timer: null,
|
timer: null,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ import Vue from 'vue'
|
|||||||
import Router from 'vue-router'
|
import Router from 'vue-router'
|
||||||
|
|
||||||
const Setup = r => require.ensure([], () => r(require('@page/setup')), 'Setup')
|
const Setup = r => require.ensure([], () => r(require('@page/setup')), 'Setup')
|
||||||
|
const Home = r => require.ensure([], () => r(require('@page/home')), 'Home')
|
||||||
const Index = r => require.ensure([], () => r(require('@page/index')), 'Index')
|
const Index = r => require.ensure([], () => r(require('@page/index')), 'Index')
|
||||||
const Task = r => require.ensure([], () => r(require('@page/task')), 'Task')
|
const Task = r => require.ensure([], () => r(require('@page/task')), 'Task')
|
||||||
|
const CallTask = r => require.ensure([], () => r(require('@page/call-task')), 'CallTask')
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
export default new Router({
|
export default new Router({
|
||||||
@@ -16,13 +18,21 @@ export default new Router({
|
|||||||
path: '/setup',
|
path: '/setup',
|
||||||
component: Setup
|
component: Setup
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/home',
|
||||||
|
component: Home
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/index',
|
path: '/index',
|
||||||
component: Index
|
component: Index
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/Task',
|
path: '/task',
|
||||||
component: Task
|
component: Task
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/calltask',
|
||||||
|
component: CallTask
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -238,23 +238,6 @@ header
|
|||||||
.el-message-box__title, .el-message-box__headerbtn .el-message-box__close, .el-message-box__content {
|
.el-message-box__title, .el-message-box__headerbtn .el-message-box__close, .el-message-box__content {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.l-wrap
|
|
||||||
_wh(calc(100% - 740px), 100%)
|
|
||||||
overflow auto
|
|
||||||
.r-wrap
|
|
||||||
_wh(733px, 100%)
|
|
||||||
background: center / 100% 100% url('~@/images/item_2_bg.png') no-repeat;
|
|
||||||
.item-wrap
|
|
||||||
width 100%
|
|
||||||
padding 0.12rem 0.1rem 0.12rem 0.1rem
|
|
||||||
margin-top .05rem
|
|
||||||
background: center/ 100% 100% url('~@/images/item_bg_1.png') no-repeat;
|
|
||||||
.list-wrap
|
|
||||||
_wh(100%, calc(100% - 5.25rem))
|
|
||||||
min-height 1.6rem
|
|
||||||
padding 0.1rem 0.12rem
|
|
||||||
background: center/ 100% 100% url('~@/images/item_bg_1.png') no-repeat;
|
|
||||||
// background-color rgb(16, 38, 105)
|
|
||||||
.scroll-tab
|
.scroll-tab
|
||||||
_font(.14rem, .34rem, #fff,,center)
|
_font(.14rem, .34rem, #fff,,center)
|
||||||
font-family YouSheBiaoTiHei;
|
font-family YouSheBiaoTiHei;
|
||||||
|
|||||||
@@ -13,12 +13,19 @@ const actions = {
|
|||||||
setKeepAlive ({commit}, res) {
|
setKeepAlive ({commit}, res) {
|
||||||
setStore('keepAlive', res)
|
setStore('keepAlive', res)
|
||||||
commit(types.SET_KEEP_ALIVE, res)
|
commit(types.SET_KEEP_ALIVE, res)
|
||||||
|
},
|
||||||
|
delKeepAlive ({commit}, res) {
|
||||||
|
localStorage.removeItem('keepAlive')
|
||||||
|
commit(types.DEL_KEEP_ALIVE, res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
[types.SET_KEEP_ALIVE] (state, res) {
|
[types.SET_KEEP_ALIVE] (state, res) {
|
||||||
state.keepAlive = res
|
state.keepAlive = res
|
||||||
|
},
|
||||||
|
[types.DEL_KEEP_ALIVE] (state, res) {
|
||||||
|
state.keepAlive = res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const SAVE_TOKEN = 'SAVE_TOKEN'
|
|||||||
|
|
||||||
// 缓存页面
|
// 缓存页面
|
||||||
export const SET_KEEP_ALIVE = 'SET_KEEP_ALIVE'
|
export const SET_KEEP_ALIVE = 'SET_KEEP_ALIVE'
|
||||||
|
export const DEL_KEEP_ALIVE = 'DEL_KEEP_ALIVE'
|
||||||
export const SET_MATER_ARR = 'SET_MATER_ARR'
|
export const SET_MATER_ARR = 'SET_MATER_ARR'
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
|
|||||||
Reference in New Issue
Block a user