This commit is contained in:
仲么了
2024-01-18 09:18:32 +08:00
3 changed files with 9 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ export default class TableStore {
)
).then((res: any) => {
this.table.data = res.data.records || res.data
this.table.total = res.data.total || res.data.length
this.table.total = res.data.total || res.data.length||0
if (this.isWebPaging) {
this.table.webPagingData = window.XEUtils.chunk(this.table.data, this.table.params.pageSize)
this.table.data = this.table.webPagingData[this.table.params.pageNum - 1]

View File

@@ -4,6 +4,7 @@
v-loading="tableStore.table.loading"
height="auto"
auto-resize
ref="tableRef"
v-bind="defaultAttribute"
:data="tableStore.table.data"
:column-config="{ resizable: true }"
@@ -24,13 +25,15 @@
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide } from 'vue'
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout'
defineOptions({
name: 'govern/manage/engineering'
})
const tableRef = ref()
const pageHeight = mainHeight(20)
const tableStore = new TableStore({
url: '/cs-device-boot/csLedger/getProjectTree',
@@ -44,6 +47,9 @@ provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
setTimeout(() => {
tableRef.value.setAllTreeExpand(true)
}, 100)
})
const addMenu = () => {}

View File

@@ -91,7 +91,7 @@
</template>
</vxe-column>
<vxe-column field="createTime" title="录入时间"></vxe-column>
<vxe-column field="createTime" title="网络设备ID"></vxe-column>
<vxe-column field="ndid" title="网络设备ID"></vxe-column>
<vxe-column field="status" title="状态">
<template #default="{ row }">
{{ row.status == 1 ? '未注册' : row.status == 2 ? '注册' : '接入' }}
@@ -196,7 +196,6 @@ import {
addEquipmentDelivery,
deleteEquipmentDelivery,
editEquipmentDelivery,
uploadTopo,
batchImportDevice,
resetEquipmentDelivery
} from '@/api/cs-system-boot/device'