diff --git a/public/react/src/modules/courses/exercise/ExerciseDisplay.js b/public/react/src/modules/courses/exercise/ExerciseDisplay.js
index a0296476f..cbaf38c80 100644
--- a/public/react/src/modules/courses/exercise/ExerciseDisplay.js
+++ b/public/react/src/modules/courses/exercise/ExerciseDisplay.js
@@ -53,11 +53,15 @@ class ExerciseDisplay extends Component{
componentDidMount = () => {
const Id = this.props.match.params.Id
if (Id) {
- const url = `/exercises/${Id}.json`
+ const url = `/${this.props.urlPath || 'exercises'}/${Id}.json`
axios.get(url)
.then((response) => {
- if (response.data.status == 0) {
- this.setState({...response.data})
+ if (response.data.exercise) {
+ response.data.exercise.exercise_description = response.data.exercise.exercise_description || response.data.exercise.description
+ response.data.exercise.exercise_name = response.data.exercise.exercise_name || response.data.exercise.name
+ response.data.exercise.exercise_status = response.data.exercise.exercise_status == undefined ? 1 : response.data.exercise.exercise_status
+ this.setState({...response.data})
+ this.props.detailFetchCallback && this.props.detailFetchCallback(response);
}
})
.catch(function (error) {
diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js
index 2e80608c3..6d9c1838f 100644
--- a/public/react/src/modules/user/usersInfo/InfosTopics.js
+++ b/public/react/src/modules/user/usersInfo/InfosTopics.js
@@ -486,32 +486,36 @@ class InfosTopics extends Component{
{item.is_public===true?公开:""}
- {types==="personal"&&item.is_public===false?user_id===targetuserid&&user_type!="学生"?this.openTopics(item.id)}>设为公开:"":""}
+
-
- {types==="publicly"?{item.creator_name}:""}
+
+ {types==="publicly"?{item.creator_name}:""}
{item.quotes_count} 次引用
{item.solve_count} 次答题
{moment(item.updated_at).fromNow()}
- {item.course_list_name===null?"":{item.course_list_name}}
+ {item.course_list_name===null?"":
+ {item.course_list_name}
+ }
{types==="personal"?user_id===targetuserid&&user_type!="学生"?
编辑
:"":""}
+ {types==="personal"&&item.is_public===false?user_id===targetuserid&&user_type!="学生"?
this.openTopics(item.id)}>设为公开:"":""}
+
diff --git a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
index 916601420..6a303f62b 100644
--- a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
+++ b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
@@ -149,6 +149,13 @@ class BanksIndex extends Component{
/>)
}
}>
+ {
+ return ()
+ }
+ }>
import('./PollBanksContent'),
loading: Loading,
})
+// 试卷详情
+const ExerciseBanksDetail = Loadable({
+ loader: () => import('./ExerciseBanksDetail'),
+ loading: Loading,
+});
class BanksTabIndex extends Component{
constructor(props){
@@ -53,7 +58,13 @@ class BanksTabIndex extends Component{
>
}
-
+ {
+ return ()
+ }
+ }>
{
+
+ }
+ detailFetchCallback = (result) => {
+ let Id=this.props.match.params.Id;
+
+ const crumbData={
+ title: result.data.exercise && result.data.exercise.name,
+ is_public: result.data.exercise && result.data.exercise.is_public,
+ crumbArray:[
+ {content:'详情'},
+ ]
+ }
+ const menuData={
+ tab:'0',//tab选中的index
+ menuArray:[//tab以及tab路由
+ {to:`/banks/exercise/${Id}`,content:'内容详情'}
+ ],
+ category:'exercise',//
+ tos: `/banks/exercise/${Id}/edit`,
+ id: Id,
+
+ }
+ this.props.initPublic(crumbData,menuData);
+ }
+
+ render(){
+ let { pollDetail } = this.state
+
+ return(
+
+
+
+
+ )
+ }
+}
+export default ExerciseBanksDetail
diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
index 0d7d1a24a..7680dc748 100644
--- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js
+++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
@@ -126,7 +126,7 @@ class BanksMenu extends Component{
this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
- 编辑
+ 编辑
this.sendTopics()} style="blue" className="ml20 font-16">发送
diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css
index cf1d27019..927b0c70c 100644
--- a/public/react/src/modules/user/usersInfo/usersInfo.css
+++ b/public/react/src/modules/user/usersInfo/usersInfo.css
@@ -348,8 +348,8 @@
opacity: 1;
border-radius: 2px;
}
-.topicswidth400{
- width: 400px;
+.topicswidth600{
+ mac-width: 600px;
display: inline-block;
}
.topicswidth300{
@@ -366,13 +366,13 @@
.topscisright{
right: 0px;
- top: 50px;
+ top: 64px;
display: block;
position: absolute;
}
-.topsics100{
- width: 100px;
+.topsics135{
+ max-width: 135px;
display: inline-block;
}
@@ -405,4 +405,21 @@
.mb45{
margin-bottom: 45px!important;
+}
+
+.topsicsmax550{
+ max-width: 550px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ position: absolute;
+ top: -16px;
+}
+
+.topsicrelative{
+ position: relative;
+}
+
+.topsicinline{
+ display: inline-block;
}
\ No newline at end of file