|
|
|
@ -109,6 +109,12 @@ export class DoorPreviewSmItem extends React.Component<IDoorPreviewItemProps, {}
|
|
|
|
|
{
|
|
|
|
|
const { info, store } = this.props;
|
|
|
|
|
const isDoor = store instanceof DoorStore;
|
|
|
|
|
let tempInfo = info.tempInfo;
|
|
|
|
|
let enable: boolean;
|
|
|
|
|
if (!tempInfo.hingeTemp?.id)
|
|
|
|
|
enable = tempInfo.handleTemp.id === "" && tempInfo.temp.id === "" ? true : false;
|
|
|
|
|
else
|
|
|
|
|
enable = tempInfo.handleTemp.id === "" && tempInfo.hingeTemp.id === "" && tempInfo.temp.id === "" ? true : false;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
@ -121,7 +127,8 @@ export class DoorPreviewSmItem extends React.Component<IDoorPreviewItemProps, {}
|
|
|
|
|
tabIndex={-1}
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
isDoor && <span className="opendir">
|
|
|
|
|
isDoor &&
|
|
|
|
|
<span className="opendir" style={{ top: store.m_Option.row >= 8 || (store.m_Option.row >= 9 && store.m_Option.col >= 9) ? 0 : "10%" }}>
|
|
|
|
|
{openDirTitle[info.openDir]}
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
@ -137,17 +144,63 @@ export class DoorPreviewSmItem extends React.Component<IDoorPreviewItemProps, {}
|
|
|
|
|
{FixedNotZero(info.height, 2)}
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
<ul className="temp-name">
|
|
|
|
|
{
|
|
|
|
|
info.tempInfo && Object.values(info.tempInfo).map(d =>
|
|
|
|
|
{
|
|
|
|
|
if (d.name && d.id)
|
|
|
|
|
{
|
|
|
|
|
return <li>{d.name}</li>;
|
|
|
|
|
{
|
|
|
|
|
store.m_Option.row >= 8 || (store.m_Option.row >= 9 && store.m_Option.col >= 9) ?
|
|
|
|
|
<Popover
|
|
|
|
|
disabled={enable}
|
|
|
|
|
interactionKind={'hover'}
|
|
|
|
|
placement="auto"
|
|
|
|
|
content={
|
|
|
|
|
<ul className={Classes.LIST_UNSTYLED}>
|
|
|
|
|
{
|
|
|
|
|
info.tempInfo && Object.keys(info.tempInfo).map(k =>
|
|
|
|
|
{
|
|
|
|
|
let t = info.tempInfo[k];
|
|
|
|
|
if (t.name && t.id)
|
|
|
|
|
{
|
|
|
|
|
let title = "";
|
|
|
|
|
if (k === "temp")
|
|
|
|
|
title = isDoor ? "门板模板" : "抽屉模板";
|
|
|
|
|
else if (k === "handleTemp")
|
|
|
|
|
title = "拉手模板";
|
|
|
|
|
else
|
|
|
|
|
title = "铰链模板";
|
|
|
|
|
return <li>{title} : {t.name}</li>;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<ul className="sm-temp-name" style={{ height: 18, WebkitLineClamp: 1 }}>
|
|
|
|
|
{
|
|
|
|
|
info.tempInfo && Object.values(info.tempInfo).map(d =>
|
|
|
|
|
{
|
|
|
|
|
if (d.name && d.id)
|
|
|
|
|
{
|
|
|
|
|
return <li style={{ height: 16 }}>{d.name}</li>;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</Popover>
|
|
|
|
|
:
|
|
|
|
|
<div>
|
|
|
|
|
<ul className="sm-temp-name" style={{ width: "80%", right: "10%" }}>
|
|
|
|
|
{
|
|
|
|
|
info.tempInfo && Object.values(info.tempInfo).map(d =>
|
|
|
|
|
{
|
|
|
|
|
if (d.name && d.id)
|
|
|
|
|
{
|
|
|
|
|
return <li style={{ height: 16 }}>{d.name}</li>;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|