current.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="content-wrapper">
  3. <div class="filter-wrapper">
  4. <gw-select :columns="inspectTypes" v-model:value="inspectType" />
  5. </div>
  6. <van-pull-refresh class="inspect-group-wrapper" v-model="loading" @refresh="onLoad()">
  7. <card01 v-for="item in list" :key="item" :title="item.prsnTitle + ''" icon="notes"
  8. :description="`时间:${item.sttm} 至 ${item.entm}`" @click="emits('onClick', item.prsnId)" />
  9. </van-pull-refresh>
  10. </div>
  11. </template>
  12. <script setup>
  13. import { ref, defineEmits, watch } from "vue";
  14. import GwSelect from "@/components/GwSelect.vue";
  15. import card01 from '@/components/card01.vue';
  16. import { getCurrGroup } from '@/api/inspect.js';
  17. const emits = defineEmits(['onClick']);
  18. const inspectTypes = [
  19. { text: '稽查工作', value: '008' },
  20. ];
  21. const inspectType = ref('008');
  22. const list = ref([]);
  23. const loading = ref(false);
  24. const finished = ref(false);
  25. function onLoad() {
  26. getCurrGroup(inspectType.value).then(res => {
  27. list.value = res.data;
  28. loading.value = false;
  29. finished.value = true;
  30. })
  31. }
  32. watch(() => inspectType, inspectType => {
  33. if (inspectType.value) {
  34. onLoad()
  35. }
  36. })
  37. </script>
  38. <style lang="scss" scoped>
  39. @import '@/assets/styles/filter.scss';
  40. .content-wrapper {
  41. padding-top: 8px;
  42. height: 100%;
  43. overflow: auto;
  44. .inspect-group-wrapper {
  45. height: calc(100% - 35px);
  46. overflow: auto;
  47. }
  48. }
  49. </style>