|
@@ -14,7 +14,12 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="one_2">
|
|
|
- <el-col :span="24" class="two">
|
|
|
+ <el-col :span="24" class="one_2_one">
|
|
|
+ <div class="menu" :class="[item.value == active ? 'menuTrue' : '']" v-for="(item, index) in newList" :key="index" @click="toActive(item)">
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="one_2_two">
|
|
|
<el-col :span="18" class="left">
|
|
|
<el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
|
|
|
<el-col :span="6" class="left">
|
|
@@ -65,7 +70,7 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="thr">
|
|
|
+ <el-col :span="24" class="one_2_thr">
|
|
|
<el-pagination background layout="total, prev, pager, next" :page-sizes="[10, 20, 50, 100, 200]" :total="total" :page-size="limit" v-model:current-page="currentPage" @current-change="changePage" @size-change="sizeChange"> </el-pagination>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -98,6 +103,12 @@ const achievementList = ref([])
|
|
|
const projectList = ref([])
|
|
|
// 搜索
|
|
|
const searchForm = ref({})
|
|
|
+const active = ref('0')
|
|
|
+const newList = ref([
|
|
|
+ { value: '0', label: '政策信息' },
|
|
|
+ { value: '1', label: '新闻通知' },
|
|
|
+ { value: '2', label: '行业动态' }
|
|
|
+])
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
@@ -124,12 +135,11 @@ const search = async (query = { skip, limit }) => {
|
|
|
const info = {
|
|
|
skip: query.skip,
|
|
|
limit: query.limit,
|
|
|
-
|
|
|
+ type: active.value,
|
|
|
status: '1',
|
|
|
is_use: '0',
|
|
|
...searchForm.value
|
|
|
}
|
|
|
- if (route.query.type) info.type = route.query.type
|
|
|
const res = await store.query(info)
|
|
|
if (res.errcode == '0') {
|
|
|
list.value = res.data
|
|
@@ -140,6 +150,10 @@ const search = async (query = { skip, limit }) => {
|
|
|
const toSearchInfo = async () => {
|
|
|
await search({ skip, limit })
|
|
|
}
|
|
|
+const toActive = async (item) => {
|
|
|
+ active.value = item.value
|
|
|
+ await search({ skip, limit })
|
|
|
+}
|
|
|
// 查看
|
|
|
const toView = (item) => {
|
|
|
router.push({ path: `/news/detail`, query: { id: item.id || item._id } })
|
|
@@ -209,7 +223,24 @@ const getUrl = (item) => {
|
|
|
margin-top: 100px !important;
|
|
|
padding: 30px !important;
|
|
|
background-color: $global-color-fff;
|
|
|
- .two {
|
|
|
+ .one_2_one {
|
|
|
+ display: flex;
|
|
|
+ margin: 0 0 20px 0;
|
|
|
+ .menu {
|
|
|
+ padding: 10px 20px;
|
|
|
+ margin: 0 10px 0 0;
|
|
|
+ color: #666666;
|
|
|
+ border: 1px solid #bbbbbb;
|
|
|
+ cursor: default;
|
|
|
+ }
|
|
|
+ .menuTrue {
|
|
|
+ color: $global-color-fff;
|
|
|
+ background: #1073ff;
|
|
|
+ border: none;
|
|
|
+ cursor: default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .one_2_two {
|
|
|
display: flex;
|
|
|
width: 100%;
|
|
|
background-color: #fff;
|
|
@@ -328,7 +359,7 @@ const getUrl = (item) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .thr {
|
|
|
+ .one_2_thr {
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse;
|
|
|
padding: 20px;
|