prodb_specialtylist2.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div v-for="(item,index) in data_rows" @click="toDetail(item)">
  3. {{item.name}}
  4. </div>
  5. <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
  6. v-model:limit="queryParams.pageSize" @pagination="list2"/>
  7. </template>
  8. <script setup>
  9. import {specialtyList2} from '@/api/xjc-integratedmachine/specialty.js'
  10. const router = useRouter()
  11. const route = useRoute()
  12. const total = ref(0)
  13. const param = route.query
  14. const data_rows = ref([])
  15. const queryParams = ref({
  16. pageNum: 1,
  17. pageSize: 10,
  18. oldid: param.oldid
  19. })
  20. function list2() {
  21. specialtyList2(queryParams.value).then(resp => {
  22. data_rows.value = resp.data.rows
  23. total.value = resp.data.total
  24. })
  25. }
  26. function toDetail(item){
  27. router.push({
  28. path:'/xjc-integratedmachine/environment/pro_details_video',
  29. query : {
  30. id : item.id
  31. }
  32. })
  33. }
  34. list2()
  35. </script>
  36. <style scoped>
  37. </style>