This commit is contained in:
2025-07-03 20:51:47 +08:00
parent 800576de3c
commit 942b89a802
28 changed files with 3970 additions and 8 deletions

View File

@ -0,0 +1,136 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {
KnowledgeDocumentVO,
KnowledgeDocumentForm,
KnowledgeDocumentQuery,
KnowledgeDocumentPutFileNameQuery
} from '@/api/design/technicalStandard/types';
/**
* 查询安全知识库列表
* @param query
* @returns {*}
*/
export const listKnowledgeDocument = (query?: any): AxiosPromise<KnowledgeDocumentVO[]> => {
return request({
url: '/design/technicalStandard/file/page',
method: 'get',
params: query
});
};
/**
* 查询安全知识库详细
* @param id
*/
export const getKnowledgeDocument = (id: string | number): AxiosPromise<KnowledgeDocumentVO> => {
return request({
url: '/design/technicalStandard/' + id,
method: 'get'
});
};
/**
* 新增安全知识库
* @param data
*/
export const addKnowledgeDocument = (data: { file: string }, query: { projectId: string; pid: string }) => {
return request({
url: '/design/technicalStandard/file',
method: 'post',
data: data,
params: query
});
};
/**
* 修改安全知识库
* @param data
*/
export const updateKnowledgeDocument = (data: KnowledgeDocumentForm) => {
return request({
url: '/design/technicalStandard',
method: 'put',
data: data
});
};
/**
* 删除安全知识库
* @param id
*/
export const delKnowledgeDocument = (id: string | number | Array<string | number>) => {
return request({
url: '/design/technicalStandard/file/' + id,
method: 'delete'
});
};
/**
* 查询安全知识库文件树列表
* @param id
*/
export const treeStructureData = (projectId: string | number): AxiosPromise<KnowledgeDocumentVO> => {
return request({
url: '/design/technicalStandard/folder/tree/list',
method: 'get',
params: { projectId }
});
};
/**
* 修改安全知识库
* @param data
*/
export const documentDataEdit = (data: KnowledgeDocumentPutFileNameQuery) => {
return request({
url: '/design/technicalStandard/file',
method: 'put',
data: data
});
};
//查询质量知识库文件下载列表
export const getUniFolderDownloadList = (id: string): AxiosPromise<KnowledgeDocumentVO> => {
return request({
url: '/design/technicalStandard/file/list/' + id,
method: 'get'
});
};
//查询安全知识库回收站文件列表
export const documentDataAllList = (query: any) => {
return request({
url: '/design/technicalStandard/recycleBin/list',
method: 'get',
params: query
});
};
/**
* 根据主键id批量恢复
* @param data
*/
export const dataRecyclingStation = (ids: string) => {
return request({
url: '/design/technicalStandard/recovery/' + ids,
method: 'post'
});
};
/**
* 根据主键id批量删除
* @param data
*/
export const templateRecycleBin = (ids: string) => {
return request({
url: '/design/technicalStandard/file/recycleBin/' + ids,
method: 'delete'
});
};
export const getProfileDetail = (data: any): AxiosPromise<KnowledgeDocumentVO> => {
return request({});
};

View File

@ -0,0 +1,175 @@
export interface KnowledgeDocumentVO {
/**
* 主键id
*/
id: string | number;
/**
* 项目id
*/
projectId: string | number;
/**
* 父级0代表顶级
*/
pid: string | number;
/**
* 文件名称
*/
fileName: string;
/**
* 文件路径
*/
filePath: string;
/**
* 文件访问路径
*/
fileUrl: string;
/**
* 文件类型1文件夹 2文件 3图片
*/
fileType: string;
/**
* 文件后缀
*/
fileSuffix: string;
/**
* 状态0正常 1删除
*/
fileStatus: string;
/**
* 原文件名
*/
originalName: string;
/**
* 备注
*/
remark: string;
/**
* 子对象
*/
children: KnowledgeDocumentVO[];
}
export interface KnowledgeDocumentForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 项目id
*/
projectId?: string | number;
/**
* 父级0代表顶级
*/
pid?: string | number;
/**
* 文件名称
*/
fileName?: string;
/**
* 文件路径
*/
filePath?: string;
/**
* 文件访问路径
*/
fileUrl?: string;
/**
* 文件类型1文件夹 2文件 3图片
*/
fileType?: string;
/**
* 文件后缀
*/
fileSuffix?: string;
/**
* 状态0正常 1删除
*/
fileStatus?: string;
/**
* 原文件名
*/
originalName?: string;
/**
* 备注
*/
remark?: string;
}
export interface KnowledgeDocumentPutFileNameQuery {
id: string | number;
fileName: string;
}
export interface KnowledgeDocumentQuery {
/**
* 项目id
*/
projectId?: string | number;
/**
* 父级0代表顶级
*/
pid?: string | number;
/**
* 文件名称
*/
fileName?: string;
/**
* 文件路径
*/
filePath?: string;
/**
* 文件访问路径
*/
fileUrl?: string;
/**
* 文件类型1文件夹 2文件 3图片
*/
fileType?: string;
/**
* 文件后缀
*/
fileSuffix?: string;
/**
* 状态0正常 1删除
*/
fileStatus?: string;
/**
* 原文件名
*/
originalName?: string;
/**
* 日期范围参数
*/
params?: any;
}