fix
parent
08ca6413b5
commit
dd6087a257
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": {
|
||||
"title": "查询项目文档",
|
||||
"description": "GET /safetyEval-h5/wsp/doc/getDocByProjectId",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/safetyEval-h5/wsp/doc/getDocByProjectId": {
|
||||
"get": {
|
||||
"summary": "查询项目文档",
|
||||
"tags": ["WPS回调接口"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "projectId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SingleResponseWpsDocOpenCO"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SingleResponseWpsDocOpenCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"errCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"errMessage": {
|
||||
"type": "string"
|
||||
},
|
||||
"traceId": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/WpsDocOpenCO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"WpsDocOpenCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fileId": {
|
||||
"type": "string",
|
||||
"description": "WPS file_id,唯一"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "文档名称"
|
||||
},
|
||||
"created": {
|
||||
"type": "boolean",
|
||||
"description": "是否本次新建"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// GET /safetyEval-h5/wsp/doc/getDocByProjectId
|
||||
// 详见同目录 spec.json
|
||||
|
||||
export interface Query {
|
||||
/** 项目ID */
|
||||
projectId: string;
|
||||
}
|
||||
|
||||
export interface WpsDocOpenCO {
|
||||
/** WPS file_id,唯一 */
|
||||
fileId: string;
|
||||
/** 文档名称 */
|
||||
name: string;
|
||||
/** 是否本次新建 */
|
||||
created: boolean;
|
||||
}
|
||||
|
||||
export interface SingleResponseWpsDocOpenCO {
|
||||
success: boolean;
|
||||
errCode: string;
|
||||
errMessage: string;
|
||||
traceId: string;
|
||||
data: WpsDocOpenCO;
|
||||
}
|
||||
|
|
@ -18,6 +18,12 @@ export const createWpsDoc = declareRequest(
|
|||
'wpsDoc: {} | res.data || {}',
|
||||
);
|
||||
|
||||
export const getDocByProjectId = declareRequest(
|
||||
"getDocByProjectIdLoading",
|
||||
"Get > /safetyEval-h5/wsp/doc/getDocByProjectId",
|
||||
'wpsDoc: {} | res.data || {}',
|
||||
);
|
||||
|
||||
export const downloadWpsDoc = declareRequest(
|
||||
"downloadDocLoading",
|
||||
"Get > /safetyEval-h5/wsp/v3/3rd/files/{fileId}/download",
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ const EvalProjectMonitorDetail = (props) => {
|
|||
evalSurveyList,
|
||||
evalSurveyPage,
|
||||
evalProjectDetail,
|
||||
queryMyOrCreateDoc,
|
||||
getDocByProjectId,
|
||||
} = props;
|
||||
const {
|
||||
contractLoading,
|
||||
|
|
@ -407,7 +407,7 @@ const EvalProjectMonitorDetail = (props) => {
|
|||
useEffect(() => {
|
||||
if (projectId) {
|
||||
evalProjectDetail({ id: projectId });
|
||||
|
||||
getDocByProjectId({ projectId });
|
||||
}
|
||||
fetchContract();
|
||||
fetchTeam();
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ const App = (props) => {
|
|||
mount: document.getElementById("app-wps"),
|
||||
fileId: fileId,
|
||||
token: sessionStorage.getItem("token"),
|
||||
customArgs: {
|
||||
readOnly,
|
||||
},
|
||||
...(readOnly ? { commonOptions: { isBrowserViewMode: true } } : {}),
|
||||
});
|
||||
await instance.ready();
|
||||
|
|
|
|||
Loading…
Reference in New Issue