张桐

调整文档删除逻辑

正在显示 1 个修改的文件 包含 30 行增加13 行删除
... ... @@ -24,7 +24,6 @@ var canvas ;
var context ;
//蒙版
var canvas_bak;
var context_bak;
// 消息模板-老师
var tpl_message_teacher = `
... ... @@ -280,6 +279,8 @@ function showFile(_data){
}
}
}
... ... @@ -288,6 +289,7 @@ function showFile(_data){
//切换文档
function switchDoc(msg) {
$(".spinner").css("display","block");
$(".doc-headline-a").trigger("click");
var paramInfo={
"itemIdx": msg,
"visible":true
... ... @@ -416,6 +418,7 @@ function showInter(_data,isPage){
$(".docImage").css("display","none");
$("#showImg").css("display","block");
$(".canvas_container").scrollTop(0);
$(".canvas_container").css("overflow","hidden");
... ... @@ -479,6 +482,14 @@ function showTurnPage() {
}
function hideTurnPage(){
$(".next-page ").css("display","none");
$(".total-page").css("display","none");
$(".bias").css("display","none");
$(".cur-page").css("display","none");
$(".prev").css("display","none");
}
... ... @@ -487,12 +498,7 @@ function docDelete(callbackData){
console.log("监听文档删除");
console.log(callbackData);
updateDocList(callbackData,1);
$("#docImage").attr("src","");
$("#showImage").attr("src","");
if (classAllInfo.userRole=="normal"){
$("#docImage").attr("src","");
$("#showImage").attr("src","");
}
//操作页面
$("li").remove(".xin");
... ... @@ -532,15 +538,26 @@ function updateDocList(_data,isAdd) {
for (var i=0;i<fileFromArr.length;i++){
console.log(fileFromArr);
if (fileFromArr[i].itemIdx==_data){
$("#docImage").attr("src","");
$("#showImg").attr("src","");
$(".canvas_container").css("overflow-y","hidden");
hideTurnPage();
if (classAllInfo.userRole=="normal"){
$("#docImage").attr("src","");
$("#showImg").attr("src","");
$(".canvas_container").css("overflow-y","hidden");
}
fileFromArr.splice(i,1);
}
}
if(fileFromArr.length==0){
console.log(fileFromArr);
$("#docCanvas").css("display","none");
$("#showImg").css("display","none");
showTurnPage();
}
// if(fileFromArr.length==0){
// console.log(fileFromArr);
// $("#docImage").css("display","none");
// $("#showImg").css("display","none");
// showTurnPage();
// }
}
}
... ...