parent
f62a1d32bc
commit
d34e26d6fc
|
|
@ -171,7 +171,7 @@ public class CommonUse
|
|||
message = string.Empty;
|
||||
CommonUse commonUse = new CommonUse();
|
||||
string[] postionc = postionCut.Split(new string[] { "^" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
PYPostion = "";
|
||||
PYPostion = "0,0";
|
||||
Point GrXY;
|
||||
int PostionWW = 0;
|
||||
int PostionHH = 0;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
|
|||
case 1:
|
||||
UpdateTempData();
|
||||
break;
|
||||
// 锁定
|
||||
case 2:
|
||||
LockTemp();
|
||||
break;
|
||||
|
|
@ -321,7 +322,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
|
|||
Response.Write("NO PICTURE");
|
||||
}
|
||||
string[] GetData = totalHtml.Split('$');
|
||||
string PYPostionList = "";
|
||||
string PYPostionList = "0,0";
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -220,8 +220,14 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
/// <param name="getdata"></param>
|
||||
private string TempV(string GetData, string PYPostionList, int oldWidth, int oldHeight)
|
||||
{
|
||||
double pyLeft = Convert.ToInt32(PYPostionList.Split(',')[0]);
|
||||
double pyTop = Convert.ToInt32(PYPostionList.Split(',')[1]);
|
||||
|
||||
double pyLeft=0, pyTop = 0;
|
||||
if (string.IsNullOrWhiteSpace(PYPostionList) && PYPostionList.Contains(","))
|
||||
{
|
||||
pyLeft = Convert.ToInt32(PYPostionList.Split(',')[0]);
|
||||
pyTop = Convert.ToInt32(PYPostionList.Split(',')[1]);
|
||||
}
|
||||
|
||||
double Xtop = 0;
|
||||
double Xleft = 0;
|
||||
double Xwidth = 0;
|
||||
|
|
|
|||
|
|
@ -149,21 +149,82 @@
|
|||
|
||||
<input type="button" class="btn_XY" value="左倾斜" onclick="PicRotate(0)" style="float: left; padding: 10px; padding-left: 30px; padding-right: 30px; font-size: 14px; margin-left: 150px; margin-right: 10px;" />
|
||||
<input type="button" class="btn_XY" value="右倾斜" onclick="PicRotate(1)" style="float: left; padding: 10px; padding-left: 30px; padding-right: 30px; margin-right: 10px; font-size: 14px; margin-left: 10px;" />
|
||||
<label style="float: left; padding: 10px; margin-right: 10px; font-size: 14px; margin-left: 10px;">卷子是否存在定位点:</label>
|
||||
<label style="float: left; padding: 10px; margin-right: 10px; font-size: 14px; margin-left: 10px;">卷子是否存在定位点:</label>
|
||||
<select id="select_ishaspostion" style="float: left; padding: 10px; padding-left: 10px; padding-right: 10px; margin-right: 10px; font-size: 14px; margin-left: 10px;">
|
||||
<option value="1">有定位点</option>
|
||||
<option value="0">无定位点</option>
|
||||
</select>
|
||||
<script>
|
||||
$("#select_ishaspostion").val("<%=ishaspostion%>");
|
||||
var originalValue = $("#select_ishaspostion").val();
|
||||
$("#select_ishaspostion").change(function () {
|
||||
if ($(this).val() == 0) {
|
||||
document.location.href = document.location.href.replace("ishaspostion=1", "ishaspostion=0");
|
||||
var groupNo ="<%=GroupNo %>";
|
||||
var batchId ="<%=BatchID %>";
|
||||
|
||||
if (confirm("该操作将重置当前模板数据,是否继续?")) {
|
||||
let token = localStorage.getItem("token");
|
||||
if (!token) {
|
||||
$("#select_ishaspostion").val(originalValue)
|
||||
alert("登录失效,请重新登录后再试!");
|
||||
return
|
||||
}
|
||||
var url = 'http://192.168.2.9:6500/api/';
|
||||
if (window.location.hostname.includes("w.23544.com")) {
|
||||
url = "https://mka.w.23544.com:8843/api/";
|
||||
} else if (window.location.hostname.includes("23544.com")) {
|
||||
url = "https://mk-api.23544.com/ad/api/";
|
||||
} else if (window.location.hostname.includes("localhost")) {
|
||||
url = "http://192.168.2.8:6500/api/";
|
||||
}
|
||||
|
||||
if (groupNo) {
|
||||
url += "ocr/onepaper-tmp?paperNum=" + groupNo + "&isReset=true"
|
||||
} else if (batchId) {
|
||||
url += "ocr/batch-tmp?batchNo=" + batchId + "&isReset=true"
|
||||
}
|
||||
var newValue = $(this).val();
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Authorization": token
|
||||
},
|
||||
success: function (response) {
|
||||
// 请求成功时的处理逻辑
|
||||
if (response.code != 200) {
|
||||
alert(response.message);
|
||||
return;
|
||||
}
|
||||
if (newValue == 0) {
|
||||
window.location.href = response.data.replace("ishaspostion=1", "ishaspostion=0");
|
||||
}
|
||||
else {
|
||||
window.location.href = response.data.replace("ishaspostion=0", "ishaspostion=1");
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
// 请求失败时的处理逻辑
|
||||
if (xhr.status == 401) {
|
||||
alert("登录失效,请重新登录后再试!")
|
||||
return;
|
||||
}
|
||||
alert("请求失败:" + error);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
//if ($(this).val() == 0) {
|
||||
// document.location.href = document.location.href.replace("ishaspostion=1", "ishaspostion=0");
|
||||
//}
|
||||
//else {
|
||||
// document.location.href = document.location.href.replace("ishaspostion=0", "ishaspostion=1");
|
||||
//}
|
||||
}
|
||||
else {
|
||||
document.location.href = document.location.href.replace("ishaspostion=0", "ishaspostion=1");
|
||||
$("#select_ishaspostion").val(originalValue)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -96,12 +96,12 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
|
|||
|
||||
if (!string.IsNullOrEmpty(GroupNo))
|
||||
{
|
||||
sql = "select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID + " AND GroupNo_varchar='" + GroupNo + "'";
|
||||
sql = "select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND GroupNo_varchar='" + GroupNo + "'";
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(BatchID))
|
||||
{
|
||||
sql = "select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID + " AND BatchID_nvarchar='" + BatchID + "'";
|
||||
sql = "select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND BatchID_nvarchar='" + BatchID + "'";
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
|
|||
MySqlParameter[] sp;
|
||||
if (BatchID != "")
|
||||
{
|
||||
sql = "Update MK_TempleteDataUserBatch SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND UserID_bigint=" + Convert.ToInt64(UserID) + " AND BatchID_nvarchar='" + BatchID + "'";
|
||||
sql = "Update MK_TempleteDataUserBatch SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND BatchID_nvarchar='" + BatchID + "'";
|
||||
sp = new MySqlParameter[] {
|
||||
new MySqlParameter("@TempValue_nvarchar",totalHtml),
|
||||
new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList),
|
||||
|
|
@ -176,7 +176,7 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
|
|||
else if (GroupNo != "")
|
||||
{
|
||||
|
||||
sql = "Update MK_TempleteDataUserOnePaper SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND UserID_bigint=" + Convert.ToInt64(UserID) + " AND GroupNo_varchar='" + GroupNo + "'";
|
||||
sql = "Update MK_TempleteDataUserOnePaper SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND GroupNo_varchar='" + GroupNo + "'";
|
||||
sp = new MySqlParameter[] {
|
||||
new MySqlParameter("@TempValue_nvarchar",totalHtml),
|
||||
new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList),
|
||||
|
|
@ -399,11 +399,11 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
|
|||
string sql = "select * from MK_TempleteDataUser where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID;
|
||||
if (BatchID != "")
|
||||
{
|
||||
sql = @"select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID;
|
||||
sql = @"select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND BatchID_nvarchar='" + BatchID + "'";
|
||||
}
|
||||
else if (GroupNo != "")
|
||||
{
|
||||
sql = @"select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID;
|
||||
sql = @"select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND GroupNo_varchar='" + GroupNo + "'";
|
||||
}
|
||||
DataTable dt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
|
||||
if (dt.Rows.Count <= 0)
|
||||
|
|
|
|||
|
|
@ -482,6 +482,7 @@ function GetBiaoZhunDianPostion() {
|
|||
$(".biaozhundian_select").each(function () {
|
||||
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("wenzimiaoshu") + "^";
|
||||
})
|
||||
|
||||
return xy.trim('^');
|
||||
}
|
||||
|
||||
|
|
@ -687,6 +688,19 @@ function BaseDataBind() {
|
|||
SetPyPostion(piyueList);
|
||||
GetZhuguantiScoreList();
|
||||
SetBiaoZhunDianPostion(biaozhundian);
|
||||
|
||||
if (IsPostionValue == "1" || IsPostionValue == "True") {
|
||||
|
||||
|
||||
$(".main_tabletop").draggable("destroy")
|
||||
$(".main_tabletop").resizable("destroy")
|
||||
|
||||
for (var i = 0; i <= 3;i++) {
|
||||
$("#draggable_" + i).draggable({ containment: ".main_papermain" });
|
||||
$("#draggable_" + i).resizable({ containment: ".main_papermain", handles: 'all' });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue