|
|
|
@ -72,11 +72,18 @@ export default class Shixuninformation extends Component {
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
if (this.props.data) {
|
|
|
|
|
if (this.props.data.shixun) {
|
|
|
|
|
let time =this.props.data && this.props.data.shixun.opening_time;
|
|
|
|
|
let timetype=false;
|
|
|
|
|
if(!time){
|
|
|
|
|
timetype=false;
|
|
|
|
|
}else{
|
|
|
|
|
timetype=true;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy,
|
|
|
|
|
use_scope: this.props.data && this.props.data.shixun.use_scope,
|
|
|
|
|
opening_time: this.props.data && this.props.data.shixun.opening_time,
|
|
|
|
|
opentime: !this.props.data && this.props.data.shixun.opening_time ? false : true,
|
|
|
|
|
opentime: timetype,
|
|
|
|
|
oldscope_partment: this.props.data && this.props.data.shixun.scope_partment,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -100,11 +107,18 @@ export default class Shixuninformation extends Component {
|
|
|
|
|
if (prevProps.data != this.props.data) {
|
|
|
|
|
if (this.props.data) {
|
|
|
|
|
if (this.props.data.shixun) {
|
|
|
|
|
let time =this.props.data && this.props.data.shixun.opening_time;
|
|
|
|
|
let timetype=false;
|
|
|
|
|
if(!time){
|
|
|
|
|
timetype=false;
|
|
|
|
|
}else{
|
|
|
|
|
timetype=true;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy,
|
|
|
|
|
use_scope: this.props.data && this.props.data.shixun.use_scope,
|
|
|
|
|
opening_time: this.props.data && this.props.data.shixun.opening_time,
|
|
|
|
|
opentime: !this.props.data && this.props.data.shixun.opening_time ? false : true,
|
|
|
|
|
opentime: timetype,
|
|
|
|
|
oldscope_partment: this.props.data && this.props.data.shixun.scope_partment,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|