From b20332f8302295b93b55bf5f29cc5d639aa67600 Mon Sep 17 00:00:00 2001 From: batman <978517621@qq.com> Date: 星期四, 09 三月 2023 10:16:16 +0800 Subject: [PATCH] 新修改添加页面 --- src/views/intellectInspect/inspectIndex2/index.vue | 570 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 334 insertions(+), 236 deletions(-) diff --git a/src/views/intellectInspect/inspectIndex2/index.vue b/src/views/intellectInspect/inspectIndex2/index.vue index 83c0fd9..00200da 100644 --- a/src/views/intellectInspect/inspectIndex2/index.vue +++ b/src/views/intellectInspect/inspectIndex2/index.vue @@ -1,5 +1,19 @@ <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 style="height: 100%"> <div class="topChart"> <div class="chart-item"> @@ -64,54 +78,54 @@ </div> </div> <div class="chart"> -<!-- <el-table :data="tableData" style="width: 100%" stripe border>--> -<!-- <el-table-column label="任务信息" align="center">--> -<!-- <template #default="scope">--> -<!-- <div class="left-info">--> -<!-- <span>{{ scope.row.taskName }},</span>--> -<!-- <p v-if="scope.row.execUserName == null">该任务暂无人认领</p>--> -<!-- <p v-else>--> -<!-- <span class="time">{{ scope.row.taskStatus == 2 ? scope.row.startTime : scope.row.endTime }}</span>由<span class="name">{{ scope.row.execUserName }}</span>进行的巡检任务--> -<!-- </p>--> -<!-- </div>--> -<!-- </template>--> -<!-- </el-table-column>--> -<!-- <el-table-column prop="taskStatus" label="任务状态" align="center" width="180">--> -<!-- <template #default="scope">--> -<!-- <span :class="scope.row.taskStatus == 1 ? 'grey' : scope.row.taskStatus == 2 ? 'green' : scope.row.taskStatus == 3 ? 'blue' : 'red'">{{ scope.row.taskStatus == 1 ? '待巡检' : scope.row.taskStatus == 2 ? '巡检中' : scope.row.taskStatus == 3 ? '已巡检' : '超期未巡检' }}</span>--> -<!-- </template>--> -<!-- </el-table-column>--> -<!-- <el-table-column label="操作" align="center" width="180">--> -<!-- <template #default="scope">--> -<!-- <el-button type="text" v-if="scope.row.taskStatus == 2" @click="toLine(scope.row)" class="checkBtn">查看实时巡检</el-button>--> -<!-- <el-button type="text" v-else class="reviewBtn" @click="toDetails('查看', scope.row)">查看巡检记录</el-button>--> -<!-- </template>--> -<!-- </el-table-column>--> -<!-- </el-table>--> - <div class="list"> - <div class="list-tit"> - <span class="w60">任务信息</span> - <span class="w20">任务状态</span> - <span class="w20">操作</span> - </div> - <div class="cardTop" v-for="(item, index) in tableData" :key="index"> - <div class="l-info"> - <span class="place">{{ item.taskName }},</span> - <p v-if="item.execUserName == null">该任务暂无人认领</p> - <p v-else> - <span class="time">{{ item.taskStatus == 2 ? item.startTime : item.endTime }}</span>由<span class="name">{{ item.execUserName }}</span - >进行的巡检任务 - </p> - </div> - <div class="m-info"> - 任务状态:<span :class="item.taskStatus == 1 ? 'grey' : item.taskStatus == 2 ? 'green' : item.taskStatus == 3 ? 'blue' : 'red'">{{ item.taskStatus == 1 ? '待巡检' : item.taskStatus == 2 ? '巡检中' : item.taskStatus == 3 ? '已巡检' : '超期未巡检' }}</span> - </div> - <div class="r-info"> - <el-button type="text" v-if="item.taskStatus == 2" @click="toLine(item)" size="small">查看实时巡检</el-button> - <el-button type="text" v-else class="reviewBtn" @click="toDetails('查看', item)" size="small">查看巡检记录</el-button> - </div> - </div> - </div> + <el-table :data="tableData" stripe border :header-cell-style="isFull==true?{background: none}:{ background: '#fafafa' }"> + <el-table-column label="任务信息" align="center"> + <template #default="scope"> + <div class="left-info"> + <span>{{ scope.row.taskName }},</span> + <p v-if="scope.row.execUserName == null">该任务暂无人认领</p> + <p v-else> + <span class="time">{{ scope.row.taskStatus == 2 ? scope.row.startTime : scope.row.endTime }}</span>由<span class="name">{{ scope.row.execUserName }}</span>进行的巡检任务 + </p> + </div> + </template> + </el-table-column> + <el-table-column prop="taskStatus" label="任务状态" align="center" width="180"> + <template #default="scope"> + <span :class="scope.row.taskStatus == 1 ? 'grey' : scope.row.taskStatus == 2 ? 'green' : scope.row.taskStatus == 3 ? 'blue' : 'red'">{{ scope.row.taskStatus == 1 ? '待巡检' : scope.row.taskStatus == 2 ? '巡检中' : scope.row.taskStatus == 3 ? '已巡检' : '超期未巡检' }}</span> + </template> + </el-table-column> + <el-table-column label="操作" align="center" width="180"> + <template #default="scope"> + <el-button type="text" size="small" v-if="scope.row.taskStatus == 2" @click="toLine(scope.row)" class="checkBtn">查看实时巡检</el-button> + <el-button type="text" size="small" v-else class="reviewBtn" @click="toDetails('查看', scope.row)">查看巡检记录</el-button> + </template> + </el-table-column> + </el-table> +<!-- <div class="list">--> +<!-- <div class="list-tit">--> +<!-- <span class="w60">任务信息</span>--> +<!-- <span class="w20">任务状态</span>--> +<!-- <span class="w20">操作</span>--> +<!-- </div>--> +<!-- <div class="cardTop" v-for="(item, index) in tableData" :key="index">--> +<!-- <div class="l-info">--> +<!-- <span class="place">{{ item.taskName }},</span>--> +<!-- <p v-if="item.execUserName == null">该任务暂无人认领</p>--> +<!-- <p v-else>--> +<!-- <span class="time">{{ item.taskStatus == 2 ? item.startTime : item.endTime }}</span>由<span class="name">{{ item.execUserName }}</span--> +<!-- >进行的巡检任务--> +<!-- </p>--> +<!-- </div>--> +<!-- <div class="m-info">--> +<!-- 任务状态:<span :class="item.taskStatus == 1 ? 'grey' : item.taskStatus == 2 ? 'green' : item.taskStatus == 3 ? 'blue' : 'red'">{{ item.taskStatus == 1 ? '待巡检' : item.taskStatus == 2 ? '巡检中' : item.taskStatus == 3 ? '已巡检' : '超期未巡检' }}</span>--> +<!-- </div>--> +<!-- <div class="r-info">--> +<!-- <el-button type="text" v-if="item.taskStatus == 2" @click="toLine(item)" size="small">查看实时巡检</el-button>--> +<!-- <el-button type="text" v-else class="reviewBtn" @click="toDetails('查看', item)" size="small">查看巡检记录</el-button>--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> <!-- <div class="pageBtn">--> <!-- <el-pagination v-model:currentPage="pageIndex" v-model:page-size="pageSize" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize" @size-change="handleSizeChange" @current-change="handleCurrentChange" />--> <!-- </div>--> @@ -127,39 +141,25 @@ </div> </div> <div class="chart"> - <div class="list"> - <div class="list-tit"> - <span class="w10">工单编号</span> - <span class="w10">异常巡检点</span> - <span class="w10">巡检(发现)时间</span> - <span class="w10">所属巡检任务</span> - <span class="w10">设备/区域名称</span> - <span class="w10">正常参考值</span> - <span class="w10">实际巡检值</span> - <span class="w10">隐患处置人</span> - <span class="w10">电话</span> - <span class="w10">处置状态</span> - <span class="w10">处置描述反馈</span> - <span class="w15">操作</span> - </div> - <div class="cardTop" v-for="(item, index) in unusualData" :key="index"> - <span class="w10">{{item.num}}</span> - <span class="w10">{{item.spot}}</span> - <span class="w10">{{item.time}}</span> - <span class="w10">{{item.job}}</span> - <span class="w10">{{item.area}}</span> - <span class="w10">{{item.refer}}</span> - <span class="w10">{{item.real}}</span> - <span class="w10">{{item.name}}</span> - <span class="w10">{{item.phone}}</span> - <span class="w10">{{item.status}}</span> - <span class="w10">{{item.describe}}</span> - <span class="w15"> - <el-button type="text" @click="toLine(item)" size="small">验收</el-button> - <el-button type="text" @click="toPhotos('查看', item)" size="small">查看现场照片</el-button> - </span> - </div> - </div> + <el-table :data="unusualData" stripe border :header-cell-style="isFull==true?{background: none}:{ background: '#fafafa' }"> + <el-table-column prop="num" label="工单编号" align="center"/> + <el-table-column prop="spot" label="异常巡检点" align="center"/> + <el-table-column prop="time" label="巡检(发现)时间" align="center"/> + <el-table-column prop="job" label="所属巡检任务" align="center"/> + <el-table-column prop="area" label="设备/区域名称" align="center"/> + <el-table-column prop="refer" label="正常参考值" align="center"/> + <el-table-column prop="real" label="实际巡检值" align="center"/> + <el-table-column prop="name" label="隐患处置人" align="center"/> + <el-table-column prop="phone" label="电话" align="center"/> + <el-table-column prop="status" label="处置状态" align="center"/> + <el-table-column prop="describe" label="处置描述反馈" align="center"/> + <el-table-column label="操作" align="center" width="180" fixed="right"> + <template #default="scope"> + <el-button type="text" size="small" class="checkBtn">验收</el-button> + <el-button type="text" size="small" class="reviewBtn">查看现场照片</el-button> + </template> + </el-table-column> + </el-table> <!-- <div class="pageBtn">--> <!-- <el-pagination v-model:currentPage="pageIndex" v-model:page-size="pageSize" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize" @size-change="handleSizeChange" @current-change="handleCurrentChange" />--> <!-- </div>--> @@ -189,6 +189,7 @@ import inspectList from './components/inspectList.vue'; import unusualList from './components/unusualList.vue'; import { departmentApi } from '/@/api/systemManage/department'; +import screenfull from "screenfull"; // 定义接口来定义对象的类型 interface stateType { tableData: Array<string>; @@ -207,7 +208,9 @@ quotaList: []; inspectPointAllList: []; chartStatus:boolean; - period: string + period: string; + isFull:boolean; + themeColor:string } interface type { id: number; @@ -225,8 +228,10 @@ const xjLine = ref("eChartXjLine" + Date.now() + Math.random()) const sbtj = ref("eChartSbtj" + Date.now() + Math.random()) const state = reactive<stateType>({ + isFull: false, + themeColor: '#333', pageIndex: 1, - pageSize: 4, + pageSize: 5, totalSize: 0, tableData: [], unusualData: [ @@ -323,6 +328,23 @@ initXjLine() initSbtj() }); + const toFullscreen =()=>{ + state.isFull = !state.isFull + if(state.isFull == true){ + state.themeColor = '#11FEEE' + }else{ + state.themeColor = '#333' + } + initXjLine() + initSbtj() + console.log(state.isFull,'quanp',state.themeColor) + const element = document.getElementById('bigScreen') + if (!screenfull.isEnabled) { + ElMessage.warning('暂不不支持全屏'); + return false; + } + screenfull.toggle(element); + } const checkAllRecord =()=>{ inspectListRef.value.departmentList = state.departmentList inspectListRef.value.showInspectList() @@ -346,7 +368,12 @@ height: '15%', top: 0, bottom: 0, - padding:[1,1,1,0] + padding:[1,1,1,0], + textStyle: { + // 设置默认的文字颜色 + color: state.themeColor, + fontSize: 12 + }, }, grid: { top: '15%', @@ -363,7 +390,10 @@ xAxis: { type: 'category', boundaryGap: false, - data: ['四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', '一月', '二月', '三月'] + data: ['四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', '一月', '二月', '三月'], + axisLabel: { + color: state.themeColor + } }, yAxis: { type: 'value' @@ -428,7 +458,15 @@ legend: { orient: 'vertical', left: 'left', - top: 'center' + top: 'center', + textStyle: { + // 设置默认的文字颜色 + color: state.themeColor, + fontSize: 12 + }, + itemStyle: { + borderWidth: 0 // 设置图例边框宽度为0 + } }, series: [ { @@ -557,6 +595,7 @@ inspectRecordDialogRef, inspectListRef, unusualListRef, + toFullscreen, checkAllRecord, checkAllList, toLine, @@ -586,7 +625,14 @@ height: calc(100vh - 144px); box-sizing: border-box; overflow: hidden; - + .full{ + position:fixed; + height: 34px; + line-height: 34px; + top: 80px; + right: 20px; + z-index: 99999; + } .topChart{ width: 100%; height: calc((100% - 40px) / 3); @@ -731,168 +777,56 @@ height: 100% !important; :deep(.el-table__inner-wrapper){ height: 100% !important; - .el-table__header-wrapper{ + .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{ + .el-table__body-wrapper { height: 80% !important; .el-scrollbar__view{ height: 100% !important; .el-table__body{ height: 100% !important; - - .el-table__row{ - height: 20% !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; + } + } + } } } } + } } } - .list { - height: 100%; - margin-top: 10px; - border: 1px solid #ebeef5; - .list-tit{ - width: 100%; - height: 20%; - display: flex; - align-items: center; - border-bottom: 1px solid #ebeef5; - - span{ - text-align: center; - padding: 10px 0; - } - - .w60{ - width: 60%; - border-right: 1px solid #ebeef5; - } - .w20{ - width: 20%; - border-right: 1px solid #ebeef5; - - &:last-of-type{ - border-right: none; - } - } - .w15{ - width: 15%; - border-right: 1px solid #ebeef5; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .w10{ - width: 10%; - border-right: 1px solid #ebeef5; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - } - - .cardTop { - display: flex; - width: 100%; - height: 20%; - align-items: center; - border-bottom: 1px solid #ebeef5; - - &:last-of-type{ - border-bottom: none; - } - span{ - text-align: center; - padding: 10px 0; - } - .l-info{ - width: 60%; - height: 100%; - border-right: 1px solid #ebeef5; - display: flex; - align-items: center; - padding: 0 20px; - - .num { - font-weight: bolder; - margin-right: 10px; - } - .place { - font-weight: bolder; - } - .time { - font-weight: bolder; - margin-right: 5px; - } - .name { - font-weight: bolder; - margin: 0 5px; - font-weight: bolder; - } - } - .m-info{ - height: 100%; - width: 20%; - display: flex; - align-items: center; - border-right: 1px solid #ebeef5; - justify-content: center; - - span { - font-weight: bolder; - } - - .grey { - color: #999; - } - .green { - color: #44b100; - } - .blue { - color: #409eff; - } - .red { - color: red; - } - } - .r-info{ - width: 20%; - text-align: center; - - .reviewBtn { - color: #44b100; - } - } - .w10{ - width: 10%; - border-right: 1px solid #ebeef5; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .w15{ - width: 15%; - border-right: 1px solid #ebeef5; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - .el-button{ - margin-left: 0 !important; - padding: 12px 0; - &:last-of-type{ - margin-left: 12px !important; - } - } - } - } - } .pageBtn { position: absolute; bottom: 15px; @@ -926,6 +860,170 @@ } } } +.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__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; + } + :deep(tr){ + background-color: rgba(0,0,0,0) !important; + .el-table__cell{ + background-color: rgba(0,0,0,0) !important; + } + } + } + } + } + } + .midChart{ + 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; + .tit{ + color: #11FEEE; + } + .el-table { + color: #11FEEE !important; + background-color: rgba(0,0,0,0) !important; + :deep(thead){ + color: #11FEEE !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__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-input { width: 100% !important; } -- Gitblit v1.9.2