修改测试bug
This commit is contained in:
@@ -79,4 +79,12 @@ export const addProject = (data: any) => {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改项目
|
||||
export const updateProjects = (data: any) => {
|
||||
return request({
|
||||
url: '/cs-device-boot/engineeringProjectRelation/updateProject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ const init = () => {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: (params: any) => {
|
||||
console.log('🚀 ~ init ~ params:', params)
|
||||
if (!params || params.length === 0) return ''
|
||||
|
||||
// 使用第一个项目的轴标签作为时间标题
|
||||
@@ -90,8 +89,6 @@ const initData = async (row: any) => {
|
||||
let [min, max] = yMethod(res.data.map((item: any) => item.value.split(',')).flat())
|
||||
|
||||
// 从第一条数据中提取时间作为x轴数据
|
||||
const firstItem = res.data[0]
|
||||
const xAxisData = firstItem.time.split(',')
|
||||
|
||||
// 定义相位颜色映射
|
||||
const phaseColors: any = {
|
||||
@@ -107,6 +104,7 @@ const initData = async (row: any) => {
|
||||
return a.phasic.localeCompare(b.phasic)
|
||||
})
|
||||
.map((item: any) => {
|
||||
const xAxisData = item.time.split(',')
|
||||
const values = xAxisData.map((time: string, index: number) => {
|
||||
// 将传入的日期与时间拼接成完整的时间字符串
|
||||
const fullTime = `${row.time} ${time}`
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
isGroup
|
||||
></Table>
|
||||
<!-- 指标日趋势图 -->
|
||||
<DailyTrendChart v-if="dialogTrendChart" ref="dailyTrendChartRef" @close="dialogTrendChart = false" />
|
||||
<HarmonicRatio ref="harmonicRatioRef" v-if="dialogFlag" @close="onHarmonicRatioClose" :showIndex="false" />
|
||||
<!-- <DailyTrendChart v-if="dialogTrendChart" ref="dailyTrendChartRef" @close="dialogTrendChart = false" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -31,9 +32,10 @@ import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getTimeOfTheMonth } from '@/utils/formatTime'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import DailyTrendChart from '@/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue'
|
||||
import { getTime } from '@/utils/formatTime'
|
||||
|
||||
import HarmonicRatio from '@/components/cockpit/overLimitStatistics/components/harmonicRatio.vue'
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number] },
|
||||
h: { type: [String, Number] },
|
||||
@@ -47,7 +49,7 @@ const prop = defineProps({
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const headerHeight = ref(57)
|
||||
|
||||
const harmonicRatioRef: any = ref(null)
|
||||
const dialogTrendChart = ref(false)
|
||||
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
@@ -118,7 +120,7 @@ const tableStore: any = new TableStore({
|
||||
field: 'extent',
|
||||
minWidth: '70',
|
||||
formatter: (row: any) => {
|
||||
return Math.floor(row.cellValue * 100) / 100
|
||||
return Math.floor(row.cellValue * 100) / 100
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -143,23 +145,14 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
loadCallback: () => {
|
||||
// 定义 x 轴标签顺序
|
||||
const xAxisLabels = ['长时闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡']
|
||||
|
||||
// 根据指标名称顺序提取对应的 extent 数据
|
||||
const chartData = xAxisLabels.map(label => {
|
||||
// 在表格数据中查找对应指标名称的数据项
|
||||
const item = tableStore.table.data.find((row: any) => row.name === label)
|
||||
// 如果找到对应项,则返回 extent 值,否则返回 0,并保留两位小数
|
||||
const extentValue = item ? item.extent || 0 : 0
|
||||
return Math.round(extentValue * 100) / 100
|
||||
})
|
||||
echartList.value = {
|
||||
title: {
|
||||
text: '指标越限严重度'
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
data: xAxisLabels
|
||||
data: tableStore.table.data.map((item: any) => item.name)
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
@@ -175,7 +168,7 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
type: 'bar',
|
||||
name: '越限占比',
|
||||
data: chartData,
|
||||
data: tableStore.table.data.map((item: any) => Math.floor(item.extent * 100) / 100),
|
||||
barMaxWidth: 30
|
||||
}
|
||||
]
|
||||
@@ -188,15 +181,32 @@ const tableRef = ref()
|
||||
provide('tableRef', tableRef)
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const codeMap = [
|
||||
{ key: '闪变', code: 'flickerOvertime' },
|
||||
{ key: '电压偏差', code: 'voltageDevOvertime' },
|
||||
{ key: '三相', code: 'ubalanceOvertime' },
|
||||
{ key: '谐波电压', code: 'uharm' },
|
||||
{ key: '谐波电流', code: 'iharm' },
|
||||
];
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
dialogTrendChart.value = true
|
||||
|
||||
if (column.field == 'maxValue' && row.lineId) {
|
||||
nextTick(() => {
|
||||
dailyTrendChartRef.value.open(row)
|
||||
if (column.field == 'maxValue' ) {
|
||||
if(row.lineId==null){
|
||||
ElMessage.info('暂无越限监测点!')
|
||||
}else{
|
||||
nextTick(() => {
|
||||
// dailyTrendChartRef.value.open(row)
|
||||
dialogFlag.value = true
|
||||
nextTick(() => {
|
||||
|
||||
const code = codeMap.find(item => row.name.includes(item.key))?.code || '';
|
||||
harmonicRatioRef.value.openDialog(row,code,column.title.replace(/次/g, ""))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,6 +228,14 @@ const setTime = () => {
|
||||
console.warn('获取时间失败,time 不是一个有效数组')
|
||||
}
|
||||
}
|
||||
const dialogFlag=ref(false)
|
||||
// 谐波弹窗关闭时的回调
|
||||
const onHarmonicRatioClose = () => {
|
||||
dialogFlag.value = false
|
||||
// 重新打开指标越限详情弹窗
|
||||
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
|
||||
@@ -93,15 +93,7 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.flickerOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(%)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(%)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '电压偏差越限(%)',
|
||||
field: 'voltageDevOvertime',
|
||||
width: '100',
|
||||
@@ -119,6 +111,15 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.ubalanceOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(%)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(%)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// title: '频率偏差越限(%)',
|
||||
|
||||
@@ -93,15 +93,7 @@ const tableStore: any = new TableStore({
|
||||
customTemplate: (row: any) => {
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.flickerOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(分钟)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(分钟)',
|
||||
children: loop50('iharm')
|
||||
}, {
|
||||
}, {
|
||||
title: '电压偏差越限(分钟)',
|
||||
field: 'uaberranceOvertime',
|
||||
width: '100',
|
||||
@@ -119,6 +111,14 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.ubalanceOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(分钟)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(分钟)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
|
||||
// {
|
||||
// title: '频率偏差越限(分钟)',
|
||||
|
||||
@@ -73,15 +73,7 @@ const tableStore: any = new TableStore({
|
||||
field: 'flicker',
|
||||
width: '80'
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(分钟)',
|
||||
children: loop50('voltage')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(分钟)',
|
||||
children: loop50('harmonicCurrent')
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '三相不平衡度越限(分钟)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
@@ -95,7 +87,16 @@ const tableStore: any = new TableStore({
|
||||
title: '频率偏差越限(分钟)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(分钟)',
|
||||
children: loop50('voltage')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(分钟)',
|
||||
children: loop50('harmonicCurrent')
|
||||
},
|
||||
|
||||
],
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {
|
||||
|
||||
@@ -92,15 +92,7 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.flicker}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(分钟)',
|
||||
children: loop50('voltage')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(分钟)',
|
||||
children: loop50('harmonicCurrent')
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '三相不平衡度越限(分钟)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
@@ -114,7 +106,16 @@ const tableStore: any = new TableStore({
|
||||
title: '频率偏差越限(分钟)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(分钟)',
|
||||
children: loop50('voltage')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(分钟)',
|
||||
children: loop50('harmonicCurrent')
|
||||
},
|
||||
|
||||
],
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {
|
||||
|
||||
@@ -93,15 +93,7 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.flickerOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(%)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(%)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '电压偏差越限(%)',
|
||||
field: 'voltageDevOvertime',
|
||||
width: '100',
|
||||
@@ -119,6 +111,15 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.ubalanceOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(%)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(%)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// title: '频率偏差越限(%)',
|
||||
|
||||
@@ -5,10 +5,22 @@
|
||||
ref="TableHeaderRef"
|
||||
:showReset="false"
|
||||
@selectChange="selectChange"
|
||||
|
||||
v-if="fullscreen"
|
||||
:timeKeyList="prop.timeKey"
|
||||
></TableHeader>
|
||||
>
|
||||
<template #select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
style="width: 240px"
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入监测点名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table
|
||||
ref="tableRef"
|
||||
@cell-click="cellClickEvent"
|
||||
@@ -189,7 +201,7 @@ const tableStore: any = new TableStore({
|
||||
field: 'volGrade',
|
||||
minWidth: '80',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue==0?'/': row.cellValue+'kV' || '/'
|
||||
return row.cellValue == 0 ? '/' : row.cellValue + 'kV' || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -236,7 +248,8 @@ const tableStore: any = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作', fixed: 'right',
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
@@ -294,6 +307,7 @@ const tableStore: any = new TableStore({
|
||||
const tableRef = ref()
|
||||
provide('tableRef', tableRef)
|
||||
tableStore.table.params.keywords = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const setTime = () => {
|
||||
@@ -304,7 +318,6 @@ const setTime = () => {
|
||||
// ? [tableStore.table.params.searchBeginTime, tableStore.table.params.searchEndTime]
|
||||
// : prop.timeValue
|
||||
// )
|
||||
|
||||
// if (Array.isArray(time)) {
|
||||
// tableStore.table.params.searchBeginTime = time[0]
|
||||
// tableStore.table.params.searchEndTime = time[1]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog draggable title="趋势图" v-model="dialogVisible" append-to-body width="70%">
|
||||
<el-dialog draggable :title="titles" v-model="dialogVisible" append-to-body width="70%">
|
||||
<!-- 总体指标占比详情谐波含有率 -->
|
||||
<div>
|
||||
<TableHeader ref="tableHeaderRef" :showSearch="false" @selectChange="selectChange">
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-form-item>
|
||||
<DatePicker ref="datePickerRef"></DatePicker>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计指标" label-width="80px">
|
||||
<el-form-item label="统计指标" label-width="80px" v-if="props.showIndex">
|
||||
<el-select
|
||||
multiple
|
||||
:multiple-limit="2"
|
||||
@@ -107,9 +107,14 @@ defineOptions({
|
||||
const props = defineProps({
|
||||
TrendList: {
|
||||
type: Array
|
||||
},
|
||||
showIndex:{
|
||||
type: Boolean,
|
||||
default: true
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
const titles = ref('趋势图')
|
||||
const dialogVisible: any = ref(false)
|
||||
// console.log("🚀 ~ props:", props.TrendList)
|
||||
const showEchart = ref(true)
|
||||
@@ -268,6 +273,7 @@ const lineStyle = [{ type: 'solid' }, { type: 'dashed' }, { type: 'dotted' }]
|
||||
const init = async () => {
|
||||
loading.value = true
|
||||
// 选择指标的时候切换legend内容和data数据
|
||||
echartsData.value = {}
|
||||
let list: any = []
|
||||
legendDictList.value?.selectedList?.map((item: any) => {
|
||||
searchForm.value.index.map((vv: any) => {
|
||||
@@ -407,6 +413,7 @@ const setEchart = () => {
|
||||
formatter(params: any) {
|
||||
const xname = params[0].value[0]
|
||||
let str = `${xname}<br>`
|
||||
|
||||
params.forEach((el: any, index: any) => {
|
||||
let marker = ''
|
||||
|
||||
@@ -651,6 +658,7 @@ watch(
|
||||
)
|
||||
|
||||
const openDialog = async (row: any, field: any, title: any) => {
|
||||
titles.value = `${row?.lineName ? `${row.lineName}_` : ''}趋势图`
|
||||
dialogVisible.value = true
|
||||
trendRequestData.value = row
|
||||
|
||||
|
||||
@@ -92,14 +92,6 @@ const tableStore: any = new TableStore({
|
||||
customTemplate: (row: any) => {
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.flickerOvertime}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '谐波电压越限(%)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(%)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
{
|
||||
title: '电压偏差越限(%)',
|
||||
@@ -119,7 +111,16 @@ const tableStore: any = new TableStore({
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.ubalanceOvertime}</span>`
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '谐波电压越限(%)',
|
||||
children: loop50('uharm')
|
||||
},
|
||||
{
|
||||
title: '谐波电流越限(%)',
|
||||
children: loop50('iharm')
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// title: '频率偏差越限(%)',
|
||||
// field: 'freqDevOvertime',
|
||||
|
||||
@@ -5,10 +5,22 @@
|
||||
ref="TableHeaderRef"
|
||||
:showReset="false"
|
||||
@selectChange="selectChange"
|
||||
|
||||
v-if="fullscreen"
|
||||
:timeKeyList="prop.timeKey"
|
||||
></TableHeader>
|
||||
>
|
||||
<template #select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
style="width: 240px"
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入敏感负荷名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table
|
||||
ref="tableRef"
|
||||
@cell-click="cellClickEvent"
|
||||
@@ -66,7 +78,7 @@ const fullscreen = computed(() => {
|
||||
|
||||
const OverLimitDetailsRef = ref()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/getList',
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/getListByUser',
|
||||
method: 'POST',
|
||||
showPage: fullscreen.value ? true : false,
|
||||
column: [
|
||||
@@ -115,7 +127,7 @@ const tableStore: any = new TableStore({
|
||||
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
const tableRef = ref()
|
||||
provide('tableRef', tableRef)
|
||||
|
||||
@@ -137,7 +149,6 @@ const setTime = () => {
|
||||
// ? [tableStore.table.params.searchBeginTime, tableStore.table.params.searchEndTime]
|
||||
// : prop.timeValue
|
||||
// )
|
||||
|
||||
// if (Array.isArray(time)) {
|
||||
// tableStore.table.params.searchBeginTime = time[0]
|
||||
// tableStore.table.params.searchEndTime = time[1]
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<el-dialog draggable title="暂态事件详情 " v-model="dialogVisible" append-to-body width="70%">
|
||||
<TableHeader datePicker showExport :showReset="false" ref="tableHeaderRef" @selectChange="selectChange">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="监测点">
|
||||
<el-select v-model="tableStore.table.params.lineId" placeholder="请选择监测点名称">
|
||||
<el-form-item label="监测点" v-if="props.showLine">
|
||||
<el-select v-model="tableStore.table.params.lineId" filterable placeholder="请选择监测点名称">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
@@ -14,6 +14,21 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="暂态类型">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.eventType"
|
||||
style="min-width: 150px"
|
||||
clearable
|
||||
placeholder="请选择暂态类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" isGroup :height="heightRef"></Table>
|
||||
@@ -46,6 +61,13 @@ import { mainHeight } from '@/utils/layout'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { getSimpleLine } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||
interface Props {
|
||||
showLine?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showLine: true
|
||||
})
|
||||
|
||||
const dialogVisible: any = ref(false)
|
||||
const waveFormAnalysisRef: any = ref(null)
|
||||
@@ -62,7 +84,11 @@ const heightRef = ref(mainHeight(168, 2.1).height)
|
||||
const selectChange = (flag: boolean, h: any) => {
|
||||
heightRef.value = mainHeight(h, 2.1).height
|
||||
}
|
||||
|
||||
const eventList = [
|
||||
{ label: '电压暂降', value: '1' },
|
||||
{ label: '电压中断', value: '2' },
|
||||
{ label: '电压暂升', value: '3' }
|
||||
]
|
||||
const getSimpleLineList = async () => {
|
||||
const res = await getSimpleLine()
|
||||
options.value = res.data
|
||||
@@ -200,9 +226,10 @@ const tableStore: any = new TableStore({
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.eventType = ''
|
||||
provide('tableStore', tableStore)
|
||||
const open = async (time: any) => {
|
||||
tableStore.table.params.eventType = ''
|
||||
dialogVisible.value = true
|
||||
getSimpleLineList()
|
||||
tableStore.table.params.lineId = ''
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@selectChange="selectChange"
|
||||
datePicker
|
||||
v-if="fullscreen"
|
||||
:timeKeyList="prop.timeKey"
|
||||
:timeKeyList="prop.timeKey"
|
||||
></TableHeader>
|
||||
<el-calendar
|
||||
v-model="value"
|
||||
@@ -58,7 +58,7 @@
|
||||
</template>
|
||||
</el-calendar>
|
||||
<!-- 暂态事件列表 -->
|
||||
<TransientList ref="transientListRef" />
|
||||
<TransientList ref="transientListRef" :showLine="false" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -74,7 +74,7 @@ const prop = defineProps({
|
||||
h: { type: [String, Number] },
|
||||
width: { type: [String, Number] },
|
||||
height: { type: [String, Number] },
|
||||
timeKey: { type: Array as () => string[] },
|
||||
timeKey: { type: Array as () => string[] },
|
||||
timeValue: { type: Object },
|
||||
interval: { type: Number }
|
||||
})
|
||||
|
||||
@@ -14,6 +14,21 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="暂态类型">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.eventType"
|
||||
style="min-width: 150px"
|
||||
clearable
|
||||
placeholder="请选择暂态类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" isGroup :height="heightRef"></Table>
|
||||
@@ -62,7 +77,11 @@ const heightRef = ref(mainHeight(168, 2.2).height)
|
||||
const selectChange = (flag: boolean, h: any) => {
|
||||
heightRef.value = mainHeight(h, 2.2).height
|
||||
}
|
||||
|
||||
const eventList = [
|
||||
{ label: '电压暂降', value: '1' },
|
||||
{ label: '电压中断', value: '2' },
|
||||
{ label: '电压暂升', value: '3' }
|
||||
]
|
||||
const getSimpleLineList = async () => {
|
||||
const res = await getSimpleLine()
|
||||
options.value = res.data
|
||||
@@ -201,9 +220,10 @@ const tableStore: any = new TableStore({
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.eventType = ''
|
||||
provide('tableStore', tableStore)
|
||||
const open = async (row: any, searchBeginTime: any, searchEndTime: any) => {
|
||||
tableStore.table.params.eventType = ''
|
||||
dialogVisible.value = true
|
||||
getSimpleLineList()
|
||||
tableStore.table.params.lineId = row.id
|
||||
|
||||
@@ -748,8 +748,10 @@ const initWave = (
|
||||
rotation: 0,
|
||||
y: -10
|
||||
},
|
||||
max: rmscm[0]?.[1] * 1.06 || 0,
|
||||
min: rmscu[0]?.[1] - rmscu[0]?.[1] * 0.2 || 0,
|
||||
// max: rmscm[0]?.[1] * 1.06 || 0,
|
||||
// min: rmscu[0]?.[1] - rmscu[0]?.[1] * 0.2 || 0,
|
||||
max: Math.floor((rmscm[0]?.[1] * 1.06 || 0) * 1.1 * 10) / 10,
|
||||
min: Math.floor((rmscu[0]?.[1] - rmscu[0]?.[1] * 0.2 || 0) * 10) / 10,
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
opposite: false,
|
||||
@@ -780,11 +782,11 @@ const initWave = (
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
left: '60px',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
top: '60px'
|
||||
// containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
@@ -1077,6 +1079,8 @@ const drawPics = (
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
opposite: false,
|
||||
// max: Math.floor((rmscm[0]?.[1] * 1.06 || 0) * 1.1 * 10) / 10,
|
||||
// min: Math.floor((rmscu[0]?.[1] - rmscu[0]?.[1] * 0.2 || 0) * 10) / 10,
|
||||
nameTextStyle: {
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
@@ -1105,11 +1109,11 @@ const drawPics = (
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
left: '60px',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
top: '60px'
|
||||
// containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
|
||||
@@ -481,8 +481,10 @@ const initWave = (
|
||||
},
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
max: max.toFixed(2) * 1.1,
|
||||
min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
||||
// max: max.toFixed(2) * 1.1,
|
||||
// min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
||||
max: Math.floor(max.toFixed(2) * 1.1 * 10) / 10,
|
||||
min: Math.floor(min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1 * 10) / 10 ,
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
fontSize: '12px',
|
||||
@@ -512,11 +514,11 @@ const initWave = (
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
left: '60px',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
top: '60px'
|
||||
// containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
@@ -789,8 +791,8 @@ const drawPics = (
|
||||
},
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
max: max.toFixed(2) * 1.1,
|
||||
min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
||||
max: Math.floor(max.toFixed(2) * 1.1 * 10) / 10,
|
||||
min: Math.floor(min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1 * 10) / 10 ,
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
fontSize: '12px',
|
||||
@@ -820,11 +822,11 @@ const drawPics = (
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
left: '60px',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
top: '60px'
|
||||
// containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog draggable class="cn-operate-dialog" width="520px" v-model.trim="dialogVisible" :title="title">
|
||||
<el-dialog draggable class="cn-operate-dialog" width="540px" v-model.trim="dialogVisible" :title="title">
|
||||
<el-form :inline="false" ref="formRef" :model="form" label-width="auto" class="form-one" :rules="rules">
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="form.name" placeholder="请输入项目名称" />
|
||||
@@ -23,14 +23,9 @@
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input maxlength="32" show-word-limit-number v-model.number="form.sort" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拓扑图" prop="sort">
|
||||
<el-form-item label="拓扑图">
|
||||
<div class="image-radio-group">
|
||||
<div
|
||||
class="image-radio-item"
|
||||
v-for="item in images"
|
||||
:key="item.id"
|
||||
@click="handleSelect(item.id)"
|
||||
>
|
||||
<div class="image-radio-item" v-for="item in images" :key="item.id" @click="handleSelect(item.id)">
|
||||
<el-radio :label="item.id" v-model="form.topoIds" class="hidden-radio">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
@@ -64,7 +59,7 @@ import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { add, update } from '@/api/user-boot/role'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { addProject, updateProject } from '@/api/cs-device-boot/edData'
|
||||
import { addProject, updateProjects } from '@/api/cs-device-boot/edData'
|
||||
import { getTopoTemplate } from '@/api/cs-device-boot/topologyTemplate'
|
||||
import { getFileUrl } from '@/api/system-boot/file'
|
||||
const adminInfo = useAdminInfo()
|
||||
@@ -124,13 +119,11 @@ const open = (text: string, List: any, data?: anyObj, id?: string) => {
|
||||
}
|
||||
const submit = async () => {
|
||||
formRef.value.validate(async valid => {
|
||||
console.log("🚀 ~ submit ~ form.topoIds:", form.topoIds)
|
||||
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
await updateProject({ ...form ,topoIds:[form.topoIds]})
|
||||
await updateProjects({ ...form, topoIds: form.topoIds == '' ? [] : [form.topoIds] })
|
||||
} else {
|
||||
await addProject({ ...form,topoIds:[form.topoIds] })
|
||||
await addProject({ ...form, topoIds: form.topoIds == '' ? [] : [form.topoIds] })
|
||||
}
|
||||
ElMessage.success('保存成功')
|
||||
tableStore.index()
|
||||
@@ -150,7 +143,11 @@ const getImageList = async () => {
|
||||
}
|
||||
|
||||
const handleSelect = (filePath: any) => {
|
||||
form.topoIds = filePath
|
||||
if (form.topoIds == filePath) {
|
||||
form.topoIds = ''
|
||||
} else {
|
||||
form.topoIds = filePath
|
||||
}
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div style="display: flex">
|
||||
<div style="width: 800px">
|
||||
<el-row v-loading="tableStore.table.loading">
|
||||
<el-col :span="11">
|
||||
<div class="custom-table-header">
|
||||
<div class="title">工程列表</div>
|
||||
<div class="title">
|
||||
工程列表
|
||||
<el-input
|
||||
class="ml10"
|
||||
v-model="searchValue"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@input="inpChaange"
|
||||
/>
|
||||
</div>
|
||||
<el-button :icon="Plus" type="primary" @click="addRole" class="ml10">新增工程</el-button>
|
||||
</div>
|
||||
<Table ref="tableRef" @currentChange="currentChange" />
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<div class="custom-table-header">
|
||||
<div class="title">項目列表</div>
|
||||
|
||||
@@ -25,17 +35,19 @@
|
||||
<vxe-column field="projectName" title="项目名称"></vxe-column>
|
||||
<vxe-column field="projectArea" title="地址"></vxe-column>
|
||||
|
||||
<vxe-column title="拓扑图">
|
||||
<vxe-column field="projectRemark" title="备注"></vxe-column>
|
||||
<vxe-column title="拓扑图" width="100px">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
:hide-on-click-modal="true"
|
||||
:preview-teleported="true"
|
||||
v-if="row.topologyInfo"
|
||||
:preview-src-list="[row.topologyImageUrl]"
|
||||
:src="getUrl(row) ? row.topologyImageUrl : ''"
|
||||
></el-image>
|
||||
<span v-else>/</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="projectRemark" title="备注"></vxe-column>
|
||||
<vxe-column field="projectSort" title="排序" width="80px"></vxe-column>
|
||||
<vxe-column title="操作" width="180px">
|
||||
<template #default="{ row }">
|
||||
@@ -64,8 +76,8 @@
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 新增工程 -->
|
||||
<popup ref="popupRef" @save="save" />
|
||||
<!-- 新增項目 -->
|
||||
@@ -78,7 +90,7 @@ import { Plus } from '@element-plus/icons-vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { delTemplate, deleteSysExcel, bandRelation, queryList } from '@/api/harmonic-boot/luckyexcel'
|
||||
import { deleteProject ,deleteEngineering} from '@/api/cs-device-boot/edData'
|
||||
import { deleteProject, deleteEngineering } from '@/api/cs-device-boot/edData'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
@@ -92,13 +104,16 @@ defineOptions({
|
||||
const height = mainHeight(80)
|
||||
const volConTypeList: any = dictData.getBasicData('Dev_Connect')
|
||||
import { getFileUrl } from '@/api/system-boot/file'
|
||||
|
||||
const popupRef = ref()
|
||||
const tableRef = ref()
|
||||
const tableRef1 = ref()
|
||||
const itemList = ref([])
|
||||
const searchValue = ref('')
|
||||
const itemList: any = ref([])
|
||||
const menuListId = ref([])
|
||||
const itemAddRef = ref()
|
||||
const engineeringId = ref('')
|
||||
const tableList = ref([])
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-device-boot/engineeringProjectRelation/list',
|
||||
method: 'POST',
|
||||
@@ -161,17 +176,30 @@ const tableStore: any = new TableStore({
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
if (engineeringId.value == '') {
|
||||
engineeringId.value = tableStore.table.data[0].engineeringId
|
||||
}
|
||||
let list = tableStore.table.data.filter((item: any) => item.engineeringId == engineeringId.value)
|
||||
tableRef.value.getRef().setCurrentRow(list[0])
|
||||
itemList.value = list[0].projectInfoList
|
||||
tableList.value = JSON.parse(JSON.stringify(tableStore.table.data))
|
||||
setTableRow()
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 过滤
|
||||
const inpChaange = (val: any) => {
|
||||
engineeringId.value = ''
|
||||
if (val == '') {
|
||||
tableStore.table.data = tableList.value
|
||||
} else {
|
||||
tableStore.table.data = tableList.value.filter((item: any) => item.engineeringName.includes(val))
|
||||
}
|
||||
setTableRow()
|
||||
}
|
||||
const setTableRow = () => {
|
||||
if (engineeringId.value == '') {
|
||||
engineeringId.value = tableStore.table.data[0].engineeringId
|
||||
}
|
||||
let list = tableStore.table.data.filter((item: any) => item.engineeringId == engineeringId.value)
|
||||
tableRef.value.getRef().setCurrentRow(list[0] ?? {})
|
||||
itemList.value = list?.[0]?.projectInfoList ?? []
|
||||
}
|
||||
// 修改模版
|
||||
const itemModification = (row: any) => {
|
||||
itemAddRef.value.open('新增项目', tableStore.table.data, row, engineeringId.value)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div v-show="show && lookShow" style="display: flex">
|
||||
<div style="width: 600px">
|
||||
<el-row v-show="show && lookShow">
|
||||
<el-col :span="10">
|
||||
<div class="custom-table-header">
|
||||
<div class="title">报表列表</div>
|
||||
<el-button :icon="Plus" type="primary" @click="addRole" class="ml10">新增报表</el-button>
|
||||
</div>
|
||||
<Table ref="tableRef" @currentChange="currentChange" />
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="custom-table-header">
|
||||
<div class="title">模版绑定</div>
|
||||
|
||||
@@ -61,8 +61,9 @@
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<luckysheet ref="luckysheetRef" v-if="!show" @shutDown="shutDown" />
|
||||
<!-- 查看 -->
|
||||
<look ref="lookRef" v-if="!lookShow" @shutDown="shutDown" />
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader :showReset="false" showExport>
|
||||
<template #select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
style="width: 240px"
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入敏感负荷名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user