diff --git a/ui/dasadmin/src/views/backend/realData/index.vue b/ui/dasadmin/src/views/backend/realData/index.vue index a6692899..826c189c 100644 --- a/ui/dasadmin/src/views/backend/realData/index.vue +++ b/ui/dasadmin/src/views/backend/realData/index.vue @@ -123,7 +123,8 @@ const tableItem0: any = [ prop: 'code', align: 'center', custom: 'default', - name:'' + name:'', + title: '风机列表' }] const tableItem1: any = [ { @@ -331,17 +332,24 @@ const selectList=ref([]) const getSel = () => { debugger selectList.value=[] - tableColumn.value.forEach(item => { - if (item.prop) { - if(item.prop!='code'){ - selectList.value.push({ - attributeName: item.title, - attributeCode: item.name, - }); - } + try { + if (tableColumn.value && Array.isArray(tableColumn.value)) { + for (const item of tableColumn.value) { + if (item && item.prop && item.prop !== 'code') { + if(item.title!==undefined){ + selectList.value.push({ + attributeName: item.title || '', + attributeCode: item.name || '', + unit: item.unit || '', + }); + } + } + } } - }); + } catch (error) { + console.error('Error in tableColumn processing:', error); + } //tableRef.value.clearSelection() if (selectList.value.length > 0) { //setTimeout(()=>{ @@ -601,14 +609,11 @@ const downFun=(tableColumn,tableData)=>{ onUnmounted(() => { autoUpdateInterval.value && clearInterval(autoUpdateInterval.value) autoUpdateInterval.value = null - //selectList.value=[] }) onMounted(() => { deviceQuery(devicelistData) - //queryListData.pageSize=200 modelAttributeList(queryListData) - //tableRef.value.toggleRowSelection(modalTbleData.value[0], true); })