highTech.jsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. import React, { Component } from "react";
  2. import {
  3. Button,
  4. DatePicker,
  5. Input,
  6. message,
  7. Select,
  8. Spin,
  9. Table,
  10. Tabs,
  11. Cascader,
  12. } from "antd";
  13. import { ShowModal } from "@/tools";
  14. import { ChooseList } from "../../order/orderNew/chooseList";
  15. import $ from "jquery/src/ajax";
  16. import moment from "moment";
  17. import {
  18. member,
  19. highTechColumns,
  20. doubleSoft,
  21. softWriting,
  22. patent,
  23. audit,
  24. currency,
  25. } from "./highTechConfig";
  26. import ProjectDetails from "./projectDetails";
  27. import Cascaders from "../../../common/cascaders";
  28. const { TabPane } = Tabs;
  29. const { RangePicker } = DatePicker;
  30. const { Option } = Select;
  31. class HighTech extends Component {
  32. constructor(props) {
  33. super(props);
  34. this.state = {
  35. tbaindex: 1,
  36. loading: false,
  37. changeList: undefined,
  38. columns: currency,
  39. status: 0,
  40. page: 1,
  41. pagination: {
  42. defaultCurrent: 1,
  43. defaultPageSize: 10,
  44. showQuickJumper: true,
  45. pageSize: 10,
  46. onChange: function (page) {
  47. this.loadData(page);
  48. }.bind(this),
  49. showTotal: function (total) {
  50. return "共" + total + "条数据";
  51. },
  52. },
  53. dataSource: [],
  54. releaseDate: [],
  55. searchOrderNo: "",
  56. searchContractNo: "",
  57. searchEnterpriseName: "",
  58. declarationBatch: "",
  59. projectSituation: "",
  60. projectAmount: "",
  61. deps: "",
  62. thchDeps: "",
  63. projectType: "",
  64. projectStatus: "",
  65. departmentArr: [],
  66. contactsOption: [],
  67. contactsOptionData: [],
  68. visible: false,
  69. };
  70. this.resetAll = this.resetAll.bind(this);
  71. this.changeList = this.changeList.bind(this);
  72. this.loadData = this.loadData.bind(this);
  73. this.selectSuperId = this.selectSuperId.bind(this);
  74. }
  75. changeList(arr) {
  76. const newArr = [];
  77. this.state.columns.forEach((item) => {
  78. arr.forEach((val) => {
  79. if (val === item.title) {
  80. newArr.push(item);
  81. }
  82. });
  83. });
  84. this.setState({
  85. changeList: newArr,
  86. });
  87. }
  88. loadData(pageNo = "") {
  89. this.setState({
  90. loading: true,
  91. });
  92. $.ajax({
  93. method: "get",
  94. dataType: "json",
  95. crossDomain: false,
  96. url: globalConfig.context + "/api/admin/statistis/selectTaskList",
  97. data: this.props.searchData
  98. ? Object.assign(
  99. {
  100. pageNo: pageNo || 1,
  101. pageSize: this.state.pagination.pageSize || 10,
  102. },
  103. this.props.searchData
  104. )
  105. :
  106. {
  107. pageNo: pageNo || 1,
  108. pageSize: this.state.pagination.pageSize || 10,
  109. startDate:
  110. this.state.releaseDate.length > 0
  111. ? this.state.releaseDate[0]
  112. : undefined, //开始时间
  113. endDate:
  114. this.state.releaseDate.length > 0
  115. ? this.state.releaseDate[1]
  116. : undefined, //结束时间
  117. deps: this.state.deps || undefined, //部门ID
  118. thchDeps: this.state.thchDeps || undefined, //责任部门ID
  119. projectStatus: this.state.projectStatus || undefined, //项目类别
  120. projectType: !this.state.projectType ? undefined : this.state.projectType, //项目分类
  121. orderNo: this.state.searchOrderNo || undefined, //订单编号
  122. contractNo: this.state.searchContractNo || undefined, //合同编号
  123. userName: this.state.searchEnterpriseName || undefined, //企业名称
  124. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  125. projectSituation:
  126. typeof this.state.projectSituation === "number"
  127. ? this.state.projectSituation
  128. : undefined, //项目分类
  129. projectAmount: this.state.projectAmount || undefined, //项目金额
  130. status: this.state.status,
  131. },
  132. success: function (data) {
  133. ShowModal(this);
  134. let theArr = [];
  135. if (!data.data || !data.data.list) {
  136. if (data.error && data.error.length) {
  137. message.warning(data.error[0].message);
  138. }
  139. } else {
  140. for (let i = 0; i < data.data.list.length; i++) {
  141. let thisdata = data.data.list[i];
  142. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  143. theArr.push(thisdata);
  144. }
  145. this.state.pagination.current = data.data.pageNo;
  146. this.state.pagination.total = data.data.totalCount;
  147. if (data.data && data.data.list && !data.data.list.length) {
  148. this.state.pagination.current = 0;
  149. this.state.pagination.total = 0;
  150. }
  151. this.setState({
  152. pagination: this.state.pagination,
  153. page: pageNo,
  154. dataSource: theArr,
  155. });
  156. }
  157. }.bind(this),
  158. }).always(
  159. function () {
  160. this.setState({
  161. loading: false,
  162. });
  163. }.bind(this)
  164. );
  165. }
  166. resetAll() {
  167. this.setState(
  168. {
  169. newArray: [],
  170. releaseDate: [],
  171. searchOrderNo: "",
  172. searchContractNo: "",
  173. searchEnterpriseName: "",
  174. declarationBatch: "",
  175. projectSituation: "",
  176. projectAmount: "",
  177. projectType: "",
  178. deps: "",
  179. thchDeps: "",
  180. projectStatus: "",
  181. columns: currency,
  182. status: 0,
  183. },
  184. () => {
  185. this.Cascaders1.empty();
  186. this.Cascaders2.empty();
  187. this.defaultcolumns();
  188. this.loadData();
  189. }
  190. );
  191. }
  192. //项目类别
  193. selectSuperId() {
  194. $.ajax({
  195. method: "get",
  196. dataType: "json",
  197. crossDomain: false,
  198. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  199. data: {
  200. flag: 0,
  201. },
  202. success: function (data) {
  203. let theArr = [];
  204. let newTheArr = []
  205. let thedata = data.data;
  206. if (!thedata) {
  207. if (data.error && data.error.length) {
  208. message.warning(data.error[0].message);
  209. }
  210. }
  211. for (let i = 0; i < data.data.length; i++) {
  212. let theData = data.data[i];
  213. theArr.push(
  214. <Select.Option value={theData.id} key={theData.cname}>
  215. {theData.cname}
  216. </Select.Option>
  217. );
  218. let newChildren = []
  219. for (let j = 0; j < theData.typeList.length; j++) {
  220. newChildren.push({
  221. label: theData.typeList[j].name,
  222. value: theData.typeList[j].id,
  223. })
  224. }
  225. newTheArr.push({
  226. label: theData.cname,
  227. value: theData.id,
  228. children: newChildren
  229. })
  230. }
  231. this.setState({
  232. contactsOption: theArr,
  233. contactsOptionData: newTheArr,
  234. // contactsOptionData: data.data,
  235. });
  236. }.bind(this),
  237. }).always();
  238. }
  239. // 设置默认table(用来默认不显示某列数据 isNoD:true)
  240. defaultcolumns() {
  241. const newArr = [];
  242. this.state.columns.forEach((item) => {
  243. if (item.isNoD) {
  244. return
  245. } else {
  246. newArr.push(item);
  247. }
  248. });
  249. this.setState({
  250. changeList: newArr,
  251. }, () => {
  252. this.loadData();
  253. });
  254. }
  255. // 导出excel
  256. exportExec() {
  257. message.config({
  258. duration: 20,
  259. });
  260. let loading = message.loading("下载中...");
  261. this.setState({
  262. exportPendingLoading: true,
  263. });
  264. let data = {
  265. startDate:
  266. this.state.releaseDate.length > 0
  267. ? this.state.releaseDate[0]
  268. : undefined, //开始时间
  269. endDate:
  270. this.state.releaseDate.length > 0
  271. ? this.state.releaseDate[1]
  272. : undefined, //结束时间
  273. deps: this.state.deps || undefined, //部门ID
  274. thchDeps: this.state.thchDeps || undefined, //责任部门ID
  275. projectStatus: this.state.projectStatus || undefined, //项目类别
  276. projectType: !this.state.projectType ? undefined : this.state.projectType, //项目分类
  277. status: this.state.status,
  278. orderNo: this.state.searchOrderNo || undefined, //订单编号
  279. contractNo: this.state.searchContractNo || undefined, //合同编号
  280. userName: this.state.searchEnterpriseName || undefined, //企业名称
  281. declarationBatch: this.state.declarationBatch || undefined, //申报批次
  282. projectAmount: this.state.projectAmount || undefined, //项目金额
  283. };
  284. $.ajax({
  285. method: "get",
  286. dataType: "json",
  287. crossDomain: false,
  288. url: "/api/admin/statistis/exporTaskList",
  289. data,
  290. success: function (data) {
  291. if (data.error.length === 0) {
  292. this.download(data.data);
  293. } else {
  294. message.warning(data.error[0].message);
  295. }
  296. }.bind(this),
  297. }).always(
  298. function () {
  299. loading();
  300. this.setState({
  301. exportPendingLoading: false,
  302. });
  303. }.bind(this)
  304. );
  305. }
  306. // 下载
  307. download(fileName) {
  308. window.location.href =
  309. globalConfig.context + "/open/download?fileName=" + fileName;
  310. }
  311. componentWillMount() {
  312. //
  313. if (!this.props.introduce) {
  314. this.defaultcolumns();
  315. this.selectSuperId();
  316. }
  317. if (this.props.searchData) {
  318. let e = this.props.searchData.projectType;
  319. this.setState({
  320. columns:
  321. e == "0"
  322. ? currency : e == "1"
  323. ? patent : e == "2"
  324. ? softWriting : e == "3"
  325. ? audit : e == "4"
  326. ? doubleSoft : e == "5"
  327. ? highTechColumns : e == "6"
  328. ? currency : e == "7"
  329. ? member : currency,
  330. }, () => {
  331. this.defaultcolumns();
  332. });
  333. }
  334. }
  335. render() {
  336. return (
  337. <div className="user-content">
  338. {this.props.introduce ? (
  339. this.props.introduce()
  340. ) : (
  341. <div>
  342. <div className="content-title" style={{ marginBottom: 10 }}>
  343. <span style={{ fontWeight: 900, fontSize: 16 }}>
  344. 项目汇总表 (
  345. {this.state.status === 1
  346. ? "高新" : this.state.status === 2
  347. ? "双软" : this.state.status === 3
  348. ? "软著" : this.state.status === 4
  349. ? "专利" : this.state.status === 5
  350. ? "会员" : this.state.status === 6
  351. ? "审计" : "通用"}
  352. )
  353. </span>
  354. </div>
  355. <Tabs defaultActiveKey="1" className="test"
  356. onChange={e => {
  357. this.setState({
  358. tbaindex: e
  359. })
  360. }}
  361. >
  362. <TabPane tab="搜索" key="1">
  363. <div
  364. className="user-search"
  365. style={{
  366. marginTop: "10px",
  367. marginLeft: "10px",
  368. marginRight: "10px",
  369. }}
  370. >
  371. <Input
  372. placeholder="订单编号"
  373. style={{
  374. width: 150,
  375. marginRight: "10px",
  376. }}
  377. value={this.state.searchOrderNo}
  378. onChange={(e) => {
  379. this.setState({ searchOrderNo: e.target.value });
  380. }}
  381. />
  382. <Input
  383. placeholder="合同编号"
  384. style={{
  385. width: 150,
  386. marginRight: "10px",
  387. }}
  388. value={this.state.searchContractNo}
  389. onChange={(e) => {
  390. this.setState({ searchContractNo: e.target.value });
  391. }}
  392. />
  393. <Input
  394. placeholder="企业名称"
  395. style={{
  396. width: 150,
  397. marginRight: "10px",
  398. }}
  399. value={this.state.searchEnterpriseName}
  400. onChange={(e) => {
  401. this.setState({ searchEnterpriseName: e.target.value });
  402. }}
  403. />
  404. <span style={{ display: "inline-block" }}>
  405. <span style={{ marginRight: "10px" }}>项目分类 :</span>
  406. <Cascader
  407. options={this.state.contactsOptionData}
  408. value={this.state.newArray}
  409. placeholder="请选择"
  410. style={{ width: 200, marginRight: 10 }}
  411. onChange={(e, pre) => {
  412. let first = e[0];
  413. let two = e[1];
  414. this.setState({
  415. newArray: e,
  416. projectStatus: first,
  417. projectType: two,
  418. changeList: undefined,
  419. dataSource: [],
  420. status:
  421. two == "4"
  422. ? 2 : two == "3"
  423. ? 6 : two == "2"
  424. ? 3 : two == "1"
  425. ? 4 : two == "5"
  426. ? 1 : two == "7"
  427. ? 5 : 0,
  428. columns:
  429. two == "0"
  430. ? currency : two == "1"
  431. ? patent : two == "2"
  432. ? softWriting : two == "3"
  433. ? audit : two == "4"
  434. ? doubleSoft : two == "5"
  435. ? highTechColumns : two == "6"
  436. ? currency : two == "7"
  437. ? member : currency,
  438. }, () => {
  439. this.defaultcolumns()
  440. })
  441. }}
  442. />
  443. </span>
  444. {/* <span style={{ display: "inline-block" }}>
  445. <span style={{ marginRight: "10px" }}>
  446. 项目类别 :
  447. </span>
  448. <Select
  449. value={this.state.projectStatus || undefined}
  450. placeholder="请选择项目类别"
  451. notFoundContent="未获取到上级品类列表"
  452. style={{
  453. width: 150,
  454. marginRight: "10px",
  455. }}
  456. onChange={(e) => {
  457. let infor = this.state.contactsOptionData.filter(
  458. (v) => v.id === e
  459. );
  460. this.setState(
  461. {
  462. projectStatus: e,
  463. },
  464. // () => {
  465. // if (infor[0].cname === '高新会员服务' && typeof this.state.projectType !== 'number') {
  466. // this.setState({
  467. // columns: highTechColumns,
  468. // dataSource: [],
  469. // changeList: [],
  470. // status: 1,
  471. // }, () => {
  472. // this.loadData();
  473. // })
  474. // } else if (typeof this.state.projectType !== 'number') {
  475. // this.setState({
  476. // columns: currency,
  477. // dataSource: [],
  478. // changeList: [],
  479. // status: 0,
  480. // }, () => {
  481. // this.loadData();
  482. // })
  483. // } else {
  484. // this.loadData();
  485. // }
  486. // }
  487. );
  488. }}
  489. >
  490. {this.state.contactsOption}
  491. </Select>
  492. </span>
  493. <span style={{ display: "inline-block" }}>
  494. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  495. 项目分类 :
  496. </span>
  497. <Select
  498. value={
  499. typeof this.state.projectType === "number"
  500. ? this.state.projectType
  501. : undefined
  502. }
  503. placeholder="请选择项目分类"
  504. style={{
  505. width: 150,
  506. marginRight: "10px",
  507. }}
  508. onChange={(e) => {
  509. this.setState(
  510. {
  511. columns:
  512. e === 0
  513. ? currency : e === 1
  514. ? patent : e === 2
  515. ? softWriting : e === 3
  516. ? currency : e === 4
  517. ? doubleSoft : e === 5
  518. ? highTechColumns : e === 6
  519. ? currency : currency,
  520. changeList: [],
  521. projectType: e,
  522. status:
  523. e === 4
  524. ? 2 : e === 2
  525. ? 3 : e === 1
  526. ? 4 : e === 5
  527. ? 1 : 0,
  528. dataSource: [],
  529. },
  530. () => {
  531. this.defaultcolumns();
  532. this.loadData();
  533. }
  534. );
  535. }}
  536. >
  537. <Option value={0}>通用</Option>
  538. <Option value={1}>专利</Option>
  539. <Option value={2}>软著</Option>
  540. <Option value={3}>审计</Option>
  541. <Option value={4}>双软</Option>
  542. <Option value={5}>高新</Option>
  543. <Option value={6}>商标</Option>
  544. <Option value={7}>会员</Option>
  545. </Select>
  546. </span> */}
  547. <span
  548. style={{
  549. display: "inline-block",
  550. marginRight: "10px",
  551. }}
  552. >
  553. <span style={{ marginRight: "10px", marginBottom: "10px" }}>订单部门 : </span>
  554. <Cascaders
  555. ref={ref => this.Cascaders1 = ref}
  556. placeholder="请选择订单部门"
  557. height={28}
  558. onSel={(e) => {
  559. this.setState({
  560. deps: JSON.stringify(e)
  561. })
  562. }}
  563. />
  564. </span>
  565. <span
  566. style={{
  567. display: "inline-block",
  568. marginRight: "10px",
  569. }}
  570. >
  571. <span style={{ marginRight: "10px", marginBottom: "10px" }}>负责部门 : </span>
  572. <Cascaders
  573. ref={ref => this.Cascaders2 = ref}
  574. placeholder="请选择负责部门"
  575. height={28}
  576. onSel={(e) => {
  577. this.setState({
  578. thchDeps: JSON.stringify(e)
  579. })
  580. }}
  581. />
  582. {/* <Select
  583. placeholder="请选择部门"
  584. style={{
  585. width: 200,
  586. marginRight: "10px",
  587. marginLeft: "10px",
  588. }}
  589. value={this.state.thchDepId || undefined}
  590. onChange={(e) => {
  591. this.setState({ thchDepId: e });
  592. }}
  593. >
  594. {this.state.departmentArr.map(function (item) {
  595. return (
  596. <Select.Option key={item.id} value={item.id}>
  597. {item.name}
  598. </Select.Option>
  599. );
  600. })}
  601. </Select> */}
  602. </span>
  603. <span style={{ display: "inline-block" }}>
  604. <span style={{ marginRight: "10px", marginBottom: "10px" }}>
  605. 申报批次 :
  606. </span>
  607. <Select
  608. value={this.state.declarationBatch || undefined}
  609. placeholder="请选择批次"
  610. style={{
  611. width: 150,
  612. marginRight: "10px",
  613. }}
  614. onChange={(e) => {
  615. this.setState({
  616. declarationBatch: e,
  617. });
  618. }}
  619. >
  620. <Option value={1}>第一批</Option>
  621. <Option value={2}>第二批</Option>
  622. <Option value={3}>第三批</Option>
  623. <Option value={4}>第四批</Option>
  624. </Select>
  625. </span>
  626. <span style={{ display: "inline-block" }}>
  627. <span style={{ marginRight: "10px" }}>
  628. 项目金额 :
  629. </span>
  630. <Select
  631. value={this.state.projectAmount || undefined}
  632. placeholder="请选择项目金额"
  633. style={{
  634. width: 150,
  635. marginRight: "10px",
  636. }}
  637. onChange={(e) => {
  638. this.setState({
  639. projectAmount: e,
  640. });
  641. }}
  642. >
  643. <Option value={1}>0~0.5万</Option>
  644. <Option value={2}>0.5~1万</Option>
  645. <Option value={3}>1~2万</Option>
  646. <Option value={4}>2~5万</Option>
  647. <Option value={5}>5~10万</Option>
  648. <Option value={6}>10~30万</Option>
  649. <Option value={7}>30~50万</Option>
  650. <Option value={8}>50~80万</Option>
  651. <Option value={9}>80万上</Option>
  652. </Select>
  653. </span>
  654. {/* <span style={{display:"inline-block"}}>*/}
  655. {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
  656. {/* <Select*/}
  657. {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
  658. {/* placeholder="请选择项目情况"*/}
  659. {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
  660. {/* onChange={(e) => {*/}
  661. {/* this.setState({*/}
  662. {/* projectSituation: e,*/}
  663. {/* });*/}
  664. {/* }}*/}
  665. {/* >*/}
  666. {/* <Option value={0}>未开始</Option>*/}
  667. {/* <Option value={1}>进行中</Option>*/}
  668. {/* <Option value={2}>已暂停</Option>*/}
  669. {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
  670. {/* <Option value={4}>已完成</Option>*/}
  671. {/* <Option value={5}>项目已完成 已退单</Option>*/}
  672. {/* <Option value={6}>项目未完成 已退单</Option>*/}
  673. {/* </Select>*/}
  674. {/*</span>*/}
  675. <span style={{ display: "inline-block" }}>
  676. <span style={{ marginRight: "10px" }}>
  677. 派单时间 :
  678. </span>
  679. <RangePicker
  680. allowClear={false}
  681. style={{ marginRight: "10px" }}
  682. value={[
  683. this.state.releaseDate[0]
  684. ? moment(this.state.releaseDate[0])
  685. : null,
  686. this.state.releaseDate[1]
  687. ? moment(this.state.releaseDate[1])
  688. : null,
  689. ]}
  690. onChange={(data, dataString) => {
  691. this.setState({ releaseDate: dataString });
  692. }}
  693. />
  694. </span>
  695. <Button
  696. type="primary"
  697. onClick={() => {
  698. this.loadData();
  699. }}
  700. style={{ marginRight: "10px", marginBottom: "10px" }}
  701. >
  702. 搜索
  703. </Button>
  704. <Button
  705. onClick={this.resetAll}
  706. style={{ marginRight: "10px", marginBottom: "10px" }}
  707. >
  708. 重置
  709. </Button>
  710. </div>
  711. </TabPane>
  712. <TabPane tab="更改表格显示数据" key="2">
  713. {
  714. this.state.tbaindex == 2 &&
  715. <div style={{ marginLeft: 10 }}>
  716. <ChooseList
  717. columns={this.state.columns}
  718. changeFn={this.changeList}
  719. changeList={this.state.changeList}
  720. top={55}
  721. margin={11}
  722. />
  723. </div>
  724. }
  725. </TabPane>
  726. <TabPane tab="导出EXCEL" key="3">
  727. <Button
  728. type="primary"
  729. style={{ margin: "10px" }}
  730. onClick={this.exportExec.bind(this)}
  731. >
  732. 导出excel
  733. </Button>
  734. </TabPane>
  735. </Tabs>
  736. </div>
  737. )}
  738. <div className="patent-table">
  739. <Spin spinning={this.state.loading}>
  740. <Table
  741. bordered
  742. size="middle"
  743. scroll={{
  744. x:
  745. this.state.status === 4 || this.state.status === 3
  746. ? 1800
  747. : 1000,
  748. y: 0,
  749. }}
  750. columns={
  751. (this.state.changeList && this.state.changeList.length != 0)
  752. ? this.state.changeList
  753. : this.state.columns
  754. }
  755. dataSource={this.state.dataSource}
  756. pagination={this.state.pagination}
  757. style={{
  758. cursor: "pointer",
  759. }}
  760. onRowClick={(record) => {
  761. this.setState({
  762. projectdetailsId: record.id,
  763. projectdetailsOrderNo: record.orderNo,
  764. pname: record.pname,
  765. visible: true,
  766. });
  767. }}
  768. />
  769. </Spin>
  770. </div>
  771. {this.state.visible ? (
  772. <ProjectDetails
  773. visible={this.state.visible}
  774. id={this.state.projectdetailsId}
  775. orderNo={this.state.projectdetailsOrderNo}
  776. taskName={this.state.pname}
  777. visitOk={() => {
  778. this.setState({
  779. visible: false,
  780. });
  781. }}
  782. visitCancel={() => {
  783. this.setState({
  784. visible: false,
  785. });
  786. }}
  787. />
  788. ) : null}
  789. </div>
  790. );
  791. }
  792. }
  793. export default HighTech;