From baf475f44f0a940bbdc2dde36fff9cdf97da58bc Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期四, 17 八月 2023 16:43:28 +0800
Subject: [PATCH] 证书修改
---
src/views/intellectInspect/inspectIndex/index.vue | 116 +++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 99 insertions(+), 17 deletions(-)
diff --git a/src/views/intellectInspect/inspectIndex/index.vue b/src/views/intellectInspect/inspectIndex/index.vue
index ce2d582..43b8aae 100644
--- a/src/views/intellectInspect/inspectIndex/index.vue
+++ b/src/views/intellectInspect/inspectIndex/index.vue
@@ -13,28 +13,33 @@
<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>
@@ -206,6 +211,7 @@
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>;
@@ -223,12 +229,17 @@
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;
@@ -256,8 +267,10 @@
unusualData: [],
unchecked: null,
unusual: null,
- chartStatus: true,
- period: 'month',
+ searchQuery:{
+ regionType: 2,
+ timeType: 2,
+ },
uncheckedList: [],
abnormalList: [],
workTypeList: [
@@ -272,6 +285,32 @@
{ 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: [],
@@ -289,10 +328,12 @@
// 页面载入时执行方法
onMounted(() => {
+ // getDepartmentData();
+ // getCountExcepOrder();
+ // getPieCountExcepOrder();
getInspectRecord();
getListExcepOrder();
getDayData();
- getDepartmentData();
initXjLine()
initSbtj()
});
@@ -310,6 +351,28 @@
}
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(
@@ -597,6 +660,14 @@
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',
@@ -743,6 +814,21 @@
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;
@@ -802,10 +888,6 @@
.tit{
font-size: 20px;
font-weight: bolder;
- }
- :deep(.el-switch__core){
- width: 120px;
-
}
.top-info {
display: flex;
--
Gitblit v1.9.2