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
20b4ab3b
Commit
20b4ab3b
authored
Aug 06, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
021cc85c
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
576 additions
and
153 deletions
+576
-153
app.json
app.json
+2
-1
bindex.js
business/pages/classservice/bindex.js
+7
-2
bindex.wxml
business/pages/classservice/bindex.wxml
+1
-1
record.js
business/pages/classservice/record.js
+211
-0
record.json
business/pages/classservice/record.json
+7
-0
record.wxml
business/pages/classservice/record.wxml
+29
-0
record.wxss
business/pages/classservice/record.wxss
+76
-0
rollcalldetail.js
business/pages/classservice/rollcalldetail.js
+19
-8
rollcalldetail.wxml
business/pages/classservice/rollcalldetail.wxml
+1
-1
rollcallindex.js
business/pages/classservice/rollcallindex.js
+62
-9
rollcalllist.js
business/pages/classservice/rollcalllist.js
+1
-1
tindex.js
business/pages/classservice/tindex.js
+7
-2
tindex.wxml
business/pages/classservice/tindex.wxml
+7
-1
todolist.js
business/pages/classservice/todolist.js
+2
-5
index.js
business/pages/datacenter/index.js
+102
-99
index.wxml
business/pages/datacenter/index.wxml
+9
-9
studentdetail.js
business/pages/studentcenter/studentdetail.js
+14
-5
studentdetail.wxml
business/pages/studentcenter/studentdetail.wxml
+8
-8
index.wxs
filter/index.wxs
+11
-1
map.png
images/2b/classservice/map.png
+0
-0
No files found.
app.json
View file @
20b4ab3b
...
...
@@ -42,7 +42,8 @@
"classlist"
,
"classdetail"
,
"tindex"
,
"todolist"
"todolist"
,
"record"
]
},
{
...
...
business/pages/classservice/bindex.js
View file @
20b4ab3b
...
...
@@ -47,7 +47,7 @@ Page({
my
=
dakarole
==
2
?
1
:
''
;
this
.
setData
({
sid
,
my
:
my
my
:
1
})
// this.getschoolList()
},
...
...
@@ -204,5 +204,10 @@ Page({
wx
.
navigateTo
({
url
:
`/business/pages/classservice/todolist?sid=
${
this
.
data
.
sid
}
`
})
}
},
goRecord
(){
wx
.
navigateTo
({
url
:
`/business/pages/classservice/record?sid=
${
this
.
data
.
sid
}
&my=
${
this
.
data
.
my
}
`
,
})
},
})
\ No newline at end of file
business/pages/classservice/bindex.wxml
View file @
20b4ab3b
...
...
@@ -37,7 +37,7 @@
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">作业点评</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="go
PointsMgt
">
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="go
Record
">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="" src="{{localImageRoot}}/2b/classservice/record.png?{{imageVersion}}"></image>
</view>
...
...
business/pages/classservice/record.js
0 → 100644
View file @
20b4ab3b
// business/pages/classservice/rollcall .js
import
{
schedulesGet
}
from
'../../../service/business/classservice.js'
import
{
LocalStorage
}
from
'../../../utilities/index.js'
;
var
app
=
getApp
();
function
formatDate
(
date
)
{
var
myyear
=
date
.
getFullYear
();
var
mymonth
=
date
.
getMonth
()
+
1
;
var
myweekday
=
date
.
getDate
();
if
(
mymonth
<
10
){
mymonth
=
"0"
+
mymonth
;
}
if
(
myweekday
<
10
){
myweekday
=
"0"
+
myweekday
;
}
return
(
myyear
+
"-"
+
mymonth
+
"-"
+
myweekday
);
}
Page
({
/**
* 页面的初始数据
*/
data
:
{
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
"../../../images"
,
sid
:
0
,
rollcalllist
:[],
page
:
1
,
perPage
:
10
,
hasmore
:
true
,
rollcallTotal
:
0
,
emptyPage
:
false
,
listLoading
:
false
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
this
.
setData
({
sid
,
my
:
1
})
this
.
schedulesGet
(
'init'
)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
page
:
1
,
hasmore
:
true
},()
=>
{
this
.
schedulesGet
(
'up'
)
})
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
this
.
schedulesGet
(
'down'
)
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
},
schedulesGet
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
;
}
if
(
this
.
data
.
listLoading
)
{
return
};
this
.
setData
({
listLoading
:
true
})
schedulesGet
({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
my
:
this
.
data
.
my
,
school_id
:
this
.
data
.
sid
,
status
:
1
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
this
.
setData
({
listLoading
:
false
})
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
if
(
data
.
total
)
{
this
.
setData
({
rollcallTotal
:
data
.
total
,
})
}
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
rollcallList
:
data
.
list
||
[]
},
()
=>
{
if
(
this
.
data
.
rollcallTotal
>
this
.
data
.
rollcallList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
case
'down'
:
// 页面下拉刷新
this
.
setData
({
rollcallList
:
data
.
list
||
[]
},
()
=>
{
if
(
this
.
data
.
rollcallTotal
>
this
.
data
.
rollcallList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
wx
.
stopPullDownRefresh
();
break
;
case
'up'
:
// 页面上拉刷新
let
list
=
this
.
data
.
rollcallList
;
let
_list
=
list
.
concat
(
data
.
list
);
this
.
setData
({
rollcallList
:
_list
},
()
=>
{
if
(
this
.
data
.
rollcallTotal
>
this
.
data
.
rollcallList
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
})
}
else
{
// 没有更多了
this
.
setData
({
hasmore
:
false
})
}
})
break
;
default
:
break
;
}
if
(
this
.
data
.
rollcallList
.
length
==
0
)
{
this
.
setData
({
emptyPage
:
true
})
}
else
{
this
.
setData
({
emptyPage
:
false
})
}
}
}).
catch
((
e
)
=>
{
this
.
setData
({
listLoading
:
false
})
})
},
gorollcallindex
(
e
){
const
{
item
}
=
e
.
currentTarget
.
dataset
wx
.
navigateTo
({
url
:
`/business/pages/classservice/rollcalldetail?sid=
${
this
.
data
.
sid
}
&id=
${
item
.
id
}
&from=record`
})
}
})
\ No newline at end of file
business/pages/classservice/record.json
0 → 100644
View file @
20b4ab3b
{
"navigationBarTitleText"
:
"上课记录"
,
"usingComponents"
:
{
"empty-content"
:
"../../../components/emptycontent"
,
"list-loading"
:
"../../../components/listloading"
}
}
\ No newline at end of file
business/pages/classservice/record.wxml
0 → 100644
View file @
20b4ab3b
<!--business/pages/classservice/rollcall .wxml-->
<view class="container">
<view class="content-box" hover-class="none" hover-stop-propagation="false">
<view class="content-item" hover-class="none" hover-stop-propagation="false" wx:for="{{rollcallList}}" wx:key="{{key}}" data-item="{{item}}" bindtap="gorollcallindex">
<view class="top-box" hover-class="none" hover-stop-propagation="false">
<view class="time" hover-class="none" hover-stop-propagation="false">{{item.start_time}}-{{item.end_time}}</view>
<!-- <view class="status {{item.call_time?'done-status':''}}" hover-class="none" hover-stop-propagation="false">{{item.call_time?'已点名':'未点名'}}</view> -->
</view>
<view class="info-box" hover-class="none" hover-stop-propagation="false">
<view class="info-item" hover-class="none" hover-stop-propagation="false">
<image class="icon" src="{{localImageRoot}}/2b/classservice/class.png?{{imageVersion}}"></image>
<view class="text" hover-class="none" hover-stop-propagation="false">{{item.class.title}}</view>
</view>
<view class="info-item" hover-class="none" hover-stop-propagation="false">
<image class="icon" src="{{localImageRoot}}/2b/classservice/map.png?{{imageVersion}}"></image>
<view class="text" hover-class="none" hover-stop-propagation="false">{{item.class.title}}</view>
</view>
<view class="info-item" hover-class="none" hover-stop-propagation="false">
<image class="icon" src="{{localImageRoot}}/2b/classservice/adress.png?{{imageVersion}}"></image>
<view class="text" hover-class="none" hover-stop-propagation="false">海创科技中心校区余杭塘路北校区</view>
</view>
</view>
</view>
<list-loading loading="{{listLoading}}"></list-loading>
<view class="empty-content-box" wx:if="{{emptyPage}}">
<empty-content text="暂无数据"></empty-content>
</view>
</view>
</view>
business/pages/classservice/record.wxss
0 → 100644
View file @
20b4ab3b
/* business/pages/classservice/rollcall .wxss */
.container{
background:rgba(243,244,246,1);
min-height: 100vh;
overflow: hidden;
}
.content-box{
padding: 0 24rpx;
background:rgba(243,244,246,1);
padding-top: 30rpx;
}
.content-box .content-item{
background:rgba(255,255,255,1);
border-radius:20rpx;
margin-bottom: 30rpx;
padding-bottom: 40rpx;
}
.content-box .content-item .top-box{
display: flex;
height: 98rpx;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(0,0,0,.05);
padding: 0 24rpx;
}
.content-box .content-item .top-box .time{
font-size:30rpx;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(84,84,84,1);
line-height:1;
}
.content-box .content-item .top-box .status{
width:102rpx;
height:40rpx;
background:rgba(255,107,107,.15);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,76,76,1);
line-height:40rpx;
text-align: center;
}
.content-box .content-item .top-box .done-status{
width:102rpx;
height:40rpx;
background:rgba(255,107,107,.15);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,76,76,1);
line-height:40rpx;
text-align: center;
}
.content-box .content-item .info-box{
}
.content-box .content-item .info-box .info-item{
padding: 32rpx 24rpx 0 24rpx;
display: flex;
align-items: center;
}
.content-box .content-item .info-box .info-item .icon{
width: 27rpx;
height: 27rpx;
}
.content-box .content-item .info-box .info-item .text{
font-size:28rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,1);
line-height: 1;
padding-left: 35rpx;
}
\ No newline at end of file
business/pages/classservice/rollcalldetail.js
View file @
20b4ab3b
...
...
@@ -32,11 +32,13 @@ Page({
onLoad
:
function
(
options
)
{
const
{
sid
,
id
id
,
from
}
=
options
;
this
.
setData
({
sid
,
id
id
,
from
:
from
||
''
})
this
.
schedulesDetailGet
();
},
...
...
@@ -117,17 +119,19 @@ Page({
this
.
setData
({
schedulesDetail
:
data
})
this
.
callsListGet
(
data
.
class_id
);
this
.
callsListGet
(
data
.
class_id
,
data
.
course_id
);
this
.
erpClassDetailGet
(
data
.
class_id
);
}).
catch
((
res
)
=>
{
})
},
callsListGet
(
class_id
)
{
callsListGet
(
class_id
,
course_id
)
{
callsListGet
({
school_id
:
this
.
data
.
sid
,
class_id
:
class_id
,
extra
:
'time'
extra
:
'time'
,
course_id
:
course_id
,
schedule_id
:
this
.
data
.
id
}).
then
((
res
)
=>
{
const
{
code
,
...
...
@@ -170,9 +174,16 @@ Page({
})
},
addTheme
()
{
this
.
setData
({
modalshow
:
true
})
const
{
from
}
=
this
.
data
if
(
from
&&
from
==
"record"
){
wx
.
navigateTo
({
url
:
`/business/pages/classservice/rollcallindex?sid=
${
this
.
data
.
sid
}
&id=
${
this
.
data
.
schedulesDetail
.
id
}
&from=rollcalldetail`
})
}
else
{
this
.
setData
({
modalshow
:
true
})
}
},
hidemodal
()
{
this
.
setData
({
...
...
business/pages/classservice/rollcalldetail.wxml
View file @
20b4ab3b
...
...
@@ -23,7 +23,7 @@
</view>
</view>
<view class="footer-btn" hover-class="none" hover-stop-propagation="false" bindtap="addTheme">
布置作业
</view>
<view class="footer-btn" hover-class="none" hover-stop-propagation="false" bindtap="addTheme">
{{from&&from=='record'?'编辑点名':'布置作业'}}
</view>
</view>
<view class="themetypeselectmodal {{modelHideClass ? 'hide' : ''}}" hidden="{{!modalshow}}">
...
...
business/pages/classservice/rollcallindex.js
View file @
20b4ab3b
...
...
@@ -3,6 +3,7 @@
import
{
callsListPOST
,
schedulesDetailGet
,
callsListGet
}
from
'../../../service/business/classservice.js'
import
{
studentsListGet
...
...
@@ -46,11 +47,13 @@ Page({
onLoad
:
function
(
options
)
{
const
{
sid
,
id
id
,
from
}
=
options
;
this
.
setData
({
sid
,
id
id
,
from
:
from
||
''
})
this
.
schedulesDetailGet
();
},
...
...
@@ -168,7 +171,7 @@ Page({
this
.
getCountData
()
})
},
call
sListGet
(
class_id
)
{
student
sListGet
(
class_id
)
{
studentsListGet
({
school_id
:
this
.
data
.
sid
,
class_id
:
class_id
,
...
...
@@ -193,6 +196,37 @@ Page({
})
},
callsListGet
(
class_id
,
course_id
)
{
callsListGet
({
school_id
:
this
.
data
.
sid
,
class_id
:
class_id
,
extra
:
'time'
,
course_id
:
course_id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
data
.
list
.
forEach
(
element
=>
{
element
.
statusType
=
element
.
type
;
element
.
punishCount
=
this
.
data
.
classHour
-
element
.
expend
;
element
.
name
=
element
.
formal_school_student
.
name
;
element
.
total
=
element
.
student_course
.
total
;
element
.
expend
=
element
.
student_course
.
expend
;
element
.
id
=
element
.
formal_school_student
.
id
;
});
this
.
setData
({
callsList
:
data
.
list
,
},()
=>
{
})
}
}).
catch
((
res
)
=>
{
this
.
getCountData
()
})
},
schedulesDetailGet
()
{
schedulesDetailGet
({
id
:
this
.
data
.
id
,
...
...
@@ -221,8 +255,16 @@ Page({
this
.
setData
({
schedulesDetail
:
data
})
this
.
callsListGet
(
data
.
class_id
);
if
(
this
.
data
.
from
&&
this
.
data
.
from
==
"rollcalldetail"
){
this
.
callsListGet
(
data
.
class_id
,
data
.
course_id
);
this
.
setData
({
classHour
:
data
.
expend
})
}
else
{
this
.
studentsListGet
(
data
.
class_id
);
}
this
.
erpClassDetailGet
(
data
.
class_id
);
}).
catch
((
res
)
=>
{
})
...
...
@@ -282,10 +324,17 @@ Page({
}).
then
((
res
)
=>
{
const
{
data
,
code
}
=
res
;
if
(
code
==
200
){
this
.
setData
({
classDetail
:
data
,
classHour
:
data
.
expend
})
if
(
!
this
.
data
.
from
){
this
.
setData
({
classDetail
:
data
,
classHour
:
data
.
expend
})
}
else
{
this
.
setData
({
classDetail
:
data
,
})
}
}
}).
catch
((
res
)
=>
{
...
...
@@ -303,7 +352,11 @@ Page({
})
const
{
schedulesDetail
,
id
,
sid
,
classHour
,
callsList
}
=
this
.
data
;
let
call_students
=
callsList
.
map
((
item
)
=>
{
return
item
.
id
+
','
+
item
.
statusType
+
','
+
1
+
','
+
classHour
+
','
+
''
let
count
=
classHour
;
if
(
item
.
punishCount
&&
(
item
.
statusType
==
3
||
item
.
statusType
==
4
)){
count
+=
item
.
punishCount
}
return
item
.
id
+
','
+
item
.
statusType
+
','
+
1
+
','
+
count
+
','
+
''
}).
join
(
';'
);
callsListPOST
({
type
:
1
,
...
...
business/pages/classservice/rollcalllist.js
View file @
20b4ab3b
...
...
@@ -32,7 +32,7 @@ Page({
my
=
dakarole
==
2
?
1
:
''
;
this
.
setData
({
sid
,
my
:
my
my
:
1
})
this
.
getBetweenDateStr
();
this
.
schedulesGet
()
...
...
business/pages/classservice/tindex.js
View file @
20b4ab3b
...
...
@@ -27,7 +27,7 @@ Page({
localImageRoot
:
"../../../images"
,
submiting
:
false
,
sid
:
0
,
my
:
''
,
my
:
1
,
schoolShow
:
false
,
schoolList
:[],
schoolTotal
:
0
,
...
...
@@ -47,7 +47,7 @@ Page({
my
=
dakarole
==
2
?
1
:
''
;
this
.
setData
({
sid
,
my
:
my
my
:
1
})
this
.
getschoolList
()
},
...
...
@@ -128,6 +128,11 @@ Page({
url
:
`/business/pages/todotasks/index?sid=
${
this
.
data
.
sid
}
`
})
},
goRecord
(){
wx
.
navigateTo
({
url
:
`/business/pages/classservice/record?sid=
${
this
.
data
.
sid
}
&my=
${
this
.
data
.
my
}
`
,
})
},
selectSchool
()
{
this
.
setData
({
schoolShow
:
!
this
.
data
.
schoolShow
...
...
business/pages/classservice/tindex.wxml
View file @
20b4ab3b
...
...
@@ -62,10 +62,16 @@
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goPointsMgt">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="" src="{{localImageRoot}}/2b/classservice/
record
.png?{{imageVersion}}"></image>
<image class="" src="{{localImageRoot}}/2b/classservice/
data
.png?{{imageVersion}}"></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">积分管理</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goRecord">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="" src="{{localImageRoot}}/2b/classservice/record.png?{{imageVersion}}"></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">上课记录</view>
</view>
</view>
</view>
<view class="footer-btn" hover-class="none" hover-stop-propagation="false" bindtap="gorollcalllist">我要点名</view>
...
...
business/pages/classservice/todolist.js
View file @
20b4ab3b
...
...
@@ -36,12 +36,9 @@ Page({
*/
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
let
my
=
''
let
dakarole
=
LocalStorage
.
getItem
(
'dakarole'
);
my
=
dakarole
==
2
?
1
:
''
;
this
.
setData
({
sid
,
my
:
my
my
:
1
})
this
.
schedulesGet
()
},
...
...
@@ -96,7 +93,7 @@ Page({
},
schedulesGet
(){
let
now
=
new
Date
();
let
start
=
new
Date
(
now
.
getTime
()
-
7
*
24
*
3600
)
let
start
=
new
Date
(
now
.
getTime
()
-
7
*
24
*
3600
*
1000
)
schedulesGet
({
my
:
this
.
data
.
my
,
start_time
:
formatDate
(
start
),
...
...
business/pages/datacenter/index.js
View file @
20b4ab3b
...
...
@@ -70,108 +70,108 @@ Page({
}
this
.
data
.
ringChart
[
1
]
=
new
wxCharts
({
animation
:
true
,
canvasId
:
'ringCanvas1'
,
type
:
'ring'
,
extra
:
{
ringWidth
:
14
,
pie
:
{
//
this.data.ringChart[1] = new wxCharts({
//
animation: true,
//
canvasId: 'ringCanvas1',
//
type: 'ring',
//
extra: {
//
ringWidth: 14,
//
pie: {
}
},
title
:
{
name
:
`
${(
count1
/
allcount
)
*
100
}
%`
,
color
:
'#000000'
,
fontSize
:
12
},
series
:
[{
name
:
'成交量1'
,
data
:
count1
,
stroke
:
false
,
color
:
'#FFB97A'
,
},
{
name
:
'成交量2'
,
data
:
allcount
-
count1
,
stroke
:
false
,
color
:
'#FFEBD9'
,
}],
disablePieStroke
:
true
,
width
:
140
,
height
:
140
,
dataLabel
:
false
,
legend
:
false
,
background
:
'#f5f5f5'
,
padding
:
0
});
ringChart2
=
new
wxCharts
({
animation
:
true
,
canvasId
:
'ringCanvas2'
,
type
:
'ring'
,
extra
:
{
ringWidth
:
14
,
pie
:
{
//
}
//
},
//
title: {
//
name: `${(count1/allcount)*100}%`,
//
color: '#000000',
//
fontSize: 12
//
},
//
series: [{
//
name: '成交量1',
//
data: count1,
//
stroke: false,
//
color: '#FFB97A',
//
}, {
//
name: '成交量2',
//
data: allcount - count1,
//
stroke: false,
//
color: '#FFEBD9',
//
}],
//
disablePieStroke: true,
//
width: 140,
//
height: 140,
//
dataLabel: false,
//
legend: false,
//
background: '#f5f5f5',
//
padding: 0
//
});
//
ringChart2 = new wxCharts({
//
animation: true,
//
canvasId: 'ringCanvas2',
//
type: 'ring',
//
extra: {
//
ringWidth: 14,
//
pie: {
}
},
title
:
{
name
:
`
${(
count2
/
allcount
)
*
100
}
%`
,
color
:
'#000000'
,
fontSize
:
12
},
series
:
[{
name
:
'成交量2'
,
data
:
count2
,
stroke
:
false
,
color
:
'#FFB97A'
,
},
{
name
:
'成交量2'
,
data
:
allcount
-
count2
,
stroke
:
false
,
color
:
'#FFEBD9'
,
}],
disablePieStroke
:
true
,
width
:
140
,
height
:
140
,
dataLabel
:
false
,
legend
:
false
,
background
:
'#f5f5f5'
,
padding
:
0
});
ringChart3
=
new
wxCharts
({
animation
:
true
,
canvasId
:
'ringCanvas3'
,
type
:
'ring'
,
extra
:
{
ringWidth
:
14
,
pie
:
{
//
}
//
},
//
title: {
//
name: `${(count2/allcount)*100}%`,
//
color: '#000000',
//
fontSize: 12
//
},
//
series: [{
//
name: '成交量2',
//
data: count2,
//
stroke: false,
//
color: '#FFB97A',
//
}, {
//
name: '成交量2',
//
data: allcount - count2,
//
stroke: false,
//
color: '#FFEBD9',
//
}],
//
disablePieStroke: true,
//
width: 140,
//
height: 140,
//
dataLabel: false,
//
legend: false,
//
background: '#f5f5f5',
//
padding: 0
//
});
//
ringChart3 = new wxCharts({
//
animation: true,
//
canvasId: 'ringCanvas3',
//
type: 'ring',
//
extra: {
//
ringWidth: 14,
//
pie: {
}
},
title
:
{
name
:
`
${(
count3
/
allcount
)
*
100
}
%`
,
color
:
'#000000'
,
fontSize
:
12
},
series
:
[{
name
:
'成交量2'
,
data
:
count3
,
stroke
:
false
,
color
:
'#FFB97A'
,
},
{
name
:
'成交量2'
,
data
:
allcount
-
count3
,
stroke
:
false
,
color
:
'#FFEBD9'
,
}],
disablePieStroke
:
true
,
width
:
140
,
height
:
140
,
dataLabel
:
false
,
legend
:
false
,
background
:
'#ffffff'
,
padding
:
0
});
//
}
//
},
//
title: {
//
name: `${(count3/allcount)*100}%`,
//
color: '#000000',
//
fontSize: 12
//
},
//
series: [{
//
name: '成交量2',
//
data: count3,
//
stroke: false,
//
color: '#FFB97A',
//
}, {
//
name: '成交量2',
//
data: allcount - count3,
//
stroke: false,
//
color: '#FFEBD9',
//
}],
//
disablePieStroke: true,
//
width: 140,
//
height: 140,
//
dataLabel: false,
//
legend: false,
//
background: '#ffffff',
//
padding: 0
//
});
},
/**
...
...
@@ -303,6 +303,9 @@ Page({
const
{
code
,
data
}
=
res
;
if
(
code
==
200
){
console
.
log
(
data
,
'data'
)
this
.
setData
({
classCours
:
data
.
list
})
data
.
list
.
forEach
((
ele
,
index
)
=>
{
this
.
initRingChart
(
ele
,
index
+
1
)
});
...
...
business/pages/datacenter/index.wxml
View file @
20b4ab3b
...
...
@@ -28,26 +28,26 @@
<text class="small" selectable="false" space="false" decode="false">(近6个月)</text>
</view>
<view class="chart-box" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false"
wx:if="{{classCours[0]}}"
>
<view class="canvas-box" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="ringCanvas1" class="ringcanvas"></canvas>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
钢琴初级
</view>
<view class="count" hover-class="none" hover-stop-propagation="false">
125
课时</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
{{classCours[0].title}}
</view>
<view class="count" hover-class="none" hover-stop-propagation="false">
{{classCours[0].course_time}}
课时</view>
</view>
<view class="chart-item" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false"
wx:if="{{classCours[1]}}"
>
<view class="canvas-box" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="ringCanvas2" class="ringcanvas"></canvas>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
钢琴初级
</view>
<view class="count" hover-class="none" hover-stop-propagation="false">
125
课时</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
{{classCours[1].title}}
</view>
<view class="count" hover-class="none" hover-stop-propagation="false">
{{classCours[1].course_time}}
课时</view>
</view>
<view class="chart-item" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false"
wx:if="{{classCours[2]}}"
>
<view class="canvas-box" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="ringCanvas3" class="ringcanvas"></canvas>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
钢琴初级
</view>
<view class="count" hover-class="none" hover-stop-propagation="false">
125
课时</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
{{classCours[2].title}}
</view>
<view class="count" hover-class="none" hover-stop-propagation="false">
{{classCours[2].course_time}}
课时</view>
</view>
</view>
</view>
...
...
business/pages/studentcenter/studentdetail.js
View file @
20b4ab3b
...
...
@@ -165,6 +165,7 @@ Page({
if
(
_recordTabIndex
===
index
)
{
return
}
console
.
log
(
_studentcalls
,
'_studentcalls'
)
this
.
setData
({
recordTabIndex
:
index
,
actStudentcalls
:
_studentcalls
[
index
+
1
]
...
...
@@ -173,7 +174,8 @@ Page({
studentInfoGet
()
{
studentDetailGet
({
id
:
this
.
data
.
studentId
,
extra
:
'honors'
extra
:
'honors'
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
data
,
...
...
@@ -198,7 +200,8 @@ Page({
studentclassesGet
({
student_id
:
this
.
data
.
studentId
,
extra
:
'course'
,
type
:
this
.
data
.
coursetabsIndex
==
0
?
1
:
2
type
:
this
.
data
.
coursetabsIndex
==
0
?
1
:
2
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
data
,
...
...
@@ -217,6 +220,7 @@ Page({
studentcallsGet
()
{
studentcallsGet
({
student_id
:
this
.
data
.
studentId
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
data
,
...
...
@@ -246,7 +250,6 @@ Page({
break
;
}
})
console
.
log
(
_studentcalls
[
1
],
'_studentcalls[1]'
)
this
.
setData
({
studentcalls
:
_studentcalls
,
actStudentcalls
:
_studentcalls
[
1
]
...
...
@@ -305,7 +308,13 @@ Page({
},
clockListGet
(
type
)
{
const
that
=
this
;
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
const
consumer_id
=
this
.
data
.
studentInfo
.
consumer_id
;
if
(
!
consumer_id
){
this
.
setData
({
emptyClockPage
:
true
})
return
;
}
if
(
!
this
.
data
.
clockhasmore
)
{
return
;
}
...
...
@@ -316,7 +325,7 @@ Page({
clockListLoading
:
true
})
clockList
({
now_consumer_id
:
visitor
&&
visitor
.
id
,
now_consumer_id
:
consumer_
id
,
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
school_id
:
this
.
data
.
sid
,
...
...
business/pages/studentcenter/studentdetail.wxml
View file @
20b4ab3b
...
...
@@ -121,7 +121,7 @@
</view>
</view>
<view class="class-box" hover-class="none" hover-stop-propagation="false">
<view class="class-item" hover-class="none" hover-stop-propagation="false" wx:for="{{item.classes}}">
<view class="class-item" hover-class="none" hover-stop-propagation="false" wx:for="{{item.classes}}"
wx:key="{{index}}"
>
<view class="blue-line" hover-class="none" hover-stop-propagation="false"></view>
<view class="class-name" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="handeloperate">操作</view>
...
...
@@ -152,28 +152,28 @@
<view class="icon {{recordTabIndex==1?'act-icon':''}}" hover-class="none" hover-stop-propagation="false">
<view class="inner-icon" hover-class="none" hover-stop-propagation="false" wx:if="{{recordTabIndex==1}}"></view>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
请假
:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[
3
].length}}</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
迟到
:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[
2
].length}}</view>
</view>
<view class="tabs-item" hover-class="none" hover-stop-propagation="false" bindtap="recordTabsChange" data-index="{{2}}">
<view class="icon {{recordTabIndex==2?'act-icon':''}}" hover-class="none" hover-stop-propagation="false">
<view class="inner-icon" hover-class="none" hover-stop-propagation="false" wx:if="{{recordTabIndex==2}}"></view>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
未到
:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[
4
].length}}</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
请假
:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[
3
].length}}</view>
</view>
<view class="tabs-item" hover-class="none" hover-stop-propagation="false" style="margin-right: 0" bindtap="recordTabsChange" data-index="{{3}}">
<view class="icon {{recordTabIndex==3?'act-icon':''}}" hover-class="none" hover-stop-propagation="false">
<view class="inner-icon" hover-class="none" hover-stop-propagation="false" wx:if="{{recordTabIndex==3}}"></view>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
迟
到:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[
2
].length}}</view>
<view class="name" hover-class="none" hover-stop-propagation="false">
未
到:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[
4
].length}}</view>
</view>
</view>
<view class="content" hover-class="none" hover-stop-propagation="false">
<view class="commonlist-bigwrap" wx:if="{{actStudentcalls&&actStudentcalls.length>0}}">
<block class="commonlist-partwrap" wx:for="{{actStudentcalls}}" wx:key="{{index}}">
<view class="commonlist-header">{{item.month}}月</view>
<view class="commonlist-header"
wx:if="{{filter.monthIsShow(item.month)}}"
>{{item.month}}月</view>
<view class="commonlist-box">
<view class="commonlist-item">
<view class="item-titlebox">
...
...
filter/index.wxs
View file @
20b4ab3b
var months=[];
function formatDate (date) {
var time = getDate(date * 1000);
var y = time.getFullYear();
...
...
@@ -276,6 +278,13 @@ function matchTime(time,type){
}
}
function monthIsShow(month){
if(months.indexOf(month)>-1){
return false;
}
months.push(month);
return true;
}
module.exports = {
formatDate: formatDate,
timeCompare: timeCompare,
...
...
@@ -298,5 +307,6 @@ module.exports = {
courseFilter: courseFilter,
checkSelect: checkSelect,
courseColor: courseColor,
matchTime: matchTime
matchTime: matchTime,
monthIsShow:monthIsShow
}
\ No newline at end of file
images/2b/classservice/map.png
0 → 100644
View file @
20b4ab3b
1.54 KB
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