|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { Alert, Button, Checkbox, Classes, HTMLSelect, Intent, Tag } from '@blueprintjs/core';
|
|
|
|
|
import { IObservableValue, observable } from 'mobx';
|
|
|
|
|
import { IObservableArray, IObservableValue, observable } from 'mobx';
|
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
|
import * as React from 'react';
|
|
|
|
|
import { FaceDirection } from "../../../Add-on/DrawDrilling/DrillType";
|
|
|
|
@ -40,6 +40,7 @@ interface BoardProcessProps
|
|
|
|
|
topBottomOption?: TBBoardOption;
|
|
|
|
|
otherBoardData?: { [key: string]: any; };
|
|
|
|
|
isEdgeRemarks?: boolean;
|
|
|
|
|
ProcessingGroupList?: IObservableArray<any>;
|
|
|
|
|
}
|
|
|
|
|
@observer
|
|
|
|
|
export class BoardProcessModal extends React.Component<BoardProcessProps, {}>
|
|
|
|
@ -229,31 +230,40 @@ export class BoardProcessModal extends React.Component<BoardProcessProps, {}>
|
|
|
|
|
if (!temp) return false;
|
|
|
|
|
return ((temp instanceof TemplateWineRackRecord && !(br.Name === "层板" || br.Name === "立板")) || temp instanceof TemplateLatticeRecord);
|
|
|
|
|
};
|
|
|
|
|
private updateTags = () =>
|
|
|
|
|
|
|
|
|
|
getTags()
|
|
|
|
|
{
|
|
|
|
|
let newTags: string[] = [];
|
|
|
|
|
const br = this.props.br;
|
|
|
|
|
if (!br) return;
|
|
|
|
|
this.tags = [];
|
|
|
|
|
if (!br) return newTags;
|
|
|
|
|
if (br.Template)
|
|
|
|
|
{
|
|
|
|
|
if (br.Template.Object instanceof TemplateWineRackRecord)
|
|
|
|
|
{
|
|
|
|
|
if (!(br.Name === "层板" || br.Name === "立板"))
|
|
|
|
|
{
|
|
|
|
|
this.tags = ["酒格"];
|
|
|
|
|
newTags = ["酒格"];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (br.Template.Object instanceof TemplateLatticeRecord)
|
|
|
|
|
{
|
|
|
|
|
this.tags = ["格子抽"];
|
|
|
|
|
newTags = ["格子抽"];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (let process of br.ProcessingGroupList)
|
|
|
|
|
for (let process of this.props.ProcessingGroupList)
|
|
|
|
|
{
|
|
|
|
|
let obj = process?.Object;
|
|
|
|
|
if (obj)
|
|
|
|
|
this.tags.push((obj as ProcessingGroupRecord).Name);
|
|
|
|
|
newTags.push((obj as ProcessingGroupRecord).Name);
|
|
|
|
|
}
|
|
|
|
|
return newTags;
|
|
|
|
|
}
|
|
|
|
|
private updateTags = () =>
|
|
|
|
|
{
|
|
|
|
|
let newTags = this.getTags();
|
|
|
|
|
|
|
|
|
|
if (JSON.stringify(this.tags) !== JSON.stringify(newTags))
|
|
|
|
|
this.tags = newTags;
|
|
|
|
|
};
|
|
|
|
|
private isSplit()
|
|
|
|
|
{
|
|
|
|
@ -316,10 +326,17 @@ export class BoardProcessModal extends React.Component<BoardProcessProps, {}>
|
|
|
|
|
{
|
|
|
|
|
this.container.addEventListener('keydown', e => e.stopPropagation());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps: Readonly<BoardProcessProps>, prevState: Readonly<{}>, snapshot?: any): void
|
|
|
|
|
{
|
|
|
|
|
if (this.showAlert.get()) return;
|
|
|
|
|
this.updateTags();
|
|
|
|
|
}
|
|
|
|
|
render()
|
|
|
|
|
{
|
|
|
|
|
const { isEdgeRemarks = true } = this.props;
|
|
|
|
|
let isShowHighEditor = Boolean(this.props.br);
|
|
|
|
|
let tagValue = this.getTags().join(',');
|
|
|
|
|
|
|
|
|
|
const CheckBoxStyle: React.CSSProperties = { marginBottom: 3 };
|
|
|
|
|
return (
|
|
|
|
@ -361,7 +378,7 @@ export class BoardProcessModal extends React.Component<BoardProcessProps, {}>
|
|
|
|
|
<label className="bp3-label bp3-inline .modifier" style={{ display: "flex" }}>
|
|
|
|
|
<span>加工组:</span>
|
|
|
|
|
<div className="flex" style={{ display: "inline-flex", width: "83%" }}>
|
|
|
|
|
<input className="bp3-input br-process-input" title="双击查看详细内容" value={this.tags.length > 0 ? this.tags.join(", ") : ""} readOnly style={{ flex: 1 }} onDoubleClick={this.onProcessInputDbClick} />
|
|
|
|
|
<input className="bp3-input br-process-input" title="双击查看详细内容" value={tagValue} readOnly style={{ flex: 1 }} onDoubleClick={this.onProcessInputDbClick} />
|
|
|
|
|
<Button
|
|
|
|
|
text="更多"
|
|
|
|
|
intent="success"
|
|
|
|
|