diff --git a/backend/pom.xml b/backend/pom.xml
index 943f2b2737..da52fa1f95 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -107,10 +107,7 @@
shiro-spring
${shiro.version}
-
- org.springframework.boot
- spring-boot-starter-validation
-
+
org.apache.commons
commons-lang3
diff --git a/backend/src/main/java/io/dataease/plugins/server/XUserServer.java b/backend/src/main/java/io/dataease/plugins/server/XUserServer.java
new file mode 100644
index 0000000000..9b6ee5750c
--- /dev/null
+++ b/backend/src/main/java/io/dataease/plugins/server/XUserServer.java
@@ -0,0 +1,33 @@
+package io.dataease.plugins.server;
+
+import io.dataease.plugins.config.SpringContextUtil;
+import io.dataease.plugins.xpack.user.service.UserXpackService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+
+@Api(tags = "xpack:用户导入")
+@RequestMapping("/plugin/user")
+@RestController
+public class XUserServer {
+
+ @ApiOperation("下载模版")
+ @PostMapping("/template")
+ public void template(HttpServletResponse response) {
+ UserXpackService userXpackService = SpringContextUtil.getBean(UserXpackService.class);
+ userXpackService.templateDown(response);
+ }
+
+ @ApiOperation("导入")
+ @PostMapping("/upload")
+ public void upload(@RequestPart(value = "file", required = true) MultipartFile file, HttpServletResponse response) throws Exception{
+ UserXpackService userXpackService = SpringContextUtil.getBean(UserXpackService.class);
+ userXpackService.upload(file, response);
+ }
+}
diff --git a/frontend/src/api/system/dynamic.js b/frontend/src/api/system/dynamic.js
index 053c405aaa..e16d914cca 100644
--- a/frontend/src/api/system/dynamic.js
+++ b/frontend/src/api/system/dynamic.js
@@ -13,11 +13,14 @@ export function execute(options) {
return null
}
options.type = options.type || 'post'
-
- return request({
+ const param = {
url: options.url,
method: options.type,
loading: true,
data: options.data
- })
+ }
+ if (options.responseType) {
+ param.responseType = options.responseType
+ }
+ return request(param)
}
diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss
index b4741d71da..45ed875c0d 100644
--- a/frontend/src/styles/index.scss
+++ b/frontend/src/styles/index.scss
@@ -975,3 +975,6 @@ div:focus {
border: none !important;
}
}
+.user-import-class>.el-dialog__body {
+ padding-bottom: 1px;
+}
diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue
index a677aa3a4f..7964fe9816 100644
--- a/frontend/src/views/system/user/index.vue
+++ b/frontend/src/views/system/user/index.vue
@@ -10,6 +10,10 @@
@click="create"
>{{ $t("user.create") }}
+
+
+
+