| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <template>
- <div class="group-profile-page">
- <Page title="安检人事管理可视化大屏" :tabs="['能力画像', '运行数据']" @tab-change="handleTabChange">
- <SearchBar v-model:visible="searchVisible" ref="searchBar" @search="handleSearch"
- :deptType="'BRIGADE'" />
- <PentagonGroup :items="pentagonItems" />
- <Profile v-if="activeTab === 0" :query-params="queryParams" />
- <RunData v-else :query-params="queryParams" />
- </Page>
- </div>
- </template>
- <script setup>
- import { ref, onMounted } from 'vue'
- import Page from '../components/page.vue'
- import SearchBar from '../components/SearchBar.vue'
- import Profile from './component/profile.vue'
- import RunData from './component/runData.vue'
- import PentagonGroup from '../components/PentagonGroup.vue'
- import { countDeptTeamStats } from '@/api/portraitManagement/portraitManagement'
- import zongheIcon from '@/assets/icons/portrait/zonghe_icon.png'
- import renyuanIcon from '@/assets/icons/portrait/renyuan_icon.png'
- import zu02Icon from '@/assets/icons/portrait/zu02_icon.png'
- import nianlingIcon from '@/assets/icons/portrait/nianling_icon.png'
- import silingIcon from '@/assets/icons/portrait/siling_icon.png'
- const activeTab = ref(0)
- const searchVisible = ref(false)
- const queryParams = ref({})
- const pentagonItems = ref([])
- const invokerCountDeptTeamStats = (params) => {
- const copyParams = {
- deptId: params.deptId,
- }
- countDeptTeamStats(copyParams).then(res => {
- if (res.code === 200 && res.data) {
- const result = res.data
- pentagonItems.value = [
- {
- value: result.totalScore,
- label: '综合得分',
- iconPath: zongheIcon,
- cornerRadius: 20,
- vertices: {
- topLeft: { x: 0, y: 0 },
- topRight: { x: 300, y: 0 },
- bottomRight: { x: 260, y: 200 },
- bottomLeft: { x: 0, y: 200 }
- },
- cardContentStyle: {
- gap: '100px'
- },
- edgeGradients: {
- top: { start: '#0f46fa', end: 'transparent' },
- right: { start: 'transparent', end: '#9903C1' },
- bottom: { start: '#9903C1', end: 'transparent' },
- left: { start: 'transparent', end: '#0f46fa' }
- },
- bgGradientStart: 'rgba(33,33,58,0.95)',
- bgGradientEnd: 'rgba(15,70,250,0.2)'
- },
- {
- value: result.employeeCount,
- label: '人员数量',
- iconPath: renyuanIcon,
- cornerRadius: 20,
- vertices: {
- topLeft: { x: 10, y: 0 },
- topRight: { x: 300, y: 0 },
- bottomRight: { x: 260, y: 200 },
- bottomLeft: { x: -30, y: 200 }
- }, cardContentStyle: {
- gap: '100px'
- },
- edgeGradients: {
- top: { start: '#0f46fa', end: 'transparent' },
- right: { start: 'transparent', end: '#9903C1' },
- bottom: { start: '#9903C1', end: 'transparent' },
- left: { start: 'transparent', end: '#0f46fa' }
- },
- bgGradientStart: 'rgba(33,33,58,0.95)',
- bgGradientEnd: 'rgba(15,70,250,0.2)'
- },
- {
- value: result.deptName,
- label: '',
- iconPath: zu02Icon,
- iconStyle: {
- width: '250px',
- height: '250px'
- },
- valueStyle: {
- fontSize: '48px',
- bottom: '26px',
- position: 'relative'
- },
- vertical: true,
- cornerRadius: 20,
- vertices: {
- topLeft: { x: 10, y: 0 },
- topRight: { x: 280, y: 0 },
- bottomRight: { x: 320, y: 200 },
- bottomLeft: { x: -30, y: 200 }
- },
- cardContentStyle: {
- gap: '0px',
- position: 'relative',
- bottom: '65px'
- },
- edgeGradients: {
- top: { start: '#0f46fa', end: 'transparent' },
- right: { start: 'transparent', end: '#9903C1' },
- bottom: { start: '#9903C1', end: 'transparent' },
- left: { start: 'transparent', end: '#0f46fa' }
- },
- bgGradientStart: 'rgba(33,33,58,0.95)',
- bgGradientEnd: 'rgba(15,70,250,0.2)'
- },
- {
- value: result.avgAge,
- label: '平均年龄',
- iconPath: nianlingIcon,
- cornerRadius: 20,
- vertices: {
- topLeft: { x: -10, y: 0 },
- topRight: { x: 290, y: 0 },
- bottomRight: { x: 330, y: 200 },
- bottomLeft: { x: 30, y: 200 }
- },
- cardContentStyle: {
- gap: '100px'
- },
- edgeGradients: {
- top: { start: '#0f46fa', end: 'transparent' },
- right: { start: 'transparent', end: '#9903C1' },
- bottom: { start: '#9903C1', end: 'transparent' },
- left: { start: 'transparent', end: '#0f46fa' }
- },
- bgGradientStart: 'rgba(33,33,58,0.95)',
- bgGradientEnd: 'rgba(15,70,250,0.2)'
- },
- {
- value: result.avgWorkYears,
- label: '平均司龄',
- iconPath: silingIcon,
- cornerRadius: 20,
- vertices: {
- topLeft: { x: 0, y: 0 },
- topRight: { x: 300, y: 0 },
- bottomRight: { x: 300, y: 200 },
- bottomLeft: { x: 40, y: 200 }
- },
- cardContentStyle: {
- gap: '100px'
- },
- edgeGradients: {
- top: { start: '#0f46fa', end: 'transparent' },
- right: { start: 'transparent', end: '#9903C1' },
- bottom: { start: '#9903C1', end: 'transparent' },
- left: { start: 'transparent', end: '#0f46fa' }
- },
- bgGradientStart: 'rgba(33,33,58,0.95)',
- bgGradientEnd: 'rgba(15,70,250,0.2)'
- }
- ]
- }
- })
- }
- const handleSearch = (params) => {
- queryParams.value = params
- invokerCountDeptTeamStats(params)
- }
- const handleTabChange = (index) => {
- activeTab.value = index
- }
- const searchBar = ref(null)
- onMounted(() => {
- const defParams = Object.assign({ deptId: '' }, searchBar.value.getDefQuery())
- queryParams.value = defParams
- })
- </script>
- <style lang="scss" scoped>
- .group-profile-page {
- width: 100%;
- min-height: 100vh;
- overflow-y: auto;
- }
- </style>
|