import * as React from 'react'; import './index.scss' import DataSource from '&/components/pageBuilder/PropsCollection/StatisticSetting/dataSource' import { getApiUrl, taker } from '&/helper'; interface Props{ data?:any, update:Function } interface State{ dimentions:any, } // const dimentions = [ { id:0, title:'潜力' },{ id:1, title:'绩效' },{ id:2, title:'发展' },{ id:3, title:'协助' } ] export default class NineGridSetting extends React.Component{ state = { dimentions:[], } componentWillMount(){ //get all dimentions const url = getApiUrl(`proxy/GetUPaaSCoreGateway?metaname=Succession&funname=GetMatrixesInfo`) taker(url).then((res:any)=>{ this.setState({dimentions:res}); res.length && this.handleChange(0) }) } handleChange = (val:number) => { const { update } = this.props; update({ selected:val, dimentions:this.state.dimentions[val] }) } render(){ const { dimentions } = this.state; const {data} = this.props; let temp :Array =[]; dimentions.map((a:{title:string},k:number)=>{ temp.push(a.title) }) return
} }