index.vue 18 KB

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