Commit 700d4985 authored by 华国豪's avatar 华国豪 🙄

1

parent d4f4fa6f
...@@ -50,6 +50,15 @@ ...@@ -50,6 +50,15 @@
background-color: #ee4454; background-color: #ee4454;
border-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> </style>
<template> <template>
...@@ -89,10 +98,18 @@ ...@@ -89,10 +98,18 @@
<td>{{item.BranchName}}</td> <td>{{item.BranchName}}</td>
<td>{{item.StartDate.replace('T', ' ')}} - {{item.EndDate.replace('T', ' ')}}</td> <td>{{item.StartDate.replace('T', ' ')}} - {{item.EndDate.replace('T', ' ')}}</td>
<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 <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
:content="$t('active.ld_editInfo')" content="修改"
placement="top" placement="top"
> >
<el-button <el-button
...@@ -153,7 +170,7 @@ ...@@ -153,7 +170,7 @@
</el-form-item> </el-form-item>
</template> </template>
<el-form-item label="" > <el-form-item label="" >
<span @click="addList()">增加</span> <span class="btn-bg-b" @click="addList()">+增加</span>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -165,10 +182,15 @@ ...@@ -165,10 +182,15 @@
<button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> <button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
<Voting v-show="VotingShow" :NowVoteData="NowVoteData" :NowVoteType="NowVoteType"></Voting>
</div> </div>
</template> </template>
<script> <script>
import Voting from "./model/Voting";
export default { export default {
components: {
Voting
},
data() { data() {
return { return {
//请求 //请求
...@@ -221,18 +243,41 @@ export default { ...@@ -221,18 +243,41 @@ export default {
pickerOptions0: { pickerOptions0: {
}, },
NowVoteData: {},
VotingShow: false,
NowVoteType: 2,
}; };
}, },
mounted() { mounted() {
let userInfo=this.getLocalStorage(); let userInfo=this.getLocalStorage()
this.companyMsg.RB_Group_Id=userInfo.RB_Group_id;//集团 this.companyMsg.RB_Group_Id=userInfo.RB_Group_id //集团
this.getList(); this.getList()
this.getTypeList(); this.getTypeList()
this.getCompany() this.getCompany()
let that = this
this.MsgBus.$on('closeVotingBox', function () {
that.VotingShow = false
});
}, },
filters: {}, filters: {},
methods: { 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(){ //公司 getCompany(){ //公司
this.apipost('admin_get_BranchGetList', this.companyMsg, res => { this.apipost('admin_get_BranchGetList', this.companyMsg, res => {
this.companyList = res.data.data; this.companyList = res.data.data;
......
...@@ -6,11 +6,15 @@ ...@@ -6,11 +6,15 @@
</div> </div>
<div class="list"> <div class="list">
<div class="item" :class="{'active': radio === item.ID}" v-for="(item, index) in NowVoteData.VoteOptionsList"> <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> </div>
<div class="btn" @click="TP()"> <div class="btn" @click="TP()">
<div>确认提交</div> <div>{{NowVoteType == 1 ? '确认提交' : '我知道了'}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -23,6 +27,10 @@ export default { ...@@ -23,6 +27,10 @@ export default {
NowVoteData: { NowVoteData: {
type: Object, type: Object,
default: {} default: {}
},
NowVoteType: {
type: Number,
default: 1
} }
}, },
data () { data () {
...@@ -37,6 +45,10 @@ export default { ...@@ -37,6 +45,10 @@ export default {
methods: { methods: {
TP: function () { TP: function () {
let data = this.NowVoteData let data = this.NowVoteData
if (this.NowVoteType===2) {
this.MsgBus.$emit('closeVotingBox');
return
}
data.VoteOptionsList.map(x=>{ data.VoteOptionsList.map(x=>{
if (x.ID === this.radio) { if (x.ID === this.radio) {
x.IsCheck = 1 x.IsCheck = 1
...@@ -102,6 +114,16 @@ export default { ...@@ -102,6 +114,16 @@ export default {
.Voting .el-radio__input.is-checked+.el-radio__label{ .Voting .el-radio__input.is-checked+.el-radio__label{
color: white; 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{ .Voting .btn{
position:relative; position:relative;
bottom: -20px; bottom: -20px;
......
...@@ -1124,9 +1124,19 @@ ...@@ -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> <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>
</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> </div>
<!-- 投票 --> <!-- 投票 -->
<Voting v-show="VotingShow" :NowVoteData="NowVoteData"></Voting> <Voting v-show="VotingShow" :NowVoteData="NowVoteData" :NowVoteType="NowVoteType"></Voting>
</div> </div>
</template> </template>
...@@ -1381,7 +1391,9 @@ export default { ...@@ -1381,7 +1391,9 @@ export default {
] ]
}, },
VotingShow: false, VotingShow: false,
NowVoteData: {} NowVoteData: {},
NowVoteType: 1,
seeVotingBox: false,
}; };
}, },
filters: { filters: {
...@@ -1611,12 +1623,16 @@ export default { ...@@ -1611,12 +1623,16 @@ export default {
this.apipost('user_post_GetNowVote', {}, r=>{ this.apipost('user_post_GetNowVote', {}, r=>{
if (r.data.resultCode === 1){ if (r.data.resultCode === 1){
this.NowVoteData = r.data.data this.NowVoteData = r.data.data
if (r.data.data.EmployeeId === 0){
this.VotingShow = true this.VotingShow = true
} else {
this.seeVotingBox = true;
this.NowVoteType = 2
}
} }
}, null) }, null)
this.MsgBus.$on('closeVotingBox', function () { this.MsgBus.$on('closeVotingBox', function () {
that.VotingShow = false that.VotingShow = false
that.NowVoteData = {}
}); });
this.MsgBus.$on('doudong',function(){ this.MsgBus.$on('doudong',function(){
that.dou() that.dou()
...@@ -4819,4 +4835,37 @@ export default { ...@@ -4819,4 +4835,37 @@ export default {
color:#fff; color:#fff;
line-height: 15px; 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> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment