123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <template>
- <view>
- <view class="section">
- <view class="box">
- <view class="title">
- 风机参数
- </view>
- <view class="content">
- <view class="inner">
- <view class="inner_title">
- <view class="title_item" :class="active == 1?'title_item_active':''" @click="click_title(1)">
- 1#风机
- </view>
- <view class="title_item" :class="active == 2?'title_item_active':''" @click="click_title(2)">
- 2#风机
- </view>
- </view>
- <view v-if="active == 1">
- <view class="inner_box">
- <view class="box_title">
- <view class="text name">参数名称</view>
- <view class="text num">数值</view>
- <view class="text company">单位</view>
- </view>
- <view class="box_list">
- <view class="item" v-for="(item,index) in param1" :key="index">
- <view class="text name">{{item.name}}</view>
- <view class="text num">
- <view class="num_box">{{item.value}}</view>
- </view>
- <view class="text company">{{item.unit}}</view>
- </view>
-
- </view>
-
- </view>
- </view>
- <view v-if="active == 2">
- <view class="inner_box">
- <view class="box_title">
- <view class="text name">参数名称</view>
- <view class="text num">数值</view>
- <view class="text company">单位</view>
- </view>
- <view class="box_list">
- <view class="item" v-for="(item,index) in param2" :key="index">
- <view class="text name">{{item.name}}</view>
- <view class="text num">
- <view class="num_box">{{item.value}}</view>
- </view>
- <view class="text company">{{item.unit}}</view>
- </view>
- </view>
-
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props:[
- "param1",
- "param2"
- ],
- data() {
- return {
- active:1,
- };
- },
- methods:{
- click_title(active){
- this.active = active
- }
- }
- }
- </script>
- <style lang="scss">
- .section{
- margin-top: 10rpx;
- box-sizing: border-box;
- padding: 0 15rpx;
-
- .box{
- background: #FFFFFF;
- box-shadow: 0px 3rpx 30rpx 0px rgba(59, 74, 116, 0.14);
- border-radius: 21rpx;
-
- .title{
- width: 750rpx;
-
- font-size: 32rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #232627;
- line-height: 100rpx;
- text-align: center;
-
- border-bottom: 2rpx solid #f3f3f3;
- }
- .content{
- .inner{
- box-sizing: border-box;
- padding: 0 15rpx;
- .inner_title{
- height: 74rpx;
- display: flex;
- .title_item{
- width: 188rpx;
- text-align: center;
- font-size: 31rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #6C6F74;
- line-height: 74rpx;
-
- }
- .title_item_active{
- color: #3498DB;
- border-bottom: 3rpx solid #3498d8;
- }
- }
- .inner_box{
- margin-top: 17rpx;
- margin-bottom: 20rpx;
- padding-bottom: 20rpx;
- width: 690rpx;
- .box_title{
- display: flex;
- background: #F3F6FA;
- .text{
- font-size: 27rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #232627;
- line-height: 83rpx;
- text-align: center;
- }
- .name{
- width: 324rpx;
- }
- .num{
- margin-left: 26rpx;
- width: 162rpx;
- }
- .company{
- margin-left: 16rpx;
- width: 162rpx;
- }
- }
- .box_list{
- .item{
- display: flex;
-
- border-bottom: 1rpx solid #f3f3f3;
- .text{
- font-size: 27rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #232627;
- line-height: 83rpx;
- text-align: center;
- }
- .name{
- width: 324rpx;
- }
- .num{
- margin-left: 26rpx;
- width: 162rpx;
- .num_box{
- margin-top: 22rpx;
- background: #8ADAFF;
- line-height: 40rpx;
- }
- }
- .company{
- margin-left: 16rpx;
- width: 162rpx;
- }
- }
- }
- }
- }
- }
- }
- }
- </style>
|