1. Excel交互组件封装
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
55
apps/web-antd/src/api/spreadsheet-table-config.ts
Normal file
55
apps/web-antd/src/api/spreadsheet-table-config.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
import type { SpreadsheetConfigJson } from '#/views/business/warehouse-drug-management/admin/config/spreadsheetDefaults';
|
||||
|
||||
const prefix = 'spreadsheet-table-config/';
|
||||
|
||||
export interface SpreadsheetTableConfigItem {
|
||||
id: number;
|
||||
admin_id: number;
|
||||
table_name: string;
|
||||
sheet_key: string;
|
||||
name: string;
|
||||
is_default: number;
|
||||
config: SpreadsheetConfigJson;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
}
|
||||
|
||||
export async function listSpreadsheetTableConfig(params: {
|
||||
table_name: string;
|
||||
sheet_key?: string;
|
||||
}) {
|
||||
return requestClient.get<SpreadsheetTableConfigItem[]>(`${prefix}list`, {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getSpreadsheetTableConfigDetail(id: number) {
|
||||
return requestClient.get<SpreadsheetTableConfigItem>(`${prefix}detail`, {
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
export async function createSpreadsheetTableConfig(data: {
|
||||
table_name: string;
|
||||
sheet_key?: string;
|
||||
name: string;
|
||||
is_default?: boolean;
|
||||
config: SpreadsheetConfigJson;
|
||||
}) {
|
||||
return requestClient.post<SpreadsheetTableConfigItem>(`${prefix}create`, data);
|
||||
}
|
||||
|
||||
export async function updateSpreadsheetTableConfig(data: {
|
||||
id: number;
|
||||
name?: string;
|
||||
is_default?: boolean;
|
||||
config?: SpreadsheetConfigJson;
|
||||
}) {
|
||||
return requestClient.post<SpreadsheetTableConfigItem>(`${prefix}update`, data);
|
||||
}
|
||||
|
||||
export async function deleteSpreadsheetTableConfig(id: number) {
|
||||
return requestClient.post<boolean>(`${prefix}delete`, { id });
|
||||
}
|
||||
Reference in New Issue
Block a user