9 changed files with 236 additions and 113 deletions
@ -1,19 +1,67 @@ |
|||||
<template> |
<template> |
||||
<div class="pa-3 white fill-height d-flex flex-column"> |
<div class="pa-3 white fill-height d-flex flex-column"> |
||||
<development-search /> |
<development-search @selResSearch="selResSearch" /> |
||||
<development-date /> |
<development-date :lists="lists" :pagination="pagination" @selResSearch="selResSearch" /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import DevelopmentSearch from "components/Development/DevelopmentSearch.vue"; |
import DevelopmentSearch from "components/Development/DevelopmentSearch.vue"; |
||||
import DevelopmentDate from "components/Development/DevelopmentDate.vue"; |
import DevelopmentDate from "components/Development/DevelopmentDate.vue"; |
||||
|
import { selResSearch } from 'config/api'; |
||||
|
|
||||
export default { |
export default { |
||||
name: "ResourceDevelopment", |
name: "ResourceDevelopment", |
||||
components: { |
components: { |
||||
DevelopmentSearch, |
DevelopmentSearch, |
||||
DevelopmentDate, |
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> |
</script> |
||||
|
@ -1,19 +1,67 @@ |
|||||
<template> |
<template> |
||||
<div class="pa-3 white fill-height d-flex flex-column"> |
<div class="pa-3 white fill-height d-flex flex-column"> |
||||
<transfer-search /> |
<transfer-search @selInstrumentSearch="selInstrumentSearch" /> |
||||
<transfer-date /> |
<transfer-date :lists="lists" :pagination="pagination" @selInstrumentSearch="selInstrumentSearch" /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import TransferSearch from "components/Transfer/TransferSearch.vue"; |
import TransferSearch from "components/Transfer/TransferSearch.vue"; |
||||
import TransferDate from "components/Transfer/TransferDate.vue"; |
import TransferDate from "components/Transfer/TransferDate.vue"; |
||||
|
import { selInstrumentSearch } from 'config/api'; |
||||
|
|
||||
export default { |
export default { |
||||
name: "TechnologyTransfer", |
name: "TechnologyTransfer", |
||||
components: { |
components: { |
||||
TransferSearch, |
TransferSearch, |
||||
TransferDate, |
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> |
</script> |
||||
|
Loading…
Reference in new issue