|
@@ -1,14 +1,21 @@
|
|
|
import React from "react";
|
|
|
-import { Spin, Form, Modal, Button } from "antd";
|
|
|
+import { Spin, message, Modal, Button, DatePicker, Input, Icon } from "antd";
|
|
|
import ajax from "jquery/src/ajax/xhr.js";
|
|
|
import $ from "jquery/src/ajax";
|
|
|
+import './detail.less';
|
|
|
+import moment from "moment";
|
|
|
import ReactToPrint from "react-to-print";
|
|
|
+import { getPdf } from "../../../../utils/tools";
|
|
|
+
|
|
|
+const { RangePicker } = DatePicker;
|
|
|
|
|
|
const detail = React.createClass({
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
- data: {}
|
|
|
+ change: false,
|
|
|
+ data: {},
|
|
|
+ num: 0,
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -29,7 +36,7 @@ const detail = React.createClass({
|
|
|
this.setState({
|
|
|
data: data.data,
|
|
|
})
|
|
|
- this.addBrowse()
|
|
|
+ this.state.num == 0 && this.addBrowse()
|
|
|
}.bind(this),
|
|
|
}).always(
|
|
|
function () {
|
|
@@ -55,7 +62,9 @@ const detail = React.createClass({
|
|
|
id: this.props.rowdata.id,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
-
|
|
|
+ this.setState({
|
|
|
+ num: 1
|
|
|
+ })
|
|
|
}.bind(this),
|
|
|
}).always(
|
|
|
function () {
|
|
@@ -77,7 +86,9 @@ const detail = React.createClass({
|
|
|
id: this.props.rowdata.id,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
-
|
|
|
+ this.state.data.downloadCount++
|
|
|
+ this.setState({ data: this.state.data });
|
|
|
+ // this.getInfo()
|
|
|
}.bind(this),
|
|
|
}).always(
|
|
|
function () {
|
|
@@ -85,6 +96,96 @@ const detail = React.createClass({
|
|
|
}.bind(this)
|
|
|
)
|
|
|
},
|
|
|
+ // PDF下载
|
|
|
+ pdfDownload() {
|
|
|
+ message.loading("下载中...");
|
|
|
+ window.location.href = globalConfig.context + `/api/admin/RD/downloadDetailsPDF?id=${this.props.rowdata.id}`;
|
|
|
+ // getPdf(this.state.data.rdName, "pdf")
|
|
|
+ this.addDownload()
|
|
|
+ },
|
|
|
+ // Word下载
|
|
|
+ wordDownload() {
|
|
|
+ message.loading("下载中...");
|
|
|
+ window.location.href = globalConfig.context + `/api/admin/RD/downloadDetailsWord?id=${this.props.rowdata.id}`;
|
|
|
+ this.addDownload()
|
|
|
+ },
|
|
|
+ // 修改详情
|
|
|
+ update() {
|
|
|
+ const { data } = this.state
|
|
|
+ // if (!data.userName) {
|
|
|
+ // message.warning("公司名称不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.consultantName) {
|
|
|
+ // message.warning("项目负责人不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.technicalField) {
|
|
|
+ // message.warning("技术领域不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.technologySource) {
|
|
|
+ // message.warning("技术来源不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.totalAmount) {
|
|
|
+ // message.warning("研发费用总预计不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.rdObjective) {
|
|
|
+ // message.warning("研发目的/立项目的/实施方式不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.coreTechnology) {
|
|
|
+ // message.warning("核心技术/创新点不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!data.achieveResults) {
|
|
|
+ // message.warning("成果不能为空!");
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/RD/update",
|
|
|
+ data:
|
|
|
+ {
|
|
|
+ id: data.id,
|
|
|
+ ipNo: data.ipNo,
|
|
|
+ rdNo: data.rdNo,
|
|
|
+ rdStartStr: data.rdStartStr,
|
|
|
+ rdEndStr: data.rdEndStr,
|
|
|
+ userName: data.userName,
|
|
|
+ consultantName: data.consultantName,
|
|
|
+ technicalField: data.technicalField,
|
|
|
+ technologySource: data.technologySource,
|
|
|
+ totalAmount: data.totalAmount,
|
|
|
+ rdObjective: data.rdObjective,
|
|
|
+ coreTechnology: data.coreTechnology,
|
|
|
+ achieveResults: data.achieveResults,
|
|
|
+ },
|
|
|
+ }).done(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ this.getInfo();
|
|
|
+ message.success("保存成功!");
|
|
|
+ this.setState({
|
|
|
+ change: false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
componentWillMount() {
|
|
|
this.getInfo();
|
|
@@ -95,92 +196,250 @@ const detail = React.createClass({
|
|
|
},
|
|
|
|
|
|
render() {
|
|
|
- const { data } = this.state
|
|
|
+ const { data, change } = this.state
|
|
|
return (
|
|
|
<Modal
|
|
|
title={null}
|
|
|
visible={this.props.visible}
|
|
|
onCancel={this.props.onCancel}
|
|
|
footer={null}
|
|
|
- width={800}
|
|
|
+ width={874}
|
|
|
maskClosable={false}
|
|
|
>
|
|
|
- <Form
|
|
|
- layout="horizontal"
|
|
|
- onSubmit={this.handleSubmit}
|
|
|
- id="demand-form"
|
|
|
- style={{ paddingBottom: '0px' }}
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ marginTop: 10,
|
|
|
+ position: "absolute",
|
|
|
+ top: 0,
|
|
|
+ right: 60,
|
|
|
+ zIndex: 9,
|
|
|
+ }}
|
|
|
>
|
|
|
- <ReactToPrint
|
|
|
+ {/* <ReactToPrint
|
|
|
trigger={() => (
|
|
|
<Button
|
|
|
type="primary"
|
|
|
- style={{
|
|
|
- float: "right",
|
|
|
- marginTop: 10,
|
|
|
- position: "absolute",
|
|
|
- top: 0,
|
|
|
- right: 60,
|
|
|
- zIndex: 9,
|
|
|
- }}
|
|
|
+ style={{ marginRight: 20 }}
|
|
|
>
|
|
|
打印
|
|
|
</Button>
|
|
|
)}
|
|
|
content={() => this.refs.all}
|
|
|
- />
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <div className="clearfix"
|
|
|
- style={{ padding: "30px 80px" }}
|
|
|
- ref={(e) => {
|
|
|
- this.refs.all = e;
|
|
|
+ /> */}
|
|
|
+ <Button
|
|
|
+ disabled={change}
|
|
|
+ type="primary"
|
|
|
+ style={{ marginLeft: 0 }}
|
|
|
+ onClick={this.wordDownload.bind(this)}
|
|
|
+ >
|
|
|
+ <Icon type="download" />
|
|
|
+ WORD下载
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ disabled={change}
|
|
|
+ type="primary"
|
|
|
+ style={{ marginLeft: 20 }}
|
|
|
+ onClick={this.pdfDownload.bind(this)}
|
|
|
+ >
|
|
|
+ <Icon type="download" />
|
|
|
+ PDF下载
|
|
|
+ </Button>
|
|
|
+ <div style={{ color: "#58A3FF" }}>已下载次数:{data.downloadCount}</div>
|
|
|
+ </div>
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div
|
|
|
+ className="pdfcount"
|
|
|
+ id="pdf"
|
|
|
+ ref={(e) => {
|
|
|
+ this.refs.all = e;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <h1 style={{ textAlign: "center", marginBottom: 30 }}>{data.rdName}</h1>
|
|
|
+ <div className="formitem">项目起止时间:
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <RangePicker
|
|
|
+ allowClear={false}
|
|
|
+ style={{ width: 200 }}
|
|
|
+ value={[
|
|
|
+ data.rdStartStr ? moment(data.rdStartStr) : null,
|
|
|
+ data.rdEndStr ? moment(data.rdEndStr) : null,
|
|
|
+ ]}
|
|
|
+ onChange={(datas, dataString) => {
|
|
|
+ this.setState({
|
|
|
+ data: Object.assign(data, {
|
|
|
+ rdStartStr: dataString[0],
|
|
|
+ rdEndStr: dataString[1],
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ :
|
|
|
+ <span>{!data.rdStartStr ? "" : (data.rdStartStr + "~" + data.rdEndStr)}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitems">公司名称:
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ placeholder=""
|
|
|
+ value={data.userName}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.userName = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <span>{data.userName}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitems">项目负责人:
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ placeholder=""
|
|
|
+ value={data.consultantName}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.consultantName = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <span>{data.consultantName}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitems">技术领域:
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ placeholder=""
|
|
|
+ value={data.technicalField}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.technicalField = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <span>{data.technicalField}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitems">技术来源:
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ placeholder=""
|
|
|
+ value={data.technologySource}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.technologySource = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <span>{data.technologySource}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitem">研发费用总预计:
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ type='number'
|
|
|
+ placeholder=""
|
|
|
+ value={data.totalAmount}
|
|
|
+ style={{ width: 80 }}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.totalAmount = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <span>{data.totalAmount}</span>
|
|
|
+ }
|
|
|
+ {"万元"}
|
|
|
+ </div>
|
|
|
+ <div className="formitem">研发目的/立项目的/实施方式
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ type="textarea"
|
|
|
+ placeholder=""
|
|
|
+ autosize={{ minRows: 4 }}
|
|
|
+ value={data.rdObjective}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.rdObjective = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <p>{data.rdObjective}</p>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitem">核心技术/创新点
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ type="textarea"
|
|
|
+ placeholder=""
|
|
|
+ autosize={{ minRows: 4 }}
|
|
|
+ value={data.coreTechnology}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.coreTechnology = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <p>{data.coreTechnology}</p>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ <div className="formitem">成果
|
|
|
+ {
|
|
|
+ change ?
|
|
|
+ <Input
|
|
|
+ type="textarea"
|
|
|
+ placeholder=""
|
|
|
+ autosize={{ minRows: 4 }}
|
|
|
+ value={data.achieveResults}
|
|
|
+ onChange={(e) => {
|
|
|
+ data.achieveResults = e.target.value
|
|
|
+ this.setState({ data });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ : <p>{data.achieveResults}</p>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ {
|
|
|
+ change
|
|
|
+ ? <div
|
|
|
+ style={{
|
|
|
+ position: "absolute",
|
|
|
+ bottom: 10,
|
|
|
+ right: 60,
|
|
|
+ zIndex: 9,
|
|
|
}}
|
|
|
>
|
|
|
- <h1 style={{ textAlign: "center", marginBottom: 30 }}>{data.rdName}</h1>
|
|
|
- <div className="formitems">项目起止时间:{data.rdStartS + " - " + data.rdEndS}</div>
|
|
|
- <div className="formitems">公司名称:{data.userName}</div>
|
|
|
- <div className="formitems">项目负责人:{data.consultantName}</div>
|
|
|
- <div className="formitems">技术领域:{data.technicalField}</div>
|
|
|
- <div className="formitems">技术来源:{data.technologySource}</div>
|
|
|
- <div className="formitems">研发费用总预计:{data.totalAmount}{" 万元"}</div>
|
|
|
- <div className="formitems">研发目的/立项目的/实施方式
|
|
|
- <p>
|
|
|
- 为维持良好的锅炉运行和性能,需要正确的对火焰侧操作和控制。
|
|
|
- 我公司锅炉炉瞠出口设有两套传统式的烟温探针,测温元件为热电偶,
|
|
|
- 测量范围0~570%C,在实际运行过程中由于执行机构等部件在高温环
|
|
|
- 境中容易出现故障,测温元件磨损、高温变形,当炉内温度超过580C时
|
|
|
- 为保护烟温探针要将其退出检测,导致炉瞠出口烟温不能连续在线检测
|
|
|
- 目前,锅炉烟温探针只能在锅炉启动初期对炉瞠出口烟温进行检测,以
|
|
|
- 防止再热器干烧超温。锅炉正常运行过程中烟温探针不能连续有效的提
|
|
|
- 供炉瞠出口烟气温度数据,对锅炉运行人员的操作参考性大大降低,在
|
|
|
- 火电机组发展的当今不利于锅炉和机组的安全性和经济性。为解决烟温
|
|
|
- 探针在运行中遇到的以上问题,加强对炉瞠出口烟温的连续测量,提高
|
|
|
- 锅炉的运行和性能,提高机组运行安全性,提出锅炉炉瞠红外测温设备
|
|
|
- 的研究与应用。
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div className="formitems">核心技术/创新点
|
|
|
- <p>
|
|
|
- 提高测量精度及测量范围是解决该问题的前提条件,本项目的核心技术为
|
|
|
- 利用远红外探测器对锅炉燃烧过程中的产物-热CO2气体的温度进行探测。
|
|
|
- 该远红外探测器采用特殊设计的红外滤色镜的薄膜热电堆,使其光谱响应
|
|
|
- 只接受CO2特殊红外光谱段的能量,其他波长的红外能量都被滤除,它能
|
|
|
- 直接用来测量“视场”CO2气体的温度,真实反映锅炉炉瞠出口温度,利用
|
|
|
- 这一先进的测量方法来测量锅炉炉瞠出口温度,使其温度测量可以保持连
|
|
|
- 续性及准确性。
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div className="formitems">成果
|
|
|
- <p>
|
|
|
- 本项目应用目前市场先进科技技术,实现了改动量小,改造费用低,工期
|
|
|
- 短的特性达到理想效果,该工程配置充足的研发资金,由伤害成套院进行
|
|
|
- 可行性研究报告,通过集团招标平台进行脱硝、脱硫除尘一体化 EPC工
|
|
|
- 程招标,小组成员参与的方式,推动研发活动顺利进
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ marginLeft: 20 }}
|
|
|
+ onClick={() => { this.setState({ change: false }) }}
|
|
|
+ >
|
|
|
+ 取消
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ marginLeft: 20 }}
|
|
|
+ onClick={this.update.bind(this)}
|
|
|
+ >
|
|
|
+ 保存
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
- </Spin>
|
|
|
- </Form>
|
|
|
+ : <Button
|
|
|
+ type="primary"
|
|
|
+ style={{
|
|
|
+ position: "absolute",
|
|
|
+ bottom: 10,
|
|
|
+ right: 60,
|
|
|
+ zIndex: 9,
|
|
|
+ }}
|
|
|
+ onClick={() => { this.setState({ change: true }) }}
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </Button>
|
|
|
+ }
|
|
|
</Modal>
|
|
|
);
|
|
|
},
|