Merge branch 'qcast-pub' into dev
This commit is contained in:
commit
c2e77472d6
@ -604,7 +604,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
{tabNum === 2 && <StepUp {...stepUpProps} onInitialize={handleStepUpInitialize} />}
|
{tabNum === 2 && <StepUp {...stepUpProps} onInitialize={handleStepUpInitialize} />}
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && (
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && (
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="btn-frame modal mr5" onClick={() => onAutoRecommend()}>
|
<button className="btn-frame modal mr5 act" onClick={() => onAutoRecommend()}>
|
||||||
{getMessage('modal.circuit.trestle.setting.circuit.allocation.auto')}
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation.auto')}
|
||||||
</button>
|
</button>
|
||||||
<button className="btn-frame modal act" onClick={() => onPassivityAllocation()}>
|
<button className="btn-frame modal act" onClick={() => onPassivityAllocation()}>
|
||||||
@ -614,7 +614,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
)}
|
)}
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="btn-frame modal mr5" onClick={() => onClickPrev()}>
|
<button className="btn-frame modal mr5 " onClick={() => onClickPrev()}>
|
||||||
{getMessage('modal.common.prev')}
|
{getMessage('modal.common.prev')}
|
||||||
</button>
|
</button>
|
||||||
<button className="btn-frame modal act" onClick={() => setTabNum(2)}>
|
<button className="btn-frame modal act" onClick={() => setTabNum(2)}>
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||||
import { moduleStatisticsState } from '@/store/circuitTrestleAtom'
|
import { moduleStatisticsState } from '@/store/circuitTrestleAtom'
|
||||||
import { useRecoilValue, useResetRecoilState } from 'recoil'
|
import { useRecoilValue, useResetRecoilState } from 'recoil'
|
||||||
|
import { useModule } from '@/hooks/module/useModule'
|
||||||
|
import { useEavesGableEdit } from '@/hooks/roofcover/useEavesGableEdit'
|
||||||
|
|
||||||
export default function PanelBatchStatistics() {
|
export default function PanelBatchStatistics() {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -14,6 +16,11 @@ export default function PanelBatchStatistics() {
|
|||||||
y: 30,
|
y: 30,
|
||||||
})
|
})
|
||||||
const { header, rows, footer } = useRecoilValue(moduleStatisticsState)
|
const { header, rows, footer } = useRecoilValue(moduleStatisticsState)
|
||||||
|
const { setModuleStatisticsData } = useModule()
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setModuleStatisticsData()
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WithDraggable isShow={true} handle=".penal-wrap" pos={pos}>
|
<WithDraggable isShow={true} handle=".penal-wrap" pos={pos}>
|
||||||
|
|||||||
@ -311,7 +311,10 @@ export function useModule() {
|
|||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
moduleSetupSurface.set({ modules: [...moduleSetupSurface.modules, ...copyModules] })
|
||||||
}
|
}
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const moduleMultiCopy = (type, length, direction) => {
|
const moduleMultiCopy = (type, length, direction) => {
|
||||||
@ -385,6 +388,9 @@ export function useModule() {
|
|||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
moduleSetupSurface.set({ modules: [...moduleSetupSurface.modules, ...copyModules] })
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,6 +506,7 @@ export function useModule() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const moduleRowRemove = (type) => {
|
const moduleRowRemove = (type) => {
|
||||||
@ -615,6 +622,7 @@ export function useModule() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const moduleColumnInsert = (type) => {
|
const moduleColumnInsert = (type) => {
|
||||||
@ -710,6 +718,7 @@ export function useModule() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const muduleRowInsert = (type) => {
|
const muduleRowInsert = (type) => {
|
||||||
@ -807,6 +816,7 @@ export function useModule() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const alignModule = (type, surfaceArray) => {
|
const alignModule = (type, surfaceArray) => {
|
||||||
@ -879,6 +889,7 @@ export function useModule() {
|
|||||||
surface.set({ modules: modules })
|
surface.set({ modules: modules })
|
||||||
canvas.remove(activeModule)
|
canvas.remove(activeModule)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
|
setModuleStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const moduleRoofRemove = (surfaceArray) => {
|
const moduleRoofRemove = (surfaceArray) => {
|
||||||
@ -961,10 +972,11 @@ export function useModule() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const setModuleStatisticsData = () => {
|
const setModuleStatisticsData = () => {
|
||||||
|
if (selectedModules?.length === 0) return
|
||||||
const tempHeader = [
|
const tempHeader = [
|
||||||
{ name: getMessage('simulator.table.sub1'), prop: 'name' },
|
{ name: getMessage('simulator.table.sub1'), prop: 'name' },
|
||||||
{ name: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.circuit'), prop: 'circuit' },
|
{ name: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.circuit'), prop: 'circuit' },
|
||||||
...selectedModules.itemList.map((module) => {
|
...selectedModules?.itemList?.map((module) => {
|
||||||
return {
|
return {
|
||||||
name: module.itemNm,
|
name: module.itemNm,
|
||||||
prop: module.itemId,
|
prop: module.itemId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user