cjfx_pjflcfx.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <div class="cjfx_pjflcfx">
  3. <NavHeader />
  4. <bread-crumb />
  5. <div class="w-1200px m-auto flex flex-row justify-between">
  6. <div class="w-188px">
  7. <leftSider :activeIndex="activeIndex" @parentClick="parentClick"/>
  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_school" placeholder="请选择学校" size="large">
  12. <el-option label="全部" value="0" />
  13. <el-option v-for="item in school_list" :key="item.value" :label="item.label" :value="item.value" />
  14. </el-select>
  15. <el-select class="mr-10px" v-model="normal_subject" placeholder="请选择学科" size="large">
  16. <el-option label="全部" value="0" />
  17. <el-option v-for="item in subject_list" :key="item.value" :label="item.label" :value="item.value" />
  18. </el-select>
  19. </div>
  20. <div class="flex justify-between mt-4 exportBtn">
  21. <div>
  22. <el-button color="#003eee" type="primary" size="large">导出</el-button>
  23. </div>
  24. </div>
  25. <div class="h-150 mt-20px overflow-x-auto echartData" id="echartData"></div>
  26. <div class="w-full h-auto tableList">
  27. <div class="h-50px rounded flex flex-nowrap tableList_title">
  28. <div class="singleT" v-for="(item,index) in classArr" :key="index">{{item}}</div>
  29. </div>
  30. <div class="h-auto flex flex-nowrap tableList_content" v-for="(item,index) in classBaseInfoArr" :key="index">
  31. <div class="h-60px rounded mt-2px singleTSec " :class="{'singleTSecDif':index%2==1}">{{ item.xx }}</div>
  32. <div class="h-60px rounded mt-2px singleTSec " :class="{'singleTSecDif':index%2==1}">{{ item.pjf }}</div>
  33. <div class="h-60px rounded mt-2px singleTSec " :class="{'singleTSecDif':index%2==1}">{{ item.zjf }}</div>
  34. <div class="h-60px rounded mt-2px singleTSec " :class="{'singleTSecDif':index%2==1}">{{ item.jflc }}</div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <commonFooter />
  40. </div>
  41. </template>
  42. <route lang="json">
  43. {
  44. "meta": {
  45. "title": "考试分析",
  46. "breadcrumb": true
  47. }
  48. }
  49. </route>
  50. <script lang="ts" setup>
  51. import * as echarts from 'echarts';
  52. import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_pjflcfx_list } from './apiItem';
  53. import { useRouter } from "vue-router";
  54. const router = useRouter();
  55. let normal_subject = $ref("");
  56. let normal_school = $ref("");
  57. let normal_teacher = $ref("");
  58. let subject_list = [{
  59. value: '1',
  60. label: '语文'
  61. }, {
  62. value: '2',
  63. label: '数学'
  64. }]
  65. let school_list = [{
  66. value: '1',
  67. label: '学校1'
  68. }, {
  69. value: '2',
  70. label: '学校2'
  71. }]
  72. const activeIndex =ref('1-4');
  73. const parentClick = (val) => {
  74. activeIndex.value = val;
  75. }
  76. let ecahrtData = {
  77. xAxis_data: ['蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学'],
  78. series:[
  79. {
  80. name: 'Income',
  81. type: 'bar',
  82. stack: 'Total',
  83. label: {
  84. show: true
  85. },
  86. emphasis: {
  87. focus: 'series'
  88. },
  89. data: [1.23, 1.23, -1.23, 1.23, 1.23, 1.23, 1.23]
  90. },
  91. {
  92. name: 'Expenses',
  93. type: 'bar',
  94. stack: 'Total',
  95. label: {
  96. show: true,
  97. position: 'left'
  98. },
  99. emphasis: {
  100. focus: 'series'
  101. },
  102. data: [-1.23, -1.23, 1.23, -1.23, -1.23, -1.23, -1.23]
  103. }
  104. ]
  105. }
  106. let classArr = ref([
  107. "学校",
  108. "平均分",
  109. "总均分",
  110. "均分差离",
  111. ]);
  112. let classBaseInfoArr = ref([
  113. {
  114. xx: "临沂市蒙阴县乡镇小学",
  115. pjf:12,
  116. zjf:12,
  117. jflc:1,
  118. },
  119. {
  120. xx: "临沂市蒙阴县乡镇小学",
  121. pjf:12,
  122. zjf:12,
  123. jflc:1,
  124. },
  125. {
  126. xx: "临沂市蒙阴县乡镇小学",
  127. pjf:12,
  128. zjf:12,
  129. jflc:1,
  130. },
  131. {
  132. xx: "临沂市蒙阴县乡镇小学",
  133. pjf:12,
  134. zjf:12,
  135. jflc:1,
  136. },
  137. ]);
  138. onMounted(() => {
  139. initData();
  140. })
  141. const initData =() => {
  142. let transObj = {
  143. xueke_id: '',
  144. grade_id: '',
  145. school_id: ''
  146. }
  147. cjfx_pjflcfx_list(transObj)
  148. .then(res => {
  149. if (res.code == "1") {
  150. classArr.value = res.data.data.classArr;
  151. classBaseInfoArr.value = res.data.data.classBaseInfoArr;
  152. initChart(res.data.data.ecahrtData)
  153. }
  154. })
  155. .catch(error=>{console.log(error)})
  156. }
  157. const initChart = (item) => {
  158. const colors=['#9CFF68','#FE6868']
  159. var myChart = echarts.init(document.getElementById('echartData'));
  160. myChart.setOption({
  161. title: {
  162. text: '平均分',
  163. },
  164. tooltip: {
  165. trigger: 'axis',
  166. axisPointer: {
  167. type: 'shadow'
  168. }
  169. },
  170. grid: {
  171. left: '3%',
  172. right: '4%',
  173. bottom: '3%',
  174. containLabel: true
  175. },
  176. xAxis: [
  177. {
  178. type: 'category',
  179. axisTick: {
  180. show: false
  181. },
  182. data: item.xAxis_data
  183. }
  184. ],
  185. yAxis: [
  186. {
  187. type: 'value'
  188. }
  189. ],
  190. series: item.series,
  191. });
  192. }
  193. </script>
  194. <style lang="scss" scoped>
  195. ::v-deep .el-sub-menu__title {
  196. background: #003eee;
  197. color: #fff;
  198. }
  199. ::v-deep .el-table__header thead tr th {
  200. background: #003eee !important;
  201. color: #fff;
  202. height: 50px;
  203. line-height: 50px;
  204. font-weight: normal;
  205. }
  206. ::v-deep .el-table__header thead tr th:first-child {
  207. border-top-left-radius: 9px;
  208. }
  209. ::v-deep .el-table__body tbody .el-table__row td {
  210. background-color: transparent;
  211. }
  212. ::v-deep .el-dialog__footer {
  213. text-align: center;
  214. }
  215. .blueBg {
  216. background: #F1F7FF;
  217. }
  218. .whiteBG {
  219. background: #fff;
  220. }
  221. .singlepart {
  222. background-color: rgba($color: #ffffff, $alpha: 0.2);
  223. color: #fff;
  224. }
  225. .tableList {
  226. overflow-x: scroll;
  227. }
  228. .tableList_title {
  229. font-size: 14px;
  230. color: #fff;
  231. }
  232. .singleT {
  233. flex: 1;
  234. font-size: 14px;
  235. line-height: 50px;
  236. width: fit-content;
  237. text-align: center;
  238. background: #003eee;
  239. }
  240. .singleT:first-child{
  241. border-top-left-radius: 5px;
  242. }
  243. .singleT:last-child{
  244. border-top-right-radius: 5px;
  245. }
  246. .singleD {
  247. flex: 1;
  248. }
  249. .singleTSec {
  250. width: fit-content;
  251. flex: 1;
  252. line-height: 60px;
  253. text-align: center;
  254. }
  255. .singleTSecDif{
  256. background-color: #fff;
  257. }
  258. </style>