


export const setMainColumns = (self, expData) => {
  return [
    { dataIndex: 'id', title: 'id', width: 120, hidden: true },
    { dataIndex: 'name', title: '预警名称', width: 120 },
    { dataIndex: 'typeName', title: '预警类型', width: 120 },
    { dataIndex: 'sendTypeName', title: '推送方式', width: 120 },
    {
      dataIndex: 'content',
      title: '预警消息',
      width: 200,
      customRender(txt) {
        return self._c('span', {
          domProps: {
            innerHTML:txt.replace(/\$\{[\s\S]*?\}/gi, function (value) {
              return '<span style="color: #c41d7f;">' + value + '</span>';
            }),
          },
        });
      },
    },

    {
      dataIndex: 'alarmStartOffsetName', title: '开始时间偏差', width: 120,
      align:'center',
    },
    {
      dataIndex: 'alarmEndOffsetName', title: '结束时间偏差', width: 120,
      align:'center',
    },
    {
      dataIndex: 'alarmIntervalName', title: '发送间隔', width: 120,
      align:'center',
    },

    {
      dataIndex: 'alarmVoice', title: '语音提醒', width: 120,
      align:'center',
      customRender(txt) {
        return  txt==='Y'?'是':'否'
      }
    },

    { dataIndex: 'conditionName', title: '满足条件', width: 120 },
    { dataIndex: 'statusName', title: '状态', width: 120 },

    { dataIndex: '通知类型', title: '通知类型', width: 120 },
    { dataIndex: '通知类型', title: '指定角色', width: 120 },
    { dataIndex: '指定用户', title: '指定用户', width: 120 },
    { dataIndex: 'createperson', title: '创建人', width: 120 },
    { dataIndex: 'createtime', title: '创建时间' },
    { dataIndex: 'updateperson', title: '修改人' },
    { dataIndex: 'updatetime', title: '修改时间' },

    {
      key: 'operation',
      title: '操作',
      width: 160,
      fixed: 'right',
      align: 'center',
      scopedSlots: { customRender: 'operation' },
    },
  ];
};
