修改数据中心问题

This commit is contained in:
GGJ
2024-11-08 16:30:12 +08:00
parent a4b6bb111b
commit 7640b53b20
12 changed files with 874 additions and 456 deletions

View File

@@ -13,11 +13,10 @@ import 'echarts-liquidfill'
import 'echarts/lib/component/dataZoom'
import { color, gradeColor3 } from './color'
import { useConfig } from '@/stores/config'
import { saveAs } from 'file-saver'
import { t } from 'vxe-table'
const config = useConfig()
// import { nextTick } from 'process'
const config = useConfig()
color[0] = config.layout.elementUiPrimary[0]
const chartRef = ref<HTMLDivElement>()

View File

@@ -0,0 +1,266 @@
<template>
<div id="chart-container" v-loading="tableStore.table.loading"
:style="`height: calc(${tableStore.table.height} - 125px)`"></div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import * as echarts from 'echarts';
import { useDictData } from '@/stores/dictData'
import { useConfig } from '@/stores/config'
const config = useConfig()
const dictData = useDictData()
const options = ref({})
const TableHeaderRef = ref()
const tableStoreParams: any = ref({})
const loading = ref(false)
const getTableStoreParams = async (val: any) => {
tableStoreParams.value = val
loading.value = true
setTimeout(() => {
tableStore.index()
}, 1500)
}
const tableStore = new TableStore({
url: '/harmonic-boot/steadyExceedRate/getSteadyExceedRateCensus',
showPage: false,
method: 'POST',
column: [],
beforeSearchFun: () => {
tableStore.table.params = tableStoreParams.value
},
loadCallback: () => {
let code = tableStore.table.params.statisticalType.code
let title = '',
titleX = ''
if (code == 'Power_Network') {
title = '区域'
titleX = '区域'
} else if (code == 'Manufacturer') {
title = '终端厂家'
titleX = '终端\n厂家'
} else if (code == 'Voltage_Level') {
title = '电压等级'
titleX = '电压\n等级'
} else if (code == 'Load_Type') {
title = '干扰源类型'
titleX = '干扰\n源类型'
}
const chart = echarts.init(document.getElementById('chart-container'));
let data = tableStore.table.data.steadyExceedRate
let ydata = tableStore.table.data.type
for (var i = 0; i < tableStore.table.data.time.length; i++) {
if (i != 0) {
i
tableStore.table.data.time[i] = tableStore.table.data.time[i].slice(5)
} else if (i == 0) {
let date = tableStore.table.data.time[i].slice(5)
let t = tableStore.table.data.time[i].slice(0, 4)
tableStore.table.data.time[i] = date + '\n' + '(' + t + ')'
}
}
let xdata = tableStore.table.data.time
let arr = []
for (var i = 0; i < data.length; i++) {
for (var j = 0; j < data[i].length; j++) {
if (data[i][j] == 3.14159 || data[i][j] == 0) {
arr.push([i, j, 0])
} else if (data[i][j] == 3.1415) {
arr.push([i, j, '/'])
} else {
arr.push([i, j, data[i][j]])
}
}
}
// 配置项
const option = {
title: {
text: '稳态指标符合性占比' + '(统计类型' + title + ')',
left: 'center',
// textStyle: {
color: '#000',
fontSize: 18,
},
toolbox: {
right: 20,
top: 20,
feature: {
saveAsImage: {
title: '保存图片',
},
},
emphasis: {
iconStyle: {
borderColor: config.layout.elementUiPrimary[0], // 鼠标悬停时的边框颜色
color: config.layout.elementUiPrimary[0] // 鼠标悬停时的图标颜色
}
},
},
grid: {
top: '60px',
left: '30px',
right: '70px',
bottom: '40px',
containLabel: true,
},
dataZoom: [
{
type: 'inside',
height: 13,
start: 0,
bottom: '20px',
end: 100
},
{
start: 0,
height: 13,
bottom: '20px',
end: 100
}
],
visualMap: {
min: 0,
max: 100,
text: ['', '稳态指标符合性占比(%)'],
//calculable: true,
orient: 'horizontal',
top: '0px',
right: '50px',
inRange: {
color: ['#ccc', '#CC0000', "#339966"]
}
},
tooltip: {
trigger: 'item',
axisPointer: {
type: 'shadow',
label: {
color: '#fff',
fontSize: 16
}
},
textStyle: {
color: '#fff',
fontStyle: 'normal',
opacity: 0.35,
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0,
confine: true,
formatter: function (param) {
let msg = ''
if (param.value[2] === 0) {
msg += ydata[param.value[1]] + '<br/>'
if (xdata[param.value[0]].length == 1) {
msg += '时间:' + xdata[param.value[0]] + '月<br/>'
msg += param.seriesName + ':暂无数据'
} else if (xdata[param.value[0]].length == 8) {
let p = xdata[param.value[0]].slice(0, 2)
msg += '时间:' + p + '月<br/>'
msg += param.seriesName + ':暂无数据'
} else if (xdata[param.value[0]].length == 12) {
let r = xdata[param.value[0]].slice(0, 5)
msg += '时间:' + r + '<br/>'
msg += param.seriesName + ':暂无数据'
}
else {
msg += '时间:' + xdata[param.value[0]] + '<br/>'
msg += param.seriesName + ':暂无数据'
}
return msg
} else {
msg += ydata[param.value[1]] + '<br/>'
if (xdata[param.value[0]].length == 1) {
msg += '时间:' + xdata[param.value[0]] + '月<br/>'
msg += param.seriesName + ':' + param.value[2]
} else if (xdata[param.value[0]].length == 8) {
let p = xdata[param.value[0]].slice(0, 2)
msg += '时间:' + p + '月<br/>'
msg += param.seriesName + ':' + param.value[2]
} else if (xdata[param.value[0]].length == 12) {
let r = xdata[param.value[0]].slice(0, 5)
msg += '时间:' + r + '<br/>'
msg += param.seriesName + ':' + param.value[2]
}
else {
msg += '时间:' + xdata[param.value[0]] + '<br/>'
msg += param.seriesName + ':' + param.value[2]
}
return msg
}
},
},
xAxis: {
name: titleX,
type: 'category',
data: xdata,
},
yAxis: {
type: 'category',
data: ydata
},
series: [
{
name: '稳态指标符合性占比',
type: 'heatmap',
data: arr,
itemStyle: {
normal: {
// 随机显示
//color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}
// 定制显示(按顺序)
color: function (params) {
if (params.value == 3.14159 || params.value == 0) {
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ offset: 1, color: "#ccc" }], false);
}
}
},
},
label: {
normal: {
show: true,
fontSize: '12px',
color: '#fff'
}
},
}
]
};
// 使用配置项设置图表
chart.setOption(option);
}
})
provide('tableStore', tableStore)
onMounted(() => { })
defineExpose({ getTableStoreParams })
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,212 @@
<template>
<div class="default-main online">
<div class="online_header">
<TableHeader date-picker area ref="tableHeaderRef">
<template #select>
<el-form-item label="统计类型:">
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型"
value-key="id" style="width: 100%">
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="电压等级:">
<el-select v-model="tableStore.table.params.scale" multiple collapse-tags clearable
placeholder="请选择电压等级" style="width: 100%" value-key="id">
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="终端厂家:">
<el-select v-model="tableStore.table.params.manufacturer" multiple collapse-tags clearable
placeholder="请选择终端厂家" style="width: 100%" value-key="id">
<el-option v-for="(item, index) in terminaloption" :key="index" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="干扰源类型:">
<el-select v-model="tableStore.table.params.loadType" multiple collapse-tags clearable
placeholder="请选择干扰源类型" style="width: 100%" value-key="id">
<el-option v-for="(item, index) in interfereoption" :key="index" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
</div>
<div class="online_main">
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane :name="0" :lazy="true" label="稳态指标符合性占比表格">
<Table ref="tableRef" :tree-config="{ transform: true, parentField: 'pid' }"
:scroll-y="{ enabled: true }" v-if="activeName == 0" />
</el-tab-pane>
<el-tab-pane :name="1" :lazy="true" label="稳态指标符合性占比图">
<charts v-if="activeName == 1" ref="chartsRef" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, watch } from 'vue'
import { useDictData } from '@/stores/dictData'
import DatePicker from '@/components/form/datePicker/index.vue'
import { getAreaDept } from '@/api/harmonic-boot/area'
import TableHeader from '@/components/table/header/index.vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import charts from './components/charts.vue'
defineOptions({
name: 'harmonic-boot/area/SteadyState'
})
const tableRef = ref()
const onlineChartsRef = ref()
const dictData = useDictData()
//字典获取电压等级
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
//字典获取终端厂家
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
//字典获取干扰源类型
const interfereoption = dictData.getBasicData('Interference_Source')
//字典获取统计类型
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
//调用区域接口获取区域
const treeData = ref([])
const idArr = ref([])
const activeName = ref(0)
const getTreeData = async () => {
await getAreaDept().then(res => {
var data = res.data
data.forEach(element => {
idArr.value.push(element.id)
})
treeData.value = JSON.parse(JSON.stringify(res.data))
})
}
getTreeData()
const chartsRef = ref()
const handleClick = (tab: any, e: any) => {
// console.log(tab,e,"??????????");
// if(activeName.value===1){
tableStore.index()
// }
}
// const datePickerRef = ref()
const tableHeaderRef = ref()
const tableStore = new TableStore({
publicHeight: 60,
showPage: false,
url: '/harmonic-boot/steadyExceedRate/getSteadyExceedRateData',
method: 'POST',
column: [
{
title: '',
field: 'name',
align: 'left',
treeNode: true
},
{
title: '电压等级',
field: 'voltageLevel',
formatter: function (row) {
return row.cellValue ? row.cellValue : '/'
}
},
{
title: '厂家',
field: 'factoryName',
formatter: function (row) {
return row.cellValue ? row.cellValue : '/'
}
},
{
title: '网络参数',
field: 'networkParam',
formatter: function (row) {
return row.cellValue ? row.cellValue : '/'
}
},
{
title: '监测点名称',
field: 'lineName',
formatter: function (row) {
return row.cellValue ? row.cellValue : '/'
}
},
{
title: '符合性占比(%)',
field: 'steadyExceedRate',
formatter: function (row) {
return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue
}
}
],
loadCallback: () => {
let treeData = []
treeData = tree2List(tableStore.table.data)
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
tableStore.table.data = JSON.parse(JSON.stringify(treeData))
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
setTimeout(() => {
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
}, 0)
}
})
tableStore.table.params.statisticalType = classificationData[0]
tableStore.table.params.scale = []
tableStore.table.params.manufacturer = []
tableStore.table.params.loadType = []
tableStore.table.params.serverName = 'harmonicBoot'
provide('tableStore', tableStore)
const tree2List = (list: any, pid?: string) => {
//存储结果的数组
let arr: any = []
// 遍历 tree 数组
list.forEach((item: any) => {
// item.comFlag = item.comFlag == null ? 3 : item.comFlag
item.valueOver == 3.14159 ? 0 : item.valueOver >= 90 ? 1 : item.valueOver && item.valueOver < 90 ? 2 : 3
item.pid = pid
// 判断item是否存在children
if (!item.children) return arr.push(item)
// 函数递归对children数组进行tree2List的转换
const children = tree2List(item.children, item.id)
// 删除item的children属性
delete item.children
// 把item和children数组添加至结果数组
//..children: 意思是把children数组展开
arr.push(item, ...children)
})
// 返回结果数组
return arr
}
onMounted(() => { tableStore.index() })
</script>
<style lang="scss" scoped>
// .online {
// width: 100%;
// height: 100%;
// .online_header {
// width: 100%;
// max-height: 140px;
// padding: 10px;
// box-sizing: border-box;
// }
// .online_main {
// padding: 0 10px;
// }
// }</style>

View File

@@ -0,0 +1,189 @@
<template>
<div class="default-main">
<div v-show="view">
<TableHeader datePicker area>
<template #select>
<el-form-item label="筛选">
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" />
</el-form-item>
<el-form-item label="统计类型:">
<el-select v-model="tableStore.table.params.statisticalType" value-key="id"
placeholder="请选择统计类型">
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="电压等级:">
<el-select v-model="tableStore.table.params.scale" multiple collapse-tags clearable
value-key="id" placeholder="请选择电压等级">
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="终端厂家:">
<el-select v-model="tableStore.table.params.manufacturer" multiple collapse-tags clearable
value-key="id" placeholder="请选择终端厂家">
<el-option v-for="item in terminaloption" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="干扰源类型:">
<el-select v-model="tableStore.table.params.loadType" multiple collapse-tags clearable
value-key="id" placeholder="请选择干扰源类型">
<el-option v-for="item in interfereoption" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="view2">
<waveForm senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { mainHeight } from '@/utils/layout'
import waveForm from '@/components/echarts/waveForm.vue'
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
defineOptions({
name: 'harmonic-boot/area/TransientEventList'
})
const pageHeight = mainHeight(20)
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
const interfereoption = dictData.getBasicData('Interference_Source')
const eventList = dictData.getBasicData('Event_Statis')
const view = ref(true)
const view2 = ref(false)
const tableStore = new TableStore({
url: '/event-boot/transient/getTransientValue',
method: 'POST',
column: [
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'startTime', title: '暂降发生时刻', minWidth: "150" },
{ field: 'lineName', title: '监测点名称',minWidth: "90" },
{ field: 'gdName', title: '供电公司',minWidth: "90" },
{ field: 'subName', title: '变电站',minWidth: "150" },
{ field: 'ip', title: '网络参数',minWidth: "90" },
{ field: 'scale', title: '电压等级' ,minWidth: "90"},
{ field: 'advanceType', title: '暂降类型',minWidth: "90" },
{ field: 'advanceReason', title: '暂降原因' ,minWidth: "90",},
{
field: 'eventType', title: '暂态统计类型',minWidth: "100", formatter: (row: any) => {
return eventList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
field: 'severity', title: '严重度', minWidth: "80", formatter: (row: any) => {
return row.cellValue.toFixed(2)
}
},
{
field: 'featureAmplitude', title: '暂降幅值(%)',minWidth: "90", formatter: (row: any) => {
return (row.cellValue * 100).toFixed(2)
}
},
{
field: 'eventDescribe', title: '暂降深度(%)',minWidth: "90", formatter: (row: any) => {
let data: any = (100 - row.row.featureAmplitude * 100).toFixed(2)
return data >= 0 ? data : '/'
}
},
{ field: 'duration', title: '持续时间(s)' ,minWidth: "80",},
{
title: '操作',
width: '120',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '波形分析',
type: 'primary',
disabled: row => {
return row.fileFlag == 0
},
icon: 'el-icon-Plus',
render: 'basicButton',
click: async row => {
row.loading = true
boxoList.value = row
await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
.then(res => {
row.loading = false
if (res != undefined) {
wp.value = res.data
view.value = false
view2.value = true
}
})
.catch(() => {
row.loading = false
})
}
},
{
name: 'edit',
title: '暂无波形',
type: '',
disabled: row => {
return row.fileFlag == 1
},
icon: 'el-icon-Plus',
render: 'basicButton'
}
]
}
],
loadCallback: () => { }
})
tableStore.table.params.searchValue = ''
tableStore.table.params.statisticalType = classificationData.filter(item => item.name == '电网拓扑')[0]
tableStore.table.params.scale = []
tableStore.table.params.manufacturer = []
tableStore.table.params.loadType = []
tableStore.table.params.monitorFlag = 2
tableStore.table.params.powerFlag = 2
tableStore.table.params.statFlag = true
tableStore.table.params.isType = 0
const boxoList = ref({})
const wp = ref({})
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const backbxlb = () => {
view.value = true
view2.value = false
}
</script>

View File

@@ -1,10 +1,6 @@
<template>
<my-echart
v-loading="loading"
class="mt10"
:style="`height: calc(${tableStore.table.height} - 135px)`"
:options="options"
/>
<my-echart v-loading="loading" class="mt10" :style="`height: calc(${tableStore.table.height} - 135px)`"
:options="options" />
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
@@ -13,14 +9,10 @@ import Table from '@/components/table/index.vue'
import MyEchart from '@/components/echarts/MyEchart.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import * as echarts from 'echarts/core'
const dictData = useDictData()
const options = ref({})
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
const interfereoption = dictData.getBasicData('Interference_Source')
const TableHeaderRef = ref()
const tableStoreParams: any = ref({})
@@ -65,7 +57,7 @@ const tableStore = new TableStore({
title: {
text: title
},
tooltip: {
formatter: function (params: any) {
var tips = ''
@@ -82,7 +74,7 @@ const tableStore = new TableStore({
return tips
}
},
xAxis: {
name: titleX,
data: tableStore.table.data.type
@@ -95,98 +87,21 @@ const tableStore = new TableStore({
{
name: '',
type: 'bar',
barMinWidth: 40,
data: tableStore.table.data.single,
itemStyle: {
// barWidth: '50',
normal: {
// 随机显示
//color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}
// 定制显示(按顺序)
// color: function (params: any) {
// if (params.value >= 90) {
// return new echarts.graphic.LinearGradient(
// 0,
// 1,
// 0,
// 0,
// [
// {
// offset: 1,
// color: '#339966'
// }
// ],
// false
// )
// } else if (params.value >= 60 && params.value <= 90) {
// return new echarts.graphic.LinearGradient(
// 0,
// 1,
// 0,
// 0,
// [
// {
// offset: 1,
// color: '#FFCC33'
// }
// ],
// false
// )
// } else if (params.value <= 60 && params.value > 1) {
// return new echarts.graphic.LinearGradient(
// 0,
// 1,
// 0,
// 0,
// [
// {
// offset: 1,
// color: '#CC0000'
// }
// ],
// false
// )
// } else if (params.value > 0 && params.value <= 1) {
// return new echarts.graphic.LinearGradient(
// 0,
// 1,
// 0,
// 0,
// [
// {
// offset: 1,
// color: '#ccc'
// }
// ],
// false
// )
// }
// }
color: '#30DFE2'
}
},
markLine: {
silent: false,
symbol: 'circle',
show: false,
data: []
}
}
]
}
loading.value = false
}
})
// tableStore.table.params.statisticalType = classificationData.filter(item => item.name == '电网拓扑')[0]
// tableStore.table.params.monitorFlag = 2
// tableStore.table.params.powerFlag = 2
// tableStore.table.params.serverName = 'harmonicBoot'
// tableStore.table.params.deptIndex = '5699e5916a18a6381e1ac92da5bd2628'
provide('tableStore', tableStore)
onMounted(() => {})
onMounted(() => { })
defineExpose({ getTableStoreParams })
</script>
<style scoped lang="scss"></style>

View File

@@ -1,105 +1,35 @@
<template>
<div class="default-main online">
<div class="online_header">
<TableHeader date-picker ref="tableHeaderRef">
<TableHeader date-picker area ref="tableHeaderRef">
<template #select>
<el-form-item label="统计类型:">
<el-select
v-model="formData.statisticalType"
placeholder="请选择统计类型"
value-key="id"
style="width: 100%"
>
<el-option
v-for="item in classificationData"
:key="item.id"
:label="item.name"
:value="item"
></el-option>
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型"
value-key="id" style="width: 100%">
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="区域选择:">
<!-- <el-select ref="select1" v-model="deptName" placeholder="请选择所属部门区域" style="width: 100%">
<el-option :value="formData.deptIndex" style="height: auto"> -->
<!-- {{ formData.deptIndex }} -->
<el-cascader
v-model="formData.deptIndex"
:props="defaultProps"
:options="treeData"
clearable
filterable
collapse-tags
placeholder="请选择区域"
/>
<!-- <el-tree
ref="tree"
v-model="formData.deptName"
:data="treeData"
node-key="id"
accordion
:default-expanded-keys="idArr"
:props="defaultProps"
@node-click="handleNodeClick"
>
<template #default="{ node, data }">
<span :title="data.name">{{ data?.name }}</span>
</template>
</el-tree> -->
<!-- </el-option>
</el-select> -->
</el-form-item>
<el-form-item label="电压等级:">
<el-select
v-model="formData.scale"
multiple
collapse-tags
clearable
placeholder="请选择电压等级"
style="width: 100%"
value-key="id"
>
<el-option
v-for="item in voltageleveloption"
:key="item.id"
:label="item.name"
:value="item"
></el-option>
<el-select v-model="tableStore.table.params.scale" multiple collapse-tags clearable
placeholder="请选择电压等级" style="width: 100%" value-key="id">
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="终端厂家:">
<el-select
v-model="formData.manufacturer"
multiple
collapse-tags
clearable
placeholder="请选择终端厂家"
style="width: 100%"
value-key="id"
>
<el-option
v-for="(item, index) in terminaloption"
:key="index"
:label="item.name"
:value="item"
></el-option>
<el-select v-model="tableStore.table.params.manufacturer" multiple collapse-tags clearable
placeholder="请选择终端厂家" style="width: 100%" value-key="id">
<el-option v-for="(item, index) in terminaloption" :key="index" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="干扰源类型:">
<el-select
v-model="formData.loadType"
multiple
collapse-tags
clearable
placeholder="请选择干扰源类型"
style="width: 100%"
value-key="id"
>
<el-option
v-for="(item, index) in interfereoption"
:key="index"
:label="item.name"
:value="item"
></el-option>
<el-select v-model="tableStore.table.params.loadType" multiple collapse-tags clearable
placeholder="请选择干扰源类型" style="width: 100%" value-key="id">
<el-option v-for="(item, index) in interfereoption" :key="index" :label="item.name"
:value="item"></el-option>
</el-select>
</el-form-item>
</template>
@@ -108,12 +38,8 @@
<div class="online_main">
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane :name="0" :lazy="true" label="谐波畸变率统计表">
<Table
ref="tableRef"
:tree-config="{ transform: true, parentField: 'pid' }"
:scroll-y="{ enabled: true }"
v-if="activeName == 0"
/>
<Table ref="tableRef" :tree-config="{ transform: true, parentField: 'pid' }"
:scroll-y="{ enabled: true }" v-if="activeName == 0" />
</el-tab-pane>
<el-tab-pane :name="1" :lazy="true" label="谐波畸变率统计图">
<charts v-if="activeName == 1" ref="chartsRef" />
@@ -160,23 +86,8 @@ const getTreeData = async () => {
}
getTreeData()
const formData = ref({
statisticalType: classificationData[0], //统计类型
deptIndex: treeData.value[0]?.id, //区域选择
scale: voltageleveloption, //电压等级
manufacturer: terminaloption, //终端厂家
loadType: interfereoption //干扰源类型
// searchBeginTime: '',
// searchEndTime: ''
})
formData.value.deptIndex = treeData.value[0]?.id
const defaultProps = ref({
label: 'name',
value: 'id',
checkStrictly: true,
emitPath: false,
expandTrigger: 'click' as const
})
const chartsRef = ref()
const handleClick = (tab: any, e: any) => {
// console.log(tab,e,"??????????");
@@ -194,7 +105,7 @@ const tableStore = new TableStore({
method: 'POST',
column: [
{
title: formData.value.statisticalType.name,
title: '',
field: 'name',
align: 'left',
treeNode: true
@@ -232,25 +143,11 @@ const tableStore = new TableStore({
}
}
],
beforeSearchFun: () => {
tableStore.table.params.deptIndex = formData.value.deptIndex
tableStore.table.params.statisticalType = formData.value.statisticalType
tableStore.table.params.scale = formData.value.scale
tableStore.table.params.manufacturer = formData.value.manufacturer
tableStore.table.params.loadType = formData.value.loadType
tableStore.table.params.serverName = 'harmonicBoot'
delete tableStore.table.params.timeFlag
delete tableStore.table.params.startTime
delete tableStore.table.params.endTime
delete tableStore.table.params.pageNum
delete tableStore.table.params.pageSize
// tableStore.table.params.searchBeginTime = tableHeaderRef.value.datePickerRef.timeValue[0]
// tableStore.table.params.searchEndTime = tableHeaderRef.value.datePickerRef.timeValue[1]
},
loadCallback: () => {
let treeData = []
treeData = tree2List(tableStore.table.data)
tableStore.table.column[0].title = formData.value.statisticalType.name
tableStore.table.column[0].title = tableStore.table.params.statisticalType .name
tableStore.table.data = JSON.parse(JSON.stringify(treeData))
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
setTimeout(() => {
@@ -258,15 +155,13 @@ const tableStore = new TableStore({
}, 0)
}
})
const handleSearch = () => {
formData.value.searchBeginTime = datePickerRef.value.timeValue[0]
formData.value.searchEndTime = datePickerRef.value.timeValue[1]
}
tableStore.table.params.deptIndex = ''
tableStore.table.params.statisticalType = []
tableStore.table.params.statisticalType = classificationData[0]
tableStore.table.params.scale = []
tableStore.table.params.manufacturer = []
tableStore.table.params.loadType = []
tableStore.table.params.serverName = 'harmonicBoot'
provide('tableStore', tableStore)
const tree2List = (list: any, pid?: string) => {
//存储结果的数组
@@ -289,21 +184,9 @@ const tree2List = (list: any, pid?: string) => {
// 返回结果数组
return arr
}
onMounted(() => {})
onMounted(() => { tableStore.index() })
watch(
() => treeData.value,
(val, oldVal) => {
if (val && val.length != 0) {
formData.value.deptIndex = val[0].id
tableStore.index()
}
},
{
immediate: true,
deep: true
}
)
</script>
<style lang="scss" scoped>
// .online {
@@ -318,5 +201,4 @@ watch(
// .online_main {
// padding: 0 10px;
// }
// }
</style>
// }</style>

View File

@@ -1,55 +1,37 @@
<template>
<div
class="charts"
style="position: relative; width: 100%"
:style="`height: calc(${tableStore.table.height} - 75px)`"
v-loading="loading"
>
<div
style="position: absolute; right: 60px; top: 5px; font-weight: bold"
v-if="!loading && tableStore.table.data && tableStore.table.data.type&& tableStore.table.data.type.length!=0"
>
<el-tag
style="
<div class="charts" style="position: relative; width: 100%">
<div style="position: absolute; right: 60px; top: 5px; font-weight: bold"
v-if="!loading && tableStore.table.data && tableStore.table.data.type && tableStore.table.data.type.length != 0">
<el-tag style="
background: #cc0000;
width: 30px;
height: 15px;
border: 1px solid #cc0000;
float: left;
margin-top: 2px;
"
></el-tag>
"></el-tag>
<span style="color: #cc0000; font-weight: 400; float: left">&nbsp&nbsp在线率<60% &nbsp&nbsp</span>
<el-tag
size="mini"
style="
<el-tag size="mini" style="
background: #ffcc33;
width: 30px;
height: 15px;
border: 1px solid #ffcc33;
float: left;
margin-top: 2px;
"
></el-tag>
<span style="color: #ffcc33; font-weight: 400; float: left">&nbsp&nbsp60%在线率<90% &nbsp&nbsp</span>
<el-tag
style="
"></el-tag>
<span style="color: #ffcc33; font-weight: 400; float: left">&nbsp&nbsp60%在线率<90% &nbsp&nbsp</span>
<el-tag style="
background: #339966;
width: 30px;
height: 15px;
border: 1px solid #339966;
float: left;
margin-top: 2px;
"
></el-tag>
<span style="color: #339966; font-weight: 400; float: left">&nbsp&nbsp在线率90%</span>
"></el-tag>
<span style="color: #339966; font-weight: 400; float: left">&nbsp&nbsp在线率90%</span>
</div>
<my-echart
v-loading="loading"
class="mt10"
:style="`height: calc(${tableStore.table.height} - 120px)`"
:options="options"
/>
<my-echart v-loading="loading" class="mt10" :style="`height: calc(${tableStore.table.height} - 120px)`"
:options="options" />
</div>
</template>
<script setup lang="ts">
@@ -63,10 +45,6 @@ import * as echarts from 'echarts/core'
const dictData = useDictData()
const options = ref({})
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
const interfereoption = dictData.getBasicData('Interference_Source')
const TableHeaderRef = ref()
const tableStoreParams: any = ref({})
@@ -288,7 +266,7 @@ const tableStore = new TableStore({
provide('tableStore', tableStore)
onMounted(() => {})
onMounted(() => { })
defineExpose({ getTableStoreParams })
</script>
<style scoped lang="scss"></style>

View File

@@ -183,7 +183,7 @@ const handleClick = (tab: any, e: any) => {
// const datePickerRef = ref()
const tableHeaderRef = ref()
const tableStore = new TableStore({
// publicHeight: 60,
publicHeight: 65,
showPage: false,
url: '/device-boot/terminalOnlineRateData/getOnlineRateData',
method: 'POST',
@@ -254,9 +254,10 @@ const tableStore = new TableStore({
title: '评估',
field: 'valueOver',
align: 'center',
effect:"dark",
render: 'tag',
custom: {
null: 'danger',
null: 'info',
0: 'danger',
1: 'success',
2: 'primary',
@@ -296,10 +297,7 @@ const tableStore = new TableStore({
}, 0)
}
})
const handleSearch = () => {
formData.value.searchBeginTime = datePickerRef.value.timeValue[0]
formData.value.searchEndTime = datePickerRef.value.timeValue[1]
}
tableStore.table.params.deptIndex = ''
tableStore.table.params.statisticalType = []
tableStore.table.params.scale = []
@@ -344,17 +342,5 @@ watch(
)
</script>
<style lang="scss" scoped>
.online {
width: 100%;
height: 100%;
.online_header {
width: 100%;
max-height: 140px;
padding: 10px;
box-sizing: border-box;
}
.online_main {
padding: 0 10px;
}
}
</style>

View File

@@ -3,22 +3,14 @@
<template v-slot:select>
<el-form-item label='监督类型'>
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择流程状态'>
<el-option
v-for='item in supvTypeOptionList'
:key='item.id'
:label='item.name'
:value='item.id'
></el-option>
<el-option v-for='item in supvTypeOptionList' :key='item.id' :label='item.name'
:value='item.id'></el-option>
</el-select>
</el-form-item>
<el-form-item label='流程状态'>
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
<el-option
v-for='item in statusSelect'
:key='item.id'
:label='item.name'
:value='item.id'
></el-option>
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name'
:value='item.id'></el-option>
</el-select>
</el-form-item>
</template>
@@ -247,13 +239,25 @@ const deleteEven = () => {
message: '请选择要删除的数据'
})
} else {
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
const exportFn = () => {
@@ -267,7 +271,7 @@ const exportFn = () => {
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function(column: any) {
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})

View File

@@ -6,23 +6,13 @@
</el-form-item>
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
</el-select>
</el-form-item>
<el-form-item label='流程状态'>
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
<el-option
v-for='item in statusSelect'
:key='item.id'
:label='item.name'
:value='item.id'
></el-option>
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name' :value='item.id'></el-option>
</el-select>
</el-form-item>
</template>
@@ -33,39 +23,38 @@
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref='tableRef' :checkbox-config='checkboxConfig'/>
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
<!-- 新增 -->
<Add ref='addRef' @onSubmit='tableStore.index()'/>
<Add ref='addRef' @onSubmit='tableStore.index()' />
<!-- 上传 -->
<Audit ref='AuditRef' @onSubmit='tableStore.index()'/>
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
<!-- 查看详情 detail 新增/修改 create-->
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
</template>
<script setup lang='ts'>
import {ref, onMounted, provide, watch, reactive} from 'vue'
import { ref, onMounted, provide, watch, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import {useRouter} from 'vue-router'
import { useRouter } from 'vue-router'
import Add from './add.vue'
import Audit from './audit.vue'
import addForm from './addForm.vue'
import {useDictData} from '@/stores/dictData'
import {getLoadTypeUserList} from '@/api/process-boot/interference'
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
import {ElMessage} from 'element-plus'
import {ElMessageBox} from 'element-plus/es'
import {useAdminInfo} from '@/stores/adminInfo'
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
import { useDictData } from '@/stores/dictData'
import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useAdminInfo } from '@/stores/adminInfo'
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const {push, options, currentRoute} = useRouter()
const { push, options, currentRoute } = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData
.getBasicData('jibei_area')
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
.getBasicData('jibei_area')
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
const statusSelect = dictData.statusSelect()
const addRef = ref()
const AuditRef = ref()
@@ -82,7 +71,7 @@ const tableStore = new TableStore({
width: '60',
type: 'checkbox'
},
{title: '序号', type: 'seq', width: 80},
{ title: '序号', type: 'seq', width: 80 },
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'city',
@@ -101,7 +90,7 @@ const tableStore = new TableStore({
return row.cellValue
}
},
{field: 'projectName', title: '项目名称', minWidth: 170},
{ field: 'projectName', title: '项目名称', minWidth: 170 },
{
field: 'userType',
title: '用户性质',
@@ -111,7 +100,7 @@ const tableStore = new TableStore({
return getUserTypeName(userType)
}
},
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'userStatus',
title: '用户状态',
@@ -150,7 +139,7 @@ const tableStore = new TableStore({
4: '已取消'
}
},
{field: 'createTime', title: '开始时间', minWidth: 170},
{ field: 'createTime', title: '开始时间', minWidth: 170 },
{
field: 'createBy',
title: '填报人',
@@ -251,10 +240,10 @@ const addList = () => {
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({row}) => {
checkMethod: ({ row }) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
})
const deleteEven = () => {
@@ -264,13 +253,26 @@ const deleteEven = () => {
message: '请选择要删除的数据'
})
} else {
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
@@ -305,7 +307,7 @@ const exportEvent = () => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -328,16 +330,16 @@ onMounted(() => {
tableStore.index()
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
/** 处理审批按钮 */
@@ -378,7 +380,7 @@ const getUserTypeName = (userType: any) => {
}
const props = defineProps({id: {type: String, default: 'null'}})
const props = defineProps({ id: { type: String, default: 'null' } })
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
@@ -393,7 +395,7 @@ watch(() => props.id, async (newValue, oldValue) => {
})
}
})
}, {immediate: true})
}, { immediate: true })
</script>

View File

@@ -5,21 +5,13 @@
<template v-slot:select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="输入变电站、终端"
clearable
></el-input>
</el-form-item>
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端" clearable></el-input>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
@@ -42,7 +34,7 @@ import { useRouter } from 'vue-router'
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import {cancelQuitRunningDevice, getRunningDeviceById} from '@/api/supervision-boot/device/quitRunningDev'
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
@@ -62,7 +54,7 @@ const tableStore = new TableStore({
method: 'POST',
publicHeight: 65,
column: [
{
{
width: '60',
type: 'checkbox'
},
@@ -89,7 +81,7 @@ const tableStore = new TableStore({
2: 'danger',
3: 'warning',
4: 'info',
null: 'primary'
null: 'primary'
},
replaceValue: {
0: '运行',
@@ -111,7 +103,7 @@ const tableStore = new TableStore({
2: 'danger',
3: 'warning',
4: 'info',
null: 'primary'
null: 'primary'
},
replaceValue: {
0: '运行',
@@ -119,7 +111,7 @@ const tableStore = new TableStore({
2: '停运',
3: '调试',
4: '退运',
null:'/'
null: '/'
}
},
{
@@ -250,20 +242,20 @@ const deleteEven = () => {
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
tableStore.index()
})
})
}
}
/** 流程实例详情 */
@@ -316,17 +308,17 @@ watch(
}
)
const props = defineProps({id: {type: String, default: 'null'}})
const props = defineProps({ id: { type: String, default: 'null' } })
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getRunningDeviceById(fullId).then(res => {
if (res && res.code == 'A0000') {
deviceQuitPopup.value.open('重新发起', res.data)
}
})
}, {immediate: true})
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getRunningDeviceById(fullId).then(res => {
if (res && res.code == 'A0000') {
deviceQuitPopup.value.open('重新发起', res.data)
}
})
}, { immediate: true })
</script>

View File

@@ -3,20 +3,13 @@
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template #select>
<el-form-item label="搜索">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="输入变电站、终端、监测点名称"
clearable
></el-input>
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
clearable></el-input>
</el-form-item>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</template>
@@ -26,7 +19,7 @@
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 申请联调弹框 -->
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
</template>
@@ -40,8 +33,8 @@ import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import { getLoadTypeUserList } from '@/api/process-boot/interference'
import {
getMointorPointTempLinedebugDetail,
setTempLinedebugLedgerSync
getMointorPointTempLinedebugDetail,
setTempLinedebugLedgerSync
} from '@/api/supervision-boot/jointDebugList/index'
import debug from './debug.vue'
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
@@ -61,7 +54,7 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
{
width: '60',
type: 'checkbox'
},
@@ -267,21 +260,21 @@ const deleteEven = () => {
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
onMounted(() => {
@@ -340,19 +333,19 @@ watch(
}
)
const props = defineProps({id: {type: String, default: 'null'}})
const props = defineProps({ id: { type: String, default: 'null' } })
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getMointorPointTempLinedebugDetail({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
debugForms.value.open('重新发起', res.data)
}
})
}, {immediate: true})
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
if (res && res.code == 'A0000') {
debugForms.value.open('重新发起', res.data)
}
})
}, { immediate: true })
</script>
<style scoped lang="scss">