!2456 优化:模块管理界面显示

pull/2479/MERGE
黄诗津 11 months ago committed by ChenX
parent 6ff46aab75
commit 8c4beb9eea

@ -800,14 +800,15 @@ export class AutoCutCheckbox extends React.Component<IAutoCutCheckboxProps, {}>
<div className={"brModal-autoCut " + (this.props.isFlex ? "flex" : "")}>
<Checkbox
tabIndex={-1}
style={{ marginRight: 10 }}
checked={isAutoCut}
style={{ marginRight: 10 }}
label="自动切割"
onChange={() => this.ToggleValue(0)}
/>
<Checkbox
tabIndex={-1}
checked={isRelevance}
style={{ marginRight: 10 }}
label="关联切割"
disabled={!isAutoCut}
onChange={() => this.ToggleValue(1)}

@ -156,7 +156,7 @@ export class CommonPanel extends React.Component<ICommonPanelProps, ICommonPanel
pageCount: 15
};
@observable searchedDirs: IDirectoryProps[] = [];
@observable isSmallScreen = !!(window.innerWidth < 1080);;
@observable isSmallScreen = !!(window.innerWidth < 1080);
handleOpenDrawer = observable.box(false);
DirTreeRef = React.createRef<DirTreeComponent>();
_Events: Function[] = [];

@ -115,7 +115,7 @@ export class GetRoomCabName extends React.Component<IGetRoomCabNameProps> {
</div>
}
</div>
<Button text="拾取" intent={Intent.SUCCESS} onClick={this.getOption} />
<Button text="拾取" className='pickup' intent={Intent.SUCCESS} onClick={this.getOption} />
<Card elevation={Elevation.ONE} className='needBoardName'>
<span className='tip'>{this.props.needBoardName ? "模块替换时" : "顶线绘制时"}</span>
{

@ -1,10 +1,11 @@
#commonModal {
.get-name {
align-items: center;
margin-left: 30px;
button {
align-self: stretch;
.pickup {
width: 34px;
min-width: 34px;
height: 94px;
}
.lock{
@ -12,30 +13,42 @@
align-items : center;
margin-bottom: 2px;
:nth-child(2) {
margin-left: 3px;
&>span {
width: 24px;
margin-right: 3px;
}
.bp3-control {
margin: 4px 0 0 -8px;
padding-left: 7px;
margin-left: 3px;
margin-bottom: 0;
}
}
.needBoardName{
display : flex;
flex-direction: column;
margin-left : 50px;
padding : 11px 35px 8px 30px;
margin-left : 10px;
padding : 11px 30px 8px 30px;
background-color: #EBF1F5;
.bp3-checkbox{
width: 74px;
margin-bottom: 7px;
}
.tip{
position: absolute;
margin : -19px -23px
margin : -19px -23px;
}
}
@media screen and (max-width:1000px) {
.needBoardName {
padding: 11px 10px 8px 10px;
.tip{
margin : -19px -5px;
}
}
}
}
@ -56,19 +69,33 @@
height: 110px;
.display-count {
margin: 0 5px;
display: flex;
align-items: center;
input {
&>span {
min-width: 24px;
}
&>input {
margin-left: 5px;
margin-top: 0;
width: 50px;
}
}
.display-autocut
{
border: 1px solid #ccc;
padding-left: 5px;
display: flex;
align-items: center;
gap: 10px;
.bp3-control {
min-width: 50px;
margin: 10px 0;
}
}
}

@ -1194,104 +1194,104 @@ export class TemplateManage extends React.Component<ITemplateManage, {}> {
this.renderBody()
}
</div>
<div className={Classes.DIALOG_FOOTER + ` ${!this.props.R2bReplace && "flex-between"}`} >
{
!this.props.R2bReplace ?
<>
<GetRoomCabName
option={this.templateManageOption.option}
needBoardName
{
this.props.R2bReplace ?
<div className={Classes.DIALOG_FOOTER} >
<Button
className={Classes.INTENT_PRIMARY}
text="确定"
onClick={this.handleR2bRepalce}
disabled={!this.currentTemplateInfo.id || this.currentTemplateInfo.isKuGan}
/>
</div>
:
<div className={Classes.DIALOG_FOOTER + " flex-between"} >
<GetRoomCabName
option={this.templateManageOption.option}
needBoardName
/>
<Label className='display-count'>
<span></span>
<input
tabIndex={1}
type="text"
className='bp3-input'
value={this.templateManageOption.perPageCount}
onClick={(e) => { (e.currentTarget).setSelectionRange(0, e.currentTarget.value.length); }}
onChange={(e) =>
{
let currentCount = safeEval(e.currentTarget.value);
if (isNaN(currentCount) || currentCount > 100 || currentCount < 1) return;
this.templateManageOption.perPageCount = currentCount;
this.commonPanel.current.pageData.pageCount = currentCount;
this.commonPanel.current.handleGetData();
}}
/>
<Label className='display-count'>
<span></span>
<input
tabIndex={1}
type="text"
className='bp3-input'
value={this.templateManageOption.perPageCount}
onClick={(e) => { (e.currentTarget).setSelectionRange(0, e.currentTarget.value.length); }}
onChange={(e) =>
</Label>
<div className="display-autocut" >
{
this.props.type === "Administration" && <Checkbox
checked={this.templateManageOption.useOverallOption}
label='全局'
onChange={() =>
{
let currentCount = safeEval(e.currentTarget.value);
if (isNaN(currentCount) || currentCount > 100 || currentCount < 1) return;
this.templateManageOption.perPageCount = currentCount;
this.commonPanel.current.pageData.pageCount = currentCount;
this.commonPanel.current.handleGetData();
this.templateManageOption.useOverallOption = !this.templateManageOption.useOverallOption;
this.noUseOverAllOptionsChange();
if (this.templateManageOption.useOverallOption)
this.templateManageOption.autoCutOption = toJS(this.autoCutOption);
}}
/>
</Label>
<div className="display-autocut" >
}
<AutoCutCheckbox
isFlex={false}
autoCutOption={this.templateManageOption.autoCutOption}
onChangeCallback={() =>
{
this.props.type === "Administration" && <Checkbox
checked={this.templateManageOption.useOverallOption}
label='全局'
onChange={() =>
{
this.templateManageOption.useOverallOption = !this.templateManageOption.useOverallOption;
this.noUseOverAllOptionsChange();
if (this.templateManageOption.useOverallOption)
this.templateManageOption.autoCutOption = toJS(this.autoCutOption);
}}
/>
}
<AutoCutCheckbox
isFlex={false}
autoCutOption={this.templateManageOption.autoCutOption}
onChangeCallback={() =>
if (!this.templateManageOption.useOverallOption && this.currentDirId)
{
if (!this.templateManageOption.useOverallOption && this.currentDirId)
{
const dirItem = this.findMatchingItem(this.templateManageOption.dirData, this.currentDirId);
if (dirItem)
dirItem.autoCutOption = this.templateManageOption.autoCutOption;
}
else if (this.templateManageOption.useOverallOption)
{
this.autoCutOption = toJS(this.templateManageOption.autoCutOption);
}
}}
/>
</div>
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
<Button
className={Classes.INTENT_SUCCESS}
text={<span><i>(I)</i></span>}
disabled={!this.currentTemplateInfo.id}
onClick={() => this.handleInsert(true)}
/>
const dirItem = this.findMatchingItem(this.templateManageOption.dirData, this.currentDirId);
if (dirItem)
dirItem.autoCutOption = this.templateManageOption.autoCutOption;
}
else if (this.templateManageOption.useOverallOption)
{
this.autoCutOption = toJS(this.templateManageOption.autoCutOption);
}
}}
/>
</div>
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
<Button
className={Classes.INTENT_SUCCESS}
text={<span><i>(I)</i></span>}
disabled={!this.currentTemplateInfo.id}
onClick={() => this.handleInsert(true)}
/>
<Button
className={Classes.INTENT_DANGER}
text={<span><i>(S)</i></span>}
onClick={() => this.handleInsert(false)}
disabled={!this.currentTemplateInfo.id}
/>
{
this.currentTemplateInfo.id && (this.currentTemplateInfo.isHandle || this.currentTemplateInfo.isHinge) &&
<Button
className={Classes.INTENT_DANGER}
text={<span><i>(S)</i></span>}
onClick={() => this.handleInsert(false)}
text="拾取板件"
onClick={this.handleInsertHandleOrHinge}
disabled={!this.currentTemplateInfo.id}
/>
{
this.currentTemplateInfo.id && (this.currentTemplateInfo.isHandle || this.currentTemplateInfo.isHinge) &&
<Button
className={Classes.INTENT_DANGER}
text="拾取板件"
onClick={this.handleInsertHandleOrHinge}
disabled={!this.currentTemplateInfo.id}
/>
}
<Button
className={Classes.INTENT_PRIMARY}
text={<span><i>(T)</i></span>}
onClick={this.handleReplace}
disabled={!this.currentTemplateInfo.id || this.currentTemplateInfo.isKuGan}
/>
</div>
</>
:
<Button
className={Classes.INTENT_PRIMARY}
text="确定"
onClick={this.handleR2bRepalce}
disabled={!this.currentTemplateInfo.id || this.currentTemplateInfo.isKuGan}
/>
}
</div>
}
<Button
className={Classes.INTENT_PRIMARY}
text={<span><i>(T)</i></span>}
onClick={this.handleReplace}
disabled={!this.currentTemplateInfo.id || this.currentTemplateInfo.isKuGan}
/>
</div>
</div>
}
</div>
</div>
);

Loading…
Cancel
Save