123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761 |
- <template>
- <div class="container">
- <div class="header">
- <img src="../assets/img/head.png" alt="" />
- </div>
- <el-container>
- <el-aside width="412px" class="left">
- <div class="title">
- <div class="text">教室分类统计</div>
- </div>
- <div class="content">
- <div id="myChart" :style="{ width: '200px', height: '200px' }"></div>
- <div class="list">
- <div class="item"> <span></span> <span>基础型</span> <span>40%</span></div>
- <div class="item"> <span></span><span>扩展型</span><span>30%</span></div>
- <div class="item"> <span></span><span>其他</span><span>35%</span></div>
- </div>
- </div>
- <div class="title">
- <div class="text">本周课程统计</div>
- </div>
- <div class="content">
- <div class="count" v-for="(item, index) in classCount" :key="index">
- <el-progress type="circle" :percentage="25" :color="item.color">
- <img :src="'src/assets/img/' + item.imgnumber + '.png'" alt="">
- </el-progress>
- <div class="number"><span> {{ item.number }}</span>(节)</div>
- <div class="text">{{ item.text }}</div>
- </div>
- </div>
- <div class="title">
- <div class="text">智慧教室使用明细</div>
- </div>
- <div class="content">
- <div class="table">
- <ul class="th">
- <li>教室</li>
- <li>使用状态</li>
- <li class="long">实到/应到人数</li>
- <li>到课率</li>
- <li>操作</li>
- </ul>
- <el-scrollbar height="400px">
- <ul v-for="item in classRoom">
- <li>
- {{ item.class }}
- </li>
- <li>{{ item.status }}</li>
- <li>{{ item.people }}</li>
- <li>{{ item.percentage }}</li>
- <li>
- <el-button size="small" class="look" @click="handleRoom">操作</el-button>
- </li>
- </ul>
- </el-scrollbar>
- </div>
- </div>
- </el-aside>
- <el-aside width="412px" class="right">
- <div class="title">
- <div class="text">物联设备统计</div>
- </div>
- <div class="content">
- <div class="img">
- <span>120</span>
- <img src="../assets/img/d1.png" alt="">
- <span>总数(个)</span>
- </div>
- <div class="list">
- <div class="item_r">
- <img src="../assets/img/d2.png" alt="">
- <div class="percent">
- 在线 40
- <span>(个)</span>
- </div>
- </div>
- <div class="item_r">
- <img src="../assets/img/d3.png" alt="">
- <div class="percent">
- 离线 71
- <span>(个)</span>
- </div>
- </div>
- </div>
- </div>
- <div class="title">
- <div class="text">物联设备类型统计</div>
- </div>
- <div class="contentwrap">
- <div class="count" v-for="(item, index) in interDevice" :key="index">
- <div class="number"><span> {{ item.number }}</span>(节)</div>
- <el-progress type="circle" :percentage="100" :color="item.color">
- <img :src="'src/assets/img/' + item.icon + '.png'" alt="">
- </el-progress>
- <div class="text">{{ item.text }}</div>
- </div>
- </div>
- <div class="title">
- <div class="text">智慧教室实时监控</div>
- </div>
- <div class="content">
- <div class="monitor">
- <p>多屏互动教室</p>
- <div class="interactclass">
- <div class="room"><span>互动教室1</span>
- <img src="../assets/img/rb1.png" alt="">
- </div>
- <div class="room"><span>互动教室2</span>
- <img src="../assets/img/rb2.png" alt="">
- </div>
- </div>
- <p>多屏智慧教室</p>
- <div class="interactclass">
- <div class="room"><span>智慧教室1</span>
- <img src="../assets/img/rb1.png" alt="">
- </div>
- <div class="room"><span>智慧教室2</span>
- <img src="../assets/img/rb2.png" alt="">
- </div>
- </div>
- <el-pagination layout="prev, pager, next" :total="50" />
- </div>
- </div>
- </el-aside>
- </el-container>
- <el-dialog v-model="centerDialogVisible" title="Warning" width="30%" align-center>
- <span>Open the dialog from the center from the screen</span>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="centerDialogVisible = false">Cancel</el-button>
- <el-button type="primary" @click="centerDialogVisible = false">
- Confirm
- </el-button>
- </span>
- </template>
- </el-dialog>
- </div>
- </template>
- <script>
- import * as echarts from "echarts";
- import { toRefs, reactive, onMounted, ref } from 'vue';
- import { ElScrollbar, ElPagination, ElDialog } from "element-plus";
- export default ({
- name: 'Histogram',
- components: { ElScrollbar, ElPagination, ElDialog },
- setup() {
- const pieData = reactive([{
- value: 1048,
- name: '基础型'
- },
- {
- value: 735,
- name: '扩展型'
- },
- {
- value: 580,
- name: '其他'
- }])
- const classPie = reactive({
- option: {
- color: ['#4ED2E4', '#5E91F6', '#67F0A8'],
- tooltip: {
- trigger: 'item'
- },
- grid: {
- x: '10',
- y: '234'
- },
- series: [{
- type: 'pie',
- radius: ['40%', '60%'],
- avoidLabelOverlap: false,
- label: {
- show: true,
- position: 'center',
- color: '#fff',
- formatter: () => { // 格式化要展示的文本
- return `总计\n\n1430间`
- },
- // formatter: '{total|' + 200 + '}' + '\n\r' + '{active|共发布活动}',
- // 等着获取了数据在给样式
- rich: {
- total: {
- fontSize: 35,
- fontFamily: "微软雅黑",
- color: '#454c5c'
- },
- active: {
- fontFamily: "微软雅黑",
- fontSize: 16,
- color: '#6c7a89',
- lineHeight: 30,
- },
- }
- },
- // emphasis: {
- // label: {
- // show: true,
- // fontSize: 40,
- // fontWeight: 'bold'
- // }
- // },
- labelLine: {
- show: false
- },
- data: pieData
- }]
- },
- })
- const initeCharts = () => {
- let myChart = echarts.init(document.getElementById('myChart'))
- // 绘制图表
- myChart.setOption(classPie.option)
- }
- // 本周课程统计数据
- const classCount = ref([
- {
- number: 112,
- text: '应上课程',
- imgnumber: "1",
- color: '#f56c6c',
- percentage: 20
- },
- {
- number: 473,
- text: '实上课程',
- imgnumber: "2",
- color: '#e6a23c'
- },
- {
- number: 1352,
- text: '应到学生数',
- imgnumber: "3",
- color: '#5cb87a',
- },
- {
- number: 2532,
- text: '实到学生数',
- imgnumber: "4",
- color: '#1989fa',
- }
- ])
- // 智慧教室使用数据
- const classRoom = ref([
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- {
- class: '法医实验室',
- status: '在用',
- people: '35/40',
- percentage: '50%',
- },
- ])
- // 物联设备类型统计
- const interDevice = ref([
- {
- number: 98,
- color: "#63ABFF",
- icon: 'r1',
- text: "显示系统"
- },
- {
- number: 185,
- color: "#63FFC7",
- icon: 'r2',
- text: "控制设备"
- },
- {
- number: 58,
- color: "#918EFF",
- icon: 'r3',
- text: "音频设备"
- },
- {
- number: 68,
- color: "#00C8E3",
- icon: 'r4',
- text: "录播设备"
- },
- {
- number: 189,
- color: "#FFBB54",
- icon: 'r5',
- text: "环境设备"
- },
- {
- number: 98,
- color: "#00CF78",
- icon: 'r6',
- text: "安全管理"
- },
- ])
- // 位置弹框
- let centerDialogVisible = ref(false)
- const handleRoom = function () {
- console.log("查看当前教室使用情况", 'adsfasdfasdfa')
- centerDialogVisible.value = true
- }
- onMounted(() => {
- initeCharts()
- })
- return {
- ...toRefs(classPie),
- classCount,
- classRoom,
- centerDialogVisible,
- interDevice,
- handleRoom
- }
- },
- })
- </script>
- <style lang="scss">
- .container {
- margin: 0;
- padding: 0;
- overflow: hidden;
- .header {
- position: absolute;
- z-index: 555;
- margin-bottom: 20px;
- height: 80px;
- width: 100%;
- top: 22px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- .el-container {
- position: absolute;
- top: 40px;
- left: 0;
- z-index: 300;
- // border: 3px solid darkgreen;
- width: calc(100% - 30px);
- margin: 20px;
- padding-left: 12px;
- padding-top: 30px;
- height: 888px;
- overflow: hidden;
- color: #FFF;
- font-size: 14px;
- display: flex;
- justify-content: space-between;
- .left,
- .right {
- flex-shrink: 0;
- border-radius: 2px;
- background: rgba(125, 125, 125, 0.17);
- backdrop-filter: blur(30.5px);
- overflow: hidden;
- }
- .title {
- width: 380px;
- height: 32px;
- flex-shrink: 0;
- background: linear-gradient(90deg, rgba(255, 255, 255, 0.17) 2.49%, rgba(255, 255, 255, 0.00) 98.69%);
- ;
- line-height: 32px;
- .text {
- color: #FFF;
- font-family: PingFang SC;
- font-size: 14px;
- padding-left: 18px;
- letter-spacing: 1px;
- }
- }
- // 教室分类统计
- .content {
- display: flex;
- justify-content: space-between;
- width: 100%;
- overflow: hidden;
- .list {
- display: flex;
- flex-direction: column;
- justify-content: center;
- width: 200px;
- .item {
- width: 150px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 10px;
- padding-bottom: 6px;
- border-bottom: 1px dotted rgba(255, 255, 255, 0.33);
- font-size: 14px;
- span {
- &:first-child {
- width: 8px;
- height: 8px;
- border-radius: 4px;
- background-color: firebrick;
- }
- &:nth-child(2n) {
- display: inline-block;
- text-align: left;
- width: 50px;
- // border: 2px solid darkcyan;
- margin-left: -40px;
- }
- }
- }
- }
- }
- // 本周课程统计
- .content {
- justify-content: space-evenly;
- .count {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 70px;
- height: 107px;
- text-align: center;
- justify-content: space-around;
- margin: 30px 0;
- padding: 20px;
- .el-progress-circle {
- width: 56px !important;
- height: 56px !important;
- .el-progress-circle__track {
- stroke: rgba(255, 255, 255, 0.2);
- }
- .el-progress__text {
- margin-top: 5px;
- }
- }
- .number {
- margin-top: 10px;
- margin-bottom: 5px;
- font-size: 12px;
- span {
- font-size: 14px;
- font-weight: bold;
- }
- }
- .text {
- font-size: 12px;
- line-height: 20px;
- width: 60px;
- }
- }
- }
- //智慧教室使用情况
- .content {
- // display: flex;
- // padding-right: 10px;
- // padding: 0;
- // border: 2px solid firebrick;
- .table {
- width: 100%;
- padding: 10px 10px;
- .th {
- font-weight: 700;
- display: flex;
- width: 100%;
- li {
- .long {
- width: 120px;
- border: 1px solid purple;
- }
- // &:nth-child()
- // width: 130px;
- //
- // text-align: center !important;
- }
- }
- ul {
- display: flex;
- list-style: none;
- height: 40px;
- line-height: 40px;
- font-size: 12px;
- border-bottom: 1px dotted #fff;
- padding: 0;
- &:last-child {
- margin-bottom: 10px;
- }
- li {
- display: flex;
- width: 100%;
- align-items: center;
- justify-content: space-around
- }
- }
- .el-button {
- background-color: #5F7BDC;
- color: #fff;
- border: none;
- }
- }
- }
- // 物联设备统计
- .content {
- .img {
- // border: 2px solid firebrick;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20px 10px;
- span {
- &:first-child {
- font-size: 18px;
- font-weight: bold;
- }
- &:last-child {
- margin-top: 10px;
- font-size: 16px;
- }
- }
- }
- .list {
- .item_r {
- display: flex;
- align-items: center;
- width: 100%;
- margin-bottom: 10px;
- // border: 1px solid forestgreen;
- img {
- border-bottom: none;
- }
- .percent {
- width: 120px;
- border-bottom: 1px solid rgba(255, 255, 255, .73);
- margin: 10px;
- padding-bottom: 10px;
- font-size: 16px;
- span {
- font-size: 12px;
- color: #fff;
- opacity: .76;
- }
- }
- }
- }
- }
- // 物联设备类型统计
- .contentwrap {
- display: flex;
- flex-wrap: wrap;
- .count {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 10px;
- text-align: center;
- width: 110px;
- .el-progress-circle {
- width: 54.6px !important;
- height: 54.6px !important;
- .el-progress-circle__track {
- stroke: rgba(255, 255, 255, 0.2);
- }
- margin: 5px 0;
- }
- .number {
- font-size: 12px;
- span {
- font-size: 14px;
- font-weight: bold;
- }
- }
- .text {
- width: 60px;
- }
- }
- }
- // 智慧教室实时监控
- .monitor {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 350px;
- background: rgba(0, 0, 0, 0.2);
- padding: 10px;
- // border: 1px solid fuchsia;
- p {
- margin-left: 5px;
- margin-top: 5px;
- }
- .interactclass {
- display: flex;
- justify-content: space-around;
- .room {
- position: relative;
- width: 170px;
- height: 94px;
- // background: saddlebrown;
- margin-top: 10px;
- span {
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- }
- .el-pagination {
- justify-content: center;
- --el-pagination-bg-color: 'tranparent';
- --el-pagination-text-color: '#fff'
- }
- .el-pagination button:disabled {
- background: none;
- color: '#fff';
- }
- .el-pagination button:hover {
- color: '#fff';
- }
- .el-pager li {
- color: #fff;
- }
- }
- }
- </style>
|