|
@@ -60,6 +60,9 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div class="thr">
|
|
|
+ <el-pagination background layout="prev, pager, next" :total="total" :page-size="limit" v-model:current-page="currentPage" @current-change="changePage" @size-change="sizeChange" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
@@ -122,6 +125,10 @@ const route = useRoute()
|
|
|
const info = ref({})
|
|
|
// 列表
|
|
|
const list = ref([])
|
|
|
+let skip = 0
|
|
|
+let limit = inject('limit')
|
|
|
+const total = ref(0)
|
|
|
+const currentPage = ref(1)
|
|
|
const isUseList = ref([])
|
|
|
const cirelationList = ref([])
|
|
|
// 请求
|
|
@@ -132,7 +139,7 @@ onMounted(async () => {
|
|
|
loading.value = false
|
|
|
})
|
|
|
const searchOther = async () => {
|
|
|
- const data = { skip: 0, limit: 3, status: '1', is_show: '0' }
|
|
|
+ const data = { skip: 0, limit: 4, status: '1', is_show: '0' }
|
|
|
let res
|
|
|
res = await store.query(data)
|
|
|
if (res.errcode == '0') list.value = res.data
|
|
@@ -145,9 +152,21 @@ const search = async () => {
|
|
|
if (id) {
|
|
|
let res = await store.detail(id)
|
|
|
if (res.errcode == '0') info.value = res.data
|
|
|
- const data = { skip: 0, limit: 6, incubator: res.data.id, status: '1' }
|
|
|
- res = await cirelationStore.list(data)
|
|
|
- if (res.errcode == '0') cirelationList.value = res.data
|
|
|
+ await searchCompany({ skip, limit })
|
|
|
+ }
|
|
|
+}
|
|
|
+const searchCompany = async (query = { skip, limit }) => {
|
|
|
+ skip = query.skip
|
|
|
+ limit = query.limit
|
|
|
+ const data = {
|
|
|
+ skip: query.skip,
|
|
|
+ limit: query.limit,
|
|
|
+ incubator: info.value.id
|
|
|
+ }
|
|
|
+ const res = await cirelationStore.list(data)
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ cirelationList.value = res.data
|
|
|
+ total.value = res.total
|
|
|
}
|
|
|
}
|
|
|
// 查看
|
|
@@ -196,6 +215,15 @@ const toCollect = async () => {
|
|
|
}
|
|
|
} else ElMessage({ message: '未登录!', type: 'error' })
|
|
|
}
|
|
|
+// 分页
|
|
|
+const changePage = (page = currentPage.value) => {
|
|
|
+ searchCompany({ skip: (page - 1) * limit, limit: limit })
|
|
|
+}
|
|
|
+const sizeChange = (limits) => {
|
|
|
+ limit = limits
|
|
|
+ currentPage.value = 1
|
|
|
+ searchCompany({ skip: 0, limit: limit })
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.main {
|
|
@@ -276,6 +304,11 @@ const toCollect = async () => {
|
|
|
.content {
|
|
|
padding: 20px;
|
|
|
font-size: $global-font-size-16;
|
|
|
+ .thr {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 20px 0 0 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.bottom {
|