This commit is contained in:
仲么了
2024-01-19 14:08:09 +08:00
9 changed files with 40 additions and 69 deletions

View File

@@ -5,7 +5,7 @@
<script setup lang="ts">
import { onBeforeUnmount, onMounted, ref, defineExpose, watch } from 'vue'
// import echarts from './echarts'
import * as echarts from 'echarts'; // 全引入
import * as echarts from 'echarts' // 全引入
import 'echarts/lib/component/dataZoom'
@@ -146,8 +146,8 @@ const handlerYAxis = () => {
})
} else {
return {
...props.options.yAxis,
...temp
...temp,
...props.options.yAxis
}
}
}
@@ -178,8 +178,8 @@ const handlerXAxis = () => {
})
} else {
return {
...props.options.xAxis,
...temp
...temp,
...props.options.xAxis
}
}
}

View File

@@ -15,6 +15,9 @@
class="table-com-search-form"
:label-width="90"
>
<el-form-item label="区域" v-if="area">
<Area v-model="tableStore.table.params.deptIndex" />
</el-form-item>
<el-form-item label="日期" v-if="datePicker" style="grid-column: span 2; max-width: unset">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
@@ -39,18 +42,21 @@
import { inject, ref, onMounted, nextTick, onUnmounted } from 'vue'
import type TableStore from '@/utils/tableStore'
import DatePicker from '@/components/form/datePicker/index.vue'
import Area from '@/components/form/area/index.vue'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
const tableStore = inject('tableStore') as TableStore
const tableHeader = ref()
const datePickerRef = ref()
const dictData = useDictData()
interface Props {
datePicker?: boolean
area?: boolean
}
const props = withDefaults(defineProps<Props>(), {
datePicker: false
datePicker: false,
area: false
})
// 动态计算table高度
const resizeObserver = new ResizeObserver(entries => {
@@ -67,6 +73,9 @@ onMounted(() => {
tableStore.table.params.endTime = datePickerRef.value.timeValue[1]
tableStore.table.params.timeFlag = datePickerRef.value.timeFlag
}
if (props.area) {
tableStore.table.params.deptIndex = dictData.state.area[0].id
}
nextTick(() => {
resizeObserver.observe(tableHeader.value)
const dom = document.getElementById('header-form') as HTMLElement
@@ -105,6 +114,9 @@ const onComSearch = async () => {
tableStore.table.params.endTime = datePickerRef.value.timeValue[1]
tableStore.table.params.timeFlag = datePickerRef.value.timeFlag
}
if (props.area) {
tableStore.table.params.deptIndex = dictData.state.area[0].id
}
await tableStore.onTableAction('search', {})
}

View File

@@ -43,7 +43,8 @@
</el-radio-group>
</div>
<my-echart class="bars_w" :options="echartList" />
<vxe-table class="dw" :data="TableData" v-bind="defaultAttribute">
<vxe-table class="dw" :data="TableData" height="50px" v-bind="defaultAttribute">
<vxe-column field="name" title="名称" width="100px"></vxe-column>
<vxe-column field="totalEvents" title="事件总数" width="100px"></vxe-column>
<vxe-column field="tolerable" title="可容忍" width="100px"></vxe-column>
@@ -145,8 +146,8 @@ const info = async (list: any) => {
color: ['#FF8C00', '#00BFFF', 'green', 'red'],
xAxis: {
type: 'log',
// min: '0.001',
// max: '1000',
min: '0.001',
max: '1000',
name: 's',
splitLine: { show: false }
},
@@ -245,8 +246,8 @@ const info = async (list: any) => {
color: ['yellow', 'green', 'red'],
xAxis: {
type: 'log',
// min: '0.001',
// max: '1000',
min: '0.001',
max: '1000',
name: 's',
splitLine: { show: false }
},

View File

@@ -1,28 +1,8 @@
<template>
<div class="default-main">
<!-- <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="区域">
<Area v-model="formInline.deptIndex" ref="area" />
</el-form-item>
<el-form-item label="统计类型:">
<el-select
v-model="formInline.statisticalType"
value-key="id"
placeholder="请选择统计类型"
size="large"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form> -->
<TableHeader>
<TableHeader area>
<template v-slot:select>
<el-form-item label="区域">
<Area ref="area" v-model="tableStore.table.params.deptIndex" />
</el-form-item>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
@@ -35,8 +15,8 @@
</el-form-item>
</template>
</TableHeader>
<div v-loading="tableStore.table.loading">
<el-row :gutter="10">
<div v-loading="tableStore.table.loading" class="pr10">
<el-row>
<el-col :span="12">
<MyEchartMap
ref="EchartMap"
@@ -113,7 +93,6 @@ const tableStore = new TableStore({
})
provide('tableStore', tableStore)
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.statisticalType = dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
tableStore.table.params.monitorFlag = 2
tableStore.table.params.powerFlag = 2

View File

@@ -1,11 +1,7 @@
<template>
<div class="default-main">
<TableHeader date-picker>
<template v-slot:select>
<el-form-item label="区域">
<Area v-model="tableStore.table.params.deptIndex" />
</el-form-item>
</template>
<TableHeader date-picker area>
</TableHeader>
<el-tabs v-model="activeName" type="border-card" v-loading="tableStore.table.loading">
<el-tab-pane label="图形" name="1">
@@ -49,7 +45,7 @@ const tableStore = new TableStore({
})
provide('tableStore', tableStore)
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.statisticalType = dictData.getBasicData('Statistical_Type', ['Load_Type'])[3]
tableStore.table.params.monitorFlag = 2
tableStore.table.params.powerFlag = 2

View File

@@ -1,11 +1,7 @@
<template>
<div class="default-main">
<TableHeader date-picker>
<template v-slot:select>
<el-form-item label="区域">
<Area v-model="tableStore.table.params.deptIndex" />
</el-form-item>
</template>
<TableHeader date-picker area>
<template v-slot:select></template>
</TableHeader>
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick" v-loading="tableStore.table.loading">
<el-tab-pane label="暂降原因及类型统计" name="1">
@@ -20,7 +16,7 @@
<script setup lang="ts">
import TableHeader from '@/components/table/header/index.vue'
import Area from '@/components/form/area/index.vue'
import { useDictData } from '@/stores/dictData'
import TableStore from '@/utils/tableStore'
import { onMounted, reactive, ref, provide } from 'vue'
@@ -49,7 +45,6 @@ const tableStore = new TableStore({
})
provide('tableStore', tableStore)
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.statisticalType = dictData.getBasicData('Statistical_Type', ['Load_Type'])[3]
tableStore.table.params.monitorFlag = 2
tableStore.table.params.powerFlag = 2

View File

@@ -1,12 +1,6 @@
<template>
<div class="default-main">
<TableHeader date-picker>
<template v-slot:select>
<el-form-item label="区域">
<Area v-model="tableStore.table.params.deptIndex" />
</el-form-item>
</template>
</TableHeader>
<TableHeader date-picker area></TableHeader>
<el-tabs v-model="activeName" type="border-card" v-loading="tableStore.table.loading">
<el-tab-pane label="图形" name="1">
<Echart :list="list" ref="echarts" />
@@ -49,7 +43,6 @@ const tableStore = new TableStore({
})
provide('tableStore', tableStore)
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.statisticalType = dictData.getBasicData('Statistical_Type', ['Load_Type'])[3]
tableStore.table.params.monitorFlag = 2
tableStore.table.params.powerFlag = 2

View File

@@ -1,10 +1,8 @@
<template>
<div class="default-main">
<TableHeader date-picker>
<TableHeader date-picker area>
<template v-slot:select>
<el-form-item label="区域">
<Area v-model="tableStore.table.params.deptIndex" />
</el-form-item>
<el-form-item label="终端状态">
<el-select
multiple
@@ -120,7 +118,6 @@ const tableStore = new TableStore({
manufacturerForm.value = []
}
})
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.runFlag = []
tableStore.table.params.comFlag = []
tableStore.table.params.manufacturer = []

View File

@@ -1,8 +1,7 @@
<template>
<div class="default-main">
<TableHeader date-picker>
<TableHeader date-picker area>
<template v-slot:select>
<el-form-item label="区域"><Area v-model="tableStore.table.params.deptIndex" /></el-form-item>
<el-form-item label="干扰源类型">
<el-select
multiple
@@ -143,7 +142,6 @@ const tableStore = new TableStore({
scaleForm.value = []
}
})
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.scale = []
tableStore.table.params.comFlag = []
tableStore.table.params.loadType = []