532 lines
14 KiB
Vue
532 lines
14 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-box">
|
|
<view class="">
|
|
<view>{{detailData.engineeringName ? detailData.engineeringName : '--'}}</view>
|
|
<view v-if="detailData.dangerType == 2" class="cw-box1">超危</view>
|
|
</view>
|
|
<view class="state-main">
|
|
<view class="state-box"
|
|
:class="{'wkg-box':detailData.recordStatus == 1 || detailData.recordStatus == 4,'zs-box':detailData.recordStatus == 2,'wg-box':detailData.recordStatus == 3}">
|
|
{{ recordStatusUp(detailData.recordStatus) }}
|
|
</view>
|
|
<view class="state-box" v-if="detailData.securityStatus"
|
|
:class="{'wg-box':detailData.securityStatus == 2,'xgz-box':detailData.securityStatus == 1}">
|
|
{{ detailData.securityStatus == 1 ? '需关注' : '安全可控' }}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="list-info">
|
|
危大工程类别:<text class="detail-data">{{detailData.engineeringTypeName}}</text>
|
|
</view>
|
|
<!-- <view class="list-info">
|
|
危大工程名称:<text class="detail-data">{{detailData.engineeringName}}</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.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.responsibilityCompanyNames ? detailData.responsibilityCompanyNames : "--"}}</text>
|
|
</view>
|
|
<view class="list-info">
|
|
责任人:<text
|
|
class="detail-data">{{detailData.personLiableNames ? detailData.personLiableNames : "--"}}</text>
|
|
</view>
|
|
<view class="list-info">
|
|
施工部位:<text
|
|
class="detail-data">{{detailData.regionNames ? detailData.regionNames : "--"}}</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>
|
|
<finally-acceptance ref="list" v-if="componentName =='finallyAcceptance'" :detailId="detailId"
|
|
:info="detailData"></finally-acceptance>
|
|
</view>
|
|
</view>
|
|
<!-- <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
|
|
&& COMPANY != 'longguang' && detailData.finalAcceptanceStatus !== 2 && isShowBtn && btnAuth
|
|
&& userInfo.accountType != 6 || userInfo.userId == detailData.personLiableId" @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 class="save-box" v-if="activeIndex != 7 && activeIndex != 2 && detailData.finalAcceptanceStatus !== 2 && btnAuth
|
|
&& userInfo.accountType != 6 || userInfo.userId == detailData.personLiableId">
|
|
<view class="save-btn" @click="addForm">
|
|
{{activeIndex == 1 ? '新增进度记录' : activeIndex == 5 ? '新增隐患记录' : activeIndex == 6 ? '新增旁站记录' : '新增验收记录'}}
|
|
</view>
|
|
</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'
|
|
import finallyAcceptance from './finallyAcceptance.vue'
|
|
export default {
|
|
components: {
|
|
safeList,
|
|
control,
|
|
planList,
|
|
constructionStation,
|
|
ordinaryAcceptance,
|
|
engineeringData,
|
|
verifyTableList,
|
|
finallyAcceptance
|
|
},
|
|
data() {
|
|
return {
|
|
statusBarHeight: 0,
|
|
isShow: true,
|
|
componentName: "",
|
|
navList: [{
|
|
id: 2,
|
|
name: "工程资料"
|
|
}, {
|
|
id: 3,
|
|
name: "施工条件验收"
|
|
}, {
|
|
id: 1,
|
|
name: "当前进度"
|
|
},
|
|
/*,{
|
|
id: 4,
|
|
name: "验收表验收"
|
|
},*/
|
|
{
|
|
id: 5,
|
|
name: "现场巡视"
|
|
}, {
|
|
id: 6,
|
|
name: "施工旁站"
|
|
}, {
|
|
id: 8,
|
|
name: "危大工程验收"
|
|
}, {
|
|
id: 7,
|
|
name: "管控要点"
|
|
},
|
|
],
|
|
activeIndex: "",
|
|
detailId: "",
|
|
detailData: {},
|
|
isShowBtn: null,
|
|
btnAuth: true,
|
|
userInfo: {},
|
|
bigDangerModuleList: [{
|
|
id: 1,
|
|
title: "未开工",
|
|
},
|
|
{
|
|
id: 2,
|
|
title: "在施",
|
|
},
|
|
{
|
|
id: 3,
|
|
title: "完工",
|
|
},
|
|
{
|
|
id: 4,
|
|
title: "已取消",
|
|
},
|
|
],
|
|
}
|
|
},
|
|
onReachBottom() {
|
|
console.log(1, this.$refs['list'])
|
|
},
|
|
onPullDownRefresh() {
|
|
console.log(2)
|
|
},
|
|
onShow() {
|
|
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
|
|
this.initData()
|
|
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)
|
|
},
|
|
onLoad(val) {
|
|
this.btnAuth = this.checkBtnPermission({
|
|
key: 'wdgc_add',
|
|
menuPath: '/project/dangerousBigProject/dangerousWorkList'
|
|
})
|
|
console.log(1111, this.btnAuth)
|
|
this.detailId = val.id
|
|
// if(val.)
|
|
// this.initData()
|
|
},
|
|
mounted() {
|
|
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
|
},
|
|
methods: {
|
|
initData() {
|
|
this.sendRequest({
|
|
url: 'xmgl/bigDangerRecord/queryById',
|
|
method: 'post',
|
|
data: {
|
|
id: this.detailId
|
|
},
|
|
success: res => {
|
|
uni.hideLoading()
|
|
// if(res.code==200){
|
|
// this.listData = res.result.records
|
|
// }
|
|
this.detailData = res.result
|
|
// this.getApply();
|
|
this.checkNav({
|
|
id: 2
|
|
});
|
|
}
|
|
})
|
|
},
|
|
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,
|
|
type: 1
|
|
},
|
|
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
|
|
}
|
|
}
|
|
})
|
|
},
|
|
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"
|
|
} else if (val.id == 8) {
|
|
this.componentName = "finallyAcceptance"
|
|
}
|
|
},
|
|
addForm() {
|
|
if (this.activeIndex == 1) {
|
|
uni.navigateTo({
|
|
url: './addPlan?id=' + this.detailId
|
|
})
|
|
} else if (this.activeIndex == 3) {
|
|
uni.navigateTo({
|
|
url: `./addOrdinaryAcceptance?id=${this.detailId}&acceptanceType=${1}`
|
|
})
|
|
} 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'
|
|
url: '../safeSame/addIssue?type=11&engineeringId=' + this.detailId + '&moduleType=safeCheck'
|
|
})
|
|
} else if (this.activeIndex == 6) {
|
|
uni.navigateTo({
|
|
url: './addConstructionStation?id=' + this.detailId
|
|
})
|
|
} else if (this.activeIndex == 8) {
|
|
uni.navigateTo({
|
|
url: `./addOrdinaryAcceptance?id=${this.detailId}&acceptanceType=${2}`
|
|
})
|
|
// if (this.isShowBtn) {
|
|
// uni.navigateTo({
|
|
// url: './addFinallyAcceptance?id=' + this.detailId + '&name=' + this.detailData
|
|
// .engineeringName
|
|
// })
|
|
// } else {
|
|
// uni.showToast({
|
|
// title: '请勿重复操作',
|
|
// icon: "none",
|
|
// duration: 2000
|
|
// });
|
|
// }
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
recordStatusUp() {
|
|
return (recordStatus) => {
|
|
const find = this.bigDangerModuleList.find((item) => item.id === recordStatus);
|
|
return find ? find.title : "--";
|
|
};
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.save-box {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 104rpx;
|
|
background: #FFFFFF;
|
|
box-shadow: 0px -4px 4px 0px rgba(0, 0, 0, 0.05);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 18rpx 26rpx;
|
|
|
|
>view {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #5181F6;
|
|
border-radius: 3px;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
color: #FFFFFF;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
.dangerbig-details {
|
|
min-height: 100%;
|
|
background: #EFF3F7;
|
|
|
|
.fixedheader {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 2;
|
|
}
|
|
|
|
.detail-content {
|
|
padding-bottom: 104rpx;
|
|
}
|
|
|
|
.list {
|
|
margin-bottom: 26rpx;
|
|
background-color: #fff;
|
|
padding: 26rpx 26rpx 0;
|
|
}
|
|
|
|
.list-box {
|
|
padding-bottom: 26rpx;
|
|
font-size: 30rpx;
|
|
color: #1A1A1A;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
|
|
>view {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.cw-box1 {
|
|
width: 88rpx;
|
|
height: 36rpx;
|
|
background: #E40000;
|
|
border-radius: 6rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 24rpx;
|
|
color: #FFFFFF;
|
|
margin-left: 26rpx;
|
|
}
|
|
|
|
.state-main {
|
|
>view:not(:first-child) {
|
|
margin-left: 20rpx;
|
|
}
|
|
}
|
|
|
|
.state-box {
|
|
width: 120rpx;
|
|
height: 48rpx;
|
|
border-radius: 6rpx;
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
color: #4D4D4D;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.wkg-box {
|
|
background-color: #F1F1F1;
|
|
}
|
|
|
|
.zs-box {
|
|
background-color: #0088FF;
|
|
color: #fff;
|
|
}
|
|
|
|
.wg-box {
|
|
background-color: #34C759;
|
|
color: #fff;
|
|
}
|
|
|
|
.xgz-box {
|
|
background-color: #FF8D28;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
.list-info {
|
|
background: #fff;
|
|
// border-bottom: 1px solid #F6F6F6;
|
|
font-size: 28rpx;
|
|
padding-bottom: 26rpx;
|
|
color: #808080;
|
|
|
|
.detail-data {
|
|
color: #4D4D4D;
|
|
}
|
|
}
|
|
|
|
.more-btn {
|
|
text-align: center;
|
|
font-size: 14px;
|
|
height: calc(50rpx + 20rpx);
|
|
// background: #F1F7FE;
|
|
line-height: 50rpx;
|
|
color: #498CEC;
|
|
}
|
|
|
|
.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> |