Commit 3800a25a authored by shj's avatar shj

[DEL] 미사용 코드 삭제

parent d9892858
...@@ -362,7 +362,7 @@ export default{ ...@@ -362,7 +362,7 @@ export default{
}) })
if(el.children.length > 0){ if(el.children.length > 0){
this.setEditModeChildren(el.children, unclassifiedList) this.setTreeChild(el.children, unclassifiedList)
} }
}) })
}, },
...@@ -372,41 +372,6 @@ export default{ ...@@ -372,41 +372,6 @@ export default{
this.$store.commit('setEditMode', true) this.$store.commit('setEditMode', true)
} }
}, },
createEditModeList(){
let unclassifiedList = JSON.parse(JSON.stringify(this.rawIndexList));
this.editModeList = []
this.editModeRemainList = []
// depth 1 리스트 생성
unclassifiedList.forEach(index => {
if(index.depth === 1){
this.editModeList.push(index)
delete unclassifiedList[unclassifiedList.indexOf(index)]
}
})
// depth 2 이상인 인덱스들 트리구조 생성
this.setEditModeChildren(this.editModeList, unclassifiedList)
unclassifiedList = unclassifiedList.filter(el => el) // empty 값 삭제
this.editModeRemainList = unclassifiedList
},
setEditModeChildren(targetList, unclassifiedList){
targetList.forEach(el => {
el.children = []
unclassifiedList.forEach(ucsfEl => {
if(ucsfEl.path.indexOf(el.path) > -1 && ucsfEl.depth === el.depth + 1){
el.children.push(ucsfEl)
delete unclassifiedList[unclassifiedList.indexOf(ucsfEl)]
}
})
if(el.children.length > 0){
this.setEditModeChildren(el.children, unclassifiedList)
}
})
},
setEditTarget(item){ setEditTarget(item){
this.formData = item this.formData = item
this.editFormMethod = '수정' this.editFormMethod = '수정'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment