Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

PCqiandao
cxt 5 years ago
commit ab15b118ec

@ -0,0 +1,9 @@
class AddIndexUserIdChallengeIdForGames < ActiveRecord::Migration[5.2]
def change
delete_games = Game.where.not(myshixun_id: Myshixun.all).reorder(nil)
puts "delete_games: #{delete_games.pluck(:id)}"
delete_games.destroy_all
add_index :games, [:user_id, :challenge_id], unique: true
end
end

@ -907,7 +907,7 @@ class College extends Component {
<div className="jibenshiyong100 sortinxdirection yinyin">
<div className="yslstatistic-base-item-labels">
{
teachers_count?
teachers_count || teachers_count===0?
<div className="yslstatistic-base-item-labelsp"> {teachers_count}<span className="yslstatistic-base-item-labelsspan"></span></div>
:
<Spin/>
@ -915,7 +915,7 @@ class College extends Component {
</div>
<div className="yslstatistic-base-item-labels">
{
students_count?
students_count || students_count===0?
<div className="yslstatistic-base-item-labelsp">{students_count}<span className="yslstatistic-base-item-labelsspan"></span></div>
:
<Spin/>
@ -923,7 +923,7 @@ class College extends Component {
</div>
<div className="yslstatistic-base-item-labels">
{
courses_count?
courses_count || courses_count === 0?
<div className="yslstatistic-base-item-labelsp">{courses_count}<span className="yslstatistic-base-item-labelsspan"></span></div>
:
<Spin/>
@ -931,7 +931,7 @@ class College extends Component {
</div>
<div className="yslstatistic-base-item-labels">
{
shixuns_count?
shixuns_count || shixuns_count === 0?
<div className="yslstatistic-base-item-labelsp">{shixuns_count}<span className="yslstatistic-base-item-labelsspan"></span></div>
:
<Spin/>
@ -939,7 +939,7 @@ class College extends Component {
</div>
<div className="yslstatistic-base-item-labels">
{
shixun_report_count?
shixun_report_count || shixun_report_count===0?
<div className="yslstatistic-base-item-labelsp">{shixun_report_count}<span className="yslstatistic-base-item-labelsspan"></span></div>
:
<Spin/>
@ -947,7 +947,7 @@ class College extends Component {
</div>
<div className="yslstatistic-base-item-labels">
{
shixun_time?
shixun_time || shixun_time === 0 ?
<div className="yslstatistic-base-item-labelsp">{shixun_time}<span className="yslstatistic-base-item-labelsspan"></span></div>
:
<Spin/>

@ -529,6 +529,7 @@ class Questionitem_banks extends Component {
}
handleShowUploadImage=(url)=>{
debugger
this.setState({
url:url
})
@ -550,7 +551,7 @@ class Questionitem_banks extends Component {
>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
<QuestionModalPicture url={url} {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}

@ -176,7 +176,16 @@ class ChoquesEditor extends Component{
onCancel = () => {
this.props.onEditorCancel()
}
handleShowUploadImages=(url)=>{
this.setState({
url:url,
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
handleShowUploadImage = (url,i) => {
this.setState({
@ -466,6 +475,8 @@ class ChoquesEditor extends Component{
options={options}
value={question_title}
onContentChange={this.onContentChange}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/>
@ -577,6 +588,7 @@ class ChoquesEditor extends Component{
options={options}
value={question_titles}
onContentChange={this.onContentChanges}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/>

@ -58,6 +58,7 @@ class JudquestionEditor extends Component{
zqda:null,
item_banksedit:[],
mychoicess:[],
url:''
}
}
addOption = () => {
@ -334,6 +335,16 @@ class JudquestionEditor extends Component{
}
}
}
handleShowUploadImages=(url)=>{
this.setState({
url:url,
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
@ -437,6 +448,8 @@ class JudquestionEditor extends Component{
options={options}
value={question_title}
onContentChange={this.onContentChange}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/>
@ -487,6 +500,8 @@ class JudquestionEditor extends Component{
options={options}
value={question_titles}
onContentChange={this.onContentChanges}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/>
</div>

@ -251,6 +251,16 @@ class SingleEditor extends Component{
// standard_answers[index] = !standard_answers[index];
this.setState({ standard_answers })
}
handleShowUploadImages=(url)=>{
this.setState({
url:url,
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
handleShowUploadImage = (url,i) => {
@ -494,6 +504,7 @@ class SingleEditor extends Component{
options={options}
value={question_title}
onContentChange={this.onContentChange}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/>
<div className="mb10 mt10 sortinxdirection">
@ -603,6 +614,7 @@ class SingleEditor extends Component{
options={options}
value={question_titles}
onContentChange={this.onContentChanges}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/>
</div>

Loading…
Cancel
Save