zhang
2023-12-12 78892c5e15cd1a53836acfd22c0a8ed2aa028c1f
'提交内容'
9 files modified
1 files added
198 ■■■■ changed files
src/api/hfiveget/index.js 59 ●●●●● patch | view | raw | blame | history
src/router/axios.js 7 ●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 24 ●●●● patch | view | raw | blame | history
src/views/discrimination/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/examine/index.vue 71 ●●●● patch | view | raw | blame | history
src/views/layout/index.vue 3 ●●●●● patch | view | raw | blame | history
src/views/login/index.vue 6 ●●●●● patch | view | raw | blame | history
src/views/message/index.vue 12 ●●●● patch | view | raw | blame | history
src/views/toexamine/index.vue 8 ●●●●● patch | view | raw | blame | history
vue.config.js 7 ●●●● patch | view | raw | blame | history
src/api/hfiveget/index.js
New file
@@ -0,0 +1,59 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-04-19 20:36:36
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-20 17:25:03
 * @FilePath: \web\bigScreen\src\api\singleSk\index.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
import request from "@/router/axios";
//获取登录用户id
export const assessmentSet = (params) => {
    return request({
        url: "/api/assessment/assessmentSet/list",
        method: "get",
        apiKey: true,
        data: {
            ...params,
        },
    });
};
// 登录
export const Loginto = (params) => {
    return request({
        url: "/api/blade-auth/oauth/token?tenantId=000000&username=admin&password=21232f297a57a5a743894a0e4a801fc3&grant_type=password&scope=all&type=account",
        method: "post",
        apiKey: true,
        params: {
            ...params,
        },
    });
};
// 考核任务列表
export const assessmentTask = (params) => {
    return request({
        url: "/api/assessment/assessmentTask/list",
        method: "get",
        apiKey: true,
        params: {
            ...params,
        },
    });
};
// 评优任务列表
export const evaluateTask = (params) => {
    return request({
        url: "/api/evaluate/evaluateTask/list",
        method: "get",
        apiKey: true,
        params: {
            ...params,
        },
    });
};
src/router/axios.js
@@ -14,6 +14,7 @@
 * isToken是否需要token
 */
import axios from "axios";
import { getToken } from "@/utils/auth.js";
// 调用后台管理的
const service = axios.create({
@@ -32,8 +33,10 @@
service.interceptors.request.use(
  (config) => {
    if (config.apiKey) {
      config.headers["apikey"] =
        "F1DBECD719108635189480CF60E6553ADB3109616426BD537F25A430DFC613B491A025C4A51E77FD08C6E5B7CBE05917A461286E7B6D69F1AB1B14F946149D2065B0C675F8FEDF4B9B05C1496881BC5A";
      config.headers["Authorization"] = "Basic c2FiZXI6c2FiZXJfc2VjcmV0";
      if (getToken() != undefined) {
        config.headers["Blade-Auth"] = "bearer " + getToken();
      }
    }
    config.cancelToken = new axios.CancelToken((cancel) => {
      window._axiosPromiseArr.push({ cancel });
src/views/Appraising/index.vue
@@ -4,19 +4,21 @@
    <div class="view" v-for="(item,index) in ViewData" :key="index">
      <p class="TaskNumber">
        <span>部门评优</span>
        <span :class="item.fraction=='待完成'?'evaluation':'evaluationget'">{{item.fraction}}</span>
        <span
          :class="item.taskType=='优秀员工'?'evaluation':'evaluationget'"
        >{{item.taskType=='优秀员工'?'待完成 ':'已完成'}}</span>
      </p>
      <p class="Tasktime">
        <span>评优任务名称:</span>
        <span>2024元旦评优</span>
        <span>{{item.taskName}}</span>
      </p>
      <p class="Tasktime">
        <span>本次类别:</span>
        <span>优秀员工</span>
        <span>{{item.taskType}}</span>
      </p>
      <p class="Tasktime">
        <span>认定标准描述:</span>
        <span>无</span>
        <span>截止日期:</span>
        <span>{{item.updateTime}}</span>
      </p>
      <van-button @click="toAppraising(item)">去评优</van-button>
    </div>
@@ -24,6 +26,7 @@
</template>
          
<script>
import { evaluateTask } from "@/api/hfiveget/index.js";
export default {
  data() {
    return {
@@ -39,8 +42,17 @@
  },
  computed: {},
  created() {},
  created() {
    this.evaluateTaskData();
  },
  methods: {
    // 评优任务列表
    evaluateTaskData() {
      let data = { current: 1, size: 100 };
      evaluateTask(data).then(res => {
        this.ViewData = res.data.data.records;
      });
    },
    toAppraising(item) {
      this.$router.push({
        path: "/toAppraising"
src/views/discrimination/index.vue
@@ -41,6 +41,7 @@
    //进入模块
    Enterimmediately() {
      if (this.checkinis == true) {
        localStorage.setItem("Appraising", "message");
        localStorage.setItem("tokensave", "111");
        this.$router.push({
          path: "/"
src/views/examine/index.vue
@@ -3,46 +3,68 @@
  <div class="Checkandassess">
    <div class="view" v-for="(item,index) in ViewData" :key="index">
      <p class="TaskNumber">
        <span>考核任务编号:{{item.id}}</span>
        <span :class="item.fraction=='待完成'?'evaluation':'evaluationget'">{{item.fraction}}</span>
        <span>考核任务编号:{{item.assessmentNo}}</span>
        <span
          :class="item.assessmentPurpose=='年终考核'?'evaluation':'evaluationget'"
        >{{item.assessmentPurpose=='年终考核'?'待完成':'已完成'}}</span>
      </p>
      <p class="Tasktime">
        <span>考核任务:</span>
        <span>对{{item.Assessmentpeople}}({{item.department}})进行评分</span>
        <span>考核目的:</span>
        <span>{{item.assessmentPurpose}}</span>
      </p>
      <van-button @click="toexamine(item)">去评分</van-button>
      <p class="Tasktime">
        <span>截止日期:</span>
        <qspan>{{item.endTime}}</qspan>
      </p>
      <p class="Tasktime">
        <span>考核任务:</span>
        <span>对({{item.userName}})进行评分</span>
      </p>
      <van-button @click="toexamine(item)" v-show="item.assessmentPurpose=='年终考核'">去评分</van-button>
      <p class="read" v-show="item.assessmentPurpose!='年终考核'" @click="toexamine(item)">查看评分</p>
    </div>
  </div>
</template>
          
<script>
import { assessmentTask, assessmentSet } from "@/api/hfiveget/index.js";
export default {
  data() {
    return {
      ViewData: [
        {
          id: "202402",
          fraction: "待完成",
          Assessmentpeople: "王五",
          department: "技术部"
        },
        {
          id: "202401",
          fraction: "已完成",
          Assessmentpeople: "张三",
          department: "技术部"
        }
      ]
      ViewData: []
    };
  },
  computed: {},
  created() {},
  created() {
    this.assessmentTaskData();
  },
  methods: {
    // 考核任务列表
    assessmentTaskData() {
      let data = { current: 1, size: 100 };
      assessmentTask(data).then(task => {
        assessmentSet({ toUserId: 1123598821738675201 }).then(person => {
          task.data.data.records.forEach(taskin => {
            person.data.data.records.forEach(personin => {
              this.ViewData.push({
                assessmentNo: taskin.assessmentNo, //考核编号
                assessmentPurpose: taskin.assessmentPurpose, //考核目的
                endTime: taskin.endTime, //结束时间
                userName: personin.userName, //被考核人
                deptName: personin.deptName, //部门
                postName: personin.postName, //职务
                toUserName: personin.toUserName //考核人
              });
            });
          });
        });
      });
    },
    toexamine(item) {
      this.$router.push({
        path: "/toexamine",
        query: { name: item.Assessmentpeople }
        query: { info: JSON.stringify(item) }
      });
    }
  }
@@ -89,6 +111,13 @@
    }
    .Tasktime {
      font-size: 16px;
      line-height: 25px;
    }
    .read {
      text-align: right;
      font-size: 16px;
      color: #747474;
      margin-top: 5px;
    }
    .van-button {
      margin-top: 10px;
src/views/layout/index.vue
@@ -29,6 +29,7 @@
import examine from "../examine/index.vue";
import Checkandassess from "../Checkandassess/index.vue";
import Appraising from "../Appraising/index.vue";
import { assessmentSet } from "@/api/hfiveget/index.js";
export default {
  components: {
    message,
@@ -96,6 +97,7 @@
  methods: {
    switchtab(label) {
      this.comName = label;
      localStorage.setItem("Appraising", label);
    }
  },
@@ -120,6 +122,7 @@
    if (localStorage.getItem("Appraising") != null) {
      this.comName = localStorage.getItem("Appraising");
    }
  },
  watch: {
    showHeight: function() {
src/views/login/index.vue
@@ -29,6 +29,8 @@
        
<script>
import { showSuccessToast, showFailToast } from "vant";
import { Loginto } from "@/api/hfiveget/index.js";
import { setToken } from "@/utils/auth.js";
export default {
  data() {
    return {
@@ -70,7 +72,11 @@
      if (isValid) {
        this.$toast.success("登录成功");
        setTimeout(() => {
          localStorage.setItem("Appraising", "message");
          localStorage.setItem("tokensave", "222");
          Loginto().then(res => {
            setToken(res.data.access_token);
          });
          this.$router.push("/");
        }, 1000);
      }
src/views/message/index.vue
@@ -47,9 +47,11 @@
        </p>
        <div class="tocomment">
          <van-field v-model="value" placeholder="说点什么吧" />
          <img src="images/pic.png" class="pic" />
          <van-uploader>
            <img src="images/pic.png" class="pic" />
          </van-uploader>
          <img src="images/anonymous.png" class="anonymous" />
          <div class="notanonymous">
          <div class="notanonymous" v-show="isshownotnm">
            <img src="images/notanonymous.png" />
          </div>
        </div>
@@ -65,6 +67,7 @@
  data() {
    return {
      inputValue: "",
      isshownotnm: true,
      imageUrls: [
        "https://img1.baidu.com/it/u=4049022245,514596079&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1702054800&t=f78ab44b6c79d50010356b808487b695",
        "https://img0.baidu.com/it/u=3368678403,249914024&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1702054800&t=46a3ab3b84070007415537fac57564cc",
@@ -75,7 +78,10 @@
  },
  computed: {},
  created() {},
  created() {
    this.isshownotnm =
      localStorage.getItem("tokensave") == "222" ? true : false;
  },
  methods: {
    // 图片预览
    previewImages(index) {
src/views/toexamine/index.vue
@@ -5,16 +5,16 @@
      <img
        src="https://img1.baidu.com/it/u=2465052889,887279449&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
      />
      <p>{{this.poepleinfo.name}}</p>
      <p>{{this.poepleinfo.userName}}</p>
    </div>
    <div class="Info">
      <div>
        <p>部门</p>
        <p>技术部</p>
        <p>{{this.poepleinfo.deptName}}</p>
      </div>
      <div>
        <p>职务</p>
        <p>总经理</p>
        <p>{{this.poepleinfo.postName}}</p>
      </div>
      <div>
        <p>人员类型</p>
@@ -57,6 +57,8 @@
  computed: {},
  mounted() {
    localStorage.setItem("Appraising", "examine");
    console.log(JSON.parse(this.$route.query.info));
    this.poepleinfo = JSON.parse(this.$route.query.info);
  },
  created() {},
  methods: {
vue.config.js
@@ -137,15 +137,12 @@
      "/api": {
        // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
        // target: "http://127.0.0.1",
        target: "https://sk.hubeishuiyi.cn/api",
        target: "http://192.168.1.96:2888",
        // target: "http://192.168.0.100:82",
        // target: "http://17.20.10.3:82",
        // target: "http://10.141.11.11/api",
        // ws: true, //启用webSocket6566
        changeOrigin: true, //开启代理跨域
        // pathRewrite: {
        //     "^/api": "/",
        // },
        changeOrigin: true,
      },
    },
  },