| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- @using WeApp.TrainingCampGroup.Dto
- @{
- Layout = "~/Views/Shared/Layout/_Layout.Stu.cshtml";
- CampGroupDto group = ViewBag.Group;
- ViewBag.Title = "学员屏(" + group.Name + ")";
- string id = group.Id,
- groupName = group.Name,
- campNo = group.CampNo;
- bool showTip = ViewBag.ShowTip;
- }
- @section css{
- <link href="~/Content/Css/ExerciseV2_1/stu-cmd.min.css" rel="stylesheet" />
- }
- @Html.Partial("Layout/V2/_Bg", false)
- <div class="box public no-select" style="">
- <div class="box-title">决策指令下达</div>
- <div class="box-body ">
- <div class="box-header">
- <span class="title">@(groupName)指挥部 —— 组员</span>
- </div>
- <div class="body">
- <div class="cmd-form">
- <div class="scene-box">
- </div>
- <div class="role-box">
- <div class="body-card select-box">
- <select class="form-control " id="role-select" name="role" style="width: 100%" autocomplete="off" placeholder="请选择角色" onchange="GetTipInfo(); $(this).val()=='self'?$('.input-box').show():$('.input-box').hide()"></select>
- </div>
- <div class="body-card input-box ">
- <input class="form-control " id="role-input" name="self-role" style="width: 100%" autocomplete="off" placeholder="请输入自定义角色" />
- </div>
- </div>
- <div class="d-flex">
- <div class="cmd-box body-card" style="width: 100%">
- <textarea class="form-control txt" rows="6" name="message" placeholder="请输入指令内容"></textarea>
- @if (showTip)
- {
- <button type="button" class="btn btn-submit " onclick="ShowTips(this)">打开辅助提示</button>
- }
- </div>
- @if (showTip)
- {
- <div class="tip-box body-card" style="margin-left: 10px;">
- <div class="tip-header">辅助提示</div>
- <div class="tip-body"></div>
- </div>
- }
- </div>
- <div class="body-card">
- <button type="button" class="btn btn-submit" style="width: 150px;" onclick="RoleHandle(this)">提交指令</button>
- </div>
- </div>
- </div>
- </div>
- <div style="position: absolute; left: 0; bottom: 0; color: #ddd; opacity: 0.5;">@(groupName)</div>
- </div>
- @section scripts
- {
- <script src="~/Content/Js/V2.1/stu-cmd.js"></script>
- <script>
- setCampGroup("@(campNo)", "@(id)", @(showTip?"true":"false"), "SaveOperationScene");
- function resizeHeight_Cmd() {
- var fs = 38;
- var h = $("#bg_header").height();
- var newFs = fs * h / 126;
- $(".box .box-title").height(h)
- .css("fontSize", newFs + "px");
- var sh = $(".box .scene-box").height();
- resizeHeight((h, wh) => {
- var height = 265;
- $(".cmd-box,.tip-box").height(wh - h - height - sh);
- })
- }
- </script>
- <script id="hub">
- abp.signalr.connect(['@(id)','@(campNo)']);
- iwbHub.client.getReloadAll = function (msg) {
- console.log('getReloadAll: ', msg);
- if (msg) {
- try {
- var data = JSON.parse(msg);
- if (data) {
- if (data.no == '@(id)'|| data.no == '@(campNo)') {
- window.location.reload();
- }
- }
- } catch (e) {
- console.log('getReloadAll: ', e);
- }
- }
- };
- iwbHub.client.getReloadStu = function (msg) {
- console.log('getReloadStu: ', msg);
- if (msg) {
- try {
- var data = JSON.parse(msg);
- if (data) {
- if (data.no == '@(id)'|| data.no == '@(campNo)') {
- window.location.reload();
- }
- }
- } catch (e) {
- console.log('getReloadStu: ', e);
- }
- }
- };
- iwbHub.client.getNewScene = function(msg) {
- console.log('getNewScene: ', msg);
- if (msg) {
- try {
- var data = typeof msg == 'string' ? JSON.parse(msg) : msg;
- if (data) {
- if (data.no == '@(id)') {
- RefeshRunningScene();
- }
- }
- } catch (e) {
- console.log('getNewScene: ', e);
- }
- }
- };
- iwbHub.client.getRefreshScene = function(msg) {
- console.log('getRefreshScene: ', msg);
- if (msg && msg == '@(id)') {
- RefeshRunningScene(true);
- }
- };
- </script>
- }
|