|
|
@@ -63,8 +63,10 @@
|
|
|
<div class="border p-1 flex-grow-1" v-for="(cIndex) in station.station_type_bin_monitor.bin_column_length">
|
|
|
<span class="d-inline-block" style="width: 36px;">
|
|
|
@{{ wIndex*rIndex*cIndex|iteratedIndex }}
|
|
|
- <span v-if="commoditiesListByBin">
|
|
|
- @{{ commoditiesListByBin[wIndex*rIndex*cIndex]['commodity_id'] }}
|
|
|
+ <span v-if="taskCommoditiesListByBin">
|
|
|
+ <span v-for="taskCommodity in taskCommoditiesListByBin[5]">
|
|
|
+ @{{ taskCommodity['commodity']['name'] }}
|
|
|
+ </span>
|
|
|
</span>
|
|
|
|
|
|
</span>
|
|
|
@@ -232,30 +234,30 @@
|
|
|
task(){
|
|
|
return this.station['current_station_task'];
|
|
|
},
|
|
|
- commoditiesListByBin(){
|
|
|
+ taskCommoditiesListByBin(){
|
|
|
function reIndexByBin() {
|
|
|
- this.commoditiesListByBinVar = [];
|
|
|
- this.commoditiesListByBinVar.md5 = md5(JSON.stringify(this.station['current_station_task']['station_task_commodities']));
|
|
|
+ this.taskCommoditiesListByBinVar = [];
|
|
|
+ this.taskCommoditiesListByBinVar.md5 = md5(JSON.stringify(this.station['current_station_task']['station_task_commodities']));
|
|
|
let _this=this;
|
|
|
this.station['current_station_task']['station_task_commodities']
|
|
|
.forEach(function (taskCommodity) {
|
|
|
- if (typeof (_this.commoditiesListByBinVar[taskCommodity['bin_number']]) === 'undefined') {
|
|
|
- _this.commoditiesListByBinVar[taskCommodity['bin_number']] = [];
|
|
|
+ if (typeof (_this.taskCommoditiesListByBinVar[taskCommodity['bin_number']]) === 'undefined') {
|
|
|
+ _this.taskCommoditiesListByBinVar[taskCommodity['bin_number']] = [];
|
|
|
}
|
|
|
- _this.commoditiesListByBinVar[taskCommodity['bin_number']].push(taskCommodity);
|
|
|
+ _this.taskCommoditiesListByBinVar[taskCommodity['bin_number']].push(taskCommodity);
|
|
|
})
|
|
|
- return this.commoditiesListByBinVar;
|
|
|
+ return this.taskCommoditiesListByBinVar;
|
|
|
}
|
|
|
|
|
|
- if((typeof this.commoditiesListByBinVar)==='undefined'||!this.commoditiesListByBinVar){
|
|
|
+ if((typeof this.taskCommoditiesListByBinVar)==='undefined'||!this.taskCommoditiesListByBinVar){
|
|
|
return reIndexByBin.call(this);
|
|
|
}
|
|
|
let md5Now = md5(JSON.stringify(this.station['current_station_task']['station_task_commodities']));
|
|
|
|
|
|
- if(this.commoditiesListByBinVar.md5!==md5Now){
|
|
|
+ if(this.taskCommoditiesListByBinVar.md5!==md5Now){
|
|
|
return reIndexByBin.call(this);
|
|
|
}
|
|
|
- return this.commoditiesListByBinVar;
|
|
|
+ return this.taskCommoditiesListByBinVar;
|
|
|
},
|
|
|
processedCommodities(){
|
|
|
return 1;
|