|
@@ -3,15 +3,10 @@
|
|
|
<base-form size="small" :model="model" :items="items"></base-form>
|
|
|
<div class="total-progress-info">
|
|
|
<div class="p-t-base p-b-extra-small table-title">整体进度</div>
|
|
|
- <div
|
|
|
- v-if="canLoadTopChart"
|
|
|
- class="p-t-small p-b-extra-small overflow-hidden chart-info"
|
|
|
- :style="{ height: topChartHeight + 'px' }"
|
|
|
- >
|
|
|
- <vue-e-charts class="full" :option="totalChartsOption" autoresize></vue-e-charts>
|
|
|
- </div>
|
|
|
- <div class="m-t-base">
|
|
|
+
|
|
|
+ <div class="flex m-t-base">
|
|
|
<base-table
|
|
|
+ class="left-table"
|
|
|
border
|
|
|
stripe
|
|
|
size="small"
|
|
@@ -22,6 +17,13 @@
|
|
|
>
|
|
|
<template #empty>暂无数据</template>
|
|
|
</base-table>
|
|
|
+ <div
|
|
|
+ v-if="canLoadTopChart"
|
|
|
+ class="p-b-extra-small overflow-hidden chart-info flex-1"
|
|
|
+ :style="{ height: topChartHeight + 'px' }"
|
|
|
+ >
|
|
|
+ <vue-e-charts class="full" :option="totalChartsOption" autoresize></vue-e-charts>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -103,12 +105,14 @@ const totalColumns: EpTableColumn<TotalProgress>[] = [
|
|
|
{
|
|
|
label: '大题',
|
|
|
formatter: getMainName,
|
|
|
+ fixed: 'left',
|
|
|
},
|
|
|
- { label: '试卷总量', prop: 'totalPaper', align: 'center', sortable: true },
|
|
|
- { label: '已完成', prop: 'finishCount', align: 'center', sortable: true },
|
|
|
+ { label: '试卷总量', prop: 'totalPaper', align: 'center', sortable: true, minWidth: 95 },
|
|
|
+ { label: '已完成', prop: 'finishCount', align: 'center', sortable: true, minWidth: 80 },
|
|
|
{
|
|
|
label: '完成比',
|
|
|
align: 'center',
|
|
|
+ minWidth: 80,
|
|
|
formatter(row) {
|
|
|
return `${row.finishRate}%`
|
|
|
},
|
|
@@ -117,6 +121,7 @@ const totalColumns: EpTableColumn<TotalProgress>[] = [
|
|
|
{
|
|
|
label: '待完成',
|
|
|
align: 'center',
|
|
|
+ minWidth: 80,
|
|
|
formatter(row) {
|
|
|
return `${minus(row.totalPaper, row.finishCount)}`
|
|
|
},
|
|
@@ -125,6 +130,7 @@ const totalColumns: EpTableColumn<TotalProgress>[] = [
|
|
|
{
|
|
|
label: '待完成比',
|
|
|
align: 'center',
|
|
|
+ minWidth: 95,
|
|
|
formatter(row) {
|
|
|
return `${minus(100, row.finishRate)}%`
|
|
|
},
|
|
@@ -133,6 +139,7 @@ const totalColumns: EpTableColumn<TotalProgress>[] = [
|
|
|
{
|
|
|
label: '预计耗时(分)',
|
|
|
align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
formatter(row) {
|
|
|
return `${parseFloat((row.takeTime / 60).toFixed(2))}`
|
|
|
},
|
|
@@ -153,7 +160,7 @@ const totalProgressData = computed(() => {
|
|
|
})
|
|
|
|
|
|
const topChartHeight = computed(() => {
|
|
|
- return ((markProgressResult.value as any) || []).length * 80 + 1
|
|
|
+ return ((markProgressResult.value as any) || []).length * 44 + 60
|
|
|
})
|
|
|
watch(
|
|
|
() => topChartHeight.value,
|
|
@@ -200,8 +207,20 @@ const getYAxisData = (field: keyof TotalProgress | 'name', data?: TotalProgress[
|
|
|
|
|
|
const totalChartsOption = computed<EChartsOption>(() => {
|
|
|
return {
|
|
|
+ tooltip: {
|
|
|
+ show: true,
|
|
|
+ trigger: 'item',
|
|
|
+ formatter(params: any) {
|
|
|
+ let prev = params.seriesName + '<br />' + params.name + ': ' + params.value
|
|
|
+ if (params.seriesName === '完成比') {
|
|
|
+ return prev + '%'
|
|
|
+ } else {
|
|
|
+ return prev
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
grid: {
|
|
|
- top: 20,
|
|
|
+ top: 26,
|
|
|
bottom: -20,
|
|
|
left: 20,
|
|
|
right: 30,
|
|
@@ -209,6 +228,7 @@ const totalChartsOption = computed<EChartsOption>(() => {
|
|
|
},
|
|
|
legend: {
|
|
|
right: 0,
|
|
|
+ top: 0,
|
|
|
itemWidth: 14,
|
|
|
data: ['试卷总量', '已完成', '完成比'],
|
|
|
},
|
|
@@ -246,7 +266,7 @@ const totalChartsOption = computed<EChartsOption>(() => {
|
|
|
barWidth: 11,
|
|
|
barGap: '-200%',
|
|
|
itemStyle: {
|
|
|
- color: '#3AD500',
|
|
|
+ color: '#0064FF',
|
|
|
},
|
|
|
data: getYAxisData('totalPaper', markProgressResult?.value),
|
|
|
},
|
|
@@ -256,14 +276,15 @@ const totalChartsOption = computed<EChartsOption>(() => {
|
|
|
barWidth: 11,
|
|
|
barGap: '-200%',
|
|
|
itemStyle: {
|
|
|
- color: '#0064FF',
|
|
|
+ color: '#3AD500',
|
|
|
},
|
|
|
data: getYAxisData('finishCount', markProgressResult?.value),
|
|
|
},
|
|
|
{
|
|
|
name: '完成比',
|
|
|
type: 'bar',
|
|
|
- barWidth: 44,
|
|
|
+ // barWidth: 44,
|
|
|
+ barWidth: 11,
|
|
|
barGap: '-200%',
|
|
|
showBackground: true,
|
|
|
xAxisIndex: 1,
|
|
@@ -380,7 +401,7 @@ const groupChartsOption = computed<EChartsOption>(() => {
|
|
|
type: 'bar',
|
|
|
barWidth: 20,
|
|
|
itemStyle: {
|
|
|
- color: '#3AD500',
|
|
|
+ color: '#0064FF',
|
|
|
},
|
|
|
data: getXAxisData('finishCount', groupProgressResult?.value),
|
|
|
},
|
|
@@ -389,7 +410,7 @@ const groupChartsOption = computed<EChartsOption>(() => {
|
|
|
type: 'bar',
|
|
|
barWidth: 20,
|
|
|
itemStyle: {
|
|
|
- color: '#0064FF',
|
|
|
+ color: '#3AD500',
|
|
|
},
|
|
|
data: getXAxisData('dayFinishCount', groupProgressResult?.value),
|
|
|
},
|
|
@@ -412,7 +433,11 @@ const groupChartsOption = computed<EChartsOption>(() => {
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
.total-progress-box {
|
|
|
- // height: 323px;
|
|
|
+ height: 323px;
|
|
|
+ .left-table {
|
|
|
+ width: 50%;
|
|
|
+ // flex: 1;
|
|
|
+ }
|
|
|
.total-progress-info {
|
|
|
border-top: $OnePixelLine;
|
|
|
// height: 253px;
|