Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-book
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-book
Commits
6737d2b7
提交
6737d2b7
authored
10月 31, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
5ff64b0f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
109 行增加
和
105 行删除
+109
-105
expand.jsx
src/common/wangeditor-customer/components/expand.jsx
+3
-3
preview.jsx
src/common/wangeditor-customer/components/preview.jsx
+0
-0
padding.jsx
src/common/wangeditor-customer/customer/padding.jsx
+38
-57
customer.jsx
...mmon/wangeditor-customer/practice/components/customer.jsx
+0
-0
insert.jsx
...common/wangeditor-customer/practice/components/insert.jsx
+0
-0
list.jsx
src/common/wangeditor-customer/practice/components/list.jsx
+0
-0
topicItem.jsx
...mon/wangeditor-customer/practice/components/topicItem.jsx
+65
-42
index.jsx
src/common/wangeditor-customer/practice/index.jsx
+3
-3
preview.jsx
src/pages/books/audit/preview.jsx
+0
-0
form-drawer.jsx
src/pages/books/question-bank/components/form-drawer.jsx
+0
-0
没有找到文件。
src/common/wangeditor-customer/components/expand.jsx
浏览文件 @
6737d2b7
...
@@ -7,7 +7,7 @@ import EditorSimple from '@/common/editor-simple'
...
@@ -7,7 +7,7 @@ import EditorSimple from '@/common/editor-simple'
import
'./index.less'
import
'./index.less'
import
{
addExpandRead
,
expandReadInfo
}
from
'../utils/request'
import
{
addExpandRead
,
expandReadInfo
}
from
'../utils/request'
const
ExpandModal
=
forwardRef
(
(
props
,
ref
)
=>
{
const
ExpandModal
=
(
props
,
ref
)
=>
{
const
{
const
{
editor
,
editor
,
ossClient
,
ossClient
,
...
@@ -361,6 +361,6 @@ const ExpandModal = forwardRef((props, ref) => {
...
@@ -361,6 +361,6 @@ const ExpandModal = forwardRef((props, ref) => {
</
div
>
</
div
>
</
div
>
</
div
>
)
)
}
)
}
export
default
ExpandModal
export
default
forwardRef
(
ExpandModal
)
src/common/wangeditor-customer/components/preview.jsx
浏览文件 @
6737d2b7
差异被折叠。
点击展开。
src/common/wangeditor-customer/customer/padding.jsx
浏览文件 @
6737d2b7
import
React
,
{
useState
,
forwardRef
,
useImperativeHandle
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
forwardRef
,
useImperativeHandle
,
useRef
}
from
'react'
import
{
Input
,
InputNumber
}
from
'antd'
;
import
{
Input
,
InputNumber
}
from
'antd'
import
'../index.less'
;
import
'../index.less'
const
PaddingSpace
=
forwardRef
(
(
props
,
ref
)
=>
{
const
PaddingSpace
=
(
props
,
ref
)
=>
{
const
{
editorNodes
,
editor
}
=
props
;
const
{
editorNodes
,
editor
}
=
props
const
[
inputValue1
,
setInputValue1
]
=
useState
(
''
)
;
const
[
inputValue1
,
setInputValue1
]
=
useState
(
''
)
const
[
inputValue2
,
setInputValue2
]
=
useState
(
''
)
;
const
[
inputValue2
,
setInputValue2
]
=
useState
(
''
)
const
[
inputValue3
,
setInputValue3
]
=
useState
(
''
)
;
const
[
inputValue3
,
setInputValue3
]
=
useState
(
''
)
const
timeDebonceRef
=
useRef
()
;
const
timeDebonceRef
=
useRef
()
const
InpoutValueChange1
=
(
value
)
=>
{
const
InpoutValueChange1
=
value
=>
{
setInputValue1
(
value
)
;
setInputValue1
(
value
)
changeIt
()
;
changeIt
()
}
;
}
const
InpoutValueChange2
=
(
value
)
=>
{
const
InpoutValueChange2
=
value
=>
{
setInputValue2
(
value
)
;
setInputValue2
(
value
)
}
;
}
const
InpoutValueChange3
=
(
value
)
=>
{
const
InpoutValueChange3
=
value
=>
{
setInputValue3
(
value
)
;
setInputValue3
(
value
)
}
;
}
const
changeIt
=
()
=>
{
const
changeIt
=
()
=>
{
clearTimeout
(
timeDebonceRef
.
current
)
;
clearTimeout
(
timeDebonceRef
.
current
)
timeDebonceRef
.
current
=
setTimeout
(()
=>
{
timeDebonceRef
.
current
=
setTimeout
(()
=>
{
},
500
)
},
500
);
if
(
editorNodes
)
{
if
(
editorNodes
)
{
}
else
{
}
else
{
}
}
}
}
...
@@ -37,49 +33,34 @@ const PaddingSpace = forwardRef((props, ref) => {
...
@@ -37,49 +33,34 @@ const PaddingSpace = forwardRef((props, ref) => {
return
{
return
{
inputValue1
,
inputValue1
,
inputValue2
,
inputValue2
,
inputValue3
,
inputValue3
}
;
}
})
;
})
return
(
return
(
<
div
className=
'custom-bar-box-input'
>
<
div
className=
"custom-bar-box-input"
>
<
div
className=
'box'
>
<
div
className=
"box"
>
<
div
className=
'customer-box-input-item'
>
<
div
className=
"customer-box-input-item"
>
<
p
>
<
p
>
<
InputNumber
<
InputNumber
controls=
{
false
}
id=
"padding_1"
value=
{
inputValue1
}
onChange=
{
InpoutValueChange1
}
/>
controls=
{
false
}
id=
'padding_1'
value=
{
inputValue1
}
onChange=
{
InpoutValueChange1
}
/>
</
p
>
</
p
>
<
p
className=
'text'
>
段前间距
</
p
>
<
p
className=
"text"
>
段前间距
</
p
>
</
div
>
</
div
>
<
div
className=
'customer-box-input-item'
>
<
div
className=
"customer-box-input-item"
>
<
p
>
<
p
>
<
InputNumber
<
InputNumber
controls=
{
false
}
id=
"padding_2"
value=
{
inputValue2
}
onChange=
{
InpoutValueChange2
}
/>
controls=
{
false
}
id=
'padding_2'
value=
{
inputValue2
}
onChange=
{
InpoutValueChange2
}
/>
</
p
>
</
p
>
<
p
className=
'text'
>
段后间距
</
p
>
<
p
className=
"text"
>
段后间距
</
p
>
</
div
>
</
div
>
<
div
className=
'customer-box-input-item'
>
<
div
className=
"customer-box-input-item"
>
<
p
>
<
p
>
<
InputNumber
<
InputNumber
controls=
{
false
}
id=
"padding_3"
value=
{
inputValue3
}
onChange=
{
InpoutValueChange3
}
/>
controls=
{
false
}
id=
'padding_3'
value=
{
inputValue3
}
onChange=
{
InpoutValueChange3
}
/>
</
p
>
</
p
>
<
p
className=
'text'
>
行距
</
p
>
<
p
className=
"text"
>
行距
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
;
)
}
);
}
export
default
PaddingSpace
;
export
default
forwardRef
(
PaddingSpace
)
src/common/wangeditor-customer/practice/components/customer.jsx
浏览文件 @
6737d2b7
差异被折叠。
点击展开。
src/common/wangeditor-customer/practice/components/insert.jsx
浏览文件 @
6737d2b7
差异被折叠。
点击展开。
src/common/wangeditor-customer/practice/components/list.jsx
浏览文件 @
6737d2b7
差异被折叠。
点击展开。
src/common/wangeditor-customer/practice/components/topicItem.jsx
浏览文件 @
6737d2b7
import
React
,
{
useState
,
useEffect
,
forwardRef
,
useImperativeHandle
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
forwardRef
,
useImperativeHandle
}
from
'react'
import
{
Input
}
from
'antd'
;
import
{
Input
}
from
'antd'
const
inCorrect
=
[
'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'
];
const
inCorrect
=
[
'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'
]
const
TopicItem
=
forwardRef
(
(
props
,
ref
)
=>
{
const
TopicItem
=
(
props
,
ref
)
=>
{
const
{
topic
,
index
,
preview
=
false
}
=
props
;
const
{
topic
,
index
,
preview
=
false
}
=
props
const
[
recordInfo
,
setRecordInfo
]
=
useState
({})
;
const
[
recordInfo
,
setRecordInfo
]
=
useState
({})
const
[
choose
,
setChoose
]
=
useState
(
false
)
;
const
[
choose
,
setChoose
]
=
useState
(
false
)
const
[
chooseAnswer
,
setChooseAnswer
]
=
useState
([])
;
const
[
chooseAnswer
,
setChooseAnswer
]
=
useState
([])
const
[
isMap
,
setIsMap
]
=
useState
(
false
)
;
const
[
isMap
,
setIsMap
]
=
useState
(
false
)
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Object
.
entries
(
topic
).
length
)
{
if
(
Object
.
entries
(
topic
).
length
)
{
let
temp
=
{}
;
let
temp
=
{}
for
(
const
key
in
topic
)
{
for
(
const
key
in
topic
)
{
if
(
key
===
'question_list'
)
{
if
(
key
===
'question_list'
)
{
try
{
try
{
temp
[
key
]
=
JSON
.
parse
(
topic
[
key
])
;
temp
[
key
]
=
JSON
.
parse
(
topic
[
key
])
}
catch
(
e
)
{
}
catch
(
e
)
{
temp
[
key
]
=
topic
[
key
]
;
temp
[
key
]
=
topic
[
key
]
}
}
}
else
{
}
else
{
temp
[
key
]
=
topic
[
key
]
;
temp
[
key
]
=
topic
[
key
]
}
}
}
}
if
(
temp
.
question_style
===
1
||
temp
.
question_style
===
2
||
temp
.
question_style
===
3
)
{
if
(
temp
.
question_style
===
1
||
temp
.
question_style
===
2
||
temp
.
question_style
===
3
)
{
setChoose
(
true
)
;
setChoose
(
true
)
}
}
if
(
temp
.
question_list
instanceof
Array
&&
temp
.
question_list
.
length
>
0
)
{
if
(
temp
.
question_list
instanceof
Array
&&
temp
.
question_list
.
length
>
0
)
{
setIsMap
(
true
)
;
setIsMap
(
true
)
let
an
=
[]
;
let
an
=
[]
temp
.
question_list
.
forEach
((
item
,
index
)
=>
{
temp
.
question_list
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
correct
&&
(
item
.
correct
===
'true'
||
item
.
correct
===
true
))
{
if
(
item
.
correct
&&
(
item
.
correct
===
'true'
||
item
.
correct
===
true
))
{
an
.
push
(
inCorrect
[
index
])
;
an
.
push
(
inCorrect
[
index
])
}
}
})
;
})
setChooseAnswer
(
an
)
;
setChooseAnswer
(
an
)
}
}
setRecordInfo
(
temp
)
;
setRecordInfo
(
temp
)
}
}
},
[
topic
])
;
},
[
topic
])
useImperativeHandle
(
ref
,
()
=>
{
useImperativeHandle
(
ref
,
()
=>
{
return
{}
;
return
{}
})
;
})
return
(
return
(
<
div
className=
'topic-item-info'
>
<
div
className=
"topic-item-info"
>
{
Object
.
entries
(
recordInfo
).
length
&&
(
{
Object
.
entries
(
recordInfo
).
length
&&
(
<>
<>
<
div
className=
'index'
>
{
index
}
.
</
div
>
<
div
className=
"index"
>
{
index
}
.
</
div
>
<
div
className=
'topic'
>
<
div
className=
"topic"
>
{
/* <div>{recordInfo.titles}</div> */
}
{
/* <div>{recordInfo.titles}</div> */
}
<
div
<
div
className=
"topic-choose-title"
dangerouslySetInnerHTML=
{
{
__html
:
recordInfo
.
titles
}
}
></
div
>
className=
'topic-choose-title'
dangerouslySetInnerHTML=
{
{
__html
:
recordInfo
.
titles
}
}
></
div
>
{
[
1
,
2
,
3
].
includes
(
parseInt
(
recordInfo
.
question_style
))
&&
(
{
[
1
,
2
,
3
].
includes
(
parseInt
(
recordInfo
.
question_style
))
&&
(
<
div
className=
'topic-choose'
>
<
div
className=
"topic-choose"
>
{
choose
&&
{
choose
&&
isMap
&&
isMap
&&
recordInfo
&&
recordInfo
&&
...
@@ -67,28 +91,27 @@ const TopicItem = forwardRef((props, ref) => {
...
@@ -67,28 +91,27 @@ const TopicItem = forwardRef((props, ref) => {
recordInfo
.
question_list
.
map
((
item
,
cindex
)
=>
{
recordInfo
.
question_list
.
map
((
item
,
cindex
)
=>
{
return
(
return
(
<
div
<
div
className=
'topic-choose-item'
className=
"topic-choose-item"
key=
{
cindex
}
key=
{
cindex
}
dangerouslySetInnerHTML=
{
{
dangerouslySetInnerHTML=
{
{
__html
:
`${inCorrect[cindex]}. `
+
item
.
option
,
__html
:
`${inCorrect[cindex]}. `
+
item
.
option
}
}
}
}
></
div
>
></
div
>
)
);
})
}
})
}
</
div
>
</
div
>
)
}
)
}
{
preview
&&
(
{
preview
&&
(
<
div
className=
'notes-preivew'
>
<
div
className=
"notes-preivew"
>
{
recordInfo
.
question_style
===
5
&&
(
{
recordInfo
.
question_style
===
5
&&
(
<
div
className=
'textarea'
>
<
div
className=
"textarea"
>
<
Input
.
TextArea
autoSize=
{
{
minRows
:
3
,
maxRows
:
4
}
}
/>
<
Input
.
TextArea
autoSize=
{
{
minRows
:
3
,
maxRows
:
4
}
}
/>
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
)
}
)
}
<
div
className=
'answer'
>
<
div
className=
"answer"
>
<
strong
>
答案:
</
strong
>
<
strong
>
答案:
</
strong
>
{
[
1
,
2
,
3
].
includes
(
recordInfo
.
question_style
)
?
(
{
[
1
,
2
,
3
].
includes
(
recordInfo
.
question_style
)
?
(
<
span
>
{
chooseAnswer
.
join
(
' '
)
}
</
span
>
<
span
>
{
chooseAnswer
.
join
(
' '
)
}
</
span
>
...
@@ -100,7 +123,7 @@ const TopicItem = forwardRef((props, ref) => {
...
@@ -100,7 +123,7 @@ const TopicItem = forwardRef((props, ref) => {
</>
</>
)
}
)
}
</
div
>
</
div
>
)
;
)
}
);
}
export
default
TopicItem
;
export
default
forwardRef
(
TopicItem
)
src/common/wangeditor-customer/practice/index.jsx
浏览文件 @
6737d2b7
...
@@ -16,7 +16,7 @@ import { bookNameList } from './request'
...
@@ -16,7 +16,7 @@ import { bookNameList } from './request'
import
'../utils/iconfont'
import
'../utils/iconfont'
import
'./index.less'
import
'./index.less'
const
PracticeSettingModal
=
forwardRef
(
(
props
,
ref
)
=>
{
const
PracticeSettingModal
=
(
props
,
ref
)
=>
{
const
{
editor
,
chapterId
,
bookId
,
closePanel
}
=
props
const
{
editor
,
chapterId
,
bookId
,
closePanel
}
=
props
const
dispatch
=
useDispatch
()
const
dispatch
=
useDispatch
()
const
{
practiceRandom
,
practiceTitle
,
practiceTheme
}
=
useSelector
(
state
=>
state
.
editor
)
const
{
practiceRandom
,
practiceTitle
,
practiceTheme
}
=
useSelector
(
state
=>
state
.
editor
)
...
@@ -248,6 +248,6 @@ const PracticeSettingModal = forwardRef((props, ref) => {
...
@@ -248,6 +248,6 @@ const PracticeSettingModal = forwardRef((props, ref) => {
</
Row
>
</
Row
>
</
div
>
</
div
>
)
)
}
)
}
export
default
PracticeSettingModal
export
default
forwardRef
(
PracticeSettingModal
)
src/pages/books/audit/preview.jsx
浏览文件 @
6737d2b7
差异被折叠。
点击展开。
src/pages/books/question-bank/components/form-drawer.jsx
浏览文件 @
6737d2b7
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论