$.get('/create_sendnlp/',{
'env':env,
'devinfo':devinfo.toString(),
'yuliaoid':selectedValue
},function (ret) {
var table = document.getElementById("id_table");
var myrows = table.rows;
var row = table.insertRow(1);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
var cell5 = row.insertCell(4);
var cell6 = row.insertCell(5);
var cell7 = row.insertCell(6);
var cell8 = row.insertCell(7);
cell2.innerHTML = ret.yuliao
cell3.innerHTML = ret.env;
cell4.innerHTML = ret.user;
cell5.innerHTML = ret.time;
cell7.innerHTML = ret.status;
var nlpresultid = ret.nlpresultid;
cell7.id = "td2_"+nlpresultid
for (var i = 1; i < myrows.length; i++) {
myrows[i].cells[0].innerHTML = i;
}
var newButton = document.createElement("button");
newButton.classList.add('btn','btn-success')
newButton.innerHTML = "查看";
cell8.appendChild(newButton);
var newButton2 = document.createElement("button");
newButton2.classList.add('btn','btn-danger')
newButton2.innerHTML = "取消执行";
cell8.appendChild(newButton2);
newButton2.insertAdjacentHTML('beforebegin', '<span> </span>');
newButton.addEventListener('click', function() {
document.getElementById('show_nlpresult_div').style.display='block'
$.get('/show_nlpresult/',{
'nlpresultid':nlpresultid
},function (ret) {
console.log('norefresh',ret)
document.getElementById('id_myinput').value = nlpresultid
var html = ret.content.replace(/\n/g, "<br>");
document.getElementById('nlpresult_div').innerHTML = html;
document.getElementById("id_jin").innerHTML =ret.process.toString()+'%'
document.getElementById("id_jin").style.width = ret.process.toString()+'%'
cell6.innerHTML = ret.endtime;
cell6.id = "td_"+nlpresultid
})
});
$.get('/sendnlp_yuliao/',{
'env':env,
'devinfo':devinfo.toString(),
'yuliaoid':selectedValue,
'nlpresultid':nlpresultid
},function (ret) {
console.log(ret)
})
})
06-28
658
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-01