|
|
@@ -150,26 +150,28 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- if(this.activeName === 'AD用户同步') {
|
|
|
- try {
|
|
|
- const response = await axios.get(`${apiUrl}/syncAD`, {
|
|
|
- params: {
|
|
|
- startDate: dayjs(this.form.startDate).format("YYYY-MM-DD"),
|
|
|
- endDate: dayjs(this.form.endDate).format("YYYY-MM-DD"),
|
|
|
- personNumber: this.form.personNum
|
|
|
- },
|
|
|
- timeout: 30000
|
|
|
- });
|
|
|
-
|
|
|
- // 直接使用response
|
|
|
- if(response.data.code === 200) {
|
|
|
- this.$message.success(response.data.data);
|
|
|
- } else {
|
|
|
- this.$message.error(response.data.data);
|
|
|
+ if(this.activeName==='AD用户同步'){
|
|
|
+ res = await axios({
|
|
|
+ url: `${apiUrl}/syncAD`,
|
|
|
+ method: 'get',
|
|
|
+ params:{
|
|
|
+ startDate:dayjs(this.form.startDate).format("YYYY-MM-DD"),
|
|
|
+ endDate:dayjs(this.form.endDate).format("YYYY-MM-DD"),
|
|
|
+ personNumber:this.form.personNum
|
|
|
+ },
|
|
|
+ headers: {
|
|
|
+ // Authorization: this.token,
|
|
|
+ 'Content-Type': 'application/json;charset=utf-8'
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(`请求失败: ${error.message}`);
|
|
|
- }
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.data.code == 200){
|
|
|
+ this.$message.success(res.data.data)
|
|
|
+ }else {
|
|
|
+ this.$message.error(res.data.data)
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if(this.activeName==='考勤打卡同步'){
|