el-select二级联动效果-摄像头_el-select 联动,2024年最新计算机毕设代码可以找网上的改吗

文章讲述了如何处理设备摄像头数据,通过前端组件实时更新摄像头的层级关系,同时提及了面向计算机专业学生的毕业设计项目资源,包括各种编程语言的项目示例和配套资源。
摘要由CSDN通过智能技术生成

cameraDetailInfo.deviceCameras[scope. i n d e x ] . s h e l v e s S n ∣ ∣ d e v i c e C a m e r a s [ s c o p e . index] .shelvesSn || deviceCameras[scope. index].shelvesSn∣∣deviceCameras[scope.index].cameraLevel !==
cameraDetailInfo.deviceCameras[scope.$index].cameraLevel
? true
: false)
"

script>
import { get } from “http”;
import { runInThisContext } from “vm”;
import Vue from “vue”;
export default {
props: {
visible: Boolean,
warehouseSn: String,
cameraDetailInfo:{
type: Object,
default:{}
}
},
data() {
return {
shelvesList: [], //货架编号
levelList: [],
deviceCameras: []
};
},

watch: {
cameraDetailInfo: {
handler(newVal, oldVal) {
if (newVal !== null && oldVal !== null) {
this.deviceCameras = JSON.parse(
JSON.stringify(this.cameraDetailInfo.deviceCameras)
)
this.deviceCameras.map(item =>{
item.levelList=[]
this.shelvesList.map(shelve=>{
if(shelve.shelvesSn === item.shelvesSn){
item.levelList = shelve.levels
}
})
})
}
}
}
},

computed: {
// deviceCameras() {
// return this.cameraDetailInfo === null
// ? []
// : this.cameraDetailInfo.deviceCameras;
// },
‘deviceCameras[scope.$index].shelvesSn’(){
return this.allowProp = true
}
},

created() {
this.getSelectShelfList();
},

methods: {
//获取下拉列表
getSelectShelfList() {
this.$api.shelf
.shelvesSelectList({ houseSn: this.warehouseSn })
.then(({ code, data }) => {
if (code === 0) {
this.shelvesList = data;
this.shelvesList.unshift({
shelvesSn: “”,
levels: “”
});
}
});
},

changeShelvesSn(val, index) {
if (val === “”) {
this.deviceCameras[index].cameraLevel = “”;
// this.levelList[index] = “”;
return;
}
//shelvesList 它是里面包含了shelvesSn 和 levels的数组
//selectedShelf:选中货架编号
let selectedShelf = this.shelvesList.filter(
item => item.shelvesSn === val
);

if (selectedShelf && selectedShelf.length > 0) {
//货架层数组
// this.levelList[index] =
// (selectedShelf.length > 0 && selectedShelf[0].levels) || [];
//默认层
this.deviceCameras[index].levelList = selectedShelf[0].levels
this.deviceCameras[index].cameraLevel = this.levelList[0] > 0 ? 1 : “”;
}
},
refreshCamera(cameraSn, imgDeviceSn, cameraLevel, shelvesSn) {
this.KaTeX parse error: Expected '}', got 'EOF' at end of input: … === 0) { this.message({
message: this.KaTeX parse error: Expected 'EOF', got '}' at position 42: …ype: "success" }̲); } else { ret…api.device
.deleteCameraDetail({ cameraSn: cameraSn, imageSn: imgDeviceSn })
.then(({ code, msg }) => {
if (code === 0) {
this.KaTeX parse error: Expected 'EOF', got '}' at position 128: …直接用index的方式就好了 }̲ }); }, //关闭 ha…parent.handleCloseCameraDialog();
},
//关闭按钮
handleOk() {
this.$parent.handleCloseCameraDialog();
}
}
};

我的难点在于

不知道将对应的层数怎样将它展示出来
这个后端给的结构是这样的
思路:定义一个选中的变量,然后里面从this.shelvesList.filter过滤掉,里面的shelvesSn 就是change里面的val,然后让 v-for里面的this.deviceCameras[index].levelList = selectedShelf[0].levels
意思就是绑定的=选中的层数
在这里插入图片描述

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数同学面临毕业设计项目选题时,很多人都会感到无从下手,尤其是对于计算机专业的学生来说,选择一个合适的题目尤为重要。因为毕业设计不仅是我们在大学四年学习的一个总结,更是展示自己能力的重要机会。

因此收集整理了一份《2024年计算机毕业设计项目大全》,初衷也很简单,就是希望能够帮助提高效率,同时减轻大家的负担。
img
img
img

既有Java、Web、PHP、也有C、小程序、Python等项目供你选择,真正体系化!

由于项目比较多,这里只是将部分目录截图出来,每个节点里面都包含素材文档、项目源码、讲解视频

如果你觉得这些内容对你有帮助,可以添加VX:vip1024c (备注项目大全获取)
img

12515875436)]

既有Java、Web、PHP、也有C、小程序、Python等项目供你选择,真正体系化!

由于项目比较多,这里只是将部分目录截图出来,每个节点里面都包含素材文档、项目源码、讲解视频

如果你觉得这些内容对你有帮助,可以添加VX:vip1024c (备注项目大全获取)
[外链图片转存中…(img-CZjmcWze-1712515875436)]

  • 18
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值