|
|
@@ -25,16 +25,26 @@
|
|
|
<div class="main-box box">
|
|
|
<div class="btn-box">
|
|
|
<span onclick="Carousel(this)" class="vb-btn active" style="margin-right: 15px;">停止轮播</span>
|
|
|
- <span onclick="Question()" class="vb-btn" style="margin-right: 15px;">学员提问</span>
|
|
|
- <span onclick="Answer()" class="vb-btn" style="margin-right: 15px;">
|
|
|
- 学员回答
|
|
|
- <span id="answer-count" class="tag"></span>
|
|
|
- </span>
|
|
|
- @* <span onclick="Reviews()" class="vb-btn" style="margin-right: 15px;">我要点评</span> *@
|
|
|
+ <span onclick="ScenePath()" class="vb-btn" style="margin-right: 15px;">情景路径</span>
|
|
|
+ <span onclick="Reviews()" class="vb-btn" style="margin-right: 15px;">我要点评</span>
|
|
|
</div>
|
|
|
<div class="btn-box btn-box-right">
|
|
|
- <span onclick="ScenePath()" class="vb-btn" style="margin-right: 15px;">情景路径</span>
|
|
|
+ <div onclick="QuestionList()" class="btn-question" style="margin-right: 15px;">
|
|
|
+ <img class="img" src="/Content/Image/ExerciseV2/spec-question.png" />
|
|
|
+ <span class="text">专家提问</span>
|
|
|
+ <span class="dot"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="question-list-box">
|
|
|
+ <div class="question-header">
|
|
|
+ <div class="title">提问记录</div>
|
|
|
+ <div class="btn btn-submit" onclick="QuestionModal()">我要提问</div>
|
|
|
+ </div>
|
|
|
+ <div class="question-body"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
@if (groups != null)
|
|
|
{
|
|
|
<div id="Carousel" class="carousel slide" data-ride="carousel" data-pause="false" data-interval="30000" style="width: 100%; height: 100%;">
|
|
|
@@ -95,8 +105,7 @@
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header" style="cursor: move;">
|
|
|
<h4 class="modal-title">
|
|
|
- <span>学员提问</span>
|
|
|
- <span onclick="Answer()" class="vb-btn" style="margin-left: 15px;">查看回答列表</span>
|
|
|
+ <span>我要提问</span>
|
|
|
</h4>
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
</div>
|
|
|
@@ -132,6 +141,7 @@
|
|
|
<script>
|
|
|
|
|
|
$(function () {
|
|
|
+
|
|
|
resizeHeight_Screen();
|
|
|
window.addEventListener('resize', resizeHeight_Screen);
|
|
|
@if (groups != null && groups.Any())
|
|
|
@@ -150,6 +160,12 @@
|
|
|
});
|
|
|
</text>
|
|
|
}
|
|
|
+
|
|
|
+ $(document).on("click", function (e) {
|
|
|
+ if ($(e.target).closest(".question-list-box").length == 0 && $(".question-list-box").hasClass("show")) {
|
|
|
+ $(".question-list-box").removeClass("show").fadeOut(600);
|
|
|
+ }
|
|
|
+ })
|
|
|
});
|
|
|
|
|
|
function resizeHeight_Screen() {
|
|
|
@@ -246,89 +262,84 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- function Question() {
|
|
|
- OpenModal({
|
|
|
- modal:"modal_question",
|
|
|
- url: abp.appUrl + 'eval/SpecialistQuestion',
|
|
|
- data: { campNo: '@(id)' },
|
|
|
- success: function() {
|
|
|
- $('.question-box button').fadeOut();
|
|
|
- $(".question-box").html("")
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ function QuestionList() {
|
|
|
+ $(".btn-question").removeClass("notity")
|
|
|
+ $.iwbAjax4({
|
|
|
+ url: abp.appUrl + `query/GetQuestionAndAnswerByCamp?campNo=@(id)`,
|
|
|
+ success: function (res) {
|
|
|
+ formatQa(res);
|
|
|
+ $(".question-list-box").addClass("show").fadeIn(500);
|
|
|
|
|
|
- function Answer() {
|
|
|
- $("#answer-count").removeClass("tag-lg").html("")
|
|
|
- $.iwbAjax4({
|
|
|
- url: abp.appUrl + `query/GetQuestionAndAnswerByCamp?campNo=@(id)`,
|
|
|
- success: function (res) {
|
|
|
- $(document).iwbModal('create', {
|
|
|
- modal: 'modal-answers',
|
|
|
- modaltitle: '学员回答提问列表',
|
|
|
- width: 1200,
|
|
|
- modalBody: formatQa(res),
|
|
|
- modalFooter:`<div class="modal-footer" style="text-align: center;"><button type="button" class="btn btn-sm btn-outline-iwb waves-effect" data-dismiss="modal" style="min-width:100px;">关闭</button></div>`,
|
|
|
- data: null,
|
|
|
- shownAfter: function () {
|
|
|
- var $modal = $("#modal-answers");
|
|
|
- $modal.css('display', 'block');
|
|
|
- var topHeight = $(window).height() - $modal.find('.modal-dialog').height() - 150;
|
|
|
- if (topHeight < 50) {
|
|
|
- topHeight = 50;
|
|
|
- }
|
|
|
- $modal.find('.modal-dialog').animate({ 'marginTop': topHeight / 2 + "px" });
|
|
|
- },
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
function formatQa(data) {
|
|
|
- var str = `<div class="question-list">`;
|
|
|
+ var str = ``;
|
|
|
if (data && data.length) {
|
|
|
data.forEach(function (v) {
|
|
|
- str += `<div class="question-item d-flex flex-column">
|
|
|
- <div class="question">
|
|
|
- <span class="group">${v.groupName}</span>
|
|
|
- <strong class="title">问题:</strong>
|
|
|
- <span class="text">${v.question}</span>
|
|
|
- </div>
|
|
|
- <div class="answers">
|
|
|
- ${_formatAnswer(v.answers,v)}
|
|
|
- </div>
|
|
|
- </div>`;
|
|
|
+ str += `<div class="question-item">
|
|
|
+ <div class="img">
|
|
|
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
+ <circle cx="24" cy="24" r="24" fill="white" />
|
|
|
+ <path d="M24.0007 11C27.4734 11 30.7373 12.3518 33.192 14.808C34.4029 16.0122 35.363 17.4445 36.0166 19.0222C36.6702 20.5999 37.0045 22.2916 37 23.9993C37 27.4719 35.6482 30.7359 33.192 33.192C31.9878 34.4029 30.5555 35.363 28.9778 36.0166C27.4001 36.6703 25.7084 37.0045 24.0007 37H14.2342C14.0619 37.0001 13.8936 36.9489 13.7506 36.8528C13.6076 36.7567 13.4966 36.6202 13.4316 36.4606C13.3666 36.3011 13.3507 36.1258 13.3859 35.9572C13.4211 35.7886 13.5057 35.6343 13.6291 35.5141C14.1701 34.9835 14.9704 33.9462 14.9674 33.4096C14.9674 33.35 14.957 33.3396 14.9421 33.3247C13.6926 32.1146 12.6996 30.6652 12.0223 29.063C11.3451 27.4609 10.9974 25.7387 11 23.9993C11 20.5267 12.3518 17.2627 14.808 14.808C16.0121 13.5971 17.4445 12.637 19.0222 11.9834C20.5999 11.3298 22.2915 10.9955 23.9992 11H24.0007Z" fill="url(#paint0_linear_632_2438)" />
|
|
|
+ <circle cx="17.4836" cy="23.9758" r="1.60963" fill="white" />
|
|
|
+ <circle cx="23.9231" cy="23.9749" r="1.60963" fill="white" />
|
|
|
+ <circle cx="30.3606" cy="23.9749" r="1.60963" fill="white" />
|
|
|
+ <defs>
|
|
|
+ <linearGradient id="paint0_linear_632_2438" x1="17" y1="11" x2="32" y2="37" gradientUnits="userSpaceOnUse">
|
|
|
+ <stop stop-color="#0AE5F5" />
|
|
|
+ <stop offset="1" stop-color="#005CE7" />
|
|
|
+ </linearGradient>
|
|
|
+ </defs>
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="question">
|
|
|
+ <span class="text">${v.question}</span>
|
|
|
+ <span class="group">${v.groupName}</span>
|
|
|
+ </div>
|
|
|
+ <div class="answers">
|
|
|
+ ${_formatAnswer(v.answers, v)}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>`;
|
|
|
})
|
|
|
} else {
|
|
|
- str+=`<span class="empty">暂无提问,请先提问学员!</span>`
|
|
|
+ str += `
|
|
|
+ <div class="empty">
|
|
|
+ <img class="img" src="/Content/Image/ExerciseV2/empty.png">
|
|
|
+ <span class="text">没有记录先去提问吧~</span>
|
|
|
+ </div>
|
|
|
+ `
|
|
|
}
|
|
|
- str += `</div>`;
|
|
|
- return str;
|
|
|
-
|
|
|
- function _formatAnswer(answers,question) {
|
|
|
+ $(".question-body").html(str);
|
|
|
+ function _formatAnswer(answers, question) {
|
|
|
var awStr = "";
|
|
|
if (answers && answers.length) {
|
|
|
answers.forEach(function (vv) {
|
|
|
awStr += `<div class="answer">
|
|
|
- ${question.groupName == "全部分组" ? `<strong class="name">${vv.groupName}:</strong>` : ''}
|
|
|
- <span class="text">${vv.answer}</span>
|
|
|
- </div>`;
|
|
|
+ ${question.groupName == "全部分组" ? `<strong class="name">${vv.groupName}:</strong>` : ''}
|
|
|
+ <span class="text">${vv.answer}</span>
|
|
|
+ </div>`;
|
|
|
})
|
|
|
} else {
|
|
|
- awStr = `<span class="empty anwser-empty">学员暂未回答</span>`
|
|
|
+ awStr = `<span class="answer anwser-empty">学员暂未回答</span>`
|
|
|
}
|
|
|
return awStr;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function addAnsweCount() {
|
|
|
- var $that = $("#answer-count");
|
|
|
- var count = Number($that.removeClass("tag-lg").text()) || 0;
|
|
|
- count++;
|
|
|
- if (count > 9) {
|
|
|
- $that.addClass("tag-lg");
|
|
|
- }
|
|
|
- $that.text(count)
|
|
|
+ function QuestionModal() {
|
|
|
+ $(".question-list-box").removeClass("show").fadeOut(600);
|
|
|
+ OpenModal({
|
|
|
+ modal:"modal_question",
|
|
|
+ url: abp.appUrl + 'eval/SpecialistQuestion',
|
|
|
+ data: { campNo: '@(id)' },
|
|
|
+ success: function() {
|
|
|
+ $('.question-box button').fadeOut();
|
|
|
+ $(".question-box").html("")
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
iwbHub.client.getReloadAll = function (msg) {
|
|
|
@@ -380,8 +391,8 @@
|
|
|
iwbHub.client.getStudentAnswer = function(msg) {
|
|
|
console.log('getStudentAnswer: ', msg);
|
|
|
if (msg) {
|
|
|
- addAnsweCount()
|
|
|
+ $(".btn-question").addClass("notity")
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
- }
|
|
|
+}
|