!2609 功能:收口条绘制功能,要求可以自定义板件名称。

pull/2707/head
彭泽 5 months ago committed by ChenX
parent 074186dcea
commit 838ffc5941

@ -160,20 +160,18 @@ export class DrawClosingStrip implements Command
}
else
{
br = Board.CreateBoard(width, size.x, thickness,
BoardType.Behind);
br = Board.CreateBoard(width, size.x, thickness, BoardType.Behind);
br.BoardProcessOption = store.BoardProcessOption;
br.BoardProcessOption.lines = LinesType.Reverse;
pos.set(min.x, min.y + thickness + frontShrink, max.z);
if (opt.isDrawFuZhu)
{
br2 = Board.CreateBoard(size.x, opt.fzWidth, opt.fzThickness,
BoardType.Layer);
br2 = Board.CreateBoard(size.x, opt.fzWidth, opt.fzThickness, BoardType.Layer);
br2.Position = new Vector3(max.x, min.y + frontShrink + thickness, max.z);
br2.Name = "上收口条";
}
}
br.Name = "上收口条";
br.Name = store.m_Option.brName;
}
else
{
@ -190,6 +188,7 @@ export class DrawClosingStrip implements Command
if (opt.boardRelative === BrRelativePos.Left)
{
br.BoardProcessOption = store.BoardProcessOption;
if (opt.striptype === StripType.H)
{
pos.set(min.x - width, min.y + thickness + frontShrink, min.z);
@ -203,10 +202,11 @@ export class DrawClosingStrip implements Command
{
pos.copy(min.clone().add(new Vector3(-thickness, frontShrink)));
}
br.Name = "左收口条";
br.Name = store.m_Option.brName;
}
else
{
br.BoardProcessOption = store.BoardProcessOption;
if (opt.striptype === StripType.H)
{
pos.set(max.x, min.y + thickness + frontShrink, min.z);
@ -220,7 +220,7 @@ export class DrawClosingStrip implements Command
{
pos.copy(min.clone().add(new Vector3(0, frontShrink))).setX(max.x);
}
br.Name = "右收口条";
br.Name = store.m_Option.brName;
}
br.BoardProcessOption = store.BoardProcessOption;
}

@ -303,9 +303,9 @@ export const DefaultSingleBoardOption: SingleBoardOption = {
Object.freeze(DefaultSingleBoardOption);
export const DefaultClosingStripOption: ClosingStripOption = {
version: 3,
version: 4,
type: BoardType.Vertical,
name: "收口条",
name: "收口条", //辅助条占用
striptype: StripType.H,
boardRelative: BrRelativePos.Left,
width: 54,
@ -314,7 +314,8 @@ export const DefaultClosingStripOption: ClosingStripOption = {
isDrawFuZhu: true,
fzWidth: 80,
fzThickness: 18,
addSKTCabinetName: true
addSKTCabinetName: true,
brName: "左收口",
};
Object.freeze(DefaultClosingStripOption);
@ -701,10 +702,11 @@ export const DefaultToplineMetalsOption: IToplineOption = {
Object.freeze(DefaultToplineMetalsOption);
export const DefaultBoardProcessOption: BoardProcessOption = {
version: 4,
version: 3,
roomName: "",
cabinetName: "",
boardName: "",
brName: "",
material: "",
color: "",
lines: LinesType.Positive,

@ -4,6 +4,7 @@ import * as React from 'react';
import * as xaop from 'xaop';
import { DrillType } from '../../../Add-on/DrawDrilling/DrillType';
import { app } from '../../../ApplicationServices/Application';
import { CheckObjectType } from '../../../Common/CheckoutVaildValue';
import { KeyBoard } from '../../../Common/KeyEnum';
import { userConfig } from '../../../Editor/UserConfig';
import { BehindBoardStore, BoardStore, ClosingStripStore, LayerBoardStore, SideBoardStore, SingleBoardStore, TopBottomBoardStore, VerticalBoardStore } from '../../Store/BoardStore';
@ -12,7 +13,7 @@ import { AnyObject } from "../../Store/OptionInterface/IOptionInterface";
import { ModalState } from '../Modal/ModalInterface';
import { CommonModal } from './../Modal/ModalContainer';
import { BehindBoardModal } from './BehindBoardModal';
import { AutoCutCheckbox, Notes } from './BoardCommon';
import { AutoCutCheckbox, Notes, SetBoardDataItem } from './BoardCommon';
import { BoardModalType } from './BoardModalType';
import { BoardProcessModal } from './BoardProcessModal';
import { ClosingStripModal } from './ClosingStripModal';
@ -175,6 +176,18 @@ export class BoardModal extends React.Component<BoardModalProps, {}>
}}
/>
}
{
this.props.type === BoardModalType.Skt &&
<div className='board-info'>
<SetBoardDataItem
type={CheckObjectType.BR}
optKey="brName"
option={store.m_Option}
title="板名"
placeHolder="输入板名"
/>
</div>
}
<BoardProcessModal type={this.props.type} opt={store.m_BoardProcessOption} topBottomOption={(store as TopBottomBoardStore).bottomBoardOption} drillOption={store.rectDrillOption} uiOpt={store.UIBoardProcessOption} />
</div>
<div className={Classes.CARD}>

@ -43,7 +43,8 @@ interface BoardProcessProps
isEdgeRemarks?: boolean;
}
@observer
export class BoardProcessModal extends React.Component<BoardProcessProps, {}>{
export class BoardProcessModal extends React.Component<BoardProcessProps, {}>
{
private showShops = observable.box(false);
private showAlert = observable.box(false);
@observable private tags: string[] = [];
@ -102,16 +103,18 @@ export class BoardProcessModal extends React.Component<BoardProcessProps, {}>{
store.boardEdgeRemarksStore.isNotUpdateStore = false;
}, 0);
}
private renderEl = () =>
{
const el =
<><SetBoardDataItem
type={CheckObjectType.BR}
optKey="roomName"
option={this.props.opt}
title="房间名"
placeHolder="输入房间名"
/>
<>
<SetBoardDataItem
type={CheckObjectType.BR}
optKey="roomName"
option={this.props.opt}
title="房间名"
placeHolder="输入房间名"
/>
<SetBoardDataItem
type={CheckObjectType.BR}
optKey="cabinetName"

@ -61,6 +61,7 @@ export const ClosingStripModal =
}
store.ChangeCabinetName();
store.ChangeBrName();
}}
selectedValue={opt.boardRelative}
>

@ -8,28 +8,28 @@
}
/*板件属性尺寸拾取*/
.br-size{
.bp3-label{
display: flex;
margin-bottom: 0;
.br-size {
.bp3-label {
display: flex;
margin-bottom: 0;
&>div{
display: flex;
&>div {
display: flex;
:last-child{
margin-top: 0;
width: 60px;
}
:last-child {
margin-top: 0;
width: 60px;
}
}
.bp3-button {
min-height: 10px;
width: 45px;
height: 17px;
margin-left: 5px;
}
.bp3-button {
min-height: 10px;
width: 45px;
height: 17px;
margin-left: 5px;
}
}
}
.board-info>.bp3-label input {
width: @infoSelectWidth;
@ -71,18 +71,18 @@
/* 板件模型设置 */
#commonModal .boardModel {
display : inline-block;
width : 35px;
height : 50px;
border : 1px solid #000;
display: inline-block;
width: 35px;
height: 50px;
border: 1px solid #000;
vertical-align: middle;
margin : 10px;
margin: 10px;
}
#commonModal .boardSize .bp3-label,
#commonModal .behind-board .board-info .boardSize .bp3-input {
display: inline-block;
margin : 0 5px;
margin: 0 5px;
}
#commonModal {
@ -110,10 +110,10 @@
}
#commonModal .boardSize .bp3-label>.bp3-input {
display : block;
padding : 0;
display: block;
padding: 0;
padding-left: 5px;
line-height : 15px;
line-height: 15px;
}
// #commonModal .input-select>input,
@ -127,34 +127,40 @@
/* 板材信息 */
#commonModal {
.bp3-input,
.lr-br .bp3-input {
width: @inputWidth;
}
.boardSize .bp3-input {
width: 3rem;
}
.bp3-input,
.lr-br .bp3-input {
width: @inputWidth;
}
.boardSize .bp3-input {
width: 3rem;
}
.board-info .bp3-input {
width: 9rem;
}
}
/* 板长宽厚尺寸拾取,板件拾取*/
#commonModal {
.br-lkg{
.br-lkg {
display: flex;
&>div{
.bp3-label{
&>div {
.bp3-label {
display: flex;
margin-bottom: 0;
&>div{
&>div {
display: flex;
:last-child{
:last-child {
margin-top: 0;
}
}
.bp3-button {
.bp3-button {
min-height: 10px;
width: 30px;
height: 17px;
@ -164,25 +170,25 @@
}
}
&>button{
&>button {
width: 2rem;
height: 75px;
}
}
.interval{
.interval {
display: flex;
&>div{
&>div {
display: flex;
margin-bottom: 5px;
:last-child{
:last-child {
margin-top: 0;
}
}
.bp3-button {
.bp3-button {
min-height: 10px;
width: 30px;
height: 17px;
@ -191,21 +197,22 @@
}
}
}
/* 尺寸拾取*/
#modal .pick-br{
.bp3-label{
#modal .pick-br {
.bp3-label {
display: flex;
&>div{
&>div {
display: flex;
margin-bottom: 0;
:last-child{
:last-child {
margin-top: 0;
}
}
.bp3-button {
.bp3-button {
min-height: 10px;
width: 30px;
height: 17px;
@ -225,7 +232,7 @@
}
#commonModal .hole>label {
display : inline-block;
display: inline-block;
margin-right: 1rem;
}
@ -239,7 +246,7 @@
}
#commonModal .notes>div>label {
height : @noteInputHeight;
height: @noteInputHeight;
line-height: @noteInputHeight;
}
@ -260,7 +267,7 @@
//选择材质
#commonModal .bp3-dialog-body .board-info {
.br-mat {
position : relative;
position: relative;
margin-bottom: 0.5rem;
input {
@ -288,17 +295,17 @@
}
#commonModal .edge-sealing span>button {
height : 14px;
font-size : 12px;
width : 6rem;
padding-top : 0px;
height: 14px;
font-size: 12px;
width: 6rem;
padding-top: 0px;
padding-bottom: 0px;
min-height : 14px;
min-height: 14px;
}
#commonModal .edge-sealing {
display : flex;
margin-top : 10px;
display: flex;
margin-top: 10px;
align-items: center;
ul {
@ -337,26 +344,26 @@
}
#commonModal .invalidDrill {
.bp3-dialog-body{
padding : 25px;
.bp3-dialog-body {
padding: 25px;
max-height: 250px;
overflow : auto;
overflow: auto;
}
.bp3-dialog-footer{
.bp3-dialog-footer {
padding: 0px 11px 14px 0;
}
}
#commonModal .boardColorMaterialMap{
#commonModal .boardColorMaterialMap {
font-size: 13px;
min-width: 350px;
.bp3-dialog-body{
.bp3-dialog-body {
background-color: white;
}
.bp3-dialog-footer{
.bp3-dialog-footer {
padding: 2px 20px;
}
}

@ -784,6 +784,7 @@ export class ClosingStripStore extends BoardStore<ClosingStripOption>
super();
this.m_BoardProcessOption[EBoardKeyList.DrillType] = DrillType.None;
}
ChangeCabinetName(cof?: IConfigOption)
{
let [option, processData] = cof ? [cof.option, cof.processData] : [this.m_Option, this.m_BoardProcessOption];
@ -813,11 +814,32 @@ export class ClosingStripStore extends BoardStore<ClosingStripOption>
}
}
}
ChangeBrName(cof?: IConfigOption)
{
let option = cof ? cof.option : this.m_Option;
let title = "左";
switch (option.boardRelative)
{
case BrRelativePos.Right:
title = "右";
break;
case BrRelativePos.Top:
title = "上";
default:
break;
}
// 收口条名称
let brName = title + "收口";
option.brName = brName;
}
InitOption()
{
Object.assign(this.m_Option, DefaultClosingStripOption);
super.InitOption();
}
UpdateOption(cof: IConfigOption<ClosingStripOption>)
{
if (cof.option.version < 2)
@ -832,6 +854,11 @@ export class ClosingStripStore extends BoardStore<ClosingStripOption>
cof.option.addSKTCabinetName = true;
cof.option.version = 3;
}
if (cof.option.version < 4)
{
cof.option.version = 4;
this.ChangeBrName(cof);
}
this.ChangeCabinetName(cof);
super.UpdateOption(cof);
}

@ -9,6 +9,7 @@ export interface BoardProcessOption extends IBaseOption
{
[EBoardKeyList.RoomName]?: string;
[EBoardKeyList.CabinetName]?: string; //柜名
[EBoardKeyList.BrName]?: string; //板名
[EBoardKeyList.BrMat]?: string; //板材名
[EBoardKeyList.Mat]?: string; //材料
[EBoardKeyList.Color]?: string;

@ -16,4 +16,5 @@ export interface ClosingStripOption extends BoardConfigOption
fzWidth: number;
fzThickness: number;
addSKTCabinetName: boolean; //柜名加收口名称
brName: string;//收口条板名 name被辅助条占用
}

Loading…
Cancel
Save