优化
This commit is contained in:
parent
4efbb76ee8
commit
7a41945f41
@ -1,5 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import { Message, Loading } from 'element-ui'
|
||||
import Vue from 'vue'
|
||||
// const id = Loading.service({
|
||||
// target: document.querySelector('.appamin'),
|
||||
// background: 'rgba(255, 255, 255, 0.1)',
|
||||
@ -38,6 +39,8 @@ service.interceptors.request.use(config => {
|
||||
// if (getToken() && !isToken) {
|
||||
// config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
// }
|
||||
console.log('Vue: ', Vue)
|
||||
config.headers['token'] = Vue.cookie.get('token') || ''
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
|
||||
@ -71,12 +71,16 @@ export default {
|
||||
},
|
||||
|
||||
async handSaveBasisc () {
|
||||
console.log('this.templateForm: ', this.templateForm)
|
||||
if (!this.basisForm.name) {
|
||||
return this.$message.error('请输入考评组名称')
|
||||
}
|
||||
if (!this.basisForm.depIds && !this.basisForm.staffIds) {
|
||||
return this.$message.error('请选择被考核人员')
|
||||
}
|
||||
if (this.templateForm.modelItems.length === 0) {
|
||||
return this.$message.error('请填写考核维度')
|
||||
}
|
||||
this.loadings = true
|
||||
try {
|
||||
let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user