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
李晨
sass-admin
Commits
6cd02a57
Commit
6cd02a57
authored
Aug 28, 2025
by
end
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改投票新建bug
parent
bfe13a01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
103 deletions
+3
-103
dist.zip
+0
-0
src/pages/TrainingTools/Survey/Create/AddTest.jsx
+2
-58
src/pages/TrainingTools/Survey/Create/index.jsx
+1
-45
No files found.
dist.zip
deleted
100644 → 0
View file @
bfe13a01
File deleted
src/pages/TrainingTools/Survey/Create/AddTest.jsx
View file @
6cd02a57
...
...
@@ -4,7 +4,6 @@ import TestModal from "./TestModal";
import
{
insertTestFetch
,
getTestListFetch
,
addTest
,
editTestFetch
,
jumpTestFetch
,
jumpReset
,
...
...
@@ -12,11 +11,8 @@ import {
import
{
Button
,
Table
,
Popconfirm
,
Modal
,
Pagination
,
message
,
Empty
,
}
from
"antd"
;
import
styles
from
"./index.less"
;
import
{
DragDropContext
,
DragSource
,
DropTarget
}
from
"react-dnd"
;
...
...
@@ -193,58 +189,20 @@ class AddTest extends Component {
if
(
values
.
type
===
1
)
{
for
(
let
i
=
0
;
i
<
values
.
cont
.
length
;
i
++
)
{
if
(
values
.
cont
[
i
]
==
null
)
continue
;
console
.
log
(
values
,
11111
);
objs
.
push
({
content
:
values
.
cont
[
i
],
//correct:values.correct[i]?1:0,
//editable:values.editable[i]?1:0,
//jumpNum:values.jumpNum[i]?values.jumpNum[i]:"",
no
:
values
.
no
[
i
],
researchId
:
surid
,
keywords
:
this
.
addother
.
state
.
keywords
,
});
}
console
.
log
(
"单选题其他"
,
objs
);
}
if
(
values
.
type
===
2
)
{
for
(
let
i
=
0
;
i
<
values
.
cont
.
length
;
i
++
)
{
objs
.
push
({
content
:
values
.
cont
[
i
],
//correct:values.correct[i]?1:0,
//editable:values.editable[i]?1:0,
no
:
values
.
no
[
i
],
researchId
:
surid
,
});
}
// console.log(objs)
}
if
(
values
.
type
===
4
)
{
for
(
let
i
=
0
;
i
<
values
.
cont
.
length
;
i
++
)
{
// 最大值最小值判断
if
(
values
.
maxScore
[
i
]
<=
values
.
minScore
[
i
])
{
message
.
error
(
"最大值不能小于最小值"
);
this
.
setState
({
confirmLoading
:
false
,
});
return
;
}
objs
.
push
({
content
:
values
.
cont
[
i
],
maxScore
:
values
.
maxScore
[
i
],
minScore
:
values
.
minScore
[
i
],
no
:
values
.
no
[
i
],
researchId
:
surid
,
});
}
}
if
(
editstate
)
{
const
param
=
{
type
:
values
.
type
,
content
:
values
.
content
,
//bug-9797-liyuan 附件回显
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
[
0
]
?
this
.
state
.
fileUrl
:
this
.
state
.
testItem
.
contentAppendixUrl
?
this
.
state
.
testItem
.
contentAppendixUrl
:
""
,
...
...
@@ -252,7 +210,6 @@ class AddTest extends Component {
questionOptions
:
objs
,
maxSelectItem
:
values
.
needAnswer2
?
values
.
maxSelectItem
:
""
,
minSelectItem
:
values
.
needAnswer1
?
values
.
minSelectItem
:
""
,
//no:this.state.testItem.no,
hasOther
:
this
.
addother
.
state
.
addother
?
1
:
0
,
otherOption
:
{
content
:
this
.
addother
.
state
.
other
,
...
...
@@ -264,7 +221,6 @@ class AddTest extends Component {
questions
:
[{
id
:
editid
,
...
param
}],
researchId
:
surid
,
};
// console.log(temp)
this
.
props
.
edit
(
temp
,
surid
,
this
.
state
.
pageNo
,
this
.
state
.
pageSize
);
this
.
setState
({
fileUrl
:
""
});
}
else
{
...
...
@@ -272,13 +228,12 @@ class AddTest extends Component {
keywords
:
this
.
addother
.
state
.
keywords
,
type
:
values
.
type
,
content
:
values
.
content
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
[
0
]
:
""
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
""
,
needAnswer
:
values
.
needAnswer
?
1
:
0
,
questionOptions
:
objs
,
maxSelectItem
:
values
.
needAnswer2
?
values
.
maxSelectItem
:
""
,
minSelectItem
:
values
.
needAnswer1
?
values
.
minSelectItem
:
""
,
reseachId
:
surid
,
//no:tlist.list[0]?tlist.list[0].no+1:order,
hasOther
:
this
.
addother
.
state
.
addother
?
1
:
0
,
otherOption
:
{
content
:
this
.
addother
.
state
.
other
,
...
...
@@ -286,17 +241,6 @@ class AddTest extends Component {
required
:
this
.
addother
.
state
.
ismust
?
1
:
0
,
},
};
console
.
clear
();
console
.
log
(
param
);
// 判断最大可选
// if( param.maxSelectItem !== '' && param.maxSelectItem > param.questionOptions.length){
// message.error('最多项错误')
// this.setState({
// confirmLoading: false,
// });
// return
// }
this
.
props
.
insert
(
param
,
this
.
state
.
pageNo
,
this
.
state
.
pageSize
);
this
.
setState
({
fileUrl
:
""
});
}
...
...
src/pages/TrainingTools/Survey/Create/index.jsx
View file @
6cd02a57
import
React
,
{
Component
}
from
"react"
;
import
Base
from
"./Base"
;
import
AddTest
from
"./AddTest"
;
import
Jumpquestion
from
"./jumpquestios.js"
;
import
MessageRemind
from
"@/common/MessageRemind"
;
import
moment
from
"moment"
;
import
{
message
}
from
"antd"
;
import
{
Link
,
browserHistory
,
withRouter
}
from
"react-router-dom"
;
import
{
Link
,
withRouter
}
from
"react-router-dom"
;
import
Breadcrumb
from
"@/common/Breadcrumb"
;
import
{
getTSdata
,
insertSurFetch
,
updateFetch
,
insertTestFetch
,
getSurDetailsFetch
,
getTestListFetch
,
upFetch
,
reFetch
,
postNewsList
,
getNewsListMessageRemind
,
}
from
"../redux/actions"
;
import
{
connect
}
from
"react-redux"
;
import
{
Form
,
Steps
,
Button
,
Input
,
InputNumber
,
Radio
}
from
"antd"
;
import
QRCode
from
"qrcode.react"
;
const
FormItem
=
Form
.
Item
;
const
Step
=
Steps
.
Step
;
import
styles
from
"./index.less"
;
import
Task
from
"@/common/task/Task"
;
var
companyCode
=
location
.
pathname
.
split
(
"/"
)[
1
];
var
siteCode
=
location
.
pathname
.
split
(
"/"
)[
2
];
...
...
@@ -77,7 +72,6 @@ class SurveyCreact extends Component {
FirstNext
()
{
const
current
=
this
.
state
.
current
+
1
;
const
component
=
this
.
first
;
const
dcomponent
=
this
.
remind
;
const
{
trainJson
}
=
this
.
state
;
let
_this
=
this
;
...
...
@@ -234,12 +228,6 @@ class SurveyCreact extends Component {
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
14
},
};
// 938
let
defaultTags
=
[];
if
(
details
.
keywords
)
{
defaultTags
=
details
.
keywords
.
split
(
","
);
}
// 938 结束
const
remindProps
=
{
defaultValue
:
details
,
...
...
@@ -365,37 +353,6 @@ class SurveyCreact extends Component {
</
Button
>
</
div
>
)
}
{
/* {this.state.current === 1 && (
<div>
<Link
to={
"/" +
companyCode +
"/" +
siteCode +
"/index/tool/survey/survey-management"
}
>
<Button className={styles.survey_create_action_btn}>
取消
</Button>
</Link>
<Button
className={styles.survey_create_action_btn}
type="primary"
onClick={this.prev}
>
上一步
</Button>
<Button
className={styles.survey_create_action_btn}
type="primary"
onClick={this.SecondSave}
>
下一步
</Button>
</div>
)} */
}
{
this
.
state
.
current
===
1
&&
(
<
div
>
<
Link
...
...
@@ -478,7 +435,6 @@ function mapDispatchToProps(dispatch) {
getTSdata
:
obj
=>
dispatch
(
getTSdata
(
obj
)),
insert
:
(
obj
,
callback
)
=>
dispatch
(
insertSurFetch
(
obj
,
callback
)),
update
:
(
obj
,
callback
)
=>
dispatch
(
updateFetch
(
obj
,
callback
)),
inserts
:
arr
=>
dispatch
(
insertTestFetch
(
arr
)),
getDetails
:
(
obj
,
callback
)
=>
dispatch
(
getSurDetailsFetch
(
obj
,
callback
)),
gettestlist
:
obj
=>
dispatch
(
getTestListFetch
(
obj
)),
up
:
id
=>
dispatch
(
upFetch
(
id
)),
...
...
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