Merge branch 'dev' of ssh://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into qcast-pub
This commit is contained in:
commit
1265bcdc97
@ -33,9 +33,9 @@ export default function ColorPickerModal(props) {
|
|||||||
}, [isShow])
|
}, [isShow])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos ?? ''}>
|
<WithDraggable isShow={true} pos={pos ?? ''} handle=".modal-handle">
|
||||||
<div className={`modal-pop-wrap lr mount`}>
|
<div className={`modal-pop-wrap lr mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.color.picker.title')}</h1>
|
<h1 className="title">{getMessage('modal.color.picker.title')}</h1>
|
||||||
<button
|
<button
|
||||||
className="modal-close"
|
className="modal-close"
|
||||||
@ -78,6 +78,7 @@ export default function ColorPickerModal(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 },
|
|||||||
<Draggable
|
<Draggable
|
||||||
position={{ x: position.x, y: position.y }}
|
position={{ x: position.x, y: position.y }}
|
||||||
onDrag={(e, data) => handleOnDrag(e, data)}
|
onDrag={(e, data) => handleOnDrag(e, data)}
|
||||||
handle={handle === '' ? '.modal-head' : handle}
|
handle={handle === '' ? '.modal-handle' : handle}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|||||||
@ -67,9 +67,9 @@ export default function FontSetting(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos} handle=".modal-handle">
|
||||||
<div className={`modal-pop-wrap lrr mount`}>
|
<div className={`modal-pop-wrap lrr mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.font')}</h1>
|
<h1 className="title">{getMessage('modal.font')}</h1>
|
||||||
<button
|
<button
|
||||||
className="modal-close"
|
className="modal-close"
|
||||||
@ -133,6 +133,7 @@ export default function FontSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -99,7 +99,9 @@ export default function Estimate({}) {
|
|||||||
|
|
||||||
const initEstimate = (currPid = currentPid) => {
|
const initEstimate = (currPid = currentPid) => {
|
||||||
console.log('🚀 ~ initEstimate ~ currPid:', currPid)
|
console.log('🚀 ~ initEstimate ~ currPid:', currPid)
|
||||||
|
closeAll()
|
||||||
setMenuNumber(5)
|
setMenuNumber(5)
|
||||||
|
|
||||||
setObjectNo(objectRecoil.floorPlanObjectNo)
|
setObjectNo(objectRecoil.floorPlanObjectNo)
|
||||||
|
|
||||||
setPlanNo(currPid)
|
setPlanNo(currPid)
|
||||||
@ -137,7 +139,6 @@ export default function Estimate({}) {
|
|||||||
}, [selectedPlan])
|
}, [selectedPlan])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
closeAll()
|
|
||||||
initEstimate()
|
initEstimate()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
@ -619,7 +620,7 @@ export default function Estimate({}) {
|
|||||||
updates.partAdd = '0'
|
updates.partAdd = '0'
|
||||||
updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString()
|
updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString()
|
||||||
updates.showSaleTotPrice = (
|
updates.showSaleTotPrice = (
|
||||||
Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].showSalePrice?.replaceAll(',', '')
|
Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice?.replaceAll(',', '')
|
||||||
).toLocaleString()
|
).toLocaleString()
|
||||||
|
|
||||||
updateList = estimateContextState.itemList.map((item) => {
|
updateList = estimateContextState.itemList.map((item) => {
|
||||||
@ -681,7 +682,6 @@ export default function Estimate({}) {
|
|||||||
let updateList = []
|
let updateList = []
|
||||||
let updates = {}
|
let updates = {}
|
||||||
get({ url: apiUrl }).then((res) => {
|
get({ url: apiUrl }).then((res) => {
|
||||||
// console.log('아이템디테일::::::::', res)
|
|
||||||
updates.objectNo = objectNo
|
updates.objectNo = objectNo
|
||||||
updates.planNo = planNo
|
updates.planNo = planNo
|
||||||
updates.itemId = res.itemId
|
updates.itemId = res.itemId
|
||||||
@ -706,7 +706,6 @@ export default function Estimate({}) {
|
|||||||
updates.openFlg = res.openFlg
|
updates.openFlg = res.openFlg
|
||||||
|
|
||||||
if (estimateContextState.estimateType === 'YJSS') {
|
if (estimateContextState.estimateType === 'YJSS') {
|
||||||
// console.log('YJSS:::,', res.pkgMaterialFlg)
|
|
||||||
if (res.pkgMaterialFlg === '0') {
|
if (res.pkgMaterialFlg === '0') {
|
||||||
updates.showSalePrice = '0'
|
updates.showSalePrice = '0'
|
||||||
updates.showSaleTotPrice = '0'
|
updates.showSaleTotPrice = '0'
|
||||||
@ -721,14 +720,19 @@ export default function Estimate({}) {
|
|||||||
//104671
|
//104671
|
||||||
let bomList = res.itemBomList
|
let bomList = res.itemBomList
|
||||||
|
|
||||||
// console.log('updates::', updates)
|
|
||||||
updateList = estimateContextState.itemList.map((item) => {
|
updateList = estimateContextState.itemList.map((item) => {
|
||||||
if (item.dispOrder === dispOrder) {
|
if (item.dispOrder === dispOrder) {
|
||||||
if (item?.addFlg) {
|
if (item?.addFlg) {
|
||||||
return { ...item, ...updates, saleTotPrice: '' }
|
return { ...item, ...updates, saleTotPrice: '' }
|
||||||
} else {
|
} else {
|
||||||
if (estimateContextState.estimateType === 'YJSS') {
|
if (estimateContextState.estimateType === 'YJSS') {
|
||||||
return { ...item, ...updates, salePrice: '', saleTotPrice: '' }
|
// return { ...item, ...updates, salePrice: '', saleTotPrice: '' }
|
||||||
|
//확인
|
||||||
|
if (updates.pkgMaterialFlg === '1') {
|
||||||
|
return { ...item, ...updates, showSalePrice: updates.salePrice }
|
||||||
|
} else {
|
||||||
|
return { ...item, ...updates, salePrice: '', saleTotPrice: '' }
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return { ...item, ...updates }
|
return { ...item, ...updates }
|
||||||
}
|
}
|
||||||
@ -739,7 +743,6 @@ export default function Estimate({}) {
|
|||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
//paDispOrder
|
//paDispOrder
|
||||||
if (bomList) {
|
if (bomList) {
|
||||||
bomList.map((bomItem, index) => {
|
bomList.map((bomItem, index) => {
|
||||||
@ -879,7 +882,6 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const calculateYJSSTotals = (itemList) => {
|
const calculateYJSSTotals = (itemList) => {
|
||||||
// console.log(':::itemList::', itemList)
|
|
||||||
itemList.sort((a, b) => a.dispOrder - b.dispOrder)
|
itemList.sort((a, b) => a.dispOrder - b.dispOrder)
|
||||||
makeUniqueSpecialNoteCd(itemList)
|
makeUniqueSpecialNoteCd(itemList)
|
||||||
itemList.forEach((item) => {
|
itemList.forEach((item) => {
|
||||||
@ -918,7 +920,6 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// console.log('itemList::', itemList)
|
|
||||||
let pkgAsp = estimateContextState.pkgAsp ? Number(estimateContextState.pkgAsp.replaceAll(',', '')) : 0
|
let pkgAsp = estimateContextState.pkgAsp ? Number(estimateContextState.pkgAsp.replaceAll(',', '')) : 0
|
||||||
|
|
||||||
totals.pkgTotPrice = pkgAsp * totals.totVolKw * 1000
|
totals.pkgTotPrice = pkgAsp * totals.totVolKw * 1000
|
||||||
@ -949,30 +950,138 @@ export default function Estimate({}) {
|
|||||||
|
|
||||||
setItemChangeYn(false)
|
setItemChangeYn(false)
|
||||||
} else {
|
} else {
|
||||||
estimateContextState.itemList.forEach((item) => {
|
let totals = {
|
||||||
if (estimateContextState.estimateType === 'YJSS' && !item.paDispOrder && item.pkgMaterialFlg === '0') {
|
totAmount: 0,
|
||||||
item.showSalePrice = '0'
|
totVolKw: 0,
|
||||||
item.showSaleTotPrice = '0'
|
supplyPrice: 0,
|
||||||
}
|
vatPrice: 0,
|
||||||
if (estimateContextState.estimateType === 'YJSS' && item.openFlg === '1') {
|
totPrice: 0,
|
||||||
item.showSalePrice = '0'
|
addSupplyPrice: 0,
|
||||||
item.showSaleTotPrice = '0'
|
pkgTotPrice: 0,
|
||||||
}
|
}
|
||||||
if (estimateContextState.estimateType === 'YJSS' && item.paDispOrder) {
|
estimateContextState.itemList.sort((a, b) => a.dispOrder - b.dispOrder)
|
||||||
item.showSalePrice = '0'
|
makeUniqueSpecialNoteCd(estimateContextState.itemList)
|
||||||
item.showSaleTotPrice = '0'
|
|
||||||
}
|
if (estimateContextState.estimateType === 'YJSS') {
|
||||||
})
|
estimateContextState.itemList.forEach((item) => {
|
||||||
estimateContextState.itemList.forEach((item) => {
|
if (estimateContextState.estimateType === 'YJSS' && !item.paDispOrder && item.pkgMaterialFlg === '0') {
|
||||||
if (estimateContextState.estimateType === 'YJOD' && item.openFlg === '1') {
|
item.showSalePrice = '0'
|
||||||
item.showSalePrice = '0'
|
item.showSaleTotPrice = '0'
|
||||||
item.showSaleTotPrice = '0'
|
}
|
||||||
}
|
if (estimateContextState.estimateType === 'YJSS' && item.openFlg === '1') {
|
||||||
if (estimateContextState.estimateType === 'YJOD' && item.paDispOrder) {
|
item.showSalePrice = '0'
|
||||||
item.showSalePrice = '0'
|
item.showSaleTotPrice = '0'
|
||||||
item.showSaleTotPrice = '0'
|
}
|
||||||
}
|
if (estimateContextState.estimateType === 'YJSS' && item.paDispOrder) {
|
||||||
})
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
estimateContextState.itemList.forEach((item) => {
|
||||||
|
if (item.delFlg === '0') {
|
||||||
|
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0
|
||||||
|
let salePrice
|
||||||
|
if (item.moduleFlg === '1') {
|
||||||
|
const volKw = (item.pnowW * amount) / 1000
|
||||||
|
totals.totVolKw += volKw
|
||||||
|
}
|
||||||
|
if (amount === 0) {
|
||||||
|
salePrice = 0
|
||||||
|
} else {
|
||||||
|
salePrice = Number(item.salePrice?.replaceAll(',', '')) || 0
|
||||||
|
}
|
||||||
|
|
||||||
|
totals.totAmount += amount
|
||||||
|
if (item.pkgMaterialFlg === '1') {
|
||||||
|
const saleTotPrice = amount * salePrice
|
||||||
|
totals.addSupplyPrice += saleTotPrice
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!item.paDispOrder) {
|
||||||
|
if (item.pkgMaterialFlg === '0') {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.openFlg === '1') {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let pkgAsp = estimateContextState.pkgAsp ? Number(estimateContextState.pkgAsp.replaceAll(',', '')) : 0
|
||||||
|
|
||||||
|
totals.pkgTotPrice = pkgAsp * totals.totVolKw * 1000
|
||||||
|
totals.supplyPrice = totals.addSupplyPrice + totals.pkgTotPrice
|
||||||
|
totals.vatPrice = totals.supplyPrice * 0.1
|
||||||
|
totals.totPrice = totals.supplyPrice + totals.vatPrice
|
||||||
|
|
||||||
|
setEstimateContextState({
|
||||||
|
pkgTotPrice: totals.pkgTotPrice,
|
||||||
|
totAmount: totals.totAmount,
|
||||||
|
totVolKw: totals.totVolKw.toFixed(2),
|
||||||
|
supplyPrice: totals.supplyPrice.toFixed(0), //소수첫자리에서 반올림
|
||||||
|
vatPrice: totals.vatPrice.toFixed(0), //소수첫자리에서 반올림
|
||||||
|
totPrice: totals.totPrice.toFixed(0), //소수첫자리에서 반올림
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
estimateContextState.itemList.forEach((item) => {
|
||||||
|
if (estimateContextState.estimateType === 'YJOD' && item.openFlg === '1') {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
if (estimateContextState.estimateType === 'YJOD' && item.paDispOrder) {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
estimateContextState.itemList.forEach((item) => {
|
||||||
|
delete item.showSalePrice
|
||||||
|
delete item.showSaleTotPrice
|
||||||
|
if (item.delFlg === '0') {
|
||||||
|
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0
|
||||||
|
let price
|
||||||
|
if (amount === 0) {
|
||||||
|
price = 0
|
||||||
|
} else {
|
||||||
|
price = Number(item.saleTotPrice?.replaceAll(',', '')) || 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.moduleFlg === '1') {
|
||||||
|
const volKw = (item.pnowW * amount) / 1000
|
||||||
|
totals.totVolKw += volKw
|
||||||
|
}
|
||||||
|
totals.supplyPrice += price
|
||||||
|
totals.totAmount += amount
|
||||||
|
|
||||||
|
if (item.paDispOrder) {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
if (item.openFlg === '1') {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
totals.vatPrice = totals.supplyPrice * 0.1
|
||||||
|
totals.totPrice = totals.supplyPrice + totals.vatPrice
|
||||||
|
|
||||||
|
setEstimateContextState({
|
||||||
|
totAmount: totals.totAmount,
|
||||||
|
totVolKw: totals.totVolKw.toFixed(2),
|
||||||
|
supplyPrice: totals.supplyPrice.toFixed(0), //소수첫자리에서 반올림
|
||||||
|
vatPrice: totals.vatPrice.toFixed(0), //소수첫자리에서 반올림
|
||||||
|
totPrice: totals.totPrice.toFixed(0), //소수첫자리에서 반올림
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [itemChangeYn, estimateContextState.itemList])
|
}, [itemChangeYn, estimateContextState.itemList])
|
||||||
|
|
||||||
@ -1006,7 +1115,7 @@ export default function Estimate({}) {
|
|||||||
<div className="estimate-tit">{getMessage('estimate.detail.objectNo')}</div>
|
<div className="estimate-tit">{getMessage('estimate.detail.objectNo')}</div>
|
||||||
<div className="estimate-name">
|
<div className="estimate-name">
|
||||||
{/* {objectNo} (Plan No: {estimateContextState.planNo}) */}
|
{/* {objectNo} (Plan No: {estimateContextState.planNo}) */}
|
||||||
{objectNo} (Plan No: {planNo})
|
{currentObjectNo} (Plan No: {planNo})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="estimate-box">
|
<div className="estimate-box">
|
||||||
@ -1076,7 +1185,6 @@ export default function Estimate({}) {
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<div className="input-wrap" style={{ width: '350px' }}>
|
<div className="input-wrap" style={{ width: '350px' }}>
|
||||||
{/* <input type="text" className="input-light" defaultValue={estimateContextState?.charger} onBlur={handleBlurCharger} /> */}
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="input-light"
|
className="input-light"
|
||||||
@ -1095,7 +1203,6 @@ export default function Estimate({}) {
|
|||||||
<td colSpan={3}>
|
<td colSpan={3}>
|
||||||
<div className="form-flex-wrap">
|
<div className="form-flex-wrap">
|
||||||
<div className="input-wrap mr5" style={{ width: '610px' }}>
|
<div className="input-wrap mr5" style={{ width: '610px' }}>
|
||||||
{/* <input type="text" className="input-light" defaultValue={estimateContextState?.objectName} onBlur={handleBlurObjectName} /> */}
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="input-light"
|
className="input-light"
|
||||||
|
|||||||
@ -44,6 +44,7 @@ import JA from '@/locales/ja.json'
|
|||||||
import { MENU } from '@/common/common'
|
import { MENU } from '@/common/common'
|
||||||
|
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
|
||||||
export default function CanvasMenu(props) {
|
export default function CanvasMenu(props) {
|
||||||
const { menuNumber, setMenuNumber } = props
|
const { menuNumber, setMenuNumber } = props
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
@ -101,6 +102,8 @@ export default function CanvasMenu(props) {
|
|||||||
|
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
|
|
||||||
|
//임시
|
||||||
|
const { selectedPlan } = usePlan()
|
||||||
const handleExcelPdfFileDown = async (donwloadType, drawingFlg) => {
|
const handleExcelPdfFileDown = async (donwloadType, drawingFlg) => {
|
||||||
const url = '/api/estimate/excel-download'
|
const url = '/api/estimate/excel-download'
|
||||||
|
|
||||||
@ -168,14 +171,14 @@ export default function CanvasMenu(props) {
|
|||||||
break
|
break
|
||||||
case 5:
|
case 5:
|
||||||
// let pid = urlParams.get('pid')
|
// let pid = urlParams.get('pid')
|
||||||
promiseGet({ url: `/api/estimate/${objectNo}/${pid}/detail` }).then((res) => {
|
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.ordering}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const estimateDetail = res.data
|
const estimateDetail = res.data
|
||||||
if (estimateDetail.docNo) {
|
if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) {
|
||||||
setMenuNumber(menu.index)
|
setMenuNumber(menu.index)
|
||||||
setCurrentMenu(menu.title)
|
setCurrentMenu(menu.title)
|
||||||
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
|
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
|
||||||
router.push(`/floor-plan/estimate/5?pid=${pid}&objectNo=${objectNo}`)
|
router.push(`/floor-plan/estimate/${menu.index}?pid=${selectedPlan.ordering}&objectNo=${objectNo}`)
|
||||||
} else {
|
} else {
|
||||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||||
}
|
}
|
||||||
@ -183,13 +186,13 @@ export default function CanvasMenu(props) {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 6:
|
case 6:
|
||||||
promiseGet({ url: `/api/estimate/${objectNo}/${pid}/detail` }).then((res) => {
|
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.ordering}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const estimateDetail = res.data
|
const estimateDetail = res.data
|
||||||
if (estimateDetail.docNo) {
|
if (estimateDetail.tempFlg === '0') {
|
||||||
setMenuNumber(menu.index)
|
setMenuNumber(menu.index)
|
||||||
setCurrentMenu(menu.title)
|
setCurrentMenu(menu.title)
|
||||||
router.push(`/floor-plan/simulator/${menu.index}?pid=${pid}&objectNo=${objectNo}`)
|
router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.ordering}&objectNo=${objectNo}`)
|
||||||
} else {
|
} else {
|
||||||
swalFire({ text: getMessage('simulator.menu.move.valid1') })
|
swalFire({ text: getMessage('simulator.menu.move.valid1') })
|
||||||
}
|
}
|
||||||
@ -203,7 +206,11 @@ export default function CanvasMenu(props) {
|
|||||||
setCurrentMenu(menu.title)
|
setCurrentMenu(menu.title)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathname !== '/floor-plan') router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
|
if (pathname !== '/floor-plan') {
|
||||||
|
if (menu.index !== 0) {
|
||||||
|
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeSelectedRoofMaterial = (e) => {
|
const changeSelectedRoofMaterial = (e) => {
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export default function Slope({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xxxm`}>
|
<div className={`modal-pop-wrap xxxm`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.placement.surface.slope.setting')} </h1>
|
<h1 className="title">{getMessage('plan.menu.placement.surface.slope.setting')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -45,6 +45,7 @@ export default function Slope({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -126,7 +126,7 @@ export default function AuxiliaryDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r`}>
|
<div className={`modal-pop-wrap r`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.auxiliary.drawing')}</h1>
|
<h1 className="title">{getMessage('modal.auxiliary.drawing')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -160,6 +160,7 @@ export default function AuxiliaryDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -46,7 +46,7 @@ export default function AuxiliaryEdit(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage(type === 'copy' ? 'modal.auxiliary.copy' : 'modal.auxiliary.move')} </h1>
|
<h1 className="title">{getMessage(type === 'copy' ? 'modal.auxiliary.copy' : 'modal.auxiliary.move')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -111,6 +111,7 @@ export default function AuxiliaryEdit(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export default function AuxiliarySize(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.auxiliary.size.edit')} </h1>
|
<h1 className="title">{getMessage('modal.auxiliary.size.edit')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -63,6 +63,7 @@ export default function AuxiliarySize(props) {
|
|||||||
<button className="btn-frame modal act">{getMessage('modal.common.save')}</button>
|
<button className="btn-frame modal act">{getMessage('modal.common.save')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap lx-2`}>
|
<div className={`modal-pop-wrap lx-2`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.module.circuit.setting.default')}</h1>
|
<h1 className="title">{getMessage('plan.menu.module.circuit.setting.default')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -115,6 +115,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -40,12 +40,18 @@ export default function Module({ setTabNum }) {
|
|||||||
const [moduleSelectionData, setModuleSelectionData] = useRecoilState(moduleSelectionDataState) //다음으로 넘어가는 최종 데이터
|
const [moduleSelectionData, setModuleSelectionData] = useRecoilState(moduleSelectionDataState) //다음으로 넘어가는 최종 데이터
|
||||||
const [moduleSelectionDataPlanList, setModuleSelectionDataPlanList] = useRecoilState(moduleSelectionDataPlanListState)
|
const [moduleSelectionDataPlanList, setModuleSelectionDataPlanList] = useRecoilState(moduleSelectionDataPlanListState)
|
||||||
|
|
||||||
const [currentCanvasPlan, setCurrentCanvasPlan] = useRecoilState(currentCanvasPlanState)
|
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||||
|
|
||||||
const [tempModuleSelectionData, setTempModuleSelectionData] = useReducer((prevState, nextState) => {
|
const [tempModuleSelectionData, setTempModuleSelectionData] = useReducer((prevState, nextState) => {
|
||||||
return { ...prevState, ...nextState }
|
return { ...prevState, ...nextState }
|
||||||
}, moduleSelectionData)
|
}, moduleSelectionData)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (moduleSelectionDataPlanList) {
|
||||||
|
setModuleSelectionData(moduleSelectionDataPlanList[currentCanvasPlan.id])
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
handleChangeInstallHeight(debouncedInstallHeight)
|
handleChangeInstallHeight(debouncedInstallHeight)
|
||||||
}, [debouncedInstallHeight])
|
}, [debouncedInstallHeight])
|
||||||
@ -72,16 +78,6 @@ export default function Module({ setTabNum }) {
|
|||||||
rows: [],
|
rows: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log('currentCanvasPlan', currentCanvasPlan)
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
useEffect(() => {}, [roofTab])
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setModuleSelectionDataPlanList({ ...moduleSelectionDataPlanList, [currentCanvasPlan.id]: moduleSelectionData })
|
|
||||||
}, [moduleSelectionData])
|
|
||||||
|
|
||||||
const handleRoofTab = (tab) => {
|
const handleRoofTab = (tab) => {
|
||||||
setRoofTab(tab)
|
setRoofTab(tab)
|
||||||
}
|
}
|
||||||
@ -242,11 +238,12 @@ export default function Module({ setTabNum }) {
|
|||||||
index={index}
|
index={index}
|
||||||
addRoof={roof}
|
addRoof={roof}
|
||||||
roofTab={index}
|
roofTab={index}
|
||||||
moduleConstructionSelectionData={moduleSelectionData.roofConstructions[index]}
|
moduleConstructionSelectionData={moduleSelectionData?.roofConstructions[index]}
|
||||||
setModuleSelectionData={setModuleSelectionData}
|
|
||||||
tempModuleSelectionData={tempModuleSelectionData}
|
tempModuleSelectionData={tempModuleSelectionData}
|
||||||
setTempModuleSelectionData={setTempModuleSelectionData}
|
setTempModuleSelectionData={setTempModuleSelectionData}
|
||||||
selectedModule={selectedModules}
|
selectedModule={selectedModules}
|
||||||
|
moduleSelectionDataPlanList={moduleSelectionDataPlanList}
|
||||||
|
setModuleSelectionDataPlanList={setModuleSelectionDataPlanList}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState, useRef } from 'react'
|
import { useEffect, useState, useRef } from 'react'
|
||||||
import { useRecoilValue } from 'recoil'
|
import { useRecoilValue } from 'recoil'
|
||||||
import { pitchTextSelector } from '@/store/canvasAtom'
|
import { currentCanvasPlanState, pitchTextSelector } from '@/store/canvasAtom'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useMasterController } from '@/hooks/common/useMasterController'
|
import { useMasterController } from '@/hooks/common/useMasterController'
|
||||||
import { useCommonCode } from '@/hooks/common/useCommonCode'
|
import { useCommonCode } from '@/hooks/common/useCommonCode'
|
||||||
@ -12,14 +12,16 @@ export default function ModuleTabContents({
|
|||||||
addRoof,
|
addRoof,
|
||||||
roofTab,
|
roofTab,
|
||||||
moduleConstructionSelectionData,
|
moduleConstructionSelectionData,
|
||||||
setModuleSelectionData,
|
|
||||||
tempModuleSelectionData,
|
tempModuleSelectionData,
|
||||||
setTempModuleSelectionData,
|
setTempModuleSelectionData,
|
||||||
selectedModule,
|
selectedModule,
|
||||||
|
moduleSelectionDataPlanList,
|
||||||
|
setModuleSelectionDataPlanList,
|
||||||
}) {
|
}) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [roofMaterial, setRoofMaterial] = useState(addRoof) //지붕재`
|
const [roofMaterial, setRoofMaterial] = useState(addRoof) //지붕재`
|
||||||
const globalPitchText = useRecoilValue(pitchTextSelector) //피치 텍스트
|
const globalPitchText = useRecoilValue(pitchTextSelector) //피치 텍스트
|
||||||
|
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||||
|
|
||||||
const { findCommonCode } = useCommonCode()
|
const { findCommonCode } = useCommonCode()
|
||||||
const [raftCodes, setRaftCodes] = useState([]) //가대 목록
|
const [raftCodes, setRaftCodes] = useState([]) //가대 목록
|
||||||
@ -162,6 +164,8 @@ export default function ModuleTabContents({
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log('tempModuleSelectionData', tempModuleSelectionData)
|
||||||
|
|
||||||
if (isObjectNotEmpty(selectedRoofBase) && isObjectNotEmpty(selectedConstruction)) {
|
if (isObjectNotEmpty(selectedRoofBase) && isObjectNotEmpty(selectedConstruction)) {
|
||||||
const newRoofConstructions = {
|
const newRoofConstructions = {
|
||||||
roofIndex: roofTab,
|
roofIndex: roofTab,
|
||||||
@ -169,6 +173,7 @@ export default function ModuleTabContents({
|
|||||||
trestle: selectedRoofBase,
|
trestle: selectedRoofBase,
|
||||||
construction: selectedConstruction,
|
construction: selectedConstruction,
|
||||||
}
|
}
|
||||||
|
|
||||||
const index = tempModuleSelectionData.roofConstructions.findIndex((obj) => obj.roofIndex === roofTab)
|
const index = tempModuleSelectionData.roofConstructions.findIndex((obj) => obj.roofIndex === roofTab)
|
||||||
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
@ -241,6 +246,7 @@ export default function ModuleTabContents({
|
|||||||
if (isModuleLoaded) {
|
if (isModuleLoaded) {
|
||||||
setTrestleParams({ moduleTpCd: moduleSelectionInitParams.moduleTpCd, roofMatlCd: addRoof.roofMatlCd, raftBaseCd: addRoof.raftBaseCd })
|
setTrestleParams({ moduleTpCd: moduleSelectionInitParams.moduleTpCd, roofMatlCd: addRoof.roofMatlCd, raftBaseCd: addRoof.raftBaseCd })
|
||||||
setConstructionList([])
|
setConstructionList([])
|
||||||
|
setTempModuleSelectionData({ common: moduleSelectionInitParams, module: selectedModule })
|
||||||
|
|
||||||
if (isObjectNotEmpty(moduleConstructionSelectionData)) {
|
if (isObjectNotEmpty(moduleConstructionSelectionData)) {
|
||||||
//기존에 데이터가 있으면
|
//기존에 데이터가 있으면
|
||||||
@ -249,11 +255,11 @@ export default function ModuleTabContents({
|
|||||||
setCvrChecked(moduleConstructionSelectionData.construction.setupCover)
|
setCvrChecked(moduleConstructionSelectionData.construction.setupCover)
|
||||||
setSnowGdChecked(moduleConstructionSelectionData.construction.setupSnowCover)
|
setSnowGdChecked(moduleConstructionSelectionData.construction.setupSnowCover)
|
||||||
setIsExistData(true)
|
setIsExistData(true)
|
||||||
|
|
||||||
|
setTempModuleSelectionData({ roofConstructions: [{ ...moduleConstructionSelectionData }] })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTempModuleSelectionData({ common: moduleSelectionInitParams, module: selectedModule })
|
|
||||||
}, [moduleSelectionInitParams])
|
}, [moduleSelectionInitParams])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -282,7 +288,8 @@ export default function ModuleTabContents({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isObjectNotEmpty(tempModuleSelectionData)) {
|
if (isObjectNotEmpty(tempModuleSelectionData)) {
|
||||||
setModuleSelectionData(tempModuleSelectionData)
|
setModuleSelectionDataPlanList({ ...moduleSelectionDataPlanList, [currentCanvasPlan.id]: tempModuleSelectionData })
|
||||||
|
// setModuleSelectionData(tempModuleSelectionData)
|
||||||
}
|
}
|
||||||
}, [tempModuleSelectionData])
|
}, [tempModuleSelectionData])
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,16 @@
|
|||||||
import { forwardRef, useEffect, useState } from 'react'
|
import { forwardRef, useEffect, useState } from 'react'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useModuleBasicSetting } from '@/hooks/module/useModuleBasicSetting'
|
import { useModuleBasicSetting } from '@/hooks/module/useModuleBasicSetting'
|
||||||
import { checkedModuleState } from '@/store/canvasAtom'
|
import { checkedModuleState, currentCanvasPlanState } from '@/store/canvasAtom'
|
||||||
import { useRecoilValue, useRecoilState, useSetRecoilState } from 'recoil'
|
import { useRecoilValue, useSetRecoilState } from 'recoil'
|
||||||
import { selectedModuleState, moduleSelectionDataState } from '@/store/selectedModuleOptions'
|
import { moduleSelectionDataPlanListState } from '@/store/selectedModuleOptions'
|
||||||
import { useModulePlace } from '@/hooks/module/useModulePlace'
|
import { useModulePlace } from '@/hooks/module/useModulePlace'
|
||||||
|
|
||||||
const Placement = forwardRef((props, refs) => {
|
const Placement = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [isChidori, setIsChidori] = useState(false)
|
const [isChidori, setIsChidori] = useState(false)
|
||||||
const [isChidoriNotAble, setIsChidoriNotAble] = useState(false)
|
const [isChidoriNotAble, setIsChidoriNotAble] = useState(false)
|
||||||
|
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||||
|
|
||||||
const [setupLocation, setSetupLocation] = useState('center')
|
const [setupLocation, setSetupLocation] = useState('center')
|
||||||
const [isMaxSetup, setIsMaxSetup] = useState('false')
|
const [isMaxSetup, setIsMaxSetup] = useState('false')
|
||||||
@ -19,16 +20,18 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
const { selectedModules } = useModulePlace()
|
const { selectedModules } = useModulePlace()
|
||||||
|
|
||||||
const setCheckedModules = useSetRecoilState(checkedModuleState)
|
const setCheckedModules = useSetRecoilState(checkedModuleState)
|
||||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
const moduleSelectionDataPlanList = useRecoilValue(moduleSelectionDataPlanListState)
|
||||||
|
|
||||||
//모듈 배치면 생성
|
//모듈 배치면 생성
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
makeModuleInstArea()
|
makeModuleInstArea()
|
||||||
|
|
||||||
//1개라도 치도리 불가가 있으면 치도리 불가
|
if (moduleSelectionDataPlanList) {
|
||||||
const isChidroriValue = moduleSelectionData.roofConstructions.some((item) => item.construction.plvrYn === 'N')
|
//1개라도 치도리 불가가 있으면 치도리 불가
|
||||||
if (isChidroriValue) {
|
const isChidroriValue = moduleSelectionDataPlanList[currentCanvasPlan.id].roofConstructions.some((item) => item.construction.plvrYn === 'N')
|
||||||
setIsChidoriNotAble(true)
|
if (isChidroriValue) {
|
||||||
|
setIsChidoriNotAble(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={{ x: 50, y: 230 }}>
|
<WithDraggable isShow={true} pos={{ x: 50, y: 230 }}>
|
||||||
<div className={`modal-pop-wrap l-2`}>
|
<div className={`modal-pop-wrap l-2`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.circuit.trestle.setting')} </h1>
|
<h1 className="title">{getMessage('modal.circuit.trestle.setting')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -181,6 +181,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export default function DimensionLineSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('contextmenu.display.edit')} </h1>
|
<h1 className="title">{getMessage('contextmenu.display.edit')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -141,6 +141,7 @@ export default function DimensionLineSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export default function Distance(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xxxm`}>
|
<div className={`modal-pop-wrap xxxm`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.distance')} </h1>
|
<h1 className="title">{getMessage('modal.distance')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -68,6 +68,7 @@ export default function Distance(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -40,7 +40,7 @@ export default function EavesGableEdit({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r`}>
|
<div className={`modal-pop-wrap r`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.eaves.gable.edit')}</h1>
|
<h1 className="title">{getMessage('modal.eaves.gable.edit')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -62,6 +62,7 @@ export default function EavesGableEdit({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
{type === TYPES.SHED && <Shed {...shedProps} />}
|
{type === TYPES.SHED && <Shed {...shedProps} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -65,7 +65,7 @@ export default function FlowDirectionSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap ml mount`}>
|
<div className={`modal-pop-wrap ml mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.shape.flow.direction.setting')} </h1>
|
<h1 className="title">{getMessage('modal.shape.flow.direction.setting')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -176,6 +176,7 @@ export default function FlowDirectionSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -179,7 +179,7 @@ export default function DotLineGrid(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap ssm mount`}>
|
<div className={`modal-pop-wrap ssm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.canvas.setting.grid.dot.line.setting')}</h1>
|
<h1 className="title">{getMessage('modal.canvas.setting.grid.dot.line.setting')}</h1>
|
||||||
<button
|
<button
|
||||||
className="modal-close"
|
className="modal-close"
|
||||||
@ -293,6 +293,7 @@ export default function DotLineGrid(props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export default function GridCopy(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.grid.copy')} </h1>
|
<h1 className="title">{getMessage('modal.grid.copy')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -77,6 +77,7 @@ export default function GridCopy(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -75,7 +75,7 @@ export default function GridMove(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.grid.move')} </h1>
|
<h1 className="title">{getMessage('modal.grid.move')} </h1>
|
||||||
<button className="modal-close" onClick={handleClose}>
|
<button className="modal-close" onClick={handleClose}>
|
||||||
닫기
|
닫기
|
||||||
@ -156,6 +156,7 @@ export default function GridMove(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -52,7 +52,7 @@ export default function LinePropertySetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r mount`}>
|
<div className={`modal-pop-wrap r mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('contextmenu.line.property.edit')} </h1>
|
<h1 className="title">{getMessage('contextmenu.line.property.edit')} </h1>
|
||||||
<button className="modal-close" onClick={() => handleClosePopup()}>
|
<button className="modal-close" onClick={() => handleClosePopup()}>
|
||||||
닫기
|
닫기
|
||||||
@ -91,6 +91,7 @@ export default function LinePropertySetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default function CircuitNumberEdit(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title"> {getMessage('modal.module.circuit.number.edit')}</h1>
|
<h1 className="title"> {getMessage('modal.module.circuit.number.edit')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -42,6 +42,7 @@ export default function CircuitNumberEdit(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -84,7 +84,7 @@ export default function PanelEdit(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">
|
<h1 className="title">
|
||||||
{getMessage([PANEL_EDIT_TYPE.MOVE, PANEL_EDIT_TYPE.COLUMN_MOVE].includes(type) ? 'modal.move.setting' : 'modal.copy.setting')}{' '}
|
{getMessage([PANEL_EDIT_TYPE.MOVE, PANEL_EDIT_TYPE.COLUMN_MOVE].includes(type) ? 'modal.move.setting' : 'modal.copy.setting')}{' '}
|
||||||
</h1>
|
</h1>
|
||||||
@ -139,6 +139,7 @@ export default function PanelEdit(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export default function ColumnInsert(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r mount`}>
|
<div className={`modal-pop-wrap r mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.panel.column.insert')} </h1>
|
<h1 className="title">{getMessage('modal.panel.column.insert')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -105,6 +105,7 @@ export default function ColumnInsert(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export default function ColumnRemove(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r mount`}>
|
<div className={`modal-pop-wrap r mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.panel.column.remove')} </h1>
|
<h1 className="title">{getMessage('modal.panel.column.remove')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -115,6 +115,7 @@ export default function ColumnRemove(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export default function RowInsert(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r mount`}>
|
<div className={`modal-pop-wrap r mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.row.insert')} </h1>
|
<h1 className="title">{getMessage('modal.row.insert')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -105,6 +105,7 @@ export default function RowInsert(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export default function RowRemove(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r mount`}>
|
<div className={`modal-pop-wrap r mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.row.remove')}</h1>
|
<h1 className="title">{getMessage('modal.row.remove')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -115,6 +115,7 @@ export default function RowRemove(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export default function MovementSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r`}>
|
<div className={`modal-pop-wrap r`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.roof.cover.movement.shape.updown')}</h1>
|
<h1 className="title">{getMessage('plan.menu.roof.cover.movement.shape.updown')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -43,6 +43,7 @@ export default function MovementSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export default function DormerOffset(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xm mount`}>
|
<div className={`modal-pop-wrap xm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{title}</h1>
|
<h1 className="title">{title}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -103,6 +103,7 @@ export default function DormerOffset(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -77,7 +77,7 @@ export default function ObjectSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap lrr`} style={{ visibility: isHidden ? 'hidden' : 'visible' }}>
|
<div className={`modal-pop-wrap lrr`} style={{ visibility: isHidden ? 'hidden' : 'visible' }}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.placement.surface.object')} </h1>
|
<h1 className="title">{getMessage('plan.menu.placement.surface.object')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -109,6 +109,7 @@ export default function ObjectSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default function RoofMaterialSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xxxm mount`}>
|
<div className={`modal-pop-wrap xxxm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.roof.material.edit')} </h1>
|
<h1 className="title">{getMessage('modal.roof.material.edit')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -39,6 +39,7 @@ export default function RoofMaterialSetting(props) {
|
|||||||
<button className="btn-frame modal act">{getMessage('modal.common.save')}</button>
|
<button className="btn-frame modal act">{getMessage('modal.common.save')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -47,7 +47,7 @@ export default function SizeSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap ssm mount`}>
|
<div className={`modal-pop-wrap ssm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.size.setting')} </h1>
|
<h1 className="title">{getMessage('modal.size.setting')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -95,6 +95,7 @@ export default function SizeSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export default function PropertiesSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap ssm`}>
|
<div className={`modal-pop-wrap ssm`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.canvas.setting.wallline.properties.setting')}</h1>
|
<h1 className="title">{getMessage('modal.canvas.setting.wallline.properties.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closeModal(id)}>
|
<button className="modal-close" onClick={() => closeModal(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -38,6 +38,7 @@ export default function PropertiesSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -116,7 +116,7 @@ export default function WallLineSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={{ x: 50, y: 230 }}>
|
<WithDraggable isShow={true} pos={{ x: 50, y: 230 }}>
|
||||||
<div className={`modal-pop-wrap r mount`}>
|
<div className={`modal-pop-wrap r mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.cover.outline.drawing')}</h1>
|
<h1 className="title">{getMessage('modal.cover.outline.drawing')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}></button>
|
<button className="modal-close" onClick={() => closePopup(id)}></button>
|
||||||
</div>
|
</div>
|
||||||
@ -184,6 +184,7 @@ export default function WallLineSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -123,7 +123,7 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r`}>
|
<div className={`modal-pop-wrap r`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.placement.surface.drawing')}</h1>
|
<h1 className="title">{getMessage('plan.menu.placement.surface.drawing')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -159,6 +159,7 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -56,20 +56,24 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
]
|
]
|
||||||
|
|
||||||
// 데이터를 최초 한 번만 조회
|
// 데이터를 최초 한 번만 조회
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
if (!basicSetting || !currentRoof || Object.keys(currentRoof).length === 0 || Object.keys(basicSetting).length === 0) return
|
// if (!basicSetting || !currentRoof || Object.keys(currentRoof).length === 0 || Object.keys(basicSetting).length === 0) return
|
||||||
const raftCodeList = findCommonCode('203800')
|
// const raftCodeList = findCommonCode('203800')
|
||||||
setRaftCodes(raftCodeList)
|
// setRaftCodes(raftCodeList)
|
||||||
|
// console.log('🚀 ~ useEffect ~ >>>>>>>>>>>>> raftCodeList 11 :', raftCodeList)
|
||||||
|
|
||||||
if (addedRoofs[0].roofAngleSet && addedRoofs[0].roofAngleSet?.length > 0) {
|
// if (addedRoofs[0].roofAngleSet && addedRoofs[0].roofAngleSet?.length > 0) {
|
||||||
setCurrentRoof({ ...currentRoof, roofSizeSet: String(addedRoofs[0].roofSizeSet), roofAngleSet: addedRoofs[0].roofAngleSet })
|
// setCurrentRoof({ ...currentRoof, roofSizeSet: String(addedRoofs[0].roofSizeSet), roofAngleSet: addedRoofs[0].roofAngleSet })
|
||||||
} else if (basicSetting.roofAngleSet && basicSetting.roofAngleSet?.length > 0) {
|
// } else if (basicSetting.roofAngleSet && basicSetting.roofAngleSet?.length > 0) {
|
||||||
setCurrentRoof({ ...currentRoof, roofSizeSet: String(basicSetting.roofSizeSet), roofAngleSet: basicSetting.roofAngleSet })
|
// setCurrentRoof({ ...currentRoof, roofSizeSet: String(basicSetting.roofSizeSet), roofAngleSet: basicSetting.roofAngleSet })
|
||||||
}
|
// }
|
||||||
}, [])
|
// }, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (addedRoofs.length > 0) {
|
if (addedRoofs.length > 0) {
|
||||||
|
const raftCodeList = findCommonCode('203800')
|
||||||
|
setRaftCodes(raftCodeList)
|
||||||
|
|
||||||
setCurrentRoof({ ...addedRoofs[0] })
|
setCurrentRoof({ ...addedRoofs[0] })
|
||||||
}
|
}
|
||||||
}, [addedRoofs])
|
}, [addedRoofs])
|
||||||
@ -155,20 +159,20 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
...roofInfo,
|
...roofInfo,
|
||||||
},
|
},
|
||||||
//roofs: addedRoofs,
|
//roofs: addedRoofs,
|
||||||
roofsData: {
|
// roofsData: {
|
||||||
roofApply: true,
|
// roofApply: true,
|
||||||
roofSeq: 0,
|
// roofSeq: 0,
|
||||||
roofMatlCd: currentRoof.roofMatlCd,
|
// roofMatlCd: currentRoof.roofMatlCd,
|
||||||
roofWidth: currentRoof.width,
|
// roofWidth: currentRoof.width,
|
||||||
roofHeight: currentRoof.length,
|
// roofHeight: currentRoof.length,
|
||||||
roofHajebichi: currentRoof.hajebichi,
|
// roofHajebichi: currentRoof.hajebichi,
|
||||||
roofGap: currentRoof.raft,
|
// roofGap: currentRoof.raft,
|
||||||
roofLayout: currentRoof.layout,
|
// roofLayout: currentRoof.layout,
|
||||||
roofSizeSet: currentRoof.roofSizeSet,
|
// roofSizeSet: currentRoof.roofSizeSet,
|
||||||
roofAngleSet: currentRoof.roofAngleSet,
|
// roofAngleSet: currentRoof.roofAngleSet,
|
||||||
roofPitch: currentRoof.pitch,
|
// roofPitch: currentRoof.pitch,
|
||||||
roofAngle: currentRoof.angle,
|
// roofAngle: currentRoof.angle,
|
||||||
},
|
// },
|
||||||
})
|
})
|
||||||
|
|
||||||
basicSettingSave()
|
basicSettingSave()
|
||||||
@ -177,7 +181,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap ll mount`}>
|
<div className={`modal-pop-wrap ll mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.placement.surface.initial.setting')}</h1>
|
<h1 className="title">{getMessage('plan.menu.placement.surface.initial.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -338,13 +342,14 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
{currentRoof && ['C', 'R'].includes(currentRoof.raftAuth) && (
|
{currentRoof && ['C', 'R'].includes(currentRoof.raftAuth) && (
|
||||||
<div className="flex-ment">
|
<div className="flex-ment">
|
||||||
<span>{getMessage('modal.placement.initial.setting.rafter')}</span>
|
<span>{getMessage('modal.placement.initial.setting.rafter')}</span>
|
||||||
{raftCodes.length > 0 && (
|
{raftCodes?.length > 0 && (
|
||||||
<div className="select-wrap" style={{ width: '160px' }}>
|
<div className="select-wrap" style={{ width: '160px' }}>
|
||||||
<QSelectBox
|
<QSelectBox
|
||||||
options={raftCodes}
|
options={raftCodes}
|
||||||
ref={roofRef.rafter}
|
ref={roofRef.rafter}
|
||||||
title={
|
title={
|
||||||
raftCodes.find((r) => r.clCode === (currentRoof?.raft === undefined ? currentRoof?.raftBaseCd : currentRoof?.raft)).clCodeNm
|
raftCodes?.find((r) => r.clCode === (currentRoof?.raft === undefined ? currentRoof?.raftBaseCd : currentRoof?.raft))
|
||||||
|
.clCodeNm
|
||||||
}
|
}
|
||||||
value={currentRoof?.raft === undefined ? currentRoof?.raftBaseCd : currentRoof?.raft}
|
value={currentRoof?.raft === undefined ? currentRoof?.raftBaseCd : currentRoof?.raft}
|
||||||
onChange={(e) => handleRafterChange(e.clCode)}
|
onChange={(e) => handleRafterChange(e.clCode)}
|
||||||
@ -418,6 +423,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
</div>
|
</div>
|
||||||
{showSizeGuideModal && <SizeGuide setShowSizeGuidModal={setShowSizeGuidModal} />}
|
{showSizeGuideModal && <SizeGuide setShowSizeGuidModal={setShowSizeGuidModal} />}
|
||||||
{showMaterialGuideModal && <MaterialGuide setShowMaterialGuidModal={setShowMaterialGuidModal} />}
|
{showMaterialGuideModal && <MaterialGuide setShowMaterialGuidModal={setShowMaterialGuidModal} />}
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -242,7 +242,7 @@ export default function PlacementSurfaceSetting({ id, pos = { x: 50, y: 230 } })
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap lr-2`}>
|
<div className={`modal-pop-wrap lr-2`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.placement.surface.arrangement')} </h1>
|
<h1 className="title">{getMessage('plan.menu.placement.surface.arrangement')} </h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -290,6 +290,7 @@ export default function PlacementSurfaceSetting({ id, pos = { x: 50, y: 230 } })
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export default function ActualSizeSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap ssm mount`}>
|
<div className={`modal-pop-wrap ssm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.actual.size.setting')}</h1>
|
<h1 className="title">{getMessage('modal.actual.size.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -116,6 +116,7 @@ export default function ActualSizeSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap lr mount`}>
|
<div className={`modal-pop-wrap lr mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.estimate.roof.alloc')}</h1>
|
<h1 className="title">{getMessage('plan.menu.estimate.roof.alloc')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -79,133 +79,134 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-option-wrap">
|
<div className="grid-option-wrap">
|
||||||
{currentRoofList.map((roof, index) => {
|
{currentRoofList.length > 0 &&
|
||||||
return (
|
currentRoofList.map((roof, index) => {
|
||||||
<div className="grid-option-box" key={index}>
|
return (
|
||||||
<div className="d-check-radio pop no-text">
|
<div className="grid-option-box" key={index}>
|
||||||
<input type="radio" name="radio01" checked={roof.selected && 'checked'} readOnly={true} />
|
<div className="d-check-radio pop no-text">
|
||||||
<label
|
<input type="radio" name="radio01" checked={roof.selected && 'checked'} readOnly={true} />
|
||||||
htmlFor="ra01"
|
<label
|
||||||
onClick={(e) => {
|
htmlFor="ra01"
|
||||||
handleDefaultRoofMaterial(index)
|
onClick={(e) => {
|
||||||
}}
|
handleDefaultRoofMaterial(index)
|
||||||
></label>
|
}}
|
||||||
</div>
|
></label>
|
||||||
<div className="grid-option-block-form">
|
|
||||||
<div className="block-box">
|
|
||||||
<div className="flex-ment">
|
|
||||||
<div className="grid-select" style={{ width: '248px' }}>
|
|
||||||
<QSelectBox
|
|
||||||
options={roofMaterials}
|
|
||||||
value={roof}
|
|
||||||
showKey={'roofMatlNm'}
|
|
||||||
sourceKey={'roofMatlCd'}
|
|
||||||
targetKey={'roofMatlCd'}
|
|
||||||
onChange={(e) => handleChangeRoofMaterial(e, index)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{index === 0 && <span className="dec">{getMessage('modal.roof.alloc.default.roof.material')}</span>}
|
|
||||||
{index !== 0 && <button className="delete" onClick={() => onDeleteRoofMaterial(index)}></button>}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="block-box">
|
<div className="grid-option-block-form">
|
||||||
<div className="flex-ment">
|
<div className="block-box">
|
||||||
<span>{getMessage('slope')}</span>
|
<div className="flex-ment">
|
||||||
<div className="input-grid" style={{ width: '214px' }}>
|
<div className="grid-select" style={{ width: '248px' }}>
|
||||||
<input
|
<QSelectBox
|
||||||
type="text"
|
options={roofMaterials}
|
||||||
className="input-origin block"
|
value={roof}
|
||||||
onChange={(e) => {
|
showKey={'roofMatlNm'}
|
||||||
handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index)
|
sourceKey={'roofMatlCd'}
|
||||||
}}
|
targetKey={'roofMatlCd'}
|
||||||
defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
|
onChange={(e) => handleChangeRoofMaterial(e, index)}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
{index === 0 && <span className="dec">{getMessage('modal.roof.alloc.default.roof.material')}</span>}
|
||||||
|
{index !== 0 && <button className="delete" onClick={() => onDeleteRoofMaterial(index)}></button>}
|
||||||
</div>
|
</div>
|
||||||
<span>{pitchText}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{(roof.widAuth || roof.lenAuth) && (
|
|
||||||
<div className="block-box">
|
<div className="block-box">
|
||||||
{roof.widAuth && (
|
<div className="flex-ment">
|
||||||
<div className="flex-ment">
|
<span>{getMessage('slope')}</span>
|
||||||
<span>W</span>
|
<div className="input-grid" style={{ width: '214px' }}>
|
||||||
<div className="input-grid" style={{ width: '100px' }}>
|
<input
|
||||||
<input type="text" className="input-origin block" defaultValue={roof.width} readOnly={roof.widAuth === 'R'} />
|
type="text"
|
||||||
</div>
|
className="input-origin block"
|
||||||
|
onChange={(e) => {
|
||||||
|
handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index)
|
||||||
|
}}
|
||||||
|
defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
<span>{pitchText}</span>
|
||||||
{roof.lenAuth && (
|
</div>
|
||||||
<div className="flex-ment">
|
|
||||||
<span>L</span>
|
|
||||||
<div className="input-grid" style={{ width: '100px' }}>
|
|
||||||
<input type="text" className="input-origin block" defaultValue={roof.length} readOnly={roof.lenAuth === 'R'} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
{(roof.widAuth || roof.lenAuth) && (
|
||||||
{(roof.raftAuth || roof.roofPchAuth) && (
|
<div className="block-box">
|
||||||
<div className="block-box">
|
{roof.widAuth && (
|
||||||
{roof.raftAuth && (
|
|
||||||
<div className="block-box">
|
|
||||||
<div className="flex-ment">
|
<div className="flex-ment">
|
||||||
<span>{getMessage('modal.placement.initial.setting.rafter')}</span>
|
<span>W</span>
|
||||||
{raftCodes.length > 0 && (
|
<div className="input-grid" style={{ width: '100px' }}>
|
||||||
<div className="grid-select" style={{ width: '160px' }}>
|
<input type="text" className="input-origin block" defaultValue={roof.width} readOnly={roof.widAuth === 'R'} />
|
||||||
<QSelectBox
|
|
||||||
options={raftCodes}
|
|
||||||
value={roof}
|
|
||||||
showKey={'clCodeNm'}
|
|
||||||
sourceKey={'clCode'}
|
|
||||||
targetKey={roof.raft ? 'raft' : 'raftBaseCd'}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{roof.roofPchAuth && (
|
|
||||||
<div className="block-box">
|
|
||||||
<div className="flex-ment">
|
|
||||||
<span>{getMessage('hajebichi')}</span>
|
|
||||||
<div className="input-grid" style={{ width: '84px' }}>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
className="input-origin block"
|
|
||||||
value={parseInt(roof.hajebichi)}
|
|
||||||
readOnly={roof.roofPchAuth === 'R'}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
{roof.lenAuth && (
|
||||||
</div>
|
<div className="flex-ment">
|
||||||
)}
|
<span>L</span>
|
||||||
<div className="block-box">
|
<div className="input-grid" style={{ width: '100px' }}>
|
||||||
<div className="icon-btn-wrap">
|
<input type="text" className="input-origin block" defaultValue={roof.length} readOnly={roof.lenAuth === 'R'} />
|
||||||
<button
|
</div>
|
||||||
className={roof.layout === ROOF_MATERIAL_LAYOUT.PARALLEL ? 'act' : ''}
|
</div>
|
||||||
onClick={() => {
|
)}
|
||||||
handleChangeLayout(ROOF_MATERIAL_LAYOUT.PARALLEL, index)
|
</div>
|
||||||
}}
|
)}
|
||||||
>
|
{(roof.raftAuth || roof.roofPchAuth) && (
|
||||||
{getMessage('modal.roof.alloc.select.parallel')}
|
<div className="block-box">
|
||||||
<i className="allocation01"></i>
|
{roof.raftAuth && (
|
||||||
</button>
|
<div className="block-box">
|
||||||
<button
|
<div className="flex-ment">
|
||||||
className={roof.layout === ROOF_MATERIAL_LAYOUT.STAIRS ? 'act' : ''}
|
<span>{getMessage('modal.placement.initial.setting.rafter')}</span>
|
||||||
onClick={() => {
|
{raftCodes.length > 0 && (
|
||||||
handleChangeLayout(ROOF_MATERIAL_LAYOUT.STAIRS, index)
|
<div className="grid-select" style={{ width: '160px' }}>
|
||||||
}}
|
<QSelectBox
|
||||||
>
|
options={raftCodes}
|
||||||
{getMessage('modal.roof.alloc.select.stairs')} <i className="allocation02"></i>
|
value={roof}
|
||||||
</button>
|
showKey={'clCodeNm'}
|
||||||
|
sourceKey={'clCode'}
|
||||||
|
targetKey={roof.raft ? 'raft' : 'raftBaseCd'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{roof.roofPchAuth && (
|
||||||
|
<div className="block-box">
|
||||||
|
<div className="flex-ment">
|
||||||
|
<span>{getMessage('hajebichi')}</span>
|
||||||
|
<div className="input-grid" style={{ width: '84px' }}>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="input-origin block"
|
||||||
|
value={parseInt(roof.hajebichi)}
|
||||||
|
readOnly={roof.roofPchAuth === 'R'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="block-box">
|
||||||
|
<div className="icon-btn-wrap">
|
||||||
|
<button
|
||||||
|
className={roof.layout === ROOF_MATERIAL_LAYOUT.PARALLEL ? 'act' : ''}
|
||||||
|
onClick={() => {
|
||||||
|
handleChangeLayout(ROOF_MATERIAL_LAYOUT.PARALLEL, index)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getMessage('modal.roof.alloc.select.parallel')}
|
||||||
|
<i className="allocation01"></i>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className={roof.layout === ROOF_MATERIAL_LAYOUT.STAIRS ? 'act' : ''}
|
||||||
|
onClick={() => {
|
||||||
|
handleChangeLayout(ROOF_MATERIAL_LAYOUT.STAIRS, index)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getMessage('modal.roof.alloc.select.stairs')} <i className="allocation02"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)
|
||||||
)
|
})}
|
||||||
})}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="btn-frame modal act" onClick={handleSaveContext}>
|
<button className="btn-frame modal act" onClick={handleSaveContext}>
|
||||||
@ -213,6 +214,7 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ export default function RoofAllocationSetting(props) {
|
|||||||
<div className={`modal-pop-wrap lr mount`}>
|
<div className={`modal-pop-wrap lr mount`}>
|
||||||
{currentRoofList && (
|
{currentRoofList && (
|
||||||
<>
|
<>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.estimate.roof.alloc')}</h1>
|
<h1 className="title">{getMessage('plan.menu.estimate.roof.alloc')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -235,6 +235,7 @@ export default function RoofAllocationSetting(props) {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -31,7 +31,7 @@ export default function RoofShapePassivitySetting({ id, pos = { x: 50, y: 230 }
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xxm`}>
|
<div className={`modal-pop-wrap xxm`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('plan.menu.roof.cover.roof.shape.passivity.setting')}</h1>
|
<h1 className="title">{getMessage('plan.menu.roof.cover.roof.shape.passivity.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -67,6 +67,7 @@ export default function RoofShapePassivitySetting({ id, pos = { x: 50, y: 230 }
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -90,7 +90,7 @@ export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap lr mount`}>
|
<div className={`modal-pop-wrap lr mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.roof.shape.setting')}</h1>
|
<h1 className="title">{getMessage('modal.roof.shape.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -120,6 +120,7 @@ export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -75,7 +75,7 @@ export default function SettingModal01(props) {
|
|||||||
<>
|
<>
|
||||||
<WithDraggable isShow={true} pos={{ x: 1275, y: 180 }}>
|
<WithDraggable isShow={true} pos={{ x: 1275, y: 180 }}>
|
||||||
<div className={`modal-pop-wrap sm mount`}>
|
<div className={`modal-pop-wrap sm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.canvas.setting')}</h1>
|
<h1 className="title">{getMessage('modal.canvas.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id, true)}>
|
<button className="modal-close" onClick={() => closePopup(id, true)}>
|
||||||
닫기
|
닫기
|
||||||
@ -100,6 +100,7 @@ export default function SettingModal01(props) {
|
|||||||
{buttonAct === 2 && <SecondOption {...secondProps} />}
|
{buttonAct === 2 && <SecondOption {...secondProps} />}
|
||||||
{buttonAct === 3 && <GridOption {...gridProps} />}
|
{buttonAct === 3 && <GridOption {...gridProps} />}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -192,7 +192,7 @@ export default function DimensionLineSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xxxm mount`}>
|
<div className={`modal-pop-wrap xxxm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.canvas.setting.font.plan.absorption.dimension.line')} </h1>
|
<h1 className="title">{getMessage('modal.canvas.setting.font.plan.absorption.dimension.line')} </h1>
|
||||||
<button
|
<button
|
||||||
className="modal-close"
|
className="modal-close"
|
||||||
@ -258,6 +258,7 @@ export default function DimensionLineSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -57,7 +57,7 @@ export default function PlanSizeSetting(props) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap xsm mount`}>
|
<div className={`modal-pop-wrap xsm mount`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.canvas.setting.font.plan.absorption.plan.size.setting')}</h1>
|
<h1 className="title">{getMessage('modal.canvas.setting.font.plan.absorption.plan.size.setting')}</h1>
|
||||||
<button
|
<button
|
||||||
className="modal-close"
|
className="modal-close"
|
||||||
@ -104,6 +104,7 @@ export default function PlanSizeSetting(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export default function WallLineOffsetSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} pos={pos}>
|
<WithDraggable isShow={true} pos={pos}>
|
||||||
<div className={`modal-pop-wrap r`}>
|
<div className={`modal-pop-wrap r`}>
|
||||||
<div className="modal-head">
|
<div className="modal-head modal-handle">
|
||||||
<h1 className="title">{getMessage('modal.wallline.offset.setting')}</h1>
|
<h1 className="title">{getMessage('modal.wallline.offset.setting')}</h1>
|
||||||
<button className="modal-close" onClick={() => closePopup(id)}>
|
<button className="modal-close" onClick={() => closePopup(id)}>
|
||||||
닫기
|
닫기
|
||||||
@ -66,6 +66,7 @@ export default function WallLineOffsetSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="modal-foot modal-handle"></div>
|
||||||
</div>
|
</div>
|
||||||
</WithDraggable>
|
</WithDraggable>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -219,6 +219,10 @@ export default function Stuff() {
|
|||||||
pageSize: stuffSearchParams?.pageSize ? stuffSearchParams.pageSize : 100,
|
pageSize: stuffSearchParams?.pageSize ? stuffSearchParams.pageSize : 100,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!params.saleStoreId) {
|
||||||
|
params.saleStoreId = session.storeId
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
const apiUrl = `/api/object/list?${queryStringFormatter(params)}`
|
const apiUrl = `/api/object/list?${queryStringFormatter(params)}`
|
||||||
await get({
|
await get({
|
||||||
@ -271,6 +275,10 @@ export default function Stuff() {
|
|||||||
stuffSearchParams.schSortType = defaultSortType
|
stuffSearchParams.schSortType = defaultSortType
|
||||||
stuffSearchParams.pageNo = stuffSearchParams.pageNo
|
stuffSearchParams.pageNo = stuffSearchParams.pageNo
|
||||||
|
|
||||||
|
if (!stuffSearchParams.saleStoreId) {
|
||||||
|
stuffSearchParams.saleStoreId = session.storeId
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
const apiUrl = `/api/object/list?${queryStringFormatter(stuffSearchParams)}`
|
const apiUrl = `/api/object/list?${queryStringFormatter(stuffSearchParams)}`
|
||||||
await get({ url: apiUrl }).then((res) => {
|
await get({ url: apiUrl }).then((res) => {
|
||||||
@ -301,6 +309,9 @@ export default function Stuff() {
|
|||||||
stuffSearchParams.schSortType = defaultSortType
|
stuffSearchParams.schSortType = defaultSortType
|
||||||
setPageNo(1)
|
setPageNo(1)
|
||||||
|
|
||||||
|
if (!params.saleStoreId) {
|
||||||
|
stuffSearchParams.saleStoreId = session.storeId
|
||||||
|
}
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
const apiUrl = `/api/object/list?${queryStringFormatter(stuffSearchParams)}`
|
const apiUrl = `/api/object/list?${queryStringFormatter(stuffSearchParams)}`
|
||||||
await get({ url: apiUrl }).then((res) => {
|
await get({ url: apiUrl }).then((res) => {
|
||||||
|
|||||||
@ -304,6 +304,7 @@ export default function StuffDetail() {
|
|||||||
//mid:5(견적서), /pid:플랜번호
|
//mid:5(견적서), /pid:플랜번호
|
||||||
setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo })
|
setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo })
|
||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
|
setMenuNumber(5)
|
||||||
router.push(`/floor-plan/estimate/5?pid=${params.data.planNo}&objectNo=${params.data.objectNo}`)
|
router.push(`/floor-plan/estimate/5?pid=${params.data.planNo}&objectNo=${params.data.objectNo}`)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -1357,7 +1358,7 @@ export default function StuffDetail() {
|
|||||||
//로그인이 2차점인데 otherSaleStoreId가 없으면 알럿
|
//로그인이 2차점인데 otherSaleStoreId가 없으면 알럿
|
||||||
if (session.storeLvl !== '1') {
|
if (session.storeLvl !== '1') {
|
||||||
if (params.saleStoreLevel === '1') {
|
if (params.saleStoreLevel === '1') {
|
||||||
return swalFire({ text: getMessage('stuff.detail.tempSave.message4'), type: 'alert' })
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message3'), type: 'alert' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1447,6 +1448,13 @@ export default function StuffDetail() {
|
|||||||
params.saleStoreLevel = session.storeLvl
|
params.saleStoreLevel = session.storeLvl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (session.storeLvl !== '1') {
|
||||||
|
//로그인이 1차점이 아닌데 2차점을 안골라서 saleStoreLevel = 1로 셋팅되어있으면 알럿
|
||||||
|
if (params.saleStoreLevel === '1') {
|
||||||
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message3'), type: 'alert' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 담당자 자리수 체크
|
// 담당자 자리수 체크
|
||||||
if (params?.receiveUser !== '') {
|
if (params?.receiveUser !== '') {
|
||||||
if (params?.receiveUser.trim().length > 10) {
|
if (params?.receiveUser.trim().length > 10) {
|
||||||
|
|||||||
@ -40,8 +40,8 @@ export default function StuffSubHeader({ type }) {
|
|||||||
if (isObjectNotEmpty(managementState)) {
|
if (isObjectNotEmpty(managementState)) {
|
||||||
if (managementState.createUser === 'T01') {
|
if (managementState.createUser === 'T01') {
|
||||||
if (session.userId !== 'T01') {
|
if (session.userId !== 'T01') {
|
||||||
//도면 작성은 이동 할 수 있도록 변경 #457
|
//도면 작성은 이동 할 수 있도록 변경 #457 다시 못하도록 변경#474
|
||||||
// setButtonStyle('none')
|
setButtonStyle('none')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,19 +8,12 @@ import SingleDatePicker from '@/components/common/datepicker/SingleDatePicker'
|
|||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import PlanRequestPopQGrid from './PlanRequestPopQGrid'
|
import PlanRequestPopQGrid from './PlanRequestPopQGrid'
|
||||||
import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
|
import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
|
||||||
import { useCommonCode } from '@/hooks/common/useCommonCode'
|
|
||||||
import Select from 'react-select'
|
|
||||||
import QPagination from '@/components/common/pagination/QPagination'
|
import QPagination from '@/components/common/pagination/QPagination'
|
||||||
export default function PlanRequestPop(props) {
|
export default function PlanRequestPop(props) {
|
||||||
const [pageNo, setPageNo] = useState(1) //현재 페이지 번호
|
const [pageNo, setPageNo] = useState(1) //현재 페이지 번호
|
||||||
const [pageSize, setPageSize] = useState(20) //페이지 당 게시물 개수
|
const [pageSize, setPageSize] = useState(20) //페이지 당 게시물 개수
|
||||||
const [totalCount, setTotalCount] = useState(0) //총 갯수
|
const [totalCount, setTotalCount] = useState(0) //총 갯수
|
||||||
|
|
||||||
//공통코드
|
|
||||||
const { commonCode, findCommonCode } = useCommonCode()
|
|
||||||
|
|
||||||
// const [planStatCdList, setPlanStatCdList] = useState([])
|
|
||||||
|
|
||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
|
|
||||||
const [planReqObject, setPlanReqObject] = useState({})
|
const [planReqObject, setPlanReqObject] = useState({})
|
||||||
@ -71,16 +64,6 @@ export default function PlanRequestPop(props) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 상태 검색조건 변경
|
|
||||||
const onSelectionChange = (key) => {
|
|
||||||
if (isObjectNotEmpty(key)) {
|
|
||||||
setSchPlanStatCd(key.clCode)
|
|
||||||
} else {
|
|
||||||
//X누름
|
|
||||||
setSchPlanStatCd('')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 조회
|
// 조회
|
||||||
const onSubmit = (page, type) => {
|
const onSubmit = (page, type) => {
|
||||||
const params = {
|
const params = {
|
||||||
@ -194,7 +177,8 @@ export default function PlanRequestPop(props) {
|
|||||||
{
|
{
|
||||||
field: 'title',
|
field: 'title',
|
||||||
headerName: getMessage('stuff.planReqPopup.gridHeader.title'),
|
headerName: getMessage('stuff.planReqPopup.gridHeader.title'),
|
||||||
minWidth: 150,
|
minWidth: 250,
|
||||||
|
cellStyle: { textAlign: 'left' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'address1',
|
field: 'address1',
|
||||||
@ -234,13 +218,6 @@ export default function PlanRequestPop(props) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// useEffect(() => {
|
|
||||||
// const code1 = findCommonCode(115800) //상태
|
|
||||||
// if (code1 != null) {
|
|
||||||
// setPlanStatCdList(code1)
|
|
||||||
// }
|
|
||||||
// }, [commonCode])
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onSubmit(pageNo, 'S')
|
onSubmit(pageNo, 'S')
|
||||||
}, [])
|
}, [])
|
||||||
@ -431,9 +408,11 @@ export default function PlanRequestPop(props) {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<PlanRequestPopQGrid {...gridProps} getSelectedRowdata={getSelectedRowdata} />
|
<div className="q-grid">
|
||||||
<div className="pagination-wrap">
|
<PlanRequestPopQGrid {...gridProps} getSelectedRowdata={getSelectedRowdata} />
|
||||||
<QPagination pageNo={pageNo} pageSize={pageSize} pagePerBlock={10} totalCount={totalCount} handleChangePage={handleChangePage} />
|
<div className="pagination-wrap">
|
||||||
|
<QPagination pageNo={pageNo} pageSize={pageSize} pagePerBlock={10} totalCount={totalCount} handleChangePage={handleChangePage} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,8 +22,8 @@ export default function PlanRequestPopQGrid(props) {
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
suppressMovable: false,
|
suppressMovable: true,
|
||||||
resizable: false,
|
resizable: true,
|
||||||
suppressSizeToFit: false,
|
suppressSizeToFit: false,
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
@ -58,6 +58,7 @@ export default function PlanRequestPopQGrid(props) {
|
|||||||
defaultColDef={defaultColDef}
|
defaultColDef={defaultColDef}
|
||||||
pagination={isPageable}
|
pagination={isPageable}
|
||||||
onSelectionChanged={onSelectionChanged}
|
onSelectionChanged={onSelectionChanged}
|
||||||
|
autoSizeAllColumns={true}
|
||||||
overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`}
|
overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,26 +16,18 @@ import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
|||||||
|
|
||||||
import { convertNumberToPriceDecimal } from '@/util/common-utils'
|
import { convertNumberToPriceDecimal } from '@/util/common-utils'
|
||||||
import { usePlan } from '@/hooks/usePlan'
|
import { usePlan } from '@/hooks/usePlan'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup, closeAll } from '@/hooks/usePopup'
|
||||||
// import { useSearchParams } from 'next/navigation'
|
|
||||||
|
|
||||||
export default function Simulator() {
|
export default function Simulator() {
|
||||||
const { floorPlanState } = useContext(FloorPlanContext)
|
const { floorPlanState } = useContext(FloorPlanContext)
|
||||||
const { objectNo, pid } = floorPlanState
|
const { objectNo, pid } = floorPlanState
|
||||||
|
|
||||||
// const searchParams = useSearchParams()
|
|
||||||
// const objectNo = searchParams.get('objectNo')
|
|
||||||
// const pid = searchParams.get('pid')
|
|
||||||
const { selectedPlan } = usePlan()
|
const { selectedPlan } = usePlan()
|
||||||
|
|
||||||
const chartRef = useRef(null)
|
const chartRef = useRef(null)
|
||||||
|
|
||||||
// 캔버스 메뉴 넘버 셋팅
|
// 캔버스 메뉴 넘버 셋팅
|
||||||
const { setMenuNumber } = useCanvasMenu()
|
const { setMenuNumber } = useCanvasMenu()
|
||||||
|
const { closeAll } = usePopup()
|
||||||
useEffect(() => {
|
|
||||||
setMenuNumber(6)
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
const { get } = useAxios()
|
const { get } = useAxios()
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -43,12 +35,6 @@ export default function Simulator() {
|
|||||||
// 차트 관련
|
// 차트 관련
|
||||||
const [chartData, setChartData] = useState([])
|
const [chartData, setChartData] = useState([])
|
||||||
|
|
||||||
const { closeAll } = usePopup()
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
closeAll()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||||
datasets: [
|
datasets: [
|
||||||
@ -114,7 +100,6 @@ export default function Simulator() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('🚀 ~ useEffect ~ selectedPlan:', selectedPlan)
|
|
||||||
/* 초기화 작업 */
|
/* 초기화 작업 */
|
||||||
setChartData([])
|
setChartData([])
|
||||||
setObjectDetail({})
|
setObjectDetail({})
|
||||||
@ -125,11 +110,13 @@ export default function Simulator() {
|
|||||||
setHatsudenryouPeakcutAll([])
|
setHatsudenryouPeakcutAll([])
|
||||||
setHatsudenryouPeakcutAllSnow([])
|
setHatsudenryouPeakcutAllSnow([])
|
||||||
|
|
||||||
if (objectNo) {
|
if (objectNo && pid && selectedPlan) {
|
||||||
fetchObjectDetail(objectNo)
|
fetchObjectDetail(objectNo, selectedPlan.ordering)
|
||||||
fetchSimulatorNotice()
|
fetchSimulatorNotice()
|
||||||
setPwrGnrSimType('D')
|
setPwrGnrSimType('D')
|
||||||
setPwrRecoil({ ...pwrRecoil, type: 'D' })
|
setPwrRecoil({ ...pwrRecoil, type: 'D' })
|
||||||
|
setMenuNumber(6)
|
||||||
|
closeAll()
|
||||||
}
|
}
|
||||||
}, [objectNo, pid, selectedPlan])
|
}, [objectNo, pid, selectedPlan])
|
||||||
|
|
||||||
@ -148,8 +135,8 @@ export default function Simulator() {
|
|||||||
const [hatsudenryouPeakcutAll, setHatsudenryouPeakcutAll] = useState([])
|
const [hatsudenryouPeakcutAll, setHatsudenryouPeakcutAll] = useState([])
|
||||||
const [hatsudenryouPeakcutAllSnow, setHatsudenryouPeakcutAllSnow] = useState([])
|
const [hatsudenryouPeakcutAllSnow, setHatsudenryouPeakcutAllSnow] = useState([])
|
||||||
|
|
||||||
const fetchObjectDetail = async (objectNo) => {
|
const fetchObjectDetail = async (objectNo, currentPid) => {
|
||||||
const apiUrl = `/api/pwrGnrSimulation/calculations?objectNo=${objectNo}&planNo=${pid}`
|
const apiUrl = `/api/pwrGnrSimulation/calculations?objectNo=${objectNo}&planNo=${currentPid}`
|
||||||
|
|
||||||
const resultData = await get({ url: apiUrl })
|
const resultData = await get({ url: apiUrl })
|
||||||
if (resultData) {
|
if (resultData) {
|
||||||
@ -234,7 +221,7 @@ export default function Simulator() {
|
|||||||
</div>
|
</div>
|
||||||
{/* 시스템용량 */}
|
{/* 시스템용량 */}
|
||||||
<div className="estimate-box">
|
<div className="estimate-box">
|
||||||
<div className="estimate-tit">{getMessage('simulator.title.sub3')}</div>
|
<div className="estimate-tit">{getMessage('simulator.title.sub3')}</div>
|
||||||
<div className="estimate-name">{objectDetail.capacity ? `${convertNumberToPriceDecimal(objectDetail.capacity)} kW` : ''}</div>
|
<div className="estimate-name">{objectDetail.capacity ? `${convertNumberToPriceDecimal(objectDetail.capacity)} kW` : ''}</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 연간예측발전량 */}
|
{/* 연간예측발전량 */}
|
||||||
@ -257,7 +244,7 @@ export default function Simulator() {
|
|||||||
{/* 적설조건 */}
|
{/* 적설조건 */}
|
||||||
<div className="estimate-box">
|
<div className="estimate-box">
|
||||||
<div className="estimate-tit">{getMessage('simulator.title.sub7')}</div>
|
<div className="estimate-tit">{getMessage('simulator.title.sub7')}</div>
|
||||||
<div className="estimate-name">{objectDetail.snowfall} cm</div>
|
<div className="estimate-name">{objectDetail.snowfall ? `${objectDetail.snowfall}cm` : ''} </div>
|
||||||
</div>
|
</div>
|
||||||
{/* 풍속조건 */}
|
{/* 풍속조건 */}
|
||||||
<div className="estimate-box">
|
<div className="estimate-box">
|
||||||
@ -356,7 +343,10 @@ export default function Simulator() {
|
|||||||
{/* 지붕면 */}
|
{/* 지붕면 */}
|
||||||
<td>{moduleInfo.roofSurface}</td>
|
<td>{moduleInfo.roofSurface}</td>
|
||||||
{/* 경사각 */}
|
{/* 경사각 */}
|
||||||
<td>{convertNumberToPriceDecimal(moduleInfo.slopeAngle)}{moduleInfo.classType == 0 ? "寸":"º"}</td>
|
<td>
|
||||||
|
{convertNumberToPriceDecimal(moduleInfo.slopeAngle)}
|
||||||
|
{moduleInfo.classType == 0 ? '寸' : 'º'}
|
||||||
|
</td>
|
||||||
{/* 방위각(도) */}
|
{/* 방위각(도) */}
|
||||||
<td>{convertNumberToPriceDecimal(moduleInfo.azimuth)}</td>
|
<td>{convertNumberToPriceDecimal(moduleInfo.azimuth)}</td>
|
||||||
{/* 태양전지모듈 */}
|
{/* 태양전지모듈 */}
|
||||||
|
|||||||
@ -56,9 +56,9 @@ export function useMasterController() {
|
|||||||
*/
|
*/
|
||||||
const getTrestleList = async (params) => {
|
const getTrestleList = async (params) => {
|
||||||
const paramString = getQueryString(params)
|
const paramString = getQueryString(params)
|
||||||
console.log('🚀🚀 ~ getTrestleList ~ paramString:', paramString)
|
// console.log('🚀🚀 ~ getTrestleList ~ paramString:', paramString)
|
||||||
return await get({ url: '/api/v1/master/getTrestleList' + paramString }).then((res) => {
|
return await get({ url: '/api/v1/master/getTrestleList' + paramString }).then((res) => {
|
||||||
console.log('🚀🚀 ~ getTrestleList ~ res:', res)
|
// console.log('🚀🚀 ~ getTrestleList ~ res:', res)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -82,9 +82,9 @@ export function useMasterController() {
|
|||||||
*/
|
*/
|
||||||
const getConstructionList = async (params) => {
|
const getConstructionList = async (params) => {
|
||||||
const paramString = getQueryString(params)
|
const paramString = getQueryString(params)
|
||||||
console.log('🚀🚀 ~ getConstructionList ~ paramString:', paramString)
|
// console.log('🚀🚀 ~ getConstructionList ~ paramString:', paramString)
|
||||||
return await get({ url: '/api/v1/master/getConstructionList' + paramString }).then((res) => {
|
return await get({ url: '/api/v1/master/getConstructionList' + paramString }).then((res) => {
|
||||||
console.log('🚀🚀 ~ getConstructionList ~ res:', res)
|
// console.log('🚀🚀 ~ getConstructionList ~ res:', res)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,8 @@ export function useRoofFn() {
|
|||||||
const ratio = window.devicePixelRatio || 1
|
const ratio = window.devicePixelRatio || 1
|
||||||
const layout = roofMaterial.layout
|
const layout = roofMaterial.layout
|
||||||
|
|
||||||
let width = (roofMaterial.width ?? 226) / 10
|
let width = (roofMaterial.width || 226) / 10
|
||||||
let height = (roofMaterial.length ?? 158) / 10
|
let height = (roofMaterial.length || 158) / 10
|
||||||
const index = roofMaterial.index ?? 0
|
const index = roofMaterial.index ?? 0
|
||||||
let roofStyle = 2
|
let roofStyle = 2
|
||||||
const inputPatternSize = { width: width, height: height } //임시 사이즈
|
const inputPatternSize = { width: width, height: height } //임시 사이즈
|
||||||
|
|||||||
@ -80,6 +80,7 @@ export const useEstimateController = (planNo) => {
|
|||||||
|
|
||||||
res.data.pkgAsp = roundedNumber.toString()
|
res.data.pkgAsp = roundedNumber.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
setEstimateContextState(res.data)
|
setEstimateContextState(res.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -384,7 +385,7 @@ export const useEstimateController = (planNo) => {
|
|||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
estimateData.newFileList = []
|
estimateData.newFileList = []
|
||||||
swalFire({ text: getMessage('estimate.detail.save.alertMsg'), type: 'alert' })
|
swalFire({ text: getMessage('estimate.detail.save.alertMsg'), type: 'alert' })
|
||||||
fetchSetting(objectRecoil.floorPlanObjectNo, estimateData.planNo)
|
fetchSetting(estimateData.objectNo, estimateData.planNo)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -409,7 +410,7 @@ export const useEstimateController = (planNo) => {
|
|||||||
const params = {
|
const params = {
|
||||||
saleStoreId: session.storeId,
|
saleStoreId: session.storeId,
|
||||||
sapSalesStoreCd: session.custCd,
|
sapSalesStoreCd: session.custCd,
|
||||||
objectNo: objectRecoil.floorPlanObjectNo,
|
objectNo: estimateData.objectNo,
|
||||||
planNo: sendPlanNo,
|
planNo: sendPlanNo,
|
||||||
copySaleStoreId: otherSaleStoreId ? otherSaleStoreId : saleStoreId,
|
copySaleStoreId: otherSaleStoreId ? otherSaleStoreId : saleStoreId,
|
||||||
copyReceiveUser: copyReceiveUser,
|
copyReceiveUser: copyReceiveUser,
|
||||||
|
|||||||
@ -389,6 +389,7 @@ export function useModule() {
|
|||||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.id === activeModule.surfaceId)[0]
|
.filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE && obj.id === activeModule.surfaceId)[0]
|
||||||
let isWarning = false
|
let isWarning = false
|
||||||
canvas.discardActiveObject()
|
canvas.discardActiveObject()
|
||||||
|
moduleSetupSurface.set({ modules: otherModules })
|
||||||
canvas.remove(...columnModules)
|
canvas.remove(...columnModules)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
|
|
||||||
@ -503,6 +504,7 @@ export function useModule() {
|
|||||||
let isWarning = false
|
let isWarning = false
|
||||||
|
|
||||||
canvas.discardActiveObject()
|
canvas.discardActiveObject()
|
||||||
|
moduleSetupSurface.set({ modules: otherModules })
|
||||||
canvas.remove(...rowModules)
|
canvas.remove(...rowModules)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
|
|
||||||
@ -852,8 +854,12 @@ export function useModule() {
|
|||||||
|
|
||||||
const modulesRemove = () => {
|
const modulesRemove = () => {
|
||||||
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
|
const activeModule = canvas.getObjects().filter((obj) => canvas.getActiveObjects()[0].id === obj.id)[0]
|
||||||
const modules = canvas.getObjects().filter((obj) => obj.surfaceId === activeModule.surfaceId && obj.name === POLYGON_TYPE.MODULE)
|
const modules = canvas
|
||||||
canvas.remove(...modules)
|
.getObjects()
|
||||||
|
.filter((obj) => obj.surfaceId === activeModule.surfaceId && obj.name === POLYGON_TYPE.MODULE && activeModule.id !== obj.id)
|
||||||
|
const surface = canvas.getObjects().filter((obj) => obj.id === activeModule.surfaceId && obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)[0]
|
||||||
|
surface.set({ modules: modules })
|
||||||
|
canvas.remove(activeModule)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -698,6 +698,7 @@ export function useModuleBasicSetting() {
|
|||||||
|
|
||||||
checkedModule.forEach((module, index) => {
|
checkedModule.forEach((module, index) => {
|
||||||
const { width, height } = getModuleWidthHeight(maxLengthLine, moduleSetupSurface, module)
|
const { width, height } = getModuleWidthHeight(maxLengthLine, moduleSetupSurface, module)
|
||||||
|
|
||||||
const flowLines = getFlowLines(moduleSetupSurface, module)
|
const flowLines = getFlowLines(moduleSetupSurface, module)
|
||||||
//육지붕이 아닐때만 넣는다 육지붕일땐 클릭 이벤트에 별도로 넣어놓음
|
//육지붕이 아닐때만 넣는다 육지붕일땐 클릭 이벤트에 별도로 넣어놓음
|
||||||
let startPoint = flowLines.bottom
|
let startPoint = flowLines.bottom
|
||||||
|
|||||||
@ -1,39 +1,41 @@
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
import { moduleSelectionDataPlanListState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
import { useMasterController } from '@/hooks/common/useMasterController'
|
import { useMasterController } from '@/hooks/common/useMasterController'
|
||||||
import { canvasState } from '@/store/canvasAtom'
|
import { canvasState, currentCanvasPlanState } from '@/store/canvasAtom'
|
||||||
|
|
||||||
export function useModulePlace() {
|
export function useModulePlace() {
|
||||||
const canvas = useRecoilValue(canvasState)
|
const canvas = useRecoilValue(canvasState)
|
||||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState) //다음으로 넘어가는 최종 데이터
|
const moduleSelectionDataPlanList = useRecoilValue(moduleSelectionDataPlanListState) //다음으로 넘어가는 최종 데이터
|
||||||
|
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||||
const [trestleDetailParams, setTrestleDetailParams] = useState([])
|
const [trestleDetailParams, setTrestleDetailParams] = useState([])
|
||||||
const [trestleDetailList, setTrestleDetailList] = useState([])
|
const [trestleDetailList, setTrestleDetailList] = useState([])
|
||||||
const selectedModules = useRecoilValue(selectedModuleState)
|
const selectedModules = useRecoilValue(selectedModuleState)
|
||||||
const { getTrestleDetailList } = useMasterController()
|
const { getTrestleDetailList } = useMasterController()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const common = moduleSelectionData.common
|
if (moduleSelectionDataPlanList) {
|
||||||
const roofConstructions = moduleSelectionData.roofConstructions
|
const common = moduleSelectionDataPlanList[currentCanvasPlan.id].common
|
||||||
|
const roofConstructions = moduleSelectionDataPlanList[currentCanvasPlan.id].roofConstructions
|
||||||
|
|
||||||
const listParams = roofConstructions.map((item) => {
|
const listParams = roofConstructions.map((item) => {
|
||||||
return {
|
return {
|
||||||
...common,
|
...common,
|
||||||
moduleTpCd: selectedModules.itemTp,
|
moduleTpCd: selectedModules.itemTp,
|
||||||
roofMatlCd: item.trestle.roofMatlCd,
|
roofMatlCd: item.trestle.roofMatlCd,
|
||||||
trestleMkrCd: item.trestle.trestleMkrCd,
|
trestleMkrCd: item.trestle.trestleMkrCd,
|
||||||
constMthdCd: item.trestle.constMthdCd,
|
constMthdCd: item.trestle.constMthdCd,
|
||||||
roofBaseCd: item.trestle.roofBaseCd,
|
roofBaseCd: item.trestle.roofBaseCd,
|
||||||
constTp: item.construction.constTp,
|
constTp: item.construction.constTp,
|
||||||
mixMatlNo: selectedModules.mixMatlNo,
|
mixMatlNo: selectedModules.mixMatlNo,
|
||||||
roofPitch: selectedModules.roofPchBase ? selectedModules.roofPchBase : null,
|
roofPitch: selectedModules.roofPchBase ? selectedModules.roofPchBase : null,
|
||||||
inclCd: String(item.addRoof.pitch),
|
inclCd: String(item.addRoof.pitch),
|
||||||
roofIndex: item.addRoof.index,
|
roofIndex: item.addRoof.index,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
setTrestleDetailParams(listParams)
|
||||||
setTrestleDetailParams(listParams)
|
}
|
||||||
}, [moduleSelectionData])
|
}, [moduleSelectionDataPlanList])
|
||||||
|
|
||||||
const getTrestleDetailListData = async () => {
|
const getTrestleDetailListData = async () => {
|
||||||
const trestleDetailList = await getTrestleDetailList(trestleDetailParams)
|
const trestleDetailList = await getTrestleDetailList(trestleDetailParams)
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const defaultDotLineGridSetting = {
|
|||||||
LINE: false,
|
LINE: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
let previousRoofMaterialsYn = 'N' // 지붕재 select 정보 비교 후 변경된 것이 없으면 1회만 실행
|
//let previousRoofMaterialsYn = 'N' // 지붕재 select 정보 비교 후 변경된 것이 없으면 1회만 실행
|
||||||
|
|
||||||
export function useCanvasSetting() {
|
export function useCanvasSetting() {
|
||||||
const canvas = useRecoilValue(canvasState)
|
const canvas = useRecoilValue(canvasState)
|
||||||
@ -159,21 +159,23 @@ export function useCanvasSetting() {
|
|||||||
setBasicSettings({ ...basicSetting, selectedRoofMaterial: selectedRoofMaterial })
|
setBasicSettings({ ...basicSetting, selectedRoofMaterial: selectedRoofMaterial })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const previousObjectNoRef = useRef(null)
|
||||||
const previousRoofMaterialsRef = useRef(null)
|
const previousRoofMaterialsRef = useRef(null)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 지붕재 select 정보가 존재해야 배치면초기설정 DB 정보 비교 후 지붕재 정보를 가져올 수 있음
|
// 지붕재 select 정보가 존재해야 배치면초기설정 DB 정보 비교 후 지붕재 정보를 가져올 수 있음
|
||||||
if (roofMaterials.length !== 0 && JSON.stringify(previousRoofMaterialsRef.current) !== JSON.stringify(roofMaterials)) {
|
if (!previousObjectNoRef.current && !correntObjectNo && previousObjectNoRef.current !== correntObjectNo
|
||||||
// 지붕재 select 정보 비교 후 변경된 것이 없으면 1회만 실행
|
|| roofMaterials.length !== 0 && JSON.stringify(previousRoofMaterialsRef.current) !== JSON.stringify(roofMaterials)) {
|
||||||
if (roofMaterials && previousRoofMaterialsYn === 'N') {
|
|
||||||
|
if (roofMaterials) {
|
||||||
fetchBasicSettings()
|
fetchBasicSettings()
|
||||||
previousRoofMaterialsYn = 'Y'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 이전 값을 업데이트
|
// 이전 값을 업데이트
|
||||||
|
previousObjectNoRef.current = correntObjectNo
|
||||||
previousRoofMaterialsRef.current = roofMaterials
|
previousRoofMaterialsRef.current = roofMaterials
|
||||||
}
|
}
|
||||||
}, [roofMaterials])
|
}, [roofMaterials, correntObjectNo])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!canvas) {
|
if (!canvas) {
|
||||||
@ -297,7 +299,7 @@ export function useCanvasSetting() {
|
|||||||
})
|
})
|
||||||
roofsArray = res.map((item) => {
|
roofsArray = res.map((item) => {
|
||||||
return {
|
return {
|
||||||
roofApply: true,
|
roofApply: item.roofApply,
|
||||||
roofSeq: 0,
|
roofSeq: 0,
|
||||||
roofMatlCd: item.roofMatlCd,
|
roofMatlCd: item.roofMatlCd,
|
||||||
roofWidth: item.roofWidth,
|
roofWidth: item.roofWidth,
|
||||||
@ -328,6 +330,7 @@ export function useCanvasSetting() {
|
|||||||
roofGap: 'HEI_455',
|
roofGap: 'HEI_455',
|
||||||
roofLayout: 'P',
|
roofLayout: 'P',
|
||||||
roofPitch: 4,
|
roofPitch: 4,
|
||||||
|
roofAngle: 21.8,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export function useRoofAllocationSetting(id) {
|
|||||||
const [currentRoofMaterial, setCurrentRoofMaterial] = useState(roofMaterials[0]) // 팝업 내 기준 지붕재
|
const [currentRoofMaterial, setCurrentRoofMaterial] = useState(roofMaterials[0]) // 팝업 내 기준 지붕재
|
||||||
const [roofList, setRoofList] = useRecoilState(addedRoofsState) // 배치면 초기설정에서 선택한 지붕재 배열
|
const [roofList, setRoofList] = useRecoilState(addedRoofsState) // 배치면 초기설정에서 선택한 지붕재 배열
|
||||||
const [editingLines, setEditingLines] = useState([])
|
const [editingLines, setEditingLines] = useState([])
|
||||||
const [currentRoofList, setCurrentRoofList] = useState(null)
|
const [currentRoofList, setCurrentRoofList] = useState([])
|
||||||
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
const [basicInfo, setBasicInfo] = useState(null)
|
const [basicInfo, setBasicInfo] = useState(null)
|
||||||
|
|||||||
@ -97,13 +97,11 @@ export function useAxios(lang = '') {
|
|||||||
|
|
||||||
const getFetcher = async (url) => {
|
const getFetcher = async (url) => {
|
||||||
const res = await get({ url })
|
const res = await get({ url })
|
||||||
console.log('🚀 ~ getFetcher ~ res:', res)
|
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
const postFetcher = async (url, { arg }) => {
|
const postFetcher = async (url, arg) => {
|
||||||
const res = await post({ url, data: arg })
|
const res = await post({ url, data: arg })
|
||||||
console.log('🚀 ~ postFetcher ~ res:', res)
|
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ export function useContextMenu() {
|
|||||||
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
||||||
const { settingsData, setSettingsDataSave } = useCanvasSetting()
|
const { settingsData, setSettingsDataSave } = useCanvasSetting()
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
const { alignModule } = useModule()
|
const { alignModule, modulesRemove } = useModule()
|
||||||
const { removeRoofMaterial, removeAllRoofMaterial } = useRoofFn()
|
const { removeRoofMaterial, removeAllRoofMaterial } = useRoofFn()
|
||||||
|
|
||||||
const currentMenuSetting = () => {
|
const currentMenuSetting = () => {
|
||||||
@ -656,7 +656,7 @@ export function useContextMenu() {
|
|||||||
{
|
{
|
||||||
id: 'remove',
|
id: 'remove',
|
||||||
name: getMessage('contextmenu.remove'),
|
name: getMessage('contextmenu.remove'),
|
||||||
fn: () => deleteObject(),
|
fn: () => modulesRemove(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'move',
|
id: 'move',
|
||||||
|
|||||||
@ -207,49 +207,56 @@ export function usePlan(params = {}) {
|
|||||||
const orderingNo = plans?.find((obj) => obj.id === newCurrentId).ordering
|
const orderingNo = plans?.find((obj) => obj.id === newCurrentId).ordering
|
||||||
const objectNo = floorPlanState.objectNo
|
const objectNo = floorPlanState.objectNo
|
||||||
//견적서 or 발전시뮬
|
//견적서 or 발전시뮬
|
||||||
|
|
||||||
if (pathname !== '/floor-plan') {
|
if (pathname !== '/floor-plan') {
|
||||||
await promiseGet({ url: `/api/estimate/${objectNo}/${orderingNo}/detail` })
|
await promiseGet({ url: `/api/estimate/${objectNo}/${orderingNo}/detail` })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const estimateDetail = res.data
|
const estimateDetail = res.data
|
||||||
if (estimateDetail.docNo) {
|
if (pathname === '/floor-plan/estimate/5') {
|
||||||
res.data.resetFlag = 'N'
|
if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) {
|
||||||
|
res.data.resetFlag = 'N'
|
||||||
|
|
||||||
if (res.data.itemList.length > 0) {
|
if (res.data.itemList.length > 0) {
|
||||||
res.data.itemList.map((item) => {
|
res.data.itemList.map((item) => {
|
||||||
item.delFlg = '0'
|
item.delFlg = '0'
|
||||||
})
|
})
|
||||||
}
|
|
||||||
if (res.data.pkgAsp === null || res.data.pkgAsp == undefined) {
|
|
||||||
res.data.pkgAsp = '0.00'
|
|
||||||
} else {
|
|
||||||
const number = parseFloat(res.data.pkgAsp)
|
|
||||||
const roundedNumber = isNaN(number) ? '0.00' : number.toFixed(2)
|
|
||||||
|
|
||||||
res.data.pkgAsp = roundedNumber.toString()
|
|
||||||
}
|
|
||||||
setEstimateContextState(res.data)
|
|
||||||
|
|
||||||
if (pathname === '/floor-plan') {
|
|
||||||
if (!currentCanvasPlan || currentCanvasPlan.id !== newCurrentId) {
|
|
||||||
saveCanvas()
|
|
||||||
}
|
}
|
||||||
|
if (res.data.pkgAsp === null || res.data.pkgAsp == undefined) {
|
||||||
|
res.data.pkgAsp = '0.00'
|
||||||
|
} else {
|
||||||
|
const number = parseFloat(res.data.pkgAsp)
|
||||||
|
const roundedNumber = isNaN(number) ? '0.00' : number.toFixed(2)
|
||||||
|
|
||||||
|
res.data.pkgAsp = roundedNumber.toString()
|
||||||
|
}
|
||||||
|
setEstimateContextState(res.data)
|
||||||
|
// 클릭한 플랜 탭으로 이동
|
||||||
|
updateCurrentPlan(newCurrentId)
|
||||||
|
} else {
|
||||||
|
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||||
}
|
}
|
||||||
updateCurrentPlan(newCurrentId)
|
|
||||||
} else {
|
} else {
|
||||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
// 발전시뮬레이션
|
||||||
|
if (estimateDetail.tempFlg === '0') {
|
||||||
|
updateCurrentPlan(newCurrentId)
|
||||||
|
} else {
|
||||||
|
swalFire({ text: getMessage('simulator.menu.move.valid1') })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
if (pathname === '/floor-plan/estimate/5') {
|
||||||
|
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||||
|
} else {
|
||||||
|
swalFire({ text: getMessage('simulator.menu.move.valid1') })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// if (pathname === '/floor-plan') {
|
|
||||||
if (!currentCanvasPlan || currentCanvasPlan.id !== newCurrentId) {
|
if (!currentCanvasPlan || currentCanvasPlan.id !== newCurrentId) {
|
||||||
saveCanvas()
|
saveCanvas()
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
updateCurrentPlan(newCurrentId)
|
updateCurrentPlan(newCurrentId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -427,6 +427,12 @@ export const usePolygon = () => {
|
|||||||
text = '西西南'
|
text = '西西南'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sameDirectionCnt = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF && obj.directionText === text)
|
||||||
|
|
||||||
|
text = text + (sameDirectionCnt.length + 1)
|
||||||
|
|
||||||
|
polygon.set('directionText', text)
|
||||||
|
|
||||||
const textObj = new fabric.Text(`${text} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})`, {
|
const textObj = new fabric.Text(`${text} (${currentAngleType === ANGLE_TYPE.SLOPE ? arrow.pitch : getDegreeByChon(arrow.pitch)}${pitchText})`, {
|
||||||
fontFamily: flowFontOptions.fontFamily.value,
|
fontFamily: flowFontOptions.fontFamily.value,
|
||||||
fontWeight: flowFontOptions.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
|
fontWeight: flowFontOptions.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
|
||||||
|
|||||||
@ -675,6 +675,7 @@
|
|||||||
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
|
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
|
||||||
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
|
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
|
||||||
"stuff.detail.tempSave.message2": "担当者は10桁以下で入力してください.",
|
"stuff.detail.tempSave.message2": "担当者は10桁以下で入力してください.",
|
||||||
|
"stuff.detail.tempSave.message3": "二次販売店を選択してください.",
|
||||||
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
||||||
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
||||||
"stuff.detail.planList.title": "プランリスト",
|
"stuff.detail.planList.title": "プランリスト",
|
||||||
|
|||||||
@ -684,6 +684,7 @@
|
|||||||
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 메뉴얼을 확인해주십시오",
|
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 메뉴얼을 확인해주십시오",
|
||||||
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
||||||
"stuff.detail.tempSave.message2": "담당자는 10자리 이하로 입력해 주십시오.",
|
"stuff.detail.tempSave.message2": "담당자는 10자리 이하로 입력해 주십시오.",
|
||||||
|
"stuff.detail.tempSave.message3": "2차 판매점을 선택해주세요.",
|
||||||
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
||||||
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
||||||
"stuff.detail.planList.title": "플랜리스트",
|
"stuff.detail.planList.title": "플랜리스트",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -134,3 +134,18 @@ export const getQueryString = (o) => {
|
|||||||
.join('&')
|
.join('&')
|
||||||
return `?${queryString}`
|
return `?${queryString}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const unescapeString = (str) => {
|
||||||
|
const regex = /&(amp|lt|gt|quot|#39);/g
|
||||||
|
const chars = {
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
'"': '"',
|
||||||
|
''': "'",
|
||||||
|
}
|
||||||
|
|
||||||
|
if (regex.test(str)) {
|
||||||
|
return str.replace(regex, (matched) => chars[matched] || matched)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user