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 || {}',
|
'wpsDoc: {} | res.data || {}',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const getDocByProjectId = declareRequest(
|
||||||
|
"getDocByProjectIdLoading",
|
||||||
|
"Get > /safetyEval-h5/wsp/doc/getDocByProjectId",
|
||||||
|
'wpsDoc: {} | res.data || {}',
|
||||||
|
);
|
||||||
|
|
||||||
export const downloadWpsDoc = declareRequest(
|
export const downloadWpsDoc = declareRequest(
|
||||||
"downloadDocLoading",
|
"downloadDocLoading",
|
||||||
"Get > /safetyEval-h5/wsp/v3/3rd/files/{fileId}/download",
|
"Get > /safetyEval-h5/wsp/v3/3rd/files/{fileId}/download",
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,7 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
evalSurveyList,
|
evalSurveyList,
|
||||||
evalSurveyPage,
|
evalSurveyPage,
|
||||||
evalProjectDetail,
|
evalProjectDetail,
|
||||||
queryMyOrCreateDoc,
|
getDocByProjectId,
|
||||||
} = props;
|
} = props;
|
||||||
const {
|
const {
|
||||||
contractLoading,
|
contractLoading,
|
||||||
|
|
@ -407,7 +407,7 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (projectId) {
|
if (projectId) {
|
||||||
evalProjectDetail({ id: projectId });
|
evalProjectDetail({ id: projectId });
|
||||||
|
getDocByProjectId({ projectId });
|
||||||
}
|
}
|
||||||
fetchContract();
|
fetchContract();
|
||||||
fetchTeam();
|
fetchTeam();
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,9 @@ const App = (props) => {
|
||||||
mount: document.getElementById("app-wps"),
|
mount: document.getElementById("app-wps"),
|
||||||
fileId: fileId,
|
fileId: fileId,
|
||||||
token: sessionStorage.getItem("token"),
|
token: sessionStorage.getItem("token"),
|
||||||
|
customArgs: {
|
||||||
|
readOnly,
|
||||||
|
},
|
||||||
...(readOnly ? { commonOptions: { isBrowserViewMode: true } } : {}),
|
...(readOnly ? { commonOptions: { isBrowserViewMode: true } } : {}),
|
||||||
});
|
});
|
||||||
await instance.ready();
|
await instance.ready();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue