投票/评分页面修改

main
wanglei 6 months ago
parent 3641e79084
commit c6c5c7a697

@ -333,7 +333,7 @@
<span v-if="scope.row.vote">{{ scope.row.vote.remark }}</span> <span v-if="scope.row.vote">{{ scope.row.vote.remark }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -346,13 +346,13 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-thumb" icon="el-icon-thumb"
@click="setUpTouPiao(scope.row)" @click="goVotepage(scope.row)"
>去投票</el-button> >去投票 / 评分</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="tempCancel"> </el-button> <el-button @click="pcSetUp.open=false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -836,7 +836,6 @@ export default {
voteSubmitForm(){ voteSubmitForm(){
this.$refs["touPiaoForm"].validate(valid => { this.$refs["touPiaoForm"].validate(valid => {
if (valid) { if (valid) {
console.log(this.vote.form); console.log(this.vote.form);
if (this.vote.form.id != null) { if (this.vote.form.id != null) {
updateVote(this.vote.form).then(response => { updateVote(this.vote.form).then(response => {
@ -855,7 +854,10 @@ export default {
}) })
}, },
voteCancel(){ voteCancel(){
this.vote.open = false;
},
goVotepage(row){
this.$router.push({ path: '/votepage', query: { id: row.vote.id }});
} }
} }
} }

@ -32,7 +32,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
@ -41,7 +41,7 @@
@click="handleAdd" @click="handleAdd"
v-hasPermi="['kaohe:vote:add']" v-hasPermi="['kaohe:vote:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -123,7 +123,8 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-thumb" icon="el-icon-thumb"
>去投票</el-button> @click="goVotepage(scope.row)"
>去投票 / 评分</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -324,6 +325,9 @@ export default {
this.download('kaohe/vote/export', { this.download('kaohe/vote/export', {
...this.queryParams ...this.queryParams
}, `vote_${new Date().getTime()}.xlsx`) }, `vote_${new Date().getTime()}.xlsx`)
},
goVotepage(row){
this.$router.push({ path: '/votepage', query: { id: row.id }});
} }
} }
} }

@ -1,13 +1,126 @@
<template> <template>
<div>投票</div> <div class="app-container">
<div class="title">{{ vote.voteTitle }}</div>
<div class="time">投票时间{{ vote.sTime }} - {{ vote.eTime }}</div>
<div class="des">{{ vote.vDescription }}</div>
<div class="tou_piao" v-if="vote.typeId==='1'">
<div v-for="item in voteList" class="tou_piao_item">
<div class="tx"><i class="el-icon-user-solid"></i> </div>
<div class="emp_name">{{ item.empName }}</div>
<div class="num">{{ item.voteNum||11111110 }} <span style="color:#666666;"></span></div>
<div>
<el-button type="primary" icon="el-icon-thumb">投给TA一票</el-button>
</div>
</div>
</div>
<div class="tou_piao" v-if="vote.typeId==='2'">
<div v-for="item in voteList" class="tou_piao_item">
<div class="tx"><i class="el-icon-user-solid"></i> </div>
<div class="emp_name">{{ item.empName }}</div>
<div class="num">{{ item.voteNum||11111110 }} <span style="color:#666666;"></span></div>
<div>
<el-rate v-model="item.voteScore"></el-rate>
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
import { getVote } from "@/api/kaohe/vote"
import { listVote_emp } from "@/api/kaohe/vote_emp"
export default { export default {
name: "votepage" name: "votepage",
data() {
return {
value1: null,
loading:null,
vote:{
voteTitle: null,
vDescription: null,
sTime: null,
eTime: null,
maxNum: null,
typeId:null
},
voteList: []
}
},
created() {
this.getVote()
},
methods: {
getVote(){
this.loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
getVote(this.$route.query.id).then(response => {
this.vote = response.data;
this.getList()
})
},
/** 查询投票评测列表 */
getList() {
listVote_emp({
voteId: this.$route.query.id,
pageNum: 1,
pageSize: 10000000,
}).then(response => {
this.voteList = response.rows;
this.loading.close()
})
},
}
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.app-container{
width: 1200px;
margin: 0 auto;
.title{
font-size: 24px;
text-align: center;
margin-bottom: 50px;
}
.des{
padding: 10px;
color: #666666;
}
.time{
padding: 10px;
color: #bb1313;
}
.tou_piao{
display: flex;
flex-wrap: wrap;
.tou_piao_item{
margin: 10px;
border: 1px solid #eeeeee;
padding: 10px;
text-align: center;
width: 200px;
height: 200px;
display: flex;
flex-direction: column;
justify-content: space-around;
.tx{
font-size: 50px;
color: #999999;
}
.num{
color: #b40000;
}
}
}
}
</style> </style>

Loading…
Cancel
Save