Merge branches 'dev_item_bank' and 'yslnewtiku' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_item_bank

 Conflicts:
	public/react/src/AppConfig.js
yslnewtiku
杨树明 5 years ago
commit 33c857c971

@ -326,8 +326,8 @@ module.exports = {
comments: false
},
compress: {
drop_debugger: true,
drop_console: true
drop_debugger: false,
drop_console: false
}
}
}),

@ -1242,6 +1242,12 @@
<div class="code-name">&amp;#xe6c8;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70f;</span>
<div class="name">减号</div>
<div class="code-name">&amp;#xe70f;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe60f;</span>
<div class="name">工程</div>
@ -1758,6 +1764,48 @@
<div class="code-name">&amp;#xe6d9;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe701;</span>
<div class="name">缩小</div>
<div class="code-name">&amp;#xe701;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe707;</span>
<div class="name">放大</div>
<div class="code-name">&amp;#xe707;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe709;</span>
<div class="name">编辑</div>
<div class="code-name">&amp;#xe709;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70b;</span>
<div class="name">公开</div>
<div class="code-name">&amp;#xe70b;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70c;</span>
<div class="name">解析</div>
<div class="code-name">&amp;#xe70c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70d;</span>
<div class="name">删除</div>
<div class="code-name">&amp;#xe70d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70e;</span>
<div class="name">试题栏</div>
<div class="code-name">&amp;#xe70e;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
@ -3626,6 +3674,15 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jianhao"></span>
<div class="name">
减号
</div>
<div class="code-name">.icon-jianhao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongcheng"></span>
<div class="name">
@ -4400,6 +4457,69 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-suoxiao2"></span>
<div class="name">
缩小
</div>
<div class="code-name">.icon-suoxiao2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fangda"></span>
<div class="name">
放大
</div>
<div class="code-name">.icon-fangda
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-bianji2"></span>
<div class="name">
编辑
</div>
<div class="code-name">.icon-bianji2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongkai"></span>
<div class="name">
公开
</div>
<div class="code-name">.icon-gongkai
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiexi"></span>
<div class="name">
解析
</div>
<div class="code-name">.icon-jiexi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanchu1"></span>
<div class="name">
删除
</div>
<div class="code-name">.icon-shanchu1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shitilan"></span>
<div class="name">
试题栏
</div>
<div class="code-name">.icon-shitilan
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
@ -6045,6 +6165,14 @@
<div class="code-name">#icon-pinglun</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jianhao"></use>
</svg>
<div class="name">减号</div>
<div class="code-name">#icon-jianhao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongcheng"></use>
@ -6733,6 +6861,62 @@
<div class="code-name">#icon-zhiding</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-suoxiao2"></use>
</svg>
<div class="name">缩小</div>
<div class="code-name">#icon-suoxiao2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fangda"></use>
</svg>
<div class="name">放大</div>
<div class="code-name">#icon-fangda</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-bianji2"></use>
</svg>
<div class="name">编辑</div>
<div class="code-name">#icon-bianji2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongkai"></use>
</svg>
<div class="name">公开</div>
<div class="code-name">#icon-gongkai</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiexi"></use>
</svg>
<div class="name">解析</div>
<div class="code-name">#icon-jiexi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanchu1"></use>
</svg>
<div class="name">删除</div>
<div class="code-name">#icon-shanchu1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shitilan"></use>
</svg>
<div class="name">试题栏</div>
<div class="code-name">#icon-shitilan</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1419,6 +1419,13 @@
"unicode": "e6c8",
"unicode_decimal": 59080
},
{
"icon_id": "7556166",
"name": "减号",
"font_class": "jianhao",
"unicode": "e70f",
"unicode_decimal": 59151
},
{
"icon_id": "7587940",
"name": "工程",
@ -2020,6 +2027,55 @@
"font_class": "zhiding",
"unicode": "e6d9",
"unicode_decimal": 59097
},
{
"icon_id": "12403050",
"name": "缩小",
"font_class": "suoxiao2",
"unicode": "e701",
"unicode_decimal": 59137
},
{
"icon_id": "12403054",
"name": "放大",
"font_class": "fangda",
"unicode": "e707",
"unicode_decimal": 59143
},
{
"icon_id": "12491363",
"name": "编辑",
"font_class": "bianji2",
"unicode": "e709",
"unicode_decimal": 59145
},
{
"icon_id": "12491366",
"name": "公开",
"font_class": "gongkai",
"unicode": "e70b",
"unicode_decimal": 59147
},
{
"icon_id": "12491369",
"name": "解析",
"font_class": "jiexi",
"unicode": "e70c",
"unicode_decimal": 59148
},
{
"icon_id": "12491370",
"name": "删除",
"font_class": "shanchu1",
"unicode": "e70d",
"unicode_decimal": 59149
},
{
"icon_id": "12491850",
"name": "试题栏",
"font_class": "shitilan",
"unicode": "e70e",
"unicode_decimal": 59150
}
]
}

@ -626,6 +626,9 @@ Created by iconfont
<glyph glyph-name="pinglun" unicode="&#59080;" d="M896 704H128c-35.2 0-64-28.8-64-64v-448c0-35.2 28.8-64 64-64h256l128-64 128 64h256c35.2 0 64 28.8 64 64V640c0 35.2-28.8 64-64 64zM304 368c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z" horiz-adv-x="1024" />
<glyph glyph-name="jianhao" unicode="&#59151;" d="M768 341.333333H256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h512c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667z" horiz-adv-x="1024" />
<glyph glyph-name="gongcheng" unicode="&#58895;" d="M141.9 476.8L454.1 298c18.2-10.6 38.9-16.3 59.9-16.3 21.2 0 41.7 5.6 59.4 16.3l312.4 178.6c21.7 11.8 35.2 36.5 34.5 63.1-0.8 26.2-15.4 50.2-37.4 61.2L567.3 758.4c-33.9 16.9-72.8 16.9-106.6 0L144.9 600.8c-22.5-11.6-36.4-34.5-37.2-61.1-0.8-26.3 12.3-50.4 34.2-62.9z m22.3 85.9l315.6 157.5c10.9 5.4 22.5 8.2 34.2 8.2 11.7 0 23.4-2.7 34.2-8.2l315.5-157.5c8.1-4 13.5-13.6 13.8-24.2 0.3-10.6-4.5-20.2-12.2-24.3L552 335l-0.5-0.3c-11-6.7-24-10.2-37.5-10.2s-26.7 3.6-38.5 10.5L163.1 513.8c-8 4.6-13 14.3-12.7 24.6 0.3 10.9 5.6 20 13.8 24.3zM888.4 249.7l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 249.7c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2l368.9 210.9c10.2 5.9 13.8 18.9 7.9 29.1-5.6 10.2-18.7 13.8-28.9 7.9zM888.4 387.1l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 387.1c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2L909.6 350c10.2 5.9 13.8 18.9 7.9 29.1-5.8 10.3-18.9 13.8-29.1 8z" horiz-adv-x="1024" />
@ -884,6 +887,27 @@ Created by iconfont
<glyph glyph-name="zhiding" unicode="&#59097;" d="M496.0256 671.232L129.024 212.48A20.48 20.48 0 0 1 144.9984 179.2H337.92c11.264 0 20.48-9.216 20.48-20.48v-266.24c0-11.264 9.216-20.48 20.48-20.48h266.24a20.48 20.48 0 0 1 20.48 20.48V158.72c0 11.264 9.216 20.48 20.48 20.48h192.9216a20.48 20.48 0 0 1 15.9744 33.28l-367.0016 458.752a20.48 20.48 0 0 1-31.9488 0zM153.6 896m51.2 0l614.4 0q51.2 0 51.2-51.2l0 0q0-51.2-51.2-51.2l-614.4 0q-51.2 0-51.2 51.2l0 0q0 51.2 51.2 51.2Z" horiz-adv-x="1024" />
<glyph glyph-name="suoxiao2" unicode="&#59137;" d="M921.6 418.133333h-318.577778c-5.688889 0-17.066667 0-22.755555 5.688889-5.688889 0-11.377778 5.688889-17.066667 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066667 0 5.688889-5.688889 11.377778-5.688889 22.755555V793.6c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889V611.555556L927.288889 878.933333c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L739.555556 531.911111h182.044444c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889zM56.888889-128c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L284.444444 236.088889H102.4c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889h318.577778c5.688889 0 17.066667 0 22.755555-5.688889 5.688889 0 11.377778-5.688889 17.066667-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066667 0-5.688889 5.688889-11.377778 5.688889-22.755555v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V156.444444l-267.377778-267.377777c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667z" horiz-adv-x="1024" />
<glyph glyph-name="fangda" unicode="&#59143;" d="M603.022222 418.133333c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L830.577778 782.222222h-182.044445c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889H967.111111c5.688889 0 17.066667 0 22.755556-5.688889 5.688889 0 11.377778-5.688889 17.066666-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066666 5.688889-5.688889 5.688889-17.066667 5.688889-22.755556v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V702.577778l-267.377778-267.377778c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667zM375.466667-128H56.888889c-5.688889 0-17.066667 0-22.755556 5.688889-5.688889 0-11.377778 5.688889-17.066666 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066666-5.688889 5.688889-5.688889 17.066667-5.688889 22.755556v318.577778c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889v-182.044445l267.377778 267.377778c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L193.422222-14.222222h182.044445c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889z" horiz-adv-x="1024" />
<glyph glyph-name="bianji2" unicode="&#59145;" d="M704.752941-97.882353H198.776471c-78.305882 0-138.541176 60.235294-138.541177 132.517647V667.105882c0 72.282353 66.258824 132.517647 138.541177 132.517647h319.247058c18.070588 0 30.117647-12.047059 30.117647-30.117647s-12.047059-24.094118-30.117647-24.094117H198.776471c-42.164706 0-78.305882-36.141176-78.305883-72.282353v-632.470588c0-42.164706 36.141176-72.282353 78.305883-72.282353h499.952941c42.164706 0 78.305882 36.141176 78.305882 72.282353V293.647059c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-259.011765c6.023529-72.282353-60.235294-132.517647-132.517647-132.517647zM313.223529 161.129412c-24.094118 0-54.211765 18.070588-60.235294 48.188235v30.117647l36.141177 126.494118 445.741176 445.741176c48.188235 48.188235 120.470588 48.188235 168.658824 0 48.188235-48.188235 48.188235-120.470588 0-168.658823l-445.741177-445.741177-126.494117-30.117647c-6.023529-6.023529-12.047059-6.023529-18.070589-6.023529z m36.141177 174.682353l-36.141177-114.447059 120.470589 30.117647 433.694117 433.694118c12.047059 12.047059 18.070588 24.094118 18.070589 42.164705 0 18.070588-6.023529 30.117647-18.070589 42.164706-24.094118 24.094118-60.235294 24.094118-84.329411 0L349.364706 335.811765z" horiz-adv-x="1024" />
<glyph glyph-name="gongkai" unicode="&#59147;" d="M512 42.666667C432.355556 42.666667 369.777778 105.244444 369.777778 184.888889S432.355556 327.111111 512 327.111111s142.222222-62.577778 142.222222-142.222222S591.644444 42.666667 512 42.666667z m0 227.555555c-45.511111 0-85.333333-39.822222-85.333333-85.333333S466.488889 99.555556 512 99.555556 597.333333 139.377778 597.333333 184.888889 557.511111 270.222222 512 270.222222zM256 469.333333c-17.066667 0-28.444444 11.377778-28.444444 28.444445V662.755556C244.622222 782.222222 352.711111 867.555556 483.555556 867.555556c142.222222 0 250.311111-96.711111 256-221.866667v-5.688889c0-17.066667-11.377778-28.444444-28.444445-28.444444s-28.444444 11.377778-28.444444 28.444444c-5.688889 96.711111-91.022222 170.666667-199.111111 170.666667-102.4 0-187.733333-68.266667-199.111112-153.6V497.777778c0-17.066667-11.377778-28.444444-28.444444-28.444445zM739.555556-128h-455.111112C176.355556-128 85.333333-36.977778 85.333333 71.111111v227.555556C85.333333 406.755556 176.355556 497.777778 284.444444 497.777778h455.111112c108.088889 0 199.111111-91.022222 199.111111-199.111111v-227.555556c0-108.088889-91.022222-199.111111-199.111111-199.111111z m-455.111112 568.888889C204.8 440.888889 142.222222 378.311111 142.222222 298.666667v-227.555556C142.222222-8.533333 204.8-71.111111 284.444444-71.111111h455.111112c79.644444 0 142.222222 62.577778 142.222222 142.222222v227.555556C881.777778 378.311111 819.2 440.888889 739.555556 440.888889h-455.111112z" horiz-adv-x="1024" />
<glyph glyph-name="jiexi" unicode="&#59148;" d="M506.311111-99.555556c-73.955556 0-147.911111 17.066667-216.177778 51.2-11.377778 5.688889-22.755556 22.755556-11.377777 39.822223 5.688889 11.377778 22.755556 22.755556 39.822222 11.377777 56.888889-28.444444 125.155556-45.511111 187.733333-45.511111 238.933333 0 432.355556 187.733333 432.355556 426.666667 0 85.333333-22.755556 164.977778-73.955556 233.244444-11.377778 11.377778-5.688889 28.444444 5.688889 39.822223 11.377778 11.377778 28.444444 5.688889 39.822222-5.688889 51.2-79.644444 79.644444-170.666667 79.644445-267.377778 5.688889-267.377778-216.177778-483.555556-483.555556-483.555556z m-301.511111 125.155556c-5.688889 0-11.377778 0-17.066667 5.688889C85.333333 122.311111 28.444444 253.155556 28.444444 389.688889 28.444444 651.377778 238.933333 867.555556 500.622222 867.555556c119.466667 0 233.244444-45.511111 318.577778-125.155556 11.377778-11.377778 11.377778-28.444444 0-39.822222-11.377778-11.377778-28.444444-11.377778-39.822222 0-79.644444 73.955556-176.355556 113.777778-278.755556 113.777778-227.555556 0-415.288889-187.733333-415.288889-420.977778 0-125.155556 51.2-238.933333 142.222223-318.577778 11.377778-11.377778 11.377778-28.444444 0-39.822222-5.688889-11.377778-11.377778-11.377778-22.755556-11.377778zM512 31.288889c-56.888889 0-102.4 45.511111-102.4 102.4v34.133333c-62.577778 34.133333-102.4 102.4-102.4 170.666667C307.2 446.577778 398.222222 537.6 512 537.6s204.8-91.022222 204.8-199.111111c0-68.266667-39.822222-136.533333-102.4-170.666667v-34.133333c0-51.2-39.822222-96.711111-91.022222-102.4H512z m0 449.422222c-79.644444 0-147.911111-62.577778-147.911111-142.222222 0-51.2 28.444444-96.711111 73.955555-125.155556l28.444445-17.066666v-68.266667c0-22.755556 17.066667-45.511111 45.511111-45.511111h5.688889c22.755556 0 39.822222 22.755556 39.822222 45.511111v68.266667l28.444445 17.066666c45.511111 22.755556 73.955556 73.955556 73.955555 125.155556 0 73.955556-68.266667 142.222222-147.911111 142.222222zM676.977778 497.777778c-5.688889 0-17.066667 0-22.755556 5.688889-11.377778 11.377778-11.377778 28.444444 0 39.822222L739.555556 628.622222c11.377778 11.377778 28.444444 11.377778 39.822222 0s11.377778-28.444444 0-39.822222l-85.333334-85.333333c-5.688889 0-11.377778-5.688889-17.066666-5.688889zM347.022222 497.777778c-5.688889 0-11.377778 5.688889-17.066666 5.688889L238.933333 594.488889c-11.377778 11.377778-11.377778 28.444444 0 39.822222s28.444444 11.377778 39.822223 0l85.333333-85.333333c11.377778-11.377778 11.377778-28.444444 0-39.822222 0-5.688889-5.688889-11.377778-17.066667-11.377778zM512 560.355556c-17.066667 0-28.444444 11.377778-28.444444 28.444444V685.511111c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444444-28.444445v-102.4c0-11.377778-11.377778-22.755556-28.444444-22.755555z" horiz-adv-x="1024" />
<glyph glyph-name="shanchu1" unicode="&#59149;" d="M672-96H358.4c-76.8 0-140.8 57.6-153.6 140.8L96 569.6c0 19.2 6.4 32 25.6 38.4 19.2 6.4 32-6.4 38.4-25.6l102.4-524.8c12.8-51.2 51.2-89.6 96-89.6h313.6c44.8 0 83.2 38.4 96 89.6l102.4 524.8c6.4 19.2 19.2 25.6 38.4 25.6 19.2-6.4 25.6-19.2 25.6-38.4L832 44.8c-19.2-83.2-83.2-140.8-160-140.8zM608 704v6.4c0 51.2-44.8 89.6-96 89.6S416 755.2 416 704h-64C352 793.6 422.4 864 512 864c83.2 0 153.6-64 160-153.6V704h-64zM384 38.4c-12.8 0-25.6 12.8-32 25.6L256 576c0 19.2 12.8 32 25.6 38.4 19.2 0 38.4-12.8 38.4-25.6l96-512c0-19.2-6.4-38.4-32-38.4 6.4 0 0 0 0 0zM640 38.4s-6.4 0 0 0c-25.6 6.4-32 19.2-32 38.4l96 512c0 19.2 19.2 32 38.4 25.6 12.8-6.4 25.6-19.2 25.6-38.4l-96-512c-6.4-12.8-19.2-25.6-32-25.6zM512 38.4c-19.2 0-32 12.8-32 32v512c0 19.2 12.8 32 32 32s32-12.8 32-32v-512c0-19.2-12.8-32-32-32zM992 640H32C12.8 640 0 652.8 0 672S12.8 704 32 704h960c19.2 0 32-12.8 32-32s-12.8-32-32-32z" horiz-adv-x="1024" />
<glyph glyph-name="shitilan" unicode="&#59150;" d="M816.118519-128H184.019753c-69.530864 0-126.419753 56.888889-126.419753 126.419753V756.938272C57.6 826.469136 114.488889 883.358025 184.019753 883.358025h568.888889l189.62963-189.62963v-695.308642c0-69.530864-56.888889-126.419753-126.419753-126.419753zM727.624691 820.148148H184.019753c-37.925926 0-63.209877-25.283951-63.209876-63.209876v-758.518519c0-37.925926 25.283951-63.209877 63.209876-63.209876h632.098766c37.925926 0 63.209877 25.283951 63.209876 63.209876V668.444444L727.624691 820.148148zM955.180247 662.123457h-189.62963c-25.283951 0-44.246914 18.962963-44.246913 44.246913l6.320987 189.62963 227.555556-233.876543z m-170.666667 82.172839v-18.962963h18.962963l-18.962963 18.962963zM670.735802 567.308642H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 630.518519 329.402469 630.518519h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604939s-12.641975-31.604938-31.604939-31.604938zM670.735802 314.469136H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 377.679012 329.402469 377.679012h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938zM670.735802 61.62963H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938s12.641975 31.604938 31.604938 31.604938h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 373 KiB

@ -301,6 +301,22 @@ const Developer = Loadable({
loader: () => import('./modules/developer'),
loading: Loading
})
// 题库
const Headplugselection = Loadable({
loader: () => import('./modules/question/Question'),
loading: Loading
})
//题库新建 //题库编辑
const Questionitem_banks = Loadable({
loader: () => import('./modules/question/Questionitem_banks'),
loading: Loading
})
// 学院统计
const College = Loadable({
loader: () => import('./college/College'),
@ -727,6 +743,19 @@ class App extends Component {
(props) => (<RecordDetail {...this.props} {...props} {...this.state} />)
}
/>
<Route path="/question/edit/:id"
render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
} />
<Route path="/question/newitem"
render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
} />
<Route path="/question/:type"
render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
} />
<Route path="/myproblems/:id"
render={
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
@ -736,7 +765,10 @@ class App extends Component {
render={
(props) => (<Developer {...this.props} {...props} {...this.state} />)
}/>
<Route path="/question"
render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
}/>
<Route exact path="/"
// component={ShixunsHome}
render={

@ -0,0 +1,846 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Drawer,
Input
} from "antd";
import Headplugselection from "./component/Headplugselection";
import QuestionModal from "./component/QuestionModal";
import QuestionModals from "./component/QuestionModals";
import Contentpart from "./component/Contentpart";
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import SiderBar from "../tpm/SiderBar";
class Question extends Component {
constructor(props) {
super(props);
this.state = {
count: 50,
defaultActiveKey:"0",
Headertop: "",
Footerdown: "",
visible: false,
placement: 'right',
modalsType: false,
modalsTypes:false,
titilesm: "设为公开后,所有成员均可使用试题",
titiless: "是否设置为公开?",
titilesms:"单选题",
titbool: false,
Contentdata: [],
difficulty: null,
visiblemys: false,
visiblemyss: false,
item_type: null,
keyword: null,
timuid: null,
items_count: 0,
basket_list: [],
completion_questions_count: 0,
judgement_questions_count: 0,
multiple_questions_count: 0,
practical_questions_count: 0,
program_questions_count: 0,
single_questions_count: 0,
subjective_questions_count: 0,
page:1,
per_page:10,
disciplinesdata:[],
discipline_id:null,
sub_discipline_id:null,
tag_discipline_id:null,
booljupyterurls:false,
disciplinesdatakc:0,
disciplinesdatazsd:0,
}
}
setdiscipline_id=(discipline_id)=>{
this.setState({
discipline_id:discipline_id,
sub_discipline_id:null,
tag_discipline_id:null
})
var data = {
discipline_id:discipline_id,
sub_discipline_id:null,
tag_discipline_id:null,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
setsub_discipline_id=(sub_discipline_id)=>{
this.setState({
sub_discipline_id:sub_discipline_id,
tag_discipline_id:null
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:sub_discipline_id,
tag_discipline_id:null,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
settag_discipline_id=(tag_discipline_id)=>{
this.setState({
tag_discipline_id:tag_discipline_id
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
//初始化
componentDidMount() {
let {defaultActiveKey} = this.state;
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: defaultActiveKey,
page:1,
per_page:10,
};
this.getdata(data);
let url = `/users/get_navigation_info.json`;
axios.get(url, {}).then((response) => {
// ////console.log("开始请求/get_navigation_info.json");
// ////console.log(response);
if (response != undefined) {
if (response.status === 200) {
this.setState({
Headertop: response.data.top,
Footerdown: response.data.down
})
}
}
});
this.getbasket_listdata();
//获取题库筛选资料
let urls = `/disciplines.json`;
axios.get(urls, {params: {
source:"question"
}}).then((response) => {
console.log("Questiondisciplines");
console.log(response.data);
if (response) {
this.setState({
disciplinesdata: response.data.disciplines,
})
}
});
}
callback = (key) => {
this.setState({
defaultActiveKey: key,
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: key,
item_type: this.state.item_type,
difficulty: this.state.difficulty,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
getdata = (data) => {
const url = `/item_banks.json`;
this.setState({
booljupyterurls:true,
})
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
booljupyterurls:false,
})
},1000);
if (response === null || response === undefined) {
return
}
if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
} else {
}
////console.log("item_banks");
////console.log(response);
this.setState({
Contentdata: response.data,
items_count: response.data.items_count,
})
}).catch((error) => {
////console.log(error)
this.setState({
booljupyterurls:false,
})
});
}
paginationonChange = (pageNumber) => {
this.setState({
page: pageNumber,
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: pageNumber,
per_page:10,
};
this.getdata(data);
}
showDrawer = () => {
this.setState({
visible: true,
});
this.getbasket_listdata();
};
onClose = () => {
this.setState({
visible: false,
});
};
onChange = e => {
this.setState({
placement: e.target.value,
});
};
getContainer = () => {
return this.container;
};
saveContainer = container => {
this.container = container;
};
showmodels = (id) => {
this.setState({
modalsType: true,
titilesm: "设为公开后,所有成员均可使用试题",
titiless: "是否设置为公开?",
titbool: true,
timuid: id
})
};
showmodelysl = (id) => {
this.setState({
modalsType: true,
titilesm: "确认删除后,无法撤销",
titiless: "是否确认删除?",
titbool: false,
timuid: id
})
};
modalCancel = () => {
this.setState({
modalsType: false
})
}
modalCancels=()=>{
this.setState({
modalsTypes: false
})
}
showQuestionModals =(item_type)=>{
this.setState({
modalsTypes: true,
titilesms:item_type,
})
}
setDownloads=(item_type)=>{
this.Deletebigquestiontype(item_type);
this.setState({
modalsTypes: false
})
}
setDownload = () => {
//确认
if (this.state.titbool === true) {
//公开
this.publicopentimu(this.state.timuid);
} else {
// 删除
this.deletetimu(this.state.timuid);
}
this.setState({
modalsType: false
})
}
setdifficulty = (difficulty) => {
this.setState({
difficulty: difficulty,
visiblemys: false,
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: difficulty,
item_type: this.state.item_type,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
setitem_types = (item_type) => {
this.setState({
item_type: item_type,
visiblemyss: false,
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: item_type,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
handleVisibleChange = (boll) => {
if (this.state.visiblemyss === true) {
this.setState({
visiblemys: boll,
visiblemyss: false,
})
} else {
this.setState({
visiblemys: boll,
})
}
}
handleVisibleChanges = (boll) => {
if (this.state.visiblemys === true) {
this.setState({
visiblemyss: boll,
visiblemys: false,
})
} else {
this.setState({
visiblemyss: boll,
})
}
}
setdatafunsval = (e) => {
this.setState({
keywords: e.target.value
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: e.target.value,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
setdatafuns = (value) => {
this.setState({
keywords: value,
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: value,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
deletetimu = (id) => {
const url = `/item_banks/${id}.json`;
axios.delete(url)
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('删除试题成功')
// props.history.push(response.data.right_url)
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
})
.catch(function (error) {
//console.log(error);
});
}
publicopentimu = (id) => {
const url = `/item_banks/${id}/set_public.json`;
axios.post(url)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`公开题目成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
}
}).catch((error) => {
//console.log(error);
})
}
getbasket_listdata = () => {
// 获取试题篮展开的数据
const url = "/item_baskets/basket_list.json";
axios.get(url)
.then((result) => {
// //console.log("getbasket_listdata");
// //console.log(result.data);
this.setState({
completion_questions_count: result.data.completion_questions_count,
judgement_questions_count: result.data.judgement_questions_count,
multiple_questions_count: result.data.multiple_questions_count,
practical_questions_count: result.data.practical_questions_count,
program_questions_count: result.data.program_questions_count,
single_questions_count: result.data.single_questions_count,
subjective_questions_count: result.data.subjective_questions_count,
})
}).catch((error) => {
// //console.log(error);
this.setState({
completion_questions_count: 0,
judgement_questions_count: 0,
multiple_questions_count: 0,
practical_questions_count: 0,
program_questions_count: 0,
single_questions_count: 0,
subjective_questions_count: 0,
})
})
}
//选用
getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型
let url="/item_baskets.json";
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`选用成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
this.getbasket_listdata();
this.setState({
visible:true
})
}
}).catch((error) => {
//console.log(error);
})
}
// 撤销
getitem_basketss=(id)=>{
//选用题型可以上传单个 或者多个题型
let url=`/item_baskets/${id}.json`;
axios.delete(url)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`撤销成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
this.getbasket_listdata();
}
}).catch((error) => {
//console.log(error);
})
}
//全选试题库
selectallquestionsonthispage=()=>{
var item_idsdata=[];
var arr= this.state.Contentdata.items;
for(let data of arr) {
item_idsdata.push(data.id);
}
const data={
item_ids:item_idsdata
}
this.getitem_baskets(data);
}
//删除大题型
Deletebigquestiontype =(item_type)=>{
const url=`/item_baskets/delete_item_type.json`;
axios.delete((url), { data: {
item_type:item_type
}})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('删除成功');
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdata(data);
this.getbasket_listdata();
}
})
.catch(function (error) {
//console.log(error);
});
}
render() {
let {
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list,
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
program_questions_count, single_questions_count, subjective_questions_count
} = this.state;
const Datacount = completion_questions_count + judgement_questions_count
+ multiple_questions_count + practical_questions_count
+ program_questions_count
+ single_questions_count
+ subjective_questions_count;
return (
<div className="newMain clearfix" ref={this.saveContainer}>
{
visible===true?
<style>
{
`
.newHeaders{
position: fixed;
top: 0px;
z-index: 999 !important;
}
.ant-drawer {
z-index: 800 !important;
}
.ant-notification{
position: fixed;
z-index: 1500 !important;
}
.newFooter{
position: relative;
z-index: 9999999 ;
}
`
}
</style>
:""
}
{
visible===true?
<div
style={{
marginTop: "60px"
}}></div>
:""}
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}
setDownloads={(e) => this.setDownloads(e)}></QuestionModals>
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
setDownload={() => this.setDownload()}></QuestionModal>
<SiderBar
{...this.props}
{...this.state}
showDrawer={() => this.showDrawer()}
Headertop={Headertop}/>
{/*顶部*/}
<Headplugselection {...this.props} {...this.state}
setdiscipline_id={(e)=>this.setdiscipline_id(e)}
setsub_discipline_id={(e)=>this.setsub_discipline_id(e)}
settag_discipline_id={(e)=>this.settag_discipline_id(e)}
></Headplugselection>
{/*头部*/}
<Contentpart {...this.state} {...this.props}
getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
getitem_baskets={(e)=>this.getitem_baskets(e)}
setdatafuns={(e) => this.setdatafuns(e)}
setdatafunsval={(e) => this.setdatafunsval(e)}
handleVisibleChanges={(e) => this.handleVisibleChanges(e)}
setitem_types={(e) => this.setitem_types(e)}
handleVisibleChange={(e) => this.handleVisibleChange(e)}
setdifficulty={(e) => this.setdifficulty(e)}
showmodels={(e) => this.showmodels(e)}
showmodelysl={(e) => this.showmodelysl(e)}
callback={(e) => this.callback(e)}></Contentpart>
{/*分页*/}
{/*<div className="clearfix mt5">*/}
{/*<div className="educontent mt10 pb20 w1200s">*/}
{/* fenye*/}
{
items_count&&items_count>10?
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={per_page}
total={items_count}></Pagination>
</div>
:<div className="h30 clearfix educontent mt40 intermediatecenter">
</div>
}
{/*抽屉效果*/}
<style>
{
`
.ant-drawer-content-wrapper{
width: 200px !important;
overflowhidden;
margin-top: 62px;
}
.ant-drawer-body{
height: 100%;
background:rgba(234,234,234,1);
}
`
}
</style>
<Drawer
className="drawercontainer"
placement={placement}
closable={false}
onClose={() => this.onClose()}
visible={visible}
mask={false}
closable={true}
>
{Datacount && Datacount > 0 ?
<div>
<div className="mt25 mb26">
<Input placeholder="未命名试卷"/>
</div>
{
single_questions_count === 0 ?
""
: <div className="sortinxdirection" onClick={()=>this.showQuestionModals("SINGLE")} >
<p
className="w50s intermediatecenterysls sortinxdirection font-14">单选题{'('}{single_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
{
multiple_questions_count === 0 ?
""
:
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("MULTIPLE")}>
<p
className="w50s intermediatecenterysls sortinxdirection font-14">多选题{'('}{multiple_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
{
judgement_questions_count === 0 ?
""
:
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("JUDGMENT")}>
<p
className="w50s intermediatecenterysls sortinxdirection font-14">判断题{'('}{judgement_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
{
completion_questions_count === 0 ?
""
:
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("COMPLETION")}>
<p
className="w50s intermediatecenterysls sortinxdirection font-14">填空题{'('}{completion_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
{
subjective_questions_count === 0 ?
""
:
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("SUBJECTIVE")}>
<p
className="w50s intermediatecenterysls sortinxdirection font-14">简答题{'('}{subjective_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
{
practical_questions_count === 0 ?
""
:
<div className="sortinxdirection">
<p
className="w50s intermediatecenterysls sortinxdirection font-14">实训题{'('}{practical_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
{
program_questions_count === 0 ?
""
:
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("PROGRAM")}>
<p
className="w50s intermediatecenterysls sortinxdirection font-14">编程题{'('}{program_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
<div className="intermediatecenter verticallayout mt42">
<div className="drawerbutton">
试卷预览
</div>
</div>
</div>
:
<div className="drawernonedatadiv intermediatecenter">
<NoneData></NoneData>
</div>
}
</Drawer>
</div>
)
}
}
export default SnackbarHOC()(TPMIndexHOC(Question));

@ -0,0 +1,584 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Drawer,
Input,
Button,
Breadcrumb
} from "antd";
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
import Itembankstop from "./component/Itembankstop";
import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
import Choicequestion from './component/Choicequestion';
import SingleEditor from "./component/SingleEditor";
import ChoquesEditor from "./component/ChoquesEditor"
import JudquestionEditor from "./component/JudquestionEditor";
import Bottomsubmit from "../../modules/modals/Bottomsubmit";
// var itembankstop=null;
// var singleEditor=null;
// var Judquestio=null;
// var Choques=null;
class Questionitem_banks extends Component {
constructor(props) {
super(props);
this.contentMdRef = React.createRef();
this.answerMdRef = React.createRef();
this.Choques = React.createRef();
this.Judquestio = React.createRef();
this.state = {
item_type: null,
item_banksedit: [],
myquestion_choicesco: [],
disciplinesdata: [],
knowledgepoints: [],
disciplmy:[]
}
}
//初始化
componentDidMount() {
// let {defaultActiveKey}= this.state;
// var data={
// public:defaultActiveKey
// };
// this.getdata(data);
//
// let url=`/users/get_navigation_info.json`;
// axios.get(url, {
//
// }).then((response) => {
// // //////console.log("开始请求/get_navigation_info.json");
// // //////console.log(response);
// if(response!=undefined){
// if(response.status===200){
// this.setState({
// Headertop:response.data.top,
// Footerdown:response.data.down
// })
// }
// }
// });
const params = this.props && this.props.match && this.props.match.params;
if (JSON.stringify(params) === "{}") {
//新增
} else {
//编辑
const url = `/item_banks/${this.props.match.params.id}/edit.json`;
axios.get((url)).then((response) => {
if (response === null || response === undefined) {
return
}
if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
} else {
}
//////console.log("item_banks");
//console.log("Questionitem_banks");
//console.log(response.data);
this.setState({
item_banksedit: response.data,
})
}).catch((error) => {
//////console.log(error)
});
}
let urls = `/disciplines.json`;
axios.get(urls, {
params: {
source: "question"
}
}).then((response) => {
if (response) {
this.setState({
disciplinesdata: response.data.disciplines,
})
if (response.data) {
if (response.data.disciplines) {
const didata = response.data.disciplines;
for (var i = 0; i < didata.length; i++) {
const childern=[];
//方向
const fxdidata = didata[i].sub_disciplines;
for (var j = 0; j < fxdidata.length; j++) {
//课程
const zsddata = fxdidata[j].tag_disciplines;
childern.push(
{
value: fxdidata[j].id,
label: fxdidata[j].name,
}
)
for (var k = 0; k < zsddata.length; k++) {
//知识点
this.state.knowledgepoints.push(zsddata[k]);
}
}
const datakec={
value: didata[i].id,
label: didata[i].name,
children: childern,
}
this.state.disciplmy.push(datakec);
}
this.setState({
knowledgepoints: this.state.knowledgepoints,
disciplmy:this.state.disciplmy,
})
}
}
}
});
}
getdata = (data) => {
// const url=`/item_banks.json`;
// axios.get((url),{params:data}).then((response) => {
// if(response===null||response===undefined){
//
// return
// }
// if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
//
// }else{
//
// }
// //////console.log("item_banks");
// //////console.log(response);
// }).catch((error) => {
// //////console.log(error)
//
// });
}
getcontentMdRef = (Ref) => {
this.contentMdRef = Ref;
}
getanswerMdRef = (Ref) => {
this.answerMdRef = Ref;
}
getJudquestio = (Ref) => {
this.Judquestio = Ref;
}
getChoquesEditor = (Ref) => {
this.Choques = Ref;
}
//跳转道描点的地方
scrollToAnchor = (anchorName) => {
try {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if (anchorElement) {
anchorElement.scrollIntoView();
}
}
} catch (e) {
}
}
preservation = () => {
//////console.log("preservation");
// //////console.log(this.contentMdRef);
// //////console.log(this.answerMdRef);
//////console.log("preservation222");
//////console.log(this.contentMdRef.Getdatas());
//////console.log("preservation3333");
//////console.log(this.answerMdRef.onSave());
const params = this.props && this.props.match && this.props.match.params;
var url = "";
var boolnew = true;
if (JSON.stringify(params) === "{}") {
// "新增"
url = "/item_banks.json";
boolnew = true;
} else {
url = `/item_banks/${params.id}.json`;
boolnew = false;
// "编辑"
}
if (this.contentMdRef.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return;
}
console.log("preservation");
console.log(this.contentMdRef.Getdatas());
var Getdatasdata=this.contentMdRef.Getdatas();
if (this.state.item_type === null) {
return
}
if (this.state.item_type === "SINGLE") {
if (this.answerMdRef != null) {
//单选题
// //console.log(this.answerMdRef.onSave());
if (this.answerMdRef.onSave().length === 0) {
return;
}
var anserdata = this.answerMdRef.onSave();
const choices = [];
// 1: [3]
// 2: (4) ["1", "2", "3", "4"]
for (var k = 0; k < anserdata[2].length; k++) {
const choicesdata = {
choice_text: anserdata[2][k],
is_answer: anserdata[1][0] === (k + 1) ? 1 : 0,
}
choices.push(choicesdata);
}
// repertoire_id:1,
// sub_repertoire_id:1,
// tag_repertoire_id:[1,3],
var myrbkc=[];
var Getdatasdatas=Getdatasdata[2].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
var data = {
discipline_id: Getdatasdata[3].rbkc[0],
sub_discipline_id: Getdatasdata[3].rbkc[1],
tag_discipline_id: myrbkc,
name: anserdata[0],
item_type: Getdatasdata[1].rbtx,
difficulty:Getdatasdata[0].rbnd,
analysis: anserdata[3],
choices: choices,
};
if (boolnew === true) {
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`新增单选题成功`);
this.props.history.replace('/question');
}
}).catch((error) => {
//console.log(error);
})
} else {
axios.put(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`编辑单选题成功`);
this.props.history.replace('/question');
}
}).catch((error) => {
//console.log(error);
})
}
}
}
if (this.state.item_type === "MULTIPLE") {
if (this.Choques != null) {
//多选题
// //console.log(this.Choques.onSave());
if (this.Choques.onSave().length === 0) {
return;
}
var anserdata = this.Choques.onSave();
const choices = [];
// 1: [3]
// 2: (4) ["1", "2", "3", "4"]
//console.log("MULTIPLE");
//console.log(anserdata);
for (var k = 0; k < anserdata[2].length; k++) {
var bool = false
for (var y = 0; y < anserdata[1].length; y++) {
if (anserdata[1][y] === (k + 1)) {
bool = true
}
}
const choicesdata = {
choice_text: anserdata[2][k],
is_answer: bool === true ? 1 : 0,
}
choices.push(choicesdata);
}
var myrbkc=[];
var Getdatasdatas=Getdatasdata[2].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
var data = {
discipline_id: Getdatasdata[3].rbkc[0],
sub_discipline_id: Getdatasdata[3].rbkc[1],
tag_discipline_id: myrbkc,
name: anserdata[0],
item_type: Getdatasdata[1].rbtx,
difficulty:Getdatasdata[0].rbnd,
analysis: anserdata[3],
choices: choices,
};
if (boolnew === true) {
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`新增多选题成功`);
this.props.history.replace('/question');
}
}).catch((error) => {
//console.log(error);
})
} else {
axios.put(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`编辑多选题成功`);
this.props.history.replace('/question');
}
}).catch((error) => {
//console.log(error);
})
}
}
}
if (this.state.item_type === "JUDGMENT") {
if (this.Judquestio != null) {
//判断题
// //console.log(this.Judquestio.onSave());
if (this.Judquestio.onSave().length === 0) {
return;
}
var anserdata = this.Judquestio.onSave();
const choices = [];
const choicesdata = {
choice_text: "正确",
is_answer: anserdata[1] === "0" ? 1 : 0,
}
choices.push(choicesdata);
const choicesdatas = {
choice_text: "错误",
is_answer: anserdata[1] === "1" ? 1 : 0,
}
choices.push(choicesdatas);
var myrbkc=[];
var Getdatasdatas=Getdatasdata[2].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
var data = {
discipline_id: Getdatasdata[3].rbkc[0],
sub_discipline_id: Getdatasdata[3].rbkc[1],
tag_discipline_id: myrbkc,
name: anserdata[0],
item_type: Getdatasdata[1].rbtx,
difficulty:Getdatasdata[0].rbnd,
analysis: anserdata[2],
choices: choices,
};
if (boolnew === true) {
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`新增判断题成功`);
this.props.history.replace('/question');
}
}).catch((error) => {
//console.log(error);
})
} else {
axios.put(url, data)
.then((result) => {
if (result.data.status == 0) {
this.props.showNotification(`编辑判断题成功`);
this.props.history.replace('/question');
}
}).catch((error) => {
//console.log(error);
})
}
}
}
if (this.state.item_type === "PROGRAM") {
//编程题 跳转到 oj 中创建
}
}
setitem_type = (item_type) => {
this.setState({
item_type: item_type
})
}
render() {
let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state;
const params = this.props && this.props.match && this.props.match.params;
// //console.log(params);
return (
<div>
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
style={{}}
>
<style>
{
`
.newFooter{
display: none;
}
`
}
</style>
<div className="w1200mss">
<div className="w100s mt30">
<Breadcrumb separator=">">
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item>
<Breadcrumb.Item>{JSON.stringify(params) === "{}" ? "新增" : "编辑"}试题</Breadcrumb.Item>
</Breadcrumb>
</div>
{/*题目头部操作*/}
<Itembankstop
{...this.state}
{...this.props}
getcontentMdRef={(ref) => this.getcontentMdRef(ref)}
setitem_type={(item) => this.setitem_type(item)}
>
</Itembankstop>
{
item_type && item_type === "SINGLE" ?
<div className=" clearfix educontent w100s w1200fpx mt19">
<SingleEditor
{...this.state}
{...this.props}
getanswerMdRef={(ref) => this.getanswerMdRef(ref)}
>
</SingleEditor>
</div>
: item_type && item_type === "MULTIPLE" ?
<div className=" clearfix educontent w100s w1200fpx mt19">
<ChoquesEditor
{...this.state}
{...this.props}
getanswerMdRef={(ref) => this.getChoquesEditor(ref)}
>
</ChoquesEditor>
</div>
: item_type && item_type === "JUDGMENT" ?
<div className=" clearfix educontent w100s w1200fpx mt19">
<JudquestionEditor
{...this.state}
{...this.props}
item_banksedit={this.state.item_banksedit}
getanswerMdRef={(ref) => this.getJudquestio(ref)}
>
</JudquestionEditor>
</div>
: item_type && item_type === "PROGRAM" ?
""
: ""
}
</div>
</div>
{
item_type === null ?
""
:
<Bottomsubmit {...this.props} {...this.state} bottomvalue={item_type === "PROGRAM" ? "创建" : "保存"}
onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit>
}
</div>
)
}
}
export default SnackbarHOC()(TPMIndexHOC(Questionitem_banks));

@ -0,0 +1,51 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Radio,
Checkbox,
Form,
Input,
Select,
Cascader,
Col, Row, InputNumber, DatePicker, AutoComplete,Button,Tag
} from "antd";
import './../questioncss/questioncom.css';
import SingleEditor from './../component/SingleEditor';
class Choicequestion extends Component {
constructor(props) {
super(props);
this.state = {
page:1,
Knowpoints:[]
}
}
//初始化
componentDidMount(){
}
render() {
let {page}=this.state;
const { getFieldDecorator } = this.props.form;
return (
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200fpx mt19" >
<SingleEditor>
</SingleEditor>
</div>
)
}
}
const Choicequestions = Form.create({ name: 'Choicequestions' })(Choicequestion);
export default Choicequestions;

@ -0,0 +1,384 @@
import React,{ Component } from "react";
import {
Form, Input, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Rate, Checkbox, message,
Row, Col, Select, Modal, Tooltip
} from 'antd';
import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import update from 'immutability-helper'
import './../questioncss/questioncom.css';
import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder';
const { TextArea } = Input;
const confirm = Modal.confirm;
const $ = window.$
const { Option } = Select;
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
//题库的试卷 多选题 组件
class ChoquesEditor extends Component{
constructor(props){
super(props);
/**
choice_id: 32076
choice_position: 1
choice_text: "1"
standard_boolean: true
*/
const {question_choices} = this.props;
let _standard_answers = undefined;
let _question_choices = undefined;
if (question_choices) {
_standard_answers = []
_question_choices = []
question_choices.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
_question_choices.push(item.choice_text)
})
}
const choicescomy=[];
try {
if(this.props.item_banksedit){
if(this.props.item_banksedit.choices){
this.props.item_banksedit.choices.forEach((item, index) => {
choicescomy.push({
choice_text:item.choice_text,
standard_boolean:item.is_answer,
})
})
_standard_answers = []
_question_choices = []
choicescomy.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
_question_choices.push(item.choice_text)
})
}
}
}catch (e) {
}
this.state = {
question_choices: _question_choices || ['', '', '', ''],
standard_answers: _standard_answers || [false, false, false, false],
question_title: this.props.question_title || '',
question_type: this.props.question_type || 0,
question_score: this.props.question_score || this.props.init_question_score,
question_titles:this.props.question_titles||'',
}
}
addOption = () => {
const { question_choices, standard_answers } = this.state;
// ////console.log("addOption");
// ////console.log(question_choices);
// ////console.log(standard_answers);
question_choices.push('')
standard_answers.push(false)
this.setState({ question_choices, standard_answers })
}
deleteOption = (index) => {
let {question_choices}=this.state;
// ////console.log("deleteOption");
// ////console.log(question_choices);
if(question_choices[index]===""){
// repeat code
this.toMDMode(null)
this.setState(
(prevState) => ({
question_choices : update(prevState.question_choices, {$splice: [[index, 1]]}),
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}else{
// this.props.confirm({
// content: `确认要删除这个选项吗?`,
// onOk: () => {
this.toMDMode(null)
this.setState(
(prevState) => ({
question_choices : update(prevState.question_choices, {$splice: [[index, 1]]}),
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
// }
// })
}
}
onSave = () => {
var editordata=[];
const {question_title, question_score, question_type,question_titles, question_choices, standard_answers } = this.state;
const { question_id_to_insert_after, question_id } = this.props
// TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) {
this.refs['titleEditor'].showError()
this.props.showNotification('请您输入题干');
return editordata;
}
if(!answerArray || answerArray.length == 0) {
this.props.showNotification('请先点击选择本选择题的正确选项');
return editordata;
}
if(!answerArray || answerArray.length < 2) {
this.props.showNotification('多选题最小正确选项为2个');
return editordata;
}
for(let i = 0; i < question_choices.length; i++) {
if (!question_choices[i]) {
this.refs[`optionEditor${i}`].showError()
this.props.showNotification(`请先输入 ${tagArray[i]} 选项的内容`);
return editordata;
}
}
if(!question_titles) {
this.refs['titleEditor2'].showError()
this.props.showNotification('请您输入题目解析');
return editordata;
}
/**
{
"question_title":"同学朋友间常用的沟通工具是什么?",
"question_type":1,
"question_score":5,
"question_choices":["a答案","b答案","c答案","d答案"],
"standard_answers":[1]
}*/
editordata=[question_title,answerArray,question_choices,question_titles];
// question_title,
// question_type: answerArray.length > 1 ? 1 : 0,
// question_score,
// question_choices,
// standard_answers: answerArray,
// insert_id: question_id_to_insert_after || undefined
return editordata;
}
onCancel = () => {
this.props.onEditorCancel()
}
componentDidMount = () => {
try {
this.props.getanswerMdRef(this);
}catch (e) {
}
try {
this.setState({
item_banksedit:this.props.item_banksedit,
question_title:this.props.item_banksedit.name,
question_titles:this.props.item_banksedit.analysis,
mychoicess:this.props.item_banksedit.choices,
})
}catch (e) {
}
}
componentDidUpdate(prevProps) {
//console.log("componentDidUpdate");
// //console.log(prevProps);
// //console.log(this.props.item_banksedit);
if(prevProps.item_banksedit !== this.props.item_banksedit) {
this.setState({
item_banksedit: this.props.item_banksedit,
question_title: this.props.item_banksedit.name,
question_titles: this.props.item_banksedit.analysis,
mychoicess: this.props.item_banksedit.choices,
})
}
}
onOptionClick = (index) => {
let standard_answers = this.state.standard_answers.slice(0)
standard_answers[index] = !standard_answers[index]
this.setState({ standard_answers })
}
onOptionContentChange = (value, index) => {
if (index >= this.state.question_choices.length) {
// TODO 新建然后删除CD选项再输入题干会调用到这里且index是3
return;
}
let question_choices = this.state.question_choices.slice(0);
question_choices[index] = value;
this.setState({ question_choices })
}
on_question_score_change = (e) => {
this.setState({ question_score: e })
}
toMDMode = (that) => {
if (this.mdReactObject) {
let mdReactObject = this.mdReactObject;
this.mdReactObject = null
mdReactObject.toShowMode()
}
this.mdReactObject = that;
}
toShowMode = () => {
}
render() {
let { question_title, question_score, question_type, question_choices, standard_answers,question_titles} = this.state;
let { question_id, index, exerciseIsPublish,
// question_title,
// question_type,
// question_score,
isNew } = this.props;
// const { getFieldDecorator } = this.props.form;
// const isAdmin = this.props.isAdmin()
// const courseId=this.props.match.params.coursesId;
// const isEdit = !!this.props.question_id
const qNumber = `question_`;
// TODO show模式 isNew为false isEdit为false
// [true, false, true] -> [0, 2]
const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1);
// ////console.log("xuanzheshijuan");
// ////console.log(answerTagArray);
// ////console.log(!exerciseIsPublish);
return(
<div className="padding20-30 signleEditor duoxuano" id={qNumber}>
<style>{`
.optionMdEditor {
flex:1
}
.optionRow {
margin:0px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;
word-break:break-all;
}
#e_tips_mdEditor_question_undefined4{
display: none;
}
`}</style>
<p className="mb10 clearfix">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigan fl">题干</span>
</p>
<TPMMDEditor mdID={qNumber} placeholder="请您输入题干" height={155} className=" mt10"
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor>
<div className="mb10 sortinxdirection">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigans fl"><span className="xingtigan">答案选项</span></span>
</div>
{question_choices.map( (item, index) => {
const bg = standard_answers[index] ? 'check-option-bg' : ''
return <div className="df optionRow " >
{/* 点击设置答案 */}
{/* TODO 加了tooltip后会丢失掉span的class */}
{/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */}
<span class={`option-item fr mr10 color-grey select-choice ${bg} `}
name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}>
<ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={true}>
<div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div>
</ConditionToolTip>
</span>
{/* </Tooltip> */}
<div style={{ flex: '0 0 1038px'}}>
<DMDEditor
ref={`optionEditor${index}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={166} className={'optionMdEditor'} noStorage={true}
mdID={qNumber + index} placeholder="" onChange={(value) => this.onOptionContentChange(value, index)}
initValue={item}
></DMDEditor>
</div>
{exerciseIsPublish || index<=2?
<i className=" font-18 ml15 mr20"></i>
:<Tooltip title="删除">
<i className="iconfont icon-htmal5icon19 font-18 color-grey-c ml15" onClick={() => this.deleteOption(index)}></i>
</Tooltip> }
{ !exerciseIsPublish && index<7 && <Tooltip title={`新增参考答案`}>
<i className="color-green font-16 iconfont icon-roundaddfill ml6"
onClick={() => this.addOption()}
style={{float: 'right', visibility: index == question_choices.length - 1 ? '' : 'hidden', marginTop: '2px'}}
></i>
</Tooltip>}
</div>
}) }
<div>
<p className="mb10 clearfix">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigan fl">题目解析</span>
</p>
<style>{`
.optionMdEditor {
flex:1
}
.optionRow {
margin:0px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;
word-break:break-all;
}
`}</style>
<TPMMDEditor mdID={qNumber+question_choices.length} placeholder="请您输入题目解析" height={155} className=" mt10"
initValue={question_titles} onChange={(val) => this.setState({ question_titles: val})}
ref="titleEditor2"
></TPMMDEditor>
</div>
</div>
)
}
}
// RouteHOC()
export default (ChoquesEditor);

@ -0,0 +1,237 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Tabs,
Input,
Popover
} from "antd";
import './../questioncss/questioncom.css';
import NoneDatas from '../component/NoneDatas';
import LoadingSpin from '../../../common/LoadingSpin';
import Contentquestionbank from "./Contentquestionbank";
import Listjihe from "./Listjihe";
const { TabPane } = Tabs;
const Search = Input.Search;
class Contentpart extends Component {
constructor(props) {
super(props);
this.state = {
page:1,
}
}
//初始化
componentDidMount(){
}
render() {
let {page}=this.state;
let {defaultActiveKey}=this.props;
const content = (
<div className="questiontypes" style={{
width:'93px',
height:'161px',
}}>
<p className="questiontype " onClick={()=>this.props.setitem_types("SINGLE")}>单选题</p>
<p className="questiontypeheng" ></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("MULTIPLE")}>多选题</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("JUDGMENT")}>判断题</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("PROGRAM")}>编程题</p>
<p className="questiontypeheng"></p>
</div>
);
const contents = (
<div className="questiontypes" style={{
width:'93px',
height:'120px',
}}>
<p className="questiontype " onClick={()=>this.props.setdifficulty(1)}>简单</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setdifficulty(2)}>适中</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setdifficulty(3)}>困难</p>
<p className="questiontypeheng"></p>
</div>
);
const buttonWidth = 70;
//console.log("Contentpart");
//console.log(this.props);
return (
<div className=" clearfix mt40">
<div className="educontent mt10 pb20 w1200s">
<div className="w1200ms contentparttit" style={{
position: "relative",
}}>
<style>
{
`
.contentparttit .ant-tabs-nav .ant-tabs-tab{
margin: 10px 10px 10px 0 !important;
}
.contentparttit .ant-tabs-nav .ant-tabs-ink-bar{
width: 31px !important;
left: 14px;
}
`
}
</style>
<Tabs defaultActiveKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
<TabPane tab="我的" key="0">
</TabPane>
</Tabs>
<div className=" mt19" style={{
position:"absolute",
top: "0px",
right:" 0px",
paddingRight: "20px",
}}>
<style>
{
`
.xaxisreverseorder .ant-input-group-addon{
width: 60px !important;
}
.xaxisreverseorder .ant-input-lg {
height: 41px;}
.xaxisreverseorder .ant-popover{
top: 348px !important;
}
.ant-popover-inner-content {
padding:0px !important;
}
`
}
</style>
<div className="xaxisreverseorder">
{
defaultActiveKey===0||defaultActiveKey==="0"?
<a href={'/question/newitem'}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
:""
}
<Popover placement="bottom" content={contents} trigger="click" visible={this.props.visiblemys} onVisibleChange={()=>this.props.handleVisibleChange(true)}>
<div className=" sortinxdirection mr10">
<div className="subjecttit">
难度
</div>
<i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
</div>
</Popover>
<Popover placement="bottom" content={content} trigger="click" visible={this.props.visiblemyss} onVisibleChange={()=>this.props.handleVisibleChanges(true)}>
<div className="sortinxdirection mr40">
<div className="subjecttit">
题型
</div>
<i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
</div>
</Popover>
<Search
style={{ width: "347px",marginRight:"60px",}}
placeholder="请输入题目名称、内容"
enterButton
size="large"
onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)} />
</div>
</div>
</div>
{/*内容*/}
{
this.props.Contentdata.items === undefined ||this.props.Contentdata.items === null||this.props.Contentdata.items.length===0 ?
<div className=" w100s mb10"></div>
:
<div className=" w100s mb10">
{
defaultActiveKey===1||defaultActiveKey==="1"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()}></Contentquestionbank>
:""
}
{
defaultActiveKey===0||defaultActiveKey==="0"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()}></Contentquestionbank>
:""
}
</div>
}
<div className="minheight">
{/*列表集合*/}
<div className=" w100s">
{
this.props.booljupyterurls===true?
<LoadingSpin></LoadingSpin>
:
this.props.Contentdata.items === undefined ||this.props.Contentdata.items === null||this.props.Contentdata.items.length===0?
<NoneDatas></NoneDatas>
: this.props.Contentdata.items.map((object, index) => {
return (
<Listjihe {...this.state} {...this.props} items={object}
getitem_basketss={(id)=>this.props.getitem_basketss(id)}
getitem_baskets={(e)=>this.props.getitem_baskets(e)}
showmodels={(e)=>this.props.showmodels(e)}
showmodelysl={(e)=>this.props.showmodelysl(e)}>
</Listjihe>
)
})}
</div>
</div>
</div>
</div>
)
}
}
export default Contentpart

@ -0,0 +1,70 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Radio,
Checkbox
} from "antd";
import './../questioncss/questioncom.css';
class Contentquestionbank extends Component {
constructor(props) {
super(props);
this.state = {
page:1,
}
}
//初始化
componentDidMount(){
////console.log("componentDidMount");
////console.log(this.state);
////console.log(this.props);
// let homeworkid = this.props.match.params.homeworkid;
// let url = "/homework_commons/" + homeworkid + "/end_groups.json";
// axios.get(url).then((response) => {
// if (response.status === 200) {
// this.setState({})
// }
// }).catch((error) => {
// ////console.log(error)
// });
}
onChange=(e)=> {
////console.log(`checked = ${e.target.checked}`);
}
render() {
let {page}=this.state;
return (
<div className=" clearfix mt5 Contentquestionbankstyle">
<div className="educontent mt10 w100s">
<div className="sortinxdirection w100s" >
<div className="sortinxdirection w50s">
<Checkbox onChange={()=>this.props.selectallquestionsonthispage()}></Checkbox>
<p className="setequesbank ml20">选用本页全部试题</p>
</div>
<div className="xaxisreverseorder testpaper w50s">
{this.props.items_count?this.props.items_count:0}个试题
</div>
</div>
</div>
</div>
)
}
}
export default Contentquestionbank ;

@ -0,0 +1,277 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
} from "antd";
import './../questioncss/questioncom.css';
class Headplugselection extends Component {
constructor(props) {
super(props);
this.state = {
page:1,
titlestting:"全部",
titlesttingid:null,
titlesttings:null,
titlesttingss:null,
}
}
//初始化
componentDidMount(){
}
//
// setdiscipline_id={(e)=>this.setdiscipline_id(e)}
// setsub_discipline_id={(e)=>this.setsub_discipline_id(e)}
// settag_discipline_id={(e)=>this.settag_discipline_id(e)}
settitlestting=(name,id)=>{
//如果全部其他的选项重置
this.setState({
titlestting:name,
titlesttingid:id,
titlesttings:null,
titlesttingsid:null,
titlesttingss:null,
titlesttingssid:null
})
if(name==="全部"){
this.props.setdiscipline_id(null);
}else{
this.props.setdiscipline_id(id);
}
}
settitlesttings=(name,id)=>{
//课程选项
this.setState({
titlesttings:name,
titlesttingsid:id,
titlesttingss:null,
})
this.props.setsub_discipline_id(id);
}
settitlesttingss=(name,id)=>{
//知识点
if(this.state.titlesttings===null){
this.props.showNotification('请先选择课程');
return
}
this.setState({
titlesttingss:name,
titlesttingssid:id
})
this.props.settag_discipline_id(id);
}
render() {
let {page,titlestting,titlesttings,titlesttingss}=this.state;
// console.log("Headplugselection");
// console.log(this.props.disciplinesdata);
// disciplinesdatakc:kc,
// disciplinesdatazsd:zsd,
var kc=0;
var zsd=0;
if(this.props.disciplinesdata){
const didata = this.props.disciplinesdata;
for (var i = 0; i < didata.length; i++) {
//方向
const fxdidata = didata[i].sub_disciplines;
if(titlestting===didata[i].name){
for (var j = 0; j < fxdidata.length; j++) {
kc=kc+1;
//课程
const zsddata = fxdidata[j].tag_disciplines;
for (var k = 0; k < zsddata.length; k++) {
//知识点
zsd=zsd+1;
}
}
}else if(titlestting==="全部"){
kc=kc+1;
zsd=zsd+1;
}else{
}
}
}
return (
<div className=" clearfix mt21 ">
<div className="educontent w1200dbl">
<div className="clearfix edu-back-white tophoms">
{/*课程*/}
<div className=" sortinxdirection">
<div className="w60 tophomsembolds">
方向
</div>
<div className="sortinxdirection minleng40">
<div className={titlestting==="全部"?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlestting("全部",null)}>
全部
</div>
{this.props.disciplinesdata&&this.props.disciplinesdata.map((object, index) => {
return (
<div className={titlestting===object.name?" xiaoshou titlesttingcss":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlestting(object.name,object.id)}>
{object.name}
</div>
)
})}
</div>
</div>
{/*课程*/}
{
kc===0?
""
:
<div className="mt30 sortinxdirection">
<div className="w60 tophomsembolds">
课程
</div>
<div className="sortinxdirection minleng40">
{this.props.disciplinesdata&&this.props.disciplinesdata.map((objectn, index) => {
return (
titlestting==="全部"?
objectn.sub_disciplines&&objectn.sub_disciplines.map((object, indexs) => {
return (
<div className={index===0&&indexs===0&&titlesttings===object.name?"titlesttingcss xiaoshou":index===0&&indexs===0&&titlesttings!==object.name?"titlesttingcssmy xiaoshou"
:titlesttings===object.name?" titlesttingcss xiaoshou":"titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttings(object.name,object.id)}>
{object.name}
</div>
)
})
:
objectn.name===titlestting?
objectn.sub_disciplines&&objectn.sub_disciplines.map((object, indexs) => {
return (
<div className={index===0&&indexs===0&&titlesttings===object.name?"titlesttingcss xiaoshou":index===0&&indexs===0&&titlesttings!==object.name?"titlesttingcssmy xiaoshou"
:titlesttings===object.name?" titlesttingcss xiaoshou":"titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttings(object.name,object.id)}>
{object.name}
</div>
)
})
: ""
)
})}
</div>
</div>
}
{/*知识点*/}
{
zsd===0?
""
:<div className="mt30 sortinxdirection">
<div className="w60 tophomsembolds">
知识点
</div>
<div className="sortinxdirection minleng40">
{this.props.disciplinesdata&&this.props.disciplinesdata.map((objecta, index) => {
return (
titlestting==="全部"&&titlesttings===null?
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
return (
objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => {
return (
<div className={index===0&&indexs===0&&indexss===0&&titlesttingss===object.name?"titlesttingcss xiaoshou":
index===0&&indexs===0&&indexss===0&&titlesttingss!==object.name?"titlesttingcssmy xiaoshou"
:titlesttingss===object.name?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttingss(object.name)}>
{object.name}
</div>
)
})
)
})
:titlestting==="全部"&&titlesttings!==null?
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
return (
titlesttings===objectb.name?
objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => {
return (
<div className={index===0&&indexs===0&&indexss===0&&titlesttingss===object.name?"titlesttingcss xiaoshou":
index===0&&indexs===0&&indexss===0&&titlesttingss!==object.name?"titlesttingcssmy xiaoshou"
:titlesttingss===object.name?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttingss(object.name)}>
{object.name}
</div>
)
}):""
)
})
: titlestting!=="全部"&&titlesttings!==null?
titlestting===objecta.name?
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
return (
titlesttings===objectb.name?
objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => {
return (
<div className={index===0&&indexs===0&&indexss===0&&titlesttingss===object.name?"titlesttingcss xiaoshou":
index===0&&indexs===0&&indexss===0&&titlesttingss!==object.name?"titlesttingcssmy xiaoshou"
:titlesttingss===object.name?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttingss(object.name)}>
{object.name}
</div>
)
}):""
)
})
:""
: titlestting!=="全部"&&titlesttings===null?
titlestting===objecta.name?
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
return (
objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => {
return (
<div className={index===0&&indexs===0&&indexss===0&&titlesttingss===object.name?"titlesttingcss xiaoshou":
index===0&&indexs===0&&indexss===0&&titlesttingss!==object.name?"titlesttingcssmy xiaoshou"
:titlesttingss===object.name?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttingss(object.name)}>
{object.name}
</div>
)
})
)
})
:""
:""
)
})}
</div>
</div>
}
</div>
</div>
</div>
)
}
}
export default Headplugselection ;

@ -0,0 +1,604 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Radio,
Checkbox,
Form,
Input,
Select,
Cascader,
Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag
} from "antd";
import './../questioncss/questioncom.css';
const InputGroup = Input.Group;
const {Option} = Select;
const options = [
{
value: '方向',
label: '方向',
children: [
{
value: '课程',
label: '课程',
},
],
},
{
value: 'jiangsu',
label: 'Jiangsu',
children: [
{
value: 'nanjing',
label: 'Nanjing',
},
],
},
];
class Itembankstop extends Component {
constructor(props) {
super(props);
this.contentMdRef = React.createRef()
this.state = {
page: 1,
Knowpoints: [],
rbtx: undefined,
rbkc: undefined,
knowledgepoints: [],
options: [],
}
}
//初始化
componentDidMount() {
try {
this.props.getcontentMdRef(this);
} catch (e) {
}
this.setState({
options: this.props.disciplmy
})
// knowledgepoints:this.props.knowledgepoints,
////console.log("componentDidMount");
////console.log(this.state);
////console.log(this.props);
// let homeworkid = this.props.match.params.homeworkid;
// let url = "/homework_commons/" + homeworkid + "/end_groups.json";
// axios.get(url).then((response) => {
// if (response.status === 200) {
// this.setState({})
// }
// }).catch((error) => {
// ////console.log(error)
// });()
// 题型
}
componentDidUpdate(prevProps) {
if (prevProps.item_banksedit !== this.props.item_banksedit) {
if (this.props.item_banksedit.item_type) {
this.handleFormtixing(this.props.item_banksedit.item_type);
}
if (this.props.item_banksedit.difficulty) {
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
}
if (this.props.item_banksedit.tag_disciplines) {
this.handletag_disciplinesChange(this.props.item_banksedit.tag_disciplines);
}
if (this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline) {
this.handdisciplinesChange(this.props.item_banksedit.discipline,this.props.item_banksedit.sub_discipline);
}
}
if (prevProps.disciplmy !== this.props.disciplmy) {
this.setState({
options: this.props.disciplmy
})
}
}
handdisciplinesChange =(name,title)=>{
this.setState({
rbkc:[name.id,title.id]
})
this.props.form.setFieldsValue({
rbkc: [name.id,title.id],
});
if(this.props.item_banksedit.tag_disciplines.length===0){
const didata = this.props.disciplinesdata;
const knowledgepointsdata = [];
for (var i = 0; i < didata.length; i++) {
//方向
if (name.id === didata[i].id) {
const fxdidata = didata[i].sub_disciplines;
for (var j = 0; j < fxdidata.length; j++) {
//课程
if (title.id === fxdidata[j].id) {
const zsddata = fxdidata[j].tag_disciplines;
for (var k = 0; k < zsddata.length; k++) {
//知识点
knowledgepointsdata.push(zsddata[k]);
}
}
}
}
}
this.setState({
Knowpoints: [],
knowledgepoints: knowledgepointsdata,
})
}
}
handletag_disciplinesChange = (data) => {
try {
var sju=data[data.length-1].name;
this.setState({
rbzsd:sju,
Knowpoints:data,
})
this.props.form.setFieldsValue({
rbzsd: sju,
});
}catch (e) {
}
}
onChange = (e) => {
}
Getdatas = () => {
return this.handleSubmits();
}
handleSubmits = () => {
var data = [];
this.props.form.validateFields((err, values) => {
data = []
if (!err) {
// ////console.log("获取的form 数据");
// ////console.log(values);
data.push({
rbnd: parseInt(values.rbnd)
})
data.push({
rbtx: values.rbtx
})
data.push({
rbzsd: this.state.Knowpoints
})
data.push({
rbkc: values.rbkc
})
}
});
return data;
}
handleSubmit = (e) => {
e.preventDefault();
this.props.form.validateFields((err, values) => {
if (!err) {
////console.log("获取的form 数据");
////console.log(values);
}
});
}
handleFormLayoutChange = (value) => {
//难度塞选
////console.log("难度塞选");
////console.log(value);
this.props.form.setFieldsValue({
rbnd: value + "",
});
this.setState({
rbnd: value + "",
})
}
handleFormkechen = (value) => {
//课程
////console.log("课程");
////console.log(value);
var valuename = undefined;
this.props.form.setFieldsValue({
rbzsd: value,
});
var arr = this.state.knowledgepoints;
for (let data of arr) {
if (data.id === value) {
this.state.Knowpoints.push(data);
valuename = data.name;
}
}
var tmp = JSON.parse(JSON.stringify(this.state.knowledgepoints));
for (var i = 0; i < tmp.length; i++) {
if (tmp[i].id === value) {
this.state.knowledgepoints.splice(i, 1);
}
}
this.setState({
rbzsd: valuename,
Knowpoints: this.state.Knowpoints,
knowledgepoints: this.state.knowledgepoints,
})
}
handleFormzhishidian = (value) => {
console.log("handleFormzhishidian 课程");
console.log(value);
//课程
this.props.form.setFieldsValue({
rbkc: value,
});
this.setState({
rbkc:value,
})
// console.log("handleFormzhishidian");
// console.log(this.props.disciplinesdata);
const didata = this.props.disciplinesdata;
const knowledgepointsdata = [];
for (var i = 0; i < didata.length; i++) {
//方向
if (value[0] === didata[i].id) {
const fxdidata = didata[i].sub_disciplines;
for (var j = 0; j < fxdidata.length; j++) {
//课程
if (value[1] === fxdidata[j].id) {
const zsddata = fxdidata[j].tag_disciplines;
for (var k = 0; k < zsddata.length; k++) {
//知识点
knowledgepointsdata.push(zsddata[k]);
}
}
}
}
}
this.setState({
Knowpoints: [],
knowledgepoints: knowledgepointsdata,
})
this.props.form.setFieldsValue({
rbzsd: undefined,
});
this.setState({
rbzsd: undefined,
})
}
handleFormtixing = (value) => {
//题型
//console.log("题型");
//console.log(value);
this.setState({
rbtx: value + "",
})
this.props.form.setFieldsValue({
rbtx: value + "",
});
this.props.setitem_type(value);
}
preventDefault = (e) => {
e.preventDefault();
////console.log('Clicked! But prevent default.');
}
deletesobject = (item, index) => {
var arr = this.state.Knowpoints;
for (let data of arr) {
if (data.id === item.id) {
this.state.knowledgepoints.push(data);
}
}
var tmp = JSON.parse(JSON.stringify(this.state.Knowpoints));
for (var i = 0; i < tmp.length; i++) {
if (i >= index) {
var pos = this.state.Knowpoints.indexOf(tmp[i]);
this.state.Knowpoints.splice(pos, 1);
}
}
this.props.form.setFieldsValue({
rbzsd: this.state.Knowpoints,
});
this.setState({
Knowpoints: this.state.Knowpoints,
})
if (this.state.Knowpoints.length === 0) {
this.setState({
rbzsd: undefined,
})
} else if (this.state.Knowpoints.length > 0) {
try {
const myknowda = this.state.Knowpoints;
this.setState({
rbzsd: myknowda[this.state.Knowpoints.length - 1].name,
})
} catch (e) {
}
}
}
render() {
let {page, options} = this.state;
const {getFieldDecorator} = this.props.form;
//console.log("renderrenderrender");
//console.log(this.props.item_banksedit);
//console.log("renderrenderrendersssss");
//console.log(this.state.rbtx);
return (
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200fpx mt19">
<style>
{
`
.ant-form-item{
margin-bottom: 0px !important;
}
.ant-form-explain{
padding-left:0px !important;
margin-top: 3px !important;
}
.ant-select-selection{
height: 33px !important;
}
.ant-input-group{
width:258px !important;
}
.ant-input {
height: 33px !important;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {
outline: 0px solid rgba(24, 144, 255, 0.06) !important;
}
`
}
</style>
<div className="h12"></div>
<Form.Item
label="课程"
>
{getFieldDecorator("rbkc",
{
rules: [{required: true, message: '请选择课程'}],
}
)(
<div className="sortinxdirection">
<InputGroup compact>
<Cascader style={{width: '258px'}} value={this.state.rbkc} options={options} onChange={this.handleFormzhishidian}
placeholder="请选择..."/>
</InputGroup>
{/*<div className="sortinxdirection" style={{*/}
{/* height: "33px",*/}
{/* lineHeight: "28px",*/}
{/*}}>*/}
{/* {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => {*/}
{/* return (*/}
{/* <div className="mytags" style={{*/}
{/* position: "relative",*/}
{/* }}>*/}
{/* <p className="w100s stestcen lh32">{object}</p>*/}
{/* <i className="iconfont icon-roundclose font-25 lg ml7 icondowncolorss" onClick={()=>this.deletesobject(object,index)}></i>*/}
{/* </div>*/}
{/* )*/}
{/* })}*/}
{/*</div>*/}
</div>
)}
</Form.Item>
<Form onSubmit={this.handleSubmit}>
<Form.Item
label="知识点"
>
{getFieldDecorator("rbzsd"
)(
<div className="sortinxdirection">
<InputGroup compact>
<Select style={{width: '258px'}} value={this.state.rbzsd} onChange={this.handleFormkechen}
placeholder="请选择...">
{this.state.knowledgepoints && this.state.knowledgepoints.map((object, index) => {
return (
<Option value={object.id}>{object.name}</Option>
)
})}
</Select>
</InputGroup>
<div className="sortinxdirection" style={{
height: "33px",
lineHeight: "28px",
}}>
{this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => {
return (
<div className="mytags" style={{
position: "relative",
}}>
<p className="w100s stestcen lh32">{object.name}</p>
<i className="iconfont icon-roundclose font-25 lg ml7 icondowncolorss"
onClick={() => this.deletesobject(object, index)}></i>
</div>
)
})}
</div>
</div>
)}
</Form.Item>
<Form.Item
label="题型"
>
{getFieldDecorator("rbtx",
{
rules: [{required: true, message: '请选择题型'}],
}
)(
<InputGroup compact>
<Select style={{width: '258px'}} value={this.state.rbtx} onChange={this.handleFormtixing}
placeholder="请选择...">
<Option value="SINGLE">单选题</Option>
<Option value="MULTIPLE">多选题</Option>
<Option value="JUDGMENT">判断题</Option>
<Option value="PROGRAM">编程题</Option>
</Select>
</InputGroup>
)}
</Form.Item>
<style>
{
`
.rbndclass .ant-radio-button-wrapper{
width:106px !important;
height:33px !important;
background:#EEEEEE;
border-radius:17px !important;
color:#333333;
text-align: center !important;
border:0px !important;
margin-right: 27px !important;
margin-top: 6px !important;
}
.rbndclass .ant-radio-button-wrapper-checked {
width: 106px !important;
height: 33px !important;
background: #4CACFF !important;
border-radius: 17px !important;
text-align: center !important;
border:0px !important;
color: #ffffff !important;
margin-right: 27px !important;
margin-top: 6px!important;
}
.rbndclass .ant-radio-button-wrapper:not(:first-child)::before{
border:0px !important;
width:0px !important;
}
.rbndclass .ant-radio-button-wrapper{
border:0px !important;
}
.rbndclass .ant-radio-group{
border:0px !important;
}
.rbndclass .ant-radio-group label{
border:0px !important;
}
.rbndclass .ant-radio-group span{
border:0px !important;
}
ant-radio-button-wrapper:focus-within {
outline: 0px solid #ffffff;
}
`
}
</style>
<div className="rbndclass">
<Form.Item label="难度">
{getFieldDecorator('rbnd',
{
rules: [{required: true, message: '请选择难度'}],
}
)(
<Radio.Group value={this.state.rbnd} onChange={this.handleFormLayoutChange}>
<Radio.Button value="1">简单</Radio.Button>
<Radio.Button value="2">适中</Radio.Button>
<Radio.Button value="3">困难</Radio.Button>
</Radio.Group>,
)}
</Form.Item>
</div>
{/*<Form.Item>*/}
{/* <Button type="primary" htmlType="submit" className="login-form-button">*/}
{/* 提交*/}
{/* </Button>*/}
{/*</Form.Item>*/}
</Form>
<div className="h20"></div>
</div>
)
}
}
const Itembankstops = Form.create({name: 'Itembankstops'})(Itembankstop);
export default Itembankstops;

@ -0,0 +1,402 @@
import React,{ Component } from "react";
import {
Form, Input, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Rate, Checkbox, message,
Row, Col, Select, Modal, Tooltip
} from 'antd';
import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import update from 'immutability-helper'
import './../questioncss/questioncom.css';
import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder';
const { TextArea } = Input;
const confirm = Modal.confirm;
const $ = window.$
const { Option } = Select;
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
//题库的试卷 判断题 组件
class JudquestionEditor extends Component{
constructor(props){
super(props);
/**
choice_id: 32076
choice_position: 1
choice_text: "1"
standard_boolean: true
*/
const {question_choices} = this.props;
let _standard_answers = undefined;
let _question_choices = undefined;
if (question_choices) {
_standard_answers = []
_question_choices = []
question_choices.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
_question_choices.push(item.choice_text)
})
}
this.state = {
question_choices: _question_choices || ['', '', '', ''],
standard_answers: _standard_answers || [false, false, false, false],
question_title: this.props.question_title || '',
question_type: this.props.question_type || 0,
question_score: this.props.question_score || this.props.init_question_score,
question_titles:this.props.question_titles||'',
zqda:null,
item_banksedit:[],
mychoicess:[],
}
}
addOption = () => {
const { question_choices, standard_answers } = this.state;
// //////console.log("addOption");
// //////console.log(question_choices);
// //////console.log(standard_answers);
question_choices.push('')
standard_answers.push(false)
this.setState({ question_choices, standard_answers })
}
deleteOption = (index) => {
let {question_choices}=this.state;
// //////console.log("deleteOption");
// //////console.log(question_choices);
if(question_choices[index]===""){
// repeat code
this.toMDMode(null)
this.setState(
(prevState) => ({
question_choices : update(prevState.question_choices, {$splice: [[index, 1]]}),
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}else{
this.props.confirm({
content: `确认要删除这个选项吗?`,
onOk: () => {
this.toMDMode(null)
this.setState(
(prevState) => ({
question_choices : update(prevState.question_choices, {$splice: [[index, 1]]}),
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}
})
}
}
onSave = () => {
var editordata=[];
const {question_title, question_score, question_type,question_titles, zqda,question_choices, standard_answers } = this.state;
const { question_id_to_insert_after, question_id } = this.props
// TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) {
this.refs['titleEditor'].showError()
this.props.showNotification('请您输入题干');
return editordata;
}
if(zqda===null) {
this.props.showNotification('请先点击选择本选择题的正确选项');
return editordata;
}
if(!question_titles) {
this.refs['titleEditor2'].showError()
this.props.showNotification('请您输入题目解析');
return editordata;
}
/**
{
"question_title":"同学朋友间常用的沟通工具是什么?",
"question_type":1,
"question_score":5,
"question_choices":["a答案","b答案","c答案","d答案"],
"standard_answers":[1]
}*/
editordata=[question_title,zqda,question_titles];
// question_title,
// question_type: answerArray.length > 1 ? 1 : 0,
// question_score,
// question_choices,
// standard_answers: answerArray,
// insert_id: question_id_to_insert_after || undefined
return editordata;
}
onCancel = () => {
this.props.onEditorCancel()
}
componentDidMount = () => {
try {
this.props.getanswerMdRef(this);
}catch (e) {
}
try {
this.setState({
item_banksedit:this.props.item_banksedit,
question_title:this.props.item_banksedit.name,
question_titles:this.props.item_banksedit.analysis,
mychoicess:this.props.item_banksedit.choices,
})
if(this.props.item_banksedit){
if(this.props.item_banksedit.choices){
for(var ik=0;ik<this.props.item_banksedit.choices.length;ik++ ){
if( this.props.item_banksedit.choices[ik].choice_text==="正确"){
if( this.props.item_banksedit.choices[ik].is_answer===true){
this.setState({
zqda:"0"
})
}
}else{
if( this.props.item_banksedit.choices[ik].is_answer===true){
this.setState({
zqda:"1"
})
}
}
}
}
}
}catch (e) {
}
}
componentDidUpdate(prevProps) {
//console.log("componentDidUpdate");
//console.log(prevProps);
//console.log(this.props.item_banksedit);
if(prevProps.item_banksedit !== this.props.item_banksedit){
this.setState({
item_banksedit:this.props.item_banksedit,
question_title:this.props.item_banksedit.name,
question_titles:this.props.item_banksedit.analysis,
mychoicess:this.props.item_banksedit.choices,
})
if(this.props.item_banksedit){
if(this.props.item_banksedit.choices){
for(var ik=0;ik<this.props.item_banksedit.choices.length;ik++ ){
if( this.props.item_banksedit.choices[ik].choice_text==="正确"){
if( this.props.item_banksedit.choices[ik].is_answer===true){
this.setState({
zqda:"0"
})
}
}else{
if( this.props.item_banksedit.choices[ik].is_answer===true){
this.setState({
zqda:"1"
})
}
}
}
}
}
}
}
onOptionClick = (index) => {
let standard_answers = this.state.standard_answers.slice(0);
// //////console.log("onOptionClick");
// //////console.log(standard_answers);
// //////console.log(standard_answers[index]);
// //////console.log(!standard_answers[index]);
for (var i=0;i<standard_answers.length;i++){
if(index===i){
standard_answers[index] = true;
}else{
standard_answers[i] = false;
}
}
// standard_answers[index] = !standard_answers[index];
this.setState({ standard_answers })
}
onOptionContentChange = (value, index) => {
if (index >= this.state.question_choices.length) {
// TODO 新建然后删除CD选项再输入题干会调用到这里且index是3
return;
}
let question_choices = this.state.question_choices.slice(0);
question_choices[index] = value;
this.setState({ question_choices })
}
on_question_score_change = (e) => {
this.setState({ question_score: e })
}
toMDMode = (that) => {
if (this.mdReactObject) {
let mdReactObject = this.mdReactObject;
this.mdReactObject = null
mdReactObject.toShowMode()
}
this.mdReactObject = that;
}
toShowMode = () => {
}
handleFormLayoutChange=(e)=>{
//////console.log("难度塞选");
//////console.log(value);
this.setState({
zqda:e.target.value,
})
}
render() {
let { question_title, question_score, question_type, question_choices, standard_answers,question_titles} = this.state;
let { question_id, index, exerciseIsPublish,
// question_title,
// question_type,
// question_score,
isNew } = this.props;
// const { getFieldDecorator } = this.props.form;
// const isAdmin = this.props.isAdmin()
// const courseId=this.props.match.params.coursesId;
// const isEdit = !!this.props.question_id
const qNumber = `question_`;
// TODO show模式 isNew为false isEdit为false
// [true, false, true] -> [0, 2]
const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1);
// //////console.log("xuanzheshijuan");
// //////console.log(answerTagArray);
// //////console.log(!exerciseIsPublish);
const params= this.props&&this.props.match&&this.props.match.params;
return(
<div className="padding20-30 signleEditor danxuano" id={qNumber}>
<style>{`
.optionMdEditor {
flex:1
}
.optionRow {
margin:0px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;
word-break:break-all;
}
#e_tips_mdEditor_question_undefined4{
display: none;
}
`}</style>
<p className="mb10 clearfix">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigan fl">题干</span>
</p>
<TPMMDEditor mdID={qNumber} placeholder="请您输入题干" height={155} className=" mt10"
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor>
<div className="mb10 sortinxdirection">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigans fl"><span className="xingtigan">答案选项</span></span>
</div>
<style>
{
`
.choice_textcsss {
border-radius:2px !important;
}
.choice_textcss {
margin-left: 40px !important;
border-radius:2px !important;
}
`
}
</style>
<div className="mb15 sortinxdirection ">
<Radio.Group buttonStyle="solid" value={this.state.zqda} onChange={this.handleFormLayoutChange}>
<Radio.Button value="0" className={"choice_textcsss"}>正确</Radio.Button>
<Radio.Button value="1" className={"choice_textcss"}>错误</Radio.Button>
</Radio.Group>
</div>
<div>
<p className="mb10 clearfix">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigan fl">题目解析</span>
</p>
<style>{`
.optionMdEditor {
flex:1
}
.optionRow {
margin:0px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;
word-break:break-all;
}
`}</style>
<TPMMDEditor mdID={qNumber+question_choices.length} placeholder="请您输入题目解析" height={155} className=" mt10"
initValue={question_titles} onChange={(val) => this.setState({ question_titles: val})}
ref="titleEditor2"
></TPMMDEditor>
</div>
</div>
)
}
}
// RouteHOC()
export default (JudquestionEditor);

@ -0,0 +1,174 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl,markdownToHTML} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Radio
} from "antd";
import './../questioncss/questioncom.css';
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class Listjihe extends Component {
constructor(props) {
super(props);
this.state = {
page:1,
name:"单选题",
nd:"简单",
chakanjiexibool:false,
}
}
//初始化
componentDidMount(){
}
chakanjiexibool=()=>{
if(this.state.chakanjiexibool===true){
this.setState({
chakanjiexibool:false
})
}else{
this.setState({
chakanjiexibool:true
})
}
}
//选用
Selectingpracticaltraining=(id)=>{
let data={
item_ids:[id]
}
this.props.getitem_baskets(data);
}
//撤销
Selectingpracticaltrainings=(id)=>{
this.props.getitem_basketss(id);
}
render() {
let {page,name,nd,chakanjiexibool}=this.state;
let {defaultActiveKey,items}=this.props;
////console.log("Listjihe");
////console.log(this.props);
return (
<div className={chakanjiexibool===true?"w100s borderwds283 pd20 mb20":"w100s borderwds pd20 mb20"}>
{/*顶部*/}
<div className="w100s sortinxdirection">
<div className="w70s listjihetixingstit markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}>
</div>
<div className="w30s xaxisreverseorder">
<p className="listjihetixing">难度<span className="listjihetixings">{items.difficulty===1?"简单":items.difficulty===2?"适中":items.difficulty===3?"困难":""}</span></p>
<p className="mr30 listjihetixing">题型<span className="listjihetixings">{items.item_type==="SINGLE"?"单选题":items.item_type==="MULTIPLE"?"多选题":items.item_type==="JUDGMENT"?"判断题":items.item_type==="PROGRAM"?"编程题":""}</span></p>
</div>
</div>
{/*内容*/}
<div className="w100s sortinxdirection">
<p className="w100s listjihetixingstits sortinxdirection ">
{
items.item_type==="JUDGMENT"?
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className={index===1? "sortinxdirection ml10":"sortinxdirection " } >
<Radio checked={object.is_answer}>
{object.choice_text}
</Radio>
</p>
)
})
:
items === undefined ||items === null? "" : items.choices.map((object, index) => {
return (
<p className="sortinxdirection ml10" >
{tagArray[index]}
<p style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(object.choice_text).replace(/▁/g, "▁▁▁")}}></p>
</p>
)
})
}
</p>
</div>
{/*更新时间*/}
<div className="w100s sortinxdirection mt22">
<div className="w50s listjihetixingstit sortinxdirection">
<p className="updatetimes lh30">更新时间{items.update_time}</p>
<p className="updatetimes lh30 ml45">创建者{items.author.name}</p>
</div>
<div className="w50s xaxisreverseorder">
{
items.choosed===true?
<p className="selectionss xiaoshou" onClick={()=>this.Selectingpracticaltrainings(items.id)}>
<i className="iconfont icon-jianhao font-12 lg ml7 lh30 icontianjiadaohangcolor mr10"></i>
<span>撤销</span></p>
:
<p className="selection xiaoshou" onClick={()=>this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr10"></i>
<span>选用</span></p>
}
{
defaultActiveKey===0||defaultActiveKey==="0"?
<div className="xaxisreverseorder">
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.showmodelysl(items.id)}>
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
<a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25" >
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
<p className="viewparsings xiaoshou mr25" onClick={()=>this.props.showmodels(items.id)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</p>
</div>
:""
}
<p className="viewparsings xiaoshou mr25" onClick={()=>this.chakanjiexibool()}>
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
查看解析</p>
</div>
</div>
{
chakanjiexibool===true?<div>
<div className="w100s questiontypeheng mt23">
</div>
<p className="analysis mt22">解析</p>
<p className="mt15 testfondex"
style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items.analysis).replace(/▁/g, "▁▁▁")}}
>
</p>
</div>:""
}
</div>
)
}
}
export default Listjihe;

@ -0,0 +1,37 @@
import React, { Component } from 'react';
import { getImageUrl , getUrl } from 'educoder';
class NoneData extends Component{
constructor(props) {
super(props)
}
render(){
const { style } = this.props;
return(
<div className="edu-tab-con-box clearfix edu-txt-center intermediatecenter" style={ style || { width:"100%",height:"100%"}}>
<style>
{`
.edu-tab-con-box{
padding:100px 0px;
}
.ant-modal-body .edu-tab-con-box{
padding:0px!important;
}
img.edu-nodata-img{
margin: 40px auto 20px;
}
.zenwuxgsj{
font-size:17px;
font-family:MicrosoftYaHei;
color:rgba(136,136,136,1);
}
`}
</style>
<img className="edu-nodata-img mb20" src={getUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb10 zenwuxgsj">暂无相关数据</p>
<p className="edu-nodata-p mb20 mt4 zenwuxgsj">请选择试题进行组卷</p>
</div>
)
}
}
export default NoneData;

@ -0,0 +1,36 @@
import React, { Component } from 'react';
import { getImageUrl , getUrl } from 'educoder';
class NoneDatas extends Component{
constructor(props) {
super(props)
}
render(){
const { style } = this.props;
return(
<div className="edu-tab-con-box clearfix edu-txt-center intermediatecenter" style={ style || { width:"100%",height:"100%"}}>
<style>
{`
.edu-tab-con-box{
padding:100px 0px;
}
.ant-modal-body .edu-tab-con-box{
padding:0px!important;
}
img.edu-nodata-img{
margin: 40px auto 20px;
}
.zenwuxgsj{
font-size:17px;
font-family:MicrosoftYaHei;
color:rgba(136,136,136,1);
}
`}
</style>
<img className="edu-nodata-img mb20" src={getUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb10 zenwuxgsj">暂无相关数据</p>
</div>
)
}
}
export default NoneDatas;

@ -0,0 +1,43 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './../questioncss/questioncom.css'
//立即申请试用
class QuestionModal extends Component {
constructor(props) {
super(props);
this.state={
}
}
render() {
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="442px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titilesm}</p></div>
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titiless}</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 w80" onClick={()=>this.props.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange w80" onClick={()=>this.props.setDownload()}>确定</a>
</div>
</div>
</Modal>
)
}
}
export default QuestionModal;

@ -0,0 +1,66 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './../questioncss/questioncom.css'
//立即申请试用
class QuestionModals extends Component {
constructor(props) {
super(props);
this.state={
}
}
render() {
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsTypes===undefined?false:this.props.modalsTypes}
width="442px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p className="titiles">是否删除试题栏中{
this.props.titilesms&&this.props.titilesms==="SINGLE"?
"单选题"
:
this.props.titilesms&&this.props.titilesms==="MULTIPLE"?
"多选题"
:
this.props.titilesms&&this.props.titilesms==="JUDGMENT"?
"判断题"
:
this.props.titilesms&&this.props.titilesms==="COMPLETION"?
"填空题"
:
this.props.titilesms&&this.props.titilesms==="SUBJECTIVE"?
"简答题"
:
this.props.titilesms&&this.props.titilesms==="PROGRAM"?
"编程题"
:
this.props.titilesms&&this.props.titilesms==="PRACTICAL"?
"实训题"
:""
}</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 w80" onClick={()=>this.props.modalCancels()}>取消</a>
<a className="task-btn task-btn-orange w80" onClick={()=>this.props.setDownloads(this.props.titilesms)}>确定</a>
</div>
</div>
</Modal>
)
}
}
export default QuestionModals;

@ -0,0 +1,395 @@
import React,{ Component } from "react";
import {
Form, Input, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Rate, Checkbox, message,
Row, Col, Select, Modal, Tooltip
} from 'antd';
import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import update from 'immutability-helper'
import './../questioncss/questioncom.css';
import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder';
const { TextArea } = Input;
const confirm = Modal.confirm;
const $ = window.$
const { Option } = Select;
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
//题库的试卷 单选题 组件
class SingleEditor extends Component{
constructor(props){
super(props);
/**
choice_id: 32076
choice_position: 1
choice_text: "1"
standard_boolean: true
*/
const {question_choices} = this.props;
let _standard_answers = undefined;
let _question_choices = undefined;
if (question_choices) {
_standard_answers = []
_question_choices = []
question_choices.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
_question_choices.push(item.choice_text)
})
}
const choicescomy=[];
try {
if(this.props.item_banksedit){
if(this.props.item_banksedit.choices){
this.props.item_banksedit.choices.forEach((item, index) => {
//console.log("SingleEditor");
//console.log(item);
choicescomy.push({
choice_text:item.choice_text,
standard_boolean:item.is_answer,
})
})
_standard_answers = []
_question_choices = []
choicescomy.forEach((item, index) => {
_standard_answers.push(item.standard_boolean)
_question_choices.push(item.choice_text)
})
}
}
}catch (e) {
}
this.state = {
question_choices: _question_choices || ['', '', '', ''],
standard_answers: _standard_answers || [false, false, false, false],
question_title: this.props.question_title || '',
question_type: this.props.question_type || 0,
question_score: this.props.question_score || this.props.init_question_score,
question_titles:this.props.question_titles||'',
item_banksedit:[],
}
}
addOption = () => {
const { question_choices, standard_answers } = this.state;
// ////console.log("addOption");
// ////console.log(question_choices);
// ////console.log(standard_answers);
question_choices.push('')
standard_answers.push(false)
this.setState({ question_choices, standard_answers })
}
deleteOption = (index) => {
let {question_choices}=this.state;
// ////console.log("deleteOption");
// ////console.log(question_choices);
if(question_choices[index]===""){
// repeat code
this.toMDMode(null)
this.setState(
(prevState) => ({
question_choices : update(prevState.question_choices, {$splice: [[index, 1]]}),
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}else{
this.toMDMode(null)
this.setState(
(prevState) => ({
question_choices : update(prevState.question_choices, {$splice: [[index, 1]]}),
standard_answers : update(prevState.standard_answers, {$splice: [[index, 1]]})
})
)
}
}
onSave = () => {
var editordata=[];
const {question_title, question_score, question_type,question_titles, question_choices, standard_answers } = this.state;
const { question_id_to_insert_after, question_id } = this.props
// TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) {
this.refs['titleEditor'].showError()
this.props.showNotification('请您输入题干');
return editordata;
}
if(!answerArray || answerArray.length == 0) {
this.props.showNotification('请先点击选择本选择题的正确选项');
return editordata;
}
for(let i = 0; i < question_choices.length; i++) {
if (!question_choices[i]) {
this.refs[`optionEditor${i}`].showError()
this.props.showNotification(`请先输入 ${tagArray[i]} 选项的内容`);
return editordata;
}
}
if(!question_titles) {
this.refs['titleEditor2'].showError()
this.props.showNotification('请您输入题目解析');
return editordata;
}
/**
{
"question_title":"同学朋友间常用的沟通工具是什么?",
"question_type":1,
"question_score":5,
"question_choices":["a答案","b答案","c答案","d答案"],
"standard_answers":[1]
}*/
editordata=[question_title,answerArray,question_choices,question_titles];
// question_title,
// question_type: answerArray.length > 1 ? 1 : 0,
// question_score,
// question_choices,
// standard_answers: answerArray,
// insert_id: question_id_to_insert_after || undefined
return editordata;
}
onCancel = () => {
this.props.onEditorCancel()
}
componentDidMount = () => {
try {
this.props.getanswerMdRef(this);
}catch (e) {
}
try {
this.setState({
item_banksedit:this.props.item_banksedit,
question_title:this.props.item_banksedit.name,
question_titles:this.props.item_banksedit.analysis,
mychoicess:this.props.item_banksedit.choices,
})
}catch (e) {
}
}
componentDidUpdate(prevProps) {
//console.log("componentDidUpdate");
// //console.log(prevProps);
// //console.log(this.props.item_banksedit);
if(prevProps.item_banksedit !== this.props.item_banksedit) {
this.setState({
item_banksedit: this.props.item_banksedit,
question_title: this.props.item_banksedit.name,
question_titles: this.props.item_banksedit.analysis,
mychoicess: this.props.item_banksedit.choices,
})
}
}
onOptionClick = (index) => {
let standard_answers = this.state.standard_answers.slice(0);
// ////console.log("onOptionClick");
// ////console.log(standard_answers);
// ////console.log(standard_answers[index]);
// ////console.log(!standard_answers[index]);
for (var i=0;i<standard_answers.length;i++){
if(index===i){
standard_answers[index] = true;
}else{
standard_answers[i] = false;
}
}
// standard_answers[index] = !standard_answers[index];
this.setState({ standard_answers })
}
onOptionContentChange = (value, index) => {
if (index >= this.state.question_choices.length) {
// TODO 新建然后删除CD选项再输入题干会调用到这里且index是3
return;
}
let question_choices = this.state.question_choices.slice(0);
question_choices[index] = value;
this.setState({ question_choices })
}
on_question_score_change = (e) => {
this.setState({ question_score: e })
}
toMDMode = (that) => {
if (this.mdReactObject) {
let mdReactObject = this.mdReactObject;
this.mdReactObject = null
mdReactObject.toShowMode()
}
this.mdReactObject = that;
}
toShowMode = () => {
}
render() {
let { question_title, question_score, question_type, question_choices, standard_answers,question_titles} = this.state;
let { question_id, index, exerciseIsPublish,
// question_title,
// question_type,
// question_score,
isNew } = this.props;
// const { getFieldDecorator } = this.props.form;
// const isAdmin = this.props.isAdmin()
// const courseId=this.props.match.params.coursesId;
// const isEdit = !!this.props.question_id
const qNumber = `question_`;
// TODO show模式 isNew为false isEdit为false
// [true, false, true] -> [0, 2]
const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1);
// ////console.log("xuanzheshijuan");
// ////console.log(answerTagArray);
// ////console.log(!exerciseIsPublish);
return(
<div className="padding20-30 signleEditor danxuano" id={qNumber}>
<style>{`
.optionMdEditor {
flex:1
}
.optionRow {
margin:0px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;
word-break:break-all;
}
#e_tips_mdEditor_question_undefined4{
display: none;
}
`}</style>
<p className="mb10 clearfix">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigan fl">题干</span>
</p>
<TPMMDEditor mdID={qNumber} placeholder="请您输入题干" height={155} className=" mt10"
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor>
<div className="mb10 sortinxdirection">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigans fl"><span className="xingtigan">答案选项</span></span>
</div>
{question_choices.map( (item, index) => {
const bg = standard_answers[index] ? 'check-option-bg' : ''
return <div className="df optionRow " >
{/* 点击设置答案 */}
{/* TODO 加了tooltip后会丢失掉span的class */}
{/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */}
<span class={`option-item fr mr10 color-grey select-choice ${bg} `}
name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}>
<ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={true}>
<div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div>
</ConditionToolTip>
</span>
{/* </Tooltip> */}
<div style={{ flex: '0 0 1038px'}}>
<DMDEditor
ref={`optionEditor${index}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={166} className={'optionMdEditor'} noStorage={true}
mdID={qNumber + index} placeholder="" onChange={(value) => this.onOptionContentChange(value, index)}
initValue={item}
></DMDEditor>
</div>
{exerciseIsPublish || index<=1?
<i className=" font-18 ml15 mr20"></i>
:<Tooltip title="删除">
<i className="iconfont icon-htmal5icon19 font-18 color-grey-c ml15" onClick={() => this.deleteOption(index)}></i>
</Tooltip> }
{ !exerciseIsPublish && index<7 && <Tooltip title={`新增参考答案`}>
<i className="color-green font-16 iconfont icon-roundaddfill ml6"
onClick={() => this.addOption()}
style={{float: 'right', visibility: index == question_choices.length - 1 ? '' : 'hidden', marginTop: '2px'}}
></i>
</Tooltip>}
</div>
}) }
<div>
<p className="mb10 clearfix">
{/* {!question_id ? '新建' : '编辑'} */}
<span className="xingcolor font-16 fl mr4">*</span>
<span className="xingtigan fl">题目解析</span>
</p>
<style>{`
.optionMdEditor {
flex:1
}
.optionRow {
margin:0px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;
word-break:break-all;
}
`}</style>
<TPMMDEditor mdID={qNumber+question_choices.length} placeholder="请您输入题目解析" height={155} className=" mt10"
initValue={question_titles} onChange={(val) => this.setState({ question_titles: val})}
ref="titleEditor2"
></TPMMDEditor>
</div>
</div>
)
}
}
// RouteHOC()
export default (SingleEditor);

@ -0,0 +1,611 @@
.w1200{
width:1062px;
height:177px;
background:rgba(255,255,255,1);
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
border-radius:2px;
}
.w1200dbl{
width:1062px;
min-height:60px;
background:rgba(255,255,255,1);
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
border-radius:2px;
}
.w1200fpx{
width:1200px;
background:rgba(255,255,255,1);
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
border-radius:2px;
}
.w1200mss{
width:1200px;
}
.w1200ms{
width:1062px;
}
.w1200s{
width:1062px;
background:rgba(255,255,255,1);
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
border-radius:2px;
}
.h177{
height: 177px;
}
/* 中间居中 */
.intermediatecenter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 简单居中 */
.intermediatecenterysls{
display: flex;
align-items: center;
}
.spacearound{
display: flex;
justify-content: space-around;
}
.spacebetween{
display: flex;
justify-content: space-between;
}
/* 头顶部居中 */
.topcenter{
display: -webkit-flex;
flex-direction: column;
align-items: center;
}
/* x轴正方向排序 */
/* 一 二 三 四 五 六 七 八 */
.sortinxdirection{
display: flex;
flex-direction:row;
}
/* x轴反方向排序 */
/* 八 七 六 五 四 三 二 一 */
.xaxisreverseorder{
display: flex;
flex-direction:row-reverse;
}
/* 垂直布局 正方向*/
/*
*/
.verticallayout{
display: flex;
flex-direction:column;
}
/* 垂直布局 反方向*/
.reversedirection{
display: flex;
flex-direction:column-reverse;
}
.w100{
width: 100px;
}
.mt21{
margin-top: 21px;
}
.mt23{
margin-top: 23px;
}
.mt19{
margin-top: 19px;
}
.mt15{
margin-top: 10px;
}
.h40{
height: 40px;
}
.tophom{
padding-top: 33px;
padding-bottom: 40px;
padding-left: 26px;
padding-right: 26px;
}
.tophoms{
padding-top: 15px;
padding-left: 26px;
padding-right: 26px;
}
.borderwd{
border: 1px solid #000000;
}
.borderwds{
width: 1020px !important;
background: #FFFFFF;
border: 1px solid #DDDDDD;
margin-left: 20px;
min-height:150px;
}
.borderwds283{
width: 1020px !important;
min-height:283px;
background:#F9F9F9;
border:1px solid #DDDDDD;
margin-left: 20px;
}
.w64{
width: 64px;
}
.w70{
width: 70px !important;
}
.tophomsembold{
height:21px;
font-size:16px;
color:#333333;
line-height:21px;
}
.tophomsembolds{
width:42px;
height:19px;
font-size:14px;
font-family:MicrosoftYaHeiSemibold;
color:rgba(51,51,51,1);
line-height:31px;
}
/*Contentpart*/
.contentparttit{
padding-top: 10px;
padding-left: 20px;
padding-right: 20px;
}
.subjecttit{
width:28px;
height:19px;
font-size:14px;
color:rgba(51,51,51,1);
line-height: 42px;
cursor:pointer;
}
.ml55{
margin-right: 55px;
}
.lg{
line-height: 42px;
}
.ml7{
margin-left: 7px;
}
.icondowncolor{
color:#9E9E9E;
}
.icondowncolorss{
color: #9E9E9E;
position: absolute;
top: -20px;
right: -16px;
}
.questiontype{
width: 100%;
font-size: 12px;
color: #333333;
line-height: 17px;
text-align: center;
padding: 11px;
cursor:pointer;
}
.questiontypes{
width:37px;
height:17px;
font-size:12px;
color:rgba(51,51,51,1);
line-height:17px;
cursor:pointer;
}
.questiontypeheng{
width:100%;
height:1px;
background: #EEEEEE;
}
.questiontype:hover{
color: #4CACFF;
}
.questiontype:active{
color: #4CACFF;
}
.w100s{
width:100%;
}
.stestcen{
text-align: center;
}
.w70s{
width:70%;
}
.w30s{
width:70%;
}
.w50s{
width: 50%;
}
.testpaper{
font-size:12px;
color:#888888;
line-height:28px;
text-align: center;
}
.setequesbank{
font-size:14px;
color:#333333;
line-height:28px;
}
.Contentquestionbankstyle{
padding-left: 20px;
padding-right: 20px;
}
.pd20{
padding-top: 20px;
padding-bottom: 20px;
padding-left: 30px;
padding-right: 30px;
}
/*listjihe*/
.listjihetixing{
color: #888888;
font-size: 12px;
line-height: 17px;
}
.listjihetixings{
color: #333333;
font-size: 12px;
line-height: 17px;
}
.listjihetixingstit{
color: #333333;
font-size: 14px;
line-height: 17px;
}
.listjihetixingstits{
color: #333333;
font-size: 14px;
line-height:19px;
margin-top: 19px;
}
.updatetimes{
color: #BBBBBB;
font-size: 12px;
}
.mt22{
margin-top: 22px;
}
.viewparsings{
color:#4CACFF;
font-size:12px;
line-height: 30px;
}
.selection{
width:88px;
height:30px;
background:#33BD8C;
border-radius:4px;
text-align: center;
line-height: 30px;
color: #FFFFFF;
}
.selectionss{
width:88px;
height:30px;
background:#eeeeee;
border-radius:4px;
text-align: center;
line-height: 30px;
color: #FFFFFF;
}
.lh30{
line-height: 30px;
}
.analysis{
height:19px;
font-size:14px;
color:#333333;
line-height:19px;
}
.testfondex{
color: #808080;
font-size: 14px;
}
.pb20{
padding-bottom: 20px;
}
.icontianjiadaohangcolor{
color: #FFFFFF;
}
.icontianjiadaohangcolors{
color: #4CACFF;
}
.xiaoshou{
cursor:pointer
}
.mt40{
margin-top: 40px;
}
.mt42{
margin-top: 42px;
}
.drawerbutton{
width:88px;
height:30px;
background:#4CACFF;
border-radius:4px;
font-size:14px;
color:#ffffff;
line-height:30px;
text-align: center;
}
.icondrawercolor{
color: #979797;
}
.mt25{
margin-top: 25px;
}
.mb26{
margin-bottom: 26px;
}
.drawernonedatadiv{
height: 100%;
}
.font-17{
font-size: 17px;
}
.ml30{
margin-right: 30px;
}
.mr25{
margin-right: 25px;
}
.newbutoon{
width:88px;
height:42px;
background:#33BD8C;
line-height: 42px;
border-radius:4px;
}
.newbutoontes{
width:100%;
height:42px;
font-size:14px;
color:#ffffff;
line-height:42px;
text-align: center;
}
.educouddiv {
display: flex;
flex-direction: column;
}
.tabeltext-alignleftysl{
font-size:14px;
color:#000000;
line-height:19px;
}
.tabeltext-alignleftysltwo{
font-size:14px;
color:#848282;
line-height:19px;
}
.publictask-btn{
width:80px;
height:34px;
background:#CCCCCC;
border-radius:4px;
color: #ffffff;
}
.publictask-btns{
width:80px;
height:34px;
background:#4CACFF;
border-radius:4px;
color: #ffffff;
}
.w80{
width: 80px;
}
.titiles{
color: #333333;
font-size: 16px;
}
.h12{
height: 12px;
min-height: 12px;
}
.mt19{
margin-top: 19px;
}
.mytags{
width:106px;
height:32px;
border-radius:2px;
border:1px solid #DDDDDD;
margin-left: 20px;
}
.lh32{
line-height: 32px;
}
.h20{
height: 20px;
min-height: 20px;
line-height: 20px;
}
.xingcolor{
color: rgba(224, 64, 64, 1);
}
.xingtigan{
font-size:14px;
color:rgba(51, 51, 51, 1);
}
.mr4{
margin-right: 4px;
}
.xingtigans{
width:100%;
font-size:14px;
color:rgba(136,136,136,1);
}
.bottomdivs{
width:100%;
height:55px;
background:rgba(255,255,255,1);
box-shadow:0px -2px 7px 0px rgba(1,6,22,0.04);
}
.mt50{
margin-top: 50px;
}
.divquxiao{
width:88px;
height:32px;
background:rgba(255,255,255,1);
border-radius:4px;
border:1px solid rgba(204,204,204,1);
}
.divquxiaotest{
width:100%;
height:32px;
font-size:12px;
color:rgba(136,136,136,1);
line-height:32px;
text-align: center;
}
.divbaocuntests{
width:100%;
height:32px;
font-size:12px;
color:#ffffff;
line-height:32px;
text-align: center;
}
.divbaocun{
width:88px;
height:32px;
background:rgba(76,172,255,1);
border-radius:4px;
}
.sortzhenque{
width:49px;
height:33px;
border-radius:2px;
border:1px solid rgba(221,221,221,1);
}
.sortzhenquetest{
width:100%;
height:33px;
font-size:14px;
color:rgba(51,51,51,1);
line-height:33px;
}
.sortquxiao{
width:49px;
height:33px;
border-radius:2px;
border:1px solid rgba(221,221,221,1);
}
.sortquxiaotest{
width:100%;
height:33px;
font-size:14px;
color:rgba(51,51,51,1);
line-height:33px;
}
.ml45{
margin-left: 45px;
}
.programcss{
height: 251px;
min-height: 100%;
}
.titlesttingcss{
min-width: 100px;
height:32px;
line-height: 32px;
background:rgba(76,172,255,1);
border-radius:16px;
text-align: center;
color: #fff;
}
.titlesttingcssmy{
min-width: 100px;
height:32px;
line-height: 32px;
font-size:14px;
color:rgba(51,51,51,1);
text-align: center;
}
.minleng40{
min-height: 40px;
}
.w60{
width: 60px !important;
}
.h30{
min-height: 30px !important;
}
.minheight{
min-height: 500px !important;
}

@ -13,7 +13,7 @@ import { getImageUrl, toPath ,trigger,broadcastChannelPostMessage} from 'educode
import axios from 'axios';
import { Modal,Checkbox ,Radio,Input,message,notification } from 'antd';
import { Modal,Checkbox ,Radio,Input,message,notification,Popover} from 'antd';
import Addcourses from '../courses/coursesPublic/Addcourses';
@ -69,6 +69,7 @@ class NewHeader extends Component {
headtypesonClickbool:false,
headtypess:"/",
mygetHelmetapi2: null,
visiblemyss:false,
}
console.log("176")
// console.log(props);
@ -705,6 +706,15 @@ submittojoinclass=(value)=>{
document.head.appendChild(link);
}
handleVisibleChanges = (boll) => {
this.setState({
visiblemyss: boll,
})
}
getAppdata=()=>{
let url = "/setting.json";
axios.get(url).then((response) => {
@ -874,7 +884,17 @@ submittojoinclass=(value)=>{
})
}
const contents = (
<div className="questiontypes" style={{
width:'93px',
height:'80px',
}}>
<a href={'/question'} ><p className="questiontype">试题库</p></a>
<p className="questiontypeheng"></p>
<a href={'/question'} ><p className="questiontype">试卷库</p></a>
<p className="questiontypeheng"></p>
</div>
);
return (
<div className="newHeaders" id="nHeader" >
@ -948,9 +968,30 @@ submittojoinclass=(value)=>{
)
})
}
{/*<li className={`${activePaths === true ? 'pr active' : 'pr'}`}>*/}
{/* <Link to={this.props.Headertop===undefined?"":'/paths'}>实践课程</Link>*/}
{/*</li>*/}
<style>
{
`
.queyppors {
top: 63px !important;
}
.ant-popover-inner-content {
padding:0px !important;
}
`
}
</style>
<li className={`pr `}>
<Popover placement="bottom" content={contents} trigger="click" >
<div className=" sortinxdirection mr10">
<div style={{
color:"#fff"
}}>
题库
</div>
</div>
</Popover>
</li>
{/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/}
{/*<li className={`${coursestype === true ? 'pr active' : 'pr'}`}>*/}

@ -89,10 +89,13 @@ class SiderBar extends Component {
render() {
// console.log(this.props)
// console.log("SiderBar");
// console.log(this.props);
var mypath= this.props&&this.props.match&&this.props.match.path;
return (
<div className="-task-sidebar" >
<div className={mypath&&mypath==="/question"?"-task-sidebar myrigthsiderbar":"-task-sidebar"} >
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div>
<Tooltip placement="right" title={"返回顶部"}>
@ -103,6 +106,21 @@ class SiderBar extends Component {
</div>
</Tooltip>
{
mypath&&mypath==="/question"?
<Tooltip placement="right" title={"试题库"}>
<div className="feedback feedbackdivcolor xiaoshou" onClick={()=>this.props.showDrawer()} >
<a target="_blank" className="color_white xiaoshou" >
<i className="iconfont icon-shitilan color-white xiaoshou"></i>
</a>
<p className="color-white font-12 xiaoshou">试题库</p>
</div>
</Tooltip>
:""
}
<Tooltip placement="right" title={"意见反馈"}>
<div className="feedback">
<a target="_blank" className="color_white" href="/help/feedback">

@ -229,4 +229,41 @@ body>.-task-title {
}
.wechatcenter{
text-align: center;
}
}
.myrigthsiderbar{
right: 15% !important;
}
.feedbackdivcolor{
background: #33BD8C !important;
height: 49px !important;
line-height: 24px !important;
}
.xiaoshou{
cursor:pointer
}
.questiontypes{
width:37px;
height:17px;
font-size:12px;
color:rgba(51,51,51,1);
line-height:17px;
cursor:pointer;
}
.questiontype{
width: 100%;
font-size: 12px;
color: #333333;
line-height: 17px;
text-align: center;
padding: 11px;
cursor:pointer;
}
.questiontypeheng{
width:100%;
height:1px;
background: #EEEEEE;
}

@ -688,6 +688,10 @@ export function TPMIndexHOC(WrappedComponent) {
};
// console.log("this.props.mygetHelmetapi");
// console.log(this.props.mygetHelmetapi);
// console.log("WrappedComponent");
// console.log(this.props);
// console.log(this.props.match.path);
var mypath= this.props&&this.props.match&&this.props.match.path;
return (
<div className="indexHOC">
{isRender===true ? <LoginDialog
@ -709,10 +713,17 @@ export function TPMIndexHOC(WrappedComponent) {
{...this.state}
{...this.dialogObj}
/>:""}
<SiderBar
{...this.props}
{...this.state}
Headertop={Headertop}/>
{
mypath&&mypath==="/question"?
""
:
<SiderBar
{...this.props}
{...this.state}
Headertop={Headertop}/>
}
{/* 注释掉了1440 影响到了手机屏幕的展示 */}
<style>{
`

@ -1242,6 +1242,12 @@
<div class="code-name">&amp;#xe6c8;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70f;</span>
<div class="name">减号</div>
<div class="code-name">&amp;#xe70f;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe60f;</span>
<div class="name">工程</div>
@ -1758,6 +1764,48 @@
<div class="code-name">&amp;#xe6d9;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe701;</span>
<div class="name">缩小</div>
<div class="code-name">&amp;#xe701;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe707;</span>
<div class="name">放大</div>
<div class="code-name">&amp;#xe707;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe709;</span>
<div class="name">编辑</div>
<div class="code-name">&amp;#xe709;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70b;</span>
<div class="name">公开</div>
<div class="code-name">&amp;#xe70b;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70c;</span>
<div class="name">解析</div>
<div class="code-name">&amp;#xe70c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70d;</span>
<div class="name">删除</div>
<div class="code-name">&amp;#xe70d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70e;</span>
<div class="name">试题栏</div>
<div class="code-name">&amp;#xe70e;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
@ -3626,6 +3674,15 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jianhao"></span>
<div class="name">
减号
</div>
<div class="code-name">.icon-jianhao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongcheng"></span>
<div class="name">
@ -4400,6 +4457,69 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-suoxiao2"></span>
<div class="name">
缩小
</div>
<div class="code-name">.icon-suoxiao2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fangda"></span>
<div class="name">
放大
</div>
<div class="code-name">.icon-fangda
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-bianji2"></span>
<div class="name">
编辑
</div>
<div class="code-name">.icon-bianji2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongkai"></span>
<div class="name">
公开
</div>
<div class="code-name">.icon-gongkai
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiexi"></span>
<div class="name">
解析
</div>
<div class="code-name">.icon-jiexi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanchu1"></span>
<div class="name">
删除
</div>
<div class="code-name">.icon-shanchu1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shitilan"></span>
<div class="name">
试题栏
</div>
<div class="code-name">.icon-shitilan
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
@ -6045,6 +6165,14 @@
<div class="code-name">#icon-pinglun</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jianhao"></use>
</svg>
<div class="name">减号</div>
<div class="code-name">#icon-jianhao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongcheng"></use>
@ -6733,6 +6861,62 @@
<div class="code-name">#icon-zhiding</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-suoxiao2"></use>
</svg>
<div class="name">缩小</div>
<div class="code-name">#icon-suoxiao2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fangda"></use>
</svg>
<div class="name">放大</div>
<div class="code-name">#icon-fangda</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-bianji2"></use>
</svg>
<div class="name">编辑</div>
<div class="code-name">#icon-bianji2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongkai"></use>
</svg>
<div class="name">公开</div>
<div class="code-name">#icon-gongkai</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiexi"></use>
</svg>
<div class="name">解析</div>
<div class="code-name">#icon-jiexi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanchu1"></use>
</svg>
<div class="name">删除</div>
<div class="code-name">#icon-shanchu1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shitilan"></use>
</svg>
<div class="name">试题栏</div>
<div class="code-name">#icon-shitilan</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1419,6 +1419,13 @@
"unicode": "e6c8",
"unicode_decimal": 59080
},
{
"icon_id": "7556166",
"name": "减号",
"font_class": "jianhao",
"unicode": "e70f",
"unicode_decimal": 59151
},
{
"icon_id": "7587940",
"name": "工程",
@ -2020,6 +2027,55 @@
"font_class": "zhiding",
"unicode": "e6d9",
"unicode_decimal": 59097
},
{
"icon_id": "12403050",
"name": "缩小",
"font_class": "suoxiao2",
"unicode": "e701",
"unicode_decimal": 59137
},
{
"icon_id": "12403054",
"name": "放大",
"font_class": "fangda",
"unicode": "e707",
"unicode_decimal": 59143
},
{
"icon_id": "12491363",
"name": "编辑",
"font_class": "bianji2",
"unicode": "e709",
"unicode_decimal": 59145
},
{
"icon_id": "12491366",
"name": "公开",
"font_class": "gongkai",
"unicode": "e70b",
"unicode_decimal": 59147
},
{
"icon_id": "12491369",
"name": "解析",
"font_class": "jiexi",
"unicode": "e70c",
"unicode_decimal": 59148
},
{
"icon_id": "12491370",
"name": "删除",
"font_class": "shanchu1",
"unicode": "e70d",
"unicode_decimal": 59149
},
{
"icon_id": "12491850",
"name": "试题栏",
"font_class": "shitilan",
"unicode": "e70e",
"unicode_decimal": 59150
}
]
}

@ -626,6 +626,9 @@ Created by iconfont
<glyph glyph-name="pinglun" unicode="&#59080;" d="M896 704H128c-35.2 0-64-28.8-64-64v-448c0-35.2 28.8-64 64-64h256l128-64 128 64h256c35.2 0 64 28.8 64 64V640c0 35.2-28.8 64-64 64zM304 368c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z" horiz-adv-x="1024" />
<glyph glyph-name="jianhao" unicode="&#59151;" d="M768 341.333333H256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h512c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667z" horiz-adv-x="1024" />
<glyph glyph-name="gongcheng" unicode="&#58895;" d="M141.9 476.8L454.1 298c18.2-10.6 38.9-16.3 59.9-16.3 21.2 0 41.7 5.6 59.4 16.3l312.4 178.6c21.7 11.8 35.2 36.5 34.5 63.1-0.8 26.2-15.4 50.2-37.4 61.2L567.3 758.4c-33.9 16.9-72.8 16.9-106.6 0L144.9 600.8c-22.5-11.6-36.4-34.5-37.2-61.1-0.8-26.3 12.3-50.4 34.2-62.9z m22.3 85.9l315.6 157.5c10.9 5.4 22.5 8.2 34.2 8.2 11.7 0 23.4-2.7 34.2-8.2l315.5-157.5c8.1-4 13.5-13.6 13.8-24.2 0.3-10.6-4.5-20.2-12.2-24.3L552 335l-0.5-0.3c-11-6.7-24-10.2-37.5-10.2s-26.7 3.6-38.5 10.5L163.1 513.8c-8 4.6-13 14.3-12.7 24.6 0.3 10.9 5.6 20 13.8 24.3zM888.4 249.7l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 249.7c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2l368.9 210.9c10.2 5.9 13.8 18.9 7.9 29.1-5.6 10.2-18.7 13.8-28.9 7.9zM888.4 387.1l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 387.1c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2L909.6 350c10.2 5.9 13.8 18.9 7.9 29.1-5.8 10.3-18.9 13.8-29.1 8z" horiz-adv-x="1024" />
@ -884,6 +887,27 @@ Created by iconfont
<glyph glyph-name="zhiding" unicode="&#59097;" d="M496.0256 671.232L129.024 212.48A20.48 20.48 0 0 1 144.9984 179.2H337.92c11.264 0 20.48-9.216 20.48-20.48v-266.24c0-11.264 9.216-20.48 20.48-20.48h266.24a20.48 20.48 0 0 1 20.48 20.48V158.72c0 11.264 9.216 20.48 20.48 20.48h192.9216a20.48 20.48 0 0 1 15.9744 33.28l-367.0016 458.752a20.48 20.48 0 0 1-31.9488 0zM153.6 896m51.2 0l614.4 0q51.2 0 51.2-51.2l0 0q0-51.2-51.2-51.2l-614.4 0q-51.2 0-51.2 51.2l0 0q0 51.2 51.2 51.2Z" horiz-adv-x="1024" />
<glyph glyph-name="suoxiao2" unicode="&#59137;" d="M921.6 418.133333h-318.577778c-5.688889 0-17.066667 0-22.755555 5.688889-5.688889 0-11.377778 5.688889-17.066667 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066667 0 5.688889-5.688889 11.377778-5.688889 22.755555V793.6c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889V611.555556L927.288889 878.933333c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L739.555556 531.911111h182.044444c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889zM56.888889-128c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L284.444444 236.088889H102.4c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889h318.577778c5.688889 0 17.066667 0 22.755555-5.688889 5.688889 0 11.377778-5.688889 17.066667-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066667 0-5.688889 5.688889-11.377778 5.688889-22.755555v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V156.444444l-267.377778-267.377777c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667z" horiz-adv-x="1024" />
<glyph glyph-name="fangda" unicode="&#59143;" d="M603.022222 418.133333c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L830.577778 782.222222h-182.044445c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889H967.111111c5.688889 0 17.066667 0 22.755556-5.688889 5.688889 0 11.377778-5.688889 17.066666-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066666 5.688889-5.688889 5.688889-17.066667 5.688889-22.755556v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V702.577778l-267.377778-267.377778c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667zM375.466667-128H56.888889c-5.688889 0-17.066667 0-22.755556 5.688889-5.688889 0-11.377778 5.688889-17.066666 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066666-5.688889 5.688889-5.688889 17.066667-5.688889 22.755556v318.577778c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889v-182.044445l267.377778 267.377778c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L193.422222-14.222222h182.044445c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889z" horiz-adv-x="1024" />
<glyph glyph-name="bianji2" unicode="&#59145;" d="M704.752941-97.882353H198.776471c-78.305882 0-138.541176 60.235294-138.541177 132.517647V667.105882c0 72.282353 66.258824 132.517647 138.541177 132.517647h319.247058c18.070588 0 30.117647-12.047059 30.117647-30.117647s-12.047059-24.094118-30.117647-24.094117H198.776471c-42.164706 0-78.305882-36.141176-78.305883-72.282353v-632.470588c0-42.164706 36.141176-72.282353 78.305883-72.282353h499.952941c42.164706 0 78.305882 36.141176 78.305882 72.282353V293.647059c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-259.011765c6.023529-72.282353-60.235294-132.517647-132.517647-132.517647zM313.223529 161.129412c-24.094118 0-54.211765 18.070588-60.235294 48.188235v30.117647l36.141177 126.494118 445.741176 445.741176c48.188235 48.188235 120.470588 48.188235 168.658824 0 48.188235-48.188235 48.188235-120.470588 0-168.658823l-445.741177-445.741177-126.494117-30.117647c-6.023529-6.023529-12.047059-6.023529-18.070589-6.023529z m36.141177 174.682353l-36.141177-114.447059 120.470589 30.117647 433.694117 433.694118c12.047059 12.047059 18.070588 24.094118 18.070589 42.164705 0 18.070588-6.023529 30.117647-18.070589 42.164706-24.094118 24.094118-60.235294 24.094118-84.329411 0L349.364706 335.811765z" horiz-adv-x="1024" />
<glyph glyph-name="gongkai" unicode="&#59147;" d="M512 42.666667C432.355556 42.666667 369.777778 105.244444 369.777778 184.888889S432.355556 327.111111 512 327.111111s142.222222-62.577778 142.222222-142.222222S591.644444 42.666667 512 42.666667z m0 227.555555c-45.511111 0-85.333333-39.822222-85.333333-85.333333S466.488889 99.555556 512 99.555556 597.333333 139.377778 597.333333 184.888889 557.511111 270.222222 512 270.222222zM256 469.333333c-17.066667 0-28.444444 11.377778-28.444444 28.444445V662.755556C244.622222 782.222222 352.711111 867.555556 483.555556 867.555556c142.222222 0 250.311111-96.711111 256-221.866667v-5.688889c0-17.066667-11.377778-28.444444-28.444445-28.444444s-28.444444 11.377778-28.444444 28.444444c-5.688889 96.711111-91.022222 170.666667-199.111111 170.666667-102.4 0-187.733333-68.266667-199.111112-153.6V497.777778c0-17.066667-11.377778-28.444444-28.444444-28.444445zM739.555556-128h-455.111112C176.355556-128 85.333333-36.977778 85.333333 71.111111v227.555556C85.333333 406.755556 176.355556 497.777778 284.444444 497.777778h455.111112c108.088889 0 199.111111-91.022222 199.111111-199.111111v-227.555556c0-108.088889-91.022222-199.111111-199.111111-199.111111z m-455.111112 568.888889C204.8 440.888889 142.222222 378.311111 142.222222 298.666667v-227.555556C142.222222-8.533333 204.8-71.111111 284.444444-71.111111h455.111112c79.644444 0 142.222222 62.577778 142.222222 142.222222v227.555556C881.777778 378.311111 819.2 440.888889 739.555556 440.888889h-455.111112z" horiz-adv-x="1024" />
<glyph glyph-name="jiexi" unicode="&#59148;" d="M506.311111-99.555556c-73.955556 0-147.911111 17.066667-216.177778 51.2-11.377778 5.688889-22.755556 22.755556-11.377777 39.822223 5.688889 11.377778 22.755556 22.755556 39.822222 11.377777 56.888889-28.444444 125.155556-45.511111 187.733333-45.511111 238.933333 0 432.355556 187.733333 432.355556 426.666667 0 85.333333-22.755556 164.977778-73.955556 233.244444-11.377778 11.377778-5.688889 28.444444 5.688889 39.822223 11.377778 11.377778 28.444444 5.688889 39.822222-5.688889 51.2-79.644444 79.644444-170.666667 79.644445-267.377778 5.688889-267.377778-216.177778-483.555556-483.555556-483.555556z m-301.511111 125.155556c-5.688889 0-11.377778 0-17.066667 5.688889C85.333333 122.311111 28.444444 253.155556 28.444444 389.688889 28.444444 651.377778 238.933333 867.555556 500.622222 867.555556c119.466667 0 233.244444-45.511111 318.577778-125.155556 11.377778-11.377778 11.377778-28.444444 0-39.822222-11.377778-11.377778-28.444444-11.377778-39.822222 0-79.644444 73.955556-176.355556 113.777778-278.755556 113.777778-227.555556 0-415.288889-187.733333-415.288889-420.977778 0-125.155556 51.2-238.933333 142.222223-318.577778 11.377778-11.377778 11.377778-28.444444 0-39.822222-5.688889-11.377778-11.377778-11.377778-22.755556-11.377778zM512 31.288889c-56.888889 0-102.4 45.511111-102.4 102.4v34.133333c-62.577778 34.133333-102.4 102.4-102.4 170.666667C307.2 446.577778 398.222222 537.6 512 537.6s204.8-91.022222 204.8-199.111111c0-68.266667-39.822222-136.533333-102.4-170.666667v-34.133333c0-51.2-39.822222-96.711111-91.022222-102.4H512z m0 449.422222c-79.644444 0-147.911111-62.577778-147.911111-142.222222 0-51.2 28.444444-96.711111 73.955555-125.155556l28.444445-17.066666v-68.266667c0-22.755556 17.066667-45.511111 45.511111-45.511111h5.688889c22.755556 0 39.822222 22.755556 39.822222 45.511111v68.266667l28.444445 17.066666c45.511111 22.755556 73.955556 73.955556 73.955555 125.155556 0 73.955556-68.266667 142.222222-147.911111 142.222222zM676.977778 497.777778c-5.688889 0-17.066667 0-22.755556 5.688889-11.377778 11.377778-11.377778 28.444444 0 39.822222L739.555556 628.622222c11.377778 11.377778 28.444444 11.377778 39.822222 0s11.377778-28.444444 0-39.822222l-85.333334-85.333333c-5.688889 0-11.377778-5.688889-17.066666-5.688889zM347.022222 497.777778c-5.688889 0-11.377778 5.688889-17.066666 5.688889L238.933333 594.488889c-11.377778 11.377778-11.377778 28.444444 0 39.822222s28.444444 11.377778 39.822223 0l85.333333-85.333333c11.377778-11.377778 11.377778-28.444444 0-39.822222 0-5.688889-5.688889-11.377778-17.066667-11.377778zM512 560.355556c-17.066667 0-28.444444 11.377778-28.444444 28.444444V685.511111c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444444-28.444445v-102.4c0-11.377778-11.377778-22.755556-28.444444-22.755555z" horiz-adv-x="1024" />
<glyph glyph-name="shanchu1" unicode="&#59149;" d="M672-96H358.4c-76.8 0-140.8 57.6-153.6 140.8L96 569.6c0 19.2 6.4 32 25.6 38.4 19.2 6.4 32-6.4 38.4-25.6l102.4-524.8c12.8-51.2 51.2-89.6 96-89.6h313.6c44.8 0 83.2 38.4 96 89.6l102.4 524.8c6.4 19.2 19.2 25.6 38.4 25.6 19.2-6.4 25.6-19.2 25.6-38.4L832 44.8c-19.2-83.2-83.2-140.8-160-140.8zM608 704v6.4c0 51.2-44.8 89.6-96 89.6S416 755.2 416 704h-64C352 793.6 422.4 864 512 864c83.2 0 153.6-64 160-153.6V704h-64zM384 38.4c-12.8 0-25.6 12.8-32 25.6L256 576c0 19.2 12.8 32 25.6 38.4 19.2 0 38.4-12.8 38.4-25.6l96-512c0-19.2-6.4-38.4-32-38.4 6.4 0 0 0 0 0zM640 38.4s-6.4 0 0 0c-25.6 6.4-32 19.2-32 38.4l96 512c0 19.2 19.2 32 38.4 25.6 12.8-6.4 25.6-19.2 25.6-38.4l-96-512c-6.4-12.8-19.2-25.6-32-25.6zM512 38.4c-19.2 0-32 12.8-32 32v512c0 19.2 12.8 32 32 32s32-12.8 32-32v-512c0-19.2-12.8-32-32-32zM992 640H32C12.8 640 0 652.8 0 672S12.8 704 32 704h960c19.2 0 32-12.8 32-32s-12.8-32-32-32z" horiz-adv-x="1024" />
<glyph glyph-name="shitilan" unicode="&#59150;" d="M816.118519-128H184.019753c-69.530864 0-126.419753 56.888889-126.419753 126.419753V756.938272C57.6 826.469136 114.488889 883.358025 184.019753 883.358025h568.888889l189.62963-189.62963v-695.308642c0-69.530864-56.888889-126.419753-126.419753-126.419753zM727.624691 820.148148H184.019753c-37.925926 0-63.209877-25.283951-63.209876-63.209876v-758.518519c0-37.925926 25.283951-63.209877 63.209876-63.209876h632.098766c37.925926 0 63.209877 25.283951 63.209876 63.209876V668.444444L727.624691 820.148148zM955.180247 662.123457h-189.62963c-25.283951 0-44.246914 18.962963-44.246913 44.246913l6.320987 189.62963 227.555556-233.876543z m-170.666667 82.172839v-18.962963h18.962963l-18.962963 18.962963zM670.735802 567.308642H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 630.518519 329.402469 630.518519h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604939s-12.641975-31.604938-31.604939-31.604938zM670.735802 314.469136H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 377.679012 329.402469 377.679012h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938zM670.735802 61.62963H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938s12.641975 31.604938 31.604938 31.604938h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 373 KiB

Loading…
Cancel
Save