ソースを参照

Fix 修复用户导入导出出错的问题

YueYunyun 1 年間 前
コミット
476ab51ca8

+ 5 - 0
SERVER/VberAdminPlusV3/vber-modules/vber-system/src/main/java/com/vber/system/domain/vo/SysUserVo.java

@@ -92,6 +92,11 @@ public class SysUserVo implements Serializable {
      * 帐号状态(0正常 1停用)
      */
     private String status;
+    
+    /**
+     * 组织结构负责人
+     */
+    private String leaderName;
 
     /**
      * 最后登录IP

+ 10 - 2
UI/VAP_V3.VUE/src/components/upload/ImportModal.vue

@@ -4,6 +4,7 @@ const props = withDefaults(
 		options?: any
 		url?: string
 		templateUrl?: string
+		templateConfig?: any
 		templateName?: string
 		isAlertError?: boolean
 		accept?: string
@@ -15,7 +16,13 @@ const props = withDefaults(
 		title: "",
 		headers: () => {
 			return {
-				Authorization: "Bearer " + getToken()
+				Authorization: "Bearer " + getToken(),
+				ClientId: import.meta.env.VITE_APP_CLIENT_ID
+			}
+		},
+		templateConfig: () => {
+			return {
+				method: "post"
 			}
 		},
 		accept: ".xlsx, .xls",
@@ -72,7 +79,8 @@ function importTemplate() {
 	download(
 		opts.value.templateUrl,
 		{},
-		`${opts.value.templateName}_TEMPLATE_${new Date().getTime()}.xlsx`
+		`${opts.value.templateName}_TEMPLATE_${new Date().getTime()}.xlsx`,
+		props.templateConfig
 	)
 }
 function init() {

+ 6 - 2
UI/VAP_V3.VUE/src/views/system/user/index.vue

@@ -19,6 +19,7 @@ const tableOpts = reactive({
 		{ field: "userName", name: `用户名称` },
 		{ field: "nickName", name: `用户昵称` },
 		{ field: "orgName", name: `部门` },
+		{ field: "leaderName", name: `部门负责人` },
 		{ field: "phonenumber", name: `手机号码` },
 		{ field: "status", name: `状态` },
 		{ field: "createTime", name: `创建时间` },
@@ -106,7 +107,8 @@ const tableOpts = reactive({
 			handleDelete(rows)
 		},
 		handleImport,
-		handleExport
+		handleExport,
+		handleResetPwd
 	}
 })
 const { permission, columns, queryParams, searchFormItems, handleFuns } = toRefs(tableOpts)
@@ -384,7 +386,9 @@ const handleFileSuccess = () => {
 	handleQuery()
 }
 function handleExport() {
-	download(apis.system.userApi.exportUrl, { ...queryParams }, `USER_${new Date().getTime()}.xlsx`)
+	download(apis.system.userApi.exportUrl, { ...queryParams }, `USER_${new Date().getTime()}.xlsx`, {
+		method: "POST"
+	})
 }
 /** 用户状态修改  */
 function handleStatusChange(row: any) {