4.1 同步发版内容到天梯
This commit is contained in:
@ -1,41 +0,0 @@
|
||||
import Weboffice4Path from '@/pages/webOffice/weboffice4Path';
|
||||
import { Modal } from 'antd';
|
||||
import React from 'react';
|
||||
|
||||
interface ViewModalProps {
|
||||
modalVisible: boolean;
|
||||
onCancel: () => void;
|
||||
title?: string;
|
||||
url?:string;
|
||||
}
|
||||
|
||||
const modalHeight = (window.innerHeight * 96) / 100;
|
||||
|
||||
const ViewModal: React.FC<ViewModalProps> = (props) => {
|
||||
const { modalVisible, onCancel, title,url } = props;
|
||||
const handleOk = () => {};
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
visible={modalVisible}
|
||||
title={title}
|
||||
onOk={handleOk}
|
||||
onCancel={onCancel}
|
||||
footer={null}
|
||||
width={'80%'}
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ height: modalHeight - 54, overflowY: 'auto' }}
|
||||
centered
|
||||
>
|
||||
{/* <Weboffice4Path
|
||||
path={
|
||||
'/api/biz-service-ebtp-extend/v1/export/kbjl?sectionId=1352452465177395202&assessRoomId=1352452788029751296&reviewTurnId=1352452788264632320&reviewTurnSort=1&reviewType=2'
|
||||
}
|
||||
/> */}
|
||||
{url == '' ? null : (
|
||||
<Weboffice4Path path={url} />
|
||||
)}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
export default ViewModal;
|
@ -1,48 +1,57 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Button, Card, Col, Empty, Modal, Row } from 'antd';
|
||||
import { getRoomId } from '@/utils/session';
|
||||
import { getReportList } from './service';
|
||||
import { getDefId, getRoomId } from '@/utils/session';
|
||||
import { getAssessRoomData, getReportList } from './service';
|
||||
|
||||
const ReportPrint: React.FC<{}> = () => {
|
||||
//存储list
|
||||
const [reportPrintList, setReportPrintList] = useState<any>();
|
||||
//评审室id
|
||||
const roomId = getRoomId();
|
||||
//流程id
|
||||
const defId = getDefId();
|
||||
|
||||
useEffect(() => {
|
||||
//初始化遍历
|
||||
getReportList(getRoomId()).then((res) => {
|
||||
let list = res.data;
|
||||
let arr = Object.keys(list);
|
||||
let report: any[] = [];
|
||||
if (arr.length == 0) {
|
||||
let e = <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />;
|
||||
report.push(e);
|
||||
} else {
|
||||
for (const key in list) {
|
||||
let e = (
|
||||
<div>
|
||||
<Card title={key} style={{ marginBottom: 8 }}>
|
||||
<Row>
|
||||
{list[key]?.map((item: any, index: any) => (
|
||||
<Col span={6}>
|
||||
<Button
|
||||
type="text"
|
||||
key={item.id}
|
||||
onClick={() => onClickLink(item.url)}
|
||||
style={{ color: '#b30000', background: 'rgba(0, 0, 0, 0)' }}
|
||||
>
|
||||
{index + 1}、{item.dicName}
|
||||
</Button>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
report.push(e);
|
||||
}
|
||||
//获取评审室基本信息
|
||||
getAssessRoomData(roomId).then(response => {
|
||||
if (response?.code == 200) {
|
||||
//初始化遍历
|
||||
getReportList(roomId).then((res) => {
|
||||
let list = res.data;
|
||||
let arr = Object.keys(list);
|
||||
let report: any[] = [];
|
||||
if (arr.length == 0) {
|
||||
let e = <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />;
|
||||
report.push(e);
|
||||
} else {
|
||||
for (const key in list) {
|
||||
let e = (
|
||||
<div>
|
||||
<Card title={key} style={{ marginBottom: 8 }}>
|
||||
<Row>
|
||||
{list[key]?.map((item: any, index: any) => (
|
||||
<Col span={6}>
|
||||
<Button
|
||||
type="text"
|
||||
key={item.id}
|
||||
onClick={() => onClickLink(item.url, item.dicName, response?.data)}
|
||||
style={{ color: '#b30000', background: 'rgba(0, 0, 0, 0)' }}
|
||||
>
|
||||
{index + 1}、{item.dicName}
|
||||
</Button>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
report.push(e);
|
||||
}
|
||||
}
|
||||
setReportPrintList(report);
|
||||
});
|
||||
}
|
||||
setReportPrintList(report);
|
||||
});
|
||||
})
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@ -77,9 +86,9 @@ const ReportPrint: React.FC<{}> = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const onClickLink = (url: string) => {
|
||||
const onClickLink = (url: string, name: string, data: any) => {
|
||||
editLoading();
|
||||
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url))
|
||||
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url) + '&fileName=' + `${data.sectionName}-${data.sectionNum}-${data.roomType == 1 ? '预审' : ''}${name}${defId == 'recruit_multi' ? `第${data.roomSort}轮` : ''}${data.reviewMark == 1 ? `(第${data.reviewSort}次重新评审)` : ''}`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -9,3 +9,10 @@ export async function getReportList(params: any) {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询评审室信息
|
||||
* @param id
|
||||
*/
|
||||
export function getAssessRoomData(id: any) {
|
||||
return request('/api/biz-service-ebtp-process/v1/bizassessroom/info/' + id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user