Commit 961a5932 by wufan

feat:完成考试详情页联调

parent 735a13ce
@font-face {
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_obblua8v3q.woff2?t=1628151518578') format('woff2'),
url('//at.alicdn.com/t/font_2223403_obblua8v3q.woff?t=1628151518578') format('woff'),
url('//at.alicdn.com/t/font_2223403_obblua8v3q.ttf?t=1628151518578') format('truetype');
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.woff2?t=1628853864698') format('woff2'),
url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.woff?t=1628853864698') format('woff'),
url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.ttf?t=1628853864698') format('truetype');
}
.iconfont {
font-family: 'iconfont' !important;
......
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-05-26 16:26:17
* @LastEditors: wufan
* @LastEditTime: 2021-08-13 19:25:12
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
......@@ -25,7 +25,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_oqqm4z9s35j.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_2digpsfgq8l.css">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
......
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors: yuananting
* @LastEditTime: 2021-08-11 15:06:32
* @LastEditors: wufan
* @LastEditTime: 2021-08-13 19:25:18
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
......@@ -29,7 +29,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_obblua8v3q.css" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_2digpsfgq8l.css" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
......
/*
* @Author: yuananting
* @Date: 2021-08-05 10:55:49
* @LastEditors: yuananting
* @LastEditTime: 2021-08-12 19:23:56
* @LastEditors: wufan
* @LastEditTime: 2021-08-13 17:10:58
* @Description: 个人学习详情
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
......@@ -69,7 +69,7 @@ function UserLearningData(props) {
{tabList.map((item) => {
return (
<TabPane tab={item.name} key={item.key}>
{<item.compoment detail={detail} />}
{<item.compoment detail={detail} taskId={taskId}/>}
</TabPane>
);
})}
......
......@@ -31,15 +31,9 @@ function LeftStageList(props) {
>
<div className="icon">
{item.isShowMoreCourse ? (
<img
src="https://image.xiaomaiketang.com/xm/YtihN8T7sT.png"
alt=""
/>
<span className="icon iconfont edit-icon">&#xe6b2;</span>
) : (
<img
src="https://image.xiaomaiketang.com/xm/RmG5tbhmep.png"
alt=""
/>
<span className="icon iconfont edit-icon">&#xe600;</span>
)}
</div>
<div className="stage-name">
......@@ -48,7 +42,7 @@ function LeftStageList(props) {
</div>
{!item.isShowMoreCourse && (
<div className="exam-list">
{item.courseVOList.map((examItem, examIdndex) => {
{item.contentVOList && item.contentVOList.map((examItem, examIdndex) => {
return (
<div
key={examIdndex}
......
......@@ -12,9 +12,12 @@
line-height: 44px;
margin-right: 8px;
cursor: pointer;
img {
width: 24px;
height: 24px;
.iconfont {
line-height: 15px;
font-size: 10px;
margin: 0 8px;
display: inline-block;
color: #666;
}
&.active {
background: rgba(41, 102, 255, 0.06);
......
......@@ -5,44 +5,37 @@ import TestDetailPage from "@/modules/teach-tool/examination-manager/TestDetailP
import { Route, withRouter } from "react-router-dom";
import Service from "@/common/js/service";
import LottieIcon from "@/components/LottieIcon";
import User from '@/common/js/user';
function TestLinkTaskData(props) {
const [stageExamList, setStageExamList] = useState([]);
const [activeExam, setActiveExam] = useState({});
const [activeStage, setActiveStage] = useState({});
const [isShow, setIsShow] = useState(true);
const {taskId, detail: {storeCustomerId}} = props;
useEffect(() => {
getTrainingTaskDetail();
}, []);
function getTrainingTaskDetail() {
Service.Hades("public/hades/getTaskCustomerDetail", {
taskId: "1412706381214687233",
storeId: "1192022572770412395",
storeCustomerId: "1384073988114677761",
// todolist 数据写死调接口
// taskId: props.match.params.taskId.replace(/\?.+/, ""),
// storeId: User.getStoreId(),
// storeCustomerId: User.getCustomerId(),
taskId: taskId,
storeId: User.getStoreId(),
storeCustomerId: storeCustomerId,
}).then((res) => {
const data = { ...res.result };
const { stageCustomerVOList = [] } = data;
if (!!stageCustomerVOList.length) {
setStageExamList(stageCustomerVOList);
setActiveStage(stageCustomerVOList[0]);
setActiveExam(stageCustomerVOList[0].courseVOList[0]);
const { contentId, paperId } = stageCustomerVOList[0].courseVOList[0];
const { stageExamCustomerVOList = [] } = data;
if (!!stageExamCustomerVOList.length) {
setStageExamList(stageExamCustomerVOList);
setActiveStage(stageExamCustomerVOList[0]);
setActiveExam(stageExamCustomerVOList[0].contentVOList[0]);
const { contentId, paperId } = stageExamCustomerVOList[0].contentVOList[0];
const { match } = props;
const path = `${match.url}/test-detail/1424698828831531009?paperId=1408034318353940481&userId=1351455073595023362&fromTrainingTask=true`;
const path = `${match.url}/test-detail/${contentId}?paperId=${paperId}1&userId=${storeCustomerId}&fromTrainingTask=true`;
window.RCHistory.replace(path);
}
// const { stageExamCustomerVOList = [] } = data;
// if (stageExamCustomerVOList.length) {
// setStageExamList(stageExamCustomerVOList);
// setActiveStage(stageExamCustomerVOList[0]);
// setActiveExam(stageExamCustomerVOList[0].courseVOList[0]);
// }
});
}
......@@ -52,13 +45,10 @@ function TestLinkTaskData(props) {
setActiveStage(_activeStage);
const { contentId, paperId } = _activeExam;
const { match } = props;
const path = `${match.url}/test-detail/1424698828831531009?paperId=1408034318353940481&userId=1351455073595023362&fromTrainingTask=true`;
const path = `${
match.url
}/test-detail/${contentId}?paperId=${paperId}&userId=${111}`;
window.RCHistory.replace(path);
// window.RCHistory.push({
// pathname: `${
// props.match.url
// }/test-detail/${contentId}?paperId=${paperId}&userId=${111}`,
// });
}
function toggleShowBar(diretion) {
......@@ -97,10 +87,19 @@ function TestLinkTaskData(props) {
/>
</div>
<div className={`right-exam-data-box ${!isShow ? 'hidden':''}`}>
{/* 未考过的考试显示暂无考试数据,否则请求接口会报错 */}
{
activeExam.learnFinishPercentage === 0 ?
<LottieIcon
title={<span className="desc">暂无考试数据</span>}
type="college"
size={150}
/> :
<Route
path={`${props.match.url}/test-detail/:testId`}
component={TestDetailPage}
/>
path={`${props.match.url}/test-detail/:testId`}
component={TestDetailPage}
/>
}
</div>
</div>
) : (
......
......@@ -100,6 +100,14 @@
overflow-y: auto;
margin-top: -16px;
overflow-x: hidden;
@media screen and (max-width: 1400px) {
.lottie-icon {
text-align: center;
margin-top: 153px;
margin-bottom: 50px;
}
}
&.hidden {
width: calc(100vw - 200px);
}
......
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