|
|
@@ -30,16 +30,26 @@
|
|
|
<div class="col">选择执行波次:</div>
|
|
|
</div>
|
|
|
<div class="row" v-if="current_stationTaskBatch">
|
|
|
- <div class="col font-weight-bold text-right text-info"
|
|
|
+ <div class="col font-weight-bold text-center text-info position-relative"
|
|
|
:style="[
|
|
|
{opacity:
|
|
|
current_stationTaskBatch.status==='完成'?'0.5':'1'
|
|
|
},
|
|
|
- ]"
|
|
|
- >@{{ current_stationTaskBatch.batch.code }}</div>
|
|
|
- <div class="col"><button class="btn btn-info">执行</button></div>
|
|
|
+ ]"runningStatus
|
|
|
+ :class="[
|
|
|
+
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <div class="text-center">@{{ current_stationTaskBatch.batch.code }}</div>
|
|
|
+ <div class="text-center" style="font-size: 12px;">
|
|
|
+ @{{ current_stationTaskBatch.batch.owner.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col">
|
|
|
+ <button class="btn btn-info" @click="runTheTaskBatch(current_stationTaskBatch)">执行</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="text-center mt-2" style="overflow: scroll;height:200px;">
|
|
|
+ <div class="text-center my-2" style="overflow-y: scroll;max-height:200px;">
|
|
|
<div class="flex flex-column flex-wrap" v-if="stationTaskBatches">
|
|
|
<button v-for="stationTaskBatch in stationTaskBatches"
|
|
|
@click="current_stationTaskBatch=stationTaskBatch"
|
|
|
@@ -374,6 +384,20 @@
|
|
|
this.inputs.manuallyTakeBox.text='';
|
|
|
})
|
|
|
},
|
|
|
+ runTheTaskBatch($taskBatch){
|
|
|
+ $taskBatch.runningStatus='请求中'
|
|
|
+ axios.post('{{url('/api/thirdPart/haiq/runTaskBatch')}}',{station_task_batch_id:$taskBatch.id})
|
|
|
+ .then(function(response){
|
|
|
+ if(!response.data.success){
|
|
|
+ $taskBatch.runningStatus='请求失败';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $taskBatch.runningStatus='请求成功'
|
|
|
+ }).catch(function(err){
|
|
|
+ $taskBatch.runningStatus='请求异常'
|
|
|
+ tempTip.okWindow(err,'确定')
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
computed:{
|
|
|
task(){
|
|
|
@@ -391,8 +415,10 @@
|
|
|
this.stationTasks.forEach(function(stationTask){
|
|
|
if(!stationTask.station_task_batches)return;
|
|
|
stationTask.station_task_batches.forEach(function(stationTaskBatch){
|
|
|
- if(typeof(stationTaskBatch_index['_'+stationTaskBatch.batch_id])!=='undefined')return;
|
|
|
- stationTaskBatches.push(stationTaskBatch)
|
|
|
+ if(typeof(stationTaskBatch_index['_'+stationTaskBatch.batch_id])!=='undefined'){
|
|
|
+ if(stationTaskBatch_index['_'+stationTaskBatch.batch_id]['status']==='完成')return;
|
|
|
+ stationTaskBatches.push(stationTaskBatch)
|
|
|
+ }
|
|
|
stationTaskBatch_index['_'+stationTaskBatch.batch_id]=stationTaskBatch;
|
|
|
})
|
|
|
});
|