Commit 7a19af0dbf49b061957d90a8b720eafa10d60cab
1 parent
79ee33de
1.修复产品提醒的展示
Showing
2 changed files
with
51 additions
and
47 deletions
src/mes/scheduledTasks/prenatalReminderInfo1/index.js
| ... | ... | @@ -77,55 +77,57 @@ const PrenatalReminderInfo = function(baseProps) { |
| 77 | 77 | return item && item.sControlName && item.sControlName.includes("_") && item.bVisible; |
| 78 | 78 | }); |
| 79 | 79 | |
| 80 | - const renderItems = []; | |
| 81 | 80 | |
| 82 | - memoListFilter.forEach(function(item, index) { | |
| 83 | - const title = item.showName; | |
| 84 | - console.log('nihaoaoaoao ', title, item); | |
| 85 | - const dataValueNew = viewRow[item.sName] || ""; | |
| 86 | - const child = { | |
| 87 | - sId: commonUtils.createSid(), | |
| 88 | - sName: item.sName, | |
| 89 | - sControlName: item.sControlName, | |
| 90 | - bVisible: true, | |
| 91 | - showName: title | |
| 92 | - }; | |
| 93 | - const showTypeProps = { | |
| 94 | - app: app, | |
| 95 | - className: styles.showType, | |
| 96 | - iColValue: item.iColValue || 24, | |
| 97 | - name: tableName, | |
| 98 | - record: viewRow, | |
| 99 | - sId: commonUtils.createSid(), | |
| 100 | - getSqlDropDownData: props.getSqlDropDownData, | |
| 101 | - getSqlCondition: props.getSqlCondition, | |
| 102 | - handleSqlDropDownNewRecord: props.handleSqlDropDownNewRecord, | |
| 103 | - getFloatNum: props.getFloatNum, | |
| 104 | - onChange: props.onDataChange, | |
| 105 | - showConfig: child, | |
| 106 | - slaveConfig: props[tableName + "Config"], | |
| 107 | - formItemLayout: { labelCol: { span: 0 }, wrapperCol: { span: 24 } }, | |
| 108 | - textArea: true, | |
| 109 | - enabled: false, | |
| 110 | - dataValue: dataValueNew, | |
| 111 | - bTable: true, | |
| 112 | - bViewTable: true, | |
| 113 | - formRoute: props.formRoute, | |
| 114 | - getDateFormat: props.getDateFormat | |
| 115 | - }; | |
| 116 | 81 | |
| 117 | - const key = item.iIncrement !== undefined ? item.iIncrement : index; | |
| 118 | - renderItems.push( | |
| 119 | - React.createElement("div", { key: key }, | |
| 120 | - React.createElement("div", { className: styles.title }, title), | |
| 121 | - React.createElement("div", { className: styles.content }, | |
| 122 | - React.createElement(ShowType, showTypeProps) | |
| 123 | - ) | |
| 124 | - ) | |
| 125 | - ); | |
| 126 | - }); | |
| 82 | + return ( | |
| 83 | + <div className={styles.prenatalReminderInfo}> | |
| 84 | + {memoListFilter.map(function(item, index) { | |
| 85 | + const title = item.showName; | |
| 86 | + let dataValueNew = viewRow[item.sName] || ""; | |
| 87 | + dataValueNew = dataValueNew.replace(/\\n,/g, '\n'); | |
| 88 | + const child = { | |
| 89 | + sId: commonUtils.createSid(), | |
| 90 | + sName: item.sName, | |
| 91 | + sControlName: item.sControlName, | |
| 92 | + bVisible: true, | |
| 93 | + showName: title | |
| 94 | + }; | |
| 95 | + const showTypeProps = { | |
| 96 | + app: app, | |
| 97 | + className: styles.showType, | |
| 98 | + iColValue: 24, | |
| 99 | + name: tableName, | |
| 100 | + record: viewRow, | |
| 101 | + sId: commonUtils.createSid(), | |
| 102 | + getSqlDropDownData: props.getSqlDropDownData, | |
| 103 | + getSqlCondition: props.getSqlCondition, | |
| 104 | + handleSqlDropDownNewRecord: props.handleSqlDropDownNewRecord, | |
| 105 | + getFloatNum: props.getFloatNum, | |
| 106 | + onChange: props.onDataChange, | |
| 107 | + showConfig: child, | |
| 108 | + slaveConfig: props[tableName + "Config"], | |
| 109 | + formItemLayout: { labelCol: { span: 0 }, wrapperCol: { span: 24 } }, | |
| 110 | + textArea: true, | |
| 111 | + enabled: false, | |
| 112 | + dataValue: dataValueNew, | |
| 113 | + bTable: true, | |
| 114 | + bViewTable: true, | |
| 115 | + formRoute: props.formRoute, | |
| 116 | + getDateFormat: props.getDateFormat | |
| 117 | + }; | |
| 127 | 118 | |
| 128 | - return React.createElement("div", { className: styles.prenatalReminderInfo }, renderItems); | |
| 119 | + const key = item.iIncrement !== undefined ? item.iIncrement : index; | |
| 120 | + return ( | |
| 121 | + <div key={key}> | |
| 122 | + <div className={styles.title}>{title}</div> | |
| 123 | + <div className={styles.content}> | |
| 124 | + <ShowType {...showTypeProps} /> | |
| 125 | + </div> | |
| 126 | + </div> | |
| 127 | + ); | |
| 128 | + })} | |
| 129 | + </div> | |
| 130 | + ); | |
| 129 | 131 | }; |
| 130 | 132 | |
| 131 | 133 | -export default PrenatalReminderInfo; |
| 134 | +export default PrenatalReminderInfo; | |
| 132 | 135 | \ No newline at end of file | ... | ... |