|
|
@@ -28,20 +28,19 @@
|
|
|
<div class="col py-3 h4">
|
|
|
<div>波次列表:</div>
|
|
|
<div class="text-center mt-2" style="overflow: scroll;height:200px;">
|
|
|
- <div class="flex flex-column flex-wrap">
|
|
|
- <button v-for="taskBatch in task.station_task_batches"
|
|
|
+ <div class="flex flex-column flex-wrap" v-if="stationTaskBatches">
|
|
|
+ <button v-for="stationTaskBatch in stationTaskBatches"
|
|
|
+ @click="current_stationTaskBatch=stationTaskBatch"
|
|
|
class="btn btn-outline-dark">
|
|
|
- @{{taskBatch.batch.code | simplifyBatchCode}}</button>
|
|
|
+ @{{stationTaskBatch.batch.code | simplifyBatchCode}}</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- <div class=" text-center">
|
|
|
- <b v-if="task&&task.station_task_batches">
|
|
|
- <div v-for="taskBatch in task.station_task_batches">
|
|
|
- @{{ taskBatch.batch.code }}
|
|
|
- </div>
|
|
|
+ <div class=" text-center" v-if="current_stationTaskBatch">
|
|
|
+ <b class="text-center">
|
|
|
+ @{{ current_stationTaskBatch.batch.code }}
|
|
|
</b>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -305,9 +304,7 @@
|
|
|
text:'',
|
|
|
}
|
|
|
},
|
|
|
- batch_tasks: [
|
|
|
- // {code:'',id:'',status:''},
|
|
|
- ],
|
|
|
+ current_stationTaskBatch: null,
|
|
|
grids:{
|
|
|
single:{status:'',},
|
|
|
half:{
|
|
|
@@ -328,6 +325,7 @@
|
|
|
mounted() {
|
|
|
this._makeMenuHiding();
|
|
|
this._listenBroadcast();
|
|
|
+ console.log(this.stationTaskBatches);
|
|
|
},
|
|
|
methods:{
|
|
|
_makeMenuHiding(){
|
|
|
@@ -369,6 +367,21 @@
|
|
|
if(!this.station['current_station_task'])return null;
|
|
|
return this.station['current_station_task'];
|
|
|
},
|
|
|
+ stationTasks(){
|
|
|
+ if(!this.station)return;
|
|
|
+ return this.station.station_tasks_today;
|
|
|
+ },
|
|
|
+ stationTaskBatches(){
|
|
|
+ if(!this.stationTasks)return;
|
|
|
+ let stationTaskBatches=[];
|
|
|
+ this.stationTasks.forEach(function(stationTask){
|
|
|
+ if(!stationTask.station_task_batches)return;
|
|
|
+ stationTask.station_task_batches.forEach(function(stationTaskBatch){
|
|
|
+ stationTaskBatches.push(stationTaskBatch)
|
|
|
+ })
|
|
|
+ });
|
|
|
+ return stationTaskBatches;
|
|
|
+ },
|
|
|
batchCode(){
|
|
|
if(!this.task)return;
|
|
|
let batches = this.task.station_task_batches;
|