admin-vue3/src/views/crm/customer/detail/companyInfo/companybranchinfo/index.vue

50 lines
1.3 KiB
Vue

<template>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="姓名" align="center" prop="name" />
</el-table>
</ContentWrap>
</template>
<script setup lang="ts">
import { CompanyBranchInfoApi } from '@/api/crm/customer/companyInfo/companybranchinfo'
/** */
defineOptions({ name: 'CompanyBranchInfo' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<CompanyBranchInfoVO[]>([]) // 列表的数据
const total = ref(0) // 列表的总页数
const queryParams = reactive({
pageNo: 1,
pageSize: 999,
})
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await CompanyBranchInfoApi.getCompanyBranchInfoPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 初始化 **/
const { params } = useRoute()
onMounted(() => {
queryParams.customerInfoId = params.id
getList()
})
</script>