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