Browse Source

修改预警信息(tab闪烁)

master
蟑螂恶霸 3 years ago
parent
commit
9915ee1649
  1. BIN
      src/assets/images/tab_shine_org.gif
  2. BIN
      src/assets/images/tab_shine_red.gif
  3. BIN
      src/assets/images/tab_shine_yel.gif
  4. 148
      src/views/enforce/enterpriseScanPreview.vue

BIN
src/assets/images/tab_shine_org.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

BIN
src/assets/images/tab_shine_red.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

BIN
src/assets/images/tab_shine_yel.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

148
src/views/enforce/enterpriseScanPreview.vue

@ -2,12 +2,11 @@
<div class="home app_content"> <div class="home app_content">
<!-- 导航栏 --> <!-- 导航栏 -->
<div class="header_body"> <div class="header_body">
<header-nav <header-nav
:slefBack="true" :slefBack="true"
@goBack="goBack" @goBack="goBack"
:titelText="`企业详情`" :titelText="`企业详情`"
> >
</header-nav> </header-nav>
</div> </div>
@ -15,15 +14,33 @@
<!-- 中间 --> <!-- 中间 -->
<div class="warp_body"> <div class="warp_body">
<div class="white-body"> <div class="white-body">
<van-tabs v-model:active="active"> <div class="tabs">
<van-tab title="企业画像"> <ul>
<enterpriseBaseInfo></enterpriseBaseInfo> <li v-for='(item,index) in data.list' @click='check(index)' :class="{ active: index === data.TabId }">
</van-tab> <span v-if="index === 0"> {{item.title}}</span>
<span v-else-if="index === 1 || item.warningLevel==0" class="warn-tab"> {{item.title}}</span>
<van-tab title="企业预警" class="header-box" /> <span v-else-if="index === 1 || item.warningLevel==1" class="warn-tab level1"> {{item.title}}</span>
<span v-else-if="index === 1 || item.warningLevel==2" class="warn-tab level2"> {{item.title}}</span>
<span v-else-if="index === 1 || item.warningLevel==3" class="warn-tab level3"> {{item.title}}</span>
</li>
</ul>
</div>
<div v-if="data.TabId === 0">
<enterpriseBaseInfo></enterpriseBaseInfo>
</div>
<div v-if="data.TabId === 1">
<enterpriseWarningInfo></enterpriseWarningInfo> <enterpriseWarningInfo></enterpriseWarningInfo>
</div>
<!-- <van-tabs v-model:active="active">-->
<!-- <van-tab title="企业画像">-->
<!-- <enterpriseBaseInfo></enterpriseBaseInfo>-->
<!-- </van-tab>-->
</van-tabs> <!-- <van-tab title="企业预警" class="header-box" />-->
<!-- <enterpriseWarningInfo></enterpriseWarningInfo>-->
<!-- </van-tabs>-->
</div> </div>
</div> </div>
@ -52,7 +69,19 @@ const data = reactive({
// enterpriseNumber:"a7cbb677c11e4dffa810b4ad3abedc09$eb020e1a24a8a19a0bdc07b191aa9ce7", // enterpriseNumber:"a7cbb677c11e4dffa810b4ad3abedc09$eb020e1a24a8a19a0bdc07b191aa9ce7",
enterpriseNumber:route?.query?.enterpriseNumber, enterpriseNumber:route?.query?.enterpriseNumber,
warningInfo:{}, warningInfo:{},
searchParam:{} searchParam:{},
status:0,
TabId: 0,
list: [
{
title: '企业画像',
value: '0'
},
{
title: '企业预警',
value: '1'
},
]
}); });
const boutiqueAttr = reactive({ const boutiqueAttr = reactive({
columnNum: 4, columnNum: 4,
@ -60,7 +89,9 @@ const boutiqueAttr = reactive({
goodsCradclass: "boutique-crad", goodsCradclass: "boutique-crad",
}); // 商品卡片展示 }); // 商品卡片展示
const check = (index) =>{
data.TabId = index;
};
// 返回首页 // 返回首页
const toEnforceHomeView = () =>{ const toEnforceHomeView = () =>{
@ -170,37 +201,106 @@ const goBack = () => {
font-size: 0.5rem; font-size: 0.5rem;
} }
/deep/ .van-tabs__wrap { ///deep/ .van-tabs__wrap {
padding: 2% 3%; // padding: 2% 3%;
//}
//
///deep/ .van-tab:nth-child(1) {
// color: #4aa1f9;
// background: url("../../assets/images/tab_bg1_1.png") no-repeat;
// background-size: 100% 100%;
//}
//
///deep/ .van-tab:nth-child(1).van-tab--active {
// color: #fff;
// background: url("../../assets/images/tab_bg1.png") no-repeat;
// background-size: 100% 100%;
//}
//
///deep/ .van-tab:nth-child(2) {
// color: #4aa1f9;
// background: url("../../assets/images/tab_bg.png") no-repeat;
// background-size: 100% 100%;
// animation: test 1000ms infinite;
// -webkit-animation: test 1000ms infinite;
//}
//
///deep/ .van-tab:nth-child(2).van-tab--active {
// color: #fff;
// background: url("../../assets/images/tab_bg_1.png") no-repeat;
// background-size: 100% 100%;
//}
///deep/ .van-tabs__line {
// background-color: transparent;
//}
.tabs {
padding: 3% 3%;
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;
} }
/deep/ .van-tab:nth-child(1) { .tabs ul li {
float: left;
width: 50%;
height: 100%;
}
.tabs ul li span {
display: block;
width: 100%;
height: 100%;
color: #4aa1f9; color: #4aa1f9;
background: url("../../assets/images/tab_bg1_1.png") no-repeat; background: url("../../assets/images/tab_bg1_1.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
/deep/ .van-tab:nth-child(1).van-tab--active { .tabs ul li.active span {
color: #fff;
background: url("../../assets/images/tab_bg1.png") no-repeat; background: url("../../assets/images/tab_bg1.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: #fff;
} }
/deep/ .van-tab:nth-child(2) { .tabs ul li span.warn-tab {
color: #4aa1f9; margin-left: -2%;
background: url("../../assets/images/tab_bg.png") no-repeat; background: url("../../assets/images/tab_bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
animation: test 1000ms infinite;
-webkit-animation: test 1000ms infinite;
} }
/deep/ .van-tab:nth-child(2).van-tab--active { .tabs ul li.active span.warn-tab {
color: #fff;
background: url("../../assets/images/tab_bg_1.png") no-repeat; background: url("../../assets/images/tab_bg_1.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: #fff;
}
.tabs ul li span.level1 {
background: url("../../assets/images/tab_shine_red.gif") no-repeat !important;
background-size: 100% 100% !important;
color: #fff !important;
} }
/deep/ .van-tabs__line {
background-color: transparent; .tabs ul li span.level2 {
background: url("../../assets/images/tab_shine_org.gif") no-repeat !important;
background-size: 100% 100% !important;
color: #fff !important;
}
.tabs ul li span.level3 {
background: url("../../assets/images/tab_shine_yel.gif") no-repeat !important;
background-size: 100% 100% !important;
color: #fff !important;
} }
.addinfo { .addinfo {

Loading…
Cancel
Save