Compare commits

..

No commits in common. "9d0d5a4b27d4c593b08f0c95bfd11cc1094eb8a3" and "774bfb7a493cfb9a7ca82ca2ce97cc9044ac714e" have entirely different histories.

3 changed files with 18 additions and 52 deletions

View File

@ -1,10 +1,13 @@
import { GlobalDataContext } from '@/app/GlobalDataProvider'
import QSelectBox from '@/components/common/select/QSelectBox'
import { useMessage } from '@/hooks/useMessage'
import { canvasState } from '@/store/canvasAtom'
import { pcsCheckState } from '@/store/circuitTrestleAtom'
import { modelState, pcsCheckState } from '@/store/circuitTrestleAtom'
import { selectedModuleState } from '@/store/selectedModuleOptions'
import { useEffect, useState } from 'react'
import { useContext, useEffect, useState } from 'react'
import { useRecoilState, useRecoilValue } from 'recoil'
import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupStatusController'
import { canvasPopupStatusStore } from '@/store/canvasPopupStatusAtom'
import { useMasterController } from '@/hooks/common/useMasterController'
import { v4 as uuidv4 } from 'uuid'
import { globalLocaleStore } from '@/store/localeAtom'
@ -12,6 +15,7 @@ import { POLYGON_TYPE } from '@/common/common'
import { useSwal } from '@/hooks/useSwal'
import { circuitNumDisplaySelector } from '@/store/settingAtom'
import { fontSelector } from '@/store/fontAtom'
import { PCS_MKR_MULTI_TYPE } from './PowerConditionalSelect'
export default function StepUp(props) {
const {
@ -105,7 +109,7 @@ export default function StepUp(props) {
/** 캔버스에 회로 정보 적용 */
// pcs setSubOpsions, setMainOptions
console.log('stepUpListData', stepUpListData)
let mChk = 0
let mChk = 0;
stepUpListData[0].pcsItemList.forEach((pcsItem, index) => {
const optionList = formatOptionCodes(pcsItem.optionList)
if (isMultiOptions()) {
@ -162,7 +166,7 @@ export default function StepUp(props) {
targetModule.circuitNumber = module.circuit
canvas.add(moduleCircuitText)
} else {
mChk++
mChk++;
}
})
})
@ -395,14 +399,10 @@ export default function StepUp(props) {
}))
}
const handleChangeApplyParalQty = (mainIdx, subIdx, applyParalQty) => {
handleRowClick(mainIdx, subIdx, applyParalQty)
}
/**
* 선택 핸들러 함수 추가
*/
const handleRowClick = (mainIdx, subIdx, applyParalQty = null) => {
const handleRowClick = (mainIdx, subIdx) => {
/** 자동 승압 설정인 경우만 실행 */
if (allocationType !== 'auto') return
@ -434,13 +434,7 @@ export default function StepUp(props) {
/** 선택된 serQty 찾기 */
const selectedSerQty = matchingPcsItem?.serQtyList.find((serQty) => serQty.selected)?.serQty || 0
if (index === 0) {
return {
...pcsItem,
applySerQty: selectedSerQty,
applyParalQty: +applyParalQty,
}
}
return {
...pcsItem,
applySerQty: selectedSerQty,
@ -651,39 +645,15 @@ export default function StepUp(props) {
<tr
key={`row-${serQtyIdx}`}
className={`${item.selected ? 'on' : ''}`}
onClick={() => {
if (idx === 0) return
handleRowClick(idx, serQtyIdx)
}}
onClick={() => handleRowClick(idx, serQtyIdx)}
style={{ cursor: allocationType === 'auto' ? 'pointer' : 'default' }}
>
<td className="al-r">{item.serQty}</td>
<td className="al-r">
{/* 2025.12.04 select 추가 */}
{idx === 0 ? (
<select
className="select-light dark table-select"
defaultValue={item.paralQty}
name=""
id=""
onChange={(e) => {
handleChangeApplyParalQty(idx, serQtyIdx, e.target.value)
}}
>
{item.paralQty === 0 && (
<option key="0" value="0">
0
</option>
)}
{Array.from({ length: item.paralQty }, (_, i) => i + 1).map((num) => (
<option key={num} value={num}>
{num}
</option>
))}
<select className="select-light dark table-select" name="" id="">
<option value="">{item.paralQty}</option>
</select>
) : (
<>{item.paralQty}</>
)}
</td>
{/* <td className="al-r">{item.paralQty}</td> */}
</tr>

View File

@ -267,14 +267,14 @@ export function useModuleBasicSetting(tabNum) {
//도머일때
if (obj.name === BATCH_TYPE.TRIANGLE_DORMER || obj.name === BATCH_TYPE.PENTAGON_DORMER) {
const groupPoints = obj.getCurrentPoints()
const offsetObjects = offsetPolygon(groupPoints, 30)
const offsetObjects = offsetPolygon(groupPoints, 10)
const dormerOffset = new QPolygon(offsetObjects, batchObjectOptions)
dormerOffset.setViewLengthText(false)
canvas.add(dormerOffset) //모듈설치면 만들기
} else {
//개구, 그림자일때
const points = obj.getCurrentPoints()
const offsetObjects = offsetPolygon(points, 30)
const offsetObjects = offsetPolygon(points, 10)
const offset = new QPolygon(offsetObjects, batchObjectOptions)
offset.setViewLengthText(false)
canvas.add(offset) //모듈설치면 만들기

View File

@ -50,10 +50,6 @@ export function useCanvasEvent() {
if (target) {
// settleDown(target)
// roof 이동 후 좌표 재계산
if (target.name === POLYGON_TYPE.ROOF && target.type === 'QPolygon') {
target.fire('polygonMoved')
}
}
},
addEvent: (e) => {