2024年5月9日 修改页面样式
This commit is contained in:
parent
abaeb190d5
commit
44cce42a69
|
@ -1,7 +1,10 @@
|
||||||
|
import { h } from 'vue';
|
||||||
|
import { Input } from 'ant-design-vue';
|
||||||
import { BasicColumn } from '/@/components/Table';
|
import { BasicColumn } from '/@/components/Table';
|
||||||
import { FormSchema } from '/@/components/Table';
|
import { FormSchema } from '/@/components/Table';
|
||||||
import { rules } from '/@/utils/helper/validator';
|
import { rules } from '/@/utils/helper/validator';
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
|
||||||
//列表数据
|
//列表数据
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
|
@ -9,32 +12,42 @@ export const columns: BasicColumn[] = [
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'xnxq'
|
dataIndex: 'xnxq'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '授课日期',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'createTime'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '课程名称',
|
title: '课程名称',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'kcmc'
|
dataIndex: 'kcmc'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '节次',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: ['ketangbiaoInfo', 'hh']
|
||||||
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
title: '任务编号',
|
// title: '任务编号',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'rwbh'
|
// dataIndex: 'rwbh',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '课程编号',
|
// title: '课程编号',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'kcbh'
|
// dataIndex: 'kcbh'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '教室编号',
|
// title: '教室编号',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'jsbh'
|
// dataIndex: 'jsbh'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '检测url',
|
// title: '检测url',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'detectionUrl'
|
// dataIndex: 'detectionUrl'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '检测次数',
|
title: '检测次数',
|
||||||
align: "center",
|
align: "center",
|
||||||
|
@ -50,6 +63,32 @@ export const columns: BasicColumn[] = [
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'averageNum',
|
dataIndex: 'averageNum',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '选课人数',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: ['ketangbiaoInfo', 'xkrs'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '出勤率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'averageNum',
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
let { ketangbiaoInfo, averageNum } = record;
|
||||||
|
let { xkrs } = ketangbiaoInfo;
|
||||||
|
let xkrsNum = Number(xkrs);
|
||||||
|
if(!isNaN(xkrsNum) && xkrsNum != 0 && averageNum != 0) {
|
||||||
|
let num = averageNum / xkrsNum * 100;
|
||||||
|
return num.toFixed(2) + '%';
|
||||||
|
}else{
|
||||||
|
if(averageNum == 0){
|
||||||
|
return '0.00' + '%';
|
||||||
|
}else{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// title: 'A',
|
// title: 'A',
|
||||||
// align: "center",
|
// align: "center",
|
||||||
|
@ -65,13 +104,13 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
//表单数据
|
//表单数据
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
label: '任务编号',
|
label: '学年学期',
|
||||||
field: 'rwbh',
|
field: 'xnxq',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '课程编号',
|
label: '授课日期',
|
||||||
field: 'kcbh',
|
field: 'createTime',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -79,20 +118,38 @@ export const formSchema: FormSchema[] = [
|
||||||
field: 'kcmc',
|
field: 'kcmc',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '节次',
|
||||||
|
field: 'ketangbiaoInfo',
|
||||||
|
component: 'Input',
|
||||||
|
render: ({ values }) => {
|
||||||
|
let text = values?.ketangbiaoInfo?.hh;
|
||||||
|
return h(Input, { value: text, disabled: true });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '任务编号',
|
||||||
|
field: 'rwbh',
|
||||||
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '课程编号',
|
||||||
|
field: 'kcbh',
|
||||||
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '教室编号',
|
label: '教室编号',
|
||||||
field: 'jsbh',
|
field: 'jsbh',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
show: false,
|
||||||
{
|
|
||||||
label: '学年学期',
|
|
||||||
field: 'xnxq',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '检测url',
|
label: '检测url',
|
||||||
field: 'detectionUrl',
|
field: 'detectionUrl',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '检测次数',
|
label: '检测次数',
|
||||||
|
@ -109,6 +166,37 @@ export const formSchema: FormSchema[] = [
|
||||||
field: 'averageNum',
|
field: 'averageNum',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '选课人数',
|
||||||
|
field: 'xkrs',
|
||||||
|
component: "Input",
|
||||||
|
render: ({ values }) => {
|
||||||
|
let text = values?.ketangbiaoInfo?.xkrs;
|
||||||
|
return h(Input, { value: text, disabled: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '出勤率',
|
||||||
|
field: 'averageNum',
|
||||||
|
component: "Input",
|
||||||
|
render: ({ values }) => {
|
||||||
|
let text = '';
|
||||||
|
let { ketangbiaoInfo, averageNum } = values??{};
|
||||||
|
let { xkrs } = ketangbiaoInfo??{};
|
||||||
|
let xkrsNum = Number(xkrs);
|
||||||
|
if(!isNaN(xkrsNum) && xkrsNum != 0 && averageNum != 0) {
|
||||||
|
let num = averageNum / xkrsNum * 100;
|
||||||
|
text = num.toFixed(2) + '%';
|
||||||
|
}else{
|
||||||
|
if(averageNum == 0){
|
||||||
|
text ='0.00' + '%';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return h(Input, { value: text, disabled: true });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: '',
|
label: '',
|
||||||
field: 'detectionDetailedList',
|
field: 'detectionDetailedList',
|
||||||
|
@ -168,6 +256,11 @@ export const detectionDetailedListColumns: BasicColumn[] = [
|
||||||
// align: "center",
|
// align: "center",
|
||||||
// dataIndex: 'jsbh'
|
// dataIndex: 'jsbh'
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
title: '检测序号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'detectionNum'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '截取图片',
|
title: '截取图片',
|
||||||
align: "center",
|
align: "center",
|
||||||
|
@ -175,20 +268,21 @@ export const detectionDetailedListColumns: BasicColumn[] = [
|
||||||
slots: { customRender: 'imgSlot' },
|
slots: { customRender: 'imgSlot' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '检测序号',
|
title: '检测时间',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'detectionNum'
|
dataIndex: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '人数',
|
title: '人数',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'num'
|
dataIndex: 'num'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '人数计算结果',
|
// title: '人数计算结果',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'detectionOutImgRes'
|
// dataIndex: 'detectionOutImgRes'
|
||||||
}, // {
|
// },
|
||||||
|
// {
|
||||||
// title: 'A',
|
// title: 'A',
|
||||||
// align: "center",
|
// align: "center",
|
||||||
// dataIndex: ['ketangbiaoInfo', 'kcmc'],
|
// dataIndex: ['ketangbiaoInfo', 'kcmc'],
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<a-table :columns="detectionDetailedListColumns" :dataSource="values.detectionDetailedList" :pagination="false">
|
<a-table :columns="detectionDetailedListColumns" :dataSource="values.detectionDetailedList" :pagination="false">
|
||||||
<template #imgSlot="{ text, record }">
|
<template #imgSlot="{ text, record }">
|
||||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
|
<span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
|
||||||
<Image v-else :src="getImgView(text)" :preview="record.id" alt="" :width="50"/>
|
<Image v-else :src="getImgView(text)" :preview="record.id" alt="" :width="100"/>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue