退桶任务
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<header class="zd-row">
|
||||
<div class="zd-col-8 zd-row jcflexstart">
|
||||
<div v-if="!type" class="exit_btn" @click="toExit">退出</div>
|
||||
<div v-if="type" class="exit_btn" @click="toBack">返回</div>
|
||||
<div v-if="type === '1'" class="exit_btn" @click="toExit">退出</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 class="zd-col-8 title_1">{{ title }}</div>
|
||||
<div class="zd-col-8">
|
||||
@@ -23,8 +24,8 @@ export default {
|
||||
type: String
|
||||
},
|
||||
type: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -41,11 +42,14 @@ export default {
|
||||
document.msExitFullscreen()
|
||||
}
|
||||
}
|
||||
localStorage.removeItem('keepAlive')
|
||||
this.$router.push('/setup')
|
||||
},
|
||||
toHome () {
|
||||
this.$store.dispatch('delKeepAlive', [])
|
||||
this.$router.push('/home')
|
||||
},
|
||||
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', {
|
||||
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>
|
||||
<div class="contianer">
|
||||
<jxHeader title="工单明细"></jxHeader>
|
||||
<jxHeader type="2" title="工单明细"></jxHeader>
|
||||
<div class="contianer content">
|
||||
<div class="contianer content_wraper">
|
||||
<div class="zd-row filter_wraper">
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<div class="zd-col-6 filter-label">域名地址</div>
|
||||
<input type="text" class="zd-col-18 filter-value" v-model="baseUrl">
|
||||
</div>
|
||||
<div class="zd-row filter-item">
|
||||
<!-- <div class="zd-row filter-item">
|
||||
<div class="zd-col-6 filter-label">刷新时间(秒)</div>
|
||||
<input type="number" class="zd-col-18 filter-value" v-model="setTime">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="zd-row jccenter button-wrap">
|
||||
<button class="button btn-primary" @click="_config">配置</button>
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
setTime: this.setTime * 1000
|
||||
}
|
||||
this.$store.dispatch('setConfig', obj)
|
||||
this.$router.push('/index')
|
||||
this.$router.push('/home')
|
||||
let element = document.documentElement
|
||||
if (!(document.fullscreenElement || document.mozFullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement)) {
|
||||
if (element.requestFullscreen) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="contianer">
|
||||
<jxHeader :type="type" title="配料作业"></jxHeader>
|
||||
<jxHeader type="3" title="配料作业"></jxHeader>
|
||||
<div class="contianer content">
|
||||
<div class="contianer content_wraper">
|
||||
<div class="contianer mgt2 grid_wraper">
|
||||
@@ -57,7 +57,6 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
type: true,
|
||||
timer: null,
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
|
||||
@@ -2,8 +2,10 @@ import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
|
||||
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 Task = r => require.ensure([], () => r(require('@page/task')), 'Task')
|
||||
const CallTask = r => require.ensure([], () => r(require('@page/call-task')), 'CallTask')
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
@@ -16,13 +18,21 @@ export default new Router({
|
||||
path: '/setup',
|
||||
component: Setup
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
component: Index
|
||||
},
|
||||
{
|
||||
path: '/Task',
|
||||
path: '/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 {
|
||||
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
|
||||
_font(.14rem, .34rem, #fff,,center)
|
||||
font-family YouSheBiaoTiHei;
|
||||
|
||||
@@ -13,12 +13,19 @@ const actions = {
|
||||
setKeepAlive ({commit}, res) {
|
||||
setStore('keepAlive', res)
|
||||
commit(types.SET_KEEP_ALIVE, res)
|
||||
},
|
||||
delKeepAlive ({commit}, res) {
|
||||
localStorage.removeItem('keepAlive')
|
||||
commit(types.DEL_KEEP_ALIVE, res)
|
||||
}
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
[types.SET_KEEP_ALIVE] (state, 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 DEL_KEEP_ALIVE = 'DEL_KEEP_ALIVE'
|
||||
export const SET_MATER_ARR = 'SET_MATER_ARR'
|
||||
|
||||
// 数据
|
||||
|
||||
Reference in New Issue
Block a user