Compare commits
9 Commits
d5833f6f03
...
e586755b75
Author | SHA1 | Date |
---|---|---|
lyc | e586755b75 | |
lyc | ef771f4e0b | |
朱浩 | 049768c8b6 | |
朱浩 | ac599a2c39 | |
lyc | 00871797bf | |
lyc | fa7a44472b | |
lyc | 85529ad81f | |
lyc | f9a87143aa | |
zhengdegang | 17ef183741 |
|
@ -96,8 +96,10 @@ const changeBook = (data) => {
|
|||
|
||||
const emitChangeBook = async () => {
|
||||
let curData = cloneDeep(toRaw(curNode.data))
|
||||
let parentNode = findParentByChildId(treeData.value, curNode.id)
|
||||
let parentNode = findParentByChildId(treeData.value, curData.id)
|
||||
curData.parentNode = toRaw(parentNode)
|
||||
//怎加一个label 之前取的label
|
||||
curData.label = curData.itemtitle
|
||||
const data = {
|
||||
textBook: {
|
||||
curBookId: curBook.data.id,
|
||||
|
@ -160,7 +162,9 @@ const handleNodeClick = (data, node) => {
|
|||
* data : 当前节点数据
|
||||
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
||||
*/
|
||||
const nodeData = cloneDeep(toRaw(data));
|
||||
let nodeData = cloneDeep(toRaw(data));
|
||||
//怎加一个label 之前取的label
|
||||
nodeData.label = nodeData.itemtitle
|
||||
const parentNode = node.parent.data;
|
||||
// parentNode 为数组 则点击的是一级节点
|
||||
if (Array.isArray(parentNode)) {
|
||||
|
@ -169,7 +173,7 @@ const handleNodeClick = (data, node) => {
|
|||
}
|
||||
else {
|
||||
// 否则 点击的为二级节点 parentNode 为它的父级节点
|
||||
nodeData.parentNode = parentNode
|
||||
nodeData.parentNode = toRaw(parentNode)
|
||||
}
|
||||
|
||||
let curData = {
|
||||
|
|
|
@ -115,7 +115,7 @@ const updateForm = ref({})
|
|||
watch(
|
||||
() => props.currentNode,
|
||||
(newValue, oldValue) => {
|
||||
form.name = newValue.label
|
||||
form.name = newValue.itemtitle
|
||||
}
|
||||
)
|
||||
const ruleForm = reactive({
|
||||
|
@ -216,7 +216,7 @@ const openDialog = (data) => {
|
|||
const closeDialog = () => {
|
||||
ruleFormDialog.value.resetFields()
|
||||
centerDialogVisible.value = false
|
||||
form.name = props.currentNode.label
|
||||
form.name = props.currentNode.itemtitle
|
||||
emit('close')
|
||||
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@ export default {
|
|||
this.downloadNum = num
|
||||
},
|
||||
createFile() {
|
||||
creatPPT(this.currentNode.label + '.pptx', this.uploadData).then((res) => {
|
||||
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
|
||||
this.currentFileList.unshift(res.resData)
|
||||
})
|
||||
},
|
||||
|
@ -448,7 +448,7 @@ export default {
|
|||
creatAPT({
|
||||
...this.uploadData,
|
||||
fileId: slideid,
|
||||
fileShowName: this.currentNode.label + '.apt'
|
||||
fileShowName: this.currentNode.itemtitle + '.apt'
|
||||
}).then((res) => {
|
||||
this.currentFileList.unshift(res.resData)
|
||||
})
|
||||
|
@ -665,7 +665,7 @@ export default {
|
|||
'/tool/sphere?entpcourseid=' +
|
||||
this.entpcourseid +
|
||||
'&label=' +
|
||||
this.currentNode.label +
|
||||
this.currentNode.itemtitle +
|
||||
'&reservId=' +
|
||||
id
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue