Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GaiaXalter
Ygopro Arena Web
Commits
0546a130
Commit
0546a130
authored
Dec 10, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投票人数统计
parent
b841a375
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
src/components/PageHeader.vue
src/components/PageHeader.vue
+25
-2
src/components/Vote.vue
src/components/Vote.vue
+9
-0
src/components/lang.js
src/components/lang.js
+1
-1
No files found.
src/components/PageHeader.vue
View file @
0546a130
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
,
title
:
'
Hi,
'
+
_this
.
user
.
username
,
title
:
'
Hi,
'
+
_this
.
user
.
username
,
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,
id
:
'
layerDemo
'
,
id
:
'
layerDemo
'
,
time
:
5
000
,
time
:
10
000
,
content
:
'
<div style="padding: 20px ;">
'
+
'
感谢您的参与,环境会因为您而变得更好。此问卷为您奖励EXP+1!
'
+
'
</div>
'
,
content
:
'
<div style="padding: 20px ;">
'
+
'
感谢您的参与,环境会因为您而变得更好。此问卷为您奖励EXP+1!
'
+
'
</div>
'
,
btn
:
[
'
知道了
'
,
'
参与下一个投票
'
]
,
btn
:
[
'
知道了
'
,
'
参与下一个投票
'
]
...
@@ -272,11 +272,34 @@
...
@@ -272,11 +272,34 @@
//return false 开启该代码可禁止点击该按钮关闭
//return false 开启该代码可禁止点击该按钮关闭
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
}
else
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
}
else
{
}
},
(
res
)
=>
{
console
.
log
(
res
)
});
}
},
(
res
)
=>
{
console
.
log
(
res
)
});
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
...
...
src/components/Vote.vue
View file @
0546a130
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
</el-table-column>
</el-table-column>
<!--<el-table-column label="ID" prop="id"></el-table-column>-->
<!--<el-table-column label="ID" prop="id"></el-table-column>-->
<!--<el-table-column label="id" prop="id"></el-table-column>-->
<el-table-column
label=
"标题"
prop=
"title"
></el-table-column>
<el-table-column
label=
"标题"
prop=
"title"
></el-table-column>
<el-table-column
label=
"开始时间"
:formatter=
"formatter1"
></el-table-column>
<el-table-column
label=
"开始时间"
:formatter=
"formatter1"
></el-table-column>
...
@@ -127,6 +128,9 @@
...
@@ -127,6 +128,9 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"参与人数"
:formatter=
"formatter4"
></el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
scope=
"props"
>
<
template
scope=
"props"
>
<el-button
@
click=
"handleClick(props.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"handleClick(props.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
...
@@ -377,6 +381,9 @@
...
@@ -377,6 +381,9 @@
formatter3
(
row
,
column
)
{
formatter3
(
row
,
column
)
{
return
row
.
status
?
'
启用
'
:
'
禁用
'
return
row
.
status
?
'
启用
'
:
'
禁用
'
},
},
formatter4
(
row
,
column
)
{
return
row
.
count
},
renderTable
:
function
()
{
renderTable
:
function
()
{
var
params
=
{
var
params
=
{
type
:
this
.
type
,
type
:
this
.
type
,
...
@@ -393,8 +400,10 @@
...
@@ -393,8 +400,10 @@
var
history
=
{}
var
history
=
{}
history
.
total
=
res
.
data
.
total
history
.
total
=
res
.
data
.
total
var
optionCountMap
=
res
.
data
.
optionCountMap
var
optionCountMap
=
res
.
data
.
optionCountMap
var
voteCountMap
=
res
.
data
.
voteCountMap
history
.
data
=
res
.
data
.
data
.
map
(
function
(
row
)
{
history
.
data
=
res
.
data
.
data
.
map
(
function
(
row
)
{
row
.
options
=
JSON
.
parse
(
row
.
options
)
row
.
options
=
JSON
.
parse
(
row
.
options
)
row
.
count
=
voteCountMap
[
row
.
id
]
var
voteVount
=
0
var
voteVount
=
0
row
.
options
.
map
(
function
(
option
)
{
row
.
options
.
map
(
function
(
option
)
{
option
.
count
=
parseInt
(
optionCountMap
[
option
.
key
])
option
.
count
=
parseInt
(
optionCountMap
[
option
.
key
])
...
...
src/components/lang.js
View file @
0546a130
...
@@ -51,7 +51,7 @@ module.exports = {
...
@@ -51,7 +51,7 @@ module.exports = {
expRank
:
'
EXP排名
'
,
expRank
:
'
EXP排名
'
,
pointRank
:
'
竞技场排名
'
,
pointRank
:
'
竞技场排名
'
,
useRank
:
'
使用量排名
'
,
useRank
:
'
使用量排名
'
,
tableHead1
:
'
查看EXP排行榜,这里展示娱乐匹配的成绩,你是否也榜上有名呢?
'
,
tableHead1
:
'
EXP排行榜,EXP可以通过匹配以及参与调研获得。来看看谁是最资深的玩家吧!
'
,
tableHead2
:
'
查看竞技场排行榜,这里展示竞技匹配的成绩,你是否也榜上有名呢?
'
,
tableHead2
:
'
查看竞技场排行榜,这里展示竞技匹配的成绩,你是否也榜上有名呢?
'
,
tableHead3
:
'
查看卡片排行榜.
'
,
tableHead3
:
'
查看卡片排行榜.
'
,
},
},
...
...
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