修改时间组件
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<Area v-model="formInline.deptIndex" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时间">
|
||||
<el-date-picker v-model="formInline.searchBeginTime" type="date" placeholder="请选择时间" />
|
||||
<DatePicker ref="Picker" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
@@ -25,6 +25,7 @@ import Area from '@/components/form/area/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Echart from '@/views/dashboard/components/echart.vue'
|
||||
import Tableabove from '@/views/dashboard/components/Tableabove.vue'
|
||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||
import { onMounted, reactive, ref, onBeforeMount } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
@@ -34,6 +35,7 @@ const activeName = ref('1')
|
||||
import { getAreaCalculation } from '@/api/test'
|
||||
const list = ref([])
|
||||
const echarts = ref()
|
||||
const Picker = ref()
|
||||
const table = ref()
|
||||
const dictData = useDictData()
|
||||
const loading = ref(true)
|
||||
@@ -43,27 +45,23 @@ const formInline = reactive({
|
||||
monitorFlag: 2,
|
||||
powerFlag: 2,
|
||||
serverName: 'event-boot',
|
||||
searchBeginTime: '2023-12-01',
|
||||
searchEndTime: '2023-12-26',
|
||||
statisticalType: {
|
||||
name: '电网拓扑',
|
||||
id: 'cc28974d259ad22642f6a1bff708f967',
|
||||
code: 'Power_Network',
|
||||
value: 'cc28974d259ad22642f6a1bff708f967',
|
||||
gvalue: null,
|
||||
label: '电网拓扑',
|
||||
sort: 0
|
||||
},
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
statisticalType: dictData.getBasicData('Statistical_Type', ['Load_Type'])[3],
|
||||
timeFlag: 1
|
||||
})
|
||||
|
||||
// const locale=zhCn
|
||||
const onSubmit = async () => {
|
||||
loading.value = true
|
||||
formInline.searchBeginTime = Picker.value.timeValue[0]
|
||||
formInline.searchEndTime = Picker.value.timeValue[1]
|
||||
formInline.timeFlag = Picker.value.timeFlag
|
||||
await getAreaCalculation(formInline).then(res => {
|
||||
list.value = res.data
|
||||
echarts.value.Processing(res.data.areaStatistics)
|
||||
echarts.value.Grade(res.data.voltageStatistics)
|
||||
echarts.value.Relation(res.data.monthlyStatistics)
|
||||
echarts.value.Relation(res.data.monthlyStatistics,Picker.value.interval)
|
||||
table.value.info(res.data)
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user