questionAnalysis.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272
  1. <template>
  2. <ReportModule
  3. :showTitle="true"
  4. :titleList="[state.groupTitle]"
  5. :showDescribe="true"
  6. tableOrChart="chart"
  7. :showPrintBtn="false"
  8. :showExportBtn="false"
  9. >
  10. <template #title_right>
  11. <EchartType
  12. :chartTypeList="state.problemAnalysisData.chartTypeList"
  13. :current="state.problemAnalysisData.chartType"
  14. @ChangeEchartType="
  15. (val) => ChangeEchartType(val, 'problemAnalysisData')
  16. "
  17. />
  18. </template>
  19. <template #module_table_chart>
  20. <template v-if="state.problemAnalysisData.data.length > 0">
  21. <BarLineCharts
  22. v-if="state.problemAnalysisData.chartType == 'line_bar_chart'"
  23. :legendList="state.problemAnalysisData.legendList"
  24. :showBarLegendIndex="state.problemAnalysisData.showBarLegendIndex"
  25. title="得分率"
  26. :data="state.problemAnalysisData.data"
  27. @HandleChartClick="HandleChartClick"
  28. @ChangeChartOrder="
  29. (sortType, legendData, barIndex) =>
  30. ChangeChartOrder(sortType, legendData, barIndex, 1)
  31. "
  32. >
  33. </BarLineCharts>
  34. <BarsCharts
  35. v-if="state.problemAnalysisData.chartType == 'vertical_bar'"
  36. :key="state.chartKey"
  37. :data="state.problemAnalysisData.data"
  38. :legendList="state.problemAnalysisData.legendList"
  39. :showSortSelectbox="true"
  40. unit="%"
  41. title="得分率"
  42. :isClick="true"
  43. @HandleChartClick="HandleChartClick"
  44. @ChangeChartOrder="
  45. (sortType, legendData, barIndex) =>
  46. ChangeChartOrder(sortType, legendData, barIndex, 1)
  47. "
  48. >
  49. </BarsCharts>
  50. <RadarCharts
  51. v-if="state.problemAnalysisData.chartType == 'radar_chart'"
  52. :key="state.chartKey"
  53. :data="state.problemAnalysisData.data"
  54. :legendList="state.problemAnalysisData.legendList"
  55. :showCheckBox="true"
  56. :openShowAllLegend="true"
  57. :isClick="true"
  58. @HandleChartClick="HandleChartClick"
  59. >
  60. </RadarCharts>
  61. </template>
  62. <div
  63. v-else
  64. class="no_content_data"
  65. v-loading="state.dataLoading"
  66. :element-loading-text="state.loadingText"
  67. element-loading-spinner="el-icon-loading"
  68. element-loading-background="#ffffff"
  69. >
  70. <span>暂无数据</span>
  71. </div>
  72. </template>
  73. <template #module_describe>
  74. 展示每道试题的得分率图。得分率指实际得分/考核分的比值,换算成的百分数。可以用于分析每道试题的难易程度和质量,试题得分率高意味着试题难度低或者学生整体水平高;得分率低意味着试题难度较高或者考生整体水平较低。点击每道试题的柱或雷达图的题号可在下方查看该题每个班的得分率情况。
  75. </template>
  76. </ReportModule>
  77. <ReportModule
  78. :showTitle="true"
  79. :titleList="[state.groupTitle, state.questionTitle]"
  80. :showDescribe="true"
  81. tableOrChart="chart"
  82. :showPrintBtn="false"
  83. :showExportBtn="false"
  84. >
  85. <template #title_right>
  86. <EchartType
  87. :chartTypeList="state.questionScoreStatsData.chartTypeList"
  88. :current="state.questionScoreStatsData.chartType"
  89. @ChangeEchartType="
  90. (val) => ChangeEchartType(val, 'questionScoreStatsData')
  91. "
  92. />
  93. </template>
  94. <template #module_table_chart>
  95. <template v-if="state.questionScoreStatsData.datax.length > 0">
  96. <BarScoringRateVertical
  97. v-if="state.questionScoreStatsData.chartType == 'vertical_bar'"
  98. :datax="state.questionScoreStatsData.datax"
  99. :datay="state.questionScoreStatsData.dataStackY"
  100. :tooltipData="state.questionScoreStatsData.tooltipData"
  101. :isShowMarkLine="true"
  102. :average="state.questionScoreStatsData.rate"
  103. :markLineData="state.questionScoreStatsData.markLineData"
  104. :color="['#3BA272', '#EE6666']"
  105. typeName="得分率"
  106. :isClick="true"
  107. @HandleChartClick="HandleQuestionScoreChartClick"
  108. ></BarScoringRateVertical>
  109. <DifferenceChart
  110. v-if="state.questionScoreStatsData.chartType == 'difference_chart'"
  111. :datax="state.questionScoreStatsData.datax"
  112. :datay="state.questionScoreStatsData.datay"
  113. unit="%"
  114. type="1"
  115. title="得分率"
  116. :rate="state.questionScoreStatsData.rate"
  117. @HandleChartClick="HandleQuestionScoreChartClick"
  118. >
  119. </DifferenceChart>
  120. </template>
  121. <div
  122. v-else
  123. class="no_content_data"
  124. v-loading="state.dataLoading"
  125. :element-loading-text="state.loadingText"
  126. element-loading-spinner="el-icon-loading"
  127. element-loading-background="#ffffff"
  128. >
  129. <span>暂无数据</span>
  130. </div>
  131. </template>
  132. <template #module_describe>
  133. 说明:通过上面图形,可查看该题每个班的得分率情况,由图中可以看出,得分率最高为<span
  134. style="color: #3ba272"
  135. >{{ state.questionScoreStatsData.maxClass }}</span
  136. >,最低为<span style="color: #ee6666">{{
  137. state.questionScoreStatsData.minClass
  138. }}</span
  139. >。点击每个班级的柱可在下方查看该班各个选项/得分的人数分布。
  140. </template>
  141. </ReportModule>
  142. <ReportModule
  143. :showTitle="true"
  144. :titleList="[state.groupTitle, state.questionTitle, state.classTitle]"
  145. :showDescribe="true"
  146. tableOrChart="qita"
  147. :showPrintBtn="false"
  148. :showExportBtn="false"
  149. >
  150. <template #module_qita>
  151. <div class="content_left answer">
  152. <BarChart
  153. v-if="state.questionAnswerData.datax.length"
  154. :datax="state.questionAnswerData.datax"
  155. :datay="state.questionAnswerData.datay"
  156. typeName="人数"
  157. :showNuitY="false"
  158. unit="人"
  159. :unitX="
  160. state.questionAnswerData.questionType == '单选题' ||
  161. state.questionAnswerData.questionType == '多选题' ||
  162. state.questionAnswerData.questionType == '判断题'
  163. ? ''
  164. : '分'
  165. "
  166. :showMarkPoint="false"
  167. :isShowMarkLine="false"
  168. :color="state.questionAnswerData.color"
  169. :answerValue="state.questionAnswerData.answerValue"
  170. :answerScore="state.questionAnswerData.answerScore"
  171. :fullMark="state.questionAnswerData.fullMark"
  172. :isClick="true"
  173. @HandleChartClick="HandleQuestionAnswerChartClick"
  174. style="height: 300px"
  175. ></BarChart>
  176. <div
  177. v-else
  178. class="module_chart no_content_data"
  179. v-loading="state.dataLoading"
  180. :element-loading-text="state.loadingText"
  181. element-loading-spinner="el-icon-loading"
  182. element-loading-background="#ffffff"
  183. >
  184. <span>暂无数据</span>
  185. </div>
  186. </div>
  187. <div class="content_right answer table_42">
  188. <el-table
  189. border
  190. :data="state.questionAnswerData.tableData"
  191. stripe
  192. align="left"
  193. :header-row-style="HeaderRowStyle"
  194. >
  195. <el-table-column :label="state.classTitle" align="center">
  196. <el-table-column
  197. prop="title"
  198. align="center"
  199. label="名称"
  200. ></el-table-column>
  201. <el-table-column
  202. prop="value"
  203. align="center"
  204. label="数值"
  205. ></el-table-column>
  206. </el-table-column>
  207. </el-table>
  208. </div>
  209. </template>
  210. <template #module_describe>
  211. 说明:通过柱图,可查看该题下该班所有学生的选项或试题得分情况。点击每个柱可查看该选项或分数的学生明细和答题卡答题情况。
  212. </template>
  213. </ReportModule>
  214. <ReportModule
  215. :showTitle="true"
  216. :titleList="[
  217. state.groupTitle,
  218. state.questionTitle,
  219. state.classTitle,
  220. state.optionTitle,
  221. ]"
  222. :showDescribe="true"
  223. tableOrChart="qita"
  224. :showPrintBtn="false"
  225. :showExportBtn="false"
  226. >
  227. <template #title_right>
  228. <el-button class="default_button" @click="VisibleQuestionCard">
  229. <img src="@/assets/icon/card_view.webp" />批量查看
  230. </el-button>
  231. </template>
  232. <template #module_qita>
  233. <div class="content_left card"></div>
  234. <div class="content_right card table_42">
  235. <el-table
  236. border
  237. :data="state.majorAnswerData.tableData"
  238. stripe
  239. highlight-current-row
  240. align="left"
  241. height="401px"
  242. row-key="studentRegistrationCode"
  243. :row-style="{ cursor: 'pointer' }"
  244. :row-class-name="TableRowClassName"
  245. @row-click="HandleRowClick"
  246. >
  247. <el-table-column
  248. prop="studentUserName"
  249. align="center"
  250. label="学生"
  251. show-overflow-tooltip
  252. ></el-table-column>
  253. <el-table-column
  254. label="班级"
  255. prop="className"
  256. align="center"
  257. min-width="70"
  258. show-overflow-tooltip
  259. ></el-table-column>
  260. <el-table-column
  261. prop="questionScore"
  262. align="center"
  263. label="得分"
  264. width="70"
  265. show-overflow-tooltip
  266. ></el-table-column>
  267. <el-table-column
  268. prop="paperScore"
  269. align="center"
  270. label="成绩"
  271. width="70"
  272. show-overflow-tooltip
  273. ></el-table-column>
  274. <el-table-column align="center" label="操作">
  275. <template #default="scope">
  276. <el-button type="text" @click.stop="handleClick(scope.row)"
  277. >查看答题卡</el-button
  278. >
  279. </template>
  280. </el-table-column>
  281. </el-table>
  282. </div>
  283. </template>
  284. <template #module_describe>
  285. 说明:点击左侧表格列可切换学生查看具体学生答题图片,点击学生姓名可在下方查看学生均衡分析,点击学生成绩可查看学生答题卡原卷。
  286. </template>
  287. </ReportModule>
  288. <ReportModule
  289. :showTitle="true"
  290. :titleList="[state.groupTitle]"
  291. :showDescribe="true"
  292. tableOrChart="table"
  293. :showPrintBtn="false"
  294. :showExportBtn="true"
  295. :currentPage="state.majorTableData.currentPage"
  296. :pageSize="state.majorTableData.pageSize"
  297. :total="state.majorTableData.total"
  298. @update:pageSize="handleSizeChange"
  299. @update:currentPage="handleCurrentChange"
  300. >
  301. <template #title_right></template>
  302. <template #module_table_chart>
  303. <el-table
  304. :data="state.majorTableData.tableData"
  305. ref="majorTable"
  306. border
  307. stripe
  308. align="left"
  309. :key="state.majorTableData.tableKey"
  310. >
  311. <template v-for="item in state.majorTableData.headerData">
  312. <el-table-column
  313. v-if="item.display"
  314. :key="item.prop"
  315. align="center"
  316. :prop="item.prop"
  317. :min-width="item.label.length > 4 ? 110 : 90"
  318. :label="item.label"
  319. fixed="left"
  320. show-overflow-tooltip
  321. >
  322. <template #default="scope">
  323. {{ scope.row[item.prop] || "-"
  324. }}{{
  325. item.prop == "estimatedScoreRate" && scope.row[item.prop]
  326. ? "%"
  327. : ""
  328. }}
  329. </template>
  330. </el-table-column>
  331. </template>
  332. <template v-for="parent in state.majorTableData.changeHeaderData">
  333. <el-table-column
  334. v-if="parent.display"
  335. align="center"
  336. :prop="parent.prop"
  337. :label="parent.label"
  338. :key="parent.prop"
  339. >
  340. <template v-for="item in state.majorTableData.childHeaderData">
  341. <el-table-column
  342. v-if="item.display"
  343. :prop="`${parent.prop}_${item.prop}`"
  344. :key="`${parent.prop}_${item.prop}`"
  345. align="center"
  346. :label="item.label"
  347. :min-width="item.label.length > 4 ? 100 : 80"
  348. show-overflow-tooltip
  349. >
  350. <template #default="scope">
  351. <span v-if="item.prop.indexOf('Rate') > -1">{{
  352. scope.row[`${parent.prop}_${item.prop}`]
  353. ? `${scope.row[`${parent.prop}_${item.prop}`]}%`
  354. : "-"
  355. }}</span>
  356. <span
  357. v-else
  358. @click="OpenStudentDialog(item, parent, scope.row)"
  359. :class="{
  360. table_row_blue:
  361. (item.prop.indexOf('Count') > -1 ||
  362. item.prop.indexOf('Number') > -1) &&
  363. scope.row?.[`${parent.prop}_${item.prop}`] > 0,
  364. }"
  365. >{{
  366. scope.row?.[`${parent.prop}_${item.prop}`] ?? "-"
  367. }}</span
  368. >
  369. </template>
  370. </el-table-column>
  371. </template>
  372. </el-table-column>
  373. </template>
  374. </el-table>
  375. </template>
  376. </ReportModule>
  377. <!-- 批量查看小题答题卡 -->
  378. <!-- <QuestionCard :subjectId="state.analysisStore.filterObject.subjectId" :questionId="state.cardQuestionId" :platformNumbers="cardRegistrationCodeList" :groupTitle="groupTitle" :groupName="groupName" :questionTitle="questionTitle" :classTitle="classTitle" :optionTitle="optionTitle" :tagActive="tagActive" :showDialog="showQuestionCardDialog" @CloseDialog="CloseQuestionCardDialog"></QuestionCard> -->
  379. </template>
  380. <script lang="ts" setup>
  381. import ReportModule from "@/components/ReportModule.vue";
  382. import EchartType from "@/components/EchartType.vue";
  383. import { useAnalysisStore } from "@/store/analysis";
  384. import {
  385. questionAnalysis,
  386. queryAnswerListByAnswerAndScore,
  387. } from "@/api/analysis";
  388. import BarLineCharts from "@/components/echarts/barLineCharts.vue"; //柱状图折线图组合图组件
  389. import RadarCharts from "@/components/echarts/radarCharts.vue"; //雷达图
  390. import BarsCharts from "@/components/echarts/barsCharts.vue"; //多柱状图组件
  391. import BarScoringRateVertical from "@/components/echarts/barScoringRate_vertical.vue"; //得分率 纵向柱状图
  392. import DifferenceChart from "@/components/echarts/differenceChart.vue"; //率差图
  393. import BarChart from "@/components/echarts/barChart_answer.vue"; //单柱状图
  394. import { onMounted, reactive, watch, ref, nextTick } from "vue";
  395. import { cloneDeep } from "lodash-es";
  396. const analysisStore = useAnalysisStore();
  397. const state = reactive({
  398. questionGroupDefault: [
  399. {
  400. name: "小题分析",
  401. code: "problem",
  402. },
  403. {
  404. name: "题型分析",
  405. code: 11,
  406. },
  407. {
  408. name: "错题分析",
  409. code: "errors",
  410. },
  411. {
  412. name: "客观题分析",
  413. code: "selectQuestion",
  414. },
  415. {
  416. name: "命题分析",
  417. code: "proposition",
  418. },
  419. ],
  420. questionGroupList: [], //试题分组标签 动态接口获取
  421. tagActive: "problem", //选择的试题分组标签
  422. groupTitle: "小题分析",
  423. groupPreviousTitle: "",
  424. knowledgeLayeredTitle: "", //知识点分层标题
  425. groupName: "", // 分组名称
  426. questionTitle: "", //题目名称
  427. classTitle: "", //班级名称
  428. optionTitle: "", //选项名称
  429. studentUserName: "", //学生名称
  430. studentRegistrationCode: "", //学生code
  431. questionTypesData: {
  432. chartKey: 0,
  433. refresh: false,
  434. data: [],
  435. tableData: [],
  436. },
  437. problemAnalysisData: {
  438. chartType: "line_bar_chart", //默认显示折线图柱状图line_bar_chart
  439. chartTypeList: [
  440. {
  441. label: "组合图",
  442. value: "line_bar_chart",
  443. },
  444. {
  445. label: "柱状图",
  446. value: "vertical_bar",
  447. },
  448. {
  449. label: "雷达图",
  450. value: "radar_chart",
  451. },
  452. ],
  453. legendList: [],
  454. defaultLegendList: [],
  455. showBarLegendIndex: 1,
  456. questionList: [], // 题目列表
  457. questionTableList: [], // 小题分析table
  458. groupList: [], // 分组题目列表
  459. groupTableList: [], // 分组table
  460. headerList: [],
  461. changeHeaderList: [],
  462. childHeaderList: [],
  463. questionListIndex: 0, //题目 索引
  464. data: [], //柱状图
  465. }, //小题分析数据
  466. majorQuestionData: {
  467. chartType: "line_bar_chart", //默认显示折线图柱状图line_bar_chart
  468. legendList: [],
  469. defaultLegendList: [],
  470. showBarLegendIndex: 1,
  471. questionListIndex: 0, //题目 索引
  472. data: [], //柱状图
  473. }, //分组题目 对应的题目列表
  474. questionScoreStatsData: {
  475. checked: false,
  476. isIndeterminate: true,
  477. markLineData: [], //平均分
  478. chartTypeList: [
  479. {
  480. label: "柱状图",
  481. value: "vertical_bar",
  482. },
  483. {
  484. label: "率差图",
  485. value: "difference_chart",
  486. },
  487. ],
  488. chartType: "vertical_bar", //默认显示率差图vertical_bar
  489. datax: [], //x轴数据
  490. datay: [], //Y轴数据
  491. dataStackY: [], //Y轴数据
  492. tooltipData: [], //
  493. rate: 60, //中间x的刻度线的值 数字类型
  494. maxClass: "", // 得分率最高班
  495. minClass: "", // 得分率最低班
  496. }, //小题分析 /第N题
  497. questionAnswerData: {
  498. datax: [], //x轴数据
  499. datay: [], //Y轴数据
  500. color: "#5470C6",
  501. answerValue: "", //正确答案 柱状图显示绿色
  502. answerScore: [], //答案所能得的分数
  503. questionType: "", //类型
  504. fullMark: "", //满分
  505. // average:0,//平均分辅助线
  506. tableData: [],
  507. classListIndex: 0, // 索引
  508. }, //小题分析 /第N题 / N班
  509. majorAnswerData: {
  510. paperUrl: "", //试卷地址
  511. tableData: [], //表格数据
  512. rowIndex: 0,
  513. }, // 通过答案或者分数查询某题作答情况
  514. majorStudentData: {
  515. tableData: [],
  516. legendList: [],
  517. radarChartData: [],
  518. excellentCourseList: "", //优秀科目
  519. inferiorCourseList: "", //弱势科目
  520. }, //科目得分率
  521. majorTableData: {
  522. tableKey: 0,
  523. tableData: [], //小题分析表数据
  524. allTableData: [],
  525. headerData: [], //固定表头数据
  526. changeHeaderData: [], //动态表头数据
  527. childHeaderData: [], //子级表头数据
  528. pageSize: 10, //每页显示数据
  529. total: 0, //总数
  530. currentPage: 1, //当前页
  531. }, //小题分析表 + 题目分组分析
  532. errorQuestionData: {
  533. tableKey: 0,
  534. allData: [], //
  535. gradeValue: "", //选中的年级
  536. className: "", //选中的年级名称
  537. type: "",
  538. gradeData: [], //年级下拉选项
  539. tableData: [], //错题分析表数据
  540. }, //错题分析表
  541. studentPreviousExamData: {
  542. data: null,
  543. chartType: "line_chart",
  544. selectList: [
  545. {
  546. value: "standardScore",
  547. name: "标准分",
  548. },
  549. {
  550. value: "scoreRate",
  551. name: "得分率",
  552. },
  553. {
  554. value: "classRank",
  555. name: "班排",
  556. },
  557. {
  558. value: "schoolRank",
  559. name: "校排",
  560. },
  561. {
  562. value: "examRank",
  563. name: "联排",
  564. },
  565. ],
  566. selectVal: "standardScore",
  567. selectName: "标准分",
  568. lineChartData: {
  569. datax: [],
  570. datay: [],
  571. title: [],
  572. tooltipData: [],
  573. },
  574. barChartData: {
  575. //柱状图
  576. legendList: [],
  577. data: [],
  578. },
  579. }, //学生成绩历次考试分析数据
  580. groupPrevious: {
  581. loading: false,
  582. examNameList: [],
  583. examChartList: [],
  584. selectedLegendList: [],
  585. examChartIndex: [],
  586. headerList: [],
  587. dataList: [],
  588. }, //题目分组历次分析(图表数据)
  589. stuGroupPreviousChart: {
  590. examNameList: [],
  591. examChartList: [],
  592. examChartIndex: [],
  593. }, //学生组块历次图
  594. stuGroupPreviousChartStuInfo: {
  595. studentName: "", //学生姓名搜索条件
  596. studentCodeList: [],
  597. }, //学生历次分析图 搜索学生信息
  598. stuGroupPrevious: {
  599. total: 0,
  600. pageNum: 1,
  601. pageSize: 10,
  602. headerList: [],
  603. tableList: [],
  604. }, //题目分组历次分析学生数据表(分页)
  605. classNameList: [],
  606. showHeaderSet: false, //是否显示设置表头
  607. showBenchTaskSelect: false, //历次考试弹框
  608. exportLoading: false, // 题型导出loading
  609. exportErrorLoading: false, // 错题导出loading
  610. chartKey: 0,
  611. dataLoading: false,
  612. loadingText: "加载中,请稍后……",
  613. errorPdfLoading: false, //错题导出PDF loading
  614. paperInfo: {
  615. examPaperId: "", //考试科目id
  616. platformNumber: "", //学籍号平台号
  617. questionId: "", //题目id
  618. }, //学生试卷信息
  619. paperTitle: "", //学生试卷标题
  620. showStudentPaperDialog: false, //是否显示学生答题卡弹窗
  621. paperInfos: {
  622. examPaperId: "", //考试科目id
  623. platformNumber: "", //学籍号平台号
  624. questionId: "", //题目id
  625. },
  626. knowledgeInputDialog: false,
  627. dialogData: {
  628. apiName: "",
  629. showDialog: false,
  630. title: "",
  631. tableTitle: "",
  632. fiveRateName: "", //当前选择的五率的名称
  633. selectSubjectName: "", //当前选择的科目名称
  634. selectSchoolLevel: "", //当前选择的学校级别:0-联考 1-学校分组 2-具体学校
  635. selectSchoolName: "", //当前选择的学校名称:联校 组合学校 单校名称
  636. selectClassLevel: "", //当前选择的班级级别:0-年级 1-组合班级 2-具体班级
  637. selectClassName: "", //当前选择的班级名称:年级 组合班级 单班
  638. questionId: "", //试题ID
  639. isPaper: "", //是否为全卷0-非1-是全卷
  640. quesScoreType: "", //选择的类型0-满分人数 1-0分人数 3-优秀率、良好率等
  641. knowledgeId: "", //如果选择的是知识点,则需要返回知识点ID
  642. questionGroupName: "", //试题分组的名称
  643. groupTitle: "",
  644. },
  645. showQuestionCardDialog: false,
  646. cardQuestionId: "", // 批量查看答题卡试题id
  647. cardRegistrationCodeList: [], // 批量查看答题卡学生账号数组
  648. });
  649. const majorTable = ref(null);
  650. //排序
  651. const ChangeChartOrder = (sortType, legendData, barIndex, number) => {
  652. const isHasEstimatedScore = state.problemAnalysisData.headerList.find(
  653. (item) => item.prop == "estimatedScore",
  654. ); //是否存在预估满分
  655. const fullVolume = state.problemAnalysisData.questionList.filter(
  656. (item) => item.showCode == 999,
  657. ); //全卷
  658. const questionList = state.problemAnalysisData.questionList.filter(
  659. (item) => item.showCode != 999,
  660. );
  661. const newBarIndex = isHasEstimatedScore ? barIndex - 1 : barIndex;
  662. if (sortType == "2") {
  663. //从低到高
  664. questionList.sort(function (a, b) {
  665. return (
  666. (a?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0) -
  667. (b?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0)
  668. );
  669. });
  670. } else if (sortType == "3") {
  671. //从高到低
  672. questionList.sort(function (a, b) {
  673. return (
  674. (b?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0) -
  675. (a?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0)
  676. );
  677. });
  678. } else {
  679. //默认排序 按题号排序
  680. questionList.sort(function (a, b) {
  681. return (a?.showCode || 0) - (b.showCode || 0);
  682. });
  683. }
  684. state.problemAnalysisData.questionList = [...questionList, ...fullVolume];
  685. let chartData = [],
  686. chartTitle = [];
  687. state.problemAnalysisData.questionList.forEach((ques) => {
  688. const scoreRateArr = ques.classList.map(
  689. (item) => item?.questionStats?.scoreRate || 0,
  690. );
  691. if (isHasEstimatedScore) {
  692. chartData.push([
  693. ques.questionName,
  694. ques.estimatedScoreRate,
  695. ...scoreRateArr,
  696. ]);
  697. } else {
  698. chartData.push([ques.questionName, ...scoreRateArr]);
  699. }
  700. });
  701. const newChangeHeaderList = isHasEstimatedScore
  702. ? [
  703. { ...isHasEstimatedScore, isG: false, type: 1 },
  704. ...state.problemAnalysisData.changeHeaderList,
  705. ]
  706. : [...state.problemAnalysisData.changeHeaderList];
  707. newChangeHeaderList.forEach((item) => {
  708. chartTitle.push(item.label);
  709. });
  710. chartTitle.unshift("group");
  711. chartData.unshift(chartTitle); // 柱状图 图例标题
  712. chartData.pop(); // 删除最后一行 全卷
  713. state.problemAnalysisData.data = chartData;
  714. state.problemAnalysisData.legendList = legendData;
  715. //小题分析 /第N题
  716. GetQuestionStatsData(0);
  717. };
  718. //试题图表切换公共方法
  719. const ChangeEchartType = (value, prop) => {
  720. if (prop == "problemAnalysisData") {
  721. ChangeChartOrder("1", state.problemAnalysisData.defaultLegendList, "", 1);
  722. }
  723. state[prop].chartType = value;
  724. };
  725. //获取小题分析数据
  726. const GetQuestionAnalysisData = () => {
  727. state.problemAnalysisData.data = []; //柱状图折线图 X轴
  728. state.dataLoading = true;
  729. questionAnalysis({
  730. ...analysisStore.filterObject,
  731. analysisType: 0, //0-小题分析 1大题分析 2-知识点 3-能力点 question_group_code(4,5,6,7,8) 11-题型分析
  732. })
  733. .then((res) => {
  734. if (
  735. res.code == 200 &&
  736. res.data &&
  737. res.data.questionList &&
  738. res.data.questionList.length
  739. ) {
  740. const { data } = res;
  741. const questionList = data.questionList || [];
  742. const changeHeaderList = data.changeHeaderList || []; //柱状图折线图 班级名称
  743. state.problemAnalysisData.groupList = [];
  744. state.problemAnalysisData.groupTableList = [];
  745. state.problemAnalysisData.questionList = questionList;
  746. state.problemAnalysisData.questionTableList = cloneDeep(questionList);
  747. state.problemAnalysisData.headerList = data.headerList || [];
  748. state.problemAnalysisData.changeHeaderList = changeHeaderList;
  749. state.problemAnalysisData.childHeaderList = data.childHeaderList || [];
  750. state.chartKey++;
  751. //Y轴数据
  752. let chartData = [];
  753. let legendList = [];
  754. const isHasEstimatedScore = state.problemAnalysisData.headerList.find(
  755. (item) => item.prop == "estimatedScore",
  756. ); //是否存在预估满分
  757. chartData = questionList.map((item) => {
  758. return isHasEstimatedScore
  759. ? [item.questionName, item.estimatedScoreRate]
  760. : [item.questionName];
  761. });
  762. questionList.forEach((ques, key) => {
  763. const scoreRateArr = ques.classList.map(
  764. (item) => item?.questionStats?.scoreRate || 0,
  765. );
  766. chartData[key].push(...scoreRateArr);
  767. });
  768. let chartTitle = [],
  769. titleType = [],
  770. classSelectLegend = [];
  771. const newChangeHeaderList = isHasEstimatedScore
  772. ? [
  773. { ...isHasEstimatedScore, isG: false, type: 1 },
  774. ...changeHeaderList,
  775. ]
  776. : [...changeHeaderList];
  777. newChangeHeaderList.forEach((item) => {
  778. chartTitle.push(item.label);
  779. titleType.push(item.type ? item.type : ""); //1柱状图 2折线
  780. if (
  781. item.prop != "0" &&
  782. item.prop != "estimatedScore" &&
  783. item.prop.indexOf("school_group") == -1
  784. ) {
  785. classSelectLegend.push(item.label);
  786. }
  787. });
  788. chartTitle.unshift("group");
  789. if (analysisStore.filterObject.classLevel != 2) {
  790. //0 年级 1 组合班级 2具体班级
  791. let startIndex = 1,
  792. endIndex = 3;
  793. if (analysisStore.filterObject.schoolLevel == 2) {
  794. //0-联考 1-学校分组 2-具体学校
  795. startIndex =
  796. titleType.lastIndexOf(1) > -1 ? titleType.lastIndexOf(1) + 1 : 1;
  797. endIndex = titleType.indexOf(2) > -1 ? titleType.indexOf(2) + 2 : 3; //单校时显示联校、组合校、年级是柱子;班级组合、班级是折线。
  798. } else {
  799. //联校 组合学校 默认当前的为第一个选中的柱子
  800. const barFirtIndex =
  801. titleType.lastIndexOf(1) > -1 ? titleType.lastIndexOf(1) + 1 : 1;
  802. startIndex = barFirtIndex;
  803. endIndex = barFirtIndex + 2;
  804. }
  805. legendList =
  806. chartTitle.length > 1 ? chartTitle.slice(startIndex, endIndex) : [];
  807. state.problemAnalysisData.showBarLegendIndex = endIndex - 2;
  808. } else {
  809. //单班 联校和组合学校不默认显示
  810. legendList = classSelectLegend;
  811. state.problemAnalysisData.showBarLegendIndex =
  812. changeHeaderList.length - 1;
  813. }
  814. chartData.unshift(chartTitle); // 柱状图 图例标题
  815. chartData.pop(); // 删除最后一行 全卷
  816. state.problemAnalysisData.data = chartData;
  817. state.problemAnalysisData.legendList = legendList;
  818. state.problemAnalysisData.defaultLegendList = cloneDeep(legendList);
  819. //小题分析 /第N题
  820. GetQuestionStatsData(0);
  821. // 获取项目分析表
  822. GetMajorTableData();
  823. } else {
  824. state.problemAnalysisData.groupList = [];
  825. state.problemAnalysisData.groupTableList = [];
  826. state.problemAnalysisData.questionList = [];
  827. state.problemAnalysisData.questionTableList = [];
  828. state.problemAnalysisData.showBarLegendIndex = 1;
  829. state.problemAnalysisData.headerList = [];
  830. state.problemAnalysisData.changeHeaderList = [];
  831. state.problemAnalysisData.childHeaderList = [];
  832. state.majorQuestionData.data = [];
  833. state.majorQuestionData.legendList = [];
  834. state.questionScoreStatsData.datax = [];
  835. state.questionScoreStatsData.datay = [];
  836. state.questionScoreStatsData.dataStackY = [];
  837. state.questionScoreStatsData.tooltipData = [];
  838. state.questionScoreStatsData.rate = 0;
  839. state.questionScoreStatsData.maxClass = "";
  840. state.questionScoreStatsData.minClass = "";
  841. state.questionAnswerData.datax = [];
  842. state.questionAnswerData.datay = [];
  843. state.questionAnswerData.answerValue = "";
  844. state.questionAnswerData.answerScore = [];
  845. state.questionAnswerData.questionType = "";
  846. state.questionAnswerData.fullMark = "";
  847. state.questionAnswerData.tableData = [];
  848. state.questionAnswerData.classListIndex = 0;
  849. state.majorAnswerData.tableData = [];
  850. state.majorAnswerData.paperUrl = "";
  851. state.majorAnswerData.rowIndex = 0;
  852. state.majorStudentData.tableData = [];
  853. state.majorStudentData.legendList = [];
  854. state.majorStudentData.radarChartData = [];
  855. state.majorStudentData.excellentCourseList = "";
  856. state.majorStudentData.inferiorCourseList = "";
  857. state.majorTableData.tableData = [];
  858. state.majorTableData.headerData = [];
  859. state.majorTableData.changeHeaderData = [];
  860. state.majorTableData.childHeaderData = [];
  861. state.majorTableData.pageSize = 10;
  862. state.majorTableData.total = 0;
  863. state.majorTableData.currentPage = 1;
  864. }
  865. })
  866. .finally(() => {
  867. state.dataLoading = false;
  868. });
  869. };
  870. // 点击柱状图折线图
  871. const HandleChartClick = (index, name) => {
  872. GetQuestionStatsData(index); //小题分析
  873. };
  874. // 获取小题分析 /第N题
  875. const GetQuestionStatsData = (index) => {
  876. const questionData = cloneDeep(state.problemAnalysisData.questionList[index]);
  877. state.problemAnalysisData.questionListIndex = index;
  878. state.questionTitle = questionData?.questionName || "";
  879. if (questionData) {
  880. state.questionScoreStatsData.datax = []; // x轴数据
  881. state.questionScoreStatsData.datay = []; // Y轴数据
  882. state.questionScoreStatsData.dataStackY = []; // Y轴数据
  883. state.questionScoreStatsData.tooltipData = []; // 提示框内容
  884. let dataStackY = [];
  885. const isHasEstimatedScore = state.problemAnalysisData.headerList.find(
  886. (item) => item.prop == "estimatedScore",
  887. ); //是否存在预估满分
  888. if (questionData.classList.length > 1) {
  889. const key = state.problemAnalysisData.showBarLegendIndex;
  890. state.questionScoreStatsData.markLineData = []; //辅助线
  891. const classList = questionData?.classList || [];
  892. if (
  893. analysisStore.filterObject.classLevel == 0 ||
  894. analysisStore.filterObject.classLevel == 1
  895. ) {
  896. //0 年级 1 组合班级 2具体班级
  897. state.questionScoreStatsData.rate = Number(
  898. classList?.[key - 1]?.questionStats?.scoreRate || 0,
  899. );
  900. } else {
  901. state.questionScoreStatsData.rate = Number(
  902. classList?.[key]?.questionStats?.scoreRate || 0,
  903. );
  904. }
  905. //辅助线
  906. classList.forEach((item, index) => {
  907. const keyIndex =
  908. analysisStore.filterObject.classLevel == 0 ||
  909. analysisStore.filterObject.classLevel == 1
  910. ? key - (isHasEstimatedScore ? 2 : 1)
  911. : key;
  912. if (index <= keyIndex) {
  913. const rate = Number(item?.questionStats?.scoreRate || 0);
  914. state.questionScoreStatsData.markLineData.push({
  915. legendName: item.groupName,
  916. value: rate,
  917. isShow: index == keyIndex ? true : false, //是否显示
  918. });
  919. }
  920. });
  921. questionData.classList = questionData.classList.slice(
  922. isHasEstimatedScore ? key - 1 : key,
  923. ); // 取折线图数据
  924. } else {
  925. state.questionScoreStatsData.rate = 60;
  926. }
  927. questionData.classList.forEach((item) => {
  928. state.questionScoreStatsData.datax.push(item.groupName);
  929. state.questionScoreStatsData.datay.push(item.questionStats.scoreRate);
  930. dataStackY.push(item.questionStats.lossRate);
  931. state.questionScoreStatsData.tooltipData.push({
  932. list: [
  933. {
  934. name: "失分率",
  935. value: `${item.questionStats.lossRate}%`,
  936. },
  937. ],
  938. });
  939. });
  940. // 获取最大值
  941. const max = Math.max(...state.questionScoreStatsData.datay);
  942. // 获取最小值
  943. const min = Math.min(...state.questionScoreStatsData.datay);
  944. const maxValue = max.toFixed(2);
  945. const minValue = min.toFixed(2);
  946. let maxClass = [],
  947. minClass = [];
  948. state.questionScoreStatsData.datay.forEach((item, index) => {
  949. if (Number(item) == Number(maxValue)) {
  950. maxClass.push(state.questionScoreStatsData.datax[index]);
  951. }
  952. if (Number(item) == Number(minValue)) {
  953. minClass.push(state.questionScoreStatsData.datax[index]);
  954. }
  955. });
  956. state.questionScoreStatsData.minClass = minClass.join("、");
  957. state.questionScoreStatsData.maxClass = maxClass.join("、");
  958. state.questionScoreStatsData.dataStackY = [
  959. state.questionScoreStatsData.datay,
  960. dataStackY,
  961. ];
  962. }
  963. console.log("打印questionScoreStatsData1111", state.questionScoreStatsData);
  964. // 获取小题分析 /第N题 / 第N班
  965. GetQuestionAnswerData(state.problemAnalysisData.showBarLegendIndex);
  966. };
  967. //切换 获取小题分析 /第N题 获取第N班答题列表
  968. const HandleQuestionScoreChartClick = (index) => {
  969. GetQuestionAnswerData(index + state.problemAnalysisData.showBarLegendIndex);
  970. };
  971. // 获取小题分析 /第N题 / 第N班 选项
  972. const GetQuestionAnswerData = (index) => {
  973. const isHasEstimatedScore = state.problemAnalysisData.headerList.find(
  974. (item) => item.prop == "estimatedScore",
  975. ); //是否存在预估满分
  976. const newINdex = isHasEstimatedScore ? index - 1 : index;
  977. const classList =
  978. state.problemAnalysisData.questionList?.[
  979. state.problemAnalysisData.questionListIndex
  980. ]?.classList?.[newINdex];
  981. // console.log("打印获取小题分析班级列表",classList)
  982. state.questionAnswerData.answerValue =
  983. state.problemAnalysisData.questionList[
  984. state.problemAnalysisData.questionListIndex
  985. ].answerValue; //正确答案
  986. state.questionAnswerData.questionType =
  987. state.problemAnalysisData.questionList[
  988. state.problemAnalysisData.questionListIndex
  989. ].questionType; //类型
  990. state.questionAnswerData.fullMark =
  991. state.problemAnalysisData.questionList[
  992. state.problemAnalysisData.questionListIndex
  993. ].fullMark; //满分
  994. state.questionAnswerData.classListIndex = newINdex;
  995. if (classList) {
  996. const answerList = classList.questionStats.answerList || [];
  997. state.classTitle = classList.groupName;
  998. state.questionAnswerData.datax = []; // x轴数据
  999. state.questionAnswerData.datay = []; // Y轴数据
  1000. let sum = 0;
  1001. answerList.forEach((item) => {
  1002. sum += item.studentNum;
  1003. state.questionAnswerData.datax.push(item.name);
  1004. state.questionAnswerData.datay.push(item.studentNum);
  1005. state.questionAnswerData.answerScore.push(item.score);
  1006. });
  1007. state.questionAnswerData.tableData = [
  1008. {
  1009. title: "得分率",
  1010. value: `${classList.questionStats.scoreRate}%`,
  1011. },
  1012. {
  1013. title: "平均分",
  1014. value: `${classList.questionStats.averageScore}`,
  1015. },
  1016. {
  1017. title: "最高分",
  1018. value: `${classList.questionStats.maxScore}`,
  1019. },
  1020. {
  1021. title: "最低分",
  1022. value: `${classList.questionStats.minScore}`,
  1023. },
  1024. {
  1025. title: "人数",
  1026. value: `${sum}人`,
  1027. },
  1028. ];
  1029. if (analysisStore.filterObject.schoolLevel == 2) {
  1030. //单校时展示
  1031. // 获取答题情况
  1032. GetAnswerListByAnswerAndScore(
  1033. 0,
  1034. answerList && answerList[0] ? answerList[0].name : "",
  1035. );
  1036. }
  1037. }
  1038. };
  1039. // 点击柱状图小题分析 /第N题 / 第N班 选项 获取答题情况
  1040. const HandleQuestionAnswerChartClick = (index, name) => {
  1041. if (analysisStore.filterObject.schoolLevel == 2) {
  1042. //单校时展示
  1043. GetAnswerListByAnswerAndScore(index, name);
  1044. }
  1045. };
  1046. //通过答案或者分数查询某题作答情况
  1047. const GetAnswerListByAnswerAndScore = (index, name) => {
  1048. state.optionTitle = name; //选项名称
  1049. const question =
  1050. state.problemAnalysisData.questionList[
  1051. state.problemAnalysisData.questionListIndex
  1052. ];
  1053. const classItem = question.classList[state.questionAnswerData.classListIndex];
  1054. const classItemKeys = Object.keys(classItem);
  1055. const reportParam = {
  1056. ...analysisStore.filterObject,
  1057. };
  1058. Object.keys(analysisStore.filterObject).forEach((item) => {
  1059. if (classItemKeys.indexOf(item) > -1) {
  1060. reportParam[item] = classItem[item];
  1061. }
  1062. });
  1063. const answer =
  1064. question.classList[state.questionAnswerData.classListIndex].questionStats
  1065. .answerList[index];
  1066. const params = {
  1067. ...reportParam,
  1068. questionId: question.questionId, // 试题id
  1069. registrationCodeList: answer?.registrationCodeList || [], // 学生账号数组
  1070. };
  1071. state.cardQuestionId = params.questionId; // 批量查看答题卡试题id
  1072. state.cardRegistrationCodeList = params.registrationCodeList; // 批量查看答题卡学生账号数组
  1073. queryAnswerListByAnswerAndScore(params).then((res) => {
  1074. if (res.code == 200) {
  1075. state.majorAnswerData.tableData = res.data || [];
  1076. } else {
  1077. state.majorAnswerData.tableData = [];
  1078. }
  1079. });
  1080. };
  1081. // 获取项目分析表
  1082. const GetMajorTableData = () => {
  1083. state.majorTableData.tableKey += 1;
  1084. state.majorTableData.headerData = state.problemAnalysisData.headerList;
  1085. state.majorTableData.changeHeaderData =
  1086. state.problemAnalysisData.changeHeaderList;
  1087. state.majorTableData.childHeaderData =
  1088. state.problemAnalysisData.childHeaderList;
  1089. const headerPropData = state.problemAnalysisData.headerList.map(
  1090. (item) => item.prop,
  1091. ); //表头字段名
  1092. const childHeaderPropData = state.problemAnalysisData.childHeaderList.map(
  1093. (item) => item.prop,
  1094. ); //动态表头字段名
  1095. let allTableData = [];
  1096. const allList = state.problemAnalysisData.questionTableList;
  1097. allList.forEach((item) => {
  1098. let itemObj = {
  1099. questionId: item?.questionId || "",
  1100. knowledgeId: item?.knowledgeId || "",
  1101. };
  1102. const classList = item.classList;
  1103. headerPropData.forEach((title) => {
  1104. itemObj[title] = Array.isArray(item[title])
  1105. ? item[title].join("、")
  1106. : item[title];
  1107. });
  1108. classList.forEach((el) => {
  1109. if (
  1110. el.questionStats?.headDataBOList &&
  1111. el.questionStats.headDataBOList.length > 0
  1112. ) {
  1113. el.questionStats.headDataBOList.forEach((bo) => {
  1114. el.questionStats[`${bo.name}Rate`] = bo.rate;
  1115. el.questionStats[`${bo.name}StudentNumber`] = bo.studentNumber;
  1116. });
  1117. } else {
  1118. el.questionStats = [];
  1119. }
  1120. childHeaderPropData.forEach((field) => {
  1121. itemObj[`${el.groupId}_${field}`] = el.questionStats[field];
  1122. });
  1123. });
  1124. allTableData.push(itemObj);
  1125. });
  1126. state.majorTableData.total = allTableData.length; //总条数
  1127. state.majorTableData.allTableData = allTableData;
  1128. GetPageMajorTableData();
  1129. //重置表格滚动条位置
  1130. ResetTableScroll(); //重置表格滚动条位置
  1131. };
  1132. const GetPageMajorTableData = () => {
  1133. const start =
  1134. (state.majorTableData.currentPage - 1) * state.majorTableData.pageSize;
  1135. const end = start + state.majorTableData.pageSize;
  1136. state.majorTableData.tableData = state.majorTableData.allTableData.slice(
  1137. start,
  1138. end,
  1139. );
  1140. };
  1141. //重置表格滚动条位置
  1142. const ResetTableScroll = () => {
  1143. nextTick(() => {
  1144. if (majorTable.value) {
  1145. const tableBody = majorTable.value.querySelector(
  1146. ".el-table__body-wrapper",
  1147. );
  1148. if (tableBody) {
  1149. tableBody.scrollTop = 0; //清除纵向滚动条位置
  1150. tableBody.scrollLeft = 0; // 清除横向滚动条位置
  1151. }
  1152. }
  1153. });
  1154. };
  1155. const handleCurrentChange = (val) => {
  1156. state.majorTableData.currentPage = val;
  1157. GetMajorTableData(); //加载分析表格数据
  1158. };
  1159. const handleSizeChange = (val: number) => {
  1160. state.majorTableData.pageSize = val;
  1161. state.majorTableData.currentPage = 1;
  1162. GetMajorTableData(); //加载分析表格数据
  1163. }
  1164. //设置表头样式
  1165. const HeaderRowStyle = ({ row, rowIndex }) => {
  1166. if (rowIndex === 1) {
  1167. return {
  1168. display: "none",
  1169. };
  1170. }
  1171. };
  1172. const pageInit = () => {
  1173. state.problemAnalysisData.chartTypeList =
  1174. analysisStore.filterObject.classLevel != 2
  1175. ? [
  1176. {
  1177. label: "组合图",
  1178. value: "line_bar_chart",
  1179. },
  1180. {
  1181. label: "柱状图",
  1182. value: "vertical_bar",
  1183. },
  1184. {
  1185. label: "雷达图",
  1186. value: "radar_chart",
  1187. },
  1188. ]
  1189. : [
  1190. {
  1191. label: "柱状图",
  1192. value: "vertical_bar",
  1193. },
  1194. {
  1195. label: "雷达图",
  1196. value: "radar_chart",
  1197. },
  1198. ];
  1199. state.problemAnalysisData.chartType =
  1200. analysisStore.filterObject.classLevel != 2
  1201. ? "line_bar_chart"
  1202. : "vertical_bar";
  1203. state.questionScoreStatsData.chartType = "vertical_bar";
  1204. state.majorTableData.currentPage = 1;
  1205. state.majorAnswerData.rowIndex = 0;
  1206. GetQuestionAnalysisData(); //获取小题分析数据
  1207. };
  1208. // 监听筛选条件
  1209. watch(
  1210. () => analysisStore.filterObject,
  1211. async () => {
  1212. pageInit();
  1213. },
  1214. { deep: true },
  1215. );
  1216. onMounted(() => {
  1217. pageInit();
  1218. });
  1219. </script>
  1220. <style lang="scss" scoped>
  1221. .content_left {
  1222. &.answer {
  1223. width: calc(100% - 220px);
  1224. }
  1225. &.card {
  1226. width: calc(100% - 480px);
  1227. }
  1228. }
  1229. .content_right {
  1230. height: 100%;
  1231. display: flex;
  1232. align-items: center;
  1233. margin: auto;
  1234. padding-bottom: 0;
  1235. &.answer {
  1236. width: 200px;
  1237. }
  1238. &.card {
  1239. width: 460px;
  1240. }
  1241. :deep(.el-table) {
  1242. border-left: 0px;
  1243. border-right: 0px;
  1244. .el-table__cell {
  1245. height: 44px;
  1246. }
  1247. }
  1248. }
  1249. </style>