|
|
@ -20,22 +20,30 @@ |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<div class="docs-wrap"> |
|
|
|
<doc-wrap |
|
|
|
v-for="(item, index) in zhxxType" |
|
|
|
:key="item.title" |
|
|
|
:title="item.title" |
|
|
|
:type="item.value" |
|
|
|
:docData="[ |
|
|
|
{ id: 1, title: '标题1', content: '内容1', time: '2020-11-11' }, |
|
|
|
{ id: 2, title: '标题2', content: '内容2', time: '2020-11-12' } |
|
|
|
]" |
|
|
|
style="margin-bottom: 20px;" |
|
|
|
></doc-wrap> |
|
|
|
<template v-if="isSearch"> |
|
|
|
<doc-wrap |
|
|
|
:title="搜索结果" |
|
|
|
:isSearch="true" |
|
|
|
:docData="tableData" |
|
|
|
:proTotal="total" |
|
|
|
style="margin-bottom: 20px;" |
|
|
|
></doc-wrap> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<doc-wrap |
|
|
|
v-for="(item, index) in zhxxType" |
|
|
|
:key="item.title" |
|
|
|
:title="item.title" |
|
|
|
:type="item.value" |
|
|
|
style="margin-bottom: 20px;" |
|
|
|
></doc-wrap> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import docWrap from "./components/docWrap.vue"; |
|
|
|
import { zhxxList } from "@/api/zhxx"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
docWrap |
|
|
@ -59,6 +67,7 @@ export default { |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
tableData: [], |
|
|
|
isSearch: false, |
|
|
|
zhxxType: [ |
|
|
|
{ title: "政策法规", value: "1" }, |
|
|
|
{ title: "部门规章", value: "2" }, |
|
|
@ -68,7 +77,15 @@ export default { |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
methods: { |
|
|
|
getResult() { |
|
|
|
zhxxList(this.queryForm).then(res => { |
|
|
|
this.isSearch = true; |
|
|
|
this.tableData = res.data.records; |
|
|
|
this.total = res.data.total; |
|
|
|
}); |
|
|
|
}, |
|
|
|
resetForm() { |
|
|
|
this.isSearch = false; |
|
|
|
this.queryForm = { |
|
|
|
cv: { |
|
|
|
name: "title", |
|
|
@ -78,7 +95,7 @@ export default { |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10 |
|
|
|
}; |
|
|
|
this.getResult(); |
|
|
|
// this.getResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|