质量管理/安全知识库
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { KnowledgeDocumentVO, KnowledgeDocumentForm, KnowledgeDocumentQuery } from '@/api/quality/knowledgeDocument/types';
|
||||
import { KnowledgeDocumentPutFileNameQuery } from '@/api/safety/knowledgeDocument/types';
|
||||
|
||||
/**
|
||||
* 查询质量知识库列表
|
||||
@ -10,7 +11,7 @@ import { KnowledgeDocumentVO, KnowledgeDocumentForm, KnowledgeDocumentQuery } fr
|
||||
|
||||
export const listKnowledgeDocument = (query?: KnowledgeDocumentQuery): AxiosPromise<KnowledgeDocumentVO[]> => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/list',
|
||||
url: '/quality/knowledgeDocument/file/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
@ -31,9 +32,9 @@ export const getKnowledgeDocument = (id: string | number): AxiosPromise<Knowledg
|
||||
* 新增质量知识库
|
||||
* @param data
|
||||
*/
|
||||
export const addKnowledgeDocument = (data: KnowledgeDocumentForm) => {
|
||||
export const addKnowledgeDocument = (data: { file: string }, query: { projectId: string; pid: string }) => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument',
|
||||
url: '/quality/knowledgeDocument/file',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -57,7 +58,7 @@ export const updateKnowledgeDocument = (data: KnowledgeDocumentForm) => {
|
||||
*/
|
||||
export const delKnowledgeDocument = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/' + id,
|
||||
url: '/quality/knowledgeDocument/file/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
@ -74,6 +75,57 @@ export const treeStructureData = (projectId: string | number): AxiosPromise<Know
|
||||
});
|
||||
};
|
||||
|
||||
export const uniFolderDownload = (data: any): AxiosPromise<KnowledgeDocumentVO> => {
|
||||
/**
|
||||
* 修改安全知识库
|
||||
* @param data
|
||||
*/
|
||||
export const documentDataEdit = (data: KnowledgeDocumentPutFileNameQuery) => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/file',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
//查询质量知识库文件下载列表
|
||||
export const getUniFolderDownloadList = (id: string): AxiosPromise<KnowledgeDocumentVO> => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/file/list/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
//查询安全知识库回收站文件列表
|
||||
export const documentDataAllList = (query: any) => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/recycleBin/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据主键id批量恢复
|
||||
* @param data
|
||||
*/
|
||||
export const dataRecyclingStation = (ids: string) => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/recovery/' + ids,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据主键id批量删除
|
||||
* @param data
|
||||
*/
|
||||
export const templateRecycleBin = (ids: string) => {
|
||||
return request({
|
||||
url: '/quality/knowledgeDocument/file/recycleBin/' + ids,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
export const getProfileDetail = (data: any): AxiosPromise<KnowledgeDocumentVO> => {
|
||||
return request({});
|
||||
};
|
||||
|
@ -13,9 +13,9 @@ import {
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listKnowledgeDocument = (query?: KnowledgeDocumentQuery): AxiosPromise<KnowledgeDocumentVO[]> => {
|
||||
export const listKnowledgeDocument = (query?: any): AxiosPromise<KnowledgeDocumentVO[]> => {
|
||||
return request({
|
||||
url: '/safety/knowledgeDocument/file/list',
|
||||
url: '/safety/knowledgeDocument/file/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
@ -92,8 +92,43 @@ export const documentDataEdit = (data: KnowledgeDocumentPutFileNameQuery) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const uniFolderDownload = (data: any): AxiosPromise<KnowledgeDocumentVO> => {
|
||||
return request({});
|
||||
//查询质量知识库文件下载列表
|
||||
export const getUniFolderDownloadList = (id: string): AxiosPromise<KnowledgeDocumentVO> => {
|
||||
return request({
|
||||
url: '/safety/knowledgeDocument/file/list/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
//查询安全知识库回收站文件列表
|
||||
export const documentDataAllList = (query: any) => {
|
||||
return request({
|
||||
url: '/safety/knowledgeDocument/recycleBin/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据主键id批量恢复
|
||||
* @param data
|
||||
*/
|
||||
export const dataRecyclingStation = (ids: string) => {
|
||||
return request({
|
||||
url: '/safety/knowledgeDocument/recovery/' + ids,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据主键id批量删除
|
||||
* @param data
|
||||
*/
|
||||
export const templateRecycleBin = (ids: string) => {
|
||||
return request({
|
||||
url: '/safety/knowledgeDocument/file/recycleBin/' + ids,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
export const getProfileDetail = (data: any): AxiosPromise<KnowledgeDocumentVO> => {
|
||||
|
Reference in New Issue
Block a user