方案数据添加暂态事件页面
This commit is contained in:
@@ -22,15 +22,15 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-tabs class="home_body" type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||
|
||||
|
||||
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<shushiboxi v-if="isWp && wp && activeName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:wp="wp">
|
||||
:parentHeight="parentHeight" :wp="wp">
|
||||
</shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:wp="wp">
|
||||
:parentHeight="parentHeight" :wp="wp">
|
||||
</rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -50,6 +50,7 @@ const searchForm = ref({
|
||||
type: 0
|
||||
})
|
||||
const emit = defineEmits(['handleHideCharts'])
|
||||
const parentHeight = ref(0)
|
||||
const tableList: any = ref([])
|
||||
for (let i = 0; i < 300; i++) {
|
||||
tableList.value.push({
|
||||
@@ -106,7 +107,8 @@ const getWpData = (val: any, list: any) => {
|
||||
wp.value = val
|
||||
isWp.value = true
|
||||
boxoList.value = list
|
||||
// console.log(wp.value, val, 'ggggghhhh')
|
||||
|
||||
console.log(wp.value, val, 'ggggghhhh')
|
||||
}
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
@@ -114,7 +116,7 @@ const changeView = () => {
|
||||
showBoxi.value = true
|
||||
}, 0)
|
||||
}
|
||||
const bxecharts = mainHeight(345).height as any
|
||||
const bxecharts: any = ref(mainHeight(190).height as any)
|
||||
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
// activeName.value = tab.index
|
||||
@@ -127,22 +129,29 @@ const handleClick = (tab: any, event: any) => {
|
||||
const handleBack = () => {
|
||||
emit('handleHideCharts')
|
||||
}
|
||||
const setHeight = (h: any,vh: any) => {
|
||||
|
||||
parentHeight.value = h
|
||||
setTimeout(() => {
|
||||
bxecharts.value = mainHeight(vh).height
|
||||
},100)
|
||||
}
|
||||
onMounted(() => { })
|
||||
defineExpose({ getWpData })
|
||||
defineExpose({ getWpData, setHeight })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tab_info {
|
||||
width: 100%;
|
||||
height: calc(100vh - 450px);
|
||||
// .tab_info {
|
||||
// width: 100%;
|
||||
// height: calc(100vh - 450px);
|
||||
|
||||
// overflow: auto;
|
||||
// padding-bottom: 20px;
|
||||
.charts {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
height: calc(100vh - 450px);
|
||||
}
|
||||
}
|
||||
// // overflow: auto;
|
||||
// // padding-bottom: 20px;
|
||||
// .charts {
|
||||
// width: 100%;
|
||||
// margin-top: 10px;
|
||||
// height: calc(100vh - 450px);
|
||||
// }
|
||||
// }
|
||||
|
||||
.home {
|
||||
width: 100%;
|
||||
@@ -152,11 +161,7 @@ defineExpose({ getWpData })
|
||||
position: relative;
|
||||
|
||||
.home_header {
|
||||
// position: absolute;
|
||||
// top: -25px;
|
||||
// left: 0;
|
||||
// width: 80%;
|
||||
// height: 40px;
|
||||
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
<div class="view">
|
||||
<TableHeader datePicker ref="headerRef" v-if="!isWaveCharts" :showReset="false"></TableHeader>
|
||||
<Table ref="tableRef" v-if="!isWaveCharts" />
|
||||
<waveFormAnalysis
|
||||
v-if="isWaveCharts"
|
||||
ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false"
|
||||
:wp="wp"
|
||||
/>
|
||||
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef" @handleHideCharts="isWaveCharts = false"
|
||||
:wp="wp" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -24,6 +20,7 @@ const tableParams: any = ref({})
|
||||
const refheader = ref()
|
||||
const view = ref(true)
|
||||
const view2 = ref(false)
|
||||
const loading = ref(false)
|
||||
const showBoxi = ref(true)
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList: any = ref([])
|
||||
@@ -37,9 +34,11 @@ const tableStore: any = new TableStore({
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox', fixed: 'left' },
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '发生时刻', minWidth: 170 },
|
||||
{ field: 'showName', title: '事件描述', minWidth: 170 },
|
||||
{
|
||||
@@ -84,14 +83,15 @@ const tableStore: any = new TableStore({
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
loading:'loading1',
|
||||
loading: 'loading1',
|
||||
disabled: row => {
|
||||
// && row.evtParamTm < 20
|
||||
return !row.wavePath
|
||||
},
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
|
||||
isWaveCharts.value = true
|
||||
loading.value = true
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
@@ -102,13 +102,16 @@ const tableStore: any = new TableStore({
|
||||
view.value = false
|
||||
view2.value = true
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading1 = false
|
||||
loading.value = false
|
||||
})
|
||||
isWaveCharts.value = true
|
||||
|
||||
nextTick(() => {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(200, 345)
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -126,7 +129,7 @@ const tableStore: any = new TableStore({
|
||||
name: 'edit',
|
||||
title: '波形下载',
|
||||
type: 'primary',
|
||||
loading:'loading2',
|
||||
loading: 'loading2',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
@@ -153,7 +156,7 @@ const tableStore: any = new TableStore({
|
||||
tableStore.table.params.list = tableParams.value.list
|
||||
tableStore.table.params.type = 3
|
||||
},
|
||||
loadCallback: () => {}
|
||||
loadCallback: () => { }
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
const isWaveCharts = ref(false)
|
||||
|
||||
@@ -235,7 +235,7 @@ const init = async () => {
|
||||
let obj = {
|
||||
...trendRequestData.value,
|
||||
list: lists,
|
||||
valueType: searchForm.value.type,
|
||||
// valueType: searchForm.value.type,
|
||||
dataLevel: searchForm.value.dataLevel,
|
||||
valueType: searchForm.value.valueType,
|
||||
startTime: datePickerRef.value && datePickerRef.value.timeValue[0],
|
||||
@@ -389,6 +389,7 @@ const init = async () => {
|
||||
// console.log("🚀 ~ unitList.forEach ~ unitList:", unitList)
|
||||
|
||||
if (chartsList.length > 0) {
|
||||
let yData: any = []
|
||||
echartsData.value.yAxis = []
|
||||
let setList = [...new Set(unitList)];
|
||||
|
||||
@@ -396,6 +397,7 @@ const init = async () => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
yData.push([])
|
||||
let right = {
|
||||
position: 'right',
|
||||
offset: (index - 1) * 80
|
||||
@@ -446,7 +448,7 @@ const init = async () => {
|
||||
let seriesList: any = []
|
||||
kk.forEach((cc: any) => {
|
||||
if (cc.statisticalData !== null) {
|
||||
yMethodList.push(cc.statisticalData?.toFixed(2) - 0)
|
||||
yData[setList.indexOf(kk[0].unit)].push(cc.statisticalData?.toFixed(2))
|
||||
}
|
||||
|
||||
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit, lineStyle[lineS].type])
|
||||
@@ -466,7 +468,12 @@ const init = async () => {
|
||||
yAxisIndex: setList.indexOf(kk[0].unit)
|
||||
})
|
||||
})
|
||||
let [min, max] = yMethod(yMethodList)
|
||||
// let [min, max] = yMethod(yMethodList)
|
||||
// echartsData.value.yAxis[index].min = min
|
||||
// echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
yData.forEach((item: any, index: any) => {
|
||||
let [min, max] = yMethod(item)
|
||||
echartsData.value.yAxis[index].min = min
|
||||
echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user