微调
This commit is contained in:
@@ -139,9 +139,9 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top" >
|
||||
<el-input
|
||||
v-model="formData.nodeDevNum"
|
||||
v-model.trim.number="formData.nodeDevNum"
|
||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||
maxlength="5"
|
||||
placeholder="请输入最大终端数"
|
||||
@@ -149,7 +149,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
||||
<el-input
|
||||
v-model="formData.maxProcessNum"
|
||||
v-model.trim.number="formData.maxProcessNum"
|
||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||
maxlength="5"
|
||||
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
||||
@@ -289,7 +289,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '最大监测点数量',
|
||||
title: '最大终端数量',
|
||||
field: 'nodeDevNum'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<TableHeader :showReset="false" 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="请输入关键字" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
|
||||
@@ -134,7 +134,7 @@ const exportEvent = () => {
|
||||
form.append('type', '0')
|
||||
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||
console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||
//console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||
form.append('file', uploadList.value?.raw || '')
|
||||
// 特殊字符正则表达式
|
||||
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
||||
|
||||
@@ -384,7 +384,7 @@ const startRunTest = () => {
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
console.log(res.data.url, 'res')
|
||||
//console.log(res.data.url, 'res')
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
<div class="default-main">
|
||||
<vxe-table :data="shareData" v-bind="defaultAttribute" height="auto" auto-resize>
|
||||
<vxe-column field="month" title="月份" min-width="120px" sortable></vxe-column>
|
||||
<vxe-column field="notAssociated" title="电压暂降次数" sortable></vxe-column>
|
||||
<vxe-column field="notAssociated" title="未关联暂降次数" sortable></vxe-column>
|
||||
<vxe-column field="linked" title="已关联处理事件" sortable></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -101,15 +102,26 @@ const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaNa
|
||||
]
|
||||
|
||||
|
||||
let all = 0
|
||||
// let all = 0
|
||||
|
||||
// list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
// all += item.linked + item.notAssociated
|
||||
// })
|
||||
let allNotAssociated = 0
|
||||
let allLinked= 0
|
||||
list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
all += item.linked + item.notAssociated
|
||||
allNotAssociated += item.notAssociated
|
||||
})
|
||||
|
||||
list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
allLinked += item.linked
|
||||
})
|
||||
|
||||
shareData.value = [
|
||||
{
|
||||
month: '总计',
|
||||
notAssociated: all.toFixed(2)
|
||||
notAssociated: allNotAssociated.toFixed(2),
|
||||
linked: allLinked.toFixed(2)
|
||||
},
|
||||
...list.monthlyStatistics.monthCalculation
|
||||
]
|
||||
|
||||
@@ -240,7 +240,7 @@ const tableStore = new TableStore({
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
minWidth: '130',
|
||||
formatter: ({ row }: any) => {
|
||||
formatter: (row: any) => {
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="网公司标志:">
|
||||
<el-form-item label="网公司标志">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.monitorFlag"
|
||||
collapse-tags
|
||||
@@ -130,6 +130,7 @@ const tableStore = new TableStore({
|
||||
width: '140',
|
||||
formatter: (row: any) => {
|
||||
// return (row.cellValue * 100).toFixed(0)
|
||||
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
|
||||
@@ -35,44 +35,44 @@ const height = mainHeight(80).height
|
||||
const activeName = ref('1')
|
||||
const activeName1 = ref('1')
|
||||
const list = ref([
|
||||
// {
|
||||
// name: '暂态严重度统计',
|
||||
// id: '3',
|
||||
// isGroup: true,
|
||||
// url: '/event-boot/report/getSeverity',
|
||||
// column: [
|
||||
// {
|
||||
// title: '暂态事件严重度(前二十)',
|
||||
// children: [
|
||||
// {
|
||||
// field: 'index',
|
||||
// title: '序号',
|
||||
// width: '80',
|
||||
// formatter: (row: any) => {
|
||||
// return (
|
||||
// (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
||||
// row.rowIndex +
|
||||
// 1
|
||||
// )
|
||||
// }
|
||||
// },
|
||||
// { field: 'startTime', title: '暂态事件发生时刻', width: '200' },
|
||||
// { field: 'gdName', title: '供电公司' },
|
||||
// { field: 'subName', title: '变电站' },
|
||||
// { field: 'lineName', title: '监测点' },
|
||||
// { field: 'voltageScale', title: '监测点电压等级' },
|
||||
// { field: 'loadType', title: '干扰源类型' },
|
||||
// {
|
||||
// field: 'featureAmplitude',
|
||||
// title: '暂降(骤升)幅值(%)',
|
||||
// formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
// },
|
||||
// { field: 'duration', title: '持续时间(s)' },
|
||||
// { field: 'severity', title: '暂态事件严重度' }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
name: '暂态严重度统计',
|
||||
id: '3',
|
||||
isGroup: true,
|
||||
url: '/event-boot/report/getSeverity',
|
||||
column: [
|
||||
{
|
||||
title: '暂态事件严重度(前二十)',
|
||||
children: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (
|
||||
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
||||
row.rowIndex +
|
||||
1
|
||||
)
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '暂态事件发生时刻', width: '200' },
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'voltageScale', title: '监测点电压等级' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
},
|
||||
{ field: 'duration', title: '持续时间(s)' },
|
||||
{ field: 'severity', title: '暂态事件严重度' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '暂降事件列表',
|
||||
id: '4',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
<template #tip>
|
||||
<div>请上传xml文件</div>
|
||||
<div>请上传xml文件,文件名不能包含空格</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -92,6 +92,12 @@ const isValidFile = (file: UploadRawFile) => {
|
||||
return false
|
||||
}
|
||||
|
||||
// 检查文件名是否包含空格
|
||||
if (file.name.includes(' ')) {
|
||||
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
// 上传报告
|
||||
@@ -102,6 +108,14 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
|
||||
// 检查文件名是否包含空格
|
||||
if (file.name.includes(' ')) {
|
||||
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
|
||||
@@ -116,6 +130,13 @@ const submit = async () => {
|
||||
return ElMessage.warning('请上传icd文件')
|
||||
}
|
||||
if (reportPath.value[0]?.raw != undefined) {
|
||||
|
||||
// 检查文件名是否包含空格
|
||||
if (reportPath.value[0].raw.name.includes(' ')) {
|
||||
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
|
||||
return
|
||||
}
|
||||
|
||||
await uploadFile(reportPath.value[0].raw, '/icd/').then(res => {
|
||||
//治理工程验收报告
|
||||
form.fileName = res.data.fileName.split('.')[0]
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
clearable
|
||||
placeholder="请输入任务名称"
|
||||
placeholder="请输入icd名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user