Commit a2806bcd by yuananting

fix:解决合并代码的冲突

parents 93d2c143 961a5932
@font-face { @font-face {
font-family: 'iconfont'; /* Project id 2223403 */ font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_fvwdwtefte9.woff2?t=1628842764237') format('woff2'), src: url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.woff2?t=1628853864698') format('woff2'),
url('//at.alicdn.com/t/font_2223403_fvwdwtefte9.woff?t=1628842764237') format('woff'), url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.woff?t=1628853864698') format('woff'),
url('//at.alicdn.com/t/font_2223403_fvwdwtefte9.ttf?t=1628842764237') format('truetype'); url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.ttf?t=1628853864698') format('truetype');
} }
.iconfont { .iconfont {
font-family: 'iconfont' !important; font-family: 'iconfont' !important;
......
import React, { useState, useEffect } from 'react';
export default function RichText(props) {
const [text, setText] = useState('')
useEffect(() => {
console.log(props.url,'props.urlprops.url')
if (props.url) {
fetch(props.url, { method: 'GET' }).then((response) => {
return response.text();
}).then((res) => {
setText(res)
})
}
}, [props.url])
return <div className="text" style={{ wordBreak: 'break-all' }} dangerouslySetInnerHTML={{ __html: text }}></div>
}
\ No newline at end of file
<!-- <!--
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-24 12:20:57 * @Date: 2020-08-24 12:20:57
* @LastEditors: Please set LastEditors * @LastEditors: wufan
* @LastEditTime: 2021-05-26 16:26:17 * @LastEditTime: 2021-08-13 19:25:12
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
--> -->
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ 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="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. Notice the use of %PUBLIC_URL% in the tags above.
......
<!-- <!--
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-24 12:20:57 * @Date: 2020-08-24 12:20:57
* @LastEditors: yuananting * @LastEditors: wufan
* @LastEditTime: 2021-08-13 16:19:45 * @LastEditTime: 2021-08-13 19:25:18
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
--> -->
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ 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="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_fvwdwtefte9.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_2digpsfgq8l.css" />
<!-- <!--
Notice the use of %PUBLIC_URL% in the tags above. Notice the use of %PUBLIC_URL% in the tags above.
......
...@@ -44,7 +44,8 @@ function DataCenter(props: any) { ...@@ -44,7 +44,8 @@ function DataCenter(props: any) {
res.result.trainingStageList.map((item: any) => { res.result.trainingStageList.map((item: any) => {
item.open = true item.open = true
}) })
res.result.cover =res.result.courseMediaVOS.filter((item:any) => item.contentType === 'COVER')[0] res.result.cover =res.result.courseMediaVOS.filter((item:any) => item.contentType === 'COVER')[0] || {};
res.result.intro =res.result.courseMediaVOS.filter((item:any) => item.contentType === 'INTRO')[0] || {};
setInfo(res.result) setInfo(res.result)
}) })
} }
......
/* /*
* @Author: yuananting * @Author: yuananting
* @Date: 2021-08-05 10:55:49 * @Date: 2021-08-05 10:55:49
* @LastEditors: yuananting * @LastEditors: wufan
* @LastEditTime: 2021-08-12 19:23:56 * @LastEditTime: 2021-08-13 17:10:58
* @Description: 个人学习详情 * @Description: 个人学习详情
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -69,7 +69,7 @@ function UserLearningData(props) { ...@@ -69,7 +69,7 @@ function UserLearningData(props) {
{tabList.map((item) => { {tabList.map((item) => {
return ( return (
<TabPane tab={item.name} key={item.key}> <TabPane tab={item.name} key={item.key}>
{<item.compoment detail={detail} />} {<item.compoment detail={detail} taskId={taskId}/>}
</TabPane> </TabPane>
); );
})} })}
......
import React, { useEffect, useState } from 'react';
import { withRouter } from "react-router-dom";
function DataInfo(props: any) {
return <div className="info_banner">
</div>
}
export default withRouter(DataInfo)
\ No newline at end of file
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { withRouter } from "react-router-dom"; import { withRouter } from "react-router-dom";
import RichText from '@/components/RichText'
import ExpiredCourseList from '../../train-task/components/ExpiredCourseList'; import ExpiredCourseList from '../../train-task/components/ExpiredCourseList';
import ENUM from '../../enum'; import ENUM from '../../enum';
import './course.less' import './course.less'
...@@ -12,8 +13,15 @@ function CourseTable(props: any) { ...@@ -12,8 +13,15 @@ function CourseTable(props: any) {
setList(props.info.trainingStageList || []) setList(props.info.trainingStageList || [])
}, [props.info.trainingStageList]) }, [props.info.trainingStageList])
return <div className="courseTabContent"> return <div className="courseTabContent">
<div className="tips">{`培训目的:${'djkhdsjksdhdsj'}`}</div> <div className="tips">
{`培训目的:`}
<RichText url={props.info?.intro?.mediaUrl} />
</div>
<div className="coursecontent"> <div className="coursecontent">
{ {
......
...@@ -10,7 +10,7 @@ function DataInfo(props: any) { ...@@ -10,7 +10,7 @@ function DataInfo(props: any) {
return <div className="infoBox"> return <div className="infoBox">
<div className="left"> <div className="left">
<div className="banner"> <div className="banner">
<img src={ props.info.cover|| defaultCover} alt="" /> <img src={ props.info.cover?.mediaUrl|| defaultCover} alt="" />
</div> </div>
<div className="textBox"> <div className="textBox">
<div className="nameBox"> <div className="nameBox">
...@@ -39,7 +39,7 @@ function DataInfo(props: any) { ...@@ -39,7 +39,7 @@ function DataInfo(props: any) {
</div> </div>
<div className="right"> <div className="right">
<div className="prog"> <div className="prog">
<Progress type="circle" width={85} percent={75} strokeWidth={10} format={percent => <div className='wcl'>{`${(parseInt(props.info.finishCustomerNum /(props.info.cultureCustomerNum)*100 as any))}% `} <div>完成率</div></div>} /> <Progress type="circle" width={85} percent={parseInt(props.info.finishCustomerNum /(props.info.cultureCustomerNum)*100 as any)} strokeWidth={10} format={percent => <div className='wcl'>{`${(parseInt(props.info.finishCustomerNum /(props.info.cultureCustomerNum)*100 as any))}% `} <div>完成率</div></div>} />
</div> </div>
<div className="num"> <div className="num">
<div className="item"> {`指派人数:${props.info.cultureCustomerNum}`}</div> <div className="item"> {`指派人数:${props.info.cultureCustomerNum}`}</div>
......
...@@ -32,6 +32,8 @@ function ExamTable(props: any) { ...@@ -32,6 +32,8 @@ function ExamTable(props: any) {
{ {
title: '考试名称', title: '考试名称',
key: 'examName', key: 'examName',
dataIndex: 'examName',
}, },
{ {
title: '完成人数', title: '完成人数',
...@@ -43,12 +45,20 @@ function ExamTable(props: any) { ...@@ -43,12 +45,20 @@ function ExamTable(props: any) {
title: '平均分', title: '平均分',
key: 'averageScore', key: 'averageScore',
dataIndex: 'averageScore', dataIndex: 'averageScore',
render: (val: any, record: any) => {
return <div>{val || 0}</div>;
},
}, },
{ {
title: '及格人数', title: '及格人数',
key: 'passCnt', key: 'passCnt',
dataIndex: 'passCnt', dataIndex: 'passCnt',
render: (val: any, record: any) => {
return <div>{val || 0}</div>;
},
}, },
{ {
title: '及格率', title: '及格率',
...@@ -56,7 +66,7 @@ function ExamTable(props: any) { ...@@ -56,7 +66,7 @@ function ExamTable(props: any) {
dataIndex: 'passPercentage', dataIndex: 'passPercentage',
render: (val: any, record: any) => { render: (val: any, record: any) => {
return <div></div>; return <div>{val}%</div>;
}, },
}, },
......
...@@ -31,15 +31,9 @@ function LeftStageList(props) { ...@@ -31,15 +31,9 @@ function LeftStageList(props) {
> >
<div className="icon"> <div className="icon">
{item.isShowMoreCourse ? ( {item.isShowMoreCourse ? (
<img <span className="icon iconfont edit-icon">&#xe6b2;</span>
src="https://image.xiaomaiketang.com/xm/YtihN8T7sT.png"
alt=""
/>
) : ( ) : (
<img <span className="icon iconfont edit-icon">&#xe600;</span>
src="https://image.xiaomaiketang.com/xm/RmG5tbhmep.png"
alt=""
/>
)} )}
</div> </div>
<div className="stage-name"> <div className="stage-name">
...@@ -48,7 +42,7 @@ function LeftStageList(props) { ...@@ -48,7 +42,7 @@ function LeftStageList(props) {
</div> </div>
{!item.isShowMoreCourse && ( {!item.isShowMoreCourse && (
<div className="exam-list"> <div className="exam-list">
{item.courseVOList.map((examItem, examIdndex) => { {item.contentVOList && item.contentVOList.map((examItem, examIdndex) => {
return ( return (
<div <div
key={examIdndex} key={examIdndex}
......
...@@ -12,9 +12,12 @@ ...@@ -12,9 +12,12 @@
line-height: 44px; line-height: 44px;
margin-right: 8px; margin-right: 8px;
cursor: pointer; cursor: pointer;
img { .iconfont {
width: 24px; line-height: 15px;
height: 24px; font-size: 10px;
margin: 0 8px;
display: inline-block;
color: #666;
} }
&.active { &.active {
background: rgba(41, 102, 255, 0.06); background: rgba(41, 102, 255, 0.06);
......
...@@ -14,7 +14,7 @@ const { Option } = Select; ...@@ -14,7 +14,7 @@ const { Option } = Select;
declare var formatDate: any; declare var formatDate: any;
function StudyTable(props: any) { function StudyTable(props: any) {
console.log(props,'rtyjukl') console.log(props, 'rtyjukl')
const [query, setQuery] = useState<any>({ const [query, setQuery] = useState<any>({
current: 1, size: 10, current: 1, size: 10,
taskId: props.taskId, taskId: props.taskId,
...@@ -50,7 +50,12 @@ function StudyTable(props: any) { ...@@ -50,7 +50,12 @@ function StudyTable(props: any) {
key: 'storeCustomerName', key: 'storeCustomerName',
dataIndex: 'storeCustomerName', dataIndex: 'storeCustomerName',
render: (val: any, record: any) => { render: (val: any, record: any) => {
return <div>{val}</div>; return <div>{val}
<span
className="tag"
style={{ color: record.sourceEnum === 'WORK_WE_CHAT' ? '#2966FF' : '#1DCC65' }}
>{record.sourceEnum === 'WORK_WE_CHAT' ? '@企业微信' : '@微信'}</span>
</div>;
}, },
}, },
{ {
...@@ -65,8 +70,8 @@ function StudyTable(props: any) { ...@@ -65,8 +70,8 @@ function StudyTable(props: any) {
}, },
{ {
title: '岗位', title: '岗位',
key: 'learnState1', key: 'postNameList',
dataIndex: 'learnState1', dataIndex: 'postNameList',
}, },
{ {
......
...@@ -5,44 +5,37 @@ import TestDetailPage from "@/modules/teach-tool/examination-manager/TestDetailP ...@@ -5,44 +5,37 @@ import TestDetailPage from "@/modules/teach-tool/examination-manager/TestDetailP
import { Route, withRouter } from "react-router-dom"; import { Route, withRouter } from "react-router-dom";
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import LottieIcon from "@/components/LottieIcon"; import LottieIcon from "@/components/LottieIcon";
import User from '@/common/js/user';
function TestLinkTaskData(props) { function TestLinkTaskData(props) {
const [stageExamList, setStageExamList] = useState([]); const [stageExamList, setStageExamList] = useState([]);
const [activeExam, setActiveExam] = useState({}); const [activeExam, setActiveExam] = useState({});
const [activeStage, setActiveStage] = useState({}); const [activeStage, setActiveStage] = useState({});
const [isShow, setIsShow] = useState(true); const [isShow, setIsShow] = useState(true);
const {taskId, detail: {storeCustomerId}} = props;
useEffect(() => { useEffect(() => {
getTrainingTaskDetail(); getTrainingTaskDetail();
}, []); }, []);
function getTrainingTaskDetail() { function getTrainingTaskDetail() {
Service.Hades("public/hades/getTaskCustomerDetail", { Service.Hades("public/hades/getTaskCustomerDetail", {
taskId: "1412706381214687233", taskId: taskId,
storeId: "1192022572770412395", storeId: User.getStoreId(),
storeCustomerId: "1384073988114677761", storeCustomerId: storeCustomerId,
// todolist 数据写死调接口
// taskId: props.match.params.taskId.replace(/\?.+/, ""),
// storeId: User.getStoreId(),
// storeCustomerId: User.getCustomerId(),
}).then((res) => { }).then((res) => {
const data = { ...res.result }; const data = { ...res.result };
const { stageCustomerVOList = [] } = data; const { stageExamCustomerVOList = [] } = data;
if (!!stageCustomerVOList.length) { if (!!stageExamCustomerVOList.length) {
setStageExamList(stageCustomerVOList); setStageExamList(stageExamCustomerVOList);
setActiveStage(stageCustomerVOList[0]); setActiveStage(stageExamCustomerVOList[0]);
setActiveExam(stageCustomerVOList[0].courseVOList[0]); setActiveExam(stageExamCustomerVOList[0].contentVOList[0]);
const { contentId, paperId } = stageCustomerVOList[0].courseVOList[0]; const { contentId, paperId } = stageExamCustomerVOList[0].contentVOList[0];
const { match } = props; 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); 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) { ...@@ -52,13 +45,10 @@ function TestLinkTaskData(props) {
setActiveStage(_activeStage); setActiveStage(_activeStage);
const { contentId, paperId } = _activeExam; const { contentId, paperId } = _activeExam;
const { match } = props; 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.replace(path);
// window.RCHistory.push({
// pathname: `${
// props.match.url
// }/test-detail/${contentId}?paperId=${paperId}&userId=${111}`,
// });
} }
function toggleShowBar(diretion) { function toggleShowBar(diretion) {
...@@ -97,10 +87,19 @@ function TestLinkTaskData(props) { ...@@ -97,10 +87,19 @@ function TestLinkTaskData(props) {
/> />
</div> </div>
<div className={`right-exam-data-box ${!isShow ? 'hidden':''}`}> <div className={`right-exam-data-box ${!isShow ? 'hidden':''}`}>
{/* 未考过的考试显示暂无考试数据,否则请求接口会报错 */}
{
activeExam.learnFinishPercentage === 0 ?
<LottieIcon
title={<span className="desc">暂无考试数据</span>}
type="college"
size={150}
/> :
<Route <Route
path={`${props.match.url}/test-detail/:testId`} path={`${props.match.url}/test-detail/:testId`}
component={TestDetailPage} component={TestDetailPage}
/> />
}
</div> </div>
</div> </div>
) : ( ) : (
......
...@@ -100,6 +100,14 @@ ...@@ -100,6 +100,14 @@
overflow-y: auto; overflow-y: auto;
margin-top: -16px; margin-top: -16px;
overflow-x: hidden; overflow-x: hidden;
@media screen and (max-width: 1400px) {
.lottie-icon {
text-align: center;
margin-top: 153px;
margin-bottom: 50px;
}
}
&.hidden { &.hidden {
width: calc(100vw - 200px); width: calc(100vw - 200px);
} }
......
.courseTabContent{ .courseTabContent{
padding-bottom: 24px; padding-bottom: 24px;
.tips{ .tips{
height: 48px; // height: 48px;
background: #F7F8F9; background: #F7F8F9;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
......
...@@ -44,20 +44,7 @@ export const menuList: any = [ ...@@ -44,20 +44,7 @@ export const menuList: any = [
}, },
], ],
}, },
{
groupName: '培训管理',
groupCode: 'TrainManage',
icon: '&#xe8a6;',
img: 'https://image.xiaomaiketang.com/xm/Yy6pZ6G6kS.png',
selectImg: 'https://image.xiaomaiketang.com/xm/Z8G6NMQhaH.png',
children: [
{
groupName: '培训计划',
groupCode: 'TrainPlan',
link: '/plan',
},
],
},
{ {
groupName: '任务中心', groupName: '任务中心',
groupCode: 'TrainManage', groupCode: 'TrainManage',
......
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