Commit 16be2951 by yuananting

fix:修改样式

parent 9be0fad9
@font-face {
font-family: 'iconfont'; /* project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_l1fmqafrijf.eot');
src: url('//at.alicdn.com/t/font_2223403_l1fmqafrijf.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_l1fmqafrijf.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_l1fmqafrijf.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_l1fmqafrijf.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_l1fmqafrijf.svg#iconfont') format('svg');
src: url('//at.alicdn.com/t/font_2223403_droqalespbg.eot');
src: url('//at.alicdn.com/t/font_2223403_droqalespbg.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_droqalespbg.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_droqalespbg.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_droqalespbg.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_droqalespbg.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont" !important;
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 13:46:35
* @LastEditors: yuananting
* @LastEditTime: 2021-03-19 19:29:42
* @LastEditTime: 2021-03-24 10:15:22
* @Description: 助学工具-题库-题目管理-新增题目
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -12,7 +12,11 @@ import Breadcrumbs from "@/components/Breadcrumbs";
import ShowTips from "@/components/ShowTips";
import "./AddNewQuestion.less";
import NewQuestionTab from "./components/NewQuestionTab";
import { defineJudgeOptionInfo, defineOptionInfo, defineQuestionInfo } from "./components/model";
import {
defineJudgeOptionInfo,
defineOptionInfo,
defineQuestionInfo,
} from "./components/model";
import QuestionBankService from "@/domains/question-bank-domain/QuestionBankService";
import User from "@/common/js/user";
......@@ -80,12 +84,17 @@ class AddNewQuestion extends Component {
this.setState({ judgeContent: result });
break;
case "GAP_FILLING":
stemContent.content = stemContent.content.split('').map((item) => {
if (item === '_') {
return `<input class="add-fill-line" disabled correctAnswerList="" id=${window.random_string(16)} value="填空"/>`
}
return item;
}).join('');
stemContent.content = stemContent.content
.split("")
.map((item) => {
if (item === "_") {
return `<input class="add-fill-line" disabled correctAnswerList="" id=${window.random_string(
16
)} value="填空"/>`;
}
return item;
})
.join("");
this.setState({ gapFillingContent: result });
break;
case "INDEFINITE_CHOICE":
......@@ -115,9 +124,9 @@ class AddNewQuestion extends Component {
case "JUDGE":
let judgeContent = defineQuestionInfo("JUDGE");
var judgeOptions = ["正确", "错误"];
judgeOptions.forEach(item => {
judgeOptions.forEach((item) => {
judgeContent.optionList.push(defineJudgeOptionInfo(item));
})
});
this.setState({ judgeContent });
break;
case "GAP_FILLING":
......@@ -245,7 +254,7 @@ class AddNewQuestion extends Component {
break;
case "GAP_FILLING":
if (this.gapRef.checkInput() === 0) {
this.saveCurrentQuestion(gapFillingContent, "GAP_FILLING", next);
this.saveCurrentQuestion(gapFillingContent, "GAP_FILLING", next);
}
break;
case "INDEFINITE_CHOICE":
......@@ -278,7 +287,11 @@ class AddNewQuestion extends Component {
return (
<div className="page add-new-question">
<Breadcrumbs
navList={getParameterByName("id") && this.state.currentOperate === "edit" ? "编辑题目" : "新增题目"}
navList={
getParameterByName("id") && this.state.currentOperate === "edit"
? "编辑题目"
: "新增题目"
}
goBack={() => this.handleGoBack()}
/>
<div className="box">
......@@ -293,7 +306,14 @@ class AddNewQuestion extends Component {
}}
>
<TabPane
tab={<span className="icon iconfont">&#xe7fa; 单选题</span>}
tab={
<span>
<span className="icon iconfont" style={{ color: "#CCCCCC" }}>
&#xe7fa;{" "}
</span>
<span>单选题</span>
</span>
}
key="SINGLE_CHOICE"
>
<NewQuestionTab
......@@ -309,7 +329,14 @@ class AddNewQuestion extends Component {
/>
</TabPane>
<TabPane
tab={<span className="icon iconfont">&#xe7fb; 多选题</span>}
tab={
<span>
<span className="icon iconfont" style={{ color: "#CCCCCC" }}>
&#xe7fb;{" "}
</span>
<span>多选题</span>
</span>
}
key="MULTI_CHOICE"
>
<NewQuestionTab
......@@ -325,7 +352,14 @@ class AddNewQuestion extends Component {
/>
</TabPane>
<TabPane
tab={<span className="icon iconfont">&#xe7fc; 判断题</span>}
tab={
<span>
<span className="icon iconfont" style={{ color: "#CCCCCC" }}>
&#xe7fc;{" "}
</span>
<span>判断题</span>
</span>
}
key="JUDGE"
>
<NewQuestionTab
......@@ -340,7 +374,14 @@ class AddNewQuestion extends Component {
/>
</TabPane>
<TabPane
tab={<span className="icon iconfont">&#xe7fd; 填空题</span>}
tab={
<span>
<span className="icon iconfont" style={{ color: "#CCCCCC" }}>
&#xe7fd;{" "}
</span>
<span>填空题</span>
</span>
}
key="GAP_FILLING"
>
<NewQuestionTab
......@@ -356,10 +397,13 @@ class AddNewQuestion extends Component {
</TabPane>
<TabPane
tab={
<span className="icon iconfont">
&#xe7fe; 不定项选择题{" "}
<span>
<span className="icon iconfont" style={{ color: "#CCCCCC" }}>
&#xe7fe;{" "}
</span>
<span>不定项选择题 </span>
<Tooltip title="至少有一项正确,至多不限的选择题,多项选择题的一种特殊形式">
<span style={{ color: "#BFBFBF" }}>&#xe7c4;</span>
<span className="icon iconfont" style={{ color: "#BFBFBF" }}>&#xe7c4;</span>
</Tooltip>
</span>
}
......@@ -387,13 +431,15 @@ class AddNewQuestion extends Component {
>
取消
</Button>
{(categoryId && categoryId!=="null") && <Button
onClick={() => {
this.confirmSaveQuestion("add");
}}
>
保存并继续添加
</Button>}
{categoryId && categoryId !== "null" && (
<Button
onClick={() => {
this.confirmSaveQuestion("add");
}}
>
保存并继续添加
</Button>
)}
<Button
type="primary"
onClick={() => {
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-21 17:51:01
* @LastEditors: yuananting
* @LastEditTime: 2021-03-23 17:44:18
* @LastEditTime: 2021-03-24 13:55:56
* @Description: 助学工具-题库-题库主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -38,12 +38,14 @@ class QuestionBankIndex extends Component {
<div className="question-bank-index page">
<div className="content-header">题目</div>
<div className="box content-body">
<div className="sider">
<QuestionBankSider
getSelectedCategoryId={this.getCategoryIdFromSider.bind(this)}
currentTotal={this.state.currentTotal}
updatedCategoryId={this.state.updatedCategoryId}
/>
<div style={{borderRight: "0.5px solid #EEEEEE", paddingRight: "4px"}}>
<div className="sider">
<QuestionBankSider
getSelectedCategoryId={this.getCategoryIdFromSider.bind(this)}
currentTotal={this.state.currentTotal}
updatedCategoryId={this.state.updatedCategoryId}
/>
</div>
</div>
<div className="content">
<QuestionManageContent
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-21 18:27:43
* @LastEditors: yuananting
* @LastEditTime: 2021-03-18 09:32:24
* @LastEditTime: 2021-03-24 16:15:03
* @Description: 助学工具-题库-题库主页面样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -13,7 +13,7 @@
background: #fff;
}
.sider {
min-width: 260px;
min-width: 244px;
}
.content {
width: 100%;
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-23 18:28:50
* @LastEditors: yuananting
* @LastEditTime: 2021-03-23 14:16:07
* @LastEditTime: 2021-03-24 14:51:17
* @Description: 助学工具-题库-主页面分类管理
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -433,9 +433,8 @@ class QuestionCategoryManage extends Component {
>
<span>{item.categoryName}</span>
{item.categoryName !== "未分类" && (
<Space className="title-opts" size={50}>
<Space className="title-opts" size={16}>
<span
className="icon iconfont"
onClick={() => {
let nodesCount = 0;
const { treeData } = this.state;
......@@ -465,11 +464,13 @@ class QuestionCategoryManage extends Component {
);
}}
>
&#xe7f5; 同级
<span className="icon iconfont" style={{ color: "#BFBFBF" }}>
&#xe7f5;{" "}
</span>
<span>同级</span>
</span>
{item.categoryLevel < 4 && (
<span
className="icon iconfont"
onClick={() => {
if (
item.sonCategoryList &&
......@@ -486,25 +487,51 @@ class QuestionCategoryManage extends Component {
);
}}
>
&#xe7f8; 子级
<span className="icon iconfont" style={{ color: "#BFBFBF" }}>
&#xe7f8;{" "}
</span>
<span>子级</span>
</span>
)}
<Dropdown overlay={this.initDropMenu(item)}>
<span className="icon iconfont">更多 &#xe7f7;</span>
<span>
<span className="icon iconfont" style={{ color: "#BFBFBF" }}>
&#xe7f7;{" "}
</span>
<span>更多</span>
</span>
</Dropdown>
</Space>
)}
</div>
);
item.icon =
item.id === "default" ? (
<span className="icon iconfont" style={{ color: "#FBD140" }}>
&#xe7f6;
</span>
item.categoryName === "未分类" ? (
<img
style={{
width: "24px",
height: "24px",
opacity:
!value || (value && item.categoryName.indexOf(value) > -1)
? 1
: 0.5,
}}
src="https://image.xiaomaiketang.com/xm/defaultCategory.png"
alt=""
/>
) : (
<span className="icon iconfont" style={{ color: "#FBD140" }}>
&#xe7f1;
</span>
<img
style={{
width: "24px",
height: "24px",
opacity:
!value || (value && item.categoryName.indexOf(value) > -1)
? 1
: 0.5,
}}
src="https://image.xiaomaiketang.com/xm/hasCategory.png"
alt=""
/>
);
if (item.sonCategoryList) {
......@@ -574,6 +601,8 @@ class QuestionCategoryManage extends Component {
placeholder="请输入名称"
style={{ width: "calc(100% - 84px)" }}
onSearch={(value) => this.queryCategoryTree("search", value)}
className="search-input"
enterButton={<span className="icon iconfont">&#xe832;</span>}
/>
</div>
<Button
......@@ -592,7 +621,10 @@ class QuestionCategoryManage extends Component {
>
新增一级分类
</Button>
<div className="show-tips" style={{ marginTop: 12 }}>
<div
className="show-tips"
style={{ marginTop: "12px", width: "700px" }}
>
<ShowTips message="为方便管理,该分类用于课程、培训计划、题库、知识库等模块,改动将同步各模块更新" />
</div>
<div className="course-category-tree">
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-23 19:41:42
* @LastEditors: yuananting
* @LastEditTime: 2021-03-18 16:23:42
* @LastEditTime: 2021-03-24 14:57:20
* @Description: 助学工具-题库-题目分类管理样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -21,18 +21,21 @@
.course-category-tree {
position: relative;
margin-top: 16px;
width: 700px;
border: 1px solid #E8E8E8;
.ant-tree.ant-tree-directory {
font-size: 14px;
font-weight: 400;
color: #666666;
.anticon {
color: #666666;
color: #999999;
}
.ant-tree-treenode {
height: 44px;
padding: 0;
span {
line-height: 44px;
vertical-align: middle;
}
.ant-tree-node-content-wrapper.ant-tree-node-selected {
color: #666666;
......@@ -65,4 +68,12 @@
color: #bfbfbf !important;
}
}
.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle {
line-height: 37px !important;
margin-right: 8px;
}
.ant-tree.ant-tree-directory .ant-tree-treenode:hover::before {
background-color: #F3F6FA;
}
}
......@@ -2,14 +2,13 @@
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @LastEditors: yuananting
* @LastEditTime: 2021-03-23 18:28:16
* @LastEditTime: 2021-03-24 14:15:12
* @Description: 助学工具-题库-题目管理-新建题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { Component } from "react";
import { Form, Radio, message, Checkbox, Tag, Modal, Input } from "antd";
import { Form, Radio, message, Checkbox, Tag, Modal, Input, Popover } from "antd";
import "./NewQuestionTab.less";
import Upload from "@/core/upload";
import QuestionEditor from "./QuestionEditor";
import { PlusOutlined, CloseOutlined } from "@ant-design/icons";
import {
......@@ -264,7 +263,7 @@ class NewQuestionTab extends Component {
this.setState({ radioValidate: "success" });
this.setState({ radioText: "" });
chooseIcon.forEach((item) => {
item.setAttribute("style", "border:1px solid #d9d9d9;");
item.removeAttribute("style");
});
}
if (
......@@ -1165,12 +1164,14 @@ class NewQuestionTab extends Component {
label={
<span>
答案{" "}
<span
className="icon iconfont"
style={{ color: "#BFBFBF", fontSize: 14 }}
>
&#xe7c4;
</span>
<Popover content={<div><div style={{marginBottom: "16px"}}>一空可设置多个答案,答对任意一个即视为正确</div><img width="400px" src="https://image.xiaomaiketang.com/xm/gaptip.png" alt=""/></div>}>
<span
className="icon iconfont"
style={{ color: "#BFBFBF", fontSize: 14 }}
>
&#xe7c4;
</span>
</Popover>
</span>
}
required
......@@ -1260,22 +1261,24 @@ class NewQuestionTab extends Component {
{NUM_TO_WORD_MAP[optionIndex]}.
</div>
<div className="question-item_options__input">
<Form.Item
validateStatus={
this.state[`optionsValidate_${optionIndex}`]
}
help={this.state[`optionsText_${optionIndex}`]}
>
{isJudge
? this.renderJudgeOption(questionOptionContentList)
: this.renderContent(
questionOptionContentList,
placeHold,
mediaBtn,
"QUESTION_OPTION",
this.state[`optionsValidate_${optionIndex}`]
)}
</Form.Item>
{isJudge ? (
this.renderJudgeOption(questionOptionContentList)
) : (
<Form.Item
validateStatus={
this.state[`optionsValidate_${optionIndex}`]
}
help={this.state[`optionsText_${optionIndex}`]}
>
{this.renderContent(
questionOptionContentList,
placeHold,
mediaBtn,
"QUESTION_OPTION",
this.state[`optionsValidate_${optionIndex}`]
)}
</Form.Item>
)}
</div>
{[
"INDEFINITE_CHOICE",
......@@ -1286,6 +1289,7 @@ class NewQuestionTab extends Component {
<React.Fragment>
<span
className="option-operate_item__icon icon iconfont"
style={{ fontSize: "14px" }}
onClick={() => this.handleDelOption(optionIndex)}
>
&#xe81a;
......
.question-input-item_wrapper {
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 16px;
position: relative;
margin-bottom: 50px;
......@@ -9,8 +8,6 @@
border-radius: 4px;
padding: 4px 10px;
border: 1px solid #e8e8e8;
// display: flex;
// justify-content: space-between;
.fill-line {
padding: 0 10px;
border-bottom: 1px solid;
......@@ -71,6 +68,7 @@
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #e8e8e8;
}
.audio-box {
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
......@@ -194,7 +192,7 @@
transform: translateY(-100%);
font-size: 12px;
color: #666666;
line-height: 17px;
line-height: 22px;
}
.ant-radio-wrapper {
......@@ -221,9 +219,9 @@
}
.question-item_options__sort {
line-height: 33px;
flex-shrink: 0;
align-self: stretch;
line-height: 32px;
}
.question-item_options__input {
......@@ -250,11 +248,8 @@
.question-item_options__setting {
flex-shrink: 0;
width: 80px;
height: 33px;
height: 32px;
text-align: center;
// display: flex;
// justify-content: center;
// align-items: center;
align-self: stretch;
}
......@@ -288,29 +283,33 @@
.question-item_analysis__content {
flex: 1;
margin-right: 187px;
.question-desc-box {
margin-top: 12px;
margin-top: 24px;
.desc-picture-box {
margin-bottom: 28px;
.picture-box {
position: relative;
display: inline-block;
width: 100px;
height: 100px;
overflow: hidden;
align-items: center;
justify-content: center;
padding: 12px 12px 0 0;
display: inline-flex;
width: 88px;
height: 88px;
border: 1px solid #e8e8e8;
margin-right: 12px;
img {
max-width: 88px;
max-height: 88px;
max-width: 100%;
max-height: 100%;
border-radius: 4px;
vertical-align: middle;
width: auto;
height: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.icon_arrow {
position: absolute;
top: 0px;
right: 5px;
top: -12px;
right: -8px;
color: #bfbfbf;
cursor: pointer;
font-size: 16px;
......@@ -380,12 +379,11 @@
width: 100%;
padding: 6px 0;
.gap-answer-label {
margin-right: 16px;
padding-top: 6px;
width: 50px;
margin-right: 12px;
white-space: nowrap;
margin-top: 6px;
}
.gap-answer-content {
// display: flex;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8e8;
......@@ -396,6 +394,8 @@
overflow: hidden;
.ant-tag {
margin-bottom: 8px !important;
border: none;
line-height: 24px;
}
.gap-tag-input {
margin-right: 5px;
......@@ -423,6 +423,9 @@
}
width: 78px;
margin-right: 14px;
.ant-input {
background: #f7f8f9;
}
.ant-input:not(:last-child) {
padding-right: 0px !important;
}
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditTime: 2021-03-23 16:28:35
* @LastEditTime: 2021-03-24 14:50:08
* @Description: 助学工具-题库-题库主页面侧边栏
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -165,13 +165,17 @@ class QuestionBankSider extends Component {
);
item.icon =
item.categoryName === "未分类" ? (
<span className="icon iconfont" style={{ color: "#FBD140" }}>
&#xe7f6;
</span>
<img
style={{ width: "24px", height: "24px", opacity: !value || (value && item.categoryName.indexOf(value) > -1) ? 1 : 0.5 }}
src="https://image.xiaomaiketang.com/xm/defaultCategory.png"
alt=""
/>
) : (
<span className="icon iconfont" style={{ color: "#FBD140" }}>
&#xe7f1;
</span>
<img
style={{ width: "24px", height: "24px", opacity: !value || (value && item.categoryName.indexOf(value) > -1) ? 1 : 0.5 }}
src="https://image.xiaomaiketang.com/xm/hasCategory.png"
alt=""
/>
);
if (item.sonCategoryList) {
item.children = this.renderTreeNodes(item.sonCategoryList, value);
......@@ -197,9 +201,9 @@ class QuestionBankSider extends Component {
className="sider-search"
placeholder="搜索名称分类"
onSearch={(value) => {
// TODO 调用查询分类接口
this.queryCategoryTree("change", value);
}}
enterButton={<span className="icon iconfont">&#xe832;</span>}
/>
{User.getUserRole() !== "CloudLecturer" && (
<div className="sider-btn">
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-22 12:02:34
* @LastEditors: yuananting
* @LastEditTime: 2021-03-18 16:22:58
* @LastEditTime: 2021-03-24 15:57:12
* @Description: 助学工具-题库-题库主页面侧边栏样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -18,13 +18,14 @@
}
.sider-search {
margin-bottom: 16px;
width: 230px;
}
.sider-btn {
margin-bottom: 16px;
}
.sider-tree {
width: 266px;
width: 240px;
overflow: scroll;
height: calc(100vh - 300px);
.empty-tree-tip {
......@@ -39,9 +40,9 @@
font-size: 14px;
font-weight: 400;
color: #666666;
width: 260px;
width: 234px;
.anticon {
color: #666666;
color: #999999;
}
.ant-tree-treenode {
height: 44px;
......@@ -60,4 +61,13 @@
}
}
}
.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle {
line-height: 37px !important;
margin-right: 8px;
}
.ant-tree.ant-tree-directory .ant-tree-treenode:hover::before {
background-color: #F3F6FA;
}
}
......@@ -350,7 +350,7 @@ class QuestionEditor extends Component {
className="editor-fill-info_icon icon iconfont"
onClick={this.insertBlank}
>
&#xe7fd; 插入占位符
&#xe83e; 插入占位符
</Button>
</div>
)}
......@@ -366,7 +366,7 @@ class QuestionEditor extends Component {
<div className="editor-placehold">{placehold}</div>
)}
{visibleMediaBox && !_.isEmpty(mediaBtn) && (
<div className="edtior-media_box">
<div className="edtior-media_box" style={{top: isGapFilling && contentType==="QUESTION_STEM" ? "53%" : "100%"}}>
<div className="edtior-media_list">
{_.map(mediaBtn, (mediaItem) => {
const mediaBtnMap = _.find(
......
......@@ -9,6 +9,7 @@
text-align: center;
border: none;
width: 54px;
background-color: transparent;
}
.editor-fill-info {
......@@ -17,6 +18,13 @@
line-height: 20px;
color: #999999;
margin-top: 8px;
.ant-btn {
border: none;
.ant-input {
border-color: transparent;
}
}
.editor-fill-info_icon {
color: #5289fa !important;
font-size: 14px;
......@@ -38,7 +46,7 @@
}
.editor-limit {
padding-right: 12px;
line-height: 17px;
line-height: 22px;
font-size: 12px;
color: #cccccc;
}
......@@ -59,7 +67,7 @@
.editor-limit {
text-align: right;
padding-right: 12px;
line-height: 17px;
line-height: 22px;
font-size: 12px;
color: #cccccc;
padding-top: 3px;
......@@ -110,9 +118,8 @@
.edtior-media_box {
position: absolute;
top: 100%;
left: 0;
padding-top: 9px;
padding-top: 8px;
&::before {
content: "";
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-03-23 16:21:52
* @LastEditTime: 2021-03-24 14:55:54
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -248,6 +248,7 @@ class QuestionManageContent extends Component {
title: "题型",
key: "questionTypeEnum",
dataIndex: "questionTypeEnum",
width: 200,
render: (val) => {
return questionTypeEnum[val];
},
......@@ -258,6 +259,7 @@ class QuestionManageContent extends Component {
dataIndex: "accuracy",
sorter: true,
showSorterTooltip: false,
width: 142,
render: (val) => {
return val + "%";
},
......@@ -268,6 +270,7 @@ class QuestionManageContent extends Component {
dataIndex: "updateTime",
sorter: true,
showSorterTooltip: false,
width: 200,
render: (val) => {
return formatDate("YYYY-MM-DD H:i:s", val);
},
......@@ -276,7 +279,7 @@ class QuestionManageContent extends Component {
title: "操作",
key: "operate",
dataIndex: "operate",
fixed: "right",
width: 232,
render: (val, record) => {
return (
<div className="record-operate">
......@@ -412,6 +415,7 @@ class QuestionManageContent extends Component {
onSearch={() => {
this.queryQuestionPageList();
}}
enterButton={<span className="icon iconfont">&#xe832;</span>}
/>
</div>
......@@ -423,6 +427,7 @@ class QuestionManageContent extends Component {
style={{ width: "calc(100% - 70px)" }}
showSearch
allowClear
enterButton={<span className="icon iconfont">&#xe832;</span>}
filterOption={(inputVal, option) =>
option.props.children.includes(inputVal)
}
......@@ -460,7 +465,7 @@ class QuestionManageContent extends Component {
</div>
{["CloudManager", "StoreManager"].includes(User.getUserRole()) &&
!["0", null].includes(categoryId) && (
<Space size="large">
<Space size={16}>
<Button type="primary" onClick={this.handleCreateQuestionBank}>
新建题目
</Button>
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:26:28
* @LastEditors: yuananting
* @LastEditTime: 2021-03-16 11:14:55
* @LastEditTime: 2021-03-24 15:57:41
* @Description: 助学工具-题库-题目管理右侧内容样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -18,7 +18,7 @@
&__item {
width: 30%;
margin-right: 3%;
margin-bottom: 12px;
margin-bottom: 16px;
.search-label {
vertical-align: middle;
display: inline-block;
......@@ -60,7 +60,6 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 232px;
}
.record-operate {
display: flex;
......
......@@ -188,11 +188,11 @@ const XMAudio = (props) => {
if (parseInt(dragDiv.style.left) <= 0) {
dragDiv.style.left = "0px";
}
if (parseInt(dragDiv.style.left) >= 181) {
dragDiv.style.left = "176px";
if (parseInt(dragDiv.style.left) >= 154) {
dragDiv.style.left = "149px";
}
setPlayedTime(parseInt(dragDiv.style.left) / 180 * totalTime)
setPlayedTime(parseInt(dragDiv.style.left) / 150 * totalTime)
}
// 鼠标抬起时,清除绑定在文档上的mousemove和mouseup事件
// 否则鼠标抬起后还可以继续拖拽方块
......
......@@ -64,7 +64,7 @@
}
.down-btn {
text-align: left;
color: #FC9C6B;
color: #5289FA;
font-size: 12px;
display: block;
margin-top: 8px;
......@@ -99,10 +99,6 @@
color: #FC9C6B;
}
}
.down-btn {
margin-top: 16px;
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-22 17:51:28
* @LastEditors: yuananting
* @LastEditTime: 2021-03-22 09:43:18
* @LastEditTime: 2021-03-24 15:02:53
* @Description: 助学工具-题库-题库新建或编辑题库分类模态框
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -22,8 +22,8 @@ class NewEditQuestionBankCategory extends Component {
}
componentDidMount() {
// document.getElementById("categoryName").setAttribute("style", "autocomplete","off")
this.queryCategoryTree();
// this.getSameLevelNodes(this.props.treeData);
}
// 查询分类树
......@@ -183,6 +183,7 @@ class NewEditQuestionBankCategory extends Component {
defaultValue={categoryName}
placeholder={`请输入${title},最多10个字`}
maxLength={10}
autoComplete="off"
onChange={(e) => {
this.setState({
categoryName: e.target.value,
......
......@@ -100,6 +100,7 @@ class QuestionPreviewModal extends Component {
visible={true}
title="题目预览"
width={560}
centered={true}
footer={null}
onCancel={this.props.close}
>
......
......@@ -18,8 +18,16 @@
.question-stem {
margin-bottom: 16px;
img {
max-width: 88px;
max-height: 88px;
max-width: 100%;
max-height: 100%;
border-radius: 4px;
vertical-align: middle;
width: auto;
height: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
&__title {
height: 22px;
......@@ -39,8 +47,15 @@
}
}
.picture-box {
display: inline-flex;
width: 88px;
height: 88px;
margin: 12px 12px 0 0;
overflow: hidden;
display: inline-block;
align-items: center;
justify-content: center;
border: 1px solid #e8e8e8;
position: relative;
}
.voice-box {
margin-bottom: 12px;
......@@ -53,8 +68,16 @@
.question-option {
margin-bottom: 16px;
img {
max-width: 88px;
max-height: 88px;
max-width: 100%;
max-height: 100%;
border-radius: 4px;
vertical-align: middle;
width: auto;
height: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
&__title {
height: 22px;
......@@ -83,8 +106,15 @@
}
.picture-box {
display: inline-flex;
width: 88px;
height: 88px;
margin: 12px 12px 0 0;
overflow: hidden;
display: inline-block;
align-items: center;
justify-content: center;
border: 1px solid #e8e8e8;
position: relative;
}
.voice-box {
margin-bottom: 12px;
......@@ -162,16 +192,24 @@
.picture-box {
width: 88px;
height: 88px;
border-radius: 4px;
margin: 12px 12px 0 0;
overflow: hidden;
display: flex;
display: inline-block;
align-items: center;
justify-content: center;
margin-right: 12px;
border: 1px solid #e8e8e8;
position: relative;
.img-box {
max-width: 88px;
max-height: 88px;
max-width: 100%;
max-height: 100%;
border-radius: 4px;
vertical-align: middle;
width: auto;
height: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment