9 changed files with 225 additions and 116 deletions
@ -1,19 +1,67 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<development-search /> |
|||
<development-date /> |
|||
<development-search @selResSearch="selResSearch" /> |
|||
<development-date :lists="lists" :pagination="pagination" @selResSearch="selResSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import DevelopmentSearch from "components/Development/DevelopmentSearch.vue"; |
|||
import DevelopmentDate from "components/Development/DevelopmentDate.vue"; |
|||
import { selResSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "ResourceDevelopment", |
|||
components: { |
|||
DevelopmentSearch, |
|||
DevelopmentDate, |
|||
} |
|||
}, |
|||
|
|||
data(){ |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.selResSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
async selResSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.content) { |
|||
params.param.content = condition.content; |
|||
} |
|||
if (condition.modelIds) { |
|||
params.param.modelIds = condition.modelIds; |
|||
} |
|||
} |
|||
const res = await selResSearch(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
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> |
|||
|
@ -1,19 +1,67 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<transfer-search /> |
|||
<transfer-date /> |
|||
<transfer-search @selInstrumentSearch="selInstrumentSearch" /> |
|||
<transfer-date :lists="lists" :pagination="pagination" @selInstrumentSearch="selInstrumentSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import TransferSearch from "components/Transfer/TransferSearch.vue"; |
|||
import TransferDate from "components/Transfer/TransferDate.vue"; |
|||
import { selInstrumentSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "TechnologyTransfer", |
|||
components: { |
|||
TransferSearch, |
|||
TransferDate, |
|||
} |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.selInstrumentSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
async selInstrumentSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.content) { |
|||
params.param.content = condition.content; |
|||
} |
|||
if (condition.modelIds) { |
|||
params.param.modelIds = condition.modelIds; |
|||
} |
|||
} |
|||
const res = await selInstrumentSearch(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
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> |
|||
|
Loading…
Reference in new issue