1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- @using WeApp.TrainingCampGroup.Dto
- @{
- Layout = "~/Views/Shared/Layout/_Layout.Spec.cshtml";
- string campName = ViewBag.CampName;
- ViewBag.Title = "手动记录演练情况(" + campName + ")";
- List<CampGroupDto> groups = ViewBag.Groups;
- string groupSelects = "<option value=\"\">请选择培训营分组...</option>";
- if (groups != null && groups.Any())
- {
- foreach (var g in groups)
- {
- groupSelects += "<option value=\"" + g.Id + "\">" + g.Name + "</option>";
- }
- }
- }
- <style>
- .main-box{
- display: flex;
- justify-content: center;
- align-items: center;
- background-image: linear-gradient(45deg,#005f61,#007f61);
- }
- .box {
- margin-top: -10%;
- width: 80%;
- max-width: 400px;
- }
- .box .title {
- text-align: center;
- font-size: 20px;
- font-weight: 600;
- color: #fff;
- padding: 10px;
- }
- @@media(min-device-width: 700px) {
- .box {
- max-width: 600px;
- }
- .box .title {
- font-size: 26px;
- padding: 15px;
- }
- }
- </style>
- <div class="main-box" style="height: 100vh; width: 100vw; box-sizing: padding-box; position: relative">
- <div class="box">
- <div class="title">演练情况记录</div>
- <div class="form-group">
- <select id="group" class="form-control" style="width: 100%">
- @Html.Raw(groupSelects)
- </select>
- </div>
- <div class="form-group">
- <textarea id="txt" class="form-control" style="width: 100%; height: 100px;" placeholder="请输入内容..."></textarea>
- </div>
- <button id="btn" class="btn btn-iwb btn-block" type="button" onclick="Go()">记录演练实时情况</button>
- </div>
- </div>
- @section scripts
- {
- <script src="~/Content/Js/scene-path.js"></script>
- <script>
- function Go() {
- var no = $("#group").val();
- if (!no) {
- abp.message.warn("请选择一个培训营分组!");
- return;
- }
- var txt = $("#txt").val();
- if (!txt) {
- abp.message.warn("请输入内容!");
- return;
- }
- $("#btn").prop("disable", true);
- $.iwbAjax1({
- url: abp.appUrl + "Eval/ManualLog",
- data: { no: no, msg: txt },
- success: function () {
- $("#txt").val("");
- }
- });
- setTimeout(function () { $("#btn").prop("disable", false); }, 1000 * 10);
- }
- </script>
- }
|