diff --git a/src/Add-on/DrawBoard/DrawDrawer.ts b/src/Add-on/DrawBoard/DrawDrawer.ts index d46c09c3c..eca981745 100644 --- a/src/Add-on/DrawBoard/DrawDrawer.ts +++ b/src/Add-on/DrawBoard/DrawDrawer.ts @@ -46,12 +46,7 @@ export class DrawDrawrer implements Command store.totalDepth = safeEval(FixedNotZero(size.y, 2)); if (store.m_Option.isAuto) - { - let totalDepth = store.m_Option.drawerTotalDepth || store.totalDepth; - let val = Math.floor((totalDepth - store.m_Option.offset) / 50) * 50; - store.m_Option.depth = val; - store.UIOption.depth = val.toString(); - } + store.SetDrawerDepth(); app.Editor.ModalManage.RenderModal(DoorModal, { store, type: BoardModalType.Ct }); let res = await app.Editor.ModalManage.Wait(); @@ -264,12 +259,11 @@ export class DrawDrawrer implements Command templateSpace.HParam.expr = isLock ? spaceParse.Size.z - option.topOffset - option.bottomOffset : "_DIV"; templateSpace.PYParam.expr = "MBH"; - let depth = (option.drawerTotalDepth > 0 && option.depth > option.drawerTotalDepth) ? option.drawerTotalDepth : option.depth; + let depth = option.depth; templateSpace.GetParam("BH").value = option.thickness; this.AppendTemplateParam("DWDEEPTH", depth, "抽屉深度", templateSpace); - templateSpace.GetParam("DWDEEPTH").expr = `(_W>0&&_W<=${depth})?_W:${depth}`; this.AppendTemplateParam("MBH", option.offset, "抽屉内缩", templateSpace); @@ -338,7 +332,7 @@ export class DrawDrawrer implements Command colTemp.LParam.expr = lValue; } - colTemp.WParam.expr = "_W-_MBH"; + colTemp.WParam.expr = "_W-_MBH-5"; colTemp.HParam.expr = "_H"; colTemp.PXParam.expr = "_POS"; colTemp.GetParam("BH").value = 18; @@ -468,7 +462,11 @@ export class DrawDrawrer implements Command } rowTemplate.LParam.expr = "_L"; - rowTemplate.WParam.expr = (opt.isAuto && opt.drawerTotalDepth === 0) ? "floor((_W-5)/50)*50" : "floor((__DWDEEPTH-__MBH)/50)*50"; + //输入的深度也按50倍数 6.30 + let wExpr = opt.isAuto ? "floor(_W/50)*50" : "floor(__DWDEEPTH/50)*50"; + if (opt.drawerTotalDepth > 0) + wExpr = `${wExpr}>${opt.drawerTotalDepth}?${opt.drawerTotalDepth}:${wExpr}`; + rowTemplate.WParam.expr = wExpr; rowTemplate.PZParam.expr = "_POS"; let bhPar = rowTemplate.GetParam("BH"); diff --git a/src/UI/Components/Board/BoardCommon.tsx b/src/UI/Components/Board/BoardCommon.tsx index ef4800010..5d757865d 100644 --- a/src/UI/Components/Board/BoardCommon.tsx +++ b/src/UI/Components/Board/BoardCommon.tsx @@ -33,6 +33,7 @@ export interface ISetItemOption update?(); /*组件更新完成c触发*/ mounted?(); /**组件挂载完成触发 */ isUpper?: boolean; + tip?: string; } interface ISetBlockOption { @@ -77,7 +78,7 @@ export class SetBoardDataItem extends React.Component { const props = this.props; return ( -
+
{props.title}: diff --git a/src/UI/Components/Board/Door/DoorConfigModal.tsx b/src/UI/Components/Board/Door/DoorConfigModal.tsx index ba294d2d4..156a63bd3 100644 --- a/src/UI/Components/Board/Door/DoorConfigModal.tsx +++ b/src/UI/Components/Board/Door/DoorConfigModal.tsx @@ -22,11 +22,7 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore; const store = this.props.store; if (store instanceof DrawerStore) { - store.m_Option.drawerTotalDepth = safeEval(store.UIOption.drawerTotalDepth, { W: store.totalDepth, H: store.totalHeight, L: store.totalWidth }); - let totalDepth = store.m_Option.drawerTotalDepth || store.totalDepth; - let val = Math.floor((totalDepth - store.m_Option.offset) / 50) * 50; - store.m_Option.depth = val; - this.uiOption.depth = val.toString(); + store.SetDrawerDepth(); } }; UNSAFE_componentWillMount() @@ -103,6 +99,7 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore; option={store.m_Option} uiOption={this.uiOption} title="抽屉总深" + tip="最大深度" onChange={() => { this.handleDrawerDepth(); diff --git a/src/UI/Components/Board/Door/DoorModal.tsx b/src/UI/Components/Board/Door/DoorModal.tsx index 751130bcb..eada08b63 100644 --- a/src/UI/Components/Board/Door/DoorModal.tsx +++ b/src/UI/Components/Board/Door/DoorModal.tsx @@ -14,10 +14,11 @@ import { DisableChangeParName } from '../../../Store/DoorInterface'; import { ModalHeader, ModalFooter } from './../../Modal/ModalContainer'; import { AutoCutCheckbox } from '../BoardCommon'; +const DoorHelpUrl = "https://cfcad.cn/help/#/ThreeDDrawing/DOOR"; +const DrawerHelpUrl = "https://cfcad.cn/help/#/ThreeDDrawing/DRAWER"; -@inject("store") @observer -export class DoorModal extends React.Component<{ store?: DoorDrawerStore, type: BoardModalType; }, {}> +export class DoorModal extends React.Component<{ store: DoorDrawerStore, type: BoardModalType; }, {}> { private startSelect = observable.box(false); UNSAFE_componentWillMount() @@ -40,6 +41,7 @@ export class DoorModal extends React.Component<{ store?: DoorDrawerStore, type: title={store.title + "设计"} icon="remove-column-left" close={() => store.OnOk(ModalState.Cancel)} + helpUrl={isDoor ? DoorHelpUrl : DrawerHelpUrl} />
void; logo?: boolean; + helpUrl?: string; } export class CommonModal extends Component{ @@ -37,6 +38,7 @@ export class CommonModal extends Component{ icon={this.props.icon} close={this.props.close} logo={this.props.logo} + helpUrl={this.props.helpUrl} /> { @@ -93,6 +95,7 @@ interface IModalHeaderProps isMaxBtn?: boolean; isPinBtn?: boolean; logo?: boolean; + helpUrl?: string; } @observer @@ -143,23 +146,31 @@ export class ModalHeader extends Component }

{this.props.title}

{ - isMaxBtn ? -