diff --git a/src/views/cs/index.vue b/src/views/cs/index.vue index 433c199..76d870b 100644 --- a/src/views/cs/index.vue +++ b/src/views/cs/index.vue @@ -227,6 +227,7 @@ export default { height:40, radius:20, isRight: false, + alpha:'transparent', equipmentName: "包装线11" }, { @@ -237,6 +238,7 @@ export default { height:40, radius:20, isRight: false, + alpha:'transparent', equipmentName: "包装线10" }, { @@ -247,6 +249,7 @@ export default { height:40, radius:20, isRight: false, + alpha:'transparent', equipmentName: "包装线09" }, { @@ -257,6 +260,7 @@ export default { height:40, radius:20, isRight: false, + alpha:'transparent', equipmentName: "包装线08" }, { @@ -266,6 +270,7 @@ export default { width: 2, height:40, isRight: true, + alpha:'transparent', equipmentName: "包装线07" }, { @@ -275,6 +280,7 @@ export default { width: 2, height:40, isRight: false, + alpha:'transparent', equipmentName: "包装线06" }, { @@ -284,6 +290,7 @@ export default { width: 2, height:40, isRight: true, + alpha:'transparent', equipmentName: "包装线05" }, { @@ -293,6 +300,7 @@ export default { width: 2, height:40, isRight: false, + alpha:'transparent', equipmentName: "包装线04" }, { @@ -302,6 +310,7 @@ export default { width: 2, height:40, isRight: true, + alpha:'transparent', equipmentName: "包装线03" }, { @@ -311,6 +320,7 @@ export default { width: 2, height:40, isRight: false, + alpha:'transparent', equipmentName: "包装线02" }, { @@ -320,6 +330,7 @@ export default { width: 2, height:40, isRight: false, + alpha:'transparent', equipmentName: "包装线01" }, ], @@ -452,7 +463,6 @@ export default { sapCode:matchedRow?.sapCode || null, }; }); - console.log(this.infoData) } }).catch(error => { console.error("获取数据失败:", error); @@ -488,8 +498,7 @@ export default { pageSize: 20 } getCsRepairlist(param).then((response) => { - if (response) { - console.log(response) + if (response?.length) { // 更新响应式数据 this.repairOrders = response.map(item => ({ ...item, @@ -509,15 +518,19 @@ export default { this.infoData.forEach((item, index) => { if (activeEquipmentNames.has(item.equipmentName)) { // 响应式设置alpha - this.$set(this.infoData[index], 'alpha', '#CB4C4C80'); + this.infoData[index].alpha = '#CB4C4C80'; } else { // 移除alpha属性 - if (this.infoData[index].hasOwnProperty('alpha')) { - this.$delete(this.infoData[index], 'alpha'); - } + this.infoData[index].alpha = 'transparent'; } }); + }else { + this.scrollText = ""; + this.infoData.forEach((item, index) => { + this.infoData[index].alpha = 'transparent'; + }); } + }) },