diff --git a/src/api/question/label/index.ts b/src/api/question/label/index.ts index 4e4f893..7a77795 100644 --- a/src/api/question/label/index.ts +++ b/src/api/question/label/index.ts @@ -16,6 +16,21 @@ export const listLabel = (query?: LabelQuery): AxiosPromise => { }); }; +/** + * 状态修改 + */ +export const changeLabelStatus = (id: string | number, status: number) => { + const data = { + id, + status + }; + return request({ + url: '/question/label/changeStatus', + method: 'put', + data: data + }); +}; + /** * 查询题目标签详细 * @param id diff --git a/src/api/question/label/types.ts b/src/api/question/label/types.ts index fa4fa77..deb5951 100644 --- a/src/api/question/label/types.ts +++ b/src/api/question/label/types.ts @@ -1,6 +1,6 @@ export interface LabelVO { /** - * + * */ id: string | number; @@ -10,7 +10,7 @@ export interface LabelVO { label: string; /** - * 标签状态 1:启用 0:禁用 + * 标签状态 0:启用 1:禁用 */ status: number; @@ -18,7 +18,7 @@ export interface LabelVO { export interface LabelForm extends BaseEntity { /** - * + * */ id?: string | number; @@ -28,29 +28,24 @@ export interface LabelForm extends BaseEntity { label?: string; /** - * 标签状态 1:启用 0:禁用 + * 标签状态 0:启用 1:禁用 */ status?: number; - } export interface LabelQuery extends PageQuery { - /** * 标签名称 */ label?: string; /** - * 标签状态 1:启用 0:禁用 + * 标签状态 0:启用 1:禁用 */ status?: number; - /** - * 日期范围参数 - */ - params?: any; + /** + * 日期范围参数 + */ + params?: any; } - - - diff --git a/src/views/question/label/index.vue b/src/views/question/label/index.vue index e2d3835..aa6279c 100644 --- a/src/views/question/label/index.vue +++ b/src/views/question/label/index.vue @@ -6,6 +6,11 @@ + + + + + 搜索 重置 @@ -21,10 +26,14 @@ 新增 - 修改 + 修改 + - 删除 + + 删除 + 导出 @@ -33,11 +42,23 @@ - + - + - + + + - @@ -64,6 +84,13 @@ + + + {{ + dict.label + }} + +