首页评分限制

main
wanglei 2 months ago
parent 843be67343
commit 4b5242755d

@ -32,6 +32,7 @@
<script>
import { listByConditons } from "@/api/kaohe/vote"
import { listVote_recard } from "@/api/kaohe/vote_recard"
export default {
name: "Index",
@ -67,7 +68,25 @@ export default {
})
},
goVotepage(row){
if(this.$store.state.user.roles.indexOf('admin')>0 || this.$store.state.user.roles.indexOf('sysAdmin')>0){
this.$router.push({ path: '/votepage', query: { id: row.id }});
}else {
listVote_recard({
pageNum: 1,
pageSize: 1000000000,
voteId: row.id,
userId: this.$store.state.user.id,
}).then(response => {
if(response.total>0){
this.$alert(`已经评分完成,不能再次评分!`, `提示`, {
type: 'Danger'
})
}else {
this.$router.push({ path: '/votepage', query: { id: row.id }});
}
})
}
},
}
}

@ -62,7 +62,7 @@
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="考核项" align="center" key="itemNames" prop="itemNames" v-if="columns[4].visible" :show-overflow-tooltip="true" />
<el-table-column label="考核项" align="center" key="itemNames" prop="itemNames" v-if="columns[4].visible" :show-overflow-tooltip="true" min-width="200"/>
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[5].visible" width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[6].visible">
<template slot-scope="scope">

Loading…
Cancel
Save