diff --git a/ui/dasadmin/src/stores/adminInfo.ts b/ui/dasadmin/src/stores/adminInfo.ts index 73b04382..82157e63 100644 --- a/ui/dasadmin/src/stores/adminInfo.ts +++ b/ui/dasadmin/src/stores/adminInfo.ts @@ -12,9 +12,10 @@ export const useAdminInfo = defineStore('adminInfo', { last_login_time: '', token: '', refresh_token: '', + authorities: [], // 是否是superAdmin,用于判定是否显示终端按钮等,不做任何权限判断 super: false, - orgid:0 + orgid: 0, } }, actions: { diff --git a/ui/dasadmin/src/stores/interface/index.ts b/ui/dasadmin/src/stores/interface/index.ts index 63659884..41d4e7d9 100644 --- a/ui/dasadmin/src/stores/interface/index.ts +++ b/ui/dasadmin/src/stores/interface/index.ts @@ -51,6 +51,7 @@ export interface AdminInfo { username: string nickname: string avatar: string + authorities: Number[] last_login_time: string token: string refresh_token: string diff --git a/ui/dasadmin/src/views/backend/login.vue b/ui/dasadmin/src/views/backend/login.vue index 2113bb91..0c5cef4e 100644 --- a/ui/dasadmin/src/views/backend/login.vue +++ b/ui/dasadmin/src/views/backend/login.vue @@ -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, diff --git a/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue b/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue index 46a52313..e990a1f8 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/powerCurveAnalysis.vue @@ -8,7 +8,7 @@ -
+
风速来源 @@ -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) => { diff --git a/ui/dasadmin/src/views/backend/theoreticalpowerCurve/index.vue b/ui/dasadmin/src/views/backend/theoreticalpowerCurve/index.vue index e7953bee..5302369e 100644 --- a/ui/dasadmin/src/views/backend/theoreticalpowerCurve/index.vue +++ b/ui/dasadmin/src/views/backend/theoreticalpowerCurve/index.vue @@ -727,7 +727,7 @@ $paginationHeight: 32px; .theoreticalpowerCurve { position: relative; width: 100%; - height: 100%; + background-color: #f2f3f5; // background: transparent; .mainContainer { display: flex;