Merge branch 'feature/skeleton-dev' of https://git.hanasys.jp/qcast3/qcast-front into feature/skeleton-dev
This commit is contained in:
commit
fa30303f7a
@ -95,16 +95,11 @@ const resizeImage = async (image) => {
|
|||||||
const scaleY = targetImageHeight / image.bitmap.height
|
const scaleY = targetImageHeight / image.bitmap.height
|
||||||
let scale = Math.min(scaleX, scaleY) // 비율 유지하면서 최대한 크게
|
let scale = Math.min(scaleX, scaleY) // 비율 유지하면서 최대한 크게
|
||||||
|
|
||||||
// scale 저장 (나중에 전체 확대에 사용)
|
|
||||||
const originalScale = scale
|
|
||||||
|
|
||||||
let finalWidth = Math.round(image.bitmap.width * scale)
|
let finalWidth = Math.round(image.bitmap.width * scale)
|
||||||
let finalHeight = Math.round(image.bitmap.height * scale)
|
let finalHeight = Math.round(image.bitmap.height * scale)
|
||||||
|
|
||||||
if (scale >= 0.6) {
|
// 항상 리사이즈 실행 (scale >= 0.6 조건 제거)
|
||||||
// 실제 리사이즈 실행
|
|
||||||
image.resize({ w: finalWidth, h: finalHeight })
|
image.resize({ w: finalWidth, h: finalHeight })
|
||||||
}
|
|
||||||
|
|
||||||
//배경 이미지를 생성
|
//배경 이미지를 생성
|
||||||
const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff })
|
const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff })
|
||||||
@ -119,14 +114,7 @@ const resizeImage = async (image) => {
|
|||||||
opacityDest: 1,
|
opacityDest: 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
// scale이 0.8 이하인 경우 완성된 이미지를 전체적으로 확대
|
// 1.5x 확대 로직 제거 - 이미지가 템플릿 크기를 초과하지 않도록 함
|
||||||
if (originalScale <= 0.8) {
|
|
||||||
const enlargeRatio = 1.5 // 50% 확대
|
|
||||||
const newWidth = Math.round(mixedImage.bitmap.width * enlargeRatio)
|
|
||||||
const newHeight = Math.round(mixedImage.bitmap.height * enlargeRatio)
|
|
||||||
|
|
||||||
mixedImage.resize({ w: newWidth, h: newHeight })
|
|
||||||
}
|
|
||||||
|
|
||||||
return mixedImage
|
return mixedImage
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,11 @@ export default function Join() {
|
|||||||
|
|
||||||
// 가입 신청 유효성 검사
|
// 가입 신청 유효성 검사
|
||||||
const joinValidation = (formData) => {
|
const joinValidation = (formData) => {
|
||||||
|
|
||||||
|
// 전화번호/FAX 정규식 (일본 형식: 0으로 시작, 하이픈 포함)
|
||||||
|
const telRegex = /^0\d{1,4}-\d{1,4}-\d{4}$/
|
||||||
|
|
||||||
|
|
||||||
// 판매대리점 정보 - 판매대리점명
|
// 판매대리점 정보 - 판매대리점명
|
||||||
const storeQcastNm = formData.get('storeQcastNm')
|
const storeQcastNm = formData.get('storeQcastNm')
|
||||||
if (!isObjectNotEmpty(storeQcastNm)) {
|
if (!isObjectNotEmpty(storeQcastNm)) {
|
||||||
@ -65,12 +70,34 @@ export default function Join() {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 판매대리점 정보 - 전화번호
|
// 판매대리점 정보 - 전화번호
|
||||||
const telNo = formData.get('telNo')
|
const telNo = formData.get('telNo')
|
||||||
if (!isObjectNotEmpty(telNo)) {
|
if (!isObjectNotEmpty(telNo)) {
|
||||||
alert(getMessage('common.message.required.data', [getMessage('join.sub1.telNo')]))
|
alert(getMessage('common.message.required.data', [getMessage('join.sub1.telNo')]))
|
||||||
telNoRef.current.focus()
|
telNoRef.current.focus()
|
||||||
return false
|
return false
|
||||||
|
} else if (!telRegex.test(telNo)) {
|
||||||
|
alert(getMessage('join.validation.check1', [getMessage('join.sub1.telNo')]))
|
||||||
|
telNoRef.current.focus()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// // 판매대리점 정보 - 전화번호
|
||||||
|
// const telNo = formData.get('telNo')
|
||||||
|
// if (!isObjectNotEmpty(telNo)) {
|
||||||
|
// alert(getMessage('common.message.required.data', [getMessage('join.sub1.telNo')]))
|
||||||
|
// telNoRef.current.focus()
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 판매대리점 정보 - FAX 번호
|
||||||
|
const fax = formData.get('fax')
|
||||||
|
if (!isObjectNotEmpty(fax)) {
|
||||||
|
alert(getMessage('common.message.required.data', [getMessage('join.sub1.fax')]))
|
||||||
|
faxRef.current.focus()
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const bizNo = formData.get('bizNo')
|
const bizNo = formData.get('bizNo')
|
||||||
@ -122,16 +149,38 @@ export default function Join() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 담당자 정보 - 전화번호
|
// 담당자 정보 - 전화번호
|
||||||
|
// const userTelNo = formData.get('userTelNo')
|
||||||
|
// if (!isObjectNotEmpty(userTelNo)) {
|
||||||
|
// alert(getMessage('common.message.required.data', [getMessage('join.sub2.telNo')]))
|
||||||
|
// userTelNoRef.current.focus()
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
const userTelNo = formData.get('userTelNo')
|
const userTelNo = formData.get('userTelNo')
|
||||||
if (!isObjectNotEmpty(userTelNo)) {
|
if (!isObjectNotEmpty(userTelNo)) {
|
||||||
alert(getMessage('common.message.required.data', [getMessage('join.sub2.telNo')]))
|
alert(getMessage('common.message.required.data', [getMessage('join.sub1.telNo')]))
|
||||||
userTelNoRef.current.focus()
|
userTelNoRef.current.focus()
|
||||||
return false
|
return false
|
||||||
|
} else if (!telRegex.test(userTelNo)) {
|
||||||
|
alert(getMessage('join.validation.check1', [getMessage('join.sub1.telNo')]))
|
||||||
|
userTelNoRef.current.focus()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 담당자 정보 - FAX 번호
|
||||||
|
const userFax = formData.get('userFax')
|
||||||
|
if (!isObjectNotEmpty(userFax)) {
|
||||||
|
alert(getMessage('common.message.required.data', [getMessage('join.sub2.fax')]))
|
||||||
|
userFaxRef.current.focus()
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 가입 신청
|
// 가입 신청
|
||||||
const joinProcess = async (e) => {
|
const joinProcess = async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@ -288,7 +337,8 @@ export default function Join() {
|
|||||||
name="telNo"
|
name="telNo"
|
||||||
className="input-light"
|
className="input-light"
|
||||||
maxLength={15}
|
maxLength={15}
|
||||||
onChange={inputNumberCheck}
|
placeholder={getMessage('join.sub1.telNo_placeholder')}
|
||||||
|
onChange={inputTelNumberCheck}
|
||||||
ref={telNoRef}
|
ref={telNoRef}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -296,7 +346,7 @@ export default function Join() {
|
|||||||
</tr>
|
</tr>
|
||||||
{/* FAX 번호 */}
|
{/* FAX 번호 */}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{getMessage('join.sub1.fax')}</th>
|
<th>{getMessage('join.sub1.fax')}<span className="important">*</span></th>
|
||||||
<td>
|
<td>
|
||||||
<div className="input-wrap" style={{ width: '200px' }}>
|
<div className="input-wrap" style={{ width: '200px' }}>
|
||||||
<input type="text" id="fax" name="fax" className="input-light" maxLength={15} onChange={inputNumberCheck} ref={faxRef} />
|
<input type="text" id="fax" name="fax" className="input-light" maxLength={15} onChange={inputNumberCheck} ref={faxRef} />
|
||||||
@ -381,7 +431,7 @@ export default function Join() {
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<div className="input-wrap" style={{ width: '200px' }}>
|
<div className="input-wrap" style={{ width: '200px' }}>
|
||||||
<input type="text" id="email" name="email" className="input-light" maxLength={30} ref={emailRef} />
|
<input type="text" id="email" name="email" className="input-light" maxLength={50} ref={emailRef} />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -398,7 +448,8 @@ export default function Join() {
|
|||||||
name="userTelNo"
|
name="userTelNo"
|
||||||
className="input-light"
|
className="input-light"
|
||||||
maxLength={15}
|
maxLength={15}
|
||||||
onChange={inputNumberCheck}
|
placeholder={getMessage('join.sub1.telNo_placeholder')}
|
||||||
|
onChange={inputTelNumberCheck}
|
||||||
ref={userTelNoRef}
|
ref={userTelNoRef}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -406,7 +457,7 @@ export default function Join() {
|
|||||||
</tr>
|
</tr>
|
||||||
{/* FAX 번호 */}
|
{/* FAX 번호 */}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{getMessage('join.sub2.fax')}</th>
|
<th>{getMessage('join.sub2.fax')}<span className="important">*</span></th>
|
||||||
<td>
|
<td>
|
||||||
<div className="input-wrap" style={{ width: '200px' }}>
|
<div className="input-wrap" style={{ width: '200px' }}>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@ -63,6 +63,33 @@ export const CalculatorInput = forwardRef(
|
|||||||
const calculator = calculatorRef.current
|
const calculator = calculatorRef.current
|
||||||
let newDisplayValue = ''
|
let newDisplayValue = ''
|
||||||
|
|
||||||
|
// 블록 지정(Selection) 확인 및 처리
|
||||||
|
if (inputRef.current) {
|
||||||
|
const { selectionStart, selectionEnd } = inputRef.current
|
||||||
|
// 텍스트 전체 또는 일부가 블록 지정된 경우
|
||||||
|
if (selectionStart !== null && selectionEnd !== null && selectionStart !== selectionEnd) {
|
||||||
|
// 연산 중이 아닐 때만 전체 초기화 후 입력 처리 (계산기 모드 유지를 위해)
|
||||||
|
if (!hasOperation) {
|
||||||
|
calculator.currentOperand = num.toString()
|
||||||
|
calculator.previousOperand = ''
|
||||||
|
calculator.operation = undefined
|
||||||
|
calculator.shouldResetDisplay = false
|
||||||
|
|
||||||
|
newDisplayValue = calculator.currentOperand
|
||||||
|
setDisplayValue(newDisplayValue)
|
||||||
|
onChange(newDisplayValue)
|
||||||
|
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
if (inputRef.current) {
|
||||||
|
inputRef.current.focus()
|
||||||
|
inputRef.current.setSelectionRange(newDisplayValue.length, newDisplayValue.length)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return // 블록 처리 로직 완료 후 종료
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// maxLength 체크
|
// maxLength 체크
|
||||||
if (maxLength > 0) {
|
if (maxLength > 0) {
|
||||||
const currentLength = (calculator.currentOperand || '').length + (calculator.previousOperand || '').length + (calculator.operation || '').length
|
const currentLength = (calculator.currentOperand || '').length + (calculator.previousOperand || '').length + (calculator.operation || '').length
|
||||||
|
|||||||
@ -2039,7 +2039,11 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
menuPlacement={'auto'}
|
menuPlacement={'auto'}
|
||||||
getOptionLabel={(x) => x.itemName + ' (' + x.itemNo + ')'}
|
getOptionLabel={(x) => {
|
||||||
|
// 메뉴 리스트에 보이는 텍스트 디코딩
|
||||||
|
const doc = new DOMParser().parseFromString(x.itemName, 'text/html');
|
||||||
|
return (doc.documentElement.textContent || x.itemName) + ' (' + x.itemNo + ')';
|
||||||
|
}}
|
||||||
getOptionValue={(x) => x.itemNo}
|
getOptionValue={(x) => x.itemNo}
|
||||||
components={{
|
components={{
|
||||||
SingleValue: ({ children, ...props }) => {
|
SingleValue: ({ children, ...props }) => {
|
||||||
@ -2048,13 +2052,21 @@ export default function Estimate({}) {
|
|||||||
}}
|
}}
|
||||||
isClearable={false}
|
isClearable={false}
|
||||||
isDisabled={!!item?.paDispOrder}
|
isDisabled={!!item?.paDispOrder}
|
||||||
value={displayItemList.filter(function (option) {
|
value={(() => {
|
||||||
if (item.itemNo === '') {
|
const selectedOption = displayItemList.find((option) => {
|
||||||
return false
|
return item.itemNo !== '' && option.itemId === item.itemId;
|
||||||
} else {
|
});
|
||||||
return option.itemId === item.itemId
|
|
||||||
|
if (selectedOption) {
|
||||||
|
// 현재 선택된 값의 itemName을 실시간으로 디코딩하여 전달
|
||||||
|
const doc = new DOMParser().parseFromString(selectedOption.itemName, 'text/html');
|
||||||
|
return {
|
||||||
|
...selectedOption,
|
||||||
|
itemName: doc.documentElement.textContent || selectedOption.itemName
|
||||||
|
};
|
||||||
}
|
}
|
||||||
})}
|
return null;
|
||||||
|
})()}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { usePathname, useSearchParams } from 'next/navigation'
|
|||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
import { sessionStore } from '@/store/commonAtom'
|
import { sessionStore } from '@/store/commonAtom'
|
||||||
|
|
||||||
export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg }) {
|
export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg, createStoreId = '' }) {
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
|
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -70,6 +70,8 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown
|
|||||||
pwrGnrSimType: 'D', //default 화면에 안보여줌
|
pwrGnrSimType: 'D', //default 화면에 안보여줌
|
||||||
userId: sessionState.userId ? sessionState.userId : "",
|
userId: sessionState.userId ? sessionState.userId : "",
|
||||||
saleStoreId: sessionState.storeId ? sessionState.storeId : "",
|
saleStoreId: sessionState.storeId ? sessionState.storeId : "",
|
||||||
|
storeLvl: sessionState.storeLvl,
|
||||||
|
createStoreId: createStoreId ? createStoreId : '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = { responseType: 'blob' }
|
const options = { responseType: 'blob' }
|
||||||
|
|||||||
@ -344,9 +344,9 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
|
|
||||||
canvas.zoomToPoint(new fabric.Point(x, y), 0.4)
|
canvas.zoomToPoint(new fabric.Point(x, y), 0.4)
|
||||||
|
|
||||||
changeFontSize('lengthText', '28')
|
// changeFontSize('lengthText', '28')
|
||||||
changeFontSize('circuitNumber', '28')
|
// changeFontSize('circuitNumber', '28')
|
||||||
changeFontSize('flowText', '28')
|
// changeFontSize('flowText', '28')
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -649,12 +649,18 @@ export default function StepUp(props) {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{pcsItem.serQtyList.map((item, serQtyIdx) => {
|
{pcsItem?.serQtyList?.map((item, serQtyIdx) => {
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={`row-${serQtyIdx}`}
|
key={`row-${serQtyIdx}`}
|
||||||
className={`${item.selected ? 'on' : ''}`}
|
className={`${item.selected ? 'on' : ''}`}
|
||||||
style={{ cursor: allocationType === 'auto' ? 'pointer' : 'default' }}
|
style={{ cursor: allocationType === 'auto' ? 'pointer' : 'default' }}
|
||||||
|
onClick={() => {
|
||||||
|
if (stepUp?.pcsItemList.length !== 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
handleRowClick(idx, serQtyIdx, item.paralQty)
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
className="al-r"
|
className="al-r"
|
||||||
@ -667,6 +673,7 @@ export default function StepUp(props) {
|
|||||||
<td className="al-r">
|
<td className="al-r">
|
||||||
{/* 2025.12.04 select 추가 */}
|
{/* 2025.12.04 select 추가 */}
|
||||||
{idx === 0 ? (
|
{idx === 0 ? (
|
||||||
|
stepUp?.pcsItemList.length !== 1 ? (
|
||||||
<select
|
<select
|
||||||
className="select-light dark table-select"
|
className="select-light dark table-select"
|
||||||
defaultValue={item.paralQty}
|
defaultValue={item.paralQty}
|
||||||
@ -696,6 +703,9 @@ export default function StepUp(props) {
|
|||||||
</select>
|
</select>
|
||||||
) : (
|
) : (
|
||||||
<>{item.paralQty}</>
|
<>{item.paralQty}</>
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<>{item.paralQty}</>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
{/* <td className="al-r">{item.paralQty}</td> */}
|
{/* <td className="al-r">{item.paralQty}</td> */}
|
||||||
|
|||||||
@ -2,12 +2,13 @@ import { useContext } from 'react'
|
|||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useForm } from 'react-hook-form'
|
import { useForm } from 'react-hook-form'
|
||||||
import { sessionStore } from '@/store/commonAtom'
|
import { sessionStore } from '@/store/commonAtom'
|
||||||
import { useRecoilValue, useRecoilState } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { useAxios } from '@/hooks/useAxios'
|
import { useAxios } from '@/hooks/useAxios'
|
||||||
import { globalLocaleStore } from '@/store/localeAtom'
|
import { globalLocaleStore } from '@/store/localeAtom'
|
||||||
import { logout, setSession, login } from '@/lib/authActions'
|
import { login, logout, setSession } from '@/lib/authActions'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
import { useRouter } from 'next/navigation'
|
||||||
|
|
||||||
export default function ChangePasswordPop(props) {
|
export default function ChangePasswordPop(props) {
|
||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
@ -18,6 +19,7 @@ export default function ChangePasswordPop(props) {
|
|||||||
const { patch } = useAxios(globalLocaleState)
|
const { patch } = useAxios(globalLocaleState)
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
||||||
|
const router = useRouter()
|
||||||
const formInitValue = {
|
const formInitValue = {
|
||||||
password1: '',
|
password1: '',
|
||||||
password2: '',
|
password2: '',
|
||||||
@ -128,12 +130,14 @@ export default function ChangePasswordPop(props) {
|
|||||||
} else {
|
} else {
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
logout()
|
logout()
|
||||||
|
router.replace('/login', undefined, { shallow: true })
|
||||||
console.log('code not 200 error')
|
console.log('code not 200 error')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
logout()
|
logout()
|
||||||
|
router.replace('/login', undefined, { shallow: true })
|
||||||
console.log('catch::::::::', error)
|
console.log('catch::::::::', error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -207,6 +211,7 @@ export default function ChangePasswordPop(props) {
|
|||||||
className="btn-origin grey"
|
className="btn-origin grey"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
logout()
|
logout()
|
||||||
|
router.replace('/login', undefined, { shallow: true })
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{getMessage('main.popup.login.btn2')}
|
{getMessage('main.popup.login.btn2')}
|
||||||
|
|||||||
@ -54,6 +54,8 @@ export default function StuffDetail() {
|
|||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
const ref = useRef()
|
const ref = useRef()
|
||||||
const { get, promiseGet, del, promisePost, promisePut } = useAxios(globalLocaleState)
|
const { get, promiseGet, del, promisePost, promisePut } = useAxios(globalLocaleState)
|
||||||
|
const [createSaleStoreId, setCreateSaleStoreId] = useState('')
|
||||||
|
|
||||||
//form
|
//form
|
||||||
const formInitValue = {
|
const formInitValue = {
|
||||||
// 물건번호 T...(임시) S...(진짜)
|
// 물건번호 T...(임시) S...(진짜)
|
||||||
@ -350,6 +352,9 @@ export default function StuffDetail() {
|
|||||||
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
|
||||||
|
setCreateSaleStoreId(res?.data?.createSaleStoreId);
|
||||||
|
|
||||||
if (res?.data?.createSaleStoreId === 'T01') {
|
if (res?.data?.createSaleStoreId === 'T01') {
|
||||||
if (session?.storeId !== 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
setShowButton('none')
|
setShowButton('none')
|
||||||
@ -2936,7 +2941,7 @@ export default function StuffDetail() {
|
|||||||
<WindSelectPop setShowWindSpeedButtonValid={setShowWindSpeedButtonValid} prefName={form.watch('prefName')} windSpeedInfo={setWindSppedInfo} />
|
<WindSelectPop setShowWindSpeedButtonValid={setShowWindSpeedButtonValid} prefName={form.watch('prefName')} windSpeedInfo={setWindSppedInfo} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{estimatePopupOpen && <DocDownOptionPop planNo={popPlanNo} setEstimatePopupOpen={setEstimatePopupOpen} />}
|
{estimatePopupOpen && <DocDownOptionPop planNo={popPlanNo} setEstimatePopupOpen={setEstimatePopupOpen} createStoreId={createSaleStoreId}/>}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,8 +3,11 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
import { sessionStore } from '@/store/commonAtom'
|
import { sessionStore } from '@/store/commonAtom'
|
||||||
import { getQueryString } from '@/util/common-utils'
|
import { getQueryString } from '@/util/common-utils'
|
||||||
import { useRecoilValue } from 'recoil'
|
import { atom, useRecoilState, useRecoilValue } from 'recoil'
|
||||||
|
|
||||||
|
|
||||||
|
// API 요청을 저장할 모듈 레벨 변수 (Hook 외부)
|
||||||
|
let roofMaterialPromise = null;
|
||||||
/**
|
/**
|
||||||
* 마스터 컨트롤러 훅
|
* 마스터 컨트롤러 훅
|
||||||
* @returns
|
* @returns
|
||||||
@ -20,10 +23,23 @@ export function useMasterController() {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const getRoofMaterialList = async () => {
|
const getRoofMaterialList = async () => {
|
||||||
return await get({ url: '/api/v1/master/getRoofMaterialList' }).then((res) => {
|
// 1. 이미 진행 중이거나 완료된 Promise가 있으면 그것을 반환
|
||||||
// console.log('🚀🚀 ~ getRoofMaterialList ~ res:', res)
|
if (roofMaterialPromise) {
|
||||||
return res
|
return roofMaterialPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 처음 호출될 때 Promise를 생성하여 변수에 할당
|
||||||
|
roofMaterialPromise = get({ url: '/api/v1/master/getRoofMaterialList' })
|
||||||
|
.then((res) => {
|
||||||
|
return res;
|
||||||
})
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
// 에러 발생 시 다음 호출을 위해 초기화
|
||||||
|
roofMaterialPromise = null;
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
|
||||||
|
return roofMaterialPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -3094,7 +3094,7 @@ export const useTrestle = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (!halfBottomRightModule) {
|
if (!halfBottomRightModule) {
|
||||||
halfBottomRightPoint = { x: x + w, y: y - height / 2 }
|
halfBottomRightPoint = { x: x + w, y: y + height / 2 }
|
||||||
halfBottomRightModule = centerPoints.find(
|
halfBottomRightModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - halfBottomRightPoint.x) < maxX && Math.abs(centerPoint.y - halfBottomRightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - halfBottomRightPoint.x) < maxX && Math.abs(centerPoint.y - halfBottomRightPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
} from '@/store/canvasAtom'
|
} from '@/store/canvasAtom'
|
||||||
import { QLine } from '@/components/fabric/QLine'
|
import { QLine } from '@/components/fabric/QLine'
|
||||||
import { basicSettingState } from '@/store/settingAtom'
|
import { basicSettingState } from '@/store/settingAtom'
|
||||||
import { calcLineActualSizeByLineLength } from '@/util/qpolygon-utils'
|
import { calcLineActualSizeByLineLength, calcLinePlaneSize } from '@/util/qpolygon-utils'
|
||||||
import { getDegreeByChon } from '@/util/canvas-util'
|
import { getDegreeByChon } from '@/util/canvas-util'
|
||||||
import { useText } from '@/hooks/useText'
|
import { useText } from '@/hooks/useText'
|
||||||
import { fontSelector } from '@/store/fontAtom'
|
import { fontSelector } from '@/store/fontAtom'
|
||||||
@ -31,6 +31,7 @@ export const useLine = () => {
|
|||||||
const addLine = (points = [], options) => {
|
const addLine = (points = [], options) => {
|
||||||
const line = new QLine(points, {
|
const line = new QLine(points, {
|
||||||
...options,
|
...options,
|
||||||
|
attributes: {},
|
||||||
fontSize: lengthText.fontSize.value,
|
fontSize: lengthText.fontSize.value,
|
||||||
fontFamily: lengthText.fontFamily.value,
|
fontFamily: lengthText.fontFamily.value,
|
||||||
})
|
})
|
||||||
@ -38,7 +39,7 @@ export const useLine = () => {
|
|||||||
if (line.length < 1) {
|
if (line.length < 1) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
line.attributes.planeSize = calcLinePlaneSize(line)
|
||||||
canvas?.add(line)
|
canvas?.add(line)
|
||||||
return line
|
return line
|
||||||
}
|
}
|
||||||
@ -172,9 +173,9 @@ export const useLine = () => {
|
|||||||
const isHorizontal = y1 === y2
|
const isHorizontal = y1 === y2
|
||||||
const isVertical = x1 === x2
|
const isVertical = x1 === x2
|
||||||
const isDiagonal = !isHorizontal && !isVertical
|
const isDiagonal = !isHorizontal && !isVertical
|
||||||
const lineLength = line.getLength()
|
const lineLength = line.attributes.planeSize ?? line.getLength()
|
||||||
|
|
||||||
line.attributes = { ...line.attributes, planeSize: line.getLength(), actualSize: line.getLength() }
|
line.attributes = { ...line.attributes, planeSize: lineLength, actualSize: lineLength }
|
||||||
|
|
||||||
if (+roofSizeSet === 1) {
|
if (+roofSizeSet === 1) {
|
||||||
if (direction === 'south' || direction === 'north') {
|
if (direction === 'south' || direction === 'north') {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { ANGLE_TYPE, canvasState, currentAngleTypeSelector, globalPitchState, pitchTextSelector } from '@/store/canvasAtom'
|
import { ANGLE_TYPE, canvasState, currentAngleTypeSelector, globalPitchState, pitchTextSelector } from '@/store/canvasAtom'
|
||||||
import { useRecoilValue } from 'recoil'
|
import { useRecoilValue } from 'recoil'
|
||||||
import { fabric } from 'fabric'
|
import { fabric } from 'fabric'
|
||||||
import { calculateIntersection, findAndRemoveClosestPoint, getDegreeByChon, getDegreeInOrientation, isPointOnLine } from '@/util/canvas-util'
|
import { calculateIntersection, findAndRemoveClosestPoint, getDegreeByChon, isPointOnLine } from '@/util/canvas-util'
|
||||||
import { QPolygon } from '@/components/fabric/QPolygon'
|
import { QPolygon } from '@/components/fabric/QPolygon'
|
||||||
import { isSamePoint, removeDuplicatePolygons } from '@/util/qpolygon-utils'
|
import { isSamePoint, removeDuplicatePolygons } from '@/util/qpolygon-utils'
|
||||||
import { basicSettingState, flowDisplaySelector } from '@/store/settingAtom'
|
import { basicSettingState, flowDisplaySelector } from '@/store/settingAtom'
|
||||||
@ -344,6 +344,7 @@ export const usePolygon = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//arrow의 compass 값으로 방향 글자 설정 필요
|
//arrow의 compass 값으로 방향 글자 설정 필요
|
||||||
|
// moduleCompass 각도와 direction(지붕면 방향)에 따라 한자 방위 텍스트 매핑
|
||||||
const drawDirectionStringToArrow2 = (polygon, showDirectionText) => {
|
const drawDirectionStringToArrow2 = (polygon, showDirectionText) => {
|
||||||
let { direction, surfaceCompass, moduleCompass, arrow } = polygon
|
let { direction, surfaceCompass, moduleCompass, arrow } = polygon
|
||||||
if (moduleCompass === null || moduleCompass === undefined) {
|
if (moduleCompass === null || moduleCompass === undefined) {
|
||||||
@ -371,121 +372,81 @@ export const usePolygon = () => {
|
|||||||
|
|
||||||
let text = ''
|
let text = ''
|
||||||
|
|
||||||
let compassType = (375 + getDegreeInOrientation(moduleCompass)) / 15
|
// moduleCompass 각도와 direction에 따른 한자 방위 매핑
|
||||||
|
// direction: south(↓), west(←), north(↑), east(→)
|
||||||
|
// 각도 범위별 매핑 테이블 (사진 기준)
|
||||||
|
const getDirectionText = (angle, dir) => {
|
||||||
|
// 각도를 정규화 (-180 ~ 180 범위로)
|
||||||
|
let normalizedAngle = Number(angle)
|
||||||
|
while (normalizedAngle > 180) normalizedAngle -= 360
|
||||||
|
while (normalizedAngle < -180) normalizedAngle += 360
|
||||||
|
|
||||||
moduleCompass = -1 * moduleCompass
|
// 매핑 테이블: { south(↓), west(←), north(↑), east(→) }
|
||||||
|
// 각도 0: 남, 서, 북, 동
|
||||||
|
// 각도 45: 남서, 북서, 북동, 남동
|
||||||
|
// 각도 90: 서, 북, 동, 남
|
||||||
|
// 각도 135: 북서, 북동, 남동, 남서
|
||||||
|
// 각도 180: 북, 동, 남, 서
|
||||||
|
// 각도 -45: 남동, 남서, 북서, 북동
|
||||||
|
// 각도 -90: 동, 남, 서, 북
|
||||||
|
// 각도 -135: 북동, 남동, 남서, 북서
|
||||||
|
|
||||||
if (moduleCompass === 0 || (moduleCompass < 0 && moduleCompass >= -6)) {
|
let mapping
|
||||||
compassType = 1
|
// 정확한 각도 먼저 체크
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -21) {
|
if (normalizedAngle === 0) {
|
||||||
compassType = 2
|
mapping = { south: '南', west: '西', north: '北', east: '東' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -36) {
|
} else if (normalizedAngle === 45) {
|
||||||
compassType = 3
|
mapping = { south: '南西', west: '北西', north: '北東', east: '南東' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -51) {
|
} else if (normalizedAngle === 90) {
|
||||||
compassType = 4
|
mapping = { south: '西', west: '北', north: '東', east: '南' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -66) {
|
} else if (normalizedAngle === 135) {
|
||||||
compassType = 5
|
mapping = { south: '北西', west: '北東', north: '南東', east: '南西' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -81) {
|
} else if (normalizedAngle === 180 || normalizedAngle === -180) {
|
||||||
compassType = 6
|
mapping = { south: '北', west: '東', north: '南', east: '西' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -96) {
|
} else if (normalizedAngle === -45) {
|
||||||
compassType = 7
|
mapping = { south: '南東', west: '南西', north: '北西', east: '北東' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -111) {
|
} else if (normalizedAngle === -90) {
|
||||||
compassType = 8
|
mapping = { south: '東', west: '南', north: '西', east: '北' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -126) {
|
} else if (normalizedAngle === -135) {
|
||||||
compassType = 9
|
mapping = { south: '北東', west: '南東', north: '南西', east: '北西' }
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -141) {
|
}
|
||||||
compassType = 10
|
// 범위 각도 체크
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -156) {
|
else if (normalizedAngle >= 1 && normalizedAngle <= 44) {
|
||||||
compassType = 11
|
// 1~44: 남남서, 서북서, 북북동, 동남동
|
||||||
} else if (moduleCompass < 0 && moduleCompass >= -171) {
|
mapping = { south: '南南西', west: '西北西', north: '北北東', east: '東南東' }
|
||||||
compassType = 12
|
} else if (normalizedAngle >= 46 && normalizedAngle <= 89) {
|
||||||
} else if (Math.abs(moduleCompass) === 180) {
|
// 46~89: 서남서, 북북서, 동북동, 남남동
|
||||||
compassType = 13
|
mapping = { south: '西南西', west: '北北西', north: '東北東', east: '南南東' }
|
||||||
|
} else if (normalizedAngle >= 91 && normalizedAngle <= 134) {
|
||||||
|
// 91~134: 서북서, 북북동, 동남동, 남남서
|
||||||
|
mapping = { south: '西北西', west: '北北東', north: '東南東', east: '南南西' }
|
||||||
|
} else if (normalizedAngle >= 136 && normalizedAngle <= 179) {
|
||||||
|
// 136~179: 북북서, 동북동, 남남동, 서남서
|
||||||
|
mapping = { south: '北北西', west: '東北東', north: '南南東', east: '西南西' }
|
||||||
|
} else if (normalizedAngle >= -44 && normalizedAngle <= -1) {
|
||||||
|
// -1~-44: 남남동, 서남서, 북북서, 동북동
|
||||||
|
mapping = { south: '南南東', west: '西南西', north: '北北西', east: '東北東' }
|
||||||
|
} else if (normalizedAngle >= -89 && normalizedAngle <= -46) {
|
||||||
|
// -46~-89: 동남동, 남남서, 서북서, 북북동
|
||||||
|
mapping = { south: '東南東', west: '南南西', north: '西北西', east: '北北東' }
|
||||||
|
} else if (normalizedAngle >= -134 && normalizedAngle <= -91) {
|
||||||
|
// -91~-134: 동북동, 남남동, 서남서, 북북서
|
||||||
|
mapping = { south: '東北東', west: '南南東', north: '西南西', east: '北北西' }
|
||||||
|
} else if (normalizedAngle >= -179 && normalizedAngle <= -136) {
|
||||||
|
// -136~-179: 북북동, 동남동, 남남서, 서북서
|
||||||
|
mapping = { south: '北北東', west: '東南東', north: '南南西', east: '西北西' }
|
||||||
|
} else {
|
||||||
|
// 기본값: 0도
|
||||||
|
mapping = { south: '南', west: '西', north: '北', east: '東' }
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([1, 25].includes(compassType)) {
|
return mapping[dir] || '南'
|
||||||
direction === 'north' ? (text = '北') : direction === 'south' ? (text = '南') : direction === 'west' ? (text = '西') : (text = '東')
|
|
||||||
} else if ([2, 3].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '北北東')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '南南西')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '西北西')
|
|
||||||
: (text = '東南東')
|
|
||||||
} else if ([4].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '北東') : direction === 'south' ? (text = '南西') : direction === 'west' ? (text = '北西') : (text = '南東')
|
|
||||||
} else if ([5, 6].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '東北東')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '西南西')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '北北西')
|
|
||||||
: (text = '南南東')
|
|
||||||
} else if ([7].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '東') : direction === 'south' ? (text = '西') : direction === 'west' ? (text = '北') : (text = '南')
|
|
||||||
} else if ([8, 9].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '東南東')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '西北西')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '北北東')
|
|
||||||
: (text = '南南西')
|
|
||||||
} else if ([10].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '南東') : direction === 'south' ? (text = '北西') : direction === 'west' ? (text = '北東') : (text = '南西')
|
|
||||||
} else if ([11, 12].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '南南東')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '北北西')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '東北東')
|
|
||||||
: (text = '西南西')
|
|
||||||
} else if ([13].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '南') : direction === 'south' ? (text = '北') : direction === 'west' ? (text = '東') : (text = '西')
|
|
||||||
} else if ([14, 15].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '南南西')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '北北東')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '東南東')
|
|
||||||
: (text = '西北西')
|
|
||||||
} else if ([16].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '南西') : direction === 'south' ? (text = '北東') : direction === 'west' ? (text = '南東') : (text = '北西')
|
|
||||||
} else if ([17, 18].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '西南西')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '東北東')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '南南東')
|
|
||||||
: (text = '北北西')
|
|
||||||
} else if ([19].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '西') : direction === 'south' ? (text = '東') : direction === 'west' ? (text = '南') : (text = '北')
|
|
||||||
} else if ([20, 21].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '西北西')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '東南東')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '南南西')
|
|
||||||
: (text = '北北東')
|
|
||||||
} else if ([22].includes(compassType)) {
|
|
||||||
direction === 'north' ? (text = '北西') : direction === 'south' ? (text = '南東') : direction === 'west' ? (text = '南西') : (text = '北東')
|
|
||||||
} else if ([23, 24].includes(compassType)) {
|
|
||||||
direction === 'north'
|
|
||||||
? (text = '北北西')
|
|
||||||
: direction === 'south'
|
|
||||||
? (text = '南南東')
|
|
||||||
: direction === 'west'
|
|
||||||
? (text = '西南西')
|
|
||||||
: (text = '東北東')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 東,西,南,北
|
text = getDirectionText(moduleCompass, direction)
|
||||||
|
|
||||||
|
// surfaceCompass가 있으면 text를 덮어쓰기 (기존 로직 유지)
|
||||||
|
if (surfaceCompass !== null && surfaceCompass !== undefined) {
|
||||||
if ([0].includes(surfaceCompass)) {
|
if ([0].includes(surfaceCompass)) {
|
||||||
text = '南'
|
text = '南'
|
||||||
} else if ([15, 30].includes(surfaceCompass)) {
|
} else if ([15, 30].includes(surfaceCompass)) {
|
||||||
@ -515,9 +476,10 @@ export const usePolygon = () => {
|
|||||||
} else if ([-75, -60].includes(surfaceCompass)) {
|
} else if ([-75, -60].includes(surfaceCompass)) {
|
||||||
text = '西南西'
|
text = '西南西'
|
||||||
} else if ([-45].includes(surfaceCompass)) {
|
} else if ([-45].includes(surfaceCompass)) {
|
||||||
text = '西南'
|
text = '南西'
|
||||||
} else if ([-30, -15].includes(surfaceCompass)) {
|
} else if ([-30, -15].includes(surfaceCompass)) {
|
||||||
text = '西西南'
|
text = '南南西'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const sameDirectionCnt = canvas.getObjects().filter((obj) => {
|
const sameDirectionCnt = canvas.getObjects().filter((obj) => {
|
||||||
|
|||||||
@ -683,9 +683,9 @@
|
|||||||
"join.sub1.addr": "住所",
|
"join.sub1.addr": "住所",
|
||||||
"join.sub1.addr_placeholder": "全角50文字以内",
|
"join.sub1.addr_placeholder": "全角50文字以内",
|
||||||
"join.sub1.telNo": "電話番号",
|
"join.sub1.telNo": "電話番号",
|
||||||
"join.sub1.telNo_placeholder": "00 0000 0000",
|
"join.sub1.telNo_placeholder": "00-0000-0000",
|
||||||
"join.sub1.fax": "FAX番号",
|
"join.sub1.fax": "FAX番号",
|
||||||
"join.sub1.fax_placeholder": "00 0000 0000",
|
"join.sub1.fax_placeholder": "00-0000-0000",
|
||||||
"join.sub1.bizNo": "法人番号",
|
"join.sub1.bizNo": "法人番号",
|
||||||
"join.sub2.title": "担当者情報",
|
"join.sub2.title": "担当者情報",
|
||||||
"join.sub2.userNm": "担当者名",
|
"join.sub2.userNm": "担当者名",
|
||||||
|
|||||||
@ -683,7 +683,7 @@
|
|||||||
"join.sub1.addr": "주소",
|
"join.sub1.addr": "주소",
|
||||||
"join.sub1.addr_placeholder": "전각50자이내",
|
"join.sub1.addr_placeholder": "전각50자이내",
|
||||||
"join.sub1.telNo": "전화번호",
|
"join.sub1.telNo": "전화번호",
|
||||||
"join.sub1.telNo_placeholder": "00 0000 0000",
|
"join.sub1.telNo_placeholder": "000-0000-0000",
|
||||||
"join.sub1.fax": "FAX 번호",
|
"join.sub1.fax": "FAX 번호",
|
||||||
"join.sub1.fax_placeholder": "00 0000 0000",
|
"join.sub1.fax_placeholder": "00 0000 0000",
|
||||||
"join.sub1.bizNo": "법인번호",
|
"join.sub1.bizNo": "법인번호",
|
||||||
|
|||||||
@ -802,6 +802,10 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
const getAddLine = (p1, p2, stroke = '') => {
|
const getAddLine = (p1, p2, stroke = '') => {
|
||||||
movedLines.push({ index, p1, p2 })
|
movedLines.push({ index, p1, p2 })
|
||||||
|
|
||||||
|
const dx = Math.abs(p2.x - p1.x);
|
||||||
|
const dy = Math.abs(p2.y - p1.y);
|
||||||
|
const isDiagonal = dx > 0.5 && dy > 0.5; // x, y 변화가 모두 있으면 대각선
|
||||||
|
|
||||||
//console.log("mergeLines:::::::", mergeLines);
|
//console.log("mergeLines:::::::", mergeLines);
|
||||||
const line = new QLine([p1.x, p1.y, p2.x, p2.y], {
|
const line = new QLine([p1.x, p1.y, p2.x, p2.y], {
|
||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
@ -818,6 +822,15 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
type: 'eaveHelpLine',
|
type: 'eaveHelpLine',
|
||||||
isStart: true,
|
isStart: true,
|
||||||
pitch: wallLine.attributes.pitch,
|
pitch: wallLine.attributes.pitch,
|
||||||
|
actualSize: (isDiagonal) ? calcLineActualSize(
|
||||||
|
{
|
||||||
|
x1: p1.x,
|
||||||
|
y1: p1.y,
|
||||||
|
x2: p2.x,
|
||||||
|
y2: p2.y
|
||||||
|
},
|
||||||
|
getDegreeByChon(wallLine.attributes.pitch)
|
||||||
|
) : calcLinePlaneSize({ x1: p1.x, y1: p1.y, x2: p2.x, y2: p2.y }),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1099,7 +1112,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
getAddLine({ x: pLineX, y: pLineY }, { x: newPointX, y: pLineY }, 'green')
|
getAddLine({ x: pLineX, y: pLineY }, { x: newPointX, y: pLineY }, 'green')
|
||||||
getAddLine({ x: newPointX, y: pLineY }, { x: ePoint.x, y: ePoint.y }, 'pink')
|
getAddLine({ x: newPointX, y: pLineY }, { x: ePoint.x, y: ePoint.y }, 'pink')
|
||||||
}
|
}
|
||||||
getAddLine({ x: roofLine.x2, y: roofLine.y2 }, { x: newPointX, y: roofLine.y2 }, 'orange')
|
//getAddLine({ x: roofLine.x2, y: roofLine.y2 }, { x: newPointX, y: roofLine.y2 }, 'orange')
|
||||||
getAddLine(newPStart, newPEnd, 'red')
|
getAddLine(newPStart, newPEnd, 'red')
|
||||||
}
|
}
|
||||||
} else if (condition === 'right_out') {
|
} else if (condition === 'right_out') {
|
||||||
@ -1439,7 +1452,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
getAddLine({ x: pLineX, y: pLineY }, { x: pLineX, y: newPointY }, 'green')
|
getAddLine({ x: pLineX, y: pLineY }, { x: pLineX, y: newPointY }, 'green')
|
||||||
getAddLine({ x: pLineX, y: newPointY }, { x: sPoint.x, y: sPoint.y }, 'pink')
|
getAddLine({ x: pLineX, y: newPointY }, { x: sPoint.x, y: sPoint.y }, 'pink')
|
||||||
}
|
}
|
||||||
getAddLine({ x: roofLine.x2, y: roofLine.y2 }, { x: roofLine.x2, y: newPointY }, 'orange')
|
//getAddLine({ x: roofLine.x2, y: roofLine.y2 }, { x: roofLine.x2, y: newPointY }, 'orange')
|
||||||
getAddLine(newPStart, newPEnd, 'red')
|
getAddLine(newPStart, newPEnd, 'red')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1468,7 +1481,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
getAddLine({ x: pLineX, y: pLineY }, { x: pLineX, y: newPointY }, 'green')
|
getAddLine({ x: pLineX, y: pLineY }, { x: pLineX, y: newPointY }, 'green')
|
||||||
getAddLine({ x: pLineX, y: newPointY }, { x: sPoint.x, y: sPoint.y }, 'pink')
|
getAddLine({ x: pLineX, y: newPointY }, { x: sPoint.x, y: sPoint.y }, 'pink')
|
||||||
}
|
}
|
||||||
getAddLine({ x: roofLine.x1, y: roofLine.y1 }, { x: roofLine.x1, y: newPointY }, 'orange')
|
//getAddLine({ x: roofLine.x1, y: roofLine.y1 }, { x: roofLine.x1, y: newPointY }, 'orange')
|
||||||
getAddLine(newPStart, newPEnd, 'red')
|
getAddLine(newPStart, newPEnd, 'red')
|
||||||
}
|
}
|
||||||
} else if (condition === 'bottom_out') {
|
} else if (condition === 'bottom_out') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user