index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <script setup lang="ts">
  2. import { watch } from "vue";
  3. import { useUserStore } from "@/store/modules/user";
  4. import EvaluateCard from "@/views/evaluation/components/EvaluateCard.vue";
  5. import RadarChart from "@/views/charts-components/RadarChart.vue";
  6. import FocusBarChart from "@/views/charts-components/FocusBarChart.vue";
  7. import RelaxBarChart from "@/views/charts-components/RelaxBarChart.vue";
  8. import IndicatorsBarChart from "@/views/charts-components/IndicatorsBarChart.vue";
  9. defineOptions({
  10. name: "EvaluateIndex",
  11. inheritAttrs: false,
  12. });
  13. const userStore = useUserStore();
  14. watch(
  15. () => userStore.schoolId,
  16. (newValue, oldValue) => {
  17. console.log(newValue, oldValue);
  18. }
  19. );
  20. /**
  21. * 数据卡片
  22. */
  23. // 全部学生
  24. const studentCount = 600;
  25. // 设备套数
  26. const focusCount = 50;
  27. // 累计训练次数
  28. const trainingCount = 200;
  29. let studentInfo = ref("");
  30. //
  31. const data = ref([78, 88, 65, 82, 65]);
  32. // 五维雷达图
  33. const radarData = ref([
  34. [78, 88, 65, 82, 65],
  35. [28, 38, 45, 32, 25],
  36. ]);
  37. const radarStar = ref([1, 2, 3, 4, 5]);
  38. const radarTag = true;
  39. // 专注力四维柱状图
  40. const focusData = ref([
  41. [3.8, 4.7, 2.5, 5.0],
  42. [7.4, 8.3, 6.5, 9.0],
  43. ]);
  44. const focusStar = ref([1, 2, 3, 4]);
  45. // 3维放松度分析柱状图
  46. const relaxData = ref([
  47. [50, 60, 55],
  48. [55, 90, 70],
  49. ]);
  50. // 脑电评估检测指数分析看板
  51. const indicatorsData = ref([
  52. [50, 60, 55, 64.5],
  53. [55, 90, 70, 82.5],
  54. ]);
  55. </script>
  56. <template>
  57. <div class="evaluate-container">
  58. <!-- 数据卡片 -->
  59. <EvaluateCard
  60. :students="studentCount"
  61. :focuses="focusCount"
  62. :trainings="trainingCount"
  63. />
  64. <div class="evaluate-chart">
  65. <!-- 学生查找 -->
  66. <div class="student-search">
  67. <div class="search">
  68. <el-input
  69. v-model="studentInfo"
  70. size="large"
  71. placeholder="请输入学生名称或手机号码"
  72. />
  73. <el-button size="large" type="primary">查找</el-button>
  74. </div>
  75. <div class="result">
  76. <ul>
  77. <li>
  78. <img src="" alt="" />
  79. <p>风间彻</p>
  80. <p>13726267788</p>
  81. </li>
  82. <li></li>
  83. </ul>
  84. </div>
  85. </div>
  86. <!-- 图表展示-->
  87. <div class="student-chart">
  88. <div class="title">儿童脑电专注力测评数据分析</div>
  89. <el-row :gutter="10">
  90. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
  91. <div class="box-card">
  92. <RadarChart
  93. id="radarChart1"
  94. :data-sets="radarData"
  95. :star="radarStar"
  96. :tag="radarTag"
  97. width="400px"
  98. height="300px"
  99. class="chart"
  100. />
  101. <div class="info center">5D脑电数据模型</div>
  102. </div>
  103. </el-col>
  104. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
  105. <div class="box-card">
  106. <FocusBarChart
  107. id="focusBarChart1"
  108. :data-sets="focusData"
  109. :star="focusStar"
  110. width="400px"
  111. height="300px"
  112. class="chart"
  113. />
  114. <div class="info">专注力四维分析</div>
  115. </div>
  116. </el-col>
  117. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"></el-col>
  118. </el-row>
  119. <div class="title">脑电检测分析</div>
  120. <el-row :gutter="10">
  121. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
  122. <div class="box-card">
  123. <RadarChart
  124. id="radarChart2"
  125. :data-sets="radarData"
  126. :star="radarStar"
  127. :tag="radarTag"
  128. width="400px"
  129. height="300px"
  130. class="chart"
  131. />
  132. <div class="info center">5D脑电数据模型</div>
  133. </div>
  134. </el-col>
  135. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
  136. <div class="box-card">
  137. <RelaxBarChart
  138. id="relaxBarChart1"
  139. :data-sets="relaxData"
  140. width="400px"
  141. height="300px"
  142. class="chart"
  143. />
  144. <div class="info">3维放松度分析</div>
  145. </div>
  146. </el-col>
  147. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
  148. <div class="box-card">
  149. <IndicatorsBarChart
  150. id="indicatorsBarChart1"
  151. :data-sets="indicatorsData"
  152. width="400px"
  153. height="300px"
  154. class="chart"
  155. />
  156. <div class="info">脑电评估检测指数分析看板</div>
  157. </div>
  158. </el-col>
  159. </el-row>
  160. </div>
  161. </div>
  162. </div>
  163. </template>
  164. <style lang="scss" scoped>
  165. .evaluate-container {
  166. position: relative;
  167. padding: 30px;
  168. }
  169. .evaluate-chart {
  170. box-sizing: border-box;
  171. width: 100%;
  172. border-radius: 30px;
  173. background: #fff;
  174. position: relative;
  175. padding: 0 10px 20px 386px;
  176. }
  177. :deep(.el-input__wrapper) {
  178. background: #ffffff;
  179. border-radius: 12px;
  180. }
  181. :deep(.el-input__wrapper) {
  182. box-shadow: none !important;
  183. }
  184. .student-search {
  185. box-sizing: border-box;
  186. width: 342px;
  187. min-height: 100%;
  188. border: 1px solid #e6e8eb;
  189. border-radius: 30px;
  190. padding-top: 34px;
  191. overflow: hidden;
  192. position: absolute;
  193. left: 0;
  194. top: 0;
  195. .el-input {
  196. width: 220px;
  197. border: 1px solid #e6e8eb;
  198. border-radius: 12px;
  199. margin: 0 10px 0 15px;
  200. }
  201. :deep(.el-input__inner) {
  202. font-size: 14px;
  203. }
  204. .el-button {
  205. font-size: 14px;
  206. padding: 0 24px;
  207. border-radius: 12px;
  208. }
  209. .result {
  210. margin-top: 15px;
  211. li {
  212. position: relative;
  213. box-sizing: border-box;
  214. width: 100%;
  215. height: 70px;
  216. padding: 8px 0 0 90px;
  217. color: #23283c;
  218. cursor: pointer;
  219. &:hover {
  220. background: #e5eefe;
  221. }
  222. .active {
  223. color: #4284f2;
  224. background: #e5eefe;
  225. }
  226. p {
  227. line-height: 27px;
  228. margin: 0;
  229. }
  230. img {
  231. position: absolute;
  232. left: 22px;
  233. top: 8px;
  234. width: 54px;
  235. height: 54px;
  236. background: #999999;
  237. border-radius: 5px;
  238. border: none;
  239. }
  240. }
  241. }
  242. }
  243. .student-chart {
  244. .title {
  245. height: 54px;
  246. line-height: 54px;
  247. font-size: 18px;
  248. color: #23283c;
  249. }
  250. .box-card {
  251. height: 338px;
  252. box-sizing: border-box;
  253. background: #f3f6fd;
  254. border-radius: 20px;
  255. overflow: hidden;
  256. .info {
  257. height: 38px;
  258. line-height: 38px;
  259. font-size: 14px;
  260. background: #4284f2;
  261. color: #ffffff;
  262. &.center {
  263. text-align: center;
  264. }
  265. }
  266. }
  267. }
  268. </style>