25 changed files with 1554 additions and 1094 deletions
@ -1,19 +1,64 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<challenge-search /> |
|||
<challenge-date /> |
|||
<challenge-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
<challenge-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ChallengeSearch from "components/Challenge/ChallengeSearch.vue"; |
|||
import ChallengeDate from "components/Challenge/ChallengeDate.vue"; |
|||
import ChallengeSearch from 'components/Challenge/ChallengeSearch.vue'; |
|||
import ChallengeDate from 'components/Challenge/ChallengeDate.vue'; |
|||
import { getInnovativeServiceSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "InnovationChallenge", |
|||
name: 'InnovationChallenge', |
|||
components: { |
|||
ChallengeSearch, |
|||
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> |
|||
|
@ -1,19 +1,64 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<course-search /> |
|||
<course-date /> |
|||
<course-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
<course-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CourseSearch from "components/Course/CourseSearch.vue"; |
|||
import CourseDate from "components/Course/CourseDate.vue"; |
|||
import CourseSearch from 'components/Course/CourseSearch.vue'; |
|||
import CourseDate from 'components/Course/CourseDate.vue'; |
|||
import { getInnovativeServiceSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "Course", |
|||
name: 'Course', |
|||
components: { |
|||
CourseSearch, |
|||
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> |
|||
|
Loading…
Reference in new issue