cjfx_fsdtj.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <div class="cjfx_fsdtj">
  3. <NavHeader />
  4. <bread-crumb />
  5. <div class="w-1200px m-auto flex flex-row justify-between">
  6. <div class="w-188px">
  7. <leftSider />
  8. </div>
  9. <div class="w-1012px p-4 blueBg">
  10. <div class="flex items-center">
  11. <el-select class="mr-10px" v-model="normal_subject" placeholder="请选择学科" size="large">
  12. <el-option label="全部" value="0" />
  13. <el-option v-for="item in subject_list" :key="item.value" :label="item.label" :value="item.value" />
  14. </el-select>
  15. <el-select class="mr-10px" v-model="normal_classroom" placeholder="请选择班级" size="large">
  16. <el-option label="全部" value="0" />
  17. <el-option v-for="item in classroom_list" :key="item.value" :label="item.label" :value="item.value" />
  18. </el-select>
  19. <el-select class="mr-10px" v-model="normal_school" placeholder="请选择学校" size="large">
  20. <el-option label="全部" value="0" />
  21. <el-option v-for="item in school_list" :key="item.value" :label="item.label" :value="item.value" />
  22. </el-select>
  23. </div>
  24. <div class="flex justify-between mt-4 exportBtn">
  25. <div>
  26. <el-button color="#003eee" type="primary" size="large">导出</el-button>
  27. </div>
  28. </div>
  29. <div class="h-150px mt-20px overflow-x-auto echartData" id="echartData"></div>
  30. <div class="w-980px h-auto tableList">
  31. <div class="h-50px rounded flex flex-nowrap tableList_title">
  32. <div class="w-11/12 bg-opacity-0 singleT"></div>
  33. <div class="w-11/12 singleT" v-for="(item,index) in classArr" :key="index">{{item}}</div>
  34. </div>
  35. <div class="h-auto flex flex-nowrap tableList_content" v-for="(item,index) in classBaseInfoArr" :key="index">
  36. <div class="w-11/12 h-60px rounded mt-2px singleTSec singleTSecDif" >{{ item.period }}</div>
  37. <div class="w-11/12 h-60px mt-2px singleTSec " v-for="(secItem,index) in item.detailNum">{{ secItem }}</div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <commonFooter />
  43. </div>
  44. </template>
  45. <route lang="json">
  46. {
  47. "meta": {
  48. "title": "考试分析",
  49. "breadcrumb": true
  50. }
  51. }
  52. </route>
  53. <script lang="ts" setup>
  54. import * as echarts from 'echarts';
  55. import { useRouter } from "vue-router";
  56. const router = useRouter();
  57. let normal_subject = $ref("");
  58. let normal_classroom = $ref("");
  59. let normal_school = $ref("");
  60. let normal_teacher = $ref("");
  61. let subject_list = [{
  62. value: '1',
  63. label: '语文'
  64. }, {
  65. value: '2',
  66. label: '数学'
  67. }]
  68. let classroom_list = [{
  69. value: '1',
  70. label: '英语'
  71. }, {
  72. value: '2',
  73. label: '体育'
  74. }, {
  75. value: '3',
  76. label: '音乐'
  77. }
  78. ];
  79. let school_list = [{
  80. value: '1',
  81. label: '学校1'
  82. }, {
  83. value: '2',
  84. label: '学校2'
  85. }]
  86. onMounted(() => {
  87. initChart()
  88. })
  89. const initChart = () => {
  90. var myChart = echarts.init(document.getElementById('echartData'));
  91. myChart.setOption({
  92. title: {
  93. text: '人数',
  94. },
  95. grid: {
  96. left: '3%',
  97. right: '4%',
  98. bottom: '3%',
  99. containLabel: true
  100. },
  101. xAxis: {
  102. data: ['[0-10]', '[10-20]', '[20-30]', '[30-40]', '[40-50]', '[50-60]', '[60-70]']
  103. },
  104. yAxis: {
  105. type: 'value',
  106. axisTick: {
  107. show: false
  108. },
  109. },
  110. series: [
  111. {
  112. type: 'bar',
  113. barWidth: '40',
  114. itemStyle: {
  115. normal: {
  116. barBorderRadius: [20, 20, 0, 0],
  117. color: '#6897FF',
  118. label: {
  119. show: true, //开启显示
  120. position: 'top', //在上方显示
  121. textStyle: { //数值样式
  122. color: 'black',
  123. fontSize: 16
  124. }
  125. }
  126. }
  127. },
  128. data: [120,200,200,150,80,70,110,130],
  129. }
  130. ]
  131. });
  132. }
  133. let classArr = [
  134. "初一(1)班",
  135. "初一(2)班",
  136. "初一(3)班",
  137. "初一(4)班",
  138. "初一(5)班",
  139. "初一(6)班",
  140. "初一(7)班",
  141. "初一(8)班",
  142. "初一(9)班",
  143. ];
  144. let classBaseInfoArr = [
  145. {
  146. period: "[0-10]",
  147. detailNum:["13","13","13","13","13","13","13","13","13"]
  148. },
  149. {
  150. period: "[10-20]",
  151. detailNum:["13","13","13","13","13","13","13","13","13"]
  152. },
  153. {
  154. period: "[20-30]",
  155. detailNum:["13","13","13","13","13","13","13","13","13"]
  156. },
  157. {
  158. period: "[30-40]",
  159. detailNum:["13","13","13","13","13","13","13","13","13"]
  160. }
  161. ];
  162. </script>
  163. <style lang="scss" scoped>
  164. ::v-deep .el-sub-menu__title {
  165. background: #003eee;
  166. color: #fff;
  167. }
  168. ::v-deep .el-table__header thead tr th {
  169. background: #003eee !important;
  170. color: #fff;
  171. height: 50px;
  172. line-height: 50px;
  173. font-weight: normal;
  174. }
  175. ::v-deep .el-table__header thead tr th:first-child {
  176. border-top-left-radius: 9px;
  177. }
  178. ::v-deep .el-table__body tbody .el-table__row td {
  179. background-color: transparent;
  180. }
  181. ::v-deep .el-dialog__footer {
  182. text-align: center;
  183. }
  184. .blueBg {
  185. background: #F1F7FF;
  186. }
  187. .whiteBG {
  188. background: #fff;
  189. }
  190. .singlepart {
  191. background-color: rgba($color: #ffffff, $alpha: 0.2);
  192. color: #fff;
  193. }
  194. .tableList {
  195. overflow-x: scroll;
  196. }
  197. .tableList_title {
  198. font-size: 14px;
  199. color: #fff;
  200. }
  201. .singleT {
  202. flex: 1;
  203. font-size: 14px;
  204. line-height: 50px;
  205. // width: fit-content;
  206. text-align: center;
  207. background: #003eee;
  208. }
  209. .singleT:first-child{
  210. background-color: transparent!important;
  211. }
  212. .singleD {
  213. flex: 1;
  214. }
  215. .singleTSec {
  216. width: fit-content;
  217. flex: 1;
  218. line-height: 60px;
  219. text-align: center;
  220. }
  221. .singleTSecDif{
  222. color: #fff;
  223. background-color: #6897FF;
  224. }
  225. </style>