|
@@ -6,9 +6,9 @@
|
|
|
<h2 class="name">双高新闻资讯</h2>
|
|
|
<h5 class="remark">跟紧政策指引方向 抓牢各地双高机遇</h5>
|
|
|
<div class="search">
|
|
|
- <el-input v-model="input1" size="large" placeholder="请输入关键字" :suffix-icon="Search">
|
|
|
+ <el-input v-model="searchForm.title" size="large" placeholder="请输入关键字" :suffix-icon="Search">
|
|
|
<template #append>
|
|
|
- <el-button type="primary" size="large">搜索</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="toSearchInfo">搜索</el-button>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</div>
|
|
@@ -96,6 +96,8 @@ let limit = inject('limit')
|
|
|
const total = ref(0)
|
|
|
const achievementList = ref([])
|
|
|
const projectList = ref([])
|
|
|
+// 搜索
|
|
|
+const searchForm = ref({})
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
@@ -124,7 +126,8 @@ const search = async (query = { skip, limit }) => {
|
|
|
limit: query.limit,
|
|
|
type: route.query.type,
|
|
|
status: '1',
|
|
|
- is_use: '0'
|
|
|
+ is_use: '0',
|
|
|
+ ...searchForm.value
|
|
|
}
|
|
|
const res = await store.query(info)
|
|
|
if (res.errcode == '0') {
|
|
@@ -132,6 +135,10 @@ const search = async (query = { skip, limit }) => {
|
|
|
total.value = res.total
|
|
|
}
|
|
|
}
|
|
|
+// 搜索
|
|
|
+const toSearchInfo = async () => {
|
|
|
+ await search({ skip, limit })
|
|
|
+}
|
|
|
// 查看
|
|
|
const toView = (item) => {
|
|
|
router.push({ path: `/news/detail`, query: { id: item.id || item._id } })
|