Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.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
wechatapp.shangjiadao.com
Commits
3ee59e91
Commit
3ee59e91
authored
Sep 23, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'成长记录页评分数据图表的添加'
parent
d4892a6a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2227 additions
and
17 deletions
+2227
-17
api.js
constants/api.js
+4
-0
common.js
service/common.js
+0
-1
circleindex.js
service/customer/circleindex.js
+19
-1
index.wxss
src/components/clockitemv2/index.wxss
+1
-1
index.js
src/pages/growthrecord/index.js
+94
-5
index.wxml
src/pages/growthrecord/index.wxml
+7
-6
index.wxss
src/pages/growthrecord/index.wxss
+19
-1
wxcharts-min.js
utilities/wxcharts-min.js
+2083
-2
No files found.
constants/api.js
View file @
3ee59e91
...
...
@@ -195,6 +195,10 @@ const apis = {
clockList
:
`
${
api
}
common/clock/new_clock`
,
//习作广场打卡列表
signupDetailGet
:
`
${
api
}
student/erp/course_template`
,
//c获取报名详情
businessBindWx
:
`
${
api
}
student/erp/common/bind_wechat`
,
},
scoreStatic
:
{
scoreTrend
:
`
${
api
}
student/erp/student/score_trend`
,
reviewScore
:
`
${
api
}
student/erp/student/review_score`
,
}
},
business
:
{
...
...
service/common.js
View file @
3ee59e91
...
...
@@ -34,7 +34,6 @@ function getCircleUserShow (data) {
})
}
function
formIdCreate
({
formId
})
{
console
.
log
(
formId
)
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
if
(
!
visitor
||
!
visitor
.
openid
)
return
;
return
wxRequest
({
...
...
service/customer/circleindex.js
View file @
3ee59e91
...
...
@@ -210,6 +210,22 @@ function subjectClassStudent (data) {
errorresolve
:
1
,
})
}
function
scoreTrend
(
data
)
{
return
wxRequest
({
url
:
apis
.
customer
.
scoreStatic
.
scoreTrend
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
reviewScore
(
data
)
{
return
wxRequest
({
url
:
apis
.
customer
.
scoreStatic
.
reviewScore
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
export
{
themeList
,
unlockthemeList
,
...
...
@@ -235,5 +251,7 @@ export {
customerStaticGet
,
mineClassList
,
studentTasks
,
subjectClassStudent
subjectClassStudent
,
reviewScore
,
scoreTrend
,
}
\ No newline at end of file
src/components/clockitemv2/index.wxss
View file @
3ee59e91
...
...
@@ -970,7 +970,7 @@
}
.teacher-privatecomment-box .teacher-commnet-text{
/* display: inline-block; */
padding: 26rpx 26rpx 20rpx
16rpx
;
padding: 26rpx 26rpx 20rpx
0
;
font-size:26rpx;
font-family:PingFang SC;
font-weight:400;
...
...
src/pages/growthrecord/index.js
View file @
3ee59e91
...
...
@@ -11,7 +11,9 @@ import {
newLikeIndex
,
newCommentIndex
,
customerClass
,
customerStaticGet
customerStaticGet
,
scoreTrend
,
reviewScore
,
}
from
'../../../service/customer/circleindex.js'
;
import
{
userShow
,
...
...
@@ -21,6 +23,7 @@ import {
wxOpenLocation
,
wxPreviewImage
}
from
'../../../utilities/wxApi.js'
;
var
wxCharts
=
require
(
'../../../utilities/wxcharts-min.js'
);
import
{
generateCustomerQrcode
,
posterLog
,
...
...
@@ -59,6 +62,7 @@ Page({
id
:
''
,
// 圈子ID
id2
:
''
,
// 圈子ID复制
localImageRoot
:
'../../../images/'
,
windowWidth
:
app
.
globalData
.
windowWidth
,
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
clockPage
:
1
,
...
...
@@ -261,8 +265,11 @@ Page({
wx
.
setNavigationBarTitle
({
title
:
selfCustomerId
==
this
.
data
.
consumerId
?
'我的成长记录'
:
'Ta的成长记录'
})
if
(
this
.
data
.
id
&&
this
.
data
.
id
!=
0
){
if
(
this
.
data
.
id
&&
this
.
data
.
id
!=
0
){
// 请求综合能力评测
this
.
getCircleDetail
();
this
.
reviewScore
();
}
else
{
// 请求综合评分成长趋势
this
.
scoreTrend
();
}
this
.
userShow
(
'init'
);
this
.
userMeShow
();
...
...
@@ -339,8 +346,89 @@ Page({
that
.
data
.
needRefresh
=
false
}
},
//用户勋章
getClasshonors
()
{
// 获取评分趋势图或者打分蜘蛛图
scoreTrend
()
{
scoreTrend
({
start_month
:
'2019-04'
,
end_month
:
'2019-09'
,
consumer_id
:
this
.
data
.
consumerId
,
school_id
:
this
.
data
.
sid
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
new
wxCharts
({
canvasId
:
'scoretrendcanvas'
,
type
:
'line'
,
categories
:
[
'4月'
,
'5月'
,
'6月'
,
'7月'
,
'8月'
,
'9月'
],
series
:
[{
name
:
'成交量1'
,
data
:
[
0.15
,
0.2
,
0.45
,
0.37
,
0.4
,
0.8
],
format
:
function
(
val
)
{
return
val
.
toFixed
(
2
);
},
color
:
'#FFD146'
,
}],
xAxis
:
{
type
:
'calibration'
,
},
yAxis
:
{
disabled
:
true
,
},
legend
:
false
,
extra
:
{
lineStyle
:
'curve'
,
ringWidth
:
10
,
},
hideChartYGrid
:
true
,
width
:
this
.
data
.
windowWidth
,
height
:
150
,
definePointShape
:
'ring'
,
});
}
})
},
reviewScore
()
{
reviewScore
({
months
:
'2019-03,2019-04,2019-05,2019-06,2019-07,2019-08,2019-09'
,
consumer_id
:
this
.
data
.
consumerId
,
class_id
:
this
.
data
.
id
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
new
wxCharts
({
canvasId
:
'scoreviewcanvas'
,
type
:
'radar'
,
categories
:
[
'综合评分'
,
'握笔姿势'
,
'坐姿'
,
'活跃度'
,
'课堂表现'
],
series
:
[{
name
:
'当月'
,
data
:
[
9
,
8
,
7
,
6
,
5
],
color
:
'#FF6734'
,
monthstaticcolor
:
'#303030'
,
},
{
name
:
'上月'
,
data
:
[
1
,
2
,
3
,
4
,
5
],
color
:
'#FFC000'
,
monthstaticcolor
:
'rgba(48,48,48,0.5)'
,
}],
legend
:
false
,
width
:
this
.
data
.
windowWidth
-
20
,
height
:
300
,
extra
:
{
radar
:
{
max
:
10
,
labelColor
:
'#000'
}
},
selfDrawMonthData
:
true
,
definePointShape
:
'ring'
,
},
{
fontSize
:
12
});
}
})
},
//用户勋章
getClasshonors
()
{
let
otherParams
=
(
this
.
data
.
id
&&
this
.
data
.
id
!=
0
)
?
{
class_id
:
this
.
data
.
id
}
:
{
school_id
:
this
.
data
.
sid
}
getClasshonors
(
Object
.
assign
(
otherParams
,{
consumer_id
:
this
.
data
.
consumerId
...
...
@@ -679,6 +767,7 @@ Page({
this
.
customerStaticGet
(
ids
);
this
.
clockListGet
(
'down'
);
this
.
getclockRankingList
();
this
.
scoreTrend
();
})
},
circleClick
(
e
)
{
...
...
@@ -695,6 +784,7 @@ Page({
filterType
:
1
},
()
=>
{
this
.
customerStaticGet
(
this
.
data
.
id2
);
this
.
reviewScore
();
this
.
setData
({
hasmore
:
true
,
// clockPage: 1,
...
...
@@ -737,7 +827,6 @@ Page({
this
.
clrcleListGet
()
}
})
console
.
log
(
'信息'
,
this
.
data
.
noUserinfo
)
},
userMeShow
()
{
userShow
({
...
...
src/pages/growthrecord/index.wxml
View file @
3ee59e91
...
...
@@ -19,7 +19,6 @@
<image class="icon-arr {{circleSelecting? 'active':''}}" src="{{imageRoot}}2c/growthrecord/icon_arrB.png?{{imageVersion}}"></image>
</view>
</view>
<view class="select-box" hidden="{{!circleSelecting}}">
<view class="select-name-box" bindtap="selectAllRecord" wx:if="{{filterType == 1}}">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
...
...
@@ -39,8 +38,6 @@
</block>
</view>
</view>
<block wx:if="{{!noUserinfo}}">
<view class="header-box">
<view class="person-info">
...
...
@@ -116,7 +113,13 @@
</view>
</view>
</view>
<view class="chart-box">
<view class="chartbox-header">综合评分成长趋势{{filterType}}</view>
<view class="chart-box-content" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="scoretrendcanvas" style="width: {{windowWidth}}px; height: 150px;" hidden="{{filterType == 1}}"></canvas>
<canvas canvas-id="scoreviewcanvas" style="width: {{windowWidth}}px; height: 300px; margin: 0 auto" hidden="{{filterType == 2}}"></canvas>
</view>
</view>
<view class="get-student" wx:if="{{newStudent}}">
<view class="booking-box" wx:if="{{getStudent}}" bindtap="formBoxShow">
<image class="icon-study" src="{{imageRoot}}2c/growthrecord/icon_study.png?{{imageVersion}}"></image>
...
...
@@ -131,11 +134,9 @@
<!-- <button class="btn-get" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button> -->
</view>
</view>
<view class="tab-box">
<view class="tab-item {{item.tabtype == curType? 'active': ''}}" data-type="{{item.tabtype}}" bindtap="bigTapEvent" wx:for="{{tabList}}" wx:key="">{{item.tabname}}</view>
</view>
<view class="sign-content" >
<view class="clock-list" wx:if="{{!emptyPage}}">
<block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem" wx:if="{{clockList.length > 0}}">
...
...
src/pages/growthrecord/index.wxss
View file @
3ee59e91
...
...
@@ -2,6 +2,10 @@
font-family:'hyxl';
src:url('https://wxloss.oss-cn-hangzhou.aliyuncs.com/font/hyxl.ttf') format('truetype');
}
.container {
width: 100%;
overflow-x: hidden;
}
/* 选择班级 */
.circle-select-wrap{
background: rgba(73,73,73,1);
...
...
@@ -1037,4 +1041,18 @@ sjd-input-footer .sure{
}
.empty-content-box{
height: 500rpx;
}
\ No newline at end of file
}
/* 趋势图的样式 */
.chart-box {
border-bottom: 16rpx solid #EEEFF3;
}
.chart-box .chartbox-header {
line-height: 1;
padding: 30rpx 0;
padding-left: 26rpx;
color: #303030;
font-size: 26rpx;
font-weight: 700;
}
/* 趋势图的样式 */
\ No newline at end of file
utilities/wxcharts-min.js
View file @
3ee59e91
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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