|
|
|
@@ -51,7 +51,27 @@ |
|
|
|
<script src="/rotation3D/vue-2.6.10.min.js"></script> |
|
|
|
<script src="/rotation3D/rotation3D.js?v={{MD5 AppVer}}"></script> |
|
|
|
<script> |
|
|
|
var jobTask={}; |
|
|
|
function queryAiCenterInfo(){ |
|
|
|
$.ajax({ |
|
|
|
type:"GET", |
|
|
|
url:"/api/v1/cloudbrain/get_newest_job", |
|
|
|
headers: { |
|
|
|
authorization:token, |
|
|
|
}, |
|
|
|
dataType:"json", |
|
|
|
async:false, |
|
|
|
success:function(json){ |
|
|
|
console.log("cloudbrain task info=" + json); |
|
|
|
for(var i=0;i < json.length;i++){ |
|
|
|
jobTask[json[i].ai_center_id] =json[i].job_name; |
|
|
|
} |
|
|
|
}, |
|
|
|
error:function(response) { |
|
|
|
console.log("query task info error."); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type:"GET", |
|
|
|
url:"/api/v1/cloudbrain/get_center_info", |
|
|
|
@@ -71,7 +91,11 @@ |
|
|
|
for(var i=0;i<json.length;i++){ |
|
|
|
var tmp ={}; |
|
|
|
tmp["name"]=json[i].name; |
|
|
|
tmp["type"]="green"; |
|
|
|
if(jobTask[json[i].id] != null){ |
|
|
|
tmp["type"]="blue"; |
|
|
|
}else{ |
|
|
|
tmp["type"]="green"; |
|
|
|
} |
|
|
|
tmp["icon"]=""; |
|
|
|
tmp["content"]=json[i].content; |
|
|
|
serverItemList.push(tmp); |
|
|
|
@@ -117,13 +141,22 @@ |
|
|
|
methods: {}, |
|
|
|
}); |
|
|
|
$(document).ready(function(){ |
|
|
|
var pArrays = $('.itemList').find("p"); |
|
|
|
console.log(pArrays.length); |
|
|
|
var pArrays=$('.itemList').find("p"); |
|
|
|
console.log("center length=" + pArrays.length); |
|
|
|
|
|
|
|
for(var i=0;i<pArrays.length;i++){ |
|
|
|
var p = pArrays[i]; |
|
|
|
p.innerText=serverItemList[i].content; |
|
|
|
} |
|
|
|
|
|
|
|
var lines=$('.rotation3D__line').find("span"); |
|
|
|
console.log("lines length=" + lines.length); |
|
|
|
|
|
|
|
for(var i=0; i< lines.length;i++){ |
|
|
|
if(jobTask[i+1] != null){ |
|
|
|
lines[i].innerText = jobTask[i+1]; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
</script> |
|
|
|
{{end}} |
|
|
|
|