diff --git a/src/views/equipmentCenter/videoManage/videoConfig.vue b/src/views/equipmentCenter/videoManage/videoConfig.vue index 4a13f423..c0ac3ec3 100644 --- a/src/views/equipmentCenter/videoManage/videoConfig.vue +++ b/src/views/equipmentCenter/videoManage/videoConfig.vue @@ -2237,12 +2237,31 @@ export default { this.addGroupDialog = true; this.addGroupForm = JSON.parse(JSON.stringify(item)); this.$nextTick(() => { - if (this.addGroupForm.parentObj) { - this.selectVal = JSON.parse(this.addGroupForm.parentObj).groupName; + const find = this.findNodeById(this.videoTreeData, item.parentId); + if(find) { + this.selectVal = find.groupName; this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId); } + // if (this.addGroupForm.parentObj) { + // this.selectVal = JSON.parse(this.addGroupForm.parentObj).groupName; + // this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId); + // } }); }, + findNodeById(node, id) { + const find = node.find((item) => item.id === id); + if (find) { + return find; + } + for (let child of node) { + if (child.children && child.children.length > 0) { + const found = this.findNodeById(child.children, id); + if (found) return found; + } + } + + return null; + }, deleteGroupFn(item) { // 确定删除分组 this.$confirm( @@ -2607,17 +2626,23 @@ export default { ? obj.enterpriseIds.split(",") : []; this.$nextTick(() => { - if (this.currentVideoTypeDetail.parentObj) { - this.selectFormVal = JSON.parse( - this.currentVideoTypeDetail.parentObj - ).groupName; - this.selectFormTreeData = JSON.parse( - this.currentVideoTypeDetail.parentObj - ); - this.$refs.groupFormTree.setCurrentKey( - this.currentVideoTypeDetail.parentId - ); + const find = this.findNodeById(this.videoTreeData, obj.groupId); + if(find) { + this.selectFormVal = find.groupName; + this.$refs.groupTree.setCurrentKey(this.currentVideoTypeDetail.groupId); } + + // if (this.currentVideoTypeDetail.parentObj) { + // this.selectFormVal = JSON.parse( + // this.currentVideoTypeDetail.parentObj + // ).groupName; + // this.selectFormTreeData = JSON.parse( + // this.currentVideoTypeDetail.parentObj + // ); + // this.$refs.groupFormTree.setCurrentKey( + // this.currentVideoTypeDetail.parentId + // ); + // } }); console.log("编辑内容", obj); }, diff --git a/src/views/projectFront/workTicketManage/homeworkControlProcess.vue b/src/views/projectFront/workTicketManage/homeworkControlProcess.vue index a7de2532..509b9903 100644 --- a/src/views/projectFront/workTicketManage/homeworkControlProcess.vue +++ b/src/views/projectFront/workTicketManage/homeworkControlProcess.vue @@ -1390,6 +1390,7 @@ export default { } }, onExamineClick(row) { + console.log(112233, row) this.workTicketId = row.id; this.getWorkTicketQueryById(); this.getWorkTicketHistoryList(); @@ -1700,8 +1701,10 @@ export default { }); }, onChangeState(operateStatus) { + console.log(55555, this.workTicketId); + const workTicketId = this.workTicketId; let data = { - id: this.workTicketId, + id: workTicketId, projectSn: this.projectSn, operateStatus, }; @@ -1711,8 +1714,10 @@ export default { this.initWorkTicketClose(); this.getWorkTicketList(); this.getWorkTicketCountWorkTicket(); + console.log(44444, workTicketId); + this.onExamineClick({ - id: this.workTicketId, + id: workTicketId, }); } });