Commit a2806bcd by yuananting

fix:解决合并代码的冲突

parents 93d2c143 961a5932
@font-face {
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_fvwdwtefte9.woff2?t=1628842764237') format('woff2'),
url('//at.alicdn.com/t/font_2223403_fvwdwtefte9.woff?t=1628842764237') format('woff'),
url('//at.alicdn.com/t/font_2223403_fvwdwtefte9.ttf?t=1628842764237') format('truetype');
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;
......
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: 吴文洁
* @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-13 16:19:45
* @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_fvwdwtefte9.css" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_2digpsfgq8l.css" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
......
......@@ -44,7 +44,8 @@ function DataCenter(props: any) {
res.result.trainingStageList.map((item: any) => {
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)
})
}
......
/*
* @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>
);
})}
......
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 { withRouter } from "react-router-dom";
import RichText from '@/components/RichText'
import ExpiredCourseList from '../../train-task/components/ExpiredCourseList';
import ENUM from '../../enum';
import './course.less'
......@@ -12,8 +13,15 @@ function CourseTable(props: any) {
setList(props.info.trainingStageList || [])
}, [props.info.trainingStageList])
return <div className="courseTabContent">
<div className="tips">{`培训目的:${'djkhdsjksdhdsj'}`}</div>
<div className="tips">
{`培训目的:`}
<RichText url={props.info?.intro?.mediaUrl} />
</div>
<div className="coursecontent">
{
......@@ -66,12 +74,12 @@ function CourseTable(props: any) {
</div>
<div className="expired">
<div className="title">失效课程</div>
<div className="list">
<ExpiredCourseList expiredCourseList={list} />
<ExpiredCourseList expiredCourseList={list} />
</div>
</div>
</div>
}
......
......@@ -10,7 +10,7 @@ function DataInfo(props: any) {
return <div className="infoBox">
<div className="left">
<div className="banner">
<img src={ props.info.cover|| defaultCover} alt="" />
<img src={ props.info.cover?.mediaUrl|| defaultCover} alt="" />
</div>
<div className="textBox">
<div className="nameBox">
......@@ -39,7 +39,7 @@ function DataInfo(props: any) {
</div>
<div className="right">
<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 className="num">
<div className="item"> {`指派人数:${props.info.cultureCustomerNum}`}</div>
......
......@@ -32,6 +32,8 @@ function ExamTable(props: any) {
{
title: '考试名称',
key: 'examName',
dataIndex: 'examName',
},
{
title: '完成人数',
......@@ -43,12 +45,20 @@ function ExamTable(props: any) {
title: '平均分',
key: 'averageScore',
dataIndex: 'averageScore',
render: (val: any, record: any) => {
return <div>{val || 0}</div>;
},
},
{
title: '及格人数',
key: 'passCnt',
dataIndex: 'passCnt',
render: (val: any, record: any) => {
return <div>{val || 0}</div>;
},
},
{
title: '及格率',
......@@ -56,7 +66,7 @@ function ExamTable(props: any) {
dataIndex: 'passPercentage',
render: (val: any, record: any) => {
return <div></div>;
return <div>{val}%</div>;
},
},
......
......@@ -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);
......
......@@ -14,7 +14,7 @@ const { Option } = Select;
declare var formatDate: any;
function StudyTable(props: any) {
console.log(props,'rtyjukl')
console.log(props, 'rtyjukl')
const [query, setQuery] = useState<any>({
current: 1, size: 10,
taskId: props.taskId,
......@@ -50,7 +50,12 @@ function StudyTable(props: any) {
key: 'storeCustomerName',
dataIndex: 'storeCustomerName',
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) {
},
{
title: '岗位',
key: 'learnState1',
dataIndex: 'learnState1',
key: 'postNameList',
dataIndex: 'postNameList',
},
{
......
......@@ -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);
}
......
.courseTabContent{
padding-bottom: 24px;
.tips{
height: 48px;
// height: 48px;
background: #F7F8F9;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
......
......@@ -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: '任务中心',
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