Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
4382338b
Commit
4382338b
authored
Nov 08, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据中心开发完成
parent
c312205f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
511 additions
and
82 deletions
+511
-82
index.html
index.html
+2
-2
analyzecenter.js
src/models/analyzecenter.js
+141
-28
webapp.js
src/models/webapp.js
+14
-0
detailModal.js
src/pages/datacenter/detailModal.js
+124
-0
detailModal.less
src/pages/datacenter/detailModal.less
+18
-0
index.js
src/pages/datacenter/index.js
+167
-20
index.less
src/pages/datacenter/index.less
+45
-32
No files found.
index.html
View file @
4382338b
...
...
@@ -12,11 +12,11 @@
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/
lib/vendor.dll.js?20191012222"
charset=
"utf-8"
></script>
<script
src=
"
js/console-polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es6-shim.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es5-shim.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/es5-sham.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/json3.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/html5shiv.min.js?20191012222"
charset=
"utf-8"
></script><script
src=
"js/polyfill.js?20191012222"
charset=
"utf-8"
></script><script
src=
"
lib/vendor.dll.js?20191012222"
charset=
"utf-8"
></script>
</head>
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1572591383487
"
charset=
"utf-8"
></script>
<script
src=
"
dist/main.js?1573194144046
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/models/analyzecenter.js
View file @
4382338b
...
...
@@ -52,6 +52,25 @@ export default {
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
teacherListTotal
:
0
,
classList
:
[],
classListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
classListTotal
:
0
,
detailVisible
:
false
,
detailList
:
[],
detailListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
10
,
status
:
0
,
share_student_id
:
''
,
},
detailListTotal
:
0
,
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -92,7 +111,6 @@ export default {
const
newQueryParams
=
Object
.
assign
(
customerListParams
,
params
,
{
school_id
:
sid
,
});
console
.
log
(
newQueryParams
,
'newQueryParams'
);
const
data
=
yield
call
(
analyzeAjax
.
findCustomer
,
newQueryParams
);
if
(
data
.
code
===
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
...
...
@@ -115,6 +133,52 @@ export default {
});
}
},
*
selectDetailModal
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
,
type
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
classListParams
,
studentListParams
,
teacherListParams
,
detailListParams
,
detailListTotal
,
}
=
yield
select
(
state
=>
state
.
analyzecenter
);
let
newTotal
=
detailListTotal
;
let
typePrams
=
{};
switch
(
type
)
{
case
2
:
typePrams
=
{
...
studentListParams
};
break
;
case
3
:
typePrams
=
{
...
teacherListParams
};
break
;
case
4
:
typePrams
=
{
...
classListParams
};
break
;
default
:
typePrams
=
{
};
}
const
newQueryParams
=
Object
.
assign
(
typePrams
,
detailListParams
,
params
,
{
school_id
:
sid
,
});
const
data
=
yield
call
(
analyzeAjax
.
findCustomer
,
newQueryParams
);
if
(
data
.
code
===
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
newTotal
=
data
.
data
.
total
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
detailList
:
data
.
data
&&
data
.
data
.
list
,
detailListParams
:
{
...
newQueryParams
},
detailListTotal
:
newTotal
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
selectStudent
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
...
...
@@ -175,6 +239,36 @@ export default {
});
}
},
*
selectClass
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
classListParams
,
classListTotal
}
=
yield
select
(
state
=>
state
.
analyzecenter
);
let
newTotal
=
classListTotal
;
const
newQueryParams
=
Object
.
assign
(
classListParams
,
params
,
{
school_id
:
sid
,
});
const
data
=
yield
call
(
analyzeAjax
.
findClassContribution
,
newQueryParams
);
if
(
data
.
code
===
200
)
{
if
(
data
.
data
.
total
!=
undefined
)
{
newTotal
=
data
.
data
.
total
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
classList
:
data
.
data
&&
data
.
data
.
list
,
classListParams
:
{
...
newQueryParams
},
classListTotal
:
newTotal
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
changeCustomerPage
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
}
=
payload
;
const
{
customerListParams
}
=
yield
select
(
state
=>
state
.
analyzecenter
);
...
...
@@ -200,34 +294,53 @@ export default {
today
:
moment
(
moment
().
unix
()
*
1000
),
checkedDay
:
0
,
customerList
:
[],
customerListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
status
:
0
,
},
customerListTotal
:
0
,
studentList
:
[],
studentListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
studentListTotal
:
0
,
teacherList
:
[],
teacherListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
teacherListTotal
:
0
,
classList
:
[],
classListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
classListTotal
:
0
,
detailVisible
:
false
,
detailList
:
[],
detailListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
10
,
status
:
0
,
share_student_id
:
''
,
},
detailListTotal
:
0
,
},
customerListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
status
:
0
,
},
customerListTotal
:
0
,
studentList
:
[],
studentListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
studentListTotal
:
0
,
teacherList
:
[],
teacherListParams
:
{
school_id
:
0
,
page
:
1
,
perPage
:
5
,
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
teacherListTotal
:
0
,
});
},
},
...
...
src/models/webapp.js
View file @
4382338b
...
...
@@ -749,6 +749,11 @@ export default {
});
}
if
(
pathname
===
'/sjd/datacenter'
)
{
dispatch
({
type
:
'analyzecenter/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'analyzecenter/selectDashboard'
,
payload
:
{
...
...
@@ -783,6 +788,15 @@ export default {
},
},
});
dispatch
({
type
:
'analyzecenter/selectClass'
,
payload
:
{
params
:
{
start_date
:
moment
().
format
(
'YYYY-MM-DD'
),
end_date
:
moment
().
format
(
'YYYY-MM-DD'
),
},
},
});
dispatch
({
type
:
'updateState'
,
payload
:
{
...
...
src/pages/datacenter/detailModal.js
0 → 100644
View file @
4382338b
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
message
,
Row
,
Col
,
Input
,
Select
,
Modal
,
Form
,
InputNumber
,
Button
,
Pagination
,
Table
,
Avatar
}
from
'antd'
;
import
{
imagify
,
pageIn
}
from
'../../utils/index'
;
import
pageStyle
from
'./detailModal.less'
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
FormItem
=
Form
.
Item
;
class
detailModalForm
extends
React
.
Component
{
componentWillMount
()
{
}
componentDidUpdate
()
{
}
componentWillUpdate
()
{
}
componentDidMount
()
{
// 挂载
pageIn
(
'数据中心'
);
}
componentWillUnmount
()
{
// 卸载
}
close
=
()
=>
{
const
{
close
,
}
=
this
.
props
;
close
();
}
changeDetailPage
=
(
page
,
perPage
)
=>
{
const
{
changeDetailPage
}
=
this
.
props
;
changeDetailPage
(
{
page
,
perPage
},
);
}
render
()
{
const
{
visible
,
detailListParams
,
detailListTotal
,
detailList
,
}
=
this
.
props
;
const
columns
=
[
{
title
:
'头像'
,
dataIndex
:
'avatar'
,
key
:
'avatar'
,
render
:
(
text
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
avatarBox
}
>
<
Avatar
src
=
{
imagify
(
text
)}
/
>
<
/div>
)
;
},
},
{
title
:
'姓名'
,
dataIndex
:
'nickname'
,
key
:
'nickname'
,
},
{
title
:
'电话号码'
,
dataIndex
:
'mobile'
,
key
:
'mobile'
,
},
{
title
:
'留下线索时间'
,
dataIndex
:
'created_at'
,
key
:
'created_at'
,
render
:
(
text
)
=>
{
return
(
<
div
>
{
text
}
<
/div
>
);
},
},
{
title
:
'贡献学员'
,
dataIndex
:
'share_student'
,
key
:
'share_student'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
record
.
share_student
.
nickname
}
<
/div
>
);
},
},
];
return
(
<
Modal
visible
=
{
visible
}
title
=
"明细"
onCancel
=
{
this
.
close
}
maskClosable
=
{
false
}
zIndex
=
{
110
}
footer
=
{
<
div
><
Button
type
=
"primary"
onClick
=
{
this
.
close
}
>
关闭
<
/Button></
div
>
}
width
=
{
586
}
bodyStyle
=
{{
padding
:
0
}}
>
<
div
className
=
{
pageStyle
.
detailBox
}
>
<
Table
size
=
"small"
rowKey
=
"id"
dataSource
=
{
detailList
}
columns
=
{
columns
}
pagination
=
{
false
}
footer
=
{()
=>
(
detailList
.
length
>
0
&&
<
div
className
=
"tablefooterbox"
>
<
span
className
=
"tablefooterstatic"
>
共
{
detailListTotal
}
条数据
<
/span
>
<
Pagination
size
=
"small"
pageSize
=
{
detailListParams
.
perPage
}
total
=
{
Number
(
detailListTotal
)}
onChange
=
{
this
.
changeDetailPage
}
/
>
<
/div
>
)}
/
>
<
/div
>
<
/Modal
>
);
}
}
const
detailModal
=
Form
.
create
()(
detailModalForm
);
export
default
detailModal
;
src/pages/datacenter/detailModal.less
0 → 100644
View file @
4382338b
.detailBox {
:global {
.ant-table-placeholder {
border-top: none;
}
.ant-table-small {
border: none;
}
.ant-table-thead > tr > th {
border-bottom: none;
font-size: 14px;
font-weight: 600;
}
.ant-table-tbody > tr > td {
border-bottom: none;
}
}
}
src/pages/datacenter/index.js
View file @
4382338b
This diff is collapsed.
Click to expand it.
src/pages/datacenter/index.less
View file @
4382338b
.container {
padding-bottom: 50px;
}
.head {
padding: 20px 28px;
background-color: #fff;
...
...
@@ -58,40 +60,45 @@
}
.footer {
margin-top: 25px;
.commonTableAvatar {
background-color: #fff;
min-height: 383px;
}
.commonTable {
background-color: #fff;
.commonTitle {
font-size:16px;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:600;
line-height: 24px;
padding: 15px 0 15px 10px;
color:rgba(0,0,0,0.85);
border-bottom: 1px solid #E8E8E8;
.line {
width: 3px;
height: 19px;
background-color: #1890FF;
display: inline-block;
vertical-align: -10%;
margin-right: 6px;
}
min-height: 358px;
}
.commonTitle {
font-size:16px;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:600;
line-height: 24px;
padding: 15px 0 15px 10px;
color:rgba(0,0,0,0.85);
border-bottom: 1px solid #E8E8E8;
.line {
width: 3px;
height: 19px;
background-color: #1890FF;
display: inline-block;
vertical-align: -10%;
margin-right: 6px;
}
:global {
.ant-table-placeholder
{
border-top: none;
}
.ant-table-small {
border: none;
}
.ant-table-thead > tr > th {
border-bottom: none;
font-size: 14px
;
font-weight: 600
;
}
.ant-table-tbody > tr > td {
border-bottom: none;
}
}
:global
{
.ant-table-placeholder {
border-top: none;
}
.ant-table-small {
border: none;
}
.ant-table-thead > tr > th {
border-bottom: none
;
font-size: 14px
;
font-weight: 600;
}
.ant-table-tbody > tr > td {
border-bottom: none;
}
}
}
...
...
@@ -100,6 +107,11 @@
display: inline-block;
margin-right: 10px;
}
.sortNum {
font-size:18px;
font-weight:600;
color:rgba(0,0,0,0.65);
}
}
.threadBox {
.detail {
...
...
@@ -108,5 +120,6 @@
color:rgba(24,144,255,1);
display: inline-block;
margin-left: 10px;
cursor: pointer;
}
}
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