index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <template>
  2. <div class="full flex direction-column">
  3. <div class="flex items-center p-extra-small fill-blank header-view">
  4. <el-button class="m-r-auto" size="small" plain @click="back()">返回</el-button>
  5. <div class="data-item">
  6. <user-info></user-info>
  7. </div>
  8. <div class="data-item">
  9. <div class="icon-item">
  10. <lock-entry />
  11. </div>
  12. <div class="icon-item">
  13. <message :paper-path="current?.filePath" :secret-number="current?.secretNumber"></message>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="flex-1 overflow-hidden flex direction-column">
  18. <div class="fill-blank filter-header flex items-center">
  19. <div class="flex-1 flex items-center">
  20. <span class="m-name">评卷员:{{ query.markerName }}</span>
  21. <base-form size="small" :items="formItems" :model="model">
  22. <!-- <template #form-item-search>
  23. <el-button type="primary" :loading="loading1 || loading2" @click="onSearch">刷新</el-button>
  24. </template> -->
  25. </base-form>
  26. </div>
  27. <el-button type="primary" :loading="loading1 || loading2" size="small" @click="onSearch">刷新</el-button>
  28. </div>
  29. <div class="flex-1 p-base flex direction-column overflow-hidden">
  30. <div class="flex-1 overflow-hidden mark-container">
  31. <splitpanes class="default-theme" style="height: 100%" @resize="setPaneSize">
  32. <pane
  33. max-size="80"
  34. :size="paneSize"
  35. class="flex flex-1 direction-column radius-base fill-blank mark-content"
  36. :class="{ 'text-center': center }"
  37. :style="{ 'background-color': backgroundColor }"
  38. >
  39. <span class="preview" @click="onPreview">
  40. <svg-icon name="preview"></svg-icon>
  41. </span>
  42. <p v-if="current" class="absolute question-info">{{ current.mainNumber + '-' + current.mainName }}</p>
  43. <p v-if="current" class="absolute mark-score">{{ current.markScore }}</p>
  44. <!-- <right-button class="next-button" @click="checkNext" /> -->
  45. <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
  46. <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
  47. </div>
  48. <div class="flex items-center p-t-base">
  49. <el-button
  50. :disabled="!current?.taskId"
  51. class="m-l-base"
  52. size="small"
  53. type="primary"
  54. style="margin-bottom: 4px"
  55. @click="onSendBack"
  56. >打回</el-button
  57. >
  58. <el-button
  59. custom-1
  60. class="m-l-base m-r-auto"
  61. size="small"
  62. type="success"
  63. :disabled="!tableData?.length"
  64. style="margin-bottom: 4px"
  65. @click="multToggle"
  66. >{{ isMult ? '取消多选' : '多选' }}</el-button
  67. >
  68. <div class="flex-1 flex justify-end items-center">
  69. <scoring-panel-with-confirm
  70. :id="current?.taskId"
  71. v-model:visible="editScoreVisible"
  72. v-model:score="modelScore"
  73. :main-number="current?.mainNumber"
  74. :subject-code="query.subjectCode"
  75. modal
  76. :auto-visible="false"
  77. :cannot-toggle="true"
  78. @submit="onSubmit"
  79. ></scoring-panel-with-confirm>
  80. </div>
  81. </div>
  82. </pane>
  83. <pane
  84. max-size="80"
  85. :size="100 - paneSize"
  86. class="flex direction-column p-base radius-base fill-blank table-view"
  87. >
  88. <!-- <div class="flex items-center p-b-base m-b-base marker-name">
  89. <span>评卷员</span>
  90. <span>{{ query.markerName }}</span>
  91. </div> -->
  92. <div class="flex items-center justify-between detail-info-table-header">
  93. <div v-if="tableModel.score !== ''" class="choose-score-info">
  94. <span class="txt">{{ tableModel.score }}分段</span>
  95. <span class="close" @click="tableModel.score = ''">&times;</span>
  96. </div>
  97. <div v-else></div>
  98. <btn-pagination v-model="currentPage" :pagination="pagination"></btn-pagination>
  99. </div>
  100. <div class="flex-1 scroll-auto m-t-mini">
  101. <base-table
  102. ref="tableRef"
  103. border
  104. stripe
  105. size="small"
  106. v-bind="pagination"
  107. height="100%"
  108. :data="tableData"
  109. :columns="columns"
  110. :highlight-current-row="!isMult"
  111. :cell-style="{ padding: '6px 0' }"
  112. :memory-column="true"
  113. @current-change="onCurrentChange"
  114. @row-dblclick="onDbClick"
  115. @selection-change="handleSelectionChange"
  116. ></base-table>
  117. </div>
  118. </pane>
  119. </splitpanes>
  120. </div>
  121. <div class="chart-space m-t-base flex justify-between items-center">
  122. <div class="new-chart-box radius-base">
  123. <vue-echarts class="full" :option="markerSubjectiveChartsOption"></vue-echarts>
  124. </div>
  125. <div class="new-chart-box radius-base">
  126. <vue-echarts class="full" :option="markerObjectiveChartsOption"></vue-echarts>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. <image-preview v-model="previewModalVisible" :url="current?.filePath"></image-preview>
  133. <!-- <send-back-mark
  134. :id="current?.taskId"
  135. v-model="sendBackVisible"
  136. type="custom-check"
  137. @rejected="onRejected"
  138. ></send-back-mark> -->
  139. <send-back-mark :id="rejectIds" v-model="sendBackVisible" type="custom-check" @rejected="onRejected"></send-back-mark>
  140. <mark-history-list
  141. :id="currentViewHistory?.taskId"
  142. v-model="visibleHistory"
  143. :task="currentViewHistory"
  144. ></mark-history-list>
  145. </template>
  146. <script setup lang="tsx" name="AnalysisPersonnelStatisticsMarker">
  147. /** 评卷员明细统计 */
  148. import { computed, reactive, ref, watch, nextTick } from 'vue'
  149. import { useRouter, useRoute } from 'vue-router'
  150. import { ElButton, ElMessage } from 'element-plus'
  151. import dayjs from 'dayjs'
  152. import VueEcharts from 'vue-echarts'
  153. import Message from '@/components/shared/message/Message.vue'
  154. import UserInfo from '@/components/shared/UserInfo.vue'
  155. import BaseTable from '@/components/element/BaseTable.vue'
  156. import BaseForm from '@/components/element/BaseForm.vue'
  157. import useFetch from '@/hooks/useFetch'
  158. import useTable from '@/hooks/useTable'
  159. import useTableCheck from '@/hooks/useTableCheck'
  160. import LockEntry from '@/components/common/LockEntry.vue'
  161. import { Splitpanes, Pane } from 'splitpanes'
  162. import { setPaneSize } from '@/utils/common'
  163. import SendBackMark from '@/components/shared/SendBackMark.vue'
  164. import useMarkHeader from '@/hooks/useMarkHeader'
  165. import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
  166. import { add } from '@/utils/common'
  167. import { useSetImgBg } from '@/hooks/useSetImgBg'
  168. import SvgIcon from '@/components/common/SvgIcon.vue'
  169. import useMainStore from '@/store/main'
  170. import ScoringPanelWithConfirm from '@/components/shared/ScoringPanelWithConfirm.vue'
  171. import ImagePreview from '@/components/shared/ImagePreview.vue'
  172. import BtnPagination from '@/components/common/BtnPagination.vue'
  173. import SecNumberStatus from '@/components/common/secNumberStatus.vue'
  174. import { ElIcon } from 'element-plus'
  175. import { Close } from '@element-plus/icons-vue'
  176. import type { EChartsOption } from 'echarts'
  177. import type { ExtractApiResponse } from '@/api/api'
  178. import type { EpTableColumn, EpFormItem } from 'global-type'
  179. import type { SetImgBgOption } from '@/hooks/useSetImgBg'
  180. const isMult = ref(false)
  181. const multipleSelection = ref<any>([])
  182. const handleSelectionChange = (val: any) => {
  183. multipleSelection.value = val
  184. }
  185. const mainStore = useMainStore()
  186. const paneSize = computed(() => {
  187. return mainStore.paneSizeConfig[location.pathname] || 70
  188. })
  189. const { back, push } = useRouter()
  190. const { query } = useRoute()
  191. /** 打回弹窗 */
  192. const sendBackVisible = ref<boolean>(false)
  193. /** 打回 */
  194. const onSendBack = () => {
  195. sendBackVisible.value = true
  196. }
  197. /** 打回成功 */
  198. const onRejected = () => {
  199. // onRefresh()
  200. ElMessage.success('打回成功')
  201. fetchTable()
  202. }
  203. /** 给分板 */
  204. const editScoreVisible = ref<boolean>(true)
  205. /** 图片预览 */
  206. const previewModalVisible = ref<boolean>(false)
  207. /** 分数 */
  208. const modelScore = ref<number[]>([])
  209. const {
  210. rotate,
  211. scale,
  212. center,
  213. frontColor,
  214. backgroundColor,
  215. onBack,
  216. onScaleChange,
  217. onCenter,
  218. onRotate,
  219. setBackgroundColor,
  220. setFrontColor,
  221. onViewStandard,
  222. } = useMarkHeader()
  223. /** 刷新 */
  224. const onRefresh = () => {
  225. fetchTable()
  226. }
  227. /** 预览试卷 */
  228. const onPreview = () => {
  229. previewModalVisible.value = true
  230. }
  231. const model = reactive({
  232. type: 'today',
  233. })
  234. const tableModel = reactive<any>({
  235. markerId: query.markerId,
  236. score: '',
  237. pageSize: 100,
  238. subjectCode: query.subjectCode as string,
  239. mainNumber: query.questionMainNumber as string,
  240. today: true,
  241. })
  242. watch(
  243. () => model.type,
  244. () => {
  245. tableModel.today = model.type === 'today'
  246. }
  247. )
  248. ;(window as any)._tableModel = tableModel
  249. const { pagination, currentPage, data, fetchTable } = useTable('getPersonalMarkDetail', tableModel)
  250. const {
  251. tableRef,
  252. tableData,
  253. current,
  254. currentView: currentViewHistory,
  255. next: checkNext,
  256. visibleHistory,
  257. onDbClick,
  258. onCurrentChange,
  259. nextRow,
  260. elTableRef,
  261. } = useTableCheck(data, true, null, false, isMult)
  262. /** 确定给分 */
  263. const { fetch: updatePersonalMarkDetailScore } = useFetch('updatePersonalMarkDetailScore')
  264. const onSubmit = async () => {
  265. if (current.value) {
  266. const scores = JSON.parse(JSON.stringify(modelScore.value))
  267. let res: any = await updatePersonalMarkDetailScore({
  268. taskId: current.value.taskId,
  269. scores: modelScore.value,
  270. source: (query.source as string) || '',
  271. })
  272. // current.value.markerScore = add(...scores)
  273. current.value.markScore = add(...scores)
  274. current.value.checked = res.checked
  275. current.value.corrected = res.corrected
  276. current.value.markerScore = res.markerScore
  277. current.value.objectiveScore = res.objectiveScore
  278. current.value.ratio = res.ratio
  279. current.value.markTime = res.markTime
  280. current.value.markerScore = res.markerScore
  281. ElMessage.success('修改成功')
  282. // editScoreVisible.value = false
  283. // onRefresh()
  284. nextRow()
  285. }
  286. }
  287. watch(current, () => {
  288. if (current.value) {
  289. useFetch('viewActiveCheck')
  290. .fetch({ taskId: current.value?.taskId })
  291. .then(() => {
  292. if (!current.value.checked) {
  293. current.value.checked = true
  294. }
  295. })
  296. }
  297. })
  298. const imgOption = computed<SetImgBgOption>(() => {
  299. return {
  300. image: current?.value?.filePath || '',
  301. rotate: rotate.value,
  302. scale: scale.value,
  303. }
  304. })
  305. const { drawing, dataUrl } = useSetImgBg(imgOption, frontColor, setFrontColor)
  306. onRefresh()
  307. watch(
  308. () => tableModel.score,
  309. () => {
  310. fetchTable()
  311. }
  312. )
  313. const formItems: EpFormItem[] = [
  314. {
  315. label: '统计方式',
  316. prop: 'type',
  317. slotType: 'radio',
  318. rowKey: 'row-1',
  319. slot: {
  320. options: [
  321. { label: 'total', slotLabel: '积累' },
  322. { label: 'today', slotLabel: '当天' },
  323. ],
  324. },
  325. // colProp: {
  326. // span: 4,
  327. // offset: 18,
  328. // },
  329. },
  330. // {
  331. // slotName: 'search',
  332. // rowKey: 'row-1',
  333. // colProp: {
  334. // span: 2,
  335. // },
  336. // },
  337. ]
  338. const {
  339. fetch: getStatisticObjectiveByMarker,
  340. result: objectiveByMarker,
  341. loading: loading1,
  342. } = useFetch('getStatisticObjectiveByMarker')
  343. const {
  344. fetch: getStatisticSubjectiveByMarker,
  345. result: subjectiveByMarker,
  346. loading: loading2,
  347. } = useFetch('getStatisticSubjectiveByMarker')
  348. type TableDataType = ExtractArrayValue<ExtractApiResponse<'getStatisticObjectiveByMarker'>['segmentsByAll']> & {
  349. groupCount: number
  350. groupRate: number
  351. allCount: number
  352. allRate: number
  353. }
  354. type GroupData = Record<number, { groupCount: number; groupRate: number }>
  355. type AllData = Record<number, { allCount: number; allRate: number }>
  356. const objectiveGroupData = computed<GroupData>(() => {
  357. return objectiveByMarker.value?.segmentsByGroup?.reduce((result, data) => {
  358. result[data.scoreStart] = { groupCount: data.count, groupRate: data.rate }
  359. return result
  360. }, {} as GroupData)
  361. })
  362. const objectiveAllData = computed<AllData>(() => {
  363. return objectiveByMarker.value?.segmentsByAll?.reduce((result, data) => {
  364. result[data.scoreStart] = { allCount: data.count, allRate: data.rate }
  365. return result
  366. }, {} as AllData)
  367. })
  368. const subjectiveGroupData = computed<GroupData>(() => {
  369. return subjectiveByMarker.value?.segmentsByGroup?.reduce((result, data) => {
  370. result[data.scoreStart] = { groupCount: data.count, groupRate: data.rate }
  371. return result
  372. }, {} as GroupData)
  373. })
  374. const subjectiveAllData = computed<AllData>(() => {
  375. return subjectiveByMarker.value?.segmentsByAll?.reduce((result, data) => {
  376. result[data.scoreStart] = { allCount: data.count, allRate: data.rate }
  377. return result
  378. }, {} as AllData)
  379. })
  380. const objectiveTableData = computed<TableDataType[]>(() => {
  381. return objectiveByMarker?.value?.segmentsByUser.map((d) => ({
  382. ...d,
  383. ...objectiveGroupData.value?.[d.scoreStart],
  384. ...objectiveAllData.value?.[d.scoreStart],
  385. }))
  386. })
  387. // const columns: EpTableColumn<any>[] = [
  388. // {
  389. // label: '评卷员',
  390. // prop: 'markerName',
  391. // minWidth: 90,
  392. // formatter(row: any) {
  393. // return (
  394. // <SecNumberStatus
  395. // secretNumber={row.markerName}
  396. // checked={row.checked}
  397. // corrected={row.corrected}
  398. // ></SecNumberStatus>
  399. // )
  400. // },
  401. // },
  402. // {
  403. // label: '密号',
  404. // prop: 'secretNumber',
  405. // minWidth: 110,
  406. // },
  407. // { label: '给分', prop: 'markerScore', minWidth: 70 },
  408. // { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
  409. // { label: '客主比', prop: 'markerRatio', minWidth: 80 },
  410. // { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
  411. // { label: '成绩', prop: 'markScore', minWidth: 70 },
  412. // ]
  413. const columns: any = computed(() => {
  414. let cols: any = [
  415. {
  416. label: '评卷员',
  417. prop: 'markerName',
  418. minWidth: 90,
  419. formatter(row: any) {
  420. return (
  421. <SecNumberStatus
  422. secretNumber={row.markerName}
  423. checked={row.checked}
  424. corrected={row.corrected}
  425. ></SecNumberStatus>
  426. )
  427. },
  428. },
  429. {
  430. label: '密号',
  431. prop: 'secretNumber',
  432. minWidth: 110,
  433. },
  434. { label: '给分', prop: 'markerScore', minWidth: 70 },
  435. { label: '客观分', prop: 'objectiveScore', minWidth: 70 },
  436. { label: '客主比', prop: 'markerRatio', minWidth: 80 },
  437. { label: '成绩客主比', prop: 'ratio', minWidth: 110 },
  438. { label: '成绩', prop: 'markScore', minWidth: 70 },
  439. { label: '评卷时间', prop: 'markTime', minWidth: 140 },
  440. ]
  441. if (isMult.value) {
  442. cols.unshift({
  443. type: 'selection',
  444. width: 55,
  445. })
  446. }
  447. return cols
  448. })
  449. const onSearch = () => {
  450. fetchTable()
  451. if (query.markerId) {
  452. const startTime = model.type === 'today' ? dayjs().startOf('day').format('YYYYMMDDHHmmss') : ''
  453. getStatisticObjectiveByMarker({
  454. markerId: query.markerId as string,
  455. startTime,
  456. endTime: '',
  457. })
  458. getStatisticSubjectiveByMarker({
  459. markerId: query.markerId as string,
  460. startTime,
  461. endTime: '',
  462. })
  463. }
  464. }
  465. type StatisticObjectiveByMarker = ExtractApiResponse<'getStatisticObjectiveByMarker'>
  466. type StatisticObjectiveByMarkerValues = StatisticObjectiveByMarker['segmentsByAll']
  467. const getXAxisData = <K extends keyof ExtractArrayValue<StatisticObjectiveByMarkerValues>>(
  468. field: K,
  469. data?: StatisticObjectiveByMarkerValues
  470. ) => {
  471. if (!data) {
  472. return []
  473. }
  474. const getValue = (key: K, item: ExtractArrayValue<StatisticObjectiveByMarkerValues>) => {
  475. return item[key]
  476. }
  477. return data?.map((v) => getValue(field, v))
  478. }
  479. const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
  480. return {
  481. grid: {
  482. top: 50,
  483. bottom: 15,
  484. left: 30,
  485. right: 30,
  486. containLabel: true,
  487. },
  488. legend: {
  489. top: 10,
  490. itemWidth: 14,
  491. data: ['评卷员主观分布', '小组主观分布', '题组主观分布'],
  492. },
  493. tooltip: {
  494. trigger: 'axis',
  495. triggerOn: 'click',
  496. enterable: true,
  497. axisPointer: {
  498. type: 'line',
  499. crossStyle: {
  500. color: '#999',
  501. },
  502. lineStyle: {
  503. type: 'dashed',
  504. },
  505. },
  506. formatter: function (params: any) {
  507. let html = `
  508. <div>
  509. <div style="font-size:14px;color:#0091ff;font-weight:bold;text-decoration:underline;cursor:pointer;margin-bottom:8px" onclick="window._tableModel.score=${params[0].axisValue}">${params[0].axisValue}分段</div>
  510. <div>
  511. `
  512. for (let i = 0; i < params.length; i++) {
  513. let item = params[i]
  514. html += `
  515. <div style="margin: 0px 0 0">
  516. ${item.marker}
  517. <span style="font-size:14px;color:#666;font-weight:400;margin-left:2px">${item.seriesName}</span>
  518. <span style="float:right;margin-left:20px;font-size:14px;color:#666;font-weight:900">${item.data}</span>
  519. <div style="clear:both"></div>
  520. </div>
  521. </div>
  522. `
  523. }
  524. html += `
  525. </div>
  526. </div>
  527. `
  528. return html
  529. },
  530. },
  531. xAxis: {
  532. axisLine: { show: false },
  533. axisTick: { show: false },
  534. splitLine: { show: false },
  535. axisLabel: {
  536. align: 'right',
  537. },
  538. data: getXAxisData('scoreStart', subjectiveByMarker?.value?.segmentsByAll),
  539. },
  540. yAxis: [
  541. {
  542. type: 'value',
  543. },
  544. {
  545. type: 'value',
  546. axisLabel: {
  547. formatter: `{value}%`,
  548. },
  549. splitLine: { show: false },
  550. },
  551. ],
  552. series: [
  553. {
  554. name: '评卷员主观分布',
  555. type: 'line',
  556. itemStyle: {
  557. color: '#8ED14B',
  558. },
  559. data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByUser),
  560. },
  561. {
  562. name: '小组主观分布',
  563. type: 'line',
  564. itemStyle: {
  565. color: '#3B99D4',
  566. },
  567. data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByGroup),
  568. },
  569. {
  570. name: '题组主观分布',
  571. type: 'line',
  572. itemStyle: {
  573. color: '#ff0000',
  574. },
  575. data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByAll),
  576. },
  577. ],
  578. }
  579. })
  580. const markerObjectiveChartsOption = computed<EChartsOption>(() => {
  581. return {
  582. grid: {
  583. top: 50,
  584. bottom: 15,
  585. left: 30,
  586. right: 30,
  587. containLabel: true,
  588. },
  589. legend: {
  590. top: 10,
  591. itemWidth: 14,
  592. data: ['评卷员客观分布', '小组客观分布', '题组客观分布'],
  593. },
  594. tooltip: {
  595. trigger: 'axis',
  596. triggerOn: 'click',
  597. enterable: true,
  598. axisPointer: {
  599. type: 'line',
  600. crossStyle: {
  601. color: '#999',
  602. },
  603. lineStyle: {
  604. type: 'dashed',
  605. },
  606. },
  607. // formatter: function (params: any) {
  608. // let html = `
  609. // <div>
  610. // <div style="font-size:14px;color:#0091ff;font-weight:bold;text-decoration:underline;cursor:pointer;margin-bottom:8px">${params[0].axisValue}分段</div>
  611. // <div>
  612. // `
  613. // for (let i = 0; i < params.length; i++) {
  614. // let item = params[i]
  615. // html += `
  616. // <div style="margin: 0px 0 0">
  617. // ${item.marker}
  618. // <span style="font-size:14px;color:#666;font-weight:400;margin-left:2px">${item.seriesName}</span>
  619. // <span style="float:right;margin-left:20px;font-size:14px;color:#666;font-weight:900">${item.data}</span>
  620. // <div style="clear:both"></div>
  621. // </div>
  622. // </div>
  623. // `
  624. // }
  625. // html += `
  626. // </div>
  627. // </div>
  628. // `
  629. // return html
  630. // },
  631. },
  632. xAxis: {
  633. axisLine: { show: false },
  634. axisTick: { show: false },
  635. splitLine: { show: false },
  636. axisLabel: {
  637. align: 'right',
  638. },
  639. data: getXAxisData('scoreStart', objectiveByMarker?.value?.segmentsByAll),
  640. },
  641. yAxis: [
  642. {
  643. type: 'value',
  644. },
  645. {
  646. type: 'value',
  647. axisLabel: {
  648. formatter: `{value}%`,
  649. },
  650. splitLine: { show: false },
  651. },
  652. ],
  653. series: [
  654. {
  655. name: '评卷员客观分布',
  656. type: 'line',
  657. itemStyle: {
  658. color: '#8ED14B',
  659. },
  660. data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByUser),
  661. },
  662. {
  663. name: '小组客观分布',
  664. type: 'line',
  665. itemStyle: {
  666. color: '#3B99D4',
  667. },
  668. data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByGroup),
  669. },
  670. {
  671. name: '题组客观分布',
  672. type: 'line',
  673. itemStyle: {
  674. color: '#ff0000',
  675. },
  676. data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByAll),
  677. },
  678. ],
  679. }
  680. })
  681. onSearch()
  682. const multToggle = () => {
  683. isMult.value = !isMult.value
  684. editScoreVisible.value = !isMult.value
  685. if (!isMult.value && tableData.value?.length && current.value) {
  686. nextTick(() => {
  687. let index = tableData.value.findIndex((task: any) => task.taskId == current.value?.taskId)
  688. elTableRef?.value?.setCurrentRow(tableData.value[index == -1 ? 0 : index])
  689. })
  690. }
  691. if (isMult.value) {
  692. elTableRef?.value?.clearSelection()
  693. }
  694. }
  695. const rejectIds = computed(() => {
  696. return isMult.value ? multipleSelection.value.map((item: any) => item.taskId) : [current.value?.taskId]
  697. })
  698. </script>
  699. <style scoped lang="scss">
  700. .header-view {
  701. background-color: #333;
  702. height: 60px;
  703. ::v-deep(.data-item) {
  704. // padding-left: 20px;
  705. padding-left: 15px;
  706. padding-right: 15px;
  707. position: relative;
  708. height: 100%;
  709. display: flex;
  710. align-items: center;
  711. color: #8a8a8a;
  712. .icon-item {
  713. // width: 45px;
  714. padding: 0 10px;
  715. height: 100%;
  716. display: flex;
  717. flex-direction: column;
  718. justify-content: flex-end;
  719. }
  720. &:first-child {
  721. margin-left: auto;
  722. }
  723. &:not(:last-child) {
  724. &:after {
  725. content: '';
  726. position: absolute;
  727. right: 0;
  728. top: 0;
  729. width: 1px;
  730. height: 100%;
  731. background-color: #464646;
  732. }
  733. }
  734. &.is-last:after {
  735. width: 0;
  736. }
  737. .main-ques-info {
  738. text-align: center;
  739. font-weight: bold;
  740. color: $color--primary;
  741. margin-bottom: 5px;
  742. max-width: 130px;
  743. }
  744. }
  745. }
  746. .chart-space {
  747. height: 220px;
  748. }
  749. .filter-header {
  750. border-top: 1px solid #eee;
  751. border-bottom: 1px solid #eee;
  752. padding: 8px 15px;
  753. .m-name {
  754. font-size: 12px;
  755. color: #666;
  756. margin-right: 40px;
  757. font-weight: bold;
  758. }
  759. :deep(.el-form-item--small) {
  760. margin-bottom: 0;
  761. }
  762. }
  763. .new-chart-box {
  764. height: 100%;
  765. width: calc(50% - 6px);
  766. background-color: #fff;
  767. }
  768. .mark-container {
  769. .mark-content {
  770. position: relative;
  771. .preview {
  772. position: absolute;
  773. cursor: pointer;
  774. top: 20px;
  775. right: 25px;
  776. font-size: 38px;
  777. }
  778. .next-button {
  779. position: absolute;
  780. right: -20px;
  781. top: 300px;
  782. }
  783. .mark-content-paper {
  784. img {
  785. max-width: 100%;
  786. }
  787. }
  788. }
  789. .table-view {
  790. // width: 580px;
  791. .detail-info-table-header {
  792. .choose-score-info {
  793. background: rgba(0, 186, 151, 0.1);
  794. display: flex;
  795. align-items: center;
  796. height: 32px;
  797. padding: 0 10px;
  798. border-radius: 4px;
  799. .txt {
  800. color: #00ba97;
  801. font-weight: bold;
  802. font-size: 12px;
  803. margin-right: 12px;
  804. }
  805. .close {
  806. color: #00ba97;
  807. font-weight: bold;
  808. cursor: pointer;
  809. font-size: 16px;
  810. margin-bottom: 2px;
  811. }
  812. }
  813. }
  814. .marker-name {
  815. border-bottom: $OnePixelLine;
  816. }
  817. .detail-info-label {
  818. .detail-info-label-num {
  819. min-width: 32px;
  820. height: 24px;
  821. line-height: 24px;
  822. background: #00987b;
  823. border-radius: 4px;
  824. }
  825. }
  826. }
  827. }
  828. </style>