export default {
  data() {
    return {
      comSigncolumns: [
        {
          label: '序号',
          index: true
        },
        {
          label: '公司名称',
          prop: 'name',
          showTooltip: true
        },
        {
          label: '认证状态',
          prop: 'authStatus',
          showTooltip: true,
          render: (h, row) => {
            return <div>{ row.authStatus ? '已认证' : '未认证' }</div>
          }
        },
        {
          label: '自动签署状态',
          showTooltip: true,
          prop: 'autoSignStatus',
          render: (h, row) => {
            return <div>{ row.autoSignStatus ? '已签署' : '未签署' }</div>
          }
        },
        {
          label: '创建时间',
          prop: 'gmtCreate',
          showTooltip: true
        },
        {
          label: '操作',
          show: true,
          render: (h, row) => {
            const btnList = [
              {
                msg: '复制认证链接',
                icon: 'iconfont icon-fuzhi',
                power: 'companyCopyAuthUrl',
                category: 'copyUrl'
              },
              {
                msg: '复制自动签署链接',
                icon: 'iconfont icon-fuzhi',
                power: 'companyCopySignUrl',
                category: 'copyAutoUrl'
              },
              {
                msg: '刷新认证状态',
                icon: 'iconfont icon-shuaxin',
                power: 'companyFlushStatus',
                category: 'refreshComUrl'
              },
              {
                msg: '重新生成认证和签署链接',
                icon: 'thin-icon el-icon-refresh',
                power: 'companyCreateUrl',
                category: 'createComUrl'
              },
              {
                msg: '认证详情',
                icon: 'iconfont icon-Magnifier',
                power: 'companyAuthDetail',
                category: 'comUrlDetail'
              }
            ]
            // if(!row.authStatus) {
            //   btnList.splice(-2)
            // }
            const options = btnList.map(item => {
              return (<el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
                <span class='table-icon-box' v-power={item.power} onClick={() => { this.handlerOperate(item.category, row) }}>
                  <i class={item.icon}></i>
                </span>
              </el-tooltip>
              )
            })
            return <div>{ options }</div>
          },
          width: 200
        }
      ]
    }
  },
  computed: {}
}
