smart-iot-dashboard.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. <style lang="less" scoped>
  2. @import './smart-iot-dashboard.less';
  3. </style>
  4. <template>
  5. <div id="smart-dashboard">
  6. <div class="Header">
  7. <Row type="flex" justify="center" align="middle">
  8. <Col :span="3">
  9. <img style="height: 20px;" src="../../../assets/mark.svg"/>
  10. </Col>
  11. <Col :span="8">
  12. <Icon size="20" type="md-pin" style="vertical-align: middle;color: #94998a" /><span class="smart-markD">{{ $t('breadcrumbs')}}</span>
  13. </Col>
  14. <Col :span="11">
  15. <Menu class="menu" mode="horizontal" theme="dark">
  16. <MenuItem name="1">
  17. <Icon type="ios-paper" />
  18. {{ $t('menu1')}}
  19. </MenuItem>
  20. <MenuItem name="2">
  21. <Icon type="ios-people" />
  22. {{ $t('menu2')}}
  23. </MenuItem>
  24. <MenuItem name="3">
  25. <Icon type="ios-people" />
  26. {{ $t('menu3')}}
  27. </MenuItem>
  28. <MenuItem name="4">
  29. <Icon type="ios-construct" />
  30. {{ $t('menu4')}}
  31. </MenuItem>
  32. </Menu>
  33. </Col>
  34. <Col :span="2" style="text-align: center;">
  35. <img style="width: 35px;" src="@/assets/image/touxiang.png">
  36. </Col>
  37. </Row>
  38. </div>
  39. <div class="content">
  40. <div style="text-align: center;padding-top: 5px;height: 5%;">
  41. <Button class="dashBoardBtn select">{{ $t('smartIOTDB.pageButton1') }}</Button>
  42. <Button to="/smartclassdashboard" class="dashBoardBtn">{{ $t('smartIOTDB.pageButton2') }}</Button>
  43. </div>
  44. <Row class="box" type="flex" justify="center">
  45. <Col :span="8" class="block-1 block-border">
  46. <!-- block-1 -->
  47. <!-- 边角设计 start-->
  48. <div class="image-border image-border-left-top" ></div>
  49. <div class="image-border image-border-right-top" ></div>
  50. <div class="image-border image-border-left-bottom" ></div>
  51. <div class="image-border image-border-lright-bottom" ></div>
  52. <!-- 边角设计 end-->
  53. <div style="height: 100%;">
  54. <div style="height: 60%;width:100%;">
  55. <div style="height: 100%;">
  56. <div style="height: 80%;text-align: center;">
  57. <img id="planImg" style="width: 100%;height: 100%;display: none;" src="@/assets/image/floorplan.png" />
  58. <img id="pin" style="display: none;" src="@/assets/pin.svg" />
  59. <img id="greenpin" style="display: none;" src="@/assets/greenpin.svg" />
  60. <img id="redpin" style="display: none;" src="@/assets/redpin.svg" />
  61. <canvas id="floorplan" style="width: 100%;height: 100%;">
  62. 当前浏览器不支持canvas
  63. <!-- 如果浏览器支持canvas,则canvas标签里的内容不会显示出来 -->
  64. </canvas>
  65. </div>
  66. <div style="height: 20%;padding: 0 5%;border-bottom: 1px solid #94998a;">
  67. <Row>
  68. <Col :span="5" style="text-align: center;">
  69. <span style="color: #94998a;">{{$t('smartIOTDB.block1Title1')}}</span>
  70. <h5 style="font-size: 2em;color: #FAFAFA;font-weight: 100;">4 <small>(36%)</small></h5>
  71. </Col>
  72. <Col :span="5" style="text-align: center;">
  73. <span style="color: #94998a;">{{$t('smartIOTDB.block1Title2')}}</span>
  74. <h5 style="font-size: 2em;color: #FAFAFA;font-weight: 100;">1 <small>(9%)</small></h5>
  75. </Col>
  76. <Col :span="5" style="text-align: center;">
  77. <span style="color: #94998a;">{{$t('smartIOTDB.block1Title3')}}</span>
  78. <h5 style="font-size: 2em;color: #FAFAFA;font-weight: 100;">3 <small>(27%)</small></h5>
  79. </Col>
  80. <Col :span="5" style="text-align: center;">
  81. <span style="color: #94998a;">{{$t('smartIOTDB.block1Title4')}}</span>
  82. <h5 style="font-size: 2em;color: #FAFAFA;font-weight: 100;">18 <small>(77%)</small></h5>
  83. </Col>
  84. <Col :span="4" style="text-align: center;">
  85. <span style="color: #94998a;">{{$t('smartIOTDB.block1Title5')}}</span>
  86. <h5 style="font-size: 2em;color: #FAFAFA;font-weight: 100;">11</h5>
  87. </Col>
  88. </Row>
  89. </div>
  90. </div>
  91. </div>
  92. <div style="height: 40%;width:100%;position: relative;overflow: auto;">
  93. <div class="scrollstyle" style="position: absolute;right: 0px;left: 0;top: 0;bottom: 0;overflow-x: hidden;overflow-y: auto;">
  94. <div class="classInfo" v-for="(item, index) in classInfoData" :key="index">
  95. <Row type="flex" justify="center" align="bottom" style="border-bottom: solid 1px #94998a;padding-bottom: 7px;">
  96. <Col :span="15">
  97. <h5>{{ item.className }}</h5>
  98. <span class="ellipsis subtitle">{{ item.classProduct }}&nbsp;&nbsp;|&nbsp;&nbsp;{{ item.classDetail }}</span>
  99. </Col>
  100. <Col :span="9">
  101. <span class="ellipsis teacherName">{{ item.teacherName}}</span>&nbsp;<Icon class="teachIcon" :size="15" type="ios-information-circle" />
  102. <Row style="display: block;">
  103. <Col :span="12" style="color: #48DBFC;">
  104. {{$t('smartIOTDB.hotclass')}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.classHot + $t('unit1')}}
  105. </Col>
  106. <Col :span="12" :class="classModeClass(item.classMode)">
  107. {{ classModeStr(item.classMode) }}&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;{{item.classTime}}
  108. </Col>
  109. </Row>
  110. </Col>
  111. </Row>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </Col>
  117. <Col :span="5" class="block-2">
  118. <!-- block-2 -->
  119. <div class="block-border" style="height: 12%;position: relative;">
  120. <!-- 边角设计 start-->
  121. <div class="image-border image-border-left-top" ></div>
  122. <div class="image-border image-border-right-top" ></div>
  123. <div class="image-border image-border-left-bottom" ></div>
  124. <div class="image-border image-border-lright-bottom" ></div>
  125. <!-- 边角设计 end-->
  126. <Row type="flex" justify="center" class="info-row">
  127. <Col :span="9" class="info-col-main">
  128. <div class="info-col-content">
  129. <span>{{ $t('smartIOTDB.block2Title1')}}</span><br/><small>{{ $t('smartIOTDB.block2SubTitle1')}}</small>
  130. <h5>8<small>/9</small></h5>
  131. </div>
  132. </Col>
  133. <Col :span="5" class="info-col-secondary">
  134. <div class="info-col-content border-right">
  135. <br/><small>{{ $t('smartIOTDB.block2SubTitle2')}}</small>
  136. <h5>8</h5>
  137. </div>
  138. </Col>
  139. <Col :span="5" class="info-col-secondary">
  140. <div class="info-col-content border-right">
  141. <br/><small>{{ $t('smartIOTDB.block2SubTitle3')}}</small>
  142. <h5>8</h5>
  143. </div>
  144. </Col>
  145. <Col :span="5" class="info-col-secondary">
  146. <div class="info-col-content">
  147. <br/><small>{{ $t('smartIOTDB.block2SubTitle4')}}</small>
  148. <h5>8</h5>
  149. </div>
  150. </Col>
  151. </Row>
  152. </div>
  153. <div style="height: 1.5%"></div>
  154. <div class="block-border" style="height: 12%;position: relative;">
  155. <!-- 边角设计 start-->
  156. <div class="image-border image-border-left-top" ></div>
  157. <div class="image-border image-border-right-top" ></div>
  158. <div class="image-border image-border-left-bottom" ></div>
  159. <div class="image-border image-border-lright-bottom" ></div>
  160. <!-- 边角设计 end-->
  161. <Row type="flex" justify="center" class="info-row">
  162. <Col :span="9" class="info-col-main">
  163. <div class="info-col-content">
  164. <span>{{ $t('smartIOTDB.block2Title2')}}</span><br/><small>{{ $t('smartIOTDB.block2SubTitle1')}}</small>
  165. <h5>54<small>/65</small></h5>
  166. </div>
  167. </Col>
  168. <Col :span="5" class="info-col-secondary">
  169. <div class="info-col-content border-right">
  170. <br/><small>{{ $t('smartIOTDB.block2SubTitle2')}}</small>
  171. <h5>61.2</h5>
  172. </div>
  173. </Col>
  174. <Col :span="5" class="info-col-secondary">
  175. <div class="info-col-content border-right">
  176. <br/><small>{{ $t('smartIOTDB.block2SubTitle3')}}</small>
  177. <h5>58.9</h5>
  178. </div>
  179. </Col>
  180. <Col :span="5" class="info-col-secondary">
  181. <div class="info-col-content">
  182. <br/><small>{{ $t('smartIOTDB.block2SubTitle4')}}</small>
  183. <h5>53.1</h5>
  184. </div>
  185. </Col>
  186. </Row>
  187. </div>
  188. <div style="height: 1.5%"></div>
  189. <div class="block-border" style="height: 12%;position: relative;">
  190. <!-- 边角设计 start-->
  191. <div class="image-border image-border-left-top" ></div>
  192. <div class="image-border image-border-right-top" ></div>
  193. <div class="image-border image-border-left-bottom" ></div>
  194. <div class="image-border image-border-lright-bottom" ></div>
  195. <!-- 边角设计 end-->
  196. <Row type="flex" justify="center" class="info-row">
  197. <Col :span="9" class="info-col-main">
  198. <div class="info-col-content">
  199. <span>{{ $t('smartIOTDB.block2Title3')}}</span><br/><small>{{ $t('smartIOTDB.block2SubTitle1')}}</small>
  200. <h5>1,892<small>/2,863</small></h5>
  201. </div>
  202. </Col>
  203. <Col :span="5" class="info-col-secondary">
  204. <div class="info-col-content border-right">
  205. <br/><small>{{ $t('smartIOTDB.block2SubTitle2')}}</small>
  206. <h5>2,542</h5>
  207. </div>
  208. </Col>
  209. <Col :span="5" class="info-col-secondary">
  210. <div class="info-col-content border-right">
  211. <br/><small>{{ $t('smartIOTDB.block2SubTitle3')}}</small>
  212. <h5>2,301</h5>
  213. </div>
  214. </Col>
  215. <Col :span="5" class="info-col-secondary">
  216. <div class="info-col-content">
  217. <br/><small>{{ $t('smartIOTDB.block2SubTitle4')}}</small>
  218. <h5>2,436</h5>
  219. </div>
  220. </Col>
  221. </Row>
  222. </div>
  223. <div style="height: 1.5%"></div>
  224. <div class="block-border" style="height: 29%;position: relative;background-color: rgba(217, 217, 217, 0.14);">
  225. <!-- 边角设计 start-->
  226. <div class="image-border image-border-left-top" ></div>
  227. <div class="image-border image-border-right-top" ></div>
  228. <div class="image-border image-border-left-bottom" ></div>
  229. <div class="image-border image-border-lright-bottom" ></div>
  230. <!-- 边角设计 end-->
  231. <div style="height:20%;">
  232. <h5 style="font-size: 1.25em;color:#E4E9DC;padding: 15px 0 15px 15px;font-weight: 100;">{{$t('smartIOTDB.block2Title4')}}</h5>
  233. </div>
  234. <div style="height: 80%;">
  235. <ClassLine :id="'classline1'"></ClassLine>
  236. </div>
  237. </div>
  238. <div style="height: 1.5%"></div>
  239. <div class="block-border" style="height: 29%;position: relative;background-color: rgba(217, 217, 217, 0.14);">
  240. <!-- 边角设计 start-->
  241. <div class="image-border image-border-left-top" ></div>
  242. <div class="image-border image-border-right-top" ></div>
  243. <div class="image-border image-border-left-bottom" ></div>
  244. <div class="image-border image-border-lright-bottom" ></div>
  245. <!-- 边角设计 end-->
  246. <div style="height: 20%;padding: 15px 0 15px 15px;">
  247. <h5 style="font-size: 1.25em;color:#E4E9DC;font-weight: 100;">{{$t('smartIOTDB.block2Title5')}}</h5>
  248. </div>
  249. <div class="classPercent">
  250. <Row type="flex" justify="center" align="middle" class="classPercent-row">
  251. <Col class="left" :span="12" style="">
  252. <div style="height: 100%;">
  253. <RingPie id="ringpie5'"></RingPie>
  254. </div>
  255. </Col>
  256. <Col class="right" :span="12">
  257. <Row>
  258. <Col>
  259. <div class="right-title">今日總課堂數 : <span>54</span> 堂</div>
  260. </Col>
  261. </Row>
  262. <Row >
  263. <Col :span="12">
  264. <div class="right-detail">
  265. <span class="right-detail-title border-red">一年級開課數</span>
  266. <h5 class="right-detail-num">3 <small>(5.5%)</small></h5>
  267. </div>
  268. </Col>
  269. <Col :span="12">
  270. <div>
  271. <span class="right-detail-title border-green">二年級開課數</span>
  272. <h5 class="right-detail-num">13 <small>(24.1%)</small></h5>
  273. </div>
  274. </Col>
  275. <Col :span="12">
  276. <div>
  277. <span class="right-detail-title border-pink">三年級開課數</span>
  278. <h5 class="right-detail-num">4 <small>(7.4%)</small></h5>
  279. </div>
  280. </Col>
  281. <Col :span="12">
  282. <div>
  283. <span class="right-detail-title border-yellow">四年級開課數</span>
  284. <h5 class="right-detail-num">12 <small>(22.2%)</small></h5>
  285. </div>
  286. </Col>
  287. <Col :span="12">
  288. <div>
  289. <span class="right-detail-title border-blue">五年級開課數</span>
  290. <h5 class="right-detail-num">13 <small>(24.1%)</small></h5>
  291. </div>
  292. </Col>
  293. <Col :span="12">
  294. <div>
  295. <span class="right-detail-title border-orange">六年級開課數</span>
  296. <h5 class="right-detail-num">9 <small>(16.7%)</small></h5>
  297. </div>
  298. </Col>
  299. </Row>
  300. </Col>
  301. </Row>
  302. </div>
  303. </div>
  304. </Col>
  305. <Col :span="5" class="block-3">
  306. <div class="block-border" style="height: 23.91%;position: relative;">
  307. <!-- 边角设计 start-->
  308. <div class="image-border image-border-left-top" ></div>
  309. <div class="image-border image-border-right-top" ></div>
  310. <div class="image-border image-border-left-bottom" ></div>
  311. <div class="image-border image-border-lright-bottom" ></div>
  312. <!-- 边角设计 end-->
  313. <div class="today-class-content">
  314. <h5 class="today-class-content-title">{{$t('smartIOTDB.block3Title1')}}</h5>
  315. <Row class="today-class-content-contents">
  316. <Col :span="12" class="chart"><RingPie :pieData="todayClassData" ref="ringpie1" :id="'ringPie1'"></RingPie></Col>
  317. <Col :span="12" class="detail">
  318. <Row class="detail-row">
  319. <Col :span="12" class="detail-col">
  320. <div @mouseleave="pieDownPlay('class','新增档案')" @mouseenter="pieHeightLight('class','新增档案')">
  321. <span class="detail-title detail-title-border-red">新增档案</span>
  322. <h5 class="detail-amount">33% <small>(168)</small></h5>
  323. </div>
  324. </Col>
  325. <Col :span="12" class="detail-col">
  326. <div @mouseleave="pieDownPlay('class','书面问答')" @mouseenter="pieHeightLight('class','书面问答')">
  327. <span class="detail-title detail-title-border-green">书面问答</span>
  328. <h5 class="detail-amount" >33% <small>(168)</small></h5>
  329. </div>
  330. </Col>
  331. <Col :span="12" class="detail-col">
  332. <div @mouseleave="pieDownPlay('class','汇入.pptx')" @mouseenter="pieHeightLight('class','汇入.pptx')">
  333. <span class="detail-title detail-title-border-pink" >汇入.pptx</span>
  334. <h5 class="detail-amount" >33% <small>(168)</small></h5>
  335. </div>
  336. </Col>
  337. <Col :span="12" class="detail-col">
  338. <div @mouseleave="pieDownPlay('class','PowerClick')" @mouseenter="pieHeightLight('class','PowerClick')">
  339. <span class="detail-title detail-title-border-yellow" >PowerClick</span>
  340. <h5 class="detail-amount" >33% <small>(168)</small></h5>
  341. </div>
  342. </Col>
  343. <Col :span="12" class="detail-col">
  344. <div @mouseleave="pieDownPlay('class','开启.hte')" @mouseenter="pieHeightLight('class','开启.hte')">
  345. <span class="detail-title detail-title-border-blue" >开启.hte</span>
  346. <h5 class="detail-amount" >33% <small>(168)</small></h5>
  347. </div>
  348. </Col>
  349. <Col :span="12" class="detail-col">
  350. <div @mouseleave="pieDownPlay('class','其他')" @mouseenter="pieHeightLight('class','其他')">
  351. <span class="detail-title detail-title-border-orange" >其他</span>
  352. <h5 class="detail-amount" >33% <small>(168)</small></h5>
  353. </div>
  354. </Col>
  355. </Row>
  356. </Col>
  357. </Row>
  358. </div>
  359. </div>
  360. <div style="height: 2.17%;"></div>
  361. <div class="block-border" style="height: 23.91%;position: relative;">
  362. <!-- 边角设计 start-->
  363. <div class="image-border image-border-left-top" ></div>
  364. <div class="image-border image-border-right-top" ></div>
  365. <div class="image-border image-border-left-bottom" ></div>
  366. <div class="image-border image-border-lright-bottom" ></div>
  367. <!-- 边角设计 end-->
  368. <div class="today-class-content">
  369. <h5 class="today-class-content-title">{{$t('smartIOTDB.block3Title2')}}</h5>
  370. <Row class="today-class-content-contents">
  371. <Col :span="12" class="chart"><RingPie :pieData="todayClassVerData" ref="ringpie2" :id="'ringPie2'"></RingPie></Col>
  372. <Col :span="12" class="detail">
  373. <Row class="detail-row">
  374. <Col :span="12" class="detail-col">
  375. <div @mouseleave="pieDownPlay('system','HiTeach STD')" @mouseenter="pieHeightLight('system','HiTeach STD')">
  376. <span class="detail-title detail-title-border-red">HiTeach STD</span>
  377. <h5 class="detail-amount">26% <small>(8)</small></h5>
  378. </div>
  379. </Col>
  380. <Col :span="12" class="detail-col">
  381. <div @mouseleave="pieDownPlay('system','HiTeach PRE')" @mouseenter="pieHeightLight('system','HiTeach PRE')">
  382. <span class="detail-title detail-title-border-green">HiTeach PRE</span>
  383. <h5 class="detail-amount" >25% <small>(168)</small></h5>
  384. </div>
  385. </Col>
  386. <Col :span="12" class="detail-col">
  387. <div @mouseleave="pieDownPlay('system','HiTeach PRO')" @mouseenter="pieHeightLight('system','HiTeach PRO')">
  388. <span class="detail-title detail-title-border-pink" >HiTeach PRO</span>
  389. <h5 class="detail-amount" >18% <small>(168)</small></h5>
  390. </div>
  391. </Col>
  392. <Col :span="12" class="detail-col">
  393. <div @mouseleave="pieDownPlay('system','HiTeach Mobile')" @mouseenter="pieHeightLight('system','HiTeach Mobile')">
  394. <span class="detail-title detail-title-border-yellow" >HiTeach Mobile</span>
  395. <h5 class="detail-amount" >10% <small>(168)</small></h5>
  396. </div>
  397. </Col>
  398. <Col :span="12" class="detail-col">
  399. <div @mouseleave="pieDownPlay('system','HiTeach TBL')" @mouseenter="pieHeightLight('system','HiTeach TBL')">
  400. <span class="detail-title detail-title-border-blue" >HiTeach TBL</span>
  401. <h5 class="detail-amount" >21% <small>(168)</small></h5>
  402. </div>
  403. </Col>
  404. <Col :span="12" class="detail-col">
  405. <div @mouseleave="pieDownPlay('system','其他')" @mouseenter="pieHeightLight('system','其他')">
  406. <span class="detail-title detail-title-border-orange" >其他</span>
  407. <h5 class="detail-amount" >0% <small>(0)</small></h5>
  408. </div>
  409. </Col>
  410. </Row>
  411. </Col>
  412. </Row>
  413. </div>
  414. </div>
  415. <div style="height: 2.17%;"></div>
  416. <div class="block-border" style="height: 47.84%;position: relative;">
  417. <!-- 边角设计 start-->
  418. <div class="image-border image-border-left-top" ></div>
  419. <div class="image-border image-border-right-top" ></div>
  420. <div class="image-border image-border-left-bottom" ></div>
  421. <div class="image-border image-border-lright-bottom" ></div>
  422. <!-- 边角设计 end-->
  423. <div style="height: 100%;background-color: rgba(217, 217, 217, 0.14);">
  424. <div style="height: 13%;border-bottom: 1px solid #94998a;padding: 15px 0 0 15px;">
  425. <h5 style="font-size: 1.25em;color:#E4E9DC;font-weight: 100;">{{ $t('smartIOTDB.block3Title3')}}</h5>
  426. </div>
  427. <div style="height: 87%;border-bottom: 1px solid #94998a;">
  428. <ClassBar :id="'classbar1'"></ClassBar>
  429. </div>
  430. </div>
  431. </div>
  432. </Col>
  433. <Col :span="4" class="block-4">
  434. <div class="block-border" style="height: 10.43%;position: relative;background-color: rgba(217, 217, 217, 0.14);">
  435. <!-- 边角设计 start-->
  436. <div class="image-border image-border-left-top" ></div>
  437. <div class="image-border image-border-right-top" ></div>
  438. <div class="image-border image-border-left-bottom" ></div>
  439. <div class="image-border image-border-lright-bottom" ></div>
  440. <!-- 边角设计 end-->
  441. <div class="hours">
  442. <span class="hours-title">{{$t('smartIOTDB.block4Title1')}}</span>
  443. <h5><span>4,234</span>h<span>43</span>m</h5>
  444. </div>
  445. </div>
  446. <div style="height: 2.17%"></div>
  447. <div class="block-border" style="height: 23.48%;position: relative;background-color: rgba(217, 217, 217, 0.14);">
  448. <!-- 边角设计 start-->
  449. <div class="image-border image-border-left-top" ></div>
  450. <div class="image-border image-border-right-top" ></div>
  451. <div class="image-border image-border-left-bottom" ></div>
  452. <div class="image-border image-border-lright-bottom" ></div>
  453. <!-- 边角设计 end-->
  454. <div style="height: 100%;">
  455. <h5 style="height: 20%;font-size: 1.25em;color: #E4E9DC;padding: 10px 0 0 10px;font-weight: 100;">{{$t('smartIOTDB.block4Title2')}}</h5>
  456. <Row type="flex" justify="center" align="middle" style="height: 80%;">
  457. <Col style="height: 100%;" :span="12"><RingPie :pieData="smartClassVersion" @highLightInfo="classVersionByPie" :defaultActive="true" :id="'ringPie3'"></RingPie></Col>
  458. <Col :span="12" style="padding-left: 7px;color: #94998a;">
  459. <span>{{ classVersion.name }}</span>
  460. <h5 style="font-weight: 100;font-size: 2.2em;color: #fafafa;">{{ classVersion.percent +$t('unit2')}}</h5>
  461. <span>{{$t('smartIOTDB.block4SubTitle1') + ' ' + classVersion.val + ' ' +$t('unit3')}}</span>
  462. </Col>
  463. </Row>
  464. </div>
  465. </div>
  466. <div style="height: 2.17%"></div>
  467. <div class="block-border" style="height: 23.48%;position: relative;background-color: rgba(217, 217, 217, 0.14);">
  468. <!-- 边角设计 start-->
  469. <div class="image-border image-border-left-top" ></div>
  470. <div class="image-border image-border-right-top" ></div>
  471. <div class="image-border image-border-left-bottom" ></div>
  472. <div class="image-border image-border-lright-bottom" ></div>
  473. <!-- 边角设计 end-->
  474. <div style="height: 100%;">
  475. <h5 style="height: 20%;font-size: 1.25em;color: #E4E9DC;padding: 10px 0 0 10px;font-weight: 100;">{{$t('smartIOTDB.block4Title3')}}</h5>
  476. <Row type="flex" justify="center" align="middle" style="height: 80%;">
  477. <Col style="height: 100%;" :span="12"><RingPie :pieData="operatingSystems" @highLightInfo="homeworkByPie" :defaultActive="true" :id="'ringPie4'"></RingPie></Col>
  478. <Col :span="12" style="padding-left: 7px;color: #94998a;">
  479. <span>{{ homework.name }}</span>
  480. <h5 style="font-weight: 100;font-size: 2.2em;color: #fafafa;">{{ homework.percent +$t('unit2')}}</h5>
  481. <span>{{$t('smartIOTDB.block4SubTitle2') + ' ' + homework.val + ' ' +$t('unit4')}}</span>
  482. </Col>
  483. </Row>
  484. </div>
  485. </div>
  486. <div style="height: 2.17%"></div>
  487. <div class="block-border" style="height: 36.1%;position: relative;background-color: rgba(217, 217, 217, 0.14);">
  488. <!-- 边角设计 start-->
  489. <div class="image-border image-border-left-top" ></div>
  490. <div class="image-border image-border-right-top" ></div>
  491. <div class="image-border image-border-left-bottom" ></div>
  492. <div class="image-border image-border-lright-bottom" ></div>
  493. <!-- 边角设计 end-->
  494. <div class="rank">
  495. <div class="rank-block">
  496. <Row type="flex" justify="center" align="middle" class="rank-block-row">
  497. <Col class="sticker" :span="6">
  498. <img src="@/assets/image/touxiang.png">
  499. </Col>
  500. <Col class="conect" :span="18">
  501. <span class="conect-title">{{$t('smartIOTDB.block4SubTitle3')}}</span>
  502. <h5 class="conect-name ellipsis">Bruse</h5><Icon class="conect-icon" :size="15" type="ios-information-circle" />
  503. <span class="conect-val">{{$t('smartIOTDB.block4SubTitle6')}}: <span class="number">6</span> {{$t('unit1')}}</span>
  504. <span class="conect-val">{{$t('smartIOTDB.block4SubTitle7')}}: <span class="number">139</span> {{$t('unit1')}}</span>
  505. </Col>
  506. </Row>
  507. </div>
  508. <div class="rank-block">
  509. <Row type="flex" justify="center" align="middle" class="rank-block-row">
  510. <Col class="sticker" :span="6">
  511. <img src="@/assets/image/touxiang.png">
  512. </Col>
  513. <Col class="conect" :span="18">
  514. <span class="conect-title">{{$t('smartIOTDB.block4SubTitle4')}}</span>
  515. <h5 class="conect-name ellipsis">梁老师</h5><Icon class="conect-icon" :size="15" type="ios-information-circle" />
  516. <span class="conect-val">{{$t('smartIOTDB.block4SubTitle8')}}: <span class="number">256.83</span> {{$t('unit5')}}</span>
  517. <span class="conect-val">{{$t('smartIOTDB.block4SubTitle9')}}: <span class="number">135,873.65</span> {{$t('unit5')}}</span>
  518. </Col>
  519. </Row>
  520. </div>
  521. <div class="rank-block">
  522. <Row type="flex" justify="center" align="middle" class="rank-block-row">
  523. <Col class="sticker" :span="6">
  524. <img src="@/assets/image/touxiang.png">
  525. </Col>
  526. <Col class="conect" :span="18">
  527. <span class="conect-title">{{$t('smartIOTDB.block4SubTitle5')}}</span>
  528. <h5 class="conect-name ellipsis">Picc</h5><Icon class="conect-icon" :size="15" type="ios-information-circle" />
  529. <span class="conect-val">{{$t('smartIOTDB.block4SubTitle10')}}: <span class="number">77.8</span> {{$t('unit2')}}</span>
  530. <span class="conect-val">{{$t('smartIOTDB.block4SubTitle11')}}: <span class="number">71.1</span> {{$t('unit2')}}</span>
  531. </Col>
  532. </Row>
  533. </div>
  534. </div>
  535. </div>
  536. </Col>
  537. </Row>
  538. </div>
  539. </div>
  540. </template>
  541. <script>
  542. import LegendPie from '@/components/graph/legendPie'
  543. import RingPie from '@/components/graph/ringPie'
  544. import ClassLine from '@/components/graph/classLine'
  545. import ClassBar from '@/components/graph/classBar'
  546. export default {
  547. name:'smart-dashboard',
  548. data () {
  549. return {
  550. classInfoData:[
  551. {
  552. 'className': 'GE305, 通识教室3',
  553. 'classProduct': 'Hiteach 3 TBL',
  554. 'classDetail': '序号使用至2021-09-30, 50人, HBI082, RF05H',
  555. 'teacherName': 'Picc',
  556. 'classHot': '7',
  557. 'classTime': '00:45:03',
  558. 'classMode': 0
  559. },
  560. {
  561. 'className': 'GE305, 通识教室5',
  562. 'classProduct': 'Hiteach 3 TBL',
  563. 'classDetail': '序号使用至2021-09-30, 50人, HBI082, RF05H',
  564. 'teacherName': '梁老师',
  565. 'classHot': '7',
  566. 'classTime': '--:--:--',
  567. 'classMode': 1
  568. },
  569. {
  570. 'className': 'GE305, 通识教室7',
  571. 'classProduct': 'Hiteach 3 TBL',
  572. 'classDetail': '序号使用至2021-09-30, 50人, HBI082, RF05H',
  573. 'teacherName': '布鲁斯',
  574. 'classHot': '7',
  575. 'classTime': '--:--:--',
  576. 'classMode': 2
  577. },
  578. {
  579. 'className': 'GE305, 通识教室3',
  580. 'classProduct': 'Hiteach 3 TBL',
  581. 'classDetail': '序号使用至2021-09-30, 50人, HBI082, RF05H',
  582. 'teacherName': 'Picc',
  583. 'classHot': '7',
  584. 'classTime': '00:45:03',
  585. 'classMode': 0
  586. },
  587. {
  588. 'className': 'GE305, 通识教室5',
  589. 'classProduct': 'Hiteach 3 TBL',
  590. 'classDetail': '序号使用至2021-09-30, 50人, HBI082, RF05H',
  591. 'teacherName': '梁老师',
  592. 'classHot': '7',
  593. 'classTime': '--:--:--',
  594. 'classMode': 1
  595. },
  596. {
  597. 'className': 'GE305, 通识教室7',
  598. 'classProduct': 'Hiteach 3 TBL',
  599. 'classDetail': '序号使用至2021-09-30, 50人, HBI082, RF05H',
  600. 'teacherName': '布鲁斯',
  601. 'classHot': '7',
  602. 'classTime': '--:--:--',
  603. 'classMode': 2
  604. },
  605. ],
  606. scolBeg:{
  607. percent: '',
  608. today: '',
  609. lastWeek: '',
  610. todayData: [
  611. {value:9, name:'一年级'},
  612. {value:11, name:'二年级'},
  613. {value:16, name:'三年级'},
  614. {value:6, name:'四年级'},
  615. {value:13, name:'五年级'},
  616. {value:22, name:'六年级'},
  617. ]
  618. },
  619. classVersion:{
  620. percent: '',
  621. name: '',
  622. val: 0
  623. },
  624. homework:{
  625. percent: '',
  626. name: '',
  627. val: 0
  628. },
  629. todayClassData:[
  630. {value:335, name:'新增档案'},
  631. {value:234, name:'汇入.pptx'},
  632. {value:1548, name:'开启.hte'},
  633. {value:310, name:'书面问答'},
  634. {value:135, name:'PowerClick'},
  635. {value:123, name:'其他'},
  636. ],
  637. todayClassVerData:[
  638. {value:335, name:'HiTeach STD'},
  639. {value:234, name:'HiTeach PRO'},
  640. {value:1548, name:'HiTeach TBL'},
  641. {value:310, name:'HiTeach PRE'},
  642. {value:135, name:'HiTeach Mobile'},
  643. {value:123, name:'其他'},
  644. ],
  645. smartClassVersion:[
  646. {value:11, name:'HiTeach STD'},
  647. {value:3, name:'HiTeach PRO'},
  648. {value:16, name:'HiTeach TBL'},
  649. {value:6, name:'HiTeach PRE'},
  650. {value:2, name:'HiTeach Mobile'}
  651. ],
  652. operatingSystems:[
  653. {value:1183, name:'Windows 7'},
  654. {value:245, name:'Windows XP'},
  655. {value:473, name:'Windows 10'},
  656. ]
  657. }
  658. },
  659. components:{
  660. LegendPie,
  661. RingPie,
  662. ClassBar,
  663. ClassLine
  664. },
  665. methods:{
  666. pieHeightLight: function(type, value) {
  667. switch (type) {
  668. case 'class':
  669. this.$refs.ringpie1.heightlight(value);
  670. break;
  671. case 'system':
  672. this.$refs.ringpie2.heightlight(value);
  673. break;
  674. }
  675. },
  676. pieDownPlay: function(type, value) {
  677. switch (type) {
  678. case 'class':
  679. this.$refs.ringpie1.downplay(value);
  680. break;
  681. case 'system':
  682. this.$refs.ringpie2.downplay(value);
  683. break;
  684. }
  685. },
  686. scolBegInfoByPie: function(val){
  687. this.scolBeg.percent = val.percent
  688. },
  689. scolBegInfoByBar: function(val){
  690. this.scolBeg.today = val.today
  691. this.scolBeg.lastWeek = val.lastWeek
  692. this.$refs.ringpie5.heightlight(val.id);
  693. },
  694. classVersionByPie: function(val){
  695. this.classVersion.percent = val.percent
  696. this.classVersion.name = val.name
  697. this.classVersion.val = val.value
  698. },
  699. homeworkByPie: function(val){
  700. this.homework.percent = val.percent
  701. this.homework.name = val.name
  702. this.homework.val = val.value
  703. },
  704. classModeStr: function(val){
  705. switch (val) {
  706. case 0:
  707. return this.$t('smartIOTDB.runing')
  708. break;
  709. case 1:
  710. return this.$t('smartIOTDB.notInitiated')
  711. break;
  712. case 2:
  713. return this.$t('smartIOTDB.repair')
  714. break;
  715. }
  716. },
  717. classModeClass: function(val){
  718. switch (val) {
  719. case 0:
  720. return 'processing'
  721. break;
  722. case 1:
  723. return 'unopen'
  724. break;
  725. case 2:
  726. return 'maintain'
  727. break;
  728. }
  729. }
  730. },
  731. mounted(){
  732. var c=document.getElementById("floorplan");
  733. var ctx=c.getContext("2d");
  734. var img=document.getElementById("planImg");
  735. var pin=document.getElementById("pin");
  736. var greenpin=document.getElementById("greenpin");
  737. var redpin=document.getElementById("redpin");
  738. c.width = img.width;
  739. c.height = img.height
  740. var pinW = 35;
  741. var pinH = 35;
  742. ctx.drawImage(img,0,0);
  743. ctx.drawImage(redpin, (c.width*0.595) ,(c.height * 0.67) , pinW, pinH);
  744. ctx.drawImage(greenpin, (c.width*0.45) ,(c.height * 0.23) , pinW, pinH);
  745. ctx.drawImage(greenpin, (c.width*0.455) ,(c.height * 0.79) , pinW, pinH);
  746. ctx.drawImage(greenpin, (c.width*0.595) ,(c.height * 0.79) , pinW, pinH);
  747. ctx.drawImage(greenpin, (c.width*0.245) ,(c.height * 0.79) , pinW, pinH);
  748. ctx.drawImage(pin, (c.width*0.52) ,(c.height * 0.23) , pinW, pinH);
  749. ctx.drawImage(pin, (c.width*0.59) ,(c.height * 0.23) , pinW, pinH);
  750. ctx.drawImage(pin, (c.width*0.595) ,(c.height * 0.73) , pinW, pinH);
  751. ctx.drawImage(pin, (c.width*0.525) ,(c.height * 0.73) , pinW, pinH);
  752. ctx.drawImage(pin, (c.width*0.525) ,(c.height * 0.79) , pinW, pinH);
  753. ctx.drawImage(pin, (c.width*0.455) ,(c.height * 0.73) , pinW, pinH);
  754. }
  755. }
  756. </script>