-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from suyuan32/dev
Dev
- Loading branch information
Showing
23 changed files
with
572 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { BaseListResp } from '/@/api/model/baseModel'; | ||
|
||
/** | ||
* @description: Tag info response | ||
*/ | ||
export interface TagInfo { | ||
id: number; | ||
createdAt?: number; | ||
updatedAt?: number; | ||
status?: number; | ||
name?: string; | ||
remark?: string; | ||
} | ||
|
||
/** | ||
* @description: Tag list response | ||
*/ | ||
|
||
export type TagListResp = BaseListResp<TagInfo>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { defHttp } from '/@/utils/http/axios'; | ||
import { ErrorMessageMode } from '/#/axios'; | ||
import { BaseDataResp, BaseListReq, BaseResp, BaseIDsReq, BaseIDReq } from '/@/api/model/baseModel'; | ||
import { TagInfo, TagListResp } from './model/tagModel'; | ||
|
||
enum Api { | ||
CreateTag = '/fms-api/tag/create', | ||
UpdateTag = '/fms-api/tag/update', | ||
GetTagList = '/fms-api/tag/list', | ||
DeleteTag = '/fms-api/tag/delete', | ||
GetTagById = '/fms-api/tag', | ||
} | ||
|
||
/** | ||
* @description: Get tag list | ||
*/ | ||
|
||
export const getTagList = (params: BaseListReq, mode: ErrorMessageMode = 'notice') => { | ||
return defHttp.post<BaseDataResp<TagListResp>>( | ||
{ url: Api.GetTagList, params }, | ||
{ errorMessageMode: mode }, | ||
); | ||
}; | ||
|
||
/** | ||
* @description: Create a new tag | ||
*/ | ||
export const createTag = (params: TagInfo, mode: ErrorMessageMode = 'notice') => { | ||
return defHttp.post<BaseResp>( | ||
{ url: Api.CreateTag, params: params }, | ||
{ | ||
errorMessageMode: mode, | ||
successMessageMode: mode, | ||
}, | ||
); | ||
}; | ||
|
||
/** | ||
* @description: Update the tag | ||
*/ | ||
export const updateTag = (params: TagInfo, mode: ErrorMessageMode = 'notice') => { | ||
return defHttp.post<BaseResp>( | ||
{ url: Api.UpdateTag, params: params }, | ||
{ | ||
errorMessageMode: mode, | ||
successMessageMode: mode, | ||
}, | ||
); | ||
}; | ||
|
||
/** | ||
* @description: Delete tags | ||
*/ | ||
export const deleteTag = (params: BaseIDsReq, mode: ErrorMessageMode = 'notice') => { | ||
return defHttp.post<BaseResp>( | ||
{ url: Api.DeleteTag, params: params }, | ||
{ | ||
errorMessageMode: mode, | ||
successMessageMode: mode, | ||
}, | ||
); | ||
}; | ||
|
||
/** | ||
* @description: Get tag By ID | ||
*/ | ||
export const getTagById = (params: BaseIDReq, mode: ErrorMessageMode = 'notice') => { | ||
return defHttp.post<BaseDataResp<TagInfo>>( | ||
{ url: Api.GetTagById, params: params }, | ||
{ | ||
errorMessageMode: mode, | ||
}, | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
export default { | ||
file: { | ||
// noun | ||
fileName: 'File Name', | ||
fileType: 'File Type', | ||
filePath: 'File Path', | ||
fileSize: 'File Size', | ||
video: 'Video', | ||
audio: 'Audio', | ||
image: 'Image', | ||
other: 'Other', | ||
public: 'Public', | ||
private: 'Private', | ||
download: 'Download', | ||
fileList: 'File List', | ||
// notification | ||
overSizeError: 'The file is over size', | ||
wrongTypeError: 'The file type is illegal', | ||
preprocessing: 'File is preprocessing ...', | ||
copyURLFailed: 'Copy the file path failed, please copy manually', | ||
copyURLSuccess: 'Copy the path successfully', | ||
copyURL: 'Copy URL', | ||
uploadFirst: 'Please upload the file firstly', | ||
|
||
addFile: 'Add File', | ||
editFile: 'Edit File', | ||
}, | ||
tag: { | ||
tag: 'Tags', | ||
status: 'Status', | ||
name: 'Name', | ||
remark: 'Remark', | ||
addTag: 'Add Tag', | ||
editTag: 'Edit Tag', | ||
tagList: 'Tag List', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
export default { | ||
file: { | ||
// noun | ||
fileName: '文件名称', | ||
fileType: '文件类型', | ||
filePath: '文件路径', | ||
fileSize: '文件大小', | ||
video: '视频', | ||
audio: '音频', | ||
image: '图片', | ||
other: '其他', | ||
public: '公开', | ||
private: '私密', | ||
download: '下载', | ||
fileList: '文件列表', | ||
// notification | ||
overSizeError: '文件大小超过规定值', | ||
wrongTypeError: '文件类型不合法', | ||
preprocessing: '文件预处理中...', | ||
copyURLFailed: '复制文件地址失败,请手动复制', | ||
copyURLSuccess: '复制文件地址成功', | ||
copyURL: '复制地址', | ||
uploadFirst: '请先上传文件', | ||
|
||
addFile: '添加文件', | ||
editFile: '编辑文件', | ||
}, | ||
tag: { | ||
tag: '标签', | ||
status: '状态', | ||
name: '标签名称', | ||
remark: '备注', | ||
addTag: '添加标签', | ||
editTag: '编辑标签', | ||
tagList: '标签列表', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.