courseList.cpp 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
  1. #include "courseList.h"
  2. #include "ui_courseList.h"
  3. #include "awMsgBox.h"
  4. #include <QDesktopWidget>
  5. #include <QMouseEvent>
  6. #include "CAppInfo.h"
  7. #include "CSqlite3DBProc.h"
  8. courseList::courseList(QWidget *parent) :
  9. QWidget(parent),
  10. ui(new Ui::courseList)
  11. {
  12. ui->setupUi(this);
  13. setWindowFlags(Qt::FramelessWindowHint);
  14. setStyleSheet(g_appInfoPtr->m_sQssStr);
  15. qRegisterMetaType<CGetStudentInfoBySession>("CGetStudentInfoBySession");
  16. connect(g_httpBllPtr.get(), &CHttpBll::sgnGetStudentInfoBySession, this, &courseList::onGetStudentInfoBySession);
  17. qRegisterMetaType<CSpecialtyNameList>("CSpecialtyNameList");
  18. connect(g_httpBllPtr.get(), &CHttpBll::sgnSpecialtyNameList, this, &courseList::onSpecialtyNameList);
  19. qRegisterMetaType<CCheckExamInProgress>("CCheckExamInProgress");
  20. connect(g_httpBllPtr.get(), &CHttpBll::sgnCheckExamInProgress, this, &courseList::onCheckExamInProgress);
  21. qRegisterMetaType<CGetStudentClientMenu>("CGetStudentClientMenu");
  22. connect(g_httpBllPtr.get(), &CHttpBll::sgnGetStudentClientMenu, this, &courseList::onGetStudentClientMenu);
  23. qRegisterMetaType<CGetUserNoticeList>("CGetUserNoticeList");
  24. connect(g_httpBllPtr.get(), &CHttpBll::sgnGetUserNoticeList, this, &courseList::onGetUserNoticeList);
  25. qRegisterMetaType<CDownLoadFileInfo>("CDownLoadFileInfo");
  26. connect(g_httpBllPtr.get(), &CHttpBll::sgnDownLoadFile, this, &courseList::onDownLoadFile);
  27. qRegisterMetaType<CAppDownLoadUrl>("CAppDownLoadUrl");
  28. connect(g_httpBllPtr.get(), &CHttpBll::sgnAppDownLoadUrl, this, &courseList::onAppDownLoadUrl);
  29. qRegisterMetaType<CStartExamLimit>("CStartExamLimit");
  30. connect(g_httpBllPtr.get(), &CHttpBll::sgnStartExamLimit, this, &courseList::onStartExamLimit);
  31. qRegisterMetaType<CIpLimit>("CIpLimit");
  32. connect(g_httpBllPtr.get(), &CHttpBll::sgnIpLimit, this, &courseList::onIpLimit);
  33. qRegisterMetaType<CGetExamProperty>("CGetExamProperty");
  34. connect(g_httpBllPtr.get(), &CHttpBll::sgnGetExamProperty, this, &courseList::onGetExamProperty);
  35. qRegisterMetaType<CFaceCheckEnabled>("CFaceCheckEnabled");
  36. connect(g_httpBllPtr.get(), &CHttpBll::sgnFaceCheckEnabled, this, &courseList::onFaceCheckEnabled);
  37. qRegisterMetaType<CLivenessEnabled>("CLivenessEnabled");
  38. connect(g_httpBllPtr.get(), &CHttpBll::sgnLivenessEnabled, this, &courseList::onLivenessEnabled);
  39. qRegisterMetaType<CEndExam>("CEndExam");
  40. connect(g_httpBllPtr.get(), &CHttpBll::sgnEndExam, this, &courseList::onEndExam);
  41. qRegisterMetaType<CGetOrgPropertiesByGroupWithoutCache>("CGetOrgPropertiesByGroupWithoutCache");
  42. connect(g_httpBllPtr.get(), &CHttpBll::sgnGetOrgPropertiesByGroupWithoutCache, this, &courseList::onGetOrgPropertiesByGroupWithoutCache);
  43. sqlite3_stmt *stmt;
  44. QString sSql = QString("select agreement from t_agreement where student_id=%1")
  45. .arg(g_appInfoPtr->m_nStudentId);
  46. if (!g_sysDBProcPtr->QuerySql(sSql.toStdString(), &stmt))
  47. {
  48. ShowMsg(QString::fromLocal8Bit("加载隐私协议信息失败!"), this, MSG_ICON_TYPE::mit_error);
  49. }
  50. bool bAgreement = false;
  51. int nField = 0;
  52. g_sysDBProcPtr->BeginGetFields(stmt);
  53. if (!g_sysDBProcPtr->Eof())
  54. {
  55. if (g_sysDBProcPtr->GetFields(0, nField, stmt) == 1)
  56. {
  57. bAgreement = true;
  58. }
  59. }
  60. g_sysDBProcPtr->EndGetFields(stmt);
  61. if (!bAgreement)
  62. {
  63. if (m_pPrivacyWidget == nullptr)
  64. {
  65. m_pPrivacyWidget = std::make_shared<privacyWidget>(this);
  66. connect(m_pPrivacyWidget.get(), &privacyWidget::agreement, this, [&]() {
  67. m_pPrivacyWidget.reset();
  68. getStudentInfoBySession();
  69. });
  70. connect(m_pPrivacyWidget.get(), &privacyWidget::disAgreement, this, [&]() {
  71. on_btn_exit_clicked();
  72. });
  73. }
  74. m_pPrivacyWidget->show();
  75. }
  76. else
  77. {
  78. getStudentInfoBySession();
  79. }
  80. initUI();
  81. m_pMobileLogin = nullptr;
  82. m_pStudentInfo = nullptr;
  83. m_pMobileLoginBtnTimer = std::make_shared<QTimer>();
  84. m_pMobileLoginBtnTimer->setInterval(500);
  85. connect(m_pMobileLoginBtnTimer.get(), &QTimer::timeout, this, &courseList::hideMobileLoginBtn);
  86. m_pStudentInfoBtnTimer = std::make_shared<QTimer>();
  87. m_pStudentInfoBtnTimer->setInterval(500);
  88. connect(m_pStudentInfoBtnTimer.get(), &QTimer::timeout, this, &courseList::hideStudentInfoBtn);
  89. m_pServerTime = std::make_shared<QTimer>();
  90. m_pServerTime->setInterval(1000);
  91. connect(m_pServerTime.get(), &QTimer::timeout, this, [&]() {
  92. ui->label_serverTime->adjustSize();
  93. ui->label_serverTime->setText(QString::fromLocal8Bit("服务器时间:%1")
  94. .arg(QDateTime::fromMSecsSinceEpoch(g_appInfoPtr->serverMTime()).toString("yyyy-MM-dd hh:mm:ss")));
  95. });
  96. m_pServerTime->start();
  97. m_pRefreshMenuTimer = std::make_shared<QTimer>();
  98. m_pRefreshMenuTimer->setInterval(1000 * 60 * 3);
  99. connect(m_pRefreshMenuTimer.get(), &QTimer::timeout, this, []() {
  100. CHttpRequestPackage hrp;
  101. hrp.sUri = "/api/ecs_core/rolePrivilege/getStudentClientMenu";
  102. hrp.nRequestType = RequestType::rtGetStudentClientMenu;
  103. hrp.sParamList.push_back(QString::fromLocal8Bit("rootOrgId,%1").arg(g_appInfoPtr->m_sRootOrgId));
  104. g_httpBllPtr->get(hrp);
  105. });
  106. m_pOnlineTimer = std::make_shared<QTimer>();
  107. m_pOnlineTimer->setInterval(1000*60*3);
  108. connect(m_pOnlineTimer.get(), &QTimer::timeout, this, []() {
  109. CHttpRequestPackage hrp1;
  110. hrp1.sUri = "/api/ecs_core/student/online_signal/" + QString::number(g_appInfoPtr->m_nStudentId);
  111. hrp1.nRequestType = RequestType::rtOnlineSignal;
  112. g_httpBllPtr->get(hrp1);
  113. });
  114. ui->btn_mobileLogin->installEventFilter(this);
  115. ui->btn_studentInfo->installEventFilter(this);
  116. m_pOnlineTimer->start();
  117. m_pRefreshMenuTimer->start();
  118. if (!g_appInfoPtr->m_sMenuLogoUrl.isEmpty())
  119. {
  120. QString sFileName = g_appInfoPtr->m_sMenuLogoUrl.right(g_appInfoPtr->m_sMenuLogoUrl.length() - g_appInfoPtr->m_sMenuLogoUrl.lastIndexOf("/") - 1);
  121. sFileName = g_appInfoPtr->m_sCacheFileDir + sFileName;
  122. CHttpRequestPackage hrp;
  123. hrp.sUri = g_appInfoPtr->m_sMenuLogoUrl;
  124. hrp.sCommonStr = sFileName;
  125. hrp.sCommonStr1 = __FILE__;
  126. hrp.sAdditionStr = "MenuLogoUrl";
  127. hrp.nRequestType = RequestType::rtDownLoadFile;
  128. hrp.nRetryCount = 3;
  129. g_httpBllPtr->downLoad(hrp);
  130. }
  131. else
  132. {
  133. ui->label_cl_org_icon->setPixmap(QPixmap(":/images/qm-logo.png").scaled(ui->label_cl_org_icon->width(), ui->label_cl_org_icon->height(),
  134. Qt::KeepAspectRatio, Qt::SmoothTransformation));
  135. }
  136. }
  137. courseList::~courseList()
  138. {
  139. awMsgBox::clear(this);
  140. delete ui;
  141. }
  142. void courseList::initUI()
  143. {
  144. QDesktopWidget *dekwiget = QApplication::desktop();
  145. setGeometry(0, 0, dekwiget->width(), dekwiget->height());
  146. ui->label_cl_company->setVisible(false);
  147. ui->widget_cl_BG->setGeometry(0, 0, dekwiget->width(), dekwiget->height());
  148. ui->widget_menu->setGeometry(0, 0, g_appInfoPtr->m_fRate*96, height());
  149. ui->widget_top->setGeometry(ui->widget_menu->width(), 0, width() - ui->widget_menu->width(), g_appInfoPtr->m_fRate*56);
  150. ui->widget_bottom->setGeometry(ui->widget_top->x(), height() - g_appInfoPtr->m_fRate*38, ui->widget_top->width(), g_appInfoPtr->m_fRate*38);
  151. ui->stw_courseList->setGeometry(ui->widget_top->x(), ui->widget_top->y() + ui->widget_top->height(),
  152. ui->widget_top->width(), height() - ui->widget_top->height() - ui->widget_bottom->height());
  153. /*
  154. clOnlineExam *cloe = new clOnlineExam;
  155. cloe->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  156. ui->stw_courseList->addWidget(cloe);
  157. clOnlineHomework *clow = new clOnlineHomework;
  158. clow->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  159. ui->stw_courseList->addWidget(clow);
  160. clOnlinePractice *clop = new clOnlinePractice;
  161. clop->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  162. ui->stw_courseList->addWidget(clop);
  163. clOfflineExam *cloffe = new clOfflineExam;
  164. cloffe->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  165. ui->stw_courseList->addWidget(cloffe);
  166. clNoticeList *clnl = new clNoticeList;
  167. clnl->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  168. ui->stw_courseList->addWidget(clnl);
  169. clEditPassword *clep = new clEditPassword;
  170. clep->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  171. ui->stw_courseList->addWidget(clep);
  172. ui->stw_courseList->setCurrentIndex(0);
  173. */
  174. ui->label_cl_org_icon->setGeometry(g_appInfoPtr->m_fRate*15, g_appInfoPtr->m_fRate*15, g_appInfoPtr->m_fRate*66, g_appInfoPtr->m_fRate*66);
  175. ui->btn_onlineExam->setGeometry(g_appInfoPtr->m_fRate*20, g_appInfoPtr->m_fRate*103, g_appInfoPtr->m_fRate*56, g_appInfoPtr->m_fRate*66);
  176. ui->btn_onlineHomework->setGeometry(ui->btn_onlineExam->x(), ui->btn_onlineExam->y() + ui->btn_onlineExam->height() + g_appInfoPtr->m_fRate*17,
  177. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  178. ui->btn_onlinePractice->setGeometry(ui->btn_onlineExam->x(), ui->btn_onlineHomework->y() + ui->btn_onlineHomework->height() + g_appInfoPtr->m_fRate*17,
  179. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  180. ui->btn_offlineExam->setGeometry(ui->btn_onlineExam->x(), ui->btn_onlinePractice->y() + ui->btn_onlinePractice->height() + g_appInfoPtr->m_fRate*17,
  181. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  182. ui->btn_notice->setGeometry(ui->btn_onlineExam->x(), ui->btn_offlineExam->y() + ui->btn_offlineExam->height() + g_appInfoPtr->m_fRate*17,
  183. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  184. ui->btn_noticeNum->setGeometry(ui->btn_notice->x() + ui->btn_notice->width() - g_appInfoPtr->m_fRate*16, ui->btn_notice->y(),
  185. g_appInfoPtr->m_fRate*16, g_appInfoPtr->m_fRate*16);
  186. ui->btn_noticeNum->setVisible(false);
  187. ui->btn_editPassword->setGeometry(ui->btn_onlineExam->x(), ui->btn_notice->y() + ui->btn_notice->height() + g_appInfoPtr->m_fRate*17,
  188. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  189. ui->label_currentPlaceIcon->setGeometry(g_appInfoPtr->m_fRate*30, (ui->widget_top->height() - g_appInfoPtr->m_fRate*10)/2,
  190. g_appInfoPtr->m_fRate*10, g_appInfoPtr->m_fRate*10);
  191. ui->label_currrentPlace->adjustSize();
  192. ui->label_currrentPlace->setGeometry(ui->label_currentPlaceIcon->x() + ui->label_currentPlaceIcon->width() + g_appInfoPtr->m_fRate*10,
  193. (ui->widget_top->height() - ui->label_currrentPlace->height())/2, g_appInfoPtr->m_fRate*400, ui->label_currrentPlace->height());
  194. ui->btn_cl_close->setGeometry(ui->widget_top->width() - g_appInfoPtr->m_fRate*10 - g_appInfoPtr->m_fRate*24, g_appInfoPtr->m_fRate*16,
  195. g_appInfoPtr->m_fRate*24, g_appInfoPtr->m_fRate*24);
  196. ui->btn_minisize->setGeometry(ui->btn_cl_close->x() - g_appInfoPtr->m_fRate*6 - ui->btn_cl_close->width(), ui->btn_cl_close->y(),
  197. ui->btn_cl_close->width(), ui->btn_cl_close->height());
  198. ui->label_VLine->setGeometry(ui->btn_minisize->x() - g_appInfoPtr->m_fRate*21, ui->btn_cl_close->y(),
  199. g_appInfoPtr->m_fRate*1 < 1 ? 1 : g_appInfoPtr->m_fRate*1, g_appInfoPtr->m_fRate*24);
  200. ui->btn_exit->setGeometry(ui->label_VLine->x() - g_appInfoPtr->m_fRate*(20+24), ui->btn_cl_close->y(),
  201. ui->btn_cl_close->width(), ui->btn_cl_close->height());
  202. ui->btn_studentInfo->setGeometry(ui->btn_exit->x() - g_appInfoPtr->m_fRate*(10+90), ui->btn_cl_close->y(),
  203. g_appInfoPtr->m_fRate*90, g_appInfoPtr->m_fRate*24);
  204. ui->btn_studentInfo->setIconSize(QSize(g_appInfoPtr->m_fRate*8, g_appInfoPtr->m_fRate*8));
  205. ui->btn_studentInfo->setIcon(QIcon(":/images/icon-student-info.png"));
  206. ui->label_arrow->setGeometry(ui->btn_studentInfo->x() + (ui->btn_studentInfo->width() - g_appInfoPtr->m_fRate*12)/2,
  207. ui->btn_studentInfo->y() + ui->btn_studentInfo->height(),
  208. g_appInfoPtr->m_fRate*12, g_appInfoPtr->m_fRate*3);
  209. ui->label_arrow->setVisible(false);
  210. ui->btn_mobileLogin->setGeometry(ui->btn_studentInfo->x() - g_appInfoPtr->m_fRate*(10+167), ui->btn_cl_close->y(),
  211. g_appInfoPtr->m_fRate*167, g_appInfoPtr->m_fRate*24);
  212. ui->btn_mobileLogin->setIconSize(QSize(g_appInfoPtr->m_fRate*8, g_appInfoPtr->m_fRate*8));
  213. ui->btn_mobileLogin->setIcon(QIcon(":/images/icon-mobile-login.png"));
  214. ui->label_cl_company->adjustSize();
  215. ui->label_cl_company->setGeometry(g_appInfoPtr->m_fRate*30, (ui->widget_bottom->height() - ui->label_cl_company->height())/2,
  216. ui->label_cl_company->width(), ui->label_cl_company->height());
  217. ui->label_cl_version->adjustSize();
  218. ui->label_cl_version->setGeometry(ui->widget_bottom->width() - g_appInfoPtr->m_fRate*30 - ui->label_cl_version->width(),
  219. ui->label_cl_company->y(), ui->label_cl_version->width(), ui->label_cl_version->height());
  220. ui->label_serverTime->setText(QString::fromLocal8Bit("服务器时间:%1")
  221. .arg(QDateTime::fromMSecsSinceEpoch(g_appInfoPtr->serverMTime()).toString("yyyy-MM-dd hh:mm:ss")));
  222. ui->label_serverTime->adjustSize();
  223. ui->label_serverTime->setGeometry(ui->label_cl_version->x() - g_appInfoPtr->m_fRate*20 - ui->label_serverTime->width(), ui->label_cl_company->y(),
  224. ui->label_serverTime->width(), ui->label_serverTime->height());
  225. setCheck(COURSE_MENU_BTN_TYPE::cmbt_online_exam);
  226. }
  227. void courseList::menuBtnRePosistion()
  228. {
  229. int nTop = g_appInfoPtr->m_fRate * 103;
  230. if(ui->btn_onlineExam->isVisible())
  231. {
  232. ui->btn_onlineExam->setGeometry(g_appInfoPtr->m_fRate * 20, nTop, g_appInfoPtr->m_fRate * 56, g_appInfoPtr->m_fRate * 66);
  233. nTop = nTop + ui->btn_onlineExam->height() + g_appInfoPtr->m_fRate * 17;
  234. }
  235. if(ui->btn_onlineHomework->isVisible())
  236. {
  237. ui->btn_onlineHomework->setGeometry(ui->btn_onlineExam->x(), nTop,
  238. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  239. nTop = nTop + ui->btn_onlineExam->height() + g_appInfoPtr->m_fRate * 17;
  240. }
  241. if (ui->btn_onlinePractice->isVisible())
  242. {
  243. ui->btn_onlinePractice->setGeometry(ui->btn_onlineExam->x(), nTop,
  244. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  245. nTop = nTop + ui->btn_onlineExam->height() + g_appInfoPtr->m_fRate * 17;
  246. }
  247. if (ui->btn_offlineExam->isVisible())
  248. {
  249. ui->btn_offlineExam->setGeometry(ui->btn_onlineExam->x(), nTop,
  250. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  251. nTop = nTop + ui->btn_onlineExam->height() + g_appInfoPtr->m_fRate * 17;
  252. }
  253. if (ui->btn_notice->isVisible())
  254. {
  255. ui->btn_notice->setGeometry(ui->btn_onlineExam->x(), nTop,
  256. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  257. ui->btn_noticeNum->setGeometry(ui->btn_notice->x() + ui->btn_notice->width() - g_appInfoPtr->m_fRate * 16, ui->btn_notice->y(),
  258. g_appInfoPtr->m_fRate * 16, g_appInfoPtr->m_fRate * 16);
  259. nTop = nTop + ui->btn_onlineExam->height() + g_appInfoPtr->m_fRate * 17;
  260. }
  261. if (ui->btn_editPassword->isVisible())
  262. {
  263. ui->btn_editPassword->setGeometry(ui->btn_onlineExam->x(), ui->btn_notice->y() + ui->btn_notice->height() + g_appInfoPtr->m_fRate * 17,
  264. ui->btn_onlineExam->width(), ui->btn_onlineExam->height());
  265. }
  266. }
  267. void courseList::on_btn_minisize_clicked()
  268. {
  269. emit minisize();
  270. }
  271. void courseList::on_btn_cl_close_clicked()
  272. {
  273. // logout();
  274. // close();
  275. QCoreApplication::quit();
  276. }
  277. void courseList::setCheck(COURSE_MENU_BTN_TYPE cmbt)
  278. {
  279. QString sNormalSheet = QString(R"(outline:none;
  280. font-size:%1px;
  281. font-family:"Microsoft YaHei";
  282. font-weight:400;
  283. color:rgba(255,255,255,0.4);
  284. background:rgba(255,255,255,0);
  285. border-radius:%2;)").arg((int)(g_appInfoPtr->m_fRate*12)).arg(g_appInfoPtr->m_fRate*12);
  286. QString sCheckSheet = QString(R"(QPushButton
  287. {
  288. outline:none;
  289. font-size:%1px;
  290. font-family:"Microsoft YaHei";
  291. font-weight:400;
  292. color:rgba(255,255,255,1);
  293. border-radius:%2px;
  294. background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(16, 195, 182, 1), stop:1 rgba(39, 217, 146, 1));
  295. })").arg((int)(g_appInfoPtr->m_fRate*12)).arg(g_appInfoPtr->m_fRate*12);
  296. ui->btn_onlineExam->setStyleSheet(sNormalSheet);
  297. ui->btn_onlineHomework->setStyleSheet(sNormalSheet);
  298. ui->btn_onlinePractice->setStyleSheet(sNormalSheet);
  299. ui->btn_offlineExam->setStyleSheet(sNormalSheet);
  300. ui->btn_notice->setStyleSheet(sNormalSheet);
  301. ui->btn_editPassword->setStyleSheet(sNormalSheet);
  302. if (m_pOnlineExam != nullptr)
  303. {
  304. m_pOnlineExam->hide();
  305. }
  306. if (m_pOnlineHomework != nullptr)
  307. {
  308. m_pOnlineHomework->hide();
  309. }
  310. if (m_pOnlinePractice != nullptr)
  311. {
  312. m_pOnlinePractice->hide();
  313. m_pOnlinePractice->releaseClopResult();
  314. }
  315. if (m_pClopReport != nullptr)
  316. {
  317. m_pClopReport->hide();
  318. }
  319. if (m_pOfflineExam != nullptr)
  320. {
  321. m_pOfflineExam->hide();
  322. }
  323. if (m_pNoticeList != nullptr)
  324. {
  325. m_pNoticeList->hide();
  326. }
  327. if (m_pEditPassword != nullptr)
  328. {
  329. m_pEditPassword->hide();
  330. }
  331. QString sCurrentPlace = "";
  332. if (cmbt == COURSE_MENU_BTN_TYPE::cmbt_online_exam)
  333. {
  334. if (m_pOnlineExam == nullptr)
  335. {
  336. m_pOnlineExam = std::make_shared<clOnlineExam>(ui->stw_courseList);
  337. m_pOnlineExam->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  338. connect(m_pOnlineExam.get(), &clOnlineExam::enterExam, this, &courseList::onEnterExam);
  339. }
  340. m_pOnlineExam->show();
  341. ui->btn_onlineExam->setStyleSheet(sCheckSheet);
  342. sCurrentPlace = QString::fromLocal8Bit("当前所在位置:在线考试");
  343. }
  344. else if(cmbt == COURSE_MENU_BTN_TYPE::cmbt_online_homework)
  345. {
  346. if (m_pOnlineHomework == nullptr)
  347. {
  348. m_pOnlineHomework = std::make_shared<clOnlineHomework>(ui->stw_courseList);
  349. m_pOnlineHomework->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  350. connect(m_pOnlineHomework.get(), &clOnlineHomework::enterExam, this, &courseList::onEnterExam);
  351. }
  352. m_pOnlineHomework->show();
  353. ui->btn_onlineHomework->setStyleSheet(sCheckSheet);
  354. sCurrentPlace = QString::fromLocal8Bit("当前所在位置:在线作业");
  355. }
  356. else if(cmbt == COURSE_MENU_BTN_TYPE::cmbt_online_practice)
  357. {
  358. if (m_pOnlinePractice == nullptr)
  359. {
  360. m_pOnlinePractice = std::make_shared<clOnlinePractice>(ui->stw_courseList);
  361. m_pOnlinePractice->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  362. connect(m_pOnlinePractice.get(), &clOnlinePractice::enterExam, this, &courseList::onEnterExam);
  363. }
  364. m_pOnlinePractice->show();
  365. ui->btn_onlinePractice->setStyleSheet(sCheckSheet);
  366. sCurrentPlace = QString::fromLocal8Bit("当前所在位置:在线练习");
  367. }
  368. else if(cmbt == COURSE_MENU_BTN_TYPE::cmbt_offline_exam)
  369. {
  370. if (m_pOfflineExam == nullptr)
  371. {
  372. m_pOfflineExam = std::make_shared<clOfflineExam>(ui->stw_courseList);
  373. m_pOfflineExam->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  374. }
  375. m_pOfflineExam->show();
  376. ui->btn_offlineExam->setStyleSheet(sCheckSheet);
  377. sCurrentPlace = QString::fromLocal8Bit("当前所在位置:离线考试");
  378. }
  379. else if(cmbt == COURSE_MENU_BTN_TYPE::cmbt_notice)
  380. {
  381. if (m_pNoticeList == nullptr)
  382. {
  383. m_pNoticeList = std::make_shared<clNoticeList>(ui->stw_courseList);
  384. m_pNoticeList->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  385. }
  386. m_pNoticeList->show();
  387. ui->btn_notice->setStyleSheet(sCheckSheet);
  388. sCurrentPlace = QString::fromLocal8Bit("当前所在位置:公告通知");
  389. }
  390. else if(cmbt == COURSE_MENU_BTN_TYPE::cmbt_edit_password)
  391. {
  392. if (m_pEditPassword == nullptr)
  393. {
  394. m_pEditPassword = std::make_shared<clEditPassword>(ui->stw_courseList);
  395. m_pEditPassword->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  396. }
  397. m_pEditPassword->show();
  398. ui->btn_editPassword->setStyleSheet(sCheckSheet);
  399. sCurrentPlace = QString::fromLocal8Bit("当前所在位置:修改密码");
  400. }
  401. ui->label_currrentPlace->setText(sCurrentPlace);
  402. }
  403. void courseList::onEnterExam(CL_OPERATION_TYPE cot, __int64 nExamId, __int64 nExamStudentId, QString sCourseCode, QString sCourseName)
  404. {
  405. if(cot == CL_OPERATION_TYPE::cot_online_exam)
  406. {
  407. g_appInfoPtr->m_oExamInfo.sExamType = EXAM_TYPES::ONLINE;
  408. }
  409. g_appInfoPtr->m_oExamInfo.nExamId = nExamId;
  410. g_appInfoPtr->m_oExamInfo.nExamStudentId = nExamStudentId;
  411. g_appInfoPtr->m_oExamInfo.sCourseCode = sCourseCode;
  412. g_appInfoPtr->m_oExamInfo.sCourseName = sCourseName;
  413. //开考限流
  414. m_nRetryCount = 0;
  415. CHttpRequestPackage hrp;
  416. hrp.sUri = QString("https://tcc.qmth.com.cn/rate_limit/prod/startExam/%1").arg(100);
  417. hrp.nRequestType = RequestType::rtStartExamLimit;
  418. g_httpBllPtr->getUrl(hrp);
  419. }
  420. void courseList::onStartExamLimit(CStartExamLimit startExamLimit)
  421. {
  422. if (startExamLimit.nCode == 200)
  423. {
  424. ++m_nRetryCount;
  425. if (startExamLimit.bPass)
  426. {
  427. CHttpRequestPackage hrp;
  428. hrp.sUri = QString("/api/ecs_exam_work/exam/ipLimit/%1").arg(g_appInfoPtr->m_oExamInfo.nExamId);
  429. hrp.nRequestType = RequestType::rtIpLimit;
  430. g_httpBllPtr->get(hrp);
  431. }
  432. else
  433. {
  434. //重试
  435. if(m_nRetryCount >= 3)
  436. {
  437. ShowMsg(QString::fromLocal8Bit("系统繁忙,请稍后重试"), this, MSG_ICON_TYPE::mit_error);
  438. }
  439. else
  440. {
  441. QTimer::singleShot(3*1000, this, [](){
  442. CHttpRequestPackage hrp;
  443. hrp.sUri = QString("https://tcc.qmth.com.cn/rate_limit/prod/startExam/%1").arg(100);
  444. hrp.nRequestType = RequestType::rtStartExamLimit;
  445. g_httpBllPtr->getUrl(hrp);
  446. });
  447. }
  448. }
  449. }
  450. else
  451. {
  452. ShowMsg(QString::fromLocal8Bit("开考失败"), this, MSG_ICON_TYPE::mit_error);
  453. }
  454. }
  455. void courseList::onIpLimit(CIpLimit ipLimit)
  456. {
  457. if (ipLimit.nCode == 200)
  458. {
  459. if (!ipLimit.bLimited)
  460. {
  461. //断点
  462. CHttpRequestPackage hrp;
  463. hrp.sUri = "/api/ecs_oe_student/client/exam/process/checkExamInProgress";
  464. hrp.nRequestType = RequestType::rtCheckExamInProgress;
  465. hrp.sCommonStr = EXAM_INPROGRESS_ENTER_TYPE::EIET_ENTER_EXAM;
  466. g_httpBllPtr->post(hrp);
  467. }
  468. else
  469. {
  470. ShowMsg(QString::fromLocal8Bit("当前ip限制参加考试"), this, MSG_ICON_TYPE::mit_error);
  471. }
  472. }
  473. else
  474. {
  475. ShowMsg(QString::fromLocal8Bit("开考失败"), this, MSG_ICON_TYPE::mit_error);
  476. }
  477. }
  478. void courseList::onGetExamProperty(CGetExamProperty getExamProperty)
  479. {
  480. if (getExamProperty.nCode == 200)
  481. {
  482. if (getExamProperty.sType == "CHECK_ENVIRONMENT,IS_FACE_CHECK,SNAPSHOT_INTERVAL,FACE_VERIFY_START_MINUTE,FACE_VERIFY_END_MINUTE,IS_STRANGER_ENABLE,IS_FACE_VERIFY_BEFORE")
  483. {
  484. g_appInfoPtr->m_oExamInfo.bIsFaceCheck = getExamProperty.bIsFaceCheck;
  485. // g_appInfoPtr->m_oExamInfo.nFaceThreshold = getExamProperty.nFaceThreshold;
  486. g_appInfoPtr->m_oExamInfo.nSnapshotInterval = getExamProperty.nSnapshotInterval;
  487. g_appInfoPtr->m_oExamInfo.nFaceVerifyStartMinute = getExamProperty.nFaceVerifyStartMinute;
  488. g_appInfoPtr->m_oExamInfo.nFaceVerifyEndMinute = getExamProperty.nFaceVerifyEndMinute;
  489. g_appInfoPtr->m_oExamInfo.bIsStrangerEnable = getExamProperty.bIsStrangerEnable;
  490. g_appInfoPtr->m_oExamInfo.bIsLivenessBefore = getExamProperty.bIsLivenessBefore;
  491. if (getExamProperty.bCheckEnvironment && !g_appInfoPtr->m_oExamInfo.bIsExamInProgress)
  492. {
  493. if(m_pWhetherEnvTest == nullptr)
  494. {
  495. m_pWhetherEnvTest = std::make_shared<etWhetherEnvTest>(this);
  496. connect(m_pWhetherEnvTest.get(), &etWhetherEnvTest::envTest, this, [&](){
  497. m_pWhetherEnvTest.reset();
  498. //环境检测
  499. if (m_pEnvironmentalTest == nullptr)
  500. {
  501. m_pEnvironmentalTest = std::make_shared<environmentalTest>(this);
  502. connect(m_pEnvironmentalTest.get(), &environmentalTest::enterExam, this, [&](){
  503. m_pEnvironmentalTest.reset();
  504. //人脸识别
  505. CHttpRequestPackage hrp;
  506. hrp.sUri = QString("/api/ecs_exam_work/exam/faceCheckEnabled/%1")
  507. .arg(g_appInfoPtr->m_oExamInfo.nExamId);
  508. hrp.nRequestType = RequestType::rtFaceCheckEnabled;
  509. g_httpBllPtr->get(hrp);
  510. });
  511. }
  512. m_pEnvironmentalTest->show();
  513. });
  514. connect(m_pWhetherEnvTest.get(), &etWhetherEnvTest::skipEnvTest, this, [&](){
  515. m_pWhetherEnvTest.reset();
  516. //人脸识别
  517. CHttpRequestPackage hrp;
  518. hrp.sUri = QString("/api/ecs_exam_work/exam/faceCheckEnabled/%1")
  519. .arg(g_appInfoPtr->m_oExamInfo.nExamId);
  520. hrp.nRequestType = RequestType::rtFaceCheckEnabled;
  521. g_httpBllPtr->get(hrp);
  522. });
  523. }
  524. m_pWhetherEnvTest->show();
  525. }
  526. else
  527. {
  528. //人脸识别
  529. CHttpRequestPackage hrp;
  530. hrp.sUri = QString("/api/ecs_exam_work/exam/faceCheckEnabled/%1")
  531. .arg(g_appInfoPtr->m_oExamInfo.nExamId);
  532. hrp.nRequestType = RequestType::rtFaceCheckEnabled;
  533. g_httpBllPtr->get(hrp);
  534. }
  535. }
  536. }
  537. else
  538. {
  539. if(getExamProperty.sMessage.isEmpty())
  540. {
  541. ShowMsg(QString::fromLocal8Bit("获取考试信息失败"), this, MSG_ICON_TYPE::mit_error);
  542. }
  543. else
  544. {
  545. ShowMsg(getExamProperty.sMessage, this);
  546. }
  547. }
  548. }
  549. void courseList::onFaceCheckEnabled(CFaceCheckEnabled faceCheckEnabled)
  550. {
  551. if (faceCheckEnabled.nCode == 200)
  552. {
  553. //人脸检测
  554. g_appInfoPtr->m_oExamInfo.bFaceCheck = faceCheckEnabled.bEnabled;
  555. // if (faceCheckEnabled.bEnabled && !g_appInfoPtr->m_oExamInfo.bIsExamInProgress)
  556. // {
  557. // if (g_appInfoPtr->m_sStudentPhotoPath.isEmpty())
  558. // {
  559. // ShowMsg(QString::fromLocal8Bit("本场考试需要进行人脸检测,但是您没有上传底照,请联系老师"), this, MSG_ICON_TYPE::mit_error);
  560. // return;
  561. // }
  562. // if (m_pFaceCompare == nullptr)
  563. // {
  564. // m_pFaceCompare = std::make_shared<faceCompare>(this);
  565. // connect(m_pFaceCompare.get(), &faceCompare::exitFaceCompare, this, [&]() {
  566. // m_pFaceCompare.reset();
  567. // });
  568. // connect(m_pFaceCompare.get(), &faceCompare::faceComparePass, this, [&]() {
  569. // m_pFaceCompare.reset();
  570. // //活体检测
  571. // CHttpRequestPackage hrp;
  572. // hrp.sUri = QString("/api/ecs_exam_work/exam/identificationOfLivingEnabled/%1")
  573. // .arg(g_appInfoPtr->m_oExamInfo.nExamId);
  574. // hrp.nRequestType = RequestType::rtLivenessEnabled;
  575. // g_httpBllPtr->get(hrp);
  576. // });
  577. // }
  578. // m_pFaceCompare->show();
  579. // }
  580. // else
  581. {
  582. //活体检测
  583. CHttpRequestPackage hrp;
  584. hrp.sUri = QString("/api/ecs_exam_work/exam/identificationOfLivingEnabled/%1")
  585. .arg(g_appInfoPtr->m_oExamInfo.nExamId);
  586. hrp.nRequestType = RequestType::rtLivenessEnabled;
  587. g_httpBllPtr->get(hrp);
  588. }
  589. }
  590. else
  591. {
  592. if(faceCheckEnabled.sMessage.isEmpty())
  593. {
  594. ShowMsg(QString::fromLocal8Bit("获取人脸识别信息失败"), this, MSG_ICON_TYPE::mit_error);
  595. }
  596. else
  597. {
  598. ShowMsg(faceCheckEnabled.sMessage, this, MSG_ICON_TYPE::mit_error);
  599. }
  600. }
  601. }
  602. void courseList::doFaceCompare()
  603. {
  604. if (g_appInfoPtr->m_sStudentPhotoPath.isEmpty())
  605. {
  606. ShowMsg(QString::fromLocal8Bit("本场考试需要进行人脸检测,但是您没有上传底照,请联系老师"), this, MSG_ICON_TYPE::mit_error);
  607. return;
  608. }
  609. if (m_pFaceCompare == nullptr)
  610. {
  611. m_pFaceCompare = std::make_shared<faceCompare>(this);
  612. connect(m_pFaceCompare.get(), &faceCompare::exitFaceCompare, this, [&]() {
  613. m_pFaceCompare.reset();
  614. });
  615. connect(m_pFaceCompare.get(), &faceCompare::faceComparePass, this, [&]() {
  616. m_pFaceCompare.reset();
  617. //进入待考
  618. enterWaitExam();
  619. });
  620. }
  621. m_pFaceCompare->show();
  622. }
  623. void courseList::onLivenessEnabled(CLivenessEnabled livenessEnabled)
  624. {
  625. if (livenessEnabled.nCode == 200)
  626. {
  627. g_appInfoPtr->m_oExamInfo.bLivenessCheck = livenessEnabled.bEnabled;
  628. GetOrgPropertiesByGroupWithoutCache();
  629. //进入待考
  630. // enterWaitExam();
  631. }
  632. else
  633. {
  634. if(livenessEnabled.sMessage.isEmpty())
  635. {
  636. ShowMsg(QString::fromLocal8Bit("获取活体信息失败"), this, MSG_ICON_TYPE::mit_error);
  637. }
  638. else
  639. {
  640. ShowMsg(livenessEnabled.sMessage, this, MSG_ICON_TYPE::mit_error);
  641. }
  642. }
  643. }
  644. void courseList::doLiveness()
  645. {
  646. //活体检测
  647. if(m_pFaceLiveness == nullptr)
  648. {
  649. m_pFaceLiveness = std::make_shared<faceLiveness>(FACE_LIVENESS_TYPE::flt_entry_exam, this);
  650. connect(m_pFaceLiveness.get(), &faceLiveness::faceLivenessFaild, this, [&](){
  651. g_appInfoPtr->m_oExamInfo.nFaceLiveVerifyId = 0;
  652. m_pFaceLiveness.reset();
  653. });
  654. connect(m_pFaceLiveness.get(), &faceLiveness::faceLivenessSucceed, this, [&](){
  655. g_appInfoPtr->m_oExamInfo.nFaceLiveVerifyId = 0;
  656. m_pFaceLiveness.reset();
  657. //进入待考
  658. enterWaitExam();
  659. });
  660. m_pFaceLiveness->show();
  661. }
  662. }
  663. void courseList::GetOrgPropertiesByGroupWithoutCache()
  664. {
  665. CHttpRequestPackage hrp;
  666. hrp.sUri = QString("/api/ecs_core/org/getOrgPropertiesByGroupWithoutCache/%1/config4Edit1")
  667. .arg(g_appInfoPtr->m_sRootOrgId);
  668. hrp.nRequestType = RequestType::rtGetOrgPropertiesByGroupWithoutCache;
  669. g_httpBllPtr->get(hrp);
  670. }
  671. void courseList::onGetOrgPropertiesByGroupWithoutCache(CGetOrgPropertiesByGroupWithoutCache orgProperties)
  672. {
  673. if(orgProperties.nCode == 200)
  674. {
  675. m_nRetryCount = 0;
  676. g_appInfoPtr->m_oExamInfo.nActionNum = orgProperties.nActionNum;
  677. g_appInfoPtr->m_oExamInfo.sActionOptions = orgProperties.sActionOptions;
  678. g_appInfoPtr->m_oExamInfo.sActionOrder = orgProperties.sActionOrder;
  679. g_appInfoPtr->m_oExamInfo.nActionDuration = orgProperties.nActionDuration;
  680. g_appInfoPtr->m_oExamInfo.nActionAlert = orgProperties.nActionAlert;
  681. g_appInfoPtr->m_oExamInfo.nAllActionDuration = orgProperties.nAllActionDuration;
  682. g_appInfoPtr->m_oExamInfo.nFaceThreshold = orgProperties.nFaceThreshold;
  683. if(!g_appInfoPtr->m_oExamInfo.bIsExamInProgress)
  684. {
  685. if(g_appInfoPtr->m_oExamInfo.bIsLivenessBefore && g_appInfoPtr->m_oExamInfo.bIsFaceCheck)
  686. {
  687. doLiveness();
  688. }
  689. else if(g_appInfoPtr->m_oExamInfo.bFaceCheck)
  690. {
  691. doFaceCompare();
  692. }
  693. else
  694. {
  695. enterWaitExam();
  696. }
  697. }
  698. else
  699. {
  700. enterWaitExam();
  701. }
  702. }
  703. else
  704. {
  705. if(orgProperties.sMessage.isEmpty())
  706. {
  707. ShowMsg(QString::fromLocal8Bit("获取活体信息失败"), this, MSG_ICON_TYPE::mit_error);
  708. }
  709. else
  710. {
  711. ShowMsg(orgProperties.sMessage, this, MSG_ICON_TYPE::mit_error);
  712. }
  713. }
  714. }
  715. void courseList::enterWaitExam()
  716. {
  717. //进入待考
  718. if (m_pBackground == nullptr)
  719. {
  720. if (g_appInfoPtr->m_oExamInfo.bIsExamInProgress)
  721. {
  722. m_pBackground = std::make_shared<awBackground>(AW_WIDGET_TYPE::awwt_answerWidget, this);
  723. m_pResumeExam.reset();
  724. }
  725. else
  726. {
  727. m_pBackground = std::make_shared<awBackground>(AW_WIDGET_TYPE::awwt_waitExam, this);
  728. }
  729. connect(m_pBackground.get(), &awBackground::minisize, this, &courseList::minisize);
  730. connect(m_pBackground.get(), &awBackground::closeWidget, this, [&](){
  731. m_pBackground.reset();
  732. m_pRefreshMenuTimer->start();
  733. if(m_pOnlineExam)
  734. {
  735. m_pOnlineExam->refreshExam();
  736. }
  737. if(m_pOnlineHomework)
  738. {
  739. m_pOnlineHomework->refreshExam();
  740. }
  741. });
  742. connect(m_pBackground.get(), &awBackground::gobackLogin, this, [&](){
  743. m_pBackground.reset();
  744. logout();
  745. close();
  746. });
  747. connect(m_pBackground.get(), &awBackground::showPracticeInfo, this, [&](){
  748. m_pBackground.reset();
  749. CPracticeRecord pr;
  750. pr.nId = g_appInfoPtr->m_oExamInfo.nExamRecordDataId;
  751. pr.sCourseCode = g_appInfoPtr->m_oExamInfo.sCourseCode;
  752. pr.sCourseName = g_appInfoPtr->m_oExamInfo.sCourseName;
  753. if(m_pClopReport == nullptr)
  754. {
  755. m_pClopReport = std::make_shared<clopReport>(pr, true, ui->stw_courseList);
  756. connect(m_pClopReport.get(), &clopReport::goback, this, [&](){
  757. m_pClopReport.reset();
  758. if(m_pOnlinePractice)
  759. {
  760. m_pOnlinePractice->refreshExamInfo();
  761. }
  762. });
  763. m_pClopReport->setUI(0, 0, ui->stw_courseList->width(), ui->stw_courseList->height());
  764. }
  765. m_pClopReport->show();
  766. m_pRefreshMenuTimer->start();
  767. });
  768. }
  769. m_pBackground->show();
  770. m_pRefreshMenuTimer->stop();
  771. }
  772. void courseList::on_btn_onlineExam_clicked()
  773. {
  774. ui->stw_courseList->setCurrentIndex(0);
  775. setCheck(COURSE_MENU_BTN_TYPE::cmbt_online_exam);
  776. }
  777. void courseList::on_btn_onlineHomework_clicked()
  778. {
  779. ui->stw_courseList->setCurrentIndex(1);
  780. setCheck(COURSE_MENU_BTN_TYPE::cmbt_online_homework);
  781. }
  782. void courseList::on_btn_onlinePractice_clicked()
  783. {
  784. ui->stw_courseList->setCurrentIndex(2);
  785. setCheck(COURSE_MENU_BTN_TYPE::cmbt_online_practice);
  786. }
  787. void courseList::on_btn_offlineExam_clicked()
  788. {
  789. ui->stw_courseList->setCurrentIndex(3);
  790. setCheck(COURSE_MENU_BTN_TYPE::cmbt_offline_exam);
  791. }
  792. void courseList::on_btn_notice_clicked()
  793. {
  794. ui->stw_courseList->setCurrentIndex(4);
  795. setCheck(COURSE_MENU_BTN_TYPE::cmbt_notice);
  796. }
  797. void courseList::on_btn_editPassword_clicked()
  798. {
  799. ui->stw_courseList->setCurrentIndex(5);
  800. setCheck(COURSE_MENU_BTN_TYPE::cmbt_edit_password);
  801. }
  802. void courseList::on_btn_exit_clicked()
  803. {
  804. logout();
  805. close();
  806. }
  807. void courseList::logout()
  808. {
  809. CHttpRequestPackage hrp;
  810. hrp.sUri = "/api/ecs_core/auth/logout";
  811. hrp.nRequestType = RequestType::rtLogout;
  812. g_httpBllPtr->get(hrp);
  813. }
  814. bool courseList::eventFilter(QObject *obj, QEvent *ev)
  815. {
  816. if(ev->type() == QEvent::Enter)
  817. {
  818. if(obj == ui->btn_mobileLogin)
  819. {
  820. m_pMobileLoginBtnTimer->stop();
  821. if(m_pStudentInfo != nullptr)
  822. {
  823. m_pStudentInfo.reset();
  824. m_pStudentInfo = nullptr;
  825. }
  826. if(m_pMobileLogin == nullptr)
  827. {
  828. m_pMobileLogin = std::make_shared<clMobileLogin>(this);
  829. m_pMobileLogin->setUI(g_appInfoPtr->m_fRate*838, g_appInfoPtr->m_fRate*53, g_appInfoPtr->m_fRate*240, g_appInfoPtr->m_fRate*290);
  830. m_pMobileLogin->show();
  831. m_pMobileLogin->installEventFilter(this);
  832. }
  833. ui->btn_mobileLogin->setIcon(QIcon(":/images/icon-mobile-login-hover.png"));
  834. }
  835. else if(obj == ui->btn_studentInfo)
  836. {
  837. m_pStudentInfoBtnTimer->stop();
  838. if(m_pMobileLogin != nullptr)
  839. {
  840. m_pMobileLogin.reset();
  841. m_pMobileLogin = nullptr;
  842. }
  843. if(m_pStudentInfo == nullptr)
  844. {
  845. m_pStudentInfo = std::make_shared<clStudentInfo>(this);
  846. connect(m_pStudentInfo.get(), &clStudentInfo::sgnStudentLogout, this, [&]() {
  847. on_btn_exit_clicked();
  848. });
  849. connect(m_pStudentInfo.get(), &clStudentInfo::sgnStudentEditPassword, this, [&]() {
  850. if (m_pStudentInfo != nullptr)
  851. {
  852. m_pStudentInfo.reset();
  853. }
  854. on_btn_editPassword_clicked();
  855. });
  856. m_pStudentInfo->setUI(g_appInfoPtr->m_fRate*838, g_appInfoPtr->m_fRate*53, g_appInfoPtr->m_fRate*330, g_appInfoPtr->m_fRate*240);
  857. m_pStudentInfo->show();
  858. m_pStudentInfo->installEventFilter(this);
  859. }
  860. ui->btn_studentInfo->setIcon(QIcon(":/images/icon-student-info-hover.png"));
  861. }
  862. else if(obj == m_pMobileLogin.get())
  863. {
  864. m_pMobileLoginBtnTimer->stop();
  865. }
  866. else if(obj == m_pStudentInfo.get())
  867. {
  868. m_pStudentInfoBtnTimer->stop();
  869. }
  870. }
  871. else if(ev->type() == QEvent::Leave)
  872. {
  873. if(obj == ui->btn_mobileLogin || obj == m_pMobileLogin.get())
  874. {
  875. ui->btn_mobileLogin->setIcon(QIcon(":/images/icon-mobile-login.png"));
  876. m_pMobileLoginBtnTimer->start();
  877. }
  878. if(obj == ui->btn_studentInfo || obj == m_pStudentInfo.get())
  879. {
  880. ui->btn_studentInfo->setIcon(QIcon(":/images/icon-student-info.png"));
  881. m_pStudentInfoBtnTimer->start();
  882. }
  883. }
  884. return QWidget::eventFilter(obj, ev);
  885. }
  886. void courseList::hideStudentInfoBtn()
  887. {
  888. if(m_pStudentInfo != nullptr)
  889. {
  890. m_pStudentInfo.reset();
  891. }
  892. }
  893. void courseList::hideMobileLoginBtn()
  894. {
  895. if(m_pMobileLogin != nullptr)
  896. {
  897. m_pMobileLogin.reset();
  898. }
  899. }
  900. void courseList::getStudentInfoBySession()
  901. {
  902. CHttpRequestPackage hrp;
  903. hrp.sUri = "/api/ecs_core/student/getStudentInfoBySession";
  904. hrp.nRequestType = RequestType::rtGetStudentInfoBySession;
  905. hrp.nRetryCount = 3;
  906. g_httpBllPtr->get(hrp);
  907. }
  908. void courseList::onGetStudentInfoBySession(CGetStudentInfoBySession getStudentInfoBySession)
  909. {
  910. if (getStudentInfoBySession.nCode == 200)
  911. {
  912. g_appInfoPtr->m_nStudentId = getStudentInfoBySession.nId;
  913. g_appInfoPtr->m_sStudentName = getStudentInfoBySession.sName;
  914. g_appInfoPtr->m_nOrgId = getStudentInfoBySession.nOrgId;
  915. g_appInfoPtr->m_sOrgCode = getStudentInfoBySession.sOrgCode;
  916. g_appInfoPtr->m_sOrgName = getStudentInfoBySession.sOrgName;
  917. g_appInfoPtr->m_sStudentCode = getStudentInfoBySession.sStudentCode;
  918. g_appInfoPtr->m_sStudentIdentityNumber = getStudentInfoBySession.sIdentityNumber;
  919. g_appInfoPtr->m_sStudentPhotoPath = getStudentInfoBySession.sPhotoPath;
  920. g_appInfoPtr->m_bStudentEnable = getStudentInfoBySession.bEnable;
  921. ui->btn_studentInfo->setText(g_appInfoPtr->m_sStudentName);
  922. ui->btn_studentInfo->setVisible(g_appInfoPtr->m_bStudentEnable);
  923. ui->btn_mobileLogin->setVisible(g_appInfoPtr->m_bShowStudentClientAppQrcode);
  924. CHttpRequestPackage hrp;
  925. hrp.sUri = "/api/ecs_exam_work/exam_student/specialtyNameList";
  926. hrp.nRequestType = RequestType::rtSpecialtyNameList;
  927. g_httpBllPtr->get(hrp);
  928. if (!g_appInfoPtr->m_sStudentPhotoPath.isEmpty())
  929. {
  930. QString sFileName = g_appInfoPtr->m_sStudentPhotoPath.right(g_appInfoPtr->m_sStudentPhotoPath.length() - g_appInfoPtr->m_sStudentPhotoPath.lastIndexOf("/") - 1);
  931. sFileName = g_appInfoPtr->m_sCacheFileDir + sFileName;
  932. CHttpRequestPackage hrp;
  933. hrp.sUri = g_appInfoPtr->m_sStudentPhotoPath;
  934. hrp.sCommonStr = sFileName;
  935. hrp.sCommonStr1 = __FILE__;
  936. hrp.sAdditionStr = "StudentPhotoPath";
  937. hrp.nRequestType = RequestType::rtDownLoadFile;
  938. hrp.nRetryCount = 3;
  939. g_httpBllPtr->downLoad(hrp);
  940. }
  941. if (g_appInfoPtr->m_bShowStudentClientAppQrcode)
  942. {
  943. CHttpRequestPackage hrp;
  944. hrp.sUri = "/api/ecs_core/systemProperty/APP_DOWNLOAD_URL";
  945. hrp.nRequestType = RequestType::rtAppDownLoadUrl;
  946. g_httpBllPtr->get(hrp);
  947. }
  948. }
  949. else
  950. {
  951. if(getStudentInfoBySession.sMessage.isEmpty())
  952. {
  953. ShowMsg(QString::fromLocal8Bit("获取考生信息失败"), this, MSG_ICON_TYPE::mit_error);
  954. }
  955. else
  956. {
  957. ShowMsg(getStudentInfoBySession.sMessage, this, MSG_ICON_TYPE::mit_error);
  958. }
  959. courseList::getStudentInfoBySession();
  960. }
  961. }
  962. void courseList::onAppDownLoadUrl(CAppDownLoadUrl appDownLoadUrl)
  963. {
  964. if (appDownLoadUrl.nCode == 200)
  965. {
  966. g_appInfoPtr->m_sAppDownLoadUrl = appDownLoadUrl.sUrl;
  967. }
  968. else
  969. {
  970. if(appDownLoadUrl.sMessage.isEmpty())
  971. {
  972. ShowMsg(QString::fromLocal8Bit("获取APP下载地址失败"), this, MSG_ICON_TYPE::mit_error);
  973. }
  974. else
  975. {
  976. ShowMsg(appDownLoadUrl.sMessage, this, MSG_ICON_TYPE::mit_error);
  977. }
  978. }
  979. }
  980. void courseList::onDownLoadFile(CDownLoadFileInfo downLoadFileInfo)
  981. {
  982. if(downLoadFileInfo.sModuleName == __FILE__)
  983. {
  984. if (downLoadFileInfo.nCode == 200)
  985. {
  986. // QString sFileName = g_appInfoPtr->m_sStudentPhotoPath.right(g_appInfoPtr->m_sStudentPhotoPath.length() - g_appInfoPtr->m_sStudentPhotoPath.lastIndexOf("/") - 1);
  987. // sFileName = g_appInfoPtr->m_sCacheFileDir + sFileName;
  988. if (downLoadFileInfo.sAdditionStr == "MenuLogoUrl")
  989. {
  990. QString sFileName = g_appInfoPtr->m_sMenuLogoUrl.right(g_appInfoPtr->m_sMenuLogoUrl.length() - g_appInfoPtr->m_sMenuLogoUrl.lastIndexOf("/") - 1);
  991. sFileName = g_appInfoPtr->m_sCacheFileDir + sFileName;
  992. ui->label_cl_org_icon->setPixmap(QPixmap(sFileName).scaled(ui->label_cl_org_icon->width(), ui->label_cl_org_icon->height(),
  993. Qt::KeepAspectRatio, Qt::SmoothTransformation));
  994. }
  995. }
  996. else
  997. {
  998. if(downLoadFileInfo.sMessage.isEmpty())
  999. {
  1000. ShowMsg(QString::fromLocal8Bit("下载失败"), this, MSG_ICON_TYPE::mit_error);
  1001. }
  1002. else
  1003. {
  1004. ShowMsg(downLoadFileInfo.sMessage, this, MSG_ICON_TYPE::mit_error);
  1005. }
  1006. }
  1007. }
  1008. }
  1009. void courseList::onSpecialtyNameList(CSpecialtyNameList specialtyNameList)
  1010. {
  1011. if (specialtyNameList.nCode == 200)
  1012. {
  1013. g_appInfoPtr->m_sSpecialtyName = specialtyNameList.sSpecialtyName;
  1014. CHttpRequestPackage hrp;
  1015. hrp.sUri = "/api/ecs_oe_student/client/exam/process/checkExamInProgress";
  1016. hrp.nRequestType = RequestType::rtCheckExamInProgress;
  1017. hrp.sCommonStr = EXAM_INPROGRESS_ENTER_TYPE::EIET_COURSE_LIST;
  1018. g_httpBllPtr->post(hrp);
  1019. }
  1020. else
  1021. {
  1022. if(specialtyNameList.sMessage.isEmpty())
  1023. {
  1024. ShowMsg(QString::fromLocal8Bit("获取专业信息失败"), this, MSG_ICON_TYPE::mit_error);
  1025. }
  1026. else
  1027. {
  1028. ShowMsg(specialtyNameList.sMessage, this, MSG_ICON_TYPE::mit_error);
  1029. }
  1030. }
  1031. }
  1032. void courseList::onCheckExamInProgress(CCheckExamInProgress checkExamInProgress)
  1033. {
  1034. if (checkExamInProgress.nCode == 200)
  1035. {
  1036. if (checkExamInProgress.bHasExamInProgress)
  1037. {
  1038. if (checkExamInProgress.bIsExceed)
  1039. {
  1040. //超过断点时长交卷
  1041. g_appInfoPtr->m_oExamInfo.nExamRecordDataId = checkExamInProgress.nExamRecordDataId;
  1042. g_appInfoPtr->m_oExamInfo.nExamId = checkExamInProgress.nExamId;
  1043. CHttpRequestPackage hrp;
  1044. hrp.sUri = QString("/api/ecs_oe_student/client/exam/process/endExam");
  1045. hrp.sCommonStr = __FILE__;
  1046. hrp.nRequestType = RequestType::rtEndExam;
  1047. g_httpBllPtr->post(hrp);
  1048. }
  1049. else
  1050. {
  1051. //进入断点
  1052. g_appInfoPtr->m_oExamInfo.nExamId = checkExamInProgress.nExamId;
  1053. g_appInfoPtr->m_oExamInfo.nExamRecordDataId = checkExamInProgress.nExamRecordDataId;
  1054. g_appInfoPtr->m_oExamInfo.sExamType = checkExamInProgress.sExamType;
  1055. g_appInfoPtr->m_oExamInfo.bIsExamInProgress = true;
  1056. if (m_pResumeExam == nullptr)
  1057. {
  1058. m_pResumeExam = std::make_shared<awResumeExam>(this);
  1059. }
  1060. m_pResumeExam->show();
  1061. //环境监测
  1062. CHttpRequestPackage hrp;
  1063. hrp.sUri = QString("/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/%1/%2")
  1064. .arg(g_appInfoPtr->m_oExamInfo.nExamId).arg("CHECK_ENVIRONMENT,IS_FACE_CHECK,SNAPSHOT_INTERVAL,FACE_VERIFY_START_MINUTE,FACE_VERIFY_END_MINUTE,IS_STRANGER_ENABLE,IS_FACE_VERIFY_BEFORE");
  1065. hrp.nRequestType = RequestType::rtGetExamProperty;
  1066. hrp.sCommonStr = "CHECK_ENVIRONMENT,IS_FACE_CHECK,SNAPSHOT_INTERVAL,FACE_VERIFY_START_MINUTE,FACE_VERIFY_END_MINUTE,IS_STRANGER_ENABLE,IS_FACE_VERIFY_BEFORE";
  1067. g_httpBllPtr->get(hrp);
  1068. }
  1069. }
  1070. else
  1071. {
  1072. g_appInfoPtr->m_oExamInfo.bIsExamInProgress = false;
  1073. if (checkExamInProgress.sEnterType == EXAM_INPROGRESS_ENTER_TYPE::EIET_COURSE_LIST)
  1074. {
  1075. CHttpRequestPackage hrp;
  1076. hrp.sUri = "/api/ecs_core/rolePrivilege/getStudentClientMenu";
  1077. hrp.nRequestType = RequestType::rtGetStudentClientMenu;
  1078. hrp.sParamList.push_back(QString::fromLocal8Bit("rootOrgId,%1").arg(g_appInfoPtr->m_sRootOrgId));
  1079. g_httpBllPtr->get(hrp);
  1080. if (m_pWelcomeWidget == nullptr)
  1081. {
  1082. m_pWelcomeWidget = std::make_shared<welcomeWidget>(g_appInfoPtr->m_sStudentName, g_appInfoPtr->m_sStudentCode, g_appInfoPtr->m_sSpecialtyName, this);
  1083. connect(m_pWelcomeWidget.get(), &welcomeWidget::exitWelcomeWidget, this, [&]() {
  1084. m_pWelcomeWidget.reset();
  1085. });
  1086. }
  1087. m_pWelcomeWidget->show();
  1088. }
  1089. else
  1090. {
  1091. //环境监测
  1092. CHttpRequestPackage hrp;
  1093. hrp.sUri = QString("/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/%1/%2")
  1094. .arg(g_appInfoPtr->m_oExamInfo.nExamId).arg("CHECK_ENVIRONMENT,IS_FACE_CHECK,SNAPSHOT_INTERVAL,FACE_VERIFY_START_MINUTE,FACE_VERIFY_END_MINUTE,IS_STRANGER_ENABLE,IS_FACE_VERIFY_BEFORE");
  1095. hrp.nRequestType = RequestType::rtGetExamProperty;
  1096. hrp.sCommonStr = "CHECK_ENVIRONMENT,IS_FACE_CHECK,SNAPSHOT_INTERVAL,FACE_VERIFY_START_MINUTE,FACE_VERIFY_END_MINUTE,IS_STRANGER_ENABLE,IS_FACE_VERIFY_BEFORE";
  1097. g_httpBllPtr->get(hrp);
  1098. }
  1099. }
  1100. }
  1101. else
  1102. {
  1103. if(checkExamInProgress.sMessage.isEmpty())
  1104. {
  1105. ShowMsg(QString::fromLocal8Bit("获取断点信息失败"), this, MSG_ICON_TYPE::mit_error);
  1106. }
  1107. else
  1108. {
  1109. ShowMsg(checkExamInProgress.sMessage, this, MSG_ICON_TYPE::mit_error);
  1110. }
  1111. }
  1112. }
  1113. void courseList::onEndExam(CEndExam endExam)
  1114. {
  1115. if(endExam.sModuleName == __FILE__)
  1116. {
  1117. if (endExam.nCode == 200)
  1118. {
  1119. m_pRefreshMenuTimer->stop();
  1120. if(m_pBackground != nullptr)
  1121. {
  1122. m_pBackground.reset();
  1123. }
  1124. m_pBackground = std::make_shared<awBackground>(AW_WIDGET_TYPE::awwt_examScore, this);
  1125. connect(m_pBackground.get(), &awBackground::minisize, this, &courseList::minisize);
  1126. connect(m_pBackground.get(), &awBackground::closeWidget, this, [&](){
  1127. m_pBackground.reset();
  1128. m_pRefreshMenuTimer->start();
  1129. if(m_pOnlineExam)
  1130. {
  1131. m_pOnlineExam->refreshExam();
  1132. }
  1133. if(m_pOnlineHomework)
  1134. {
  1135. m_pOnlineHomework->refreshExam();
  1136. }
  1137. });
  1138. m_pBackground->show();
  1139. }
  1140. else
  1141. {
  1142. if(endExam.sMessage.isEmpty())
  1143. {
  1144. ShowMsg(QString::fromLocal8Bit("交卷失败"), g_appInfoPtr->m_pAnsBgWidget, MSG_ICON_TYPE::mit_error);
  1145. }
  1146. else
  1147. {
  1148. ShowMsg(endExam.sMessage, g_appInfoPtr->m_pAnsBgWidget, MSG_ICON_TYPE::mit_error);
  1149. }
  1150. }
  1151. }
  1152. }
  1153. void courseList::onGetStudentClientMenu(CGetStudentClientMenu getStudentClientMenu)
  1154. {
  1155. if (getStudentClientMenu.nCode == 200)
  1156. {
  1157. ui->btn_onlineExam->setVisible(false);
  1158. ui->btn_onlineHomework->setVisible(false);
  1159. ui->btn_onlinePractice->setVisible(false);
  1160. ui->btn_offlineExam->setVisible(false);
  1161. ui->btn_notice->setVisible(false);
  1162. ui->btn_editPassword->setVisible(false);
  1163. for (CStudentClientMenu scm : getStudentClientMenu.vMenus)
  1164. {
  1165. QString sMenuName = scm.sName;
  1166. sMenuName.insert(sMenuName.length()/2, '\n');
  1167. QString sMenuCode = scm.sCode.left(scm.sCode.lastIndexOf("_"));
  1168. if (sMenuCode == "stu_online_exam")
  1169. {
  1170. ui->btn_onlineExam->setVisible(true);
  1171. ui->btn_onlineExam->setText(sMenuName);
  1172. }
  1173. else if (sMenuCode == "stu_online_homework")
  1174. {
  1175. ui->btn_onlineHomework->setVisible(true);
  1176. ui->btn_onlineHomework->setText(sMenuName);
  1177. }
  1178. else if (sMenuCode == "stu_online_practice")
  1179. {
  1180. ui->btn_onlinePractice->setVisible(true);
  1181. ui->btn_onlinePractice->setText(sMenuName);
  1182. }
  1183. else if (sMenuCode == "stu_offline_exam")
  1184. {
  1185. ui->btn_offlineExam->setVisible(true);
  1186. ui->btn_offlineExam->setText(sMenuName);
  1187. }
  1188. else if (sMenuCode == "stu_notice")
  1189. {
  1190. ui->btn_notice->setVisible(true);
  1191. ui->btn_notice->setText(sMenuName);
  1192. CHttpRequestPackage hrp;
  1193. hrp.sUri = "/api/ecs_exam_work/notice/getUserNoticeList";
  1194. hrp.nRequestType = RequestType::rtGetUserNoticeList;
  1195. g_httpBllPtr->get(hrp);
  1196. }
  1197. else if (sMenuCode == "stu_modify_pwd")
  1198. {
  1199. ui->btn_editPassword->setVisible(true);
  1200. ui->btn_editPassword->setText(sMenuName);
  1201. }
  1202. }
  1203. menuBtnRePosistion();
  1204. }
  1205. else
  1206. {
  1207. if(getStudentClientMenu.sMessage.isEmpty())
  1208. {
  1209. ShowMsg(QString::fromLocal8Bit("获取菜单失败"), this, MSG_ICON_TYPE::mit_error);
  1210. }
  1211. else
  1212. {
  1213. ShowMsg(getStudentClientMenu.sMessage, this, MSG_ICON_TYPE::mit_error);
  1214. }
  1215. }
  1216. }
  1217. void courseList::onGetUserNoticeList(CGetUserNoticeList getUserNoticeList)
  1218. {
  1219. if (getUserNoticeList.nCode == 200)
  1220. {
  1221. if (m_pNoticeList == nullptr)
  1222. {
  1223. m_pNoticeList = std::make_shared<clNoticeList>(ui->stw_courseList);
  1224. m_pNoticeList->setUI(ui->stw_courseList->width(), ui->stw_courseList->height());
  1225. connect(m_pNoticeList.get(), &clNoticeList::unReadNoticeCount, this, [&](int nCount) {
  1226. ui->btn_noticeNum->setText(QString::number(nCount));
  1227. ui->btn_noticeNum->setVisible(nCount > 0);
  1228. });
  1229. connect(m_pNoticeList.get(), &clNoticeList::readNotice, this, [&](__int64 nId) {
  1230. m_pNoticePopWidget->setNoticeRead(nId);
  1231. });
  1232. }
  1233. m_pNoticeList->setNotice(getUserNoticeList.vNoticeList);
  1234. if (m_pNoticePopWidget == nullptr)
  1235. {
  1236. m_pNoticePopWidget = std::make_shared<clNoticePopWidget>(this);
  1237. m_pNoticePopWidget->setUI(g_appInfoPtr->m_fRate * 960, g_appInfoPtr->m_fRate * 558, g_appInfoPtr->m_fRate * 310, g_appInfoPtr->m_fRate * 200);
  1238. connect(m_pNoticePopWidget.get(), &clNoticePopWidget::showNoticeDetail, this, [&](__int64 nId){
  1239. setCheck(COURSE_MENU_BTN_TYPE::cmbt_notice);
  1240. m_pNoticeList->viewNotice(nId);
  1241. });
  1242. }
  1243. int nUnReadCount = 0;
  1244. for (CNoticeInfo ni : getUserNoticeList.vNoticeList)
  1245. {
  1246. if (!ni.bHasRead)
  1247. {
  1248. m_pNoticePopWidget->addNotice(ni);
  1249. ++nUnReadCount;
  1250. }
  1251. }
  1252. ui->btn_noticeNum->setText(QString::number(nUnReadCount));
  1253. ui->btn_noticeNum->setVisible(nUnReadCount > 0);
  1254. if(m_pNoticePopWidget->noticeCount() > 0)
  1255. {
  1256. m_pNoticePopWidget->show();
  1257. }
  1258. }
  1259. else
  1260. {
  1261. if(getUserNoticeList.sMessage.isEmpty())
  1262. {
  1263. ShowMsg(QString::fromLocal8Bit("获取通知信息失败"), this, MSG_ICON_TYPE::mit_error);
  1264. }
  1265. else
  1266. {
  1267. ShowMsg(getUserNoticeList.sMessage, this, MSG_ICON_TYPE::mit_error);
  1268. }
  1269. }
  1270. }