function columns(vm) { const cols = [{ width: 150, title: '巡检单元号', key: 'rowIndex', align: 'center', customRender: function(t, r, index) { return parseInt(index) + 1 } }, { width: 150, title: '班组', align: 'center', dataIndex: 'teamName', key: 'teamName' }, // { // width: 150,title: '线路名称', // align: 'center', // dataIndex: 'lineName', // key: 'lineName' // }, { width: 150, title: '巡检单元(杆号、箱变名称、变配电所)', align: 'center', dataIndex: 'xjdy', key: 'xjdy' }, { width: 150, title: '箱变', align: 'center', dataIndex: 'xb', key: 'xb' }, { width: 150, title: '10/0.4变电所', align: 'center', dataIndex: 'bds', key: 'bds' }, { width: 150, title: '配电所', align: 'center', dataIndex: 'pds', key: 'bds' }, { width: 150, title: '受电线路', align: 'center', dataIndex: 'sdxl', key: 'sdxl' }, { width: 150, title: 'AT/分区所', align: 'center', dataIndex: 'atfqs', key: 'atfqs' }, { width: 150, title: '1月计划', 'align': 'center', 'dataIndex': 'plan1', 'key': 'plan1' }, { width: 150, title: '1月实际', 'align': 'center', 'dataIndex': 'actual1', 'key': 'actual1' }, { width: 150, title: '2月计划', 'align': 'center', 'dataIndex': 'plan2', 'key': 'plan2' }, { width: 150, title: '2月实际', 'align': 'center', 'dataIndex': 'actual2', 'key': 'actual2' }, { width: 150, title: '3月计划', 'align': 'center', 'dataIndex': 'plan3', 'key': 'plan3' }, { width: 150, title: '3月实际', 'align': 'center', 'dataIndex': 'actual3', 'key': 'actual3' }, { width: 150, title: '4月计划', 'align': 'center', 'dataIndex': 'plan4', 'key': 'plan4' }, { width: 150, title: '4月实际', 'align': 'center', 'dataIndex': 'actual4', 'key': 'actual4' }, { width: 150, title: '5月计划', 'align': 'center', 'dataIndex': 'plan5', 'key': 'plan5' }, { width: 150, title: '5月实际', 'align': 'center', 'dataIndex': 'actual5', 'key': 'actual5' }, { width: 150, title: '6月计划', 'align': 'center', 'dataIndex': 'plan6', 'key': 'plan6' }, { width: 150, title: '6月实际', 'align': 'center', 'dataIndex': 'actual6', 'key': 'actual6' }, { width: 150, title: '7月计划', 'align': 'center', 'dataIndex': 'plan7', 'key': 'plan7' }, { width: 150, title: '7月实际', 'align': 'center', 'dataIndex': 'actual7', 'key': 'actual7' }, { width: 150, title: '8月计划', 'align': 'center', 'dataIndex': 'plan8', 'key': 'plan8' }, { width: 150, title: '8月实际', 'align': 'center', 'dataIndex': 'actual8', 'key': 'actual8' }, { width: 150, title: '9月计划', 'align': 'center', 'dataIndex': 'plan9', 'key': 'plan9' }, { width: 150, title: '9月实际', 'align': 'center', 'dataIndex': 'actual9', 'key': 'actual9' }, { width: 150, title: '10月计划', 'align': 'center', 'dataIndex': 'plan10', 'key': 'plan10' }, { width: 150, title: '10月实际', 'align': 'center', 'dataIndex': 'actual10', 'key': 'actual10' }, { width: 150, title: '11月计划', 'align': 'center', 'dataIndex': 'plan11', 'key': 'plan11' }, { width: 150, title: '11月实际', 'align': 'center', 'dataIndex': 'actual11', 'key': 'actual11' }, { width: 150, title: '12月计划', 'align': 'center', 'dataIndex': 'plan12', 'key': 'plan12' }, { width: 150, title: '12月实际', 'align': 'center', 'dataIndex': 'actual12', 'key': 'actual12' } ] return cols } export default columns