pull/1740/MERGE
黄诗津 3 years ago committed by ChenX
parent 7f28db36a4
commit bfc11d19f0

@ -471,7 +471,7 @@ export class Input5Or4Component extends React.Component<I5InputComponent, {}>
isShow && <HTMLSelect
className="select-drillType"
options={options}
style={{ width: 50, padding: "0 5px" }}
style={{ marginLeft: 3, width: 60, height: 20, padding: "0 19px 0 5px" }}
value={this.props.highDrillOption.up}
onChange={e =>
{
@ -497,7 +497,7 @@ export class Input5Or4Component extends React.Component<I5InputComponent, {}>
isShow && <HTMLSelect
className="select-drillType"
options={options}
style={{ width: 50, padding: "0 5px" }}
style={{ width: 60, height: 20, padding: "0 19px 0 5px" }}
value={this.props.highDrillOption.left}
onChange={e =>
{
@ -530,7 +530,7 @@ export class Input5Or4Component extends React.Component<I5InputComponent, {}>
isShow && <HTMLSelect
className="select-drillType"
options={options}
style={{ width: 50, padding: "0 5px" }}
style={{ width: 60, height: 20, padding: "0 19px 0 5px" }}
value={this.props.highDrillOption.right}
onChange={e =>
{
@ -552,7 +552,7 @@ export class Input5Or4Component extends React.Component<I5InputComponent, {}>
isShow && <HTMLSelect
className="select-drillType"
options={options}
style={{ width: 50, padding: "0 5px" }}
style={{ marginLeft: 3, width: 60, height: 20, padding: "0 19px 0 5px" }}
value={this.props.highDrillOption.down}
onChange={e =>
{

@ -42,6 +42,7 @@ interface BoardConfigProps
canModeling: IObservableValue<boolean>;
grooveOption: IGrooveOption;
uiBoardConfig: IUiOption<BoardConfigOption>;
isRightToolbar?: boolean;
}
const EDITOR_3D_PATH = "editor3dpath";
@ -81,25 +82,36 @@ export class BoardConfigModal extends React.Component<BoardConfigProps, {}>{
<div>
<BoardTypeComponent opt={boardConfig} className="long-select" />
<ItemName title="板名称" opt={boardConfig} className="br-name" />
<div className="pick-br">
{
this.pars.map(([k, v]) =>
<Label >
<SetBoardDataItem
type={CheckObjectType.BR}
optKey={k}
option={boardConfig}
uiOption={this.props.uiBoardConfig}
title={v}
/>
<Button
icon="arrow-right"
onClick={() => this.getSizeValue(k)}
/>
</Label>
)
}
</div>
{
this.props.isRightToolbar ?
<SetBoardDataBlock
type={CheckObjectType.BR}
className="flexWrap"
pars={this.pars}
option={boardConfig}
uiOption={this.props.uiBoardConfig}
/>
:
<div className="pick-br">
{
this.pars.map(([k, v]) =>
<Label >
<SetBoardDataItem
type={CheckObjectType.BR}
optKey={k}
option={boardConfig}
uiOption={this.props.uiBoardConfig}
title={v}
/>
<Button
icon="arrow-right"
onClick={() => this.getSizeValue(k)}
/>
</Label>
)
}
</div>
}
<SetBoardDataBlock
type={CheckObjectType.BR}
className="flexWrap"

@ -1,13 +1,13 @@
import { Checkbox, Classes, Intent } from '@blueprintjs/core';
import { observer } from 'mobx-react';
import * as React from 'react';
import { DoorPreviewItem, DoorPreviewSmItem, DoorPreviewLgItem } from './DoorPreviewItem';
import { safeEval } from '../../../../Common/eval';
import { DoorDrawerStore } from '../../../Store/DoorDrawerStore/DoorDrawerStore';
import { DoorStore } from '../../../Store/DoorDrawerStore/DoorStore';
import { DrawerStore } from '../../../Store/DoorDrawerStore/DrawerStore';
import { IDoorInfo, IDrawerInfo } from '../../../Store/DoorInterface';
import { DoorStore } from '../../../Store/DoorDrawerStore/DoorStore';
import { safeEval } from '../../../../Common/eval';
import { AppToaster } from '../../Toaster';
import { Intent, Classes, Checkbox } from '@blueprintjs/core';
import { DoorPreviewItem, DoorPreviewLgItem, DoorPreviewSmItem } from './DoorPreviewItem';
const MinInputSize = 40;
@ -190,7 +190,7 @@ export class DoorPreviewComponent extends React.Component<{ store?: DoorDrawerSt
handleChange={this.handleChange}
handleCheck={this.handleCheck}
doorCom={
(info.divWidth <= refSize || info.divHeight <= refSize) ?
(info.divWidth <= refSize || info.divHeight <= refSize * 2) ?
DoorPreviewSmItem :
DoorPreviewLgItem
}

@ -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>
);
}

@ -198,6 +198,7 @@ export class UserConfig extends React.Component<IConfigProps, {}>{
<Button
text="保存"
intent={Intent.SUCCESS}
style={{ marginLeft: 3 }}
onClick={async () =>
{
await this.handleSaveConfig();
@ -206,6 +207,7 @@ export class UserConfig extends React.Component<IConfigProps, {}>{
<Button
text="删除"
intent={Intent.DANGER}
style={{ marginLeft: 3 }}
onClick={async () =>
{
await this.handleDeleteConfig();

@ -87,15 +87,14 @@
position: relative;
&>span.opendir {
position : absolute;
font-size: 16px;
left : 0;
right : 0;
top : 0;
bottom : 0;
margin : auto;
width : 20px;
height : 16px;
position : absolute;
font-size : 12px;
left : -10px;
top : 0;
bottom : 0;
margin-left: 50%;
width : 20px;
height : 16px;
}
}
@ -210,14 +209,35 @@
}
}
.temp-name {
.sm-temp-name {
list-style : none;
position : absolute;
left : 30%;
top : 30px;
width: 100%;
height: 70%;
right: 0;
bottom: 0;
padding : 0;
margin : 0;
white-space: nowrap;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.temp-name {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
list-style : none;
position : absolute;
width: 80%;
height: 54px;
left : 10%;
top : 15px;
padding : 0;
white-space: nowrap;
}
}

@ -1,13 +1,13 @@
import React = require("react");
import { Button, Classes, H5 } from "@blueprintjs/core";
import { observer } from "mobx-react";
import { BoardConfigModal } from "../Board/BoardConfigModal";
import { BoardProcessModal } from "../Board/BoardProcessModal";
import { AddCommonBoardProps, ICommonOptionProps } from "../Board/CommonBoardOption";
import { end } from "xaop";
import { app } from "../../../ApplicationServices/Application";
import { CommandHistoryRecord } from "../../../DatabaseServices/CommandHistoryRecord";
import { Board } from "../../../DatabaseServices/Entity/Board";
import { BoardConfigModal } from "../Board/BoardConfigModal";
import { BoardProcessModal } from "../Board/BoardProcessModal";
import { AddCommonBoardProps, ICommonOptionProps } from "../Board/CommonBoardOption";
@observer
class BoardPropsCom extends React.Component<ICommonOptionProps, {}>
@ -86,6 +86,7 @@ class BoardPropsCom extends React.Component<ICommonOptionProps, {}>
canModeling={this.props.canModeling}
grooveOption={this.props._GrooveOption}
uiBoardConfig={this.props.uiConfigOption}
isRightToolbar={true}
/>
</div>
<div >

Loading…
Cancel
Save