|
|
|
@ -3,14 +3,15 @@ |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="24" :xs="24"> |
|
|
|
|
<el-form :model="filterForm" ref="queryRef" :inline="true" label-width="68px"> |
|
|
|
|
<el-form-item label="能源类型" prop="week"> |
|
|
|
|
<el-select v-model="filterForm.type" placeholder="请选择" style="width: 240px"> |
|
|
|
|
<el-option label="电" value="1" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="能源类型" prop="week">--> |
|
|
|
|
<!-- <el-select v-model="filterForm.type" placeholder="请选择" style="width: 240px">--> |
|
|
|
|
<!-- <el-option label="电" value="1" />--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<el-form-item label="耗能设备" prop="week"> |
|
|
|
|
<el-select v-model="filterForm.dev" placeholder="请选择" style="width: 240px"> |
|
|
|
|
<el-option label="电热锅炉" value="1" /> |
|
|
|
|
<el-select v-model="filterForm.dev" placeholder="请选择" @change="handleDevChange" style="width: 240px"> |
|
|
|
|
<el-option label="所有" value="0" /> |
|
|
|
|
<el-option label="电磁锅炉" value="1" /> |
|
|
|
|
<el-option label="蓄热锅炉" value="2" /> |
|
|
|
|
<el-option label="风机盘管" value="3" /> |
|
|
|
|
<el-option label="空气源热泵" value="4" /> |
|
|
|
@ -20,7 +21,9 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="时段" style="width: 308px;"> |
|
|
|
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> |
|
|
|
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" |
|
|
|
|
range-separator="-" start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期"></el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
|
@ -29,20 +32,20 @@ |
|
|
|
|
</el-form> |
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button class="my-btn btn1" type="primary" :class="{ active: activeIndex === 0 }" @click="handleHour">时</el-button> |
|
|
|
|
<el-button class="my-btn btn2" type="primary" :class="{ active: activeIndex === 1 }" @click="handleDay">日</el-button> |
|
|
|
|
<el-button class="my-btn btn3" type="primary" :class="{ active: activeIndex === 2 }" @click="handleMonth">月</el-button> |
|
|
|
|
<el-button class="my-btn btn1" type="primary" :class="{ active: activeIndex === 1 }" @click="handleHour">时</el-button> |
|
|
|
|
<el-button class="my-btn btn2" type="primary" :class="{ active: activeIndex === 2 }" @click="handleDay">日</el-button> |
|
|
|
|
<el-button class="my-btn btn3" type="primary" :class="{ active: activeIndex === 3 }" @click="handleMonth">月</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<div class="dev_control_table"> |
|
|
|
|
<el-table :data="dataTable" height="690px"> |
|
|
|
|
<el-table-column label="序号" align="center" width="50" fixed/> |
|
|
|
|
<el-table-column label="耗能设备" align="center" prop="dev" width="120" fixed/> |
|
|
|
|
<el-table-column label="日期" align="center" prop="date" width="150" fixed/> |
|
|
|
|
<el-table-column v-for="item in theadList" :key="item.prop" :prop="item.prop" :label="item.label" :fixed="item.fixed"/> |
|
|
|
|
<el-table-column label="耗能设备" align="center" prop="deviceName" width="150" fixed/> |
|
|
|
|
<!-- <el-table-column label="日期" align="center" prop="dayDate" width="150" fixed/>--> |
|
|
|
|
<el-table-column v-for="item in theadList" :key="item.prop" :prop="item.prop" :label="item.label" :fixed="item.fixed" :width="item.width" align="center"/> |
|
|
|
|
<el-table-column label="操作" fixed="right"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<el-button type="primary" size="small" :icon="Histogram" @click="handleChart">图表</el-button> |
|
|
|
|
<el-button type="primary" size="small" :icon="Histogram" @click="handleChart(scope)">图表</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -54,7 +57,7 @@ |
|
|
|
|
:disabled="disabled" |
|
|
|
|
:background="background" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="dataTable.length" |
|
|
|
|
:total="total" |
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
@current-change="handleCurrentChange"/> |
|
|
|
|
</div> |
|
|
|
@ -68,176 +71,360 @@ |
|
|
|
|
<div class="chartBox"> |
|
|
|
|
<div id="chart"></div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-button class="floatRight" @click=close>关闭</el-button> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup name="Index"> |
|
|
|
|
import {Delete,Histogram} from '@element-plus/icons-vue' |
|
|
|
|
import {ref,reactive} from "vue"; |
|
|
|
|
import {ref, reactive, onMounted, watch,onBeforeUnmount} from "vue"; |
|
|
|
|
import {getTable} from '@/api/analyse/nhtj/nhtj' |
|
|
|
|
import * as echarts from "echarts"; |
|
|
|
|
|
|
|
|
|
/** 页面加载时*/ |
|
|
|
|
onMounted(()=>{ |
|
|
|
|
formattedDateFun(); |
|
|
|
|
getTableFun(); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 格式化日期*/ |
|
|
|
|
const YYYYMMDD = ref(); |
|
|
|
|
const timer = ref() |
|
|
|
|
function formattedDateFun(){ |
|
|
|
|
let date = new Date() |
|
|
|
|
let year = date.getFullYear() |
|
|
|
|
let month = (date.getMonth()+1).toString().padStart(2, '0'); |
|
|
|
|
let day = date.getDate().toString().padStart(2, '0'); |
|
|
|
|
let hours = date.getHours() |
|
|
|
|
let minutes = date.getMinutes() |
|
|
|
|
let seconds = date.getSeconds() |
|
|
|
|
YYYYMMDD.value = `${year}-${month}-${day}` |
|
|
|
|
timer.value = `${hours}:${minutes}:${seconds}` |
|
|
|
|
console.log(YYYYMMDD.value) |
|
|
|
|
console.log(timer.value) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 筛选处理 */ |
|
|
|
|
const dateRange = ref([]); |
|
|
|
|
const startDate = ref() |
|
|
|
|
const endDate = ref() |
|
|
|
|
const data = reactive({ |
|
|
|
|
filterForm: { |
|
|
|
|
type: '', |
|
|
|
|
dev: '', |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
//监听日期选择 |
|
|
|
|
const wacthSelectDate = watch(()=> dateRange.value,(val) =>{ |
|
|
|
|
console.log(val[0]) |
|
|
|
|
startDate.value = val[0] |
|
|
|
|
console.log(val[1]) |
|
|
|
|
endDate.value = val[1] |
|
|
|
|
}) |
|
|
|
|
//搜索按钮 |
|
|
|
|
function handleQuery(){ |
|
|
|
|
getTableFun() |
|
|
|
|
} |
|
|
|
|
//重置按钮 |
|
|
|
|
function resetQuery(){ |
|
|
|
|
dateRange.value = [] |
|
|
|
|
getTable({ |
|
|
|
|
"timeType":activeIndex.value, |
|
|
|
|
"startTime":'2023-01-01', |
|
|
|
|
"endTime":YYYYMMDD.value, |
|
|
|
|
"pageNum": 1, |
|
|
|
|
"pageSize": 10 |
|
|
|
|
}).then((res)=>{ |
|
|
|
|
total.value = res.total; |
|
|
|
|
dataTable.value = res.rows |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 数据表格处理 */ |
|
|
|
|
//公共表头 |
|
|
|
|
const theadList = ref([ |
|
|
|
|
{prop:'00:00', label:'00:00'}, |
|
|
|
|
{prop:'01:00', label:'01:00'}, |
|
|
|
|
{prop:'02:00', label:'02:00'}, |
|
|
|
|
{prop:'03:00', label:'03:00'}, |
|
|
|
|
{prop:'04:00', label:'04:00'}, |
|
|
|
|
{prop:'05:00', label:'05:00'}, |
|
|
|
|
{prop:'06:00', label:'06:00'}, |
|
|
|
|
{prop:'07:00', label:'07:00'}, |
|
|
|
|
{prop:'08:00', label:'08:00'}, |
|
|
|
|
{prop:'09:00', label:'09:00'}, |
|
|
|
|
{prop:'10:00', label:'10:00'}, |
|
|
|
|
{prop:'11:00', label:'11:00'}, |
|
|
|
|
{prop:'12:00', label:'12:00'}, |
|
|
|
|
{prop:'13:00', label:'13:00'}, |
|
|
|
|
{prop:'14:00', label:'14:00'}, |
|
|
|
|
{prop:'15:00', label:'15:00'}, |
|
|
|
|
{prop:'16:00', label:'16:00'}, |
|
|
|
|
{prop:'17:00', label:'17:00'}, |
|
|
|
|
{prop:'18:00', label:'18:00'}, |
|
|
|
|
{prop:'19:00', label:'19:00'}, |
|
|
|
|
{prop:'20:00', label:'20:00'}, |
|
|
|
|
{prop:'21:00', label:'21:00'}, |
|
|
|
|
{prop:'22:00', label:'22:00'}, |
|
|
|
|
{prop:'23:00', label:'23:00'}, |
|
|
|
|
{prop:'dayDate', label:'日期',fixed:'fixed',width:'120px'}, |
|
|
|
|
{prop:'hour00', label:'00:00'}, |
|
|
|
|
{prop:'hour01', label:'01:00'}, |
|
|
|
|
{prop:'hour02', label:'02:00'}, |
|
|
|
|
{prop:'hour03', label:'03:00'}, |
|
|
|
|
{prop:'hour04', label:'04:00'}, |
|
|
|
|
{prop:'hour05', label:'05:00'}, |
|
|
|
|
{prop:'hour06', label:'06:00'}, |
|
|
|
|
{prop:'hour07', label:'07:00'}, |
|
|
|
|
{prop:'hour08', label:'08:00'}, |
|
|
|
|
{prop:'hour09', label:'09:00'}, |
|
|
|
|
{prop:'hour10', label:'10:00'}, |
|
|
|
|
{prop:'hour11', label:'11:00'}, |
|
|
|
|
{prop:'hour12', label:'12:00'}, |
|
|
|
|
{prop:'hour13', label:'13:00'}, |
|
|
|
|
{prop:'hour14', label:'14:00'}, |
|
|
|
|
{prop:'hour15', label:'15:00'}, |
|
|
|
|
{prop:'hour16', label:'16:00'}, |
|
|
|
|
{prop:'hour17', label:'17:00'}, |
|
|
|
|
{prop:'hour18', label:'18:00'}, |
|
|
|
|
{prop:'hour19', label:'19:00'}, |
|
|
|
|
{prop:'hour20', label:'20:00'}, |
|
|
|
|
{prop:'hour21', label:'21:00'}, |
|
|
|
|
{prop:'hour22', label:'22:00'}, |
|
|
|
|
{prop:'hour23', label:'23:00'}, |
|
|
|
|
]) |
|
|
|
|
//内容 |
|
|
|
|
const dataTable = reactive([ |
|
|
|
|
{ |
|
|
|
|
dev:'蓄热锅炉', |
|
|
|
|
date: '20230-05-11', |
|
|
|
|
'00:00':'10', |
|
|
|
|
} |
|
|
|
|
]) |
|
|
|
|
const dataTable = ref([]) |
|
|
|
|
const currentPage = ref(1) |
|
|
|
|
const pageSize = ref(5) |
|
|
|
|
const pageSize = ref(10) |
|
|
|
|
const small = ref(false) |
|
|
|
|
const background = ref(false) |
|
|
|
|
const disabled = ref(false) |
|
|
|
|
const total = ref() |
|
|
|
|
//拿到下拉条的devid |
|
|
|
|
let checkDevId; |
|
|
|
|
function handleDevChange(devid){ |
|
|
|
|
console.log(devid) |
|
|
|
|
checkDevId = devid |
|
|
|
|
} |
|
|
|
|
//获取表格数据 |
|
|
|
|
function getTableFun(){ |
|
|
|
|
getTable({ |
|
|
|
|
"deviceId":checkDevId, |
|
|
|
|
"timeType":activeIndex.value, |
|
|
|
|
"startTime":startDate.value, |
|
|
|
|
"endTime":endDate.value, |
|
|
|
|
"pageNum": currentPage.value, |
|
|
|
|
"pageSize": pageSize.value |
|
|
|
|
}).then((res)=>{ |
|
|
|
|
total.value = res.total; |
|
|
|
|
dataTable.value = res.rows |
|
|
|
|
console.log(dataTable.value) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
const handleSizeChange = (val) => { |
|
|
|
|
console.log(`${val}`) |
|
|
|
|
getTableFun() |
|
|
|
|
} |
|
|
|
|
const handleCurrentChange = (val) => { |
|
|
|
|
console.log(`${val}`) |
|
|
|
|
getTableFun() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 生成图表按鈕操作*/ |
|
|
|
|
const title = ref() |
|
|
|
|
const open = ref(false) |
|
|
|
|
const chartDataArr = ref([]) |
|
|
|
|
function handleChart(scope){ |
|
|
|
|
open.value = true; |
|
|
|
|
delete scope.row.dayDate |
|
|
|
|
delete scope.row.dayId |
|
|
|
|
delete scope.row.deviceId |
|
|
|
|
delete scope.row.deviceName |
|
|
|
|
for(let i in scope.row){ |
|
|
|
|
chartDataArr.value.push(scope.row[i]) |
|
|
|
|
} |
|
|
|
|
console.log(chartDataArr.value) |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
eleBarChartFun() |
|
|
|
|
},100) |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//用电量柱状图 |
|
|
|
|
const barChartX = ref(['00:00','01:00','02:00','03:00','04:00','05:00','06:00','07:00','08:00','09:00','10:00','11:00','12:00','13:00','14:00','15:00','16:00','17:00','18:00','19:00','20:00','21:00','22:00','23:00']) |
|
|
|
|
let myChart; |
|
|
|
|
function eleBarChartFun(){ |
|
|
|
|
const chartDom = document.getElementById('chart') |
|
|
|
|
myChart = echarts.init(chartDom); |
|
|
|
|
const option = { |
|
|
|
|
title: {}, |
|
|
|
|
legend: { |
|
|
|
|
data: ["用电量"], |
|
|
|
|
// selectedMode: 'single', |
|
|
|
|
textStyle: { |
|
|
|
|
color: "#333" |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
tooltip: { |
|
|
|
|
trigger: "axis", |
|
|
|
|
formatter: "{b0}: {c0}kWh", |
|
|
|
|
// borderColor: '#00fcff', |
|
|
|
|
borderWidth: 1 |
|
|
|
|
}, |
|
|
|
|
grid:{ |
|
|
|
|
show: true, |
|
|
|
|
top: '10%', |
|
|
|
|
bottom:'10%', |
|
|
|
|
left:'5%', |
|
|
|
|
right:'3%', |
|
|
|
|
borderWidth: 1, |
|
|
|
|
borderColor: '#767da1', |
|
|
|
|
}, |
|
|
|
|
textStyle:{ |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
data: barChartX.value, |
|
|
|
|
axisLine:{ |
|
|
|
|
lineStyle:{ |
|
|
|
|
color:'#BEC3DA', |
|
|
|
|
type:'dashed' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
axisTick: { |
|
|
|
|
show: false // 去掉x轴刻度 |
|
|
|
|
}, |
|
|
|
|
// splitArea: { |
|
|
|
|
// show: true, |
|
|
|
|
// interval:0, |
|
|
|
|
// areaStyle: { |
|
|
|
|
// color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //这里重点,用于设置颜色的数组, |
|
|
|
|
// //(有了这个属性,那我们完全可以自己在根据某些条件来生成这样一个数组) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
type: 'value', |
|
|
|
|
name: "kWh", |
|
|
|
|
splitLine:{ |
|
|
|
|
show:true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
|
show: true, |
|
|
|
|
lineStyle:{ |
|
|
|
|
type:'dashed', |
|
|
|
|
color:'#BEC3DA' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "用电量", |
|
|
|
|
type: "bar", |
|
|
|
|
data: chartDataArr.value, |
|
|
|
|
itemStyle:{ |
|
|
|
|
color:'#2F8EE0' |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
option && myChart.setOption(option); |
|
|
|
|
window.onresize = function () {//自适应大小 |
|
|
|
|
myChart.resize(); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//关闭弹框按钮 |
|
|
|
|
function close(){ |
|
|
|
|
open.value = false; |
|
|
|
|
chartDataArr.value = [] |
|
|
|
|
getTableFun() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 日月年按钮操作 */ |
|
|
|
|
const activeIndex = ref(0) |
|
|
|
|
const activeIndex = ref(1) |
|
|
|
|
function handleHour() { |
|
|
|
|
activeIndex.value = 0 |
|
|
|
|
activeIndex.value = 1 |
|
|
|
|
theadList.value = [ |
|
|
|
|
{prop:'00:00', label:'00:00'}, |
|
|
|
|
{prop:'01:00', label:'01:00'}, |
|
|
|
|
{prop:'02:00', label:'02:00'}, |
|
|
|
|
{prop:'03:00', label:'03:00'}, |
|
|
|
|
{prop:'04:00', label:'04:00'}, |
|
|
|
|
{prop:'05:00', label:'05:00'}, |
|
|
|
|
{prop:'06:00', label:'06:00'}, |
|
|
|
|
{prop:'07:00', label:'07:00'}, |
|
|
|
|
{prop:'08:00', label:'08:00'}, |
|
|
|
|
{prop:'09:00', label:'09:00'}, |
|
|
|
|
{prop:'10:00', label:'10:00'}, |
|
|
|
|
{prop:'11:00', label:'11:00'}, |
|
|
|
|
{prop:'12:00', label:'12:00'}, |
|
|
|
|
{prop:'13:00', label:'13:00'}, |
|
|
|
|
{prop:'14:00', label:'14:00'}, |
|
|
|
|
{prop:'15:00', label:'15:00'}, |
|
|
|
|
{prop:'16:00', label:'16:00'}, |
|
|
|
|
{prop:'17:00', label:'17:00'}, |
|
|
|
|
{prop:'18:00', label:'18:00'}, |
|
|
|
|
{prop:'19:00', label:'19:00'}, |
|
|
|
|
{prop:'20:00', label:'20:00'}, |
|
|
|
|
{prop:'21:00', label:'21:00'}, |
|
|
|
|
{prop:'22:00', label:'22:00'}, |
|
|
|
|
{prop:'23:00', label:'23:00'}, |
|
|
|
|
{prop:'dayDate', label:'日期',fixed:'fixed',width:'120px'}, |
|
|
|
|
{prop:'hour00', label:'00:00'}, |
|
|
|
|
{prop:'hour01', label:'01:00'}, |
|
|
|
|
{prop:'hour02', label:'02:00'}, |
|
|
|
|
{prop:'hour03', label:'03:00'}, |
|
|
|
|
{prop:'hour04', label:'04:00'}, |
|
|
|
|
{prop:'hour05', label:'05:00'}, |
|
|
|
|
{prop:'hour06', label:'06:00'}, |
|
|
|
|
{prop:'hour07', label:'07:00'}, |
|
|
|
|
{prop:'hour08', label:'08:00'}, |
|
|
|
|
{prop:'hour09', label:'09:00'}, |
|
|
|
|
{prop:'hour10', label:'10:00'}, |
|
|
|
|
{prop:'hour11', label:'11:00'}, |
|
|
|
|
{prop:'hour12', label:'12:00'}, |
|
|
|
|
{prop:'hour13', label:'13:00'}, |
|
|
|
|
{prop:'hour14', label:'14:00'}, |
|
|
|
|
{prop:'hour15', label:'15:00'}, |
|
|
|
|
{prop:'hour16', label:'16:00'}, |
|
|
|
|
{prop:'hour17', label:'17:00'}, |
|
|
|
|
{prop:'hour18', label:'18:00'}, |
|
|
|
|
{prop:'hour19', label:'19:00'}, |
|
|
|
|
{prop:'hour20', label:'20:00'}, |
|
|
|
|
{prop:'hour21', label:'21:00'}, |
|
|
|
|
{prop:'hour22', label:'22:00'}, |
|
|
|
|
{prop:'hour23', label:'23:00'}, |
|
|
|
|
] |
|
|
|
|
getTableFun() |
|
|
|
|
barChartX.value = ['00:00','01:00','02:00','03:00','04:00','05:00','06:00','07:00','08:00','09:00','10:00','11:00','12:00','13:00','14:00','15:00','16:00','17:00','18:00','19:00','20:00','21:00','22:00','23:00'] |
|
|
|
|
}; |
|
|
|
|
function handleDay() { |
|
|
|
|
activeIndex.value = 1 |
|
|
|
|
activeIndex.value = 2 |
|
|
|
|
theadList.value = [ |
|
|
|
|
{prop:'01', label:'01日'}, |
|
|
|
|
{prop:'02', label:'02日'}, |
|
|
|
|
{prop:'03', label:'03日'}, |
|
|
|
|
{prop:'04', label:'04日'}, |
|
|
|
|
{prop:'05', label:'05日'}, |
|
|
|
|
{prop:'06', label:'06日'}, |
|
|
|
|
{prop:'07', label:'07日'}, |
|
|
|
|
{prop:'08', label:'08日'}, |
|
|
|
|
{prop:'09', label:'09日'}, |
|
|
|
|
{prop:'10', label:'10日'}, |
|
|
|
|
{prop:'11', label:'11日'}, |
|
|
|
|
{prop:'12', label:'12日'}, |
|
|
|
|
{prop:'13', label:'13日'}, |
|
|
|
|
{prop:'14', label:'14日'}, |
|
|
|
|
{prop:'15', label:'15日'}, |
|
|
|
|
{prop:'16', label:'16日'}, |
|
|
|
|
{prop:'17', label:'17日'}, |
|
|
|
|
{prop:'18', label:'18日'}, |
|
|
|
|
{prop:'19', label:'19日'}, |
|
|
|
|
{prop:'20', label:'20日'}, |
|
|
|
|
{prop:'21', label:'21日'}, |
|
|
|
|
{prop:'22', label:'22日'}, |
|
|
|
|
{prop:'23', label:'23日'}, |
|
|
|
|
{prop:'24', label:'24日'}, |
|
|
|
|
{prop:'25', label:'25日'}, |
|
|
|
|
{prop:'26', label:'26日'}, |
|
|
|
|
{prop:'27', label:'27日'}, |
|
|
|
|
{prop:'28', label:'28日'}, |
|
|
|
|
{prop:'29', label:'29日'}, |
|
|
|
|
{prop:'30', label:'30日'}, |
|
|
|
|
{prop:'31', label:'31日'}, |
|
|
|
|
{prop:'monthDate', label:'月份',fixed:'fixed',width:'120px'}, |
|
|
|
|
{prop:'day01', label:'01日'}, |
|
|
|
|
{prop:'day02', label:'02日'}, |
|
|
|
|
{prop:'day03', label:'03日'}, |
|
|
|
|
{prop:'day04', label:'04日'}, |
|
|
|
|
{prop:'day05', label:'05日'}, |
|
|
|
|
{prop:'day06', label:'06日'}, |
|
|
|
|
{prop:'day07', label:'07日'}, |
|
|
|
|
{prop:'day08', label:'08日'}, |
|
|
|
|
{prop:'day09', label:'09日'}, |
|
|
|
|
{prop:'day10', label:'10日'}, |
|
|
|
|
{prop:'day11', label:'11日'}, |
|
|
|
|
{prop:'day12', label:'12日'}, |
|
|
|
|
{prop:'day13', label:'13日'}, |
|
|
|
|
{prop:'day14', label:'14日'}, |
|
|
|
|
{prop:'day15', label:'15日'}, |
|
|
|
|
{prop:'day16', label:'16日'}, |
|
|
|
|
{prop:'day17', label:'17日'}, |
|
|
|
|
{prop:'day18', label:'18日'}, |
|
|
|
|
{prop:'day19', label:'19日'}, |
|
|
|
|
{prop:'day20', label:'20日'}, |
|
|
|
|
{prop:'day21', label:'21日'}, |
|
|
|
|
{prop:'day22', label:'22日'}, |
|
|
|
|
{prop:'day23', label:'23日'}, |
|
|
|
|
{prop:'day24', label:'24日'}, |
|
|
|
|
{prop:'day25', label:'25日'}, |
|
|
|
|
{prop:'day26', label:'26日'}, |
|
|
|
|
{prop:'day27', label:'27日'}, |
|
|
|
|
{prop:'day28', label:'28日'}, |
|
|
|
|
{prop:'day29', label:'29日'}, |
|
|
|
|
{prop:'day30', label:'30日'}, |
|
|
|
|
{prop:'day31', label:'31日'}, |
|
|
|
|
] |
|
|
|
|
getTableFun() |
|
|
|
|
barChartX.value = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31'] |
|
|
|
|
}; |
|
|
|
|
function handleMonth() { |
|
|
|
|
activeIndex.value = 2 |
|
|
|
|
activeIndex.value = 3 |
|
|
|
|
theadList.value = [ |
|
|
|
|
{prop:'01月', label:'01月'}, |
|
|
|
|
{prop:'02月', label:'02月'}, |
|
|
|
|
{prop:'03月', label:'03月'}, |
|
|
|
|
{prop:'04月', label:'04月'}, |
|
|
|
|
{prop:'05月', label:'05月'}, |
|
|
|
|
{prop:'06月', label:'06月'}, |
|
|
|
|
{prop:'07月', label:'07月'}, |
|
|
|
|
{prop:'08月', label:'08月'}, |
|
|
|
|
{prop:'09月', label:'09月'}, |
|
|
|
|
{prop:'10月', label:'10月'}, |
|
|
|
|
{prop:'11月', label:'11月'}, |
|
|
|
|
{prop:'12月', label:'12月'}, |
|
|
|
|
{prop:'yearDate', label:'年份',fixed:'fixed',width:'120px'}, |
|
|
|
|
{prop:'month01', label:'01月'}, |
|
|
|
|
{prop:'month02', label:'02月'}, |
|
|
|
|
{prop:'month03', label:'03月'}, |
|
|
|
|
{prop:'month04', label:'04月'}, |
|
|
|
|
{prop:'month05', label:'05月'}, |
|
|
|
|
{prop:'month06', label:'06月'}, |
|
|
|
|
{prop:'month07', label:'07月'}, |
|
|
|
|
{prop:'month08', label:'08月'}, |
|
|
|
|
{prop:'month09', label:'09月'}, |
|
|
|
|
{prop:'month10', label:'10月'}, |
|
|
|
|
{prop:'month11', label:'11月'}, |
|
|
|
|
{prop:'month12', label:'12月'}, |
|
|
|
|
] |
|
|
|
|
getTableFun() |
|
|
|
|
barChartX.value = ['1','2','3','4','5','6','7','8','9','10','11','12'] |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 生成图表按鈕操作*/ |
|
|
|
|
const title = ref() |
|
|
|
|
const open = ref(false) |
|
|
|
|
function handleChart(){ |
|
|
|
|
open.value = true; |
|
|
|
|
console.log('图表按钮') |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 页面销毁时*/ |
|
|
|
|
onBeforeUnmount(() => { |
|
|
|
|
myChart.dispose(); // 销毁实例,防止内存泄漏 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -282,7 +469,9 @@ const { filterForm } = toRefs(data); |
|
|
|
|
height: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.floatRight{ |
|
|
|
|
margin-left: 90%; |
|
|
|
|
} |
|
|
|
|
::v-deep .el-button{ |
|
|
|
|
border-radius: 2px; |
|
|
|
|
} |
|
|
|
|