|
@@ -38,13 +38,11 @@ class Advice extends Component{
|
|
|
}
|
|
|
|
|
|
handleAssayInput(e) {
|
|
|
- console.log(e.target.value)
|
|
|
const changeInput = e.target.value
|
|
|
const { setChangeAdviceAssay } = this.props;
|
|
|
setChangeAdviceAssay && setChangeAdviceAssay(changeInput)
|
|
|
}
|
|
|
handleCheckInput(e) {
|
|
|
- console.log(e.target.value)
|
|
|
const changeInput = e.target.value
|
|
|
const { setChangeAdviceCheck } = this.props;
|
|
|
setChangeAdviceCheck && setChangeAdviceCheck(changeInput)
|
|
@@ -54,17 +52,15 @@ class Advice extends Component{
|
|
|
comTreatChange && comTreatChange(text)
|
|
|
|
|
|
}
|
|
|
- handleAdviceInput(e) {
|
|
|
+ handleAdviceInput(text) {
|
|
|
const { adviceInputChange } = this.props;
|
|
|
- const text = e.target.innerText;
|
|
|
- console.log(text)
|
|
|
adviceInputChange && adviceInputChange(text)
|
|
|
|
|
|
}
|
|
|
componentDidMount(){
|
|
|
-
|
|
|
- this.adviceInputRef.current.innerText?(this.adviceInputRef.current.innerText = '') : (this.adviceInputRef.current.innerHTML = '')
|
|
|
// this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')
|
|
|
+ // const {advice} = this.props.pushMessage.advice
|
|
|
+ // console.log('adviceInput', this.props.pushMessage)
|
|
|
|
|
|
}
|
|
|
|
|
@@ -104,8 +100,9 @@ class Advice extends Component{
|
|
|
{advice.scheme && advice.scheme.length > 0 && <h1>治疗方案</h1>}
|
|
|
{scheme}
|
|
|
</div>}
|
|
|
- <div className={style['billing']} ref={this.adviceInputRef} contentEditable={true} style = {{outline: 'none'}} onInput={this.handleAdviceInput} >
|
|
|
-
|
|
|
+ <div className={style['billing']} >
|
|
|
+ {!advice.adviceInput && <Textarea value='' isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>}
|
|
|
+ {advice.adviceInput && <Textarea value={advice.adviceInput} isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>}
|
|
|
</div>
|
|
|
</ItemBox>
|
|
|
</div>
|