index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <template>
  2. <div class="body1">
  3. <!-- 学生数据 -->
  4. <div class="left">
  5. <div class="top">
  6. <div class="titleBox">
  7. <div class="title">基础概况</div>
  8. </div>
  9. <div class="dataBox">
  10. <div class="teafre">
  11. <div class="teaLeft">
  12. <div>学生总数</div>
  13. <div>310</div>
  14. </div>
  15. <div class="teaLeft teaRigth">
  16. <div>本月登录学生用户环比</div>
  17. <div>0.9%</div>
  18. </div>
  19. </div>
  20. <div class="teafre">
  21. <div class="teaLeft">
  22. <div>本月登录学生用户总数</div>
  23. <div>138</div>
  24. </div>
  25. <div class="teaLeft teaRigth">
  26. <div>本月新增登录学生用户</div>
  27. <div>18</div>
  28. </div>
  29. </div>
  30. <loginCount style="height: calc(100% - 140px)"></loginCount>
  31. </div>
  32. </div>
  33. <div class="bottom">
  34. <div class="titleBox">
  35. <div
  36. class="title"
  37. :class="{ isClick: skType == 0 }"
  38. @click="skType = 0"
  39. style="cursor: pointer; padding: 0 0 5px 0"
  40. >
  41. 在线时长
  42. </div>
  43. <div
  44. class="title"
  45. :class="{ isClick: skType == 1 }"
  46. @click="skType = 1"
  47. style="cursor: pointer; padding: 0 0 5px 0"
  48. >
  49. 登录频次
  50. </div>
  51. <el-select v-model="cType" class="selectBox" style="width: 110px">
  52. <el-option label="全部" value="全部"></el-option>
  53. <el-option label="一年级" value="一年级"></el-option>
  54. <el-option label="二年级" value="二年级"></el-option>
  55. <el-option label="三年级" value="三年级"></el-option>
  56. </el-select>
  57. <div class="timeDiv">
  58. <div @click="tType = 0" :class="{ isClick: tType == 0 }">周</div>
  59. <div @click="tType = 1" :class="{ isClick: tType == 1 }">月</div>
  60. <div @click="tType = 2" :class="{ isClick: tType == 2 }">学期</div>
  61. </div>
  62. </div>
  63. <div class="teafre" v-if="!oType">
  64. <div class="teaLeft">
  65. <div>开展频次</div>
  66. <div>153</div>
  67. </div>
  68. <div class="teaLeft teaRigth">
  69. <div>人均频次</div>
  70. <div>4</div>
  71. </div>
  72. </div>
  73. <div class="teafre" v-if="oType">
  74. <div class="teaLeft">
  75. <div>累计时长</div>
  76. <div>15310</div>
  77. </div>
  78. <div class="teaLeft teaRigth">
  79. <div>人均在线时长</div>
  80. <div>4</div>
  81. </div>
  82. </div>
  83. <div class="dataBox">
  84. <toolUser style="height: calc(100% - 120px)" v-if="!oType"></toolUser>
  85. <bar style="height: calc(100% - 120px)" v-if="oType"></bar>
  86. <div class="otherCss">
  87. <div v-if="!oType">切换为柱状图</div>
  88. <div v-if="oType">切换为热力图</div>
  89. <div class="otherImg" @click="otherEchart">
  90. <img src="../../../../assets/icon/other.png" alt="" />
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="center">
  97. <div class="top">
  98. <div class="titleBox" style="justify-content: space-between">
  99. <div
  100. style="
  101. display: flex;
  102. flex-direction: row;
  103. flex-wrap: nowrap;
  104. align-items: center;
  105. "
  106. >
  107. <div
  108. class="title"
  109. :class="{ isClick: courseType == 0 }"
  110. @click="courseType = 0"
  111. style="cursor: pointer; padding: 0 0 5px 0"
  112. >
  113. 学生行为分布
  114. </div>
  115. <div
  116. class="title"
  117. :class="{ isClick: courseType == 1 }"
  118. @click="courseType = 1"
  119. style="cursor: pointer; padding: 0 0 5px 0"
  120. >
  121. 学生协同情况
  122. </div>
  123. </div>
  124. <div
  125. style="
  126. display: flex;
  127. flex-direction: row;
  128. flex-wrap: nowrap;
  129. align-items: center;
  130. "
  131. v-if="courseType == 0"
  132. >
  133. <el-select v-model="cType1" class="selectBox" style="width: 110px">
  134. <el-option label="全部" value="全部"></el-option>
  135. </el-select>
  136. <el-select v-model="cType2" class="selectBox" style="width: 110px">
  137. <el-option label="在线时长" value="在线时长"></el-option>
  138. </el-select>
  139. </div>
  140. <div
  141. style="
  142. display: flex;
  143. flex-direction: row;
  144. flex-wrap: nowrap;
  145. align-items: center;
  146. "
  147. v-if="courseType == 1"
  148. >
  149. <el-select v-model="cType3" class="selectBox" style="width: 110px">
  150. <el-option label="全部" value="全部"></el-option>
  151. </el-select>
  152. <el-select v-model="cType4" class="selectBox" style="width: 110px">
  153. <el-option label="师生" value="师生"></el-option>
  154. </el-select>
  155. <el-select v-model="cType5" class="selectBox" style="width: 110px">
  156. <el-option label="全部年级" value="全部年级"></el-option>
  157. </el-select>
  158. </div>
  159. <div class="timeDiv">
  160. <div @click="tType1 = 0" :class="{ isClick: tType1 == 0 }">周</div>
  161. <div @click="tType1 = 1" :class="{ isClick: tType1 == 1 }">月</div>
  162. <div @click="tType1 = 2" :class="{ isClick: tType1 == 2 }">
  163. 学期
  164. </div>
  165. </div>
  166. </div>
  167. <div class="dataBox">
  168. <studentInfo
  169. v-if="courseType == 0"
  170. style="height: calc(100%)"
  171. ></studentInfo>
  172. <courseNum
  173. v-if="courseType == 1"
  174. style="height: calc(100%)"
  175. ></courseNum>
  176. </div>
  177. </div>
  178. <div class="bottom">
  179. <div class="titleBox" style="justify-content: space-between">
  180. <div
  181. style="
  182. display: flex;
  183. flex-direction: row;
  184. flex-wrap: nowrap;
  185. align-items: center;
  186. "
  187. >
  188. <div
  189. class="title"
  190. :class="{ isClick: bType == 0 }"
  191. @click="bType = 0"
  192. style="cursor: pointer; padding: 0 0 5px 0"
  193. >
  194. 课程参与情况
  195. </div>
  196. <div
  197. class="title"
  198. :class="{ isClick: bType == 1 }"
  199. @click="bType = 1"
  200. style="cursor: pointer; padding: 0 0 5px 0"
  201. >
  202. 项目参与情况
  203. </div>
  204. </div>
  205. <div class="timeDiv">
  206. <div @click="sType = 0" :class="{ isClick: sType == 0 }">周</div>
  207. <div @click="sType = 1" :class="{ isClick: sType == 1 }">月</div>
  208. <div @click="sType = 2" :class="{ isClick: sType == 2 }">学期</div>
  209. </div>
  210. </div>
  211. <div class="dataBox">
  212. <div class="allBox" style="height: calc(100% - 30px)">
  213. <div class="allBox_left">
  214. <stuAct></stuAct>
  215. </div>
  216. <div class="allBox_right">
  217. <div class="depth">
  218. <span>参与项目</span>
  219. <div>
  220. <el-progress
  221. :width="80"
  222. type="circle"
  223. :percentage="80"
  224. :stroke-width="15"
  225. :format="format"
  226. color="#106BFF"
  227. ></el-progress>
  228. </div>
  229. </div>
  230. <div class="depth">
  231. <span>使用工具</span>
  232. <div>
  233. <el-progress
  234. :width="80"
  235. type="circle"
  236. :percentage="80"
  237. :stroke-width="15"
  238. :format="format"
  239. color="#106BFF"
  240. ></el-progress>
  241. </div>
  242. </div>
  243. <div class="depth">
  244. <span>协同合作</span>
  245. <div>
  246. <el-progress
  247. :width="80"
  248. type="circle"
  249. :percentage="80"
  250. :stroke-width="15"
  251. :format="format"
  252. color="#106BFF"
  253. ></el-progress>
  254. </div>
  255. </div>
  256. <div class="depth">
  257. <span>互动交流</span>
  258. <div>
  259. <el-progress
  260. :width="80"
  261. type="circle"
  262. :percentage="80"
  263. :stroke-width="15"
  264. :format="format"
  265. color="#106BFF"
  266. ></el-progress>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. </div>
  274. <div class="right">
  275. <div class="top" style="border-radius: 5px">
  276. <div class="titleBox" style="justify-content: space-between">
  277. <div class="title">整体分布</div>
  278. <div
  279. style="
  280. display: flex;
  281. flex-direction: row;
  282. flex-wrap: nowrap;
  283. align-items: center;
  284. "
  285. >
  286. <el-select v-model="cType6" class="selectBox" style="width: 110px">
  287. <el-option label="全部" value="全部"></el-option>
  288. </el-select>
  289. <el-select v-model="cType7" class="selectBox" style="width: 110px">
  290. <el-option label="在线时长" value="在线时长"></el-option>
  291. </el-select>
  292. </div>
  293. </div>
  294. <div class="dataBox">
  295. <studentInfo2 style="height: calc(100% - 40px)"></studentInfo2>
  296. </div>
  297. </div>
  298. <div class="bottom">
  299. <div class="titleBox" style="justify-content: space-between">
  300. <div class="title">活动参与</div>
  301. <div
  302. style="
  303. display: flex;
  304. flex-direction: row;
  305. flex-wrap: nowrap;
  306. align-items: center;
  307. "
  308. >
  309. <el-select v-model="cType8" class="selectBox" style="width: 110px">
  310. <el-option label="全部年级" value="全部年级"></el-option>
  311. </el-select>
  312. <el-select v-model="cType9" class="selectBox" style="width: 110px">
  313. <el-option label="全部班级" value="全部班级"></el-option>
  314. </el-select>
  315. </div>
  316. </div>
  317. <div class="dataBox">
  318. <div class="teafre">
  319. <div class="teaLeft">
  320. <div>人均参与课程数</div>
  321. <div>18</div>
  322. </div>
  323. <div class="teaLeft teaRigth">
  324. <div>人均参与项目数</div>
  325. <div>18</div>
  326. </div>
  327. </div>
  328. <loginTime style="height: calc(100% - 72px)"></loginTime>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </template>
  334. <script>
  335. import loginCount from "./loginCount";
  336. import studentInfo from "./studentInfo";
  337. import studentInfo2 from "./studentInfo2";
  338. import loginTime from "./loginTime";
  339. import stuAct from "./stuAct";
  340. import toolUser from "./toolUser";
  341. import bar from "./bar";
  342. import courseNum from "./courseNum";
  343. export default {
  344. props: {
  345. oid: {
  346. type: String,
  347. },
  348. org: {
  349. type: String,
  350. },
  351. },
  352. components: {
  353. loginCount,
  354. studentInfo,
  355. studentInfo2,
  356. loginTime,
  357. stuAct,
  358. toolUser,
  359. bar,
  360. courseNum,
  361. },
  362. data() {
  363. return {
  364. skType: 0,
  365. tType: 0,
  366. courseType: 0,
  367. tType1: 0,
  368. sType: 0,
  369. bType: 0,
  370. cType: "全部",
  371. cType1: "全部",
  372. cType2: "在线时长",
  373. cType3: "全部",
  374. cType4: "师生",
  375. cType5: "全部年级",
  376. cType6: "全部",
  377. cType7: "在线时长",
  378. cType8: "全部年级",
  379. cType9: "全部班级",
  380. oType: false,
  381. };
  382. },
  383. mounted() {},
  384. methods: {
  385. otherEchart() {
  386. this.oType = !this.oType;
  387. },
  388. },
  389. };
  390. </script>
  391. <style scoped>
  392. .body1 {
  393. width: 100%;
  394. height: 100%;
  395. display: flex;
  396. padding: 20px;
  397. box-sizing: border-box;
  398. overflow: hidden;
  399. }
  400. .left {
  401. width: calc(100% / 4 * 1);
  402. height: 100%;
  403. }
  404. .left > .top {
  405. width: 100%;
  406. height: calc(100% / 2 - 10px);
  407. background: #fff;
  408. border-radius: 5px;
  409. margin: 0 0 20px 0;
  410. }
  411. .left > .bottom {
  412. width: 100%;
  413. height: calc(100% / 2 - 10px);
  414. background: #fff;
  415. border-radius: 5px;
  416. }
  417. .center {
  418. width: calc(100% / 4 * 2 - 40px);
  419. height: 100%;
  420. margin: 0 20px;
  421. }
  422. .center > .top {
  423. width: 100%;
  424. height: calc(100% / 6 * 4 - 10px);
  425. background: #fff;
  426. border-radius: 5px;
  427. margin: 0 0 20px 0;
  428. }
  429. .center > .bottom {
  430. width: 100%;
  431. height: calc(100% / 6 * 2 - 10px);
  432. background: #fff;
  433. border-radius: 5px;
  434. }
  435. .right {
  436. width: calc(100% / 4 * 1);
  437. height: 100%;
  438. }
  439. .right > .top {
  440. width: 100%;
  441. height: calc(100% / 2 - 10px);
  442. background: #fff;
  443. border-radius: 5px;
  444. margin: 0 0 20px 0;
  445. }
  446. .right > .bottom {
  447. width: 100%;
  448. height: calc(100% / 2 - 10px);
  449. background: #fff;
  450. border-radius: 5px;
  451. }
  452. .dataBox {
  453. height: calc(100% - 40px);
  454. width: 100%;
  455. }
  456. .titleBox {
  457. height: 40px;
  458. display: flex;
  459. align-items: center;
  460. padding: 0 15px;
  461. box-sizing: border-box;
  462. width: 100%;
  463. }
  464. .title {
  465. color: #060e17;
  466. margin-right: 10px;
  467. }
  468. .dataBox {
  469. height: calc(100% - 40px);
  470. width: 100%;
  471. }
  472. .info_box {
  473. display: flex;
  474. flex-wrap: wrap;
  475. align-items: center;
  476. justify-content: space-between;
  477. width: 90%;
  478. margin: 0 auto;
  479. }
  480. .info_box > .info2,
  481. .info_box > .info3,
  482. .info_box > .info {
  483. width: calc(50% - 10px);
  484. display: flex;
  485. flex-direction: column;
  486. height: 60px;
  487. justify-content: center;
  488. padding: 0 10px;
  489. box-sizing: border-box;
  490. margin-bottom: 10px;
  491. border-radius: 5px;
  492. }
  493. .info_box > .info2 {
  494. width: calc(100% / 4 - 10px);
  495. align-items: flex-end;
  496. margin-right: 10px;
  497. }
  498. .info_box > .info3 {
  499. width: 100%;
  500. margin-bottom: 5px;
  501. }
  502. .info_box > .info2 > span:nth-child(1),
  503. .info_box > .info3 > span:nth-child(1),
  504. .info_box > .info > span:nth-child(1) {
  505. font-size: 12px;
  506. /* margin: 0 0 5px 0; */
  507. color: #565e6a;
  508. }
  509. .info_box > .info2 > span:nth-child(2),
  510. .info_box > .info3 > span:nth-child(2),
  511. .info_box > .info > span:nth-child(2) {
  512. font-size: 22px;
  513. font-weight: 700;
  514. }
  515. .blueBG {
  516. background: linear-gradient(
  517. 180deg,
  518. rgba(224, 234, 251, 0.2) 0%,
  519. rgba(54, 130, 252, 0.3) 100%
  520. );
  521. }
  522. .greenBG {
  523. background: linear-gradient(
  524. 180deg,
  525. rgb(211, 246, 228, 0.2) 0%,
  526. rgb(23, 196, 105, 0.3) 100%
  527. );
  528. }
  529. .depth_box {
  530. display: flex;
  531. flex-wrap: wrap;
  532. height: 100%;
  533. width: 95%;
  534. margin: 0 auto;
  535. overflow: hidden;
  536. justify-content: space-between;
  537. }
  538. .depth {
  539. width: calc(100% / 5 - 10px);
  540. display: flex;
  541. flex-direction: column;
  542. align-items: center;
  543. justify-content: center;
  544. }
  545. .depth > span:nth-child(1) {
  546. font-size: 14px;
  547. font-weight: 700;
  548. margin: 0 0 10px;
  549. }
  550. .depth > div:nth-child(1) {
  551. }
  552. .selectBox {
  553. width: 80px;
  554. margin-left: 10px;
  555. }
  556. .selectBox >>> .el-input__inner {
  557. height: 30px;
  558. line-height: 30px;
  559. }
  560. .selectBox >>> .el-input__icon {
  561. line-height: 30px;
  562. }
  563. .teafre {
  564. margin: 5px 0;
  565. display: flex;
  566. flex-direction: row;
  567. flex-wrap: nowrap;
  568. align-items: center;
  569. width: 100%;
  570. justify-content: space-evenly;
  571. }
  572. .teaLeft,
  573. .teaMiddle {
  574. width: calc(100% / 2 - 10px);
  575. height: 60px;
  576. border-radius: 8px;
  577. /* border: 1px solid #e0eafb; */
  578. display: flex;
  579. flex-direction: column;
  580. align-items: flex-start;
  581. justify-content: center;
  582. padding: 0 10px;
  583. margin: 0 10px;
  584. }
  585. .teaMiddle {
  586. width: calc(100% / 3 - 10px);
  587. }
  588. .teaLeft {
  589. width: 95%;
  590. background: #f3f8fd;
  591. }
  592. .teaRigth {
  593. background: #f3f8fd;
  594. }
  595. .timeDiv {
  596. display: flex;
  597. flex-direction: row;
  598. flex-wrap: nowrap;
  599. align-items: center;
  600. margin: 0 0 0 15px;
  601. }
  602. .timeDiv > div {
  603. margin-right: 10px;
  604. cursor: pointer;
  605. }
  606. .isClick {
  607. color: #1684fc;
  608. border-bottom: 2px solid #1684fc;
  609. box-sizing: border-box;
  610. }
  611. .otherCss {
  612. display: flex;
  613. flex-direction: row;
  614. flex-wrap: nowrap;
  615. align-items: center;
  616. justify-content: flex-end;
  617. }
  618. .otherImg {
  619. width: 20px;
  620. height: 20px;
  621. margin: 0 10px;
  622. cursor: pointer;
  623. }
  624. .otherImg > img {
  625. width: 100%;
  626. height: 100%;
  627. }
  628. .allBox {
  629. width: 100%;
  630. height: 100%;
  631. display: flex;
  632. flex-direction: row;
  633. flex-wrap: nowrap;
  634. align-items: center;
  635. }
  636. .allBox_left {
  637. width: 30%;
  638. height: 100%;
  639. }
  640. .allBox_right {
  641. display: flex;
  642. flex-wrap: wrap;
  643. height: 100%;
  644. width: 70%;
  645. margin: 0 auto;
  646. overflow: hidden;
  647. justify-content: space-between;
  648. }
  649. .depth {
  650. width: calc(100% / 4 - 10px);
  651. display: flex;
  652. flex-direction: column;
  653. align-items: center;
  654. justify-content: center;
  655. }
  656. .depth > span:nth-child(1) {
  657. font-size: 14px;
  658. font-weight: 700;
  659. margin: 0 0 10px;
  660. }
  661. .depth > div:nth-child(1) {
  662. }
  663. </style>