Merge branch 'main' of https://git.jsspisoft.com/ry-das
This commit is contained in:
commit
23cd34c798
@ -38,8 +38,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-space style="margin-top: 10px">
|
<el-space style="margin-top: 10px">
|
||||||
<div style="min-width: 30px">模板</div>
|
<div style="min-width: 30px">模板</div>
|
||||||
<el-select v-model="template" placeholder="请选择模板" class="templateSelect commonSelect" @change="changeTemplate">
|
<el-select v-model="template" placeholder="请选择模板" class="templateSelect commonSelect">
|
||||||
<el-option v-for="v in reportTemplateList" :key="v.value" :label="v.label" :value="v.value">
|
<el-option v-for="v in reportTemplateList" :key="v.value" :label="v.label" :value="v.value" @click="changeTemplate">
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="tamplateOption">
|
<div class="tamplateOption">
|
||||||
<span>{{ v.label }}</span>
|
<span>{{ v.label }}</span>
|
||||||
@ -227,7 +227,7 @@ const calFunctions = [
|
|||||||
]
|
]
|
||||||
// 模板
|
// 模板
|
||||||
const template = ref('')
|
const template = ref('')
|
||||||
const reportTemplateList = ref<{ label: string; value: string; columns: any[]; interval: string }[]>([])
|
const reportTemplateList = ref<{ label: string; value: string; columns: any[]; interval: string; calFunction: string }[]>([])
|
||||||
const getReportTemplateList = () => {
|
const getReportTemplateList = () => {
|
||||||
getReportTemplateListReq({
|
getReportTemplateListReq({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -242,6 +242,7 @@ const getReportTemplateList = () => {
|
|||||||
value: item.id,
|
value: item.id,
|
||||||
columns: tem.columns,
|
columns: tem.columns,
|
||||||
interval: tem.interval,
|
interval: tem.interval,
|
||||||
|
calFunction: tem.calFunction,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -276,13 +277,13 @@ const addReportTemplate = () => {
|
|||||||
const tem = {
|
const tem = {
|
||||||
name: value,
|
name: value,
|
||||||
interval: interval.value,
|
interval: interval.value,
|
||||||
|
calFunction: calFunction.value,
|
||||||
columns: reportTableColumn.value,
|
columns: reportTableColumn.value,
|
||||||
}
|
}
|
||||||
const data = {
|
const data = {
|
||||||
category: '单机报表' as const,
|
category: '单机报表' as const,
|
||||||
template: JSON.stringify(tem),
|
template: JSON.stringify(tem),
|
||||||
}
|
}
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
addReportTemplateListReq(data).then((res) => {
|
addReportTemplateListReq(data).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@ -313,9 +314,10 @@ const delReportTemplate = (id: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeTemplate = (val: string) => {
|
const changeTemplate = (val: string) => {
|
||||||
const target = reportTemplateList.value.find((item) => item.value === val)
|
const target = reportTemplateList.value.find((item) => item.value === template.value)
|
||||||
if (target) {
|
if (target) {
|
||||||
interval.value = target.interval ? target.interval : interval.value
|
interval.value = target.interval ? target.interval : interval.value
|
||||||
|
calFunction.value = target.calFunction ? target.calFunction : calFunction.value
|
||||||
reportTableColumn.value = target.columns
|
reportTableColumn.value = target.columns
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,7 +406,7 @@ const statAnalysisExport = () => {
|
|||||||
madeinfactory: params.split(':')[0],
|
madeinfactory: params.split(':')[0],
|
||||||
model: params.split(':')[1],
|
model: params.split(':')[1],
|
||||||
windSource: windSource[0]['label'],
|
windSource: windSource[0]['label'],
|
||||||
displayCurve: AvgWindSpeedSwitch ? 0 : 1,
|
displayCurve: AvgWindSpeedSwitch.value ? 1 : 0,
|
||||||
}
|
}
|
||||||
powerCurveExport(requestData).then((res: any) => {
|
powerCurveExport(requestData).then((res: any) => {
|
||||||
const downloadUrl = window.URL.createObjectURL(res)
|
const downloadUrl = window.URL.createObjectURL(res)
|
||||||
|
@ -684,6 +684,7 @@ const timestampToTime = (timestamp: any) => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.statAnalysis {
|
.statAnalysis {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.contain {
|
.contain {
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 60px);
|
||||||
// display: flex;
|
// display: flex;
|
||||||
@ -796,7 +797,8 @@ const timestampToTime = (timestamp: any) => {
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
}
|
||||||
.transferRight {
|
.transferRight {
|
||||||
height: 400px;
|
height: 380px;
|
||||||
|
|
||||||
border: 1px solid #e1edf6;
|
border: 1px solid #e1edf6;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
@ -812,6 +814,8 @@ const timestampToTime = (timestamp: any) => {
|
|||||||
border-radius: 6px 6px 0 0;
|
border-radius: 6px 6px 0 0;
|
||||||
}
|
}
|
||||||
.transferMain {
|
.transferMain {
|
||||||
|
overflow: auto;
|
||||||
|
height: calc(100% - 40px);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
:deep(.el-table__row) {
|
:deep(.el-table__row) {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -839,4 +843,7 @@ const timestampToTime = (timestamp: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
:deep(.el-picker-panel__footer) {
|
||||||
|
padding: 20px 12px 16px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-space style="margin: 10px 20px">
|
<el-space style="margin: 10px 20px">
|
||||||
<div style="min-width: 30px">模板</div>
|
<div style="min-width: 30px">模板</div>
|
||||||
<el-select v-model="template" placeholder="请选择模板" class="templateSelect" @change="changeTemplate" clearable>
|
<el-select v-model="template" placeholder="请选择模板" class="templateSelect" clearable>
|
||||||
<el-option v-for="v in reportTemplateList" :key="v.id" :label="v.name" :value="v.id">
|
<el-option v-for="v in reportTemplateList" :key="v.id" :label="v.name" :value="v.id" @click="changeTemplate">
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="tamplateOption">
|
<div class="tamplateOption">
|
||||||
<span>{{ v.name }}</span>
|
<span>{{ v.name }}</span>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
style="height: calc(100% - 140px); width: calc(100% - 60px); border: 1px solid rgb(217, 217, 217); margin: 80px 40px"
|
style="height: calc(100% - 140px); width: calc(100% - 60px); border: 1px solid rgb(217, 217, 217); margin: 80px 40px"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="showMeasure" title="选择测点" width="1200" top="0" :destroy-on-close="true">
|
<el-dialog v-model="showMeasure" title="选择测点" width="1122" top="0" :destroy-on-close="true">
|
||||||
<div class="measureSlot">
|
<div class="measureSlot">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -709,8 +709,8 @@ const delReportTemplate = (id: string) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeTemplate = (val: string) => {
|
const changeTemplate = () => {
|
||||||
const target: any = reportTemplateList.value.find((item) => item.id === val)
|
const target: any = reportTemplateList.value.find((item) => item.id === template.value)
|
||||||
if (target) {
|
if (target) {
|
||||||
multipleSelection.value = target.multipleSelection
|
multipleSelection.value = target.multipleSelection
|
||||||
statAnalysisInterval.value = target.interval
|
statAnalysisInterval.value = target.interval
|
||||||
@ -855,9 +855,11 @@ const changeTemplate = (val: string) => {
|
|||||||
}
|
}
|
||||||
.measureSlot {
|
.measureSlot {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.col {
|
.col {
|
||||||
border: 1px solid #e1edf6;
|
border: 1px solid #e1edf6;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
width: 536px;
|
||||||
.transferHeader {
|
.transferHeader {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user