|
|
@@ -17,7 +17,7 @@
|
|
|
<!--顶部搜索已经其他操作-->
|
|
|
<div class="header-control">
|
|
|
<div class="left">
|
|
|
- <a-switch v-model:checked="model" checked-children="地图" un-checked-children="列表" style="margin-right: 10px;" @change="modelChange" />
|
|
|
+ <a-button type="primary" size="small" round @click="model=false" v-if="model==true">切换列表</a-button>
|
|
|
<!-- <a-input v-if="model" placeholder="区域" v-model:value="param.content.where.areaname" @keyup.enter="listData"></a-input> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -98,26 +98,28 @@
|
|
|
</div> -->
|
|
|
</div>
|
|
|
<!--列表-->
|
|
|
- <div class="M-list" v-if="!model">
|
|
|
- <normalTable rowKey="w_deviceid" ref="list" size="small" :param="param2" :columns="utils.TBLayout('equipmentTable')">
|
|
|
- <template #tb_cell="{data}">
|
|
|
- <div v-if="data.column.dataIndex == 'operation'">
|
|
|
- <a-button type="link" @click="router.push({path:data.record.dashboardpath,query:{id:data.record.w_deviceid}})">控制界面</a-button>
|
|
|
- </div>
|
|
|
- <div v-else-if="data.column.dataIndex == 'rwtype'">
|
|
|
- {{ data.record.rwtype == 0 ? '读' : data.record.rwtype == 1 ? '写' : '上报' }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- {{ data.record[data.column.dataIndex] }}
|
|
|
- </div>
|
|
|
+ <a-card :bordered="false" class="M-list" v-if="!model">
|
|
|
+ <template #title>
|
|
|
+ <a-button type="primary" size="small" round @click="model=true">切换地图</a-button>
|
|
|
</template>
|
|
|
- <template #operation>
|
|
|
-
|
|
|
- </template>
|
|
|
- </normalTable>
|
|
|
- </div>
|
|
|
+ <normalTable rowKey="w_deviceid" ref="list" size="small" :param="param2" :columns="utils.TBLayout('equipmentTable')">
|
|
|
+ <template #tb_cell="{data}">
|
|
|
+ <div v-if="data.column.dataIndex == 'operation'">
|
|
|
+ <a-button type="link" @click="router.push({path:data.record.dashboardpath,query:{id:data.record.w_deviceid}})">控制界面</a-button>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="data.column.dataIndex == 'rwtype'">
|
|
|
+ {{ data.record.rwtype == 0 ? '读' : data.record.rwtype == 1 ? '写' : '上报' }}
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ {{ data.record[data.column.dataIndex] }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #operation>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </normalTable>
|
|
|
+ </a-card>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -340,6 +342,7 @@ onMounted(() => {
|
|
|
getData()
|
|
|
listData()
|
|
|
set()
|
|
|
+ console.log(utils.TBLayout('equipmentTable'));
|
|
|
})
|
|
|
|
|
|
</script>
|