diff --git a/src/components/CustomPages/SE/SE061PaperPage.js b/src/components/CustomPages/SE/SE061PaperPage.js index c5fce05..880da0b 100644 --- a/src/components/CustomPages/SE/SE061PaperPage.js +++ b/src/components/CustomPages/SE/SE061PaperPage.js @@ -54,10 +54,12 @@ class SE061PaperPage extends React.Component { if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function') this.props.data.onCancel(); } - getUsers = () => { + getUsers = (dataid) => { + debugger let json = initFilter(this.props.login.OrgId); json.OrgType = 2; - extendRule(json, 'RECORD_ID', 1, this.props.data.id); + // extendRule(json, 'RECORD_ID', 1, this.props.data.id); + extendRule(json, 'RECORD_ID', 1, dataid); extendInclude(json, 'Nav_User'); this.state.loading = true; this.props.dispatch({ @@ -88,6 +90,12 @@ class SE061PaperPage extends React.Component { message.warn("当前用户没有问卷"); } } + } else { + this.setState({ + SelUsrID: '', + papers: [] + }) + } } }); @@ -142,10 +150,10 @@ class SE061PaperPage extends React.Component { } }); } - loadData = () => { + loadData = (dataid) => { if (this.props.data.id == "") return; - this.getUsers(); + this.getUsers(dataid); } onSave = () => { if (this.state.readonly) { @@ -355,127 +363,127 @@ class SE061PaperPage extends React.Component {
(this.componentRef = el)} id={'tableId' + this.props.data.id}>

培训在线答题

- - - - - - - - - - - - - - { - papers.map((it, idx) => { - return ( - - + + + } + +
工号{SelUsr && SelUsr.CODE}答卷人{SelUsr && SelUsr.NAME}成绩{this.CalcScore()}
问卷
- - - - - - +
- {idx + 1}. - {it.Nav_Test.NAME} - {this.getType(it.Nav_Test.TYPE)} -
+ + + + + + + + + + + + + { + papers.map((it, idx) => { + return ( + + - - ) - }) - } - -
工号{SelUsr && SelUsr.CODE}答卷人{SelUsr && SelUsr.NAME}成绩{this.CalcScore()}
问卷
+ + + + + + + { + it.Nav_Test.TYPE === 0 ? + + : + + } + + + { + it.Nav_Test.TYPE === 0 ? + + : + + } + { - it.Nav_Test.TYPE === 0 ? - - : - + + } - - { - it.Nav_Test.TYPE === 0 ? - - : - + + } - - { - it.Nav_Test.TYPE !== 0 && - - - - } - { - it.Nav_Test.TYPE !== 0 && it.Nav_Test.OPTION_D != "" && it.Nav_Test.OPTION_D != undefined && - - - - } - { - it.Nav_Test.TYPE !== 0 && it.Nav_Test.OPTION_E != "" && it.Nav_Test.OPTION_E != undefined && - - - - } - -
+ {idx + 1}. + {it.Nav_Test.NAME} + {this.getType(it.Nav_Test.TYPE)} +
+ this.doOptionChange(it, idx, 1, evt)} /> + 正确 + + { + it.Nav_Test.TYPE === 1 ? + this.doOptionChange(it, idx, 1, evt)} /> + : + this.doOptionChange(it, idx, 1, evt)} /> + } + A. + {it.Nav_Test.OPTION_A} +
+ this.doOptionChange(it, idx, 2, evt)} /> + 错误 + + { + it.Nav_Test.TYPE === 1 ? + this.doOptionChange(it, idx, 2, evt)} /> + : + this.doOptionChange(it, idx, 2, evt)} /> + } + B. + {it.Nav_Test.OPTION_B} +
- this.doOptionChange(it, idx, 1, evt)} /> - 正确 - + it.Nav_Test.TYPE !== 0 && +
{ it.Nav_Test.TYPE === 1 ? - this.doOptionChange(it, idx, 1, evt)} /> + this.doOptionChange(it, idx, 4, evt)} /> : - this.doOptionChange(it, idx, 1, evt)} /> + this.doOptionChange(it, idx, 4, evt)} /> } - A. - {it.Nav_Test.OPTION_A} + C. + {it.Nav_Test.OPTION_C}
- this.doOptionChange(it, idx, 2, evt)} /> - 错误 - + it.Nav_Test.TYPE !== 0 && it.Nav_Test.OPTION_D != "" && it.Nav_Test.OPTION_D != undefined && +
{ it.Nav_Test.TYPE === 1 ? - this.doOptionChange(it, idx, 2, evt)} /> + this.doOptionChange(it, idx, 8, evt)} /> : - this.doOptionChange(it, idx, 2, evt)} /> + this.doOptionChange(it, idx, 8, evt)} /> } - B. - {it.Nav_Test.OPTION_B} + D. + {it.Nav_Test.OPTION_D}
- { - it.Nav_Test.TYPE === 1 ? - this.doOptionChange(it, idx, 4, evt)} /> - : - this.doOptionChange(it, idx, 4, evt)} /> - } - C. - {it.Nav_Test.OPTION_C} -
- { - it.Nav_Test.TYPE === 1 ? - this.doOptionChange(it, idx, 8, evt)} /> - : - this.doOptionChange(it, idx, 8, evt)} /> - } - D. - {it.Nav_Test.OPTION_D} -
- { - it.Nav_Test.TYPE === 1 ? - this.doOptionChange(it, idx, 16, evt)} /> - : - this.doOptionChange(it, idx, 16, evt)} /> - } - E. - {it.Nav_Test.OPTION_E} -
-
+ { + it.Nav_Test.TYPE !== 0 && it.Nav_Test.OPTION_E != "" && it.Nav_Test.OPTION_E != undefined && +
+ { + it.Nav_Test.TYPE === 1 ? + this.doOptionChange(it, idx, 16, evt)} /> + : + this.doOptionChange(it, idx, 16, evt)} /> + } + E. + {it.Nav_Test.OPTION_E} +
+ + + ) + }) + } + +