| | |
| | | <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" |
| | | inline-prompt |
| | |
| | | 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>; |
| | |
| | | dialogVisible:boolean; |
| | | workNum: string; |
| | | beImgs: []; |
| | | afImgs: [] |
| | | afImgs: []; |
| | | searchDepId: number|null |
| | | depList: Array<any> |
| | | casProps:object |
| | | } |
| | | interface type { |
| | | id: number; |
| | |
| | | { 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: 'depName', |
| | | checkStrictly: true |
| | | }, |
| | | classGroupList: [], |
| | | quotaList: [], |
| | | inspectPointAllList: [], |
| | |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | getDepartmentData(); |
| | | getCountExcepOrder(); |
| | | 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 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 |
| | | console.log(state.depList,'3434') |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | .el-select{ |
| | | width: 50% !important; |
| | | margin-left: 10px; |
| | | } |
| | | .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; |