123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import { checkVisual } from "@/views/home/components/mixins";
- export default {
- mixins: [checkVisual],
- props: {
- tableData: {//数据
- type: Array,
- default: () => {
- return [{ name: '123', eventNumber: '手机', projectNumber: '专利数据库一', projectNumber1: [{ name: '事件一' }] },]
- }
- },
- queryParams: {//分页信息
- type: Object,
- default: () => {
- return {
- size: 10,
- current: 1,
- }
- }
- },
- },
- computed: {
- },
- methods: {
- // 点击名称等事件
- handleItem(row, key) {
- // 跳转详情页面
- let router = this.$router.resolve({
- path: '/details',
- query: {
- name: row.name,
- type: row.type,
- status: row.status,
- createPerson: row.createPerson,
- }
- })
- window.open(router.href, '_blank')
- },
- //操作列事件
- handleCommand(option, row) {
- if (option == 'e') {//编辑
- this.action={
- type:'2',
- id:row.id
- }
- }
- var isLast = false
- if(option == '1'){//删除
- this.action={
- type:'1',
- id:row.id
- }
- if(this.tableData.length == 1){
- isLast = true
- }
- }
- this.$emit('option', { option, row ,isLast:isLast})
- },
- },
- }
|