Commit dccfbc4a authored by 罗新东's avatar 罗新东

提交了我的延期加了标签页

parent 0efe2ef2
Pipeline #7576 passed with stage
in 17 seconds
...@@ -49,9 +49,9 @@ export default { ...@@ -49,9 +49,9 @@ export default {
], ],
// cachePage预先定义的缓存页面 // cachePage预先定义的缓存页面
otherCache: [], otherCache: [],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新 // 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
listCache:['insert-danger','confirme-danger','report-return','change-danger','review-danger','stand-book','major-danger','delay-approval', listCache:['insert-danger','confirme-danger','report-return','change-danger','review-danger','stand-book','major-danger','delay-approval',
'my-delay','risk-return','risk-account','risk-confirme'], 'my-delay','risk-return','risk-account','risk-confirme','my-delay'],
}; };
}, },
......
...@@ -16,80 +16,104 @@ ...@@ -16,80 +16,104 @@
</template> </template>
</van-search> </van-search>
</van-sticky> </van-sticky>
<van-tabs
<div class="con-list" @touchmove="showIndex = null"> v-model="active"
<van-cell-group @change="
inset postList(searchValue);
v-for="(item, index) in messageList" showIndex = null;
:key="index"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="7">隐患单编号:</van-col>
<van-col span="17">
{{ item.businessId || item.pid || item.id }}
</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">所属项目:</van-col>
<van-col span="17">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="" v-show="item.hdLev">
<van-col span="7">隐患级别:</van-col>
<van-col span="17">{{ item.hdLev | dangerText }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">适用范围:</van-col>
<van-col span="17">{{ item.hdRange }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患类型:</van-col>
<van-col span="17">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">超期标识:</van-col>
<van-col span="17">{{ item.dueDate | formatTime }}</van-col>
</van-row>
<van-row gutter="" v-if="item.taskName">
<van-col span="7">工单状态:</van-col>
<van-col span="17">{{ item.taskName }}</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item,'normal-detail')"
>隐患详情</van-button
><van-button round type="info" @click="goDetail(item,'finish-delay-detail')"
>延期查看</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
<!-- 暂无数据 -->
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
" "
v-if="messageList.length == 0" color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
> >
暂无数据 <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
</div> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<van-row gutter="">
<van-col span="7">隐患单编号:</van-col>
<van-col span="17">
{{ item.businessId || item.pid || item.id }}
</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">所属项目:</van-col>
<van-col span="17">{{ item.proId }}</van-col>
</van-row>
<van-row gutter="" v-show="item.hdLev">
<van-col span="7">隐患级别:</van-col>
<van-col span="17">{{
item.hdLev | dangerText
}}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">适用范围:</van-col>
<van-col span="17">{{ item.hdRange }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患类型:</van-col>
<van-col span="17">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">超期标识:</van-col>
<van-col span="17">{{
item.dueDate | formatTime
}}</van-col>
</van-row>
<van-row gutter="" v-if="item.taskName">
<van-col span="7">工单状态:</van-col>
<van-col span="17">{{ item.taskName }}</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button
round
type="primary"
@click="goDetail(item, 'normal-detail')"
>隐患详情</van-button
><van-button
round
type="info"
@click="
goDetail(item, 'finish-delay-detail')
"
>延期查看</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
<!-- 暂无数据 -->
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList.length == 0"
>
暂无数据
</div>
</van-tab>
</van-tabs>
</div> </div>
</template> </template>
<script> <script>
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 { Dialog } from "vant";
export default { export default {
name:'my-delay', name: "my-delay",
components: { components: {
LHeader, LHeader,
}, },
...@@ -98,7 +122,22 @@ export default { ...@@ -98,7 +122,22 @@ export default {
text: "我的延期", text: "我的延期",
searchValue: "", searchValue: "",
messageList: [], messageList: [],
showIndex: null, showIndex: null,
active: 0,
tabs: [
{
title: "待审批",
api: "/delayApply/finishDelayList",
},
{
title: "已通过",
api: "/delayApply/finishDelayListYes",
},
{
title: "已退回",
api: "/delayApply/finishDelayListNo",
},
],
}; };
}, },
created() { created() {
...@@ -117,7 +156,7 @@ export default { ...@@ -117,7 +156,7 @@ export default {
}); });
let formdata = new FormData(); let formdata = new FormData();
formdata.append("select", select); formdata.append("select", select);
postFun("/rectification/finishDelayList", formdata) postFun(this["tabs"][this.active]["api"], formdata)
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.$toast.clear(); this.$toast.clear();
...@@ -139,16 +178,16 @@ export default { ...@@ -139,16 +178,16 @@ export default {
}, },
// 详情 // 详情
goDetail(data,name='normal-detail') { goDetail(data, name = "normal-detail") {
let id=name=='normal-detail'?data.pid:data.id let id = name == "normal-detail" ? data.pid : data.id;
this.$router.push({ this.$router.push({
name, name,
params: { params: {
id id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
} },
}, },
filters: { filters: {
formatTime: function (val) { formatTime: function (val) {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</div> --> </div> -->
<!-- 滚动通知 --> <!-- 滚动通知 -->
<van-notice-bar left-icon="volume-o" :scrollable="false" mode="link"> <!-- <van-notice-bar left-icon="volume-o" :scrollable="false" mode="link">
<van-swipe <van-swipe
vertical vertical
class="notice-swipe" class="notice-swipe"
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<van-swipe-item>提示:您有1条待办事项需要处理</van-swipe-item> <van-swipe-item>提示:您有1条待办事项需要处理</van-swipe-item>
<van-swipe-item>提示:您有2条待办事项需要处理</van-swipe-item> <van-swipe-item>提示:您有2条待办事项需要处理</van-swipe-item>
</van-swipe> </van-swipe>
</van-notice-bar> </van-notice-bar> -->
<!-- 内容 --> <!-- 内容 -->
<div class="con"> <div class="con">
......
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