提交 68fd1e83 authored 作者: 张烨's avatar 张烨

fix:政令模块细节优化

上级 3c79fc23
...@@ -63,12 +63,18 @@ ...@@ -63,12 +63,18 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<div class="home-main-header-item-box"> <div class="home-main-header-item-box" v-if="govInsList.length">
<div class="item" v-for="(item, index) in govInsList.slice(0, 12)" :key="index" @click="handleToInstitution(item)"> <div class="item" v-for="(item, index) in govInsList.slice(0, 7)" :key="index" @click="handleToInstitution(item)">
<div class="item-left"> <div class="item-left">
<img :src="item.img ? item.img : DefaultIcon2" alt="" /> <img :src="item.orgImage || DefaultIcon2" alt="" />
</div> </div>
<div class="item-right">{{ item.name }}</div> <div class="item-right one-line-ellipsis">{{ item.orgName }}</div>
<div class="item-num">{{ item.total }}</div>
<el-icon color="var(--color-primary-100)"><ArrowRightBold /></el-icon>
</div>
<div class="item">
<div class="item-num item-more">查看全部机构 ({{govInsList.length+1}}家)</div>
<el-icon color="var(--color-primary-100)"><ArrowRightBold /></el-icon>
</div> </div>
</div> </div>
</div> </div>
...@@ -271,7 +277,7 @@ ...@@ -271,7 +277,7 @@
<div class="search-box"> <div class="search-box">
<el-select v-model="searchType" :empty-values="[null, undefined]" style="width: 100%" filterable> <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.orgId" :label="item.orgName" :value="item.orgId" />
</el-select> </el-select>
</div> </div>
<div style="flex: auto;"></div> <div style="flex: auto;"></div>
...@@ -417,11 +423,11 @@ import { ElMessage } from "element-plus"; ...@@ -417,11 +423,11 @@ import { ElMessage } from "element-plus";
// 跳转行政机构主页 // 跳转行政机构主页
const handleToInstitution = item => { const handleToInstitution = item => {
window.sessionStorage.setItem("curTabName", item.name); window.sessionStorage.setItem("curTabName", item.orgName);
const curRoute = router.resolve({ const curRoute = router.resolve({
path: "/institution", path: "/institution",
query: { query: {
id: item.id id: item.orgId
} }
}); });
window.open(curRoute.href, "_blank"); window.open(curRoute.href, "_blank");
...@@ -447,13 +453,7 @@ const handleGetDepartmentList = async () => { ...@@ -447,13 +453,7 @@ const handleGetDepartmentList = async () => {
const res = await getDepartmentList(); const res = await getDepartmentList();
console.log("机构列表", res); console.log("机构列表", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
govInsList.value = res.data.map(item => { govInsList.value = res.data;
return {
id: item.orgId,
name: item.orgName,
img: item.orgImage
};
});
} }
} catch (error) { } catch (error) {
console.error("获取机构列表error", error); console.error("获取机构列表error", error);
...@@ -1390,15 +1390,17 @@ onMounted(async () => { ...@@ -1390,15 +1390,17 @@ onMounted(async () => {
} }
.home-main-header-item-box { .home-main-header-item-box {
margin-top: 48px; margin: 48px 0 64px;
margin-bottom: 64px;
width: 1600px; width: 1600px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 16px;
.item { .item {
width: 254px; width: 20%;
height: 72px; flex: auto;
height: 80px;
padding: 0 16px;
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
background: rgba(255, 255, 255, 0.65); background: rgba(255, 255, 255, 0.65);
...@@ -1406,8 +1408,7 @@ onMounted(async () => { ...@@ -1406,8 +1408,7 @@ onMounted(async () => {
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1); box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
align-items: center; align-items: center;
gap: 17px; justify-content: center;
margin: 0 6px 16px 6px;
cursor: pointer; cursor: pointer;
transition: transition:
transform 0.3s ease, transform 0.3s ease,
...@@ -1419,10 +1420,9 @@ onMounted(async () => { ...@@ -1419,10 +1420,9 @@ onMounted(async () => {
} }
.item-left { .item-left {
margin-left: 24px;
width: 48px; width: 48px;
height: 48px; height: 48px;
font-size: 0px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -1430,12 +1430,28 @@ onMounted(async () => { ...@@ -1430,12 +1430,28 @@ onMounted(async () => {
} }
.item-right { .item-right {
width: 140px; width: 20px;
flex: auto;
color: rgba(59, 65, 75, 1); color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
line-height: 24px; line-height: 20px;
margin: 0 16px;
}
.item-num {
white-space: nowrap;
font-family: Microsoft YaHei;
font-size: 20px;
font-weight: 700;
line-height: 20px;
margin-right: 2px;
color: var(--color-primary-100);
}
.item-more {
margin-right: 12px;
font-size: 16px;
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论