1、添加 重考次数限制编辑

2、培训签到  考试  查看  等 修改传参 适配当前功能与原有功能
This commit is contained in:
wyw 2026-02-04 14:42:22 +08:00
parent 50dd70aa9c
commit 2019e93e06
3 changed files with 102 additions and 62 deletions

View File

@ -372,7 +372,8 @@ class SE018EditPage extends React.Component {
showUserSign(it.Nav_User, config.picServerHost) showUserSign(it.Nav_User, config.picServerHost)
} }
</td> </td>
{this.state.isExam && <td colSpan={4} rowSpan={1}>{this.state.data.Nav_Papers.find(item => item.USER_ID == it.USER_ID)?.SCORE}</td>} {/* {this.state.isExam && <td colSpan={4} rowSpan={1}>{this.state.data.Nav_Papers.find(item => item.USER_ID == it.USER_ID)?.SCORE}</td>} */}
{this.state.isExam && <td colSpan={4} rowSpan={1}>{it?.SCORE}</td>}
<td colSpan={2} rowSpan={1} style={{ display: this.state.isShow }}><div onClick={() => this.showDetailModal(it.RECORD_ID, it.USER_ID)}><Icon type="eye" style={{ color: "#005b9b", cursor: "pointer" }} /></div></td> <td colSpan={2} rowSpan={1} style={{ display: this.state.isShow }}><div onClick={() => this.showDetailModal(it.RECORD_ID, it.USER_ID)}><Icon type="eye" style={{ color: "#005b9b", cursor: "pointer" }} /></div></td>
</tr> </tr>
}) })

View File

@ -62,8 +62,11 @@ class SE018PaperPage extends React.Component {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV; json.Parameter22 = this.props.data.ORG_ID_HV;
json.OrgType = 2; json.OrgType = 2;
// extendRule(json, 'RECORD_ID', 1, this.props.data.id); if (this.props.data.TaskID) {
extendRule(json, 'TEXT_ID', 1, this.props.data.id); extendRule(json, 'TEXT_ID', 1, this.props.data.id);
} else {
extendRule(json, 'RECORD_ID', 1, this.props.data.id);
}
extendInclude(json, 'Nav_User'); extendInclude(json, 'Nav_User');
this.state.loading = true; this.state.loading = true;
this.props.dispatch({ this.props.dispatch({
@ -108,12 +111,18 @@ class SE018PaperPage extends React.Component {
return; return;
} }
var scort = 'Nav_Test.TYPE'
let json = initFilter(this.props.login.OrgId, '', 'Nav_Test.TYPE', 1); if (!this.props.data.TaskID) {
scort = 'TEXT_ID'
}
let json = initFilter(this.props.login.OrgId, '', scort, 1);
json.Parameter22 = this.props.data.ORG_ID_HV; json.Parameter22 = this.props.data.ORG_ID_HV;
json.OrgType = 2; json.OrgType = 2;
// extendRule(json, 'RECORD_ID', 1, this.props.data.id); if (this.props.data.TaskID) {
extendRule(json, 'TEXT_ID', 1, this.props.data.id); extendRule(json, 'TEXT_ID', 1, this.props.data.id);
} else {
extendRule(json, 'RECORD_ID', 1, this.props.data.id);
}
extendRule(json, 'USER_ID', 1, SelUsrID); extendRule(json, 'USER_ID', 1, SelUsrID);
extendInclude(json, 'Nav_Record'); extendInclude(json, 'Nav_Record');
extendInclude(json, 'Nav_Record.Nav_Notify'); extendInclude(json, 'Nav_Record.Nav_Notify');
@ -185,17 +194,25 @@ class SE018PaperPage extends React.Component {
let data = { let data = {
Nav_Config: JSON.parse(JSON.stringify(this.state.config)), Nav_Config: JSON.parse(JSON.stringify(this.state.config)),
Nav_Papers: JSON.parse(JSON.stringify(this.state.papers)), Nav_Papers: JSON.parse(JSON.stringify(this.state.papers)),
TaskID: this.props.data.TaskID TaskID: this.props.data.TaskID,
TEXT_ID: this.props.data.id,
} }
this.props.dispatch({ this.props.dispatch({
type: 'app/getDataByPost', type: 'app/getDataByPost',
payload: data, payload: data,
url: 'SE/SETrainRecord/SavePapers', url: 'SE/SETrainRecord/SavePapers',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret && ret.IsOperateSuccessful) {
message.success('提交成功'); // message.success('提交成功');
this.BtnClose(); if (ret.IsPass) {
message.success(ret.Msg)
} else {
message.warn(ret.Msg)
} }
} else {
message.error('提交失败,请稍后重试');
}
this.BtnClose();
} }
}); });
} }
@ -283,39 +300,48 @@ class SE018PaperPage extends React.Component {
if (!this.state.readonly) { if (!this.state.readonly) {
return ""; return "";
} }
let score = 0; let score = 0;
let sscore = 1; // let sscore = 1;
let mscore = 1; // let mscore = 1;
let cscore = 1; // let cscore = 1;
if (this.state.config) { // if (this.state.config) {
if (this.state.config.S_TEST_SCORE > 0) { // if (this.state.config.S_TEST_SCORE > 0) {
sscore = this.state.config.S_TEST_SCORE; // sscore = this.state.config.S_TEST_SCORE;
// }
// if (this.state.config.M_TEST_SCORE > 0) {
// mscore = this.state.config.M_TEST_SCORE;
// }
// if (this.state.config.C_TEST_SCORE > 0) {
// cscore = this.state.config.C_TEST_SCORE;
// }
// }
// this.state.papers.map((it, idx) => {
// if (it.ANSWER !== 0 && it.ANSWER == it.Nav_Test.ANSWER) {
// switch (it.Nav_Test.TYPE) {
// case 0: {
// score += cscore;
// break;
// }
// case 1: {
// score += sscore;
// break;
// }
// case 2: {
// score += mscore;
// break;
// }
// }
// }
// })
// forEach (this.state.papers, (it, idx) => {
// this.state.papers
// });
this.state.papers.forEach(element => {
if (score < element.SCORE) {
score = element.SCORE;
} }
if (this.state.config.M_TEST_SCORE > 0) { });
mscore = this.state.config.M_TEST_SCORE;
}
if (this.state.config.C_TEST_SCORE > 0) {
cscore = this.state.config.C_TEST_SCORE;
}
}
this.state.papers.map((it, idx) => {
if (it.ANSWER !== 0 && it.ANSWER == it.Nav_Test.ANSWER) {
switch (it.Nav_Test.TYPE) {
case 0: {
score += cscore;
break;
}
case 1: {
score += sscore;
break;
}
case 2: {
score += mscore;
break;
}
}
}
})
return score; return score;
} }
getType(type) { getType(type) {
@ -450,12 +476,12 @@ class SE018PaperPage extends React.Component {
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 1) != 0) ? styles.answer : null}> <td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 1) != 0) ? styles.answer : null}>
{ {
it.Nav_Test.TYPE === 1 ? it.Nav_Test.TYPE === 1 ?
<Radio disabled={this.state.readonly} checked={(it.ANSWER & 1) != 0} onChange={evt => this.doOptionChange(it, idx, 1, evt)} /> <Radio disabled={this.state.readonly} checked={(it.ANSWER & 1) != 0} onChange={evt => this.doOptionChange(it, idx, 1, evt)} >A.{it.Nav_Test.OPTION_A}</Radio>
: :
<Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 1) != 0} onChange={evt => this.doOptionChange(it, idx, 1, evt)} /> <Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 1) != 0} onChange={evt => this.doOptionChange(it, idx, 1, evt)} >A.{it.Nav_Test.OPTION_A}</Checkbox>
} }
<span>A.</span> {/* <span>A.{it.Nav_Test.OPTION_A}</span>
<span>{it.Nav_Test.OPTION_A}</span> <span></span> */}
</td> </td>
} }
</tr> </tr>
@ -471,12 +497,12 @@ class SE018PaperPage extends React.Component {
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 2) != 0) ? styles.answer : null}> <td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 2) != 0) ? styles.answer : null}>
{ {
it.Nav_Test.TYPE === 1 ? it.Nav_Test.TYPE === 1 ?
<Radio disabled={this.state.readonly} checked={(it.ANSWER & 2) != 0} onChange={evt => this.doOptionChange(it, idx, 2, evt)} /> <Radio disabled={this.state.readonly} checked={(it.ANSWER & 2) != 0} onChange={evt => this.doOptionChange(it, idx, 2, evt)} >B.{it.Nav_Test.OPTION_B}</Radio>
: :
<Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 2) != 0} onChange={evt => this.doOptionChange(it, idx, 2, evt)} /> <Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 2) != 0} onChange={evt => this.doOptionChange(it, idx, 2, evt)} >B.{it.Nav_Test.OPTION_B}</Checkbox>
} }
<span>B.</span> {/* <span>B.{it.Nav_Test.OPTION_B}</span>
<span>{it.Nav_Test.OPTION_B}</span> <span></span> */}
</td> </td>
} }
</tr> </tr>
@ -486,12 +512,12 @@ class SE018PaperPage extends React.Component {
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 4) != 0) ? styles.answer : null}> <td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 4) != 0) ? styles.answer : null}>
{ {
it.Nav_Test.TYPE === 1 ? it.Nav_Test.TYPE === 1 ?
<Radio disabled={this.state.readonly} checked={(it.ANSWER & 4) != 0} onChange={evt => this.doOptionChange(it, idx, 4, evt)} /> <Radio disabled={this.state.readonly} checked={(it.ANSWER & 4) != 0} onChange={evt => this.doOptionChange(it, idx, 4, evt)} >C.{it.Nav_Test.OPTION_C}</Radio>
: :
<Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 4) != 0} onChange={evt => this.doOptionChange(it, idx, 4, evt)} /> <Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 4) != 0} onChange={evt => this.doOptionChange(it, idx, 4, evt)} >C.{it.Nav_Test.OPTION_C}</Checkbox>
} }
<span>C.</span> {/* <span>C.</span>
<span>{it.Nav_Test.OPTION_C}</span> <span>{it.Nav_Test.OPTION_C}</span> */}
</td> </td>
</tr> </tr>
} }
@ -501,12 +527,12 @@ class SE018PaperPage extends React.Component {
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 8) != 0) ? styles.answer : null}> <td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 8) != 0) ? styles.answer : null}>
{ {
it.Nav_Test.TYPE === 1 ? it.Nav_Test.TYPE === 1 ?
<Radio disabled={this.state.readonly} checked={(it.ANSWER & 8) != 0} onChange={evt => this.doOptionChange(it, idx, 8, evt)} /> <Radio disabled={this.state.readonly} checked={(it.ANSWER & 8) != 0} onChange={evt => this.doOptionChange(it, idx, 8, evt)} >D.{it.Nav_Test.OPTION_D}</Radio>
: :
<Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 8) != 0} onChange={evt => this.doOptionChange(it, idx, 8, evt)} /> <Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 8) != 0} onChange={evt => this.doOptionChange(it, idx, 8, evt)} >D.{it.Nav_Test.OPTION_D}</Checkbox>
} }
<span>D.</span> {/* <span>D.</span>
<span>{it.Nav_Test.OPTION_D}</span> <span>{it.Nav_Test.OPTION_D}</span> */}
</td> </td>
</tr> </tr>
} }
@ -516,12 +542,12 @@ class SE018PaperPage extends React.Component {
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 16) != 0) ? styles.answer : null}> <td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 16) != 0) ? styles.answer : null}>
{ {
it.Nav_Test.TYPE === 1 ? it.Nav_Test.TYPE === 1 ?
<Radio disabled={this.state.readonly} checked={(it.ANSWER & 16) != 0} onChange={evt => this.doOptionChange(it, idx, 16, evt)} /> <Radio disabled={this.state.readonly} checked={(it.ANSWER & 16) != 0} onChange={evt => this.doOptionChange(it, idx, 16, evt)} >E.{it.Nav_Test.OPTION_E}</Radio>
: :
<Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 16) != 0} onChange={evt => this.doOptionChange(it, idx, 16, evt)} /> <Checkbox disabled={this.state.readonly} checked={(it.ANSWER & 16) != 0} onChange={evt => this.doOptionChange(it, idx, 16, evt)} >E.{it.Nav_Test.OPTION_E}</Checkbox>
} }
<span>E.</span> {/* <span>E.</span>
<span>{it.Nav_Test.OPTION_E}</span> <span>{it.Nav_Test.OPTION_E}</span> */}
</td> </td>
</tr> </tr>
} }

View File

@ -194,6 +194,19 @@ class SEConfigPage extends React.Component {
<td colSpan={4} rowSpan={1} >多选题总分</td> <td colSpan={4} rowSpan={1} >多选题总分</td>
<td colSpan={4} rowSpan={1} >{data.M_TEST_COUNT * data.M_TEST_SCORE}</td> <td colSpan={4} rowSpan={1} >{data.M_TEST_COUNT * data.M_TEST_SCORE}</td>
</tr> </tr>
<tr>
<td colSpan={4} rowSpan={1} >培训补考限制次数</td>
<td colSpan={20} rowSpan={1} >
<InputNumber value={data.COUNT_RETRY} min={0} max={100}
onChange={value => {
let data = this.state.data;
data.COUNT_RETRY = value;
this.setState(data)
}}
>
</InputNumber>
</td>
</tr>
<tr> <tr>
<td colSpan={4} rowSpan={1} >合格线</td> <td colSpan={4} rowSpan={1} >合格线</td>
<td colSpan={20} rowSpan={1} > <td colSpan={20} rowSpan={1} >