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
c9aef493
Commit
c9aef493
authored
Dec 26, 2025
by
chengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增导出
parent
cd3ab983
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
19 deletions
+91
-19
.gitignore
+2
-3
build/Ip.js
+27
-10
src/pages/Dashboard/index.js
+24
-5
src/pages/Dashboard/redux/actions.js
+15
-0
src/pages/Dashboard/style/index.less
+23
-0
src/util/commonFunc.js
+0
-1
No files found.
.gitignore
View file @
c9aef493
...
...
@@ -21,5 +21,4 @@ chrome-user-data
dll
dist
src\util\request.js
package-lock.json
build/config.js
\ No newline at end of file
package-lock.json
\ No newline at end of file
build/Ip.js
View file @
c9aef493
var
os
=
require
(
'os'
);
// 修改为指向项目根目录的config.js
const
config
=
require
(
'./config'
);
let
IP
=
config
.
IP
;
const
ifaces
=
os
.
networkInterfaces
();
var
head1
=
"htt"
;
var
head2
=
"p://"
;
var
port1
=
":80"
;
var
port2
=
"90"
;
var
body1
=
'10.'
;
var
body2
=
'10.'
;
var
body3
=
'12.'
;
var
body4
=
'94'
;
var
os
=
require
(
'os'
),
IP
=
head1
+
head2
+
body1
+
body2
+
body3
+
body4
+
port1
+
port2
,
ifaces
=
os
.
networkInterfaces
()
out
:
for
(
var
i
in
ifaces
)
{
for
(
var
j
in
ifaces
[
i
])
{
...
...
@@ -15,5 +17,20 @@ for (var i in ifaces) {
}
}
};
module
.
exports
=
{
IP
,
host
:
config
.
host
};
\ No newline at end of file
const
host
=
{
prod
:
{
BASE_URL
:
"https://mg.kmelearning.com"
,
},
deve
:
{
BASE_URL
:
"https://mg.fairyclass.cn"
,
},
sit
:
{
BASE_URL
:
"https://mg.fairyclass.cn/"
,
},
uat
:
{
BASE_URL
:
"https://uat.mg.kmelearning.com"
,
},
other
:
{
BASE_URL
:
""
,
},
};
module
.
exports
=
{
IP
,
host
:
host
};
\ No newline at end of file
src/pages/Dashboard/index.js
View file @
c9aef493
...
...
@@ -3,6 +3,8 @@ import styles from "./style/index.less";
import
{
Select
,
Form
,
Button
,
message
,
}
from
"antd"
;
import
{
connect
}
from
"react-redux"
;
import
*
as
actions
from
"./redux/actions"
;
...
...
@@ -820,7 +822,15 @@ class homePage extends Component {
});
this
.
getTgRes
();
}
handleDownload
=
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
getDownload
({},
res
=>
{
if
(
res
.
code
===
"1000"
)
{
message
.
loading
(
"数据导出中.."
,
5
).
then
(()
=>
window
.
open
(
res
.
data
))
}
});
},
1000
);
};
render
()
{
const
{
dllData
,
...
...
@@ -945,10 +955,19 @@ class homePage extends Component {
return
(
<
div
className
=
{
styles
.
background
}
>
{
/* 行为分析 */
}
<
p
className
=
{
styles
.
titles
}
>
<
img
src
=
{
img4
}
alt
=
""
/>
行为分析
<
/p
>
<
div
className
=
{
styles
.
titleRow
}
>
<
p
className
=
{
styles
.
titles
}
>
<
img
src
=
{
img4
}
alt
=
""
/>
行为分析
<
/p
>
<
Button
type
=
"primary"
onClick
=
{
this
.
handleDownload
}
className
=
{
styles
.
downloadBtn
}
>
下载
Excel
<
/Button
>
<
/div
>
<
div
className
=
{
styles
.
box
}
>
{
/* 顶部四个栏目 */
}
<
div
className
=
{
styles
.
row1
}
>
...
...
src/pages/Dashboard/redux/actions.js
View file @
c9aef493
...
...
@@ -187,3 +187,17 @@ export function getTgrData(data) {
});
};
}
//导出证书统计数据
export
function
getDownload
(
data
,
callback
)
{
const
url
=
`
${
getUrl
}
/web-manage/manage/api/eventTrack/export`
;
return
dispatch
=>
{
return
request
({
url
:
url
,
data
:
data
,
}).
then
(
res
=>
{
if
(
callback
)
{
callback
(
res
);
}
});
};
}
\ No newline at end of file
src/pages/Dashboard/style/index.less
View file @
c9aef493
...
...
@@ -22,6 +22,29 @@
font-weight: 500;
color: #1c1f37;
}
// 添加标题行样式
.titleRow {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
// 下载按钮样式
.downloadBtn {
background: #1890ff;
border-color: #1890ff;
border-radius: 4px;
font-size: 14px;
height: 32px;
padding: 0 15px;
&:hover {
background: #40a9ff;
border-color: #40a9ff;
}
}
.box {
:global {
.ant-select-selection--single {
...
...
src/util/commonFunc.js
View file @
c9aef493
...
...
@@ -12,7 +12,6 @@ if (ROUTER_MODE === "hash") {
}
else
{
pathname
=
location
.
pathname
;
}
var
self
=
{
companyCode
:
pathname
.
split
(
"/"
)[
1
],
siteCode
:
pathname
.
split
(
"/"
)[
2
],
...
...
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