添加切换页数

This commit is contained in:
强 杨 2023-09-21 11:09:46 +08:00
parent 9d99b99ba6
commit f27ff2b368
3 changed files with 378 additions and 311 deletions

View File

@ -4,29 +4,29 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>导入外部答题卡制作模板</title>
<script src="../js/jquery-1.10.2.min.js"></script>
<link href="../css/default.css" rel="stylesheet" />
</head>
<body>
<div class="divBG backgroundGo" style=" display:none;"></div>
<div class="divbgbox backgroundGo" style=" display:none;">
<div class="divBG backgroundGo" style="display: none;"></div>
<div class="divbgbox backgroundGo" style="display: none;">
<input type="hidden" value="" id="TiMU_num" />
<input type="hidden" value="" id="TiMU_Type" />
<h3 id="divbig_title">单选题15题</h3>
<div style="width:100%;margin-top:10px; font-size:14px; display:none;" id="scoreShow">
<div style="width: 100%; margin-top: 10px; font-size: 14px; display: none;" id="scoreShow">
分数设置:
<select style="font-size:14px; padding:5PX; padding-left:10px; padding-right:10px;" id="git_fix">
<select style="font-size: 14px; padding: 5PX; padding-left: 10px; padding-right: 10px;" id="git_fix">
<option></option>
</select>
</div>
<div style="width:100%;margin-top:10px; font-size:14px; display:none;" id="dfxShow">
<div style="width: 100%; margin-top: 10px; font-size: 14px; display: none;" id="dfxShow">
打分项设定:
<select style="font-size:14px; padding:5PX; padding-left:10px; padding-right:10px;" id="git_sd_fix">
<select style="font-size: 14px; padding: 5PX; padding-left: 10px; padding-right: 10px;" id="git_sd_fix">
<option value="5">5</option>
<option value="4.5">4.5</option>
<option value="4">4</option>
@ -39,38 +39,62 @@
<option value=".5">.5</option>
</select>
</div>
<div style="width:100%;margin-top:10px; font-size:14px;">
<input type="button" style="width:100px; height:30px;" value="确定" onclick="GoChange()" />
<input type="button" style="width:100px; height:30px;" onclick="DeleteUpdateBaseData()" value="取消" />
<div style="width: 100%; margin-top: 10px; font-size: 14px;">
<input type="button" style="width: 100px; height: 30px;" value="确定" onclick="GoChange()" />
<input type="button" style="width: 100px; height: 30px;" onclick="DeleteUpdateBaseData()" value="取消" />
</div>
</div>
</div>
<input type="text" style=" display:none;" value="<%=isHand %>" id="hd_isHand" />
<input type="text" style=" display:none;" value="<%=Bindlist %>" id="Bindlist" />
<input type="text" style=" display:none;" value="<%=TempID %>" id="TempID" />
<input type="text" style=" display:none;" value="<%=isLocked %>" id="isLocked" />
<input type="text" style=" display:none;" value="<%=tenant %>" id="tenant" />
<input type="text" style=" display:none;" value="<%=PageIndex %>" id="PageIndex" />
<input type="text" style=" display:none;" value="<%=MainTempId %>" id="MainTempId" />
<input type="text" style="display: none;" value="<%=isHand %>" id="hd_isHand" />
<input type="text" style="display: none;" value="<%=Bindlist %>" id="Bindlist" />
<input type="text" style="display: none;" value="<%=TempID %>" id="TempID" />
<input type="text" style="display: none;" value="<%=AnotherTempID %>" id="AnotherTempID" />
<input type="text" style="display: none;" value="<%=isLocked %>" id="isLocked" />
<input type="text" style="display: none;" value="<%=tenant %>" id="tenant" />
<input type="text" style="display: none;" value="<%=PageIndex %>" id="PageIndex" />
<input type="text" style="display: none;" value="<%=MainTempId %>" id="MainTempId" />
<input type="text" style="display: none;" value="<%=PageCount %>" id="PageCount" />
<textarea id="HideAreaText" style=" display:none;"><%=HideAreaText %></textarea>
<input id="IsPostionValue" type="text" style="display:none;" value="<%=IsPostionValue %>" />
<textarea id="HideAreaText" style="display: none;"><%=HideAreaText %></textarea>
<input id="IsPostionValue" type="text" style="display: none;" value="<%=IsPostionValue %>" />
<input type="hidden" id="pager_A" value="<%=pager %>" />
<div class="main">
<div class="main_tool">
<table>
<tr>
<th class="lockHide" >选定锚点</th>
<td class="lockHide" valign="middle">
<div class="maodian" id="point_0" >左上锚点</div>
<th style="display: none" class="lockHide">选定锚点</th>
<td style="display: none" class="lockHide" valign="middle">
<div class="maodian" id="point_0">左上锚点</div>
<div class="maodian" id="point_1">右上锚点</div>
<div class="maodian" id="point_2">左下锚点</div>
<div class="maodian" id="point_3">右下锚点</div>
</td>
<td style="padding: 0;" valign="top" class="lockHide">
<% if (PageIndex == "1") { %>
<div class="tiaomasz_hover">第一页</div>
<% }
else
{ %>
<div class="tiaomasz" onclick="ChangePageNum(<%=AnotherTempID %>)">第一页</div>
<% } %>
</td>
<% if (PageCount >1) { %>
<td style="padding: 0;" valign="top" class="lockHide">
<% if (PageIndex == "2") { %>
<div class="tiaomasz_hover">第二页</div>
<% }
else
{ %>
<div class="tiaomasz" onclick="ChangePageNum(<%=AnotherTempID %>)">第二页</div>
<% } %>
</td>
<% } %>
<td class="lockHide">
<span>纸张类型:</span>
<select id="selectPageSize" disabled onchange="ChangePageSize(this)" style="font-size:14px; padding-left:10px; padding-right:20px; width:100px;">
<select id="selectPageSize" disabled onchange="ChangePageSize(this)" style="font-size: 14px; padding-left: 10px; padding-right: 20px; width: 100px;">
<option value="1200">A4</option>
<option value="1570">A3</option>
</select>
@ -78,7 +102,7 @@
<th valign="middle" class="lockHide">
<div class="main_select_one">
<span>准考证号:</span>
<select id="xuehaonum" style="font-size:14px; ">
<select id="xuehaonum" style="font-size: 14px;">
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
@ -94,7 +118,7 @@
</div>
</th>
<td style=" padding:0;" valign="top" class="lockHide">
<td style="padding: 0;" valign="top" class="lockHide">
<div class="tiaomasz" onclick="SetTiaoMa(this)">设置条码</div>
</td>
<td class="lockHide">
@ -104,26 +128,26 @@
<div class="biaozhundian" onclick="SetBiaoZhunDian(this)">标准涂点</div>
</td>
<td class="lockHide">
<div class="pingbi" onclick="SetHideArea()" >增加屏蔽</div>
<div class="pingbi" onclick="SetHideArea()">增加屏蔽</div>
</td>
<td>
<input type="button" id="noButton" style="padding:5px;font-size:14px; padding-left:10px; padding-right:10px; height:40px; " onclick="GetDataTotal(-1,'<%=tenant %>')" value="保存数据" />
<input type="button" id="noButton" style="padding: 5px; font-size: 14px; padding-left: 10px; padding-right: 10px; height: 40px;" onclick="GetDataTotal(-1,'<%=tenant %>')" value="保存数据" />
</td>
<td>
<input type="button" id="ansyButton" style="padding:5px;font-size:14px; padding-left:10px; padding-right:10px;height:40px; " onclick="GetDataTotal(1,'<%=tenant %>')" value="锁定模板" />
<input type="button" id="ansyButton" style="padding: 5px; font-size: 14px; padding-left: 10px; padding-right: 10px; height: 40px;" onclick="GetDataTotal(1,'<%=tenant %>')" value="锁定模板" />
</td>
</tr>
</table>
</div>
<div style="width:1570px; overflow:hidden;">
<div style="width: 1570px; overflow: hidden;">
<div class="main_papermain">
<img id="SelectImg" src="<%=imgage %>" style=" width:100%; float:left; z-index:0; " />
<img id="SelectImg" src="<%=imgage %>" style="width: 100%; float: left; z-index: 0;" />
</div>
</div>
</div>
<div onclick="HideRight(this)" style=" position:fixed;right:0;top:0; z-index:333; height:40px; width:40px; background:#000000; color:#fff; text-align:center; line-height:40px; font-size:12px;">折叠</div>
<div onclick="HideRight(this)" style="position: fixed; right: 0; top: 0; z-index: 333; height: 40px; width: 40px; background: #000000; color: #fff; text-align: center; line-height: 40px; font-size: 12px;">折叠</div>
<script>
function HideRight(obj) {
if ($(obj).html() == "折叠") {
@ -139,17 +163,21 @@
}
}
</script>
<div class="right_list">
<ul class="ul lockHide" >
<div class="right_list">
<ul class="ul lockHide">
<li class="hover">客观题设置</li>
<li>
<div style=" text-align:left; padding-left:20px;">
<br /><br />
题号:<input type="text" id="tihao" placeholder="例:16或者16M1" style="font-size:14px; width:100px;"/>-<input type="text" id="tihao_end" placeholder="例:16或者16M1" value=""style="font-size:14px; width:100px;" />
<br /> <br />
<label style=" width:80%; margin-left:35px; text-align:left; float:none; color:#f00; margin-top:5px; padding:5px; margin-bottom:5px;">如果以大题下面有小题类型用16M1-16M5表示</label>
<br /><br /><br />
选项:<select id="selectNum" style="font-size:14px; padding:4px; padding-right:10px;">
<div style="text-align: left; padding-left: 20px;">
<br />
<br />
题号:<input type="text" id="tihao" placeholder="例:16或者16M1" style="font-size: 14px; width: 100px;" />-<input type="text" id="tihao_end" placeholder="例:16或者16M1" value="" style="font-size: 14px; width: 100px;" />
<br />
<br />
<label style="width: 80%; margin-left: 35px; text-align: left; float: none; color: #f00; margin-top: 5px; padding: 5px; margin-bottom: 5px;">如果以大题下面有小题类型用16M1-16M5表示</label>
<br />
<br />
<br />
选项:<select id="selectNum" style="font-size: 14px; padding: 4px; padding-right: 10px;">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
@ -171,28 +199,31 @@
<option value="19">19</option>
<option value="20">20</option>
</select>
<label style="padding:6px; border-radius:2px;">横向<input checked="checked" type="radio" name="listtype" value="0" style="margin-top:3px;" /></label>
<label style="padding:6px; border-radius:2px;">竖向<input name="listtype" type="radio" value="1" /></label>
<br /><br /><br />
类型:<select id="questiontype" style="font-size:12px; width:100px;">
<label style="padding: 6px; border-radius: 2px;">横向<input checked="checked" type="radio" name="listtype" value="0" style="margin-top: 3px;" /></label>
<label style="padding: 6px; border-radius: 2px;">竖向<input name="listtype" type="radio" value="1" /></label>
<br />
<br />
<br />
类型:<select id="questiontype" style="font-size: 12px; width: 100px;">
<option value="0">单选</option>
<option value="1">多选</option>
<option value="2">判断</option>
</select>
分数:
<select id="questionscroe" style="font-size:12px; width:80px; text-align:center;">
<option value="">无分</option><option value="0.5">0.5</option>
<select id="questionscroe" style="font-size: 12px; width: 80px; text-align: center;">
<option value="">无分</option>
<option value="0.5">0.5</option>
</select>
<br /><br />
<br />
<br />
<div class="goPeizhi" onclick="SetKeguanTi()">开始配置</div>
</div>
</li>
</ul>
<ul class="ul" style="display:none;">
<li class="hover" >准考证号识别</li>
<li>
题号:<input id="zhunkaozhenghao" type="text" value="6" />
<ul class="ul" style="display: none;">
<li class="hover">准考证号识别</li>
<li>题号:<input id="zhunkaozhenghao" type="text" value="6" />
<div class="goPeizhi" onclick="SetZunkaoZheng()">开始配置</div>
</li>
</ul>
@ -200,17 +231,19 @@
<ul class="ul lockHide">
<li class="hover">主观题设置</li>
<li>
<span style="float:left; width:100%; display:block; padding-top:1px; border:0; border:1px solid #ffd800; margin-top:10px; color:#f00">切割成两半 如11题 如 第一半11X1 第二半11X2</span>
<span style="float: left; width: 100%; display: block; padding-top: 1px; border: 0; border: 1px solid #ffd800; margin-top: 10px; color: #f00">切割成两半 如11题 如 第一半11X1 第二半11X2</span>
<div style=" margin-top:15px;padding-left:20px; text-align:left;margin-bottom:10px;">
题号:<input id="zhuguan_tihao" style="font-size:14px; width:60px;" type="text" value="" />小题:<input id="zhuguan_xiaoti" style=" width:40px;font-size:14px; " type="text" value="0" />
<div style="margin-top: 15px; padding-left: 20px; text-align: left; margin-bottom: 10px;">
题号:<input id="zhuguan_tihao" style="font-size: 14px; width: 60px;" type="text" value="" />小题:<input id="zhuguan_xiaoti" style="width: 40px; font-size: 14px;" type="text" value="0" />
分数:
<select id="zgquestionscroe" style="font-size:14px; width:80px; text-align:center;">
<option value="">无分</option><option value="0.5">0.5</option>
<select id="zgquestionscroe" style="font-size: 14px; width: 80px; text-align: center;">
<option value="">无分</option>
<option value="0.5">0.5</option>
</select>
<br /><br />
<br />
<br />
阅卷分值间隔:
<select id="questionscroetype" style="font-size:14px; width:80px; margin-top:5px; text-align:center;">
<select id="questionscroetype" style="font-size: 14px; width: 80px; margin-top: 5px; text-align: center;">
<option value="5">5分</option>
<option value="4.5">4.5分</option>
<option value="4">4分</option>
@ -222,31 +255,35 @@
<option value="1" selected="selected">1分</option>
<option value=".5">0.5分</option>
</select>
<% if (Request.QueryString["ishand"] == "1")
{ %>
类型:
<select id="questiontype_zg" style="font-size:14px; width:80px; margin-top:5px; text-align:center;">
<option value="1">大题</option>
<select id="questiontype_zg" style="font-size: 14px; width: 80px; margin-top: 5px; text-align: center;">
<option value="1">主观题</option>
<option value="2">填空题</option>
</select>
<% } %>
</div>
<br /><br /><br />
<div style="margin-left:45px;" class="goPeizhi" onclick="SetZhuguanTi()">开始配置</div>
<br />
<br />
<br />
<div style="margin-left: 45px;" class="goPeizhi" onclick="SetZhuguanTi()">开始配置</div>
<div id="isHand_Py" style="float:left; width:100%; text-align:left; margin-top:10px; border-bottom:1px solid #ddd; padding-bottom:5px;">
<div id="isHand_Py" style="float: left; width: 100%; text-align: left; margin-top: 10px; border-bottom: 1px solid #ddd; padding-bottom: 5px;">
先批后阅题号:
<select id="py_tihao"></select>
<input type="button" value="题目配置" id="pytimups" onclick="SetPYPostion(0)" style="width:90px;margin-right:10px;" />
<input type="button" value="题目配置" id="pytimups" onclick="SetPYPostion(0)" style="width: 90px; margin-right: 10px;" />
<%-- <input onclick="SetPYPostion(1)" style="width:100px;margin-right:10px;" type="button" value="常规题" />--%>
</div>
</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>
<ul id="NowSelect" class="lineul" style="overflow-y:scroll; height:240px; ">
<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>
<ul id="NowSelect" class="lineul" style="overflow-y: scroll; height: 240px;">
</ul>
</div>
</div>
<script>
@ -268,7 +305,7 @@
}
SelectValueList();
</script>
<script src="../js/index.js"></script>
<script src="../js/index.js"></script>
</body>

View File

@ -26,6 +26,7 @@ using System.Security.AccessControl;
public partial class _Default : System.Web.UI.Page
{
public long TempID = 0;
public long AnotherTempID = 0;
public string PageIndex = "0";
public string Bindlist = "";
public string imgage = "";
@ -37,13 +38,14 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
public string pager = "";
public int isHand = 0;
public string MainTempId = "0";
public int PageCount = 0;
protected void Page_Load(object sender, EventArgs e)
{
int action = Globals.Request("action") == "" ? 0 : Convert.ToInt32(Globals.Request("action"));
tenant = Globals.Request("tenant") == "" ? 0 : Convert.ToInt64(Globals.Request("tenant"));
isHand = Globals.Request("isHand") == "" ? 0 : Convert.ToInt32(Globals.Request("isHand"));
pager = Globals.Request("pager").ToLower() ;
pager = Globals.Request("pager").ToLower();
if (action != 0)
{
@ -62,7 +64,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
else
{
TempID = Globals.Request("TempID") == "" ? 0 : Convert.ToInt32(Globals.Request("TempID"));//获取小模板ID
if (TempID == 0) {
if (TempID == 0)
{
Response.Write("<script>alert('无模板数据');window.close();</script>");
return;
}
@ -76,21 +79,36 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
HideAreaText = dtx.Rows[0]["HideAreaPostionList_nvarchar"] == null ? "" : dtx.Rows[0]["HideAreaPostionList_nvarchar"].ToString();
IsPostionValue = dtx.Rows[0]["HideAreaPostionList_nvarchar"] == null ? "" : dtx.Rows[0]["HideAreaPostionList_nvarchar"].ToString();
PageIndex = dtx.Rows[0]["PageIndex_int"] == null ? "" : dtx.Rows[0]["PageIndex_int"].ToString();
sql = "select HasPosition FROM MK_TempleteMain WHERE ID_bigint=" + dtx.Rows[0]["MainID_bigint"].ToString();
MainTempId = dtx.Rows[0]["MainID_bigint"].ToString();
IsPostionValue = new MysqlDBHelper(tenant).ExecuteScalar(sql).ToString();
sql = "select MainPage_int,HasPosition from MK_TempleteMain where ID_bigint=" + MainTempId;
var maindt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
if (maindt == null || maindt.Rows.Count <= 0)
{
Response.Write("<script>alert('主模板数据有问题');</script>");
return;
}
PageCount = Convert.ToInt32(maindt.Rows[0]["MainPage_int"]);
IsPostionValue = maindt.Rows[0]["HasPosition"].ToString();
if (PageCount > 1)
{
sql = "select ID_bigint from MK_TempleteData where MainID_bigint="+ MainTempId + " and ID_bigint!=" + TempID;
AnotherTempID = Convert.ToInt32(new MysqlDBHelper(tenant).ExecuteScalar(sql));
}
}
}
}
private void UpdateTempData() {
private void UpdateTempData()
{
TempID = Globals.Request("TempID") == "" ? 0 : Convert.ToInt32(Globals.Request("TempID"));//获取小模板ID
string totalHtml = Server.UrlDecode(Globals.Request("totalHtml"));
string HideAreaPostionList= Server.UrlDecode(Globals.Request("HideAreaPostionList"));
string HideAreaPostionList = Server.UrlDecode(Globals.Request("HideAreaPostionList"));
if (AnsyTemp(HideAreaPostionList, totalHtml)) {
if (AnsyTemp(HideAreaPostionList, totalHtml))
{
string sql = "Update MK_TempleteData SET TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar where ID_bigint=" + TempID;
MySqlParameter[] sp = new MySqlParameter[] {
new MySqlParameter("@TempValue_nvarchar",totalHtml),
@ -153,7 +171,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
//}
}
private void AddQuestionData(string totalHtml) {
private void AddQuestionData(string totalHtml)
{
TempID = Convert.ToInt64(Globals.Request("TempID"));
string[] totalHtmlList = totalHtml.Split('$');
string kg = totalHtmlList[2];
@ -171,7 +190,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
string endNum = detailtList[5].ToUpper();
string score = detailtList[9];
if (score == "") {
if (score == "")
{
score = "0";
}
string selectNum = detailtList[6];
@ -253,7 +273,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
{
mkscoretype = "1";
}
else {
else
{
mkscoretype = detailtList[7];
}
@ -279,12 +300,12 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
/// <summary>
/// 锁定模板数据
/// </summary>
public bool AnsyTemp(string HideAreaPostionList,string totalHtml)
public bool AnsyTemp(string HideAreaPostionList, string totalHtml)
{
try
{
CommonUse commonUse = new CommonUse();
long TempID =Convert.ToInt64(Globals.Request("TempID"));
long TempID = Convert.ToInt64(Globals.Request("TempID"));
string sql = "SELECT * FROM MK_TempleteData WHERE ID_bigint=" + TempID;
DataTable dt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
if (dt.Rows.Count <= 0)
@ -321,7 +342,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
Image<Gray, byte> currentFramext = new Image<Gray, byte>(PictureBoxBitMap);
Mat color_mxxx = commonUse.GetPostionXYByFindPostionAndXieLv(imagex.Mat, selected_contours1, GetData[0], out PYPostionList, currentFramext, out xielv);
if (xielv == -100) {
if (xielv == -100)
{
Response.Write("模板配置错误,斜率无法计算");
return false;
}
@ -337,7 +359,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
int PageIndex = Convert.ToInt32(Globals.Request("PageIndex"));
if (PageIndex == 1) {
if (PageIndex == 1)
{
int mx = GetOtherBitmaplist(currentFramext.Mat, 160, PYPostionList.Split(','), GetData[9]);
if (mx == 0)
{
@ -442,8 +465,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
string[] quekao = postiontiaomaX.Split(',');
//int X = Convert.ToInt32(Convert.ToDouble(quekao[0])) - Convert.ToInt32(PYPostion[0]);
//int Y = Convert.ToInt32(Convert.ToDouble(quekao[1])) - Convert.ToInt32(PYPostion[1]);
int X = Convert.ToInt32(Convert.ToDouble(quekao[0])) ;
int Y = Convert.ToInt32(Convert.ToDouble(quekao[1])) ;
int X = Convert.ToInt32(Convert.ToDouble(quekao[0]));
int Y = Convert.ToInt32(Convert.ToDouble(quekao[1]));
int W = Convert.ToInt32(Convert.ToDouble(quekao[2]));
int H = Convert.ToInt32(Convert.ToDouble(quekao[3]));
int xuanXiang = 1;//选项数量
@ -459,7 +482,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
CvInvoke.Threshold(src, mat_threshold, Threshold, 254, Emgu.CV.CvEnum.ThresholdType.BinaryInv);
Mat mat_dilate = commonUse.MyDilate(mat_threshold);
VectorOfVectorOfPoint selected_contours;
int option_pixel_options =0;
int option_pixel_options = 0;
selected_contours = GetUsefulContoursSelectoOptionQK(mat_dilate, 1, out option_pixel_options);
mx = GetValueAndDrawGrid_Other(src.Bitmap, selected_contours, X, wL, xuanXiang, Y, hL, tiliang, "");
@ -476,7 +499,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
/// <param name="width2">轮廓外接矩形小于该宽度值</param>
/// <param name="height1">轮廓外接矩形大于该高度值</param>
/// <param name="height2">轮廓外接矩形小于该高度值</param>
public static VectorOfVectorOfPoint GetUsefulContoursSelectoOptionQK(Mat mat, double ratio,out int option_pixel_options)
public static VectorOfVectorOfPoint GetUsefulContoursSelectoOptionQK(Mat mat, double ratio, out int option_pixel_options)
{
option_pixel_options = 0;
VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint();//所有的轮廓
@ -498,10 +521,11 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
CvInvoke.ApproxPolyDP(contours[i], approx_curve, length * 0.02, true);
//bool bo = (area > 500 && area < 12000);//&& rect.Height<100
//bool bo = ((area > 20 && area < 150000) && rect.Height > 8 );
bool bo = ((area > 10 && area < 150000) && rect.Height > 5 );
bool bo = ((area > 10 && area < 150000) && rect.Height > 5);
if (bo)
{
if (pxNums > (area * 0.7)) {
if (pxNums > (area * 0.7))
{
option_pixel_options = pxNums;
selected_contours.Push(contours[i]);
}
@ -741,7 +765,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
/// 检查边距是否合格
/// </summary>
/// <param name="getdata"></param>
private string TempV(string[] GetData,string PYPostionList,int oldWidth,int oldHeight,string HideAreaPostionList) {
private string TempV(string[] GetData, string PYPostionList, int oldWidth, int oldHeight, string HideAreaPostionList)
{
double pyLeft = Convert.ToInt32(PYPostionList.Split(',')[0]);
double pyTop = Convert.ToInt32(PYPostionList.Split(',')[1]);
double Xtop = 0;
@ -778,7 +803,8 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
if (GetData[2] != "")//客观题
{
string[] keguantiList = GetData[2].Split('^');
foreach (string slist in keguantiList) {
foreach (string slist in keguantiList)
{
string[] list = slist.Split(',');
Xleft = Convert.ToDouble(list[0]);
Xtop = Convert.ToDouble(list[1]);
@ -814,7 +840,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
Xtop = Convert.ToDouble(list[1]);
Xwidth = Convert.ToDouble(list[2]);
Xheight = Convert.ToDouble(list[3]);
string tihao = list[4] ;
string tihao = list[4];
if (Xleft < pyLeft)
{
return "主观题:[" + tihao + "] 编辑框左边超过定位点边界!";
@ -944,11 +970,12 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
return "批阅分数编辑框编辑框下边超过定位点边界!";
}
}
if (HideAreaPostionList != "") {
if (HideAreaPostionList != "")
{
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
List<HideAreaData> ht = javaScriptSerializer.Deserialize<List<HideAreaData>>(HideAreaPostionList);
int count =0;
int count = 0;
foreach (HideAreaData h in ht)
{
count++;
@ -958,7 +985,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page
Xheight = Convert.ToDouble(h.height);
if (Xleft < pyLeft)
{
return "屏蔽区"+count+"编辑框左边超过定位点边界!";
return "屏蔽区" + count + "编辑框左边超过定位点边界!";
}
if (Xleft + Xwidth - pyLeft > oldWidth)

View File

@ -8,7 +8,7 @@ function ChangePageSize(obj) {
//设定全卷遮挡区域
function SetHideArea() {
var html="";
var html = "";
html += "<div class=\"main_tabletop hidearea\" style='top:100px;width:400px;'>";
html += " <div class=\"hidetext\">屏蔽显示区</div>";
html += " <div class=\"hideareaclose\" onclick=\"CloseHideArea(this)\">X</div>";
@ -34,20 +34,20 @@ function SetMao(obj, index) {
return;
}
var style = "";
var pright=parseInt($(".main_papermain").width()) -120;
var pheight=parseInt($(".main_papermain").height())-100;
var pright = parseInt($(".main_papermain").width()) - 120;
var pheight = parseInt($(".main_papermain").height()) - 100;
if (index == 0) {
style = "left:60px; top:40px;"
}
if (index == 1) {
style = "left:"+pright+"px; top:30px;"
style = "left:" + pright + "px; top:30px;"
}
if (index == 2) {
style = "left:60px; top:"+pheight+"px;"
style = "left:60px; top:" + pheight + "px;"
}
if (index == 3) {
style = "left:"+pright+"px; top:"+pheight+"px;"
style = "left:" + pright + "px; top:" + pheight + "px;"
}
$(obj).attr("class", "maodian_hover");
@ -119,8 +119,7 @@ function SetKeguanTi() {
var startnum = parseInt(tihaoList[0]);
var endnum = parseInt(tihaoList[1]);
if (endnum == undefined)
{
if (endnum == undefined) {
endnum = startnum;
}
var html = "<table class='keguan_list' cellpadding=\"0\" style='background:#ff3300;' cellspacing=\"0\">";
@ -134,12 +133,10 @@ function SetKeguanTi() {
if (listtype == 0)//横向
{
for (var i = parseInt(startnum); i <=parseInt(endnum); i++)
{
for (var i = parseInt(startnum); i <= parseInt(endnum); i++) {
html += "<tr>";
for (var j = 0; j < selectNum; j++)
{
for (var j = 0; j < selectNum; j++) {
html += "<td></td>";
}
html += "</tr>";
@ -169,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='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>");
}
function DeleteKeguanti(tihao) {
@ -187,7 +184,7 @@ function DeleteKeguanti(tihao) {
function SetZhuguanTi() {
var zhuguan_tihao = $("#zhuguan_tihao").val().toUpperCase().replace(".", "·").replace("(", "").replace(")", "").replace(")", "").replace("=", "").replace("@","");
var zhuguan_tihao = $("#zhuguan_tihao").val().toUpperCase().replace(".", "·").replace("(", "").replace(")", "").replace(")", "").replace("=", "").replace("@", "");
if (zhuguan_tihao == "") {
alert("主观题 题号不能为空");
@ -207,13 +204,13 @@ function SetZhuguanTi() {
if (zhuguan_xiaoti == "") {
zhuguan_xiaoti = "0";
}
var lineWh = "width:800px;height:200px;";
var lineWh = "width:450px;height:250px;";
var lineWhTx = "大题";
if (questiontype_zg == "2") {
var lineWh = "width:200px;height:90px;";
lineWhTx="填空"
lineWhTx = "填空"
}
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop zhuguanti' questiontype_zg='" + questiontype_zg+"' tihaovalue='" + zhuguan_tihao + "' zhuguan_xiaoti='" + zhuguan_xiaoti + "' score='" + score + "' scoretype='" + scoretype + "' style='" + lineWh + ";background:none; left:100px; top:" + (100+$(document).scrollTop()) + "px;'><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;\">" + lineWhTx+"" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop zhuguanti' questiontype_zg='" + questiontype_zg + "' tihaovalue='" + zhuguan_tihao + "' zhuguan_xiaoti='" + zhuguan_xiaoti + "' score='" + score + "' scoretype='" + scoretype + "' style='" + lineWh + ";background:none; left:100px; top:" + (100 + $(document).scrollTop()) + "px;'><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;\">" + lineWhTx + "" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
$("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" });
$("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' });
@ -340,7 +337,7 @@ function SetPYPostion(type) {
if (isHaveX) {
score = $("#keguan_" + py_tihao + "X1").attr("score");
type = $("#keguan_" + py_tihao+"X1").attr("questiontype_zg");
type = $("#keguan_" + py_tihao + "X1").attr("questiontype_zg");
}
else {
score = $("#keguan_" + py_tihao).attr("score");
@ -373,7 +370,7 @@ function SetPYPostion(type) {
var html = "";
html += "<div id=\"pyti_" + py_tihao + "\" class='main_tabletop pyti' piyueType='" + type+"' tihaovalue='" + py_tihao + "' score='" + score + "' style='" + lineWh + ";background:none;font-size:11px; background:#ff3300; left:100px; top:" + (100 + $(document).scrollTop()) + "px;'>";
html += "<div id=\"pyti_" + py_tihao + "\" class='main_tabletop pyti' piyueType='" + type + "' tihaovalue='" + py_tihao + "' score='" + score + "' style='" + lineWh + ";background:none;font-size:11px; background:#ff3300; left:100px; top:" + (100 + $(document).scrollTop()) + "px;'>";
html += "<div style =\" float:left; width:auto;text-align:center;font-size:12px; min-width:150px; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + lineWhTx + "" + py_tihao + "<span style='float:right; margin-left:5px; background:#000;color:fff; padding-left:5px; padding-right:5px;' onclick=\"closepy_hi(this)\">x</span></div>";
html += "<div style = 'width:100%;height:100%;background:#fff;border:1px solid red;' >";
html += "</div >";
@ -439,7 +436,7 @@ function GetZhuguanPostion() {
return "";
}
$(".zhuguanti").each(function () {
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("tihaovalue") + "," + $(this).attr("zhuguan_xiaoti") + "," + $(this).attr("score") + "," + $(this).attr("scoretype") + "," + $(this).attr("questiontype_zg")+"^";
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("tihaovalue") + "," + $(this).attr("zhuguan_xiaoti") + "," + $(this).attr("score") + "," + $(this).attr("scoretype") + "," + $(this).attr("questiontype_zg") + "^";
})
return xy.trim('^');
}
@ -512,7 +509,7 @@ function GetPyAreaPostion() {
return "";
}
$(".pyti").each(function () {
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("tihaovalue") + "," + $(this).attr("score") + "," + $(this).attr("piyueType")+"^";
xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("tihaovalue") + "," + $(this).attr("score") + "," + $(this).attr("piyueType") + "^";
})
return xy.trim('^');
@ -521,7 +518,7 @@ function GetPyAreaPostion() {
///////////////////统计数据//////////////////////////
function GetDataTotal(objvalue,tenant) {
function GetDataTotal(objvalue, tenant) {
if ($("#hd_isHand").val() == "1") {
if ($("#py_tihao").val() != "all") {
alert("主观题有未批阅分数,请先配置好主观题分数选择框!");
@ -555,7 +552,7 @@ function GetDataTotal(objvalue,tenant) {
return;
}
if (document.getElementById("keguan_缺考") == undefined && $("#PageIndex").val()=="1") {
if (document.getElementById("keguan_缺考") == undefined && $("#PageIndex").val() == "1") {
if (confirm("您尚未设置缺考标记,无需设置点击取消按钮")) {
return;
}
@ -574,7 +571,7 @@ function GetDataTotal(objvalue,tenant) {
if (confirm("锁定模板后,仅可修改识别区域,无法增删主客观题!")) {
$("#ansyButton").attr("disabled", "disabled");
$("#ansyButton").attr("value", "正在更新数据");
$.post("default.aspx", { action: "2", rd: Math.round(), MainTempId: MainTempId, PageIndex: PageIndex, totalHtml: encodeURIComponent(totalHtml), TempID: $("#TempID").val(), HideAreaPostionList: encodeURIComponent(hideArea),tenant:tenant }, function (res) {
$.post("default.aspx", { action: "2", rd: Math.round(), MainTempId: MainTempId, PageIndex: PageIndex, totalHtml: encodeURIComponent(totalHtml), TempID: $("#TempID").val(), HideAreaPostionList: encodeURIComponent(hideArea), tenant: tenant }, function (res) {
if (res == "ok") {
$("#ansyButton").attr("disabled", "disabled");
$("#ansyButton").attr("value", "模板已锁定");
@ -593,7 +590,7 @@ function GetDataTotal(objvalue,tenant) {
else {
$("#noButton").attr("disabled", "disabled");
$("#noButton").attr("value", "正在更新数据");
$.post("default.aspx", { action: "1", rd: Math.round(), MainTempId: MainTempId, PageIndex: PageIndex, totalHtml: encodeURIComponent(totalHtml), TempID: $("#TempID").val(), HideAreaPostionList: encodeURIComponent(hideArea),tenant:tenant }, function (res) {
$.post("default.aspx", { action: "1", rd: Math.round(), MainTempId: MainTempId, PageIndex: PageIndex, totalHtml: encodeURIComponent(totalHtml), TempID: $("#TempID").val(), HideAreaPostionList: encodeURIComponent(hideArea), tenant: tenant }, function (res) {
$("#noButton").removeAttr("disabled");
$("#noButton").attr("value", "保存数据");
if (res == "ok") {
@ -601,7 +598,7 @@ function GetDataTotal(objvalue,tenant) {
}
else {
alert(res +"或更新失败,定位点错误");
alert(res + "或更新失败,定位点错误");
}
})
}
@ -656,17 +653,17 @@ function BaseDataBind() {
}
//if(pageWidth==""){
var pageType= $("#pager_A").val();
if(pageType=="a3"){
var pageType = $("#pager_A").val();
if (pageType == "a3") {
pageWidth = 1570;
}
else{
else {
pageWidth = 1200;
}
//}
$(".main_papermain").width(pageWidth+"px");
$(".main_papermain").width(pageWidth + "px");
if ($("#pager_A").val() == "a3") {
$("#selectPageSize").val("1570");
@ -721,7 +718,7 @@ function SetPyPostion(PostionData) {
var style = "";
style = "left:" + zhuguanList[0] + "px; top: " + zhuguanList[1] + "px; width:" + zhuguanList[2] + "px;height:" + zhuguanList[3] + "px;";
var html = "";
html += "<div id=\"pyti_" + py_tihao + "\" class='main_tabletop pyti' piyueType='" + type + "' tihaovalue='" + py_tihao + "' score='" + score + "' style='" + style+";background:none;font-size:11px; background:yellow;'>";
html += "<div id=\"pyti_" + py_tihao + "\" class='main_tabletop pyti' piyueType='" + type + "' tihaovalue='" + py_tihao + "' score='" + score + "' style='" + style + ";background:none;font-size:11px; background:yellow;'>";
html += "<div style =\" float:left; width:auto;text-align:center;font-size:12px; min-width:150px; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + lineWhTx + "" + py_tihao + "<span style='float:right; margin-left:5px; background:#000;color:fff; padding-left:5px; padding-right:5px;' onclick=\"closepy_hi(this)\">x</span></div>";
html += "<div style = 'width:100%;height:100%;background:yellow;border:1px solid red;' >";
html += "</div >";
@ -780,8 +777,7 @@ function SetMaoPostion(postiondata) {
var list = postiondata.split('^');
for (var i = 0; i < list.length; i++)
{
for (var i = 0; i < list.length; i++) {
var obj = document.getElementById("point_" + i);
//左边距,右边距,长,高
if ($(obj).attr("class") == "maodian_hover") {
@ -838,8 +834,7 @@ function SetKeguanTiPostion(PostionData) {
//左边距,右边距,长,高,题号开始,题号结束,横排还是竖排
var listOption = PostionData.split('^')
for (var jt = 0; jt < listOption.length; jt++)
{
for (var jt = 0; jt < listOption.length; jt++) {
var listpostion = listOption[jt].split(',');
var tihao = listpostion[4].replace(".", "·").replace("(", "").replace(")", "").replace(")", "").replace("=", "").replace("@", "") + "-" + listpostion[5].replace(".", "·").replace("(", "").replace(")", "").replace(")", "").replace("=", "").replace("@", "");//题号
@ -877,7 +872,7 @@ function SetKeguanTiPostion(PostionData) {
if (listtype == 0)//横向
{
for (var i = parseInt(startnum) ; i <= parseInt(endnum) ; i++) {
for (var i = parseInt(startnum); i <= parseInt(endnum); i++) {
html += "<tr>";
for (var j = 0; j < selectNum; j++) {
@ -904,11 +899,11 @@ function SetKeguanTiPostion(PostionData) {
questionHtml = "判断";
}
$(".main_papermain").append("<div id=\"keguan_" + tihao + "\" questiontype=\"" + questiontype + "\" class='main_tabletop keguanti' tihaovalue='" + tihao + "' startnum='" + BigTihao + "" + startnum + "' endNum='" + BigTihao + "" + endnum + "' score='"+score+"' selectNum='" + selectNum + "' listtype='" + listtype + "' style='background:none; left:" + listpostion[0] + "px; top:" + listpostion[1] + "px;width:" + listpostion[2] + "px; height:" + listpostion[3] + "px'><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;\">" + tihao + "</div>" + html + "</div>");
$(".main_papermain").append("<div id=\"keguan_" + tihao + "\" questiontype=\"" + questiontype + "\" class='main_tabletop keguanti' tihaovalue='" + tihao + "' startnum='" + BigTihao + "" + startnum + "' endNum='" + BigTihao + "" + endnum + "' score='" + score + "' selectNum='" + selectNum + "' listtype='" + listtype + "' style='background:none; left:" + listpostion[0] + "px; top:" + listpostion[1] + "px;width:" + listpostion[2] + "px; height:" + listpostion[3] + "px'><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;\">" + tihao + "</div>" + html + "</div>");
$("#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='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>");
}
}
@ -916,15 +911,13 @@ function SetKeguanTiPostion(PostionData) {
/////////////////设置主观题//////////////////////
function SetZhuguanTiPostion(PostionData) {
if (PostionData == "" || PostionData == undefined)
{
if (PostionData == "" || PostionData == undefined) {
return;
}
//左边距,右边距,长,高,题号,小题数量
var listdata = PostionData.split('^');
for (var i = 0; i < listdata.length; i++)
{
for (var i = 0; i < listdata.length; i++) {
var zhuguanList = listdata[i].split(',');
var zhuguan_tihao = zhuguanList[4].toUpperCase().replace(".", "·").replace("(", "").replace(")", "").replace(")", "").replace("=", "").replace("@", "");
var score = zhuguanList[6] == undefined ? "" : zhuguanList[6];
@ -945,10 +938,10 @@ function SetZhuguanTiPostion(PostionData) {
lineWhTx = "填空"
}
var zhuguan_xiaoti = zhuguanList[5];
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop zhuguanti' questiontype_zg='" + questiontype_zg + "' tihaovalue='" + zhuguan_tihao + "' zhuguan_xiaoti='" + zhuguan_xiaoti + "' score='" + score + "' scoretype='" + scoretype + "' 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;\">" + lineWhTx+":" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop zhuguanti' questiontype_zg='" + questiontype_zg + "' tihaovalue='" + zhuguan_tihao + "' zhuguan_xiaoti='" + zhuguan_xiaoti + "' score='" + score + "' scoretype='" + scoretype + "' 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;\">" + lineWhTx + ":" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
$("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" });
$("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' });
$("#NowSelect").append("<li style='background:#fff;' id='selectNow_" + zhuguan_tihao + "'><div class='sp'><div class='go'>主观题</div></div><div class='sf'>" + zhuguan_tihao + "</div><div class='sm'>" + zhuguan_xiaoti + "</div><div class='ss' id='ss_" + zhuguan_tihao +"' idAtt='keguan_" + zhuguan_tihao + "' onclick=\"UpdateBaseData(1,'" + score + "','" + zhuguan_tihao + "','主观题')\">" + score + "</div><div class='ssd' id='ssd_" + zhuguan_tihao + "' onclick=\"UpdateBaseData(2,'" + scoretype + "','" + zhuguan_tihao + "','主观题')\">" + scoretypetext + "</div><div class='sd' onclick=\"DeleteKeguanti('" + zhuguan_tihao + "')\">x</div></li>");
$("#NowSelect").append("<li style='background:#fff;' id='selectNow_" + zhuguan_tihao + "'><div class='sp'><div class='go'>主观题</div></div><div class='sf'>" + zhuguan_tihao + "</div><div class='sm'>" + zhuguan_xiaoti + "</div><div class='ss' id='ss_" + zhuguan_tihao + "' idAtt='keguan_" + zhuguan_tihao + "' onclick=\"UpdateBaseData(1,'" + score + "','" + zhuguan_tihao + "','主观题')\">" + score + "</div><div class='ssd' id='ssd_" + zhuguan_tihao + "' onclick=\"UpdateBaseData(2,'" + scoretype + "','" + zhuguan_tihao + "','主观题')\">" + scoretypetext + "</div><div class='sd' onclick=\"DeleteKeguanti('" + zhuguan_tihao + "')\">x</div></li>");
}
}
////////////////设置主观题//////////////////////
@ -1040,7 +1033,7 @@ BaseDataBind();
function LockFunction(flag) {
var islocked = $("#isLocked").val();
if (islocked == true || islocked=="True"||flag==1) {
if (islocked == true || islocked == "True" || flag == 1) {
$("#ansyButton").attr("disabled", "disabled");
$("#ansyButton").attr("value", "模板已锁定");
$(".sd").hide();
@ -1055,7 +1048,7 @@ if (hd_isHand == 0) {
$("#isHand_Py").hide();
}
//批阅判定
function GetZhuguantiScoreList(){
function GetZhuguantiScoreList() {
if ($("#hd_isHand").val() == "1") {
var py_tihao = "";
var git = document.getElementById("py_tihao");
@ -1166,3 +1159,13 @@ String.prototype.trim = function (char, type) {
}
return this.replace(/^\s+|\s+$/g, '');
};
//////////// 切换页数 ////////////////
function ChangePageNum(anotherTempID) {
if (confirm("当前页未保存,是否继续切换?")){
var currentURL = window.location.href;
var newUrl = currentURL.replace(/(TempID=)\d+/, "$1" + anotherTempID);
window.location.href = newUrl;
}
}