/*
 * @Author: zhangleyuan
 * @Date: 2021-02-20 16:45:51
 * @LastEditors: yuananting
 * @LastEditTime: 2021-07-28 14:46:51
 * @Description: 描述一下
 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
 */
import React from 'react';
import { Button } from 'antd';
import { withRouter } from 'react-router-dom';
import User from '@/common/js/user';
// import './PlanOpt.less';
function PlanOpt() {
  function  handleCreatePlan(){
    window.RCHistory.push({
      pathname: '/create-plan?type=add',
    })
  }
  return (
    <div className="plan-opt-page">
      { (User.getUserRole() === "CloudManager" || User.getUserRole() === "StoreManager") &&
          <Button
            type="primary"
            className="mr12"
            onClick={handleCreatePlan}
          >新建培训任务</Button>
      }
    </div>
  );
}
export default withRouter(PlanOpt)