Commit 6edfc099 by Zhang Xin

根据后台ç»接口修改平板故障上报

parent b021bb42
...@@ -63,6 +63,40 @@ const getUserinfo = (employeeId,storeId)=>{ ...@@ -63,6 +63,40 @@ const getUserinfo = (employeeId,storeId)=>{
}; };
let mock = {
data : {
flatCommonVo : {
currentTaskName: "故障上报",
currentTaskNum: 1,
currentTaskType: "ER",
taskId: 1040,
totalTaskNum: 3,
},
skuFlatVo : {
detailList : [{
"id": 660,
"storeId": 7,
"errorCode": "ER00021",
"type": "KN",
"description": "1:回零故障,2:直流电机回位错误或步进电机初始化错误(根据前一条故障代码判断)",
"taskId": 0,
"isExistProblem": 0,
"imagesFileId": "3879,3878,3846,3843",
"superType": 1,
"subType": 2,
"parentProblemType": 0,
"subProblemType": 0,
"explanation": null,
"handler": 0,
"parentProblemName": null,
"subProblemName": null,
"sellOrderNumber": "0"
}]
}
}
}
//拉取工单 //拉取工单
const getTaskList = (data={})=>{ const getTaskList = (data={})=>{
......
...@@ -2,7 +2,7 @@ import fetch from 'isomorphic-fetch'; ...@@ -2,7 +2,7 @@ import fetch from 'isomorphic-fetch';
import actionTypes from '../actiontype/trouble' import actionTypes from '../actiontype/trouble'
import userActionTypes from "../actiontype/user"; import userActionTypes from "../actiontype/user";
import {saveHeaderInfo} from './initHeader' import {saveHeaderInfo} from './initHeader'
import {saveCommonInfo} from "./common"; import {saveCommonInfo,getTaskList} from "./common";
const domain = ENV.domain; const domain = ENV.domain;
...@@ -178,21 +178,24 @@ const getTroubleList = (info) => { ...@@ -178,21 +178,24 @@ const getTroubleList = (info) => {
const updateTroubleList = (info, headerInfo) => { const updateTroubleList = (info, headerInfo) => {
let {taskInfo={},userInfo={},storeInfo={}} = headerInfo; let {taskInfo={},userInfo={},storeInfo={}} = headerInfo;
let bodyData = Object.assign({}, {details: info}, {taskId:taskInfo.taskId,employeeId:storeInfo.employeeId,storeId:storeInfo.id}); let bodyData = Object.assign({}, {details: info}, {taskId:taskInfo.taskId,employeeId:userInfo.employeeId,storeId:storeInfo.id});
bodyData = Object.assign({}, {details: info}, {taskId:taskInfo.taskId,employeeId:"",storeId:""});
return (dispatch) => { console.log("updateTroubleList ",bodyData);
fetch(domain + 'machine_pad/save_all.action', { //todo 更新故障处理,并且获取新的工单
credentials: 'include', // return (dispatch) => {
method: 'POST', // fetch(domain + 'machine_pad/save_all.action', {
mode: 'cors', // credentials: 'include',
headers: myHeaders, // method: 'POST',
body: JSON.stringify(bodyData) // mode: 'cors',
}).then((response) => response.json()) // headers: myHeaders,
.then(json => { // body: JSON.stringify(bodyData)
}).catch(e => { // }).then((response) => response.json())
console.error(e) // .then(json => {
}) // getTaskList(headerInfo)
} // }).catch(e => {
// console.error(e)
// })
// }
}; };
export {getTroubleList, updateTroubleList} export {getTroubleList, updateTroubleList}
......
...@@ -18,7 +18,7 @@ export default class TextAreaContainer extends React.Component{ ...@@ -18,7 +18,7 @@ export default class TextAreaContainer extends React.Component{
componentWillMount() { componentWillMount() {
let {text} = this.props; let {text} = this.props;
this.setState({ this.setState({
text : text, text : text ? text : '',
originText : text, originText : text,
}) })
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.textAreaContainer .textAreaDiv { .textAreaContainer .textAreaDiv {
width: 100%; width: 100%;
background-color: #f5f5f5; background-color: #fff;
height: 3.566666666666667rem; height: 3.566666666666667rem;
border: 2px solid #e5e5e5; border: 2px solid #e5e5e5;
border-radius: 0.08333333333333333rem; border-radius: 0.08333333333333333rem;
......
...@@ -9,16 +9,8 @@ export default class TroubleItemComponent extends React.Component{ ...@@ -9,16 +9,8 @@ export default class TroubleItemComponent extends React.Component{
super(props) super(props)
this.state = { this.state = {
text: '', text: '',
imgStyle:{
'height':'100%',
} }
} }
this.reRreshImg = this.reRreshImg.bind(this)
this.deleteImgById = this.deleteImgById.bind(this)
this.confirmDeleteImg = this.confirmDeleteImg.bind(this)
this.addImg = this.addImg.bind(this)
this.showImg = this.showImg.bind(this)
}
getDes(item){ getDes(item){
let des = ""; let des = "";
...@@ -33,98 +25,10 @@ export default class TroubleItemComponent extends React.Component{ ...@@ -33,98 +25,10 @@ export default class TroubleItemComponent extends React.Component{
return des; return des;
} }
reRreshImg(){
let props = this.props;
let item = props.item;
props.getRefreshImg(item.id,item.type)
}
addImg(){
let props = this.props;
let item = props.item;
props.showQrcode(item.errorCode)
}
deleteImgById(fileId){
console.log("deleteImgById :",fileId);
let props = this.props;
let {deleteImg,hidePopup} = props;
let item = props.item;
let errorId = item.id;
let type = item.type;
hidePopup();
deleteImg(errorId,type,fileId)
}
confirmDeleteImg(fileId){
let {showPopup,hidePopup} = this.props;
let btnWidth = UTILPATH.getRemByPx(260);
let btnMarginLeft = UTILPATH.getRemByPx(30);
let btnDom1 = <Button key={"confirmDeleteTroubleImg1"} style={{'width':btnWidth}} text={"取消"} option={hidePopup}/>
let btnDom2 = <Button key={"confirmDeleteTroubleImg2"} style={{'width':btnWidth,'marginLeft':btnMarginLeft}} text={"确定"} option={()=>this.deleteImgById(fileId)}/>
let popDom = <PopModel popupText={"确定删除此照片吗"} popupButtons={[btnDom1,btnDom2]}/>
showPopup({popupChild:popDom});
// showPopup({
// popupText:'确定删除此照片吗',
// popupButtons:[btnDom1,btnDom2]
// })
}
showImg(imgSrc){
let {showPopup,hidePopup} = this.props;
let showImgDom = <div onClick={()=>hidePopup()} className={"showBigImg"}>
<img src={imgSrc} alt=""/>
</div>;
let popDom = <PopModel popupTitle={""} classContainer={"troubleContainerPopup"}>
{showImgDom}
</PopModel>;
showPopup({popupChild:popDom});
// showPopup({
// popupChild : showImgDom,
// showPopup : true
// });
}
render(){ render(){
let props = this.props; let props = this.props;
let item = props.item ? props.item : {}; let item = props.item ? props.item : {};
let description = this.getDes(item); let description = this.getDes(item);
let imgFiles = Array.isArray(item.files) ? item.files.map((f,k)=>{
return <ImageComponent key={"troubleItemImg"+k}
noCloseBtn={false}
handleClikCloseFunc = {()=>this.confirmDeleteImg(f.id)}
handleClikImgFunc = {()=>{this.showImg(f.filePath)}}
type={"custom"}
imgSrc = {f.filePath}/>
}) : [];
let imgLength = imgFiles.length;
if(imgLength < 9){
imgFiles.push(<ImageComponent showSrc={true} key={"troubleItemImgadd"+imgLength} disabled={!(item.isExistProblem && parseInt(item.isExistProblem) === 1)} type={"add"} handleClikImgFunc = {this.addImg} noCloseBtn = {true} />);
imgLength++;
}
imgFiles.push(<ImageComponent key={"troubleItemImgrefresh"+imgLength} handleClikImgFunc = {this.reRreshImg} type={"refresh"} noCloseBtn = {true} />);
let swiperOptions = {
width : 90,
spaceBetween: 20,
// freeMode:true,
// pagination: '.pagination',
// loop:false,
mode: 'horizontal',
touchRatio:0.5,
longSwipesRatio:0.1,
threshold:50,
lazyLoadingInPrevNext:true,
lazyLoading : true,
followFinger:false,
observer: true,//修改swiper自己或子元素时,自动初始化swiper
observeParents: true,//修改swiper的父元素时,自动初始化swiper
lazyLoadingInPrevNextAmount: 11,
};
let swiperContainer = CONFIG.swiperContainers.troubleSwiperImgContainer + item.errorCode;
let swiperCount = imgLength+1;
let text = ""; let text = "";
if(item.explanation){ if(item.explanation){
text = item.explanation.length > 200 ? item.explanation.substring(0,200) + '...' : item.explanation text = item.explanation.length > 200 ? item.explanation.substring(0,200) + '...' : item.explanation
...@@ -162,10 +66,6 @@ export default class TroubleItemComponent extends React.Component{ ...@@ -162,10 +66,6 @@ export default class TroubleItemComponent extends React.Component{
</div> </div>
</div> </div>
<div className={"itemControl rel"}>
{imgFiles}
</div>
</div> </div>
) )
} }
......
...@@ -117,7 +117,7 @@ class PageContainer extends React.Component { ...@@ -117,7 +117,7 @@ class PageContainer extends React.Component {
this.taskTypeOption = { this.taskTypeOption = {
'ER': this.showTroublePage, 'FIRST': this.showTroublePage,
'SECOND': this.showSecondTroubelPage 'SECOND': this.showSecondTroubelPage
}; };
} }
...@@ -151,10 +151,10 @@ class PageContainer extends React.Component { ...@@ -151,10 +151,10 @@ class PageContainer extends React.Component {
dispatch(getStoreInfo(data.storeId)); dispatch(getStoreInfo(data.storeId));
// dispatch(saveCommonInfo({ip:"192.168.10.128"})); // dispatch(saveCommonInfo({ip:"192.168.10.128"}));
// dispatch(getStoreInfo(20)); // dispatch(getStoreInfo(13));
// dispatch(saveCommonInfo({userInfo:{employeeId:9}})); // dispatch(saveCommonInfo({userInfo:{employeeId:9}}));
// dispatch(getUserinfo(9,20)) // dispatch(getUserinfo(9,13))
// dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:'B'}}))) // dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:'A'}})))
// dispatch(saveCommonInfo({userInfo:{employeeId:20}})); // dispatch(saveCommonInfo({userInfo:{employeeId:20}}));
// dispatch(getUserinfo(20,data.storeId)); // dispatch(getUserinfo(20,data.storeId));
}); });
...@@ -739,6 +739,9 @@ class PageContainer extends React.Component { ...@@ -739,6 +739,9 @@ class PageContainer extends React.Component {
case showPage[12]: case showPage[12]:
pages =<TroubleContainer pages =<TroubleContainer
headerInfo={commonInfo} headerInfo={commonInfo}
showPopup={(info)=>this.showPopup(info)}
hidePopup={()=>this.hidePopup()}
updateTroubleList={(info)=>dispatch(updateTroubleList(info,commonInfo))}
/> />
break; break;
case showPage[131]: case showPage[131]:
......
...@@ -6,8 +6,9 @@ export default class RightContainer extends React.Component{ ...@@ -6,8 +6,9 @@ export default class RightContainer extends React.Component{
} }
render(){ render(){
let {style={}} = this.props;
return( return(
<div className={"rightContainer"}> <div className={"rightContainer"} style={style}>
{this.props.children} {this.props.children}
</div> </div>
) )
......
...@@ -29,38 +29,45 @@ export default class TroubleContainer extends React.Component{ ...@@ -29,38 +29,45 @@ export default class TroubleContainer extends React.Component{
showStatus:showDom[1], showStatus:showDom[1],
style : {}, style : {},
initialSlide : 0, initialSlide : 0,
tempinitialSlide : 0 tempinitialSlide : 0,
btnClock : false
}; };
this.setItem = this.setItem.bind(this); this.setItem = this.setItem.bind(this);
this.showText = this.showText.bind(this); this.showText = this.showText.bind(this);
this.showQrcode = this.showQrcode.bind(this);
this.goBack = this.goBack.bind(this); this.goBack = this.goBack.bind(this);
this.saveText = this.saveText.bind(this); this.saveText = this.saveText.bind(this);
this.getDefaultDom = this.getDefaultDom.bind(this); this.getDefaultDom = this.getDefaultDom.bind(this);
this.getDefaultDoms = this.getDefaultDoms.bind(this);
this.getTextAreaDom = this.getTextAreaDom.bind(this); this.getTextAreaDom = this.getTextAreaDom.bind(this);
this.getQrcodeDom = this.getQrcodeDom.bind(this);
this.updateImg = this.updateImg.bind(this);
this.dealTrouble = this.dealTrouble.bind(this); this.dealTrouble = this.dealTrouble.bind(this);
this.setStyle = this.setStyle.bind(this); this.setStyle = this.setStyle.bind(this);
this.onSlideChangeEnd = this.onSlideChangeEnd.bind(this);
this.abandonSaveText = this.abandonSaveText.bind(this); this.abandonSaveText = this.abandonSaveText.bind(this);
this.changeIsSend =this.changeIsSend.bind(this);
} }
componentWillMount(){ componentWillMount(){
let {troubleList,initTroubleList} = this.props; let {headerInfo} = this.props;
// initTroubleList({storeId: 7, employeeId: 5, token: "966D5C0B-3CF2-420D-B9A3-313BA37DE092"}); let {taskList={}} = headerInfo;
this.setState({ this.setState({
troubleList : troubleList troubleList : taskList
})
}
componentWillUnmount(){
this.setState({
btnClock : false
}) })
} }
componentWillReceiveProps(nextProps){ componentWillReceiveProps(nextProps){
let troubleList = nextProps.troubleList; console.log("componentWillReceiveProps ",nextProps)
let nowTroubleList = this.state.troubleList; let {headerInfo} = this.props;
let troubleErrorCodeList = Array.isArray(troubleList.details) ? troubleList.details.map(i=>i.errorCode) : []; let {taskList={}} = headerInfo;
let nowtroubleErrorCodeList = Array.isArray(nowTroubleList.details) ? nowTroubleList.details.map(i=>i.errorCode) : []; let nextHeaderInfo = nextProps.headerInfo;
let nextTaskList = nextHeaderInfo ? nextHeaderInfo.taskList : {};
let troubleErrorCodeList = Array.isArray(taskList.detailList) ? taskList.detailList.map(i=>i.errorCode) : [];
let nowtroubleErrorCodeList = Array.isArray(nextTaskList.detailList) ? nextTaskList.detailList.map(i=>i.errorCode) : [];
//上一次和这一次不一样 //上一次和这一次不一样
let troubleErrorCodeListStr = troubleErrorCodeList.join(","); let troubleErrorCodeListStr = troubleErrorCodeList.join(",");
...@@ -70,54 +77,17 @@ export default class TroubleContainer extends React.Component{ ...@@ -70,54 +77,17 @@ export default class TroubleContainer extends React.Component{
troubleErrorCodeListStr !== nowtroubleErrorCodeListStr troubleErrorCodeListStr !== nowtroubleErrorCodeListStr
){ ){
this.setState({ this.setState({
troubleList : troubleList troubleList : nextTaskList
}) })
} }
let refreshImg = nextProps.refreshImg;
if(refreshImg && refreshImg.files && refreshImg.errorId && refreshImg.type){
this.updateImg(refreshImg);
}
// let lastRefreshImg = this.props.refreshImg;
// if(
// (
// !lastRefreshImg && (refreshImg && refreshImg.errorId && refreshImg.type && refreshImg.files)
// ) ||
// (
// lastRefreshImg && refreshImg && lastRefreshImg.errorId !== refreshImg.errorId
// ) ||
// (
// lastRefreshImg && refreshImg && lastRefreshImg.type !== refreshImg.type
// ) ||
// (
// lastRefreshImg && refreshImg && lastRefreshImg.files && refreshImg.files && refreshImg.files.length !== lastRefreshImg.files.length
// )
//
// ){
// this.updateImg(refreshImg);
// }
} }
updateImg(info){
let {emptyImg} = this.props;
let id = info.errorId;
let type = info.type;
let files = info.files;
let troubleList = this.state.troubleList;
let details = troubleList.details;
let indexInfo = details.find(d=>d.id === id && d.type === type);
if(indexInfo && indexInfo.id){
this.setItem(indexInfo.errorCode,"files",files,()=>{
emptyImg()
});
}
}
showText(errcode){ showText(errcode){
let troubleList = this.state.troubleList; let troubleList = this.state.troubleList;
let details = troubleList.details; let details = troubleList.detailList;
let indexInfo = details.find(d=>d.errorCode === errcode); let indexInfo = details.find(d=>d.errorCode === errcode);
let index = details.findIndex(d=>d.errorCode === errcode); let index = details.findIndex(d=>d.errorCode === errcode);
if(indexInfo && indexInfo.id){ if(indexInfo && indexInfo.id){
...@@ -131,40 +101,9 @@ export default class TroubleContainer extends React.Component{ ...@@ -131,40 +101,9 @@ export default class TroubleContainer extends React.Component{
} }
} }
showQrcode(errcode){
let troubleList = this.state.troubleList;
let details = troubleList.details;
let indexInfo = details.find(d=>d.errorCode === errcode);
let index = details.findIndex(d=>d.errorCode === errcode);
if(indexInfo && indexInfo.id){
this.setState({
currentErrorCode : errcode,
showStatus : showDom[3],
tmpUrl: `${ENV.uploadImg}/${indexInfo.id}/${indexInfo.type}`,
tempinitialSlide : index
})
}
}
handleDeleteImg(errorId,type,fileId){
let {deleteImg} = this.props;
let troubleList = this.state.troubleList;
let details = troubleList.details;
let index = details.findIndex(d=>d.id === errorId && d.type === type);
if(index > -1){
this.setState({
tempinitialSlide : index,
initialSlide : index,
},()=>{
deleteImg(errorId,type,fileId)
})
}
}
setItem(errcode,option,info,callback){ setItem(errcode,option,info,callback){
let troubleList = this.state.troubleList; let troubleList = this.state.troubleList;
let details = troubleList.details; let details = troubleList.detailList;
let index = details.findIndex(d=>d.errorCode === errcode); let index = details.findIndex(d=>d.errorCode === errcode);
if(index > -1){ if(index > -1){
details[index][option] = info; details[index][option] = info;
...@@ -217,9 +156,13 @@ export default class TroubleContainer extends React.Component{ ...@@ -217,9 +156,13 @@ export default class TroubleContainer extends React.Component{
} }
dealTrouble(){ dealTrouble(){
if(!this.state.btnClock){
this.setState({
btnClock : true
},()=>{
let {showPopup,hidePopup,updateTroubleList} = this.props; let {showPopup,hidePopup,updateTroubleList} = this.props;
let troubleList = this.state.troubleList; let troubleList = this.state.troubleList;
let details = troubleList.details; let details = troubleList.detailList;
let arr = details.filter(d=>{ let arr = details.filter(d=>{
return !d.isExistProblem || ( d.isExistProblem === 1 && ! d.explanation) return !d.isExistProblem || ( d.isExistProblem === 1 && ! d.explanation)
}); });
...@@ -228,39 +171,37 @@ export default class TroubleContainer extends React.Component{ ...@@ -228,39 +171,37 @@ export default class TroubleContainer extends React.Component{
if(arr && arr.length > 0){ if(arr && arr.length > 0){
let popDom = <PopModel popupText={"请完成所有需要处理的故障的必填项"} popupButtons={[btnDom]}/> let popDom = <PopModel popupText={"请完成所有需要处理的故障的必填项"} popupButtons={[btnDom]}/>
showPopup({popupChild:popDom}); showPopup({popupChild:popDom});
this.setState({
btnClock : false
})
}else{ }else{
details.forEach((d)=>{
d.imagesFileId = Array.isArray(d.files) ? d.files.map(f=>f.id).join(',') : d.imagesFileId;
});
updateTroubleList(details);
this.setState({ this.setState({
showTrouble : false showTrouble : false
},()=>{
updateTroubleList(details);
}) })
} }
})
} }
onSlideChangeEnd(swiper){
} }
getDefaultDom(){ getDefaultDom(){
let {headerInfo,getRefreshImg,deleteImg,changePages,showPopup,hidePopup} = this.props; let {showPopup,hidePopup} = this.props;
let troubleList = this.state.troubleList; let troubleList = this.state.troubleList;
let showTrouble = Array.isArray(troubleList.details) && troubleList.details.length > 0; let showTrouble = Array.isArray(troubleList.detailList) && troubleList.detailList.length > 0;
let details = Array.isArray(troubleList.details) ? troubleList.details : []; let details = Array.isArray(troubleList.detailList) ? troubleList.detailList : [];
console.log(details);
let imgLength = details.map(d=>Array.isArray(d.files) ? d.files.length : 0).reduce((pre,next)=>{return pre + next},0);
let dom = details.map((i,k)=>{ let dom = details.map((i,k)=>{
return <TroubleItem key={k} item={i} num={k+1} setItem={this.setItem} return <TroubleItem key={k} item={i} num={k+1} setItem={this.setItem}
showText={this.showText} showQrcode={this.showQrcode} showText={this.showText}
getRefreshImg={getRefreshImg}
deleteImg={(errorId,type,fileId)=>this.handleDeleteImg(errorId,type,fileId)}
showPopup={showPopup} showPopup={showPopup}
hidePopup={hidePopup} hidePopup={hidePopup}
/>; />;
}); });
let initialSlide = this.state.initialSlide; let initialSlide = this.state.initialSlide;
let swiperCount = details.length + imgLength; let swiperCount = details.length;
let swiperOptions = { let swiperOptions = {
// width : 1396, // width : 1396,
slidesPerView: "auto", slidesPerView: "auto",
...@@ -276,7 +217,6 @@ export default class TroubleContainer extends React.Component{ ...@@ -276,7 +217,6 @@ export default class TroubleContainer extends React.Component{
observer: true,//修改swiper自己或子元素时,自动初始化swiper observer: true,//修改swiper自己或子元素时,自动初始化swiper
observeParents: true,//修改swiper的父元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper
lazyLoadingInPrevNextAmount: 1, lazyLoadingInPrevNextAmount: 1,
onSlideChangeEnd : this.onSlideChangeEnd,
initialSlide : initialSlide initialSlide : initialSlide
}; };
let swiperContainer = CONFIG.swiperContainers.troubleSwiperContainer; let swiperContainer = CONFIG.swiperContainers.troubleSwiperContainer;
...@@ -284,11 +224,6 @@ export default class TroubleContainer extends React.Component{ ...@@ -284,11 +224,6 @@ export default class TroubleContainer extends React.Component{
return( return(
<div className={"toubleContainer " + (showTrouble ? '' : 'hide')}> <div className={"toubleContainer " + (showTrouble ? '' : 'hide')}>
{/* <HeaderComponent
showHeader={CONFIG.headerStatus[1]}
headerInfo={headerInfo}
/> */}
{ {
this.state.showTrouble ? this.state.showTrouble ?
<div className={"troubleContent " + ( this.state.showTrouble ? '' : 'hide')}> <div className={"troubleContent " + ( this.state.showTrouble ? '' : 'hide')}>
...@@ -307,7 +242,7 @@ export default class TroubleContainer extends React.Component{ ...@@ -307,7 +242,7 @@ export default class TroubleContainer extends React.Component{
</div> </div>
</div> </div>
</div> : <FinishTrouble changePages={changePages}/> </div> : null
} }
</div> </div>
) )
...@@ -328,18 +263,34 @@ export default class TroubleContainer extends React.Component{ ...@@ -328,18 +263,34 @@ export default class TroubleContainer extends React.Component{
/> />
} }
getQrcodeDom(){ getDefaultDoms(){
return <Qrcode goBack={this.goBack} url={this.state.tmpUrl}/> let props = this.props;
let {headerInfo={}} = props;
return (
<div>
<HeaderComponent
showHeader={CONFIG.headerStatus[1]}
headerInfo={headerInfo}
showLogoutPopup={this.showLogoutPopup}
/>
<LeftContainer leftInfo={props.headerInfo} />
<RightContainer style={{background:'transparent'}}>
<div className={"troubleContainers"} style={this.state.style}>
{
this.getDefaultDom()
}
</div>
</RightContainer>
</div>
)
} }
getDom(){ getDom(){
switch (this.state.showStatus){ switch (this.state.showStatus){
case showDom[1]: case showDom[1]:
return this.getDefaultDom(); return this.getDefaultDoms();
case showDom[2]: case showDom[2]:
return this.getTextAreaDom(); return this.getTextAreaDom();
case showDom[3]:
return this.getQrcodeDom();
default : default :
return null; return null;
} }
...@@ -349,15 +300,10 @@ export default class TroubleContainer extends React.Component{ ...@@ -349,15 +300,10 @@ export default class TroubleContainer extends React.Component{
render(){ render(){
return ( return (
<div> <div>
<LeftContainer leftInfo={props.headerInfo} />
<RightContainer>
<div className={"troubleContainers "+(this.state.showStatus === showDom[2] ? 'backfff' : '')} style={this.state.style}>
{ {
this.getDom() this.getDom()
} }
</div> </div>
</RightContainer>
</div>
) )
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment