Compare commits

..

No commits in common. "e586755b75afe8dfd3b7db815962dcbe8c4e3748" and "d5833f6f038aa6163c1ed565502b6e18f80bca83" have entirely different histories.

3 changed files with 8 additions and 12 deletions

View File

@ -96,10 +96,8 @@ const changeBook = (data) => {
const emitChangeBook = async () => { const emitChangeBook = async () => {
let curData = cloneDeep(toRaw(curNode.data)) let curData = cloneDeep(toRaw(curNode.data))
let parentNode = findParentByChildId(treeData.value, curData.id) let parentNode = findParentByChildId(treeData.value, curNode.id)
curData.parentNode = toRaw(parentNode) curData.parentNode = toRaw(parentNode)
//label label
curData.label = curData.itemtitle
const data = { const data = {
textBook: { textBook: {
curBookId: curBook.data.id, curBookId: curBook.data.id,
@ -162,9 +160,7 @@ const handleNodeClick = (data, node) => {
* data : 当前节点数据 * data : 当前节点数据
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象 * node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
*/ */
let nodeData = cloneDeep(toRaw(data)); const nodeData = cloneDeep(toRaw(data));
//label label
nodeData.label = nodeData.itemtitle
const parentNode = node.parent.data; const parentNode = node.parent.data;
// parentNode // parentNode
if (Array.isArray(parentNode)) { if (Array.isArray(parentNode)) {
@ -173,7 +169,7 @@ const handleNodeClick = (data, node) => {
} }
else { else {
// parentNode // parentNode
nodeData.parentNode = toRaw(parentNode) nodeData.parentNode = parentNode
} }
let curData = { let curData = {

View File

@ -115,7 +115,7 @@ const updateForm = ref({})
watch( watch(
() => props.currentNode, () => props.currentNode,
(newValue, oldValue) => { (newValue, oldValue) => {
form.name = newValue.itemtitle form.name = newValue.label
} }
) )
const ruleForm = reactive({ const ruleForm = reactive({
@ -216,7 +216,7 @@ const openDialog = (data) => {
const closeDialog = () => { const closeDialog = () => {
ruleFormDialog.value.resetFields() ruleFormDialog.value.resetFields()
centerDialogVisible.value = false centerDialogVisible.value = false
form.name = props.currentNode.itemtitle form.name = props.currentNode.label
emit('close') emit('close')
} }

View File

@ -368,7 +368,7 @@ export default {
this.downloadNum = num this.downloadNum = num
}, },
createFile() { createFile() {
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => { creatPPT(this.currentNode.label + '.pptx', this.uploadData).then((res) => {
this.currentFileList.unshift(res.resData) this.currentFileList.unshift(res.resData)
}) })
}, },
@ -448,7 +448,7 @@ export default {
creatAPT({ creatAPT({
...this.uploadData, ...this.uploadData,
fileId: slideid, fileId: slideid,
fileShowName: this.currentNode.itemtitle + '.apt' fileShowName: this.currentNode.label + '.apt'
}).then((res) => { }).then((res) => {
this.currentFileList.unshift(res.resData) this.currentFileList.unshift(res.resData)
}) })
@ -665,7 +665,7 @@ export default {
'/tool/sphere?entpcourseid=' + '/tool/sphere?entpcourseid=' +
this.entpcourseid + this.entpcourseid +
'&label=' + '&label=' +
this.currentNode.itemtitle + this.currentNode.label +
'&reservId=' + '&reservId=' +
id id
}) })