Commit 879323c8 authored by 罗新东's avatar 罗新东

重大风险添加了标签页

parent 88c66b2e
Pipeline #7309 passed with stage
in 9 seconds
<template> <template>
<div> <div>
<van-sticky :offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky>
<!-- <van-sticky offset-top="1.5rem"> <!-- <van-sticky offset-top="1.5rem">
<van-search <van-search
v-model="searchValue" v-model="searchValue"
...@@ -15,6 +17,18 @@ ...@@ -15,6 +17,18 @@
</van-sticky> --> </van-sticky> -->
<!-- 内容列表 --> <!-- 内容列表 -->
<!-- 接口对接4 START --> <!-- 接口对接4 START -->
<van-tabs
v-model="active"
@change="
getList();
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="1.5rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
inset inset
...@@ -24,7 +38,9 @@ ...@@ -24,7 +38,9 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="6">隐患编号:</van-col> <van-col span="6">隐患编号:</van-col>
<van-col span="18">{{ item.businessId }}</van-col> <van-col span="18">{{
item.businessId || item.id
}}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">所属项目:</van-col> <van-col span="6">所属项目:</van-col>
...@@ -32,25 +48,30 @@ ...@@ -32,25 +48,30 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">隐患级别:</van-col> <van-col span="6">隐患级别:</van-col>
<van-col span="18">{{ item.hdLev | dangerText }}</van-col> <van-col span="18">{{
item.hdLev | dangerText
}}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row>
<!-- <van-row gutter="">
<van-col span="6">发现时间:</van-col>
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> -->
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button
round
type="primary"
@click="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @click="goConfirm(item)" <van-button
v-show="active == 1"
round
type="info"
@click="goConfirm(item)"
>审批</van-button >审批</van-button
> >
</div> </div>
...@@ -66,20 +87,18 @@ ...@@ -66,20 +87,18 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="isHaveNews" v-if="messageList['length'] == 0"
> >
暂无数据 暂无数据
</div> </div>
<tab-bar :index="1"></tab-bar> </van-tab>
</van-tabs>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { majorList } from "@/service/danger";
/*接口对接2 START*/ /*接口对接2 START*/
// 例子: // 例子:
// import { // import {
...@@ -98,7 +117,6 @@ import { majorList } from "@/service/danger"; ...@@ -98,7 +117,6 @@ import { majorList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar
}, },
data() { data() {
return { return {
...@@ -106,15 +124,26 @@ export default { ...@@ -106,15 +124,26 @@ export default {
searchValue: "", searchValue: "",
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
// myHDMajorList
active: 0,
tabs: [
{
title: "待确认",
api: "/majorapprove/list",
},
{
title: "已审批",
api: "/majorapprove/myHDMajorList",
},
],
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
getList(select='') { getList(select = "") {
/*接口对接3 START*/ /*接口对接3 START*/
// 例子: // 例子:
this.$toast.loading({ this.$toast.loading({
...@@ -123,9 +152,9 @@ export default { ...@@ -123,9 +152,9 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0, duration: 0,
}); });
let formdata=new FormData(); let formdata = new FormData();
formdata.append('select',select); formdata.append("select", select);
majorList("/majorapprove/list",formdata) postFun(this.tabs[this.active]["api"], formdata)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
...@@ -141,7 +170,7 @@ export default { ...@@ -141,7 +170,7 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
this.getList(this.searchValue) this.getList(this.searchValue);
}, },
touchstart(index, item) { touchstart(index, item) {
...@@ -157,7 +186,7 @@ export default { ...@@ -157,7 +186,7 @@ export default {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: data.taskId, id: data.taskId||data.id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
...@@ -210,4 +239,7 @@ export default { ...@@ -210,4 +239,7 @@ export default {
} }
} }
} }
/deep/.van-tab__pane {
min-height: 8rem;
}
</style> </style>
...@@ -101,17 +101,6 @@ export default { ...@@ -101,17 +101,6 @@ export default {
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
active: 0,
tabs: [
{
title: "我的上报",
api: "/riskMain/myList",
},
{
title: "上报退回",
api: "/riskMain/list",
},
],
}; };
}, },
created() { created() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment