15179599649
2023-12-15 3aad631b10525c33c0f73faa0f20b77a772d9d15
'提交内容'
4 files modified
76 ■■■■■ changed files
src/router/axios.js 25 ●●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 8 ●●●● patch | view | raw | blame | history
src/views/login/index.vue 24 ●●●●● patch | view | raw | blame | history
src/views/toAppraising/index.vue 19 ●●●●● patch | view | raw | blame | history
src/router/axios.js
@@ -15,6 +15,11 @@
 */
import axios from "axios";
import { getToken } from "@/utils/auth.js";
import Vue from "vue";
import Vant from "vant";
import router from "../router/page";
import "vant/lib/index.css";
Vue.use(Vant);
// 调用后台管理的
const service = axios.create({
@@ -52,22 +57,12 @@
// http response 拦截
service.interceptors.response.use(
  (res) => {
    const code = res.data.code;
    if (res.data.resultList && res.data.resultList.length > 0) {
      res.data.resultList = res.data.resultList.map((item) => {
        if (item.city_nm && item.city_nm == "恩施土家族苗族自治州") {
          item.city_nm = "恩施州";
        }
        if (item.ad_nm && item.ad_nm == "恩施土家族苗族自治州") {
          item.ad_nm = "恩施州";
        }
        return item;
      });
    if (res.data.code == 401) {
      Vue.prototype.$toast.fail(res.data.msg)
    }
    setTimeout(() => {
      router.push("/login");
    }, 1000);
    return res;
  },
  (error) => {
src/views/Appraising/index.vue
@@ -3,7 +3,7 @@
  <div class="Appraising">
    <div class="view" v-for="(item,index) in ViewData" :key="index">
      <p class="TaskNumber">
        <span>{{(item.type==0||item.type==1)?'部门评优':'公司评优'}}</span>
        <span>{{item.type==0?'公司评优(部门候选人评定)':'部门评优'}}</span>
        <span
          :class="item.taskType=='优秀员工'?'evaluationget':'evaluation'"
        >{{item.taskType=='优秀员工'?'待完成 ':'待完成'}}</span>
@@ -14,7 +14,7 @@
      </p>
      <p class="Tasktime">
        <span>评优对象:</span>
        <span>{{(item.type==0||item.type==1)?'个人':'部门'}}</span>
        <span>{{item.type==0?'个人':'部门'}}</span>
      </p>
      <p class="Tasktime">
        <span>本次类别:</span>
@@ -54,13 +54,13 @@
        dept_id: localStorage.getItem("dept_id")
      };
      evaluateTask(data).then(res => {
        console.log(res);
        this.ViewData = res.data.data;
      });
    },
    toAppraising(item) {
      this.$router.push({
        path: "/toAppraising"
        path: "/toAppraising",
        query: { info: JSON.stringify(item) }
      });
    }
  }
src/views/login/index.vue
@@ -41,7 +41,9 @@
  },
  computed: {},
  created() {},
  created() {
    this.counting = 0;
  },
  methods: {
    // 手机号校验
    usernamecheck(key) {
@@ -66,14 +68,20 @@
    getCodes() {
      const isValid = this.usernamecheck(this.username);
      if (isValid) {
        this.counting = 60;
        const timer = setInterval(() => {
          if (this.counting > 0) {
            this.counting--;
          }
        }, 1000);
        let Data = { phone: this.username };
        GetCode(Data).then(res => {});
        GetCode(Data).then(res => {
          if (res.data.status == 200) {
            this.$toast.success("验证码发送成功");
            this.counting = 60;
            const timer = setInterval(() => {
              if (this.counting > 0) {
                this.counting--;
              }
            }, 1000);
          } else {
            this.$toast.fail("验证码发送失败");
          }
        });
      }
    },
    // 登录
src/views/toAppraising/index.vue
@@ -2,18 +2,18 @@
<template>
  <div class="toAppraising">
    <div class="Beingevaluated">
      <p class="title">部门评优</p>
      <p class="title">{{this.poepleinfo.type==0?'公司评优(部门候选人评定)':'部门评优'}}</p>
      <p class="info">
        <span>评优任务名称:</span>
        <span>2024元旦评优</span>
        <span>{{this.poepleinfo.taskName}}</span>
      </p>
      <p class="info">
        <span>本次类别:</span>
        <span>优秀员工</span>
        <span>{{this.poepleinfo.taskType}}</span>
      </p>
      <p class="info">
        <span>认定标准描述:</span>
        <span>无</span>
        <span>{{this.poepleinfo.remark}}</span>
      </p>
      <div class="toin">
        <van-field
@@ -48,14 +48,15 @@
  </div>
</template>
          
    <script>
<script>
import { Picker } from "vant";
export default {
  data() {
    return {
      showPicker: false,
      currentValue: "", // 用于绑定选择结果的变量
      columns: ["张三", "李四", "王五"] // 选择器的选项列表
      columns: ["张三", "李四", "王五"], // 选择器的选项列表
      poepleinfo: {}
    };
  },
@@ -63,7 +64,10 @@
  mounted() {
    localStorage.setItem("Appraising", "Appraising");
  },
  created() {},
  created() {
    this.poepleinfo = JSON.parse(this.$route.query.info);
    console.log(this.poepleinfo);
  },
  methods: {
    onConfirm(select) {
      this.currentValue = select;
@@ -90,6 +94,7 @@
    padding: 20px;
    .title {
      font-size: 18px;
      font-weight: bold;
      line-height: 35px;
    }
    .info {