Merge pull request 'zhuhao_dev' (#34) from zhuhao_dev into main
Reviewed-on: #34
This commit is contained in:
commit
9384ca8035
|
@ -8,3 +8,13 @@ export const isHaveLocalFile = async (fileNewName)=>{
|
|||
})
|
||||
})
|
||||
}
|
||||
|
||||
export const parseCataByNode = (node) => {
|
||||
if (node.parentNode) {
|
||||
let arr = parseCataByNode(node.parentNode)
|
||||
arr.push(node.id)
|
||||
return arr
|
||||
} else {
|
||||
return [node.id]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ import FileListItem from '@/views/prepare/container/file-list-item.vue'
|
|||
import { getSmarttalkPage, moveSmarttalk } from '@/api/file'
|
||||
import { toTimeText } from '@/utils/date'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { isHaveLocalFile } from '@/utils/talkFile'
|
||||
import { isHaveLocalFile, parseCataByNode } from '@/utils/talkFile'
|
||||
import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue'
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
export default {
|
||||
|
@ -192,7 +192,7 @@ export default {
|
|||
id: ids.join(),
|
||||
textbookId: cataData.textBook.curBookId
|
||||
}
|
||||
let cata = this.parseCataByNode(cataData.node)
|
||||
let cata = parseCataByNode(cataData.node)
|
||||
if (
|
||||
this.uploadData.levelFirstId == cata[0] &&
|
||||
this.uploadData.levelSecondId == cata[1] &&
|
||||
|
@ -250,7 +250,7 @@ export default {
|
|||
nodeClick(data) {
|
||||
if (this.currentNode.id === data.node.id) return
|
||||
this.checkFileList = []
|
||||
let cata = this.parseCataByNode(data.node)
|
||||
let cata = parseCataByNode(data.node)
|
||||
this.currentNode = data.node
|
||||
this.uploadData.levelFirstId = cata[0]
|
||||
this.uploadData.levelSecondId = cata[1]
|
||||
|
@ -276,15 +276,6 @@ export default {
|
|||
console.log(res)
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
parseCataByNode(node) {
|
||||
if (node.parentNode) {
|
||||
let arr = this.parseCataByNode(node.parentNode)
|
||||
arr.push(node.id)
|
||||
return arr
|
||||
} else {
|
||||
return [node.id]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue