15179599649
2024-01-10 38689d912f3f483f63e794ec56edbccd0cdb0cb9
'查缺补漏'
6 files modified
1 files added
408 ■■■■■ changed files
src/api/hfiveget/index.js 14 ●●●● patch | view | raw | blame | history
src/router/page/index.js 7 ●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 10 ●●●●● patch | view | raw | blame | history
src/views/message/index.vue 25 ●●●●● patch | view | raw | blame | history
src/views/toAppraising/index.vue 55 ●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingfirst.vue 38 ●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingthree.vue 259 ●●●●● patch | view | raw | blame | history
src/api/hfiveget/index.js
@@ -125,6 +125,17 @@
        },
    });
};
// 获取候选人列表数据
export const eCategoryCandidate = (params) => {
    return request({
        url: '/api/evaluate/evaluateTaskCategoryCandidate/listByCategoryId',
        method: "get",
        apiKey: true,
        params: {
            ...params,
        },
    });
};
// 投票推荐人,第一轮
export const saveBatch = (data) => {
@@ -135,7 +146,7 @@
        data
    });
};
//投票部门,第一轮
//第二轮投票,部门/最终投票
export const saveBatchCandidateResult = (data) => {
    return request({
        url: '/api/evaluate/evaluateCandidateResult/saveBatch',
@@ -144,7 +155,6 @@
        data
    });
};
// 获取用户所在部门的所有成员信息
export const userDeptinfo = (params) => {
    return request({
src/router/page/index.js
@@ -66,7 +66,12 @@
  {
    path: '/toAppraisingtwo',
    component: () => import("../../views/toAppraising/toAppraisingtwo.vue"),
  }
  },
  {
    path: '/toAppraisingthree',
    component: () => import("../../views/toAppraising/toAppraisingthree.vue"),
  },
];
const router = new VueRouter({
src/views/Appraising/index.vue
@@ -14,7 +14,7 @@
      </p>
      <p class="Tasktime">
        <span>截止日期:</span>
        <span>{{item.candidateCutoffTimeEnd}}</span>
        <span>{{item.type==1?item.evaluateCutoffTimeEnd:item.candidateCutoffTimeEnd}}</span>
      </p>
      <van-button @click="toAppraising(item)" v-show="item.isVote==false">去评优</van-button>
      <p class="details" @click="toAppraising(item)" v-show="item.isVote==true">查看详情</p>
@@ -69,6 +69,9 @@
          });
          taskListByPolling().then(res_two => {
            res_two.data.data.records.forEach(item_two => {
              if (item_two.type == 0) {
                item_two.type = 2;
              }
              this.ViewData.push(item_two);
            });
            this.ViewData = this.ViewData.sort((a, b) => a.isVote - b.isVote);
@@ -91,6 +94,11 @@
          path: "/toAppraisingtwo",
          query: { info: JSON.stringify(item) }
        });
      } else if (item.type == 2) {
        this.$router.push({
          path: "/toAppraisingthree",
          query: { info: JSON.stringify(item) }
        });
      } else {
        this.$router.push({
          path: "/toAppraisingfirst",
src/views/message/index.vue
@@ -163,17 +163,20 @@
          toData.userDept = localStorage.getItem("dept_name");
          toData.userPost = localStorage.getItem("post_name");
        }
        if (this.messageData[index].children == undefined) {
          this.messageData[index].children = [];
          this.messageData[index].children.push(toData);
        }
        console.log(this.messageData);
        // leaveWords(toData).then(res => {
        //   if (res.data.code == 200) {
        //     this.$toast.success("评论成功");
        //     this.getmessagelist();
        //   }
        // });
        leaveWords(toData).then(res => {
          if (res.data.code == 200) {
            this.$toast.success("评论成功");
            let linshiData = [];
            this.messageData[index].children =
              this.messageData[index].children || [];
            linshiData = this.messageData[index];
            toData.imageUrls = item.imageDatatoup || [];
            linshiData.children.push(toData);
            this.$set(this.messageData, index, linshiData);
            this.messageData[index].inputValue = "";
            this.messageData[index].imageDatatoup = [];
          }
        });
      }
    },
    // 删除图片
src/views/toAppraising/index.vue
@@ -27,11 +27,11 @@
          {{
          this.poepleinfo.type == 0
          ? this.poepleinfo.candidateCutoffTimeEnd
          : this.poepleinfo.evaluateCutoffTime
          : this.poepleinfo.evaluateCutoffTimeEnd
          }}
        </span>
      </p>
      <div v-if=" this.poepleinfo.type== 0">
      <div v-if="this.poepleinfo.type== 0||this.poepleinfo.type==2">
        <div class="toin">
          <van-field
            v-model="currentValue"
@@ -85,7 +85,8 @@
import {
  deptlistAll,
  evaluateResult,
  userDeptinfo
  userDeptinfo,
  eCategoryCandidate
} from "@/api/hfiveget/index.js";
import store from "../../store/index";
export default {
@@ -114,12 +115,22 @@
      localStorage.getItem("tokensave") != null &&
      localStorage.getItem("tokensave") != "111"
    ) {
      userDeptinfo(Data).then(res => {
        this.columns = [...res.data.data.records];
        this.columns.forEach(item => {
          item["text"] = item.name;
      if (this.poepleinfo.type == 0) {
        userDeptinfo(Data).then(res => {
          this.columns = [...res.data.data.records];
          this.columns.forEach(item => {
            item["text"] = item.name;
          });
        });
      });
      } else if (this.poepleinfo.type == 2) {
        let Data = { evaluateTaskCategoryId: this.poepleinfo.saveBatch.id };
        eCategoryCandidate(Data).then(res => {
          this.columns = [...res.data.data];
          this.columns.forEach(item => {
            item["text"] = item.deptName + "-" + item.userName;
          });
        });
      }
    }
  },
  created() {},
@@ -127,14 +138,26 @@
    onConfirm(select) {
      this.currentValue = select.text;
      this.showPicker = false;
      this.submitdata = {
        evaluateTaskId: this.poepleinfo.id,
        userId: select.id,
        userName: select.name,
        deptId: select.deptId,
        deptName: select.deptName,
        postName: select.postName
      };
      if (this.poepleinfo.type == 0) {
        this.submitdata = {
          evaluateTaskId: this.poepleinfo.id,
          userId: select.id,
          userName: select.name,
          deptId: select.deptId,
          deptName: select.deptName,
          postName: select.postName
        };
      } else {
        this.submitdata = {
          evaluateTaskId: this.poepleinfo.id,
          evaluateTaskCategoryId: this.poepleinfo.saveBatch.id,
          userId: select.id,
          userName: select.userName,
          deptId: select.deptId,
          deptName: select.deptName,
          postName: select.postName
        };
      }
      this.poepleinfo.jsonArr.forEach(element => {
        if (element.userId == select.id) {
          this.$toast.fail("该人员已推荐");
src/views/toAppraising/toAppraisingfirst.vue
@@ -11,11 +11,19 @@
        <span>评优级别:</span>
        <span>{{this.poepleinfo.type == 0 ? "部门级评优" :this.poepleinfo.type == 1 ? "部门评优" :this.poepleinfo.type == 2 ? "公司评优" : ""}}</span>
      </p>
      <p class="info">
        <span>截止日期:</span>
        <span>{{this.poepleinfo.type==0?this.poepleinfo.candidateCutoffTimeEnd:this.poepleinfo.evaluateCutoffTime}}</span>
      <p class="info" v-if="this.poepleinfo.type==2">
        <span>评选类别:</span>
        <span>{{this.poepleinfo.saveBatch.categoryName}}</span>
      </p>
      <p class="info" v-if="this.poepleinfo.type==2">
        <span>认定标准:</span>
        <span>{{this.poepleinfo.saveBatch.standard}}</span>
      </p>
      <p class="info">
        <span>截止日期:</span>
        <span>{{this.poepleinfo.candidateCutoffTimeEnd}}</span>
      </p>
      <p class="info" v-show="this.poepleinfo.type==0">
        <span>说明:</span>
        <table  border="1" align="center" bordercolor="gray">
            <thead>
@@ -35,7 +43,7 @@
        </table>
      </p>
      <p class="info">
        <span class="tuijian">推荐人员:<van-button type="primary" block @click="Gotovote()" v-show="this.poepleinfo.isVote==false">添加推荐人员</van-button></span>
        <span class="tuijian">推荐人员:<van-button type="primary" block @click="Gotovote()" v-show="this.poepleinfo.isVote==false" :disabled="notadd">添加推荐人员</van-button></span>
        <table  border="1" align="center" bordercolor="gray" class="tuijiaantable">
            <thead>
              <tr>
@@ -71,7 +79,7 @@
          
<script>
import { Picker } from "vant";
import { deptlistAll, evaluateResult,saveBatch,evaluateTaskCategory } from "@/api/hfiveget/index.js";
import { deptlistAll, evaluateResult,saveBatch,evaluateTaskCategory,saveBatchCandidateResult } from "@/api/hfiveget/index.js";
import store from "../../store/index";
export default {
  data() {
@@ -79,7 +87,8 @@
      disabledsubmit: false,
      infoData:JSON.parse(this.$route.query.info),
      deptname: localStorage.getItem("dept_name"),
      Categorylist:[]
      Categorylist:[],
      notadd:false
    };
  },
  computed:{
@@ -93,6 +102,9 @@
  },
  mounted() {
    localStorage.setItem("Appraising", "Appraising");
    if(this.infoData.type==2&&this.infoData.saveBatch.peopleNum-this.infoData.saveBatch.num==this.infoData.jsonArr.length){
      this.notadd=true
    }
  },
  created() {
    let data={evaluateTaskId:this.infoData.id}
@@ -119,12 +131,24 @@
      }
      else{
        this.disabledsubmit = true;
        saveBatch(this.infoData.jsonArr).then(res => {
        if(this.infoData.type==0){
          saveBatch(this.infoData.jsonArr).then(res => {
          setTimeout(() => {
              this.$router.push("/Appraising");
            }, 1000);
            this.$toast.success("评分成功");
        });
        }
        else{
          saveBatchCandidateResult(this.infoData.jsonArr).then(res => {
           setTimeout(() => {
              this.$router.push({
                path: "/Appraising",
               });
              }, 1000);
              this.$toast.success("评分成功");
          });
        }
      }
    }
src/views/toAppraising/toAppraisingthree.vue
New file
@@ -0,0 +1,259 @@
<!--公司最终去评优-->
<template>
    <div class="toAppraising">
      <div class="Beingevaluated">
        <p class="title">{{this.poepleinfo.taskName}}</p>
        <p class="info">
          <span>所在部门:</span>
          <span>{{ this.deptname}}</span>
        </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.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.Categorylist" :key="index">
                  <td width="80px">{{item.categoryName}}</td>
                  <td>{{item.standard}}</td>
                  <td width="50px">{{item.peopleNum}}</td>
                  <td width="80px"><van-button  size="mini" @click="Gotovote(item,index)" :disabled="item.num==item.peopleNum">去投票</van-button></td>
                </tr>
              </tbody>
          </table>
        </p>
        <p class="info">
          <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.newshowData" :key="index">
                  <td width="80px">{{item.categoryName}}</td>
                  <td>{{item.userName}}</td>
                  <td>{{item.remark}}</td>
                </tr>
              </tbody>
          </table>
        </p>
      </div>
    </div>
</template>
<script>
import { Picker } from "vant";
import { deptlistAll, evaluateResult,saveBatch,evaluateTaskCategory } from "@/api/hfiveget/index.js";
import store from "../../store/index";
export default {
    data() {
      return {
        disabledsubmit: false,
        infoData:JSON.parse(this.$route.query.info),
        deptname: localStorage.getItem("dept_name"),
        Categorylist:[],
        newshowData:[]
      };
    },
    computed:{
      poepleinfo(){
        let Data=this.infoData
        if(Data.isVote==true){
          Data.jsonArr=Data.evaluateTaskReferrerVOS;
        }
        return Data
      }
    },
    mounted() {
      localStorage.setItem("Appraising", "Appraising");
      this.infoData.jsonArr=[];
    },
    created() {
      let data={evaluateTaskId:this.infoData.id}
      evaluateTaskCategory(data).then(res=>{
          this.Categorylist=res.data.data.records;
          this.Categorylist.forEach(item=>{
            this.infoData.evaluateCandidateResultVOS.forEach(item_in=>{
                if(item.id==item_in.evaluateTaskCategoryId){
                    item_in.categoryName=item.categoryName
                   this.newshowData.push(item_in)
                }
            })
          })
          this.Categorylist.forEach((ttitem,index)=>{
            ttitem.num=0;
            this.infoData.evaluateCandidateResultVOS.forEach(ttitem_in=>{
                if(ttitem.id==ttitem_in.evaluateTaskCategoryId){
                    this.Categorylist[index].num+=1
                }
            })
          })
      })
    },
    methods: {
    // 去投票
      Gotovote(item,index){
        this.poepleinfo.saveBatch=item;
        this.$router.push({
            path: "/toAppraisingfirst",
            query: { info: JSON.stringify(this.poepleinfo)}
        });
      },
      //提交
      SubmitTo(){
      }
    }
  };
</script>
<style scoped lang="scss">
  .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>