This commit is contained in:
熊成强 2020-11-03 16:42:57 +08:00
parent 4efbb76ee8
commit 7a41945f41
2 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -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}))