|
@@ -18,6 +18,8 @@ function reloadPage(){
|
|
|
|
|
|
let Queue = {THRESHOLD: 1000, IS_LOADED : false, nowuse : 0, SVR_URL:"http://localhost:8803/server/", groupsCount : 0, groups:[], shouldStop : false, backup:["http://localhost:8803/server/","/server/","http://172.30.84.3:8803/server/","https://1.niimei.com/server/"] ,list:[]};
|
|
|
let Users = {list : []};
|
|
|
+let Sectors = {list : []};
|
|
|
+
|
|
|
function get_server_url() {
|
|
|
let output = $.ajax({url: Queue.SVR_URL + "/fcWorker/list?userId=1", timeout:1000 }).fail(on_check_fail).done(function(){
|
|
|
Queue.IS_LOADED = true;
|
|
@@ -256,7 +258,31 @@ function on_username_retn(obj, sta) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function getSectorName(sectorId){
|
|
|
+ var secName = null;
|
|
|
+ Sectors.list.forEach(function(val, aid, arr){
|
|
|
+ if(val.sector.sectorId === sectorId){
|
|
|
+ secName = val.sector.sectorName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(secName == null) {
|
|
|
+ get_data("fcSector/list?sectorId=" + sectorId, on_secname_retn);
|
|
|
+ return "[工位:"+sectorId+"]";
|
|
|
+ }else{
|
|
|
+ return secName;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
+function on_secname_retn(obj, sta) {
|
|
|
+ var secid = this.url.substring(this.url.indexOf("sectorId=") + 9);
|
|
|
+ let rsecid = parseInt(secid);
|
|
|
+ var out = first_parse(this, obj);
|
|
|
+ if(out.list.length > 0){
|
|
|
+ Sectors.list.push({
|
|
|
+ secid : rsecid, sector: out.list[0]
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
$(document).ready(on_document_load);
|
|
|
get_server_url();
|