海南验收问题整改
This commit is contained in:
@@ -8,3 +8,11 @@ export function voltageRideThroughEventQueryPage(data: any) {
|
||||
data
|
||||
})
|
||||
}
|
||||
//更新暂降核实原因
|
||||
export function updateEventReason(data: any) {
|
||||
return request({
|
||||
url: '/event-boot/transient/updateEventReason',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 124 KiB |
@@ -23,7 +23,7 @@
|
||||
<el-button
|
||||
v-if="view2"
|
||||
@click="backbxlb"
|
||||
type="primary"
|
||||
|
||||
class="el-icon-refresh-right"
|
||||
icon="el-icon-CloseBold"
|
||||
style="float: right"
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div v-if="view3" class="pd10">
|
||||
<span style="font-weight: 500; font-size: 22px">高级分析</span>
|
||||
<el-button type="primary" icon="el-icon-ArrowLeftBold" @click="gaoBack" style="float: right">返回</el-button>
|
||||
<el-button icon="el-icon-Back" @click="gaoBack" style="float: right">返回</el-button>
|
||||
<analytics :flag="true" :GJList="GJList" :boxoList="boxoList"></analytics>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
<template>
|
||||
<div class="point-tree">
|
||||
<div style="flex: 1; overflow: hidden">
|
||||
<Tree
|
||||
ref="treeRef"
|
||||
:data="tree"
|
||||
:canExpand="false"
|
||||
style="width: 100%; height: 100%"
|
||||
v-bind="$attrs"
|
||||
default-expand-all
|
||||
@onAddTree="onAddTree"
|
||||
/>
|
||||
<Tree ref="treeRef" :data="tree" :canExpand="false" style="width: 100%; height: 100%" v-bind="$attrs"
|
||||
default-expand-all @onAddTree="onAddTree" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -52,7 +45,7 @@ const loadData = (id?: any) => {
|
||||
})
|
||||
})
|
||||
|
||||
nodeKey = res.data[0].children[0]?.id? res.data[0].children[0].id: res.data[0].id
|
||||
nodeKey = res.data.length == 0 ? "" : res.data[0].children[0]?.id ? res.data[0].children[0].id : res.data[0].id
|
||||
|
||||
tree.value = res.data
|
||||
if (id) {
|
||||
@@ -62,7 +55,7 @@ const loadData = (id?: any) => {
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||
emit('init', res.data[0].children[0])
|
||||
emit('init', res.data.length == 0 ? "" : (res.data[0].children[0] || res.data[0]))
|
||||
}, 10)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Setting" type="primary" @click="configuration">承载能力评估策略</el-button>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click=";(addedShow = false), (code = null)">
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addAssess">
|
||||
新增承载能力评估
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -38,7 +38,7 @@
|
||||
<charge :rowList="rowList" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-button class="quit" icon="el-icon-ArrowLeftBold" type="primary" @click="quit">返回</el-button>
|
||||
<el-button class="quit" icon="el-icon-Back" @click="quit">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -179,6 +179,11 @@ const quit = () => {
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const addAssess=()=>{
|
||||
addedShow.value = false
|
||||
code.value = null
|
||||
activeName.value='1'
|
||||
}
|
||||
// 配置
|
||||
const configuration = () => {
|
||||
policyView.value = true
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
:style="`height: calc(${height.height} - 60px);`" />
|
||||
<div :style="`height: calc(${height.height} - 60px);overflow: auto;`" v-else>
|
||||
<vue-office-docx v-if="url.includes('.doc') || url.includes('.docx')" :src="url" />
|
||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url" :options="excelOptions"/>
|
||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url"
|
||||
:options="excelOptions" />
|
||||
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url"/> -->
|
||||
<iframe v-if="url.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
||||
<img v-if="
|
||||
@@ -59,7 +60,7 @@ const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'database/standard'
|
||||
})
|
||||
const excelOptions=ref({})
|
||||
const excelOptions = ref({})
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(20)
|
||||
const size = ref(0)
|
||||
@@ -77,6 +78,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
||||
dotList.value = data
|
||||
url.value = ''
|
||||
flag.value = false
|
||||
@@ -89,7 +91,7 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
||||
// url.value = res.data.url
|
||||
// })
|
||||
},100)
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
@@ -104,7 +106,9 @@ const deleteEven = () => {
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
setTimeout(() => {
|
||||
treeRef.value.loadData()
|
||||
}, 100)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<SecondSheet v-if="options" style="background: #fff; z-index: 10">
|
||||
<el-button
|
||||
style="position: absolute; right: 0; top: 0; cursor: pointer; z-index: 3"
|
||||
type="primary"
|
||||
icon="el-icon-Back"
|
||||
size="small"
|
||||
@click="close"
|
||||
>
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<el-tab-pane label="终端入网检测" name="1">
|
||||
<terminal :id="id" v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监测点台账录入" name="2">
|
||||
<!-- <el-tab-pane label="监测点台账录入" name="2">
|
||||
<monitorpoint :id="id" v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监测点联调列表" name="3">
|
||||
<jointDebugList :id="id" v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="终端周期检测" name="4">
|
||||
<cycleDetection :id="id" :businessKey='key' v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -1,451 +1,71 @@
|
||||
<!---试运行列表-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #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-select>
|
||||
</el-form-item>
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
|
||||
<el-tab-pane label="监测点台账录入" name="1">
|
||||
<monitorpoint :id="id" v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监测点联调列表" name="2">
|
||||
<jointDebugList :id="id" v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="试运行评估" name="3">
|
||||
<testRun :id="id" v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- <el-dialog
|
||||
v-model='timeDialog'
|
||||
width='500px'
|
||||
append-to-body
|
||||
destroy-on-close>
|
||||
<div class='block'>
|
||||
<span class="demonstration">试运行时间</span>
|
||||
<el-date-picker
|
||||
:popper-append-to-body="false"
|
||||
:v-model="dateValue"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
</div>
|
||||
<div class='block' style='text-align: center'>
|
||||
<el-button type='primary' style='margin-top: 50px' @click='runTestSubmit'>确认</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { VxeTablePropTypes } from 'vxe-table'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { deleteTempLineRunTestReport } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const { push } = useRouter()
|
||||
const adminInfo = useAdminInfo()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import monitorpoint from '@/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue'
|
||||
import jointDebugList from '@/views/pqs/supervise/terminalNetworkDetection/components/jointDebugList/index.vue'
|
||||
import testRun from './testRun.vue'
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/tempLinedebug/pageHasDebug',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '', type: 'checkbox', width: 40 },
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140 },
|
||||
{ field: 'powerSubstationName', title: '变电站', minWidth: 160 },
|
||||
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
||||
{
|
||||
field: 'testRunState',
|
||||
title: '试运行状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
1: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待试运行',
|
||||
1: '试运行中',
|
||||
2: '试运行成功',
|
||||
3: '试运行失败',
|
||||
null: '待试运行'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'testRunTime',
|
||||
title: '试运行时间范围',
|
||||
minWidth: 200,
|
||||
formatter: row => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/',
|
||||
9: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 230,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
},
|
||||
click: row => {
|
||||
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
window.open(window.location.origin + '/#/previewFile?' + row.testRunReport)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '下载报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
downloadTheReport(row.testRunReport)
|
||||
},
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '重新试运行',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
monitorIds = []
|
||||
monitorIds.push(row.id)
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: 1,
|
||||
id: row.id
|
||||
}
|
||||
update(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
defineOptions({
|
||||
name: 'terminalNetwotk'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 3 || row.status == 4)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
const activeName = ref('2')
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.statveList = [2]
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||
labelField: '',
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info') || !(row.testRunState == 1 || row.testRunState == 2)
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('terminalNetwotk')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else if (type == '2') {
|
||||
activeName.value = '2'
|
||||
} else if (type == '3') {
|
||||
activeName.value = '3'
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let createBy = tableStore.table.selection.map(item => item.createBy)
|
||||
let status = tableStore.table.selection.map(item => item.status)
|
||||
if (adminInfo.roleCode.includes('delete_info')) {
|
||||
deleteList()
|
||||
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
|
||||
deleteList()
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '只能删除自己填报的数据!!!'
|
||||
})
|
||||
activeName.value = '4'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
const deleteList = () => {
|
||||
deleteTempLineRunTestReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data).then(res => {
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
//试运行
|
||||
let monitorIds: any = []
|
||||
|
||||
const startRunTest = () => {
|
||||
monitorIds = []
|
||||
let flag = true
|
||||
if (tableStore.table.selection.length === 0) {
|
||||
return ElMessage({
|
||||
message: '请至少选择一个监测点进行试运行',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
tableStore.table.selection.forEach(item => {
|
||||
if (item.testRunState != 0) {
|
||||
flag = false
|
||||
}
|
||||
if (item.testRunState == 0) {
|
||||
monitorIds.push(item.id)
|
||||
}
|
||||
})
|
||||
|
||||
if (!flag) {
|
||||
return ElMessage({
|
||||
message: '请选择未试运行的监测点进行试运行',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ElMessageBox.confirm('是否确认执行72小时监测点试运行?', '试运行', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消'
|
||||
})
|
||||
.then(() => {
|
||||
runTestSubmit(0)
|
||||
})
|
||||
.catch(() => console.info('操作取消'))
|
||||
}
|
||||
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
console.log(res.data.url, 'res')
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
|
||||
const runTestSubmit = (type: number) => {
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: type
|
||||
}
|
||||
addRunTest(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
let nowTime = Date.now()
|
||||
let routeTime = route.query.t as number || 1
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
if (route.fullPath.includes('/testRun')) {
|
||||
let id = (route.query.id as string) || 'null'
|
||||
if (id != 'null') {
|
||||
monitorIds = []
|
||||
monitorIds.push(id)
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: 1,
|
||||
id
|
||||
}
|
||||
update(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
452
src/views/pqs/supervise/testRun/testRun.vue
Normal file
452
src/views/pqs/supervise/testRun/testRun.vue
Normal file
@@ -0,0 +1,452 @@
|
||||
<!---试运行列表-->
|
||||
<template>
|
||||
<div >
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #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-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- <el-dialog
|
||||
v-model='timeDialog'
|
||||
width='500px'
|
||||
append-to-body
|
||||
destroy-on-close>
|
||||
<div class='block'>
|
||||
<span class="demonstration">试运行时间</span>
|
||||
<el-date-picker
|
||||
:popper-append-to-body="false"
|
||||
:v-model="dateValue"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
|
||||
</div>
|
||||
<div class='block' style='text-align: center'>
|
||||
<el-button type='primary' style='margin-top: 50px' @click='runTestSubmit'>确认</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { VxeTablePropTypes } from 'vxe-table'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { deleteTempLineRunTestReport } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const { push } = useRouter()
|
||||
const adminInfo = useAdminInfo()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/tempLinedebug/pageHasDebug',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{ title: '', type: 'checkbox', width: 40 },
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140 },
|
||||
{ field: 'powerSubstationName', title: '变电站', minWidth: 160 },
|
||||
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
||||
{
|
||||
field: 'testRunState',
|
||||
title: '试运行状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
1: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待试运行',
|
||||
1: '试运行中',
|
||||
2: '试运行成功',
|
||||
3: '试运行失败',
|
||||
null: '待试运行'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'testRunTime',
|
||||
title: '试运行时间范围',
|
||||
minWidth: 200,
|
||||
formatter: row => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/',
|
||||
9: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 230,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
},
|
||||
click: row => {
|
||||
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
|
||||
window.open(window.location.origin + '/#/previewFile?' + row.testRunReport)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '下载报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
downloadTheReport(row.testRunReport)
|
||||
},
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '重新试运行',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
monitorIds = []
|
||||
monitorIds.push(row.id)
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: 1,
|
||||
id: row.id
|
||||
}
|
||||
update(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 3 || row.status == 4)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.statveList = [2]
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||
labelField: '',
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info') || !(row.testRunState == 1 || row.testRunState == 2)
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let createBy = tableStore.table.selection.map(item => item.createBy)
|
||||
let status = tableStore.table.selection.map(item => item.status)
|
||||
if (adminInfo.roleCode.includes('delete_info')) {
|
||||
deleteList()
|
||||
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
|
||||
deleteList()
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '只能删除自己填报的数据!!!'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const deleteList = () => {
|
||||
deleteTempLineRunTestReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data).then(res => {
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
//试运行
|
||||
let monitorIds: any = []
|
||||
|
||||
const startRunTest = () => {
|
||||
monitorIds = []
|
||||
let flag = true
|
||||
if (tableStore.table.selection.length === 0) {
|
||||
return ElMessage({
|
||||
message: '请至少选择一个监测点进行试运行',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
tableStore.table.selection.forEach(item => {
|
||||
if (item.testRunState != 0) {
|
||||
flag = false
|
||||
}
|
||||
if (item.testRunState == 0) {
|
||||
monitorIds.push(item.id)
|
||||
}
|
||||
})
|
||||
|
||||
if (!flag) {
|
||||
return ElMessage({
|
||||
message: '请选择未试运行的监测点进行试运行',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ElMessageBox.confirm('是否确认执行72小时监测点试运行?', '试运行', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消'
|
||||
})
|
||||
.then(() => {
|
||||
runTestSubmit(0)
|
||||
})
|
||||
.catch(() => console.info('操作取消'))
|
||||
}
|
||||
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
console.log(res.data.url, 'res')
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
|
||||
const runTestSubmit = (type: number) => {
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: type
|
||||
}
|
||||
addRunTest(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
let nowTime = Date.now()
|
||||
let routeTime = route.query.t as number || 1
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
if (route.fullPath.includes('/testRun')) {
|
||||
let id = (route.query.id as string) || 'null'
|
||||
if (id != 'null') {
|
||||
monitorIds = []
|
||||
monitorIds.push(id)
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: 1,
|
||||
id
|
||||
}
|
||||
update(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
67
src/views/pqs/voltageSags/Region/transientList/addForm.vue
Normal file
67
src/views/pqs/voltageSags/Region/transientList/addForm.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<el-dialog draggable width="500px" v-model="dialogVisible" title="人工维护">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="140px" :rules="rules" ref="formRef">
|
||||
|
||||
<el-form-item label="暂降原因:" prop="verifyReason">
|
||||
|
||||
<el-select v-model="form.verifyReason" placeholder="请选择暂降原因">
|
||||
<el-option v-for="item in verifyReasonList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="暂降原因详情:" prop="verifyReasonDetail">
|
||||
|
||||
<el-input v-model="form.verifyReasonDetail" :rows="3" type="textarea" placeholder="请输入暂降原因详情" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { updateEventReason } from '@/api/event-boot/highAndLowPressure'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const emit=defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogVisible = ref(false)
|
||||
const verifyReasonList: any = dictData.getBasicData('verifyReason')
|
||||
const formRef = ref()
|
||||
const form: any = reactive({
|
||||
eventId: '',
|
||||
verifyReason: '',
|
||||
verifyReasonDetail: ''
|
||||
})
|
||||
const rules = {
|
||||
verifyReasonDetail: [{ required: true, message: '请输入暂降原因详情', trigger: 'blur' },],
|
||||
verifyReason: [{ required: true, message: '请输入暂降原因', trigger: 'blur' },],
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
dialogVisible.value = true
|
||||
form.eventId = row.eventId
|
||||
form.verifyReason = row.verifyReason
|
||||
form.verifyReasonDetail = row.verifyReasonDetail
|
||||
}
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
updateEventReason(form).then(res => {
|
||||
|
||||
ElMessage.success('录入成功!')
|
||||
dialogVisible.value = false
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@@ -10,112 +10,52 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
<el-form-item label="触发类型:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.waveType"
|
||||
placeholder="请选择触发类型"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in triggeroptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="tableStore.table.params.waveType" placeholder="请选择触发类型" clearable multiple
|
||||
collapse-tags style="width: 100%">
|
||||
<el-option v-for="item in triggeroptions" :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.fileFlag"
|
||||
placeholder="请选择是否存在波形"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wareaoptions"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="tableStore.table.params.fileFlag" placeholder="请选择是否存在波形" clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in wareaoptions" :key="item.id" :label="item.label"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="暂态持续时间(s):">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.persistMin"
|
||||
placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||
clearable
|
||||
style="width: 94px"
|
||||
></el-input>
|
||||
<el-input v-model="tableStore.table.params.persistMin" placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')" clearable style="width: 94px"></el-input>
|
||||
<el-tag style="margin-left: 5px">< 时间数 <</el-tag>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.persistMax"
|
||||
placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||
clearable
|
||||
style="margin-left: 5px; width: 94px"
|
||||
></el-input>
|
||||
<el-input v-model="tableStore.table.params.persistMax" placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')" clearable
|
||||
style="margin-left: 5px; width: 94px"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件严重度:">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.severityMin"
|
||||
placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||
clearable
|
||||
style="width: 94px"
|
||||
></el-input>
|
||||
<el-input v-model="tableStore.table.params.severityMin" placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')" clearable style="width: 94px"></el-input>
|
||||
<el-tag style="margin-left: 5px">< 严重度 <</el-tag>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.severityMax"
|
||||
placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||
clearable
|
||||
style="margin-left: 5px; width: 94px"
|
||||
></el-input>
|
||||
<el-input v-model="tableStore.table.params.severityMax" placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')" clearable
|
||||
style="margin-left: 5px; width: 94px"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="暂降类型:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.eventType"
|
||||
placeholder="请选择暂降类型"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="tableStore.table.params.eventType" placeholder="请选择暂降类型" clearable multiple
|
||||
collapse-tags style="width: 100%">
|
||||
<el-option v-for="item in typeoptions" :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.eventReason"
|
||||
placeholder="请选择暂降原因"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reasonoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="tableStore.table.params.eventReason" placeholder="请选择暂降原因" clearable
|
||||
multiple collapse-tags style="width: 100%">
|
||||
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -129,6 +69,7 @@
|
||||
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||
<waveForm senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
|
||||
</div>
|
||||
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -139,6 +80,7 @@ import TableHeader from '@/components/table/header/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import addForm from './addForm.vue'
|
||||
import { getTransientValue } from '@/api/event-boot/report'
|
||||
|
||||
import waveForm from '@/components/echarts/waveForm.vue'
|
||||
@@ -149,11 +91,12 @@ defineOptions({
|
||||
const dictData = useDictData()
|
||||
const pageHeight = mainHeight(20)
|
||||
const view = ref(true)
|
||||
|
||||
const addFormRef = ref()
|
||||
const typeoptions = dictData.getBasicData('Event_Type')
|
||||
const tableRef = ref()
|
||||
const reasonoptions = dictData.getBasicData('Event_Reason')
|
||||
const triggeroptions = dictData.getBasicData('Event_Statis')
|
||||
const verifyReasonList: any = dictData.getBasicData('verifyReason')
|
||||
const wareaoptions = ref([
|
||||
{
|
||||
id: 1,
|
||||
@@ -177,41 +120,66 @@ const tableStore = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '暂降发生时刻', width: '200' },
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'subName', title: '变电站', width: '200' },
|
||||
{ field: 'ip', title: '网络参数', width: '200' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'scale', title: '电压等级(kV)' },
|
||||
{ field: 'startTime', title: '暂降发生时刻', minWidth: '200' },
|
||||
{ field: 'gdName', title: '供电公司', minWidth: '100' },
|
||||
{ field: 'subName', title: '变电站', minWidth: '200' },
|
||||
{ field: 'ip', title: '网络参数', minWidth: '200' },
|
||||
{ field: 'lineName', title: '监测点', minWidth: '100' },
|
||||
{ field: 'scale', title: '电压等级(kV)', minWidth: '120', },
|
||||
{
|
||||
field: 'verifyReason', title: '暂降原因', minWidth: '120', formatter: function (row) {
|
||||
return verifyReasonList.filter(item => item.id == row.cellValue)[0]?.name || '/' //row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'verifyReasonDetail', title: '暂降原因详情', minWidth: '200', formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
minWidth: '130',
|
||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
},
|
||||
{
|
||||
field: 'eventType',
|
||||
title: '触发类型',
|
||||
minWidth: '100',
|
||||
|
||||
formatter: ({ row }: any) => {
|
||||
return triggeroptions.filter(item => item.id == row.eventType)[0].name
|
||||
return triggeroptions.filter(item => item.id == row.eventType)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'advanceType', title: '暂降类型' },
|
||||
{ field: 'advanceReason', title: '暂降原因' },
|
||||
{ field: 'advanceType', title: '暂降类型', minWidth: '100', },
|
||||
{ field: 'advanceReason', title: '暂降原因', minWidth: '100' },
|
||||
{
|
||||
field: 'depth',
|
||||
title: '暂降深度(%)',
|
||||
minWidth: '100',
|
||||
formatter: ({ row }: any) =>
|
||||
row.featureAmplitude < 1 ? 100 - (row.featureAmplitude * 100).toFixed(0) : '/'
|
||||
},
|
||||
|
||||
{ field: 'duration', title: '持续时间(s)' },
|
||||
{ field: 'severity', title: '严重度', formatter: ({ row }: any) => (row.severity < 0 ? '/' : row.severity) },
|
||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||
{ field: 'severity', title: '严重度', minWidth: '100', formatter: ({ row }: any) => (row.severity < 0 ? '/' : row.severity) },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
width: '150',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '人工维护',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
addFormRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '波形分析',
|
||||
@@ -251,7 +219,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {}
|
||||
loadCallback: () => { }
|
||||
})
|
||||
|
||||
const boxoList = ref({})
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div v-show="view">
|
||||
<TableHeader datePicker>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -41,7 +37,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
@@ -62,6 +58,7 @@ const bxecharts = mainHeight(95).height as any
|
||||
const loading = ref(false)
|
||||
const view = ref(true)
|
||||
const view2 = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/advance-boot/process/querySagEventsPage',
|
||||
@@ -159,7 +156,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {}
|
||||
loadCallback: () => { }
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
const bxactiveName = ref('ssbx')
|
||||
@@ -167,8 +164,15 @@ const boxoList = ref({})
|
||||
const wp = ref({})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
TableHeaderRef.value.setInterval(1)
|
||||
nextTick(() => {
|
||||
|
||||
// tableStore.index()
|
||||
TableHeaderRef.value.onComSearch()
|
||||
|
||||
})
|
||||
})
|
||||
//分析记录管理
|
||||
const analysis1 = () => {
|
||||
|
||||
@@ -193,7 +193,7 @@ const exportEvent = () => {
|
||||
pageSize: tableStore.table.total
|
||||
}).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '影响范围分析', // 文件名字
|
||||
filename: '暂降聚合展示', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-button icon="el-icon-Upload" type="primary" class="mr10">导入excel</el-button>
|
||||
</el-upload>
|
||||
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
||||
<el-button type="primary" icon="el-icon-ArrowLeftBold" @click="emit('shutDown')">返回</el-button>
|
||||
<el-button icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</el-upload>
|
||||
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
||||
<el-button type="primary" icon="el-icon-Check" @click="preservation">保存</el-button>
|
||||
<el-button type="primary" icon="el-icon-ArrowLeftBold" @click="emit('shutDown')">返回</el-button>
|
||||
<el-button icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex">
|
||||
|
||||
Reference in New Issue
Block a user