361 lines
10 KiB
Vue
Raw Normal View History

2022-06-08 15:48:09 +08:00
<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>
2024-05-09 01:11:09 +08:00
<!-- <view class="list-info">
2022-06-08 15:48:09 +08:00
施工时间<text class="detail-data">{{detailData.buildStartTime}}~{{detailData.buildEndTime}}</text>
2024-05-09 01:11:09 +08:00
</view> -->
2022-06-08 15:48:09 +08:00
<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>
2024-04-22 23:05:07 +08:00
2022-06-08 15:48:09 +08:00
<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> -->
2024-05-09 22:52:28 +08:00
<safeList ref="list" v-if="componentName == 'safeList'" :detailId="detailId" :info="detailData">123123</safeList>
2022-06-08 15:48:09 +08:00
<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>
2024-05-09 01:11:09 +08:00
<finally-acceptance ref="list" v-if="componentName =='finallyAcceptance'" :detailId="detailId" :info="detailData" ></finally-acceptance>
2022-06-08 15:48:09 +08:00
</view>
</view>
2024-05-12 01:40:45 +08:00
<!-- <view class="add-btn" v-if="activeIndex != 7 && activeIndex != 2 && !(activeIndex == 1 && detailData.engineeringState == 3) -->
<view class="add-btn" v-if="activeIndex != 7 && activeIndex != 2
2024-05-28 15:58:10 +08:00
&& COMPANY != 'longguang' && detailData.finalAcceptanceStatus !== 2 && isShowBtn && btnAuth"
2024-05-08 15:59:01 +08:00
@click="addForm">
2022-06-08 15:48:09 +08:00
<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>
2023-03-20 18:43:57 +08:00
<span>+</span>
2022-06-08 15:48:09 +08:00
</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'
2024-04-28 15:34:42 +08:00
import finallyAcceptance from './finallyAcceptance.vue'
2022-06-08 15:48:09 +08:00
export default {
components:{
safeList,
control,
planList,
constructionStation,
ordinaryAcceptance,
engineeringData,
2024-04-28 15:34:42 +08:00
verifyTableList,
finallyAcceptance
2022-06-08 15:48:09 +08:00
},
data(){
return{
statusBarHeight: 0,
isShow: true,
componentName: "planList",
navList:[{
id: 1,
name: "当前进度"
},{
id: 2,
name: "工程资料"
2024-05-07 12:47:28 +08:00
},/*{
2022-06-08 15:48:09 +08:00
id: 3,
name: "一般验收"
2024-05-07 12:47:28 +08:00
},{
2022-06-08 15:48:09 +08:00
id: 4,
name: "验收表验收"
2024-04-22 23:05:07 +08:00
},*/{
2022-06-08 15:48:09 +08:00
id: 5,
name: "安全检查"
},{
id: 6,
name: "施工旁站"
},{
id: 7,
name: "管控要点"
2024-04-28 15:34:42 +08:00
},
2024-05-04 16:13:57 +08:00
{
id: 8,
name: "最终验收"
}
2024-04-28 15:34:42 +08:00
],
2022-06-08 15:48:09 +08:00
activeIndex: 1,
detailId: "",
detailData:{},
2024-05-09 01:11:09 +08:00
isShowBtn: null,
2024-05-28 15:58:10 +08:00
btnAuth: true
2022-06-08 15:48:09 +08:00
}
},
onReachBottom() {
console.log(1,this.$refs['list'])
},
onPullDownRefresh() {
console.log(2)
},
onShow(){
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
this.initData()
2024-05-16 04:10:40 +08:00
let that = this;
setTimeout(function(){
// console.log(that.$refs,777)
// console.log(that.$refs.list,777)
if(that.$refs['list'] && that.$refs['list'].initData){
that.$refs['list'].initData()
}
},200)
2022-06-08 15:48:09 +08:00
},
onLoad(val){
2024-05-28 20:01:14 +08:00
this.btnAuth = this.checkBtnPermission({key: 'wdgc_add', menuPath: '/project/dangerousBigProject/parameter'})
2022-06-08 15:48:09 +08:00
this.detailId = val.id
// if(val.)
// this.initData()
},
2024-05-09 01:11:09 +08:00
mounted() {
},
2022-06-08 15:48:09 +08:00
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
2024-04-18 19:53:04 +08:00
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;
}
2022-06-08 15:48:09 +08:00
console.log(this.detailData)
2024-05-09 01:11:09 +08:00
this.getApply()
}
})
},
getApply(){
console.log("=====================================================detail");
console.log(this.detailData);
this.sendRequest({
url:'xmgl/xzDangerousEngineeringAcceptance/list',
method:'get',
data:{
engineeringId: this.detailData.id,
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
2024-05-16 04:10:40 +08:00
type:1
2024-05-09 01:11:09 +08:00
},
success:res=>{
uni.hideLoading()
console.log("xmgl/xzDangerousEngineeringAcceptance/list",res);
let result = res.result
if(res.result.length>0){
if(res.result[0].acceptanceResult === null) this.isShowBtn = false
if(res.result[0].acceptanceResult === 1) this.isShowBtn = false
if(res.result[0].acceptanceResult === 2) this.isShowBtn = true
}else{
this.isShowBtn = true
}
2022-06-08 15:48:09 +08:00
}
})
},
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"
2024-04-28 15:34:42 +08:00
}else if(val.id == 8){
this.componentName = "finallyAcceptance"
2022-06-08 15:48:09 +08:00
}
},
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({
2024-05-09 22:52:28 +08:00
// url:'../safeManage/addExamine?type=1&engineeringId='+this.detailId + '&moduleType=safeCheck'
url:'../safeSame/addIssue?type=1&engineeringId='+this.detailId + '&moduleType=safeCheck'
2022-06-08 15:48:09 +08:00
})
} else if(this.activeIndex == 6){
uni.navigateTo({
url:'./addConstructionStation?id='+this.detailId
})
}
2024-04-28 15:34:42 +08:00
else if(this.activeIndex == 8){
2024-05-09 01:11:09 +08:00
if(this.isShowBtn){
uni.navigateTo({
url:'./addFinallyAcceptance?id='+this.detailId+'&name='+this.detailData.engineeringName
})
}else{
uni.showToast({
title: '请勿重复操作',
icon: "none",
duration: 2000
});
}
2024-04-28 15:34:42 +08:00
}
2022-06-08 15:48:09 +08:00
}
}
}
</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;
2023-03-20 18:43:57 +08:00
span{
font-size: 30px;
line-height: 45px;
color: #fff;
}
2022-06-08 15:48:09 +08:00
}
}
2024-04-22 23:05:07 +08:00
</style>