Commit aaa85b0d authored by 王李辉's avatar 王李辉

巡查模拟接口初次对接

parent f1505463
Pipeline #8244 passed with stage
in 5 minutes and 2 seconds
......@@ -10,7 +10,7 @@
inset
v-for="(item, index) in contentList"
:key="index"
@click="onClick(item.content)"
@click="onClick(item)"
>
<div class="icon-wrap">
<span class="icon-img">
......@@ -98,7 +98,10 @@ export default {
},
onClick(val) {
this.$router.push({
name: "implement"
name: "implement",
query:{
id:val.title
}
});
}
}
......
......@@ -15,14 +15,13 @@
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 -->
<div class="con-list">
<!-- v-for="(item, index) in messageList" :key="index" -->
<van-cell-group inset>
<van-cell-group inset v-for="(item, index) in messageList" :key="index">
<van-row gutter>
<!-- <van-col span="18">
<span class="con_title">日查</span>
<span>&nbsp;&nbsp;制度、规程、方案</span>
</van-col> -->
<van-col span="24" class="con_type">危险隐患</van-col>
</van-col>-->
<van-col span="24" class="con_type">{{item.hdLev}}</van-col>
</van-row>
<van-row gutter>
<van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col>
......@@ -30,30 +29,30 @@
<van-row gutter class="cont-operation">
<van-col span="10" class="con_type">
<van-popover
v-model="showPopover"
v-model="showPopoverFlag[index]"
theme="dark"
trigger="click"
placement="bottom-start"
>
<span class="tip" @click="showPopover = false">《北京市地下有限空间管理办法》</span>
<template #reference class="width-auto">法律依据/出处</template>
<span class="tip">《北京市地下有限空间管理办法》</span>
<template #reference>法律依据/出处</template>
</van-popover>
</van-col>
<van-col span="14" class="con_right">
<van-radio-group
v-model="radio"
v-model="item.result"
direction="horizontal"
@change="operation"
@change="operation(item.result,index)"
>
<van-radio name="1" shape="square">合格</van-radio>
<van-radio name="2" shape="square">不合格</van-radio>
<van-radio :name="1" shape="square" :disabled="item.result == '2'">合格</van-radio>
<van-radio :name="2" shape="square" >不合格</van-radio>
</van-radio-group>
</van-col>
</van-row>
</van-cell-group>
</div>
<!-- 暂无数据 -->
<!-- <div
<div
style="
width: 100%;
text-align: center;
......@@ -62,7 +61,7 @@
top: 30%;
"
v-if="messageList.length == 0"
>暂无数据</div> -->
>暂无数据</div>
</van-tab>
</van-tabs>
......@@ -88,10 +87,10 @@ export default {
},
data() {
return {
id: "", //巡查周期id
text: "执行巡查",
messageList: [],
active: 0,
radio: "1",
tabs: [
{
title: "安全管理类",
......@@ -106,10 +105,14 @@ export default {
api: "/rectification/finishList"
}
],
showPopover: false
showPopover: false,
showPopoverFlag:[],
};
},
created() {
mounted() {
if (this.$route.query.id) {
this.id = this.$route.query.id;
}
this.postList();
},
methods: {
......@@ -124,11 +127,10 @@ export default {
duration: 0
});
let obj = {
cycle: 1
}
postWork("patrol/running/list",obj)
cycle: this.id
};
postWork("patrol/running/list", obj)
.then(res => {
console.log(res);
this.messageList = res.data;
this.$toast.clear();
})
......@@ -137,13 +139,24 @@ export default {
this.$toast.fail("加载失败,请稍后再试");
});
},
operation() {
operation(val, index) {
if(val == 1){
return
}
// 如果不合格跳转到隐患上报页面
if (this.radio == "2") {
this.$router.push({
name: "add-danger"
this.$dialog
.confirm({
title: "提示",
message: "确定跳转到隐患上报页面吗?"
})
.then(() => {
this.$router.push({
name: "add-danger"
});
})
.catch(() => {
this.messageList[index].result = 1
});
}
},
finish() {
this.$toast.loading({
......@@ -153,7 +166,7 @@ export default {
duration: 0
});
let obj2 = {
cycle: 1
cycle: this.id
};
postWork("patrol/running/save", obj2)
.then(res => {
......@@ -179,7 +192,7 @@ export default {
color: #2c3e50;
}
.con-list {
padding: 0;
padding: 0 0 60px;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
......@@ -232,7 +245,7 @@ export default {
}
.operation-btn {
width: 95%;
margin: 20px 10px 10px;
margin: 10px 10px;
position: fixed;
bottom: 50px;
right: 0;
......
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