提交 17049543 authored 作者: 张烨's avatar 张烨

fix:政令模块细节优化

上级 b3bc9bc2
...@@ -322,12 +322,26 @@ body { ...@@ -322,12 +322,26 @@ body {
display: none; display: none;
} }
/* #region 公共样式类名 */
/* 单行文本溢出隐藏显示省略号 */ /* 单行文本溢出隐藏显示省略号 */
.one-line-ellipsis { .one-line-ellipsis {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
/* 多行文本两端对齐 最后一行正常显示 */
.text-align-justify {
text-align: justify;
text-align-last: left;
-webkit-text-align-last: left;
}
/* 可点击文本 鼠标悬浮样式 */
#app .text-click-hover:hover {
text-decoration: underline;
color: rgb(5, 95, 194);
cursor: pointer;
}
/* #endregion 公共样式类名 */
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,7 +4,7 @@ import request from "@/api/request.js"; ...@@ -4,7 +4,7 @@ import request from "@/api/request.js";
export function getDepartmentList(params) { export function getDepartmentList(params) {
return request({ return request({
method: 'GET', method: 'GET',
url: `/api/administrativeDict/department?pageSize`, url: `/api/administrativeDict/department`,
}) })
} }
...@@ -43,10 +43,10 @@ export function getDecreeArea(params) { ...@@ -43,10 +43,10 @@ export function getDecreeArea(params) {
} }
// 关键行政令 // 关键行政令
export function getKeyDecree() { export function getKeyDecree(params) {
return request({ return request({
method: 'GET', method: 'GET',
url: `/api/administrativeOrderOverview/action`, url: `/api/administrativeOrderOverview/action?pageSize=${params.pageSize}&pageNum=${params.pageNum}`,
}) })
} }
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</div> </div>
<div class="box7-main"> <div class="box7-main">
<div class="box7-list"> <div class="box7-list">
<div class="box7-item" v-for="(item, index) in keyDecreeList.slice(0, 3)" :key="index" @click="handleKeyDecree(item)"> <div class="box7-item" v-for="(item, index) in keyDecreeList" :key="index" @click="handleKeyDecree(item)">
<div class="icon"> <div class="icon">
<img src="./assets/images/warning.png" alt="" /> <img src="./assets/images/warning.png" alt="" />
</div> </div>
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</div> </div>
</div> </div>
</div> </div>
<SimplePagination v-model:current-page="keyDecreeInfo.page" :page-size="3" :total="keyDecreeInfo.total" @page-change="handleGetKeyDecree" /> <SimplePagination v-model:current-page="keyDecreeInfo.page" :page-size="keyDecreeInfo.size" :total="keyDecreeInfo.total" @page-change="handleGetKeyDecree" />
</div> </div>
</div> </div>
<div class="box8"> <div class="box8">
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<DivideHeader id="position4" class="divide4" :titleText="'科技政令库'"></DivideHeader> <DivideHeader id="position4" class="divide4" :titleText="'科技政令库'"></DivideHeader>
<div class="home-main-footer-header"> <div class="home-main-footer-header">
<div class="search-box"> <div class="search-box">
<el-select v-model="searchType" :empty-values="[null, undefined]" style="width: 100%"> <el-select v-model="searchType" :empty-values="[null, undefined]" style="width: 100%" filterable>
<el-option label="全部政府部门" value="" /> <el-option label="全部政府部门" value="" />
<el-option v-for="item in govInsList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in govInsList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
...@@ -597,11 +597,8 @@ const newsList = ref([ ...@@ -597,11 +597,8 @@ const newsList = ref([
// } // }
]); ]);
const handleGetNews = async () => { const handleGetNews = async () => {
const params = {
moduleId: "0101"
};
try { try {
const res = await getNews(params); const res = await getNews({moduleId: "0101"});
console.log("新闻资讯", res); console.log("新闻资讯", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
// newsList.value = res.data || [] // newsList.value = res.data || []
...@@ -619,7 +616,6 @@ const handleGetNews = async () => { ...@@ -619,7 +616,6 @@ const handleGetNews = async () => {
console.error("新闻资讯error", error); console.error("新闻资讯error", error);
} }
}; };
handleGetNews();
// 点击新闻条目,跳转到新闻分析页 // 点击新闻条目,跳转到新闻分析页
const handleToNewsAnalysis = news => { const handleToNewsAnalysis = news => {
const route = router.resolve({ const route = router.resolve({
...@@ -865,15 +861,16 @@ const keyDecreeList = ref([]); ...@@ -865,15 +861,16 @@ const keyDecreeList = ref([]);
const keyDecreeInfo = reactive({ const keyDecreeInfo = reactive({
total: 0, total: 0,
page: 1, page: 1,
size: 3,
}) })
const handleGetKeyDecree = async () => { const handleGetKeyDecree = async () => {
try { try {
const res = await getKeyDecree(); const res = await getKeyDecree({pageSize:keyDecreeInfo.size, pageNum:keyDecreeInfo.page-1});
console.log("关键行政令", res); console.log("关键行政令", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data?.total) {
keyDecreeInfo.total = res.total || 0; keyDecreeInfo.total = res.data.total || 0;
keyDecreeList.value = res.data.map(item => { keyDecreeList.value = res.data.list.map(item => {
return { return {
title: item.name, title: item.name,
content: item.describe, content: item.describe,
...@@ -1134,6 +1131,7 @@ const handleSearch = () => { ...@@ -1134,6 +1131,7 @@ const handleSearch = () => {
}; };
onMounted(async () => { onMounted(async () => {
handleGetNews();
handleGetDecreeTypeList(); handleGetDecreeTypeList();
handleGetAreaList(); handleGetAreaList();
handleGetDecreeOrderList(); handleGetDecreeOrderList();
...@@ -2779,7 +2777,7 @@ onMounted(async () => { ...@@ -2779,7 +2777,7 @@ onMounted(async () => {
margin-top: 10px; margin-top: 10px;
.box7-list { .box7-list {
height: 320px; height: 310px;
.box7-item { .box7-item {
width: 730px; width: 730px;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="box1-main"> <div class="box1-main">
<div class="box1-item" v-for="(item, index) in backgroundList" :key="index"> <div class="box1-item" v-for="(item, index) in backgroundList" :key="index">
<div class="id">{{ index + 1 }}</div> <div class="id">{{ index + 1 }}</div>
<div class="title">{{ item.content }}</div> <div class="title text-align-justify">{{ item.content }}</div>
<div class="open"> <div class="open">
<img src="./assets/images/open-icon.png" alt="" /> <img src="./assets/images/open-icon.png" alt="" />
</div> </div>
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
<template #title> <template #title>
<div class="custom-collapse-title"> <div class="custom-collapse-title">
<div class="custom-collapse-index">{{ index + 1 }}</div> <div class="custom-collapse-index">{{ index + 1 }}</div>
<div class="custom-collapse-name one-line-ellipsis" @click.stop="handleClickDecree(item)">{{ item.title }}</div> <div class="custom-collapse-name one-line-ellipsis">
<span class="text-click-hover" @click.stop="handleClickDecree(item)">{{ item.title }}</span>
</div>
</div> </div>
</template> </template>
<div class="custom-collapse-content"> <div class="custom-collapse-content">
...@@ -363,7 +365,6 @@ onMounted(() => { ...@@ -363,7 +365,6 @@ onMounted(() => {
color: #0a57a6; color: #0a57a6;
} }
.custom-collapse-name { .custom-collapse-name {
cursor: pointer;
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
color: var(--el-collapse-header-text-color); color: var(--el-collapse-header-text-color);
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<img :src="item.avatar ? item.avatar : DefaultIcon1" alt="" /> <img :src="item.avatar ? item.avatar : DefaultIcon1" alt="" />
</div> </div>
<div class="box3-top-bottom-item-right"> <div class="box3-top-bottom-item-right">
<div class="name" @click="handleClickUser(item)">{{ item.name }}</div> <div class="name text-click-hover one-line-ellipsis" @click="handleClickUser(item)">{{ item.name }}</div>
<div class="position">{{ item.job }}</div> <div class="position">{{ item.job }}</div>
</div> </div>
</div> </div>
...@@ -694,10 +694,6 @@ onMounted(() => { ...@@ -694,10 +694,6 @@ onMounted(() => {
line-height: 24px; line-height: 24px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
} }
.position { .position {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-empty v-if="!contentList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" /> <el-empty v-if="!contentList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<div v-for="(section, index) in contentList" :key="index" class="section"> <div v-for="(section, index) in contentList" :key="index" class="section">
<div class="section-header"> <div class="section-header">
<div class="section-title">({{ simpleNumToChinese(index+1) }}) {{ section.content }}</div> <div class="section-title text-align-justify">({{ simpleNumToChinese(index+1) }}) {{ section.content }}</div>
<div class="section-icon"> <div class="section-icon">
<img src="./assets/images/open-icon.png" alt="" /> <img src="./assets/images/open-icon.png" alt="" />
</div> </div>
...@@ -387,7 +387,6 @@ onMounted(() => { ...@@ -387,7 +387,6 @@ onMounted(() => {
.section-title { .section-title {
font-size: 18px; font-size: 18px;
line-height: 30px; line-height: 30px;
// font-weight: 600;
letter-spacing: 1px; letter-spacing: 1px;
width: 20px; width: 20px;
flex: auto; flex: auto;
......
...@@ -52,8 +52,8 @@ export default defineConfig({ ...@@ -52,8 +52,8 @@ export default defineConfig({
}, },
'/api': { '/api': {
target: 'http://8.140.26.4:9085/', // target: 'http://8.140.26.4:9085/',
// target: 'http://172.20.10.3:28080/', target: 'http://192.168.0.6:28080/',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '') rewrite: (path) => path.replace(/^\/api/, '')
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论