index.jsx 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. import React, { useEffect, useRef, useState } from 'react';
  2. import { Form, Row, Col, Card, Modal, Input, Select, Upload, Button, message } from 'antd';
  3. import { connect } from 'umi';
  4. import styles from './index.less';
  5. import {
  6. ForkOutlined,
  7. PlusOutlined,
  8. ExclamationCircleFilled,
  9. UploadOutlined,
  10. EditOutlined,
  11. EyeOutlined,
  12. } from '@ant-design/icons';
  13. import * as echarts from 'echarts'
  14. import { recurrent, severity, bug_categories } from './const';
  15. import { timeToString } from '../../utils';
  16. const formItemLayout = {
  17. labelCol: {
  18. span: 8,
  19. },
  20. wrapperCol: {
  21. span: 19,
  22. },
  23. };
  24. const images = [
  25. '../../assents/noArrived.png',
  26. '../../assents/yellowFlag.png',
  27. '../../assents/redFlag.png',
  28. '../../assents/recPage.png',
  29. ];
  30. const Step2 = (props) => {
  31. const [reportForm] = Form.useForm();
  32. const [addCaseForm] = Form.useForm();
  33. const [addBugForm] = Form.useForm();
  34. const { data, dispatch, reportCommonInfo,
  35. testCaseList, caseBugList, categories,pathInfo } = props;
  36. const [showTaskRecommendModal, setTaskRecommendModal] = useState(true);
  37. const [showAddTestCaseModal, setAddTestCaseModal] = useState(false);
  38. const [showAddBugModal, setAddTestBugModal] = useState(false);
  39. const currentTestCaseRef = useRef({});
  40. const [isAddCaseStatus, setIsAddCaseStatus] = useState(true);
  41. // const [currActiveTestCase, setCurrActiveTestCase] = useState({});
  42. const [page2List, setPage2List] = useState([]);
  43. const [page3List, setPage3List] = useState([]);
  44. const chartRef = useRef();
  45. if (!data) {
  46. return null;
  47. }
  48. const handleEditReportInfo = ()=>{
  49. console.log('sss')
  50. }
  51. const initEcharts = () => {
  52. let item_color = 'rgba(226,245,240,1)';
  53. let border_color = 'rgba(0,0,0,0.9)';
  54. // let userPath = this.userPath;
  55. let categories = [
  56. {
  57. 'name': '暂无Bug',
  58. 'icon': images[0],
  59. 'itemStyle': {'normal': {'color': item_color, 'borderColor': border_color}}
  60. },
  61. {
  62. 'name': '已有Bug',
  63. 'icon': images[1],
  64. 'itemStyle': {'normal': {'color': item_color, 'borderColor': border_color}}
  65. },
  66. {
  67. 'name': '我的Bug',
  68. 'icon': images[2],
  69. 'itemStyle': {'normal': {'color': item_color, 'borderColor': border_color}}
  70. },
  71. {
  72. 'name': '推荐页面',
  73. 'icon': images[3],
  74. 'itemStyle': {'normal': {'color': item_color, 'borderColor': border_color}}
  75. }
  76. ];
  77. let option2 = {
  78. legend: { //配置legend,这里的data,要对应type为‘bar’的series数据项的‘name’名称,作为图例的说明
  79. data: categories,
  80. selecedMode: false, //图例禁止点击
  81. top: '5%',
  82. left: '3%',
  83. itemWidth: 10,
  84. itemHeight: 10,
  85. orient: 'vertical',
  86. },
  87. tooltip: {
  88. trigger: 'item',
  89. triggerOn: 'mousemove',
  90. formatter: function (params) {
  91. if (params.data.category == 1) {
  92. return params.name + '<br>' + '我发现/所有: 0/' + params.value;
  93. } else {
  94. return '还未有人在该页面发现Bug,努力寻找第一个Bug吧!';
  95. }
  96. }
  97. },
  98. grid: {
  99. z: 1, //grid作为柱状图的坐标系,其层级要和仪表图层级不同,同时隐藏
  100. show: false,
  101. left: '-30%',
  102. right: '4%',
  103. bottom: '3%',
  104. containLabel: true,
  105. splitLine: {
  106. show: false //隐藏分割线
  107. },
  108. },
  109. xAxis: [ //这里有很多的show,必须都设置成不显示
  110. {
  111. type: 'category',
  112. data: [],
  113. axisLine: {
  114. show: false
  115. },
  116. splitLine: {
  117. show: false
  118. },
  119. splitArea: {
  120. interval: 'auto',
  121. show: false
  122. }
  123. }
  124. ],
  125. yAxis: [ //这里有很多的show,必须都设置成不显示
  126. {
  127. type: 'value',
  128. axisLine: {
  129. show: false
  130. },
  131. splitLine: {
  132. show: false
  133. },
  134. }
  135. ],
  136. series: [
  137. {
  138. type: 'tree',
  139. name: 'tree1',
  140. data: [pathInfo],
  141. //categories:categories,
  142. top: '5%',
  143. left: '9%',
  144. bottom: '1%',
  145. right: '15%',
  146. symbolSize: 12,
  147. label: {
  148. normal: {
  149. position: 'left',
  150. verticalAlign: 'middle',
  151. align: 'right',
  152. fontSize: 9
  153. }
  154. },
  155. leaves: {
  156. label: {
  157. normal: {
  158. position: 'right',
  159. verticalAlign: 'middle',
  160. align: 'left'
  161. }
  162. }
  163. },
  164. expandAndCollapse: true,
  165. initialTreeDepth: 4,
  166. animationDuration: 550,
  167. animationDurationUpdate: 750
  168. },
  169. {
  170. name: categories[0].name,
  171. type: 'bar',
  172. barWidth: '60%', //不显示,可以随便设置
  173. data: [0],
  174. itemStyle: {
  175. normal: {
  176. color: '#41C468', //这里的图例要注意,颜色设置和仪表盘的颜色对应起来
  177. }
  178. }
  179. },
  180. {
  181. name: categories[1].name,
  182. type: 'bar',
  183. barWidth: '60%',
  184. data: [0],
  185. itemStyle: {
  186. normal: {
  187. color: '#70C1B3',
  188. }
  189. }
  190. },
  191. {
  192. name: categories[2].name,
  193. type: 'bar',
  194. barWidth: '60%',
  195. data: [0],
  196. itemStyle: {
  197. normal: {
  198. color: '#00A1E9',
  199. }
  200. }
  201. },
  202. {
  203. name: categories[3].name,
  204. type: 'bar',
  205. barWidth: '60%',
  206. data: [0],
  207. itemStyle: {
  208. normal: {
  209. color: '#00A1E9',
  210. }
  211. }
  212. }
  213. ]
  214. }
  215. const chart = echarts.init(document.getElementById('myChart'));
  216. chart.setOption(option2);
  217. }
  218. const handleAddOrEditTestCase = () => {
  219. addCaseForm.validateFields().then((res) => {
  220. let formData = new FormData();
  221. // formData.append("id", values.reportName);
  222. formData.append('report_id', reportCommonInfo.id);
  223. formData.append('name', res.name);
  224. formData.append('front', res.front);
  225. formData.append('behind', res.behind);
  226. formData.append('description', res.result);
  227. if (!isAddCaseStatus) {
  228. //处理编辑用例
  229. formData.append('id', currentTestCaseRef.current.id);
  230. dispatch({
  231. type: 'editReport/updateTestCase',
  232. payload: {
  233. formData,
  234. report_id: reportCommonInfo.id,
  235. },
  236. }).then((res) => {
  237. if (res && res.status === 200) {
  238. message.success('修改成功!');
  239. }
  240. });
  241. } else {
  242. //处理添加用例
  243. dispatch({
  244. type: 'editReport/createTestCase',
  245. payload: {
  246. formData,
  247. report_id: reportCommonInfo.id,
  248. },
  249. }).then((res) => {
  250. if (res && res.id) {
  251. message.success('添加成功!');
  252. }
  253. });
  254. }
  255. setAddTestCaseModal(false);
  256. });
  257. };
  258. const handleAddBug = () => {
  259. addBugForm.validateFields().then((res) => {
  260. let formData = new FormData();
  261. formData.append('report_id', reportCommonInfo.id);
  262. formData.append('title', res.title);
  263. formData.append('description', res.description);
  264. formData.append('bug_category', res.bug_category);
  265. formData.append('severity', res.severity);
  266. formData.append('recurrent', res.recurrent);
  267. formData.append('parent', null);
  268. formData.append('useCase', currentTestCaseRef.current.id);
  269. formData.append('case_id', '1718');
  270. formData.append('case_take_id', '1718-1718');
  271. formData.append('worker_id', '1');
  272. formData.append('page', `${res.page1}-${res.page2}-${res.page3}`);
  273. //新建bug
  274. dispatch({
  275. type:'editReport/createCaseBug',
  276. payload: {
  277. formData,
  278. useCase:currentTestCaseRef.current.id
  279. }
  280. }).then(res=>{
  281. console.log(res.status)
  282. })
  283. });
  284. };
  285. const handleClickTestCase = (caseItem) => {
  286. // setCurrActiveTestCase(caseItem);
  287. currentTestCaseRef.current = caseItem;
  288. dispatch({
  289. type: 'editReport/getCaseBugList',
  290. payload: caseItem.id,
  291. })
  292. };
  293. const handleEditTestCase = (item) => {
  294. setIsAddCaseStatus(false);
  295. currentTestCaseRef.current = item;
  296. addCaseForm.setFieldsValue(currentTestCaseRef.current);
  297. setAddTestCaseModal(true);
  298. };
  299. const handleClickAddCase = () => {
  300. addCaseForm.resetFields();
  301. setAddTestCaseModal(true);
  302. };
  303. const handleClickAddBug = () => {
  304. //current目前只在点击edit cease的时候会有用
  305. addBugForm.resetFields();
  306. setAddTestBugModal(true);
  307. };
  308. const handleClickRecommendBtn = () => {
  309. dispatch({
  310. type: 'editReport/getPathInfo',
  311. payload: {
  312. case_take_id: '1718-1718',
  313. report_id: reportCommonInfo.id,
  314. },
  315. })
  316. dispatch({
  317. type: 'editReport/getBugRecommendPath',
  318. payload: {
  319. case_take_id: '1718-1718',
  320. report_id: reportCommonInfo.id,
  321. },
  322. })
  323. dispatch({
  324. type: 'editReport/getBugRecommendList',
  325. payload: {
  326. case_take_id: '1718-1718',
  327. report_id: reportCommonInfo.id,
  328. },
  329. })
  330. setTaskRecommendModal(true);
  331. initEcharts();
  332. }
  333. const handleSelectPage1 = (val) =>{
  334. let item = categories.find(x=>x.item === val);
  335. setPage2List(item.children)
  336. }
  337. const handleSelectPage2 = (val) =>{
  338. let item = page2List.find(x=>x.item === val);
  339. setPage3List(item.children)
  340. }
  341. useEffect(() => {
  342. //判断是否已经有报告
  343. dispatch({
  344. type: 'editReport/getReportInfo',
  345. payload: {
  346. case_take_id: '1718-1718',
  347. worker_id: 1,
  348. },
  349. }).then((res) => {
  350. // console.log(res)
  351. // console.log(reportCommonInfo)
  352. //有报告,获取对应信息。没有就直接转去了第一步
  353. dispatch({
  354. type: 'editReport/getTestCaseList',
  355. payload: { report_id: reportCommonInfo.id },
  356. }).then((res)=>{
  357. currentTestCaseRef.current = res;
  358. // setCurrActiveTestCase(res);
  359. });
  360. dispatch({
  361. type: 'editReport/getCategories',
  362. payload: { examId: 1945 },
  363. });
  364. });
  365. }, [dispatch,reportCommonInfo.id]);
  366. return (
  367. <div>
  368. <Row gutter={10}>
  369. <Col span={23}>
  370. <Form
  371. {...formItemLayout}
  372. form={reportForm}
  373. className={styles.stepForm}
  374. hideRequiredMark
  375. initialValues={data}
  376. >
  377. <Row gutter={10}>
  378. <Col span={5}>
  379. <Form.Item label="创建日期" rules={[{ required: true, message: '请输入报告名称' }]}>
  380. {timeToString(reportCommonInfo.create_time_millis)}
  381. </Form.Item>
  382. </Col>
  383. <Col span={5}>
  384. <Form.Item label="报告名称" rules={[{ required: true, message: '请输入报告名称' }]}>
  385. {reportCommonInfo.name}
  386. </Form.Item>
  387. </Col>
  388. <Col span={5}>
  389. <Form.Item label="设备名称" required>
  390. {reportCommonInfo.device_brand}
  391. </Form.Item>
  392. </Col>
  393. <Col span={5}>
  394. <Form.Item label="设备品牌" required>
  395. {reportCommonInfo.device_model}
  396. </Form.Item>
  397. </Col>
  398. <Col span={4}>
  399. <Form.Item label="操作系统" required>
  400. {reportCommonInfo.device_os}
  401. </Form.Item>
  402. </Col>
  403. </Row>
  404. </Form>
  405. </Col>
  406. <Col span={1}>
  407. <EditOutlined className={styles.editReportInfoIcon}
  408. onClick={() => handleEditReportInfo()}
  409. />
  410. </Col>
  411. </Row>
  412. <Card>
  413. <div className={styles.reportContainer}>
  414. <Row gutter={10}>
  415. <Col span={8}>
  416. <div>
  417. <Row gutter={10} style={{ marginBottom: 10 }}>
  418. <Col span={20}><h3>测试用例列表</h3></Col>
  419. <Col span={4}>
  420. <Button size="small" onClick={() => {
  421. handleClickAddCase();
  422. }}>
  423. <PlusOutlined className={styles.addIcon} />
  424. 用例
  425. </Button>
  426. </Col>
  427. </Row>
  428. </div>
  429. <div className={styles.testCaseList}>
  430. {testCaseList && testCaseList.map((item) => {
  431. return (
  432. <div
  433. className={`${styles.testCaseItem} ${currentTestCaseRef.current.id === item.id ? styles.activeCase : ''}`}
  434. key={item.id}
  435. onClick={() => {
  436. handleClickTestCase(item);
  437. }}>
  438. <Row gutter={10}>
  439. <Col span={21}><p>{item.name}</p></Col>
  440. <Col span={3}>
  441. <EditOutlined className={styles.editTestBug}
  442. onClick={() => handleEditTestCase(item)} />
  443. </Col>
  444. </Row>
  445. </div>);
  446. })}
  447. </div>
  448. </Col>
  449. <Col span={16} style={{ paddingLeft: 20 }}>
  450. <Row gutter={10} style={{ marginBottom: 10 }}>
  451. <Col span={20}><h3>缺陷列表</h3></Col>
  452. <Col span={2}>
  453. <Button size="small" onClick={() => handleClickAddBug()}>
  454. <PlusOutlined className={styles.addIcon} />
  455. 缺陷
  456. </Button>
  457. </Col>
  458. <Col span={2}>
  459. <Button size="small" onClick={() => handleClickRecommendBtn()}>
  460. <ForkOutlined className={styles.addIcon} />
  461. 推荐
  462. </Button>
  463. </Col>
  464. </Row>
  465. <div className={styles.testBugList}>
  466. {caseBugList && caseBugList.map((item) => {
  467. return (
  468. <div className={styles.testBugItem} key={item.detail.id}>
  469. <Row gutter={10}>
  470. <Col span={20}>
  471. <div><span className={styles.bugItemTitle}>Bug标题:</span>{item.detail.title}</div>
  472. <div><span className={styles.bugItemTitle}>复现程度:</span>{recurrent[item.detail.recurrent]}
  473. </div>
  474. <div><span className={styles.bugItemTitle}>严重程度:</span>{severity[item.detail.severity]}</div>
  475. <div><span
  476. className={styles.bugItemTitle}>缺陷分类:</span>{item.detail.bug_category}
  477. </div>
  478. </Col>
  479. <Col span={4}>
  480. <Button size='small' style={{ marginTop: 10 }}>
  481. <EyeOutlined />详情</Button>
  482. </Col>
  483. </Row>
  484. </div>
  485. );
  486. })}
  487. </div>
  488. </Col>
  489. </Row>
  490. </div>
  491. </Card>
  492. <Modal title={isAddCaseStatus ? '添加测试用例' : '编辑测试用例'} width={720}
  493. visible={showAddTestCaseModal}
  494. forceRender={true}
  495. className="addModal"
  496. footer={[
  497. <Button key='submit' type="primary" htmlType="submit" onClick={handleAddOrEditTestCase}>确定</Button>,
  498. <Button key='cancel' htmlType="button" style={{ marginLeft: '10px' }}
  499. onClick={() => {
  500. setAddTestCaseModal(false);
  501. }}>取消</Button>]}
  502. onCancel={() => {
  503. setAddTestCaseModal(false);
  504. }}
  505. >
  506. <ExclamationCircleFilled className={styles.addModalInfo} />为了评分准确,请勿提交重复测试用例
  507. <Form
  508. {...formItemLayout}
  509. form={addCaseForm}
  510. layout="horizontal"
  511. className={styles.stepForm}
  512. >
  513. <Form.Item
  514. label="用例名称"
  515. name="name"
  516. rules={[
  517. {
  518. required: true,
  519. message: '请输入用例名称!',
  520. },
  521. ]}
  522. >
  523. <Input />
  524. </Form.Item>
  525. <Form.Item
  526. label="前置条件"
  527. name="front"
  528. rules={[
  529. {
  530. required: true,
  531. message: '请输入前置条件!',
  532. },
  533. ]}
  534. >
  535. <Input.TextArea autoSize={{ minRows: 3, maxRows: 999 }} />
  536. </Form.Item>
  537. <Form.Item
  538. label="测试步骤"
  539. name="behind"
  540. rules={[
  541. {
  542. required: true,
  543. message: '请输入测试步骤!',
  544. },
  545. ]}
  546. >
  547. <Input.TextArea autoSize={{ minRows: 3, maxRows: 999 }} />
  548. </Form.Item>
  549. <Form.Item
  550. label="预期结果"
  551. name="result"
  552. rules={[
  553. {
  554. required: true,
  555. message: '请输入预期结果!',
  556. },
  557. ]}
  558. >
  559. <Input.TextArea autoSize={{ minRows: 3, maxRows: 999 }} />
  560. </Form.Item>
  561. </Form>
  562. </Modal>
  563. <Modal title="添加用例缺陷" visible={showAddBugModal} width={720}
  564. forceRender={true}
  565. footer={[
  566. <Button key='submit' type="primary" htmlType="submit" onClick={handleAddBug}>确定</Button>,
  567. <Button key='cancel' htmlType="button" style={{ marginLeft: '10px' }}
  568. onClick={() => {
  569. setAddTestBugModal(false);
  570. }}>取消</Button>]}
  571. onCancel={() => {
  572. setAddTestBugModal(false);
  573. }}
  574. className={styles.bugForm}
  575. >
  576. <ExclamationCircleFilled className={styles.addModalInfo} />为了评分准确,请勿提交重复Bug
  577. <Form
  578. form={addBugForm}
  579. {...formItemLayout}
  580. layout="horizontal"
  581. className={styles.stepForm}
  582. >
  583. <Form.Item
  584. label="测试标题"
  585. name="title"
  586. rules={[
  587. {
  588. required: true,
  589. message: '请输入测试标题!',
  590. },
  591. ]}
  592. >
  593. <Input.TextArea autoSize={{ minRows: 1, maxRows: 999 }} />
  594. </Form.Item>
  595. <Form.Item
  596. label="题目描述"
  597. name="description"
  598. rules={[
  599. {
  600. required: true,
  601. message: '请输入题目描述!',
  602. },
  603. ]}
  604. >
  605. <Input.TextArea autoSize={{ minRows: 2, maxRows: 999 }} />
  606. </Form.Item>
  607. <Form.Item
  608. label="三级页面"
  609. name="pages"
  610. >
  611. <Row gutter={5} className={styles.pageSelect}>
  612. <Col span={8}>
  613. <Form.Item
  614. name="page1"
  615. rules={[
  616. {
  617. required: true,
  618. message: '请输入一级页面',
  619. },
  620. ]}
  621. >
  622. <Select onSelect={(val)=>{handleSelectPage1(val)}}>
  623. {categories.map((item) => {
  624. return <Select.Option value={item.item} key={item.item}>{item.item}
  625. </Select.Option>;
  626. })}
  627. </Select>
  628. </Form.Item>
  629. </Col>
  630. <Col span={8}>
  631. <Form.Item
  632. name="page2"
  633. rules={[
  634. {
  635. required: true,
  636. message: '请输入二级页面',
  637. },
  638. ]}
  639. >
  640. <Select disabled={!page2List.length}
  641. onSelect={(val)=>{handleSelectPage2(val)}}>
  642. {page2List.map((item)=>{
  643. return <Select.Option value={item.item} key={item.item}>{item.item}</Select.Option>
  644. })}
  645. </Select>
  646. </Form.Item>
  647. </Col>
  648. <Col span={8}>
  649. <Form.Item
  650. name="page3"
  651. rules={[
  652. {
  653. required: true,
  654. message: '请输入三级页面',
  655. },
  656. ]}
  657. >
  658. <Select disabled={!page3List.length}>
  659. {page3List.map((item)=>{
  660. return <Select.Option value={item.item} key={item.item}>{item.item}</Select.Option>
  661. })}
  662. </Select>
  663. </Form.Item>
  664. </Col>
  665. </Row>
  666. </Form.Item>
  667. <Form.Item
  668. label="漏洞分类"
  669. name="bug_category"
  670. rules={[
  671. {
  672. required: true,
  673. message: '请选择漏洞分类!',
  674. },
  675. ]}
  676. >
  677. <Select>
  678. {bug_categories.map((item) => {
  679. return <Select.Option value={item} key={item}>{item}</Select.Option>;
  680. })}
  681. </Select>
  682. </Form.Item>
  683. <Form.Item
  684. label="严重等级"
  685. name="severity"
  686. rules={[
  687. {
  688. required: true,
  689. message: '请选择严重等级!',
  690. },
  691. ]}
  692. >
  693. <Select>
  694. {severity.map((item) => {
  695. return <Select.Option value={item} key={item}>{item}</Select.Option>;
  696. })}
  697. </Select>
  698. </Form.Item>
  699. <Form.Item
  700. label="复现程度"
  701. name="recurrent"
  702. rules={[
  703. {
  704. required: true,
  705. message: '请选择复现程度!',
  706. },
  707. ]}
  708. >
  709. <Select>
  710. {recurrent.map((item) => {
  711. return <Select.Option value={item} key={item}>{item}</Select.Option>;
  712. })}
  713. </Select>
  714. </Form.Item>
  715. {/*<Form.Item*/}
  716. {/* label="上传截图"*/}
  717. {/* name="testName"*/}
  718. {/*>*/}
  719. {/* <Upload*/}
  720. {/* action="https://www.mocky.io/v2/5cc8019d300000980a055e76"*/}
  721. {/* listType="picture"*/}
  722. {/* >*/}
  723. {/* <Button icon={<UploadOutlined />}>Upload</Button>*/}
  724. {/* </Upload>*/}
  725. {/*</Form.Item>*/}
  726. </Form>
  727. </Modal>
  728. {/*<Modal title="修改报告信息" visible={showTaskRecommendModal} onOk={() => setTaskRecommendModal(false)}*/}
  729. {/* onCancel={() => setTaskRecommendModal(false)} className="addModal">*/}
  730. {/* <div>*/}
  731. {/* <div id="forceChart"></div>*/}
  732. {/* </div>*/}
  733. {/*</Modal>*/}
  734. <Modal title="任务推荐" visible={showTaskRecommendModal} onOk={() => setTaskRecommendModal(false)}
  735. onCancel={() => setTaskRecommendModal(false)} className="addModal">
  736. <div>
  737. <div id="myChart" ref={chartRef}></div>
  738. </div>
  739. </Modal>
  740. </div>
  741. );
  742. };
  743. export default connect(({ editReport, loading }) => ({
  744. submitting: loading.effects['editReport/submitStepForm'],
  745. data: editReport.step,
  746. reportCommonInfo: editReport.reportCommonInfo,
  747. testCaseList: editReport.testCaseList,
  748. caseBugList: editReport.caseBugList,
  749. categories: editReport.categories,
  750. pathInfo:editReport.pathInfo
  751. }))(Step2);