提交 fbf0bb89 作者: 翁进城

优化项目咨询

上级 f560f8ba
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
.title { .title {
font-size: 14px; font-size: 14px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #3c3e42; color: #3c3e42;
width: 649px; width: 649px;
@include ellipsis(1); @include ellipsis(1);
......
...@@ -12,15 +12,14 @@ ...@@ -12,15 +12,14 @@
.info { .info {
.title { .title {
font-size: 16px; font-size: 14px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #3c3e42; color: #3c3e42;
width: 649px; width: 649px;
@include ellipsis(1); @include ellipsis(1);
} }
.desc { .desc {
font-size: 16px; font-size: 14px;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
color: #ff552d; color: #ff552d;
margin-top: 9px; margin-top: 9px;
......
...@@ -22,9 +22,8 @@ export interface Params { ...@@ -22,9 +22,8 @@ export interface Params {
provinceCode?: number; //省编码 provinceCode?: number; //省编码
} }
const items = (params: any) =>
const items = (params:any) => ["项目需求", "招投标项目", "业务案例", "行业新闻"].map( ["项目需求", "招投标项目", "业务案例", "行业新闻"].map((value) => {
(value) => {
let children: JSX.Element | string = <></>; let children: JSX.Element | string = <></>;
switch (value) { switch (value) {
...@@ -49,14 +48,14 @@ const items = (params:any) => ["项目需求", "招投标项目", "业务案例" ...@@ -49,14 +48,14 @@ const items = (params:any) => ["项目需求", "招投标项目", "业务案例"
key: value, key: value,
children: children, children: children,
}; };
} });
);
export default function ProjectInfo() { export default function ProjectInfo() {
const [region, setRegion] = useState<Array<RegionResp>>([]); const [region, setRegion] = useState<Array<RegionResp>>([]);
const [params, setParams] = useState<Params | null>({}); const [params, setParams] = useState<Params | null>({});
useEffect(() => { useEffect(() => {
window!.document!.querySelector('body')!.style.background = '#fff';
commonApi.region().then((res) => { commonApi.region().then((res) => {
let temp = res.result || []; let temp = res.result || [];
let temp1: Array<RegionResp> = []; let temp1: Array<RegionResp> = [];
...@@ -77,15 +76,15 @@ export default function ProjectInfo() { ...@@ -77,15 +76,15 @@ export default function ProjectInfo() {
console.log(value); console.log(value);
let params1: Params = { let params1: Params = {
provinceCode: undefined, provinceCode: undefined,
districtCode: undefined districtCode: undefined,
}; };
list?.forEach(item => { list?.forEach((item) => {
if(item.level == 1){ if (item.level == 1) {
params1.provinceCode = item.id; params1.provinceCode = item.id;
} else if(item.level == 2){ } else if (item.level == 2) {
params1.districtCode = item.id; params1.districtCode = item.id;
} }
}) });
setParams({ setParams({
...params, ...params,
...params1, ...params1,
...@@ -100,41 +99,41 @@ export default function ProjectInfo() { ...@@ -100,41 +99,41 @@ export default function ProjectInfo() {
}); });
}; };
return ( return (
<Layout layoutStyle={{ backgroundColor: "#fff" }} hideFooter> <Layout layoutStyle={{ backgroundColor: "#fff" }} hideFooter>
<div style={{ backgroundColor: "#fff", minHeight: 820 }}> <div style={{ backgroundColor: "#fff", minHeight: 820 }}>
<div className="page"> <div className="page">
<div className={styles.bannerWrap}> <div className={styles.bannerWrap}>
<div className={styles.banner}></div> <div className={styles.banner}></div>
</div> </div>
<Tabs <Tabs
className={styles.tabs} className={styles.tabs}
tabBarExtraContent={ tabBarExtraContent={
<Space size={8} style={{ marginRight: 25 }}> <Space size={8} style={{ marginRight: 25 }}>
{ {
<Cascader <Cascader
options={region} options={region}
//@ts-ignore //@ts-ignore
onChange={onRegionChange} onChange={onRegionChange}
placeholder="选择省市" placeholder="选择省市"
borderRadiusSM={6} borderRadiusSM={6}
fieldNames={{ fieldNames={{
label: "name", label: "name",
value: "id", value: "id",
children: "childInfo", children: "childInfo",
}} }}
changeOnSelect changeOnSelect
/> />
} }
<DatePicker onChange={onDateChange} /> <DatePicker onChange={onDateChange} />
</Space> </Space>
} }
items={items(params)} items={items(params)}
tabBarGutter={41} tabBarGutter={41}
destroyInactiveTabPane={true} destroyInactiveTabPane={true}
/> />
</div>
</div> </div>
</div> </Layout>
</Layout>
); );
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论