2、维修知识管理
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import type { KnowledgeVO, KnowledgeForm, KnowledgeQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询维保知识管理列表
|
||||
* @param params
|
||||
* @returns 维保知识管理列表
|
||||
*/
|
||||
export function knowledgeList(params?: KnowledgeQuery) {
|
||||
return requestClient.get<PageResult<KnowledgeVO>>('/property/knowledge/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出维保知识管理列表
|
||||
* @param params
|
||||
* @returns 维保知识管理列表
|
||||
*/
|
||||
export function knowledgeExport(params?: KnowledgeQuery) {
|
||||
return commonExport('/property/knowledge/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询维保知识管理详情
|
||||
* @param id id
|
||||
* @returns 维保知识管理详情
|
||||
*/
|
||||
export function knowledgeInfo(id: ID) {
|
||||
return requestClient.get<KnowledgeVO>(`/property/knowledge/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增维保知识管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function knowledgeAdd(data: KnowledgeForm) {
|
||||
return requestClient.postWithMsg<void>('/property/knowledge', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新维保知识管理
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function knowledgeUpdate(data: KnowledgeForm) {
|
||||
return requestClient.putWithMsg<void>('/property/knowledge', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维保知识管理
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function knowledgeRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/knowledge/${id}`);
|
||||
}
|
129
apps/web-antd/src/api/property/maintenance/knowledge/model.d.ts
vendored
Normal file
129
apps/web-antd/src/api/property/maintenance/knowledge/model.d.ts
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface KnowledgeVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* 状态(0草稿1状态2已发布)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
covers: string;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
depict: string;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
releaseTime: string;
|
||||
|
||||
/**
|
||||
* 位置类型(0操作指引,1处理案例2常见问题)
|
||||
*/
|
||||
type: string;
|
||||
|
||||
}
|
||||
|
||||
export interface KnowledgeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* 状态(0草稿1状态2已发布)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
covers?: string;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
depict?: string;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
releaseTime?: string;
|
||||
|
||||
/**
|
||||
* 位置类型(0操作指引,1处理案例2常见问题)
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface KnowledgeQuery extends PageQuery {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* 状态(0草稿1状态2已发布)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
covers?: string;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
depict?: string;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
releaseTime?: string;
|
||||
|
||||
/**
|
||||
* 位置类型(0操作指引,1处理案例2常见问题)
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user