djhjTaskDetail.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="djhjTaskDetail">
  3. <!-- 任务进度 -->
  4. <view class="djhjTaskDetail_progress">
  5. <text class="djhjTaskDetail_progress_title">任务进度:<text class="djhjTaskDetail_progress_text">{{hjTaskList.length+'/'+hjTaskList.length}}</text></text>
  6. <text class="djhjTaskDetail_progress_title">不合格数<text class="djhjTaskDetail_progress_text">{{hjbhg}}</text></text>
  7. </view>
  8. <!-- 创建人 -->
  9. <view class="djhjTaskDetail_progress">
  10. <text class="creator_title" >操作人:<text class="creator_text">{{props.creatorName != null ? props.creatorName : '-'}}</text></text>
  11. </view>
  12. <scroll-view scroll-y = 'true' class="scroll-Y">
  13. <view v-if="props.hjTaskList.length!=0" style="height: 0rpx;">
  14. <!-- 检查结果 -->
  15. <uni-card padding="0" spacing="0" v-for="(item,index) in props.hjTaskList" class="djhjList">
  16. <view class="djhjList_title">
  17. <view class="djhjList_text">检查项目</view>
  18. <view class="djhjList_righttext">{{item.item}}</view>
  19. </view>
  20. <view class="djhjList_title">
  21. <view class="djhjList_text">检查方式</view>
  22. <view class="djhjList_righttext">{{item.assessmentCriteria}}</view>
  23. </view>
  24. <view class="djhjList_title">
  25. <view class="djhjList_text">检查内容</view>
  26. <view class="djhjList_righttext">{{item.assessmentContent}}</view>
  27. </view>
  28. <view class="djhjList_title">
  29. <view class="djhjList_text">检查结果</view>
  30. <view class="djhjList_righttext" :class="item.assessmentResult=='不合格'? 'djhjList_redtext' : 'djhjList_righttext'">{{item.assessmentResult}}</view>
  31. </view>
  32. <view class="djhjList_title" v-if="item.assessmentResult=='不合格'">
  33. <view class="djhjList_text">原因</view>
  34. <view class="djhjList_righttext">{{item.resultContent}}</view>
  35. </view>
  36. </uni-card>
  37. <!-- 图片 -->
  38. <view class="image_upload" v-if="props.imageUrl.length!=0">
  39. <uni-card>
  40. <uni-section title="图片" type="line"></uni-section>
  41. <view class="img_upload">
  42. <uni-file-picker :readonly="true" limit="4" :modelValue="showImage(props.imageUrl)"></uni-file-picker>
  43. </view>
  44. </uni-card>
  45. </view>
  46. </view>
  47. <view v-else>
  48. <dataEmpty></dataEmpty>
  49. </view>
  50. </scroll-view>
  51. <!-- 开始质控 -->
  52. <view class="finish_button"
  53. v-if="props.taskStatus!='7004' && props.taskStatus!='7007' && props.taskStatus!='7008' && props.taskStatus!='7009' && props.taskStatus!='7010'">
  54. <button class="button" @click="startTask()">开始质控</button>
  55. </view>
  56. </view>
  57. </template>
  58. <script setup>
  59. import { reactive } from "vue";
  60. import {onLoad,onShow,onUnload,onPullDownRefresh} from "@dcloudio/uni-app";
  61. import http from '@/utils/request';
  62. import dataEmpty from "@/pages/ypczk/zkTask/zkTaskDetail/noStartTaskDetail.vue";
  63. import {uploadImageModelValue} from '@/pages/controls/image/OssService'
  64. const props = defineProps({
  65. // 环境质控详情列表
  66. hjTaskList: Array,
  67. // 图片url
  68. imageUrl:Array,
  69. // 环境质控不合格数
  70. hjbhg:String,
  71. // 创建人
  72. creatorName:String,
  73. // 任务状态
  74. taskStatus:String
  75. });
  76. // 开始质控
  77. const startTask=()=>{
  78. uni.$emit("startTaskInfo")
  79. }
  80. // 显示图片
  81. const showImage=(id)=>{
  82. return uploadImageModelValue(id)
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. @import './index.scss';
  87. .scroll-Y {
  88. height: 85%;
  89. }
  90. </style>