培训记录 添加 考核类型 对应列显示隐藏
培训记录审阅 添加 试卷显示判断 加载中 乱码修改
This commit is contained in:
parent
20b39e5f5b
commit
5fcf95f442
@ -61,8 +61,8 @@ class SE018EditPage extends React.Component {
|
||||
extendInclude(json, 'Nav_Notify.Nav_ListCour.Nav_Cour');
|
||||
// extendInclude(json, 'Nav_Notify.Nav_TrainCheckType');
|
||||
extendInclude(json, 'Nav_Users.Nav_User');
|
||||
extendInclude(json, 'Nav_Users.Nav_Files.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_Files.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_Users.Nav_User');
|
||||
extendInclude(json, 'Nav_Papers');
|
||||
json.IgnoreDataRule = true;
|
||||
this.props.dispatch({
|
||||
@ -79,7 +79,7 @@ class SE018EditPage extends React.Component {
|
||||
updateData(data) {
|
||||
let isApprove = false;
|
||||
// if (data.Nav_Notify.Nav_TrainCheckType.NAME == "笔试") {
|
||||
if (data.Nav_Notify.CHECKTYPE == 51) {
|
||||
if (data.Nav_Notify.CHECKTYPE == 51 || data.Nav_Notify.CHECKTYPE == 56 || data.Nav_Notify.CHECKTYPE == 81) {
|
||||
this.state.isExam = true;
|
||||
this.state.isShow = "table-cell";
|
||||
}
|
||||
@ -362,9 +362,9 @@ class SE018EditPage extends React.Component {
|
||||
<td colSpan={4} rowSpan={1} className={styles.fontBold}>工号</td>
|
||||
<td colSpan={4} rowSpan={1} className={styles.fontBold}>姓名</td>
|
||||
<td colSpan={4} rowSpan={1} className={styles.fontBold}>岗位</td>
|
||||
<td colSpan={8} rowSpan={1} className={styles.fontBold}>电子签名</td>
|
||||
{this.state.isExam && <td colSpan={4} rowSpan={1} className={styles.fontBold}>分数</td>}
|
||||
<td colSpan={2} rowSpan={1} className={styles.fontBold} style={{ display: this.state.isShow }}>查看试卷</td>
|
||||
<td colSpan={4} rowSpan={1} className={styles.fontBold} style={{ display: this.state.isShow }}>查看试卷</td>
|
||||
<td colSpan={6} rowSpan={1} className={styles.fontBold}>电子签名</td>
|
||||
</tr>
|
||||
{
|
||||
this.state.isView && data && data.Nav_Users && data.Nav_Users.filter(it => it.OK).map((it, idx) => {
|
||||
@ -374,14 +374,23 @@ class SE018EditPage extends React.Component {
|
||||
<td colSpan={4} rowSpan={1}>{it.Nav_User.CODE}</td>
|
||||
<td colSpan={4} rowSpan={1}>{it.Nav_User.NAME}</td>
|
||||
<td colSpan={4} rowSpan={1}>{it.POST_NAME}</td>
|
||||
<td colSpan={8} rowSpan={1}>
|
||||
{/* {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>}
|
||||
|
||||
{/* if (data.Nav_Notify.CHECKTYPE == 51 || data.Nav_Notify.CHECKTYPE == 56 || data.Nav_Notify.CHECKTYPE == 81) { */}
|
||||
{/* 线上考核 51 看试卷 56 81 看附件 */}
|
||||
{
|
||||
this.state.isShow && data.Nav_Notify.CHECKTYPE ? (
|
||||
data.Nav_Notify.CHECKTYPE == 51 ? <td colSpan={4} rowSpan={1} ><div onClick={() => this.showDetailModal(it.RECORD_ID, it.USER_ID)}><Icon type="eye" style={{ color: "#005b9b", cursor: "pointer" }} /></div></td>
|
||||
: <td colSpan={4} rowSpan={1} > {showFiles(it?.Nav_Files, config.picServerHost, this, false)}</td>
|
||||
)
|
||||
: <td colSpan={4} 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={6} rowSpan={1}>
|
||||
{
|
||||
showUserSign(it.Nav_User, config.picServerHost)
|
||||
}
|
||||
</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>
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
|
||||
24
src/files/edit/SE018.js
Normal file
24
src/files/edit/SE018.js
Normal file
@ -0,0 +1,24 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common";
|
||||
import { connect } from 'dva';
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
// 编辑
|
||||
export default {
|
||||
onBeforeSaveHandleRecord(params) {
|
||||
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||
params.record.PUBLISH = params.customParams;
|
||||
},
|
||||
|
||||
onBeforeEdit: ({ isNew, stateData, setFieldVisible, setFieldValue, setRowFieldVisible, setFieldEditable, setRowFieldDisable, setHeadPanelShowType }) => {
|
||||
if (stateData.Nav_Notify.CHECKTYPE && (stateData.Nav_Notify.CHECKTYPE == '56' || stateData.Nav_Notify.CHECKTYPE == '81')) {
|
||||
//线下考核 委外
|
||||
setRowFieldVisible("T_SE_TRAIN_RECORD_USER", { "EXAMINATION_RESULTS": true, "SCORE": true, "Nav_Files": true })
|
||||
//考核结果 EXAMINATION_RESULTS 必填 setFieldRequired
|
||||
|
||||
} else {
|
||||
setRowFieldVisible("T_SE_TRAIN_RECORD_USER", { "EXAMINATION_RESULTS": false, "SCORE": false, "Nav_Files": false })
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@ const LoadingComponent = ({ isLoading, error }) => {
|
||||
return <div style={{ padding: '20px', textAlign: 'center', color: '#ff4d4f' }}>组件加载失败</div>;
|
||||
}
|
||||
if (isLoading) {
|
||||
return <div style={{ padding: '20px', textAlign: 'center' }}>加载<EFBFBD>?..</div>;
|
||||
return <div style={{ padding: '20px', textAlign: 'center' }}>加载中..</div>;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@ -7,7 +7,7 @@ const LoadingComponent = ({ isLoading, error }) => {
|
||||
return <div style={{ padding: '20px', textAlign: 'center', color: '#ff4d4f' }}>组件加载失败</div>
|
||||
}
|
||||
if (isLoading) {
|
||||
return <div style={{ padding: '20px', textAlign: 'center' }}>加载<EFBFBD>?..</div>
|
||||
return <div style={{ padding: '20px', textAlign: 'center' }}>加载中..</div>
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user