InspectionSheet.vue 961 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <!-- 质检单 -->
  3. <view class="">
  4. <view class="img-wrap" v-if="imgList.length > 0">
  5. <image class="image" :src="apiUrl + item.accessUrl" mode="" v-for="item in imgList"></image>
  6. </view>
  7. <view class="u-empty" v-else>
  8. <u-empty>
  9. </u-empty>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. get
  16. } from '@/utils/api.js'
  17. export default {
  18. props: ['batchNum', 'inventoryCode','code'],
  19. data() {
  20. return {
  21. imgList: []
  22. }
  23. },
  24. created() {
  25. this.getdata()
  26. },
  27. methods: {
  28. getdata() {
  29. let par = {
  30. batchNum: this.batchNum,
  31. inventoryCode: this.inventoryCode,
  32. code:this.code
  33. }
  34. par = this.URLSearchParams(par)
  35. get(this.apiUrl + "/InventoryBook/select/getAnalysisCertificate?" + par).then((res) => {
  36. if (res.success) {
  37. this.imgList = res.data || []
  38. }
  39. });
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .image {
  46. width: 100%;
  47. }
  48. .u-empty{
  49. padding: 30rpx;
  50. }
  51. </style>