联调
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title" :searchActive="true" @toSearch="toSearch"></nav-bar>
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content pdt0">
|
||||
<view class="filter_wrapper">
|
||||
<view class="zd-row">
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="zd-col-16">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7 item-font-3">任务状态:</view>
|
||||
<view class="zd-col-17 item-font-4">{{['就绪', '执行中', '完成'][Number(e.task_status)]}}</view>
|
||||
<view class="zd-col-17 item-font-4">{{e.task_status_name}}</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7 item-font-3">载具号:</view>
|
||||
@@ -44,44 +44,6 @@
|
||||
<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-5">
|
||||
<span class="filter_label">关键字</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">起始设备</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">目标设备</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<search-box
|
||||
v-model="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -96,13 +58,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}, {id:'2', text: '完成'}],
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}],
|
||||
tab: '-1',
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
data: [],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
@@ -116,20 +74,21 @@
|
||||
this._handTasks()
|
||||
},
|
||||
methods: {
|
||||
toSearch () {
|
||||
this.show = true
|
||||
this.tab = '-1'
|
||||
},
|
||||
async _handTasks () {
|
||||
this.show = false
|
||||
try {
|
||||
let res = await handTasks(this.val1, this.val2, this.val3)
|
||||
this.data = [...res.data]
|
||||
this.dataList = [...this.data]
|
||||
|
||||
let res = await handTasks()
|
||||
if (res.code === '1') {
|
||||
this.data = [...res.result]
|
||||
this.dataList = [...this.data]
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -151,24 +110,21 @@
|
||||
}
|
||||
try {
|
||||
let res = await handTaskoperation(type, this.pkId)
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handTasks()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code === '1') {
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handTasks()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user