This commit is contained in:
minsik 2024-10-31 10:11:31 +09:00
commit 2a7f81b467
5 changed files with 1413 additions and 1362 deletions

View File

@ -12,8 +12,6 @@ import { currentMenuState, currentObjectState } from '@/store/canvasAtom'
import { useCanvasEvent } from '@/hooks/useCanvasEvent'
import QContextMenu from '@/components/common/context-menu/QContextMenu'
import { useCanvasConfigInitialize } from '@/hooks/common/useCanvasConfigInitialize'
import { useCommonUtils } from '@/hooks/common/useCommonUtils'
import { MENU } from '@/common/common'
import PanelBatchStatistics from '@/components/floor-plan/modal/panelBatch/PanelBatchStatistics'

View File

@ -14,7 +14,7 @@ export default function CanvasLayout({ children }) {
// const { menuNumber } = props
const { menuNumber } = useCanvasMenu()
const { session } = useContext(SessionContext)
const [objectNo, setObjectNo] = useState('test123241010001') //
const [objectNo, setObjectNo] = useState('test123240822001') //
const globalLocaleState = useRecoilValue(globalLocaleStore)
const { getMessage } = useMessage()

View File

@ -37,6 +37,7 @@ export function useCommonUtils() {
const commonTextMode = () => {
let textbox
if (commonUtils.text) {
commonTextKeyEvent()
addCanvasMouseEventListener('mouse:down', (event) => {
const pointer = canvas?.getPointer(event.e)
textbox = new fabric.Textbox('', {
@ -472,6 +473,7 @@ export function useCommonUtils() {
}
}
const commonTextKeyEvent = () => {
//텍스트 모드일때 엔터 이벤트
addDocumentEventListener('keydown', document, (e) => {
if (e.key === 'Enter') {
@ -496,6 +498,7 @@ export function useCommonUtils() {
initEvent()
}
})
}
const commonFunctions = (mode) => {
let tempStates = { ...commonUtils }
@ -591,6 +594,7 @@ export function useCommonUtils() {
const obj = canvas?.getActiveObject()
obj.set({ editable: true })
obj.enterEditing()
commonTextKeyEvent()
}
const deleteObject = () => {

View File

@ -43,7 +43,7 @@ export function useContextMenu() {
const { addPopup } = usePopup()
const [popupId, setPopupId] = useState(uuidv4())
const [gridColor, setGridColor] = useRecoilState(gridColorState)
const { deleteObject, moveObject, copyObject, editText, changeDimensionExtendLine } = useCommonUtils({})
const { deleteObject, moveObject, copyObject, editText, changeDimensionExtendLine } = useCommonUtils()
const [qContextMenu, setQContextMenu] = useRecoilState(contextMenuState)
const [cell, setCell] = useState(null)
const [column, setColumn] = useState(null)

View File

@ -26,14 +26,14 @@
min-width: 1280px;
padding-bottom: 0;
background-color: #383838;
transition: padding .17s ease-in-out;
transition: padding 0.17s ease-in-out;
z-index: 999;
.canvas-menu-inner {
position: relative;
display: flex;
align-items: center;
padding: 0 40px 0 20px;
background-color: #2C2C2C;
background-color: #2c2c2c;
height: 46.8px;
z-index: 999;
.canvas-menu-list {
@ -53,7 +53,7 @@
font-weight: 600;
padding: 15px 20px;
opacity: 0.55;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
.menu-icon {
display: block;
width: 14px;
@ -62,13 +62,27 @@
background-position: center;
background-size: contain;
margin-right: 10px;
&.con00{background-image: url(/static/images/canvas/menu_icon00.svg);}
&.con01{background-image: url(/static/images/canvas/menu_icon01.svg);}
&.con02{background-image: url(/static/images/canvas/menu_icon02.svg);}
&.con03{background-image: url(/static/images/canvas/menu_icon03.svg);}
&.con04{background-image: url(/static/images/canvas/menu_icon04.svg);}
&.con05{background-image: url(/static/images/canvas/menu_icon05.svg);}
&.con06{background-image: url(/static/images/canvas/menu_icon06.svg);}
&.con00 {
background-image: url(/static/images/canvas/menu_icon00.svg);
}
&.con01 {
background-image: url(/static/images/canvas/menu_icon01.svg);
}
&.con02 {
background-image: url(/static/images/canvas/menu_icon02.svg);
}
&.con03 {
background-image: url(/static/images/canvas/menu_icon03.svg);
}
&.con04 {
background-image: url(/static/images/canvas/menu_icon04.svg);
}
&.con05 {
background-image: url(/static/images/canvas/menu_icon05.svg);
}
&.con06 {
background-image: url(/static/images/canvas/menu_icon06.svg);
}
}
}
&.active {
@ -100,25 +114,43 @@
width: 30px;
height: 30px;
border-radius: 2px;
background-color: #3D3D3D;
background-color: #3d3d3d;
background-position: center;
background-repeat: no-repeat;
background-size: 15px 15px;
transition: all .17s ease-in-out;
&.btn01{background-image: url(../../public/static/images/canvas/side_icon03.svg);}
&.btn02{background-image: url(../../public/static/images/canvas/side_icon02.svg);}
&.btn03{background-image: url(../../public/static/images/canvas/side_icon01.svg);}
&.btn04{background-image: url(../../public/static/images/canvas/side_icon04.svg);}
&.btn05{background-image: url(../../public/static/images/canvas/side_icon05.svg);}
&.btn06{background-image: url(../../public/static/images/canvas/side_icon06.svg);}
&.btn07{background-image: url(../../public/static/images/canvas/side_icon07.svg);}
&.btn08{background-image: url(../../public/static/images/canvas/side_icon08.svg);}
&.btn09{background-image: url(../../public/static/images/canvas/side_icon09.svg);}
transition: all 0.17s ease-in-out;
&.btn01 {
background-image: url(../../public/static/images/canvas/side_icon03.svg);
}
&.btn02 {
background-image: url(../../public/static/images/canvas/side_icon02.svg);
}
&.btn03 {
background-image: url(../../public/static/images/canvas/side_icon01.svg);
}
&.btn04 {
background-image: url(../../public/static/images/canvas/side_icon04.svg);
}
&.btn05 {
background-image: url(../../public/static/images/canvas/side_icon05.svg);
}
&.btn06 {
background-image: url(../../public/static/images/canvas/side_icon06.svg);
}
&.btn07 {
background-image: url(../../public/static/images/canvas/side_icon07.svg);
}
&.btn08 {
background-image: url(../../public/static/images/canvas/side_icon08.svg);
}
&.btn09 {
background-image: url(../../public/static/images/canvas/side_icon09.svg);
}
&:hover {
background-color: #1083E3;
background-color: #1083e3;
}
&.active {
background-color: #1083E3;
background-color: #1083e3;
}
}
}
@ -134,10 +166,18 @@
background-repeat: no-repeat;
background-position: center;
background-size: contain;
&.ico01{background-image: url(../../public/static/images/canvas/ico-flx01.svg);}
&.ico02{background-image: url(../../public/static/images/canvas/ico-flx02.svg);}
&.ico03{background-image: url(../../public/static/images/canvas/ico-flx03.svg);}
&.ico04{background-image: url(../../public/static/images/canvas/ico-flx04.svg);}
&.ico01 {
background-image: url(../../public/static/images/canvas/ico-flx01.svg);
}
&.ico02 {
background-image: url(../../public/static/images/canvas/ico-flx02.svg);
}
&.ico03 {
background-image: url(../../public/static/images/canvas/ico-flx03.svg);
}
&.ico04 {
background-image: url(../../public/static/images/canvas/ico-flx04.svg);
}
}
.name {
font-size: 12px;
@ -167,16 +207,16 @@
button {
margin-left: auto;
height: 100%;
background-color: #4B4B4B;
background-color: #4b4b4b;
font-size: 13px;
font-weight: 400;
color: #fff;
padding: 0 7.5px;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
}
&.on {
button {
background-color: #1083E3;
background-color: #1083e3;
}
}
}
@ -185,7 +225,7 @@
align-items: center;
justify-content: center;
gap: 10px;
background-color: #3D3D3D;
background-color: #3d3d3d;
border-radius: 2px;
width: 100px;
height: 30px;
@ -218,7 +258,7 @@
background-color: #383838;
width: 100%;
height: 50px;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
.canvas-depth2-inner {
display: flex;
align-items: center;
@ -270,7 +310,7 @@
align-items: center;
margin-right: 34px;
height: 100%;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
button {
position: relative;
font-size: 12px;
@ -310,7 +350,7 @@
// canvas-layout
.canvas-content {
padding-top: 46.8px;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
.canvas-frame {
height: calc(100vh - 129.3px);
}
@ -328,11 +368,11 @@
top: 92.8px;
left: 0;
display: flex;
background-color: #1C1C1C;
background-color: #1c1c1c;
border-top: 1px solid #000;
width: 100%;
min-width: 1280px;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
z-index: 99;
&.active {
top: calc(92.8px + 50px);
@ -348,14 +388,14 @@
padding: 9.6px 20px;
border-right: 1px solid #000;
min-width: 0;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
span {
display: flex;
align-items: center;
width: 100%;
font-size: 12px;
font-family: 'Pretendard', sans-serif;
color: #AAA;
color: #aaa;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
@ -393,9 +433,9 @@
justify-content: center;
width: 45px;
padding: 13.5px 0;
background-color: #1C1C1C;
background-color: #1c1c1c;
border-right: 1px solid #000;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
span {
display: block;
width: 9px;
@ -413,9 +453,9 @@
.canvas-frame {
position: relative;
// height: calc(100% - 36.5px);
background-color: #F4F4F7;
background-color: #f4f4f7;
overflow: auto;
transition: all .17s ease-in-out;
transition: all 0.17s ease-in-out;
// &::-webkit-scrollbar {
// width: 10px;
// height: 10px;
@ -450,7 +490,7 @@
min-width: 1280px;
height: 46px;
border-bottom: 1px solid #000;
background: #2C2C2C;
background: #2c2c2c;
z-index: 999;
.sub-header-inner {
display: flex;
@ -473,7 +513,9 @@
background-repeat: no-repeat;
background-position: center;
background-size: cover;
&.drawing{background-image: url(../../public/static/images/main/drawing_icon.svg);}
&.drawing {
background-image: url(../../public/static/images/main/drawing_icon.svg);
}
}
}
&:after {
@ -484,7 +526,7 @@
transform: translateY(-50%);
width: 1px;
height: 16px;
background-color: #D9D9D9;
background-color: #d9d9d9;
}
&:first-child {
padding-left: 0;
@ -514,7 +556,7 @@
span {
display: flex;
font-size: 12px;
color: #AAA;
color: #aaa;
font-weight: normal;
cursor: default;
}
@ -572,8 +614,8 @@
.sub-table-box {
padding: 20px;
border-radius: 6px;
border: 1px solid #E9EAED;
background: #FFF;
border: 1px solid #e9eaed;
background: #fff;
box-shadow: 0px 3px 30px 0px rgba(0, 0, 0, 0.02);
.table-box-title-wrap {
display: flex;
@ -596,7 +638,7 @@
position: relative;
font-size: 15px;
font-weight: 600;
color: #1083E3;
color: #1083e3;
padding-left: 10px;
&::before {
content: '';
@ -606,7 +648,7 @@
transform: translateY(-50%);
width: 1px;
height: 11px;
background-color: #D9D9D9;
background-color: #d9d9d9;
}
}
.option {
@ -627,7 +669,7 @@
span {
font-weight: 600;
&.red {
color: #E23D70;
color: #e23d70;
}
}
&:after {
@ -638,10 +680,17 @@
transform: translateY(-50%);
width: 1px;
height: 11px;
background-color: #D9D9D9;
background-color: #d9d9d9;
}
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
&::after {
display: none;
}
}
&:first-child{padding-left: 0;}
&:last-child{padding-right: 0;&::after{display: none;}}
}
}
}
@ -734,7 +783,7 @@
width: 105px;
height: 30px;
line-height: 30px;
background-color: #F4F4F7;
background-color: #f4f4f7;
border-radius: 100px;
text-align: center;
font-size: 13px;
@ -749,12 +798,12 @@
&.blue {
font-size: 16px;
font-weight: 700;
color: #1083E3;
color: #1083e3;
}
&.red {
font-size: 16px;
font-weight: 700;
color: #D72A2A;
color: #d72a2a;
}
}
}
@ -768,11 +817,11 @@
padding: 10px;
.btn-area {
padding-bottom: 15px;
border-bottom: 1px solid #ECF0F4;
border-bottom: 1px solid #ecf0f4;
.file-upload {
display: inline-block;
height: 30px;
background-color: #94A0AD;
background-color: #94a0ad;
padding: 0 10px;
border-radius: 2px;
font-size: 13px;
@ -780,9 +829,9 @@
color: #fff;
font-weight: 500;
cursor: pointer;
transition: background .15s ease-in-out;
transition: background 0.15s ease-in-out;
&:hover {
background-color: #607F9A;
background-color: #607f9a;
}
}
}
@ -806,7 +855,7 @@
span {
position: relative;
font-size: 13px;
color: #45576F;
color: #45576f;
font-weight: 400;
white-space: nowrap;
padding-right: 55px;
@ -831,13 +880,13 @@
.special-note-check-wrap {
display: grid;
grid-template-columns: repeat(5, 1fr);
border: 1px solid #ECF0F4;
border: 1px solid #ecf0f4;
border-radius: 3px;
margin-bottom: 30px;
.special-note-check-item {
padding: 14px 10px;
border-right: 1px solid #ECF0F4;
border-top: 1px solid #ECF0F4;
border-right: 1px solid #ecf0f4;
border-top: 1px solid #ecf0f4;
&:nth-child(5n) {
border-right: none;
}
@ -845,13 +894,13 @@
border-top: none;
}
&.act {
background-color: #F7F9FA;
background-color: #f7f9fa;
}
}
}
.calculation-estimate {
border: 1px solid #ECF0F4;
border: 1px solid #ecf0f4;
border-radius: 3px;
padding: 24px;
max-height: 350px;
@ -865,13 +914,13 @@
dt {
font-size: 13px;
font-weight: 600;
color: #1083E3;
color: #1083e3;
margin-bottom: 15px;
}
dd {
font-size: 12px;
font-weight: 400;
color: #45576F;
color: #45576f;
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
@ -903,7 +952,7 @@
.product-price-tit {
font-size: 13px;
font-weight: 400;
color: #45576F;
color: #45576f;
margin-right: 10px;
}
.select-wrap {
@ -941,7 +990,7 @@
transform: translateY(-50%);
width: 1px;
height: 12px;
background-color: #D9D9D9;
background-color: #d9d9d9;
}
&:first-child {
padding-left: 0;
@ -953,7 +1002,7 @@
padding-right: 0;
}
&.item01 {
color: #3BBB48;
color: #3bbb48;
span {
background-image: url(../../public/static/images/sub/open_ico.svg);
}
@ -965,13 +1014,13 @@
}
}
&.item03 {
color: #0191C9;
color: #0191c9;
span {
background-image: url(../../public/static/images/sub/attachment_ico.svg);
}
}
&.item04 {
color: #F16A6A;
color: #f16a6a;
span {
background-image: url(../../public/static/images/sub/click_check_ico.svg);
}
@ -1033,23 +1082,23 @@
table {
table-layout: fixed;
border-collapse: collapse;
border: 1px solid #ECF0F4;
border: 1px solid #ecf0f4;
border-radius: 4px;
thead {
th {
padding: 4.5px 0;
border-bottom: 1px solid #ECF0F4;
border-bottom: 1px solid #ecf0f4;
text-align: center;
font-size: 13px;
color: #45576F;
color: #45576f;
font-weight: 500;
background-color: #F8F9FA;
background-color: #f8f9fa;
}
}
tbody {
td {
font-size: 13px;
color: #45576F;
color: #45576f;
text-align: center;
padding: 4.5px 0;
}
@ -1063,13 +1112,13 @@
.simulation-tit-wrap {
flex: none;
padding-right: 40px;
border-right: 1px solid #EEEEEE;
border-right: 1px solid #eeeeee;
span {
display: block;
position: relative;
padding-left: 60px;
font-size: 15px;
color: #14324F;
color: #14324f;
font-weight: 600;
&::before {
content: '';
@ -1097,7 +1146,7 @@
}
dd {
font-size: 12px;
color: #45576F;
color: #45576f;
font-weight: 400;
line-height: 24px;
}
@ -1105,7 +1154,8 @@
margin-bottom: 0;
}
}
ul, ol{
ul,
ol {
list-style: unset;
}
}
@ -1114,10 +1164,10 @@
.module-total {
display: flex;
align-items: center;
background-color: #F8F9FA;
background-color: #f8f9fa;
padding: 9px 0;
margin-right: 4px;
border: 1px solid #ECF0F4;
border: 1px solid #ecf0f4;
border-top: none;
.total-title {
flex: 1;
@ -1140,7 +1190,7 @@
.information-help-wrap {
display: flex;
padding: 24px;
background-color: #F4F4F4;
background-color: #f4f4f4;
border-radius: 4px;
margin-bottom: 15px;
.information-help-tit-wrap {
@ -1148,7 +1198,7 @@
display: flex;
align-items: center;
padding-right: 40px;
border-right: 1px solid #E0E0E3;
border-right: 1px solid #e0e0e3;
.help-tit-icon {
width: 40px;
height: 40px;
@ -1160,7 +1210,7 @@
.help-tit {
font-size: 13px;
font-weight: 600;
color: #45576F;
color: #45576f;
}
}
.information-help-guide {
@ -1169,7 +1219,7 @@
display: block;
font-size: 12px;
font-weight: 400;
color: #45576F;
color: #45576f;
margin-bottom: 7px;
&:last-child {
margin-bottom: 0;
@ -1183,7 +1233,7 @@
flex-direction: column;
align-items: center;
padding: 10px 0 30px 0;
border-bottom: 1px solid #E5E5E5;
border-bottom: 1px solid #e5e5e5;
margin-bottom: 24px;
.community-search-box {
position: relative;
@ -1202,7 +1252,7 @@
font-weight: 400;
color: #101010;
&::placeholder {
color: #C8C8C8;
color: #c8c8c8;
}
}
.community-search-ico {
@ -1221,10 +1271,10 @@
.community-search-keyword {
font-size: 13px;
font-weight: 400;
color: #45576F;
color: #45576f;
span {
font-weight: 600;
color: #F16A6A;
color: #f16a6a;
}
}
}
@ -1239,15 +1289,15 @@
align-items: center;
padding: 24px;
border-radius: 4px;
border: 1px solid #E5E5E5;
background: #FFF;
transition: all .15s ease-in-out;
border: 1px solid #e5e5e5;
background: #fff;
transition: all 0.15s ease-in-out;
.file-item-info {
.item-num {
display: inline-block;
padding: 6px 17.5px;
border-radius: 60px;
background-color: #F4F4F7;
background-color: #f4f4f7;
font-size: 13px;
font-weight: 600;
color: #101010;
@ -1279,7 +1329,7 @@
}
}
&:hover {
background-color: #F4F4F7;
background-color: #f4f4f7;
}
}
}
@ -1292,7 +1342,7 @@
height: 148px;
padding: 24px;
border-radius: 4px;
border: 1px solid #E5E5E5;
border: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 500;
color: #344356;
@ -1304,8 +1354,8 @@
align-items: center;
width: 200px;
height: 30px;
background-color: #FAFAFA;
border: 1px solid #EEE;
background-color: #fafafa;
border: 1px solid #eee;
padding: 0 10px;
input {
font-size: 13px;
@ -1428,5 +1478,4 @@
}
}
}
}