Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
5ddcc077
Commit
5ddcc077
authored
Dec 31, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投票
parent
e576bd2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
29 deletions
+50
-29
Voting.vue
src/components/administrative/model/Voting.vue
+37
-28
index.vue
src/components/index.vue
+13
-1
No files found.
src/components/administrative/model/Voting.vue
View file @
5ddcc077
...
...
@@ -2,35 +2,14 @@
<div
class=
"Voting"
>
<div
class=
"Voting-box"
>
<div
class=
"tit"
>
<p>
占位占位投票(单选)
</p>
<p>
{{
NowVoteData
.
Title
}}
</p>
</div>
<div
class=
"list"
>
<div
class=
"item"
:class=
"
{'active': radio === '1'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"1"
>
这里是A选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '2'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"2"
>
这里是B选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '3'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"3"
>
这里是C选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '4'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"4"
>
这里是D选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '1'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"1"
>
这里是A选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '2'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"2"
>
这里是B选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '3'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"3"
>
这里是C选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
</div>
<div
class=
"item"
:class=
"
{'active': radio === '4'}">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
label=
"4"
>
这里是D选项的答案,如果你觉得投票该选这里,那就点击前面圆框
</el-radio>
<div
class=
"item"
:class=
"
{'active': radio === item.ID}" v-for="(item, index) in NowVoteData.VoteOptionsList">
<el-radio
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
:label=
"item.ID"
>
{{
item
.
OptionsName
}}
</el-radio>
</div>
</div>
<div
class=
"btn"
>
<div
class=
"btn"
@
click=
"TP()"
>
<div>
确认提交
</div>
</div>
</div>
...
...
@@ -40,15 +19,38 @@
<
script
>
export
default
{
name
:
'Voting'
,
props
:
{
NowVoteData
:
{
type
:
Object
,
default
:
{}
}
},
data
()
{
return
{
radio
:
1
radio
:
1
,
}
},
activated
()
{},
created
()
{},
mounted
()
{},
methods
:
{}
mounted
()
{
},
methods
:
{
TP
:
function
()
{
let
data
=
this
.
NowVoteData
data
.
VoteOptionsList
.
map
(
x
=>
{
if
(
x
.
ID
===
this
.
radio
)
{
x
.
IsCheck
=
1
}
else
{
x
.
IsCheck
=
0
}
})
this
.
apipost
(
'user_post_SetEmployeeVote'
,
data
,
r
=>
{
if
(
r
.
data
.
resultCode
===
1
)
{
this
.
MsgBus
.
$emit
(
'closeVotingBox'
);
}
},
null
)
}
}
}
</
script
>
...
...
@@ -62,6 +64,8 @@ export default {
background
:
rgba
(
0
,
0
,
0
,
0.19
);
position
:
absolute
;
z-index
:
2019129
;
left
:
0
;
top
:
0
;
}
.Voting
div
.Voting-box
{
width
:
800px
;
...
...
@@ -114,5 +118,10 @@ export default {
color
:
white
;
background
:
rgba
(
233
,
82
,
82
,
1
);
border-radius
:
5px
;
cursor
:
pointer
;
}
.Voting
.el-radio
{
width
:
100%
;
height
:
100%
;
}
</
style
>
src/components/index.vue
View file @
5ddcc077
...
...
@@ -1126,7 +1126,7 @@
</div>
</div>
<!-- 投票 -->
<Voting
v-show=
"
false
"
></Voting>
<Voting
v-show=
"
VotingShow"
:NowVoteData=
"NowVoteData
"
></Voting>
</div>
</template>
...
...
@@ -1380,6 +1380,8 @@ export default {
}
]
},
VotingShow
:
false
,
NowVoteData
:
{}
};
},
filters
:
{
...
...
@@ -1606,6 +1608,16 @@ export default {
},
mounted
()
{
let
that
=
this
;
this
.
apipost
(
'user_post_GetNowVote'
,
{},
r
=>
{
if
(
r
.
data
.
resultCode
===
1
){
this
.
NowVoteData
=
r
.
data
.
data
this
.
VotingShow
=
true
}
},
null
)
this
.
MsgBus
.
$on
(
'closeVotingBox'
,
function
()
{
that
.
VotingShow
=
false
that
.
NowVoteData
=
{}
});
this
.
MsgBus
.
$on
(
'doudong'
,
function
(){
that
.
dou
()
});
...
...
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