From fa85a828ea630629884fb8ccbe0eb4daea223527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 18 Feb 2020 13:59:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E5=AD=97=E6=95=B0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/Questionitem_banks.js | 2 +- .../question/component/ChoquesEditor.js | 42 +++++++-------- .../question/component/Itembankstop.js | 1 - .../question/component/JudquestionEditor.js | 32 +++++------ .../question/component/Newknledpots.js | 1 - .../question/component/SingleEditor.js | 53 ++++++++++++++++++- .../comthetestpaper/Comthetestpaperst.js | 1 - .../comthetestpaper/Intelligentcomponents.js | 1 - .../component/Paperlibraryseeid_items.js | 22 -------- 9 files changed, 90 insertions(+), 65 deletions(-) diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 42040e13e..ef70bfe75 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -502,7 +502,7 @@ class Questionitem_banks extends Component { ` body{ width: 100%!important; - overflow: hidden!important; + } .newFooter{ display: none; diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index d5af13444..e442eeda8 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -226,11 +226,11 @@ class ChoquesEditor extends Component { texts=""; } } else { - if (_text.length >= 301) { - var result = _text.substring(0, 300); - texts = { "ops": [{ "insert": result }] }; - texts = JSON.stringify(texts); - } else { + if(_text.length>=500){ + var result = _text.substring(0,450); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { // 提交到后台的内容需要处理一下; value = JSON.stringify(value); texts = value; @@ -274,14 +274,14 @@ class ChoquesEditor extends Component { } } else { // 提交到后台的内容需要处理一下; - var texts = ""; - if (_text.length >= 1001) { - var result = _text.substring(0, 1000); - texts = { "ops": [{ "insert": result }] }; - texts = JSON.stringify(texts); - } else { - value = JSON.stringify(value) - texts = value; + var texts=""; + if(_text.length>=979){ + var result = _text.substring(0,975); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { + value = JSON.stringify(value) + texts=value; } this.setState({ question_titleysl: texts @@ -304,14 +304,14 @@ class ChoquesEditor extends Component { } } else { // 提交到后台的内容需要处理一下; - var texts = ""; - if (_text.length >= 1001) { - var result = _text.substring(0, 1000); - texts = { "ops": [{ "insert": result }] }; - texts = JSON.stringify(texts); - } else { - value = JSON.stringify(value) - texts = value; + var texts=""; + if(_text.length>=979){ + var result = _text.substring(0,975); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { + value = JSON.stringify(value) + texts=value; } this.setState({ question_titlesysl: texts diff --git a/public/react/src/modules/question/component/Itembankstop.js b/public/react/src/modules/question/component/Itembankstop.js index 26cb23b38..33bda5e67 100644 --- a/public/react/src/modules/question/component/Itembankstop.js +++ b/public/react/src/modules/question/component/Itembankstop.js @@ -683,7 +683,6 @@ class Itembankstop extends Component { ` body{ width: 100%!important; - overflow: hidden!important; } .ant-form-item{ margin-bottom: 0px !important; diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index f8da18ee0..9f6b5c96a 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -301,14 +301,14 @@ class JudquestionEditor extends Component { // console.log("有"); // 提交到后台的内容需要处理一下; - var texts = ""; - if (_text.length >= 1001) { - var result = _text.substring(0, 1000); - texts = { "ops": [{ "insert": result }] }; - texts = JSON.stringify(texts); - } else { - value = JSON.stringify(value) - texts = value; + var texts=""; + if(_text.length>=979){ + var result = _text.substring(0,975); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { + value = JSON.stringify(value) + texts=value; } this.setState({ question_titleysl: texts @@ -332,14 +332,14 @@ class JudquestionEditor extends Component { } else { // 提交到后台的内容需要处理一下; - var texts = ""; - if (_text.length >= 1001) { - var result = _text.substring(0, 1000); - texts = { "ops": [{ "insert": result }] }; - texts = JSON.stringify(texts); - } else { - value = JSON.stringify(value); - texts = value; + var texts=""; + if(_text.length>=979){ + var result = _text.substring(0,975); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { + value =JSON.stringify(value); + texts=value; } this.setState({ question_titlesysl: texts diff --git a/public/react/src/modules/question/component/Newknledpots.js b/public/react/src/modules/question/component/Newknledpots.js index 13194b263..98f766196 100644 --- a/public/react/src/modules/question/component/Newknledpots.js +++ b/public/react/src/modules/question/component/Newknledpots.js @@ -116,7 +116,6 @@ class PaperDeletModel extends Component { body{ width: 100%!important; - overflow: hidden!important; } ` diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index 948889924..23617bfe0 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -10,7 +10,8 @@ const tagArray = [ 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] - +const stringmysl=`"{"ops":[{"insert":"阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈老师挨家挨户啊哈咯阿萨德家啊卡阿萨德就卡号上课讲啊爱睡觉打卡时大家卡号是阿哈电视的了就啊好受点哈是贺卡上了啊是还浪费哈说考虑好了哈哈反馈就金拉丝哈说了哈"}]}"` +const srruhsldssd=`"{"ops":[{"insert":"萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡觉就辣椒链接啊死了就丽萨链接金蛇郎君看见啊死了就链接啊离开家辣椒水金拉丝就链接里撒娇接口将阿拉斯加就啊链接是老伦就啊急死了拉丝就啊死了姐就啊死离开了谁姐啦链接里就是离开家链接啊了就辣椒金蛇郎君链接看见啊死就辣椒阿利森大家撒链接链接啊死了姐离开就撒链接的里撒娇库萨了家里就啊睡觉啊死了萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡觉就辣椒链接啊死了就丽萨链接金蛇郎君看见啊死了就链接啊离开家辣椒水金拉丝就链接里撒娇接口将阿拉斯加就啊链接是老伦就啊急死了拉丝就啊死了姐就啊死离开了谁姐啦链接里就是离开家链接啊了就辣椒金蛇郎君链接看见啊死就辣椒阿利森大家撒链接链接啊死了姐离开就撒链接的里撒娇库萨了家里就啊睡觉啊死了萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡觉就辣椒链接啊死了就丽萨链接金蛇郎君看见啊死了就链接啊离开家辣椒水金拉丝就链接里撒娇接口将阿拉斯加就啊链接是老伦就啊急死了拉丝就啊死了姐就啊死离开了谁姐啦链接里就是离开家链接啊了就辣椒金蛇郎君链接看见啊死就辣椒阿利森大家撒链接链接啊死了姐离开就撒链接的里撒娇库萨了家里就啊睡觉啊死了萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡觉就辣椒链接啊死了就丽萨链接金蛇郎君看见啊死了就链接啊离开家辣椒水金拉丝就链接里撒娇接口将阿拉斯加就啊链接是老伦就啊急死了拉丝就啊死了姐就啊死离开了谁姐啦链接里就是离开家链接啊了就辣椒金蛇郎君链接看见啊死就辣椒阿利森大家撒链接链接啊死了姐离开就撒链接的里撒娇库萨了家里就啊睡觉啊死了萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡觉就辣椒链接啊死了就丽萨链接金蛇郎君看见啊死了就链接啊离开家辣椒水金拉丝就链接里撒娇接口将阿拉斯加就啊链接是老伦就啊急死了拉丝就啊死了姐就啊死离开了谁姐啦链接里就是离开家链接啊了就辣椒金蛇郎君链接看见啊死就辣椒阿利森大家撒链接链接啊死了姐离开就撒链接的里撒娇库萨了家里就啊睡觉啊死了萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡觉就辣椒链接啊死了就丽萨链接金蛇郎君看见啊死了就链接啊离开家辣椒水金拉丝就链接里撒娇接口将阿拉斯加就啊链接是老伦就啊急死了拉丝就啊死了姐就啊死离开了谁姐啦链接里就是离开家链接啊了就辣椒金蛇郎君链接看见啊死就辣椒阿利森大家撒链接链接啊死了姐离开就撒链接的里撒娇库萨了家里就啊睡觉啊死了萨克卡了丽萨啊死拉屎加拉加斯来得及啦睡"}]}"` //题库的试卷 单选题 组件 class SingleEditor extends Component { constructor(props) { @@ -248,11 +249,19 @@ class SingleEditor extends Component { texts=""; } } else { +<<<<<<< HEAD if (_text.length >= 301) { var result = _text.substring(0, 300); texts = { "ops": [{ "insert": result }] }; texts = JSON.stringify(texts); } else { +======= + if(_text.length>=500){ + var result = _text.substring(0,450); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { +>>>>>>> 91722ce... 题库字数优化 // 提交到后台的内容需要处理一下; value = JSON.stringify(value) texts = value; @@ -278,7 +287,13 @@ class SingleEditor extends Component { } +<<<<<<< HEAD onContentChange = (value, quill) => { +======= + onContentChange=(value,quill)=>{ + console.log("stringmysl"); + console.log(stringmysl.length); +>>>>>>> 91722ce... 题库字数优化 var _text = quill.getText(); const reg = /^[\s\S]*.*[^\s][\s\S]*$/; @@ -296,6 +311,7 @@ class SingleEditor extends Component { } else { // 提交到后台的内容需要处理一下; +<<<<<<< HEAD var texts = ""; if (_text.length >= 1001) { var result = _text.substring(0, 1000); @@ -304,6 +320,20 @@ class SingleEditor extends Component { } else { value = JSON.stringify(value) texts = value; +======= + var texts=""; + if(_text.length>=979){ + var result = _text.substring(0,975); + console.log("11111111"); + console.log(result.length); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + console.log("2222"); + console.log(texts.length); + }else { + value = JSON.stringify(value) + texts=value; +>>>>>>> 91722ce... 题库字数优化 } this.setState({ question_titleysl: texts @@ -316,7 +346,13 @@ class SingleEditor extends Component { } } } +<<<<<<< HEAD onContentChanges = (value, quill) => { +======= + onContentChanges=(value,quill)=>{ + console.log("srruhsldssd"); + console.log(srruhsldssd.length); +>>>>>>> 91722ce... 题库字数优化 const _text = quill.getText(); const reg = /^[\s\S]*.*[^\s][\s\S]*$/; if (!reg.test(_text)) { @@ -331,6 +367,7 @@ class SingleEditor extends Component { }) } } else { +<<<<<<< HEAD var texts = ""; if (_text.length >= 1001) { var result = _text.substring(0, 1000); @@ -339,6 +376,20 @@ class SingleEditor extends Component { } else { value = JSON.stringify(value) texts = value; +======= + var texts=""; + if(_text.length>=979){ + var result = _text.substring(0,975); + console.log("33333333"); + console.log(result.length); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + console.log("44444444"); + console.log(texts.length); + }else { + value = JSON.stringify(value) + texts=value; +>>>>>>> 91722ce... 题库字数优化 } this.setState({ question_titlesysl: texts diff --git a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js index cf5aa5e07..ab5eb2e22 100644 --- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js +++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js @@ -623,7 +623,6 @@ class Comthetestpaperst extends Component { ` body{ width: 100%!important; - overflow: hidden!important; } .ant-form-item{ margin-bottom: 0px !important; diff --git a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js index 34500381f..590de9e39 100644 --- a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js +++ b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js @@ -535,7 +535,6 @@ class Intelligentcomponents extends Component { ` body{ width: 100%!important; - overflow: hidden!important; } .ant-form-item{ margin-bottom: 0px !important; diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js index 6568a209e..8d140bc53 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -142,47 +142,25 @@ class Paperlibraryseeid_items extends Component { { objectsingle.item_type === "PROGRAM" ?
-<<<<<<< HEAD -
>>>>>> c6b13f1... 调整 }} > ({objectsingle.score}分)
-<<<<<<< HEAD -
-=======
->>>>>>> c6b13f1... 调整
:
-<<<<<<< HEAD -
- ({objectsingle.score}分) -
-
({objectsingle.score}分)
>>>>>> c6b13f1... 调整 > { itemssname===null || itemssname===undefined?