parent
f62a1d32bc
commit
d34e26d6fc
|
|
@ -171,7 +171,7 @@ public class CommonUse
|
||||||
message = string.Empty;
|
message = string.Empty;
|
||||||
CommonUse commonUse = new CommonUse();
|
CommonUse commonUse = new CommonUse();
|
||||||
string[] postionc = postionCut.Split(new string[] { "^" }, StringSplitOptions.RemoveEmptyEntries);
|
string[] postionc = postionCut.Split(new string[] { "^" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
PYPostion = "";
|
PYPostion = "0,0";
|
||||||
Point GrXY;
|
Point GrXY;
|
||||||
int PostionWW = 0;
|
int PostionWW = 0;
|
||||||
int PostionHH = 0;
|
int PostionHH = 0;
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
|
||||||
case 1:
|
case 1:
|
||||||
UpdateTempData();
|
UpdateTempData();
|
||||||
break;
|
break;
|
||||||
|
// 锁定
|
||||||
case 2:
|
case 2:
|
||||||
LockTemp();
|
LockTemp();
|
||||||
break;
|
break;
|
||||||
|
|
@ -321,7 +322,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
|
||||||
Response.Write("NO PICTURE");
|
Response.Write("NO PICTURE");
|
||||||
}
|
}
|
||||||
string[] GetData = totalHtml.Split('$');
|
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>
|
/// <param name="getdata"></param>
|
||||||
private string TempV(string GetData, string PYPostionList, int oldWidth, int oldHeight)
|
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 Xtop = 0;
|
||||||
double Xleft = 0;
|
double Xleft = 0;
|
||||||
double Xwidth = 0;
|
double Xwidth = 0;
|
||||||
|
|
|
||||||
|
|
@ -156,14 +156,75 @@
|
||||||
</select>
|
</select>
|
||||||
<script>
|
<script>
|
||||||
$("#select_ishaspostion").val("<%=ishaspostion%>");
|
$("#select_ishaspostion").val("<%=ishaspostion%>");
|
||||||
|
var originalValue = $("#select_ishaspostion").val();
|
||||||
$("#select_ishaspostion").change(function () {
|
$("#select_ishaspostion").change(function () {
|
||||||
if ($(this).val() == 0) {
|
var groupNo ="<%=GroupNo %>";
|
||||||
document.location.href = document.location.href.replace("ishaspostion=1", "ishaspostion=0");
|
var batchId ="<%=BatchID %>";
|
||||||
|
|
||||||
|
if (confirm("该操作将重置当前模板数据,是否继续?")) {
|
||||||
|
let token = localStorage.getItem("token");
|
||||||
|
if (!token) {
|
||||||
|
$("#select_ishaspostion").val(originalValue)
|
||||||
|
alert("登录失效,请重新登录后再试!");
|
||||||
|
return
|
||||||
}
|
}
|
||||||
else {
|
var url = 'http://192.168.2.9:6500/api/';
|
||||||
document.location.href = document.location.href.replace("ishaspostion=0", "ishaspostion=1");
|
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 {
|
||||||
|
$("#select_ishaspostion").val(originalValue)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -96,12 +96,12 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(GroupNo))
|
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))
|
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;
|
MySqlParameter[] sp;
|
||||||
if (BatchID != "")
|
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[] {
|
sp = new MySqlParameter[] {
|
||||||
new MySqlParameter("@TempValue_nvarchar",totalHtml),
|
new MySqlParameter("@TempValue_nvarchar",totalHtml),
|
||||||
new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList),
|
new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList),
|
||||||
|
|
@ -176,7 +176,7 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
|
||||||
else if (GroupNo != "")
|
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[] {
|
sp = new MySqlParameter[] {
|
||||||
new MySqlParameter("@TempValue_nvarchar",totalHtml),
|
new MySqlParameter("@TempValue_nvarchar",totalHtml),
|
||||||
new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList),
|
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;
|
string sql = "select * from MK_TempleteDataUser where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID;
|
||||||
if (BatchID != "")
|
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 != "")
|
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);
|
DataTable dt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
|
||||||
if (dt.Rows.Count <= 0)
|
if (dt.Rows.Count <= 0)
|
||||||
|
|
|
||||||
|
|
@ -482,6 +482,7 @@ function GetBiaoZhunDianPostion() {
|
||||||
$(".biaozhundian_select").each(function () {
|
$(".biaozhundian_select").each(function () {
|
||||||
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("wenzimiaoshu") + "^";
|
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("wenzimiaoshu") + "^";
|
||||||
})
|
})
|
||||||
|
|
||||||
return xy.trim('^');
|
return xy.trim('^');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -687,6 +688,19 @@ function BaseDataBind() {
|
||||||
SetPyPostion(piyueList);
|
SetPyPostion(piyueList);
|
||||||
GetZhuguantiScoreList();
|
GetZhuguantiScoreList();
|
||||||
SetBiaoZhunDianPostion(biaozhundian);
|
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