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
ad838d3a
Commit
ad838d3a
authored
Mar 11, 2026
by
chengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加上下移动投票
parent
bdba67bb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
39 deletions
+126
-39
src/pages/Dashboard/index.js
+2
-2
src/pages/SystemManagement/Information/index.jsx
+12
-0
src/pages/SystemManagement/Information/redux/action.js
+14
-0
src/pages/SystemManagement/Information/redux/api.js
+1
-0
src/pages/TrainingTools/Survey/Details/index.jsx
+72
-37
src/pages/TrainingTools/Survey/redux/actions.js
+23
-0
src/pages/TrainingTools/Survey/redux/api.js
+2
-0
No files found.
src/pages/Dashboard/index.js
View file @
ad838d3a
...
...
@@ -960,13 +960,13 @@ class homePage extends Component {
<
img
src
=
{
img4
}
alt
=
""
/>
行为分析
<
/p
>
<
Button
{
/*
<Button
type="primary"
onClick={this.handleDownload}
className={styles.downloadBtn}
>
下载Excel
<
/Button
>
</Button>
*/
}
<
/div
>
<
div
className
=
{
styles
.
box
}
>
{
/* 顶部四个栏目 */
}
...
...
src/pages/SystemManagement/Information/index.jsx
View file @
ad838d3a
...
...
@@ -33,6 +33,7 @@ import {
getSeeEdit
,
postUpdata
,
nullSeeEdit
,
readExport
}
from
"./redux/action"
;
import
moment
from
"moment"
;
import
Styles
from
"./index.less"
;
...
...
@@ -551,6 +552,10 @@ class Information extends React.Component {
}
);
};
readExportDown
=
(
id
)
=>
{
const
{
readExport
}
=
this
.
props
;
readExport
({
informationId
:
id
});
};
//关闭评论管理
hideComment
=
()
=>
{
this
.
setState
({
...
...
@@ -1075,6 +1080,12 @@ class Information extends React.Component {
>
评论管理
</
a
>
<
a
className=
{
Styles
.
marr10
}
onClick=
{
()
=>
this
.
readExportDown
(
record
.
id
,
record
.
name
)
}
>
阅读明细导出
</
a
>
{
record
.
state
==
"2"
?
(
<
div
style=
{
{
display
:
"inline"
}
}
>
<
a
...
...
@@ -1322,6 +1333,7 @@ function mapDispatchToProps(dispatch) {
getSeeEdit
:
(
obj
,
callback
)
=>
dispatch
(
getSeeEdit
(
obj
,
callback
)),
postUpdata
:
(
obj
,
callback
)
=>
dispatch
(
postUpdata
(
obj
,
callback
)),
nullSeeEdit
:
(
obj
,
callback
)
=>
dispatch
(
nullSeeEdit
(
obj
,
callback
)),
readExport
:
(
obj
,
callback
)
=>
dispatch
(
readExport
(
obj
,
callback
)),
};
}
...
...
src/pages/SystemManagement/Information/redux/action.js
View file @
ad838d3a
...
...
@@ -16,6 +16,7 @@ const {
getSeeEditApi
,
postUpdataApi
,
getMenuApi
,
readExportApi
}
=
apis
;
//资讯管理
...
...
@@ -239,3 +240,15 @@ export function getMenu(data, callback) {
});
};
}
export
function
readExport
(
param
)
{
return
dispatch
=>
{
return
request
({
url
:
readExportApi
,
data
:
param
,
}).
then
(
res
=>
{
// message.success(res.data);
message
.
loading
(
"数据导出中.."
,
5
).
then
(()
=>
window
.
open
(
res
.
data
));
});
};
}
\ No newline at end of file
src/pages/SystemManagement/Information/redux/api.js
View file @
ad838d3a
...
...
@@ -13,6 +13,7 @@ export default {
getSeeEditApi
:
`GET
${
services
.
webManage
}
/site/classify/info/view`
,
postUpdataApi
:
`POST
${
services
.
webManage
}
/site/classify/info/update`
,
getMenuApi
:
`GET
${
services
.
base
}
/system/dictionary/child/listByCode`
,
readExportApi
:
`GET
${
services
.
webManage
}
/site/classify/info/readExport`
,
comment
:
{
getCommentsList
:
`GET
${
services
.
webManage
}
/tpComment/list`
,
getRepCommentList
:
`GET
${
services
.
webManage
}
/tpCommentReply/list`
,
...
...
src/pages/TrainingTools/Survey/Details/index.jsx
View file @
ad838d3a
...
...
@@ -24,6 +24,7 @@ import {
insertTestFetch
,
updateFetch
,
getDelete
,
moveTestFetch
,
}
from
"../redux/actions"
;
// import Remind from '../../../../common/remind'
import
TestModal
from
"../Create/TestModal"
;
...
...
@@ -164,11 +165,11 @@ class Details extends Component {
console
.
log
(
"跳转"
,
this
.
props
);
this
.
props
.
history
.
push
(
"/"
+
companyCode
+
"/"
+
siteCode
+
"/index/tool/survey/survey-management?tab="
+
(
this
.
state
.
isupdata
==
1
?
"2"
:
"1"
)
companyCode
+
"/"
+
siteCode
+
"/index/tool/survey/survey-management?tab="
+
(
this
.
state
.
isupdata
==
1
?
"2"
:
"1"
)
);
}
});
...
...
@@ -195,6 +196,18 @@ class Details extends Component {
canEdit
:
false
,
});
}
//上移下移 1下移 2上移
handleMove
(
record
,
type
)
{
let
newNo
=
type
==
2
?
record
.
no
-
1
:
record
.
no
+
1
;
const
{
surid
}
=
this
.
props
;
this
.
props
.
move
(
{
questionId
:
record
.
id
,
no
:
newNo
},
surid
,
this
.
state
.
pageNo
,
this
.
state
.
pageSize
);
}
handleOk
()
{
const
{
surid
}
=
this
.
props
;
const
{
editstate
,
editid
}
=
this
.
state
;
...
...
@@ -222,7 +235,11 @@ class Details extends Component {
type
:
values
.
type
,
content
:
values
.
content
,
logoSrc
:
values
.
logoSrc
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
this
.
state
.
testItem
.
contentAppendixUrl
?
this
.
state
.
testItem
.
contentAppendixUrl
:
""
,
contentAppendixUrl
:
this
.
state
.
fileUrl
?
this
.
state
.
fileUrl
:
this
.
state
.
testItem
.
contentAppendixUrl
?
this
.
state
.
testItem
.
contentAppendixUrl
:
""
,
needAnswer
:
values
.
needAnswer
?
1
:
0
,
questionOptions
:
objs
,
maxSelectItem
:
values
.
needAnswer2
?
values
.
maxSelectItem
:
""
,
...
...
@@ -296,13 +313,13 @@ class Details extends Component {
},
defaultUrl
:
this
.
state
.
testItem
.
contentAppendixUrl
?
[
{
uid
:
1
,
status
:
"done"
,
url
:
this
.
state
.
testItem
.
contentAppendixUrl
,
name
:
this
.
state
.
testItem
.
contentAppendixUrl
.
split
(
"prefix="
)[
1
],
},
]
{
uid
:
1
,
status
:
"done"
,
url
:
this
.
state
.
testItem
.
contentAppendixUrl
,
name
:
this
.
state
.
testItem
.
contentAppendixUrl
.
split
(
"prefix="
)[
1
],
},
]
:
[],
};
const
formItemLayout
=
{
...
...
@@ -313,9 +330,9 @@ class Details extends Component {
const
columns
=
[
{
title
:
"序号"
,
dataIndex
:
"no"
,
key
:
"no"
,
key
:
"index"
,
width
:
150
,
render
:
(
text
,
record
,
index
)
=>
index
+
1
,
},
{
title
:
"问题内容"
,
...
...
@@ -337,16 +354,33 @@ class Details extends Component {
</
div
>
),
},
// 在 d:\工作\虹桥智慧党建\sass-admin\src\pages\TrainingTools\Survey\Details\index.jsx 中修改操作栏配置
{
title
:
"操作"
,
dataIndex
:
"operation"
,
key
:
"operation"
,
width
:
100
,
render
:
(
text
,
record
)
=>
(
width
:
200
,
// 增加宽度以容纳更多按钮
render
:
(
text
,
record
,
index
)
=>
(
<
div
style=
{
{
display
:
"inline"
}
}
>
{
this
.
state
.
isupdata
==
1
&&
(
<
div
>
<
a
onClick=
{
()
=>
this
.
handleTestView
(
record
)
}
>
编辑
</
a
>
{
/* 添加上移按钮 */
}
<
a
style=
{
{
marginLeft
:
"10px"
}
}
onClick=
{
()
=>
this
.
handleMove
(
record
,
2
)
}
disabled=
{
index
===
0
}
>
上移
</
a
>
{
/* 添加下移按钮 */
}
<
a
style=
{
{
marginLeft
:
"10px"
}
}
onClick=
{
()
=>
this
.
handleMove
(
record
,
1
)
}
disabled=
{
index
===
this
.
props
.
tlist
.
list
.
length
-
1
}
>
下移
</
a
>
<
Popconfirm
title=
"是否删除?"
onConfirm=
{
()
=>
this
.
onDelete
(
record
.
id
)
}
...
...
@@ -428,25 +462,25 @@ class Details extends Component {
<
Input
defaultValue=
{
details
.
point
}
disabled
/>
</
FormItem
>
{
// 修改
details
.
remind
?
(
<
MessageRemind
formItemLayout=
{
formItemLayout
}
style=
{
{
marginLeft
:
"170px"
}
}
relationId=
{
this
.
id
}
remind=
{
details
.
remind
}
usable=
{
true
}
relationType=
{
3
}
wrappedComponentRef=
{
form
=>
(
this
.
messageRemind
=
form
)
}
/>
)
:
(
<
MessageRemind
formItemLayout=
{
formItemLayout
}
style=
{
{
marginLeft
:
"170px"
}
}
relationType=
{
3
}
usable=
{
true
}
wrappedComponentRef=
{
form
=>
(
this
.
messageRemind
=
form
)
}
/>
)
}
details
.
remind
?
(
<
MessageRemind
formItemLayout=
{
formItemLayout
}
style=
{
{
marginLeft
:
"170px"
}
}
relationId=
{
this
.
id
}
remind=
{
details
.
remind
}
usable=
{
true
}
relationType=
{
3
}
wrappedComponentRef=
{
form
=>
(
this
.
messageRemind
=
form
)
}
/>
)
:
(
<
MessageRemind
formItemLayout=
{
formItemLayout
}
style=
{
{
marginLeft
:
"170px"
}
}
relationType=
{
3
}
usable=
{
true
}
wrappedComponentRef=
{
form
=>
(
this
.
messageRemind
=
form
)
}
/>
)
}
<
div
style=
{
{
width
:
"96%"
,
...
...
@@ -522,7 +556,7 @@ class Details extends Component {
<
LinkUser
type=
{
this
.
type
==
"2"
?
"look"
:
""
}
invisible=
{
false
}
getData=
{
()
=>
{
}
}
getData=
{
()
=>
{}
}
initData=
{
details
.
authorizes
}
types=
{
"research"
}
groupTypes=
{
"research"
}
...
...
@@ -588,6 +622,7 @@ function mapDispatchToProps(dispatch) {
edit
:
(
obj
,
id
,
no
,
size
)
=>
dispatch
(
editTestFetch
(
obj
,
id
,
no
,
size
)),
insert
:
(
obj
,
no
,
size
)
=>
dispatch
(
insertTestFetch
(
obj
,
no
,
size
)),
getDelete
:
(
obj
,
callback
)
=>
dispatch
(
getDelete
(
obj
,
callback
)),
move
:
(
obj
,
callback
)
=>
dispatch
(
moveTestFetch
(
obj
,
callback
)),
};
}
...
...
src/pages/TrainingTools/Survey/redux/actions.js
View file @
ad838d3a
...
...
@@ -495,3 +495,25 @@ export function exana(param) {
// })
};
}
//移动问题
export
function
moveTestFetch
(
params
,
surid
,
no
,
size
)
{
console
.
log
(
surid
);
let
param
=
{
...
params
,
researchId
:
surid
};
let
url
=
api
.
moveTestFetch
;
return
dispatch
=>
{
return
request
({
url
:
url
,
data
:
param
,
}).
then
(
res
=>
{
if
(
res
.
code
===
"1000"
)
{
dispatch
({
type
:
Types
.
EDIT_TEST
,
data
:
res
.
data
});
dispatch
(
getTestListFetch
({
researchId
:
surid
,
pageNo
:
no
,
pageSize
:
size
})
);
message
.
success
(
"操作成功"
);
}
else
{
message
.
success
(
"操作失败"
);
}
});
};
}
\ No newline at end of file
src/pages/TrainingTools/Survey/redux/api.js
View file @
ad838d3a
...
...
@@ -40,4 +40,6 @@ export default {
jump_ques
:
`POST
${
services
.
webManage
}
/researchQuestion/jump/question/update`
,
chooses
:
`GET
${
services
.
webManage
}
/researchQuestion/option/get`
,
moveTestFetch
:
`POST
${
services
.
webManage
}
/researchQuestion/batch/updateNo`
,
};
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