|
|
@@ -1,6 +1,19 @@
|
|
|
<template>
|
|
|
<view class="container uni-container uni-container-bg">
|
|
|
- <u-list @scrolltolower="scrolltolower" v-if="tableData.length>0 && isLoaded">
|
|
|
+ <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"
|
|
|
+ :key="index" :inverted="true" :text="item.label" type="primary"
|
|
|
+ @click="setInverted(item.value,item.rotues)" :class="{bg:item.value==clicKValue}" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-section>
|
|
|
+ <component :is="selectedTag" v-if="selectedTag!=''">
|
|
|
+ <router-view v-if="selectedTag !== null">
|
|
|
+ </router-view>
|
|
|
+ </component>
|
|
|
+ <u-list @scrolltolower="scrolltolower" v-if="tableData.length>0 && isLoaded&&fireInspection">
|
|
|
<view class="top">
|
|
|
<view class="">
|
|
|
<u-search placeholder="请输入任务名称" bgColor="#edf6f9" borderColor="#4cb2b6" v-model="taskname"
|
|
|
@@ -51,8 +64,8 @@
|
|
|
<img :src="tan90" alt="暂无数据" />
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- 加载中 -->
|
|
|
- <isLodingModel></isLodingModel>
|
|
|
+ <!-- 加载中
|
|
|
+ <isLodingModel></isLodingModel> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -70,6 +83,12 @@
|
|
|
import config from '@/config'
|
|
|
const baseUrlImg = config.baseUrlImg
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ Drill: () => import('@/pagesA/fire/drill/index.vue'),
|
|
|
+ FpdDetection: () => import('@/pagesA/fire/fpd_detection/fpd_detection.vue'),
|
|
|
+ FireSpecial: () => import('@/pagesB/fire/fireSpecial/index.vue'),
|
|
|
+ FireWork: () => import('@/pagesB/fire/fireWork/index.vue')
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
isLoaded: false,
|
|
|
@@ -100,7 +119,41 @@
|
|
|
'https://cdn.uviewui.com/uview/album/9.jpg', 'https://cdn.uviewui.com/uview/album/10.jpg',
|
|
|
],
|
|
|
my: '',
|
|
|
- title: '暂无数据'
|
|
|
+ title: '暂无数据',
|
|
|
+ tagLabel: [{
|
|
|
+ value: 0,
|
|
|
+ rotues: '',
|
|
|
+ label: '消防检查结果'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 1,
|
|
|
+ rotues: 'Drill',
|
|
|
+ label: '检查项培训演练'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 2,
|
|
|
+ rotues: 'fpd-detection',
|
|
|
+ label: '消防设施维护和检测'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 3,
|
|
|
+ rotues: 'fire-special',
|
|
|
+ label: '特种作业人员'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 4,
|
|
|
+ rotues: 'fire-work',
|
|
|
+ label: '动火审批'
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ drill: false,
|
|
|
+ fireService: false,
|
|
|
+ special: false,
|
|
|
+ hotApproval: false,
|
|
|
+ fireInspection: true,
|
|
|
+ clicKValue: 0, //点击的样式
|
|
|
+ selectedTag:''
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -113,7 +166,7 @@
|
|
|
},
|
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
|
onLoad: function(option) {
|
|
|
- console.log(option,'option');
|
|
|
+ console.log(option, 'option');
|
|
|
if (option.my) {
|
|
|
this.my = option.my
|
|
|
}
|
|
|
@@ -124,10 +177,38 @@
|
|
|
this.tableData = []
|
|
|
this.getData(1);
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
+ setInverted(value, rotues) { //标签的点击事件
|
|
|
+ switch (value) {
|
|
|
+ case 0:
|
|
|
+ this.fireInspection = true //消防检查结果
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ this.drill = true //培训与演练
|
|
|
+ this.fireInspection = false
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ this.fireService = true //消防设施维护和检测
|
|
|
+ this.fireInspection = false
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ this.special = true //特种作业人员
|
|
|
+ this.fireInspection = false
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ this.hotApproval = true //动火审批
|
|
|
+ this.fireInspection = false
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ this.clicKValue = value
|
|
|
+ this.selectedTag = rotues;
|
|
|
+ },
|
|
|
changeLog(e) {
|
|
|
this.title = ''
|
|
|
- this.isLoaded=false
|
|
|
+ this.isLoaded = false
|
|
|
this.tableData = []
|
|
|
if (this.kewords.length > 0 && this.kewords[0].indexOf(":") === -1) {
|
|
|
this.kewords[0] = this.kewords[0] + ' 00:00:00'
|
|
|
@@ -144,11 +225,9 @@
|
|
|
// ================================
|
|
|
// 获取数据
|
|
|
getData(pageNo, value = '') {
|
|
|
-
|
|
|
this.loading = true;
|
|
|
this.pageNo = pageNo;
|
|
|
-
|
|
|
- let formChuan={
|
|
|
+ let formChuan = {
|
|
|
pageNo: this.pageNo,
|
|
|
pageSize: this.pageSize,
|
|
|
userId: this.$store.state.user.id,
|
|
|
@@ -168,7 +247,7 @@
|
|
|
this.total = response.data.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
- } else{
|
|
|
+ } else {
|
|
|
getInspecthisPage(formChuan).then(response => {
|
|
|
console.log('1111', response);
|
|
|
this.isLoaded = true
|
|
|
@@ -276,4 +355,12 @@
|
|
|
top: 2px !important;
|
|
|
padding-left: 3px !important;
|
|
|
}
|
|
|
+
|
|
|
+ ::v-deep .uni-section-header {
|
|
|
+ padding: 0 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg {
|
|
|
+ background-color: #bdbdbd;
|
|
|
+ }
|
|
|
</style>
|