Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
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
Damon
study
Commits
6c2c6735
Commit
6c2c6735
authored
Aug 02, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页机构id
parent
4e601988
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
5 deletions
+49
-5
learn.js
src/api/learn.js
+8
-0
index.vue
src/pages/index/index.vue
+4
-0
examSetting.vue
src/pages/learn/examSetting.vue
+1
-1
record.vue
src/pages/learn/record.vue
+36
-4
No files found.
src/api/learn.js
View file @
6c2c6735
...
...
@@ -96,6 +96,13 @@ let learnApiFun = function(vm) {
'/rest/question/query/everyTaskList/'
+
questionWarehouseId
,
params
)
// 练习分析
let
studyRecord
=
async
(
questionWarehouseId
,
params
=
{})
=>
await
vm
.
$u
.
get
(
'/rest/question/query/studyRecord/'
+
questionWarehouseId
,
params
)
const
learnApi
=
{
getQuestion
,
getQuestionTotal
,
...
...
@@ -119,6 +126,7 @@ let learnApiFun = function(vm) {
searchQuestion
,
checkGetQuestion
,
everyTaskList
,
studyRecord
,
}
return
learnApi
}
...
...
src/pages/index/index.vue
View file @
6c2c6735
...
...
@@ -23,6 +23,7 @@
<text
v-else
>
{{
title
}}
</text>
<u-icon
class=
"icon-view"
name=
"arrow-up-fill"
></u-icon>
</view>
<view>
{{
orgIdText
}}
</view>
<view
v-if=
"noExam"
class=
"tip-view"
>
<text>
您还未选择题库,请先选择题库
</text>
</view>
...
...
@@ -128,6 +129,9 @@ export default {
}
},
computed
:
{
orgIdText
()
{
return
getApp
().
globalData
.
orgId
},
title
()
{
return
this
.
selected
.
title
||
'请选择题库'
},
...
...
src/pages/learn/examSetting.vue
View file @
6c2c6735
...
...
@@ -44,7 +44,7 @@
>
<view
class=
"select-area"
>
<view
@
click=
"handleClickArea"
class=
"area-text-view"
>
<text>
{{
currentProvince
.
label
}}
</text>
<text>
{{
currentProvince
.
label
||
'请选择'
}}
</text>
<u-icon
name=
"arrow-down"
></u-icon>
</view>
<view
class=
"loading-view"
v-if=
"loading"
>
...
...
src/pages/learn/record.vue
View file @
6c2c6735
...
...
@@ -174,18 +174,18 @@ export default {
// }, 500)
})
}
this
.
queryExamRecord
()
this
.
chartInit
()
this
.
queryExamRecord
()
},
methods
:
{
chartInit
()
{
this
.
chartData
.
series
=
[
{
name
:
'
时间轴1
'
,
name
:
'
答题数
'
,
pointShape
:
'circle'
,
legendShape
:
'circle'
,
data
:
[
[
10000
,
55
],
[
10000
,
55
],
// 【日期, 数值】
[
30000
,
25
],
[
50000
,
55
],
[
70000
,
25
],
...
...
@@ -193,7 +193,7 @@ export default {
],
},
{
name
:
'
时间轴2
'
,
name
:
'
正确率
'
,
pointShape
:
'circle'
,
legendShape
:
'circle'
,
data
:
[
...
...
@@ -205,6 +205,7 @@ export default {
],
},
]
this
.
studyRecord
()
},
// 每日一练统计
everyTaskList
(
year
,
month
)
{
...
...
@@ -230,6 +231,37 @@ export default {
console
.
log
(
err
)
})
},
// 练习分析
studyRecord
(
start
,
end
)
{
var
params
=
{}
if
(
!
start
||
!
end
)
{
// 近七天
end
=
new
Date
().
getTime
()
start
=
new
Date
().
setDate
(
new
Date
().
getDay
()
-
6
)
}
console
.
log
(
'---------start---------'
,
start
,
'---------start---------'
,
end
)
params
=
{
startDate
:
this
.
$u
.
timeFormat
(
start
,
'yyyy-mm-dd'
),
endDate
:
this
.
$u
.
timeFormat
(
end
,
'yyyy-mm-dd'
),
}
this
.
$u
.
api
.
studyRecord
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
console
.
log
(
'----------studyRecord------------'
,
res
)
// this.days = []
// for (var item of res) {
// this.days.push(item.time.replace(/\-0/g, '\-'))
// }
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 模考记录
queryExamRecord
()
{
this
.
recordParams
.
current
+=
1
...
...
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