index.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592
  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="cType7" class="selectBox" style="width: 110px">
  9. <el-option label="全部课程" value="全部课程"></el-option>
  10. </el-select> -->
  11. </div>
  12. <div class="dataBox">
  13. <div class="info_box">
  14. <div class="info blueBG">
  15. <span>课程总数</span>
  16. <!-- <span>{{ count }}</span> -->
  17. <span>{{ allCourse }}</span>
  18. </div>
  19. <div class="info blueBG">
  20. <span>本月新增课程环比</span>
  21. <!-- <span>{{ weekCount }}</span> -->
  22. <span v-if="loginCountMonthArray.length">{{
  23. loginCountMonthArray[loginCountMonthArray.length - 1].course -
  24. loginCountMonthArray[loginCountMonthArray.length - 2].course <
  25. 0
  26. ? 0
  27. : (
  28. ((loginCountMonthArray[loginCountMonthArray.length - 1]
  29. .course -
  30. loginCountMonthArray[loginCountMonthArray.length - 2]
  31. .course) /
  32. (allCourse -
  33. loginCountMonthArray[loginCountMonthArray.length - 1]
  34. .course)) *
  35. 100
  36. ).toFixed(2) + "%"
  37. }}</span>
  38. </div>
  39. <div class="info blueBG">
  40. <span>模板课程总数</span>
  41. <!-- <span>{{ weekCount }}</span> -->
  42. <span>{{ courseTemplate }}</span>
  43. </div>
  44. <div class="info blueBG">
  45. <span>本月新增课程总数</span>
  46. <!-- <span>{{ weekCount }}</span> -->
  47. <span v-if="loginCountMonthArray.length">{{
  48. loginCountMonthArray[loginCountMonthArray.length - 1].course
  49. }}</span>
  50. </div>
  51. </div>
  52. <TeaFre
  53. style="height: calc(100% - 140px)"
  54. :monthArray="loginCountMonthArray"
  55. ></TeaFre>
  56. </div>
  57. </div>
  58. <div class="bottom">
  59. <div class="titleBox">
  60. <div
  61. class="title"
  62. :class="{ isClick: skType == 0 }"
  63. @click="skType = 0"
  64. style="cursor: pointer; padding: 0 0 5px 0"
  65. >
  66. 授课时长
  67. </div>
  68. <div
  69. class="title"
  70. :class="{ isClick: skType == 1 }"
  71. @click="skType = 1"
  72. style="cursor: pointer; padding: 0 0 5px 0"
  73. >
  74. 作业数量
  75. </div>
  76. <el-select
  77. v-if="skType == 0"
  78. v-model="lType"
  79. @change="typeChange1"
  80. class="selectBox"
  81. style="margin-left: auto"
  82. >
  83. <el-option label="全部" value="all"></el-option>
  84. <el-option label="年级" value="grade"></el-option>
  85. <el-option label="主题" value="theme"></el-option>
  86. <el-option label="学科" value="subject"></el-option>
  87. </el-select>
  88. <el-select
  89. v-if="skType == 1"
  90. v-model="lType1"
  91. @change="typeChange2"
  92. class="selectBox"
  93. style="margin-left: auto"
  94. >
  95. <el-option label="全部" value="all"></el-option>
  96. <el-option label="年级" value="grade"></el-option>
  97. <el-option label="主题" value="theme"></el-option>
  98. <el-option label="学科" value="subject"></el-option>
  99. </el-select>
  100. <!-- <el-select v-model="cType" class="selectBox" style="width: 110px">
  101. <el-option label="全部年级" value="全部年级"></el-option>
  102. <el-option label="一年级" value="一年级"></el-option>
  103. <el-option label="二年级" value="二年级"></el-option>
  104. <el-option label="三年级" value="三年级"></el-option>
  105. </el-select>
  106. <div class="timeDiv">
  107. <div @click="tType = 0" :class="{ isClick: tType == 0 }">周</div>
  108. <div @click="tType = 1" :class="{ isClick: tType == 1 }">月</div>
  109. <div @click="tType = 2" :class="{ isClick: tType == 2 }">学期</div>
  110. </div> -->
  111. </div>
  112. <div class="dataBox">
  113. <div class="info_box" style="width: 96%" v-if="skType == 0">
  114. <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
  115. <span>累计时长</span>
  116. <!-- <span>{{ count }}</span> -->
  117. <span>{{ allTime }}</span>
  118. </div>
  119. <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
  120. <span>课程实施总数</span>
  121. <!-- <span>{{ weekCount }}</span> -->
  122. <span>{{ courseLength }}</span>
  123. </div>
  124. <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
  125. <span>课程平均时长</span>
  126. <!-- <span>{{ weekCount }}</span> -->
  127. <span>{{
  128. allTime == 0 ? 0 : (allTime / courseLength).toFixed(0)
  129. }}</span>
  130. </div>
  131. </div>
  132. <div class="info_box" style="width: 96%" v-if="skType == 1">
  133. <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
  134. <span>作业数量</span>
  135. <!-- <span>{{ count }}</span> -->
  136. <span>{{ worksCount }}</span>
  137. </div>
  138. <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
  139. <span>课程开展总数</span>
  140. <!-- <span>{{ weekCount }}</span> -->
  141. <span>{{ haveWorksCourse }}</span>
  142. </div>
  143. <div class="info blueBG" style="width: calc(100% / 3 - 10px)">
  144. <span>课程平均作业数量</span>
  145. <!-- <span>{{ weekCount }}</span> -->
  146. <span>{{
  147. worksCount == 0 ? 0 : (worksCount / haveWorksCourse).toFixed(0)
  148. }}</span>
  149. </div>
  150. </div>
  151. <Bar
  152. style="height: calc(100% - 70px)"
  153. v-if="skType == 0"
  154. :workList="tedurArray"
  155. ></Bar>
  156. <ToolUse
  157. style="height: calc(100% - 70px)"
  158. v-if="skType == 1"
  159. :yearArray="courseWorksCountYearArray"
  160. ></ToolUse>
  161. <!-- <div class="otherCss">
  162. <div v-if="!oType">切换为柱状图</div>
  163. <div v-if="oType">切换为热力图</div>
  164. <div class="otherImg" @click="otherEchart">
  165. <img src="../../../../assets/icon/other.png" alt="" />
  166. </div>
  167. </div> -->
  168. </div>
  169. </div>
  170. </div>
  171. <div class="center">
  172. <div class="top">
  173. <div class="titleBox">
  174. <div
  175. class="title"
  176. :class="{ isClick: courseType == 0 }"
  177. @click="courseType = 0"
  178. style="cursor: pointer; padding: 0 0 5px 0"
  179. >
  180. 课程分布
  181. </div>
  182. <div
  183. class="title"
  184. :class="{ isClick: courseType == 1 }"
  185. @click="courseType = 1"
  186. style="cursor: pointer; padding: 0 0 5px 0"
  187. >
  188. 课程总数变化
  189. </div>
  190. </div>
  191. <div class="dataBox">
  192. <CateRank
  193. v-if="courseType == 0"
  194. style="height: calc(100%)"
  195. :courseArray="courseArray"
  196. ></CateRank>
  197. <CourseNum
  198. v-if="courseType == 1"
  199. style="height: calc(100%)"
  200. :weekCourse2="weekCourse2"
  201. ></CourseNum>
  202. </div>
  203. </div>
  204. <div class="bottom">
  205. <div class="titleBox" style="justify-content: space-between">
  206. <div class="title">课程实施程度</div>
  207. </div>
  208. <div class="dataBox">
  209. <div class="allBox" v-if="!shType" style="height: calc(100% - 30px)">
  210. <div class="allBox_left">
  211. <CourseTime v-if="!shType" :pusaDep="pusaDep"></CourseTime>
  212. </div>
  213. <div class="allBox_right">
  214. <div class="depth">
  215. <span>设置评价</span>
  216. <div>
  217. <el-progress
  218. :width="80"
  219. type="circle"
  220. :percentage="
  221. allCourse
  222. ? parseInt(((evaCount / allCourse) * 100).toFixed(0))
  223. : 0
  224. "
  225. :stroke-width="5"
  226. :format="format"
  227. color="#106BFF"
  228. ></el-progress>
  229. </div>
  230. </div>
  231. <div class="depth">
  232. <span>已提交作业</span>
  233. <div>
  234. <el-progress
  235. :width="80"
  236. type="circle"
  237. :percentage="
  238. allCourse
  239. ? parseInt(
  240. ((haveWorksCourse / allCourse) * 100).toFixed(0)
  241. )
  242. : 0
  243. "
  244. :stroke-width="5"
  245. :format="format"
  246. color="#106BFF"
  247. ></el-progress>
  248. </div>
  249. </div>
  250. <div class="depth">
  251. <span>已评价课程</span>
  252. <div>
  253. <el-progress
  254. :width="80"
  255. type="circle"
  256. :percentage="
  257. allCourse
  258. ? parseInt(
  259. ((evaWorksCount / allCourse) * 100).toFixed(0)
  260. )
  261. : 0
  262. "
  263. :stroke-width="5"
  264. :format="format"
  265. color="#106BFF"
  266. ></el-progress>
  267. </div>
  268. </div>
  269. <div class="depth">
  270. <span>教学评一体化</span>
  271. <div>
  272. <el-progress
  273. :width="80"
  274. type="circle"
  275. :percentage="
  276. allCourse
  277. ? parseInt(
  278. ((evaWorksCount / allCourse) * 100).toFixed(0)
  279. )
  280. : 0
  281. "
  282. :stroke-width="5"
  283. :format="format"
  284. color="#106BFF"
  285. ></el-progress>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. <div class="info_box" v-if="shType">
  291. <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
  292. <span>平台实施课程总数</span>
  293. <!-- <span>{{ count }}</span> -->
  294. <span>{{ isCourseCount }}</span>
  295. </div>
  296. <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
  297. <span>平台实施课程占比</span>
  298. <!-- <span>{{ weekCount }}</span> -->
  299. <span>{{
  300. isCourseCount
  301. ? ((isCourseCount / allCourseCount) * 100).toFixed(0) + "%"
  302. : "0%"
  303. }}</span>
  304. </div>
  305. <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
  306. <span>课程平均任务数量</span>
  307. <!-- <span>{{ weekCount }}</span> -->
  308. <span>{{
  309. isCourseCount ? (taskCount / isCourseCount).toFixed(0) : 0
  310. }}</span>
  311. </div>
  312. <div class="info blueBG" style="width: calc(100% / 4 - 10px)">
  313. <span>课程平均作业数量</span>
  314. <!-- <span>{{ weekCount }}</span> -->
  315. <span>{{
  316. isCourseCount ? (workCount / isCourseCount).toFixed(0) : 0
  317. }}</span>
  318. </div>
  319. </div>
  320. <WorkNum
  321. style="height: calc(100% - 95px)"
  322. :workNumList="workNumList"
  323. @openCourse="openCourse"
  324. v-if="shType"
  325. ></WorkNum>
  326. <div class="otherCss">
  327. <div v-if="!shType">转换为散点图</div>
  328. <div v-if="shType">转换为漏斗图</div>
  329. <div class="otherImg" @click="shEchart">
  330. <img src="../../../../assets/icon/other.png" alt="" />
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. </div>
  336. <div class="right">
  337. <div class="top" style="border-radius: 5px">
  338. <div class="titleBox" style="justify-content: space-between">
  339. <div
  340. style="
  341. display: flex;
  342. flex-direction: row;
  343. flex-wrap: nowrap;
  344. align-items: center;
  345. "
  346. >
  347. <div
  348. class="title"
  349. :class="{ isClick: toolType == 0 }"
  350. @click="toolType = 0"
  351. style="cursor: pointer; padding: 0 0 5px 0"
  352. >
  353. 课程占比
  354. </div>
  355. <div
  356. class="title"
  357. :class="{ isClick: toolType == 1 }"
  358. @click="toolType = 1"
  359. style="cursor: pointer; padding: 0 0 5px 0"
  360. >
  361. 工具使用
  362. </div>
  363. </div>
  364. <el-select
  365. v-model="cType4"
  366. @change="typeChange"
  367. class="selectBox"
  368. v-if="toolType == 0"
  369. >
  370. <el-option label="全部" value=""></el-option>
  371. <el-option label="年级" value="grade"></el-option>
  372. <el-option label="主题" value="theme"></el-option>
  373. <el-option label="学科" value="subject"></el-option>
  374. </el-select>
  375. </div>
  376. <div class="dataBox">
  377. <CourseAna
  378. style="height: calc(100%)"
  379. :courseNumberArray="courseNumberArray"
  380. v-if="toolType == 0"
  381. ></CourseAna>
  382. <ToolChart
  383. style="height: calc(100%)"
  384. :toolArray="toolList"
  385. v-if="toolType == 1"
  386. ></ToolChart>
  387. </div>
  388. </div>
  389. <div class="bottom">
  390. <div class="titleBox">
  391. <div class="title">课程协同情况</div>
  392. </div>
  393. <div class="dataBox">
  394. <WorkTime
  395. style="height: calc(100% - 25px)"
  396. :personArray="personList"
  397. v-if="xtType"
  398. ></WorkTime>
  399. <Subjuect style="height: calc(100% - 25px)" v-if="!xtType"></Subjuect>
  400. <div class="otherCss">
  401. <div v-if="!xtType">转换为人员协同</div>
  402. <div v-if="xtType">转换为学科协同</div>
  403. <div class="otherImg" @click="xtEchart">
  404. <img src="../../../../assets/icon/other.png" alt="" />
  405. </div>
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. </template>
  412. <script>
  413. import TeaFre from "./chartList/teaFre.vue";
  414. import ToolUse from "./chartList/toolUse.vue";
  415. import CateRank from "./chartList/cateRank.vue";
  416. import WorkNum from "./chartList/workNum.vue";
  417. import CourseTime from "./chartList/courseTime.vue";
  418. import CourseAna from "./chartList/courseAna.vue";
  419. import WorkTime from "./chartList/workTime.vue";
  420. import Bar from "./chartList/bar.vue";
  421. import CourseNum from "./chartList/courseNum.vue";
  422. import ToolChart from "./chartList/toolChart.vue";
  423. import Subjuect from "./chartList/subjuect.vue";
  424. export default {
  425. components: {
  426. TeaFre,
  427. ToolUse,
  428. CateRank,
  429. WorkNum,
  430. CourseTime,
  431. CourseAna,
  432. WorkTime,
  433. Bar,
  434. CourseNum,
  435. ToolChart,
  436. Subjuect,
  437. },
  438. props: {
  439. oid: {
  440. type: String,
  441. },
  442. org: {
  443. type: String,
  444. },
  445. },
  446. data() {
  447. return {
  448. isLoading: false,
  449. cType: "全部年级",
  450. cType4: "",
  451. cType7: "全部课程",
  452. toolType: 0,
  453. tType: 0,
  454. skType: 0,
  455. courseType: 0,
  456. sType: 0,
  457. oType: false,
  458. shType: false,
  459. xtType: false,
  460. allCourse: 0,
  461. courseTemplate: 0,
  462. loginCountMonthArray: [],
  463. lType: "all",
  464. lType1: "all",
  465. tedurArray: [],
  466. classList: [],
  467. subjectList: [],
  468. themeList: [],
  469. allTime: 0,
  470. gradeLength: 0,
  471. subjectLength: 0,
  472. themeLength: 0,
  473. courseTList: [],
  474. courseLength: 0,
  475. courseWorksCountYearArray: [],
  476. allCourseWorks: [],
  477. gradeList: [],
  478. subjectList: [],
  479. thList: [],
  480. worksCount: 0,
  481. haveWorksCourse: 0,
  482. courseNumberArray: [],
  483. gradeArray: [],
  484. subjectArray: [],
  485. themeArray: [],
  486. allArray: [],
  487. toolList: [],
  488. personList: [],
  489. workNumList: [],
  490. taskCount: 0,
  491. workCount: 0,
  492. isCourseCount: 0,
  493. allCourseCount: 0,
  494. courseArray: [],
  495. evaCount: 0,
  496. evaWorksCount: 0,
  497. pusaDep: [
  498. { value: 0, name: "课程总数" },
  499. { value: 0, name: "设置评价课程" },
  500. { value: 0, name: "已提交作业课程" },
  501. { value: 0, name: "已评价课程" },
  502. { value: 0, name: "教学评一体化课程" },
  503. ],
  504. weekCourse2: [],
  505. };
  506. },
  507. mounted() {
  508. this.getData();
  509. },
  510. methods: {
  511. openCourse(cid) {
  512. window.parent.postMessage({ cid: cid, screenType: "3" }, "*");
  513. },
  514. otherEchart() {
  515. this.oType = !this.oType;
  516. },
  517. shEchart() {
  518. this.shType = !this.shType;
  519. },
  520. xtEchart() {
  521. this.xtType = !this.xtType;
  522. },
  523. format(percentage) {
  524. return percentage + "%";
  525. },
  526. typeChange1() {
  527. var a = [];
  528. if (this.lType == "all") {
  529. a = this.classList.concat(this.subjectList, this.themeList);
  530. this.courseLength =
  531. this.gradeLength + this.subjectLength + this.themeLength;
  532. } else if (this.lType == "grade") {
  533. a = this.classList;
  534. this.courseLength = this.gradeLength;
  535. } else if (this.lType == "subject") {
  536. a = this.subjectList;
  537. this.courseLength = this.subjectLength;
  538. } else {
  539. a = this.themeList;
  540. this.courseLength = this.themeLength;
  541. }
  542. this.tedurArray = a;
  543. var time = 0;
  544. for (var i = 0; i < a.length; i++) {
  545. if (a[i].time) {
  546. time += a[i].time;
  547. }
  548. }
  549. this.allTime = time;
  550. this.$forceUpdate();
  551. },
  552. typeChange2() {
  553. const date = new Date();
  554. var Month = date.getMonth() + 1;
  555. var Year = date.getFullYear();
  556. let courseWorksCountYearArray = [];
  557. for (var i = Month; i > Month - 12; i--) {
  558. if (i <= 0) {
  559. courseWorksCountYearArray.push({
  560. Year: Year - 1,
  561. Month: 12 + i,
  562. mon: 0,
  563. tue: 0,
  564. wed: 0,
  565. thur: 0,
  566. fri: 0,
  567. sat: 0,
  568. sun: 0,
  569. });
  570. } else {
  571. courseWorksCountYearArray.push({
  572. Month: i,
  573. Year: Year,
  574. mon: 0,
  575. tue: 0,
  576. wed: 0,
  577. thur: 0,
  578. fri: 0,
  579. sat: 0,
  580. sun: 0,
  581. });
  582. }
  583. }
  584. courseWorksCountYearArray = courseWorksCountYearArray.reverse();
  585. for (var i = 0; i < this.allCourseWorks.length; i++) {
  586. let _date = new Date(this.allCourseWorks[i].create_at);
  587. let _type = this.allCourseWorks[i].typeid;
  588. var _month = _date.getMonth() + 1;
  589. var _year = _date.getFullYear();
  590. var _day = _date.getDay();
  591. let dayArray = ["sun", "mon", "tue", "wed", "thur", "fri", "sat"];
  592. for (var j = 0; j < courseWorksCountYearArray.length; j++) {
  593. if (this.lType1 == "all") {
  594. if (
  595. _month == courseWorksCountYearArray[j].Month &&
  596. _year == courseWorksCountYearArray[j].Year
  597. ) {
  598. courseWorksCountYearArray[j][dayArray[_day]]++;
  599. break;
  600. }
  601. } else if (this.lType1 == "grade") {
  602. if (
  603. _month == courseWorksCountYearArray[j].Month &&
  604. _year == courseWorksCountYearArray[j].Year &&
  605. this.gradeList.indexOf(_type) != -1
  606. ) {
  607. courseWorksCountYearArray[j][dayArray[_day]]++;
  608. break;
  609. }
  610. } else if (this.lType1 == "subject") {
  611. if (
  612. _month == courseWorksCountYearArray[j].Month &&
  613. _year == courseWorksCountYearArray[j].Year &&
  614. this.subjectList.indexOf(_type) != -1
  615. ) {
  616. courseWorksCountYearArray[j][dayArray[_day]]++;
  617. break;
  618. }
  619. } else {
  620. if (
  621. _month == courseWorksCountYearArray[j].Month &&
  622. _year == courseWorksCountYearArray[j].Year &&
  623. this.thList.indexOf(_type) != -1
  624. ) {
  625. courseWorksCountYearArray[j][dayArray[_day]]++;
  626. break;
  627. }
  628. }
  629. }
  630. }
  631. var worksCount = 0,
  632. haveWorksCourse = [];
  633. for (var i = 0; i < this.allCourseWorks.length; i++) {
  634. if (this.lType1 == "all") {
  635. if (this.allCourseWorks[i].id) {
  636. worksCount++;
  637. }
  638. if (haveWorksCourse.length == 0) {
  639. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  640. } else {
  641. if (
  642. haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
  643. ) {
  644. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  645. }
  646. }
  647. } else if (this.lType1 == "grade") {
  648. if (this.gradeList.indexOf(this.allCourseWorks[i].typeid)) {
  649. if (this.allCourseWorks[i].id) {
  650. worksCount++;
  651. }
  652. if (haveWorksCourse.length == 0) {
  653. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  654. } else {
  655. if (
  656. haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
  657. ) {
  658. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  659. }
  660. }
  661. }
  662. } else if (this.lType1 == "subject") {
  663. if (this.subjectList.indexOf(this.allCourseWorks[i].typeid)) {
  664. if (this.allCourseWorks[i].id) {
  665. worksCount++;
  666. }
  667. if (haveWorksCourse.length == 0) {
  668. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  669. } else {
  670. if (
  671. haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
  672. ) {
  673. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  674. }
  675. }
  676. }
  677. } else {
  678. if (this.thList.indexOf(this.allCourseWorks[i].typeid)) {
  679. if (this.allCourseWorks[i].id) {
  680. worksCount++;
  681. }
  682. if (haveWorksCourse.length == 0) {
  683. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  684. } else {
  685. if (
  686. haveWorksCourse.indexOf(this.allCourseWorks[i].courseid) == -1
  687. ) {
  688. haveWorksCourse.push(this.allCourseWorks[i].courseid);
  689. }
  690. }
  691. }
  692. }
  693. }
  694. this.courseWorksCountYearArray = courseWorksCountYearArray;
  695. this.worksCount = worksCount;
  696. this.haveWorksCourse = haveWorksCourse.length;
  697. this.$forceUpdate();
  698. },
  699. typeChange() {
  700. if (this.cType4 === "") {
  701. this.courseNumberArray = this.allArray;
  702. } else if (this.cType4 === "grade") {
  703. this.courseNumberArray = this.gradeArray;
  704. } else if (this.cType4 === "theme") {
  705. this.courseNumberArray = this.themeArray;
  706. } else if (this.cType4 === "subject") {
  707. this.courseNumberArray = this.subjectArray;
  708. }
  709. this.$forceUpdate();
  710. },
  711. getData() {
  712. this.isLoading = true;
  713. let params = [
  714. {
  715. oid: this.oid,
  716. org: this.org,
  717. },
  718. ];
  719. this.ajax
  720. .post(this.$store.state.api + "selectDataBoardCourseNew", params)
  721. .then((res) => {
  722. this.isLoading = false;
  723. let _grade = res.data[0]; //年级
  724. let _subject = res.data[1]; //学科
  725. let _themeList = res.data[2]; //主题
  726. this.allCourse = res.data[3][0].count; //课程总数
  727. let _timeCourse = res.data[4]; //查询半年内全部课程
  728. this.courseTemplate = res.data[5][0].count; //查询模板课程总数
  729. let tList = res.data[6]; //授课时长
  730. // let countCourseWorks = res.data[8][0].count; //获取有作业的课程
  731. this.courseTList = tList;
  732. //将数据根据time里面的月份分成多个数组
  733. let loginCountMonthArray = [];
  734. const date = new Date();
  735. var Month = date.getMonth() + 1;
  736. var Year = date.getFullYear();
  737. for (var i = Month; i > Month - 6; i--) {
  738. if (i <= 0) {
  739. loginCountMonthArray.push({
  740. Year: Year - 1,
  741. Month: 12 + i,
  742. course: 0,
  743. });
  744. } else {
  745. loginCountMonthArray.push({
  746. Month: i,
  747. Year: Year,
  748. course: 0,
  749. });
  750. }
  751. }
  752. loginCountMonthArray = loginCountMonthArray.reverse();
  753. for (var i = 0; i < _timeCourse.length; i++) {
  754. let _date = new Date(_timeCourse[i].time);
  755. var _month = _date.getMonth() + 1;
  756. var _year = _date.getFullYear();
  757. for (var j = 0; j < loginCountMonthArray.length; j++) {
  758. if (
  759. _month == loginCountMonthArray[j].Month &&
  760. _year == loginCountMonthArray[j].Year
  761. ) {
  762. loginCountMonthArray[j].course++;
  763. break;
  764. }
  765. }
  766. }
  767. this.loginCountMonthArray = loginCountMonthArray;
  768. var courseJson = Object.values(
  769. tList.reduce(function (acc, obj) {
  770. if (!acc[obj.courseid]) {
  771. acc[obj.courseid] = { ...obj };
  772. acc[obj.courseid].typeid = [acc[obj.courseid].typeid];
  773. } else {
  774. if (!acc[obj.courseid].typeid.includes(obj.typeid)) {
  775. acc[obj.courseid].typeid.push(obj.typeid);
  776. }
  777. acc[obj.courseid].text =
  778. parseInt(acc[obj.courseid].text) + parseInt(obj.text);
  779. }
  780. return acc;
  781. }, {})
  782. ).map(function (obj) {
  783. var totalTime = parseInt(obj.text);
  784. obj.text = (totalTime / (60 * 60)).toFixed(2);
  785. return obj;
  786. });
  787. for (var i = 0; i < courseJson.length; i++) {
  788. for (var j = 0; j < _grade.length; j++) {
  789. if (courseJson[i].typeid.indexOf(_grade[j].id) != -1) {
  790. if (_grade[j].time && courseJson[i].text) {
  791. _grade[j].time += parseInt(courseJson[i].text);
  792. } else if (courseJson[i].text) {
  793. _grade[j].time = parseInt(courseJson[i].text);
  794. }
  795. }
  796. }
  797. for (var k = 0; k < _subject.length; k++) {
  798. if (courseJson[i].typeid.indexOf(_subject[k].id) != -1) {
  799. if (_subject[k].time && courseJson[i].text) {
  800. _subject[k].time += parseInt(courseJson[i].text);
  801. } else if (courseJson[i].text) {
  802. _subject[k].time = parseInt(courseJson[i].text);
  803. }
  804. }
  805. }
  806. for (var l = 0; l < _themeList.length; l++) {
  807. if (courseJson[i].typeid.indexOf(_themeList[l].id) != -1) {
  808. if (_themeList[l].time && courseJson[i].text) {
  809. _themeList[l].time += parseInt(courseJson[i].text);
  810. } else if (courseJson[i].text) {
  811. _themeList[l].time = parseInt(courseJson[i].text);
  812. }
  813. }
  814. }
  815. }
  816. this.classList = _grade;
  817. this.subjectList = _subject;
  818. this.themeList = _themeList;
  819. var _gradeList = [],
  820. _subjectList = [],
  821. _thList = [];
  822. for (var i = 0; i < _grade.length; i++) {
  823. _gradeList.push(_grade[i].id);
  824. }
  825. for (var i = 0; i < _subject.length; i++) {
  826. _subjectList.push(_subject[i].id);
  827. }
  828. for (var i = 0; i < _themeList.length; i++) {
  829. _thList.push(_themeList[i].id);
  830. }
  831. var _courseTypeList = this.courseTList;
  832. var _gList = [],
  833. _sList = [],
  834. _tList = [];
  835. for (var i = 0; i < _courseTypeList.length; i++) {
  836. if (_gradeList.indexOf(_courseTypeList[i].typeid) != -1) {
  837. if (_gList.length == 0) {
  838. _gList.push(_courseTypeList[i].courseid);
  839. } else {
  840. if (_gList.indexOf(_courseTypeList[i].courseid) == -1) {
  841. _gList.push(_courseTypeList[i].courseid);
  842. }
  843. }
  844. }
  845. if (_subjectList.indexOf(_courseTypeList[i].typeid) != -1) {
  846. if (_sList.length == 0) {
  847. _sList.push(_courseTypeList[i].courseid);
  848. } else {
  849. if (_sList.indexOf(_courseTypeList[i].courseid) == -1) {
  850. _sList.push(_courseTypeList[i].courseid);
  851. }
  852. }
  853. }
  854. if (_thList.indexOf(_courseTypeList[i].typeid) != -1) {
  855. if (_tList.length == 0) {
  856. _tList.push(_courseTypeList[i].courseid);
  857. } else {
  858. if (_tList.indexOf(_courseTypeList[i].courseid) == -1) {
  859. _tList.push(_courseTypeList[i].courseid);
  860. }
  861. }
  862. }
  863. }
  864. this.gradeLength = _gList.length;
  865. this.subjectLength = _sList.length;
  866. this.themeLength = _tList.length;
  867. var a = [];
  868. if (this.lType == "all") {
  869. this.tedurArray = _grade.concat(_subject, _themeList);
  870. this.courseLength = _gList.length + _sList.length + _tList.length;
  871. } else if (this.lType == "grade") {
  872. this.tedurArray = _grade;
  873. this.courseLength = _gList.length;
  874. } else if (this.lType == "subject") {
  875. this.tedurArray = _subject;
  876. this.courseLength = _sList.length;
  877. } else {
  878. this.tedurArray = _themeList;
  879. this.courseLength = _tList.length;
  880. }
  881. var time = 0;
  882. a = this.tedurArray;
  883. for (var i = 0; i < a.length; i++) {
  884. if (a[i].time) {
  885. time += a[i].time;
  886. }
  887. }
  888. this.allTime = time;
  889. let allCourseWorks = res.data[7]; //作业总数量
  890. this.allCourseWorks = allCourseWorks;
  891. this.gradeList = _gradeList;
  892. this.subjectList = _subjectList;
  893. this.thList = _thList;
  894. this.typeChange2();
  895. let _course = res.data[8]; //课程
  896. let _gradeArray = [];
  897. let _subjectArray = [];
  898. let _themeArray = [];
  899. for (var i = 0; i < _grade.length; i++) {
  900. _gradeArray.push({
  901. name: _grade[i].name,
  902. typeid: _grade[i].id,
  903. course: 0,
  904. array: [],
  905. });
  906. for (var z = 0; z < _course.length; z++) {
  907. if (_course[z].typeid == _grade[i].id) {
  908. _gradeArray[i].course++;
  909. _gradeArray[i].array.push(_course[z].courseid);
  910. }
  911. }
  912. }
  913. for (var i = 0; i < _subject.length; i++) {
  914. _subjectArray.push({
  915. name: _subject[i].name,
  916. typeid: _subject[i].id,
  917. course: 0,
  918. array: [],
  919. });
  920. for (var z = 0; z < _course.length; z++) {
  921. if (_course[z].typeid == _subject[i].id) {
  922. _subjectArray[i].course++;
  923. _subjectArray[i].array.push(_course[z].courseid);
  924. }
  925. }
  926. }
  927. for (var i = 0; i < _themeList.length; i++) {
  928. _themeArray.push({
  929. name: _themeList[i].name,
  930. typeid: _themeList[i].id,
  931. course: 0,
  932. array: [],
  933. });
  934. for (var z = 0; z < _course.length; z++) {
  935. if (_course[z].typeid == _themeList[i].id) {
  936. _themeArray[i].course++;
  937. _themeArray[i].array.push(_course[z].courseid);
  938. }
  939. }
  940. }
  941. this.gradeArray = _gradeArray;
  942. this.subjectArray = _subjectArray;
  943. this.themeArray = _themeArray;
  944. this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
  945. this.typeChange();
  946. var courseList = res.data[9];
  947. var cList = [];
  948. for (var i = 0; i < courseList.length; i++) {
  949. cList.push(JSON.parse(courseList[i].chapters));
  950. }
  951. var toolList = [
  952. [10, 65], //互动类
  953. [7, 1, 52, 3, 48], //思维类
  954. [49], //协作类
  955. [4, 45, 15, 16, 50, 41, 47], //测评类
  956. [40], //评价类
  957. [18, 21, 22, 23, 24, 32, 57, 63], //编程类
  958. [28, 31, 39, 66, 67, 68], //学科类
  959. ];
  960. var toolAllArray = [
  961. { name: "互动类", value: 0 },
  962. { name: "思维类", value: 0 },
  963. { name: "协作类", value: 0 },
  964. { name: "测评类", value: 0 },
  965. { name: "评价类", value: 0 },
  966. { name: "编程类", value: 0 },
  967. { name: "学科类", value: 0 },
  968. ];
  969. for (var p = 0; p < toolList.length; p++) {
  970. for (var i = 0; i < cList.length; i++) {
  971. for (var j = 0; j < cList[i].length; j++) {
  972. for (
  973. var k = 0;
  974. k < cList[i][j].chapterInfo[0].taskJson.length;
  975. k++
  976. ) {
  977. for (
  978. var q = 0;
  979. q <
  980. cList[i][j].chapterInfo[0].taskJson[k].toolChoose.length;
  981. q++
  982. ) {
  983. if (
  984. toolList[p].indexOf(
  985. cList[i][j].chapterInfo[0].taskJson[k].toolChoose[q]
  986. .tool[0]
  987. ) != -1
  988. ) {
  989. toolAllArray[p].value++;
  990. }
  991. }
  992. }
  993. }
  994. }
  995. }
  996. this.toolList = toolAllArray;
  997. var twoPerson = 0,
  998. threePerson = 0,
  999. fivePerson = 0,
  1000. sevenPerson = 0;
  1001. var personList = [];
  1002. for (var i = 0; i < courseList.length; i++) {
  1003. if (courseList[i].course_teacher) {
  1004. if (courseList[i].course_teacher.split(",").length <= 2) {
  1005. twoPerson++;
  1006. } else if (
  1007. 4 >= courseList[i].course_teacher.split(",").length &&
  1008. courseList[i].course_teacher.split(",").length > 2
  1009. ) {
  1010. threePerson++;
  1011. } else if (
  1012. 6 >= courseList[i].course_teacher.split(",").length &&
  1013. courseList[i].course_teacher.split(",").length > 4
  1014. ) {
  1015. fivePerson++;
  1016. } else if (courseList[i].course_teacher.split(",").length > 7) {
  1017. sevenPerson++;
  1018. }
  1019. }
  1020. }
  1021. personList.push(
  1022. { name: "2人以下", value: twoPerson },
  1023. { name: "3-4人", value: threePerson },
  1024. { name: "5-6人", value: fivePerson },
  1025. { name: "7人以上", value: sevenPerson }
  1026. );
  1027. this.personList = personList;
  1028. let _workCourse = res.data[10]; //带作业的课程
  1029. let _taskCount = 0; //任务数量
  1030. var wList = [];
  1031. for (var i = 0; i < _workCourse.length; i++) {
  1032. if (!wList[_workCourse[i].courseId]) {
  1033. wList[_workCourse[i].courseId] = {
  1034. cid: _workCourse[i].courseId,
  1035. title: _workCourse[i].title,
  1036. task: 0,
  1037. work: 0,
  1038. };
  1039. let chapters = JSON.parse(_workCourse[i].chapters);
  1040. for (var j = 0; j < chapters.length; j++) {
  1041. if (wList[_workCourse[i].courseId].task == 0) {
  1042. wList[_workCourse[i].courseId].task =
  1043. chapters[j].chapterInfo[0].taskJson.length;
  1044. } else {
  1045. wList[_workCourse[i].courseId].task +=
  1046. chapters[j].chapterInfo[0].taskJson.length;
  1047. }
  1048. _taskCount += chapters[j].chapterInfo[0].taskJson.length;
  1049. }
  1050. }
  1051. }
  1052. for (var i = 0; i < _workCourse.length; i++) {
  1053. let a = Object.keys(wList);
  1054. for (var j = 0; j < Object.keys(wList).length; j++) {
  1055. if (
  1056. _workCourse[i].courseId == wList[a[j]].cid &&
  1057. _workCourse[i].id
  1058. ) {
  1059. wList[a[j]].work++;
  1060. }
  1061. }
  1062. }
  1063. var workNumList = Object.values(wList).map((item) => [
  1064. item.task,
  1065. item.work,
  1066. item.title,
  1067. item.cid,
  1068. ]);
  1069. this.workNumList = workNumList;
  1070. this.taskCount = _taskCount;
  1071. this.workCount = _workCourse.length;
  1072. this.isCourseCount = res.data[11][0].count; //课程开展总数
  1073. this.allCourseCount = res.data[9].length; //课程总数
  1074. let _gradeCourse = 0; //各年级上传课程
  1075. let _subjectCourse = 0; //各学科上传课程
  1076. let _courseArray = [];
  1077. _subject.push({ name: "其他" });
  1078. for (var i = 0; i < _grade.length; i++) {
  1079. _courseArray.push({
  1080. name: _grade[i].name,
  1081. id: _grade[i].id,
  1082. courseid: [],
  1083. subject: [],
  1084. });
  1085. for (var z = 0; z < _course.length; z++) {
  1086. if (_course[z].typeid == _grade[i].id) {
  1087. _gradeCourse++;
  1088. if (
  1089. _courseArray[i].courseid.indexOf(_course[z].courseid) === -1
  1090. ) {
  1091. _courseArray[i].courseid.push(_course[z].courseid);
  1092. }
  1093. }
  1094. }
  1095. for (var j = 0; j < _subject.length; j++) {
  1096. _courseArray[i].subject.push({
  1097. name: _subject[j].name,
  1098. id: _subject[j].id,
  1099. course: 0,
  1100. });
  1101. for (var z = 0; z < _course.length; z++) {
  1102. if (
  1103. _course[z].typeid == _subject[j].id &&
  1104. _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1
  1105. ) {
  1106. _courseArray[i].subject[j].course++;
  1107. }
  1108. }
  1109. }
  1110. let sum = 0;
  1111. for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
  1112. sum += _courseArray[i].subject[j].course;
  1113. }
  1114. _courseArray[i].subject[_courseArray[i].subject.length - 1].course =
  1115. _courseArray[i].courseid.length - sum < 0
  1116. ? 0
  1117. : _courseArray[i].courseid.length - sum;
  1118. }
  1119. for (var j = 0; j < _subject.length; j++) {
  1120. for (var z = 0; z < _course.length; z++) {
  1121. if (_course[z].typeid == _subject[j].id) {
  1122. _subjectCourse++;
  1123. }
  1124. }
  1125. }
  1126. this.courseArray = _courseArray;
  1127. this.evaCount = res.data[12][0].count; //设置评价
  1128. this.evaWorksCount = res.data[13][0].count; //查询有目标并且有评价的作业
  1129. for (var i = 0; i < this.pusaDep.length; i++) {
  1130. if (this.pusaDep[i].name == "课程总数") {
  1131. this.pusaDep[i].value = (
  1132. (this.allCourse / this.allCourse) *
  1133. 100
  1134. ).toFixed(0);
  1135. } else if (this.pusaDep[i].name == "设置评价课程") {
  1136. this.pusaDep[i].value = (
  1137. (this.evaCount / this.allCourse) *
  1138. 100
  1139. ).toFixed(0);
  1140. } else if (this.pusaDep[i].name == "已提交作业课程") {
  1141. this.pusaDep[i].value = (
  1142. (this.haveWorksCourse / this.allCourse) *
  1143. 100
  1144. ).toFixed(0);
  1145. } else if (this.pusaDep[i].name == "已评价课程") {
  1146. this.pusaDep[i].value = (
  1147. (this.evaWorksCount / this.allCourse) *
  1148. 100
  1149. ).toFixed(0);
  1150. } else if (this.pusaDep[i].name == "教学评一体化课程") {
  1151. this.pusaDep[i].value = (
  1152. (this.evaWorksCount / this.allCourse) *
  1153. 100
  1154. ).toFixed(0);
  1155. }
  1156. }
  1157. var today = new Date();
  1158. var lastDayOfWeek = new Date(
  1159. today.setDate(today.getDate() - today.getDay() + 7)
  1160. ); //本周周日
  1161. let weekArray = {
  1162. lastWeek: [], //上周
  1163. toWeek: [], //本周
  1164. };
  1165. for (var i = 0; i < 14; i++) {
  1166. let time = JSON.parse(JSON.stringify(lastDayOfWeek));
  1167. let time2 = new Date(time);
  1168. var a = new Date(time2.setDate(time2.getDate() - i));
  1169. if (i > 6) {
  1170. weekArray.lastWeek.push(
  1171. a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate()
  1172. );
  1173. } else {
  1174. weekArray.toWeek.push(
  1175. a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate()
  1176. );
  1177. }
  1178. }
  1179. let weekCourse = [];
  1180. let weekCourse2 = [];
  1181. let lastWeekCouseCount = 0;
  1182. let toWeekCouseCount = 0;
  1183. for (var z = 0; z < _course.length; z++) {
  1184. let _date = new Date(
  1185. weekArray.lastWeek[weekArray.lastWeek.length - 1]
  1186. );
  1187. if (
  1188. new Date(_course[z].create_at) > _date &&
  1189. _course[z].pid == "34628934-d02f-11ec-8c78-005056b86db5"
  1190. ) {
  1191. weekCourse.push(_course[z]);
  1192. var a = new Date(_course[z].create_at);
  1193. var string =
  1194. a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate();
  1195. if (weekArray.lastWeek.indexOf(string) != -1) {
  1196. lastWeekCouseCount++;
  1197. } else {
  1198. toWeekCouseCount++;
  1199. }
  1200. }
  1201. }
  1202. let lastCourseidWeek = [];
  1203. let toCourseidWeek = [];
  1204. for (var i = 0; i < _grade.length; i++) {
  1205. weekCourse2.push({
  1206. name: _grade[i].name,
  1207. id: _grade[i].id,
  1208. lastCourse: 0,
  1209. toCourse: 0,
  1210. });
  1211. for (var z = 0; z < weekCourse.length; z++) {
  1212. if (weekCourse[z].typeid == _grade[i].id) {
  1213. var a = new Date(weekCourse[z].create_at);
  1214. var string =
  1215. a.getFullYear() +
  1216. "-" +
  1217. (a.getMonth() + 1) +
  1218. "-" +
  1219. a.getDate();
  1220. if (weekArray.lastWeek.indexOf(string) != -1) {
  1221. weekCourse2[i].lastCourse++;
  1222. if (lastCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
  1223. lastCourseidWeek.push(weekCourse[z].courseid);
  1224. }
  1225. } else {
  1226. weekCourse2[i].toCourse++;
  1227. if (toCourseidWeek.indexOf(weekCourse[z].courseid) === -1) {
  1228. toCourseidWeek.push(weekCourse[z].courseid);
  1229. }
  1230. }
  1231. }
  1232. }
  1233. }
  1234. weekCourse2.push({
  1235. name: "其他",
  1236. id: "",
  1237. lastCourse:
  1238. lastWeekCouseCount - lastCourseidWeek.length > 0
  1239. ? lastWeekCouseCount - lastCourseidWeek.length
  1240. : 0,
  1241. toCourse:
  1242. toWeekCouseCount - toCourseidWeek.length > 0
  1243. ? toWeekCouseCount - toCourseidWeek.length
  1244. : 0,
  1245. });
  1246. this.weekCourse2 = weekCourse2;
  1247. this.$forceUpdate();
  1248. })
  1249. .catch((err) => {
  1250. this.isLoading = false;
  1251. console.error(err);
  1252. });
  1253. },
  1254. },
  1255. };
  1256. </script>
  1257. <style scoped>
  1258. .body1 {
  1259. width: 100%;
  1260. height: 100%;
  1261. display: flex;
  1262. padding: 20px;
  1263. box-sizing: border-box;
  1264. overflow: hidden;
  1265. }
  1266. .left {
  1267. width: calc(100% / 4 * 1);
  1268. height: 100%;
  1269. }
  1270. .left > .top {
  1271. width: 100%;
  1272. height: calc(100% / 2 - 10px);
  1273. background: #fff;
  1274. border-radius: 5px;
  1275. margin: 0 0 20px 0;
  1276. }
  1277. .left > .bottom {
  1278. width: 100%;
  1279. height: calc(100% / 2 - 10px);
  1280. background: #fff;
  1281. border-radius: 5px;
  1282. }
  1283. .center {
  1284. width: calc(100% / 4 * 2 - 40px);
  1285. height: 100%;
  1286. margin: 0 20px;
  1287. }
  1288. .center > .top {
  1289. width: 100%;
  1290. height: calc(100% / 5 * 3 - 10px);
  1291. background: #fff;
  1292. border-radius: 5px;
  1293. margin: 0 0 20px 0;
  1294. }
  1295. .center > .bottom {
  1296. width: 100%;
  1297. height: calc(100% / 5 * 2 - 10px);
  1298. background: #fff;
  1299. border-radius: 5px;
  1300. }
  1301. .right {
  1302. width: calc(100% / 4 * 1);
  1303. height: 100%;
  1304. }
  1305. .right > .top {
  1306. width: 100%;
  1307. height: calc(100% / 2 - 10px);
  1308. background: #fff;
  1309. border-radius: 16px;
  1310. margin: 0 0 20px 0;
  1311. }
  1312. .right > .bottom {
  1313. width: 100%;
  1314. height: calc(100% / 2 - 10px);
  1315. background: #fff;
  1316. border-radius: 5px;
  1317. }
  1318. .titleBox {
  1319. height: 40px;
  1320. display: flex;
  1321. align-items: center;
  1322. padding: 0 15px;
  1323. box-sizing: border-box;
  1324. width: 100%;
  1325. }
  1326. .dataBox {
  1327. height: calc(100% - 40px);
  1328. width: 100%;
  1329. }
  1330. .middleBox {
  1331. display: flex;
  1332. flex-direction: row;
  1333. flex-wrap: nowrap;
  1334. align-items: flex-start;
  1335. }
  1336. .title {
  1337. color: #060e17;
  1338. margin-right: 10px;
  1339. }
  1340. .teaMiddle {
  1341. width: calc(100% / 2 - 10px);
  1342. height: 60px;
  1343. border-radius: 8px;
  1344. /* border: 1px solid #e0eafb; */
  1345. display: flex;
  1346. flex-direction: column;
  1347. align-items: flex-start;
  1348. justify-content: center;
  1349. padding: 0 10px;
  1350. margin: 0 10px;
  1351. }
  1352. .teaMiddle {
  1353. width: calc(100% / 3 - 10px);
  1354. }
  1355. .cNum {
  1356. background: linear-gradient(
  1357. 180deg,
  1358. rgb(125, 227, 174, 0.2) 0%,
  1359. rgb(23, 196, 105, 0.3) 100%
  1360. ) !important;
  1361. }
  1362. .tNum {
  1363. background: linear-gradient(
  1364. 180deg,
  1365. rgb(174, 204, 254, 0.2) 0%,
  1366. rgb(54, 129, 252, 0.3) 100%
  1367. ) !important;
  1368. }
  1369. .tSum {
  1370. background: linear-gradient(
  1371. 180deg,
  1372. rgb(125, 227, 174, 0.2) 0%,
  1373. rgb(23, 196, 105, 0.3) 100%
  1374. ) !important;
  1375. }
  1376. .teaLeft > div:first-child,
  1377. .teaMiddle > div:first-child {
  1378. font-size: 12px;
  1379. font-weight: 400;
  1380. color: #565e6a;
  1381. }
  1382. .teaLeft > div:last-child,
  1383. .teaMiddle > div:last-child {
  1384. font-size: 22px;
  1385. font-weight: bold;
  1386. color: #060e17;
  1387. }
  1388. .halfBox {
  1389. width: 50%;
  1390. height: 100%;
  1391. }
  1392. .selectBox {
  1393. width: 80px;
  1394. margin-left: 10px;
  1395. }
  1396. .selectBox >>> .el-input__inner {
  1397. height: 30px;
  1398. line-height: 30px;
  1399. }
  1400. .selectBox >>> .el-input__icon {
  1401. line-height: 30px;
  1402. }
  1403. .timeDiv {
  1404. display: flex;
  1405. flex-direction: row;
  1406. flex-wrap: nowrap;
  1407. align-items: center;
  1408. margin: 0 0 0 15px;
  1409. }
  1410. .timeDiv > div {
  1411. margin-right: 10px;
  1412. cursor: pointer;
  1413. }
  1414. .isClick {
  1415. color: #1684fc;
  1416. border-bottom: 2px solid #1684fc;
  1417. box-sizing: border-box;
  1418. }
  1419. .otherCss {
  1420. display: flex;
  1421. flex-direction: row;
  1422. flex-wrap: nowrap;
  1423. align-items: center;
  1424. justify-content: flex-end;
  1425. }
  1426. .otherImg {
  1427. width: 20px;
  1428. height: 20px;
  1429. margin: 0 10px;
  1430. cursor: pointer;
  1431. }
  1432. .otherImg > img {
  1433. width: 100%;
  1434. height: 100%;
  1435. }
  1436. .allBox {
  1437. width: 100%;
  1438. height: 100%;
  1439. display: flex;
  1440. flex-direction: row;
  1441. flex-wrap: nowrap;
  1442. align-items: center;
  1443. }
  1444. .allBox_left {
  1445. width: 30%;
  1446. height: 100%;
  1447. }
  1448. .allBox_right {
  1449. display: flex;
  1450. flex-wrap: wrap;
  1451. height: 100%;
  1452. width: 70%;
  1453. margin: 0 auto;
  1454. overflow: hidden;
  1455. justify-content: space-between;
  1456. }
  1457. .depth {
  1458. width: calc(100% / 4 - 10px);
  1459. display: flex;
  1460. flex-direction: column;
  1461. align-items: center;
  1462. justify-content: center;
  1463. }
  1464. .depth > span:nth-child(1) {
  1465. font-size: 14px;
  1466. font-weight: 700;
  1467. margin: 0 0 10px;
  1468. }
  1469. .depth > div:nth-child(1) {
  1470. }
  1471. .info_box {
  1472. display: flex;
  1473. flex-wrap: wrap;
  1474. align-items: center;
  1475. justify-content: space-between;
  1476. width: 90%;
  1477. margin: 0 auto;
  1478. }
  1479. .info_box > .info2,
  1480. .info_box > .info3,
  1481. .info_box > .info {
  1482. width: calc(50% - 10px);
  1483. display: flex;
  1484. flex-direction: row;
  1485. flex-wrap: nowrap;
  1486. height: 60px;
  1487. justify-content: space-between;
  1488. align-items: center;
  1489. padding: 0 10px;
  1490. box-sizing: border-box;
  1491. margin-bottom: 10px;
  1492. border-radius: 5px;
  1493. }
  1494. .info_box > .info2 {
  1495. width: calc(100% / 4 - 10px);
  1496. /* align-items: flex-end; */
  1497. }
  1498. .info_box > .info3 {
  1499. width: 100%;
  1500. margin-bottom: 5px;
  1501. }
  1502. .info_box > .info2 > span:nth-child(1),
  1503. .info_box > .info3 > span:nth-child(1),
  1504. .info_box > .info > span:nth-child(1) {
  1505. font-size: 14px;
  1506. /* margin: 0 0 0 20px; */
  1507. color: #565e6a;
  1508. width: 60px;
  1509. white-space: pre-wrap;
  1510. word-break: break-all;
  1511. }
  1512. .info_box > .info2 > span:nth-child(2),
  1513. .info_box > .info3 > span:nth-child(2),
  1514. .info_box > .info > span:nth-child(2) {
  1515. font-size: 24px;
  1516. /* font-weight: 700; */
  1517. }
  1518. .blueBG {
  1519. background: rgb(243, 248, 253);
  1520. border: 2px solid rgb(234, 246, 255);
  1521. }
  1522. </style>