Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
640e2b568d
2 changed files with 37 additions and 4 deletions
  1. +1
    -1
      public/home/home.js
  2. +36
    -3
      templates/base/footer.tmpl

+ 1
- 1
public/home/home.js View File

@@ -119,7 +119,7 @@ document.onreadystatechange = function () {
continue; continue;
} }
} }
refresh3DInfo(record);
//refresh3DInfo(record);
var recordPrefix = getMsg(record); var recordPrefix = getMsg(record);
if(record.OpType == "6" || record.OpType == "10" || record.OpType == "12" || record.OpType == "13"){ if(record.OpType == "6" || record.OpType == "10" || record.OpType == "12" || record.OpType == "13"){
html += recordPrefix + actionName; html += recordPrefix + actionName;


+ 36
- 3
templates/base/footer.tmpl View File

@@ -51,7 +51,27 @@
<script src="/rotation3D/vue-2.6.10.min.js"></script> <script src="/rotation3D/vue-2.6.10.min.js"></script>
<script src="/rotation3D/rotation3D.js?v={{MD5 AppVer}}"></script> <script src="/rotation3D/rotation3D.js?v={{MD5 AppVer}}"></script>
<script> <script>
var jobTask={};
function queryAiCenterInfo(){ 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({ $.ajax({
type:"GET", type:"GET",
url:"/api/v1/cloudbrain/get_center_info", url:"/api/v1/cloudbrain/get_center_info",
@@ -71,7 +91,11 @@
for(var i=0;i<json.length;i++){ for(var i=0;i<json.length;i++){
var tmp ={}; var tmp ={};
tmp["name"]=json[i].name; tmp["name"]=json[i].name;
tmp["type"]="green";
if(jobTask[json[i].id] != null){
tmp["type"]="blue";
}else{
tmp["type"]="green";
}
tmp["icon"]=""; tmp["icon"]="";
tmp["content"]=json[i].content; tmp["content"]=json[i].content;
serverItemList.push(tmp); serverItemList.push(tmp);
@@ -117,13 +141,22 @@
methods: {}, methods: {},
}); });
$(document).ready(function(){ $(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++){ for(var i=0;i<pArrays.length;i++){
var p = pArrays[i]; var p = pArrays[i];
p.innerText=serverItemList[i].content; 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> </script>
{{end}} {{end}}


Loading…
Cancel
Save