Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sass-admin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj_app
sass-admin
Commits
0f44f00a
Commit
0f44f00a
authored
Apr 14, 2025
by
yanglang123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
6b6ce94f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
64 deletions
+60
-64
dist.zip
+0
-0
src/common/Editor/editor.js
+16
-16
src/pages/TrainingPrograms/ProgeamsManage/index.jsx
+1
-4
src/pages/TrainingTools/Question/Create/index.jsx
+3
-3
src/pages/TrainingTools/Survey/Create/Base.jsx
+16
-17
src/pages/TrainingTools/Survey/Create/index.jsx
+17
-17
src/pages/TrainingTools/Survey/index.jsx
+7
-7
No files found.
dist.zip
View file @
0f44f00a
No preview for this file type
src/common/Editor/editor.js
View file @
0f44f00a
...
@@ -21,25 +21,25 @@ class Editor extends PureComponent {
...
@@ -21,25 +21,25 @@ class Editor extends PureComponent {
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
importContent
}
=
this
.
props
;
const
{
importContent
}
=
this
.
props
;
if
(
importContent
)
{
//
if (importContent) {
return
{
//
return {
defaultValue
:
BraftEditor
.
createEditorState
(
importContent
),
//
defaultValue: BraftEditor.createEditorState(importContent),
importContent
,
//
importContent,
};
//
};
}
//
}
this
.
props
.
gupfetch
();
this
.
props
.
gupfetch
();
}
}
static
getDerivedStateFromProps
(
nextProps
,
prevState
)
{
//
static getDerivedStateFromProps(nextProps, prevState) {
const
{
importContent
}
=
nextProps
;
//
const { importContent } = nextProps;
if
(
importContent
!==
prevState
.
importContent
)
{
//
if (importContent !== prevState.importContent) {
return
{
//
return {
defaultValue
:
BraftEditor
.
createEditorState
(
importContent
),
//
defaultValue: BraftEditor.createEditorState(importContent),
importContent
,
//
importContent,
};
//
};
}
//
}
return
null
;
//
return null;
}
//
}
submitContent
=
()
=>
{
submitContent
=
()
=>
{
// 在编辑器获得焦点时按下ctrl+s会执行此方法
// 在编辑器获得焦点时按下ctrl+s会执行此方法
// 编辑器内容提交到服务端之前,可直接调用editorState.toHTML()来获取HTML格式的内容
// 编辑器内容提交到服务端之前,可直接调用editorState.toHTML()来获取HTML格式的内容
...
...
src/pages/TrainingPrograms/ProgeamsManage/index.jsx
View file @
0f44f00a
...
@@ -94,9 +94,6 @@ const steps = [
...
@@ -94,9 +94,6 @@ const steps = [
title
:
"活动基本信息"
,
title
:
"活动基本信息"
,
},
},
{
{
title
:
"投票"
,
},
{
title
:
"设置活动规则"
,
title
:
"设置活动规则"
,
},
},
{
{
...
@@ -3731,7 +3728,7 @@ class NewTP extends Component {
...
@@ -3731,7 +3728,7 @@ class NewTP extends Component {
(
this
.
state
.
current
===
3
&&
(
(
this
.
state
.
current
===
3
&&
(
<
div
className=
{
styles
.
steps_content
}
>
<
div
className=
{
styles
.
steps_content
}
>
{
/* 发布页面 */
}
{
/* 发布页面 */
}
<
Release
trainId=
{
this
.
state
.
trainId
}
/>
{
/* <Release trainId={this.state.trainId} /> */
}
</
div
>
</
div
>
))
}
))
}
{
/* 步骤条button显示 */
}
{
/* 步骤条button显示 */
}
...
...
src/pages/TrainingTools/Question/Create/index.jsx
View file @
0f44f00a
...
@@ -344,10 +344,10 @@ class SurveyCreact extends Component {
...
@@ -344,10 +344,10 @@ class SurveyCreact extends Component {
content
:
(
content
:
(
<
div
className=
{
styles
.
survey_create_qccode
}
>
<
div
className=
{
styles
.
survey_create_qccode
}
>
<
p
className=
{
styles
.
survey_create_info
}
>
恭喜您,调研发布成功
</
p
>
<
p
className=
{
styles
.
survey_create_info
}
>
恭喜您,调研发布成功
</
p
>
<
p
className=
{
styles
.
survey_create_info
}
>
调研二维码
</
p
>
{
/* <p className={styles.survey_create_info}>调研二维码</p> */
}
<
div
>
{
/*
<div>
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
</
div
>
</div>
*/
}
</
div
>
</
div
>
),
),
},
},
...
...
src/pages/TrainingTools/Survey/Create/Base.jsx
View file @
0f44f00a
...
@@ -50,17 +50,17 @@ class Base extends Component {
...
@@ -50,17 +50,17 @@ class Base extends Component {
data
:
[
data
:
[
{
{
key
:
"1"
,
key
:
"1"
,
name
:
"金融行业
调研
"
,
name
:
"金融行业
投票
"
,
age
:
"2017-1-1"
,
age
:
"2017-1-1"
,
},
},
{
{
key
:
"2"
,
key
:
"2"
,
name
:
"金融行业
调研
"
,
name
:
"金融行业
投票
"
,
age
:
"2017-1-1"
,
age
:
"2017-1-1"
,
},
},
{
{
key
:
"3"
,
key
:
"3"
,
name
:
"金融行业
调研
"
,
name
:
"金融行业
投票
"
,
age
:
"2017-1-1"
,
age
:
"2017-1-1"
,
},
},
],
],
...
@@ -327,7 +327,7 @@ class Base extends Component {
...
@@ -327,7 +327,7 @@ class Base extends Component {
const
columns
=
[
const
columns
=
[
{
{
title
:
"
调研
名称"
,
title
:
"
投票
名称"
,
dataIndex
:
"name"
,
dataIndex
:
"name"
,
key
:
"name"
,
key
:
"name"
,
width
:
"50%"
,
width
:
"50%"
,
...
@@ -354,7 +354,7 @@ class Base extends Component {
...
@@ -354,7 +354,7 @@ class Base extends Component {
return
(
return
(
<
div
className=
{
styles
.
cred_edit
}
>
<
div
className=
{
styles
.
cred_edit
}
>
<
Form
>
<
Form
>
<
FormItem
{
...
formItemLayout
}
label=
"
调研
名称:"
>
<
FormItem
{
...
formItemLayout
}
label=
"
投票
名称:"
>
{
getFieldDecorator
(
"name"
,
{
{
getFieldDecorator
(
"name"
,
{
initialValue
:
defaultValue
.
name
?
defaultValue
.
name
:
""
,
initialValue
:
defaultValue
.
name
?
defaultValue
.
name
:
""
,
rules
:
[
rules
:
[
...
@@ -365,7 +365,7 @@ class Base extends Component {
...
@@ -365,7 +365,7 @@ class Base extends Component {
rule
,
rule
,
value
,
value
,
callback
,
callback
,
"请输少于100字的
调研
名称"
,
"请输少于100字的
投票
名称"
,
100
100
);
);
},
},
...
@@ -373,7 +373,7 @@ class Base extends Component {
...
@@ -373,7 +373,7 @@ class Base extends Component {
],
],
})(
})(
<
Input
<
Input
placeholder=
"请输入
调研
名称"
placeholder=
"请输入
投票
名称"
style=
{
{
display
:
"inline-block"
}
}
style=
{
{
display
:
"inline-block"
}
}
/>
/>
)
}
)
}
...
@@ -384,7 +384,7 @@ class Base extends Component {
...
@@ -384,7 +384,7 @@ class Base extends Component {
size=
"small"
size=
"small"
style=
{
{
display
:
"inline-block"
}
}
style=
{
{
display
:
"inline-block"
}
}
>
>
复制
调研
复制
投票
</
Button
>
</
Button
>
)
}
)
}
</
FormItem
>
</
FormItem
>
...
@@ -457,7 +457,7 @@ class Base extends Component {
...
@@ -457,7 +457,7 @@ class Base extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
)
}
)
}
<
FormItem
{
...
formItemLayout
}
label=
"
调研
时间:"
>
<
FormItem
{
...
formItemLayout
}
label=
"
投票
时间:"
>
{
getFieldDecorator
(
"time"
,
{
{
getFieldDecorator
(
"time"
,
{
initialValue
:
defaultValue
.
startTime
initialValue
:
defaultValue
.
startTime
?
[
?
[
...
@@ -475,7 +475,7 @@ class Base extends Component {
...
@@ -475,7 +475,7 @@ class Base extends Component {
{
{
type
:
"array"
,
type
:
"array"
,
required
:
true
,
required
:
true
,
message
:
"请选择
调研
时间"
,
message
:
"请选择
投票
时间"
,
},
},
],
],
})(
})(
...
@@ -496,7 +496,6 @@ class Base extends Component {
...
@@ -496,7 +496,6 @@ class Base extends Component {
},
},
],
],
})(<
Input
type=
"number"
placeholder=
"请输入投票次数"
/>)
}
})(<
Input
type=
"number"
placeholder=
"请输入投票次数"
/>)
}
<
p
style=
{
{
color
:
"red"
}
}
>
(0为不限次数)
</
p
>
</
FormItem
>
</
FormItem
>
<
FormItem
<
FormItem
{
...
formItemLayout
}
{
...
formItemLayout
}
...
@@ -508,7 +507,7 @@ class Base extends Component {
...
@@ -508,7 +507,7 @@ class Base extends Component {
style=
{
{
fontSize
:
12
,
color
:
"#999"
}
}
style=
{
{
fontSize
:
12
,
color
:
"#999"
}
}
/>
/>
</
Tooltip
>
</
Tooltip
>
调研
logo
投票
logo
</
span
>
</
span
>
}
}
>
>
...
@@ -517,7 +516,7 @@ class Base extends Component {
...
@@ -517,7 +516,7 @@ class Base extends Component {
rules
:
[
rules
:
[
{
{
required
:
false
,
required
:
false
,
message
:
"请上传
调研
logo"
,
message
:
"请上传
投票
logo"
,
},
},
],
],
})(
})(
...
@@ -550,7 +549,7 @@ class Base extends Component {
...
@@ -550,7 +549,7 @@ class Base extends Component {
</
RadioGroup
>
</
RadioGroup
>
)
}
)
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"
调研
说明:"
>
<
FormItem
{
...
formItemLayout
}
label=
"
投票
说明:"
>
{
getFieldDecorator
(
"content"
,
{
{
getFieldDecorator
(
"content"
,
{
initialValue
:
defaultValue
.
content
?
defaultValue
.
content
:
""
,
initialValue
:
defaultValue
.
content
?
defaultValue
.
content
:
""
,
rules
:
[
rules
:
[
...
@@ -561,7 +560,7 @@ class Base extends Component {
...
@@ -561,7 +560,7 @@ class Base extends Component {
],
],
})(<
TextArea
/>)
}
})(<
TextArea
/>)
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"
调研
备注:"
>
<
FormItem
{
...
formItemLayout
}
label=
"
投票
备注:"
>
{
getFieldDecorator
(
"remark"
,
{
{
getFieldDecorator
(
"remark"
,
{
initialValue
:
defaultValue
.
remark
?
defaultValue
.
remark
:
""
,
initialValue
:
defaultValue
.
remark
?
defaultValue
.
remark
:
""
,
rules
:
[
rules
:
[
...
@@ -574,14 +573,14 @@ class Base extends Component {
...
@@ -574,14 +573,14 @@ class Base extends Component {
</
FormItem
>
</
FormItem
>
</
Form
>
</
Form
>
<
Modal
<
Modal
title=
"选择
调研
"
title=
"选择
投票
"
visible=
{
visible
}
visible=
{
visible
}
onOk=
{
this
.
handleOk
}
onOk=
{
this
.
handleOk
}
confirmLoading=
{
confirmLoading
}
confirmLoading=
{
confirmLoading
}
onCancel=
{
this
.
handleCancel
}
onCancel=
{
this
.
handleCancel
}
>
>
<
Search
<
Search
placeholder=
"请输入
调研
名称"
placeholder=
"请输入
投票
名称"
onSearch=
{
this
.
searchValue
}
onSearch=
{
this
.
searchValue
}
style=
{
{
width
:
200
,
marginBottom
:
20
}
}
style=
{
{
width
:
200
,
marginBottom
:
20
}
}
/>
/>
...
...
src/pages/TrainingTools/Survey/Create/index.jsx
View file @
0f44f00a
...
@@ -265,7 +265,7 @@ class SurveyCreact extends Component {
...
@@ -265,7 +265,7 @@ class SurveyCreact extends Component {
usable
:
false
,
usable
:
false
,
contentFlag
:
true
,
contentFlag
:
true
,
};
};
console
.
log
(
details
.
remind
,
"
调研消息是否提醒"
,
this
.
id
,
"调研
id"
);
console
.
log
(
details
.
remind
,
"
投票消息是否提醒"
,
this
.
id
,
"投票
id"
);
const
steps
=
[
const
steps
=
[
{
{
title
:
"基本信息"
,
title
:
"基本信息"
,
...
@@ -331,23 +331,23 @@ class SurveyCreact extends Component {
...
@@ -331,23 +331,23 @@ class SurveyCreact extends Component {
</
div
>
</
div
>
),
),
},
},
{
//
{
title
:
"跳题策略"
,
//
title: "跳题策略",
content
:
(
//
content: (
<
div
>
//
<div>
<
Jumpquestion
id=
{
surid
}
/>
//
<Jumpquestion id={surid} />
</
div
>
//
</div>
),
//
),
},
//
},
{
{
title
:
"预览"
,
title
:
"预览"
,
content
:
(
content
:
(
<
div
className=
{
styles
.
survey_create_qccode
}
>
<
div
className=
{
styles
.
survey_create_qccode
}
>
<
p
className=
{
styles
.
survey_create_info
}
>
恭喜您,
调研
发布成功
</
p
>
<
p
className=
{
styles
.
survey_create_info
}
>
恭喜您,
投票
发布成功
</
p
>
<
p
className=
{
styles
.
survey_create_info
}
>
调研
二维码
</
p
>
{
/* <p className={styles.survey_create_info}>投票
二维码</p>
<div>
<div>
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
</
div
>
</div>
*/
}
</
div
>
</
div
>
),
),
},
},
...
@@ -356,7 +356,7 @@ class SurveyCreact extends Component {
...
@@ -356,7 +356,7 @@ class SurveyCreact extends Component {
const
{
current
}
=
this
.
state
;
const
{
current
}
=
this
.
state
;
return
(
return
(
<
div
className=
{
styles
.
survey_create
}
>
<
div
className=
{
styles
.
survey_create
}
>
<
Breadcrumb
title=
"新建
调研
"
/>
<
Breadcrumb
title=
"新建
投票
"
/>
<
Steps
current=
{
current
}
className=
{
styles
.
survey_create_steps
}
>
<
Steps
current=
{
current
}
className=
{
styles
.
survey_create_steps
}
>
{
steps
.
map
(
item
=>
(
{
steps
.
map
(
item
=>
(
<
Step
key=
{
item
.
title
}
title=
{
item
.
title
}
/>
<
Step
key=
{
item
.
title
}
title=
{
item
.
title
}
/>
...
@@ -391,7 +391,7 @@ class SurveyCreact extends Component {
...
@@ -391,7 +391,7 @@ class SurveyCreact extends Component {
</
Button
>
</
Button
>
</
div
>
</
div
>
)
}
)
}
{
this
.
state
.
current
===
1
&&
(
{
/* {
this.state.current === 1 && (
<div>
<div>
<Link
<Link
to={
to={
...
@@ -421,8 +421,8 @@ class SurveyCreact extends Component {
...
@@ -421,8 +421,8 @@ class SurveyCreact extends Component {
下一步
下一步
</Button>
</Button>
</div>
</div>
)
}
)}
*/
}
{
this
.
state
.
current
===
2
&&
(
{
this
.
state
.
current
===
1
&&
(
<
div
>
<
div
>
<
Link
<
Link
to=
{
to=
{
...
@@ -461,7 +461,7 @@ class SurveyCreact extends Component {
...
@@ -461,7 +461,7 @@ class SurveyCreact extends Component {
</
Button
>
</
Button
>
</
div
>
</
div
>
)
}
)
}
{
this
.
state
.
current
===
3
&&
(
{
this
.
state
.
current
===
2
&&
(
<
div
>
<
div
>
<
Link
<
Link
to=
{
to=
{
...
...
src/pages/TrainingTools/Survey/index.jsx
View file @
0f44f00a
...
@@ -224,10 +224,10 @@ class Survey extends Component {
...
@@ -224,10 +224,10 @@ class Survey extends Component {
}
}
detil
(
id
,
type
)
{
detil
(
id
,
type
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
//
调研
明细
//
投票
明细
this
.
props
.
exdetail
({
researchId
:
id
});
this
.
props
.
exdetail
({
researchId
:
id
});
}
else
{
}
else
{
//
调研
分析
//
投票
分析
this
.
props
.
exana
({
researchId
:
id
});
this
.
props
.
exana
({
researchId
:
id
});
}
}
}
}
...
@@ -244,7 +244,7 @@ class Survey extends Component {
...
@@ -244,7 +244,7 @@ class Survey extends Component {
key
:
"researchNo"
,
key
:
"researchNo"
,
},
},
{
{
title
:
"
调研
名称"
,
title
:
"
投票
名称"
,
dataIndex
:
"name"
,
dataIndex
:
"name"
,
key
:
"name"
,
key
:
"name"
,
width
:
300
,
width
:
300
,
...
@@ -274,7 +274,7 @@ class Survey extends Component {
...
@@ -274,7 +274,7 @@ class Survey extends Component {
render
:
text
=>
<
span
>
{
text
?
text
:
0
}
</
span
>,
render
:
text
=>
<
span
>
{
text
?
text
:
0
}
</
span
>,
},
},
{
{
title
:
"
调研
时间"
,
title
:
"
投票
时间"
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
div
>
<
div
>
<
div
>
{
moment
(
record
.
startTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
div
>
<
div
>
{
moment
(
record
.
startTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
div
>
...
@@ -394,14 +394,14 @@ class Survey extends Component {
...
@@ -394,14 +394,14 @@ class Survey extends Component {
style=
{
{
cursor
:
"pointer"
,
color
:
"#1890FF"
}
}
style=
{
{
cursor
:
"pointer"
,
color
:
"#1890FF"
}
}
onClick=
{
()
=>
this
.
detil
(
record
.
id
,
1
)
}
onClick=
{
()
=>
this
.
detil
(
record
.
id
,
1
)
}
>
>
调研
明细导出
投票
明细导出
</
div
>
</
div
>
<
div
<
div
className=
{
styles
.
survey_list_btn
}
className=
{
styles
.
survey_list_btn
}
style=
{
{
cursor
:
"pointer"
,
color
:
"#1890FF"
}
}
style=
{
{
cursor
:
"pointer"
,
color
:
"#1890FF"
}
}
onClick=
{
()
=>
this
.
detil
(
record
.
id
,
2
)
}
onClick=
{
()
=>
this
.
detil
(
record
.
id
,
2
)
}
>
>
调研
分析导出
投票
分析导出
</
div
>
</
div
>
</
div
>
</
div
>
)
:
null
}
)
:
null
}
...
@@ -436,7 +436,7 @@ class Survey extends Component {
...
@@ -436,7 +436,7 @@ class Survey extends Component {
marginTop
:
16
,
marginTop
:
16
,
marginRight
:
16
,
marginRight
:
16
,
}
}
}
}
placeholder=
"请输入
调研
名称、自定义关键词"
placeholder=
"请输入
投票
名称、自定义关键词"
onChange=
{
this
.
handleChange
}
onChange=
{
this
.
handleChange
}
/>
/>
<
Button
<
Button
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment