Commit 39dc3020 authored by 罗新东's avatar 罗新东

修改了延期审批页面增加了页签

parent 961e799c
Pipeline #7153 passed with stage
in 11 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,7 +17,23 @@ ...@@ -15,7 +17,23 @@
</van-sticky> </van-sticky>
<!-- 内容列表 --> <!-- 内容列表 -->
<!-- 接口对接4 START --> <!-- 接口对接4 START -->
<div class="con-list" @touchmove="showIndex = null"> <van-tabs
v-model="active"
@change="
getList;
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="3rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div
class="con-list"
@touchmove="showIndex = null"
v-if="key == active"
>
<van-cell-group <van-cell-group
inset inset
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
...@@ -34,52 +52,34 @@ ...@@ -34,52 +52,34 @@
<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-col span="6">发现时间:</van-col>
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> -->
<!-- *接口对接4 END -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<template v-if="active == 0">
<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 round type="info" @click="goConfirm(item)"
>审批</van-button >审批
> </van-button>
</div> </div>
</van-overlay> </van-overlay>
</template>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 --> </van-tab>
<div </van-tabs>
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews"
>
暂无数据
</div>
<tab-bar :index="1"></tab-bar>
</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 { delayList } from "@/service/danger"; import { delayList } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar,
}, },
data() { data() {
return { return {
...@@ -89,6 +89,17 @@ export default { ...@@ -89,6 +89,17 @@ export default {
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
active: 0,
tabs: [
{
title: "待审批",
api: "/delayApply/list",
},
{
title: "已审批",
api: "/delayApply/finishList",
},
],
}; };
}, },
created() { created() {
...@@ -104,9 +115,9 @@ export default { ...@@ -104,9 +115,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);
postFun('/delayApply/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;
...@@ -122,7 +133,7 @@ export default { ...@@ -122,7 +133,7 @@ export default {
/*接口对接3 END*/ /*接口对接3 END*/
}, },
onSearch() { onSearch() {
this.getList(this.searchValue) this.getList(this.searchValue);
}, },
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
...@@ -133,15 +144,15 @@ export default { ...@@ -133,15 +144,15 @@ export default {
}, },
// 详情 // 详情
goDetail(data) { // goDetail(data) {
this.$router.push({ // this.$router.push({
name: "normal-detail", // name: "normal-detail",
params: { // params: {
id: data.businessId, // id: data.businessId,
}, // },
}); // });
this.showIndex = null; // this.showIndex = null;
}, // },
// 审批 // 审批
goConfirm(data) { goConfirm(data) {
this.$router.push({ this.$router.push({
......
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