2025-01-04 17:20:45 +08:00

144 lines
3.7 KiB
Vue

<template>
<view class="safe-mesure">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName"> 安全措施 </view>
</headers>
<view class="safe-mesure-container" :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
<view class="safe-mesure-header">
<view class="header-left">安全措施</view>
<view class="header-right">是否涉及</view>
</view>
<view class="safe-mesure-list" v-if="safeMeasure.length > 0">
<view class="safe-mesure-item" v-for="(item, i) in safeMeasure" :key="i">
<view class="item-left"> {{ i + 1 }}.{{ item.name }} </view>
<view class="item-right">
<text v-if="item.flag === '是'" style="color: green">{{ item.flag }}</text>
<text v-if="item.flag === '否'" style="color: red">{{ item.flag }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detailId: '',
detailData: '',
safeMeasure: [],
otherSafeMeasure: [],
statusBarHeight: 0
}
},
created() {
this.getWork()
},
onLoad(options) {
this.detailId = options.detailId
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
},
methods: {
getWork() {
let that = this
this.sendRequest({
url: 'xmgl/xzSpecialOperationFireSafetyNew/queryById',
method: 'get',
data: { id: this.detailId },
success: res => {
uni.hideLoading()
that.detailData = res.result
// that.detailData.safeMeasure = JSON.parse(that.detailData.safeMeasure)
that.safeMeasure = JSON.parse(that.detailData.safeMeasure)
//otherSafeMeasure
that.otherSafeMeasure = JSON.parse(that.detailData.otherSafeMeasure)
console.log('=detailData====================', that.detailData)
console.log('=safeMeasure====================', that.safeMeasure)
}
})
}
}
}
</script>
<style lang="scss">
.safe-mesure {
min-height: 100%;
background: #f6f6f6;
// background: darkred;
.fixedheader {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.safe-mesure-container {
padding: 0 30rpx;
// padding-top: 138rpx;
padding-bottom: 100rpx;
// background-color: darkred;
.safe-mesure-header {
display: flex;
// justify-content: space-between;
margin-top: 10rpx;
line-height: 80rpx;
font-size: 32rpx;
font-weight: bold;
color: #81818c;
.header-left {
width: 75%;
display: flex;
justify-content: center;
}
.header-right {
width: 25%;
display: flex;
justify-content: center;
}
}
.safe-mesure-list {
.safe-mesure-item {
display: flex;
// justify-content: space-between;
margin-top: 15rpx;
// line-height: 40rpx;
.item-left {
width: 75%;
}
.item-right {
width: 25%;
display: flex;
justify-content: center;
align-items: center;
}
}
}
.other-safe {
margin-top: 50rpx;
.other-head {
display: flex;
.other-icon {
width: 10rpx;
height: 40rpx;
background-color: #2b8df3;
border-radius: 100rpx;
}
.other-text {
margin-left: 20rpx;
}
}
.other-content {
width: auto;
height: 50rpx;
// background-color: darkred;
// border: 1rpx solid black;
margin: 0 30rpx;
margin-top: 25rpx;
}
}
}
}
</style>