index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="farm-manage">
  3. <tabs v-model:active="active" class="tabs">
  4. <tab title="农情互动">
  5. <!-- <demand-hall :isCapital="true" ref="demandHallRef" /> -->
  6. <interact></interact>
  7. </tab>
  8. <tab title="我的任务">
  9. <task></task>
  10. </tab>
  11. </tabs>
  12. <system-reminder />
  13. </div>
  14. </template>
  15. <script setup>
  16. import { ref, onMounted } from "vue";
  17. import { Tab, Tabs } from "vant";
  18. // import demandHall from "../farm_manage/components/demandHall.vue";
  19. import interact from "./components/interact.vue";
  20. import systemReminder from "../farm_manage/components/systemReminder.vue";
  21. import task from "./components/task.vue"
  22. const active = ref(0);
  23. const getManagerList = async () => {
  24. const { data } = await VE_API.mine.listManagerList({ onlyExecutor: true });
  25. if (data && data.length > 0) {
  26. // 过滤 permissionList 中包含"任务接单"的成员,并过滤掉超管(role为1)
  27. const executorList = data.filter((item) => item.role !== 1);
  28. sessionStorage.setItem("executorList", JSON.stringify(executorList));
  29. }
  30. };
  31. onMounted(() => {
  32. getManagerList();
  33. });
  34. </script>
  35. <style lang="scss" scoped>
  36. .farm-manage {
  37. width: 100%;
  38. height: 100%;
  39. .tabs{
  40. ::v-deep{
  41. .van-tabs__wrap{
  42. margin-bottom: 8px;
  43. }
  44. .van-tabs__line{
  45. width: 24px;
  46. height: 4px;
  47. }
  48. .van-tab {
  49. width: 80px;
  50. flex: none;
  51. }
  52. .van-tabs__nav {
  53. justify-content: center;
  54. }
  55. }
  56. }
  57. }
  58. </style>