ldap user import

This commit is contained in:
Eric
2020-06-16 19:07:46 +08:00
parent 2792e0c303
commit b953c6c5a2

View File

@@ -147,18 +147,10 @@ export default {
value['AUTH_LDAP_BIND_PASSWORD'] = '' value['AUTH_LDAP_BIND_PASSWORD'] = ''
} }
testLdapSetting(value).then(resp => { testLdapSetting(value).then(resp => {
this.$notify({ this.$message.success(resp)
message: resp,
type: 'success',
duration: 4500
})
}).catch(err => { }).catch(err => {
const response = err.response const response = err.response
this.$notify({ this.$message.error(response.data)
message: response.data,
type: 'error',
duration: 4500
})
}) })
}.bind(this) }.bind(this)
}, },
@@ -172,7 +164,6 @@ export default {
title: this.$t('setting.ldapBulkImport'), title: this.$t('setting.ldapBulkImport'),
callback: function(value, form) { callback: function(value, form) {
this.dialogLdapUserImport = true this.dialogLdapUserImport = true
this.$refs.listTable.reloadTable()
}.bind(this) }.bind(this)
} }
], ],
@@ -201,12 +192,7 @@ export default {
can: true, can: true,
callback: function() { callback: function() {
refreshLdapUserCache().then(res => { refreshLdapUserCache().then(res => {
this.$notify({ this.$message.success(res.msg)
message: res.msg,
type: 'success',
duration: 4500
})
setTimeout(this.$refs.listTable.reloadTable, 500)
}) })
}.bind(this) }.bind(this)
} }
@@ -238,18 +224,10 @@ export default {
}, },
testUerLoginClick() { testUerLoginClick() {
testLdapUserLogin(this.userLoginForm).then(res => { testLdapUserLogin(this.userLoginForm).then(res => {
this.$notify({ this.$message.success(res)
message: res,
type: 'success',
duration: 4500
})
}).catch(err => { }).catch(err => {
const response = err.response const response = err.response
this.$notify({ this.$message.error(response.data)
message: response.data,
type: 'error',
duration: 4500
})
}) })
}, },
importUserClick() { importUserClick() {
@@ -259,22 +237,12 @@ export default {
username_list: selectIds username_list: selectIds
} }
importLdapUser(data).then(res => { importLdapUser(data).then(res => {
this.$notify({ this.$message.success(res.msg)
message: res.msg,
type: 'success',
duration: 4500
})
}) })
}, },
handlerListTableXHRError(errMsg) { handlerListTableXHRError(errMsg) {
const response = errMsg.response
if (this.dialogLdapUserImport) { if (this.dialogLdapUserImport) {
this.$notify({ setTimeout(this.$refs.listTable.reloadTable, 3000)
message: response.data.msg,
type: 'error',
duration: 4500
})
setTimeout(this.$refs.listTable.reloadTable, 1000)
} }
} }
} }