| | |
| | | */ |
| | | 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({ |
| | |
| | | // 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) => { |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | 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) } |
| | | }); |
| | | } |
| | | } |
| | |
| | | }, |
| | | |
| | | computed: {}, |
| | | created() {}, |
| | | created() { |
| | | this.counting = 0; |
| | | }, |
| | | methods: { |
| | | // 手机号校验 |
| | | usernamecheck(key) { |
| | |
| | | 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("验证码发送失败"); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // 登录 |
| | |
| | | <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 |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | <script> |
| | | import { Picker } from "vant"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | showPicker: false, |
| | | currentValue: "", // 用于绑定选择结果的变量 |
| | | columns: ["张三", "李四", "王五"] // 选择器的选项列表 |
| | | columns: ["张三", "李四", "王五"], // 选择器的选项列表 |
| | | poepleinfo: {} |
| | | }; |
| | | }, |
| | | |
| | |
| | | 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; |
| | |
| | | padding: 20px; |
| | | .title { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | line-height: 35px; |
| | | } |
| | | .info { |