任务管理

This commit is contained in:
2025-11-10 09:20:00 +08:00
parent 2cc4abd57d
commit 8211623a1a
3 changed files with 21 additions and 12 deletions

View File

@@ -17,7 +17,7 @@
<span class="filter_label">目标区域</span> <span class="filter_label">目标区域</span>
</view> </view>
<view class="zd-col-24 filter_select"> <view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select> <uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
@@ -25,7 +25,7 @@
<span class="filter_label">起点点位</span> <span class="filter_label">起点点位</span>
</view> </view>
<view class="zd-col-24 filter_select"> <view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select> <uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
@@ -33,7 +33,7 @@
<span class="filter_label">目标点位</span> <span class="filter_label">目标点位</span>
</view> </view>
<view class="zd-col-24 filter_select"> <view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select> <uni-data-select v-model="index4" :localdata="options4" @change="selectChange4"></uni-data-select>
</view> </view>
</view> </view>
</view> </view>
@@ -74,8 +74,6 @@
created () { created () {
this._queryArea () this._queryArea ()
this._queryArea2() this._queryArea2()
this._queryPointByArea3()
this._queryPointByArea4()
}, },
methods: { methods: {
async _queryArea () { async _queryArea () {
@@ -128,9 +126,15 @@
}, },
selectChange (e) { selectChange (e) {
this.index = e this.index = e
if (e) {
this._queryPointByArea3()
}
}, },
selectChange2 (e) { selectChange2 (e) {
this.index2 = e this.index2 = e
if (e) {
this._queryPointByArea4()
}
}, },
selectChange3 (e) { selectChange3 (e) {
this.index3 = e this.index3 = e

View File

@@ -59,6 +59,11 @@
this._querytasks() this._querytasks()
}, },
methods: { methods: {
clearUp () {
this.pkId = ''
this.dataList = []
this.disabled = false
},
toCheck (e) { toCheck (e) {
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
}, },
@@ -78,26 +83,26 @@
this.dataList = [] this.dataList = []
} }
}, },
async _taskOperation (type) { async _taskoperation (type) {
this.disabled = true this.disabled = true
if (!this.pkId) { if (!this.pkId) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await taskOperation(this.pkId, type) let res = await taskoperation(this.pkId, type)
if (res) { if (res) {
this._queryTask()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.clearUp()
setTimeout(()=> {
this._querytasks()
}, 2000)
} }
this.disabled = false
this.pkId = ''
} catch (err) { } catch (err) {
this.disabled = false this.disabled = false
this.pkId = ''
} }
} }
} }

View File

@@ -1,6 +1,6 @@
import * as types from '../types' import * as types from '../types'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.218:8012' : 'http://192.168.18.218:8012' const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.24:8011' : 'http://192.168.10.24:8011'
const acsUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.250:8012' : 'http://192.168.18.250:8012' const acsUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.250:8012' : 'http://192.168.18.250:8012'
const printUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.4:8000' : 'http://192.168.18.4:8000' const printUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.4:8000' : 'http://192.168.18.4:8000'
const state = { const state = {