修改事件展示查询问题
This commit is contained in:
@@ -391,18 +391,24 @@ const next = () => {
|
|||||||
if (year >= presentY && !props.nextFlag) {
|
if (year >= presentY && !props.nextFlag) {
|
||||||
startTime = presentY + '-01-01'
|
startTime = presentY + '-01-01'
|
||||||
if (presentM < 10) {
|
if (presentM < 10) {
|
||||||
|
|
||||||
if (presentD < 10) {
|
if (presentD < 10) {
|
||||||
endTime = presentY + '-0' + presentM + '-0' + presentD
|
endTime = presentY + '-0' + presentM + '-0' + presentD
|
||||||
} else {
|
} else {
|
||||||
endTime = presentY + '-0' + presentM + '-' + presentD
|
endTime = presentY + '-0' + presentM + '-' + presentD
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
endTime = presentY + '-' + presentM + '-' + presentD
|
if (presentD < 10) {
|
||||||
|
endTime = presentY + '-' + presentM + '-0' + presentD
|
||||||
|
} else {
|
||||||
|
endTime = presentY + '-' + presentM + '-' + presentD
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
startTime = year + '-01-01'
|
startTime = year + '-01-01'
|
||||||
endTime = year + '-12-31'
|
endTime = year + '-12-31'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
timeValue.value = [startTime, endTime]
|
timeValue.value = [startTime, endTime]
|
||||||
|
|||||||
@@ -152,7 +152,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.el-tabs__content {
|
.el-tabs__content {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
.el-tab-pane {
|
.el-tab-pane {
|
||||||
@@ -214,11 +213,16 @@
|
|||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
//tabs 添加icon样式
|
//tabs 添加icon样式
|
||||||
.custom-tabs-label{
|
.custom-tabs-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.el-icon {
|
.el-icon {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.el-pagination__sizes {
|
||||||
|
.el-select {
|
||||||
|
min-width: 128px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { install$2 } from 'echarts/types/dist/shared'
|
import { install$2 } from 'echarts/types/dist/shared'
|
||||||
|
|
||||||
export const yMethod = (arr: any) => {
|
export const yMethod = (arr: any) => {
|
||||||
console.log('🚀 ~ yMethod ~ arr:', arr)
|
|
||||||
let interval = 0
|
let interval = 0
|
||||||
let maxValue = 0
|
let maxValue = 0
|
||||||
let minValue = 0
|
let minValue = 0
|
||||||
@@ -10,33 +9,6 @@ export const yMethod = (arr: any) => {
|
|||||||
maxValue = Math.max(...arr)
|
maxValue = Math.max(...arr)
|
||||||
minValue = Math.min(...arr)
|
minValue = Math.min(...arr)
|
||||||
|
|
||||||
console.log('🚀 ~ yMethod ~ minValue:', minValue,maxValue)
|
|
||||||
|
|
||||||
// interval = (maxValue - minValue) / 4
|
|
||||||
// if (maxValue > 1000) {
|
|
||||||
// interval = (Math.ceil(maxValue / 100) * 100 - Math.ceil(minValue / 100) * 100) / 4
|
|
||||||
// min = Math.floor((minValue - interval / 2) / 100) * 100
|
|
||||||
// max = Math.ceil((maxValue + interval / 2) / 100) * 100
|
|
||||||
// min >= 0 ? 0 : ''
|
|
||||||
// } else {
|
|
||||||
// min = Math.floor(minValue - interval / 2)
|
|
||||||
// max = Math.ceil(maxValue + interval / 2)
|
|
||||||
// console.log('🚀 ~ yMethod ~ minValue:', minValue)
|
|
||||||
|
|
||||||
// if (minValue >= 0 && minValue < 10) {
|
|
||||||
// min = 0
|
|
||||||
// }
|
|
||||||
// if (maxValue < 1 && maxValue >= 0) {
|
|
||||||
// max = 1
|
|
||||||
// }
|
|
||||||
// interval = (max - min) / 4
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (interval < 1 && interval > -1) {
|
|
||||||
// interval = 1
|
|
||||||
// }
|
|
||||||
// console.log("🚀 ~ yMethod ~ minValue:", minValue)
|
|
||||||
|
|
||||||
if (maxValue > 1000) {
|
if (maxValue > 1000) {
|
||||||
max = Math.ceil(maxValue / 100) * 100
|
max = Math.ceil(maxValue / 100) * 100
|
||||||
min = (Math.floor(minValue / 100) - 1) * 100
|
min = (Math.floor(minValue / 100) - 1) * 100
|
||||||
@@ -44,12 +16,12 @@ export const yMethod = (arr: any) => {
|
|||||||
max = Math.ceil(maxValue / 10) * 10
|
max = Math.ceil(maxValue / 10) * 10
|
||||||
min = Math.floor(minValue / 10) * 10
|
min = Math.floor(minValue / 10) * 10
|
||||||
}
|
}
|
||||||
if (max > 0 && max < 1) {
|
|
||||||
|
if (maxValue > 0 && maxValue < 1) {
|
||||||
max = 1
|
max = 1
|
||||||
}
|
} else if (max == 0 && minValue > -1 && minValue < 0) {
|
||||||
// if (min < 0 && min < -1) {
|
min = -1
|
||||||
// min = -1
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
return [min, max, interval]
|
return [min, max, interval]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,25 +2,15 @@
|
|||||||
<TableHeader datePicker ref="refheader">
|
<TableHeader datePicker ref="refheader">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="数据来源">
|
<el-form-item label="数据来源">
|
||||||
<el-cascader
|
<el-cascader v-model="tableStore.table.params.cascader" placeholder="请选择数据来源" @change="sourceChange"
|
||||||
v-model="tableStore.table.params.cascader"
|
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||||
placeholder="请选择数据来源"
|
clearable></el-cascader>
|
||||||
@change="sourceChange"
|
|
||||||
:options="deviceTreeOptions"
|
|
||||||
:show-all-levels="false"
|
|
||||||
:props="{ checkStrictly: true }"
|
|
||||||
clearable
|
|
||||||
></el-cascader>
|
|
||||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="级别">
|
<el-form-item label="级别">
|
||||||
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
|
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
|
||||||
<el-option
|
<el-option v-for="item in rankOptions" :key="item.value" :label="item.label"
|
||||||
v-for="item in rankOptions"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -70,7 +60,7 @@ const rankOptions = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
column: [
|
||||||
@@ -82,9 +72,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
if (!tableStore.table.params.deviceId) {
|
|
||||||
delete tableStore.table.params.deviceId
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -102,6 +90,7 @@ tableStore.table.params.eventIds = []
|
|||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.target = []
|
tableStore.table.params.target = []
|
||||||
tableStore.table.params.userId = ''
|
tableStore.table.params.userId = ''
|
||||||
|
tableStore.table.params.deviceTypeId = ''
|
||||||
|
|
||||||
const deviceTreeOptions = ref<any>(props.deviceTree)
|
const deviceTreeOptions = ref<any>(props.deviceTree)
|
||||||
deviceTreeOptions.value.map((item: any, index: any) => {
|
deviceTreeOptions.value.map((item: any, index: any) => {
|
||||||
@@ -110,21 +99,24 @@ deviceTreeOptions.value.map((item: any, index: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const sourceChange = (e: any) => {
|
const sourceChange = (e: any) => {
|
||||||
tableStore.table.params.engineeringid = e[1] || ''
|
tableStore.table.params.deviceTypeId = ''
|
||||||
tableStore.table.params.projectId = e[2] || ''
|
tableStore.table.params.engineeringid = ''
|
||||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
tableStore.table.params.projectId = ''
|
||||||
return item.name == '治理设备'
|
tableStore.table.params.deviceId = ''
|
||||||
})
|
if (e) {
|
||||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||||
return item.name == '便携式设备'
|
return item.id == e[0]
|
||||||
})
|
})[0].name
|
||||||
//便携式设备特殊处理
|
|
||||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
if (name == '便携式设备') {
|
||||||
tableStore.table.params.deviceId = e[1]
|
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||||
}
|
tableStore.table.params.deviceId = e[1] || ''
|
||||||
//治理设备
|
} else {
|
||||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||||
tableStore.table.params.deviceId = e[2] || ''
|
tableStore.table.params.engineeringid = e[1] || ''
|
||||||
|
tableStore.table.params.projectId = e[2] || ''
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +126,6 @@ onMounted(() => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// tableStore.table.height = mainHeight(200).height as any
|
// tableStore.table.height = mainHeight(200).height as any
|
||||||
}, 0)
|
}, 0)
|
||||||
const addMenu = () => {}
|
const addMenu = () => { }
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
@@ -2,15 +2,9 @@
|
|||||||
<TableHeader datePicker ref="refheader">
|
<TableHeader datePicker ref="refheader">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="数据来源">
|
<el-form-item label="数据来源">
|
||||||
<el-cascader
|
<el-cascader v-model="tableStore.table.params.cascader" placeholder="请选择数据来源" @change="sourceChange"
|
||||||
v-model="tableStore.table.params.cascader"
|
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||||
placeholder="请选择数据来源"
|
clearable></el-cascader>
|
||||||
@change="sourceChange"
|
|
||||||
:options="deviceTreeOptions"
|
|
||||||
:show-all-levels="false"
|
|
||||||
:props="{ checkStrictly: true }"
|
|
||||||
clearable
|
|
||||||
></el-cascader>
|
|
||||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="级别">
|
<!-- <el-form-item label="级别">
|
||||||
@@ -70,7 +64,7 @@ const rankOptions = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
column: [
|
||||||
@@ -81,9 +75,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
if (!tableStore.table.params.deviceId) {
|
|
||||||
delete tableStore.table.params.deviceId
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -92,6 +84,7 @@ provide('tableStore', tableStore)
|
|||||||
// "type": "",
|
// "type": "",
|
||||||
// "userId": ""
|
// "userId": ""
|
||||||
tableStore.table.params.engineeringid = ''
|
tableStore.table.params.engineeringid = ''
|
||||||
|
tableStore.table.params.deviceTypeId = ''
|
||||||
tableStore.table.params.projectId = ''
|
tableStore.table.params.projectId = ''
|
||||||
tableStore.table.params.deviceId = ''
|
tableStore.table.params.deviceId = ''
|
||||||
tableStore.table.params.type = 1
|
tableStore.table.params.type = 1
|
||||||
@@ -109,22 +102,26 @@ deviceTreeOptions.value.map((item: any, index: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const sourceChange = (e: any) => {
|
const sourceChange = (e: any) => {
|
||||||
tableStore.table.params.engineeringid = e[1] || ''
|
tableStore.table.params.deviceTypeId = ''
|
||||||
tableStore.table.params.projectId = e[2] || ''
|
tableStore.table.params.engineeringid = ''
|
||||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
tableStore.table.params.projectId = ''
|
||||||
return item.name == '治理设备'
|
tableStore.table.params.deviceId = ''
|
||||||
})
|
if (e) {
|
||||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||||
return item.name == '便携式设备'
|
return item.id == e[0]
|
||||||
})
|
})[0].name
|
||||||
//便携式设备特殊处理
|
|
||||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
if (name == '便携式设备') {
|
||||||
tableStore.table.params.deviceId = e[1]
|
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||||
}
|
tableStore.table.params.deviceId = e[1] || ''
|
||||||
//治理设备
|
} else {
|
||||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||||
tableStore.table.params.deviceId = e[2] || ''
|
tableStore.table.params.engineeringid = e[1] || ''
|
||||||
|
tableStore.table.params.projectId = e[2] || ''
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
@@ -132,6 +129,6 @@ onMounted(() => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
tableStore.table.height = mainHeight(200).height as any
|
tableStore.table.height = mainHeight(200).height as any
|
||||||
}, 0)
|
}, 0)
|
||||||
const addMenu = () => {}
|
const addMenu = () => { }
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
@@ -3,15 +3,9 @@
|
|||||||
<TableHeader datePicker>
|
<TableHeader datePicker>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="数据来源">
|
<el-form-item label="数据来源">
|
||||||
<el-cascader
|
<el-cascader placeholder="请选择数据来源" @change="sourceChange" v-model="tableStore.table.params.cascader"
|
||||||
placeholder="请选择数据来源"
|
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||||
@change="sourceChange"
|
clearable></el-cascader>
|
||||||
v-model="tableStore.table.params.cascader"
|
|
||||||
:options="deviceTreeOptions"
|
|
||||||
:show-all-levels="false"
|
|
||||||
:props="{ checkStrictly: true }"
|
|
||||||
clearable
|
|
||||||
></el-cascader>
|
|
||||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="级别">
|
<!-- <el-form-item label="级别">
|
||||||
@@ -31,54 +25,28 @@
|
|||||||
<div v-if="view2" style="display: flex">
|
<div v-if="view2" style="display: flex">
|
||||||
<span style="font-size: 14px; line-height: 30px">值类型选择:</span>
|
<span style="font-size: 14px; line-height: 30px">值类型选择:</span>
|
||||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
||||||
<el-option
|
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
||||||
v-for="item in options"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-button
|
<el-button v-if="view2" @click="backbxlb" type="primary" class="el-icon-refresh-right"
|
||||||
v-if="view2"
|
icon="el-icon-Back" style="float: right">
|
||||||
@click="backbxlb"
|
|
||||||
type="primary"
|
|
||||||
class="el-icon-refresh-right"
|
|
||||||
icon="el-icon-Back"
|
|
||||||
style="float: right"
|
|
||||||
>
|
|
||||||
返回
|
返回
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick">
|
<el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane label="瞬时波形" name="ssbx" class="boxbx pt10 pb10"
|
||||||
label="瞬时波形"
|
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||||
name="ssbx"
|
<shushiboxi v-if="bxactiveName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
|
||||||
class="boxbx pt10 pb10"
|
</shushiboxi>
|
||||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
|
||||||
>
|
|
||||||
<shushiboxi
|
|
||||||
v-if="bxactiveName == 'ssbx' && showBoxi"
|
|
||||||
:value="value"
|
|
||||||
:boxoList="boxoList"
|
|
||||||
:wp="wp"
|
|
||||||
></shushiboxi>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane label="RMS波形" class="boxbx pt10 pb10" name="rmsbx"
|
||||||
label="RMS波形"
|
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||||
class="boxbx pt10 pb10"
|
<rmsboxi v-if="bxactiveName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
|
||||||
name="rmsbx"
|
</rmsboxi>
|
||||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
|
||||||
>
|
|
||||||
<rmsboxi
|
|
||||||
v-if="bxactiveName == 'rmsbx' && showBoxi"
|
|
||||||
:value="value"
|
|
||||||
:boxoList="boxoList"
|
|
||||||
:wp="wp"
|
|
||||||
></rmsboxi>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
|
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
|
||||||
@@ -188,9 +156,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
if (!tableStore.table.params.deviceId) {
|
// if (!tableStore.table.params.deviceId) {
|
||||||
delete tableStore.table.params.deviceId
|
// delete tableStore.table.params.deviceId
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
@@ -206,6 +174,7 @@ provide('tableStore', tableStore)
|
|||||||
// "userId": ""
|
// "userId": ""
|
||||||
tableStore.table.params.engineeringid = ''
|
tableStore.table.params.engineeringid = ''
|
||||||
tableStore.table.params.projectId = ''
|
tableStore.table.params.projectId = ''
|
||||||
|
tableStore.table.params.deviceTypeId = ''
|
||||||
tableStore.table.params.deviceId = ''
|
tableStore.table.params.deviceId = ''
|
||||||
tableStore.table.params.type = 0
|
tableStore.table.params.type = 0
|
||||||
tableStore.table.params.eventIds = []
|
tableStore.table.params.eventIds = []
|
||||||
@@ -215,29 +184,52 @@ tableStore.table.params.userId = ''
|
|||||||
tableStore.table.params.cascader = ''
|
tableStore.table.params.cascader = ''
|
||||||
// tableStore.table.params.level=''
|
// tableStore.table.params.level=''
|
||||||
|
|
||||||
const deviceTreeOptions = ref<any>(props.deviceTree)
|
const deviceTreeOptions: any = ref<any>(props.deviceTree)
|
||||||
deviceTreeOptions.value.map((item: any, index: any) => {
|
deviceTreeOptions.value.map((item: any, index: any) => {
|
||||||
if (item.children.length == 0) {
|
if (item.children.length == 0) {
|
||||||
deviceTreeOptions.value.splice(index, 1)
|
deviceTreeOptions.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const sourceChange = (e: any) => {
|
const sourceChange = (e: any) => {
|
||||||
tableStore.table.params.engineeringid = e[1] || ''
|
tableStore.table.params.deviceTypeId = ''
|
||||||
tableStore.table.params.projectId = e[2] || ''
|
tableStore.table.params.engineeringid = ''
|
||||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
tableStore.table.params.projectId = ''
|
||||||
return item.name == '治理设备'
|
tableStore.table.params.deviceId = ''
|
||||||
})
|
if (e) {
|
||||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||||
return item.name == '便携式设备'
|
return item.id == e[0]
|
||||||
})
|
})[0].name
|
||||||
//便携式设备特殊处理
|
|
||||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
if (name == '便携式设备') {
|
||||||
tableStore.table.params.deviceId = e[1]
|
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||||
}
|
tableStore.table.params.deviceId = e[1] || ''
|
||||||
//治理设备
|
} else {
|
||||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||||
tableStore.table.params.deviceId = e[2] || ''
|
tableStore.table.params.engineeringid = e[1] || ''
|
||||||
|
tableStore.table.params.projectId = e[2] || ''
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tableStore.table.params.engineeringid = e[1] || ''
|
||||||
|
// tableStore.table.params.projectId = e[2] || ''
|
||||||
|
// const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||||
|
// return item.name == '治理设备'
|
||||||
|
// })
|
||||||
|
// const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||||
|
// return item.name == '便携式设备'
|
||||||
|
// })
|
||||||
|
|
||||||
|
// console.log("🚀 ~ zlIndex ~ zlIndex:", zlIndex,bxsIndex)
|
||||||
|
|
||||||
|
// //便携式设备特殊处理
|
||||||
|
// if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||||
|
// tableStore.table.params.deviceId = e[1]
|
||||||
|
// }
|
||||||
|
// //治理设备
|
||||||
|
// if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||||
|
// tableStore.table.params.deviceId = e[2] || ''
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
const getboxin = async (row: any) => {
|
const getboxin = async (row: any) => {
|
||||||
console.log('🚀 ~ getboxin ~ row:', row)
|
console.log('🚀 ~ getboxin ~ row:', row)
|
||||||
@@ -279,6 +271,6 @@ setTimeout(() => {
|
|||||||
tableStore.table.height = mainHeight(200).height as any
|
tableStore.table.height = mainHeight(200).height as any
|
||||||
}, 0)
|
}, 0)
|
||||||
|
|
||||||
const addMenu = () => {}
|
const addMenu = () => { }
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ const options = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '事件描述', field: 'evtParamPosition' },
|
{ title: '事件描述', field: 'evtParamPosition' },
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ onMounted(() => {
|
|||||||
const init = () => {
|
const init = () => {
|
||||||
echartsData.value = null
|
echartsData.value = null
|
||||||
loading.value = true
|
loading.value = true
|
||||||
console.log(props.detail.children, 'props.detail.children')
|
// console.log(props.detail.children, 'props.detail.children')
|
||||||
let statisticalParams = props.detail.children
|
let statisticalParams = props.detail.children
|
||||||
statisticalParams[0].statMethod = form.statMethod
|
statisticalParams[0].statMethod = form.statMethod
|
||||||
getDeviceDataTrend({
|
getDeviceDataTrend({
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import { queryStatistical } from '@/api/system-boot/csstatisticalset'
|
|||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { getDeviceHarmonicSpectrumData, getRealTimeTableList } from '@/api/cs-device-boot/EquipmentDelivery.ts'
|
import { getDeviceHarmonicSpectrumData, getRealTimeTableList } from '@/api/cs-device-boot/EquipmentDelivery.ts'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { yMethod } from '@/utils/echartMethod'
|
||||||
const searchForm: any = ref({})
|
const searchForm: any = ref({})
|
||||||
searchForm.value = {
|
searchForm.value = {
|
||||||
index: []
|
index: []
|
||||||
@@ -75,7 +76,7 @@ const init = () => {
|
|||||||
})
|
})
|
||||||
//查询谐波频谱
|
//查询谐波频谱
|
||||||
getDeviceHarmonicSpectrumData(params.value).then(res => {
|
getDeviceHarmonicSpectrumData(params.value).then(res => {
|
||||||
res.data.length > 3 ? height = mainHeight(275, 3 ).height : height = mainHeight(275, res.data.length ).height
|
res.data.length > 3 ? height = mainHeight(275, 3).height : height = mainHeight(275, res.data.length).height
|
||||||
chartsList.value = res.data
|
chartsList.value = res.data
|
||||||
//数据根据相别组装成新数组
|
//数据根据相别组装成新数组
|
||||||
chartsList.value.map((item: any) => {
|
chartsList.value.map((item: any) => {
|
||||||
@@ -154,27 +155,29 @@ const init = () => {
|
|||||||
},
|
},
|
||||||
boundaryGap: false
|
boundaryGap: false
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis:
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name:
|
name:
|
||||||
item.thdDataVOS.length != 0 &&
|
item.thdDataVOS.length != 0 &&
|
||||||
item.thdDataVOS[0].list &&
|
item.thdDataVOS[0].list &&
|
||||||
item.thdDataVOS[0].list[0].unit,
|
item.thdDataVOS[0].list[0].unit,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#000'
|
color: '#000'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
],
|
splitNumber: 5,
|
||||||
|
minInterval: 1,
|
||||||
|
}
|
||||||
|
,
|
||||||
series: []
|
series: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -185,7 +188,7 @@ const init = () => {
|
|||||||
item.thdDataVOS[0].list.map((ss: any) => {
|
item.thdDataVOS[0].list.map((ss: any) => {
|
||||||
return ss.frequency + '次'
|
return ss.frequency + '次'
|
||||||
})
|
})
|
||||||
|
let aar: any = []
|
||||||
//y轴数据
|
//y轴数据
|
||||||
item.thdDataVOS.map((vv: any) => {
|
item.thdDataVOS.map((vv: any) => {
|
||||||
item.echartsData.options.series.push({
|
item.echartsData.options.series.push({
|
||||||
@@ -199,6 +202,7 @@ const init = () => {
|
|||||||
// }e
|
// }e
|
||||||
},
|
},
|
||||||
data: vv.list.map((vvs: any) => {
|
data: vv.list.map((vvs: any) => {
|
||||||
|
aar.push(vvs.statisticalData)
|
||||||
return vvs.statisticalData
|
return vvs.statisticalData
|
||||||
}),
|
}),
|
||||||
smooth: true, // 这里设置平滑曲线
|
smooth: true, // 这里设置平滑曲线
|
||||||
@@ -207,6 +211,10 @@ const init = () => {
|
|||||||
//legend数据
|
//legend数据
|
||||||
item.echartsData.options.legend.data.push(vv.phase + '相')
|
item.echartsData.options.legend.data.push(vv.phase + '相')
|
||||||
})
|
})
|
||||||
|
let [min, max] = yMethod(aar)
|
||||||
|
item.echartsData.options.yAxis.max = max
|
||||||
|
item.echartsData.options.yAxis.min = min
|
||||||
|
|
||||||
})
|
})
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
40
vite.config.ts.timestamp-1728523034291-77e174b6e3798.mjs
Normal file
40
vite.config.ts.timestamp-1728523034291-77e174b6e3798.mjs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
// vite.config.ts
|
||||||
|
import { defineConfig } from "file:///D:/%E9%A1%B9%E7%9B%AE/%E7%81%BF%E8%83%BD/admin-govern/node_modules/.pnpm/vite@5.4.8_@types+node@20.16.9_sass@1.79.3/node_modules/vite/dist/node/index.js";
|
||||||
|
import vue from "file:///D:/%E9%A1%B9%E7%9B%AE/%E7%81%BF%E8%83%BD/admin-govern/node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vite@5.4.8_vue@3.5.9/node_modules/@vitejs/plugin-vue/dist/index.mjs";
|
||||||
|
import vueJsx from "file:///D:/%E9%A1%B9%E7%9B%AE/%E7%81%BF%E8%83%BD/admin-govern/node_modules/.pnpm/@vitejs+plugin-vue-jsx@3.1.0_vite@5.4.8_vue@3.5.9/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
|
||||||
|
import path from "path";
|
||||||
|
var __vite_injected_original_dirname = "D:\\\u9879\u76EE\\\u707F\u80FD\\admin-govern";
|
||||||
|
var nodeResolve = (dir) => path.resolve(__vite_injected_original_dirname, ".", dir);
|
||||||
|
var vite_config_default = defineConfig({
|
||||||
|
plugins: [vue(), vueJsx()],
|
||||||
|
server: {
|
||||||
|
host: "0.0.0.0",
|
||||||
|
open: true,
|
||||||
|
proxy: {
|
||||||
|
"/api": {
|
||||||
|
// target: 'http://192.168.1.81:10215', //数据中心
|
||||||
|
// target: 'http://192.168.1.24:10215', //
|
||||||
|
// target: 'http://192.168.1.122:10215', //gfh
|
||||||
|
// target: 'http://192.168.1.127:10215', //cdf
|
||||||
|
// target: 'http://192.168.1.125:10215',
|
||||||
|
target: "http://192.168.1.22:10215",
|
||||||
|
// target: 'https://pqmcn.com:8092/api', //治理
|
||||||
|
// target:'http://www.zhilitest.com:8089/api',
|
||||||
|
changeOrigin: true,
|
||||||
|
rewrite: (path2) => path2.replace(/^\/api/, "")
|
||||||
|
//路径重写,把'/api'替换为''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// port:'3000'
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"@": nodeResolve("src"),
|
||||||
|
"~": nodeResolve("public")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
export {
|
||||||
|
vite_config_default as default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXF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