diff --git a/src/components/360View/collection.vue b/src/components/360View/collection.vue index 240dc37..2bf8ee5 100644 --- a/src/components/360View/collection.vue +++ b/src/components/360View/collection.vue @@ -2,17 +2,17 @@
个人收藏
- 新增节点 + 新增节点 - + - {{ node.label }} + {{ data.name }} @@ -131,8 +131,7 @@ export default { platform: this.platform } }) - console.log('树结构', data) - // this.tableData = data + this.collectData = data.data }, // 或者详情目录结构包含或者备注信息 // async patientTrees() { @@ -147,7 +146,6 @@ export default { // }, levelClick(data) { this.curId = data.id - console.log(this.curId) }, searchRemark(data) { // this.treeId = data.id @@ -172,27 +170,28 @@ export default { }) }, // 新增节点 - addNode(command, node) { + addNode(command, node, data) { this.editMessage = '添加成功!' + console.log(data) this.disabled = false switch (command) { // 新建同级节点 case 'same': this.dialogFormVisible = true - this.addParam.id = node.id - this.addParam.parentId = node.parent.id + this.addParam.id = '' + this.addParam.parentId = data.parentId this.editName = node.name break // 新建子级节点 case 'child': this.dialogFormVisible = true - this.addParam.id = node.id - this.addParam.parentId = node.parent.id + this.addParam.id = '' + this.addParam.parentId = data.id this.editName = node.name break // 初始新增 default: - this.addParam.id = 0 + this.addParam.id = '' this.addParam.parentId = 0 this.editName = '' break @@ -201,12 +200,11 @@ export default { // 确定新增节点 async confirmNode() { const params = { - createDate: new Date().getDate(), + createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), doctorId: this.doctorId, flag: '1', name: this.editName, platform: this.platform, - weight: 1, ...this.addParam } this.disabled = true @@ -234,7 +232,7 @@ export default { name: data.label, platform: this.platform, weight: 1, - ...this.addParam + id: this.curId } this.$http.post('/tree/deleteTree', params).then(() => { this.$message({