Compare commits

...

10 Commits

Author SHA1 Message Date
强 杨 3dc95e7686 删除 ocr 2024-02-18 14:57:46 +08:00
强 杨 2f5be4d780 限制批次模板和单张 模板,不能切换定位点 2024-01-26 16:59:51 +08:00
强 杨 8b5898a00e 优化显示 2024-01-24 18:24:06 +08:00
强 杨 2ae344739b 优化 2024-01-24 17:58:43 +08:00
强 杨 17bf9bc281 定位点切割增加右上角定位点的宽度 2024-01-10 10:48:19 +08:00
强 杨 d34e26d6fc 批次模板、单张模板调整
锁定模板写入优化
2024-01-09 16:57:23 +08:00
强 杨 f62a1d32bc Merge branch 'master' of http://git.486255.com:3000/marking/Marking.Template 2023-12-27 09:43:02 +08:00
强 杨 0ca9debfeb 修复批次模板和单张模板bug 2023-12-27 09:42:52 +08:00
杨强 f554971229 更新 js/indexuser.js 2023-12-22 11:38:53 +08:00
强 杨 7edede3395 修复学校模板锁定后,页面未锁定bug 2023-12-21 16:51:32 +08:00
12 changed files with 168 additions and 119 deletions

View File

@ -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;
@ -191,9 +191,11 @@ public class CommonUse
//ShowMatWaitKey("123", aaa, 0.8);
string mx = "";
Rectangle rt = new Rectangle();
try
{
mx = commonUse.GetValueAndDrawGrid_Find(color_mat.Bitmap, selected_contours, X, W, 1, Y, H, 1, "", out GrXY, out message);
mx = commonUse.GetValueAndDrawGrid_Find(color_mat.Bitmap, selected_contours, X, W, 1, Y, H, 1, "", out GrXY, out message, out rt);
}
catch
{
@ -224,7 +226,7 @@ public class CommonUse
}
if (i == 1)//右上角
{
PostionWW = GrXY.X;
PostionWW = GrXY.X + rt.Width;
}
if (i == 2)//左下角
{
@ -448,8 +450,8 @@ public class CommonUse
//bool bo = pxNums > 130 && pxNums < 300;
bool bo = (CvInvoke.IsContourConvex(approx_curve)
&& (rect.Width > 10 && rect.Height > 10)
&& (area > 200 && area < 2000)
&& (rect.Width < 50 && rect.Height < 50)
&& (area > 200 && area < 3000)
&& (rect.Width < 80 && rect.Height < 80)
&& pxNums > 200);
if (bo)
{
@ -560,7 +562,7 @@ public class CommonUse
/// <param name="y_num"></param>
/// <returns></returns>
public int[] GetTargetGravityFind(VectorOfVectorOfPoint contours, int x_begin, int x_interval, int x_num,
int y_begin, int y_interval, int y_num, out Point gravityXY, out string messag)
int y_begin, int y_interval, int y_num, out Point gravityXY, out string messag, out Rectangle rectDT)
{
messag = string.Empty;
int[] result = new int[x_num];//结果数组
@ -575,6 +577,7 @@ public class CommonUse
Point[] gravity = GetGravityOfContours(contours);//轮廓中心点坐标
gravityXY = new Point(0, 0);
rectDT = new Rectangle(0, 0, 0, 0);
for (int i = 0; i < contours.Size; i++)
{
VectorOfPoint contour = contours[i];
@ -601,6 +604,7 @@ public class CommonUse
gravityXY = gravity[i];
gravityXY.X = rect.X;
gravityXY.Y = rect.Y;
rectDT = rect;
}
//if (result[x_id] != -1)
@ -1054,11 +1058,11 @@ public class CommonUse
/// <param name="strText">输出文字</param>
/// <returns></returns>
public string GetValueAndDrawGrid_Find(Bitmap img, VectorOfVectorOfPoint contours,
int x_begin, int x_interval, int x_num, int y_begin, int y_interval, int y_num, string strText, out Point pFindX, out string message)
int x_begin, int x_interval, int x_num, int y_begin, int y_interval, int y_num, string strText, out Point pFindX, out string message, out Rectangle rt)
{
//画网格
Point pFind;
int[] intArray = GetTargetGravityFind(contours, x_begin, x_interval, x_num, y_begin, y_interval, y_num, out pFind, out message);
int[] intArray = GetTargetGravityFind(contours, x_begin, x_interval, x_num, y_begin, y_interval, y_num, out pFind, out message, out rt);
int maxValue = GetMaxValueOfArray(intArray);//数组最大值
pFindX = pFind;
string str = "";

View File

@ -1,65 +0,0 @@
using PaddleOCRSharp;
using System;
using System.Drawing;
public class OcrHelper
{
//private static TesseractEngine engine = new TesseractEngine("./ocr_models", "chi_sim");
//public static OCRResult GetOcrResult(Bitmap bitmap)
//{
// try
// {
// using var tempBitmap = new Bitmap(bitmap);
// var ocrResult = paddleOCREngine.DetectText(tempBitmap);
// return ocrResult;
// }
// catch (Exception ex)
// {
// ExceptionNotice.SendAsync(ex, "Ocr文字识别异常");
// throw;
// }
//}
private static string RootDirectory = EngineBase.GetRootDirectory().TrimEnd('\\') + "\\inference";
//建议程序全局初始化一次即可,不必每次识别都初始化,容易报错。
private static PaddleOCREngine paddleOCREngine = paddleOCREngine = new PaddleOCREngine(new OCRModelConfig()
{
det_infer = RootDirectory + "\\ch_PP-OCRv3_det_infer",
cls_infer= RootDirectory + "\\ch_ppocr_mobile_v2.0_cls_infer",
rec_infer = RootDirectory + "\\ch_PP-OCRv3_rec_infer",
keys = RootDirectory + "\\ppocr_keys.txt",
}, new OCRParameter());
public static OCRResult GetOcrResult(Bitmap bitmap)
{
try
{
using (var tempBitmap = new Bitmap(bitmap))
{
return paddleOCREngine.DetectText(tempBitmap);
}
}
catch (Exception ex)
{
throw;
}
}
public static OCRResult GetOcrResult(byte[] bytes)
{
try
{
var ocrResult = paddleOCREngine.DetectText(bytes);
return ocrResult;
}
catch (Exception ex)
{
throw;
}
}
}

View File

@ -352,6 +352,13 @@
</li>
</ul>
<div style="width: 100%; text-align: center; float: left; padding-bottom: 10px; font-size: 14px; padding-top: 10px; background: #044775; border-top: 2px solid #000000; color: #fff;">模板删减区</div>
<div><div style="width:40px;height:20px;overflow:hidden;padding:5px;float:left;">题型</div>
<div style="width:70px;height:20px;overflow:hidden;padding:5px;float:left;">题号</div>
<div style="width:50px;height:20px;overflow:hidden;padding:5px;float:left;">选项数</div>
<div style="width:40px;height:20px;overflow:hidden;padding:5px;float:left;">分数</div>
<div style="width:72px;height:20px;overflow:hidden;padding:5px;float:left;">方向/步长</div>
</div>
<ul id="NowSelect" class="lineul" style="overflow-y: scroll; height: 240px;">
</ul>
</div>

View File

@ -23,6 +23,7 @@ using Emgu.CV.Flann;
using System.Data.SqlTypes;
using System.Security.AccessControl;
using System.IO;
using System.Text.RegularExpressions;
public partial class _Default : System.Web.UI.Page
{
@ -56,6 +57,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
case 1:
UpdateTempData();
break;
// 锁定
case 2:
LockTemp();
break;
@ -321,7 +323,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
Response.Write("NO PICTURE");
}
string[] GetData = totalHtml.Split('$');
string PYPostionList = "";
string PYPostionList = "0,0";
@ -513,7 +515,11 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
int wL = Convert.ToInt32(W / xuanXiang);
int hL = Convert.ToInt32(H / tiliang);
Image<Gray, byte> bytimg = GetMatCutImg(color_mat.Bitmap, X, Y, W, H);
//Bitmap bmp = ScaleToSize(tempImage.Bitmap, tempImage.Bitmap.Width * 4, tempImage.Bitmap.Height * 4, groupNo);
X = 0; Y = 0;
Mat src = bytimg.Mat;

View File

@ -161,8 +161,9 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
Score_float,
smallQuestionNum_int,
questiontype_int,
mkscoretype_float) VALUES
({0},{1},{2},{3},{4},1,{5});select @@IDENTITY",
mkscoretype_float,
Createdtime_datetime,selectNum_int,selecttype_int,is_split) VALUES
({0},{1},{2},{3},{4},1,{5},now(),0,-1,0);select @@IDENTITY",
TemDataID,
"'" + questionList[4] + "'",
"''",
@ -181,7 +182,7 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
}
//写入任务表
sql = "Insert Into mk_subjective_cut_record(temp_main_id,temp_detail_id,temp_question_num,is_cutout,exam_subject_id,temp_question_Newdata_ids,subjective_questions_data,cutted_question_num) VALUES(" + tempMainID + "," + TemDataID + ",'" + questionNum + "'," + is_cutout + "," + exam_subject_id + ",'" + ids.Trim(',') + "','" + zhuguantiList + "','" + questionNumList + "')";
sql = "Insert Into mk_subjective_cut_record(temp_main_id,temp_detail_id,temp_question_num,is_cutout,exam_subject_id,temp_question_Newdata_ids,subjective_questions_data,cutted_question_num,create_date) VALUES(" + tempMainID + "," + TemDataID + ",'" + questionNum + "'," + is_cutout + "," + exam_subject_id + ",'" + ids.Trim(',') + "','" + zhuguantiList + "','" + questionNumList + "',now())";
new MysqlDBHelper(tenant).ExecuteNoQuery(sql, sp);
@ -220,8 +221,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;

View File

@ -677,10 +677,11 @@ public class MK_Operater
int H = Convert.ToInt32(Convert.ToDouble(postCutList[3]));
//commonUse.DrawGridByXY(测试查找坐标.myFrom.PB_guodu, X, W, 1, Y, H, 1);Response.Write(ImgToBase64String(bmp));
string mx = "";
Rectangle rt = new Rectangle();
try
{
string message = string.Empty;
mx = commonUse.GetValueAndDrawGrid_Find(color_mat.Bitmap, selected_contours, X, W, 1, Y, H, 1, "", out GrXY,out message);
mx = commonUse.GetValueAndDrawGrid_Find(color_mat.Bitmap, selected_contours, X, W, 1, Y, H, 1, "", out GrXY,out message ,out rt);
}
catch
{
@ -746,10 +747,11 @@ public class MK_Operater
int W = Convert.ToInt32(Convert.ToDouble(postCutList[2]));
int H = Convert.ToInt32(Convert.ToDouble(postCutList[3]));
string mx = "";
Rectangle rt = new Rectangle();
try
{
string message = string.Empty;
mx = commonUse.GetValueAndDrawGrid_Find(color_mat.Bitmap, selected_contours, X, W, 1, Y, H, 1, "", out GrXY,out message);
mx = commonUse.GetValueAndDrawGrid_Find(color_mat.Bitmap, selected_contours, X, W, 1, Y, H, 1, "", out GrXY,out message ,out rt);
}
catch
{
@ -771,7 +773,7 @@ public class MK_Operater
}
if (i == 1)//右上角
{
PostionWW = GrXY.X;
PostionWW = GrXY.X+ rt.Width;
}
if (i == 2)//左下角
{

View File

@ -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>
<select id="select_ishaspostion" style="float: left; padding: 10px; padding-left: 10px; padding-right: 10px; 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>
<select id="select_ishaspostion" style="float: left; padding: 10px; padding-left: 10px; padding-right: 10px; margin-right: 10px; font-size: 14px; margin-left: 10px;" disabled>
<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>

View File

@ -23,6 +23,7 @@ using Emgu.CV.Flann;
using System.Data.SqlTypes;
using System.Security.AccessControl;
using System.Security.Cryptography;
using Microsoft.SqlServer.Server;
public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
{
@ -95,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 + "'";
}
@ -165,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),
@ -175,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),
@ -392,39 +393,49 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page
try
{
CommonUse commonUse = new CommonUse();
string BatchID = Globals.Request("BatchID");
string GroupNo = Globals.Request("GroupNo");
long TempID = Convert.ToInt64(Globals.Request("TempID"));
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 BatchID_nvarchar='" + BatchID + "'";
}
else if (GroupNo != "")
{
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)
{
Response.Write("NO DATA");
return false;
}
Bitmap PictureBoxBitMap = ImgGet(dt.Rows[0]["TempPicture64_nvarchar"].ToString());
//Bitmap PictureBoxBitMap = ImgGet(dt.Rows[0]["TempPicture64_nvarchar"].ToString());
//var PictureBoxBitMap = commonUse.RotateByOrientation(tempPictureBoxBitMap);
if (PictureBoxBitMap == null)
{
Response.Write("NO PICTURE");
}
string[] GetData = totalHtml.Split('$');
string PYPostionList = "";
////var PictureBoxBitMap = commonUse.RotateByOrientation(tempPictureBoxBitMap);
//if (PictureBoxBitMap == null)
//{
// Response.Write("NO PICTURE");
//}
//string[] GetData = totalHtml.Split('$');
//string PYPostionList = "";
int width = Convert.ToInt32(GetData[6].Split(',')[0]);
int height = Convert.ToInt32(GetData[6].Split(',')[1]);
PictureBoxBitMap = ScaleToSize(PictureBoxBitMap, width, height);
Image<Gray, byte> imagex = new Image<Gray, byte>(PictureBoxBitMap);
Mat mat_threshold1 = new Mat();
CvInvoke.Threshold(imagex, mat_threshold1, 160, 255, Emgu.CV.CvEnum.ThresholdType.BinaryInv);
Mat mat_dilate1 = commonUse.MyDilate(mat_threshold1);
VectorOfVectorOfPoint selected_contours1;
selected_contours1 = commonUse.GetUsefulContoursDingWei(mat_dilate1, 1);
Image<Gray, byte> currentFramext = new Image<Gray, byte>(PictureBoxBitMap);
//int width = Convert.ToInt32(GetData[6].Split(',')[0]);
//int height = Convert.ToInt32(GetData[6].Split(',')[1]);
//PictureBoxBitMap = ScaleToSize(PictureBoxBitMap, width, height);
//Image<Gray, byte> imagex = new Image<Gray, byte>(PictureBoxBitMap);
//Mat mat_threshold1 = new Mat();
//CvInvoke.Threshold(imagex, mat_threshold1, 160, 255, Emgu.CV.CvEnum.ThresholdType.BinaryInv);
//Mat mat_dilate1 = commonUse.MyDilate(mat_threshold1);
//VectorOfVectorOfPoint selected_contours1;
//selected_contours1 = commonUse.GetUsefulContoursDingWei(mat_dilate1, 1);
//Image<Gray, byte> currentFramext = new Image<Gray, byte>(PictureBoxBitMap);
int PageIndex = Convert.ToInt32(Globals.Request("PageIndex"));
//int PageIndex = Convert.ToInt32(Globals.Request("PageIndex"));
//if (PageIndex == 1)
//{
// int mx = GetOtherBitmaplist(currentFramext.Mat, 160, PYPostionList.Split(','), GetData[9]);

View File

@ -166,7 +166,7 @@ function SetKeguanTi() {
$("#keguan_" + tihao).draggable({ containment: ".main_papermain" });
$("#keguan_" + tihao).resizable({ containment: ".main_papermain", handles: 'all' });//设置缩放
var listtypeText = listtype == 0 ? "横向" : "竖向";
$("#NowSelect").append("<li style='background:#fff;' id='selectNow_" + tihao + "' ><div class='sp'><div class='go'>" + questionHtml + "</div></div><div class='sf'>" + tihaoM + "</div> <div class='sm'>" + selectNum + "</div><div class='sx'>" + listtypeText + "</div><div class='ss' idAtt='keguan_" + tihao + "' onclick=\"UpdateBaseData(1,'" + score + "','" + tihao + "','客观题')\">" + score + "</div><div class='sd' onclick=\"DeleteKeguanti('" + tihao + "')\">x</div></li>");
$("#NowSelect").append("<li style='background:#fff;' id='selectNow_" + tihao + "' ><div class='sp'><div class='go'>" + questionHtml + "</div></div><div class='sf'>" + tihaoM + "</div> <div class='sm'>" + selectNum + "</div><div class='ss' idAtt='keguan_" + tihao + "' onclick=\"UpdateBaseData(1,'" + score + "','" + tihao + "','客观题')\">" + score + "</div><div class='sx'>" + listtypeText + "</div><div class='sd' onclick=\"DeleteKeguanti('" + tihao + "')\">x</div></li>");
}
function DeleteKeguanti(tihao) {
@ -959,7 +959,7 @@ function SetKeguanTiPostion(PostionData) {
$("#keguan_" + tihao).draggable({ containment: ".main_papermain" });
$("#keguan_" + tihao).resizable({ containment: ".main_papermain", handles: 'all' });//设置缩放
var listtypeText = listtype == 0 ? "横向" : "竖向";
$("#NowSelect").append("<li style='background:#fff;' id='selectNow_" + tihao + "' ><div class='sp'><div class='go'>" + questionHtml + "</div></div><div class='sf'>" + tihao + "</div> <div class='sm'>" + selectNum + "</div><div class='sx'>" + listtypeText + "</div><div class='ss' id='ss_" + tihao + "' idAtt='keguan_" + tihao + "' onclick=\"UpdateBaseData(1,'" + score + "','" + tihao + "','客观题')\">" + score + "</div><div class='sd' onclick=\"DeleteKeguanti('" + tihao + "')\">x</div></li>");
$("#NowSelect").append("<li style='background:#fff;' id='selectNow_" + tihao + "' ><div class='sp'><div class='go'>" + questionHtml + "</div></div><div class='sf'>" + tihao + "</div> <div class='sm'>" + selectNum + "</div><div class='ss' id='ss_" + tihao + "' idAtt='keguan_" + tihao + "' onclick=\"UpdateBaseData(1,'" + score + "','" + tihao + "','客观题')\">" + score + "</div><div class='sx'>" + listtypeText + "</div><div class='sd' onclick=\"DeleteKeguanti('" + tihao + "')\">x</div></li>");
}
}

View File

@ -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' });
}
}
}

View File

@ -1,8 +1,11 @@

var islocked = $("#islocked").val();
if (islocked == "" || islocked == "null") {
if (islocked == "" || islocked == "null" || islocked == "False" || islocked == "0") {
islocked = 0;
}
else {
islocked = 1;
}
//设置页面大小
function ChangePageSize(obj) {
$(".main_papermain").width(obj.value);

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net48" />
<package id="PaddleOCRSharp" version="4.0.1" targetFramework="net48" />
</packages>