优化拆题页面

This commit is contained in:
强 杨 2023-09-13 18:19:44 +08:00
parent 8cc03f4670
commit 5e713e7ed6
3 changed files with 26 additions and 11 deletions

View File

@ -76,20 +76,21 @@
<br />
<div style="margin-left: 45px;" class="goPeizhi" onclick="SetZhuguanTi()">开始配置</div>
</div>
<div style="float: left; width: 100%;" id="chaiBox">
<h3 style="border-bottom: 1px solid #999; padding-bottom: 10px; float: left; width: 100%; text-align: center; margin-top: 10px;">拆题数据</h3>
</div>
<div style="float: left; width: 100%; margin-top: 20px;">
<div style="float: left; width: 85%; background: #000; box-shadow: 5px 5px 5px #444; color: #fff; padding: 5%;">
总分数:<label id="totalScorew">0</label>
拆分题数:<label id="totalChatiNum">0</label>
</div>
</div>
<div style="float: left; width: 280px;overflow:auto;height:300px;border:1px solid black" id="chaiBox">
</div>
<div style="float: left; width: 100%; margin-top: 20px;">
<input type="button" id="submit" onclick="SubmitChai()" value="确认保存(保存后无法修改)" style="float: left; width: 70%; margin-left: 15%; background: #f00; border-radius: 3px; box-shadow: 5px 5px 5px #444; color: #fff; text-align: center; padding: 5%;" />
<input type="button" id="submit" onclick="SubmitChai()" value="确认保存(保存后无法修改)" style="float: left; width: 70%; margin-left: 15%; cursor: pointer;background: #f00; border-radius: 3px; box-shadow: 5px 5px 5px #444; color: #fff; text-align: center; padding: 5%;" />
</div>
</div>

View File

@ -74,11 +74,11 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
long exam_subject_id = Convert.ToInt64(Globals.Request("exam_subject_id"));
long subjective = Convert.ToInt64(Globals.Request("subjective"));
var checkResult = CheckStatusByApi(subjective);
if (!checkResult.data)
{
Response.Write(checkResult.message);
Response.Write("验证失败!" + checkResult.message);
return;
}
@ -402,6 +402,7 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
string bearer = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5OGQxOGRjNC1lZDAzLTRiNzMtYTczZS1iMTIxZTRhYzliNWUiLCJpYXQiOiIwNS8yOS8yMDIzIDA5OjM3OjU0IiwidXNlciI6IjIiLCJyb2xlIjoiNSIsInRlbmFudCI6IjEwMDc4IiwibmJmIjoxNjg1MzI0Mjc0LCJleHAiOjE2ODU5MjkwNzQsImlzcyI6Im1rLWFkIiwiYXVkIjoiRXhhbU1hcmtpbmdBZG1pbkNsaWVudCJ9.lVYA6Z2RRhQFYYdj1DgxA7kB6eaYWqvB1wHmaQDBr3Y";
private result CheckStatusByApi(long subjectiveSettingId)
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.SystemDefault | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
string url = "http://192.168.2.9:6500/";
if (Request.Url.Host.ToLower().Contains("23544.com"))
{
@ -416,6 +417,8 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
}
url += "api/marking-setting/sub/" + subjectiveSettingId + "/cut-check";
//Response.Write("<script>alert('"+ bearer + ",,,,+"+ url + "')</script>");
var httpItem = new HttpItem();
httpItem.Header.Add("Authorization", bearer);
httpItem.Method = "GET";
@ -426,13 +429,14 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
var reponse = HttpHelper.Default.GetHtml(httpItem);
if (reponse.StatusCode != HttpStatusCode.OK)
{
throw new Exception("验证接口调用失败!");
throw new Exception("验证接口调用失败!" + Response.StatusCode + " ||| " + reponse.Html);
}
return (result)JavaScriptConvert.DeserializeObject(reponse.Html, typeof(result));
}
private string RequestPost(string id, string body)
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.SystemDefault | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
// 测试地址
string url = "http://192.168.2.9:6500/";
if (Request.Url.Host.ToLower().Contains("23544.com"))

View File

@ -47,10 +47,10 @@
border-radius: 5px;
}
.boxscore {
width: 180px; margin-right:5px;
width: 220px; margin-right:5px;
font-size: 12px;
border: 1px solid #ddd;
height: 80px;
height: 44px;
float: left;
margin-top: 10px; padding:10px;
position: relative; border-radius:3px; box-shadow:3px 3px 3px #333;
@ -66,5 +66,15 @@
width:100%;
}
.boxscore span {
position:absolute; right:0; bottom:0; border-radius:10px; width:30px; height:20px; line-height:20px; text-align:center; background:#ff3300; color:#fff;
position: absolute;
right: 0;
bottom: 0;
cursor: pointer;
border-radius: 10px;
width: 30px;
height: 20px;
line-height: 20px;
text-align: center;
background: #ff3300;
color: #fff;
}