123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view class="wrap">
- <uni-section :title="hazard.measureContent" type="line">
- <uni-forms :label-width="300" label-position="top">
- <uni-forms-item label="检查结果" name="checkResult">
- <view class="uni-data-checkbox-wrap">{{hazard.checkResult}}</view>
- </uni-forms-item>
- <uni-forms-item label="备注" name="remark">
- <uni-easyinput disabled v-model="hazard.remark" type="textarea" :maxlength="-1" autoHeight placeholder="备注" />
- </uni-forms-item>
- <template v-if="hazard.attachList.length>0">
- <view class="attach-box" @click="preview(attach,index)" v-for="(attach,index) in hazard.attachList" :key="index">
- <image class="attach" :src="attach.fileUrl" mode="widthFix"></image>
- </view>
- </template>
- </uni-forms>
- </uni-section>
- </view>
- </template>
- <script>
- import {getChecklistHazardRecordById} from '@/api/aqpt/checklistRecordHazardApi.js'
- export default {
- data() {
- return {
- hazard:{
- checkResult:"",
- remark:"",
- attachList:[]
- }
- }
- },
- onLoad() {
- this.init()
- },
- methods: {
- init(){
- let hazard=uni.getStorageSync('hazard')
- this.hazard=hazard
- if(hazard.checkResult===1){this.hazard.checkResult="通过"}
- if(hazard.checkResult===-1){this.hazard.checkResult="未通过"}
- },
- preview(attach,index){
- uni.previewImage({
- urls:[attach.fileUrl],
- current:index
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .wrap{
- padding: 20rpx;
- position: relative;
- // &::after{
- // content: "";
- // width: 100%;
- // height: 100vh;
- // position: fixed;
- // left: 0;
- // top: 0;
- // background-color: rgba(0,0,0,0);
- // z-index: 999;
- // }
- .submit-BT {
- width: 750rpx;
- color: #4D73FF;
- text-align: center;
- font-size: 32rpx;
- padding-bottom: 68rpx;
- background-color: #fff;
- position: fixed;
- left: 0;
- bottom: 0;
- z-index: 99;
- box-shadow: 0px 0px 12px 0px #0000000A;
- border-radius: 8px 8px 0px 0px
- }
- ::v-deep .uni-forms-item{
- .uni-forms-item__content{
- .uni-data-checkbox-wrap{
- height: 100%;
- display: flex;
- align-items: center;
- }
-
- }
- }
- .attach-box{
- &,.attach{
- width: 200rpx;
- height: 200rpx;
- margin-right: 10rpx;
- border: 1px solid #333;
- }
- }
- }
- </style>
|