From 3e4f238b2d8e5d5c58664be2a92ee935a4ef24f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 22 Jan 2020 22:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/Paperreview_single.js | 12 ++--- .../question/component/ChoquesEditor.js | 30 ++++++++++--- .../question/component/JudquestionEditor.js | 41 ++++++++++++++--- .../modules/question/component/Listjihe.js | 21 +++++++-- .../question/component/SingleEditor.js | 30 ++++++++++--- .../question/questioncss/questioncom.css | 22 ++++++++- .../src/modules/testpaper/Testpaperlibrary.js | 45 +++++++++++++++---- .../testpaper/component/Contentpart.js | 1 + .../modules/testpaper/component/Listjihe.js | 13 +++++- .../testpaper/component/QuestionModalys.js | 42 +++++++++++++++++ 10 files changed, 216 insertions(+), 41 deletions(-) create mode 100644 public/react/src/modules/testpaper/component/QuestionModalys.js diff --git a/public/react/src/modules/question/Paperreview_single.js b/public/react/src/modules/question/Paperreview_single.js index 3eacc9c16..c5bfa9832 100644 --- a/public/react/src/modules/question/Paperreview_single.js +++ b/public/react/src/modules/question/Paperreview_single.js @@ -90,6 +90,7 @@ class Paperreview_single extends Component { }catch (e) { itemsnamesy=objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description; } + var fenshul=(objectsingle.score+"分"); return (
this.Selectingpracticaltrainings(items.id)}> - - 撤销
+ {/**/} + 撤销 : items.item_type === "PROGRAM" ? items.program_attr.status === 0 ? @@ -400,7 +400,15 @@ class Listjihe extends Component { 公开 : - "" + ( + items.public==true? + "" + : +this.props.showmodelsInaudit(e)}> + + 公开审核中 +
+ ) : "" } @@ -451,7 +459,12 @@ class Listjihe extends Component {+ 解析: +
+
{items ?
diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js
index dffbf620c..fd7f8ce94 100644
--- a/public/react/src/modules/question/component/SingleEditor.js
+++ b/public/react/src/modules/question/component/SingleEditor.js
@@ -253,7 +253,11 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
- texts="";
+ try {
+ texts= JSON.stringify(value)
+ }catch (e) {
+ texts="";
+ }
} else {
if(_text.length>=301){
var result = _text.substring(0,300);
@@ -291,9 +295,15 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
- this.setState({
- question_titleysl:""
- })
+ try {
+ this.setState({
+ question_titleysl: JSON.stringify(value)
+ })
+ }catch (e) {
+ this.setState({
+ question_titleysl:""
+ })
+ }
} else {
// 提交到后台的内容需要处理一下;
@@ -322,9 +332,15 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
- this.setState({
- question_titlesysl:""
- })
+ try {
+ this.setState({
+ question_titlesysl:JSON.stringify(value)
+ })
+ }catch (e) {
+ this.setState({
+ question_titlesysl:""
+ })
+ }
} else {
var texts="";
if(_text.length>=1001){
diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css
index 98edd9915..7f164535b 100644
--- a/public/react/src/modules/question/questioncss/questioncom.css
+++ b/public/react/src/modules/question/questioncss/questioncom.css
@@ -705,6 +705,9 @@
font-size: 14px;
}
+.testfondexsysl{
+ width:5% !important;
+}
.yldxtits{
color: #888888;
font-size: 14px;
@@ -712,7 +715,9 @@
.mt25{
margin-top: 25px;
}
-
+.wt930px{
+ width: 930px !important;
+}
.postitonrelati{
position: relative;
}
@@ -1072,3 +1077,18 @@
.lh34{
line-height: 34px !important;
}
+.titesstwos{
+ position: relative;
+}
+.titesstwostest{
+ position: absolute;
+}
+.text-indents40{
+ text-indent:40px
+}
+.text-indents44{
+ text-indent:44px
+}
+.text-indents50{
+ text-indent: 50px
+}
diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js
index 86a267b83..4d9ad75a9 100644
--- a/public/react/src/modules/testpaper/Testpaperlibrary.js
+++ b/public/react/src/modules/testpaper/Testpaperlibrary.js
@@ -18,6 +18,7 @@ import SiderBar from "../tpm/SiderBar";
import Headplugselections from "../question/component/Headplugselections";
import QuestionModal from "./component/QuestionModal";
import QuestionModals from "./component/QuestionModals";
+import QuestionModalys from "./component/QuestionModalys";
class Testpaperlibrary extends Component {
constructor(props) {
super(props);
@@ -40,6 +41,7 @@ class Testpaperlibrary extends Component {
modalsTypes:false,
modalsType:false,
timuid:0,
+ modalsTypeInaudit:false,
}
}
getContainer = () => {
@@ -138,11 +140,16 @@ class Testpaperlibrary extends Component {
}
//获取数据
- getdata=(data)=>{
+ getdata=(data,bool)=>{
const url = `/examination_banks.json`;
- this.setState({
- booljupyterurls:true,
- })
+ if(bool){
+
+ }else {
+ this.setState({
+ booljupyterurls:true,
+ })
+ }
+
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
@@ -288,7 +295,7 @@ class Testpaperlibrary extends Component {
page: this.state.page,
per_page:10,
};
- this.getdata(data);
+ this.getdata(data,true);
}
}).catch((error) => {
////console.log(error);
@@ -314,7 +321,7 @@ class Testpaperlibrary extends Component {
page: this.state.page,
per_page:10,
};
- this.getdata(data);
+ this.getdata(data,true);
}
})
.catch(function (error) {
@@ -325,8 +332,8 @@ class Testpaperlibrary extends Component {
showmodels = (id) => {
this.setState({
modalsType: true,
- titilesm: "在平台审核后,所有成员均可使用试题",
- titiless: "是否设置为公开?",
+ titilesm: "在平台审核后,所有成员均可使用试卷",
+ titiless: "是否设置为公开",
titbool: true,
timuid: id
})
@@ -337,7 +344,19 @@ class Testpaperlibrary extends Component {
}
+ showmodelsInaudit = (e) => {
+ this.setState({
+ modalsTypeInaudit: true,
+ titilesm: "公开申请已提交,请等待管理员的审核",
+ titiless: "我们将在1-2个工作日内完成审核",
+ })
+ };
+ modalsTypeInauditbool=()=>{
+ this.setState({
+ modalsTypeInaudit:false,
+ })
+ }
showmodelysl = (id) => {
this.setState({
@@ -403,7 +422,7 @@ class Testpaperlibrary extends Component {
render() {
- let{Headertop,items_count,page,per_page,modalsTypes,modalsType}=this.state;
+ let{Headertop,items_count,page,per_page,modalsTypes,modalsType,modalsTypeInaudit}=this.state;
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
@@ -424,6 +443,12 @@ class Testpaperlibrary extends Component {
setDownload={() => this.setDownload()}>
:""
}
+ {
+ modalsTypeInaudit===true?
+ this.props.showmodels(items.id)}>
公开
this.props.showmodelsInaudit(e)}>
+
+ 公开审核中
+