|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="container uni-container uni-container-bg">
|
|
|
- <uni-section title="" padding style="background-color: #F5F7F9;">
|
|
|
+<!-- <uni-section title="" padding style="background-color: #F5F7F9;">
|
|
|
<view class="example-body">
|
|
|
<view class="tag-view" style="display: flex;flex-wrap: wrap;">
|
|
|
<uni-tag style="margin: 5px;cursor: pointer;padding: 5px;" v-for="(item,index) in tagLabel"
|
|
@@ -8,7 +8,12 @@
|
|
|
@click="setInverted(item.value,item.rotues)" :class="{bg:item.value==clicKValue}" />
|
|
|
</view>
|
|
|
</view>
|
|
|
- </uni-section>
|
|
|
+ </uni-section> -->
|
|
|
+ <view style="margin-bottom: 20rpx;">
|
|
|
+ <u-tabs :list="items" @click="onClickItem" activeStyle="color:#4CB2B6" inactiveStyle="color:#000"
|
|
|
+ :current="current" :scrollable="true" lineWidth="60" lineColor="#4CB2B6"></u-tabs>
|
|
|
+ <view style="height: 2rpx;background-color: #E5E5E5;margin-top: 10rpx;"></view>
|
|
|
+ </view>
|
|
|
<component :is="selectedTag" v-if="selectedTag!=''">
|
|
|
</component>
|
|
|
<view class="" v-else-if="fireInspection">
|
|
@@ -91,6 +96,17 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ items: [{
|
|
|
+ name: '消防检查结果'
|
|
|
+ }, {
|
|
|
+ name: '检查项培训演练'
|
|
|
+ }, {
|
|
|
+ name: '消防设施维护和检测'
|
|
|
+ }, {
|
|
|
+ name: '特种作业人员'
|
|
|
+ }, {
|
|
|
+ name: '动火审批'
|
|
|
+ }],
|
|
|
isLoaded: false,
|
|
|
tan90: `${baseUrlImg}/tan90.png`,
|
|
|
// 数据
|
|
@@ -146,7 +162,8 @@
|
|
|
hotApproval: false,
|
|
|
fireInspection: true,
|
|
|
clicKValue: 0, //点击的样式
|
|
|
- selectedTag: ''
|
|
|
+ selectedTag: '',
|
|
|
+ current:''
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -170,10 +187,43 @@
|
|
|
this.getData(1);
|
|
|
this.selectedTag =''
|
|
|
this.fireInspection =true
|
|
|
- this.clicKValue=0
|
|
|
+ this.current=0
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // tab头部点击
|
|
|
+ onClickItem(e) {
|
|
|
+ if (this.current !== e.index) {
|
|
|
+ this.current = e.index
|
|
|
+ }
|
|
|
+ this.fireInspection = false;
|
|
|
+ switch (e.index) {
|
|
|
+ case 0:
|
|
|
+ this.fireInspection = true //消防检查结果
|
|
|
+ this.selectedTag=''
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ this.drill = true //培训与演练
|
|
|
+ this.selectedTag='Drill'
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ this.fireService = true //消防设施维护和检测
|
|
|
+ this.selectedTag='FpdDetection'
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ this.special = true //特种作业人员
|
|
|
+ this.selectedTag='FireSpecial'
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ this.hotApproval = true //动火审批
|
|
|
+ this.selectedTag='FireWork'
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ console.log(this.current,'l');
|
|
|
+
|
|
|
+ },
|
|
|
setInverted(value, rotues) { //标签的点击事件
|
|
|
this.fireInspection = false;
|
|
|
// this.drill = false;
|
|
@@ -184,7 +234,7 @@
|
|
|
case 0:
|
|
|
this.fireInspection = true //消防检查结果
|
|
|
break;
|
|
|
- // case 1:
|
|
|
+ case 1:
|
|
|
// this.drill = true //培训与演练
|
|
|
// break;
|
|
|
// case 2:
|
|
@@ -196,8 +246,8 @@
|
|
|
// case 4:
|
|
|
// this.hotApproval = true //动火审批
|
|
|
// break;
|
|
|
- default:
|
|
|
- break;
|
|
|
+ // default:
|
|
|
+ // break;
|
|
|
}
|
|
|
this.clicKValue = value
|
|
|
this.selectedTag = rotues;
|