需求修改

This commit is contained in:
蔡玲
2024-09-11 15:45:45 +08:00
parent 0b9ab4532c
commit 11c685a9bb
12 changed files with 299 additions and 351 deletions

View File

@@ -1,6 +1,5 @@
import App from './App'
import Vue from 'vue'
import i18n from './locale/index.js'
Vue.config.productionTip = false
App.mpType = 'app'
@@ -29,7 +28,6 @@ Vue.directive('enterNumber', {
import store from '@/vuex/store.js'
const app = new Vue({
i18n,
...App,
store
})

View File

@@ -117,5 +117,5 @@
"base" : "./"
}
},
"locale" : "ko"
"locale" : "zh-Hans"
}

View File

@@ -1,15 +1,15 @@
<template>
<view class="home_wraper">
<view class="zd_content">
<view class="header">{{$t('home.title')}}</view>
<view class="header">首页</view>
<view class="userInfo-wrap">
<view class="userInfo">
<text v-if="userName !== ''" class="p1">{{userName}}</text>
<text class="p2">{{$t('home.message')}}</text>
<text class="p2">欢迎进入喜临门acs系统</text>
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">{{$t('home.exit')}}</view>
<view class="exit-text">退出</view>
</view>
</view>
<view class="zd_home_wrapper">
@@ -32,11 +32,11 @@
return {
userName: '',
menuList: [
{id: 1, title: this.$t('title.call'), icon: 'RF01', path: '/pages/manage/call-manage'},
{id: 2, title: this.$t('title.command'), icon: 'RF02', path: '/pages/manage/inst-manage'},
{id: 3, title: this.$t('title.task'), icon: 'RF03', path: '/pages/manage/task-manage'},
{id: 4, title: this.$t('cancel-charging-task'), icon: 'RF05', path: '/pages/manage/cancel-charge-task'}
// {id: 4, title: this.$t('title.release-confirm'), icon: 'RF04', path: '/pages/manage/release-confirm'}
{id: 1, title: '呼叫管理', icon: 'RF01', path: '/pages/manage/call-manage'},
{id: 2, title: '指令管理', icon: 'RF02', path: '/pages/manage/inst-manage'},
{id: 3, title: '任务管理', icon: 'RF03', path: '/pages/manage/task-manage'},
{id: 4, title: '取消充电任务', icon: 'RF05', path: '/pages/manage/cancel-charge-task'}
// {id: 4, title: '放货确认', icon: 'RF04', path: '/pages/manage/release-confirm'}
],
show: false,
secM: []

View File

@@ -1,23 +1,23 @@
<template>
<view class="zd_content bg">
<view class="p1">{{$t('login.text1')}}</view>
<view class="p2">{{$t('login.text2')}}</view>
<view class="p1">欢迎来到</view>
<view class="p2">喜临门acs系统</view>
<view class="input-box">
<input class="large-input" type="text" :placeholder="$t('login.username')" v-model="user">
<input class="large-input" type="text" placeholder="用户名" v-model="user">
</view>
<div class="input-box">
<input class="large-input" :password="!showPassword" :placeholder="$t('login.password')" v-model="password" autocomplete=off>
<input class="large-input" :password="!showPassword" placeholder="密码" v-model="password" autocomplete=off>
<uni-icons :type="showPassword ? 'eye-filled' : 'eye'" size="20" :color="showPassword ? '#ff6a00' : '#999'" @tap="showPassword = !showPassword"></uni-icons>
</div>
<view class="zd-row radio-box">
<view class="zd-col-2 zd-row jccenter radio-icon-wrap" :class="{'radio-icon-wrap_checked': saveUser}" @tap="toSaveUser">
<uni-icons type="checkmarkempty" size="14" :color="saveUser ? '#ff6a00' : '#fff'"></uni-icons>
</view>
<view class="zd-col-10 radio-label">{{$t('login.remember')}}</view>
<view class="zd-col-4 setup-text" @tap="setup">{{$t('login.settings')}}</view>
<view class="zd-col-8 setup-text" @tap="isUpdate">{{$t('login.upgrade')}}</view>
<view class="zd-col-10 radio-label">记住用户名</view>
<view class="zd-col-4 setup-text" @tap="setup">设置</view>
<view class="zd-col-8 setup-text" @tap="isUpdate">升级版本</view>
</view>
<button class="login-btn" :disabled="disabled" @tap="toLogin">{{$t('login.login')}}</button>
<button class="login-btn" :disabled="disabled" @tap="toLogin">登录</button>
<view v-if="version !== ''" class="version-name">v{{version}}</view>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
</view>

View File

@@ -1,23 +1,16 @@
<template>
<view class="zd_container">
<nav-bar :title="$t('login.settings')" :inner2="true" @goIn="goIn" :show1="false"></nav-bar>
<nav-bar title="设置" :inner2="true" @goIn="goIn" :show1="false"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="input-wrap">
<view class="input-label">{{$t('setting.language')}}</view>
<view class="select_wrap">
<uni-data-select v-model="index1" :localdata="options1" :clear="false"
@change="selectChange1"></uni-data-select>
</view>
</view>
<view class="input-wrap">
<view class="input-label">{{$t('setting.server')}}</view>
<view class="input-label">服务器地址</view>
<input type="text" class="setup-input" v-model="addrip">
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-22 button-primary" @click="_submit">{{$t('button.confirm')}}</button>
<button class="zd-col-22 button-primary" @click="_submit">确定</button>
</view>
</view>
</template>
@@ -30,48 +23,15 @@
},
data() {
return {
addrip: this.$store.getters.baseUrl,
options1: [{text: '中文',value: 'zh-Hans'}, {text: 'English', value: 'en'}, {text: '한국어', value: 'ko'}],
index1: '',
systemLocale: '',
applicationLocale: ''
addrip: this.$store.getters.baseUrl
};
},
onLoad() {
let systemInfo = uni.getSystemInfoSync();
this.systemLocale = systemInfo.language;
this.applicationLocale = uni.getLocale();
this.index1 = this.applicationLocale.split('-')[0]
this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
uni.onLocaleChange((e) => {
this.applicationLocale = e.locale;
})
},
methods: {
onLocaleChange(e) {
if (this.isAndroid) {
uni.showModal({
content: this.$t('setting.language-change-confirm'),
success: (res) => {
if (res.confirm) {
uni.setLocale(e);
}
}
})
} else {
uni.setLocale(e);
this.$i18n.locale = e;
}
},
goIn () {
uni.redirectTo({
url: '/pages/login/login'
})
},
selectChange1(e) {
this.onLocaleChange(e)
this.index1 = e
},
_submit () {
if (this.addrip === '') {
uni.showToast({
@@ -97,13 +57,13 @@
margin 20rpx 0
_fj()
.input-label
_wh(210rpx, 80rpx)
_wh(190rpx, 80rpx)
_font(28rpx,80rpx,#464646)
text-align:justify;
text-align-last: justify;
text-justify: inter-ideograph;/*兼容ie*/
.setup-input
_wh(calc(100% - 220rpx), 80rpx)
_wh(calc(100% - 240rpx), 80rpx)
background #fff
border: 1px solid #dcdfe6;
border-radius: 10rpx;

View File

@@ -2,14 +2,14 @@
<view class="mask flex-center">
<view class="content botton-radius">
<view class="content-top">
<text class="content-top-text">{{$t('upgrade.new-version')}}</text>
<text class="content-top-text">发现新版本</text>
<image class="content-top" style="top: 0;" width="100%" height="100%" src="../../static/image/bg_top.png">
</image>
</view>
<view class="content-header"></view>
<view class="content-body">
<view class="title">
<text>{{$t('upgrade.text1')}}</text>
<text>喜临门acs系统又有新版本了升级到最新版本享受更丰富稳定快速的功能和体验</text>
</view>
<view class="footer flex-center">
<template>
@@ -17,11 +17,11 @@
<view class="progress-box flex-column" v-if="downloading">
<progress class="progress" border-radius="35" :percent="downLoadPercent" activeColor="#3DA7FF" show-info stroke-width="10" />
<view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;">
<text>{{$t('upgrade.text2')}}</text>
<text>安装包下载中请稍后</text>
<text>({{downloadedSize}}/{{packageFileSize}}M)</text>
</view>
</view>
<button v-else class="content-button" style="border: none;color: #fff;" plain @click="updateApp">{{$t('upgrade.upgrade-now')}}</button>
<button v-else class="content-button" style="border: none;color: #fff;" plain @click="updateApp">立即升级</button>
</template>
</template>
</view>

View File

@@ -1,34 +1,72 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<!-- <view class="zd-row jcflexstart state-wrap">
<view class="zd-col-4 zd-row jcflexstart" v-for="e in state">
<view class="state-color" :class="e.color"></view>
<view class="state-name">{{e.name}}</view>
</view>
</view> -->
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row mgb20 border-bottom">
<uni-icons type="arrow-up" size="18" color="#ff6a00"></uni-icons>
<view class="zd-col-6 filter_label">{{$t('call.sp')}}</view>
<view class="zd-col-6 filter_label">任务起点</view>
<view class="zd-col-18 relative">
<input type="text" class="filter_input" v-model="sCode">
<input type="text" class="filter_input" v-model="sCode" @input="matchData(1)">
<view v-if="filterNo ===1 && filteredData.length" class="filter_select_wraper">
<view class="filter_select_item" v-for="(e, i) in filteredData" :key="'ul'+ i" @tap.stop="sCode = e.device_code,filteredData = []">{{e.device_code}}</view>
</view>
</view>
</view>
<view class="zd-row">
<uni-icons type="arrow-down" size="18" color="#ff6a00"></uni-icons>
<view class="zd-col-6 filter_label">{{$t('call.ep')}}</view>
<view class="zd-col-6 filter_label">任务终点</view>
<view class="zd-col-18 relative">
<input type="text" class="filter_input" v-model="nCode">
<input type="text" class="filter_input" v-model="nCode" @input="matchData(2)">
<view v-if="filterNo ===2 && filteredData.length" class="filter_select_wraper">
<view class="filter_select_item" v-for="(e, i) in filteredData" :key="'ul'+ i" @tap.stop="nCode = e.device_code,filteredData = []">{{e.device_code}}</view>
</view>
</view>
</view>
</view>
<view class="zd_wrapper">
<view class="allwidth" v-for="e in areaArr" :key="e.region_code">
<view class="zd-row" @click="getPonit(e)">
<view class="title_locate">{{e.region_name}}</view>
<uni-icons :type="pkId === e.region_code ? 'up' : 'down'" size="16"></uni-icons>
</view>
<view v-if="pkId === e.region_code" class="zd-row flexstart flexwrap">
<view class="zd-col-12 site_item" v-for="(el, index) in pointArr" :key="index">
<view class="site_item_box" :class="{'isChecked': el.device_code === sCode || el.device_code === nCode}" :id="'site_item_box_'+ index" @click="setcode(el,index)">
<view class="point_title_1">{{el.device_name}}</view>
<view class="point_title_2">{{el.device_code}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="toSure('1')">{{$t('button.handtask')}}</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="toCharge">{{$t('charging-task')}}</button>
<button class="zd-col-11 button-default" @click="cancle">取消</button>
<button class="zd-col-11 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('3')">搬运任务</button>
</view>
<view class="pop_point_wrap" :style="{top: distanceToTop + 'px',left: distanceToLeft + 'px'}">
<view class="zd-row jccenter">
<uni-icons type="map-pin-ellipse" size="18" color="#fff"></uni-icons>
</view>
<view class="zd-row pop_point_content" :class="{'pop_point_content_up': this.popup}">
<view class="zd-col-11 item-font-6 bggreen" @tap="popCode(1)">任务起点</view>
<view class="zd-col-11 item-font-6 bgblue" @tap="popCode(2)">任务终点</view>
</view>
</view>
<view v-if="show" class="msg_mask" @tap="colsePop"></view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {queryArea, queryPointByArea, callTask, taskCharge} from '@/utils/getData2.js'
import {queryArea, queryPointByArea, callTask} from '@/utils/getData2.js'
export default {
components: {
NavBar
@@ -36,65 +74,152 @@
data() {
return {
title: '',
areaArr: [],
pointArr: [],
pkId: '',
disabled: false,
sCode: 'QFQ_2',
nCode: 'QFQ_4'
code: '',
sCode: '',
nCode: '',
show: false,
distanceToTop: -300,
distanceToLeft: -300,
windowHeight: '',
popHeight: '',
filteredData: [],
filterNo: '',
popup: false
};
},
onLoad (options) {
this.title = options.title
uni.getSystemInfo({
success: (info) => {
this.windowHeight = info.windowHeight
}
})
},
onReady () {
const query = uni.createSelectorQuery().in(this)
query
.select('.pop_point_content')
.boundingClientRect(data => {
this.popHeight = data.height
}).exec()
},
created () {
this.initArea()
},
methods: {
toSure (type) {
this.disabled = true
uni.showModal({
title: this.$t('warning'),
cancelText: this.$t('button.cancel'),
confirmText: this.$t('button.confirm'),
content: this.$t('toast.command-reissue'),
success: (res) => {
if (res.confirm) {
this._callTask(type)
} else if (res.cancel) {
this.disabled = false
matchData (no) {
this.filterNo = no
let query = ''
switch (no) {
case 1:
query = this.sCode.toLowerCase()
break
case 2:
query = this.nCode.toLowerCase()
break
default:
break
}
if (!query) {
this.filteredData = []
return
}
this.filteredData = this.pointArr.filter(item => {
return item.device_code.toLowerCase().includes(query)
})
},
async initArea () {
let res = await queryArea()
this.areaArr = [...res.data]
if (this.areaArr.length > 0) {
this.pkId = this.areaArr[0].region_code
this.initPonit()
}
},
getPonit (e) {
this.pkId = this.pkId === e.region_code ? '' : e.region_code
if (this.pkId) {
this.initPonit()
}
},
async initPonit () {
let res = await queryPointByArea(this.pkId)
this.pointArr = [...res.data]
},
setcode (el,index) {
const query = uni.createSelectorQuery().in(this)
query
.select(`#site_item_box_${index}`)
.boundingClientRect(data => {
if (data) {
this.distanceToTop = data.top + (data.height / 2) - 9
this.distanceToLeft = data.left
console.log(this.popHeight)
if ((this.windowHeight - this.distanceToTop) < (this.popHeight + 20)) {
this.popup = true
} else {
this.popup = false
}
}
}).exec()
this.show = true
this.code = el.device_code
},
colsePop () {
this.show = !this.show
if (!this.show) {
this.distanceToTop = -300
this.distanceToLeft = -300
}
},
popCode (code) {
switch (code) {
case 1:
this.sCode = this.code
break
case 2:
this.nCode = this.code
break
default:
break
}
this.colsePop()
},
/** 清空点位选择 */
cancle () {
this.sCode = ''
this.nCode = ''
this.disabled = false
},
async _callTask (type) {
try {
let res = await callTask(this.sCode, this.nCode, type)
this.disabled = true
if (this.sCode === '' || this.nCode === '') {
this.disabled = false
return
}
if (this.sCode === this.nCode) {
uni.showToast({
title: res.message,
title: '任务起点终点不能相同',
icon: 'none'
})
} catch (err) {
this.disabled = false
return
}
},
toCharge () {
this.disabled = true
uni.showModal({
title: this.$t('warning'),
cancelText: this.$t('button.cancel'),
confirmText: this.$t('button.confirm'),
content: this.$t('toast.charging-task'),
success: (res) => {
if (res.confirm) {
this._taskCharge()
} else if (res.cancel) {
this.disabled = false
}
}
})
},
async _taskCharge () {
try {
let res = await taskCharge()
this.disabled = false
let res = await callTask(this.sCode, this.nCode, type)
this.cancle()
clearInterval(this.timer)
this.timer = null
setTimeout(() => {
this.refresh()
this.cancle()
}, 2000)
uni.showToast({
title: res.message,
title: res.desc,
icon: 'none'
})
} catch (err) {

View File

@@ -1,76 +1,34 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<!-- <view class="zd-row jcflexstart state-wrap">
<view class="zd-col-4 zd-row jcflexstart" v-for="e in state">
<view class="state-color" :class="e.color"></view>
<view class="state-name">{{e.name}}</view>
</view>
</view> -->
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row mgb20 border-bottom">
<uni-icons type="arrow-up" size="18" color="#ff6a00"></uni-icons>
<view class="zd-col-6 filter_label">{{$t('call.sp')}}</view>
<view class="zd-col-6 filter_label">任务起点</view>
<view class="zd-col-18 relative">
<input type="text" class="filter_input" v-model="sCode" @input="matchData(1)">
<view v-if="filterNo ===1 && filteredData.length" class="filter_select_wraper">
<view class="filter_select_item" v-for="(e, i) in filteredData" :key="'ul'+ i" @tap.stop="sCode = e.device_code,filteredData = []">{{e.device_code}}</view>
</view>
<input type="text" class="filter_input" v-model="sCode">
</view>
</view>
<view class="zd-row">
<uni-icons type="arrow-down" size="18" color="#ff6a00"></uni-icons>
<view class="zd-col-6 filter_label">{{$t('call.ep')}}</view>
<view class="zd-col-6 filter_label">任务终点</view>
<view class="zd-col-18 relative">
<input type="text" class="filter_input" v-model="nCode" @input="matchData(2)">
<view v-if="filterNo ===2 && filteredData.length" class="filter_select_wraper">
<view class="filter_select_item" v-for="(e, i) in filteredData" :key="'ul'+ i" @tap.stop="nCode = e.device_code,filteredData = []">{{e.device_code}}</view>
</view>
</view>
</view>
</view>
<view class="zd_wrapper">
<view class="allwidth" v-for="e in areaArr" :key="e.region_code">
<view class="zd-row" @click="getPonit(e)">
<view v-if="$i18n.locale === 'en'" class="title_locate">{{e.en_region_name}}</view>
<view v-if="$i18n.locale === 'ko'" class="title_locate">{{e.ko_region_name}}</view>
<view v-if="$i18n.locale === 'zh-Hans'" class="title_locate">{{e.region_name}}</view>
<uni-icons :type="pkId === e.region_code ? 'up' : 'down'" size="16"></uni-icons>
</view>
<view v-if="pkId === e.region_code" class="zd-row flexstart flexwrap">
<view class="zd-col-12 site_item" v-for="(el, index) in pointArr" :key="index">
<view class="site_item_box" :class="{'isChecked': el.device_code === sCode || el.device_code === nCode}" :id="'site_item_box_'+ index" @click="setcode(el,index)">
<view v-if="$i18n.locale === 'en'" class="point_title_1">{{el.en_device_name}}</view>
<view v-if="$i18n.locale === 'ko'" class="point_title_1">{{el.ko_device_name}}</view>
<view v-if="$i18n.locale === 'zh-Hans'" class="point_title_1">{{el.device_name}}</view>
<view class="point_title_2">{{el.device_code}}</view>
</view>
</view>
<input type="text" class="filter_input" v-model="nCode">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @click="cancle">{{$t('button.cancel')}}</button>
<button class="zd-col-11 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('3')">{{$t('button.handtask')}}</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="toSure('1')">搬运任务</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="toCharge">充电任务</button>
</view>
<view class="pop_point_wrap" :style="{top: distanceToTop + 'px',left: distanceToLeft + 'px'}">
<view class="zd-row jccenter">
<uni-icons type="map-pin-ellipse" size="18" color="#fff"></uni-icons>
</view>
<view class="zd-row pop_point_content" :class="{'pop_point_content_up': this.popup}">
<view class="zd-col-11 item-font-6 bggreen" @tap="popCode(1)">{{$t('call.sp')}}</view>
<view class="zd-col-11 item-font-6 bgblue" @tap="popCode(2)">{{$t('call.ep')}}</view>
</view>
</view>
<view v-if="show" class="msg_mask" @tap="colsePop"></view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {queryArea, queryPointByArea, callTask} from '@/utils/getData2.js'
import {queryArea, queryPointByArea, callTask, taskCharge} from '@/utils/getData2.js'
export default {
components: {
NavBar
@@ -78,153 +36,65 @@
data() {
return {
title: '',
areaArr: [],
pointArr: [],
pkId: '',
disabled: false,
code: '',
sCode: '',
nCode: '',
show: false,
distanceToTop: -300,
distanceToLeft: -300,
windowHeight: '',
popHeight: '',
filteredData: [],
filterNo: '',
popup: false
sCode: 'QFQ_2',
nCode: 'QFQ_4'
};
},
onLoad (options) {
this.title = options.title
uni.getSystemInfo({
success: (info) => {
this.windowHeight = info.windowHeight
}
})
},
onReady () {
const query = uni.createSelectorQuery().in(this)
query
.select('.pop_point_content')
.boundingClientRect(data => {
this.popHeight = data.height
}).exec()
},
created () {
this.initArea()
},
methods: {
matchData (no) {
this.filterNo = no
let query = ''
switch (no) {
case 1:
query = this.sCode.toLowerCase()
break
case 2:
query = this.nCode.toLowerCase()
break
default:
break
}
if (!query) {
this.filteredData = []
return
}
this.filteredData = this.pointArr.filter(item => {
return item.device_code.toLowerCase().includes(query)
})
},
async initArea () {
let res = await queryArea()
this.areaArr = [...res.data]
if (this.areaArr.length > 0) {
this.pkId = this.areaArr[0].region_code
this.initPonit()
}
},
getPonit (e) {
this.pkId = this.pkId === e.region_code ? '' : e.region_code
if (this.pkId) {
this.initPonit()
}
},
async initPonit () {
let res = await queryPointByArea(this.pkId)
this.pointArr = [...res.data]
},
setcode (el,index) {
const query = uni.createSelectorQuery().in(this)
query
.select(`#site_item_box_${index}`)
.boundingClientRect(data => {
if (data) {
this.distanceToTop = data.top + (data.height / 2) - 9
this.distanceToLeft = data.left
console.log(this.popHeight)
if ((this.windowHeight - this.distanceToTop) < (this.popHeight + 20)) {
this.popup = true
} else {
this.popup = false
}
}
}).exec()
this.show = true
this.code = el.device_code
},
colsePop () {
this.show = !this.show
if (!this.show) {
this.distanceToTop = -300
this.distanceToLeft = -300
}
},
popCode (code) {
switch (code) {
case 1:
this.sCode = this.code
break
case 2:
this.nCode = this.code
break
default:
break
}
this.colsePop()
},
/** 清空点位选择 */
cancle () {
this.sCode = ''
this.nCode = ''
toSure (type) {
this.disabled = true
uni.showModal({
title: '提示',
cancelText: '取消',
confirmText: '确定',
content: '是否需要下发?',
success: (res) => {
if (res.confirm) {
this._callTask(type)
} else if (res.cancel) {
this.disabled = false
}
}
})
},
async _callTask (type) {
this.disabled = true
if (this.sCode === '' || this.nCode === '') {
this.disabled = false
return
}
if (this.sCode === this.nCode) {
uni.showToast({
// title: '任务起点终点不能相同',
title: this.$t('call.toast'),
icon: 'none'
})
this.disabled = false
return
}
try {
let res = await callTask(this.sCode, this.nCode, type)
this.cancle()
clearInterval(this.timer)
this.timer = null
setTimeout(() => {
this.refresh()
this.cancle()
}, 2000)
this.disabled = false
uni.showToast({
title: res.desc,
title: res.message,
icon: 'none'
})
} catch (err) {
this.disabled = false
}
},
toCharge () {
this.disabled = true
uni.showModal({
title: '提示',
cancelText: '取消',
confirmText: '确定',
content: '是否需要充电?',
success: (res) => {
if (res.confirm) {
this._taskCharge()
} else if (res.cancel) {
this.disabled = false
}
}
})
},
async _taskCharge () {
try {
let res = await taskCharge()
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (err) {

View File

@@ -7,7 +7,7 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-22 button-primary" :disabled="disabled" @tap="_cancleTaskCharge">{{$t('cancel-charging-task')}}</button>
<button class="zd-col-22 button-primary" :disabled="disabled" @tap="_cancleTaskCharge">取消充电任务</button>
</view>
</view>
</template>

View File

@@ -15,16 +15,16 @@
<table>
<thead>
<tr>
<th>{{$t('command.task-number')}}</th>
<th>{{$t('command.number')}}</th>
<th>{{$t('startequip')}}</th>
<th>{{$t('targetquip')}}</th>
<th>{{$t('state')}}</th>
<th>{{$t('command.vnumber')}}</th>
<th>{{$t('command.carcode')}}</th>
<th>{{$t('command.steps')}}</th>
<th>{{$t('command.priority')}}</th>
<th>{{$t('time')}}</th>
<th>任务号</th>
<th>指令号</th>
<th>起始设备</th>
<th>目标设备</th>
<th>状态</th>
<th>载具号</th>
<th>agv车号</th>
<th>指令执行步骤</th>
<th>优先级</th>
<th>时间</th>
</tr>
</thead>
<tbody>
@@ -33,7 +33,7 @@
<td>{{e.instruction_code}}</td>
<td>{{e.start_devicecode}}</td>
<td>{{e.next_devicecode}}</td>
<td>{{[$t('ready'), $t('progress'), $t('complete'), $t('cancel')][Number(e.inst_status)]}}</td>
<td>{{['就绪', '执行中', '完成', '取消'][Number(e.inst_status)]}}</td>
<td>{{e.carrier}}</td>
<td>{{e.carno}}</td>
<td>{{e.inst_step}}</td>
@@ -46,15 +46,15 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('1')">{{$t('command.revocation')}}</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('2')">{{$t('command.reissue')}}</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('3')">{{$t('command.forced')}}</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('1')">指令撤销</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('2')">重新下发</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('3')">强制完成</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="msg_content">
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">{{$t('keyword')}}</span>
<span class="filter_label">关键字</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input" v-model="val1">
@@ -62,7 +62,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">{{$t('startequip')}}</span>
<span class="filter_label">起始设备</span>
</view>
<view class="zd-col-17">
<search-box
@@ -72,7 +72,7 @@
</view>
<view class="zd-row">
<view class="zd-col-6">
<span class="filter_label">{{$t('targetquip')}}</span>
<span class="filter_label">目标设备</span>
</view>
<view class="zd-col-17">
<search-box
@@ -82,9 +82,9 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap.stop="show = false">{{$t('button.cancel')}}</button>
<button class="zd-col-7 button-default" @tap.stop="clearUp">{{$t('button.empty')}}</button>
<button class="zd-col-7 button-primary" @tap="_handInsts">{{$t('button.search')}}</button>
<button class="zd-col-7 button-default" @tap.stop="show = false">取消</button>
<button class="zd-col-7 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-7 button-primary" @tap="_handInsts">查询</button>
</view>
</view>
<view v-if="show" class="msg_mask"></view>
@@ -103,7 +103,7 @@
data() {
return {
show: false,
state: [{id:'-1', text: this.$t('whole')}, {id:'0', text: this.$t('ready')}, {id:'1', text: this.$t('progress')}, {id:'2', text: this.$t('complete')}, {id:'3', text: this.$t('cancel')}],
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}, {id:'2', text: '完成'}, {id:'3', text: '取消'}],
tab: '-1',
title: '',
val1: '',

View File

@@ -5,7 +5,7 @@
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">{{$t('filter.point')}}</span>
<span class="filter_label">点位</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="code" disabled>
@@ -14,8 +14,8 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @click="cancle">{{$t('button.cancel')}}</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_updateTask('1')">{{$t('take-and-place')}}</button>
<button class="zd-col-11 button-default" @click="cancle">取消</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_updateTask('1')">允许取放</button>
</view>
</view>
</template>

View File

@@ -15,26 +15,21 @@
<table>
<thead>
<tr>
<th>{{$t('command.task-number')}}</th>
<th>{{$t('startequip')}}</th>
<th>{{$t('targetquip')}}</th>
<th>{{$t('state')}}</th>
<th>{{$t('command.vnumber')}}</th>
<th>{{$t('command.priority')}}</th>
<th>{{$t('time')}}</th>
<th>任务号</th>
<th>起始设备</th>
<th>目标设备</th>
<th>状态</th>
<th>载具号</th>
<th>优先级</th>
<th>时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_uuid === pkId}">
<td>{{e.task_no}}</td>
<td v-if="$i18n.locale === 'en'">{{e.start_en_devicecode}}</td>
<td v-if="$i18n.locale === 'ko'">{{e.start_ko_devicecode}}</td>
<td v-if="$i18n.locale === 'zh-Hans'">{{e.start_devicecode}}</td>
<td v-if="$i18n.locale === 'en'">{{e.next_en_devicecode}}</td>
<td v-if="$i18n.locale === 'ko'">{{e.next_ko_devicecode}}</td>
<td v-if="$i18n.locale === 'zh-Hans'">{{e.next_devicecode}}</td>
<td>{{[$t('ready'), $t('progress'), $t('complete')][Number(e.task_status)]}}</td>
<td>{{e.start_devicecode}}</td>
<td>{{e.next_devicecode}}</td>
<td>{{['就绪', '执行中', '完成'][Number(e.task_status)]}}</td>
<td>{{e.carrier}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
@@ -45,14 +40,14 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('1')">{{$t('regenerate')}}</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('2')">{{$t('forced-completion')}}</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('1')">重新生成</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('2')">强制完成</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="msg_content">
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">{{$t('keyword')}}</span>
<span class="filter_label">关键字</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input" v-model="val1">
@@ -60,7 +55,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">{{$t('startequip')}}</span>
<span class="filter_label">起始设备</span>
</view>
<view class="zd-col-17">
<search-box
@@ -70,7 +65,7 @@
</view>
<view class="zd-row">
<view class="zd-col-6">
<span class="filter_label">{{$t('targetquip')}}</span>
<span class="filter_label">目标设备</span>
</view>
<view class="zd-col-17">
<search-box
@@ -80,9 +75,9 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap.stop="show = false">{{$t('button.cancel')}}</button>
<button class="zd-col-7 button-default" @tap.stop="clearUp">{{$t('button.empty')}}</button>
<button class="zd-col-7 button-primary" @tap="_handTasks">{{$t('button.search')}}</button>
<button class="zd-col-7 button-default" @tap.stop="show = false">取消</button>
<button class="zd-col-7 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-7 button-primary" @tap="_handTasks">查询</button>
</view>
</view>
<view v-if="show" class="msg_mask"></view>
@@ -101,7 +96,7 @@
data() {
return {
show: false,
state: [{id:'-1', text: this.$t('whole')}, {id:'0', text: this.$t('ready')}, {id:'1', text: this.$t('progress')}, {id:'2', text: this.$t('complete')}],
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}, {id:'2', text: '完成'}],
tab: '-1',
title: '',
val1: '',