提交 fbf0bb89 作者: 翁进城

优化项目咨询

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