修改 承载能力bug 完成自定义报表

This commit is contained in:
GGJ
2024-03-28 15:21:58 +08:00
parent 965b18b540
commit e6b1613d91
13 changed files with 469 additions and 69 deletions

View File

@@ -64,7 +64,7 @@
</div>
<div v-if="view3" class="pd10">
<span style="font-weight: 500; font-size: 22px">高级分析</span>
<el-button type="primary" @click="gaoBack" style="float: right">返回</el-button>
<el-button type="primary" icon="el-icon-ArrowLeftBold" @click="gaoBack" style="float: right">返回</el-button>
<analytics :flag="true" :GJList="GJList" :boxoList="boxoList"></analytics>
</div>
</template>

View File

@@ -38,15 +38,10 @@
filterable
:disabled="props.rowList.id != undefined"
style="width: 240px"
value-key="id"
value-key="userId"
@change="userChange"
>
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.userName"
:value="item"
/>
<el-option v-for="item in userList" :key="item" :label="item.userName" :value="item" />
</el-select>
</el-descriptions-item>
<el-descriptions-item label="拟接入光伏容量(MVA)" label-align="center" width="25%">
@@ -88,7 +83,7 @@
ref="xTable"
:data="tableData"
>
<vxe-colgroup field="group0" title="等级" align="right">
<vxe-colgroup field="group0" title="等级">
<vxe-column field="name" width="180" title="结果"></vxe-column>
</vxe-colgroup>
<vxe-column field="level1" title="安全">
@@ -165,7 +160,7 @@ import { useDictData } from '@/stores/dictData'
const props = defineProps(['rowList'])
const monitoringPoint = useMonitoringPoint()
const size = ref(26)
const size = ref(20)
const dictData = useDictData()
const datePickerRef = ref()
const height = mainHeight(80).height
@@ -228,7 +223,7 @@ const dotList: any = ref({
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((280 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 100)
}
datePickerRef.value.setTimeOptions([{ label: '周', value: 4 }])
datePickerRef.value.setInterval(4)
@@ -246,7 +241,12 @@ const info = () => {
}).then(res => {
userList.value = res.data.records
user.value = userList.value[0] || {}
console.log('🚀 ~ info ~ res.data.records:', res.data.records)
console.log('🚀 ~ info ~ user.value:', user.value)
userData.value = res.data.records[0] || {}
console.log('🚀 ~ info ~ userData.value:', userData.value)
})
}
@@ -268,6 +268,10 @@ const onSubmit = async () => {
options3.value = {}
voltageList.value = []
showBtn.value = false
if (props.rowList.id != undefined) {
user.value = props.rowList
rendering(props.rowList)
}
Promise.all([queryCarryCapacityData(form), queryCarryCapacityQData(form), queryCarryCapacityIData(form)])
.then(res => {
// 有功功率
@@ -279,20 +283,17 @@ const onSubmit = async () => {
for (let k in res[0].data.stringMap) {
voltageList.value.push({
name: k,
c: res[0].data.stringMap[k][0],
a: res[0].data.stringMap[k][1],
b: res[0].data.stringMap[k][2]
c: res[0].data.stringMap[k][0].toFixed(2),
a: res[0].data.stringMap[k][1].toFixed(2),
b: res[0].data.stringMap[k][2].toFixed(2)
})
}
setEChart(1, res[0].data.data)
setEChart(2, res[1].data.data)
setEChart(3, res[2].data.data)
setEChart(1, res[0].data.data, '有功功率', 'w')
setEChart(2, res[1].data.data, '无功功率', 'w')
setEChart(3, res[2].data.data, '谐波电流幅值', 'A')
showBtn.value = true
loading.value = false
// props.rowList.id != undefined
if (props.rowList.id != undefined) {
rendering(props.rowList)
}
})
.catch(err => {
loading.value = false
@@ -313,10 +314,10 @@ const modelTrain = () => {
}).then(res => {})
}
const setEChart = (val: any, data: any) => {
const setEChart = (val: any, data: any, text: string, name: string) => {
let options = {
title: {
text: '在线率统计',
text: text,
x: 'center',
textStyle: {
fontWeight: 'normal'
@@ -324,12 +325,13 @@ const setEChart = (val: any, data: any) => {
},
xAxis: {
data: data.filter(item => item.phaseType == 'A').map(item => item.time),
// name: '时间',
name: '时间',
onZero: false,
position: 'bottom' // 设置 x 轴在底部
},
yAxis: {
type: 'value',
name: name,
max: Math.ceil(Math.max(...data.map(item => item.value))),
min: Math.floor(Math.min(...data.map(item => item.value)))
},
@@ -340,6 +342,7 @@ const setEChart = (val: any, data: any) => {
grid: {
left: '30px'
},
color: ['#FFCC33', '#00CC00', '#CC0000'],
series: [
{
name: 'A',

View File

@@ -5,7 +5,7 @@
</div>
<el-divider content-position="left">光伏电站承载能力评估策略</el-divider>
<vxe-table v-bind="defaultAttribute" :loading="loading" :data="photovoltaicData" :span-method="mergeRowMethod">
<vxe-colgroup field="group0" title="等级" align="right">
<vxe-colgroup field="group0" title="等级">
<vxe-column field="name" width="180" title="结果"></vxe-column>
</vxe-colgroup>
<vxe-column field="comparisonOperators1" title="安全(个)">
@@ -43,7 +43,7 @@
</vxe-table>
<el-divider content-position="left">充电站电加热负荷电气化铁路承载能力评估</el-divider>
<vxe-table v-bind="defaultAttribute" ref="xTable" :loading="loading" :data="tableData">
<vxe-colgroup field="group0" title="等级" align="right">
<vxe-colgroup field="group0" title="等级">
<vxe-column field="name" width="180" title="结果"></vxe-column>
</vxe-colgroup>

View File

@@ -38,7 +38,7 @@
<charge :rowList="rowList" />
</el-tab-pane>
</el-tabs>
<el-button class="quit" icon="el-icon-Close" type="primary" @click="quit">返回</el-button>
<el-button class="quit" icon="el-icon-ArrowLeftBold" type="primary" @click="quit">返回</el-button>
</div>
</div>
</template>
@@ -82,7 +82,14 @@ const tableStore: any = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'lineName', title: '配变台区', width: '500' },
{
field: 'lineName',
title: '配变台区',
width: '500',
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
{
field: 'evaluateType',
title: '评估类型',
@@ -166,6 +173,7 @@ tableStore.table.params.id = dictData.state.area[0].id
provide('tableStore', tableStore)
const quit = () => {
addedShow.value = true
tableStore.index()
rowList.value = {}
}
onMounted(() => {

View File

@@ -30,7 +30,7 @@
</el-select>
</el-form-item>
<el-form-item
:label="userShow == 'Power_Station_Users' ? '用户协议容量(MVA)' : '拟接入容量(MVA)'"
:label="userShow == 'Power_Station_Users' ? '拟接入容量(MVA)' : '用户协议容量(MVA)'"
prop="protocolCapacity"
>
<!-- <el-input v-model="form.protocolCapacity" clearable placeholder="请输入用户协议容量" /> -->
@@ -91,18 +91,8 @@ const equipmentRef = ref()
const title = ref('')
const areaList: any = dictData.areaSelect()
const userShow: any = ref('Power_Station_Users')
interface RuleForm {
area: string
city: string
province: string
region: string
regionList: any
protocolCapacity: number
userName: string
userType: string
voltage: string
}
const form = ref<RuleForm>({
const form = ref({
area: '',
city: '',
province: '',
@@ -148,7 +138,7 @@ const tableStore: any = new TableStore({
}
},
{ field: 'area', title: '所属区域' },
// { field: 'area', title: '所属区域' },
{
field: 'voltage',
title: '电压等级(V)',
@@ -292,6 +282,17 @@ const onSubmit = () => {
// 取消
const handleClose = () => {
form.value = {
area: '',
city: '',
province: '',
protocolCapacity: 0,
region: '',
userName: '',
userType: '',
voltage: '',
regionList: []
}
ruleFormRef.value?.resetFields()
dialogVisible.value = false
}

View File

@@ -112,6 +112,7 @@ const info = async (list: any) => {
}
})
await gongfunction()
ITIC.value = {
title: {
text: 'ITIC曲线'

View File

@@ -34,9 +34,9 @@ const tableStore = new TableStore({
{
title: '电压暂降频次统计表',
children: [
{ title: '暂降福度', field: 'amplitude', width: '130' },
{ title: '暂降幅度(p.u.)', field: 'amplitude', width: '130' },
{
title: '持续时间',
title: '持续时间(s)',
field: 'loginName',
children: []
}
@@ -208,7 +208,28 @@ const initEchart = () => {
dataZoom: null,
backgroundColor: '#fff',
tooltip: {
trigger: 'axis'
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,
formatter: function (params: any) {
let tips = ''
tips += '<font>暂降幅度(p.u.):' + apiData.value.amplitudes[params.value[0]] + '</font><br/>'
tips += '<font>持续时间(s):' + apiData.value.durations[params.value[1]] + '</font><br/>'
tips += '<font>事件次数::' + params.value[2] + '</font>'
return tips
}
},
title: {
text: '暂降密度图',

View File

@@ -93,21 +93,383 @@ import SecondSheet from '@/components/secondSheet/index.vue'
import MyEchart from '@/components/echarts/MyEchart.vue'
import { reactive, ref } from 'vue'
const options = ref({
legend: {
data: ['越限事件', '未越限事件', '不确定事件'],
left: '10px'
},
tooltip: {
formatter: function (a: any) {
if (a[0].value[4] == undefined) {
return
}
let relVal = ''
relVal = "<font style='color:" + "'>供电公司:" + '&nbsp' + '&nbsp' + a[0].value[3] + '</font><br/>'
relVal += "<font style='color:" + "'>变电站:" + '&nbsp' + '&nbsp' + a[0].value[4] + '</font><br/>'
relVal += "<font style='color:" + "'>发生时刻:" + '&nbsp' + '&nbsp' + a[0].value[2] + '</font><br/>'
relVal +=
"<font style='color:" + "'>持续时间:" + '&nbsp' + '&nbsp' + a[0].value[0].toFixed(3) + 's</font><br/>'
relVal += "<font style='color:" + "'>特征幅值:" + '&nbsp' + '&nbsp' + a[0].value[1].toFixed(3) + '%</font>'
return relVal
}
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
name: '持续时间\n ms',
type: 'log',
min: '0.001',
max: '1000',
splitLine: { show: false }
},
yAxis: {
type: 'value'
name: '幅值/p.u.',
splitNumber: 10,
minInterval: 3
},
grid: {
right: '70px'
},
color: ['#ff0000', '#ff0000', '#2f4554', '#61a0a8', '#d48265'],
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line'
type: 'line',
data: [
// [0.001, 200],
[0.003, 0],
[0.003, 110],
// [0.5, 120],
// [0.5, 110],
// [10, 110],
[1000, 110]
],
showSymbol: false,
tooltips: {
show: false
}
},
{
data: [50, 30, 124, 318, 175, 127, 160],
type: 'line'
type: 'line',
data: [
[0.02, 0],
[0.02, 90],
// [0.5, 70],
// [0.5, 80],
// [10, 80],
// [10, 90],
[1000, 90]
],
showSymbol: false,
tooltips: {
show: false
}
},
{
name: '越限事件',
type: 'scatter',
symbol: 'circle',
data: [
{
value: [
7.795,
94,
'2024-03-27 20:46:53.319',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'00ea8d9bab92f5edcec72fec87bda760'
],
itemStyle: {
normal: {
color: '#2f4554'
}
}
},
{
value: [
7.846,
92,
'2024-03-17 12:51:54.520',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'01497b699e36624f14f0db879d52cb8a'
],
itemStyle: {
normal: {
color: '#2f4554'
}
}
},
{
value: [
0.047,
89,
'2024-03-26 07:39:44.114',
'长兴市',
'古茶山',
'c63a677b0f6fdd667d1305938f04a052',
'017fae8ed5310bb39ce09442951fe868'
],
itemStyle: {
normal: {
color: '#2f4554'
}
}
},
{
value: [
0.064,
89,
'2024-03-23 20:42:02.339',
'淮安市',
'淮安荣芯半导体公司',
'c8b1c708164f4e69837835d623464f71',
'01909672630cec80b36d9de81d6de8a6'
],
itemStyle: {
normal: {
color: '#2f4554'
}
}
},
{
value: [
0.059,
86,
'2024-03-01 07:28:37.000',
'南通市',
'南通象屿海洋装备有限责任公司',
'b4c1f4657462669ed4205b3c9ec27715',
'01ddfd3d-d863-4b32-ba9c-270bca5464ac'
],
itemStyle: {
normal: {
color: '#2f4554'
}
}
},
{
value: [
8.026,
94,
'2024-03-19 08:02:40.363',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'028cb780851f0dbf42d77deb2288e6ae'
],
itemStyle: {
normal: {
color: '#2f4554'
}
}
}
]
},
{
name: '未越限事件',
type: 'scatter',
symbol: 'circle',
data: [
{
value: [
7.795,
134,
'2024-03-27 20:46:53.319',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'00ea8d9bab92f5edcec72fec87bda760'
],
itemStyle: {
normal: {
color: '#61a0a8'
}
}
},
{
value: [
7.846,
134,
'2024-03-17 12:51:54.520',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'01497b699e36624f14f0db879d52cb8a'
],
itemStyle: {
normal: {
color: '#61a0a8'
}
}
},
{
value: [
0.047,
134,
'2024-03-26 07:39:44.114',
'长兴市',
'古茶山',
'c63a677b0f6fdd667d1305938f04a052',
'017fae8ed5310bb39ce09442951fe868'
],
itemStyle: {
normal: {
color: '#61a0a8'
}
}
},
{
value: [
0.064,
134,
'2024-03-23 20:42:02.339',
'淮安市',
'淮安荣芯半导体公司',
'c8b1c708164f4e69837835d623464f71',
'01909672630cec80b36d9de81d6de8a6'
],
itemStyle: {
normal: {
color: '#61a0a8'
}
}
},
{
value: [
0.059,
134,
'2024-03-01 07:28:37.000',
'南通市',
'南通象屿海洋装备有限责任公司',
'b4c1f4657462669ed4205b3c9ec27715',
'01ddfd3d-d863-4b32-ba9c-270bca5464ac'
],
itemStyle: {
normal: {
color: '#61a0a8'
}
}
},
{
value: [
8.026,
134,
'2024-03-19 08:02:40.363',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'028cb780851f0dbf42d77deb2288e6ae'
],
itemStyle: {
normal: {
color: '#61a0a8'
}
}
}
]
},
{
name: '不确定事件',
type: 'scatter',
symbol: 'circle',
data: [
{
value: [
17.795,
134,
'2024-03-27 20:46:53.319',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'00ea8d9bab92f5edcec72fec87bda760'
],
itemStyle: {
normal: {
color: '#d48265'
}
}
},
{
value: [
17.846,
134,
'2024-03-17 12:51:54.520',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'01497b699e36624f14f0db879d52cb8a'
],
itemStyle: {
normal: {
color: '#d48265'
}
}
},
{
value: [
1.047,
134,
'2024-03-26 07:39:44.114',
'长兴市',
'古茶山',
'c63a677b0f6fdd667d1305938f04a052',
'017fae8ed5310bb39ce09442951fe868'
],
itemStyle: {
normal: {
color: '#d48265'
}
}
},
{
value: [
1.064,
134,
'2024-03-23 20:42:02.339',
'淮安市',
'淮安荣芯半导体公司',
'c8b1c708164f4e69837835d623464f71',
'01909672630cec80b36d9de81d6de8a6'
],
itemStyle: {
normal: {
color: '#d48265'
}
}
},
{
value: [
1.059,
134,
'2024-03-01 07:28:37.000',
'南通市',
'南通象屿海洋装备有限责任公司',
'b4c1f4657462669ed4205b3c9ec27715',
'01ddfd3d-d863-4b32-ba9c-270bca5464ac'
],
itemStyle: {
normal: {
color: '#d48265'
}
}
},
{
value: [
18.026,
134,
'2024-03-19 08:02:40.363',
'南通市',
'南通象屿海洋装备有限责任公司',
'cc297ca8575101e3e6c5dfc609eb1c1c',
'028cb780851f0dbf42d77deb2288e6ae'
],
itemStyle: {
normal: {
color: '#d48265'
}
}
}
]
}
],
options: {

View File

@@ -25,7 +25,7 @@
</el-tree>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleClose">绑定</el-button>
<el-button type="primary" @click="bind">绑定</el-button>
<el-button @click="handleClose">取消</el-button>
</div>
</template>
@@ -36,7 +36,7 @@
import { ref } from 'vue'
import { ElMessageBox } from 'element-plus'
import { useDictData } from '@/stores/dictData'
import { getDataByTempId } from '@/api/harmonic-boot/luckyexcel'
import { getDataByTempId, updateBindTemplate } from '@/api/harmonic-boot/luckyexcel'
const emit = defineEmits(['shutDown'])
const dictData = useDictData()
const dialogVisible = ref(false)
@@ -58,12 +58,10 @@ const open = (row: any) => {
id: item.deptId,
activation: item.activation
})
console.log('🚀 ~ getDataByTempId ~ item.activation:', item.activation)
idarr.value.push({ id: item.deptId })
})
gettreeData(area.value, keyarr.value)
dataTree.value = area.value
console.log('🚀 ~ getDataByTempId ~ dataTree.value:', dataTree.value)
})
}
//过滤数据
@@ -83,6 +81,13 @@ const gettreeData = (mdata, ids) => {
}
})
}
// 绑定
const bind=()=>{
updateBindTemplate().then(res=>{
// ElMessage.success('绑定成功')
})
}
defineExpose({ open })
</script>

View File

@@ -6,7 +6,6 @@
</el-form-item>
<el-form-item label="部门:" prop="deptId">
<Area
:disabled="title === '编辑报表模板'"
v-model="formdata.deptId"
style="width: 100%"
collapse-tags

View File

@@ -75,16 +75,16 @@ const tableStore: any = new TableStore({
}, 10)
}
},
{
name: 'edit',
title: '绑定',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
departmentRef.value.open(row)
}
},
// {
// name: 'edit',
// title: '绑定',
// type: 'primary',
// icon: 'el-icon-Plus',
// render: 'basicButton',
// click: row => {
// departmentRef.value.open(row)
// }
// },
{
name: 'del',
text: '删除',

View File

@@ -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-Close" @click="emit('shutDown')">返回</el-button>
<el-button type="primary" icon="el-icon-ArrowLeftBold" @click="emit('shutDown')">返回</el-button>
</div>
<div style="display: flex">
@@ -35,7 +35,7 @@ const options: any = ref({
container: 'luckysheet',
title: '', // 表 头名
lang: 'zh', // 中文
showtoolbar: true, // 是否显示工具栏
showtoolbar: false, // 是否显示工具栏
showinfobar: false, // 是否显示顶部信息栏
showsheetbar: true, // 是否显示底部sheet按钮
data: [

View File

@@ -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-Close" @click="emit('shutDown')">返回</el-button>
<el-button type="primary" icon="el-icon-ArrowLeftBold" @click="emit('shutDown')">返回</el-button>
</div>
<div style="display: flex">