25 changed files with 1554 additions and 1094 deletions
@ -1,19 +1,64 @@ |
|||||
<template> |
<template> |
||||
<div class="pa-3 white fill-height d-flex flex-column"> |
<div class="pa-3 white fill-height d-flex flex-column"> |
||||
<challenge-search /> |
<challenge-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
||||
<challenge-date /> |
<challenge-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import ChallengeSearch from "components/Challenge/ChallengeSearch.vue"; |
import ChallengeSearch from 'components/Challenge/ChallengeSearch.vue'; |
||||
import ChallengeDate from "components/Challenge/ChallengeDate.vue"; |
import ChallengeDate from 'components/Challenge/ChallengeDate.vue'; |
||||
|
import { getInnovativeServiceSearch } from 'config/api'; |
||||
|
|
||||
export default { |
export default { |
||||
name: "InnovationChallenge", |
name: 'InnovationChallenge', |
||||
components: { |
components: { |
||||
ChallengeSearch, |
ChallengeSearch, |
||||
ChallengeDate, |
ChallengeDate, |
||||
} |
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
lists: {}, |
||||
|
pagination: { current: 1, pageSize: 10 }, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
created() { |
||||
|
this.getInnovativeServiceSearch(); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
async getInnovativeServiceSearch(condition) { |
||||
|
try { |
||||
|
const params = { |
||||
|
param: { |
||||
|
name: condition && condition.name ? condition.name : '', |
||||
|
recStatus: condition && condition.status111 !== '' ? condition.status111 : '', |
||||
|
serviceType: 2, |
||||
|
pageNum: (condition && condition.current) || 1, |
||||
|
pageSize: (condition && condition.pageSize) || 10, |
||||
|
}, |
||||
|
}; |
||||
|
console.log('params', params); |
||||
|
const res = await getInnovativeServiceSearch(params); |
||||
|
const { code, msg, data } = res.data; |
||||
|
if (code === 200) { |
||||
|
this.lists = data; |
||||
|
console.log(this.lists); |
||||
|
|
||||
|
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> |
||||
|
@ -1,19 +1,64 @@ |
|||||
<template> |
<template> |
||||
<div class="pa-3 white fill-height d-flex flex-column"> |
<div class="pa-3 white fill-height d-flex flex-column"> |
||||
<course-search /> |
<course-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
||||
<course-date /> |
<course-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import CourseSearch from "components/Course/CourseSearch.vue"; |
import CourseSearch from 'components/Course/CourseSearch.vue'; |
||||
import CourseDate from "components/Course/CourseDate.vue"; |
import CourseDate from 'components/Course/CourseDate.vue'; |
||||
|
import { getInnovativeServiceSearch } from 'config/api'; |
||||
|
|
||||
export default { |
export default { |
||||
name: "Course", |
name: 'Course', |
||||
components: { |
components: { |
||||
CourseSearch, |
CourseSearch, |
||||
CourseDate, |
CourseDate, |
||||
} |
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
lists: {}, |
||||
|
pagination: { current: 1, pageSize: 10 }, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
created() { |
||||
|
this.getInnovativeServiceSearch(); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
async getInnovativeServiceSearch(condition) { |
||||
|
try { |
||||
|
const params = { |
||||
|
param: { |
||||
|
name: condition && condition.name ? condition.name : '', |
||||
|
recStatus: condition && condition.status111 !== '' ? condition.status111 : '', |
||||
|
serviceType: 3, |
||||
|
pageNum: (condition && condition.current) || 1, |
||||
|
pageSize: (condition && condition.pageSize) || 10, |
||||
|
}, |
||||
|
}; |
||||
|
console.log('params', params); |
||||
|
const res = await getInnovativeServiceSearch(params); |
||||
|
const { code, msg, data } = res.data; |
||||
|
if (code === 200) { |
||||
|
this.lists = data; |
||||
|
console.log(this.lists); |
||||
|
|
||||
|
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