index.vue 5.0 KB

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