| | |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.department" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | > |
| | | </el-option> |
| | |
| | | formData.append('file', files[0]) |
| | | } |
| | | formData.append('action', 'import') |
| | | importUser(formData) |
| | | .then((response) => { |
| | | const res = response.data |
| | | if (res.code == 200) { |
| | | _this.importDialogFormVisible = false |
| | | _this.$message({ |
| | | message: '导入成功', |
| | | type: 'success' |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | parseError({ error: error, vm: _this }) |
| | | }) |
| | | importUser(formData).then((response) => { |
| | | const res = response.data |
| | | if (res.code == 200) { |
| | | _this.importDialogFormVisible = false |
| | | _this.$message({ |
| | | message: '导入成功', |
| | | type: 'success' |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }).catch((error) => { |
| | | parseError({ error: error, vm: _this }) |
| | | }) |
| | | }, |
| | | getProvince(){ |
| | | const _this = this |