From 9907ed9d4403920cbc88e466283cc1d1be4fec28 Mon Sep 17 00:00:00 2001 From: YCA001 <2915341988@qq.com> Date: Fri, 10 Jun 2022 14:23:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E5=88=86=E5=B8=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/euler/src/views/company/Index.vue | 19 +- .../contributors/AuthorityManagement.vue | 260 ++++++++++++++++++ .../euler/src/views/contributors/Index.vue | 246 ++--------------- packages/shared/components/ODiagram.vue | 10 +- packages/shared/components/OEchartTreemap.vue | 1 - packages/shared/utils/helper.ts | 30 +- 6 files changed, 306 insertions(+), 260 deletions(-) create mode 100644 packages/euler/src/views/contributors/AuthorityManagement.vue diff --git a/packages/euler/src/views/company/Index.vue b/packages/euler/src/views/company/Index.vue index d00399b..4a3ae40 100644 --- a/packages/euler/src/views/company/Index.vue +++ b/packages/euler/src/views/company/Index.vue @@ -6,11 +6,16 @@ import { onMounted, ref, watch, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import { ArrowDown } from '@element-plus/icons-vue'; -import { sigsProcessing, treeProcessing } from 'shared/utils/helper'; +import { + sigsProcessing, + treeProcessing, + processing, +} from 'shared/utils/helper'; import { queryCompanySigDetails, queryCompanyUserContribute, queryCompanyContribute, + queryCompanyUsers, } from 'shared/api'; import OEchartCircularPile from 'shared/components/OEchartCircularPile.vue'; import OEchartTreemap from 'shared/components/OEchartTreemap.vue'; @@ -64,12 +69,12 @@ const getoechartTreeValue = () => { timeRange: 'lastonemonth', community: 'openeuler', }; - queryCompanySigDetails(query).then((data) => { - const Data = treeProcessing(data?.data || []); - contributors.value = getItemListData(Data.sigs, 'D0'); - oechartData.value.D0 = getItemListData(Data.sigs, 'D0'); - oechartData.value.D1 = getItemListData(Data.sigs, 'D1'); - oechartData.value.D2 = getItemListData(Data.sigs, 'D2'); + queryCompanyUsers(query).then((data) => { + const Data = processing(data?.data || []); + contributors.value = Data.sigData['0']; + oechartData.value.D0 = Data.sigData['0']; + oechartData.value.D1 = Data.sigData['1']; + oechartData.value.D2 = Data.sigData['2']; }); }; const param = ref({ diff --git a/packages/euler/src/views/contributors/AuthorityManagement.vue b/packages/euler/src/views/contributors/AuthorityManagement.vue new file mode 100644 index 0000000..6502955 --- /dev/null +++ b/packages/euler/src/views/contributors/AuthorityManagement.vue @@ -0,0 +1,260 @@ + + + diff --git a/packages/euler/src/views/contributors/Index.vue b/packages/euler/src/views/contributors/Index.vue index 04d5312..25027de 100644 --- a/packages/euler/src/views/contributors/Index.vue +++ b/packages/euler/src/views/contributors/Index.vue @@ -11,12 +11,10 @@ import FormSearch from './FormSearch.vue'; import TheForm from '@/components/TheForm.vue'; import TheBar from '../../components/TheBar.vue'; import useScroll from 'shared/hooks/useScroll'; -import ODiagram from 'shared/components/ODiagram.vue'; import OAnchor from 'shared/components/OAnchor.vue'; -import TheList from '@/components/TheList.vue'; import titleBg from '@/assets/title-bg.png'; import chevronsUp from '~icons/app/chevrons-up'; -import { grouprelationsList } from 'shared/utils/groupList'; +import AuthorityManagement from './AuthorityManagement.vue'; const { t, locale } = useI18n(); const usePersonal = usePersonalStore(); const useCommon = useCommonStore(); @@ -47,7 +45,6 @@ const formOption = computed(() => { }, ]; }); - // theform组件调用 const componentName = 'personal'; const loading = ref(true); @@ -58,14 +55,8 @@ onMounted(() => { usePersonal.getPersonalData(); loading.value = false; }); - const hightRanking = computed(() => usePersonal.hightRanking); const lowRanking = computed(() => usePersonal.lowRanking); -const number = Math.ceil(grouprelationsList.length / 2); -const hightSig = computed(() => grouprelationsList.slice(0, number)); -const lowSig = computed(() => - grouprelationsList.slice(number, grouprelationsList.length) -); const typeLable = ref(''); const switchType = () => { switch (usePersonal.personalForm.contributeType) { @@ -87,17 +78,14 @@ watch( switchType(); } ); - // TOP20 index修改 const indexMethod = (index: number) => { return index + 11; }; - const search404 = ref(false); const searchStsate = (item: boolean) => { search404.value = item; }; - const { isScrollUp } = useScroll('up'); watch( () => isScrollUp.value, @@ -115,7 +103,7 @@ const anchorData = [ 'groupActive', 'companyRelations', 'groupRelations', -] +];