提交 31da41c1 作者: 翁进城

项目资讯相关优化

上级 b7a8bf02
...@@ -27,6 +27,11 @@ export interface Item { ...@@ -27,6 +27,11 @@ export interface Item {
apply: 0 | 1; apply: 0 | 1;
} }
export interface ApplyParams {
tenderInfoId?: number; //招标详情id
tenderNewsId?: number; //招标id
}
export default { export default {
/** /**
...@@ -36,5 +41,9 @@ export default { ...@@ -36,5 +41,9 @@ export default {
*/ */
listNewTenderInfo(params: ListNewTenderInfoParams, options = {}): Promise<Response<ListNewTenderInfoResp>> { listNewTenderInfo(params: ListNewTenderInfoParams, options = {}): Promise<Response<ListNewTenderInfoResp>> {
return request('/release/tender/listNewTenderInfo', 'post', params, options); return request('/release/tender/listNewTenderInfo', 'post', params, options);
},
//合作申请提交
apply(params: ApplyParams){
return request('/release/tender/apply', 'post', params);
} }
} }
\ No newline at end of file
...@@ -57,6 +57,18 @@ export default function Bids(props: Props) { ...@@ -57,6 +57,18 @@ export default function Bids(props: Props) {
}); });
}; };
const onApply = (item: Item) => {
api
.apply({
tenderNewsId: item.id,
})
.then((res) => {
if (res.code === "200") {
window.messageApi.success("申请成功");
}
});
};
return ( return (
<Spin spinning={loading} delay={500}> <Spin spinning={loading} delay={500}>
<div className={styles.bids} style={{ height: 610 }}> <div className={styles.bids} style={{ height: 610 }}>
...@@ -64,9 +76,7 @@ export default function Bids(props: Props) { ...@@ -64,9 +76,7 @@ export default function Bids(props: Props) {
return ( return (
<div className={styles.item} key={item.id}> <div className={styles.item} key={item.id}>
<div className={styles.info}> <div className={styles.info}>
<div className={styles.title}> <div className={styles.title}>{item.tenderContent}</div>
{item.tenderContent}
</div>
</div> </div>
{item.apply ? ( {item.apply ? (
<Button <Button
...@@ -80,7 +90,9 @@ export default function Bids(props: Props) { ...@@ -80,7 +90,9 @@ export default function Bids(props: Props) {
) : ( ) : (
<Button type="primary" className={styles.btn}> <Button type="primary" className={styles.btn}>
<div className={styles.text1}>{item.tenderPrice}</div> <div className={styles.text1}>{item.tenderPrice}</div>
<div className={styles.text2}>申请合作</div> <div className={styles.text2} onClick={() => onApply(item)}>
申请合作
</div>
</Button> </Button>
)} )}
</div> </div>
......
...@@ -67,15 +67,19 @@ export default function Cases(props: Props) { ...@@ -67,15 +67,19 @@ export default function Cases(props: Props) {
return ( return (
<div className={styles.item} key={item.id}> <div className={styles.item} key={item.id}>
<div className={styles.info}> <div className={styles.info}>
<div className={styles.title}>{item.caseTitle}</div> <div className={styles.title}>
</div>
<Button <Button
type="primary" type="link"
className={styles.btn} style={{ padding: "0 0" }}
onClick={() => onClick={() =>
Router.push("/projectInfo/caseArticle/" + item.id) Router.push("/projectInfo/caseArticle/" + item.id)
} }
> >
{item.caseTitle}
</Button>
</div>
</div>
<Button type="primary" className={styles.btn}>
申请合作 申请合作
</Button> </Button>
</div> </div>
......
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
flex: auto; flex: auto;
.title { .title {
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出部分 */
text-overflow: ellipsis; /* 使用省略号代替溢出部分 */
font-size: 16px; font-size: 16px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold; font-weight: bold;
...@@ -35,9 +32,6 @@ ...@@ -35,9 +32,6 @@
} }
.desc { .desc {
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出部分 */
text-overflow: ellipsis; /* 使用省略号代替溢出部分 */
font-size: 14px; font-size: 14px;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
color: RGBA(135, 135, 135, 0.4); color: RGBA(135, 135, 135, 0.4);
......
...@@ -68,18 +68,18 @@ export default function Requirements(props: Props) { ...@@ -68,18 +68,18 @@ export default function Requirements(props: Props) {
* 确认解决 * 确认解决
* @param e * @param e
*/ */
const confirmSolved = ( const confirmSolved = (item: Item) => {
item: Item api
) => { .solveRequire({
api.solveRequire({
requirementsInfoId: item.id, requirementsInfoId: item.id,
userAccountId: userId userAccountId: userId,
}).then(res => { })
if(res.code === '200'){ .then((res) => {
window.messageApi.success('提交完成'); if (res.code === "200") {
window.messageApi.success("提交完成");
setReload(!reload); setReload(!reload);
} }
}) });
}; };
return ( return (
...@@ -94,13 +94,14 @@ export default function Requirements(props: Props) { ...@@ -94,13 +94,14 @@ export default function Requirements(props: Props) {
<div className={styles.logo}></div> <div className={styles.logo}></div>
<div className={styles.info}> <div className={styles.info}>
<div className={styles.title}> <div className={styles.title}>
项目需求:电力巡检需要5名飞手 项目需求:{item.requireDescription}
</div> </div>
{/*
<div className={styles.desc}> <div className={styles.desc}>
具体需求:{item.requireDescription} 具体需求:{item.requireDescription}
</div> */}
</div> </div>
</div> {item.userAccountId === userId ? (
{item.userAccountId === userId && (
<Popconfirm <Popconfirm
title="提示" title="提示"
description="确认该需求已经解决了吗?" description="确认该需求已经解决了吗?"
...@@ -117,6 +118,8 @@ export default function Requirements(props: Props) { ...@@ -117,6 +118,8 @@ export default function Requirements(props: Props) {
已解决 已解决
</Button> </Button>
</Popconfirm> </Popconfirm>
) : (
<div style={{ width: 120, flexShrink: 0 }}></div>
)} )}
</div> </div>
); );
......
...@@ -20,6 +20,8 @@ const withTheme = (node: JSX.Element) => ( ...@@ -20,6 +20,8 @@ const withTheme = (node: JSX.Element) => (
theme={{ theme={{
token: { token: {
borderRadius: 6, borderRadius: 6,
colorLink: "#333",
colorLinkHover: "#ff552d",
}, },
}} }}
> >
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论