profile.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <div class="station-content-wrapper">
  3. <div class="station-content">
  4. <div class="content-row">
  5. <ProfileMembers :columns="teamColumns" :data="teamData" />
  6. <ProfileBasicDistribution
  7. :chartData1="genderData"
  8. :chartData2="nationData"
  9. :chartData3="politicalData"
  10. />
  11. </div>
  12. <div class="content-row" style="width: 50%;">
  13. <ProfilePositionDistribution
  14. :chartData1="skillData"
  15. :chartData2="operateData"
  16. :chartData3="postData"
  17. />
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. <script setup>
  23. import { ref } from 'vue'
  24. import ProfileMembers from '../../components/ProfileMembers.vue'
  25. import ProfileBasicDistribution from '../../components/ProfileBasicDistribution.vue'
  26. import ProfilePositionDistribution from '../../components/ProfilePositionDistribution.vue'
  27. const props = defineProps({
  28. queryParams: {
  29. type: Object,
  30. default: () => ({})
  31. }
  32. })
  33. const teamColumns = [
  34. { label: '部门', prop: 'dept' },
  35. { label: '员工数量', prop: 'empCount' },
  36. { label: '党员数量', prop: 'partyCount' },
  37. { label: '平均年龄', prop: 'avgAge' },
  38. { label: '平均工龄', prop: 'avgWorkYears' },
  39. { label: '职业资格证书等级', prop: 'certLevel' },
  40. { label: '平均升级年龄', prop: 'avgUpgradeAge' },
  41. { label: '综合得分', prop: 'totalScore' }
  42. ]
  43. const teamData = ref([
  44. { dept: '旅检一部', empCount: '800', partyCount: '7', avgAge: '25', avgWorkYears: '3', certLevel: '16', avgUpgradeAge: '3', totalScore: '90' },
  45. { dept: '旅检二部', empCount: '756', partyCount: '2', avgAge: '28', avgWorkYears: '8', certLevel: '18', avgUpgradeAge: '5', totalScore: '88' },
  46. { dept: '旅检三部', empCount: '708', partyCount: '7', avgAge: '25', avgWorkYears: '3', certLevel: '23', avgUpgradeAge: '3', totalScore: '86' }
  47. ])
  48. const genderData = [
  49. { value: 650, name: '女', itemStyle: { color: '#ff9f9f' } },
  50. { value: 750, name: '男', itemStyle: { color: '#7effc4' } }
  51. ]
  52. const nationData = [
  53. { value: 615, name: '汉族', itemStyle: { color: '#7effc4' } },
  54. { value: 484, name: '回族', itemStyle: { color: '#4da6ff' } },
  55. { value: 156, name: '其他', itemStyle: { color: '#ffd93d' } }
  56. ]
  57. const politicalData = [
  58. { value: 410, name: '群众', itemStyle: { color: '#ffd93d' } },
  59. { value: 540, name: '共青团员', itemStyle: { color: '#4da6ff' } },
  60. { value: 270, name: '中共党员', itemStyle: { color: '#ff6b6b' } },
  61. { value: 138, name: '预备党员', itemStyle: { color: '#7effc4' } }
  62. ]
  63. const skillData = {
  64. categories: ['等级1', '等级2', '等级3', '等级4', '等级5'],
  65. values: [450, 650, 900, 750, 550],
  66. colors: ['#ff6b9d', '#ff6b6b']
  67. }
  68. const operateData = {
  69. categories: ['0-3', '4-7', '8-11', '12-15', '16-19'],
  70. values: [650, 500, 400, 300, 550],
  71. colors: ['#a55eea', '#bd03fb']
  72. }
  73. const postData = {
  74. categories: ['仿伪', '炸探', '人身', '开包', '开检后', '开机'],
  75. values: [450, 600, 180, 150, 650, 550],
  76. colors: ['#ffd93d', '#ffd9b3']
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .station-content-wrapper {
  81. .station-content {
  82. display: flex;
  83. flex-direction: column;
  84. gap: 20px;
  85. padding: 0 20px 40px;
  86. }
  87. .content-row {
  88. display: flex;
  89. gap: 20px;
  90. > .info-card {
  91. flex: 1;
  92. min-width: 0;
  93. }
  94. }
  95. }
  96. </style>