3.10 工程代码同步master

This commit is contained in:
jl-zhoujl2
2022-03-10 14:24:13 +08:00
parent 41ab55a4ac
commit 62f6b07ee2
914 changed files with 143121 additions and 29110 deletions

View File

@ -0,0 +1,123 @@
import { Button, message } from "antd"
import React, { useEffect, useState } from "react";
import { annoAuction } from '../service';
import ProTable from "@ant-design/pro-table";
import { getProId } from "@/utils/session";
const AuctionProjectBidding: React.FC<{}> = () => {
//项目id
const tpId = getProId();
const [dataSource, setDataSource] = useState<any[]>([]);
const columns: any = [
{
title: '序号',
valueType: 'index',
width: 80
},
{
title: '竞拍开始时间',
dataIndex: 'startTime',
key: 'startTime',
},
{
title: '竞拍结束时间',
dataIndex: 'endTime',
key: 'endTime',
},
{
title: '状态',
dataIndex: 'bidOpeningStatus',
search: false,
valueEnum: {
0: { text: '未开始' },
1: { text: '正在竞拍' },
2: { text: '竞拍结束' },
6: { text: '项目结束' },
},
},
// {
// title: '异常状态',
// dataIndex: 'abnormalStatus',
// search: false,
// valueEnum: {
// 0: { text: '无异常' },
// 1: { text: '中止' },
// 2: { text: '终止' },
// },
// },
{
title: '操作',
valueType: 'option',
width: 100,
render: (_: any, record: any) => {
if (record.bidOpeningStatus == 0) {//未开始
return <Button type="link" danger key="notStarted" onClick={() => { message.info('竞拍未开始,无法查看竞拍') }}></Button>
}
return <Button type="link" danger key="viewAuctions" onClick={() => viewAuctions(record)}></Button>
}
}
];
/**
* 查看竞拍
* @param record
*/
const viewAuctions = (record:any) => {
let data = {
id:record.id
}
sessionStorage.setItem('projectData', JSON.stringify(data));
window.open("/AuctionViewAuctions/Index");
}
useEffect(() => {
init();
}, []);
const init = () => {
annoAuction(tpId).then(res => {
if (res.code === 200) {
let data = res.data;
if(String(data.sfccgg) === '0'){
setDataSource([]);
return;
}
let source = {
startTime: data.startTime,
endTime: data.endTime,
bidOpeningStatus: data.bidOpeningStatus,
abnormalStatus: data.auctionYczt,
id: tpId
};
setDataSource([source]);
}
}
);
};
return <ProTable
columns={columns}
dataSource={dataSource}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
options={false}
size="small"
search={false}
/>
}
export default AuctionProjectBidding

View File

@ -0,0 +1,12 @@
import React from 'react';
import AuctionProjectBidding from './components/AuctionProjectBidding';
const Index: React.FC = () => {
return (
<>
<AuctionProjectBidding />
</>
)
}
export default Index;

View File

@ -0,0 +1,14 @@
import request from '@/utils/request';
/**
* 项目跟进
* @param params
*/
export async function annoAuction(tpid:any) {
return request('/api/biz-service-ebtp-auction/v1/innerShot/annoAuction/'+tpid,{
method: 'GET',
});
}