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