Browse Source

bug修复

liting2017 6 years ago
parent
commit
acedc6a0d0

+ 4 - 4
js/component/administration/messagePush/messageOut/messageForm.jsx

@@ -61,9 +61,9 @@ const NewDetailForm = Form.create()(React.createClass({
 						isSend:index=='2'?1:0,  	//是否发送0-否 1-是
 						body:values.body,
 						messageCreateTime:!(this.props.data.id)?times:'null',
-						resourceId:this.state.objData.rowId,
-						resourceType:getZiYuanType(this.state.objData.fromTable),
-						resourceName:this.state.objData.title
+						resourceId:this.props.data.id?this.state.objData.rowId:'',
+						resourceType:this.props.data.id?getZiYuanType(this.state.objData.fromTable):'',
+						resourceName:this.props.data.id?this.state.objData.title:''
                     }
                 }).done(function (data) {
                     this.setState({
@@ -107,7 +107,7 @@ const NewDetailForm = Form.create()(React.createClass({
 	},
 	componentWillMount(){
 		this.setState({
-			objTitle:this.props.data.resourceName
+			objTitle:this.props.data.resourceName||''
 	   })
 	},
     componentWillReceiveProps(nextProps) {