Commit 345823f0 authored by 13841799530's avatar 13841799530

解润东

20220509
类型接口调试
parent 2f8f1062
Pipeline #8273 passed with stage
in 5 minutes and 4 seconds
......@@ -91,7 +91,7 @@ export default {
methods: {
loading(){
postWork("patrol/running/listCycle").then((res) => {
this.sponsor = res.data[0].assignId
this.sponsor = res.data[0].assignName
this.contentLists.forEach((x)=>{
res.data.forEach((y)=>{
if(x.title==y.cycle){
......
......@@ -6,7 +6,7 @@
<!-- tab标签 -->
<van-tabs
v-model="active"
@change="onChange"
@click="onClick"
color="#2980f7"
animated
:sticky="true"
......@@ -21,7 +21,7 @@
<span class="con_title">日查</span>
<span>&nbsp;&nbsp;制度、规程、方案</span>
</van-col>-->
<van-col span="24" class="con_type">{{item.hdLev}}</van-col>
<van-col span="24" class="con_type">{{item.postName}}</van-col>
</van-row>
<van-row gutter>
<van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col>
......@@ -80,6 +80,7 @@
<script>
import LHeader from "@/components/header.vue";
import { postWork } from "@/service/workbench";
import { getFun, postFun } from "@/service/table.js";
export default {
name: "implement",
components: {
......@@ -91,19 +92,20 @@ export default {
text: "执行巡查",
messageList: [],
active: 0,
postType:'',
tabs: [
{
title: "安全管理类",
api: "/rectification/list1"
},
{
title: "文明施工类",
api: "/rectification/list2"
},
{
title: "临时用电类",
api: "/rectification/finishList"
}
// {
// title: "安全管理类",
// api: "/rectification/list1"
// },
// {
// title: "文明施工类",
// api: "/rectification/list2"
// },
// {
// title: "临时用电类",
// api: "/rectification/finishList"
// }
],
showPopover: false,
showPopoverFlag:[],
......@@ -113,13 +115,35 @@ export default {
if (this.$route.query.id) {
this.id = this.$route.query.id;
}
this.postList();
this.loadingTabs()
},
methods: {
onClick(name,title){
this.postType=title
this.postList()
},
loadingTabs(){
postWork("patrol/running/dict").then(res => {
this.postType=res.data[0].dictLabel
res.data.forEach((i)=>{
this.tabs.push({
title:i.dictLabel,
api:i.dictValue
})
})
this.postList();
this.$toast.clear();
})
.catch(err => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onChange() {
console.log(this.active);
},
postList(val) {
this.messageList=[]
this.$toast.loading({
message: "加载中...",
forbidClick: true,
......@@ -127,9 +151,10 @@ export default {
duration: 0
});
let obj = {
cycle: this.id
cycle: this.id,
postType:this.postType
};
postWork("patrol/running/list", obj)
postFun("patrol/running/list?cycle="+this.id+'&postType='+this.postType)
.then(res => {
this.messageList = res.data;
this.$toast.clear();
......
......@@ -34,8 +34,8 @@
<van-cell-group inset v-for="(item, index) in detailObj.list" :key="index">
<van-row gutte>
<van-col span="12">{{item.hdLev}}</van-col>
<van-col span="12" class="cont-end affirm-status">{{item.status|status}}</van-col>
<van-col span="12">{{item.hdLev|hdLev}}</van-col>
<van-col span="12" class="cont-end affirm-status">{{item.status}}</van-col>
</van-row>
<van-row gutter>
<van-col span="24">{{item.regulatoryBasis}}</van-col>
......@@ -113,13 +113,15 @@ export default {
})
return value
},
status(val){
if(val=='0'){
return '已认定'
}else if(val=='1'){
return '已撤回'
hdLev(val){
if(val=='S'){
return '重大隐患'
}else if(val=='A'){
return '严重隐患'
}else if(val=='B'){
return '较大隐患'
}else{
return '未知'
return '危险隐患'
}
}
},
......
......@@ -20,9 +20,9 @@
<span class="record-time">{{util.timestampToTime(item.startTime,'DT2',true)}}</span>
</van-col>
<van-col span="10">
<span class="record-time">{{util.timestampToTime(item.startTime,'DT2',true)}}</span>
<span class="record-time">{{util.timestampToTime(item.endTime,'DT2',true)}}</span>
</van-col>
<van-col span="4" class="cont-end record-status">已执行</van-col>
<van-col span="4" class="cont-end record-status">{{item.status|status}}</van-col>
</van-row>
<!-- <van-row gutte>
<van-col span="12">开始时间: 09:30</van-col>
......@@ -141,6 +141,15 @@ export default {
}
})
return value
},
status(val){
if(val=='0'){
return '已执行'
}else if(val=='1'){
return '已撤回'
}else{
return '未知'
}
}
},
mounted(){
......
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