<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="外部答题卡_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <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" />
     <%-- 禁用浏览器缓存 --%>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Cache" content="no-cache">
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <script>

   

        var SelectOBJ = null;
        $(document).ready(function (e) {
   
            $($(".main")[0]).find(".main_tabletop ").each(function () {
                $(this).click(function () {
                    SelectOBJ = this;
                })
            })
        })

        setInterval(function () {
          
            $($(".main")[0]).find(".main_tabletop ").each(function () {
                $(this).click(function () {
                    SelectOBJ = this;
                })
            })
        },500)
        $(document).keydown(function (event) {
            if (event.keyCode == 38) {//上
                $(SelectOBJ).css("top", (parseInt($(SelectOBJ).css("top")) - 1) + "px");
                event.stopPropagation();
                event.preventDefault();
              
            }
            if (event.keyCode == 40) {//下
                $(SelectOBJ).css("top", (parseInt($(SelectOBJ).css("top")) + 1) + "px");
                event.stopPropagation();
                event.preventDefault();
              
            }
            if (event.keyCode == 37) {//左
                $(SelectOBJ).css("left", (parseInt($(SelectOBJ).css("left")) - 1) + "px");
                event.stopPropagation();
                event.preventDefault();
              
            }
            if (event.keyCode == 39) {//左
                $(SelectOBJ).css("left", (parseInt($(SelectOBJ).css("left")) + 1) + "px");
                event.stopPropagation();
                event.preventDefault();
               
            }
        });
        document.body.onkeydown = function (e) {
            if (e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 37 || e.keyCode == 38) {
                return false;
            }
        }
    </script>
</head>
<body>
    <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">
            分数设置:
        <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">
            打分项设定:
        <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>
            <option value="3.5">3.5</option>
            <option value="3">3</option>
            <option value="2.5">2.5</option>
            <option value="2">2</option>
            <option value="1.5">1.5</option>
            <option value="1">1</option>
            <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>
    </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="<%=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 %>" />
    <input type="hidden" id="pager_A" value="<%=pager %>" />
    <div class="main">
        <div class="main_tool">
            <table>
                <tr>
                    <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">
                        <% if (PageIndex == "1")
                            { %>
                        <div class="pageindex_hover">第一页</div>
                        <% }
                            else
                            { %>
                        <div class="pageindex" onclick="ChangePageNum(<%=AnotherTempID %>)">第一页</div>
                        <% } %>

                    </td>
                    <% if (PageCount > 1)
                        { %>
                    <td style="padding: 0;" valign="top">
                        <% if (PageIndex == "2")
                            { %>
                        <div class="pageindex_hover">第二页</div>
                        <% }
                            else
                            { %>
                        <div class="pageindex" 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;">
                            <option value="1200">A4</option>
                            <option value="1570">A3</option>
                        </select>
                    </td>
                    <% if (PageIndex == "1")
                    { %>
                    <th valign="middle" class="lockHide">
                        <div class="main_select_one">
                            <span>准考证号:</span>
                            <select id="xuehaonum" style="font-size: 14px;">
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option selected="selected" value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                            </select>
                            <span class="main_select_set" id="main_select_set" onclick="SetXuehao(this)">设置准考证号</span>
                        </div>
                    </th> 
                    <td style="padding: 0;" valign="top" class="lockHide">
                        <div class="tiaomasz" onclick="SetTiaoMa(this)">设置条码</div>
                    </td>
                    <td class="lockHide">
                        <div class="quelapsz" onclick="SetWenziQuyu(this)">设置缺考</div>
                    </td>
                    <td class="lockHide">
                        <div class="biaozhundian" onclick="SetBiaoZhunDian(this)">标准涂点</div>
                    </td>
                    <td class="lockHide">
                        <div class="maodingdian" onclick="SetMaoDingDian(this)">锚定点</div>
                    </td>
                    
                    <% }%>
                    <td class="lockHide">
                        <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="保存数据" />
                    </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="锁定模板" />
                    </td>
                </tr>
            </table>
        </div>
        <div style="width: 1570px; overflow: hidden;">
            <div class="main_papermain"  id="mainbox_l_T">
                <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>
    <script>
        function HideRight(obj) {
            if ($(obj).html() == "折叠") {
                $(obj).html("展开");
                $(obj).css("background", "#ff3300");
                $(".right_list").fadeOut();
            }
            else {
                $(obj).html("折叠");
                $(obj).css("background", "#000000");
                $(".right_list").fadeIn();

            }
        }
    </script>
    <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;">
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option selected="selected" value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                        <option value="18">18</option>
                        <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;">
                        <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>
                    <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" />
                <div class="goPeizhi" onclick="SetZunkaoZheng()">开始配置</div>
            </li>
        </ul>

        <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>

                <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>
                    <br />
                    <br />
                    阅卷分值间隔:
                <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>
                    <option value="3.5">3.5分</option>
                    <option value="3">3分</option>
                    <option value="2.5">2.5分</option>
                    <option value="2">2分</option>
                    <option value="1.5">1.5分</option>
                    <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>
                    <option value="2">填空题</option>
                </select>
                    <% } %>
                </div>


                <br />
                <br />
                <br />
                <div style="margin-left: 45px;" class="goPeizhi" onclick="SetZhuguanTi()">开始配置</div>
                
                    <% if (Request.QueryString["ishand"] == "1")
                        { %>
                <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 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;">
        </ul>
    </div>


    <script>
        function SelectValueList() {
            var html = "";
            var score = 0.5;
            var git_fix = document.getElementById("git_fix");
            var git = document.getElementById("zgquestionscroe");
            var git00 = document.getElementById("questionscroe");
            git.options[0] = new Option("0分", "0");
            git00.options[0] = new Option("0分", "0");
            git_fix.options[0] = new Option("0分", "0");
            for (var i = 1; i <= 121; i++) {
                score = parseFloat(score) + parseFloat(0.5);
                git.options[i] = new Option(score, score);
                git00.options[i] = new Option(score, score);
                git_fix.options[i] = new Option(score, score);
            }
        }
        SelectValueList();
    </script>
    <script>
        String.prototype.trim = function (char) {
            char = char||'\s'
            char = char.replace("^", "\\^")
            char = char.replace("+", "\\+")  
            char = char.replace("$", "\\$")  
            return this.replace(new RegExp('^' + char + '*|' + char + '*$', 'g'), '');
            
        };
    </script>
    <script src="../js/index.js"></script>

</body>

</html>
