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
700d4985
Commit
700d4985
authored
Jan 02, 2020
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d4f4fa6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
12 deletions
+128
-12
VotingManagement.vue
src/components/administrative/VotingManagement.vue
+51
-6
Voting.vue
src/components/administrative/model/Voting.vue
+24
-2
index.vue
src/components/index.vue
+53
-4
No files found.
src/components/administrative/VotingManagement.vue
View file @
700d4985
...
...
@@ -50,6 +50,15 @@
background-color
:
#ee4454
;
border-color
:
#ee4454
;
}
.VotingManagement
.btn-bg-b
{
background-color
:
#409EFF
;
color
:
white
;
padding
:
.4rem
.6rem
;
background-color
:
#409EFF
;
color
:
white
;
padding
:
.4rem
.6rem
;
cursor
:
pointer
;
}
</
style
>
<
template
>
...
...
@@ -89,10 +98,18 @@
<td>
{{
item
.
BranchName
}}
</td>
<td>
{{
item
.
StartDate
.
replace
(
'T'
,
' '
)
}}
-
{{
item
.
EndDate
.
replace
(
'T'
,
' '
)
}}
</td>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('fnc.chakan')"
placement=
"top"
>
<el-button
type=
"success"
icon=
"iconfont icon-sousuo"
circle
@
click=
"getDetails(item.ID)"
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('active.ld_editInfo')
"
content=
"修改
"
placement=
"top"
>
<el-button
...
...
@@ -153,7 +170,7 @@
</el-form-item>
</
template
>
<el-form-item
label=
""
>
<span
@
click=
"addList()"
>
增加
</span>
<span
class=
"btn-bg-b"
@
click=
"addList()"
>
+
增加
</span>
</el-form-item>
</div>
</el-form>
...
...
@@ -165,10 +182,15 @@
<button
class=
"normalBtn"
@
click=
"submitForm('addMsg')"
>
{{$t('pub.saveBtn')}}
</button>
</div>
</el-dialog>
<Voting
v-show=
"VotingShow"
:NowVoteData=
"NowVoteData"
:NowVoteType=
"NowVoteType"
></Voting>
</div>
</template>
<
script
>
import
Voting
from
"./model/Voting"
;
export
default
{
components
:
{
Voting
},
data
()
{
return
{
//请求
...
...
@@ -221,18 +243,41 @@ export default {
pickerOptions0
:
{
},
NowVoteData
:
{},
VotingShow
:
false
,
NowVoteType
:
2
,
};
},
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
()
;
this
.
companyMsg
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
//集团
this
.
getList
()
;
this
.
getTypeList
()
;
let
userInfo
=
this
.
getLocalStorage
()
this
.
companyMsg
.
RB_Group_Id
=
userInfo
.
RB_Group_id
//集团
this
.
getList
()
this
.
getTypeList
()
this
.
getCompany
()
let
that
=
this
this
.
MsgBus
.
$on
(
'closeVotingBox'
,
function
()
{
that
.
VotingShow
=
false
});
},
filters
:
{},
methods
:
{
getDetails
(
ID
)
{
this
.
apipost
(
"user_post_GetVote"
,
{
VoteID
:
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
this
.
NowVoteData
=
data
this
.
VotingShow
=
true
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
getCompany
(){
//公司
this
.
apipost
(
'admin_get_BranchGetList'
,
this
.
companyMsg
,
res
=>
{
this
.
companyList
=
res
.
data
.
data
;
...
...
src/components/administrative/model/Voting.vue
View file @
700d4985
...
...
@@ -6,11 +6,15 @@
</div>
<div
class=
"list"
>
<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>
<el-radio
v-if=
"NowVoteType == 1"
text-color=
"#ffffff"
fill=
"#ffffff"
v-model=
"radio"
:label=
"item.ID"
>
{{
item
.
OptionsName
}}
</el-radio>
<div
v-else
class=
"details"
>
<div>
{{
item
.
OptionsName
}}
</div>
<div><span
class=
"piao"
>
{{
item
.
VoteNum
}}
</span>
票
</div>
</div>
</div>
</div>
<div
class=
"btn"
@
click=
"TP()"
>
<div>
确认提交
</div>
<div>
{{
NowVoteType
==
1
?
'确认提交'
:
'我知道了'
}}
</div>
</div>
</div>
</div>
...
...
@@ -23,6 +27,10 @@ export default {
NowVoteData
:
{
type
:
Object
,
default
:
{}
},
NowVoteType
:
{
type
:
Number
,
default
:
1
}
},
data
()
{
...
...
@@ -37,6 +45,10 @@ export default {
methods
:
{
TP
:
function
()
{
let
data
=
this
.
NowVoteData
if
(
this
.
NowVoteType
===
2
)
{
this
.
MsgBus
.
$emit
(
'closeVotingBox'
);
return
}
data
.
VoteOptionsList
.
map
(
x
=>
{
if
(
x
.
ID
===
this
.
radio
)
{
x
.
IsCheck
=
1
...
...
@@ -102,6 +114,16 @@ export default {
.Voting
.el-radio__input.is-checked
+
.el-radio__label
{
color
:
white
;
}
.Voting
div
.Voting-box
.list
.item
.details
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Voting
div
.Voting-box
.list
.piao
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#E95252
;
}
.Voting
.btn
{
position
:
relative
;
bottom
:
-20px
;
...
...
src/components/index.vue
View file @
700d4985
...
...
@@ -1124,9 +1124,19 @@
<a
@
click=
"CloseTs"
target=
"_blank"
href=
"http://we.oytour.com:8110/?/article/25"
style=
"font-size:18px;color:#E95252;cursor:pointer;text-decoration:underline"
>
点击查看
</a>
</div>
</div>
</div>
<!-- 投票查看按钮 -->
<div
class=
"chakanbox"
v-if=
"seeVotingBox"
>
<div
class=
"chakanbox_s"
>
<img
src=
"http://imgfile.oytour.com/New/Upload/Cloud/2020-01/20200102101633702.png"
>
</div>
<div
class=
"chakanbox_b"
@
click=
"VotingShow =true"
>
<img
src=
"http://imgfile.oytour.com/New/Upload/Cloud/2020-01/20200102101633702.png"
>
投票记录
</div>
</div>
<!-- 投票 -->
<Voting
v-show=
"VotingShow"
:NowVoteData=
"NowVoteData"
></Voting>
<Voting
v-show=
"VotingShow"
:NowVoteData=
"NowVoteData"
:NowVoteType=
"NowVoteType"
></Voting>
</div>
</template>
...
...
@@ -1381,7 +1391,9 @@ export default {
]
},
VotingShow
:
false
,
NowVoteData
:
{}
NowVoteData
:
{},
NowVoteType
:
1
,
seeVotingBox
:
false
,
};
},
filters
:
{
...
...
@@ -1611,12 +1623,16 @@ export default {
this
.
apipost
(
'user_post_GetNowVote'
,
{},
r
=>
{
if
(
r
.
data
.
resultCode
===
1
){
this
.
NowVoteData
=
r
.
data
.
data
this
.
VotingShow
=
true
if
(
r
.
data
.
data
.
EmployeeId
===
0
){
this
.
VotingShow
=
true
}
else
{
this
.
seeVotingBox
=
true
;
this
.
NowVoteType
=
2
}
}
},
null
)
this
.
MsgBus
.
$on
(
'closeVotingBox'
,
function
()
{
that
.
VotingShow
=
false
that
.
NowVoteData
=
{}
});
this
.
MsgBus
.
$on
(
'doudong'
,
function
(){
that
.
dou
()
...
...
@@ -4819,4 +4835,37 @@ export default {
color:#fff;
line-height: 15px;
}
.chakanbox{
position: fixed;
right: 0;
top: 50%;
}
.chakanbox div{
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
}
.chakanbox .chakanbox_s{
width: 50px;
height: 50px;
background:rgba(233,82,82,1);
border-radius:50%;
opacity: .4;
}
.chakanbox .chakanbox_b{
width:125px;
height:50px;
background:rgba(233,82,82,1);
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
display: none;
cursor: pointer;
}
.chakanbox:hover .chakanbox_s{
display: none;
}
.chakanbox:hover .chakanbox_b{
display: flex;
}
</
style
>
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