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
a6054f56
Commit
a6054f56
authored
Sep 24, 2025
by
chengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增投票缩略图
parent
9ee63012
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
17 deletions
+76
-17
src/pages/SystemManagement/Information/index.jsx
+8
-8
src/pages/TrainingTools/Survey/Create/AddTest.jsx
+2
-2
src/pages/TrainingTools/Survey/Create/TestModal.jsx
+61
-5
src/pages/TrainingTools/Survey/Details/index.jsx
+5
-2
No files found.
src/pages/SystemManagement/Information/index.jsx
View file @
a6054f56
...
...
@@ -308,11 +308,11 @@ class TreeItem extends React.Component {
className=
{
Styles
.
pmEditIcon
}
onClick=
{
()
=>
this
.
showModal
(
"2"
)
}
/>
{
/*
<Icon
<
Icon
type=
"delete"
className=
{
Styles
.
pmEditIcon
}
onClick=
{
()
=>
this
.
onDelete
()
}
/>
*/
}
/>
</
span
>
)
:
""
}
...
...
@@ -868,7 +868,7 @@ class Information extends React.Component {
parentID=
{
this
.
state
.
ificationList
}
postAddNewsLists=
{
this
.
AddNewsList
}
postEditNewsLists=
{
this
.
EditNewsLists
}
//
newsDelete=
{
this
.
onNewsDelete
}
newsDelete=
{
this
.
onNewsDelete
}
onTableList=
{
this
.
onTableList
}
/>
}
...
...
@@ -888,7 +888,7 @@ class Information extends React.Component {
parentID=
{
this
.
state
.
ificationList
}
postAddNewsLists=
{
this
.
AddNewsList
}
postEditNewsLists=
{
this
.
EditNewsLists
}
//
newsDelete=
{
this
.
onNewsDelete
}
newsDelete=
{
this
.
onNewsDelete
}
onTableList=
{
this
.
onTableList
}
/>
}
...
...
@@ -909,7 +909,7 @@ class Information extends React.Component {
parentID=
{
this
.
state
.
ificationList
}
postAddNewsLists=
{
this
.
AddNewsList
}
postEditNewsLists=
{
this
.
EditNewsLists
}
//
newsDelete=
{
this
.
onNewsDelete
}
newsDelete=
{
this
.
onNewsDelete
}
onTableList=
{
this
.
onTableList
}
/>
}
...
...
@@ -929,7 +929,7 @@ class Information extends React.Component {
parentID=
{
this
.
state
.
ificationList
}
postAddNewsLists=
{
this
.
AddNewsList
}
postEditNewsLists=
{
this
.
EditNewsLists
}
//
newsDelete=
{
this
.
onNewsDelete
}
newsDelete=
{
this
.
onNewsDelete
}
onTableList=
{
this
.
onTableList
}
/>
}
...
...
@@ -950,7 +950,7 @@ class Information extends React.Component {
parentID=
{
this
.
state
.
ificationList
}
postAddNewsLists=
{
this
.
AddNewsList
}
postEditNewsLists=
{
this
.
EditNewsLists
}
//
newsDelete=
{
this
.
onNewsDelete
}
newsDelete=
{
this
.
onNewsDelete
}
onTableList=
{
this
.
onTableList
}
/>
}
...
...
@@ -972,7 +972,7 @@ class Information extends React.Component {
parentID=
{
this
.
state
.
ificationList
}
postAddNewsLists=
{
this
.
AddNewsList
}
postEditNewsLists=
{
this
.
EditNewsLists
}
//
newsDelete=
{
this
.
onNewsDelete
}
newsDelete=
{
this
.
onNewsDelete
}
onTableList=
{
this
.
onTableList
}
/>
}
...
...
src/pages/TrainingTools/Survey/Create/AddTest.jsx
View file @
a6054f56
...
...
@@ -171,8 +171,6 @@ class AddTest extends Component {
handleOk
()
{
const
{
surid
,
tlist
}
=
this
.
props
;
const
{
order
,
editstate
,
editid
}
=
this
.
state
;
console
.
log
(
11111
,
this
.
addother
.
state
);
// console.log(surid)
this
.
props
.
jumpreset
();
this
.
setState
({
confirmLoading
:
true
,
...
...
@@ -201,6 +199,7 @@ class AddTest extends Component {
const
param
=
{
type
:
values
.
type
,
content
:
values
.
content
,
logoSrc
:
values
.
logoSrc
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
this
.
state
.
testItem
.
contentAppendixUrl
...
...
@@ -228,6 +227,7 @@ class AddTest extends Component {
keywords
:
this
.
addother
.
state
.
keywords
,
type
:
values
.
type
,
content
:
values
.
content
,
logoSrc
:
values
.
logoSrc
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
""
,
needAnswer
:
values
.
needAnswer
?
1
:
0
,
questionOptions
:
objs
,
...
...
src/pages/TrainingTools/Survey/Create/TestModal.jsx
View file @
a6054f56
...
...
@@ -2,6 +2,7 @@ import React, { Component } from "react";
import
styles
from
"./index.less"
;
import
{
Form
,
Input
,
Radio
,
Row
,
Col
,
message
}
from
"antd"
;
import
UploadUtil
from
"../component/UploadUtil"
;
import
UploadImageCover
from
"@/common/UploadImageCover"
;
const
{
TextArea
}
=
Input
;
const
FormItem
=
Form
.
Item
;
const
RadioGroup
=
Radio
.
Group
;
...
...
@@ -24,8 +25,10 @@ class TestModal extends Component {
other
:
"其他"
,
addother
:
false
,
keywords
:
""
,
logoSrc
:
""
,
};
this
.
handleRadioChange
=
this
.
handleRadioChange
.
bind
(
this
);
this
.
getImgUrl
=
this
.
getImgUrl
.
bind
(
this
);
}
handleRadioChange
(
e
)
{
...
...
@@ -53,8 +56,19 @@ class TestModal extends Component {
other
:
defaultValue
.
otherOptionVo
.
content
,
});
}
if
(
defaultValue
.
logoSrc
)
{
this
.
setState
({
logoSrc
:
defaultValue
.
logoSrc
,
});
}
}
componentWillReceiveProps
(
nextProps
)
{
if
(
nextProps
.
logo
!=
this
.
props
.
logo
)
{
this
.
setState
({
logoSrc
:
nextProps
.
defaultValue
.
image
,
});
}
}
remove1
=
k
=>
{
const
{
form
}
=
this
.
props
;
const
keys1
=
form
.
getFieldValue
(
"keys1"
);
...
...
@@ -78,9 +92,24 @@ class TestModal extends Component {
getTags
=
tags
=>
{
this
.
setState
({
keywords
:
tags
.
join
()
});
};
getImgUrl
(
imageUrl
)
{
let
_this
=
this
;
this
.
setState
(
{
logoSrc
:
imageUrl
,
},
()
=>
{
_this
.
props
.
form
.
setFields
({
logoSrc
:
{
value
:
imageUrl
,
},
});
}
);
}
render
()
{
const
{
defaultValue
,
status
}
=
this
.
props
;
console
.
log
(
'111111111111'
,
status
)
console
.
log
(
'111111111111'
,
status
)
const
{
radioNum
}
=
this
.
state
;
const
{
getFieldDecorator
,
getFieldValue
}
=
this
.
props
.
form
;
const
formItemLayout
=
{
...
...
@@ -117,12 +146,39 @@ class TestModal extends Component {
],
})(<
TextArea
rows=
{
4
}
disabled=
{
status
===
"look"
}
/>)
}
</
FormItem
>
{
/* 缩略图 */
}
{
status
===
"look"
&&
defaultValue
.
logoSrc
&&
(
<
div
style=
{
{
display
:
'flex'
,
marginBottom
:
'15px'
}
}
>
<
div
>
缩略图:
</
div
>
<
img
src=
{
defaultValue
.
logoSrc
}
alt=
""
style=
{
{
width
:
"160px"
,
height
:
"160px"
}
}
/>
</
div
>
)
}
{
status
!==
"look"
&&
(
<
FormItem
{
...
formItemLayout
}
label=
"缩略图:"
>
{
getFieldDecorator
(
"logoSrc"
,
{
initialValue
:
defaultValue
.
logoSrc
?
defaultValue
.
logoSrc
:
""
,
})(<
UploadImageCover
details=
{
this
.
state
.
logoSrc
}
getImgUrl=
{
this
.
getImgUrl
}
preRatio=
{
[
"5/4"
]
}
maxSize=
{
20
*
1024
*
1024
}
extra=
"图片最佳尺寸:1125*900,比例为5:4,支持jpg、png、jpeg"
//task-1110-cwj 删除500k
/>)
}
</
FormItem
>
)
}
{
/* 图片 */
}
{
status
===
"look"
&&
defaultValue
.
contentAppendixUrl
&&
(
<
div
>
<
div
style=
{
{
display
:
'flex'
,
marginBottom
:
'15px'
}
}
>
<
div
>
图片:
</
div
>
<
img
src=
{
defaultValue
.
contentAppendixUrl
}
alt=
""
style=
{
{
width
:
"200px"
,
height
:
"1
60px
"
}
}
style=
{
{
width
:
"200px"
,
height
:
"1
00%
"
}
}
/>
</
div
>
)
}
...
...
@@ -139,7 +195,7 @@ class TestModal extends Component {
)
}
<
div
className=
{
styles
.
sur_test_option
}
id=
"dselect"
>
<
RadioGroup
style=
{
{
width
:
"100%"
}
}
>
<
RadioGroup
style=
{
{
width
:
"100%"
,
}
}
>
{
radioNum
===
1
&&
(
<
div
className=
{
styles
.
survey_testmodal_1
}
>
<
Row
gutter=
{
23
}
>
...
...
src/pages/TrainingTools/Survey/Details/index.jsx
View file @
a6054f56
...
...
@@ -209,7 +209,6 @@ class Details 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
],
no
:
values
.
no
[
i
],
...
...
@@ -222,6 +221,7 @@ class Details extends Component {
const
param
=
{
type
:
values
.
type
,
content
:
values
.
content
,
logoSrc
:
values
.
logoSrc
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
this
.
state
.
testItem
.
contentAppendixUrl
?
this
.
state
.
testItem
.
contentAppendixUrl
:
""
,
needAnswer
:
values
.
needAnswer
?
1
:
0
,
questionOptions
:
objs
,
...
...
@@ -245,6 +245,7 @@ class Details extends Component {
keywords
:
this
.
addother
.
state
.
keywords
,
type
:
values
.
type
,
content
:
values
.
content
,
logoSrc
:
values
.
logoSrc
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
""
,
needAnswer
:
values
.
needAnswer
?
1
:
0
,
questionOptions
:
objs
,
...
...
@@ -448,6 +449,8 @@ class Details extends Component {
)
}
<
div
style=
{
{
width
:
"96%"
,
margin
:
"0 auto"
,
display
:
"flex"
,
justifyContent
:
"space-between"
,
alignItems
:
"center"
,
...
...
@@ -474,7 +477,7 @@ class Details extends Component {
</
Button
>
)
}
</
div
>
<
div
>
<
div
style=
{
{
width
:
"96%"
,
margin
:
"0 auto"
}
}
>
<
Table
size=
"default"
columns=
{
columns
}
...
...
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