daofu-large-screen/src/views/home-page/left-side/components/workSituation.vue
2024-01-26 17:45:40 +08:00

149 lines
4.5 KiB
Vue

<!-- 工作开展情况 -->
<template>
<div class="side-bg">
<TitleC title="工作开展情况"></TitleC>
<TitleD width="100">
<!-- <div class="work_title">气象预警信息</div> -->
<div
class="module_top_title"
v-for="(item, index) in label"
:key="index"
@click="clickMenuOption(item.id)"
:class="
item.check == true
? 'module_menu_selected'
: 'module_menu_notSelected'
"
>
{{ item.title }}
</div>
</TitleD>
<div class="work_con conBox">
<div v-for="(item, index) in data" :key="index">
<div>{{ item.index }}</div>
<img
src="../../../../assets/images/home-page/left/barometer.png"
alt=""
/>
<el-tooltip
class="box-item"
effect="dark"
:content="item.con"
placement="top-start"
popper-class="work_tip"
>
<div>{{ item.con }}</div>
</el-tooltip>
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, ref, watchEffect } from "vue";
export default defineComponent({
name: "WorkSituation",
});
</script>
<script setup lang='ts'>
const visible = ref(false);
const label = ref([
{ title: "党建统领", check: true, id: 0 },
{ title: "平安法治", check: false, id: 1 },
{ title: "经济生态", check: false, id: 2 },
{ title: "公共服务", check: false, id: 3 },
]);
const data = [
{
index: 1,
con: "每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况...",
},
{
index: 2,
con: "每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况...",
},
{
index: 3,
con: "每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况...",
},
{
index: 4,
con: "每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况,每日工作动态的自动读取形成近期工作开展情况...",
},
];
const clickMenuOption = (id: any) => {
label.value.forEach((item) => {
item.check = false;
});
label.value[id].check = true;
};
</script>
<style lang="scss" scoped>
.side-bg {
// height: 45%;
}
.work_title {
font-size: 16px;
font-family: Source Han Sans SC, Source Han Sans SC;
font-weight: 400;
color: #ffe7cd;
}
.work_con {
width: 100%;
height: 244px;
padding: 12px 8px;
overflow-y: scroll;
> div:not(:nth-child(1)) {
// margin-top: ;
}
> div {
display: flex;
justify-content: space-between;
align-items: center;
height: 68px;
padding: 10px 13px;
> div:nth-of-type(1) {
width: 24px;
height: 16px;
box-sizing: border-box;
border: 1px solid #ff7734;
background-color: #ff7734 10%;
line-height: 14px;
text-align: center;
font-size: 12px;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
color: #ff7734;
}
> img {
width: 70px;
height: 48px;
}
> div:nth-of-type(2) {
width: 408px;
height: 48px;
font-size: 12px;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
color: #d0deee;
//超出两行省略号
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
}
}
}
.work_con::-webkit-scrollbar {
display: none;
}
</style>
<style>
.work_tip {
max-width: 408px !important;
}
</style>