From e2d556803e3138732ffde7d3d07b0a4a9b0b7f0a Mon Sep 17 00:00:00 2001 From: batman <978517621@qq.com> Date: 星期五, 10 三月 2023 10:33:40 +0800 Subject: [PATCH] 新修改添加页面 --- src/views/specialWorkSystem/specialIndex/index.vue | 416 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 390 insertions(+), 26 deletions(-) diff --git a/src/views/specialWorkSystem/specialIndex/index.vue b/src/views/specialWorkSystem/specialIndex/index.vue index 9f747d8..f18f329 100644 --- a/src/views/specialWorkSystem/specialIndex/index.vue +++ b/src/views/specialWorkSystem/specialIndex/index.vue @@ -1,14 +1,25 @@ <template> - <div class="home-container"> + <div class="home-container" :class="isFull==true?'container':''" id="bigScreen"> <div class="full"> - 全屏 + <el-button v-if="isFull==false" type="text" style="height: 34px" @click="toFullscreen"> + <el-icon style="vertical-align: middle"> + <FullScreen /> + </el-icon> + <span style="vertical-align: middle">全屏</span> + </el-button> + <el-button v-else type="text" style="height: 34px" @click="toFullscreen"> + <el-icon style="vertical-align: middle"> + <Close /> + </el-icon> + <span style="vertical-align: middle">退出全屏</span> + </el-button> </div> <div class="topChart"> <div class="chart-item"> <div class="chart-tit"> <span class="tit">八大作业各分类分布图</span> <div class="filter-part filter-part2"> - <el-cascader v-model="chartSearch1.searchDep" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/> + <el-cascader :teleported="false" v-model="chartSearch1.searchDep" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/> </div> </div> <div class="chart" :id="zyfb"></div> @@ -23,8 +34,8 @@ <div class="chart-tit"> <span class="tit">各事业部关联作业分析</span> <div class="filter-part"> - <el-cascader v-model="chartSearch2.searchDep" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/> - <el-select v-model="chartSearch2.type" size="small"> + <el-cascader :teleported="false" v-model="chartSearch2.searchDep" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/> + <el-select v-model="chartSearch2.type" size="small" :teleported="false"> <el-option v-for="item in workType1" :key="item.id" @@ -42,7 +53,7 @@ <div class="chart-tit"> <span class="tit">关联作业趋势图</span> <div class="filter-part filter-part2"> - <el-cascader v-model="chartSearch3.searchDep" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/> + <el-cascader :teleported="false" v-model="chartSearch3.searchDep" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/> </div> </div> <div class="chart" :id="zyqs"></div> @@ -58,13 +69,13 @@ active-text="作业人" inactive-text="监护人" /> - <el-select v-model="chartSearch4.period" size="small"> + <el-select :teleported="false" v-model="chartSearch4.period" size="small"> <el-option label="近7天" value="week"/> <el-option label="近30天" value="month"/> <el-option label="近90天" value="season"/> <el-option label="近1年" value="year"/> </el-select> - <el-select v-model="chartSearch4.workType" size="small"> + <el-select :teleported="false" v-model="chartSearch4.workType" size="small"> <el-option v-for="item in workType1" :key="item.id" @@ -72,21 +83,21 @@ :value="item.id" /> </el-select> - <el-button type="text" size="small">所有记录>></el-button> </div> </div> <div class="chart"> - <el-table ref="multipleTableRef" :data="warningData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }"> - <el-table-column property="name" label="姓名" width="180" align="center"/> + <el-table ref="multipleTableRef" :data="warningData" style="width: 100%" stripe border :header-cell-style="{ background: '#fafafa' }"> + <el-table-column property="name" label="姓名" align="center"/> <el-table-column property="dep" label="所属部门" align="center"/> <el-table-column property="warning" label="异常报警次数" align="center"/> <el-table-column property="role" label="角色" align="center"/> - <el-table-column property="isCard" label="是否持证" align="center" width="180"> + <el-table-column property="isCard" label="是否持证" align="center"> <template #default="scope"> <span>{{scope.row.isCard == 1?'是':'否'}}</span> </template> </el-table-column> </el-table> + <el-button type="text" size="small" style="margin-top: 10px">所有记录>></el-button> </div> <!-- <div class="chart" :id="slfx"></div>--> </div> @@ -97,7 +108,7 @@ <el-col :span="5" style="display:flex;align-items: center"> <span style="white-space: nowrap">作业类型:</span> <div class="grid-content topInfo"> - <el-select v-model="searchWord" size="small"> + <el-select :teleported="false" v-model="searchWord" size="small"> <el-option v-for="item in workType" :key="item.id" @@ -110,7 +121,7 @@ <el-col :span="5" style="display:flex;align-items: center"> <span style="white-space: nowrap">作业状态:</span> <div class="grid-content topInfo"> - <el-select v-model="searchStatus" size="small"> + <el-select :teleported="false" v-model="searchStatus" size="small"> <el-option v-for="item in workStatus" :key="item.value" @@ -123,7 +134,7 @@ <el-col :span="5" style="display:flex;align-items: center"> <span style="white-space: nowrap">作业部门:</span> <div class="grid-content topInfo"> - <el-cascader size="small" v-model="searchDep" :options="departmentList" :props="casProps" :show-all-levels="false"/> + <el-cascader :teleported="false" size="small" v-model="searchDep" :options="departmentList" :props="casProps" :show-all-levels="false"/> </div> </el-col> <el-col :span="6" style="display:flex;align-items: center;"> @@ -132,6 +143,7 @@ <el-date-picker v-model="searchDate" size="small" + :teleported="false" type="daterange" unlink-panels range-separator="至" @@ -167,9 +179,9 @@ <el-button type="primary" :icon="Refresh" size="default" @click="reLoadData()" /> </el-col> </el-row> - <el-table ref="multipleTableRef" :data="workData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }"> - <el-table-column property="num" label="作业证编号" width="180" align="center"/> - <el-table-column property="dep" label="部门" align="center"/> + <el-table ref="multipleTableRef" stripe border :data="workData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }"> + <el-table-column property="num" label="作业证编号" align="center"/> + <el-table-column property="dep" label="部门" align="center"/> <el-table-column property="applyer" label="申请人" align="center"/> <el-table-column property="worker" label="作业人" align="center"/> <el-table-column property="type" label="作业类型" align="center"/> @@ -190,7 +202,7 @@ </el-table-column> <el-table-column property="message" label="报警信息" align="center"> <template #default="scope"> - <el-button type="text" size="small" v-if="scope.row.message == 1">查看报警信息</el-button> + <el-button type="text" size="small" v-if="scope.row.message == 1">查看</el-button> <span v-else>无</span> </template> </el-table-column> @@ -198,7 +210,7 @@ <template #default="scope"> <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看作业票</el-button> <el-button link type="primary" size="small" :icon="FolderChecked" @click="handleReview(scope.row)">验收</el-button> - <el-button link type="primary" size="small" :icon="FolderChecked" @click="handleReview(scope.row)">查看实时监控</el-button> + <el-button link type="primary" size="small" :icon="VideoPlay" @click="openVideo(scope.row)">查看实时监控</el-button> </template> </el-table-column> </el-table> @@ -242,6 +254,7 @@ </span> </template> </el-dialog> + <video-detail ref="videoRef"></video-detail> </div> </template> @@ -252,8 +265,9 @@ import { useUserInfo } from '/@/stores/userInfo'; import { Session } from '/@/utils/storage'; import { useRouter } from 'vue-router'; -import { Edit, View, Plus, Delete, Refresh, Search, Finished, Download, FolderChecked } from '@element-plus/icons-vue'; +import { Edit, View, Plus, Delete, Refresh, Search, Finished, Download, FolderChecked, VideoPlay } from '@element-plus/icons-vue'; import { ElTable, ElMessage } from 'element-plus'; +import { specialIndexApi } from '/@/api/specialWorkSystem/specialIndex'; import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; import type { TabsPaneContext } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus' @@ -261,6 +275,8 @@ import Cookies from 'js-cookie'; import axios from 'axios'; import * as echarts from "echarts"; +import screenfull from "screenfull"; +import VideoDetail from "/@/views/specialWorkSystem/specialIndex/components/videoDetail.vue"; // 定义接口来定义对象的类型 interface stateType { @@ -294,6 +310,8 @@ reviewForm: object; reviewRules: object; warningData: Array<any>; + isFull:boolean; + themeColor:string } interface type { id: number; @@ -315,6 +333,7 @@ export default defineComponent({ name: 'specialIndex', components: { + VideoDetail, fire: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/fireLog.vue')), space: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/spaceLog.vue')), hoist: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/wdsq/components/hoistLog.vue')), @@ -332,6 +351,7 @@ const zyfb = ref("eChartZyfb" + Date.now() + Math.random()) const slfx = ref("eChartSlfx" + Date.now() + Math.random()) const zyqs = ref("eChartZyqs" + Date.now() + Math.random()) + const videoRef = ref(); const state = reactive<stateType>({ pageIndex1: 1, pageSize1: 10, @@ -345,6 +365,8 @@ searchStatus: null, chartSearch1: { searchDep: null, + startTime: '2023-03-08', + endTime: '2023-02-08', period: 'month' }, chartSearch2: { @@ -405,8 +427,40 @@ reason: '分析超时', warning: 2, message: 0 + }, + { + num: '222', + dep: '部门2', + applyer: '张凤', + worker: '李羽飞', + type: '动土作业', + level: '一级', + applyTime: '2023-03-08', + startTime: '2023-03-08', + endTime: '2023-03-08', + status: 1, + reason: '分析超时', + warning: 1, + message: 0 + }, + { + num: '333', + dep: '部门3', + applyer: '张凤', + worker: '李羽飞', + type: '动火作业', + level: '一级', + applyTime: '2023-03-08', + startTime: '2023-03-08', + endTime: '2023-03-08', + status: 2, + reason: '分析超时', + warning: 2, + message: 0 } ], + isFull: false, + themeColor: '#333', workTimeList: [], multipleSelection: [], approveInfo: { @@ -475,6 +529,13 @@ warning: 51, role: '监护人', isCard: 0 + }, + { + name: '黄公子', + dep: '有机事业部', + warning: 69, + role: '作业人', + isCard: 1 } ], reviewForm: { @@ -492,7 +553,34 @@ initSlfx() initZyqs() }); - + const toFullscreen =()=>{ + const element = document.getElementById('bigScreen') + if (!screenfull.isEnabled) { + ElMessage.warning('暂不不支持全屏'); + return false; + } + screenfull.toggle(element); + state.isFull = !state.isFull + if(state.isFull == true){ + state.themeColor = '#11FEEE' + }else{ + state.themeColor = '#333' + } + initZyfb() + initSlfx() + initZyqs() + } + const getTypePie = async ()=>{ + let res = await specialIndexApi().analyseType(state.chartSearch1.startTime,state.chartSearch1.endTime,state.chartSearch1.searchDep); + if (res.data.code === '200') { + console.log(res.data,'666666666') + } else { + ElMessage({ + type: 'warning', + message: res.data.msg + }); + } + } type EChartsOption = echarts.EChartsOption const initZyfb =()=>{ let dom = document.getElementById(zyfb.value); @@ -505,7 +593,15 @@ legend: { orient: 'vertical', left: 'left', - top: 'center' + top: 'center', + textStyle: { + // 设置默认的文字颜色 + color: state.themeColor, + fontSize: 12 + }, + itemStyle: { + borderWidth: 0 // 设置图例边框宽度为0 + } }, series: [ { @@ -574,6 +670,9 @@ data: ['事业部1', '事业部2', '事业部3', '事业部4', '事业部5', '事业部6', '事业部7'], axisTick: { alignWithLabel: true + }, + axisLabel: { + color: state.themeColor } } ], @@ -604,7 +703,10 @@ option = { xAxis: { type: 'category', - data: ['四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', '一月', '二月', '三月'] + data: ['四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', '一月', '二月', '三月'], + axisLabel: { + color: state.themeColor + } }, yAxis: { type: 'value' @@ -765,7 +867,9 @@ const handleReview = (row)=>{ state.dialogReview = true } - + const openVideo = ()=>{ + videoRef.value.openDialog() + } const submitReview = async (formEl: FormInstance | undefined) => { if (!formEl) return await formEl.validate((valid, fields) => { @@ -793,11 +897,15 @@ Finished, Download, FolderChecked, + VideoPlay, reviewFormRef, + videoRef, zyfb, slfx, zyqs, + toFullscreen, handleReview, + openVideo, submitReview, reLoadData, toApply, @@ -828,6 +936,15 @@ &::-webkit-scrollbar { display: none; /* Chrome Safari */ } + .full{ + position:fixed; + height: 34px; + line-height: 34px; + top: 80px; + right: 20px; + z-index: 99999; + } + .demo-tabs { width: 100%; height: 100%; @@ -865,12 +982,14 @@ .chart-tit{ width: 100%; + height: 15%; display: flex; align-items: flex-start; justify-content: space-between; .tit{ font-size: 1.33rem; font-weight: bolder; + white-space: nowrap; } .filter-part{ display: flex; @@ -900,7 +1019,59 @@ } .chart{ width: 100%; - height: 88%; + height: 85%; + .el-table{ + height: 90% !important; + :deep(.el-table__inner-wrapper){ + height: 100% !important; + .el-table__header-wrapper { + height: 20% !important; + .el-table__header{ + height: 100% !important; + th{ + height: 100% !important; + padding: 0 0 !important; + .cell{ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + } + .el-table__body-wrapper { + height: 80% !important; + .el-scrollbar__view{ + height: 100% !important; + .el-table__body{ + height: 100% !important; + tbody{ + height: 100% !important; + .el-table__row{ + height: 25% !important; + td{ + height: 25% !important; + padding: 0 0 !important; + .left-info{ + display: flex; + align-items: center; + } + .cell{ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .el-button{ + padding: 0 !important; + } + } + } + } + } + } + } + } + } } .el-radio-group{ width: 20%; @@ -1211,6 +1382,199 @@ } } } + +.container{ + padding: 20px; + background: url('../../../assets/spwbg.png') no-repeat center; + + .full{ + position:fixed; + background: #fff; + border-radius: 17px; + box-shadow: 3px 3px 12px rgba(0,0,0,.2); + height: 34px; + line-height: 34px; + top: 0; + right: 20px; + z-index: 99999; + } + .topChart{ + .chart-item{ + border-radius: 4px; + background: rgba(8, 109, 209, 0.2); + border: 1px solid rgba(54, 252, 252, .6); + backdrop-filter: blur(5px); + position: relative; + z-index: 2; + &:last-of-type{ + position: relative; + z-index: 1; + } + .el-radio.is-bordered.is-checked{ + border-color: #11FEEE !important; + :deep(.el-radio__inner){ + border-color: #11FEEE !important; + background: #11FEEE !important; + } + :deep(.el-radio__label){ + color: #11FEEE !important + } + } + .chart-tit{ + .tit{ + color: #11FEEE; + } + ::v-deep(.el-popper){ + background-color: rgba(10,31,92,1); + border: 1px solid rgba(17,254,238,.4); + color: #11FEEE; + .el-cascader-node{ + .in-active-path{ + background: #0049af; + } + &:hover{ + background: #0049af; + } + } + .el-cascader-node__label{ + color: #11FEEE; + } + .el-icon{ + color: #11FEEE; + } + .el-select-dropdown__item{ + color: #11FEEE; + } + .el-select-dropdown__item.hover{ + background: #0049af; + } + } + ::v-deep(.el-popper__arrow){ + &::before{ + background-color: rgba(10,31,92,.6) !important; + border: 1px solid rgba(17,254,238,.4); + } + } + ::v-deep(.el-input__wrapper){ + box-shadow: none; + border: 1px solid rgba(17,254,238,.2); + background: rgba(10,31,92,.6) !important; + height: 1.5rem; + color: #11FEEE; + + input{ + font-size: 0.8rem; + color: #11FEEE; + } + .el-icon{ + color: #11FEEE; + } + } + } + .chart{ + .el-table { + color: #11FEEE !important; + background-color: rgba(0,0,0,0) !important; + :deep(thead){ + color: #11FEEE !important; + background-color: #092846 !important + } + :deep(tr){ + background-color: rgba(0,0,0,0) !important; + .el-table__cell{ + background-color: rgba(0,0,0,0) !important; + } + } + } + .el-button--text{ + color: #11FEEE; + } + } + } + } + .homeCard{ + border-radius: 4px; + background: rgba(8, 109, 209, 0.2); + border: 1px solid rgba(54, 252, 252, .6); + backdrop-filter: blur(5px); + position: relative; + z-index: 3; + .el-row{ + &>div{ + &>span{ + color: #11FEEE; + } + } + } + :deep(.el-range-separator){ + color: #11FEEE; + } + .el-table { + color: #11FEEE !important; + background-color: rgba(0,0,0,0) !important; + :deep(thead){ + color: #11FEEE !important; + background-color: #092846 !important + } + :deep(tr){ + background-color: rgba(0,0,0,0) !important; + .el-table__cell{ + background-color: rgba(0,0,0,0) !important; + } + .el-table-fixed-column--right{ + background-color: #092846 !important + } + } + } + + ::v-deep(.el-popper){ + background-color: rgba(10,31,92,1); + border: 1px solid rgba(17,254,238,.4); + color: #11FEEE; + .el-cascader-node{ + .in-active-path{ + background: #0049af; + } + &:hover{ + background: #0049af; + } + } + .el-cascader-node__label{ + color: #11FEEE; + } + .el-icon{ + color: #11FEEE; + } + .el-select-dropdown__item{ + color: #11FEEE; + } + .el-select-dropdown__item.hover{ + background: #0049af; + } + } + ::v-deep(.el-popper__arrow){ + &::before{ + background-color: rgba(10,31,92,.6) !important; + border: 1px solid rgba(17,254,238,.4); + } + } + ::v-deep(.el-input__wrapper){ + box-shadow: none; + border: 1px solid rgba(17,254,238,.2); + background: rgba(10,31,92,.6) !important; + height: 1.5rem; + color: #11FEEE; + + input{ + font-size: 0.8rem; + color: #11FEEE; + } + .el-icon{ + color: #11FEEE; + } + } + } +} .el-card { border: 0; } -- Gitblit v1.9.2