index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="content">
  3. <view class="base-info-box">
  4. <info-item
  5. isFirst="true"
  6. label="粮食品种"
  7. :value="getDictLabelSync(DICT_TYPE.SYSTEM_LSPZ, baseInfo.lspzmc) || '--'
  8. "
  9. />
  10. <info-item
  11. label="粮食等级"
  12. :value="
  13. getDictLabelSync(DICT_TYPE.SYSTEM_LSDJ, baseInfo.lsdjbm) || '--'
  14. "
  15. />
  16. <info-item label="仓房外温(℃)" :value="baseInfo.cww || '--'" />
  17. <info-item label="仓房外湿(%)" :value="baseInfo.cws || '--'" />
  18. <info-item label="仓房内温(℃)" :value="baseInfo.cnw || '--'" />
  19. <info-item label="仓房内湿(%)" :value="baseInfo.cns || '--'" />
  20. <info-item label="粮食最高温(℃)" :value="baseInfo.lszgw || '--'" />
  21. <info-item label="粮食最低温(℃)" :value="baseInfo.lszdw || '--'" />
  22. <info-item label="粮食平均温(℃)" :value="baseInfo.lspjw || '--'" />
  23. <info-item isImage="true" label="附件" :value="baseInfo.fileIds" />
  24. <!-- <view class="info-item-component">
  25. <text class="label">附件</text>
  26. <view class="images-container">
  27. <image
  28. v-for="(src, index) in imageSources"
  29. :key="index"
  30. class="kqt-image"
  31. :src="src.url"
  32. />
  33. </view>
  34. </view> -->
  35. </view>
  36. </view>
  37. </template>
  38. <script setup>
  39. import { ref, onMounted } from "vue";
  40. import { getDictOptions, DICT_TYPE, getDictLabelSync } from "@/utils/dict.js";
  41. import InfoItem from "@/pages/components/InfoItem.vue";
  42. const props = defineProps(["baseInfo"]);
  43. import { getImageInfo } from "@/api/task";
  44. const imageSources = ref([]);
  45. onMounted(async () => {
  46. imageSources.value = (
  47. await getImageInfo({ ids: props.baseInfo.fileIds })
  48. ).data;
  49. });
  50. </script>
  51. <style lang="scss" scoped>
  52. .content {
  53. padding: 20rpx;
  54. }
  55. .info-item-component {
  56. display: flex;
  57. justify-content: space-between;
  58. align-items: center;
  59. padding: 30rpx 0;
  60. border-top: 1px solid #e5e9ed;
  61. }
  62. .base-info-box {
  63. background: #ffffff;
  64. border-radius: 20rpx;
  65. margin-bottom: 120rpx;
  66. padding: 20rpx;
  67. }
  68. .label {
  69. font-weight: bold;
  70. color: #777777;
  71. }
  72. .value {
  73. flex: 1;
  74. text-align: right;
  75. color: #0f2239;
  76. font-weight: 600;
  77. }
  78. .images-container {
  79. max-width: 50%;
  80. display: flex;
  81. flex-direction: column;
  82. align-items: center;
  83. .kqt-image {
  84. max-width: 100%;
  85. margin-bottom: 10rpx;
  86. }
  87. }
  88. </style>