返回

DataTable

baseSettings

baseSettings: {
    // 主接口 Object
    interface: {
        // 接口
      fn: org,
      // 参数
      args: {
        search: '',
        attributeId: '',
        currentPage: 1,
        pagesize: 10
      }
    },
    // 搜索框 Object
    search: {
      placeholder: '请输入机构名称搜索',
      visible: true
    },
    // 下拉列表 Array
    selectList: [{
      field: 'attribute',
      list: [{
        label: '本科',
        value: '本科'
      }, {
        label: '高职高专',
        value: '高职高专'
      }, {
        label: '社会',
        value: '社会'
      }]
    }],
     // 右侧按钮
    rightBtns: [{
      type: 'add',
      text: '机构添加',
      fn: function() {
        this.$router.push('/mechanism/mechanism-add')
      }
    }],
   table 按钮
    operateBtns: {
        设置该栏的名称,默认为操作
        name: '',
        data: [
            {
                type: 'edit',
                text: '编辑',
                fn: function() {
                    this.$router.push('')
                }
            },
            { 
                type: 'delete',
                text: '删除',
                dialog: {
                    title: '删除确认',
                    textArr: ['确定要删除该机构吗?']
                },
                interface: {
                    fn: '',
                    args: 
                }
            }
        ]
    },
    index: true
  },

columns

columns: [
    {
      prop: 'name',
      label: '机构名称'
    }, {
      prop: 'accountname',
      label: '机构账号'
    }, {
      prop: 'attribute',
      label: '机构属性'
    }, {
      prop: 'name',
      label: '联系人'
    }, {
      prop: 'phone',
      label: '手机号'
    }
  ]