Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
admin
Overview
Overview
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
baihong
admin
Commits
c7eb0ff6
Commit
c7eb0ff6
authored
Apr 26, 2021
by
baihong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据统计
parent
38a0921f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
44 deletions
+74
-44
dataStatistics.vue
src/view/clockEarly/dataStatistics.vue
+46
-41
setTabs.vue
src/view/clockEarly/setTabs.vue
+27
-3
login.vue
src/view/login/login.vue
+1
-0
No files found.
src/view/clockEarly/dataStatistics.vue
View file @
c7eb0ff6
...
...
@@ -46,51 +46,56 @@ export default {
endDate
:
this
.
date
[
1
]
};
queryList
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
const
option
=
{
tooltip
:
{
trigger
:
"axis"
},
grid
:
{
left
:
"3%"
,
right
:
"4%"
,
bottom
:
"3%"
,
containLabel
:
true
},
xAxis
:
{
type
:
"category"
,
boundaryGap
:
false
,
data
:
res
.
map
((
p
)
=>
{
return
p
.
group_date
})
},
yAxis
:
{
type
:
"value"
},
series
:
[
{
name
:
"报名人数"
,
type
:
"line"
,
stack
:
"总量"
,
data
:
res
.
map
((
p
)
=>
{
return
p
.
apply_num
})
},
{
name
:
"签到人数"
,
type
:
"line"
,
stack
:
"总量"
,
data
:
res
.
map
((
p
)
=>
{
return
p
.
clock_num
})
}
]
};
this
.
$nextTick
(()
=>
{
this
.
dom
=
echarts
.
init
(
this
.
$refs
.
dom
);
console
.
log
(
this
.
dom
);
this
.
dom
.
setOption
(
option
);
on
(
window
,
"resize"
,
this
.
resize
);
});
});
}
},
mounted
()
{
this
.
search
()
const
option
=
{
tooltip
:
{
trigger
:
"axis"
},
grid
:
{
left
:
"3%"
,
right
:
"4%"
,
bottom
:
"3%"
,
containLabel
:
true
},
xAxis
:
{
type
:
"category"
,
boundaryGap
:
false
,
data
:
[
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
,
"周日"
]
},
yAxis
:
{
type
:
"value"
},
series
:
[
{
name
:
"报名人数"
,
type
:
"line"
,
stack
:
"总量"
,
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
]
},
{
name
:
"签到人数"
,
type
:
"line"
,
stack
:
"总量"
,
data
:
[
220
,
182
,
191
,
234
,
290
,
330
,
310
]
}
]
};
this
.
$nextTick
(()
=>
{
this
.
dom
=
echarts
.
init
(
this
.
$refs
.
dom
);
console
.
log
(
this
.
dom
);
this
.
dom
.
setOption
(
option
);
on
(
window
,
"resize"
,
this
.
resize
);
});
this
.
search
();
},
beforeDestroy
()
{
off
(
window
,
"resize"
,
this
.
resize
);
...
...
src/view/clockEarly/setTabs.vue
View file @
c7eb0ff6
...
...
@@ -188,14 +188,35 @@ export default {
formValidate
:
{
award_name
:
""
,
award_type
:
""
,
award_rate
:
""
,
award_rate
:
null
,
template_code
:
""
},
ruleValidate
:
{
name
:
[
award_
name
:
[
{
required
:
true
,
message
:
"The name cannot be empty"
,
message
:
"请输入奖品名称"
,
trigger
:
"blur"
}
],
award_type
:
[
{
required
:
true
,
message
:
"请输入奖品类型"
,
trigger
:
"change"
}
],
award_rate
:
[
{
required
:
true
,
message
:
"请输入中奖概率"
,
trigger
:
"blur"
}
],
template_code
:
[
{
required
:
true
,
message
:
"请输入模板编号"
,
trigger
:
"blur"
}
]
...
...
@@ -284,6 +305,9 @@ export default {
});
},
submit
()
{
this
.
formValidate
.
type
=
this
.
tab
===
"3"
?
1
:
2
;
this
.
formValidate
.
uuid
=
sessionStorage
.
getItem
(
'admin_uuid'
)
this
.
formValidate
.
award_rate
=
Number
(
this
.
formValidate
.
award_rate
)
if
(
this
.
add
)
{
addConfigAward
(
this
.
formValidate
).
then
(
res
=>
{
console
.
log
(
res
);
...
...
src/view/login/login.vue
View file @
c7eb0ff6
...
...
@@ -36,6 +36,7 @@ export default {
console
.
log
(
data
);
if
(
data
.
token
&&
data
.
token
.
access_token
)
{
sessionStorage
.
setItem
(
"token"
,
data
.
token
.
access_token
);
sessionStorage
.
setItem
(
'admin_uuid'
,
data
.
token
.
admin_uuid
)
sessionStorage
.
setItem
(
"username"
,
data
.
user_info
.
name
);
this
.
$Message
.
success
(
"登录成功"
);
this
.
$router
.
push
({
...
...
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