index.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { downLoad2, renderSize } from '@/utils'
  2. export const workspaceOptions = {
  3. props: {
  4. tableData: {//数据
  5. type: Array,
  6. default: () => {
  7. return []
  8. }
  9. },
  10. queryParams: {//分页信息
  11. type: Object,
  12. default: () => {
  13. return {
  14. size: 10,
  15. current: 1,
  16. }
  17. }
  18. },
  19. },
  20. methods: {
  21. renderSize,
  22. handleClick(row,key) {
  23. if(key == 'name'){
  24. const router = this.$router.resolve({
  25. path: '/project/patentCollection',
  26. query: {
  27. id: row.id,
  28. }
  29. })
  30. window.open(router.href, '_blank');
  31. }
  32. },
  33. //操作列
  34. handleCommand(event, row) {
  35. var isLast = false
  36. if(event == 10){
  37. this.action={
  38. type:'1',
  39. id:row.id
  40. }
  41. if(this.tableData.length == 1){
  42. isLast = true
  43. }
  44. }
  45. if(event == 'e'){
  46. this.action={
  47. type:'2',
  48. id:row.id
  49. }
  50. }
  51. this.$emit('option', { option: event, row ,isLast:isLast})
  52. },
  53. },
  54. }