From c7ea6db08fbc0d0fb3847d0b429ed2e76b6c21c7 Mon Sep 17 00:00:00 2001 From: lvxudong Date: Fri, 17 Nov 2023 18:20:20 +0800 Subject: [PATCH] up --- src/api/question/label/index.ts | 14 +++- src/api/question/label/types.ts | 5 ++ src/api/question/title/types.ts | 8 ++- src/views/question/title/index.vue | 100 ++++++++++++++++------------- 4 files changed, 79 insertions(+), 48 deletions(-) diff --git a/src/api/question/label/index.ts b/src/api/question/label/index.ts index 7a77795..652d00a 100644 --- a/src/api/question/label/index.ts +++ b/src/api/question/label/index.ts @@ -1,13 +1,12 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { LabelVO, LabelForm, LabelQuery } from '@/api/question/label/types'; +import { LabelVO, LabelForm, LabelQuery, QuestionLabel } from '@/api/question/label/types'; /** * 查询题目标签列表 * @param query * @returns {*} */ - export const listLabel = (query?: LabelQuery): AxiosPromise => { return request({ url: '/question/label/list', @@ -16,6 +15,17 @@ export const listLabel = (query?: LabelQuery): AxiosPromise => { }); }; +/** + * 查询所有的标签 + * @returns {*} + */ +export const queryAllLabel = (): AxiosPromise => { + return request({ + url: '/question/label/queryLabels', + method: 'get' + }); +}; + /** * 状态修改 */ diff --git a/src/api/question/label/types.ts b/src/api/question/label/types.ts index deb5951..c724227 100644 --- a/src/api/question/label/types.ts +++ b/src/api/question/label/types.ts @@ -16,6 +16,11 @@ export interface LabelVO { } +export interface QuestionLabel { + value: string; + label: string; +} + export interface LabelForm extends BaseEntity { /** * diff --git a/src/api/question/title/types.ts b/src/api/question/title/types.ts index b3147ae..de0e48e 100644 --- a/src/api/question/title/types.ts +++ b/src/api/question/title/types.ts @@ -1,6 +1,6 @@ export interface TitleVO { /** - * + * */ id: string | number; @@ -14,11 +14,13 @@ export interface TitleVO { */ labelId: string | number; + labelName : string; + } export interface TitleForm extends BaseEntity { /** - * + * */ id?: string | number; @@ -32,6 +34,8 @@ export interface TitleForm extends BaseEntity { */ labelId?: string | number; + labelName : string; + } export interface TitleQuery extends PageQuery { diff --git a/src/views/question/title/index.vue b/src/views/question/title/index.vue index 725cee4..14638e3 100644 --- a/src/views/question/title/index.vue +++ b/src/views/question/title/index.vue @@ -1,19 +1,16 @@