Skip to content

Commit 4a92792

Browse files
tesuntask
andauthored
初始化加入接口:/fileUploadAndDownload/editFileName (#1025)
* 初始化加入接口:/fileUploadAndDownload/editFileName Co-authored-by: task <121913992@qq.com>
1 parent 954859b commit 4a92792

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

server/source/system/api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func (i *initApi) InitializeData(ctx context.Context) (context.Context, error) {
9393

9494
{ApiGroup: "文件上传与下载", Method: "POST", Path: "/fileUploadAndDownload/upload", Description: "文件上传示例"},
9595
{ApiGroup: "文件上传与下载", Method: "POST", Path: "/fileUploadAndDownload/deleteFile", Description: "删除文件"},
96+
{ApiGroup: "文件上传与下载", Method: "POST", Path: "/fileUploadAndDownload/editFileName", Description: "文件名或者备注编辑"},
9697
{ApiGroup: "文件上传与下载", Method: "POST", Path: "/fileUploadAndDownload/getFileList", Description: "获取上传文件列表"},
9798

9899
{ApiGroup: "系统服务", Method: "POST", Path: "/system/getServerInfo", Description: "获取服务器信息"},

server/source/system/casbin.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
8989

9090
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/upload", V2: "POST"},
9191
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/deleteFile", V2: "POST"},
92+
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/editFileName", V2: "POST"},
9293
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/getFileList", V2: "POST"},
9394

9495
{PType: "p", V0: "888", V1: "/casbin/updateCasbin", V2: "POST"},
@@ -180,6 +181,7 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
180181
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/upload", V2: "POST"},
181182
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/getFileList", V2: "POST"},
182183
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/deleteFile", V2: "POST"},
184+
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/editFileName", V2: "POST"},
183185
{PType: "p", V0: "8881", V1: "/casbin/updateCasbin", V2: "POST"},
184186
{PType: "p", V0: "8881", V1: "/casbin/getPolicyPathByAuthorityId", V2: "POST"},
185187
{PType: "p", V0: "8881", V1: "/jwt/jsonInBlacklist", V2: "POST"},
@@ -221,6 +223,7 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
221223
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/upload", V2: "POST"},
222224
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/getFileList", V2: "POST"},
223225
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/deleteFile", V2: "POST"},
226+
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/editFileName", V2: "POST"},
224227
{PType: "p", V0: "9528", V1: "/casbin/updateCasbin", V2: "POST"},
225228
{PType: "p", V0: "9528", V1: "/casbin/getPolicyPathByAuthorityId", V2: "POST"},
226229
{PType: "p", V0: "9528", V1: "/jwt/jsonInBlacklist", V2: "POST"},

web/src/components/chooseImg/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ const editFileNameFunc = async(row) => {
127127
confirmButtonText: '确定',
128128
cancelButtonText: '取消',
129129
inputPattern: /\S/,
130-
inputErrorMessage: '不能为空'
130+
inputErrorMessage: '不能为空',
131+
inputValue: row.name
131132
}).then(async({ value }) => {
132133
row.name = value
133134
// console.log(row)

web/src/view/example/upload/upload.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ const editFileNameFunc = async(row) => {
169169
confirmButtonText: '确定',
170170
cancelButtonText: '取消',
171171
inputPattern: /\S/,
172-
inputErrorMessage: '不能为空'
172+
inputErrorMessage: '不能为空',
173+
inputValue: row.name
173174
}).then(async({ value }) => {
174175
row.name = value;
175176
//console.log(row)

0 commit comments

Comments
 (0)