15179599649
2024-01-15 04c909248a3dbf3e3bfb445a3fb3c1423251a549
'修改第二轮评优页面显示'
10 files modified
3 files added
355 ■■■■ changed files
public/images/notstate.png patch | view | raw | blame | history
public/images/sign.png patch | view | raw | blame | history
public/images/sign1.png patch | view | raw | blame | history
public/images/state.png patch | view | raw | blame | history
src/api/hfiveget/index.js 1 ●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 2 ●●● patch | view | raw | blame | history
src/views/login/index.vue 14 ●●●● patch | view | raw | blame | history
src/views/toAppraising/index.vue 101 ●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingfirst.vue 30 ●●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingthree.vue 189 ●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingtwo.vue 2 ●●● patch | view | raw | blame | history
src/views/toexamine/index.vue 12 ●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
public/images/notstate.png
public/images/sign.png

public/images/sign1.png
public/images/state.png
src/api/hfiveget/index.js
@@ -26,7 +26,6 @@
export const Loginto = (params) => {
    return request({
        url: "/api/blade-auth/oauth/token",
        // url: '/api/blade-auth/oauth/token?tenantId=000000&username=' + params + '&password=94e8cde4612b3fd390677d42e7b22002&grant_type=password&scope=all&type=account',
        method: "post",
        apiKey: true,
        params: {
src/views/Appraising/index.vue
@@ -10,7 +10,7 @@
      </p>
      <p class="Tasktime">
        <span>评优级别:</span>
        <span>{{item.type == 0 ? "部门级评优" :item.type == 1 ? "部门评优" :item.type == 2 ? "公司评优" : ""}}</span>
        <span>{{item.type == 0 ? "部门级评选" :item.type == 1 ? "部门评选" :item.type == 2 ? "公司评选" : ""}}</span>
      </p>
      <p class="Tasktime">
        <span>截止日期:</span>
src/views/login/index.vue
@@ -92,11 +92,19 @@
      const isValidcode = this.codecheck(this.Code);
      const isValiduser = this.usernamecheck(this.username);
      if (isValidcode && isValiduser) {
        // let Data = {
        //   tenantId: "000000",
        //   grant_type: "smsCode",
        //   phone: this.username,
        //   code: this.Code
        // }
        let Data = {
          tenantId: "000000",
          grant_type: "smsCode",
          phone: this.username,
          code: this.Code
          username: this.username,
          grant_type: "password",
          password: "94e8cde4612b3fd390677d42e7b22002",
          scope: "all",
          type: "account"
        };
        Loginto(Data).then(res => {
          if (res.data.code == 400) {
src/views/toAppraising/index.vue
@@ -12,11 +12,11 @@
        <span>
          {{
          this.poepleinfo.type == 0
          ? "部门级评优"
          ? "部门级评选"
          : this.poepleinfo.type == 1
          ? "部门评优"
          ? "部门评选"
          : this.poepleinfo.type == 2
          ? "公司评优"
          ? "公司评选"
          : ""
          }}
        </span>
@@ -33,6 +33,15 @@
      </p>
      <div v-if="this.poepleinfo.type== 0||this.poepleinfo.type==2">
        <div class="toin">
          <van-field
            v-model="currentValueAwards"
            is-link
            readonly
            label="推荐奖项"
            placeholder="请选择"
            @click="showPickerAwards = true"
            class="van-hairline"
          />
          <van-field
            v-model="currentValue"
            is-link
@@ -77,6 +86,15 @@
        v-model="currentValue"
      />
    </van-popup>
    <van-popup v-model="showPickerAwards" round position="bottom">
      <van-picker
        show-toolbar
        @cancel="showPickerAwards = false"
        @confirm="onConfirmAwards"
        :columns="columnsAwards"
        v-model="currentValue"
      />
    </van-popup>
  </div>
</template>
@@ -86,29 +104,42 @@
  deptlistAll,
  evaluateResult,
  userDeptinfo,
  eCategoryCandidate
  eCategoryCandidate,
  evaluateTaskCategory
} from "@/api/hfiveget/index.js";
import store from "../../store/index";
export default {
  data() {
    return {
      showPicker: false,
      showPickerAwards: false,
      deptName: "",
      pickerkey: "",
      currentValue: "", // 用于绑定选择结果的变量
      columnsAwards: [],
      currentValueAwards: "", //推荐奖项变量
      currentValue: "", // 推荐人员变量
      remark: "", //推荐理由
      columns: [], // 选择器的选项列表
      poepleinfo: {},
      toData: {},
      toshow: {},
      disabledsubmit: false,
      submitdata: {}
      submitdata: {},
      exitindex: null
    };
  },
  computed: {},
  mounted() {
    localStorage.setItem("Appraising", "Appraising");
    this.poepleinfo = JSON.parse(this.$route.query.info);
    this.exitindex = JSON.parse(this.$route.query.index);
    if (this.exitindex != null) {
      this.currentValueAwards = this.poepleinfo.jsonArr[
        this.exitindex
      ].evaluateTaskCategoryName;
      this.currentValue = this.poepleinfo.jsonArr[this.exitindex].userName;
      this.remark = this.poepleinfo.jsonArr[this.exitindex].remark;
    }
    this.deptName = localStorage.getItem("dept_name");
    let Data = { deptId: localStorage.getItem("dept_id") };
    if (
@@ -120,6 +151,13 @@
          this.columns = [...res.data.data.records];
          this.columns.forEach(item => {
            item["text"] = item.name;
          });
        });
        let data = { evaluateTaskId: this.poepleinfo.id };
        evaluateTaskCategory(data).then(res => {
          this.columnsAwards = [...res.data.data.records];
          this.columnsAwards.forEach(item => {
            item["text"] = item.categoryName;
          });
        });
      } else if (this.poepleinfo.type == 2) {
@@ -135,28 +173,31 @@
  },
  created() {},
  methods: {
    onConfirmAwards(select) {
      console.log(select);
      this.currentValueAwards = select.categoryName;
      this.submitdata.evaluateTaskCategoryName = this.currentValueAwards;
      this.submitdata.evaluateTaskCategoryId=select.id;
      this.showPickerAwards = false;
    },
    onConfirm(select) {
      this.currentValue = select.text;
      this.showPicker = false;
      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
        };
        (this.submitdata.evaluateTaskId = this.poepleinfo.id),
          (this.submitdata.userId = select.id),
          (this.submitdata.userName = select.name),
          (this.submitdata.deptId = select.deptId),
          (this.submitdata.deptName = select.deptName);
        this.submitdata.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.submitdata.evaluateTaskId = this.poepleinfo.id),
          (this.submitdata.evaluateTaskCategoryId = this.poepleinfo.saveBatch.id),
          (this.submitdata.userId = select.id),
          (this.submitdata.userName = select.userName),
          (this.submitdata.deptId = select.deptId),
          (this.submitdata.deptName = select.deptName);
        this.submitdata.postName = select.postName;
      }
      this.poepleinfo.jsonArr.forEach(element => {
        if (element.userId == select.id) {
@@ -175,8 +216,16 @@
        this.$toast.fail("请输入推荐理由");
      } else {
        this.disabledsubmit = true;
        this.submitdata.remark = this.remark;
        this.poepleinfo.jsonArr.push(this.submitdata);
        if (this.exitindex == null) {
          this.submitdata.remark = this.remark;
          this.poepleinfo.jsonArr.push(this.submitdata);
        } else {
          this.poepleinfo.jsonArr[
            this.exitindex
          ].evaluateTaskCategoryName = this.currentValueAwards;
          this.poepleinfo.jsonArr[this.exitindex].userName = this.currentValue;
          this.poepleinfo.jsonArr[this.exitindex].remark = this.remark;
        }
        setTimeout(() => {
          this.$router.push({
            path: "/toAppraisingfirst",
@@ -229,7 +278,7 @@
        font-size: 16px;
        font-weight: bold;
        color: #646566;
        margin-bottom: 10px;
        margin: 10px 0px;
      }
      .van-borderline {
        border: 1px solid #dee1e7;
src/views/toAppraising/toAppraisingfirst.vue
@@ -1,4 +1,4 @@
<!--去评优-->
<!--第一次去评优-->
<template>
  <div class="toAppraising">
    <div class="Beingevaluated">
@@ -9,7 +9,7 @@
      </p>
      <p class="info">
        <span>评优级别:</span>
        <span>{{this.poepleinfo.type == 0 ? "部门级评优" :this.poepleinfo.type == 1 ? "部门评优" :this.poepleinfo.type == 2 ? "公司评优" : ""}}</span>
        <span>{{this.poepleinfo.type == 0 ? "部门级评选" :this.poepleinfo.type == 1 ? "部门评选" :this.poepleinfo.type == 2 ? "公司评选" : ""}}</span>
      </p>
      <p class="info" v-if="this.poepleinfo.type==2">
        <span>评选类别:</span>
@@ -28,16 +28,16 @@
        <table  border="1" align="center" bordercolor="gray">
            <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 width="40px">{{item.categoryName}}</td>
                <td>{{item.standard}}</td>
                <td width="50px">{{item.peopleNum}}</td>
                <td width="30px">{{item.peopleNum}}</td>
              </tr>
            </tbody>
        </table>
@@ -48,23 +48,26 @@
            <thead>
              <tr>
                <th>姓名</th>
                <th>推荐奖项</th>
                <th>评选理由</th>
                <th v-if="this.poepleinfo.isVote==false">操作</th>
              </tr>
            </thead>
            <tbody v-if="this.poepleinfo.isVote==false">
              <tr v-for="(item,index) of this.poepleinfo.jsonArr" :key="index">
                <td width="70px">{{item.userName}}</td>
                <td width="45px">{{item.userName}}</td>
                <td  width="45px">{{item.evaluateTaskCategoryName}}</td>
                <td>{{item.remark}}</td>
                <td  width="90px"><van-button type="danger" size="mini" @click="deleteRecommend(index)">删除</van-button></td>
                <td  width="80px"><van-button type="danger" size="mini" @click="editRecommend(item,index)">修改</van-button><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>
                <td colspan="4">暂无数据</td>
              </tr>
            </tbody>
            <tbody v-if="this.poepleinfo.isVote==true">
              <tr v-for="(item,index) of this.poepleinfo.jsonArr" :key="index">
                <td width="70px">{{item.userName}}</td>
                <td>{{item.evaluateTaskCategoryName}}</td>
                <td>{{item.remark}}</td>
              </tr>
            </tbody>
@@ -93,7 +96,7 @@
  },
  computed:{
    poepleinfo(){
      let Data=this.infoData
      let Data=this.infoData;
      if(Data.isVote==true){
        Data.jsonArr=Data.evaluateTaskReferrerVOS;
      }
@@ -113,11 +116,18 @@
    })
  },
  methods: {
    // 编辑提交的数据
    editRecommend(item,index){
      this.$router.push({
        path: "/toAppraising",
        query: { info: JSON.stringify(this.poepleinfo),index:index}
      });
    },
    //添加推荐人员
    Gotovote() {
      this.$router.push({
        path: "/toAppraising",
        query: { info: JSON.stringify(this.poepleinfo) }
        query: { info: JSON.stringify(this.poepleinfo),index:null }
      });
    },
    //删除推荐人员
src/views/toAppraising/toAppraisingthree.vue
@@ -4,50 +4,47 @@
      <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>
          <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>
          <span>类别说明:</span>
          <table  border="1" align="center" bordercolor="gray" class="tuijiaantable">
              <thead>
                <tr>
                  <th>类别</th>
                  <th>奖项</th>
                  <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>
                  <td width="40px">{{item.categoryName}}</td>
                  <td width="100px">{{item.standard}}</td>
                  <td width="30px">{{item.peopleNum}}</td>
                  <td width="60px" v-show="isVote==false"><p v-for="itemin 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(itemin)">{{itemin.userName}}</span></p></td>
                  <td width="50px" v-show="isVote==true"><p v-for="itemin in item.Voters" class="toupiaoshow" :key="itemin"><span>{{itemin.userName}}</span></p></td>
                </tr>
              </tbody>
          </table>
        </p>
        <p class="info">
        <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>
                  <th>评选理由</th>
                </tr>
              </thead>
              <tbody>
                <tr  v-for="(item,index) in this.newshowData" :key="index">
                <tr  v-for="(item,index) in this.infoData.evaluateCandidateResultVOS" :key="index">
                  <td width="80px">{{item.categoryName}}</td>
                  <td>{{item.userName}}</td>
                  <td>{{item.remark}}</td>
@@ -55,22 +52,37 @@
              </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.userName}}</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}}</p>
       </van-dialog>
    </div>
</template>
            
<script>
import { Picker } from "vant";
import { deptlistAll, evaluateResult,saveBatch,evaluateTaskCategory } from "@/api/hfiveget/index.js";
import { deptlistAll, evaluateResult,saveBatch,evaluateTaskCategory,eCategoryCandidate,saveBatchCandidateResult } 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:[]
        newshowData:[],
        temporaryData:{},
        canceltemporaryData:{},
        isVote:JSON.parse(this.$route.query.info).isVote
      };
    },
    computed:{
@@ -80,11 +92,12 @@
          Data.jsonArr=Data.evaluateTaskReferrerVOS;
        }
        return Data
      }
      },
    },
    mounted() {
      localStorage.setItem("Appraising", "Appraising");
      this.infoData.jsonArr=[];
      this.isVote=this.infoData.isVote
    },
    created() {
      let data={evaluateTaskId:this.infoData.id}
@@ -106,25 +119,147 @@
                }
            })
          })
          this.Categorylist.forEach((rpeoinshow,index)=>{
            let linshiData=rpeoinshow;
            linshiData.Voters=[];
            eCategoryCandidate({ evaluateTaskCategoryId:rpeoinshow.id }).then(res => {
                res.data.data.forEach(state=>{
                  state.state=false,
                  state.remark=''
                })
                linshiData.Voters=res.data.data
                this.$set(this.Categorylist,index,linshiData)
            });
          })
      })
    },
    methods: {
    // 去投票
      Gotovote(item,index){
        this.poepleinfo.saveBatch=item;
        this.$router.push({
            path: "/toAppraisingfirst",
            query: { info: JSON.stringify(this.poepleinfo)}
      // 确认提交
      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.userName,//候选人名称
                deptId:itemin.deptId,//候选人员部门id
                deptName:itemin.deptName,//候选人员部门名称
                postName:itemin.postName,//候选人员职位名称
                remark:itemin.remark//推荐理由
              })
            }
          })
        });
        saveBatchCandidateResult(submitData).then(res => {
          setTimeout(() => {
            this.$router.push({
              path: "/Appraising",
              });
            }, 1000);
            this.$toast.success("评分成功");
        });
      },
      //提交
      SubmitTo(){
      }
      // 取消对某人的投选
      cancelchargeBtn(action,done){
        if(action=='confirm'){
          this.Categorylist.forEach((item,index)=>{
            let liiyouDatasub=item;
            if(this.canceltemporaryData.evaluateTaskCategoryId==item.id){
               liiyouDatasub.Voters.forEach((itemin,indexin)=>{
                if(itemin.id==this.canceltemporaryData.id){
                  liiyouDatasub.Voters[indexin].state=false
                }
               })
            }
            this.$set(this.Categorylist,index,liiyouDatasub)
          })
        }
        this.show=false;
        done();
      },
      // 输入理由关闭之前操作
      chargeBtn(action,done){
        if(action=='confirm'){
          if( this.Recommendedreason==''){
            this.$toast.fail("推荐理由不能为空");
          }else{
            this.Categorylist.forEach((item,index)=>{
            let liiyouDatasub=item;
            if(this.temporaryData.evaluateTaskCategoryId==item.id){
               liiyouDatasub.Voters.forEach((itemin,indexin)=>{
                if(itemin.id==this.temporaryData.id){
                  liiyouDatasub.Voters[indexin].remark=this.Recommendedreason;
                  liiyouDatasub.Voters[indexin].state=true
                }
               })
            }
            this.$set(this.Categorylist,index,liiyouDatasub)
            })
          }
        }
        this.Recommendedreason='';
        this.show=false;
        done();
      },
      // 输入评选理由
      remarkto(item){
        // 新增投票人选
        if(item.state==false){
          this.Categorylist.forEach(ins=>{
            if(item.evaluateTaskCategoryId==ins.id){
              let numin=0;
              ins.Voters.forEach(votoris=>{
              if(votoris.state==true){
                numin+=1;
              }
              if(ins.peopleNum==numin){
                this.$toast.fail("推荐数超出奖项总名额");
                this.show=false;
              }
              else{
                this.show=true;
                this.temporaryData=item;
              }
              })
            }
          })
        }
        else{
          this.cancelshow=true;
          this.canceltemporaryData=item
        }
      },
    }
  };
</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;
src/views/toAppraising/toAppraisingtwo.vue
@@ -9,7 +9,7 @@
      </p>
      <p class="info">
        <span>评优级别:</span>
        <span>{{this.poepleinfo.type == 0 ? "部门级评优" :this.poepleinfo.type == 1 ? "部门评优" :this.poepleinfo.type == 2 ? "公司评优" : ""}}</span>
        <span>{{this.poepleinfo.type == 0 ? "部门级评选" :this.poepleinfo.type == 1 ? "部门评选" :this.poepleinfo.type == 2 ? "公司评选" : ""}}</span>
      </p>
      <p class="info">
        <span>截止日期:</span>
src/views/toexamine/index.vue
@@ -20,11 +20,14 @@
        <span>{{this.poepleinfo.assessmentSetVO.deptName}}</span>
      </p>
      <p v-show="this.poepleinfo.assessmentTaskVO.type==0">
        <span>职务:</span>
        <span>所任职务:</span>
        <span>{{this.poepleinfo.assessmentSetVO.postName}}</span>
      </p>
    </div>
    <p class="illustrate">说明:对当前评分,权重占{{this.poepleinfo.weight}}%,评分范围(100分制)±50</p>
    <p
      class="illustrate"
      v-if="this.poepleinfo.isAssessmentOk==false"
    >说明:对当前评分,权重占{{this.poepleinfo.weight}}%,评分范围(100分制)±50</p>
    <div v-if="this.poepleinfo.isAssessmentOk==false" class="todetails">
      <p class="title">评分</p>
      <van-field
@@ -51,6 +54,10 @@
        >{{this.poepleinfo.assessmentScoreVO.remark==""?'无':this.poepleinfo.assessmentScoreVO.remark}}</span>
      </p>
    </div>
    <p
      class="illustrate"
      v-if="this.poepleinfo.isAssessmentOk==true"
    >说明:对当前评分,权重占{{this.poepleinfo.weight}}%,评分范围(100分制)±50</p>
  </div>
</template>
        
@@ -193,7 +200,6 @@
    }
  }
  .showdetails {
    margin-top: 20px;
    p {
      display: flex;
      margin: 10px;
vue.config.js
@@ -127,8 +127,8 @@
    proxy: {
      "/api": {
        // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
        // target: "http://127.0.0.1:8111",
        target: "http://139.196.94.172:8111",
        target: "http://127.0.0.1:8111",
        // target: "http://139.196.94.172:8111",
        // target: "https://132v69t077.yicp.fun",
        // target: "http://139.196.94.172:8111",
        // target: 'http://192.168.1.83:2888',