任务逻辑修改

This commit is contained in:
2026-01-19 13:50:46 +08:00
parent 37fea3641d
commit ec7718405e

View File

@@ -37,7 +37,7 @@
</el-row> </el-row>
<div v-if="taskSeq.length > 0" class="task_wraper"> <div v-if="taskSeq.length > 0" class="task_wraper">
<div class="task_content"> <div class="task_content">
<div class="step_item" v-for="(e, i) in taskSeq" :key="i" :class="{'step_actived': i <= currentStep, 'step_active': i === currentStep + 1}"> <div class="step_item" v-for="(e, i) in taskSeq" :key="i" :class="{'step_actived': i <= currentStep - 1, 'step_active': i === currentStep}">
<div v-show="i !== 0" class="step_arrow"><img src="../../images/new/arrow.png"></div> <div v-show="i !== 0" class="step_arrow"><img src="../../images/new/arrow.png"></div>
<div class="step_name">{{ e }}</div> <div class="step_name">{{ e }}</div>
</div> </div>
@@ -88,6 +88,7 @@ export default {
// y: -10.001812, // 车辆y坐标 // y: -10.001812, // 车辆y坐标
// task_seq: '点位1,点位2,work point 3,顶地方的方法顶顶顶点位3', // task_seq: '点位1,点位2,work point 3,顶地方的方法顶顶顶点位3',
// task_point: '点位2', // task_point: '点位2',
// task_seq_index: 2,
// anomalyLevel: 1, // anomalyLevel: 1,
// errorData: [ // errorData: [
// { // {
@@ -138,8 +139,7 @@ export default {
// this.$store.dispatch('setAgvObj', this.topInfo) // this.$store.dispatch('setAgvObj', this.topInfo)
// if (this.topInfo.task_seq) { // if (this.topInfo.task_seq) {
// this.taskSeq = this.topInfo.task_seq.split(',') // this.taskSeq = this.topInfo.task_seq.split(',')
// const target = this.topInfo.task_point // this.currentStep = this.topInfo.task_seq_index
// this.currentStep = this.taskSeq.findIndex(item => item === target)
// } else { // } else {
// this.taskSeq = [] // this.taskSeq = []
// this.currentStep = null // this.currentStep = null
@@ -254,8 +254,7 @@ export default {
this.topInfo = res.data this.topInfo = res.data
if (this.topInfo.task_seq) { if (this.topInfo.task_seq) {
this.taskSeq = this.topInfo.task_seq.split(',') this.taskSeq = this.topInfo.task_seq.split(',')
const target = this.topInfo.task_point this.currentStep = this.topInfo.task_seq_index
this.currentStep = this.taskSeq.findIndex(item => item === target)
} else { } else {
this.taskSeq = [] this.taskSeq = []
this.currentStep = null this.currentStep = null