home.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726
  1. <template>
  2. <div class="content-box">
  3. <div class="middle">
  4. <div class="cartogram">
  5. <div class="apply">
  6. <div class="addApply">
  7. <span class="title">应用入口</span>
  8. <!-- <img src="@/assets/items/addApply.png" alt="" /> -->
  9. </div>
  10. <div class="imgList">
  11. <div class="imgListLi" v-for="item in applyData">
  12. <div class="imgListLi" @click="applyLink(item)">
  13. <img :src="item.logo" alt="" />
  14. <span>{{ item.name }}</span>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="cartogram">
  21. <!-- 用户类别占比 -->
  22. <div class="annulus" ref="annulus">
  23. <div class="title">用户类别占比</div>
  24. <div id="annulus"></div>
  25. <div class="headcount">
  26. <div class="num">
  27. <span>总人数</span>
  28. <span>{{ personNum }}</span>
  29. </div>
  30. </div>
  31. </div>
  32. <!-- 能耗趋势图 -->
  33. <div class="annulus">
  34. <div class="title">能耗趋势图</div>
  35. <div id="broken"></div>
  36. </div>
  37. <!-- 表格3 视频监控管理-->
  38. <!-- <div class="annulus">
  39. <div class="title">视频监控管理</div>
  40. <div class="video">
  41. <ul>
  42. <li>
  43. <span>100</span>
  44. <span>摄像头总数</span>
  45. </li>
  46. <li>
  47. <span>16</span>
  48. <span>水表总数</span>
  49. </li>
  50. <li>
  51. <span>100</span>
  52. <span>电表总数</span>
  53. </li>
  54. </ul>
  55. <ul>
  56. <li>
  57. <span>100</span>
  58. <span>电子班牌总数</span>
  59. </li>
  60. <li>
  61. <span>100</span>
  62. <span>一体机总数</span>
  63. </li>
  64. <li></li>
  65. </ul>
  66. </div>
  67. </div> -->
  68. </div>
  69. <div class="cartogram">
  70. <!--4 待办事项 -->
  71. <!-- <div class="annulus">
  72. <div class="title">
  73. <span>待办事项</span>
  74. <span>20/30</span>
  75. </div>
  76. <div class="backlog">
  77. <ul>
  78. <li>
  79. <span>上传人脸采集</span>
  80. <span>5/7</span>
  81. </li>
  82. <li>
  83. <span>上传人脸采集</span>
  84. <span>5/7</span>
  85. </li>
  86. <li>
  87. <span>上传人脸采集</span>
  88. <span>5/7</span>
  89. </li>
  90. <li>
  91. <span>上传人脸采集</span>
  92. <span>5/7</span>
  93. </li>
  94. <li>
  95. <span>上传人脸采集</span>
  96. <span>5/7</span>
  97. </li>
  98. <li>
  99. <span>上传人脸采集</span>
  100. <span>5/7</span>
  101. </li>
  102. </ul>
  103. </div>
  104. </div> -->
  105. <!--5 门禁管理 -->
  106. <div class="annulus">
  107. <div class="title">门禁管理</div>
  108. <div id="doorForbid"></div>
  109. </div>
  110. <!-- 6 行为统计-->
  111. <div class="annulus">
  112. <div class="title">行为统计</div>
  113. <div id="behavior6"></div>
  114. </div>
  115. </div>
  116. <div class="cartogram">
  117. <!--7 班级考勤 -->
  118. <div class="annulus" ref="annulus">
  119. <div class="bar">
  120. <div class="title">班级考勤</div>
  121. <el-select
  122. v-model="searchInput.class"
  123. placeholder="请选择班级"
  124. style="width: 160px; margin-right: 10px"
  125. filterable
  126. remote
  127. remote-show-suffix
  128. :remote-method="classDataMethod"
  129. @change="classClick"
  130. :clearable="false"
  131. >
  132. <el-option
  133. v-for="i in classData"
  134. :label="`${i.className}`"
  135. :value="i.id"
  136. />
  137. </el-select>
  138. <el-date-picker
  139. v-model="searchInput.date"
  140. type="date"
  141. format="YYYY-MM-DD"
  142. value-format="YYYY-MM-DD"
  143. placeholder="请输入日期"
  144. :size="size"
  145. :clearable="false"
  146. />
  147. </div>
  148. <div id="class"></div>
  149. </div>
  150. <!--8 最受欢迎老师TOP6 -->
  151. <div class="annulus">
  152. <div class="bar">
  153. <div class="title">最受欢迎老师TOP6</div>
  154. <el-select
  155. v-model="searchInput.termId"
  156. class="sel"
  157. placeholder="请选择学期"
  158. style="width: 250px"
  159. @change="greetTeaClick"
  160. :clearable="true"
  161. >
  162. <el-option
  163. :label="i.name"
  164. :value="i.id"
  165. v-for="i in semesterData"
  166. />
  167. </el-select>
  168. </div>
  169. <div class="teacher">
  170. <ul>
  171. <li v-for="(i, index) in greetTeaData">
  172. <span>{{ index + 1 }}</span>
  173. <span>{{ i.name }}</span>
  174. </li>
  175. </ul>
  176. </div>
  177. </div>
  178. <!--9 资源大数据-->
  179. <!-- <div class="annulus">
  180. <div class="title">资源大数据</div>
  181. <div id="resource"></div>
  182. </div> -->
  183. </div>
  184. </div>
  185. <el-dialog
  186. class="reply"
  187. v-model="nameVisible6"
  188. :close-on-click-modal="false"
  189. :close-on-press-escape="false"
  190. title="师傅详情"
  191. align-center
  192. width="820"
  193. :before-close="cancelName6"
  194. >
  195. <div class="reply">
  196. <div class="content">
  197. <table border>
  198. <tr>
  199. <td>姓名</td>
  200. <td>工单总数</td>
  201. <td>好评数</td>
  202. <td>超时率</td>
  203. <td>平时响应时长(分)</td>
  204. <td>平时维修时长(分)</td>
  205. <td>耗材总费用(元)</td>
  206. </tr>
  207. <tr>
  208. <td>{{ nameList6.name }}</td>
  209. <td>{{ nameList6.workOrderTotal }}</td>
  210. <td>{{ nameList6.degreePraise }}</td>
  211. <td>{{ nameList6.timeOut }}</td>
  212. <td>{{ nameList6.answer }}</td>
  213. <td>{{ nameList6.maintain }}</td>
  214. <td>{{ nameList6.totalPrice }}</td>
  215. </tr>
  216. </table>
  217. <!-- <div class="nameInfo">姓名: <span>{{ nameList.name }}</span></div>
  218. <div class="nameInfo">校区: <span>{{ nameList.schoolName }}</span></div>
  219. <div class="nameInfo">工单总数: <span> {{ nameList.workOrderTotal }}</span></div>
  220. <div class="nameInfo">好评率: <span>{{ nameList.degreePraise }}</span></div> -->
  221. </div>
  222. <!-- <div class="options">
  223. <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="replycontentYes()">
  224. 确定
  225. </el-button>
  226. <el-button @click="cancelName">取消</el-button>
  227. </div> -->
  228. </div>
  229. </el-dialog>
  230. <el-dialog
  231. class="reply"
  232. v-model="nameVisible8"
  233. :close-on-click-modal="false"
  234. :close-on-press-escape="false"
  235. title="师傅详情"
  236. align-center
  237. width="820"
  238. :before-close="cancelName8"
  239. >
  240. <div class="reply">
  241. <div class="content">
  242. <table border>
  243. <tr>
  244. <td>姓名</td>
  245. <td>工单总数</td>
  246. <td>好评数</td>
  247. <td>超时率</td>
  248. <td>平时响应时长(分)</td>
  249. <td>平时维修时长(分)</td>
  250. <td>耗材总费用(元)</td>
  251. </tr>
  252. <tr>
  253. <td>{{ nameList8.name }}</td>
  254. <td>{{ nameList8.workOrderTotal }}</td>
  255. <td>{{ nameList8.degreePraise }}</td>
  256. <td>{{ nameList8.timeOut }}</td>
  257. <td>{{ nameList8.answer }}</td>
  258. <td>{{ nameList8.maintain }}</td>
  259. <td>{{ nameList8.totalPrice }}</td>
  260. </tr>
  261. </table>
  262. <!-- <div class="nameInfo">姓名: <span>{{ nameList.name }}</span></div>
  263. <div class="nameInfo">校区: <span>{{ nameList.schoolName }}</span></div>
  264. <div class="nameInfo">工单总数: <span> {{ nameList.workOrderTotal }}</span></div>
  265. <div class="nameInfo">好评率: <span>{{ nameList.degreePraise }}</span></div> -->
  266. </div>
  267. <!-- <div class="options">
  268. <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="replycontentYes()">
  269. 确定
  270. </el-button>
  271. <el-button @click="cancelName">取消</el-button>
  272. </div> -->
  273. </div>
  274. </el-dialog>
  275. </div>
  276. </template>
  277. <script setup>
  278. import * as echarts from "echarts";
  279. import {
  280. ref,
  281. watch,
  282. reactive,
  283. nextTick,
  284. onUnmounted,
  285. onMounted,
  286. onBeforeMount,
  287. markRaw,
  288. } from "vue";
  289. import { useRouter } from "vue-router";
  290. import { ElMessage, ElMessageBox } from "element-plus";
  291. import { dayjs } from "element-plus";
  292. import lodash from "lodash";
  293. import axios from "axios";
  294. import eds from "@/utils/eds.js";
  295. import { RSAdecrypt } from "@/utils/rsa.js";
  296. import { useStore } from "vuex";
  297. const store = useStore();
  298. const api = ref("");
  299. const router = useRouter();
  300. // 应用数据
  301. const applyData = ref();
  302. // 用户类别占比
  303. const echarts1 = ref();
  304. const personNum = ref(0);
  305. // 能耗趋势图
  306. const echarts2 = ref();
  307. // 门禁管理
  308. const echarts3 = ref();
  309. // 行为统计
  310. const echarts4 = ref();
  311. // 班级考勤
  312. const echarts5 = ref();
  313. const userType = ref();
  314. const classData = ref(); // 班级数据
  315. const searchInput = reactive({
  316. class: "", // 班级考勤 班级筛选
  317. date: dayjs().format("YYYY-MM-DD"),
  318. termId: "", // 最受欢迎老师 班级筛选
  319. });
  320. // 最受欢迎老师TOP6
  321. const greetTeaData = ref();
  322. const semesterData = ref();
  323. // 资源大数据
  324. // const echarts6 = ref();
  325. const getList = async () => {
  326. applyList();
  327. cartogram();
  328. cartogram2();
  329. doorForbidClick();
  330. behaviorClick();
  331. greetTeaClick();
  332. // resourceClick();
  333. let res = await axios({
  334. method: "get",
  335. url: api.value + "/wanzai/api/login/queryReduce",
  336. headers: {
  337. token: sessionStorage.getItem("token"),
  338. user_head: sessionStorage.getItem("userhead"),
  339. },
  340. // params: data,
  341. });
  342. console.log(res, "加密参数测试");
  343. console.log(JSON.parse(eds.decryptDes(res.data.data)), "EDS解密");
  344. // import eds from "@/utils/eds.js";
  345. };
  346. const applyList = async () => {
  347. let data = {
  348. currentPage: 1,
  349. pageCount: 100,
  350. // managerId: sessionStorage.getItem("token"),
  351. };
  352. let res = await axios({
  353. method: "get",
  354. url: api.value + "/wanzai/api/smartApply/queryPageSmartApply",
  355. headers: {
  356. token: sessionStorage.getItem("token"),
  357. user_head: sessionStorage.getItem("userhead"),
  358. },
  359. params: data,
  360. });
  361. if (res.data.code == 200) {
  362. console.log(
  363. res,
  364. JSON.parse(eds.decryptDes(res.data.data)).list,
  365. "应用管理分页数据"
  366. );
  367. let data = JSON.parse(eds.decryptDes(res.data.data)).list;
  368. applyData.value = data.filter((item) => {
  369. return item.category == "管理后台";
  370. });
  371. } else {
  372. if(res.data.message=='登录凭证已过期,请重新登录'){
  373. router.push({
  374. path: `/login`,
  375. });
  376. }
  377. ElMessage({
  378. type: "error",
  379. showClose: true,
  380. message: res.data.message,
  381. center: true,
  382. });
  383. }
  384. };
  385. // 应用链接跳转
  386. const applyLink = (row) => {
  387. console.log(row);
  388. let str = row.urlLink;
  389. let charToCheck = "http";
  390. if (str.includes(charToCheck)) {
  391. if (row.descript == "领导驾驶舱") {
  392. window.open(`${row.urlLink}?token=${sessionStorage.getItem("token")}`);
  393. } else {
  394. window.open(row.urlLink);
  395. }
  396. } else {
  397. window.open(
  398. `https://${row.urlLink}?token=${sessionStorage.getItem("token")}`
  399. );
  400. }
  401. };
  402. // 用户类别占比(------------------------------)
  403. const cartogram = async () => {
  404. // 基于准备好的dom,初始化echarts实例
  405. // 圆环统计图
  406. // let data = {
  407. // state: tabIndex1.value,
  408. // };
  409. let res = await axios({
  410. method: "post",
  411. url: api.value + "/wanzai/api/wechat/getUserIdTj",
  412. headers: {
  413. token: sessionStorage.getItem("token"),
  414. user_head: sessionStorage.getItem("userhead"),
  415. },
  416. // params: data,
  417. });
  418. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "用户类别占比");
  419. let data = [];
  420. let color = [
  421. "rgba(67, 181, 244, 1)",
  422. "rgba(137, 207, 245, 1)",
  423. "rgba(180, 226, 251, 1)",
  424. "rgba(212, 237, 251, 1)",
  425. ];
  426. JSON.parse(eds.decryptDes(res.data.data)).forEach((item, index) => {
  427. let arr = {
  428. value: item.num,
  429. name: item.name,
  430. itemStyle: { color: color[index] },
  431. };
  432. data.push(arr);
  433. });
  434. // 用户总计
  435. let ress = await axios({
  436. method: "post",
  437. url: api.value + "/wanzai/api/wechat/getUserIdTjt",
  438. headers: {
  439. token: sessionStorage.getItem("token"),
  440. user_head: sessionStorage.getItem("userhead"),
  441. },
  442. // params: data,
  443. });
  444. console.log(ress, JSON.parse(eds.decryptDes(ress.data.data)), "用户总计");
  445. personNum.value = JSON.parse(eds.decryptDes(ress.data.data)).total;
  446. echarts1.value = echarts.init(document.getElementById("annulus"));
  447. echarts1.value.setOption({
  448. // title: {
  449. // text: "圆环图的例子",
  450. // left: "center",
  451. // top: "center",
  452. // },
  453. tooltip: {
  454. trigger: "item",
  455. },
  456. legend: {
  457. orient: "vertical",
  458. align: "auto",
  459. right: "15%",
  460. // top: "8%",
  461. itemGap: 20,
  462. itemWidth: 15,
  463. itemHeight: 15,
  464. },
  465. series: [
  466. {
  467. type: "pie",
  468. data: data,
  469. center: ["32%", "50%"],
  470. radius: "65%",
  471. label: {
  472. show: true,
  473. // position: "center",
  474. formatter: "{b} ({d}%)",
  475. padding: 1,
  476. },
  477. labelLine: {
  478. show: true,
  479. },
  480. emphasis: {
  481. itemStyle: {
  482. shadowBlur: 10,
  483. shadowOffsetX: 0,
  484. shadowColor: "rgba(0, 0, 0, 0.5)",
  485. },
  486. },
  487. },
  488. ],
  489. });
  490. };
  491. // 能耗趋势图(----------------------------)
  492. const cartogram2 = async () => {
  493. let eleData = [];
  494. let water = [];
  495. let name = [];
  496. {
  497. let data = new FormData();
  498. data.append("type", 0);
  499. let res = await axios({
  500. method: "post",
  501. url: api.value + "/wanzai/api/driver/getEnergyDay",
  502. headers: {
  503. token: sessionStorage.getItem("token"),
  504. user_head: sessionStorage.getItem("userhead"),
  505. },
  506. data: data,
  507. });
  508. console.log(res, "水 能耗趋势");
  509. if (res.data.code == 200) {
  510. res.data.data.forEach((item) => {
  511. water.push(item.data[0].num);
  512. name.push(item.date);
  513. });
  514. console.log(water, name);
  515. } else {
  516. ElMessage({
  517. type: "error",
  518. showClose: true,
  519. message: res.data.message,
  520. center: true,
  521. });
  522. }
  523. }
  524. {
  525. let data = new FormData();
  526. data.append("type", 1);
  527. let res = await axios({
  528. method: "post",
  529. url: api.value + "/wanzai/api/driver/getEnergyDay",
  530. headers: {
  531. token: sessionStorage.getItem("token"),
  532. user_head: sessionStorage.getItem("userhead"),
  533. },
  534. data: data,
  535. });
  536. console.log(res, "电 能耗趋势");
  537. if (res.data.code == 200) {
  538. res.data.data.forEach((item) => {
  539. eleData.push(item.data[0].num);
  540. });
  541. console.log(water, name);
  542. } else {
  543. ElMessage({
  544. type: "error",
  545. showClose: true,
  546. message: res.data.message,
  547. center: true,
  548. });
  549. }
  550. }
  551. // 折现统计图
  552. echarts2.value = markRaw(echarts.init(document.getElementById("broken")));
  553. echarts2.value.setOption({
  554. // title: {
  555. // text: "运动量对比",
  556. // textStyle: {
  557. // color: "#000",
  558. // fontSize: 14,
  559. // },
  560. // },
  561. tooltip: {
  562. trigger: "axis",
  563. },
  564. legend: {
  565. textStyle: {
  566. color: "#000",
  567. },
  568. itemWidth: 8,
  569. itemHeight: 8, // 修改icon图形大小
  570. itemGap: 30, // 修改间距
  571. // top: "bottom",
  572. bottom: "5%",
  573. data: [
  574. { name: "水", icon: "circle" },
  575. { name: "电", icon: "circle" },
  576. ],
  577. },
  578. grid: {
  579. left: "8%",
  580. top: "15%",
  581. bottom: "20%",
  582. right: "8%",
  583. containLabel: true,
  584. },
  585. xAxis: {
  586. type: "category",
  587. boundaryGap: false,
  588. axisTick: { show: false },
  589. axisLabel: {
  590. textStyle: {
  591. color: "#000", //刻度颜色
  592. fontSize: 10, //刻度大小
  593. },
  594. },
  595. axisLine: {
  596. show: true,
  597. lineStyle: {
  598. color: "#DDDDDD",
  599. width: 1,
  600. type: "solid",
  601. },
  602. },
  603. data: name,
  604. },
  605. yAxis: [
  606. {
  607. name: "吨",
  608. type: "value",
  609. axisTick: { show: false },
  610. axisLabel: {
  611. textStyle: {
  612. color: "#000", //刻度颜色
  613. fontSize: 10, //刻度大小
  614. },
  615. },
  616. axisLine: {
  617. show: false,
  618. lineStyle: {
  619. color: "#000",
  620. width: 1,
  621. type: "solid",
  622. },
  623. },
  624. splitLine: {
  625. show: false,
  626. },
  627. },
  628. {
  629. name: "度",
  630. type: "value",
  631. axisTick: { show: false },
  632. axisLabel: {
  633. textStyle: {
  634. color: "#000", //刻度颜色
  635. fontSize: 10, //刻度大小
  636. },
  637. // formatter: "{value}",
  638. },
  639. axisLine: {
  640. show: false,
  641. lineStyle: {
  642. color: "#000",
  643. width: 1,
  644. type: "solid",
  645. },
  646. },
  647. // axisLabel: { },
  648. // splitLine: {
  649. // show: false,
  650. // },
  651. },
  652. ],
  653. series: [
  654. {
  655. name: "水",
  656. type: "line",
  657. smooth: true, // 折线拐点平滑
  658. // symbol: "circle",
  659. symbolSize: 3,
  660. itemStyle: {
  661. color: "#6FB6B8",
  662. // borderColor: "#fff",
  663. // borderWidth: 10,
  664. },
  665. lineStyle: {
  666. normal: {
  667. color: "rgba(111, 182, 184, 1)",
  668. opacity: 1,
  669. },
  670. },
  671. areaStyle: {
  672. color: "rgba(111, 182, 184, 0.2)",
  673. },
  674. data: water,
  675. },
  676. {
  677. name: "电",
  678. type: "line",
  679. smooth: true,
  680. symbolSize: 3,
  681. yAxisIndex: 1,
  682. itemStyle: {
  683. color: "rgba(30, 125, 251, 1)", // 拐点的颜色
  684. borderColor: "#fff", // 拐点边框颜色
  685. // borderWidth: 10, // 拐点边框大小
  686. },
  687. lineStyle: {
  688. normal: {
  689. color: "rgba(30, 125, 251, 1)", // 折线点的颜色
  690. },
  691. },
  692. areaStyle: {
  693. color: "rgba(30, 125, 251, 0.2)",
  694. },
  695. data: eleData,
  696. },
  697. ],
  698. });
  699. };
  700. // 门禁管理
  701. const doorForbidClick = async () => {
  702. let res = await axios({
  703. method: "get",
  704. url: api.value + "/wanzai/api/smartFaceDiscern/access",
  705. headers: {
  706. token: sessionStorage.getItem("token"),
  707. user_head: sessionStorage.getItem("userhead"),
  708. },
  709. params: data,
  710. });
  711. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "门禁管理");
  712. let timeList = [];
  713. let faceData = [];
  714. let codeData = [];
  715. let carData = [];
  716. JSON.parse(eds.decryptDes(res.data.data))
  717. .reverse()
  718. .forEach((item) => {
  719. timeList.push(item.date);
  720. faceData.push(item.face);
  721. codeData.push(item.code);
  722. carData.push(item.car);
  723. });
  724. echarts3.value = markRaw(echarts.init(document.getElementById("doorForbid")));
  725. echarts3.value.setOption({
  726. tooltip: {
  727. trigger: "axis",
  728. axisPointer: {
  729. type: "cross",
  730. label: {
  731. backgroundColor: "#6a7985",
  732. },
  733. },
  734. },
  735. legend: {
  736. // data: dayTitle,
  737. bottom: "15",
  738. icon: "circle",
  739. itemHeight: 13, // 修改icon图形大小
  740. itemGap: 30, // 修改间距
  741. textStyle: {
  742. fontSize: 10,
  743. color: "#000",
  744. padding: [0, 0, 0, -5], // 修改文字和图标距离
  745. },
  746. },
  747. grid: {
  748. top: "12%",
  749. left: "5%",
  750. right: "8%",
  751. bottom: "20%",
  752. containLabel: true,
  753. },
  754. dataZoom: [
  755. {
  756. // 这部分是关键
  757. type: "inside", //slider inside 添加滑动条类型 dataZoom 组件
  758. start: 0, // 默认数据初始选择范围为 10% 到 90%
  759. end: 30,
  760. },
  761. ],
  762. xAxis: [
  763. {
  764. type: "category",
  765. boundaryGap: false,
  766. axisLine: {
  767. show: false, // 不显示坐标轴线
  768. },
  769. axisTick: {
  770. show: false, // 不显示坐标轴刻度线
  771. },
  772. data: timeList,
  773. // axisLabel: {
  774. // // 每个数据后面都会带有单位
  775. // formatter: "{value}月",
  776. // },
  777. name: "",
  778. nameLocation: "end",
  779. nameTextStyle: {
  780. padding: [60, 0, 0, 0], // 四个数字分别为上右下左与原位置距离
  781. },
  782. },
  783. ],
  784. yAxis: [
  785. {
  786. type: "value",
  787. },
  788. ],
  789. series: [
  790. {
  791. name: "刷脸",
  792. type: "line",
  793. // stack: "Total",
  794. emphasis: {
  795. focus: "series",
  796. },
  797. data: faceData,
  798. symbolSize: 4, // 点的大小
  799. symbol: "none", // 折线点设置为实心点
  800. // itemStyle: {
  801. // normal: {
  802. // color: "rgba(30, 125, 251, 1)", // 拐点的颜色
  803. // borderColor: "white", // 拐点边框颜色
  804. // borderWidth: 2, // 拐点边框大小
  805. // },
  806. // },
  807. lineStyle: {
  808. normal: {
  809. color: "rgba(102, 153, 255, 1)", // 折线点的颜色
  810. },
  811. },
  812. smooth: true, //平滑曲线图。值可为数字
  813. // areaStyle: {
  814. // //2.基础面积图。区域填充样式
  815. // color: "rgba(30, 125, 251, 0.3)", //支持RGB、ALPHA通道+RGBA、十六进制、渐变色、纹理填充
  816. // },
  817. },
  818. {
  819. name: "刷码",
  820. type: "line",
  821. // stack: "Total",
  822. emphasis: {
  823. focus: "series",
  824. },
  825. data: codeData,
  826. symbolSize: 4, // 点的大小
  827. symbol: "none", // 折线点设置为实心点
  828. // itemStyle: {
  829. // normal: {
  830. // color: "rgba(111, 182, 184, 1)", // 拐点的颜色
  831. // borderColor: "white", // 拐点边框颜色
  832. // borderWidth: 2, // 拐点边框大小
  833. // },
  834. // },
  835. lineStyle: {
  836. normal: {
  837. color: "rgba(78, 206, 163, 1)", // 折线点的颜色
  838. },
  839. },
  840. smooth: true, //平滑曲线图。值可为数字
  841. // areaStyle: {
  842. // //2.基础面积图。区域填充样式
  843. // color: "rgba(111, 182, 184, 0.3)", //支持RGB、ALPHA通道+RGBA、十六进制、渐变色、纹理填充
  844. // },
  845. },
  846. {
  847. name: "车牌",
  848. type: "line",
  849. // stack: "Total",
  850. emphasis: {
  851. focus: "series",
  852. },
  853. data: carData,
  854. symbolSize: 4, // 点的大小
  855. symbol: "none", // 折线点设置为实心点
  856. // itemStyle: {
  857. // normal: {
  858. // color: "rgba(111, 182, 184, 1)", // 拐点的颜色
  859. // borderColor: "white", // 拐点边框颜色
  860. // borderWidth: 2, // 拐点边框大小
  861. // },
  862. // },
  863. lineStyle: {
  864. normal: {
  865. color: "rgba(67, 181, 244, 1)", // 折线点的颜色
  866. },
  867. },
  868. smooth: true, //平滑曲线图。值可为数字
  869. // areaStyle: {
  870. // //2.基础面积图。区域填充样式
  871. // color: "rgba(111, 182, 184, 0.3)", //支持RGB、ALPHA通道+RGBA、十六进制、渐变色、纹理填充
  872. // },
  873. },
  874. ],
  875. });
  876. };
  877. // 6 行为统计
  878. const behaviorClick = async () => {
  879. // 基于准备好的dom,初始化echarts实例
  880. let res = await axios({
  881. method: "get",
  882. url: api.value + "/wanzai/api/smartWarning/behaviour",
  883. headers: {
  884. token: sessionStorage.getItem("token"),
  885. user_head: sessionStorage.getItem("userhead"),
  886. },
  887. params: data,
  888. });
  889. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "行为统计");
  890. let color = [
  891. "rgba(67, 181, 244, 1)",
  892. "rgba(137, 207, 245, 1)",
  893. "rgba(180, 226, 251, 1)",
  894. "rgba(212, 237, 251, 1)",
  895. "rgba(171, 249, 255, 1)",
  896. ];
  897. let typeData = [];
  898. JSON.parse(eds.decryptDes(res.data.data)).forEach((item, index) => {
  899. let arr = {
  900. value: item.typeCount,
  901. name: item.typeName,
  902. itemStyle: {
  903. color: color[index],
  904. },
  905. };
  906. typeData.push(arr);
  907. });
  908. echarts4.value = echarts.init(document.getElementById("behavior6"));
  909. echarts4.value.setOption({
  910. // title: {
  911. // text: "圆环图的例子",
  912. // left: "center",
  913. // top: "center",
  914. // },
  915. tooltip: {
  916. trigger: "item",
  917. },
  918. legend: {
  919. orient: "vertical",
  920. right: "6%",
  921. top: "10%",
  922. itemGap: 20,
  923. itemWidth: 15,
  924. itemHeight: 15,
  925. },
  926. series: [
  927. {
  928. type: "pie",
  929. // data: [
  930. // {
  931. // value: 224,
  932. // name: "区域入侵",
  933. // itemStyle: {
  934. // color: "rgba(67, 181, 244, 1)",
  935. // },
  936. // },
  937. // {
  938. // value: 304,
  939. // name: "防溺水",
  940. // itemStyle: {
  941. // color: "rgba(137, 207, 245, 1)",
  942. // },
  943. // },
  944. // {
  945. // value: 484,
  946. // name: "睡觉",
  947. // itemStyle: {
  948. // color: "rgba(180, 226, 251, 1)",
  949. // },
  950. // },
  951. // {
  952. // value: 300,
  953. // name: "抽烟",
  954. // itemStyle: {
  955. // color: "rgba(212, 237, 251, 1)",
  956. // },
  957. // },
  958. // {
  959. // value: 180,
  960. // name: "打架",
  961. // itemStyle: {
  962. // color: "rgba(171, 249, 255, 1)",
  963. // },
  964. // },
  965. // ],
  966. data: typeData,
  967. center: ["40%", "48%"],
  968. radius: ["48%", "65%"],
  969. label: {
  970. show: true,
  971. // position: "center",
  972. formatter: "{b} ({d}%)",
  973. padding: 1,
  974. },
  975. labelLine: {
  976. show: true,
  977. // length: -1,
  978. },
  979. // itemStyle: {
  980. // shadowBlur: 10,
  981. // shadowOffsetX: 0,
  982. // shadowColor: "rgba(0, 0, 0, 0.5)",
  983. // },
  984. },
  985. ],
  986. });
  987. };
  988. // 7 班级考勤
  989. const classClick = async () => {
  990. // 基于准备好的dom,初始化echarts实例
  991. // 圆环统计图
  992. let resFlag = {
  993. date: searchInput.date,
  994. classId: searchInput.class,
  995. };
  996. let res = await axios({
  997. method: "get",
  998. url: api.value + "/wanzai/api/smartAttendance/queryAttendanceList",
  999. headers: {
  1000. token: sessionStorage.getItem("token"),
  1001. user_head: sessionStorage.getItem("userhead"),
  1002. },
  1003. params: resFlag,
  1004. });
  1005. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "圆环 班级考勤");
  1006. // console.log(res, "圆环 班级考勤");
  1007. let colorSel = [
  1008. "rgba(67, 181, 244, 1)",
  1009. "rgba(137, 207, 245, 1)",
  1010. "rgba(180, 226, 251, 1)",
  1011. "rgba(212, 237, 251, 1)",
  1012. "rgba(171, 249, 255, 1)",
  1013. ];
  1014. let data = [];
  1015. JSON.parse(eds.decryptDes(res.data.data)).forEach((item, index) => {
  1016. let aug = {
  1017. value: item.proportion,
  1018. name: item.name,
  1019. itemStyle: {
  1020. color: colorSel[index],
  1021. },
  1022. };
  1023. data.push(aug);
  1024. });
  1025. echarts5.value = echarts.init(document.getElementById("class"));
  1026. echarts5.value.setOption({
  1027. // title: {
  1028. // text: "圆环图的例子",
  1029. // left: "center",
  1030. // top: "center",
  1031. // },
  1032. tooltip: {
  1033. trigger: "item",
  1034. },
  1035. legend: {
  1036. orient: "vertical",
  1037. right: "6%",
  1038. top: "12%",
  1039. itemGap: 20,
  1040. itemWidth: 15,
  1041. itemHeight: 15,
  1042. },
  1043. series: [
  1044. {
  1045. type: "pie",
  1046. data: data,
  1047. center: ["40%", "48%"],
  1048. radius: ["48%", "65%"],
  1049. label: {
  1050. show: true,
  1051. // position: "center",
  1052. formatter: "{b} ({d}%)",
  1053. padding: 1,
  1054. },
  1055. labelLine: {
  1056. show: true,
  1057. // length: -1,
  1058. },
  1059. },
  1060. ],
  1061. });
  1062. };
  1063. // 8 最受欢迎老师TOP6
  1064. const greetTeaClick = async () => {
  1065. // 基于准备好的dom,初始化echarts实例
  1066. let res = await axios({
  1067. method: "get",
  1068. url: api.value + "/wanzai/api/smartEvaluateTeacher/queryTopSixTeacher",
  1069. headers: {
  1070. token: sessionStorage.getItem("token"),
  1071. user_head: sessionStorage.getItem("userhead"),
  1072. },
  1073. params: {
  1074. termId: searchInput.termId,
  1075. },
  1076. });
  1077. console.log(
  1078. res,
  1079. JSON.parse(eds.decryptDes(res.data.data)),
  1080. "最受欢迎老师TOP6"
  1081. );
  1082. greetTeaData.value = JSON.parse(eds.decryptDes(res.data.data));
  1083. };
  1084. // 9 资源大数据
  1085. const resourceClick = async () => {
  1086. // 基于准备好的dom,初始化echarts实例
  1087. // 圆环统计图
  1088. // let data = {
  1089. // state: tabIndex1.value,
  1090. // };
  1091. // let res = await axios({
  1092. // method: "get",
  1093. // url: api.value + "/repairRecord/repairAnalysis",
  1094. // headers: {
  1095. // token: sessionStorage.getItem("token"),
  1096. // user_head: sessionStorage.getItem("userhead"),
  1097. // },
  1098. // params: data,
  1099. // });
  1100. // console.log(res, "圆环 报修分析统计");
  1101. // let echartsData1 = [];
  1102. echarts6.value = echarts.init(document.getElementById("resource"));
  1103. echarts6.value.setOption({
  1104. // title: {
  1105. // text: "圆环图的例子",
  1106. // left: "center",
  1107. // top: "center",
  1108. // },
  1109. tooltip: {
  1110. trigger: "item",
  1111. },
  1112. legend: {
  1113. orient: "vertical",
  1114. right: "6%",
  1115. top: "15%",
  1116. itemGap: 20,
  1117. itemWidth: 15,
  1118. itemHeight: 15,
  1119. },
  1120. series: [
  1121. {
  1122. type: "pie",
  1123. data: [
  1124. {
  1125. value: 224,
  1126. name: "电子资源库",
  1127. itemStyle: {
  1128. color: "rgba(67, 181, 244, 1)",
  1129. },
  1130. },
  1131. {
  1132. value: 304,
  1133. name: "课程资源库",
  1134. itemStyle: {
  1135. color: "rgba(137, 207, 245, 1)",
  1136. },
  1137. },
  1138. {
  1139. value: 484,
  1140. name: "教学方案库",
  1141. itemStyle: {
  1142. color: "rgba(180, 226, 251, 1)",
  1143. },
  1144. },
  1145. {
  1146. value: 300,
  1147. name: "第三资源库",
  1148. itemStyle: {
  1149. color: "rgba(212, 237, 251, 1)",
  1150. },
  1151. },
  1152. ],
  1153. center: ["40%", "48%"],
  1154. radius: ["48%", "65%"],
  1155. label: {
  1156. show: true,
  1157. // position: "center",
  1158. formatter: "{b} ({d}%)",
  1159. padding: 1,
  1160. },
  1161. labelLine: {
  1162. show: true,
  1163. // length: -1,
  1164. },
  1165. },
  1166. ],
  1167. });
  1168. };
  1169. const resizeChart = () => {
  1170. echarts1.value.resize();
  1171. // 能耗趋势图
  1172. echarts2.value.resize();
  1173. // 门禁管理
  1174. echarts3.value.resize();
  1175. // 行为统计
  1176. echarts4.value.resize();
  1177. // 班级考勤
  1178. echarts5.value.resize();
  1179. };
  1180. // 判断为班主任 还是 超级管理员
  1181. const userTypeChange = async (value) => {
  1182. let res = await axios({
  1183. method: "get",
  1184. url: api.value + "/wanzai/api/smartAuthorGroup/getClassById",
  1185. headers: {
  1186. token: sessionStorage.getItem("token"),
  1187. user_head: sessionStorage.getItem("userhead"),
  1188. },
  1189. params: {
  1190. userHead: sessionStorage.getItem("userhead"),
  1191. },
  1192. });
  1193. console.log(
  1194. res,
  1195. JSON.parse(eds.decryptDes(res.data.data)),
  1196. "断为班主任 还是 超级管理员"
  1197. );
  1198. if (res.data.code == 200) {
  1199. userType.value = JSON.parse(eds.decryptDes(res.data.data)).schoolClass;
  1200. classList();
  1201. }
  1202. };
  1203. // 班级数据
  1204. const classList = async (val = "") => {
  1205. let res = await axios({
  1206. method: "get",
  1207. url: api.value + "/wanzai/api/smartClass/getSchoolClasses",
  1208. headers: {
  1209. token: sessionStorage.getItem("token"),
  1210. user_head: sessionStorage.getItem("userhead"),
  1211. },
  1212. params: {
  1213. schoolClass: userType.value,
  1214. className: val,
  1215. },
  1216. });
  1217. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "班级数据");
  1218. // classData.value = JSON.parse(eds.decryptDes(res.data.data));
  1219. // searchInput.class=classData.value[0].id
  1220. let classList = JSON.parse(eds.decryptDes(res.data.data));
  1221. if (userType.value == 0) {
  1222. classData.value = classList;
  1223. if (!searchInput.class) {
  1224. searchInput.class = classData.value[0].id;
  1225. }
  1226. } else {
  1227. classData.value = [{ className: classList.className, id: classList.id }];
  1228. searchInput.class = classList.id;
  1229. }
  1230. classClick();
  1231. };
  1232. const classDataMethod = async (query) => {
  1233. if (query) {
  1234. classList(query);
  1235. } else {
  1236. classList();
  1237. }
  1238. };
  1239. // 获取学期下拉
  1240. const semesterList = async () => {
  1241. let semester = await axios({
  1242. method: "get",
  1243. url: api.value + "/wanzai/api/smartScore/querySmartSemesters",
  1244. headers: {
  1245. token: sessionStorage.getItem("token"),
  1246. user_head: sessionStorage.getItem("userhead"),
  1247. },
  1248. // params: data,
  1249. });
  1250. console.log(
  1251. semester,
  1252. JSON.parse(eds.decryptDes(semester.data.data)),
  1253. "学期下拉数据"
  1254. );
  1255. semesterData.value = JSON.parse(eds.decryptDes(semester.data.data));
  1256. };
  1257. onMounted(async () => {
  1258. api.value = store.state.user.api;
  1259. window.addEventListener("resize", () => {
  1260. resizeChart();
  1261. });
  1262. if (
  1263. router.currentRoute.value.query.userhead &&
  1264. router.currentRoute.value.query.token
  1265. ) {
  1266. let userhead = router.currentRoute.value.query.userhead;
  1267. let token = router.currentRoute.value.query.token;
  1268. sessionStorage.setItem("token", token);
  1269. sessionStorage.setItem("userhead", userhead);
  1270. console.log(userhead, "userhead");
  1271. console.log(token, "token");
  1272. const formDatas = new FormData();
  1273. formDatas.append("userId", "");
  1274. let resData = await axios({
  1275. method: "post",
  1276. url: api.value + "/wanzai/api/smartAuthorGroup/queryUserAuthor",
  1277. headers: {
  1278. token: sessionStorage.getItem("token"),
  1279. user_head: sessionStorage.getItem("userhead"),
  1280. },
  1281. data: formDatas,
  1282. });
  1283. console.log(resData, "查看当前用户权限");
  1284. if (resData.data.code == 200) {
  1285. let roleList = resData.data.data[0].treAuthor;
  1286. sessionStorage.setItem("roleList", JSON.stringify(roleList));
  1287. // store.commit("ROLELIST", "");
  1288. let flag = roleList.some((item) => {
  1289. return item.route == "/wanzai/home";
  1290. });
  1291. let address = roleList[0].route;
  1292. console.log(flag, address);
  1293. if (!flag) {
  1294. store.commit("indexUp", address);
  1295. router.push({
  1296. path: `${address}`,
  1297. });
  1298. } else {
  1299. store.commit("indexUp", "/wanzai/home");
  1300. router.push({
  1301. path: `/wanzai/home`,
  1302. });
  1303. }
  1304. } else {
  1305. // ElMessage({
  1306. // type: "error",
  1307. // showClose: true,
  1308. // message: resData.data.message,
  1309. // center: true,
  1310. // });
  1311. }
  1312. }
  1313. if (sessionStorage.getItem("token") && sessionStorage.getItem("userhead")) {
  1314. getList();
  1315. userTypeChange();
  1316. semesterList();
  1317. } else {
  1318. router.push({ path: `/wanzai/login` });
  1319. ElMessage({
  1320. type: "error",
  1321. showClose: true,
  1322. message: "登录凭证已过期,请重新登录",
  1323. center: true,
  1324. });
  1325. }
  1326. // let userhead = "1B0430E15102ADC65C43E475AC697D9A";
  1327. // let token =
  1328. // "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MTMyMzQ2NDQsImNhcmRObyI6IjAwMDAwMSIsImlhdCI6MTcxMzE0ODI0NH0.jxuGCqDkqzRa3poVNQq5aoSrKGDCZauXFLVKrB4M87s";
  1329. // sessionStorage.setItem("token", JSON.stringify(token));
  1330. // sessionStorage.setItem("userhead", JSON.stringify(userhead));
  1331. });
  1332. onUnmounted(() => {
  1333. if (echarts1.value) {
  1334. echarts1.value.dispose();
  1335. }
  1336. if (echarts2.value) {
  1337. echarts2.value.dispose();
  1338. }
  1339. if (echarts3.value) {
  1340. echarts3.value.dispose();
  1341. }
  1342. if (echarts4.value) {
  1343. echarts4.value.dispose();
  1344. }
  1345. if (echarts5.value) {
  1346. echarts5.value.dispose();
  1347. }
  1348. });
  1349. </script>
  1350. <style scoped lang="scss">
  1351. .content-box {
  1352. min-width: 1000px;
  1353. width: calc(100vw - 260px);
  1354. height: calc(100vh - 105px);
  1355. margin: 20px auto;
  1356. // background-color: #fff;
  1357. // border: 1px solid #000;
  1358. color: #fff;
  1359. display: flex;
  1360. flex-direction: column;
  1361. .middle {
  1362. width: 100%;
  1363. // height: 100%;
  1364. margin: 0 auto;
  1365. overflow: auto;
  1366. .cartogram {
  1367. display: flex;
  1368. justify-content: space-between;
  1369. margin: 0 0 25px 0;
  1370. // 应用入口
  1371. .apply {
  1372. width: 100%;
  1373. height: 165px;
  1374. border-radius: 8px;
  1375. background-color: #fff;
  1376. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  1377. .addApply {
  1378. color: #000;
  1379. height: 40px;
  1380. display: flex;
  1381. align-items: center;
  1382. .title {
  1383. margin: 0 20px;
  1384. }
  1385. img {
  1386. width: 25px;
  1387. height: 25px;
  1388. }
  1389. }
  1390. .imgList {
  1391. display: flex;
  1392. align-items: center;
  1393. width: calc(100% - 40px);
  1394. margin: 0 auto;
  1395. overflow: auto;
  1396. .imgListLi {
  1397. display: flex;
  1398. flex-direction: column;
  1399. align-items: center;
  1400. margin-right: 15px;
  1401. cursor: pointer;
  1402. img {
  1403. width: 70px;
  1404. height: 70px;
  1405. margin-bottom: 8px;
  1406. }
  1407. span {
  1408. color: #000;
  1409. font-size: 12px;
  1410. }
  1411. }
  1412. .imgListLi:last-child {
  1413. margin-right: 0;
  1414. }
  1415. }
  1416. .imgList:hover {
  1417. &::-webkit-scrollbar-track {
  1418. background-color: #fff;
  1419. }
  1420. &::-webkit-scrollbar {
  1421. background-color: #57b2ff;
  1422. height: 3px;
  1423. width: 3px;
  1424. }
  1425. &::-webkit-scrollbar-thumb {
  1426. background: #57b2ff;
  1427. border-radius: 4px;
  1428. height: 3px;
  1429. width: 3px;
  1430. }
  1431. }
  1432. }
  1433. // 用户类别占比
  1434. .annulus {
  1435. // width: 520px;
  1436. flex: 1;
  1437. min-width: 400px;
  1438. height: 300px;
  1439. border-radius: 8px;
  1440. background-color: #fff;
  1441. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  1442. position: relative;
  1443. .bar {
  1444. display: flex;
  1445. // justify-content: center;
  1446. align-items: center;
  1447. }
  1448. .title {
  1449. margin: 10px 20px;
  1450. color: #000;
  1451. font-weight: 700;
  1452. font-size: 20px;
  1453. display: flex;
  1454. align-items: center;
  1455. justify-content: space-between;
  1456. span:nth-child(2) {
  1457. background-color: rgba(230, 239, 255, 1);
  1458. color: rgba(0, 97, 255, 1);
  1459. font-weight: 400;
  1460. font-size: 16px;
  1461. padding: 3px 5px;
  1462. border-radius: 3px;
  1463. }
  1464. }
  1465. // 总人数
  1466. .headcount {
  1467. position: relative;
  1468. top: -250px;
  1469. right: calc(-100% + 120px);
  1470. width: 120px;
  1471. .num {
  1472. display: flex;
  1473. flex-direction: column;
  1474. }
  1475. span:nth-child(1) {
  1476. font-size: 14px;
  1477. color: #000;
  1478. text-align: right;
  1479. // margin-right: 30px;
  1480. text-align: center;
  1481. }
  1482. span:nth-child(2) {
  1483. font-size: 26px;
  1484. font-weight: 600;
  1485. color: rgba(42, 42, 42, 1);
  1486. text-align: right;
  1487. // margin-right: 30px;
  1488. text-align: center;
  1489. }
  1490. }
  1491. .table {
  1492. width: 90%;
  1493. margin: 20px auto;
  1494. // 表头设置
  1495. :deep(.el-table__header) {
  1496. height: 40px;
  1497. tr {
  1498. color: #000;
  1499. }
  1500. }
  1501. // 表格body
  1502. :deep(.el-table__body) {
  1503. .el-table__row {
  1504. height: 50px;
  1505. color: #000;
  1506. }
  1507. }
  1508. }
  1509. // 用户类别占比
  1510. #annulus {
  1511. width: 100%;
  1512. height: 250px;
  1513. }
  1514. // 能耗趋势图
  1515. #broken {
  1516. width: 100%;
  1517. height: 250px;
  1518. }
  1519. // 视频监控管理
  1520. .video {
  1521. width: 100%;
  1522. height: 250px;
  1523. // margin: 20px auto;
  1524. color: #000;
  1525. ul {
  1526. // height: 100%;
  1527. margin: 12px 20px;
  1528. padding: 0;
  1529. display: flex;
  1530. // flex-wrap: wrap;
  1531. justify-content: space-around;
  1532. li {
  1533. width: 45%;
  1534. height: 100px;
  1535. // background-color: rgba(237, 245, 250, 1);
  1536. border-radius: 7px;
  1537. list-style: none;
  1538. display: flex;
  1539. flex-direction: column;
  1540. justify-content: center;
  1541. align-items: center;
  1542. span:nth-child(1) {
  1543. font-size: 30px;
  1544. color: #000;
  1545. font-weight: 600;
  1546. }
  1547. span:nth-child(2) {
  1548. font-size: 16px;
  1549. color: rgba(51, 51, 51, 1);
  1550. // font-weight: 600;
  1551. }
  1552. }
  1553. }
  1554. }
  1555. // 待办事项
  1556. .backlog {
  1557. margin: 0 30px;
  1558. ul {
  1559. height: 230px;
  1560. color: rgba(0, 97, 255, 1);
  1561. margin: 0;
  1562. padding: 0;
  1563. overflow: auto;
  1564. li {
  1565. list-style: none;
  1566. display: flex;
  1567. justify-content: space-between;
  1568. align-items: center;
  1569. padding: 10px 0;
  1570. border-bottom: 1px solid rgba(230, 230, 230, 1);
  1571. span:nth-child(2) {
  1572. padding: 0 8px;
  1573. }
  1574. }
  1575. }
  1576. ul::-webkit-scrollbar-track {
  1577. background-color: #daeeff;
  1578. }
  1579. ul::-webkit-scrollbar {
  1580. background-color: rgba(0, 97, 255, 1);
  1581. height: 3px;
  1582. width: 2px;
  1583. }
  1584. // ul::-webkit-scrollbar-thumb {
  1585. // background: #57b2ff;
  1586. // border-radius: 4px;
  1587. // height: 3px;
  1588. // width: 2px;
  1589. // }
  1590. }
  1591. // 待办事项
  1592. .teacher {
  1593. margin: 0 30px;
  1594. ul {
  1595. height: 230px;
  1596. color: rgba(0, 97, 255, 1);
  1597. margin: 0;
  1598. padding: 0;
  1599. overflow: auto;
  1600. li {
  1601. list-style: none;
  1602. display: flex;
  1603. justify-content: space-between;
  1604. align-items: center;
  1605. padding: 10px 0;
  1606. border-bottom: 1px solid rgba(230, 230, 230, 1);
  1607. span {
  1608. color: rgba(166, 166, 166, 1);
  1609. }
  1610. span:nth-child(2) {
  1611. padding: 0 8px;
  1612. color: rgba(0, 97, 255, 1);
  1613. }
  1614. }
  1615. li:nth-child(1) {
  1616. span:nth-child(1) {
  1617. color: rgba(212, 48, 48, 1);
  1618. }
  1619. }
  1620. li:nth-child(2) {
  1621. span:nth-child(1) {
  1622. color: rgba(255, 87, 51, 1);
  1623. }
  1624. }
  1625. li:nth-child(3) {
  1626. span:nth-child(1) {
  1627. color: rgba(0, 97, 255, 1);
  1628. }
  1629. }
  1630. }
  1631. ul::-webkit-scrollbar-track {
  1632. background-color: #daeeff;
  1633. }
  1634. ul::-webkit-scrollbar {
  1635. background-color: rgba(0, 97, 255, 1);
  1636. height: 3px;
  1637. width: 2px;
  1638. }
  1639. // ul::-webkit-scrollbar-thumb {
  1640. // background: #57b2ff;
  1641. // border-radius: 4px;
  1642. // height: 3px;
  1643. // width: 2px;
  1644. // }
  1645. }
  1646. // 门禁管理
  1647. #doorForbid {
  1648. width: 100%;
  1649. height: 250px;
  1650. }
  1651. // 班级考勤
  1652. #class {
  1653. width: 100%;
  1654. height: 250px;
  1655. }
  1656. // 资源大数据
  1657. #resource {
  1658. width: 100%;
  1659. height: 250px;
  1660. }
  1661. }
  1662. .annulus:nth-child(2) {
  1663. margin: 0 0 0 20px;
  1664. }
  1665. //3 视频监控管理
  1666. // 6 行为统计
  1667. #behavior6 {
  1668. width: 100%;
  1669. height: 250px;
  1670. }
  1671. }
  1672. .cartogram:nth-child(4) {
  1673. margin: 0;
  1674. }
  1675. }
  1676. }
  1677. .item::-webkit-scrollbar-track {
  1678. background-color: #fff;
  1679. }
  1680. .item::-webkit-scrollbar {
  1681. background-color: #57b2ff;
  1682. height: 5px;
  1683. width: 3px;
  1684. }
  1685. .item::-webkit-scrollbar-thumb {
  1686. background: #57b2ff;
  1687. border-radius: 4px;
  1688. height: 3px;
  1689. width: 3px;
  1690. }
  1691. </style>