filter.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="phone-filter-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="goUpPage" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">筛选</text>
  6. </view>
  7. <view class="filter-body-box">
  8. <!-- 报证机构 -->
  9. <view class="filter-body-name">报证机构</view>
  10. <view class="phone-radio-group filter-radio-group">
  11. <view class="phone-radio-item" v-for="(item,index) in bzJigouList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
  12. </view>
  13. <!-- 职业 -->
  14. <view class="filter-body-name">职业</view>
  15. <view class="phone-radio-group filter-radio-group">
  16. <view class="phone-radio-item" v-for="(item,index) in zhiyeList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
  17. </view>
  18. <!-- 等级 -->
  19. <view class="filter-body-name">等级</view>
  20. <view class="phone-radio-group filter-radio-group">
  21. <view class="phone-radio-item" v-for="(item,index) in LevelList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
  22. </view>
  23. <!-- 办证状态 -->
  24. <view class="filter-body-name">办证状态</view>
  25. <view class="phone-radio-group filter-radio-group">
  26. <view class="phone-radio-item" v-for="(item,index) in banzhengList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
  27. </view>
  28. <!-- 考试状态 -->
  29. <view class="filter-body-name">考试状态</view>
  30. <view class="phone-radio-group filter-radio-group">
  31. <view class="phone-radio-item" v-for="(item,index) in kaoshiList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script setup>
  37. import {onLoad,onShow} from '@dcloudio/uni-app';
  38. import {ref,reactive} from "vue"
  39. import * as banzhengApi from "@/api/banzheng.js"
  40. const bzData = reactive({
  41. jigouId: '',
  42. zhiyeId: '',
  43. levelId: '',
  44. banzhengId: '',
  45. kaoshiId: '',
  46. })
  47. const bzJigouList = ref([]);
  48. const zhiyeList = ref([]);
  49. const LevelList = ref([]);
  50. const banzhengList = ref([]);
  51. const kaoshiList = ref([]);
  52. onLoad((options) => {
  53. initPage();
  54. })
  55. function initPage(){
  56. getKaozhengJigouList();
  57. getKaozhengZhiyeList();
  58. getKaozhengLevelList();
  59. getKaozhengBanzhengList();
  60. getKaozhengKaoshiList();
  61. }
  62. function getKaozhengJigouList(){
  63. banzhengApi.getKaozhengJigou().then(res => {
  64. bzJigouList.value = res.data;
  65. })
  66. }
  67. function getKaozhengZhiyeList(){
  68. banzhengApi.getKaozhengZhiye().then(res => {
  69. zhiyeList.value = res.data;
  70. })
  71. }
  72. function getKaozhengLevelList(){
  73. banzhengApi.getKaozhengLevel().then(res => {
  74. LevelList.value = res.data;
  75. })
  76. }
  77. function getKaozhengBanzhengList(){
  78. banzhengApi.getKaozhengBanzheng().then(res => {
  79. banzhengList.value = res.data;
  80. })
  81. }
  82. function getKaozhengKaoshiList(){
  83. banzhengApi.getKaozhengKaoshi().then(res => {
  84. kaoshiList.value = res.data;
  85. })
  86. }
  87. function radioSelect(name,index){
  88. }
  89. function goUpPage(){
  90. uni.redirectTo({
  91. url: '/pages/admin/banzheng/list'
  92. })
  93. }
  94. </script>
  95. <style>
  96. </style>