| New file |
| | |
| | | <!--第一次部门级别评优--> |
| | | <template> |
| | | <div class="toAppraising"> |
| | | <div class="Beingevaluated"> |
| | | <p class="title">{{this.poepleinfo.taskName}}</p> |
| | | <p class="info"> |
| | | <span>评优级别:</span> |
| | | <span>{{this.poepleinfo.type == 0 ? "部门级评选" :this.poepleinfo.type == 1 ? "部门评选" :this.poepleinfo.type == 2 ? "公司评选" : ""}}</span> |
| | | </p> |
| | | <p class="info"> |
| | | <span>所在部门:</span> |
| | | <span>{{this.deptname}}</span> |
| | | </p> |
| | | <p class="info"> |
| | | <span>截止日期:</span> |
| | | <span>{{this.poepleinfo.candidateCutoffTimeEnd}}</span> |
| | | </p> |
| | | <p class="info"> |
| | | <span>类别说明:</span> |
| | | <table border="1" align="center" bordercolor="gray" class="tuijiaantable"> |
| | | <thead> |
| | | <tr> |
| | | <th>奖项</th> |
| | | <th>认定标准</th> |
| | | <!-- <th>名额</th> --> |
| | | <th >投票</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="(item,index) of this.Categorylistnew" :key="index"> |
| | | <td width="40px">{{item.categoryName}}</td> |
| | | <td width="100px" style="text-align:left">{{item.standard}}</td> |
| | | <!-- <td width="30px">{{item.peopleNum}}</td> --> |
| | | <td width="60px" v-show="isVote==false"><p v-for="(itemin,indexin) in item.Voters" class="toupiaoshow" :key="itemin"><img src="/images/state.png" v-show="itemin.state==true" ><img v-show="itemin.state==false" src="/images/notstate.png"><span @click="remarkto(index,indexin,itemin)">{{itemin.realName}}</span></p></td> |
| | | <td width="50px" v-show="isVote==true"><p v-for="itemin in item.Voters" class="toupiaoshow" :key="itemin"><span>{{itemin.realName}}</span></p></td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </p> |
| | | <p class="info" v-show="this.infoData.isVote==true"> |
| | | <span>推荐人员:</span> |
| | | <table border="1" align="center" bordercolor="gray" class="tuijiaantable"> |
| | | <thead> |
| | | <tr> |
| | | <th>奖项</th> |
| | | <th>姓名</th> |
| | | <th>评选理由</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="(item,index) in this.infoData.evaluateTaskReferrerVOS" :key="index"> |
| | | <td width="80px">{{item.categoryName}}</td> |
| | | <td>{{item.userName}}</td> |
| | | <td>{{item.remark==""?"----":item.remark}}</td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </p> |
| | | <van-button v-show="this.infoData.isVote==false" type="primary" block @click="SubmitTo()" :disabled="disabledsubmit">提交</van-button> |
| | | </div> |
| | | <van-dialog v-model="show" title="推荐理由" show-cancel-button :beforeClose="chargeBtn"> |
| | | <p class="tuiianpeople">推荐人:{{this.temporaryData.realName}}</p> |
| | | <van-field class="tuiianrematk" v-model="Recommendedreason" rows="3" size='20' autosize type="textarea" placeholder="可在此输入推荐理由"/> |
| | | </van-dialog> |
| | | <van-dialog v-model="cancelshow" title="是否要取消对该人员的投选" show-cancel-button :beforeClose="cancelchargeBtn"> |
| | | <p class="tuiianpeople">推荐人:{{this.canceltemporaryData.userName}}</p> |
| | | <p class="tuiianpeople">推荐理由:{{this.canceltemporaryData.remark==''?'无':this.canceltemporaryData.remark}}</p> |
| | | </van-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { Picker } from "vant"; |
| | | import { deptlistAll, evaluateResult,saveBatch,evaluateTaskCategory,eCategoryCandidate,saveBatchCandidateResult,userDeptinfo } from "@/api/hfiveget/index.js"; |
| | | import store from "../../store/index"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | Recommendedreason:'',//推荐理由 |
| | | show:false,//打开推荐理由对话框 |
| | | cancelshow:false, |
| | | disabledsubmit: false, |
| | | infoData:JSON.parse(this.$route.query.info), |
| | | deptname: localStorage.getItem("dept_name"), |
| | | Categorylist:[], |
| | | newshowData:[], |
| | | temporaryData:{}, |
| | | temporaryindex:0, |
| | | temporaryindexdad:0, |
| | | canceltemporaryData:{}, |
| | | isVote:JSON.parse(this.$route.query.info).isVote |
| | | }; |
| | | }, |
| | | computed:{ |
| | | poepleinfo(){ |
| | | let Data=this.infoData; |
| | | if(Data.isVote==true){ |
| | | Data.jsonArr=Data.evaluateTaskReferrerVOS; |
| | | } |
| | | return Data |
| | | }, |
| | | Categorylistnew(){ |
| | | return this.Categorylist |
| | | } |
| | | }, |
| | | mounted() { |
| | | localStorage.setItem("Appraising", "Appraising"); |
| | | this.infoData.jsonArr=[]; |
| | | this.isVote=this.infoData.isVote; |
| | | }, |
| | | created() { |
| | | let data={evaluateTaskId:this.infoData.id} |
| | | evaluateTaskCategory(data).then(res=>{ |
| | | this.Categorylist=res.data.data.records; |
| | | let Data = { deptId: localStorage.getItem("dept_id") }; |
| | | userDeptinfo(Data).then(res => { |
| | | this.Categorylist.forEach(item => { |
| | | item.Voters=res.data.data; |
| | | item.Voters.forEach(statein=>{ |
| | | statein.state=false |
| | | }) |
| | | }); |
| | | this.Categorylist=JSON.parse(JSON.stringify(this.Categorylist)); |
| | | this.Categorylist.forEach((item,index)=>{ |
| | | this.infoData.evaluateTaskReferrerVOS.forEach((itemin,indexini)=>{ |
| | | if(item.id==itemin.evaluateTaskCategoryId){ |
| | | this.infoData.evaluateTaskReferrerVOS[indexini].categoryName=item.categoryName |
| | | } |
| | | }) |
| | | this.infoData=JSON.parse(JSON.stringify(this.infoData)); |
| | | }) |
| | | }); |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 确认提交 |
| | | SubmitTo(){ |
| | | let submitData=[]; |
| | | this.Categorylist.forEach(item=>{ |
| | | item.Voters.forEach(itemin=>{ |
| | | if(itemin.state==true){ |
| | | submitData.push({ |
| | | evaluateTaskId:this.infoData.id,//评优任务id |
| | | evaluateTaskCategoryId:item.id,//评优类别id |
| | | userId:itemin.id,//候选人员id |
| | | userName:itemin.name,//候选人名称 |
| | | deptId:itemin.deptId,//候选人员部门id |
| | | deptName:itemin.deptName,//候选人员部门名称 |
| | | postName:itemin.postName,//候选人员职位名称 |
| | | remark:itemin.remark//推荐理由 |
| | | }) |
| | | } |
| | | }) |
| | | }); |
| | | saveBatch(submitData).then(res => { |
| | | setTimeout(() => { |
| | | this.$router.push({ |
| | | path: "/Appraising", |
| | | }); |
| | | }, 1000); |
| | | this.$toast.success("评分成功"); |
| | | }); |
| | | }, |
| | | // 取消对某人的投选 |
| | | cancelchargeBtn(action,done){ |
| | | if(action=='confirm'){ |
| | | this.Categorylist[this.temporaryindex].Voters[this.temporaryindexdad].state=false |
| | | } |
| | | this.show=false; |
| | | done(); |
| | | }, |
| | | // 输入理由关闭之前操作 |
| | | chargeBtn(action,done){ |
| | | if(action=='confirm'){ |
| | | this.Categorylist[this.temporaryindex].Voters[this.temporaryindexdad].userName= this.canceltemporaryData.realName; |
| | | this.Categorylist[this.temporaryindex].Voters[this.temporaryindexdad].remark=this.Recommendedreason; |
| | | this.Categorylist[this.temporaryindex].Voters[this.temporaryindexdad].state=true; |
| | | } |
| | | this.Recommendedreason=''; |
| | | this.show=false; |
| | | done(); |
| | | }, |
| | | // 弹出对话框输入评选理由 |
| | | remarkto(index,indexdad,itemin){ |
| | | let numnowtype=0; |
| | | this.Categorylist[index].Voters.forEach(item=>{ |
| | | if(item.state==true){ |
| | | numnowtype+=1 |
| | | } |
| | | }) |
| | | if(itemin.state==false){ |
| | | // 新增投票人选 |
| | | if(numnowtype==0){ |
| | | this.show=true; |
| | | this.temporaryData.realName=itemin.realName |
| | | } |
| | | else{ |
| | | this.$toast.success("每个奖项只能投选一票"); |
| | | } |
| | | }else{ |
| | | this.cancelshow=true; |
| | | this.canceltemporaryData.userName=this.Categorylist[index].Voters[indexdad].realName; |
| | | this.canceltemporaryData.remark=this.Categorylist[index].Voters[indexdad].remark |
| | | } |
| | | this.temporaryindex=index; |
| | | this.temporaryindexdad=indexdad; |
| | | |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | .van-dialog{ |
| | | :deep(.van-dialog__header){ |
| | | font-size: 20px ; |
| | | } |
| | | :deep(.van-field__body){ |
| | | font-size: 20px; |
| | | } |
| | | } |
| | | .tuiianpeople{ |
| | | font-size: 16px; |
| | | margin:10px 0px 0px 18px; |
| | | } |
| | | .toupiaoshow{ |
| | | display: flex; |
| | | align-items: center; |
| | | text-align: center; |
| | | // justify-content: center; |
| | | img{ |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | } |
| | | .toAppraising { |
| | | padding: 20px; |
| | | height: 100vh; |
| | | overflow: auto; |
| | | background: #f5f5f5; |
| | | .Beingevaluated { |
| | | background: white; |
| | | height: 100%; |
| | | padding: 20px; |
| | | overflow: auto; |
| | | height: 100%; |
| | | .title { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | line-height: 35px; |
| | | } |
| | | .info { |
| | | font-size: 16px; |
| | | line-height: 30px; |
| | | span:nth-child(1) { |
| | | color: #8894a8; |
| | | } |
| | | span:nth-child(2) { |
| | | color: #313d51; |
| | | } |
| | | table{ |
| | | width: 100%; |
| | | margin: 3px 0px 20px; |
| | | font-weight: none; |
| | | font-size: 16px; |
| | | color: #313d51; |
| | | border-collapse: collapse; |
| | | text-align: center; |
| | | tr{ |
| | | height: 50px; |
| | | td{ |
| | | padding:5px |
| | | } |
| | | } |
| | | } |
| | | .tuijiaantable{ |
| | | margin: 10px 0px 20px; |
| | | .van-button{ |
| | | height: 30px; |
| | | margin:0px; |
| | | width: 60px; |
| | | border: none; |
| | | .van-button__text{ |
| | | color: white; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | } |
| | | } |
| | | .tuijian{ |
| | | display: flex; |
| | | align-items: center; |
| | | .van-button{ |
| | | display: inline; |
| | | margin: 0; |
| | | padding: 0; |
| | | width: 110px; |
| | | background: green; |
| | | height: 32px; |
| | | font-size: 14px; |
| | | .van-button__text{ |
| | | color: white; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | .toin { |
| | | margin-top: 20px; |
| | | [class*="van-hairline"]::after { |
| | | border: none; |
| | | } |
| | | .van-field { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | padding: 10px 0px; |
| | | } |
| | | .Reasons { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | color: #646566; |
| | | margin-bottom: 10px; |
| | | } |
| | | .van-borderline { |
| | | border: 1px solid #dee1e7; |
| | | font-weight: 100; |
| | | border-radius: 8px; |
| | | padding: 5px; |
| | | } |
| | | } |
| | | .van-button { |
| | | margin: 30px 0px 0px auto; |
| | | width: 120px; |
| | | color: white; |
| | | font-size: 20px; |
| | | align-items: center; |
| | | text-align: center; |
| | | justify-content: center; |
| | | background: linear-gradient(163deg, #01bdfc 0%, #017bfc 100%); |
| | | border-radius: 8px; |
| | | } |
| | | .showdetails { |
| | | margin-top: 20px; |
| | | p { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .title { |
| | | font-size: 16px; |
| | | color: #8894a8; |
| | | } |
| | | .fraction { |
| | | font-size: 18px; |
| | | text-align: center; |
| | | line-height: 30px; |
| | | } |
| | | .instruct { |
| | | font-size: 18px; |
| | | text-align: center; |
| | | line-height: 30px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | |