15179599649
2023-12-21 42af0f5da5a1f77713513acb47a842b852767b5e
'提交内容'
19 files modified
840 ■■■■■ changed files
src/App.vue 23 ●●●●● patch | view | raw | blame | history
src/api/hfiveget/index.js 20 ●●●● patch | view | raw | blame | history
src/router/axios.js 8 ●●●●● patch | view | raw | blame | history
src/store/index.js 16 ●●●● patch | view | raw | blame | history
src/store/modules/popupParams.js 2 ●●●●● patch | view | raw | blame | history
src/styles/base/index.css 4 ●●●● patch | view | raw | blame | history
src/styles/base/index.scss 11 ●●●● patch | view | raw | blame | history
src/utils/math/index.js 2 ●●● patch | view | raw | blame | history
src/views/Addmessage/index.vue 61 ●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 18 ●●●●● patch | view | raw | blame | history
src/views/Checkandassess/index.vue 10 ●●●●● patch | view | raw | blame | history
src/views/discrimination/index.vue 6 ●●●● patch | view | raw | blame | history
src/views/examine/index.vue 189 ●●●●● patch | view | raw | blame | history
src/views/layout/index.vue 25 ●●●●● patch | view | raw | blame | history
src/views/login/index.vue 15 ●●●● patch | view | raw | blame | history
src/views/message/index.vue 217 ●●●● patch | view | raw | blame | history
src/views/toAppraising/index.vue 53 ●●●●● patch | view | raw | blame | history
src/views/toexamine/index.vue 136 ●●●●● patch | view | raw | blame | history
vue.config.js 24 ●●●●● patch | view | raw | blame | history
src/App.vue
@@ -1,6 +1,12 @@
<template>
  <div id="app">
    <router-view></router-view>
    <van-overlay :show="showif">
      <div class="wrapper">
        <van-loading type="spinner" size="80d" />
        <p>加载中</p>
      </div>
    </van-overlay>
  </div>
</template>
@@ -11,6 +17,11 @@
  },
  created() {},
  computed: {
    showif() {
      return this.$store.state.overlayshow;
    }
  },
  methods: {}
};
@@ -22,4 +33,16 @@
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  p {
    font-size: 20px;
    margin-top: 10px;
    color: #a8a8a8;
  }
}
</style>
src/api/hfiveget/index.js
@@ -132,14 +132,12 @@
// 发布留言
export const leaveWords = (params) => {
export const leaveWords = (data) => {
    return request({
        url: "/api/leave/leaveWords/submit",
        method: "post",
        apiKey: true,
        data: {
            ...params,
        },
        data
    });
};
@@ -153,3 +151,17 @@
        data
    });
};
// 留言列表
export const leaveWordslist = (params) => {
    return request({
        url: "/api/leave/leaveWords/list",
        method: "get",
        apiKey: true,
        params: {
            ...params,
        },
    });
};
src/router/axios.js
@@ -19,6 +19,7 @@
import Vant from "vant";
import router from "../router/page";
import "vant/lib/index.css";
import store from "../store/index";
Vue.use(Vant);
// 调用后台管理的
@@ -37,6 +38,7 @@
// http request拦截
service.interceptors.request.use(
  (config) => {
    store.commit('updateoverlayshow');
    if (config.apiKey) {
      config.headers["Authorization"] = "Basic c2FiZXI6c2FiZXJfc2VjcmV0";
      if (getToken() != undefined) {
@@ -46,7 +48,6 @@
    config.cancelToken = new axios.CancelToken((cancel) => {
      window._axiosPromiseArr.push({ cancel });
    });
    return config;
  },
  (error) => {
@@ -57,13 +58,14 @@
// http response 拦截
service.interceptors.response.use(
  (res) => {
    store.commit('reoverlayshow');
    if (res.data.code == 401) {
      Vue.prototype.$toast.fail(res.data.msg)
      localStorage.clear()
      setTimeout(() => {
        router.push("/login");
        router.push("/discrimination");
      }, 1000);
    }
    console.log(res)
    return res;
  },
  (error) => {
src/store/index.js
@@ -1,10 +1,7 @@
import Vue from 'vue'
import Vuex from 'vuex'
import popupParams from './modules/popupParams'
import user from './modules/user'
import getters from './getters'
Vue.use(Vuex)
@@ -12,7 +9,18 @@
const store = new Vuex.Store({
    modules: {
        popupParams,
        user
        user,
    },
    state: {
        overlayshow: false
    },
    mutations: {
        updateoverlayshow(state) {
            state.overlayshow = true
        },
        reoverlayshow(state) {
            state.overlayshow = false
        },
    },
    getters
})
src/store/modules/popupParams.js
@@ -10,11 +10,9 @@
 */
const popupParams = {
    state: {
    },
    mutations: {
    },
    actions: {
src/styles/base/index.css
@@ -25,8 +25,8 @@
}
::-webkit-scrollbar {
  /* width: 6px;
  height: 6px; */
  width: 6px;
  height: 6px;
  background-color: none;
}
src/styles/base/index.scss
@@ -69,8 +69,9 @@
// }
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    display: none;
    // width: 8px;
    // height: 8px;
    // background-color: none;
}
@@ -1228,8 +1229,8 @@
.my-uploader .van-uploader__preview-image {
    width: 100px !important;
    height: 100px !important;
  }
  .my-uploader .van-uploader__upload {
}
.my-uploader .van-uploader__upload {
    width: 100px !important;
    height: 100px !important;
  }
}
src/utils/math/index.js
@@ -14,7 +14,7 @@
// }
export default function midCartesian (start, end) {
export default function midCartesian(start, end) {
    let c1 = global.DC.Transform.transformCartesianToWGS84(start)
    let c2 = global.DC.Transform.transformCartesianToWGS84(end)
    let lng, lat, alt
src/views/Addmessage/index.vue
@@ -14,7 +14,8 @@
    </van-cell-group>
    <div class="my-uploader">
      <van-uploader
        v-model="fileList"
        v-model="FileList"
        max-count="9"
        multiple
        :after-read="afterread"
        :before-delete="beforedelete"
@@ -37,7 +38,7 @@
    return {
      messagecom: "",
      fileindex: null,
      fileList: [],
      FileList: [],
      submitlist: []
    };
  },
@@ -48,32 +49,58 @@
  created() {},
  methods: {
    // 上传图片后的操作
    afterread({ file }) {
      const formdata = new FormData();
      formdata.append("file", file);
      endpoint(formdata).then(res => {
        this.submitlist.push(res.data.data.link);
    afterread(event, indexto) {
      console.log(event.length == undefined);
      let temporary = [];
      if (event.length == undefined) {
        temporary.push(event);
      } else {
        temporary = event;
      }
      temporary.map((item, index) => {
        this.FileList[index].status = "uploading";
        this.FileList[index].message = "加载中";
      });
      temporary.forEach((element, index) => {
        const formdata = new FormData();
        formdata.append("file", element.file);
        endpoint(formdata).then(res => {
          if (res.data.code == 200) {
            this.FileList[index].status = "";
            this.FileList[index].message = "";
            this.submitlist.push(res.data.data.link);
          }
        });
      });
    },
    // 删除图片前的操作
    beforedelete(file, filelist) {
      this.submitlist.splice(filelist.index, 1);
      this.fileList.splice(filelist.index, 1);
      this.FileList.splice(filelist.index, 1);
    },
    submit() {
      let toData = {
        userName: localStorage.getItem("nick_name"),
        deptName: localStorage.getItem("dept_name"),
        userPost: localStorage.getItem("post_name"),
        userName: "匿名用户",
        content: this.messagecom,
        imageUrls: this.submitlist.join(",")
      };
      leaveWords(toData).then(res => {
        setTimeout(() => {
          this.$router.push("/");
        }, 1000);
        this.$toast.success("添加成功");
      });
      if (localStorage.getItem("tokensave") != "111") {
        toData.userName = localStorage.getItem("nick_name");
        toData.userDept = localStorage.getItem("dept_name");
        toData.userPost = localStorage.getItem("post_name");
      }
      if (this.messagecom == "" && this.submitlist.length == 0) {
        this.$toast.fail("留言内容不能为空");
      } else {
        console.log(toData);
        leaveWords(toData).then(res => {
          console.log(res);
          // setTimeout(() => {
          //   this.$router.push("/");
          // }, 1000);
          // this.$toast.success("添加成功");
        });
      }
    }
  }
};
src/views/Appraising/index.vue
@@ -3,21 +3,22 @@
  <div class="Appraising">
    <div class="view" v-for="(item,index) in ViewData" :key="index">
      <p class="TaskNumber">
        <span>{{item.type==0?'公司评优(部门候选人评定)':'部门评优'}}</span>
        <span>{{item.taskName}}</span>
        <!-- <span>{{item.type==0?'公司评优(部门候选人评定)':'部门评优'}}</span> -->
        <span
          :class="item.isEvaluateOk==false?'evaluation':'evaluationget'"
        >{{item.isEvaluateOk==false?'待完成 ':'已完成'}}</span>
      </p>
      <p class="Tasktime">
        <span>评优任务名称:</span>
        <span>{{item.taskName}}</span>
      </p>
      <p class="Tasktime">
        <span>评优对象:</span>
        <span>{{item.type==0?'个人':'部门'}}</span>
      </p>
      <p class="Tasktime">
        <span>本次类别:</span>
        <span>评优级别:</span>
        <span>{{item.type==0?'部门级评优':'部门评优'}}</span>
      </p>
      <p class="Tasktime">
        <span>评优类别:</span>
        <span>{{item.taskType}}</span>
      </p>
      <p class="Tasktime">
@@ -45,7 +46,9 @@
  computed: {},
  created() {
    this.evaluateTaskData();
    if (localStorage.getItem("tokensave") != "111") {
      this.evaluateTaskData();
    }
  },
  methods: {
    // 评优任务列表
@@ -55,6 +58,7 @@
        dept_id: localStorage.getItem("dept_id")
      };
      evaluateTask(data).then(res => {
        console.log(res);
        this.ViewData = res.data.data.records;
        this.ViewData.sort((a, b) => {
          if (a.isEvaluateOk && !b.isEvaluateOk) {
src/views/Checkandassess/index.vue
@@ -35,10 +35,12 @@
  },
  methods: {
    getTaskData() {
      let toUserId = localStorage.getItem("tokensave");
      listGroupByTask(toUserId).then(res => {
        this.ViewData = res.data.data;
      });
      if (localStorage.getItem("tokensave") != "111") {
        let toUserId = localStorage.getItem("tokensave");
        listGroupByTask(toUserId).then(res => {
          this.ViewData = res.data.data;
        });
      }
    }
  }
};
src/views/discrimination/index.vue
@@ -31,7 +31,11 @@
  },
  computed: {},
  created() {},
  created() {
    if (localStorage.getItem("tokensave") != null) {
      this.$router.push("/");
    }
  },
  methods: {
    // 身份切换选择
    checkin(key) {
src/views/examine/index.vue
@@ -1,35 +1,52 @@
<!--考核-->
<template>
  <div class="Checkandassess">
    <div class="view" v-for="(item,index) in ViewData" :key="index">
      <p class="TaskNumber">
        <span>考核任务编号:{{item.assessmentTaskVO.assessmentNo}}</span>
        <span
          :class="item.assessmentScoreVO==null?'evaluation':'evaluationget'"
        >{{item.assessmentScoreVO==null?'待完成':'已完成'}}</span>
      </p>
      <p class="Tasktime">
        <span>考核目的:</span>
        <span>{{item.assessmentTaskVO.assessmentPurpose}}</span>
      </p>
      <p class="Tasktime">
        <span>考核对象:</span>
        <span>{{item.userId!=undefined?"个人":"部门"}}</span>
      </p>
      <p class="Tasktime">
        <span>截止日期:</span>
        <qspan>{{item.assessmentTaskVO.endTime}}</qspan>
      </p>
      <p class="Tasktime">
        <span>考核任务:</span>
        <span>对({{item.assessmentTaskVO.type==0?item.userName:item.deptName}})进行评分</span>
      </p>
      <van-button @click="toexamine(item)" v-show="item.assessmentScoreVO==null">去评分</van-button>
      <p class="read" v-show="item.assessmentScoreVO!=null" @click="toexamine(item)">查看详情</p>
  <div class="box">
    <div class="tabbarshow">
      <div>
        <p>
          <span :class="{'tabin':tabbarindex==0}" @click="updatatabbar(0)">去考核</span>
        </p>
        <p>
          <span :class="{'tabin':tabbarindex==1}" @click="updatatabbar(1)">查考核</span>
        </p>
      </div>
    </div>
    <div class="not" v-show="ViewData.length==0">
      <img src="images/notdata.png" />
      <p>赞无数据</p>
    <div class="Checkandassess">
      <div v-show="tabbarindex==0">
        <div class="view" v-for="(item,index) in ViewData" :key="index">
          <p class="TaskNumber">
            <span>考核任务编号:{{item.assessmentTaskVO.assessmentNo}}</span>
            <span
              :class="item.assessmentScoreVO==null?'evaluation':'evaluationget'"
            >{{item.assessmentScoreVO==null?'待完成':'已完成'}}</span>
          </p>
          <p class="Tasktime">
            <span>考核目的:</span>
            <span>{{item.assessmentTaskVO.assessmentPurpose}}</span>
          </p>
          <p class="Tasktime">
            <span>考核对象:</span>
            <span>{{item.userId!=undefined?"个人":"部门"}}</span>
          </p>
          <p class="Tasktime">
            <span>截止日期:</span>
            <qspan>{{item.assessmentTaskVO.endTime}}</qspan>
          </p>
          <p class="Tasktime">
            <span>考核任务:</span>
            <span>对({{item.assessmentTaskVO.type==0?item.userName:item.deptName}})进行评分</span>
          </p>
          <van-button @click="toexamine(item)" v-show="item.assessmentScoreVO==null">去评分</van-button>
          <p class="read" v-show="item.assessmentScoreVO!=null" @click="toexamine(item)">查看详情</p>
        </div>
      </div>
      <div v-show="tabbarindex==1">
        <Checkandassess></Checkandassess>
      </div>
      <div class="not" v-show="ViewData.length==0&&tabbarindex==0">
        <img src="images/notdata.png" />
        <p>赞无数据</p>
      </div>
    </div>
  </div>
</template>
@@ -40,10 +57,15 @@
  assessmentSet,
  assessmentSetDept
} from "@/api/hfiveget/index.js";
import Checkandassess from "../Checkandassess/index.vue";
export default {
  components: {
    Checkandassess
  },
  data() {
    return {
      ViewData: []
      ViewData: [],
      tabbarindex: 0
    };
  },
  mounted() {},
@@ -52,54 +74,43 @@
    this.assessmentTaskData();
  },
  methods: {
    updatatabbar(index) {
      this.tabbarindex = index;
    },
    // 考核任务列表
    assessmentTaskData() {
      let toUserId = localStorage.getItem("tokensave");
      assessmentSet({ toUserId: toUserId }).then(res_peo => {
        res_peo.data.data.records.forEach(items => {
          if (items.assessmentTaskVO !== null) {
            this.ViewData.push(items);
      if (localStorage.getItem("tokensave") != "111") {
        let toUserId = localStorage.getItem("tokensave");
        assessmentSet({ toUserId: toUserId }).then(res_peo => {
          if (res_peo.data.data.records != undefined) {
            res_peo.data.data.records.forEach(items => {
              if (items.assessmentTaskVO !== null) {
                this.ViewData.push(items);
              }
              if (items.assessmentScoreVO !== null) {
                items.condition = 1;
              } else {
                items.condition = 0;
              }
            });
          }
          if (items.assessmentScoreVO !== null) {
            items.condition = 1;
          } else {
            items.condition = 0;
          }
        });
        assessmentSetDept({ toUserId: toUserId }).then(res_dept => {
          res_dept.data.data.records.forEach(items => {
            if (items.assessmentTaskVO !== null) {
              this.ViewData.push(items);
          assessmentSetDept({ toUserId: toUserId }).then(res_dept => {
            if (res_dept.data.data.records != undefined) {
              res_dept.data.data.records.forEach(items => {
                if (items.assessmentTaskVO !== null) {
                  this.ViewData.push(items);
                }
                if (items.assessmentScoreVO !== null) {
                  items.condition = 1;
                } else {
                  items.condition = 0;
                }
              });
            }
            if (items.assessmentScoreVO !== null) {
              items.condition = 1;
            } else {
              items.condition = 0;
            }
            this.ViewData.sort((a, b) => a.condition - b.condition);
          });
          this.ViewData.sort((a, b) => a.condition - b.condition);
        });
      });
      // console.log(people);
      // assessmentTask(data).then(task => {
      //   console.log(task);
      //   assessmentSet({ toUserId: toUserId }).then(person => {
      //     console.log(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({
@@ -112,13 +123,41 @@
</script>
          
<style scoped lang="scss">
.box {
  box-sizing: border-box;
  height: calc(100% - 10px);
}
.tabbarshow {
  font-size: 20px;
  padding: 0px 30px;
  height: 60px;
  top: 0;
  align-items: center;
  div {
    display: flex;
    text-align: center;
    p {
      display: inline;
      line-height: 60px;
      color: #999999;
      flex: 1;
    }
    .tabin {
      font-weight: bold;
      color: black;
      font-size: 25px;
      border-bottom: 4px solid #017bfc;
    }
  }
}
.Checkandassess {
  padding: 20px;
  height: 100%;
  overflow: auto;
  box-sizing: border-box;
  height: calc(100% - 60px);
  background: #f5f5f5;
  .view {
    width: 100%;
    width: 90%;
    margin: 10px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
src/views/layout/index.vue
@@ -2,9 +2,7 @@
  <div class="appdefalut">
    <!-- 主体内容展示区域 -->
    <div class="content" :class="hidshow ? 'footerin' : 'notfooterin'">
      <keep-alive>
        <component :is="comName"></component>
      </keep-alive>
      <component :is="comName"></component>
    </div>
    <!-- 底层tab切换栏 -->
    <div class="footer" v-if="hidshow">
@@ -27,15 +25,14 @@
import culture from "../culture/index.vue";
import introduction from "../introduction/index.vue";
import examine from "../examine/index.vue";
import Checkandassess from "../Checkandassess/index.vue";
import Appraising from "../Appraising/index.vue";
export default {
  components: {
    message,
    culture,
    introduction,
    examine,
    Checkandassess,
    Appraising
  },
  data() {
@@ -47,28 +44,22 @@
      TabName: [],
      ygTabName: [
        {
          label: "留言",
          component: "message",
          pic: "images/message.png",
          inpic: "images/messageaction.png"
        },
        {
          label: "考核",
          component: "examine",
          pic: "images/examine.png",
          inpic: "images/examineaction.png"
        },
        {
          label: "查考核",
          component: "Checkandassess",
          pic: "images/Checkandassess.png",
          inpic: "images/Checkandassessaction.png"
        },
        {
          label: "评优",
          component: "Appraising",
          pic: "images/Appraising.png",
          inpic: "images/Appraisingaction.png"
        },
        {
          label: "留言",
          component: "message",
          pic: "images/message.png",
          inpic: "images/messageaction.png"
        }
      ],
      khTabName: [
src/views/login/index.vue
@@ -43,6 +43,9 @@
  computed: {},
  created() {
    this.counting = 0;
    if (localStorage.getItem("tokensave") != null) {
      this.$router.push("/");
    }
  },
  methods: {
    // 手机号校验
@@ -96,13 +99,16 @@
          code: this.Code
        };
        Loginto(Data).then(res => {
          console.log(res.data);
          if (res.data.code == 400) {
            this.$toast.fail(res.data.msg);
          } else if (res.data.code == 500) {
            this.$toast.fail("登录失败");
          } else {
            setTimeout(() => {
              this.$router.push("/");
            }, 1000);
            localStorage.setItem("Appraising", "message");
            localStorage.setItem("Appraising", "examine");
            localStorage.setItem("tokensave", res.data.user_id); //用户id
            localStorage.setItem("dept_id", res.data.dept_id); //部门id
            localStorage.setItem("nick_name", res.data.nick_name); //姓名
@@ -173,11 +179,14 @@
        margin-left: 10px;
        height: 60px;
        background: linear-gradient(163deg, #01bdfc 0%, #017bfc 100%);
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0px 10px;
        p {
          font-size: 14px;
          color: white;
          padding: 0px 15px;
          line-height: 60px;
          text-align: center;
        }
      }
    }
src/views/message/index.vue
@@ -1,7 +1,7 @@
<!--留言-->
<template>
  <div class="boxliuyan">
    <div class="message" v-for="(comment, index) in 3" :key="index">
  <div class="boxliuyan" @scroll.passive="getScroll($event)">
    <div class="message" v-for="(item, index) in messageData" :key="index">
      <!-- 头部个人信息区域 -->
      <div class="info">
        <img
@@ -9,72 +9,76 @@
          src="https://img1.baidu.com/it/u=732125282,3277481018&fm=253&fmt=auto&app=138&f=JPEG?w=300&h=300"
        />
        <div class="infoin">
          <p class="name">匿名用户</p>
          <p class="time">一个小时前发布</p>
          <p class="name">{{item.userDept}}{{item.userName=="匿名用户"?"匿名用户":"("+item.userName+")"}}</p>
          <p class="time">发布时间:{{item.updateTime}}</p>
        </div>
      </div>
      <!-- 文案区域 -->
      <p class="con">该公司的老朋友了,来了很多次,这个公司的氛围还不错,值得借鉴。</p>
      <p class="con">{{item.content}}</p>
      <!-- 图片展示区域 -->
      <p class="picshow">
      <p class="picshow" v-if="item.imageUrls.length!=0">
        <img
          @click="previewImages(index)"
          v-for="(image, index) in imageUrls"
          @click="previewImages(item.imageUrls,indexin)"
          v-for="(image, indexin) in item.imageUrls"
          :src="image"
          :key="index"
          :key="indexin"
          alt="Image"
          :class="{active: imageUrls.length === 4}"
          :class="{active:item.imageUrls.length === 4}"
        />
      </p>
      <!-- 评论区域 -->
      <div class="comment">
        <p>
          <span class="name">匿名用户:</span>
          <span class="comin">不错不错。</span>
        </p>
        <p>
          <span class="name">匿名用户:</span>
          <span class="comin">可以的,确实可以哦</span>
        </p>
        <div class="box">
          <p v-for="(conin, indexcon) in item.children" :key="indexcon">
            <span
              class="name"
            >{{conin.userDept}}{{conin.userName=="匿名用户"?"匿名用户":"("+conin.userName+")"}}:</span>
            <img
              :src="conpic"
              v-for="(conpic, indexpic) in conin.imageUrls"
              :key="indexpic"
              @click="previewImages(conin.imageUrls,indexpic)"
            />
            <span class="comin">{{conin.content}}</span>
          </p>
        </div>
        <div class="tocomment">
          <div class="imgurl">
            <span v-for="(item,index) in imageData" :key="item">
              <img :src="item" class="toimg" />
              <img src="images/close.png" class="close" @click="closeimg(index)" />
            <span v-for="(itemup,indexpic) in item.imageDatatoup" :key="indexpic">
              <img :src="itemup" class="toimg" />
              <img src="images/close.png" class="close" @click="closeimg(index,indexpic)" />
            </span>
          </div>
          <div class="tocomment_in">
            <van-field v-model="value" placeholder="说点什么吧" />
            <van-uploader :after-read="afterread">
            <van-field v-model="item.inputValue" placeholder="说点什么吧" />
            <van-uploader :after-read="(file) => afterread(file, index)" multiple>
              <img src="images/pic.png" class="pic" />
            </van-uploader>
            <img src="images/anonymous.png" class="anonymous" />
            <div class="notanonymous" v-show="isshownotnm">
            <img src="images/anonymous.png" class="anonymous" @click="SubmitComment(1,item)" />
            <div class="notanonymous" v-show="isshownotnm" @click="SubmitComment(2,item)">
              <img src="images/notanonymous.png" />
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="not" v-show="messageData.length==0">
      <img src="images/notdata.png" />
      <p>暂无数据</p>
    </div>
    <img src="images/Addmessage.png" class="Addmessage" @click="Addmessage()" />
  </div>
</template>
  
<script>
import { endpoint } from "@/api/hfiveget/index.js";
import { endpoint, leaveWordslist, leaveWords } from "@/api/hfiveget/index.js";
import { ImagePreview } from "vant";
export default {
  data() {
    return {
      inputValue: "",
      isshownotnm: true,
      imageData: [],
      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",
        "https://img0.baidu.com/it/u=530426417,2082848644&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1702054800&t=f990cc80430f0fdee1e2792888109cac",
        "https://img0.baidu.com/it/u=530426417,2082848644&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1702054800&t=f990cc80430f0fdee1e2792888109cac"
      ]
      messageData: [],
      pageswitch: { current: 1, size: 100, descs: "update_time" }
    };
  },
@@ -82,24 +86,109 @@
  created() {
    this.isshownotnm =
      localStorage.getItem("tokensave") == "111" ? false : true;
    this.getmessagelist();
  },
  mounted() {},
  methods: {
    // 删除图片
    closeimg(index) {
      this.imageData.splice(index, 1);
    getScroll(event) {
      // 滚动条距离底部的距离scrollBottom
      // let scrollBottom =
      //   event.target.scrollHeight -
      //   event.target.scrollTop -
      //   event.target.clientHeight;
      // console.log(scrollBottom);
      // if (this.finished && scrollBottom < 40) {
      //  操作
      // }
    },
    // 图片上传
    afterread({ file }) {
      const formdata = new FormData();
      formdata.append("file", file);
      endpoint(formdata).then(res => {
        this.imageData.push(res.data.data.link);
    // 获取数据
    getmessagelist() {
      leaveWordslist(this.pageswitch).then(res => {
        this.messageData = res.data.data.records;
        this.messageData.forEach((item, indexto) => {
          if (item.imageUrls != "") {
            item.imageUrls = item.imageUrls.split(",");
          }
          if (item.children != undefined) {
            item.children.forEach((childitem, indexpic) => {
              if (childitem.imageUrls != "") {
                childitem.imageUrls = childitem.imageUrls.split(",");
              }
            });
          }
        });
        let kehuarray = [];
        if (localStorage.getItem("tokensave") == "111") {
          this.messageData.forEach((item, indexto) => {
            console.log(item.userName == "匿名用户");
            if (item.userName == "匿名用户") {
              kehuarray.push(item);
            }
          });
          this.messageData = kehuarray;
        }
      });
    },
    handScroll(event) {
      console.log(event);
    },
    // 提交评论:1匿名提交,2不匿名提交
    SubmitComment(key, item) {
      if (item.inputValue == undefined && item.imageDatatoup == undefined) {
        this.$toast.fail("请输入留言内容");
      } else {
        let toData = {
          parentId: item.id,
          userName: "匿名用户",
          content: item.inputValue,
          imageUrls:
            item.imageDatatoup == undefined
              ? undefined
              : item.imageDatatoup.toString()
        };
        if (key == 2) {
          toData.userName = localStorage.getItem("nick_name");
          toData.userDept = localStorage.getItem("dept_name");
          toData.userPost = localStorage.getItem("post_name");
        }
        leaveWords(toData).then(res => {
          this.$toast.success("评论成功");
          this.getmessagelist();
        });
      }
    },
    // 删除图片
    closeimg(index, indexpic) {
      this.messageData[index].imageDatatoup.splice(indexpic, 1);
    },
    // 图片上传
    afterread(event, indexto) {
      let temporary = [];
      if (event.length == undefined) {
        const formdata = new FormData();
        formdata.append("file", event.file);
        endpoint(formdata).then(res => {
          if (res.data.code == 200) {
            temporary.push(res.data.data.link);
          }
        });
      } else {
        event.forEach((element, index) => {
          const formdata = new FormData();
          formdata.append("file", element.file);
          endpoint(formdata).then(res => {
            if (res.data.code == 200) {
              temporary.push(res.data.data.link);
            }
          });
        });
      }
      this.$set(this.messageData[indexto], "imageDatatoup", temporary);
    },
    // 图片预览
    previewImages(index) {
    previewImages(arr, index) {
      ImagePreview({
        images: this.imageUrls,
        images: arr,
        startPosition: index
      });
    },
@@ -114,6 +203,10 @@
</script>
  
<style scoped lang="scss">
.boxliuyan {
  height: 100%;
  overflow: auto;
}
.Addmessage {
  position: absolute;
  right: 10px;
@@ -150,7 +243,7 @@
  }
  .con {
    font-size: 18px;
    margin: 10px 0px;
    margin: 10px 0px 0px;
    line-height: 30px;
  }
  .picshow {
@@ -182,14 +275,22 @@
    }
  }
  .comment {
    padding: 10px;
    padding: 0px 0px 10px;
    font-size: 16px;
    p {
      margin: 3px 0px;
    .box {
      p {
        margin: 5px 0px;
        .name {
          color: #4a80ea;
        }
        img {
          width: 40px;
          height: 40px;
          margin: 15px 5px 0px;
        }
      }
    }
    .name {
      color: #4a80ea;
    }
    .tocomment {
      margin-top: 10px;
      background: #f4f5f7;
@@ -222,6 +323,7 @@
      .van-cell {
        background: none;
        font-size: 20px;
        padding: 10px 5px;
      }
      .pic {
        width: 25px;
@@ -248,5 +350,16 @@
    }
  }
}
.not {
  img {
    margin-top: 30px;
    width: 100%;
  }
  p {
    font-size: 20px;
    color: #999999;
    text-align: center;
  }
}
</style>
  
src/views/toAppraising/index.vue
@@ -2,17 +2,21 @@
<template>
  <div class="toAppraising">
    <div class="Beingevaluated">
      <p class="title">{{this.poepleinfo.type==0?'公司评优(部门候选人评定)':'部门评优'}}</p>
      <p class="title">{{this.poepleinfo.taskName}}</p>
      <p class="info">
        <span>评优任务名称:</span>
        <span>{{this.poepleinfo.taskName}}</span>
        <span>所在部门:</span>
        <span>{{ this.poepleinfo.dept_name}}</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.type==0?'部门级评优':'部门评优'}}</span>
      </p>
      <p class="info">
        <span>评优标准:</span>
        <span>{{this.poepleinfo.remark}}</span>
      </p>
      <p class="info">
@@ -25,7 +29,7 @@
            v-model="currentValue"
            is-link
            readonly
            label="请选择:"
            label="推荐人员:"
            placeholder="请选择"
            @click="showPicker = true"
            class="van-hairline"
@@ -42,10 +46,14 @@
        <van-button @click="SubmitTo()">提交</van-button>
      </div>
      <div class="showdetails" v-else>
        <p class="title">评选{{this.poepleinfo.type==0?"人":"部门"}}</p>
        <p class="fraction">{{toshow.name}}</p>
        <p class="title">评选说明</p>
        <p class="instruct">{{toshow.remark==''?'无':toshow.remark}}</p>
        <p>
          <span class="title">评选{{this.poepleinfo.type==0?"人":"部门"}}:</span>
          <span class="fraction">{{toshow.name}}</span>
        </p>
        <p>
          <span class="title">评选说明:</span>
          <span class="instruct">{{toshow.remark==''?'无':toshow.remark}}</span>
        </p>
      </div>
    </div>
    <van-popup v-model="showPicker" round position="bottom">
@@ -85,6 +93,7 @@
    this.toData.scoreUserId = localStorage.getItem("tokensave");
    this.toData.evaluateTaskId = this.poepleinfo.id; //任务id
    this.toData.type = this.poepleinfo.type;
    this.poepleinfo.dept_name = localStorage.getItem("dept_name");
    // 部门候选人评定进行选择
    if (this.poepleinfo.type == 0) {
      let index = this.poepleinfo.selfCandidate.findIndex(
@@ -178,7 +187,7 @@
      }
    }
    .toin {
      margin-top: 40px;
      margin-top: 20px;
      [class*="van-hairline"]::after {
        border: none;
      }
@@ -208,24 +217,24 @@
      border-radius: 8px;
    }
    .showdetails {
      font-size: 20px;
      line-height: 20px;
      margin-top: 20px;
      p {
        display: flex;
        align-items: center;
      }
      .title {
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        margin: 20px;
        font-size: 16px;
        color: #8894a8;
      }
      .fraction {
        font-size: 30px;
        font-size: 18px;
        text-align: center;
        color: #017bfc;
        font-weight: bold;
        line-height: 30px;
      }
      .instruct {
        color: #999999;
        font-size: 16px;
        font-size: 18px;
        text-align: center;
        line-height: 30px;
      }
    }
  }
src/views/toexamine/index.vue
@@ -5,30 +5,37 @@
      <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.userName}}</p>
    </div>
    <div class="Info">
      <div>
        <p>部门</p>
        <p>{{this.poepleinfo.deptName}}</p>
      </div>
      <div v-show="this.poepleinfo.userId!=undefined">
        <p>职务</p>
        <p>{{this.poepleinfo.postName}}</p>
      </div>
      <div v-show="this.poepleinfo.userId!=undefined">
        <p>人员类型</p>
        <p>经营</p>
      </div>
      <div v-show="this.poepleinfo.userId!=undefined">
        <p>合伙类型</p>
        <p>重要合伙人</p>
      </div>
      <p v-show="this.poepleinfo.userId!=undefined">
        <span>被考核人:</span>
        <span>{{this.poepleinfo.userName}}</span>
      </p>
      <p v-show="this.poepleinfo.userId==undefined">
        <span>被考核部门:</span>
        <span>{{this.poepleinfo.deptName}}</span>
      </p>
      <p v-show="this.poepleinfo.userId!=undefined">
        <span>所在部门:</span>
        <span>{{this.poepleinfo.deptName}}</span>
      </p>
      <p v-show="this.poepleinfo.userId!=undefined">
        <span>职务:</span>
        <span>{{this.poepleinfo.postName}}</span>
      </p>
      <p v-show="this.poepleinfo.userId!=undefined">
        <span>人员类型:</span>
        <span>经营</span>
      </p>
      <p v-show="this.poepleinfo.userId!=undefined">
        <span>合伙类型:</span>
        <span>重要合伙人</span>
      </p>
    </div>
    <p
      class="illustrate"
    >说明:对当前评分,权重占{{this.poepleinfo.weight}}%,评分范围(100分制)±{{this.poepleinfo.rangeVal}}</p>
    <div v-if="this.poepleinfo.assessmentScoreVO==null">
    <div v-if="this.poepleinfo.assessmentScoreVO==null" class="todetails">
      <p class="title">评分</p>
      <van-field
        v-model="score"
@@ -43,12 +50,16 @@
      <van-button type="primary" block @click="submit()">提交</van-button>
    </div>
    <div v-if="this.poepleinfo.assessmentScoreVO!=null" class="showdetails">
      <p class="title">评分</p>
      <p class="fraction">{{this.poepleinfo.assessmentScoreVO.scoreVal}}</p>
      <p class="title">评分说明</p>
      <p
        class="instruct"
      >{{this.poepleinfo.assessmentScoreVO.remark==""?'无':this.poepleinfo.assessmentScoreVO.remark}}</p>
      <p>
        <span class="title">评分:</span>
        <span class="fraction">{{this.poepleinfo.assessmentScoreVO.scoreVal}}</span>
      </p>
      <p>
        <span class="title">评分说明:</span>
        <span
          class="instruct"
        >{{this.poepleinfo.assessmentScoreVO.remark==""?'无':this.poepleinfo.assessmentScoreVO.remark}}</span>
      </p>
    </div>
  </div>
</template>
@@ -79,6 +90,8 @@
      let beId = "";
      if (parseFloat(this.score) > 100 + this.poepleinfo.rangeVal) {
        this.$toast.fail("超出评分范围");
      } else if (parseFloat(this.score) < 100 - this.poepleinfo.rangeVal) {
        this.$toast.fail("低于评分范围");
      } else {
        if (this.poepleinfo.userId != undefined) {
          beId = this.poepleinfo.userId;
@@ -125,10 +138,10 @@
    flex-direction: column;
    align-items: center;
    img {
      width: 100px;
      height: 100px;
      width: 60px;
      height: 60px;
      border-radius: 100px;
      margin: 10px 0px 10px 0px;
      margin: 10px 0px 0px 0px;
    }
    p {
      font-size: 20px;
@@ -137,59 +150,70 @@
    }
  }
  .Info {
    display: flex;
    p {
      margin: 10px;
    }
    span:nth-child(1) {
      font-size: 14px;
      color: #666666;
      line-height: 30px;
    }
    span:nth-child(2) {
      font-size: 18px;
      text-align: center;
      line-height: 30px;
    }
    div {
      flex: 1;
      padding: 0px 5px;
      display: flex;
      flex-direction: column;
      align-items: center;
      p {
        line-height: 30px;
      }
      p:nth-child(1) {
        font-size: 14px;
        color: #666666;
      }
      p:nth-child(2) {
        font-size: 18px;
        text-align: center;
      }
    }
  }
  .illustrate {
    color: #999999;
    font-size: 14px;
    margin: 10px 0px;
    margin: 10px 10px;
  }
  .title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin: 20px;
  }
  .van-field {
    border: 1px solid #dee1e7;
    border-radius: 5px;
    font-size: 18px;
  }
  .van-button {
    margin-top: 30px;
    margin: 30px 0px 0px auto;
    width: 150px;
    background: linear-gradient(163deg, #01bdfc 0%, #017bfc 100%);
  }
  .showdetails {
    font-size: 20px;
    line-height: 20px;
    .fraction {
      font-size: 30px;
  .todetails {
    .title {
      font-size: 20px;
      margin: 10px;
      text-align: center;
      color: #017bfc;
      font-weight: bold;
    }
    .instruct {
      color: #999999;
  }
  .showdetails {
    margin-top: 20px;
    p {
      display: flex;
      align-items: center;
      margin: 10px;
    }
    .title {
      font-size: 14px;
      color: #666666;
    }
    .fraction {
      font-size: 18px;
      text-align: center;
      line-height: 30px;
    }
    .instruct {
      font-size: 18px;
      text-align: center;
      line-height: 30px;
    }
  }
}
vue.config.js
@@ -125,24 +125,28 @@
  devServer: {
    proxy: {
      // 中台接口
      "/services": {
        target: "https://sk.hubeishuiyi.cn",
        changeOrigin: true, //开启代理跨域
        // pathRewrite: {
        //     "^/services": "/",
        // },
      },
      // // 中台接口
      // "/services": {
      //   target: "https://sk.hubeishuiyi.cn",
      //   changeOrigin: true, //开启代理跨域
      //   // pathRewrite: {
      //   //     "^/services": "/",
      //   // },
      // },
      // 业务平台接口
      "/api": {
        // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
        // target: "http://127.0.0.1",
        target: "https://132v69t077.yicp.fun",
        target: "http://127.0.0.1",
        // target: "https://132v69t077.yicp.fun",
        // target: 'http://192.168.1.91: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": "/"
        }
      },
    },
  },