4.1 同步发版内容到天梯

This commit is contained in:
jl-zhoujl2
2022-04-01 20:06:34 +08:00
parent a3b939d154
commit 7b3efe00dd
128 changed files with 929 additions and 5029 deletions

View File

@ -7,6 +7,7 @@ import './styles.less';
import { getDicData, getSessionUserData } from '@/utils/session';
import FileDown from '@/utils/Download';
import { btnAuthority } from '@/utils/authority';
import { downloadFile } from '@/utils/DownloadUtils';
/**
* 查询
@ -322,7 +323,7 @@ const entrust: React.FC<{}> = () => {
let one = {};
one['uid'] = item.fileId;
one['name'] = item.fileName;
one['url'] = '/api/core-service-ebtp-updownload/v1/attachment/download/oid/' + item.fileId;
one['url'] = 'javascript:void(0);';
filesList.push(one);
});
} else {
@ -595,7 +596,7 @@ const entrust: React.FC<{}> = () => {
label="附件"
>
{
files.length > 0 ? <Upload key='uploadInquiry' fileList={files} showUploadList={{ showRemoveIcon: false }} /> : '无附件'
files.length > 0 ? <Upload key='uploadInquiry' fileList={files} onPreview={downloadFile} showUploadList={{ showRemoveIcon: false }} /> : '无附件'
}
</FormItem></Col>
</Row>
@ -611,10 +612,10 @@ const entrust: React.FC<{}> = () => {
let one = {}
one['uid'] = item.documentCenterFileId;
one['name'] = item.originalName;
one['url'] = '/api/core-service-ebtp-updownload/v1/attachment/download/oid/' + item.documentCenterFileId;
one['url'] = 'javascript:void(0);';
fileList.push(one);
})
return <Upload key='upload' fileList={fileList} showUploadList={{ showRemoveIcon: false }} />
return <Upload key='upload' fileList={fileList} onPreview={downloadFile} showUploadList={{ showRemoveIcon: false }} />
}
//返回col
const returnCol = (key: any, name: any, label: any) => {

View File

@ -7,6 +7,7 @@ import './styles.less';
import { getDicData, getSessionUserData } from '@/utils/session';
import FileDown from '@/utils/Download';
import { btnAuthority } from '@/utils/authority';
import { downloadFile } from '@/utils/DownloadUtils';
/**
* 查询
* @param fields
@ -252,7 +253,7 @@ const entrust: React.FC<{}> = () => {
let one = {};
one['uid'] = item.fileId;
one['name'] = item.fileName;
one['url'] = '/api/core-service-ebtp-updownload/v1/attachment/download/oid/' + item.fileId;
one['url'] = 'javascript:void(0);';
filesList.push(one);
});
} else {
@ -443,7 +444,7 @@ const entrust: React.FC<{}> = () => {
label="附件"
>
{
files.length > 0 ? <Upload key='uploadInquiry' fileList={files} showUploadList={{ showRemoveIcon: false }} /> : '无附件'
files.length > 0 ? <Upload key='uploadInquiry' fileList={files} onPreview={downloadFile} showUploadList={{ showRemoveIcon: false }} /> : '无附件'
}
</FormItem></Col>
</Row>
@ -460,10 +461,10 @@ const entrust: React.FC<{}> = () => {
let one = {}
one['uid'] = item.documentCenterFileId;
one['name'] = item.originalName;
one['url'] = '/api/core-service-ebtp-updownload/v1/attachment/download/oid/' + item.documentCenterFileId;
one['url'] = 'javascript:void(0);';
fileList.push(one);
})
return <Upload key='upload' fileList={fileList} showUploadList={{ showRemoveIcon: false }} />
return <Upload key='upload' fileList={fileList} onPreview={downloadFile} showUploadList={{ showRemoveIcon: false }} />
}
//返回col
const returnCol = (key: any, name: any, label: any) => {

View File

@ -1,8 +1,8 @@
import { getProMethod, getUserToken } from '@/utils/session';
import { Form, Input, Modal, Radio } from 'antd';
import { getProMethod } from '@/utils/session';
import { Form, Input, Modal } from 'antd';
import React, { useEffect, useState } from 'react';
import { getFileListByBid } from '../service';
import moment from "moment";
import ExtendUpload from '@/utils/ExtendUpload';
interface ViewEvaluationItemsProps {
title?: string;
@ -18,10 +18,6 @@ const layout = {
labelCol: { span: 7 },
wrapperCol: { span: 12 },
};
const options = [
{ label: '是', value: '0' },
{ label: '否', value: '1' },
];
const modalHeight = (window.innerHeight * 96) / 100;
@ -29,9 +25,8 @@ const ViewEvaluationItems: React.FC<ViewEvaluationItemsProps> = (props) => {
const { title, modalVisible, onCancel, values, data } = props;
const [form] = Form.useForm();
const { TextArea } = Input;
const token = getUserToken();
//上传文件列表
const [fileListData, setFileListData] = useState<any[]>([]);
//说明文件fileId
const [fileId, setFileId] = useState<string>('');
//获取采购方式
const MethodDict = getProMethod();
//显示字段名称
@ -50,7 +45,7 @@ const ViewEvaluationItems: React.FC<ViewEvaluationItemsProps> = (props) => {
}
if (data == undefined) {
} else {
getOidList(data.uploadFileId);
setFileId(data.uploadFileId);
form.setFieldsValue({
bidSectName: values == undefined ? null : values.bidSectName,
reason: data.reason,
@ -62,34 +57,6 @@ const ViewEvaluationItems: React.FC<ViewEvaluationItemsProps> = (props) => {
}
}, [modalVisible]);
//根据bid获取到oid列表
const getOidList = async (param: any) => {
if (param == undefined || param == '' || param == null) {
} else {
let list: any[] = [];
list.push(param);
await getFileListByBid({ bidList: list }).then((res) => {
let data = res[param];
let list: any[] = [];
if (data.length == 0) {
setFileListData([]);
} else {
data.forEach((ele: any) => {
list.push({
uid: ele.id,
name: ele.filename,
status: 'done',
oid: ele.id,
businessId: ele.bid,
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}?Authorization=${token}`,
});
});
setFileListData(list);
}
});
}
};
return (
<Modal
destroyOnClose
@ -97,14 +64,13 @@ const ViewEvaluationItems: React.FC<ViewEvaluationItemsProps> = (props) => {
visible={modalVisible}
onCancel={() => {
onCancel();
setFileListData([]);
}}
width={'60%'}
cancelText="返回"
style={{ maxHeight: modalHeight }}
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
centered
okButtonProps={{hidden: true}}
okButtonProps={{ hidden: true }}
>
<Form
{...layout}
@ -138,13 +104,7 @@ const ViewEvaluationItems: React.FC<ViewEvaluationItemsProps> = (props) => {
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="说明文件">
{fileListData.map((e) => (
<a
href={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${e.oid}?Authorization=${token}`}
>
{e.name}
</a>
))}
<ExtendUpload bid={fileId} uploadProps={{ disabled: true }} />
</Form.Item>
</Form>
</Modal>

View File

@ -119,36 +119,6 @@ export async function submitApproval(params: any) {
})
}
/**
* 获取业务id
*/
export async function getSecondBusinessId() {
return request('/api/core-service-ebtp-updownload/v1/business/id', {
method: 'GET',
});
}
/**
* 根据oid删除文件
* @param params
*/
export async function deleteFileByOid(params: any) {
return request('/api/core-service-ebtp-updownload/v1/attachment/item/' + params, {
method: 'DELETE',
});
}
/**
* 根据bid获取文件列表
* @param params
*/
export async function getFileListByBid(params: any) {
return request('/api/core-service-ebtp-updownload/v1/attachment/find', {
method: 'POST',
data: {...params}
});
}
/**
* 查看审批流程内嵌-查看重新评审查询
* @param params

View File

@ -15,8 +15,7 @@ import ExtendUpload from '@/utils/ExtendUpload';
import moment from 'moment';
import { echoDateTimeFormatter, saveDateTimeFormatter } from '@/utils/DateUtils';
import Weboffice from '@/pages/webOffice/weboffice';
import { addFailAnno, getFileListByBid, updateFailAnno } from '../../service';
import { getUserToken } from '@/utils/session';
import { addFailAnno, updateFailAnno } from '../../service';
import Medias from '@/pages/Bid/BiddingAnnouncement/components/Medias';
import BraftText from '@/components/richText/wang';
@ -50,8 +49,6 @@ const EditFailureNotice: React.FC<EditFailureNoticeProps> = (props) => {
//上传文件id存储
const [uploadId, setUploadId] = useState<any>();
//上传文件列表
const [fileListData, setFileListData] = useState<any[]>([]);
//发布媒体选择显隐
const [mediaType, setMediaType] = useState<boolean>(false);
//文档按钮文字
@ -74,7 +71,6 @@ const EditFailureNotice: React.FC<EditFailureNoticeProps> = (props) => {
//loading
const [saveLoading, setSaveLoading] = useState<boolean>(false);
const [form] = Form.useForm();
const token = getUserToken();
//采购方式
const methodDict = projectData?.bidMethodDict;
@ -176,33 +172,6 @@ const EditFailureNotice: React.FC<EditFailureNoticeProps> = (props) => {
});
}
};
//根据bid获取到oid列表
const getOidList = async (param: any) => {
if (param == undefined || param == '' || param == null) {
} else {
let list: any[] = [];
list.push(param);
await getFileListByBid({ bidList: list }).then((res) => {
let data = res[param];
let list: any[] = [];
if (data?.length == 0) {
setFileListData([]);
} else {
data?.forEach((ele: any) => {
list.push({
uid: ele.id,
name: ele.filename,
status: 'done',
oid: ele.id,
businessId: ele.bid,
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}?Authorization=${token}`,
});
});
setFileListData(list);
}
});
}
};
//选择媒体onChange
const mediasChange = (prop: any[]) => {
@ -270,7 +239,7 @@ const EditFailureNotice: React.FC<EditFailureNoticeProps> = (props) => {
setDocSaveBtn('none');
setDocBtnName('查看');
echoSet(noticeData.contentWithStyle);
getOidList(noticeData?.attDatasetId);
setUploadId(noticeData?.attDatasetId);
setDocFileCode(noticeData?.contentFileId);
setHtmlFileCode(noticeData?.contentHtmlId);
mediaReleasesSet(noticeData?.mediaReleases);
@ -343,7 +312,7 @@ const EditFailureNotice: React.FC<EditFailureNoticeProps> = (props) => {
<DatePicker
format={'yyyy-MM-DD HH:mm'}
disabledDate={(current) => current && current < moment().startOf('day')}
showTime={{ defaultValue: moment().startOf('minute') }}
showTime={{ defaultValue: moment().startOf('minute') }}
style={{ width: '100%' }}
showNow={false}
disabled={ReadOnly}
@ -361,17 +330,7 @@ const EditFailureNotice: React.FC<EditFailureNoticeProps> = (props) => {
</Form.Item>
{ReadOnly ? (
<Form.Item name="attDatasetId" label="附件">
{fileListData.length == 0 ? (
<span></span>
) : (
fileListData.map((e) => (
<a
href={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${e.oid}?Authorization=${token}`}
>
{e.name}
</a>
))
)}
<ExtendUpload bid={uploadId} uploadProps={{ disabled: true }} />
</Form.Item>
) : (
<Form.Item name="attDatasetId" label="附件上传" extra="最多上传一个文件每个最大30MB">

View File

@ -1,7 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Button, Checkbox, Col, Form, Input, Modal, Row } from 'antd';
import { getUserToken } from '@/utils/session';
import { getFileListByBid } from '../../service';
import ExtendUpload from '@/utils/ExtendUpload';
interface ViewExceptionProps {
modalVisible: boolean;
@ -56,10 +55,9 @@ const ViewException: React.FC<ViewExceptionProps> = (props) => {
} = props;
//招标项目新名称显隐
const [showNewName, setShowNewName] = useState<boolean>(false);
//上传文件列表
const [fileListData, setFileListData] = useState<any[]>([]);
//附件文件fileId
const [fileId, setFileId] = useState<string>('');
const { TextArea } = Input;
const token = getUserToken();
const [form] = Form.useForm();
//采购方式
const methodDict = proData?.bidMethodDict
@ -75,54 +73,26 @@ const ViewException: React.FC<ViewExceptionProps> = (props) => {
}
};
//根据bid获取到oid列表
const getOidList = async (param: any) => {
if (param == undefined || param == '' || param == null) {
} else {
let list: any[] = [];
list.push(param);
await getFileListByBid({ bidList: list }).then((res) => {
let data = res[param];
let list: any[] = [];
if (data?.length == 0) {
setFileListData([]);
} else {
data?.forEach((ele: any) => {
list.push({
uid: ele.id,
name: ele.filename,
status: 'done',
oid: ele.id,
businessId: ele.bid,
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}?Authorization=${token}`,
});
});
setFileListData(list);
}
});
}
};
useEffect(() => {
getOidList(values?.fileId);
setFileId(values?.fileId);
handleTypeChange(values?.handleType)
if(dict == undefined) {} else {
if (dict == undefined) { } else {
form.setFieldsValue({
id: values?.id,
projectId: proData?.id,
projectName: proData?.projectName,
ebpProjectNumber: proData?.ebpProjectNumber,
handleType: changeDict(dict['handle_type=exception'],values?.handleType),
handleType: changeDict(dict['handle_type=exception'], values?.handleType),
exceptionNewTitle: values?.exceptionNewTitle,
isAgainPurchase: values?.isAgainPurchase == '1' ? '需要' : '不需要',
exceptionDesc: changeDict(dict['exception_desc=exception'],values?.exceptionDesc),
isSendMessage: parseInt(values?.isSendMessage) == 0 ? '是': '否',
exceptionDesc: changeDict(dict['exception_desc=exception'], values?.exceptionDesc),
isSendMessage: parseInt(values?.isSendMessage) == 0 ? '是' : '否',
exceptionComments: values?.exceptionComments,
});
}
const data: any[] = [];
sectionData?.forEach((ele: any) => {
data.push(ele.id);
data.push(ele.id);
});
form.setFieldsValue({ sectionArray: data });
}, [proData, modalVisible]);
@ -193,20 +163,13 @@ const ViewException: React.FC<ViewExceptionProps> = (props) => {
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item name="fileId" label="附件">
{fileListData.length == 0 ? <span style={{marginLeft: 11}}></span> : fileListData.map((e) => (
<a
href={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${e.oid}?Authorization=${token}`}
style={{marginLeft: 11}}
>
{e.name}
</a>
))}
<ExtendUpload bid={fileId} uploadProps={{ disabled: true }} />
</Form.Item>
<Form.Item
name="sectionArray"
label={`选择${sectionName}`}
>
<Checkbox.Group style={{ width: '100%',marginLeft: 11 }} disabled >
<Checkbox.Group style={{ width: '100%', marginLeft: 11 }} disabled >
<Row>
{sectionData?.map((element: any, index: any) => (
<Col span="24">

View File

@ -98,17 +98,6 @@ export async function getDefId(proId?: any) {
});
}
/**
* 根据bid获取文件列表
* @param params
*/
export async function getFileListByBid(params: any) {
return request('/api/core-service-ebtp-updownload/v1/attachment/find', {
method: 'POST',
data: params
});
}
/**
* 项目异常生效
* @param params