index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom>
  3. <template #top>
  4. <ut-navbar title="种植管理" :fixed="false"> </ut-navbar>
  5. </template>
  6. <view class="pd-24">
  7. <Task_card :data="taskDate" />
  8. <view class="d-flex a-c j-sb pt-20">
  9. <view class="startline-title pl-24 ml-24 mb-16">管理记录</view>
  10. <view class="bg-#37A954 b-radius pd4-10-20-10-20 d-flex a-c" style="width: max-content" @click="$u.route({ type: 'navigateTo', url: '/plant/port/supervise-create/index', params: { id: item?.id } })">
  11. <up-icon name="plus" color="#fff"></up-icon>
  12. <view class="c-#fff f-s-22">添加管理记录</view>
  13. </view>
  14. </view>
  15. </view>
  16. </z-paging>
  17. </template>
  18. <script setup lang="ts">
  19. import { useClientRequest } from '@/utils/request';
  20. import Task_card from './models/task_card.vue';
  21. const paging = ref();
  22. const list = ref([]);
  23. const taskId = ref('');
  24. const taskDate = ref('');
  25. const query = async (pageNo: number, pageSize: number) => {
  26. const res = await useClientRequest.get('/plt-api/app/plantationTask/list', {
  27. pageNo,
  28. pageSize,
  29. });
  30. // if (res) {
  31. // const { rows } = res;
  32. // paging.value.complete(rows);
  33. // }
  34. };
  35. onMounted(async () => {
  36. const res = await useClientRequest.get(`/plt-api/app/plantationTask/getInfo/${taskId.value}`, {
  37. pageNo: 1,
  38. pageSize: 10,
  39. });
  40. taskDate.value = res.data;
  41. });
  42. onLoad((options: any) => {
  43. taskId.value = options?.id;
  44. });
  45. </script>