5 changed files with 159 additions and 29 deletions
@ -1,19 +1,70 @@ |
|||||
<template> |
<template> |
||||
<div class="pa-3 white fill-height d-flex flex-column"> |
<div class="pa-3 white fill-height d-flex flex-column"> |
||||
<spin-off-search /> |
<spin-off-search @getCreatingPlatformSearch="getCreatingPlatformSearch" /> |
||||
<spin-off-date /> |
<spin-off-date :pagination="pagination" :lists="lists" @getCreatingPlatformSearch="getCreatingPlatformSearch"/> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import SpinOffSearch from "components/SpinOff/SpinOffSearch.vue"; |
import SpinOffSearch from "components/SpinOff/SpinOffSearch.vue"; |
||||
import SpinOffDate from "components/SpinOff/SpinOffDate.vue"; |
import SpinOffDate from "components/SpinOff/SpinOffDate.vue"; |
||||
|
import { getCreatingPlatformSearch } from 'config/api'; |
||||
|
|
||||
export default { |
export default { |
||||
name: "DerivativeSpinOffs", |
name: "DerivativeSpinOffs", |
||||
components: { |
components: { |
||||
SpinOffSearch, |
SpinOffSearch, |
||||
SpinOffDate, |
SpinOffDate, |
||||
|
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
lists: [], |
||||
|
pagination: { current: 1, pageSize: 10 }, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
created() { |
||||
|
this.getCreatingPlatformSearch() |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
async getCreatingPlatformSearch(condition){ |
||||
|
try { |
||||
|
const params = { |
||||
|
param: { |
||||
|
pageNum: (condition && condition.current) || 1, |
||||
|
pageSize: (condition && condition.pageSize) || 10, |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
if(condition){ |
||||
|
if(condition.companyName){ |
||||
|
params.param.companyName = condition.companyName |
||||
|
} |
||||
|
if(condition.companyType){ |
||||
|
params.param.companyType = condition.companyType |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const res = await getCreatingPlatformSearch(params); |
||||
|
const { code, msg, data } = res.data; |
||||
|
if (code === 200) { |
||||
|
console.log(data) |
||||
|
this.lists = data.list; |
||||
|
const paper = { ...this.pagination }; |
||||
|
paper.current = data.pageNum; |
||||
|
paper.total = +data.total; |
||||
|
paper.pageSize = data.pageSize; |
||||
|
this.pagination = paper; |
||||
|
} else { |
||||
|
throw msg || '获取失败'; |
||||
|
} |
||||
|
} catch (error) { |
||||
|
this.$message.error(error); |
||||
|
} |
||||
|
|
||||
|
} |
||||
} |
} |
||||
}; |
}; |
||||
</script> |
</script> |
||||
|
Loading…
Reference in new issue