| | |
| | | |
| | | import request from "@/router/axios"; |
| | | |
| | | //获取登录用户id |
| | | export const assessmentSet = (params) => { |
| | | //获取验证码 |
| | | export const GetCode = (params) => { |
| | | return request({ |
| | | url: "/api/assessment/assessmentSet/list", |
| | | url: "/api/blade-auth/oauth/smsCode", |
| | | method: "get", |
| | | apiKey: true, |
| | | data: { |
| | | params: { |
| | | ...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", |
| | | url: "/api/blade-auth/oauth/token", |
| | | method: "post", |
| | | apiKey: true, |
| | | params: { |
| | |
| | | }, |
| | | }); |
| | | }; |
| | | //查看该用户需要进行的评分任务 |
| | | export const assessmentSet = (params) => { |
| | | return request({ |
| | | url: "/api/assessment/assessmentSet/list", |
| | | method: "get", |
| | | apiKey: true, |
| | | params: { |
| | | ...params, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | |
| | | //进行评分提交 |
| | | export const assessmentScore = (params) => { |
| | | return request({ |
| | | url: "/api/assessmentScore/assessmentScore/submit", |
| | | method: "post", |
| | | apiKey: true, |
| | | data: { |
| | | ...params, |
| | | }, |
| | | }); |
| | | }; |
| | | // 评优任务列表 |
| | | export const evaluateTask = (params) => { |
| | | return request({ |
| | |
| | | <!--考核--> |
| | | <template> |
| | | <div class="Checkandassess"> |
| | | <div class="view" v-for="(item,index) in ViewData" :key="index"> |
| | | <div |
| | | class="view" |
| | | v-for="(item,index) in ViewData" |
| | | :key="index" |
| | | v-show="item.assessmentTaskVO!=null" |
| | | > |
| | | <p class="TaskNumber"> |
| | | <span>考核任务编号:{{item.assessmentNo}}</span> |
| | | <span>考核任务编号:{{item.assessmentTaskVO.assessmentNo}}</span> |
| | | <span |
| | | :class="item.assessmentPurpose=='年终考核'?'evaluation':'evaluationget'" |
| | | >{{item.assessmentPurpose=='年终考核'?'待完成':'已完成'}}</span> |
| | | :class="item.assessmentScoreVO==null?'evaluation':'evaluationget'" |
| | | >{{item.assessmentScoreVO==null?'待完成':'已完成'}}</span> |
| | | </p> |
| | | <p class="Tasktime"> |
| | | <span>考核目的:</span> |
| | | <span>{{item.assessmentPurpose}}</span> |
| | | <span>{{item.assessmentTaskVO.assessmentPurpose}}</span> |
| | | </p> |
| | | <p class="Tasktime"> |
| | | <span>截止日期:</span> |
| | | <qspan>{{item.endTime}}</qspan> |
| | | <qspan>{{item.assessmentTaskVO.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> |
| | | <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> |
| | | </template> |
| | |
| | | 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 //考核人 |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | let toUserId = localStorage.getItem("tokensave"); |
| | | assessmentSet({ toUserId: toUserId }).then(res => { |
| | | this.ViewData = res.data.data.records; |
| | | console.log(res.data.data.records); |
| | | }); |
| | | // 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({ |
| | |
| | | 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, |
| | |
| | | docmHeight: document.documentElement.clientHeight, //默认屏幕高度 |
| | | showHeight: document.documentElement.clientHeight, //实时屏幕高度 |
| | | hidshow: true, //显示或者隐藏footer |
| | | comName: "message", //默认展示页 |
| | | comName: "examine", //默认展示页 |
| | | TabName: [], |
| | | ygTabName: [ |
| | | { |
| | |
| | | if (localStorage.getItem("Appraising") != null) { |
| | | this.comName = localStorage.getItem("Appraising"); |
| | | } |
| | | |
| | | }, |
| | | watch: { |
| | | showHeight: function() { |
| | |
| | | <img src="images/Code.png" /> |
| | | <van-field v-model="Code" placeholder="请输入验证码" /> |
| | | </div> |
| | | <div class="verification" @click="getCodes()"> |
| | | <p>{{ counting > 0 ? `${counting}秒后重新获取` : '获取验证码' }}</p> |
| | | <div class="verification"> |
| | | <p v-show="counting > 0">{{this.counting}}秒后重新获取</p> |
| | | <p v-show="counting == 0" @click="getCodes()">获取验证码</p> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="button"> |
| | | <van-button round block native-type="submit" @click="login()">登录</van-button> |
| | | </div> |
| | | <!-- <el-button type="success">登录</el-button> --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { showSuccessToast, showFailToast } from "vant"; |
| | | import { Loginto } from "@/api/hfiveget/index.js"; |
| | | import { GetCode, Loginto } from "@/api/hfiveget/index.js"; |
| | | import { setToken } from "@/utils/auth.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | username: "", |
| | | Code: "", |
| | | getCode: "", |
| | | counting: 0 |
| | | }; |
| | | }, |
| | |
| | | return true; |
| | | } |
| | | }, |
| | | // 验证码校验 |
| | | codecheck(key) { |
| | | if (key == null || key == "") { |
| | | this.$toast.fail("验证码错误"); |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | // 获取验证码 |
| | | getCodes() { |
| | | const isValid = this.usernamecheck(this.username); |
| | |
| | | this.counting--; |
| | | } |
| | | }, 1000); |
| | | let Data = { phone: this.username }; |
| | | GetCode(Data).then(res => {}); |
| | | } |
| | | }, |
| | | // 登录 |
| | | login() { |
| | | const isValid = this.usernamecheck(this.username); |
| | | if (isValid) { |
| | | this.$toast.success("登录成功"); |
| | | setTimeout(() => { |
| | | localStorage.setItem("Appraising", "message"); |
| | | localStorage.setItem("tokensave", "222"); |
| | | Loginto().then(res => { |
| | | 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 |
| | | }; |
| | | Loginto(Data).then(res => { |
| | | if (res.data.code == 400) { |
| | | this.$toast.fail(res.data.msg); |
| | | } else { |
| | | setTimeout(() => { |
| | | this.$router.push("/"); |
| | | }, 1000); |
| | | localStorage.setItem("Appraising", "message"); |
| | | localStorage.setItem("tokensave", res.data.user_id); |
| | | setToken(res.data.access_token); |
| | | }); |
| | | this.$router.push("/"); |
| | | }, 1000); |
| | | this.$toast.success("登录成功"); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | height: 60px; |
| | | background: linear-gradient(163deg, #01bdfc 0%, #017bfc 100%); |
| | | p { |
| | | font-size: 20px; |
| | | font-size: 14px; |
| | | color: white; |
| | | padding: 0px 15px; |
| | | line-height: 60px; |
| | |
| | | computed: {}, |
| | | created() { |
| | | this.isshownotnm = |
| | | localStorage.getItem("tokensave") == "222" ? true : false; |
| | | localStorage.getItem("tokensave") == "111" ? false : true; |
| | | }, |
| | | methods: { |
| | | // 图片预览 |
| | |
| | | <p>重要合伙人</p> |
| | | </div> |
| | | </div> |
| | | <p class="illustrate">说明:对当前评分,权重占40%,评分范围(100分制)±30</p> |
| | | <p class="title">评分</p> |
| | | <van-field |
| | | v-model="score" |
| | | placeholder="请输入评分" |
| | | readonly |
| | | clickable |
| | | @touchstart.stop="show = true" |
| | | /> |
| | | <van-number-keyboard v-model="score" :show="show" :maxlength="6" @blur="show = false" /> |
| | | <p class="title">评分说明</p> |
| | | <van-field v-model="instructions" rows="3" type="textarea" placeholder="请描述" /> |
| | | <van-button type="primary" block @click="submit()">提交</van-button> |
| | | <p |
| | | class="illustrate" |
| | | >说明:对当前评分,权重占{{this.poepleinfo.weight}}%,评分范围(100分制)±{{this.poepleinfo.rangeVal}}</p> |
| | | <div v-if="this.poepleinfo.assessmentScoreVO==null"> |
| | | <p class="title">评分</p> |
| | | <van-field |
| | | v-model="score" |
| | | placeholder="请输入评分" |
| | | readonly |
| | | clickable |
| | | @touchstart.stop="show = true" |
| | | /> |
| | | <van-number-keyboard v-model="score" :show="show" :maxlength="6" @blur="show = false" /> |
| | | <p class="title">评分说明</p> |
| | | <van-field v-model="instructions" rows="3" type="textarea" placeholder="请描述" /> |
| | | <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}}</p> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | <script> |
| | | import { assessmentScore } from "@/api/hfiveget/index.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | computed: {}, |
| | | mounted() { |
| | | localStorage.setItem("Appraising", "examine"); |
| | | console.log(JSON.parse(this.$route.query.info)); |
| | | this.poepleinfo = JSON.parse(this.$route.query.info); |
| | | console.log(this.poepleinfo); |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | submit() { |
| | | if (parseFloat(this.score) > 130) { |
| | | this.$toast.fail("评分值错误"); |
| | | if (parseFloat(this.score) > 100 + this.poepleinfo.rangeVal) { |
| | | this.$toast.fail("超出评分范围"); |
| | | } else { |
| | | this.$router.push({ |
| | | path: "/" |
| | | let Data = { |
| | | scoreUserId: localStorage.getItem("tokensave"), |
| | | remark: this.instructions, |
| | | scoreVal: this.score, |
| | | type: this.poepleinfo.assessmentTaskVO.type, |
| | | assessmentTaskId: this.poepleinfo.assessmentTaskVO.id, |
| | | beId: this.poepleinfo.userId |
| | | }; |
| | | assessmentScore(Data).then(res => { |
| | | this.$router.push({ |
| | | path: "/" |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | |
| | | display: flex; |
| | | div { |
| | | flex: 1; |
| | | padding: 0px 5px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | |
| | | margin-top: 30px; |
| | | background: linear-gradient(163deg, #01bdfc 0%, #017bfc 100%); |
| | | } |
| | | .showdetails { |
| | | font-size: 20px; |
| | | line-height: 20px; |
| | | } |
| | | .fraction { |
| | | font-size: 30px; |
| | | text-align: center; |
| | | color: #017bfc; |
| | | font-weight: bold; |
| | | } |
| | | .instruct { |
| | | color: #999999; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | "/api": { |
| | | // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址 |
| | | // target: "http://127.0.0.1", |
| | | target: "http://192.168.1.96:2888", |
| | | target: "http://192.168.1.88:2888", |
| | | // target: "http://192.168.0.100:82", |
| | | // target: "http://17.20.10.3:82", |
| | | // target: "http://10.141.11.11/api", |