From 89bab3da881a3d37ae8ac12ab7cae9ecc20e35ea Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Tue, 21 Mar 2023 10:49:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=97=85=E4=BE=8B=E6=94=B6=E9=9B=86=E5=BE=85?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/360View/collection.vue | 30 +++++++++++++-------------- 1 file changed, 14 insertions(+), 16 deletions(-) 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({