el-tree结合el-switch实现状态切换

<template><div><el-col :span="24"><el-card class="tree-card"><div class="sketch_content selectFile"><span class="span_title">组织列表 </span><div style="display: flex; justify-content: flex-end; width: 55vw"><divstyle="display: flex; align-items: center; margin-right: 1.5vw"><el-radio-group v-model="filterType" @change="radioChange"><el-radio :label="'all'">显示全部</el-radio><el-radio :label="'on'">只显示开启</el-radio><el-radio :label="'off'">只显示关闭</el-radio></el-radio-group></div><el-button type="primary" size="small" @click="oneClickEnables">一键启用</el-button></div><el-treestyle="margin-top: 20px; width: 55vw":data="organizationTreeData"node-key="id"default-expand-all:expand-on-click-node="false"v-if="organizationTreeData.length !== 0 && organizationTreeData !== ''"draggable@node-click="getOrganizationList"@drag-start="handleDragStart"@allow-drop="allowDrop"@drag-end="handleDragEnd"@node-drop="handleNodeDrop"@allow-drag="allowDrag"><span class="custom-tree-node" slot-scope="{ node, data }"><span>{{ node.label }}</span><divv-if="data.type !== 1"style="display: flex;justify-content: center;align-items: center;"><el-buttontype="text"icon="el-icon-plus"class="edit"@click="showOrganizationDialog"></el-button><el-tooltipclass="item"effect="dark"content="修改组织"placement="top"><el-buttontype="text"@click="() => showEditOrganizationDialog(data)"icon="el-icon-edit"class="edit"style="margin-right: 2vw"></el-button></el-tooltip><el-switchslot="reference"style="display: block"v-model="node.data.organizeStatus"active-color="#13ce66"inactive-color="#cccccc":active-value="0":inactive-value="1"active-text="启用"inactive-text="禁用"@change="statusChange(node)"></el-switch></div></span></el-tree><divv-if="organizationTreeData.length == 0 || organizationTreeData == ''"><el-empty description="暂无组织" /><el-buttontype="primary"size="small"@click="showDialog"v-if="add">添加组织</el-button></div></div></el-card></el-col><el-dialogwidth="580px":visible.sync="addOrganizationDialogVisible":close-on-click-modal="false"@close="closeOrganizationTreeDialog"><div class="addOrganizationDialog"><span>新增组织</span></div><el-divider class="dialog_divider"></el-divider><el-form:model="organizationForm"ref="addFileBackupTaskForm"label-width="100px"style="height: auto"><el-form-item label="组织代码:" style="margin-left: -19px"><el-inputv-model="organizationForm.id"size="mini"style="width: 200px; margin-left: -170px"></el-input></el-form-item><el-form-item label="上级组织:" style="margin-left: -19px"><el-inputv-model="organizationForm.lead"size="mini"style="width: 200px; margin-left: -170px"></el-input></el-form-item><el-form-itemlabel="组织名称:"prop="fileIp"style="margin-left: -19px"><el-inputv-model="organizationForm.organizationName"placeholder="请输入组织名称"size="mini"style="width: 200px; margin-left: -170px"></el-input></el-form-item><!-- <el-form-itemlabel="上级组织:"prop="fileIp"style="margin-left: -19px"><el-selectplaceholder="请选择上级组织"style="width: 200px; margin-left: -170px"size="mini"><el-option label="部门1" value="0"></el-option><el-option label="部门2" value="1"></el-option><el-option label="生态单位1" value="2"></el-option></el-select></el-form-item> --><el-form-itemlabel="组织类型:"prop="fileType"style="margin-left: -19px"><el-selectstyle="width: 200px; margin-left: -170px"v-model="value1"@change="select"><el-optionv-for="item in options1":key="item.value":label="item.label":value="item.value"></el-option></el-select></el-form-item></el-form><el-divider></el-divider><div class="dialogClose"><el-button @click="closeOrganizationTreeDialog">取消</el-button><el-button type="primary" @click="addOrganization">确定</el-button></div></el-dialog><el-dialogwidth="580px":visible.sync="visible":close-on-click-modal="false"@close="closeOrganizationTreeDialog"><div class="addOrganizationDialog"><span>新增组织</span></div><el-divider class="dialog_divider"></el-divider><el-form:model="organizationForm"ref="addFileBackupTaskForm"label-width="100px"style="height: auto"><el-form-itemlabel="组织名称:"prop="fileIp"style="margin-left: -19px"><el-inputv-model="organizationForm.organizationName"placeholder="请输入组织名称"size="mini"style="width: 200px; margin-left: -170px"></el-input></el-form-item><el-form-itemlabel="组织类型:"prop="fileType"style="margin-left: -19px"><el-selectstyle="width: 200px; margin-left: -170px"v-model="value1"@change="select"><el-optionv-for="item in options1":key="item.value":label="item.label":value="item.value"></el-option></el-select></el-form-item></el-form><el-divider></el-divider><div class="dialogClose"><el-button @click="closeOrganizationTreeDialog">取消</el-button><el-button type="primary" @click="addOrganization1">确定</el-button></div></el-dialog><!--    组织修改模块--><el-dialogwidth="580px":visible.sync="editOrganizationDialogVisible":close-on-click-modal="false"@close="closeEditOrganizationDialog"><div class="addOrganizationDialog"><span>修改组织</span></div><el-divider class="dialog_divider"></el-divider><el-form:model="organizationForm"ref="addFileBackupTaskForm"label-width="100px"style="height: auto"><el-form-item label="组织名称" prop="fileIp" style="margin-left: -19px"><el-inputv-model="organizationForm.organizationName"placeholder="请输入组织名称"size="mini"style="width: 200px; margin-left: -170px"></el-input></el-form-item><el-form-itemlabel="组织类型"prop="fileType"style="margin-left: -19px"><el-selectv-model="value"style="width: 200px; margin-left: -170px":placeholder="placeholder"@change="change"><el-optionv-for="item in options":key="item.value":label="item.label":value="item.value"></el-option></el-select></el-form-item></el-form><el-divider></el-divider><div class="dialogClose"><el-button @click="closeEditOrganizationDialog">取消</el-button><el-button type="primary" @click="editOrganization">确定</el-button></div></el-dialog></div>
</template><script>
import {getOrganizeList,restartOrganize,forbiddenOrganize,editOrganize,addOrganize,changeOrganize,oneClickEnable,
} from '@/api/index'
let id = 1000export default {name: 'OrganizeMaintain',data() {return {value: '',see: true,placeholder: '请选择',add: true,options: [{ value: 0, label: '集团' },{ value: 1, label: '子集团' },{ value: 2, label: '公司' },{ value: 3, label: '部门' },{ value: 4, label: '生态单位' },],options1: [{ value: 0, label: '集团' },{ value: 1, label: '子集团' },{ value: 2, label: '公司' },{ value: 3, label: '部门' },{ value: 4, label: '生态单位' },],organizationTreeData: [],sectionList: [{id: 1,name: '部门1',},{id: 2,name: '部门2',},{id: 3,name: '部门3',},{id: 4,name: '生态单位',},],userList: [{id: 1,username: 'zzn',},],sectionUserList: [{id: 1,name: '用户1',},{id: 2,name: '用户2',},{id: 3,name: '用户3',},],addOrganizationDialogVisible: false,organizationForm: {organizationName: '',id: '',lead: '',},addTopOrganizationDialogVisible: false,// 节点的dataorganizationDialogData: '',editOrganizationDialogVisible: false,listTitle: '',data: [],type: 'text',node: '',organizeType: '',value1: '',addOrganizeType: '',draggedNode: null,visible: false,filterType: 'all',}},mounted() {this.getOrganizationList()getOrganizeList({ viewType: 2 })},methods: {async radioChange(value) {if (value == 'on') {this.add = falseconst res = await getOrganizeList({ viewType: 0 })this.organizationTreeData = [res.data.data[0]]} else if (value == 'off') {this.add = falseconst res = await getOrganizeList({ viewType: 1 })this.organizationTreeData = []this.organizationTreeData = [].concat(...res.data.data)console.log(this.organizationTreeData)} else {const res = await getOrganizeList({ viewType: 2 })this.organizationTreeData = [res.data.data[0]]}},getOrganizationList(data, node) {this.data = datathis.node = node// this.listTitle = data.label// }},showOrganizationDialog() {setTimeout(() => {this.organizationForm.id = this.node.data.idthis.organizationForm.lead = this.node.data.label})// this.organizationForm.id = this.node.parent.data.id// this.organizationForm.lead = this.node.parent.data.labelthis.addOrganizationDialogVisible = true},closeOrganizationTreeDialog() {this.addOrganizationDialogVisible = falsethis.visible = falsethis.organizationForm.organizationName = ''this.organizationForm.id = ''this.organizationForm.lead = ''this.value = ''this.value1 = ''},showEditOrganizationDialog() {this.editOrganizationDialogVisible = truesetTimeout(() => {this.organizationForm.organizationName = this.data.labelif (this.data.organizeType == 0) {this.placeholder = '集团'} else if (this.data.organizeType == 1) {this.placeholder = '子集团'} else if (this.data.organizeType == 2) {this.placeholder = '公司'} else if (this.data.organizeType == 3) {this.placeholder = '部门'} else if (this.data.organizeType == 4) {this.placeholder = '生态单位'}}, 0)},showDialog() {this.visible = true},closeEditOrganizationDialog() {this.editOrganizationDialogVisible = falsethis.organizationForm.organizationName = ''},// 新增组织async addOrganization() {const organizeName = this.organizationForm.organizationNameconst parentOrganize = this.organizationForm.idlet organizeType = this.addOrganizeTypeif (organizeType == '集团') {organizeType = 0} else if (organizeType == '子集团') {organizeType = 1} else if (organizeType == '公司') {organizeType = 2} else if (organizeType == '部门') {organizeType = 3} else if (organizeType == '生态单位') {organizeType = 4}addOrganize({organizeName,parentOrganize,organizeType,}).then((res) => {if (res.data.status == 200) {this.$message({message: res.data.message,type: 'success',})} else {this.$message({message: res.data.message,type: 'error',})}const newChild = {id: id++,label: this.organizationForm.organizationName,children: [],}this.data.children.push(newChild)getOrganizeList({ viewType: 2 }).then((res) => (this.organizationTreeData = [res.data.data[0]]))this.organizationForm.organizationName = ''this.value1 = ''this.value = ''this.organizationForm.id = ''this.organizationForm.lead = ''this.organizeType = ''this.addOrganizationDialogVisible = false})},async addOrganization1() {const organizeName = this.organizationForm.organizationNameconst parentOrganize = this.organizationForm.idlet organizeType = this.addOrganizeTypeif (organizeType == '集团') {organizeType = 0} else if (organizeType == '子集团') {organizeType = 1} else if (organizeType == '公司') {organizeType = 2} else if (organizeType == '部门') {organizeType = 3} else if (organizeType == '生态单位') {organizeType = 4}const res = await addOrganize({organizeName,parentOrganize,organizeType,})const newChild = {id: id++,label: this.organizationForm.organizationName,children: [],}this.data = []this.data.push(newChild)const res1 = await getOrganizeList({ viewType: 2 })this.organizationTreeData = [res1.data.data[0]]this.visible = false// this.organizationForm.organizationName = ''// this.value = ''// this.organizationForm.id = ''// this.organizationForm.lead = ''},// 组织修改async editOrganization() {this.editOrganizationDialogVisible = falseconst id = this.data.idconst organizeName = this.organizationForm.organizationNameconst organizeType = this.organizeTypethis.data.label = this.organizationForm.organizationNameeditOrganize({ id, organizeName, organizeType }).then((res) => {if (res.data.status === 200) {this.$message({message: res.data.message,type: 'success',})} else {this.$message({message: res.data.message,type: 'error',})}})const res1 = await getOrganizeList({ viewType: 2 })this.organizationTreeData = [res1.data.data[0]]},// 组织停用启用async statusChange(node) {setTimeout(() => {const organizeId = this.node.data.idconst organizeName = this.node.data.organizeNameconsole.log(node.data.organizeStatus)if (this.node.data.organizeStatus == 0) {restartOrganize({ organizeId, organizeName }).then((res) => {if (res.data.status == 200) {this.$message({message: res.data.message,type: 'success',})} else {this.$message({message: res.data.message,type: 'error',})}getOrganizeList({ viewType: 2 }).then((res) => {console.log(res.data.data[0])this.organizationTreeData = [res.data.data[0]]})})} else {forbiddenOrganize({ organizeId, organizeName }).then((res) => {if (res.data.status == 200) {this.$message({message: res.data.message,type: 'success',})} else {this.$message({message: res.data.message,type: 'error',})}getOrganizeList({ viewType: 2 }).then((res) => {this.organizationTreeData = [res.data.data[0]]})})}}, 0)},getSwitchValue(node) {// Convert numeric value to booleanreturn node.data.organizeStatus},oneClickEnables() {oneClickEnable().then((res) => {if (res.data.status == 200) {this.$message({message: res.data.message,type: 'success',})getOrganizeList({ viewType: 2 }).then((res) => {console.log(res.data.data[0])this.organizationTreeData = [res.data.data[0]]})} else {this.$message({message: res.data.message,type: 'error',})}})},// 获取修改组织类型change() {const selectedLabel = this.options.find((item) => item.value === this.value)?.valuethis.organizeType = selectedLabel},// 获取新增组织类型select() {const selectedLabel = this.options1.find((item) => item.value === this.value1)?.labelthis.addOrganizeType = selectedLabel},// 拖拽节点事件handleDragStart(draggingNode) {// 在拖拽开始时检查节点位置// 如果拖拽的节点是顶层节点并且已经有一个顶层节点存在,禁止拖拽if (draggingNode.level === 1 && this.hasTopLevelNode()) {this.draggable = false} else {this.draggable = true}},// 检查是否已经有一个顶层节点hasTopLevelNode() {return this.organizationTreeData.some((node) => node.level === 1)},handleDragEnd() {this.draggable = true},// 允许拖拽的条件allowDrop(draggingNode, dropNode, type) {// 如果拖拽的节点是顶层节点,不允许放置if (draggingNode.level === 1) {return false}// 如果拖拽的节点不是顶层节点但目标节点是顶层节点的同级,不允许放置if (draggingNode.level > 1 && dropNode.level === 1) {return false}// 其他情况允许放置return true},allowDrag(draggingNode, dropNode, type) {// 如果拖拽的节点是顶层节点,不允许放置// if (draggingNode.level === 1) {// 	return false// }// 如果拖拽的节点不是顶层节点但目标节点是顶层节点的同级,不允许放置// if (draggingNode.level > 1 && dropNode.level === 1) {// 	return false// }// 其他情况允许放置// return true},handleNodeDrop(draggingNode, dropNode, type) {// 在这里可以获取拖拽后节点的父节点const parentNode = dropNode.parentconst currentOrganize = draggingNode.data.idconst targetOrganize = dropNode.data.idchangeOrganize({ currentOrganize, targetOrganize })},},watch: {// 监听拖拽后节点的变化draggedNode(newNode) {if (newNode) {// 这里可以访问拖拽后节点的父节点const parentNode = newNode.parent}},},computed: {filteredOrganizationTreeData() {// Filter out nodes with organizeStatus !== 0 (禁用)return this.organizationTreeData.filter((node) => {return node.data.organizeStatus === 0})},},async created() {const res = await getOrganizeList({ viewType: 2 })this.organizationTreeData = [res.data.data[0]]console.log([res.data.data[0]])},
}
</script><style scoped lang="scss">
.edit {width: 5vw;
}
.custom-tree-node {flex: 1;display: flex;align-items: center;justify-content: space-between;/*font-size: 15px;*/padding-right: 8px;
}.selectFile {line-height: 19px;
}.tree-card {overflow-y: auto; /* 开启滚动显示溢出内容 */width: 90%;height: 80vh;margin-left: 4vw;overflow-x: auto;
}/*滚动条样式*/
::-webkit-scrollbar {width: 6px;
}::-webkit-scrollbar-thumb {background-color: #40b8ff;border-radius: 3px;
}.el-tree-node__label {font-size: 50px;
}.list-card {overflow-y: auto; /* 开启滚动显示溢出内容 */width: 98%;height: 80vh;
}/* 查询*/
.select-organization {margin-top: -33px;display: flex;justify-content: right;line-height: 30px;
}.findButton,
.reset {margin-top: 58px;height: 40px;width: 8%;
}.selectEvent {margin-right: 30px;margin-top: 58px;
}.list-span {font-family: 微软雅黑;font-size: 20px;height: 100px;font-weight: bold;color: #525252;display: flex;line-height: 100px;
}::v-deep .el-collapse-item__header {font-size: 17px;font-weight: bold;
}.addOrganizationDialog {font-size: 20px;text-align: left;margin-top: -105px;
}.dialog_divider {margin-top: -50px;
}.dialogClose {text-align: right;margin-top: -75px;margin-bottom: -80px;
}.span_title {display: flex;justify-content: space-between;flex-wrap: wrap;color: #222222;font-size: 17px;font-weight: bold;
}/*解决table展开时高度异常问题*/
::v-deep .el-table__header {width: 100% !important;
}::v-deep .el-table__body {width: 100% !important;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/200222.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【ARM Trace32(劳特巴赫) 使用介绍 2.3 -- TRACE32 进阶命令之 参数传递介绍】

请阅读【ARM Coresight SoC-400/SoC-600 专栏导读】 文章目录 参数传递命令 ENTRY 参数传递命令 ENTRY ENTRY <parlist>The ENTRY command can be used to Pass parameters to a PRACTICE script or to a subroutineTo return a value from a subroutine 使用示例&am…

基于人工大猩猩部队算法优化概率神经网络PNN的分类预测 - 附代码

基于人工大猩猩部队算法优化概率神经网络PNN的分类预测 - 附代码 文章目录 基于人工大猩猩部队算法优化概率神经网络PNN的分类预测 - 附代码1.PNN网络概述2.变压器故障诊街系统相关背景2.1 模型建立 3.基于人工大猩猩部队优化的PNN网络5.测试结果6.参考文献7.Matlab代码 摘要&a…

前端入门(二)Vue2到Vue3

文章目录 Vue简介Vue的特点Hello, Vue Vue基本语法模板语法数据绑定&#xff08;v-bind、v-model&#xff09;el与data的两种写法 数据代理实现原理Object.defineProperty()数据代理 事件处理&#xff08;v-on:click / click&#xff09;事件修饰符键盘事件&#xff08;略&…

多项式求和

题目描述 给定程序中 fun 函数的功能是&#xff1a;求出以下分数序列的前 n 项之和&#xff0c;并通过函数值返回 main 函数。 输入格式 输入参数。 输出格式 计算公式返回的结果。 输入输出样例 输入1 5 输出1 8.391667 python解&#xff1a; def fun(n):a1b2s0for…

Jmeter监听器

Jmeter监听器 一、监听器介绍二、监听器的类型三、监听器详解3.1 察看结果树3.2 Summary Report3.3 聚合报告3.4 后端监听器3.5 Aggregate Graph3.6 Comparison Assertion Visualizer&#xff08;比较断言可视化器&#xff09;3.7 JSR223 Listener3.8 Response Time Graph3.9 S…

关于Unity Time.deltaTime的理解和使用

Unity中的Time.deltaTime是一个表示上一帧到当前帧所用时间的浮点数。 它可以让Unity应用程序能够以平滑的方式在不同的帧率下运行。 要深刻理解Time.deltaTime&#xff0c;首先得了解Unity引擎得工作原理。 Unity引擎以每秒帧数&#xff08;FPS&#xff09;的形式运行。 比…

Spring Boot单元测试

目录 1.概述 2.基本使用 3.优势 4.常用属性 1.概述 所谓单元测试就是对功能最小粒度的测试&#xff0c;落实到JAVA中就是对单个方法的测试。对单个方法的测试用junit即可&#xff0c;关于junit作者另一位篇文章中有详细介绍&#xff0c;感兴趣的小伙伴可以去看看&#xff…

跳台阶游戏(Python排列组合函数itertools.combinations的应用)

给定台阶总数和两种单次可跳级数&#xff0c;编写自定义函数&#xff0c;计算所有的游戏组合方案数量。 (笔记模板由python脚本于2023年11月19日 19:18:48创建&#xff0c;本篇笔记适合熟悉python自定义函数编写&#xff0c;了解排列组合知识的coder翻阅) 【学习的细节是欢悦的…

Es 拼音搜索无法高亮

目录 背景&#xff1a; Es 版本&#xff1a; 第一步 第二步 &#xff08;错误步骤 - 只是记录过程&#xff09; 第三步 第四步 第五步 第六步 第七步 背景&#xff1a; app 原有的搜索功能无法进行拼音搜索&#xff0c;产品希望可以支持&#xff0c;例如内容中含有&a…

Linux难学?大神告诉你,Linux到底该怎么自学!

文章目录 Part.1Part.2Part.3写作末尾 知乎上有一条热门问答&#xff0c;问题是“Linux为什么那么难&#xff1f;” 从问题来看&#xff0c;提问者还处在初学阶段。但他显然受困于 Linux 环境基本操作的问题&#xff0c;对操作系统本身的原理还不熟悉&#xff0c;并且对命令行工…

计算机毕业设计选题推荐-个人博客微信小程序/安卓APP-项目实战

✨作者主页&#xff1a;IT毕设梦工厂✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Py…

计算机毕业设计 基于SpringBoot的社区物资交易互助平台/系统的设计与实现 Java实战项目 附源码+文档+视频讲解

博主介绍&#xff1a;✌从事软件开发10年之余&#xff0c;专注于Java技术领域、Python人工智能及数据挖掘、小程序项目开发和Android项目开发等。CSDN、掘金、华为云、InfoQ、阿里云等平台优质作者✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精…

Linux 时区设置

对于服务器来说&#xff0c;linux的时区影响着运行之上的数据库和后端程序的时区 应该和数据库和后端及其他程序的时区保持一致 其他相关时区的设置 pgsql时区设置&#xff1a; php时区设置&#xff1a; 1.显示当前的时间和时区 date结果类似下面&#xff0c;图中显示的是ut…

Mybatis Plus分页实现逻辑整理(结合芋道整合进行解析)

Mybatis Plus分页实现逻辑整理&#xff08;结合芋道整合进行解析&#xff09; 我希望如春天般的你&#xff0c;身着白色的婚纱&#xff0c;向我奔赴而来&#xff0c;我愿意用全世界最温情的目光&#xff0c;朝着你的方向望去——姗姗来迟。 1.背景介绍 https://baomidou.com/p…

【监控系统】日志可视化监控体系ELK搭建

1.ELK架构是什么 ELK是ElasticsearchLogstashKibana的简称。 Elasticsearch是一个开源的分布式搜索和分析引擎&#xff0c;可以用于全文检索、结构化检索和分析&#xff0c;它构建在Lucene搜索引擎库之上&#xff0c;是当前使用较为广泛的开源搜索引擎之一。 Logstash是一个…

风电场数字孪生-升压站BIM三维模型-obj格式

简介&#xff1a; 风电场中的升压站三维模型&#xff0c;obj格式&#xff0c;采用BIM技术建模&#xff0c;可应用于风电场三维数字孪生领域&#xff0c;用于对升压站进行漫游浏览&#xff1b;三维可视化场景应用&#xff1b;风电场三维设计模型。 下载地址 风电场数字孪生-升…

【hive-解决】HiveAccessControlException Permission denied: CREATEFUNCTION

文章目录 一.任务描述二. 解决 一.任务描述 Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [nameroot, typeUSER] does not have following privileges for operation CREATEFUNCTION [ADMIN PRIVILEGE on INPUT, ADMIN…

ajax,axios,fetch

文章目录 ajax工作原理ajax发请求四个步骤创建xmlhttprequest对象设置请求方式设置回调函数发送请求 自封装ajax axiosaxios 特性如何用配置拦截器 fetch三者区别 ajax 工作原理 Ajax的工作原理相当于在用户和服务器之间加了—个中间层(AJAX引擎)&#xff0c;使用户操作与服务…

【Linux】:进程间通信和日志模拟

进程间通信 一.基本概念二.简单的通信-管道(匿名管道)1.建立通信信道2.通信接口 三.命名管道三.模拟命名管道通信&#xff08;加上日志&#xff09;1.完整代码2.基本使用 一.基本概念 是什么 两个或多个进程实现数据层面的交互。 因为进程独立性的存在&#xff0c;导致进程间…

Deep Learning for Monocular Depth Estimation: A Review.基于深度学习的深度估计

传统的深度估计方法通常是使用双目相机&#xff0c;计算两个2D图像的视差&#xff0c;然后通过立体匹配和三角剖分得到深度图。然而&#xff0c;双目深度估计方法至少需要两个固定的摄像机&#xff0c;当场景的纹理较少或者没有纹理的时候&#xff0c;很难从图像中捕捉足够的特…