Merge branch 'dev' into feature/yj-layoutSetup

# Conflicts:
#	src/locales/ja.json
#	src/locales/ko.json
This commit is contained in:
yjnoh 2025-03-31 14:57:32 +09:00
commit 09e985e9b5
8 changed files with 49 additions and 86 deletions

View File

@ -110,6 +110,7 @@ export default function PowerConditionalSelect(props) {
selected: s.pcsSerCd === data.pcsSerCd ? !s.selected : false, selected: s.pcsSerCd === data.pcsSerCd ? !s.selected : false,
} }
}) })
setSelectedModels([])
} }
setSeries(copySeries) setSeries(copySeries)
handleSetmodels(copySeries.filter((s) => s.selected)) handleSetmodels(copySeries.filter((s) => s.selected))

View File

@ -203,7 +203,7 @@ export default function Stuff() {
if (event.column.colId === 'objectNo') { if (event.column.colId === 'objectNo') {
return return
} else { } else {
//T R //T S
if (event.data.objectNo) { if (event.data.objectNo) {
setIsGlobalLoading(true) setIsGlobalLoading(true)
if (event.data.tempFlg === '0') { if (event.data.tempFlg === '0') {

View File

@ -54,7 +54,7 @@ export default function StuffDetail() {
const { get, promiseGet, del, promisePost, promisePut } = useAxios(globalLocaleState) const { get, promiseGet, del, promisePost, promisePut } = useAxios(globalLocaleState)
//form //form
const formInitValue = { const formInitValue = {
// T...() R...() // T...() S...()
planReqNo: '', //No planReqNo: '', //No
receiveUser: session?.userNm, // receiveUser: session?.userNm, //
objectStatusId: '0', //(:0 : 1) objectStatusId: '0', //(:0 : 1)
@ -1033,8 +1033,7 @@ export default function StuffDetail() {
const _saleStoreId = watch('saleStoreId') const _saleStoreId = watch('saleStoreId')
// 2 // 2
const _otherSaleStoreId = watch('otherSaleStoreId') const _otherSaleStoreId = watch('otherSaleStoreId')
// zipNo: '', // // zipNo: '', // #947
const _zipNo = watch('zipNo')
// prefId: '', // // prefId: '', //
const _prefId = watch('prefId') const _prefId = watch('prefId')
// address: '', // // address: '', //
@ -1071,10 +1070,6 @@ export default function StuffDetail() {
} }
} }
if (!formData.zipNo) {
errors.zipNo = true
}
if (!formData.prefId) { if (!formData.prefId) {
errors.prefId = true errors.prefId = true
} }
@ -1115,10 +1110,6 @@ export default function StuffDetail() {
} }
} }
if (!formData.zipNo) {
errors.zipNo = true
}
if (!formData.prefId || formData.prefId === '0') { if (!formData.prefId || formData.prefId === '0') {
errors.prefId = true errors.prefId = true
} }
@ -1144,7 +1135,6 @@ export default function StuffDetail() {
_objectName, _objectName,
_saleStoreId, _saleStoreId,
_otherSaleStoreId, _otherSaleStoreId,
_zipNo,
_prefId, _prefId,
_address, _address,
_areaId, _areaId,
@ -1189,6 +1179,14 @@ export default function StuffDetail() {
} }
}, [prefValue]) }, [prefValue])
// / disabled
const onChangePrefCode = (e) => {
setPrefValue(e.prefId)
form.setValue('prefId', e.prefId)
form.setValue('prefName', e.prefName)
}
// //
const handleAreaIdOnChange = (e) => { const handleAreaIdOnChange = (e) => {
form.setValue('areaId', e.areaId) form.setValue('areaId', e.areaId)
@ -1243,12 +1241,6 @@ export default function StuffDetail() {
errors = fieldNm errors = fieldNm
} }
//
if (!formData.zipNo) {
fieldNm = getMessage('stuff.detail.zipNo')
errors = fieldNm
}
//1 //1
if (!formData.saleStoreId) { if (!formData.saleStoreId) {
fieldNm = getMessage('stuff.detail.saleStoreId') fieldNm = getMessage('stuff.detail.saleStoreId')
@ -1558,7 +1550,7 @@ export default function StuffDetail() {
type: 'alert', type: 'alert',
icon: 'error', icon: 'error',
}) })
console.log('error::::::', error) console.error('error::::::', error)
}) })
} }
} }
@ -2004,9 +1996,7 @@ export default function StuffDetail() {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>{getMessage('stuff.detail.zipNo')}</th>
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
</th>
<td> <td>
<div className="flx-box"> <div className="flx-box">
<div className="input-wrap mr5" style={{ width: '200px' }}> <div className="input-wrap mr5" style={{ width: '200px' }}>
@ -2038,10 +2028,10 @@ export default function StuffDetail() {
getOptionLabel={(x) => x.prefName} getOptionLabel={(x) => x.prefName}
getOptionValue={(x) => x.prefId} getOptionValue={(x) => x.prefId}
isSearchable={false} isSearchable={false}
onChange={onChangePrefCode}
value={prefCodeList.filter(function (option) { value={prefCodeList.filter(function (option) {
return option.prefId === prefValue return option.prefId === prefValue
})} })}
isDisabled={true}
/> />
)} )}
</div> </div>
@ -2571,9 +2561,7 @@ export default function StuffDetail() {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>{getMessage('stuff.detail.zipNo')}</th>
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
</th>
<td> <td>
<div className="flx-box"> <div className="flx-box">
<div className="input-wrap mr5" style={{ width: '200px' }}> <div className="input-wrap mr5" style={{ width: '200px' }}>
@ -2606,10 +2594,10 @@ export default function StuffDetail() {
getOptionLabel={(x) => x.prefName} getOptionLabel={(x) => x.prefName}
getOptionValue={(x) => x.prefId} getOptionValue={(x) => x.prefId}
isSearchable={false} isSearchable={false}
onChange={onChangePrefCode}
value={prefCodeList.filter(function (option) { value={prefCodeList.filter(function (option) {
return option.prefId === prefValue return option.prefId === prefValue
})} })}
isDisabled={true}
/> />
)} )}
</div> </div>

View File

@ -71,30 +71,19 @@ export function useRoofAllocationSetting(id) {
roof.innerLines.forEach((line) => { roof.innerLines.forEach((line) => {
/** 실측값이 없는 경우 라인 두께 4로 설정 */ /** 실측값이 없는 경우 라인 두께 4로 설정 */
if (!line.attributes.actualSize || line.attributes?.actualSize === 0) { if (!line.attributes.actualSize || line.attributes?.actualSize === 0) {
line.set({ line.set({ strokeWidth: 4, stroke: 'black', selectable: true })
strokeWidth: 4,
stroke: 'black',
selectable: true,
})
} }
/** 현재 선택된 라인인 경우 라인 두께 2로 설정 */ /** 현재 선택된 라인인 경우 라인 두께 2로 설정 */
if (editingLines.includes(line)) { if (editingLines.includes(line)) {
line.set({ line.set({ strokeWidth: 2, stroke: 'black', selectable: true })
strokeWidth: 2,
stroke: 'black',
selectable: true,
})
} }
}) })
}) })
/** 현재 선택된 객체가 보조라인, 피라미드, 힙인 경우 두께 4로 설정 */ /** 현재 선택된 객체가 보조라인, 피라미드, 힙인 경우 두께 4로 설정 */
if (currentObject && currentObject.name && ['auxiliaryLine', 'ridge', 'hip'].includes(currentObject.name)) { if (currentObject && currentObject.name && ['auxiliaryLine', 'ridge', 'hip'].includes(currentObject.name)) {
currentObject.set({ currentObject.set({ strokeWidth: 4, stroke: '#EA10AC' })
strokeWidth: 4,
stroke: '#EA10AC',
})
} }
}, [currentObject]) }, [currentObject])
@ -102,7 +91,7 @@ export function useRoofAllocationSetting(id) {
/** 현재 선택된 객체가 보조라인, 피라미드, 힙인 경우 두께 4로 설정 */ /** 현재 선택된 객체가 보조라인, 피라미드, 힙인 경우 두께 4로 설정 */
const roofBases = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF) const roofBases = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
if (roofBases.length === 0) { if (roofBases.length === 0) {
swalFire({ text: '할당할 지붕이 없습니다.' }) swalFire({ text: getMessage('roofAllocation.not.found'), icon: 'warning' })
closePopup(id) closePopup(id)
} }
@ -115,9 +104,7 @@ export function useRoofAllocationSetting(id) {
*/ */
const fetchBasicSettings = async (planNo) => { const fetchBasicSettings = async (planNo) => {
try { try {
await get({ await get({ url: `/api/canvas-management/canvas-basic-settings/by-object/${correntObjectNo}/${planNo}` }).then((res) => {
url: `/api/canvas-management/canvas-basic-settings/by-object/${correntObjectNo}/${planNo}`,
}).then((res) => {
let roofsArray = {} let roofsArray = {}
if (res.length > 0) { if (res.length > 0) {
@ -187,11 +174,7 @@ export function useRoofAllocationSetting(id) {
selectedRoofMaterial: selectRoofs.find((roof) => roof.selected), selectedRoofMaterial: selectRoofs.find((roof) => roof.selected),
}) })
setBasicInfo({ setBasicInfo({ planNo: '' + res[0].planNo, roofSizeSet: '' + res[0].roofSizeSet, roofAngleSet: '' + res[0].roofAngleSet })
planNo: '' + res[0].planNo,
roofSizeSet: '' + res[0].roofSizeSet,
roofAngleSet: '' + res[0].roofAngleSet,
})
}) })
} catch (error) { } catch (error) {
console.error('Data fetching error:', error) console.error('Data fetching error:', error)
@ -250,10 +233,7 @@ export function useRoofAllocationSetting(id) {
} }
const originCurrentRoofList = currentRoofList.map((roof) => { const originCurrentRoofList = currentRoofList.map((roof) => {
return { return { ...roof, selected: false }
...roof,
selected: false,
}
}) })
originCurrentRoofList.push({ originCurrentRoofList.push({
...currentRoofMaterial, ...currentRoofMaterial,
@ -308,13 +288,19 @@ export function useRoofAllocationSetting(id) {
*/ */
const handleSaveContext = () => { const handleSaveContext = () => {
const newRoofList = currentRoofList.map((roof, idx) => { const newRoofList = currentRoofList.map((roof, idx) => {
if (roof.index !== idx) {
// 기존 저장된 지붕재의 index 수정
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF && obj.roofMaterial?.index === roof.index)
roofs.forEach((roof) => {
setSurfaceShapePattern(roof, roofDisplay.column, false, { ...roof, index: idx }, true)
})
}
return { ...roof, index: idx, raft: roof.raft ? roof.raft : roof.raftBaseCd } return { ...roof, index: idx, raft: roof.raft ? roof.raft : roof.raftBaseCd }
}) })
setBasicSetting((prev) => { setBasicSetting((prev) => {
return { return { ...prev, selectedRoofMaterial: newRoofList.find((roof) => roof.selected) }
...prev,
selectedRoofMaterial: newRoofList.find((roof) => roof.selected),
}
}) })
setRoofList(newRoofList) setRoofList(newRoofList)
@ -349,11 +335,7 @@ export function useRoofAllocationSetting(id) {
if (!checkInnerLines()) { if (!checkInnerLines()) {
apply() apply()
} else { } else {
swalFire({ swalFire({ type: 'alert', icon: 'error', text: getMessage('실제치수를 입력해 주세요.') })
type: 'alert',
icon: 'error',
text: getMessage('실제치수를 입력해 주세요.'),
})
} }
} }
@ -368,11 +350,7 @@ export function useRoofAllocationSetting(id) {
if (roof.separatePolygon.length === 0) { if (roof.separatePolygon.length === 0) {
roof.innerLines.forEach((line) => { roof.innerLines.forEach((line) => {
if (!line.attributes.actualSize || line.attributes?.actualSize === 0) { if (!line.attributes.actualSize || line.attributes?.actualSize === 0) {
line.set({ line.set({ strokeWidth: 4, stroke: 'black', selectable: true })
strokeWidth: 4,
stroke: 'black',
selectable: true,
})
result = true result = true
} }
}) })
@ -420,10 +398,7 @@ export function useRoofAllocationSetting(id) {
}) })
setBasicSetting((prev) => { setBasicSetting((prev) => {
return { return { ...prev, selectedRoofMaterial: newRoofList.find((roof) => roof.selected) }
...prev,
selectedRoofMaterial: newRoofList.find((roof) => roof.selected),
}
}) })
setRoofList(newRoofList) setRoofList(newRoofList)
@ -431,9 +406,7 @@ export function useRoofAllocationSetting(id) {
roofs.forEach((roof) => { roofs.forEach((roof) => {
if (roof.isFixed) return if (roof.isFixed) return
roof.set({ roof.set({ isFixed: true })
isFixed: true,
})
/** 모양 패턴 설정 */ /** 모양 패턴 설정 */
setSurfaceShapePattern( setSurfaceShapePattern(
@ -470,10 +443,7 @@ export function useRoofAllocationSetting(id) {
if (id === line.id) { if (id === line.id) {
setEditingLines([...editingLines.filter((editLine) => editLine.id !== line.id), line]) setEditingLines([...editingLines.filter((editLine) => editLine.id !== line.id), line])
line.attributes.actualSize = size line.attributes.actualSize = size
line.set({ line.set({ strokeWidth: 2, stroke: 'black' })
strokeWidth: 2,
stroke: 'black',
})
} }
}) })
}) })

View File

@ -999,7 +999,7 @@
"simulator.table.sub5": "枚数", "simulator.table.sub5": "枚数",
"simulator.table.sub6": "合計", "simulator.table.sub6": "合計",
"simulator.table.sub7": "パワーコンディショナー", "simulator.table.sub7": "パワーコンディショナー",
"simulator.table.sub8": "ティーン", "simulator.table.sub8": "",
"simulator.table.sub9": "予測発電量kWh", "simulator.table.sub9": "予測発電量kWh",
"simulator.notice.sub1": "ハンファジャパン年間発電量", "simulator.notice.sub1": "ハンファジャパン年間発電量",
"simulator.notice.sub2": "シミュレーションガイド", "simulator.notice.sub2": "シミュレーションガイド",
@ -1042,8 +1042,8 @@
"wall.line.not.found": "外壁がありません", "wall.line.not.found": "外壁がありません",
"roof.line.not.found": "屋根形状がありません", "roof.line.not.found": "屋根形状がありません",
"roof.material.can.not.delete": "割り当てられた配置面があります。", "roof.material.can.not.delete": "割り当てられた配置面があります。",
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다. (JA)",
"chidory.can.not.install": "千鳥配置できない工法です。", "chidory.can.not.install": "千鳥配置できない工法です。",
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다. (JA)",
"module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다. (JA)", "module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다. (JA)",
"module.place.mix.asg.yn.error": "혼합 설치가 불가능합니다. (JA)" "roofAllocation.not.found": "할당할 지붕이 없습니다. (JA)"
} }

View File

@ -1042,8 +1042,8 @@
"wall.line.not.found": "외벽선이 없습니다.", "wall.line.not.found": "외벽선이 없습니다.",
"roof.line.not.found": "지붕형상이 없습니다.", "roof.line.not.found": "지붕형상이 없습니다.",
"roof.material.can.not.delete": "할당된 배치면이 있습니다.", "roof.material.can.not.delete": "할당된 배치면이 있습니다.",
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다.",
"chidory.can.not.install": "치조 불가 공법입니다.", "chidory.can.not.install": "치조 불가 공법입니다.",
"module.layout.setup.max.count": "모듈의 최대 단수는 {0}, 최대 열수는 {1} 입니다.",
"module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다.", "module.layout.setup.max.count.multiple": "모듈 {0}번의 최대 단수는 {1}, 최대 열수는 {2} 입니다.",
"module.place.mix.asg.yn.error": "혼합 설치가 불가능합니다." "roofAllocation.not.found": "할당할 지붕이 없습니다."
} }

View File

@ -24,6 +24,10 @@
.ag-header-cell{ .ag-header-cell{
font-size: 13px; font-size: 13px;
color: #fff; color: #fff;
border-right: 1px solid #738596;
&:last-child{
border: none;
}
} }
.ag-header-cell-label{ .ag-header-cell-label{
justify-content: center; justify-content: center;

View File

@ -1,2 +1,2 @@
var exec = require('child_process').exec var exec = require('child_process').exec
exec('yarn dev', { windowsHide: true }) exec('yarn dev -p 5000', { windowsHide: true })