绘制技术监督页面 联调承载能力评估
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="policyView" title="承载能力评估策略" width="1400" :before-close="handleClose">
|
||||
<el-dialog v-model="Views" title="承载能力评估策略" width="1400" :before-close="handleClose">
|
||||
<div style="display: flex; justify-content: end">
|
||||
<el-button icon="el-icon-Refresh" type="primary" @click="restores">一键还原</el-button>
|
||||
</div>
|
||||
@@ -16,23 +16,35 @@
|
||||
<vxe-column field="name" width="180" title="结果"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
<vxe-column field="count1" title="安全(个)">
|
||||
<template #default="{ row }">
|
||||
{{ row.comparisonOperators1 }}{{ row.comparisonOperators1 == '/' ? '' : row.count1 }}
|
||||
<template #default="row">
|
||||
<div @click="cells(row, row.row.comparisonOperators1, row.row.count1)">
|
||||
{{ row.row.comparisonOperators1
|
||||
}}{{ row.row.comparisonOperators1 == '/' ? '' : row.row.count1 }}
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="count2" title="III级预警(个)">
|
||||
<template #default="{ row }">
|
||||
{{ row.comparisonOperators2 }}{{ row.comparisonOperators2 == '/' ? '' : row.count2 }}
|
||||
<template #default="row">
|
||||
<div @click="cells(row, row.row.comparisonOperators2, row.row.count2)">
|
||||
{{ row.row.comparisonOperators2
|
||||
}}{{ row.row.comparisonOperators2 == '/' ? '' : row.row.count2 }}
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="count3" title="II级预警(个)">
|
||||
<template #default="{ row }">
|
||||
{{ row.comparisonOperators3 }}{{ row.comparisonOperators3 == '/' ? '' : row.count3 }}
|
||||
<template #default="row">
|
||||
<div @click="cells(row, row.row.comparisonOperators3, row.row.count3)">
|
||||
{{ row.row.comparisonOperators3
|
||||
}}{{ row.row.comparisonOperators3 == '/' ? '' : row.row.count3 }}
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="count4" title="I级预警(个)">
|
||||
<template #default="{ row }">
|
||||
{{ row.comparisonOperators4 }}{{ row.comparisonOperators4 == '/' ? '' : row.count4 }}
|
||||
<template #default="row">
|
||||
<div @click="cells(row, row.row.comparisonOperators4, row.row.count4)">
|
||||
{{ row.row.comparisonOperators4
|
||||
}}{{ row.row.comparisonOperators4 == '/' ? '' : row.row.count4 }}
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
@@ -48,6 +60,30 @@
|
||||
<vxe-column field="date12" title="畸次谐波合格个数"></vxe-column>
|
||||
<vxe-column field="date13" title="偶次谐波合格个数"></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
<el-dialog v-model="dialogVisible" title="安全等级配置" width="500">
|
||||
<el-form :model="form" label-width="auto">
|
||||
<el-form-item label="运算符号:">
|
||||
<el-radio-group v-model="form.comparisonOperators" @change="groupChang">
|
||||
<el-radio :label="'>'">></el-radio>
|
||||
<el-radio :label="'<'"><</el-radio>
|
||||
<el-radio :label="'>='">>=</el-radio>
|
||||
<el-radio :label="'<='"><=</el-radio>
|
||||
<el-radio :label="'=='">==</el-radio>
|
||||
<el-radio :label="'/'">/</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称:">
|
||||
<el-input-number v-model="form.count" :disabled="disabled" :min="0" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="add">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -56,12 +92,13 @@ import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { queyDetail, addCarryc, restore } from '@/api/advance-boot/bearingCapacity'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'Advancedanalysis/eventcorrelation'
|
||||
})
|
||||
const emit = defineEmits(['View'])
|
||||
const view = ref(false)
|
||||
const policyView = ref(true)
|
||||
|
||||
const Views = ref(true)
|
||||
|
||||
const xTable = ref()
|
||||
const loading = ref(false)
|
||||
@@ -100,25 +137,26 @@ const tableData = ref([
|
||||
date13: '0'
|
||||
}
|
||||
])
|
||||
const form = ref({
|
||||
id: '',
|
||||
name: '',
|
||||
role: '',
|
||||
num6: '',
|
||||
date12: '',
|
||||
date13: ''
|
||||
const form: any = ref({
|
||||
comparisonOperators: '',
|
||||
count: ''
|
||||
})
|
||||
|
||||
queyDetail().then(res => {
|
||||
photovoltaicData.value = []
|
||||
let title = ['安全', 'III级预警', 'II级预警', 'I级预警']
|
||||
// photovoltaicData.value = res.data
|
||||
for (let i: number = 1; i < 5; i++) {
|
||||
photovoltaicData.value.push({ ...setData(res.data.filter(item => item.indexResult == i)), name: title[i - 1] })
|
||||
}
|
||||
console.log('🚀 ~ queyDetail ~ res.data.filter(item=>item.indexResult==1):', photovoltaicData.value)
|
||||
})
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const disabled = ref(false)
|
||||
const info = () => {
|
||||
queyDetail().then(res => {
|
||||
photovoltaicData.value = []
|
||||
let title = ['安全', 'III级预警', 'II级预警', 'I级预警']
|
||||
// photovoltaicData.value = res.data
|
||||
for (let i: number = 1; i < 5; i++) {
|
||||
photovoltaicData.value.push({
|
||||
...setData(res.data.filter(item => item.indexResult == i)),
|
||||
name: title[i - 1]
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 处理返回数据
|
||||
const setData = (row: any) => {
|
||||
let data = {}
|
||||
row.forEach((item: any) => {
|
||||
@@ -127,14 +165,44 @@ const setData = (row: any) => {
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
||||
// <span @click="cells(row,comparisonOperators2,count2)">
|
||||
const cells = (row: any, comparisonOperators: any, count: any) => {
|
||||
form.value = {
|
||||
comparisonOperators: comparisonOperators,
|
||||
count: count,
|
||||
result: row.columnIndex,
|
||||
indexResult: row.rowIndex + 1
|
||||
}
|
||||
groupChang(comparisonOperators)
|
||||
dialogVisible.value = true
|
||||
}
|
||||
// 运算符变化
|
||||
const groupChang = e => {
|
||||
if (e == '/') {
|
||||
form.value.count = 0
|
||||
disabled.value = true
|
||||
} else {
|
||||
disabled.value = false
|
||||
}
|
||||
}
|
||||
// 安全等级配置确认
|
||||
const add = () => {
|
||||
addCarryc(form.value).then(res => {
|
||||
ElMessage.success('修改成功!')
|
||||
dialogVisible.value = false
|
||||
info()
|
||||
})
|
||||
}
|
||||
// 还原
|
||||
const restores = () => {
|
||||
restore().then(res => {
|
||||
ElMessage.success('还原成功!')
|
||||
info()
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
info()
|
||||
})
|
||||
// 取消
|
||||
const handleClose = () => {
|
||||
emit('View')
|
||||
|
||||
Reference in New Issue
Block a user