djhjTaskDetail.vue 3.0 KB

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