index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div class="group-profile-page">
  3. <Page title="安检人事管理可视化大屏" :tabs="['能力画像', '运行数据']" @tab-change="handleTabChange">
  4. <SearchBar v-model:visible="searchVisible" @search="handleSearch" :deptType="'TEAMS'" />
  5. <PentagonGroup :items="pentagonItems" />
  6. <Profile v-if="activeTab === 0" :query-params="queryParams" />
  7. <RunData v-else />
  8. </Page>
  9. </div>
  10. </template>
  11. <script setup>
  12. import { ref } from 'vue'
  13. import Page from '../components/page.vue'
  14. import SearchBar from '../components/SearchBar.vue'
  15. import Profile from './component/profile.vue'
  16. import RunData from './component/runData.vue'
  17. import PentagonGroup from '../components/PentagonGroup.vue'
  18. import zongheIcon from '@/assets/icons/portrait/zonghe_icon.png'
  19. import renyuanIcon from '@/assets/icons/portrait/renyuan_icon.png'
  20. import zu02Icon from '@/assets/icons/portrait/zu02_icon.png'
  21. import nianlingIcon from '@/assets/icons/portrait/nianling_icon.png'
  22. import silingIcon from '@/assets/icons/portrait/siling_icon.png'
  23. const activeTab = ref(0)
  24. const searchVisible = ref(false)
  25. const queryParams = ref({})
  26. const pentagonItems = ref([
  27. {
  28. value: '88',
  29. label: '综合得分',
  30. iconPath: zongheIcon,
  31. cornerRadius: 20,
  32. vertices: {
  33. topLeft: { x: 0, y: 0 },
  34. topRight: { x: 300, y: 0 },
  35. bottomRight: { x: 260, y: 200 },
  36. bottomLeft: { x: 0, y: 200 }
  37. },
  38. cardContentStyle: {
  39. gap: '100px'
  40. },
  41. edgeGradients: {
  42. top: { start: '#0f46fa', end: 'transparent' },
  43. right: { start: 'transparent', end: '#9903C1' },
  44. bottom: { start: '#9903C1', end: 'transparent' },
  45. left: { start: 'transparent', end: '#0f46fa' }
  46. },
  47. bgGradientStart: 'rgba(33,33,58,0.95)',
  48. bgGradientEnd: 'rgba(15,70,250,0.2)'
  49. },
  50. {
  51. value: '10',
  52. label: '人员数量',
  53. iconPath: renyuanIcon,
  54. cornerRadius: 20,
  55. vertices: {
  56. topLeft: { x: 10, y: 0 },
  57. topRight: { x: 300, y: 0 },
  58. bottomRight: { x: 260, y: 200 },
  59. bottomLeft: { x: -30, y: 200 }
  60. }, cardContentStyle: {
  61. gap: '100px'
  62. },
  63. edgeGradients: {
  64. top: { start: '#0f46fa', end: 'transparent' },
  65. right: { start: 'transparent', end: '#9903C1' },
  66. bottom: { start: '#9903C1', end: 'transparent' },
  67. left: { start: 'transparent', end: '#0f46fa' }
  68. },
  69. bgGradientStart: 'rgba(33,33,58,0.95)',
  70. bgGradientEnd: 'rgba(15,70,250,0.2)'
  71. },
  72. {
  73. value: '周游波小组',
  74. label: '',
  75. iconPath: zu02Icon,
  76. iconStyle: {
  77. width: '250px',
  78. height: '250px'
  79. },
  80. valueStyle: {
  81. fontSize: '48px',
  82. bottom: '26px',
  83. position: 'relative'
  84. },
  85. vertical: true,
  86. cornerRadius: 20,
  87. vertices: {
  88. topLeft: { x: 10, y: 0 },
  89. topRight: { x: 280, y: 0 },
  90. bottomRight: { x: 320, y: 200 },
  91. bottomLeft: { x: -30, y: 200 }
  92. },
  93. cardContentStyle: {
  94. gap: '0px',
  95. position: 'relative',
  96. bottom: '65px'
  97. },
  98. edgeGradients: {
  99. top: { start: '#0f46fa', end: 'transparent' },
  100. right: { start: 'transparent', end: '#9903C1' },
  101. bottom: { start: '#9903C1', end: 'transparent' },
  102. left: { start: 'transparent', end: '#0f46fa' }
  103. },
  104. bgGradientStart: 'rgba(33,33,58,0.95)',
  105. bgGradientEnd: 'rgba(15,70,250,0.2)'
  106. },
  107. {
  108. value: '28',
  109. label: '平均年龄',
  110. iconPath: nianlingIcon,
  111. cornerRadius: 20,
  112. vertices: {
  113. topLeft: { x: -10, y: 0 },
  114. topRight: { x: 290, y: 0 },
  115. bottomRight: { x: 330, y: 200 },
  116. bottomLeft: { x: 30, y: 200 }
  117. },
  118. cardContentStyle: {
  119. gap: '100px'
  120. },
  121. edgeGradients: {
  122. top: { start: '#0f46fa', end: 'transparent' },
  123. right: { start: 'transparent', end: '#9903C1' },
  124. bottom: { start: '#9903C1', end: 'transparent' },
  125. left: { start: 'transparent', end: '#0f46fa' }
  126. },
  127. bgGradientStart: 'rgba(33,33,58,0.95)',
  128. bgGradientEnd: 'rgba(15,70,250,0.2)'
  129. },
  130. {
  131. value: '3.5',
  132. label: '平均司龄',
  133. iconPath: silingIcon,
  134. cornerRadius: 20,
  135. vertices: {
  136. topLeft: { x: 0, y: 0 },
  137. topRight: { x: 300, y: 0 },
  138. bottomRight: { x: 300, y: 200 },
  139. bottomLeft: { x: 40, y: 200 }
  140. },
  141. cardContentStyle: {
  142. gap: '100px'
  143. },
  144. edgeGradients: {
  145. top: { start: '#0f46fa', end: 'transparent' },
  146. right: { start: 'transparent', end: '#9903C1' },
  147. bottom: { start: '#9903C1', end: 'transparent' },
  148. left: { start: 'transparent', end: '#0f46fa' }
  149. },
  150. bgGradientStart: 'rgba(33,33,58,0.95)',
  151. bgGradientEnd: 'rgba(15,70,250,0.2)'
  152. }
  153. ])
  154. const handleSearch = (params) => {
  155. queryParams.value = params
  156. }
  157. const handleTabChange = (index) => {
  158. activeTab.value = index
  159. }
  160. </script>
  161. <style lang="scss" scoped>
  162. .group-profile-page {
  163. width: 100%;
  164. min-height: 100vh;
  165. overflow-y: auto;
  166. }
  167. </style>