Commit bd22910d authored by 13841799530's avatar 13841799530

详情接口联调

解润东
20220506
parent ad0258de
...@@ -6,51 +6,48 @@ ...@@ -6,51 +6,48 @@
<div class="con-list"> <div class="con-list">
<van-cell-group inset> <van-cell-group inset>
<van-row gutte> <van-row gutte>
<van-col span="24">项目名称: XXX回迁房新建工程</van-col> <van-col span="24">项目名称: {{this.detailObj.projectName}}</van-col>
</van-row> </van-row>
<van-row gutte> <van-row gutte>
<van-col span="24">项目名称: 专职安全员</van-col> <van-col span="24">岗位: {{this.detailObj.postName}}</van-col>
</van-row> </van-row>
<van-row gutte> <!-- <van-row gutte>
<van-col span="12">开始巡查时间: 09:30</van-col> <van-col span="12">开始巡查时间: 09:30</van-col>
<van-col span="12" class="cont-end">结束巡查时间: 11:25</van-col> <van-col span="12" class="cont-end">结束巡查时间: 11:25</van-col>
</van-row> </van-row> -->
<van-row gutter> <!-- <van-row gutter>
<van-col span="24">巡查时长: 2小时13分</van-col> <van-col span="24">巡查时长: 2小时13分</van-col>
</van-row> </van-row> -->
<van-row gutter> <van-row gutter>
<van-col span="24">上报隐患: 8</van-col> <van-col span="24">巡查类型: {{this.detailObj.postType}}</van-col>
</van-row> </van-row>
<van-row gutter> <van-row gutter>
<van-col span="24">确认隐患: 5</van-col> <van-col span="24">巡查批次: {{this.detailObj.cycle|cycle}}</van-col>
</van-row> </van-row>
</van-cell-group> <van-row gutter>
<van-col span="24">上报隐患: {{this.detailObj.hdReportCount}}</van-col>
<van-cell-group inset>
<van-row gutte>
<van-col span="12">制度、规程、方案</van-col>
<van-col span="12" class="cont-end affirm-status">已认定</van-col>
</van-row> </van-row>
<van-row gutter> <van-row gutter>
<van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col> <van-col span="24">确认隐患: {{this.detailObj.hdConfirmCount}}</van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
<van-cell-group inset> <van-cell-group inset v-for="(item, index) in detailObj.list" :key="index">
<van-row gutte> <van-row gutte>
<van-col span="12">制度、规程、方案</van-col> <van-col span="12">危险级别:{{item.hdLev}}</van-col>
<van-col span="12" class="cont-end back-status">已退回</van-col> <van-col span="12" class="cont-end affirm-status">{{item.status|status}}</van-col>
</van-row> </van-row>
<van-row gutter> <van-row gutter>
<van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col> <van-col span="24">{{item.regulatoryBasis}}</van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
</div> </div>
<tab-bar :index="1"></tab-bar> <tab-bar :index="1"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
let that;
import tabBar from "@/components/TabBar"; 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";
...@@ -65,11 +62,88 @@ export default { ...@@ -65,11 +62,88 @@ export default {
return { return {
text: "记录详情", text: "记录详情",
messageList: [], messageList: [],
isHaveNews: false isHaveNews: false,
cycle:'',
startTime:'',
detailObj:{
},
contentList:[
{
id: "1",
content: "日查"
},
{
id: "2",
content: "周查"
},
{
id: "3",
content: "半月查"
},
{
id: "4",
content: "月查"
},
{
id: "5",
content: "季查"
},
{
id: "6",
content: "半年查"
},
{
id: "7",
content: "年查"
}
]
}; };
}, },
created() {}, beforeCreate () {
methods: {} that = this
},
filters:{
cycle(val){
var value;
that.contentList.forEach((i)=>{
if(i.id==val){
value=i.content
}
})
return value
},
status(val){
if(val=='0'){
return '已认定'
}else if(val=='1'){
return '已撤回'
}else{
return '未知'
}
}
},
mounted(){
if(this.$route.query.cycle){
this.cycle=this.$route.query.cycle
}
if(this.$route.query.startTime){
this.startTime=this.$route.query.startTime
}
this.loading()
},
methods: {
loading(){
this.detailObj={}
var obj={
cycle:this.cycle,
startTime:this.util.timestampToTime(this.startTime,'DT5',true)
}
getFun("patrol/details/list",obj).then((res) => {
this.detailObj=res.data
})
}
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -175,7 +175,11 @@ export default { ...@@ -175,7 +175,11 @@ export default {
goDetail(data) { goDetail(data) {
console.log(data) console.log(data)
this.$router.push({ this.$router.push({
name: "record-detail" name: "record-detail",
query:{
cycle:data.cycle,
startTime:data.startTime
}
}); });
// 先跳转到详情页 // 先跳转到详情页
// this.$router.push({ // this.$router.push({
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="title">2022年4月26日</div> <div class="title">2022年4月26日</div>
<p class="title-text">巡查发起人:李斌</p> <p class="title-text">巡查发起人:{{assignName}}</p>
<p class="title-text">系统提示:请依据当日任务完成当日巡查工作。</p> <p class="title-text">系统提示:请依据当日任务完成当日巡查工作。</p>
<div class="con-list"> <div class="con-list">
<van-cell-group <van-cell-group
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
data() { data() {
return { return {
text: "巡查记录", text: "巡查记录",
assignName:'',
contentList: [ contentList: [
], ],
...@@ -88,8 +89,9 @@ export default { ...@@ -88,8 +89,9 @@ export default {
methods: { methods: {
loading(){ loading(){
getFun("patrol/cycle/list").then((res) => { getFun("patrol/cycle/list").then((res) => {
this.assignName=res.data.assignName
this.contentLists.forEach((x)=>{ this.contentLists.forEach((x)=>{
res.data.forEach((y)=>{ res.data.cycle.forEach((y)=>{
if(x.title==y){ if(x.title==y){
this.contentList.push(x) this.contentList.push(x)
} }
......
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