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
d7cda97d
Commit
d7cda97d
authored
Aug 20, 2025
by
end
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
4447bc4e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
54 deletions
+93
-54
dist.zip
+0
-0
src/pages/Dashboard/index.js
+10
-9
src/pages/SystemManagement/Article/addEditForm.jsx
+79
-24
src/pages/SystemManagement/Article/index.jsx
+1
-9
src/pages/TrainingPrograms/ProgeamsManage/Comment.jsx
+3
-12
No files found.
dist.zip
deleted
100644 → 0
View file @
4447bc4e
File deleted
src/pages/Dashboard/index.js
View file @
d7cda97d
...
@@ -58,7 +58,7 @@ class homePage extends Component {
...
@@ -58,7 +58,7 @@ class homePage extends Component {
dllXtitle
:
[
"今日"
,
"昨日"
],
dllXtitle
:
[
"今日"
,
"昨日"
],
lllTime
:
3
,
//1年 2月 3日 4周
lllTime
:
3
,
//1年 2月 3日 4周
hdlTime
:
1
,
//1年 2月 3日 4周
hdlTime
:
1
,
//1年 2月 3日 4周
hdlType
:
1
1
,
//11点赞 12收藏 13评论 15分享
hdlType
:
1
5
,
//11点赞 12收藏 13评论 15阅读
hdlOrg
:
""
,
hdlOrg
:
""
,
phbType
:
2
,
//1支部 2用户
phbType
:
2
,
//1支部 2用户
phbTime
:
1
,
//1年 2月 3日 4周
phbTime
:
1
,
//1年 2月 3日 4周
...
@@ -511,7 +511,7 @@ class homePage extends Component {
...
@@ -511,7 +511,7 @@ class homePage extends Component {
parseFloat
(
zlrData
.
qualifidNum
).
toFixed
(
2
)
*
100
,
parseFloat
(
zlrData
.
qualifidNum
).
toFixed
(
2
)
*
100
,
],
],
tooltip
:
{
tooltip
:
{
formatter
:
function
(
params
)
{
formatter
:
function
(
params
)
{
// 使用 formatter 来显示百分比
// 使用 formatter 来显示百分比
return
`
${
params
.
marker
}${
params
.
name
}${
parseFloat
(
return
`
${
params
.
marker
}${
params
.
name
}${
parseFloat
(
params
.
value
params
.
value
...
@@ -526,7 +526,7 @@ class homePage extends Component {
...
@@ -526,7 +526,7 @@ class homePage extends Component {
label
:
{
label
:
{
show
:
true
,
//开启显示
show
:
true
,
//开启显示
position
:
"top"
,
position
:
"top"
,
formatter
:
function
(
params
)
{
formatter
:
function
(
params
)
{
// 使用 formatter 来显示百分比
// 使用 formatter 来显示百分比
return
`
${
params
.
value
}
%`
;
return
`
${
params
.
value
}
%`
;
},
},
...
@@ -1061,18 +1061,19 @@ class homePage extends Component {
...
@@ -1061,18 +1061,19 @@ class homePage extends Component {
this
.
hdlChange
(
2
,
e
);
this
.
hdlChange
(
2
,
e
);
}}
}}
>
>
<
Option
value
=
{
11
}
key
=
{
1
}
>
<
Option
value
=
{
15
}
key
=
{
1
}
>
阅读
<
/Option
>
<
Option
value
=
{
11
}
key
=
{
2
}
>
点赞
点赞
<
/Option
>
<
/Option
>
<
Option
value
=
{
12
}
key
=
{
2
}
>
<
Option
value
=
{
12
}
key
=
{
3
}
>
收藏
收藏
<
/Option
>
<
/Option
>
<
Option
value
=
{
13
}
key
=
{
3
}
>
<
Option
value
=
{
13
}
key
=
{
4
}
>
评论
评论
<
/Option
>
<
/Option
>
<
Option
value
=
{
15
}
key
=
{
4
}
>
分享
<
/Option
>
<
/Select
>
<
/Select
>
<
Select
<
Select
className
=
{
styles
.
Select
}
className
=
{
styles
.
Select
}
...
...
src/pages/SystemManagement/Article/addEditForm.jsx
View file @
d7cda97d
...
@@ -19,6 +19,7 @@ import Editor from "@/common/Editor/editor";
...
@@ -19,6 +19,7 @@ import Editor from "@/common/Editor/editor";
import
UpLoad
from
"@/common/UpLoad"
;
import
UpLoad
from
"@/common/UpLoad"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
validator
from
"@/common/validatorForm/index"
;
import
validator
from
"@/common/validatorForm/index"
;
import
UploadImageCover
from
"@/common/UploadImageCover"
;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
class
addEdit
extends
React
.
Component
{
class
addEdit
extends
React
.
Component
{
...
@@ -28,17 +29,24 @@ class addEdit extends React.Component {
...
@@ -28,17 +29,24 @@ class addEdit extends React.Component {
uploadParams
:
{},
uploadParams
:
{},
uploadAction
:
""
,
uploadAction
:
""
,
editor
:
""
,
editor
:
""
,
logourl
:
""
,
tags
:
[],
tags
:
[],
fileList
:
[],
fileList
:
[],
responseList
:
[],
responseList
:
[],
};
};
this
.
props
.
gupfetch
();
this
.
props
.
gupfetch
();
this
.
beforeUpload
=
this
.
beforeUpload
.
bind
(
this
);
this
.
beforeUpload
=
this
.
beforeUpload
.
bind
(
this
);
this
.
getImgUrl
=
this
.
getImgUrl
.
bind
(
this
);
this
.
handleUploadChange
=
this
.
handleUploadChange
.
bind
(
this
);
this
.
handleUploadChange
=
this
.
handleUploadChange
.
bind
(
this
);
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
seeEdit
,
type
}
=
this
.
props
;
const
{
seeEdit
,
type
}
=
this
.
props
;
if
(
seeEdit
.
logoPath
)
{
this
.
setState
({
logourl
:
seeEdit
.
logoPath
,
});
}
}
}
//多媒体组件事件
//多媒体组件事件
getEditorHtml
=
editor
=>
{
getEditorHtml
=
editor
=>
{
...
@@ -81,6 +89,13 @@ class addEdit extends React.Component {
...
@@ -81,6 +89,13 @@ class addEdit extends React.Component {
});
});
}
}
}
}
componentWillReceiveProps
(
nextProps
)
{
if
(
nextProps
.
logo
!=
this
.
props
.
logo
)
{
this
.
setState
({
logourl
:
nextProps
.
defaultValue
.
image
,
});
}
}
//123
//123
handleUploadChange
({
file
,
fileList
})
{
handleUploadChange
({
file
,
fileList
})
{
// console.log(123,file.name.split('.')[1])
// console.log(123,file.name.split('.')[1])
...
@@ -147,7 +162,21 @@ class addEdit extends React.Component {
...
@@ -147,7 +162,21 @@ class addEdit extends React.Component {
}
}
return
e
&&
this
.
state
.
fileLists
;
return
e
&&
this
.
state
.
fileLists
;
};
};
getImgUrl
(
imageUrl
)
{
let
_this
=
this
;
this
.
setState
(
{
logourl
:
imageUrl
,
},
()
=>
{
_this
.
props
.
form
.
setFields
({
logoPath
:
{
value
:
imageUrl
,
},
});
}
);
}
render
()
{
render
()
{
var
fileUrl
=
""
;
var
fileUrl
=
""
;
var
fileName
=
""
;
var
fileName
=
""
;
...
@@ -247,21 +276,63 @@ class addEdit extends React.Component {
...
@@ -247,21 +276,63 @@ class addEdit extends React.Component {
}
}
>
>
<
Form
>
<
Form
>
<
FormItem
{
...
formItemLayout
}
label=
{
"封面logo"
}
extra=
{
<
div
style=
{
{
marginLeft
:
"164px"
}
}
>
请上传资源附件(支持格式jpeg、jpg、png,大小20m以内)建议尺寸:1125*900
</
div
>
}
>
{
getFieldDecorator
(
"logoPath"
,
{
rules
:
[
{
required
:
true
,
message
:
(
<
span
style=
{
{
marginLeft
:
"164px"
}
}
>
新闻必须上传logo
</
span
>
),
},
],
initialValue
:
this
.
state
.
logourl
,
// seeEdit
// ? [
//
{
// uid: 1,
// status: "done",
// reponse: "Server Error 500",
// url: seeEdit.logoPath,
//
},
// ]
// : [],
})(
<
div
style=
{
{
marginLeft
:
"2.5rem"
}
}
>
<
UploadImageCover
details=
{
this
.
state
.
logourl
}
getImgUrl=
{
this
.
getImgUrl
}
preRatio=
{
[
"5/4"
]
}
maxSize=
{
20
*
1024
*
1024
}
extra=
"图片最佳尺寸:1125*900,比例为5:4,支持jpg、png、jpeg"
//task-1110-cwj 删除500k
/>
</
div
>
)
}
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"标题"
>
<
FormItem
{
...
formItemLayout
}
label=
"标题"
>
{
getFieldDecorator
(
"fileName"
,
{
{
getFieldDecorator
(
"fileName"
,
{
initialValue
:
seeEdit
&&
seeEdit
.
fileName
,
initialValue
:
seeEdit
&&
seeEdit
.
fileName
,
})(<
Input
disabled=
{
type
!=
"edit"
?
true
:
false
}
/>)
}
})(<
Input
disabled=
{
type
!=
"edit"
?
true
:
false
}
/>)
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"正文"
>
<
FormItem
{
...
formItemLayout
}
label=
"正文"
>
{
/* <Editor
key={this.props.keyValue}
cbReceiver={this.getEditorHtml}
importContent={seeEdit.content}
disabled={type != "edit" ? true : false}
/> */
}
{
getFieldDecorator
(
"content"
,
{
{
getFieldDecorator
(
"content"
,
{
initialValue
:
seeEdit
&&
seeEdit
.
content
,
initialValue
:
seeEdit
&&
seeEdit
.
content
,
})(<
Input
style=
{
{
"minHeight"
:
'40px'
}
}
disabled=
{
type
!=
"edit"
?
true
:
false
}
/>)
}
})(
<
Input
style=
{
{
minHeight
:
"40px"
}
}
disabled=
{
type
!=
"edit"
?
true
:
false
}
/>
)
}
</
FormItem
>
</
FormItem
>
<
FormItem
{
...
formItemLayout
}
label=
"图片"
>
<
FormItem
{
...
formItemLayout
}
label=
"图片"
>
...
@@ -271,22 +342,6 @@ class addEdit extends React.Component {
...
@@ -271,22 +342,6 @@ class addEdit extends React.Component {
<
img
key=
{
index
}
src=
{
item
}
alt=
""
style=
{
{
width
:
"300px"
}
}
/>
<
img
key=
{
index
}
src=
{
item
}
alt=
""
style=
{
{
width
:
"300px"
}
}
/>
))
}
))
}
</
FormItem
>
</
FormItem
>
{
/* <FormItem {...formItemLayout} label="上传文件">
<Upload
headers={{ "X-Requested-With": null }}
fileList={this.state.fileList}
action={this.state.uploadAction}
data={this.state.uploadParams}
beforeUpload={this.beforeUpload}
onChange={this.handleUploadChange}
disabled={type != "edit" ? true : false}
>
<Button>
<Icon type="upload" /> 上传pdf附件
</Button>
</Upload>
<p>大小50mb以内</p>
</FormItem> */
}
<
FormItem
{
...
formItemLayout
}
label=
"作者"
>
<
FormItem
{
...
formItemLayout
}
label=
"作者"
>
{
getFieldDecorator
(
"author"
,
{
{
getFieldDecorator
(
"author"
,
{
initialValue
:
seeEdit
&&
seeEdit
.
author
,
initialValue
:
seeEdit
&&
seeEdit
.
author
,
...
...
src/pages/SystemManagement/Article/index.jsx
View file @
d7cda97d
...
@@ -294,6 +294,7 @@ class Atricle extends React.Component {
...
@@ -294,6 +294,7 @@ class Atricle extends React.Component {
}
}
const
jsonEdit
=
{
const
jsonEdit
=
{
id
,
id
,
logoPath
:
values
.
logoPath
,
fileName
:
values
.
fileName
.
trim
(),
fileName
:
values
.
fileName
.
trim
(),
content
:
values
.
content
,
content
:
values
.
content
,
author
:
values
.
author
,
author
:
values
.
author
,
...
@@ -475,15 +476,6 @@ class Atricle extends React.Component {
...
@@ -475,15 +476,6 @@ class Atricle extends React.Component {
>
>
取消发布
取消发布
</
a
>
</
a
>
{
/* <a
className={Styles.marr10}
onClick={() => {
this.setState({ title: "编辑" });
this.seeEdit(record.id, "edit");
}}
>
编辑
</a> */
}
<
a
<
a
className=
{
Styles
.
marr10
}
className=
{
Styles
.
marr10
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
...
...
src/pages/TrainingPrograms/ProgeamsManage/Comment.jsx
View file @
d7cda97d
...
@@ -9,10 +9,7 @@ import {
...
@@ -9,10 +9,7 @@ import {
Tooltip
,
Tooltip
,
Pagination
,
Pagination
,
Popconfirm
,
Popconfirm
,
Divider
,
Divider
Row
,
Col
,
Button
,
}
from
"antd"
;
}
from
"antd"
;
import
{
import
{
getCommentList
,
getCommentList
,
...
@@ -108,24 +105,20 @@ class Comment extends React.Component {
...
@@ -108,24 +105,20 @@ class Comment extends React.Component {
dataIndex
:
"commentator"
,
dataIndex
:
"commentator"
,
key
:
"commentator"
,
key
:
"commentator"
,
},
},
{
{
title
:
"姓名"
,
title
:
"姓名"
,
dataIndex
:
"commentatorName"
,
//createByFullName
dataIndex
:
"commentatorName"
,
key
:
"commentatorName"
,
key
:
"commentatorName"
,
},
},
{
{
title
:
"评论对象"
,
title
:
"评论对象"
,
dataIndex
:
"replyName"
,
//parentAccountFullName
dataIndex
:
"replyName"
,
key
:
"replyName"
,
key
:
"replyName"
,
},
},
{
{
title
:
"评论内容"
,
title
:
"评论内容"
,
dataIndex
:
"content"
,
dataIndex
:
"content"
,
key
:
"content"
,
key
:
"content"
,
// width: '0%',
render
:
text
=>
{
render
:
text
=>
{
return
(
return
(
<
Tooltip
title=
{
text
}
>
<
Tooltip
title=
{
text
}
>
...
@@ -142,7 +135,6 @@ class Comment extends React.Component {
...
@@ -142,7 +135,6 @@ class Comment extends React.Component {
<
span
>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</
span
>
<
span
>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</
span
>
),
),
},
},
{
{
title
:
"点赞数"
,
title
:
"点赞数"
,
dataIndex
:
"thumbsUps"
,
dataIndex
:
"thumbsUps"
,
...
@@ -184,7 +176,6 @@ class Comment extends React.Component {
...
@@ -184,7 +176,6 @@ class Comment extends React.Component {
<
a
>
上架
</
a
>
<
a
>
上架
</
a
>
</
Popconfirm
>
</
Popconfirm
>
)
}
)
}
<
Divider
type=
"vertical"
/>
<
Divider
type=
"vertical"
/>
<
Popconfirm
<
Popconfirm
title=
"确定删除该评论?"
title=
"确定删除该评论?"
...
...
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