功率曲线
This commit is contained in:
parent
dcd598aab2
commit
0a70a9a7d8
@ -12,9 +12,10 @@ export const useAdminInfo = defineStore('adminInfo', {
|
||||
last_login_time: '',
|
||||
token: '',
|
||||
refresh_token: '',
|
||||
authorities: [],
|
||||
// 是否是superAdmin,用于判定是否显示终端按钮等,不做任何权限判断
|
||||
super: false,
|
||||
orgid:0
|
||||
orgid: 0,
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
@ -51,6 +51,7 @@ export interface AdminInfo {
|
||||
username: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
authorities: Number[]
|
||||
last_login_time: string
|
||||
token: string
|
||||
refresh_token: string
|
||||
|
@ -225,6 +225,7 @@ const onSubmit = () => {
|
||||
username: res.data.sysUser.account,
|
||||
nickname: res.data.sysUser.userName,
|
||||
orgid: res.data.sysUser.orgId,
|
||||
authorities: res.data.sysUser.authorities,
|
||||
avatar: res.data.sysUser.headImage,
|
||||
last_login_time: '',
|
||||
token: res.data.token,
|
||||
|
@ -8,7 +8,7 @@
|
||||
<el-option v-for="v in statAnalysisSelectOptions.deviceId" :key="v.value" :label="v.label" :value="v.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="selectPart">
|
||||
<div v-if="hasAuthority" class="selectPart">
|
||||
<span>风速来源</span>
|
||||
<el-select v-model="statAnalysisSpeedSource" placeholder="请选择风速来源" class="statAnalysisSelect">
|
||||
<el-option v-for="v in statAnalysisSelectOptions.speedSource" :key="v.value" :label="v.label" :value="v.value"></el-option>
|
||||
@ -79,8 +79,14 @@ const AvgWindSpeedSwitch = ref(false)
|
||||
const chartType = ref('scatter') // 默认散点图
|
||||
const statAnalysisFatory = ref('')
|
||||
const statAnalysisFatoryList: any = ref([])
|
||||
const hasAuthority = ref(false)
|
||||
const statAnalysisSpeedSource = ref('AvgWindSpeed_10min')
|
||||
const statAnalysisDeviceId = ref('')
|
||||
|
||||
import { useAdminInfo } from '/@/stores/adminInfo'
|
||||
const adminInfo = useAdminInfo()
|
||||
|
||||
hasAuthority.value = Object.values(adminInfo.authorities).includes(105)
|
||||
const statAnalysisSelectOptions: any = reactive({
|
||||
speedSource: [
|
||||
{ label: '原始风速', value: 'AvgWindSpeed_10min' },
|
||||
@ -100,13 +106,13 @@ const updateChart = () => {
|
||||
const series = {
|
||||
type: chartType.value,
|
||||
data: chartType.value === 'scatter' ? seriesDataInit.value : calculateData.value,
|
||||
name: '实际值',
|
||||
name: '实际功率',
|
||||
symbolSize: 5,
|
||||
symbol: 'circle',
|
||||
}
|
||||
option.series[0] = series
|
||||
if (!option.legend.data.includes('实际值')) {
|
||||
option.legend.data.push('实际值')
|
||||
if (!option.legend.data.includes('实际功率')) {
|
||||
option.legend.data.push('实际功率')
|
||||
}
|
||||
chart.value.setOption(option)
|
||||
}
|
||||
@ -348,7 +354,7 @@ const statAnalysisOperate = () => {
|
||||
const iGenPower = resData0['AvgActivePower_10min']['values']
|
||||
const iWindSpeed = resData0[statAnalysisSpeedSource.value]['values']
|
||||
if (!iWindSpeed.length) {
|
||||
ElMessage.info(`实时值数据为空`)
|
||||
ElMessage.info(`实际功率数据为空`)
|
||||
} else {
|
||||
const seriesData = iGenPower.map((item: any, index: number) => {
|
||||
return [getCutDecimalsValue(iWindSpeed[index], 2), getCutDecimalsValue(item, 2)]
|
||||
@ -368,15 +374,14 @@ const statAnalysisOperate = () => {
|
||||
const series = {
|
||||
type: 'line',
|
||||
data: seriesData,
|
||||
name: '理论值',
|
||||
name: '理论功率',
|
||||
smooth: true,
|
||||
symbolSize: 0.1,
|
||||
symbol: 'circle',
|
||||
}
|
||||
option.series.push(series)
|
||||
option.legend.data.push('理论值')
|
||||
option.legend.data.push('理论功率')
|
||||
}
|
||||
console.log('🚀 ~ .then ~ option.legend.data:', option.legend.data)
|
||||
chart.value.setOption(option)
|
||||
})
|
||||
.catch((error) => {
|
||||
|
@ -727,7 +727,7 @@ $paginationHeight: 32px;
|
||||
.theoreticalpowerCurve {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f2f3f5;
|
||||
// background: transparent;
|
||||
.mainContainer {
|
||||
display: flex;
|
||||
|
Loading…
Reference in New Issue
Block a user