export default {
  data() {
    return {
      total: 20,
      loading: false,
      tableData: [
        { userName: '1111', statusName: '2131231' },
        { userName: '1111', statusName: '2131231' }
      ],
      tableOptions: {
        sortTable: true,
        maxHeight: 'calc(100vh - 270px)',
        height: 'calc(100vh - 270px)'
      },
      columns: [{
        type: 'selection',
        single: true
      },
      {
        label: '序号',
        index: true
      },
      {
        label: '项目岗位',
        prop: 'postName',
        showTooltip: true,
        width: 150
      },
      {
        label: '员工工号',
        showTooltip: true,
        prop: 'userNumber',
        width: 150
      },
      {
        label: '员工姓名',
        prop: 'userName',
        width: 120
      },
      {
        label: '员工类型',
        prop: 'userTypeName',
        width: 120
      },
      {
        label: '其他职责',
        prop: 'otherDutyName',
        showTooltip: true
      },
      {
        label: '进入日期',
        prop: 'inDate'
      },
      {
        label: '状态',
        prop: 'statusName',
        render: (h, row) => {
          return <el-input v-model={row.statusName} placeholder='请输入内容'></el-input>
        }
      },
      {
        label: '操作',
        show: this.$route.query.type !== 'details',
        render: (h, row) => {
          const btnList = [
            { msg: '修改', icon: 'el-icon-edit', power: 'projectNumber:delete', category: 'edit' },
            { msg: '清空', icon: 'el-icon-share', power: 'projectNumber:empty', category: 'clear' }
          ]
          const options = btnList.map(item => {
            return (
              <el-tooltip class='item' effect='dark' content={item.msg} placement='top'>
                <span class='table-icon-box'>
                  <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row) }}></i>
                </span>
              </el-tooltip>
            )
          })
          return <div>{ options }</div>
        },
        width: 200
      }]
    }
  }

}
