detail.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="wrap">
  3. <uni-section :title="hazard.measureContent" type="line">
  4. <uni-forms :label-width="300" label-position="top">
  5. <uni-forms-item label="检查结果" name="checkResult">
  6. <view class="uni-data-checkbox-wrap">{{hazard.checkResult}}</view>
  7. </uni-forms-item>
  8. <uni-forms-item label="备注" name="remark">
  9. <uni-easyinput disabled v-model="hazard.remark" type="textarea" :maxlength="-1" autoHeight placeholder="备注" />
  10. </uni-forms-item>
  11. <template v-if="hazard.attachList.length>0">
  12. <view class="attach-box" @click="preview(attach,index)" v-for="(attach,index) in hazard.attachList" :key="index">
  13. <image class="attach" :src="attach.fileUrl" mode="widthFix"></image>
  14. </view>
  15. </template>
  16. </uni-forms>
  17. </uni-section>
  18. </view>
  19. </template>
  20. <script>
  21. import {getChecklistHazardRecordById} from '@/api/aqpt/checklistRecordHazardApi.js'
  22. export default {
  23. data() {
  24. return {
  25. hazard:{
  26. checkResult:"",
  27. remark:"",
  28. attachList:[]
  29. }
  30. }
  31. },
  32. onLoad() {
  33. this.init()
  34. },
  35. methods: {
  36. init(){
  37. let hazard=uni.getStorageSync('hazard')
  38. this.hazard=hazard
  39. if(hazard.checkResult===1){this.hazard.checkResult="通过"}
  40. if(hazard.checkResult===-1){this.hazard.checkResult="未通过"}
  41. },
  42. preview(attach,index){
  43. uni.previewImage({
  44. urls:[attach.fileUrl],
  45. current:index
  46. })
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .wrap{
  53. padding: 20rpx;
  54. position: relative;
  55. // &::after{
  56. // content: "";
  57. // width: 100%;
  58. // height: 100vh;
  59. // position: fixed;
  60. // left: 0;
  61. // top: 0;
  62. // background-color: rgba(0,0,0,0);
  63. // z-index: 999;
  64. // }
  65. .submit-BT {
  66. width: 750rpx;
  67. color: #4D73FF;
  68. text-align: center;
  69. font-size: 32rpx;
  70. padding-bottom: 68rpx;
  71. background-color: #fff;
  72. position: fixed;
  73. left: 0;
  74. bottom: 0;
  75. z-index: 99;
  76. box-shadow: 0px 0px 12px 0px #0000000A;
  77. border-radius: 8px 8px 0px 0px
  78. }
  79. ::v-deep .uni-forms-item{
  80. .uni-forms-item__content{
  81. .uni-data-checkbox-wrap{
  82. height: 100%;
  83. display: flex;
  84. align-items: center;
  85. }
  86. }
  87. }
  88. .attach-box{
  89. &,.attach{
  90. width: 200rpx;
  91. height: 200rpx;
  92. margin-right: 10rpx;
  93. border: 1px solid #333;
  94. }
  95. }
  96. }
  97. </style>