| | |
| | | <div class="chart-item"> |
| | | <div class="chart-tit"> |
| | | <span class="tit">年度巡检异常趋势</span> |
| | | <div class="filter-part"> |
| | | <el-cascader v-model="searchDepId" :options="depList" :props="casProps" :show-all-levels="false" size="small"/> |
| | | </div> |
| | | </div> |
| | | <div class="chart" :id="xjLine"></div> |
| | | </div> |
| | | <div class="chart-item"> |
| | | <div class="chart-tit"> |
| | | <span class="tit">异常区域设备统计</span> |
| | | <div class="filter-part"> |
| | | <div class="filter-part2"> |
| | | <el-switch |
| | | v-model="chartStatus" |
| | | v-model="searchQuery.regionType" |
| | | inline-prompt |
| | | style="--el-switch-on-color: #13ce66; --el-switch-off-color: #13ce66" |
| | | active-text="区域" |
| | | inactive-text="设备" |
| | | :active-value="2" |
| | | :inactive-value="3" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="chart" :id="sbtj"></div> |
| | | <el-radio-group v-model="period" size="small"> |
| | | <el-radio border label="week">近7天</el-radio> |
| | | <el-radio border label="month">近30天</el-radio> |
| | | <el-radio border label="season">近90天</el-radio> |
| | | <el-radio border label="year">近一年</el-radio> |
| | | <el-radio-group v-model="searchQuery.timeType" size="small"> |
| | | <el-radio border :label="1">近7天</el-radio> |
| | | <el-radio border :label="2">近30天</el-radio> |
| | | <el-radio border :label="3">近90天</el-radio> |
| | | <el-radio border :label="4">近一年</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </div> |
| | |
| | | import { departmentApi } from '/@/api/systemManage/department'; |
| | | import screenfull from "screenfull"; |
| | | import { BorderBox10 as DvBorderBox10 } from '@kjgl77/datav-vue3' |
| | | import {specialIndexApi} from "/@/api/specialWorkSystem/specialIndex"; |
| | | // 定义接口来定义对象的类型 |
| | | interface stateType { |
| | | tableData: Array<string>; |
| | |
| | | classGroupList: Array<classGroup>; |
| | | quotaList: []; |
| | | inspectPointAllList: []; |
| | | chartStatus:boolean; |
| | | period: string; |
| | | searchQuery:{ |
| | | regionType:number; |
| | | timeType: number; |
| | | } |
| | | dialogVisible:boolean; |
| | | workNum: string; |
| | | beImgs: []; |
| | | afImgs: [] |
| | | afImgs: []; |
| | | searchDepId: number|null |
| | | depList: Array<any> |
| | | casProps:object |
| | | } |
| | | interface type { |
| | | id: number; |
| | |
| | | unusualData: [], |
| | | unchecked: null, |
| | | unusual: null, |
| | | chartStatus: true, |
| | | period: 'month', |
| | | searchQuery:{ |
| | | regionType: 2, |
| | | timeType: 2, |
| | | }, |
| | | uncheckedList: [], |
| | | abnormalList: [], |
| | | workTypeList: [ |
| | |
| | | { id: 4, name: '月' }, |
| | | { id: 5, name: '年' } |
| | | ], |
| | | searchDepId: null, |
| | | depList: [ |
| | | { |
| | | name: '电石事业部', |
| | | depId: 49 |
| | | }, |
| | | { |
| | | name: '电力事业部', |
| | | id: 50 |
| | | }, |
| | | { |
| | | name: '有机化工事业部', |
| | | id: 48 |
| | | }, |
| | | { |
| | | name: '甲醇事业部', |
| | | id: 32 |
| | | } |
| | | ], |
| | | casProps: { |
| | | expandTrigger: 'hover', |
| | | emitPath: false, |
| | | value: 'depId', |
| | | label: 'name', |
| | | checkStrictly: true |
| | | }, |
| | | classGroupList: [], |
| | | quotaList: [], |
| | | inspectPointAllList: [], |
| | |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | // getDepartmentData(); |
| | | // getCountExcepOrder(); |
| | | // getPieCountExcepOrder(); |
| | | getInspectRecord(); |
| | | getListExcepOrder(); |
| | | getDayData(); |
| | | getDepartmentData(); |
| | | initXjLine() |
| | | initSbtj() |
| | | }); |
| | |
| | | } |
| | | const checkAllList =()=>{ |
| | | unusualListRef.value.showUnusualList() |
| | | } |
| | | const getCountExcepOrder = async ()=>{ |
| | | let res = await inspectIndexApi().getCountExcepOrder({depId: state.searchDepId}); |
| | | if (res.data.code === '200') { |
| | | console.log('折线图趋势数据>>>', res.data.data) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | const getPieCountExcepOrder = async ()=>{ |
| | | let res = await inspectIndexApi().getPieCountExcepOrder(state.searchQuery); |
| | | if (res.data.code === '200') { |
| | | console.log('饼状图趋势数据>>>', res.data.data) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | const acceptance =(row:object)=>{ |
| | | ElMessageBox.confirm( |
| | |
| | | let res = await departmentApi().getDepartmentList(); |
| | | if (res.data.code === '200') { |
| | | state.departmentList = res.data.data; |
| | | const newList = [] |
| | | for(let i of state.departmentList[0].children){ |
| | | if(i.depId == 32 || i.depId == 48 ||i.depId == 49 || i.depId == 50){ |
| | | newList.push(i) |
| | | } |
| | | } |
| | | state.depList = newList |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | :deep(.el-cascader){ |
| | | width: 100% !important; |
| | | } |
| | | .el-switch{ |
| | | width: 100% !important; |
| | | :deep(.el-switch__core){ |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .filter-part2{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | width: 20%; |
| | | .el-switch{ |
| | | width: 100% !important; |
| | |
| | | .tit{ |
| | | font-size: 20px; |
| | | font-weight: bolder; |
| | | } |
| | | :deep(.el-switch__core){ |
| | | width: 120px; |
| | | |
| | | } |
| | | .top-info { |
| | | display: flex; |