Merge branch 'dev' of https://git.hanasys.jp/qcast3/qcast-front into dev
This commit is contained in:
commit
4e14e1d5bf
@ -100,14 +100,11 @@ const resizeImage = async (image) => {
|
|||||||
|
|
||||||
let finalWidth = Math.round(image.bitmap.width * scale)
|
let finalWidth = Math.round(image.bitmap.width * scale)
|
||||||
let finalHeight = Math.round(image.bitmap.height * scale)
|
let finalHeight = Math.round(image.bitmap.height * scale)
|
||||||
|
|
||||||
if (scale < 0.6) {
|
|
||||||
finalWidth = targetImageWidth
|
|
||||||
finalHeight = targetImageHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
// 실제 리사이즈 실행
|
if (scale >= 0.6) {
|
||||||
image.resize({ w: finalWidth, h: finalHeight })
|
// 실제 리사이즈 실행
|
||||||
|
image.resize({ w: finalWidth, h: finalHeight })
|
||||||
|
}
|
||||||
|
|
||||||
//배경 이미지를 생성
|
//배경 이미지를 생성
|
||||||
const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff })
|
const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff })
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { useRecoilValue } from 'recoil'
|
|||||||
import { floorPlanObjectState, estimateState } from '@/store/floorPlanObjectAtom'
|
import { floorPlanObjectState, estimateState } from '@/store/floorPlanObjectAtom'
|
||||||
import { usePathname, useSearchParams } from 'next/navigation'
|
import { usePathname, useSearchParams } from 'next/navigation'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
import { sessionStore } from '@/store/commonAtom'
|
||||||
|
|
||||||
export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg }) {
|
export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg }) {
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
@ -30,7 +31,7 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown
|
|||||||
// recoil 물건번호
|
// recoil 물건번호
|
||||||
const objectRecoil = useRecoilValue(floorPlanObjectState)
|
const objectRecoil = useRecoilValue(floorPlanObjectState)
|
||||||
const estimateRecoilState = useRecoilValue(estimateState)
|
const estimateRecoilState = useRecoilValue(estimateState)
|
||||||
|
const sessionState = useRecoilValue(sessionStore)
|
||||||
//문서 다운로드
|
//문서 다운로드
|
||||||
const handleFileDown = async () => {
|
const handleFileDown = async () => {
|
||||||
const url = '/api/estimate/excel-download'
|
const url = '/api/estimate/excel-download'
|
||||||
@ -67,6 +68,8 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown
|
|||||||
schWeightFlg: schWeightFlg,
|
schWeightFlg: schWeightFlg,
|
||||||
schDrawingFlg: defaultSchDrawingFlg,
|
schDrawingFlg: defaultSchDrawingFlg,
|
||||||
pwrGnrSimType: 'D', //default 화면에 안보여줌
|
pwrGnrSimType: 'D', //default 화면에 안보여줌
|
||||||
|
userId: sessionState.userId ? sessionState.userId : "",
|
||||||
|
saleStoreId: sessionState.storeId ? sessionState.storeId : "",
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = { responseType: 'blob' }
|
const options = { responseType: 'blob' }
|
||||||
|
|||||||
@ -122,12 +122,46 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
canvas.set({ zoom: 1 })
|
canvas.set({ zoom: 1 })
|
||||||
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
|
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
|
||||||
|
|
||||||
|
canvas.renderAll()
|
||||||
|
|
||||||
|
// roof polygon들의 중간점 계산
|
||||||
|
const roofPolygons = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||||
let x, y
|
let x, y
|
||||||
|
x = 0 //canvas.width / 2
|
||||||
|
y = 1000 //canvas.height / 2
|
||||||
|
|
||||||
x = canvas.width / 2
|
/*if (roofPolygons.length > 0) {
|
||||||
y = canvas.height / 2
|
let minX = Infinity,
|
||||||
|
minY = Infinity,
|
||||||
|
maxX = -Infinity,
|
||||||
|
maxY = -Infinity
|
||||||
|
|
||||||
canvas.zoomToPoint(new fabric.Point(x, y), 0.5)
|
roofPolygons.forEach((obj) => {
|
||||||
|
const boundingRect = obj.getBoundingRect()
|
||||||
|
minX = Math.min(minX, boundingRect.left)
|
||||||
|
minY = Math.min(minY, boundingRect.top)
|
||||||
|
maxX = Math.max(maxX, boundingRect.left + boundingRect.width)
|
||||||
|
maxY = Math.max(maxY, boundingRect.top + boundingRect.height)
|
||||||
|
})
|
||||||
|
|
||||||
|
x = (minX + maxX) / 2
|
||||||
|
y = (minY + maxY) / 2
|
||||||
|
} else {
|
||||||
|
// roof polygon이 없으면 기본 중앙점 사용
|
||||||
|
x = canvas.width / 2
|
||||||
|
y = canvas.height / 2
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x > 1600) {
|
||||||
|
x = 0
|
||||||
|
y = 0
|
||||||
|
}
|
||||||
|
if (y > 1600) {
|
||||||
|
x = 0
|
||||||
|
y = 0
|
||||||
|
}*/
|
||||||
|
|
||||||
|
canvas.zoomToPoint(new fabric.Point(x, y), 0.4)
|
||||||
changeFontSize('lengthText', '28')
|
changeFontSize('lengthText', '28')
|
||||||
changeFontSize('circuitNumber', '28')
|
changeFontSize('circuitNumber', '28')
|
||||||
changeFontSize('flowText', '28')
|
changeFontSize('flowText', '28')
|
||||||
|
|||||||
@ -232,6 +232,9 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
//가대 상세 데이터 기준으로 모듈 설치 배치면 생성
|
//가대 상세 데이터 기준으로 모듈 설치 배치면 생성
|
||||||
const makeModuleInstArea = (roof, trestleDetail) => {
|
const makeModuleInstArea = (roof, trestleDetail) => {
|
||||||
//지붕 객체 반환
|
//지붕 객체 반환
|
||||||
|
if (!roof.pitch) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (tabNum == 3) {
|
if (tabNum == 3) {
|
||||||
if (!roof) {
|
if (!roof) {
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import { calculateAngle } from '@/util/qpolygon-utils'
|
|||||||
import { fabric } from 'fabric'
|
import { fabric } from 'fabric'
|
||||||
import { outlineDisplaySelector } from '@/store/settingAtom'
|
import { outlineDisplaySelector } from '@/store/settingAtom'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import PropertiesSetting from '@/components/floor-plan/modal/outerlinesetting/PropertiesSetting'
|
|
||||||
import Big from 'big.js'
|
import Big from 'big.js'
|
||||||
import RoofShapeSetting from '@/components/floor-plan/modal/roofShape/RoofShapeSetting'
|
import RoofShapeSetting from '@/components/floor-plan/modal/roofShape/RoofShapeSetting'
|
||||||
import { useObject } from '@/hooks/useObject'
|
import { useObject } from '@/hooks/useObject'
|
||||||
@ -147,7 +146,7 @@ export function useOuterLineWall(id, propertiesId) {
|
|||||||
|
|
||||||
const mouseDown = (e) => {
|
const mouseDown = (e) => {
|
||||||
let pointer = getIntersectMousePoint(e)
|
let pointer = getIntersectMousePoint(e)
|
||||||
pointer = { x: Big(pointer.x).round(1).toNumber(), y: Big(pointer.y).round(1).toNumber() }
|
pointer = { x: Big(pointer.x).toNumber(), y: Big(pointer.y).toNumber() }
|
||||||
|
|
||||||
if (points.length === 0) {
|
if (points.length === 0) {
|
||||||
setPoints((prev) => [...prev, pointer])
|
setPoints((prev) => [...prev, pointer])
|
||||||
|
|||||||
@ -1164,6 +1164,8 @@ export const usePolygon = () => {
|
|||||||
if (startFlag && endFlag) {
|
if (startFlag && endFlag) {
|
||||||
if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.EAVES) {
|
if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.EAVES) {
|
||||||
representLines.push(line)
|
representLines.push(line)
|
||||||
|
} else if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.HIPANDGABLE) {
|
||||||
|
representLines.push(line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -150,7 +150,7 @@ $alert-color: #101010;
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 5px;
|
width: 15px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -159,7 +159,7 @@ $alert-color: #101010;
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 5px;
|
width: 15px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -235,7 +235,7 @@ $alert-color: #101010;
|
|||||||
.modal-foot{
|
.modal-foot{
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 5px 0;
|
padding: 15px 0;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@ -344,7 +344,7 @@ $alert-color: #101010;
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
right: 0;
|
right: 0;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.input-grid{
|
.input-grid{
|
||||||
@ -646,7 +646,7 @@ $alert-color: #101010;
|
|||||||
.outline-wrap{
|
.outline-wrap{
|
||||||
padding: 24px 0;
|
padding: 24px 0;
|
||||||
border-top: 1px solid #424242;
|
border-top: 1px solid #424242;
|
||||||
|
|
||||||
.outline-inner{
|
.outline-inner{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -666,7 +666,7 @@ $alert-color: #101010;
|
|||||||
.outline-form{
|
.outline-form{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
span{
|
span{
|
||||||
width: 60px;
|
width: 60px;
|
||||||
flex: none;
|
flex: none;
|
||||||
@ -1311,7 +1311,7 @@ $alert-color: #101010;
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 10px;
|
width: 10px;
|
||||||
@ -1760,7 +1760,7 @@ $alert-color: #101010;
|
|||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 2px;
|
width: 2px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
}
|
}
|
||||||
&::-webkit-scrollbar-thumb {
|
&::-webkit-scrollbar-thumb {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -1771,7 +1771,7 @@ $alert-color: #101010;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1945,7 +1945,7 @@ $alert-color: #101010;
|
|||||||
min-height: 80px;
|
min-height: 80px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 치수선 설정
|
// 치수선 설정
|
||||||
@ -2232,11 +2232,11 @@ $alert-color: #101010;
|
|||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.keraba-flex{
|
.keraba-flex{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -2321,7 +2321,7 @@ $alert-color: #101010;
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.compas-table-box{
|
.compas-table-box{
|
||||||
background-color: #3D3D3D;
|
background-color: #3D3D3D;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user