You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
186 lines
3.6 KiB
186 lines
3.6 KiB
|
7 months ago
|
<template>
|
||
|
|
<div class="home app_content">
|
||
|
|
|
||
|
|
<van-tabs v-model:active="data.TabId" sticky @click-tab="onClickTab">
|
||
|
|
<van-tab v-for="(item, index) in data.list" :key="index" :title="item.title">
|
||
|
|
<div v-if="data.TabId == 0" style="height: calc(100vh - 1.2rem);">
|
||
|
|
<enforcementPlanAdd :isReg="0" />
|
||
|
|
</div>
|
||
|
|
<div v-if="data.TabId == 1" style="height: calc(100vh - 1.2rem);">
|
||
|
|
<enforcementPlanList :isReg="1" />
|
||
|
|
</div>
|
||
|
|
</van-tab>
|
||
|
|
</van-tabs>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup name="enforceNoticeBase">
|
||
|
|
import enforcementPlanAdd from '@/views/enforce/enforceNotice.vue';
|
||
|
|
import enforcementPlanList from '@/views/enforce/enforceNoticeSystem.vue';
|
||
|
7 months ago
|
import {detail} from "@/api/enforce";
|
||
|
7 months ago
|
|
||
|
|
const {useCommon} = $globalStore;
|
||
|
|
//路由参数
|
||
|
|
const router = useRouter();
|
||
|
|
const route = useRoute();
|
||
|
|
|
||
|
|
|
||
|
|
//tab切换
|
||
|
|
let active = ref(0);
|
||
|
|
const data = reactive({
|
||
|
|
status: 0,
|
||
|
|
TabId: 0,
|
||
|
|
list: [
|
||
|
|
{
|
||
|
|
title: '计划通知',
|
||
|
|
value: '0'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '日常通知',
|
||
|
|
value: '1'
|
||
|
|
},
|
||
|
|
],
|
||
|
|
});
|
||
|
|
|
||
|
|
const onClickTab = ({ title }) => {
|
||
|
|
if(title == '计划通知'){
|
||
|
|
data.TabId = 0;
|
||
|
|
}else{
|
||
|
|
data.TabId = 1;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
onMounted(() => {
|
||
|
|
let type = route.query?.type;
|
||
|
|
if (type!=null && type =='0') {
|
||
|
|
data.TabId = 0;
|
||
|
|
}else if (type!=null && type =='1'){
|
||
|
|
data.TabId = 1;
|
||
|
|
}
|
||
|
|
})
|
||
|
|
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="less" scoped>
|
||
|
|
.home {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
height: 100%;
|
||
|
|
overflow: hidden;
|
||
|
|
background-color: #ebf3fb;
|
||
|
|
|
||
|
|
.warp_body {
|
||
|
|
position: relative;
|
||
|
|
background-image: linear-gradient(to bottom, #ebf3fb, transparent);
|
||
|
|
}
|
||
|
|
|
||
|
|
.white-body {
|
||
|
|
margin: 0 3%;
|
||
|
|
width: 94%;
|
||
|
|
height: 99%;
|
||
|
|
background-color: #fff;
|
||
|
|
border-radius: 0.27rem;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.tohome {
|
||
|
|
position: absolute;
|
||
|
|
top: 1.25%;
|
||
|
|
right: 5%;
|
||
|
|
font-size: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs {
|
||
|
|
padding: 3% 3% 0;
|
||
|
|
width: 94%;
|
||
|
|
height: 1.25rem;
|
||
|
|
box-sizing: content-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul {
|
||
|
|
display: flex;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
font-size: 0.4rem;
|
||
|
|
line-height: 1.25rem;
|
||
|
|
text-align: center;
|
||
|
|
align-content: center;
|
||
|
|
justify-items: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li {
|
||
|
|
float: left;
|
||
|
|
width: 50%;
|
||
|
|
height: 100%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li span {
|
||
|
|
display: block;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
color: #4aa1f9;
|
||
|
|
background: url("src/assets/images/tab_bg1_1.png") no-repeat;
|
||
|
|
background-size: 100% 100%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li.active span {
|
||
|
|
background: url("src/assets/images/tab_bg1.png") no-repeat;
|
||
|
|
background-size: 100% 100%;
|
||
|
|
color: #fff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li span.warn-tab {
|
||
|
|
margin-left: -2%;
|
||
|
|
background: url("src/assets/images/tab_bg.png") no-repeat;
|
||
|
|
background-size: 100% 100%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li.active span.warn-tab {
|
||
|
|
background: url("src/assets/images/tab_bg_1.png") no-repeat;
|
||
|
|
background-size: 100% 100%;
|
||
|
|
color: #fff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li span.level1 {
|
||
|
|
background: url("src/assets/images/tab_shine_red.gif") no-repeat !important;
|
||
|
|
background-size: 100% 100% !important;
|
||
|
|
color: #fff !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li span.level2 {
|
||
|
|
background: url("src/assets/images/tab_shine_org.gif") no-repeat !important;
|
||
|
|
background-size: 100% 100% !important;
|
||
|
|
color: #fff !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabs ul li span.level3 {
|
||
|
|
background: url("src/assets/images/tab_shine_yel.gif") no-repeat !important;
|
||
|
|
background-size: 100% 100% !important;
|
||
|
|
color: #fff !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
.addinfo {
|
||
|
|
position: absolute;
|
||
|
|
bottom: 3%;
|
||
|
|
right: 2%;
|
||
|
|
z-index: 99999;
|
||
|
|
width: 1.5rem;
|
||
|
|
height: 1.5rem;
|
||
|
|
background-color: #1367fe;
|
||
|
|
border-radius: 50%;
|
||
|
|
box-shadow: 0 0 0.27rem #1367fe;
|
||
|
|
color: #fff;
|
||
|
|
font-size: 0.4rem;
|
||
|
|
text-align: center;
|
||
|
|
vertical-align: middle;
|
||
|
|
padding-top: 0.45rem;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
/deep/ .van-tabs__line {
|
||
|
|
width: 44%;
|
||
|
|
height: 0.06rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
</style>
|