297 lines
8.5 KiB
Vue
297 lines
8.5 KiB
Vue
<template>
|
||
<view class="dangerbig-details">
|
||
<headers class="fixedheader" :themeType="true" :showBack="true">
|
||
<view class="headerName">
|
||
危大工程详情
|
||
</view>
|
||
</headers>
|
||
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
|
||
<view class="detail-content">
|
||
<view class="list">
|
||
<view class="list-info">
|
||
工程名称:<text class="detail-data">{{detailData.engineeringName}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
工程类别:<text class="detail-data">{{detailData.engineeringTypeName}}</text>
|
||
</view>
|
||
<view v-show="isShow">
|
||
<view class="list-info">
|
||
工程概况:<text class="detail-data">{{detailData.engineeringSurvey ? detailData.engineeringSurvey : "无"}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
类别描述:<text class="detail-data">{{detailData.describeName ? detailData.describeName : "无"}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
施工部位:<text class="detail-data">{{detailData.constructionLocation ? detailData.constructionLocation : "无"}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
计划时间:<text class="detail-data">{{detailData.planStartTime}}~{{detailData.planEndTime}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
施工时间:<text class="detail-data">{{detailData.buildStartTime}}~{{detailData.buildEndTime}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
负责人:<text class="detail-data">{{detailData.personLiable ? detailData.personLiable : "无"}}</text>
|
||
</view>
|
||
<view class="list-info">
|
||
责任分包:<text class="detail-data">{{detailData.responsibilityCompany ? detailData.responsibilityCompany : "无"}}</text>
|
||
</view>
|
||
</view>
|
||
<view v-if="COMPANY != 'longguang'" class="more-btn" @click="isShow=!isShow">
|
||
{{isShow ? "收起":"展开"}}
|
||
<uni-icons :type="isShow ? 'arrowup':'arrowdown'"></uni-icons>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="detail-nav" v-if="COMPANY != 'longguang'">
|
||
<scroll-view class="scrollx-wrap" scroll-x>
|
||
<view class="nav-list">
|
||
<view class="nav-item"
|
||
:class="{'active-nav': activeIndex == item.id}"
|
||
v-for="(item,index) in navList" :key="index"
|
||
@click="checkNav(item)">
|
||
{{item.name}}
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
<view class="detail-wrap">
|
||
<!-- <component ref="list" :is="componentName" :id="detailId" :info="detailData"></component> -->
|
||
<safeList ref="list" v-if="componentName == 'safeList'" :detailId="detailId" :info="detailData"></safeList>
|
||
<control ref="list" v-if="componentName == 'control'" :detailId="detailId" :info="detailData"></control>
|
||
<planList ref="list" v-if="componentName == 'planList'" :detailId="detailId" :info="detailData"></planList>
|
||
<constructionStation ref="list" v-if="componentName == 'constructionStation'" :detailId="detailId" :info="detailData"></constructionStation>
|
||
<ordinaryAcceptance ref="list" v-if="componentName == 'ordinaryAcceptance'" :detailId="detailId" :info="detailData"></ordinaryAcceptance>
|
||
<engineeringData ref="list" v-if="componentName == 'engineeringData'" :detailId="detailId" :info="detailData"></engineeringData>
|
||
<verifyTableList ref="list" v-if="componentName == 'verifyTableList'" :detailId="detailId" :info="detailData"></verifyTableList>
|
||
</view>
|
||
</view>
|
||
<view class="add-btn" v-if="activeIndex != 7 && activeIndex != 2 && !(activeIndex == 1 && detailData.engineeringState == 3) && COMPANY != 'longguang'" @click="addForm">
|
||
<uni-icons v-if="activeIndex == 5" type="camera" size="30" color="#fff"></uni-icons>
|
||
<uni-icons v-else type="plusempty" size="30" color="#fff"></uni-icons>
|
||
<span>+</span>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import safeList from './safeList.vue'
|
||
import control from './control.vue'
|
||
import planList from './planList.vue'
|
||
import constructionStation from './constructionStation.vue'
|
||
import ordinaryAcceptance from './ordinaryAcceptance.vue'
|
||
import engineeringData from './engineeringData.vue'
|
||
import verifyTableList from './verifyTableList.vue'
|
||
export default {
|
||
components:{
|
||
safeList,
|
||
control,
|
||
planList,
|
||
constructionStation,
|
||
ordinaryAcceptance,
|
||
engineeringData,
|
||
verifyTableList
|
||
},
|
||
data(){
|
||
return{
|
||
statusBarHeight: 0,
|
||
isShow: true,
|
||
componentName: "planList",
|
||
navList:[{
|
||
id: 1,
|
||
name: "当前进度"
|
||
},{
|
||
id: 2,
|
||
name: "工程资料"
|
||
},{
|
||
id: 3,
|
||
name: "一般验收"
|
||
},{
|
||
id: 4,
|
||
name: "验收表验收"
|
||
},{
|
||
id: 5,
|
||
name: "安全检查"
|
||
},{
|
||
id: 6,
|
||
name: "施工旁站"
|
||
},{
|
||
id: 7,
|
||
name: "管控要点"
|
||
}],
|
||
activeIndex: 1,
|
||
detailId: "",
|
||
detailData:{},
|
||
}
|
||
},
|
||
onReachBottom() {
|
||
console.log(1,this.$refs['list'])
|
||
},
|
||
onPullDownRefresh() {
|
||
console.log(2)
|
||
},
|
||
onShow(){
|
||
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
|
||
this.initData()
|
||
if(this.$refs['list'] && this.$refs['list'].initData){
|
||
this.$refs['list'].initData()
|
||
}
|
||
},
|
||
onLoad(val){
|
||
this.detailId = val.id
|
||
// if(val.)
|
||
// this.initData()
|
||
},
|
||
methods:{
|
||
initData(){
|
||
this.sendRequest({
|
||
url:'xmgl/dangerousEngineeringRecord/queryById',
|
||
method:'post',
|
||
data:{id:this.detailId},
|
||
success:res=>{
|
||
uni.hideLoading()
|
||
// if(res.code==200){
|
||
// this.listData = res.result.records
|
||
// }
|
||
this.detailData = res.result
|
||
let str = '';
|
||
if(res.result.chooseTypeDescribeList){
|
||
this.detailData.describeName
|
||
res.result.chooseTypeDescribeList.map((item,index) => {
|
||
if(index == res.result.chooseTypeDescribeList.length - 1){
|
||
str = str + item.describeName
|
||
} else {
|
||
str = str + item.describeName + ','
|
||
}
|
||
})
|
||
console.log(str,123456789)
|
||
this.detailData.describeName = str;
|
||
}
|
||
console.log(this.detailData)
|
||
}
|
||
})
|
||
},
|
||
checkNav(val){
|
||
this.activeIndex = val.id
|
||
if(val.id == 1){
|
||
this.componentName = "planList"
|
||
} else if(val.id == 2){
|
||
this.componentName = "engineeringData"
|
||
} else if(val.id == 3){
|
||
this.componentName = "ordinaryAcceptance"
|
||
} else if(val.id == 4){
|
||
this.componentName = "verifyTableList"
|
||
} else if(val.id == 5){
|
||
this.componentName = "safeList"
|
||
} else if(val.id == 6){
|
||
this.componentName = "constructionStation"
|
||
} else if(val.id == 7){
|
||
this.componentName = "control"
|
||
}
|
||
},
|
||
addForm(){
|
||
if(this.activeIndex == 1){
|
||
uni.navigateTo({
|
||
url:'./addPlan?id='+this.detailId
|
||
})
|
||
} else if(this.activeIndex == 3){
|
||
uni.navigateTo({
|
||
url:'./addOrdinaryAcceptance?id='+this.detailId
|
||
})
|
||
} else if(this.activeIndex == 4){
|
||
uni.navigateTo({
|
||
url:'./addVerifyForm?id='+this.detailId
|
||
})
|
||
} else if(this.activeIndex == 5){
|
||
if(uni.getStorageSync('dangerData')){
|
||
uni.removeStorageSync('dangerData');
|
||
}
|
||
if(uni.getStorageSync('detailData')){
|
||
uni.removeStorageSync('detailData');
|
||
}
|
||
uni.navigateTo({
|
||
url:'../safeManage/addExamine?type=1&engineeringId='+this.detailId + '&moduleType=safeCheck'
|
||
})
|
||
} else if(this.activeIndex == 6){
|
||
uni.navigateTo({
|
||
url:'./addConstructionStation?id='+this.detailId
|
||
})
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.dangerbig-details{
|
||
min-height: 100%;
|
||
background: #F6F6F6;
|
||
.fixedheader{
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
z-index: 2;
|
||
}
|
||
.detail-content{
|
||
padding-top: 20rpx;
|
||
}
|
||
.list{
|
||
margin-bottom: 20rpx;
|
||
}
|
||
.list-info{
|
||
background: #fff;
|
||
border-bottom: 1px solid #F6F6F6;
|
||
font-size: 14px;
|
||
padding: 20rpx;
|
||
}
|
||
.more-btn{
|
||
text-align: center;
|
||
font-size: 14px;
|
||
height: 50rpx;
|
||
background: #F1F7FE;
|
||
line-height: 50rpx;
|
||
}
|
||
.nav-list{
|
||
display: flex;
|
||
height: 80rpx;
|
||
align-items: center;
|
||
padding: 0 20rpx;
|
||
.nav-item{
|
||
white-space: nowrap;
|
||
padding: 0 20rpx;
|
||
height: 80rpx;
|
||
box-sizing: border-box;
|
||
line-height: 80rpx;
|
||
font-size: 14px;
|
||
}
|
||
.active-nav{
|
||
border-bottom: 2px solid #4396E7;
|
||
}
|
||
}
|
||
.detail-nav{
|
||
width: 100%;
|
||
}
|
||
.scrollx-wrap{
|
||
width: 100%;
|
||
background: #fff;
|
||
}
|
||
.add-btn{
|
||
background: #4181FE;
|
||
width: 96rpx;
|
||
height: 96rpx;
|
||
border-radius: 50%;
|
||
text-align: center;
|
||
line-height: 96rpx;
|
||
position: fixed;
|
||
bottom: 40rpx;
|
||
right: 40rpx;
|
||
span{
|
||
font-size: 30px;
|
||
line-height: 45px;
|
||
color: #fff;
|
||
}
|
||
}
|
||
}
|
||
</style> |