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
8579974a
Commit
8579974a
authored
Apr 08, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8e83e696
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
190 additions
and
131 deletions
+190
-131
index.js
business/pages/deskcenter/index.js
+114
-93
index.wxml
business/pages/deskcenter/index.wxml
+2
-2
globaldeal.js
business/pages/todotasks/globaldeal.js
+69
-33
globaldeal.json
business/pages/todotasks/globaldeal.json
+2
-1
globaldeal.wxml
business/pages/todotasks/globaldeal.wxml
+3
-2
No files found.
business/pages/deskcenter/index.js
View file @
8579974a
// business/pages/deskcenter/index.js
import
{
loginTime
}
from
"../../../service/business/ucenter.js"
;
import
{
loginTime
}
from
"../../../service/business/ucenter.js"
;
import
{
LocalStorage
,
formatDay
}
from
"../../../utilities/index.js"
;
import
{
commonwaitjobGet
,
...
...
@@ -11,14 +9,14 @@ import {
schoolDetailGet
,
}
from
"../../../service/business/common.js"
;
import
{
import
{
getAccountList
,
getMemberMe
,
helpAds
helpAds
,
}
from
"../../../service/common.js"
;
import
apis
from
"../../../constants/api.js"
;
import
{
todocallGet
}
from
"../../../service/business/classservice.js"
;
import
permissionUtils
from
'../../../utilities/permission.js'
;
import
permissionUtils
from
"../../../utilities/permission.js"
;
var
wxCharts
=
require
(
"../../../utilities/wxcharts-min.js"
);
var
columnChart
=
null
;
...
...
@@ -31,9 +29,9 @@ Page({
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
schoolShow
:
false
,
schoolList
:[],
schoolTotal
:
0
,
selectSchoolData
:{},
schoolList
:
[],
schoolTotal
:
0
,
selectSchoolData
:
{},
schoolTitile
:
""
,
sid
:
0
,
...
...
@@ -65,42 +63,10 @@ Page({
analyzeDashStatic
:
{},
//面板数据
guideDailogShow
:
false
,
guideIndex
:
1
,
adsList
:
[],
curbanner
:
0
,
// 待办事项
waitJobList
:
[
{
type
:
1
,
title
:
"创建一个班级"
,
count
:
0
,
},
{
type
:
2
,
title
:
"创建一个作业打卡活动"
,
count
:
0
,
},
{
type
:
3
,
title
:
"添加老师至学校"
,
count
:
0
,
},
{
type
:
4
,
title
:
"配置一个精美的微官网"
,
count
:
0
,
},
{
type
:
5
,
title
:
"给学生一次课堂点评"
,
count
:
0
,
},
{
type
:
6
,
title
:
"给学生配置积分奖励"
,
count
:
0
,
},
],
waitJobList
:
[],
//新校区待办事项
},
onLoad
:
function
(
options
)
{
...
...
@@ -115,7 +81,7 @@ Page({
// this.analyzeclasscourseGet();
// this.schoolDetailGet();
this
.
getschoolList
();
this
.
getAds
()
this
.
getAds
()
;
},
onShow
:
function
()
{
this
.
getMemberMeInfo
();
...
...
@@ -175,78 +141,82 @@ Page({
}
});
},
getAds
()
{
getAds
()
{
helpAds
({
type
:
1
,
page
:
1
,
perPage
:
10
perPage
:
10
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
// this.adsList = data.list;
this
.
setData
({
adsList
:
data
.
list
})
adsList
:
data
.
list
,
})
;
}
else
{
wx
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
})
icon
:
"none"
,
})
;
}
})
})
;
},
getschoolList
(){
getschoolList
()
{
getAccountList
({
page
:
1
,
perPage
:
100
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
data
.
schoolTotal
=
data
.
total
;
this
.
setData
({
schoolList
:
data
.
list
,
selectSchoolData
:
this
.
data
.
sid
?
data
.
list
.
find
((
item
)
=>
item
.
id
==
this
.
data
.
sid
):
data
.
list
[
0
]
})
}
}).
catch
(()
=>
{
school_id
:
this
.
data
.
sid
,
})
.
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
data
.
schoolTotal
=
data
.
total
;
this
.
setData
({
schoolList
:
data
.
list
,
selectSchoolData
:
this
.
data
.
sid
?
data
.
list
.
find
((
item
)
=>
item
.
id
==
this
.
data
.
sid
)
:
data
.
list
[
0
],
});
}
})
.
catch
(()
=>
{});
},
selectSchool
()
{
if
(
this
.
data
.
schoolList
.
length
==
1
)
{
return
selectSchool
()
{
if
(
this
.
data
.
schoolList
.
length
==
1
)
{
return
;
}
this
.
setData
({
schoolShow
:
!
this
.
data
.
schoolShow
})
schoolShow
:
!
this
.
data
.
schoolShow
,
})
;
},
sureSelect
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
;
sureSelect
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
;
if
(
item
.
id
==
this
.
data
.
id
)
{
this
.
setData
({
schoolShow
:
false
,
})
})
;
return
;
}
// app.globalData.accountExpired = false;
loginTime
({
id
:
item
.
id
,
type
:
1
})
if
(
item
.
school_teacher
.
type
==
2
){
//管理员
type
:
1
,
});
if
(
item
.
school_teacher
.
type
==
2
)
{
//管理员
// this.getMemberMeInfo(item.id)
LocalStorage
.
setItem
(
'dakarole'
,
1
);
LocalStorage
.
setItem
(
"dakarole"
,
1
);
wx
.
reLaunch
({
url
:
`/business/pages/deskcenter/index?sid=
${
item
.
id
}
`
,
})
}
else
{
LocalStorage
.
setItem
(
'dakarole'
,
2
);
permissionUtils
.
myMenulistGet
(
item
.
id
)
})
;
}
else
{
LocalStorage
.
setItem
(
"dakarole"
,
2
);
permissionUtils
.
myMenulistGet
(
item
.
id
)
;
wx
.
reLaunch
({
url
:
`/business/pages/classservice/teacherindex?sid=
${
item
.
id
}
`
,
})
})
;
}
// this.setData({
// sid: item.id,
// schoolShow: false,
...
...
@@ -259,7 +229,7 @@ Page({
// this.getCommonwaitJob();
// this.getMemberMeInfo();
// })
},
},
// 超时
// todocallGet() {
...
...
@@ -300,12 +270,12 @@ Page({
// }, 200);
// },
// 轮播图手动
bindSwiperchange
(
e
)
{
console
.
log
(
33
)
bindSwiperchange
(
e
)
{
console
.
log
(
33
)
;
let
that
=
this
;
that
.
setData
({
curbanner
:
e
.
detail
.
current
})
curbanner
:
e
.
detail
.
current
,
})
;
},
// 打卡
goClocklist
()
{
...
...
@@ -368,10 +338,10 @@ Page({
});
},
// 待处理更多
toMoreDeal
()
{
toMoreDeal
()
{
wx
.
navigateTo
({
url
:
`/business/pages/todotasks/globaldeal?sid=
${
this
.
data
.
sid
}
`
,
})
})
;
},
// 待处理具体跳转
jumpTodo
(
e
)
{
...
...
@@ -394,7 +364,7 @@ Page({
url
=
`/business/pages/classservice/classreviewindex?sid=
${
this
.
data
.
sid
}
`
;
break
;
case
6
:
url
=
`/business/pages/score
rulesetting
/index?sid=
${
this
.
data
.
sid
}
`
;
url
=
`/business/pages/score
mgt
/index?sid=
${
this
.
data
.
sid
}
`
;
break
;
default
:
url
=
""
;
...
...
@@ -438,16 +408,67 @@ Page({
commonwaitjobGet
({
school_id
:
this
.
data
.
sid
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
let
waitJobList
=
[];
for
(
let
i
in
data
.
statistic
)
{
if
(
data
.
statistic
[
i
]
==
0
)
{
waitJobList
.
push
({
title
:
this
.
transformTitle
(
i
,
2
),
type
:
this
.
transformTitle
(
i
,
1
),
count
:
data
.
statistic
[
i
],
});
}
}
this
.
setData
({
waitJob
:
(
res
.
data
.
apply_number
||
0
)
+
(
res
.
data
.
customer_number
||
0
)
+
(
res
.
data
.
noReviews
||
0
),
(
data
.
apply_number
||
0
)
+
(
data
.
customer_number
||
0
)
+
(
data
.
noReviews
||
0
),
waitJobList
:
waitJobList
,
});
}
});
},
// 待办事项处理,kind 1为类型 2为标题
transformTitle
(
key
,
kind
)
{
let
title
=
""
;
let
type
=
""
;
switch
(
key
)
{
case
"class_count"
:
title
=
"创建一个班级"
;
type
=
1
;
break
;
case
"subject_mixed_count"
:
title
=
"创建一个作业打卡活动"
;
type
=
2
;
break
;
case
"teacher_count"
:
title
=
"添加老师至学校"
;
type
=
3
;
break
;
case
"website_count"
:
title
=
"配置一个精美的微官网"
;
type
=
4
;
break
;
case
"class_review_count"
:
title
=
"给学生一次课堂点评"
;
type
=
5
;
break
;
case
"integral_good_count"
:
title
=
"给学生配置积分奖励"
;
type
=
6
;
break
;
default
:
break
;
}
if
(
kind
==
1
)
{
return
type
;
}
if
(
kind
==
2
)
{
return
title
;
}
},
watchBack
(
name
,
that
)
{
that
.
setData
({
accountExpired
:
name
,
...
...
business/pages/deskcenter/index.wxml
View file @
8579974a
...
...
@@ -115,14 +115,14 @@
</view>
</view>
</view>
<view class="section-wrap">
<view class="section-wrap"
wx:if="{{waitJobList.length>0}}"
>
<view class="section section-waitdeal">
<view class="section-title">
<view class="title-text">待处理</view>
<view class="btn-more" bindtap="toMoreDeal">更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"/></view>
</view>
<view class="waitdeal-box">
<view class="item" wx:for="{{waitJobList}}" wx:key="index" data-type="{{item.type}}" bindtap="jumpTodo">
<view class="item" wx:for="{{waitJobList}}" wx:key="index" data-type="{{item.type}}" bindtap="jumpTodo"
wx:if="{{item.count==0 && index<3}}"
>
<view class="l">
<image class="item-icon" src="{{imageRoot}}2b/deskcenternew/waitdeal/icon_0{{item.type}}.png?{{imageVersion}}"/>
<view class="item-title">{{item.title}}</view>
...
...
business/pages/todotasks/globaldeal.js
View file @
8579974a
import
{
commonwaitjobGet
}
from
"../../../service/business/common.js"
;
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -5,38 +8,7 @@ Page({
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
sid
:
0
,
waitJobList
:
[
{
type
:
1
,
title
:
"创建一个班级"
,
count
:
0
,
},
{
type
:
2
,
title
:
"创建一个作业打卡活动"
,
count
:
0
,
},
{
type
:
3
,
title
:
"添加老师至学校"
,
count
:
0
,
},
{
type
:
4
,
title
:
"配置一个精美的微官网"
,
count
:
0
,
},
{
type
:
5
,
title
:
"给学生一次课堂点评"
,
count
:
0
,
},
{
type
:
6
,
title
:
"给学生配置积分奖励"
,
count
:
0
,
},
],
waitJobList
:
[],
//新校区待办事项
},
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
...
...
@@ -44,6 +16,70 @@ Page({
sid
,
});
},
onShow
(){
this
.
getCommonwaitJob
();
},
getCommonwaitJob
()
{
commonwaitjobGet
({
school_id
:
this
.
data
.
sid
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
let
waitJobList
=
[];
for
(
let
i
in
data
.
statistic
)
{
if
(
data
.
statistic
[
i
]
==
0
)
{
waitJobList
.
push
({
title
:
this
.
transformTitle
(
i
,
2
),
type
:
this
.
transformTitle
(
i
,
1
),
count
:
data
.
statistic
[
i
],
});
}
}
this
.
setData
({
waitJobList
:
waitJobList
,
});
}
});
},
// 待办事项处理,kind 1为类型 2为标题
transformTitle
(
key
,
kind
)
{
let
title
=
""
;
let
type
=
""
;
switch
(
key
)
{
case
"class_count"
:
title
=
"创建一个班级"
;
type
=
1
;
break
;
case
"subject_mixed_count"
:
title
=
"创建一个作业打卡活动"
;
type
=
2
;
break
;
case
"teacher_count"
:
title
=
"添加老师至学校"
;
type
=
3
;
break
;
case
"website_count"
:
title
=
"配置一个精美的微官网"
;
type
=
4
;
break
;
case
"class_review_count"
:
title
=
"给学生一次课堂点评"
;
type
=
5
;
break
;
case
"integral_good_count"
:
title
=
"给学生配置积分奖励"
;
type
=
6
;
break
;
default
:
break
;
}
if
(
kind
==
1
)
{
return
type
;
}
if
(
kind
==
2
)
{
return
title
;
}
},
jumpTodo
(
e
)
{
const
{
type
}
=
e
.
currentTarget
.
dataset
;
let
url
=
""
;
...
...
@@ -64,7 +100,7 @@ Page({
url
=
`/business/pages/classservice/classreviewindex?sid=
${
this
.
data
.
sid
}
`
;
break
;
case
6
:
url
=
`/business/pages/score
rulesetting/index
?sid=
${
this
.
data
.
sid
}
`
;
url
=
`/business/pages/score
mgt/index?sid=
${
this
.
data
.
sid
}
?sid=
${
this
.
data
.
sid
}
`
;
break
;
default
:
url
=
""
;
...
...
business/pages/todotasks/globaldeal.json
View file @
8579974a
{
"navigationBarTitleText"
:
"待处理"
,
"usingComponents"
:
{
"expiredTip"
:
"../../components/expiredTip"
"expiredTip"
:
"../../components/expiredTip"
,
"empty-content"
:
"../../../components/emptycontent"
}
}
\ No newline at end of file
business/pages/todotasks/globaldeal.wxml
View file @
8579974a
<view class="container">
<view class="waitdeal-box">
<view class="item" wx:for="{{waitJobList}}" wx:key="index" data-type="{{item.type}}" bindtap="jumpTodo">
<view class="waitdeal-box"
wx:if="{{waitJobList.length>0}}"
>
<view class="item" wx:for="{{waitJobList}}" wx:key="index" data-type="{{item.type}}" bindtap="jumpTodo"
wx:if="{{item.count==0}}"
>
<view class="l">
<image class="item-icon" src="{{imageRoot}}2b/deskcenternew/waitdeal/icon_0{{item.type}}.png?{{imageVersion}}"/>
<view class="item-title">{{item.title}}</view>
...
...
@@ -11,4 +11,5 @@
</view>
</view>
</view>
<empty-content text="暂无待处理事项~" emptyimg="" wx:else></empty-content>
</view>
\ No newline at end of file
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