diff --git a/public/react/package.json b/public/react/package.json index 21f37b76e..b56332a2d 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -6,7 +6,7 @@ "@flatten/array": "^1.1.7", "@icedesign/base": "^0.2.5", "@novnc/novnc": "^1.1.0", - "antd": "^3.6.5", + "antd": "^3.20.1", "array-flatten": "^2.1.2", "autoprefixer": "7.1.6", "axios": "^0.18.0", @@ -63,13 +63,13 @@ "rc-select": "^8.0.12", "rc-tree": "^1.7.11", "rc-upload": "^2.5.1", - "react": "^16.3.0", + "react": "^16.8.0", "react-beautiful-dnd": "^10.0.4", "react-codemirror": "^1.0.0", "react-codemirror2": "^6.0.0", "react-content-loader": "^3.1.1", "react-dev-utils": "^5.0.0", - "react-dom": "^16.3.0-alpha.2", + "react-dom": "^16.8.0", "react-hot-loader": "^4.0.0", "react-infinite-scroller": "^1.2.4", "react-loadable": "^5.3.1", diff --git a/public/react/src/App.js b/public/react/src/App.js index f7530989e..dfb8c89d0 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -258,7 +258,7 @@ class App extends Component { - + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 2100ebe8d..335ab80fa 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -18,7 +18,7 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/index.js b/public/react/src/index.js index 849f3faed..cb8cb4f94 100644 --- a/public/react/src/index.js +++ b/public/react/src/index.js @@ -1,46 +1,46 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; - -import './index.css'; -import './indexPlus.css'; -import App from './App'; - -// 加之前main.js 18.1MB -// import { message } from 'antd'; -import message from 'antd/lib/message'; -import 'antd/lib/message/style/css'; - -import { AppContainer } from 'react-hot-loader'; - -import registerServiceWorker from './registerServiceWorker'; - -import { configureUrlQuery } from 'react-url-query'; - -import history from './history'; - -// link the history used in our app to url-query so it can update the URL with it. -configureUrlQuery({ history }); -// ----------------------------------------------------------------------------------- 请求配置 - -window.__useKindEditor = false; - - -const render = (Component) => { - ReactDOM.render( - - - , - document.getElementById('root') - ); -} - - -// ReactDOM.render( -// , -// document.getElementById('root')); -// registerServiceWorker(); - -render(App); -if (module.hot) { - module.hot.accept('./App', () => { render(App) }); -} +import React from 'react'; +import ReactDOM from 'react-dom'; + +import './index.css'; +import './indexPlus.css'; +import App from './App'; + +// 加之前main.js 18.1MB +// import { message } from 'antd'; +import message from 'antd/lib/message'; +import 'antd/lib/message/style/css'; + +import { AppContainer } from 'react-hot-loader'; + +import registerServiceWorker from './registerServiceWorker'; + +import { configureUrlQuery } from 'react-url-query'; + +import history from './history'; + +// link the history used in our app to url-query so it can update the URL with it. +configureUrlQuery({ history }); +// ----------------------------------------------------------------------------------- 请求配置 + +window.__useKindEditor = false; + + +const render = (Component) => { + ReactDOM.render( + + + , + document.getElementById('root') + ); +} + + +// ReactDOM.render( +// , +// document.getElementById('root')); +// registerServiceWorker(); + +render(App); +if (module.hot) { + module.hot.accept('./App', () => { render(App) }); +} diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 4e7d72a30..3a7e25fcd 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -13,6 +13,9 @@ import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal' import '../css/Courses.css' import WorkDetailPageHeader from './common/WorkDetailPageHeader' import CommonWorkAppraiseReply from './reply/CommonWorkAppraiseReply' +import Example from './TestHooks' +import CommonWorkAppraiseReviseAttachments from './CommonWorkAppraiseReviseAttachments' + const { Option} = Select; const CheckboxGroup = Checkbox.Group; const confirm = Modal.confirm; @@ -174,12 +177,12 @@ class CommonWorkAppraise extends Component{ modalSave={ModalSave} loadtype={loadtype} /> - {/* 内容区 */} {/*
*/}
+ -
- 补交附件 -
- -
- {revise_reason} -
- {revise_attachments.map((item,key)=>{ - return( -
- - - - - {item.title} - - {item.filesize} - {item.delete===true?:""} -
- ) - })} -
- 更新 - {atta_update_user} - - {moment(atta_update_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(atta_update_time).format('YYYY-MM-DD HH:mm')} - -
-
} + {is_evaluation != true && project_info && project_info.name &&
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js new file mode 100644 index 000000000..d12099d38 --- /dev/null +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js @@ -0,0 +1,52 @@ +import React, { useState } from 'react' +import moment from 'moment' +// import Example from './TestHooks' +function CommonWorkAppraiseReviseAttachments(props) { + const { revise_attachments, revise_reason, atta_update_time, atta_update_user} = props + if (!revise_attachments) return '' + return ( + + {/* {Example()} */} + {revise_attachments.length===0?"":
+ +
+ 补交附件 +
+ + {/* {age} */} + +
+ {revise_reason} +
+ {revise_attachments.map((item,key)=>{ + return( +
+ + + + + {item.title} + + {item.filesize} + {item.delete===true?:""} +
+ ) + })} +
+ 更新 + {atta_update_user} + + {moment(atta_update_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(atta_update_time).format('YYYY-MM-DD HH:mm')} + +
+
} +
+ ) + +} +export default CommonWorkAppraiseReviseAttachments; \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js index 125975ae9..d96df9275 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkPost.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkPost.js @@ -651,7 +651,8 @@ render(){ 返回
-
+ {/* */} +
- +
{/* TODO 取消统一发布设置 diff --git a/public/react/src/modules/courses/busyWork/TestHooks.js b/public/react/src/modules/courses/busyWork/TestHooks.js new file mode 100644 index 000000000..53a03bd49 --- /dev/null +++ b/public/react/src/modules/courses/busyWork/TestHooks.js @@ -0,0 +1,26 @@ +// import React, { useState, useEffect } from 'react' + + +// function Example() { +// const [state, setState] = useState({counter: 0}) +// useEffect(() => { +// console.log(' cdm') + +// return () => { +// console.log(' cwum') +// }; +// }) +// const add1ToCounter = () => { +// const newCounterValue = state.counter + 1 +// setState({ counter: newCounterValue }) +// } +// return ( +//
+//

{state.counter}

+// +//
+// ) +// } +// export default Example \ No newline at end of file diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 65633839a..f058c415a 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -825,6 +825,7 @@ a.white-btn.use_scope-btn:hover{ .summaryname{ /*height: 23px;*/ font-size: 22px; + height: 25px; font-family: MicrosoftYaHei; font-weight: 400; color: rgba(51,51,51,1); diff --git a/public/react/src/modules/courses/exercise/Ecercisemount.js b/public/react/src/modules/courses/exercise/Ecercisemount.js index 881d6c6a8..aa22b1f4a 100644 --- a/public/react/src/modules/courses/exercise/Ecercisemount.js +++ b/public/react/src/modules/courses/exercise/Ecercisemount.js @@ -68,7 +68,7 @@ class Ecercisemount extends Component{
- + {/*内容*/}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 7f5553e6c..1fce4d1bb 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -556,7 +556,7 @@ class GraduationTasksSubmitedit extends Component{ {description&&description?
- {/**/} + {/**/}
- {/*内容*/}