From 4adcfacc12e6427ff947e9de956c9ae5516dfe4e Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Tue, 24 Sep 2024 16:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9B=B4=E5=A4=9A=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/DraftApi.ts | 23 +++++++----- src/api/PublishApi.ts | 1 + src/pages/IscsDraftManage.vue | 62 ++++++++++++++++++++++++--------- src/pages/IscsPublishManage.vue | 53 +++++++++++++++++++++++----- 4 files changed, 105 insertions(+), 34 deletions(-) diff --git a/src/api/DraftApi.ts b/src/api/DraftApi.ts index 29cb8d1..304c358 100644 --- a/src/api/DraftApi.ts +++ b/src/api/DraftApi.ts @@ -21,6 +21,14 @@ export const iscsStyleOption = [ }, ]; +export const searchTscsStyleOption = [ + { + label: '全部', + value: IscsStyle.UNKNOWN, + }, + ...iscsStyleOption, +]; + export interface DraftItem { id: number; name: string; @@ -34,7 +42,9 @@ export interface DraftItem { updatedAt: string; defaultReleaseDataName: string; } - +export interface IscsDataOptions { + style: IscsStyle; +} export interface PagingQueryParams { paging: { page: number; @@ -42,9 +52,10 @@ export interface PagingQueryParams { }; query: { dataType: DraftDataType; - userId?: number; + options?: IscsDataOptions; name?: string; isShared?: boolean; + userId?: number; }; } export interface DraftIscsDataDto { @@ -52,9 +63,6 @@ export interface DraftIscsDataDto { options: IscsDataOptions; } -export interface IscsDataOptions { - style: IscsStyle; -} export async function draftPageQuery( params: PagingQueryParams ): Promise> { @@ -208,10 +216,7 @@ export function saveDraft(variables: { id: number; data: string }) { * @param variables * @returns */ -export async function saveAsDraft(variables: { - id: number; - name: string; -}) { +export async function saveAsDraft(variables: { id: number; name: string }) { const mutation = ` mutation saveAsNewDraftData($id: Int,$name: String) { saveAsNewDraftData(id: $id,name: $name){ diff --git a/src/api/PublishApi.ts b/src/api/PublishApi.ts index fe4d46a..52f503c 100644 --- a/src/api/PublishApi.ts +++ b/src/api/PublishApi.ts @@ -26,6 +26,7 @@ interface PagingQueryParams { userId?: number; name?: string; isPublished?: boolean; + options?: IscsDataOptions; }; } export interface PublishIscsDataDto { diff --git a/src/pages/IscsDraftManage.vue b/src/pages/IscsDraftManage.vue index 8be2fc9..b41fe80 100644 --- a/src/pages/IscsDraftManage.vue +++ b/src/pages/IscsDraftManage.vue @@ -15,19 +15,35 @@ @request="onRequest" >