|
@@ -285,23 +285,23 @@ function on_secname_retn(obj, sta) {
|
|
}
|
|
}
|
|
|
|
|
|
function getSectorId(spotId){
|
|
function getSectorId(spotId){
|
|
- var secName = null;
|
|
|
|
|
|
+ var secId = null;
|
|
Sectors.list.forEach(function(val, aid, arr){
|
|
Sectors.list.forEach(function(val, aid, arr){
|
|
if(val.sector.spotId === spotId){
|
|
if(val.sector.spotId === spotId){
|
|
- secName = val.sector.sectorName;
|
|
|
|
|
|
+ secId = val.sector.sectorId;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- if(secName == null) {
|
|
|
|
|
|
+ if(secId == null) {
|
|
get_data("fcSectorSpot/list?spotId=" + spotId, on_secid_retn);
|
|
get_data("fcSectorSpot/list?spotId=" + spotId, on_secid_retn);
|
|
- return "[工位:"+sectorId+"]";
|
|
|
|
|
|
+ return -1;
|
|
}else{
|
|
}else{
|
|
- return secName;
|
|
|
|
|
|
+ return secId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function on_secid_retn(obj, sta) {
|
|
function on_secid_retn(obj, sta) {
|
|
- var secid = this.url.substring(this.url.indexOf("sectorId=") + 9);
|
|
|
|
- let rsecid = parseInt(secid);
|
|
|
|
|
|
+ var spotId = this.url.substring(this.url.indexOf("spotId=") + 7);
|
|
|
|
+ let rsecid = parseInt(spotId);
|
|
var out = first_parse(this, obj);
|
|
var out = first_parse(this, obj);
|
|
if(out.list.length > 0){
|
|
if(out.list.length > 0){
|
|
Sectors.list.push({
|
|
Sectors.list.push({
|