Commit e472b3c1 authored by wuhao's avatar wuhao 🎯

asder

parent 6d98989a
Pipeline #6590 passed with stages
in 8 minutes and 11 seconds
...@@ -239,6 +239,9 @@ function Checkhomework() { ...@@ -239,6 +239,9 @@ function Checkhomework() {
{ {
refreshDeps: [], refreshDeps: [],
onSuccess: (data, params) => { onSuccess: (data, params) => {
if (data?.code !== "0000") {
return;
}
setdatas((s) => ({ setdatas((s) => ({
...s, ...s,
tabs: data?.map((it) => ({ tabs: data?.map((it) => ({
...@@ -248,11 +251,12 @@ function Checkhomework() { ...@@ -248,11 +251,12 @@ function Checkhomework() {
})), })),
})); }));
if (dialogprops?.open) { if (dialogprops?.open) {
setdialogprops({ setdialogprops((s) => ({
...s,
open: true, open: true,
defaultFormValue: { ...data[0] }, defaultFormValue: { ...data[0] },
title: "批阅", title: "批阅",
}); }));
} }
formRefc?.current?.resetFields(); formRefc?.current?.resetFields();
...@@ -653,6 +657,14 @@ function Checkhomework() { ...@@ -653,6 +657,14 @@ function Checkhomework() {
title: "实验时长", title: "实验时长",
dataIndex: "useTime", dataIndex: "useTime",
key: "useTime", key: "useTime",
render: (text, record) => {
function secondsToMinutesAndSeconds(seconds) {
var minutes = Math.floor(seconds / 60);
var remainingSeconds = seconds % 60;
return minutes + " 分 " + remainingSeconds + " 秒";
}
return secondsToMinutesAndSeconds(record?.useTime);
},
}, },
{ {
title: "批阅状态", title: "批阅状态",
......
...@@ -210,17 +210,11 @@ function Dolessons() { ...@@ -210,17 +210,11 @@ function Dolessons() {
key: "deadline", key: "deadline",
formItemProps: { rules: [{ required: true, message: "此项为必填项" }] }, formItemProps: { rules: [{ required: true, message: "此项为必填项" }] },
}, },
{
title: "实验完成率",
dataIndex: "finishPer",
search: false,
key: "finishPer",
formItemProps: { rules: [{ required: true, message: "此项为必填项" }] },
},
]; ];
return col; return col;
}, []); }, []);
const items = [ const items = [
{ {
key: "1", key: "1",
......
...@@ -52,6 +52,16 @@ function Record() { ...@@ -52,6 +52,16 @@ function Record() {
title: "实验时长(分钟)", title: "实验时长(分钟)",
dataIndex: "testTime", dataIndex: "testTime",
key: "testTime", key: "testTime",
render: (text, record) => {
function secondsToMinutesAndSeconds(seconds) {
var minutes = Math.floor(seconds / 60);
var remainingSeconds = seconds % 60;
return minutes + " 分 " + remainingSeconds + " 秒";
}
return secondsToMinutesAndSeconds(record?.testTime);
},
}, },
{ title: "权重", dataIndex: "weight", key: "weight", hideInSearch: true }, { title: "权重", dataIndex: "weight", key: "weight", hideInSearch: true },
{ title: "分数", dataIndex: "scoreWeight", key: "scoreWeight" }, { title: "分数", dataIndex: "scoreWeight", key: "scoreWeight" },
...@@ -338,9 +348,7 @@ function Record() { ...@@ -338,9 +348,7 @@ function Record() {
marginBottom: 6, marginBottom: 6,
}} }}
> >
<span style={{ paddingRight: 12 }}> <span style={{ paddingRight: 12 }}>{it?.Name}</span>
{it?.Name}
</span>
{it?.PointList?.map((its) => ( {it?.PointList?.map((its) => (
<Tooltip <Tooltip
key={its?.id} key={its?.id}
......
...@@ -9,7 +9,16 @@ import { ProDescriptions } from "@ant-design/pro-components"; ...@@ -9,7 +9,16 @@ import { ProDescriptions } from "@ant-design/pro-components";
import { Box, Container, Stack, Typography } from "@mui/material"; import { Box, Container, Stack, Typography } from "@mui/material";
import { useParams } from "@umijs/max"; import { useParams } from "@umijs/max";
import { useAsyncEffect, useRequest } from "ahooks"; import { useAsyncEffect, useRequest } from "ahooks";
import { Divider, Drawer, message, Segmented, Table, Tabs, Tooltip,Tag } from "antd"; import {
Divider,
Drawer,
message,
Segmented,
Table,
Tabs,
Tag,
Tooltip,
} from "antd";
import { useEffect, useMemo, useRef, useState } from "react"; import { useEffect, useMemo, useRef, useState } from "react";
import { history } from "umi"; import { history } from "umi";
import "./index.less"; import "./index.less";
...@@ -42,6 +51,9 @@ function Dolessons() { ...@@ -42,6 +51,9 @@ function Dolessons() {
{ {
refreshDeps: [active], refreshDeps: [active],
onSuccess: (data, params) => { onSuccess: (data, params) => {
if(data?.code !== "0000"){
return;
}
setdatas((s) => ({ setdatas((s) => ({
...s, ...s,
tabs: data?.map((it) => ({ tabs: data?.map((it) => ({
...@@ -51,11 +63,12 @@ function Dolessons() { ...@@ -51,11 +63,12 @@ function Dolessons() {
})), })),
})); }));
if (dialogprops?.open) { if (dialogprops?.open) {
setdialogprops({ setdialogprops((s) => ({
...s,
open: true, open: true,
defaultFormValue: { ...data[0] }, defaultFormValue: { ...data[0] },
title: "批阅", title: "批阅",
}); }));
} }
formRefc?.current?.resetFields(); formRefc?.current?.resetFields();
...@@ -604,6 +617,14 @@ function Dolessons() { ...@@ -604,6 +617,14 @@ function Dolessons() {
title: "实验时长", title: "实验时长",
dataIndex: "useTime", dataIndex: "useTime",
key: "useTime", key: "useTime",
render: (text, record) => {
function secondsToMinutesAndSeconds(seconds) {
var minutes = Math.floor(seconds / 60);
var remainingSeconds = seconds % 60;
return minutes + " 分 " + remainingSeconds + " 秒";
}
return secondsToMinutesAndSeconds(record?.useTime);
},
}, },
{ {
title: "批阅状态", title: "批阅状态",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment