From ab211b4b745d2d16b60d19b9b527ec0cb8563fcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Thu, 26 Sep 2019 15:20:32 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=AF=95=E8=AE=BE=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 20 +++---
.../modules/courses/boards/BoardsListItem.js | 6 +-
.../courses/busyWork/CommonWorkItem.js | 10 ++-
.../graduation/topics/GraduateTopicItem.js | 6 +-
.../react/src/modules/moop_cases/CaseNew.js | 28 ++++++--
.../react/src/modules/moop_cases/CaseTags.js | 71 ++++++++++---------
.../src/modules/moop_cases/css/moopCases.css | 8 ++-
7 files changed, 90 insertions(+), 59 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 025db7f5c..f6598a3c4 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -21,16 +21,16 @@ let hashTimeout
// TODO 开发期多个身份切换
let debugType =""
-if (isDev) {
- const _search = window.location.search;
- let parsed = {};
- if (_search) {
- parsed = queryString.parse(_search);
- }
- debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
- window.location.search.indexOf('debug=s') != -1 ? 'student' :
- window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
-}
+// if (isDev) {
+// const _search = window.location.search;
+// let parsed = {};
+// if (_search) {
+// parsed = queryString.parse(_search);
+// }
+// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
+// window.location.search.indexOf('debug=s') != -1 ? 'student' :
+// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
+// }
window._debugType = debugType;
export function initAxiosInterceptors(props) {
diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js
index a833f4c39..e27e7ad65 100644
--- a/public/react/src/modules/courses/boards/BoardsListItem.js
+++ b/public/react/src/modules/courses/boards/BoardsListItem.js
@@ -63,10 +63,10 @@ class BoardsListItem extends Component{
onItemClick(discussMessage)}>
40 ? discussMessage.subject : ''}`} placement="bottom">
- {discussMessage.subject}: {} : () => this.onTitleClick(discussMessage)}
- >{discussMessage.subject}
+ >{discussMessage.subject}}
{ !!discussMessage.sticky && 置顶 }
{
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js
index 0aebad415..c51606e35 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js
@@ -144,6 +144,9 @@ class CommonWorkItem extends Component{
text-overflow: ellipsis;
white-space: nowrap;
}
+ a:hover{
+ color: #4cacff;
+ }
`
}
@@ -158,12 +161,15 @@ class CommonWorkItem extends Component{
mainList && isAdmin &&
}
+
this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
-
+ {item.name}
+ : {} : () => this.onItemClick(item)}
- >{item.name}
+ >{item.name}}
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
{
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
index 2027cfb3a..afef56e1b 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
@@ -83,12 +83,16 @@ class GraduateTopicItem extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
+ a:hover{
+ color: #4cacff;
+ }
`}
{
isNotMember?
- {discussMessage.name}
+ {discussMessage.private_icon===true?{discussMessage.name}:
+ {discussMessage.name}}
:""
}
diff --git a/public/react/src/modules/moop_cases/CaseNew.js b/public/react/src/modules/moop_cases/CaseNew.js
index 2fbe993bc..925536a1a 100644
--- a/public/react/src/modules/moop_cases/CaseNew.js
+++ b/public/react/src/modules/moop_cases/CaseNew.js
@@ -41,7 +41,8 @@ class CaseNew extends Component{
loading: false,
checkTag:false,
checkFile:false,
- coverID:undefined
+ coverID:undefined,
+ library_tags:undefined
}
}
@@ -132,6 +133,17 @@ class CaseNew extends Component{
if(this.props.match.params.caseID){
this.InitEditData();
}
+ let url=`/library_tags.json`;
+ axios.get(url).then((result) => {
+ console.log(result)
+ if(result.data.status===0){
+ this.setState({
+ library_tags:result.data.library_tags
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
}
componentDidUpdate=(prevState)=>{
@@ -263,7 +275,7 @@ class CaseNew extends Component{
render(){
let { caseID } = this.props.match.params;
let { CaseDetail } = this.props;
- let { casesTags , contentFileList , imageUrl , checkTag , checkFile } = this.state;
+ let { casesTags , contentFileList , imageUrl , checkTag , checkFile,library_tags } = this.state;
const {getFieldDecorator} = this.props.form;
@@ -301,8 +313,8 @@ class CaseNew extends Component{
action:`${getUploadActionUrl()}`,
onChange:this.handleChange,
}
- console.log('111');
- console.log(!caseID || (CaseDetail && CaseDetail.status == "pending"));
+ // console.log('111');
+ // console.log(!caseID || (CaseDetail && CaseDetail.status == "pending"));
return(