index.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="home">
  3. <cu-custom class="home-custom" bgColor=".bg-sancolor"
  4. bgImage="https://ahwgh.oss-cn-hangzhou.aliyuncs.com/enterprise/6525f808df760.png" :isBack="true">
  5. <block slot="content">安徽省农产品检测监测平台</block>
  6. </cu-custom>
  7. <view>
  8. <view class="cu-list menu content-box" v-for="(item, index) in sampleInfoDataList">
  9. <view class="cu-item" :class="menuArrow?'arrow':''">
  10. <view class="content">
  11. <div class="text-gray">样品名称:{{ item.name }}</div>
  12. <div class="text-gray">样品来源:{{ item.source }}</div>
  13. <div class="text-gray">抽样数量:{{ item.samplingNumber }}{{ item.samplingType }}</div>
  14. <div class="text-gray">抽样基数:{{ item.samplingBase }}{{ item.samplingType }}</div>
  15. <div class="text-gray">生产日期:{{ item.manufactureDate }}</div>
  16. <div class="text-gray">抽样日期:{{ item.samplingDate }}</div>
  17. </view>
  18. </view>
  19. </view>
  20. <!-- <view class="home-fixed" @tap="rediectHome">首页</view> -->
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import { _sampleInfo } from "./sample-info-model.js";
  26. export default {
  27. data() {
  28. return {
  29. sampleInfoDataList: []
  30. };
  31. },
  32. created() {
  33. },
  34. onLoad(options) {
  35. this.getSampleInfoList(options.id);
  36. },
  37. mounted() {
  38. },
  39. methods: {
  40. rediectHome() {
  41. uni.redirectTo({
  42. url: "/pages/index/index"
  43. });
  44. },
  45. getSampleInfoList(id) {
  46. _sampleInfo.getAhSampleDetail(id, res => {
  47. this.sampleInfoDataList = res.data.data.records;
  48. console.log(this.sampleInfoDataList);
  49. });
  50. }
  51. }
  52. };
  53. </script>
  54. <style scoped>
  55. .content {
  56. padding: 10px;
  57. }
  58. .content-box {
  59. margin: 20px;
  60. border-radius: 5px;
  61. }
  62. </style>