let moudule = {};

moudule = {
  props: ['visiable', 'multi', 'rows','rangeTableDatas', 'param','current_prefix','modelId','taskDefinitionKey'],
  created() {
    this.initSetting();
  },
  mounted() {
    this.initTableM1();
  },
  data() {
    var that = this;
    return {
      showDialog: true,
      falseValue: false,
      selectMulti: true,
      formData: {},
      vxeOption: {},
      tableData: [],
      fieldKey:"userId"
    };
  },
  methods: {
    initTableM1() {
      this.tableData = this.$baseLodash.cloneDeep(this.rangeTableDatas || []);
      let that = this;
      let tableOption = {
        vue: that,
        tableRef: 'table-m1',
        tableName: 'wf_task_user_range_dialog-m1',
        columns: [
          {type: 'checkbox', fixed: 'left', width: 48, resizable: false},
          {
            title: this.$t1('候选人姓名'),
            field: 'nickName',
            width: 250,
            fixed: 'left'
          },
          {
            width: 47,
            fixed: 'right',
            title: '',
            sortable: false
          }
        ],
        config: {
          checkboxConfig: {
            checkStrictly: true,
            showHeader: this.selectMulti,
            trigger: 'row'
          }
        }
      };
      this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
        that.vxeOption = opts;
      });
    },
    confirmDialog(){
      let checkRows = this.checkRows;
      if(!checkRows.length){
        this.$baseAlert(this.$t1("请选择候选人"));
        return
      }
      this.dialogPrimary(checkRows)
    }
  }
};

export default moudule;
