15179599649
2024-01-09 25d2039209ee2d1464a08281b8525332d5da334e
'完善部门评优模块'
6 files modified
141 ■■■■ changed files
src/api/hfiveget/index.js 30 ●●●● patch | view | raw | blame | history
src/router/axios.js 2 ●●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 17 ●●●● patch | view | raw | blame | history
src/views/message/index.vue 5 ●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingfirst.vue 32 ●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingtwo.vue 55 ●●●● patch | view | raw | blame | history
src/api/hfiveget/index.js
@@ -38,7 +38,6 @@
// 考核任务列表
export const assessmentTask = (params) => {
    return request({
        // url: "/api/assessment/assessmentTask/list",
        url: '/api/assessment/assessmentSetAssessor/listByAssessor',
        method: "get",
        apiKey: true,
@@ -103,7 +102,7 @@
        },
    });
};
// 第二轮评优
// 第二轮评优数据列表
export const taskListByPolling = (params) => {
    return request({
        url: '/api/evaluate/evaluateTask/taskListByPolling',
@@ -114,11 +113,32 @@
        },
    });
};
//
// 获取评优的类别数据
export const evaluateTaskCategory = (params) => {
    return request({
        url: '/api/evaluate/evaluateTaskCategory/h5list',
        method: "get",
        apiKey: true,
        params: {
            ...params,
        },
    });
};
// 新增推荐人
// 投票推荐人,第一轮
export const saveBatch = (data) => {
    return request({
        url: '/api/evaluate/evaluateTaskReferrer/saveBatch',
        method: "post",
        apiKey: true,
        data
    });
};
//投票部门,第一轮
export const saveBatchCandidateResult = (data) => {
    return request({
        url: '/api/evaluate/evaluateCandidateResult/saveBatch',
        method: "post",
        apiKey: true,
        data
@@ -128,8 +148,6 @@
// 获取用户所在部门的所有成员信息
export const userDeptinfo = (params) => {
    return request({
        // url: "/api/evaluate/evaluateTask/taskList/" + params.dept_id + "/" + params.user_id,
        // url: "/api/evaluate/evaluateCandidateAssessor/listByAssessor",
        url: '/api/evaluate/evaluateTask/userList',
        method: "get",
        apiKey: true,
@@ -142,7 +160,7 @@
// 获取所有部门
export const deptlistAll = (params) => {
    return request({
        url: "/api/blade-system/dept/listAll",
        url: "/api/blade-system/dept/lazy-list?parentId=1737282385453543425",
        method: "get",
        apiKey: true,
        params: {
src/router/axios.js
@@ -25,7 +25,6 @@
// 调用后台管理的
const service = axios.create({
  timeout: 600000, // request timeout
  headers: { "Content-Type": "application/json;charset=gbk" },
});
// 返回其他状态码
@@ -44,7 +43,6 @@
    store.commit('updateoverlayshow');
    if (config.apiKey) {
      config.headers["Authorization"] = "Basic c2FiZXI6c2FiZXJfc2VjcmV0";
      config.headers["Content-Type"] = "application/json;charset=gbk";
      if (getToken() != undefined) {
        config.headers["Blade-Auth"] = "bearer " + getToken();
      }
src/views/Appraising/index.vue
@@ -14,7 +14,7 @@
      </p>
      <p class="Tasktime">
        <span>截止日期:</span>
        <span>{{item.type==0?item.candidateCutoffTimeEnd:item.evaluateCutoffTime}}</span>
        <span>{{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>
@@ -28,7 +28,11 @@
</template>
          
<script>
import { evaluateTask, evaluateTasktop } from "@/api/hfiveget/index.js";
import {
  evaluateTask,
  evaluateTasktop,
  taskListByPolling
} from "@/api/hfiveget/index.js";
import store from "../../store/index";
export default {
  data() {
@@ -53,8 +57,6 @@
    evaluateTaskData() {
      let data = {
        candidateState: 1
        // userId: localStorage.getItem("tokensave")
        // dept_id: localStorage.getItem("dept_id")
      };
      if (
        localStorage.getItem("tokensave") != null &&
@@ -62,10 +64,15 @@
      ) {
        evaluateTask(data).then(res => {
          this.ViewData = res.data.data.records || [];
          this.ViewData = this.ViewData.sort((a, b) => a.isVote - b.isVote);
          this.ViewData.forEach(item => {
            item.jsonArr = [];
          });
          taskListByPolling().then(res_two => {
            res_two.data.data.records.forEach(item_two => {
              this.ViewData.push(item_two);
            });
            this.ViewData = this.ViewData.sort((a, b) => a.isVote - b.isVote);
          });
        });
      }
    },
src/views/message/index.vue
@@ -163,7 +163,10 @@
          toData.userDept = localStorage.getItem("dept_name");
          toData.userPost = localStorage.getItem("post_name");
        }
        item.children.push(toData);
        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) {
src/views/toAppraising/toAppraisingfirst.vue
@@ -26,15 +26,10 @@
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>优秀先锋</td>
                <td>优秀技术人员</td>
                <td>2</td>
              </tr>
              <tr>
                <td>优秀经理</td>
                <td>优秀部门领导</td>
                <td>1</td>
              <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>
              </tr>
            </tbody>
        </table>
@@ -51,9 +46,9 @@
            </thead>
            <tbody v-if="this.poepleinfo.isVote==false">
              <tr v-for="(item,index) of this.poepleinfo.jsonArr" :key="index">
                <td>{{item.userName}}</td>
                <td width="70px">{{item.userName}}</td>
                <td>{{item.remark}}</td>
                <td><van-button type="danger" size="mini" @click="deleteRecommend(index)">删除</van-button></td>
                <td  width="90px"><van-button type="danger" size="mini" @click="deleteRecommend(index)">删除</van-button></td>
              </tr>
              <tr v-show="this.poepleinfo.jsonArr.length==0">
                <td colspan="3">暂无数据</td>
@@ -61,7 +56,7 @@
            </tbody>
            <tbody v-if="this.poepleinfo.isVote==true">
              <tr v-for="(item,index) of this.poepleinfo.jsonArr" :key="index">
                <td>{{item.userName}}</td>
                <td width="70px">{{item.userName}}</td>
                <td>{{item.remark}}</td>
              </tr>
            </tbody>
@@ -76,14 +71,15 @@
          
<script>
import { Picker } from "vant";
import { deptlistAll, evaluateResult,saveBatch } from "@/api/hfiveget/index.js";
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")
      deptname: localStorage.getItem("dept_name"),
      Categorylist:[]
    };
  },
  computed:{
@@ -99,7 +95,10 @@
    localStorage.setItem("Appraising", "Appraising");
  },
  created() {
    let data={evaluateTaskId:this.infoData.id}
    evaluateTaskCategory(data).then(res=>{
        this.Categorylist=res.data.data.records
    })
  },
  methods: {
    //添加推荐人员
@@ -167,6 +166,9 @@
        text-align: center;
        tr{
            height: 50px;
            td{
              padding:5px
            }
        }
      }
      .tuijiaantable{
src/views/toAppraising/toAppraisingtwo.vue
@@ -1,11 +1,11 @@
<!--去评优-->
<!--部门级别去评优-->
<template>
  <div class="toAppraising">
    <div class="Beingevaluated">
      <p class="title">{{this.poepleinfo.taskName}}</p>
      <p class="info">
        <span>所在部门:</span>
        <span>{{ this.poepleinfo.dept_name}}</span>
        <span>{{ this.deptname}}</span>
      </p>
      <p class="info">
        <span>评优级别:</span>
@@ -13,20 +13,32 @@
      </p>
      <p class="info">
        <span>截止日期:</span>
        <span>{{this.poepleinfo.type==0?this.poepleinfo.candidateCutoffTime:this.poepleinfo.evaluateCutoffTime}}</span>
        <span>{{this.poepleinfo.candidateCutoffTimeEnd}}</span>
      </p>
      <p class="info">
      <p class="info" v-show="this.poepleinfo.isVote==false">
        <span>推荐部门:</span>
        <span>
          <van-checkbox-group v-model="checked" shape="square" direction="horizontal">
            <van-checkbox :name="item" v-for="item in deptData" :key="item" class="vantitle">
              <span>{{item}}</span>
              <span>{{item.fullName}}</span>
            </van-checkbox>
          </van-checkbox-group>
        </span>
      </p>
      <p class="info">
        <span>推荐部门:</span>
        <span
          v-for="item_resu in this.poepleinfo.evaluateCandidateResultVOS"
          :key="item_resu"
        >{{item_resu.deptName}},</span>
      </p>
      <div>
        <van-button type="primary" block @click="SubmitTo()">提交</van-button>
        <van-button
          type="primary"
          block
          @click="SubmitTo()"
          v-show="this.poepleinfo.isVote==false"
        >提交</van-button>
      </div>
    </div>
  </div>
@@ -34,14 +46,19 @@
            
<script>
import { Picker } from "vant";
import { deptlistAll, evaluateResult } from "@/api/hfiveget/index.js";
import {
  deptlistAll,
  evaluateResult,
  saveBatchCandidateResult
} from "@/api/hfiveget/index.js";
import store from "../../store/index";
export default {
  data() {
    return {
      checked: [],
      deptData: ["技术部", "人事部", "财务部", "总经办"],
      infoData: JSON.parse(this.$route.query.info)
      deptData: [],
      infoData: JSON.parse(this.$route.query.info),
      deptname: localStorage.getItem("dept_name")
    };
  },
  computed: {
@@ -52,12 +69,26 @@
  mounted() {
    localStorage.setItem("Appraising", "Appraising");
  },
  created() {},
  created() {
    deptlistAll().then(res => {
      this.deptData = res.data.data;
    });
  },
  methods: {
    //提交
    SubmitTo() {
      this.$router.push({
        path: "/Appraising"
      let submitData = [];
      this.checked.forEach(item => {
        submitData.push({
          evaluateTaskId: this.infoData.id,
          deptId: item.id,
          deptName: item.deptName
        });
      });
      saveBatchCandidateResult(submitData).then(res => {
        this.$router.push({
          path: "/Appraising"
        });
      });
    }
  }