第二页添加锚定点

This commit is contained in:
强 杨 2024-02-20 17:14:47 +08:00
parent 3dc95e7686
commit a9837f5f3d
2 changed files with 20 additions and 17 deletions

View File

@ -190,11 +190,11 @@
<td class="lockHide"> <td class="lockHide">
<div class="biaozhundian" onclick="SetBiaoZhunDian(this)">标准涂点</div> <div class="biaozhundian" onclick="SetBiaoZhunDian(this)">标准涂点</div>
</td> </td>
<td class="lockHide">
<div class="maodingdian" onclick="SetMaoDingDian(this)">锚定点</div>
</td>
<% }%> <% }%>
<td class="lockHide">
<div class="maodingdian" onclick="SetMaoDingDian(this,<%=PageIndex %>)">锚定点</div>
</td>
<td class="lockHide"> <td class="lockHide">
<div class="pingbi" onclick="SetHideArea()">增加屏蔽</div> <div class="pingbi" onclick="SetHideArea()">增加屏蔽</div>
</td> </td>

View File

@ -310,7 +310,7 @@ function SetBiaoZhunDian(obj) {
} }
/////////////////锚定点////////////////////// /////////////////锚定点//////////////////////
function SetMaoDingDian(obj) { function SetMaoDingDian(obj, pageIndex) {
var zhuguan_tihao = "锚定点"; var zhuguan_tihao = "锚定点";
if ($(obj).attr("class") == "maodingdian_hover") { if ($(obj).attr("class") == "maodingdian_hover") {
@ -325,13 +325,16 @@ function SetMaoDingDian(obj) {
alert("锚定点已标记"); alert("锚定点已标记");
return; return;
} }
var ocrText = prompt("请输入学科:"); var ocrText = '请勿在此区域作答';
if (ocrText == '' || ocrText == null) { if (pageIndex == 1) {
alert("请输入学科"); ocrText = prompt("请输入学科:");
return; if (ocrText == '' || ocrText == null) {
alert("请输入学科");
return;
}
} }
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop maodingdian_select' wenzimiaoshu='" + zhuguan_tihao + "' style='width:80px;background:none; left:100px; top:200px; height:30px'><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;' id='maodingdian'>" + ocrText +"</div></div>"); $(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop maodingdian_select' wenzimiaoshu='" + zhuguan_tihao + "' style='width:80px;background:none; left:100px; top:200px; height:30px'><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;' id='maodingdian'>" + ocrText + "</div></div>");
$("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" }); $("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" });
$("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' }); $("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' });
} }
@ -696,7 +699,7 @@ function BaseDataBind() {
biaozhundian = list[9].toString().trim('^'); biaozhundian = list[9].toString().trim('^');
} }
if (list[10] != undefined) { if (list[10] != undefined) {
maodingdian = list[10].toString().trim('^'); maodingdian = list[10].toString().trim('^');
} }
} }
@ -1065,7 +1068,7 @@ function SetMaoDingDianPostion(PostionData) {
alert("锚定点配置重复"); alert("锚定点配置重复");
return; return;
} }
$(".main_papermain").append("<div id=\"keguan_锚定点\" class='main_tabletop maodingdian_select' wenzimiaoshu='" + zhuguan_tihao + "' style='left:" + zhuguanList[0] + "px; top:" + zhuguanList[1] + "px;width:" + zhuguanList[2] + "px;height:" + zhuguanList[3] + "px; background:none; '><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;' id='maodingdian'>" + zhuguanList[5] +"</div></div>"); $(".main_papermain").append("<div id=\"keguan_锚定点\" class='main_tabletop maodingdian_select' wenzimiaoshu='" + zhuguan_tihao + "' style='left:" + zhuguanList[0] + "px; top:" + zhuguanList[1] + "px;width:" + zhuguanList[2] + "px;height:" + zhuguanList[3] + "px; background:none; '><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;' id='maodingdian'>" + zhuguanList[5] + "</div></div>");
$("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" }); $("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" });
$("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' }); $("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' });
$(".maodingdian").attr("class", "maodingdian_hover"); $(".maodingdian").attr("class", "maodingdian_hover");
@ -1239,9 +1242,9 @@ String.prototype.trim = function (char, type) {
//////////// 切换页数 //////////////// //////////// 切换页数 ////////////////
function ChangePageNum(anotherTempID) { function ChangePageNum(anotherTempID) {
//if (confirm("当前页未保存,是否继续切换?")){ //if (confirm("当前页未保存,是否继续切换?")){
var currentURL = window.location.href; var currentURL = window.location.href;
var newUrl = currentURL.replace(/(TempID=)\d+/, "$1" + anotherTempID); var newUrl = currentURL.replace(/(TempID=)\d+/, "$1" + anotherTempID);
window.location.href = newUrl; window.location.href = newUrl;
//} //}
} }