修改数据中心问题
This commit is contained in:
@@ -13,11 +13,10 @@ import 'echarts-liquidfill'
|
|||||||
import 'echarts/lib/component/dataZoom'
|
import 'echarts/lib/component/dataZoom'
|
||||||
import { color, gradeColor3 } from './color'
|
import { color, gradeColor3 } from './color'
|
||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
import { saveAs } from 'file-saver'
|
const config = useConfig()
|
||||||
import { t } from 'vxe-table'
|
|
||||||
// import { nextTick } from 'process'
|
// import { nextTick } from 'process'
|
||||||
|
|
||||||
const config = useConfig()
|
|
||||||
color[0] = config.layout.elementUiPrimary[0]
|
color[0] = config.layout.elementUiPrimary[0]
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
212
src/views/pqs/harmonicMonitoring/area/SteadyState/index.vue
Normal file
212
src/views/pqs/harmonicMonitoring/area/SteadyState/index.vue
Normal 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>
|
||||||
@@ -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>
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<my-echart
|
<my-echart v-loading="loading" class="mt10" :style="`height: calc(${tableStore.table.height} - 135px)`"
|
||||||
v-loading="loading"
|
:options="options" />
|
||||||
class="mt10"
|
|
||||||
:style="`height: calc(${tableStore.table.height} - 135px)`"
|
|
||||||
:options="options"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
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 MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import * as echarts from 'echarts/core'
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const options = ref({})
|
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 TableHeaderRef = ref()
|
||||||
const tableStoreParams: any = ref({})
|
const tableStoreParams: any = ref({})
|
||||||
@@ -95,98 +87,21 @@ const tableStore = new TableStore({
|
|||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
type: 'bar',
|
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);}
|
|
||||||
|
|
||||||
// 定制显示(按顺序)
|
data: tableStore.table.data.single,
|
||||||
// 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
|
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)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => { })
|
||||||
defineExpose({ getTableStoreParams })
|
defineExpose({ getTableStoreParams })
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,105 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main online">
|
<div class="default-main online">
|
||||||
<div class="online_header">
|
<div class="online_header">
|
||||||
<TableHeader date-picker ref="tableHeaderRef">
|
<TableHeader date-picker area ref="tableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="统计类型:">
|
<el-form-item label="统计类型:">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型"
|
||||||
v-model="formData.statisticalType"
|
value-key="id" style="width: 100%">
|
||||||
placeholder="请选择统计类型"
|
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
|
||||||
value-key="id"
|
:value="item"></el-option>
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in classificationData"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-form-item label="电压等级:">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.scale" multiple collapse-tags clearable
|
||||||
v-model="formData.scale"
|
placeholder="请选择电压等级" style="width: 100%" value-key="id">
|
||||||
multiple
|
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name"
|
||||||
collapse-tags
|
:value="item"></el-option>
|
||||||
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.manufacturer" multiple collapse-tags clearable
|
||||||
v-model="formData.manufacturer"
|
placeholder="请选择终端厂家" style="width: 100%" value-key="id">
|
||||||
multiple
|
<el-option v-for="(item, index) in terminaloption" :key="index" :label="item.name"
|
||||||
collapse-tags
|
:value="item"></el-option>
|
||||||
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源类型:">
|
<el-form-item label="干扰源类型:">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.loadType" multiple collapse-tags clearable
|
||||||
v-model="formData.loadType"
|
placeholder="请选择干扰源类型" style="width: 100%" value-key="id">
|
||||||
multiple
|
<el-option v-for="(item, index) in interfereoption" :key="index" :label="item.name"
|
||||||
collapse-tags
|
:value="item"></el-option>
|
||||||
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -108,12 +38,8 @@
|
|||||||
<div class="online_main">
|
<div class="online_main">
|
||||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||||
<el-tab-pane :name="0" :lazy="true" label="谐波畸变率统计表">
|
<el-tab-pane :name="0" :lazy="true" label="谐波畸变率统计表">
|
||||||
<Table
|
<Table ref="tableRef" :tree-config="{ transform: true, parentField: 'pid' }"
|
||||||
ref="tableRef"
|
:scroll-y="{ enabled: true }" v-if="activeName == 0" />
|
||||||
:tree-config="{ transform: true, parentField: 'pid' }"
|
|
||||||
:scroll-y="{ enabled: true }"
|
|
||||||
v-if="activeName == 0"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :name="1" :lazy="true" label="谐波畸变率统计图">
|
<el-tab-pane :name="1" :lazy="true" label="谐波畸变率统计图">
|
||||||
<charts v-if="activeName == 1" ref="chartsRef" />
|
<charts v-if="activeName == 1" ref="chartsRef" />
|
||||||
@@ -160,23 +86,8 @@ const getTreeData = async () => {
|
|||||||
}
|
}
|
||||||
getTreeData()
|
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 chartsRef = ref()
|
||||||
const handleClick = (tab: any, e: any) => {
|
const handleClick = (tab: any, e: any) => {
|
||||||
// console.log(tab,e,"??????????");
|
// console.log(tab,e,"??????????");
|
||||||
@@ -194,7 +105,7 @@ const tableStore = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: formData.value.statisticalType.name,
|
title: '',
|
||||||
field: 'name',
|
field: 'name',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
treeNode: true
|
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: () => {
|
loadCallback: () => {
|
||||||
let treeData = []
|
let treeData = []
|
||||||
treeData = tree2List(tableStore.table.data)
|
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))
|
tableStore.table.data = JSON.parse(JSON.stringify(treeData))
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -258,15 +155,13 @@ const tableStore = new TableStore({
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const handleSearch = () => {
|
|
||||||
formData.value.searchBeginTime = datePickerRef.value.timeValue[0]
|
|
||||||
formData.value.searchEndTime = datePickerRef.value.timeValue[1]
|
tableStore.table.params.statisticalType = classificationData[0]
|
||||||
}
|
|
||||||
tableStore.table.params.deptIndex = ''
|
|
||||||
tableStore.table.params.statisticalType = []
|
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
tableStore.table.params.manufacturer = []
|
tableStore.table.params.manufacturer = []
|
||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const tree2List = (list: any, pid?: string) => {
|
const tree2List = (list: any, pid?: string) => {
|
||||||
//存储结果的数组
|
//存储结果的数组
|
||||||
@@ -289,21 +184,9 @@ const tree2List = (list: any, pid?: string) => {
|
|||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
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>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// .online {
|
// .online {
|
||||||
@@ -318,5 +201,4 @@ watch(
|
|||||||
// .online_main {
|
// .online_main {
|
||||||
// padding: 0 10px;
|
// padding: 0 10px;
|
||||||
// }
|
// }
|
||||||
// }
|
// }</style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,55 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="charts" style="position: relative; width: 100%">
|
||||||
class="charts"
|
<div style="position: absolute; right: 60px; top: 5px; font-weight: bold"
|
||||||
style="position: relative; width: 100%"
|
v-if="!loading && tableStore.table.data && tableStore.table.data.type && tableStore.table.data.type.length != 0">
|
||||||
:style="`height: calc(${tableStore.table.height} - 75px)`"
|
<el-tag style="
|
||||||
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="
|
|
||||||
background: #cc0000;
|
background: #cc0000;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
border: 1px solid #cc0000;
|
border: 1px solid #cc0000;
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
"
|
"></el-tag>
|
||||||
></el-tag>
|
|
||||||
<span style="color: #cc0000; font-weight: 400; float: left">  在线率<60%   </span>
|
<span style="color: #cc0000; font-weight: 400; float: left">  在线率<60%   </span>
|
||||||
<el-tag
|
<el-tag size="mini" style="
|
||||||
size="mini"
|
|
||||||
style="
|
|
||||||
background: #ffcc33;
|
background: #ffcc33;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
border: 1px solid #ffcc33;
|
border: 1px solid #ffcc33;
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
"
|
"></el-tag>
|
||||||
></el-tag>
|
<span style="color: #ffcc33; font-weight: 400; float: left">  60%≤在线率<90%   </span>
|
||||||
<span style="color: #ffcc33; font-weight: 400; float: left">  60%≤在线率<90%   </span>
|
<el-tag style="
|
||||||
<el-tag
|
|
||||||
style="
|
|
||||||
background: #339966;
|
background: #339966;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
border: 1px solid #339966;
|
border: 1px solid #339966;
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
"
|
"></el-tag>
|
||||||
></el-tag>
|
<span style="color: #339966; font-weight: 400; float: left">  在线率≥90%</span>
|
||||||
<span style="color: #339966; font-weight: 400; float: left">  在线率≥90%</span>
|
|
||||||
</div>
|
</div>
|
||||||
<my-echart
|
<my-echart v-loading="loading" class="mt10" :style="`height: calc(${tableStore.table.height} - 120px)`"
|
||||||
v-loading="loading"
|
:options="options" />
|
||||||
class="mt10"
|
|
||||||
:style="`height: calc(${tableStore.table.height} - 120px)`"
|
|
||||||
:options="options"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -63,10 +45,6 @@ import * as echarts from 'echarts/core'
|
|||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const options = ref({})
|
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 TableHeaderRef = ref()
|
||||||
const tableStoreParams: any = ref({})
|
const tableStoreParams: any = ref({})
|
||||||
@@ -288,7 +266,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => { })
|
||||||
defineExpose({ getTableStoreParams })
|
defineExpose({ getTableStoreParams })
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ const handleClick = (tab: any, e: any) => {
|
|||||||
// const datePickerRef = ref()
|
// const datePickerRef = ref()
|
||||||
const tableHeaderRef = ref()
|
const tableHeaderRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
// publicHeight: 60,
|
publicHeight: 65,
|
||||||
showPage: false,
|
showPage: false,
|
||||||
url: '/device-boot/terminalOnlineRateData/getOnlineRateData',
|
url: '/device-boot/terminalOnlineRateData/getOnlineRateData',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -254,9 +254,10 @@ const tableStore = new TableStore({
|
|||||||
title: '评估',
|
title: '评估',
|
||||||
field: 'valueOver',
|
field: 'valueOver',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
effect:"dark",
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
null: 'danger',
|
null: 'info',
|
||||||
0: 'danger',
|
0: 'danger',
|
||||||
1: 'success',
|
1: 'success',
|
||||||
2: 'primary',
|
2: 'primary',
|
||||||
@@ -296,10 +297,7 @@ const tableStore = new TableStore({
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const handleSearch = () => {
|
|
||||||
formData.value.searchBeginTime = datePickerRef.value.timeValue[0]
|
|
||||||
formData.value.searchEndTime = datePickerRef.value.timeValue[1]
|
|
||||||
}
|
|
||||||
tableStore.table.params.deptIndex = ''
|
tableStore.table.params.deptIndex = ''
|
||||||
tableStore.table.params.statisticalType = []
|
tableStore.table.params.statisticalType = []
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
@@ -344,17 +342,5 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<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>
|
</style>
|
||||||
|
|||||||
@@ -3,22 +3,14 @@
|
|||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='监督类型'>
|
<el-form-item label='监督类型'>
|
||||||
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择流程状态'>
|
||||||
<el-option
|
<el-option v-for='item in supvTypeOptionList' :key='item.id' :label='item.name'
|
||||||
v-for='item in supvTypeOptionList'
|
:value='item.id'></el-option>
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.id'
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option
|
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name'
|
||||||
v-for='item in statusSelect'
|
:value='item.id'></el-option>
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.id'
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -247,13 +239,25 @@ const deleteEven = () => {
|
|||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
|
||||||
ElMessage({
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
type: 'success',
|
confirmButtonText: '确定',
|
||||||
message: '删除成功!'
|
cancelButtonText: '取消',
|
||||||
})
|
type: 'warning'
|
||||||
tableStore.index()
|
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功!'
|
||||||
|
})
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
@@ -267,7 +271,7 @@ const exportFn = () => {
|
|||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function(column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,23 +6,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='所在地市'>
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||||
<el-option
|
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||||
v-for='item in areaOptionList'
|
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.name'
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option
|
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name' :value='item.id'></el-option>
|
||||||
v-for='item in statusSelect'
|
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.id'
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,39 +23,38 @@
|
|||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</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-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<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 TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/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 Add from './add.vue'
|
||||||
import Audit from './audit.vue'
|
import Audit from './audit.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import {useDictData} from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import {getLoadTypeUserList} from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import {ElMessage} from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import {ElMessageBox} from 'element-plus/es'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import {useAdminInfo} from '@/stores/adminInfo'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
|
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const {push, options, currentRoute} = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const areaOptionList = dictData
|
const areaOptionList = dictData
|
||||||
.getBasicData('jibei_area')
|
.getBasicData('jibei_area')
|
||||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const addRef = ref()
|
const addRef = ref()
|
||||||
const AuditRef = ref()
|
const AuditRef = ref()
|
||||||
@@ -82,7 +71,7 @@ const tableStore = new TableStore({
|
|||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{title: '序号', type: 'seq', width: 80},
|
{ title: '序号', type: 'seq', width: 80 },
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'city',
|
field: 'city',
|
||||||
@@ -101,7 +90,7 @@ const tableStore = new TableStore({
|
|||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'projectName', title: '项目名称', minWidth: 170},
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
@@ -111,7 +100,7 @@ const tableStore = new TableStore({
|
|||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
|
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
@@ -150,7 +139,7 @@ const tableStore = new TableStore({
|
|||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'createTime', title: '开始时间', minWidth: 170},
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
@@ -251,10 +240,10 @@ const addList = () => {
|
|||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({row}) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
@@ -264,13 +253,26 @@ const deleteEven = () => {
|
|||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
ElMessage({
|
confirmButtonText: '确定',
|
||||||
type: 'success',
|
cancelButtonText: '取消',
|
||||||
message: '删除成功!'
|
type: 'warning'
|
||||||
})
|
|
||||||
tableStore.index()
|
|
||||||
})
|
})
|
||||||
|
.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 cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
@@ -328,16 +330,16 @@ onMounted(() => {
|
|||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
deep: true
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
@@ -393,7 +395,7 @@ watch(() => props.id, async (newValue, oldValue) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, {immediate: true})
|
}, { immediate: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -5,21 +5,13 @@
|
|||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
v-for="item in statusSelect"
|
:value="item.id"></el-option>
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端" clearable></el-input>
|
||||||
v-model="tableStore.table.params.searchValue"
|
</el-form-item>
|
||||||
placeholder="输入变电站、终端"
|
|
||||||
clearable
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<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 DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
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 { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||||
@@ -62,7 +54,7 @@ const tableStore = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
@@ -89,7 +81,7 @@ const tableStore = new TableStore({
|
|||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
@@ -111,7 +103,7 @@ const tableStore = new TableStore({
|
|||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
@@ -119,7 +111,7 @@ const tableStore = new TableStore({
|
|||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运',
|
4: '退运',
|
||||||
null:'/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -250,19 +242,19 @@ const deleteEven = () => {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
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) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getRunningDeviceById(fullId).then(res => {
|
await getRunningDeviceById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
deviceQuitPopup.value.open('重新发起', res.data)
|
deviceQuitPopup.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, {immediate: true})
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,20 +3,13 @@
|
|||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||||
v-model="tableStore.table.params.searchValue"
|
clearable></el-input>
|
||||||
placeholder="输入变电站、终端、监测点名称"
|
|
||||||
clearable
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
v-for="item in statusSelect"
|
:value="item.id"></el-option>
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -26,7 +19,7 @@
|
|||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 申请联调弹框 -->
|
<!-- 申请联调弹框 -->
|
||||||
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
||||||
</template>
|
</template>
|
||||||
@@ -40,8 +33,8 @@ import { useRouter } from 'vue-router'
|
|||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import {
|
import {
|
||||||
getMointorPointTempLinedebugDetail,
|
getMointorPointTempLinedebugDetail,
|
||||||
setTempLinedebugLedgerSync
|
setTempLinedebugLedgerSync
|
||||||
} from '@/api/supervision-boot/jointDebugList/index'
|
} from '@/api/supervision-boot/jointDebugList/index'
|
||||||
import debug from './debug.vue'
|
import debug from './debug.vue'
|
||||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
||||||
@@ -61,7 +54,7 @@ const tableStore = new TableStore({
|
|||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
@@ -267,21 +260,21 @@ const deleteEven = () => {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
|
|
||||||
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
|
||||||
ElMessage({
|
|
||||||
type: 'success',
|
|
||||||
message: '删除成功!'
|
|
||||||
})
|
|
||||||
tableStore.index()
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
|
||||||
|
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功!'
|
||||||
|
})
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
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) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getMointorPointTempLinedebugDetail({id:fullId}).then(res => {
|
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
debugForms.value.open('重新发起', res.data)
|
debugForms.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, {immediate: true})
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user