修改样式

This commit is contained in:
yangjun 2026-04-23 17:39:44 +08:00
parent 5826ae52a9
commit 9713eabd92
1 changed files with 36 additions and 2 deletions

View File

@ -37,11 +37,15 @@
<span v-if="item.children.length == 0">暂无基础功能</span> <span v-if="item.children.length == 0">暂无基础功能</span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="1" tab="物联设备"> <a-tab-pane key="1" tab="物联设备">
<div>物联设备</div> <div style="height: 180px;">
<a-table :columns="columnsWlsb" :data-source="getData(item)" bordered="true" size="small" :scroll="{ x: 100, y: 130 }" showHeader="false" :pagination="false">
</a-table>
</div>
<!-- <div>物联设备</div>
<div style="margin-top: 10px;">摄像头{{item.sxtList?item.sxtList+"个":'-'}}</div> <div style="margin-top: 10px;">摄像头{{item.sxtList?item.sxtList+"个":'-'}}</div>
<div style="margin-top: 10px;">电表{{item.dbList?item.dbList+"个":'-'}}</div> <div style="margin-top: 10px;">电表{{item.dbList?item.dbList+"个":'-'}}</div>
<div style="margin-top: 10px;">水表{{item.sbList?item.sbList+"个":'-'}}</div> <div style="margin-top: 10px;">水表{{item.sbList?item.sbList+"个":'-'}}</div>
<div style="margin-top: 10px;">温湿度计{{item.wsdjList?item.wsdjList+"个":'-'}}</div> <div style="margin-top: 10px;">温湿度计{{item.wsdjList?item.wsdjList+"个":'-'}}</div> -->
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
@ -131,6 +135,28 @@ const formData = reactive<Record<string, any>>({
buttonCheck:'', buttonCheck:'',
}); });
const columnsWlsb = [
{
title: '序号',
dataIndex: 'key',
key: 'key',
align:'center',
},
{
title: '设备类型',
dataIndex: 'type',
key: 'type',
align:'center',
},
{
title: '设备数量',
dataIndex: 'num',
key: 'num',
align:'center',
},
];
const data = [
]
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } }); const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
@ -152,6 +178,14 @@ const disabled = computed(() => {
return props.formDisabled; return props.formDisabled;
}); });
function getData(item){
const data = [];
data.push({key: '1',type: '摄像头', num: item.sxtList?item.sxtList:'0'});
data.push({key: '2',type: '电表', num: item.dbList?item.sxtList:'0'});
data.push({key: '3',type: '水表', num: item.sbList?item.sxtList:'0'});
data.push({key: '4',type: '温湿度计', num: item.wsdjList?item.sxtList:'0'});
return data;
}
/** /**
* 新增 * 新增
*/ */