|
|
|
@ -11,6 +11,7 @@ import { RightTabId } from '../RightPanel/RightPanel';
|
|
|
|
|
import { ToasterInput } from '../Toaster';
|
|
|
|
|
import { GetEntity } from '../../../Common/Utils';
|
|
|
|
|
import { safeEval } from '../../../Common/eval';
|
|
|
|
|
import { EBoardKeyList } from '../../../Common/BoardKeyList';
|
|
|
|
|
|
|
|
|
|
type OptionType = BoardOption | DrillingOption;
|
|
|
|
|
|
|
|
|
@ -482,10 +483,10 @@ export class DrillTypeSelectCom extends React.Component<IDrillTypeSelect, { isDa
|
|
|
|
|
{
|
|
|
|
|
options.unshift(DrillType.More);
|
|
|
|
|
}
|
|
|
|
|
if (!options.includes(this.props.opt.drillType))
|
|
|
|
|
if (!options.includes(this.props.opt.drillType) || this.props.opt.highDrill.some(t => !options.includes(t)))
|
|
|
|
|
{
|
|
|
|
|
if (this.props.br)
|
|
|
|
|
options.unshift("无效配置");
|
|
|
|
|
options.unshift(DrillType.Invail);
|
|
|
|
|
}
|
|
|
|
|
return options;
|
|
|
|
|
}
|
|
|
|
@ -529,11 +530,13 @@ export class DrillTypeSelectCom extends React.Component<IDrillTypeSelect, { isDa
|
|
|
|
|
UNSAFE_componentWillMount()
|
|
|
|
|
{
|
|
|
|
|
const options = this.Options;
|
|
|
|
|
if (!options.includes(this.props.opt.drillType))
|
|
|
|
|
if (options[0] === DrillType.Invail || !options.includes(this.props.opt.drillType))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (this.props.br)
|
|
|
|
|
{
|
|
|
|
|
this.props.opt[EBoardKeyList.DrillType] = DrillType.Invail;
|
|
|
|
|
this.setState({ isDanger: true });
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.props.opt.drillType = options[0];
|
|
|
|
|
}
|
|
|
|
|