From 9f3b783207e1920756efad4669f931f08df13ab8 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Thu, 21 May 2026 15:23:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=9F=B9=E8=AE=AD=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=20=E9=9A=90=E8=97=8F=E5=88=86=E6=95=B0=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=EF=BC=880=E5=88=86=E5=BE=88=E5=A5=87=E6=80=AA=EF=BC=8C?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E7=8E=87=E8=AE=A1=E7=AE=97=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=9C=89=E7=AD=BE=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E4=BA=BA=E8=AE=A1=E7=AE=97=EF=BC=89=20=20=20=202=E3=80=81?= =?UTF-8?q?=E8=AF=95=E5=8D=B7=E6=9F=A5=E7=9C=8B=E6=97=B6=20=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E5=BE=85=E5=8A=9E=E8=BF=9B=E5=8E=BB=E6=89=8D=E8=83=BD?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E6=8F=90=E4=BA=A4=E8=AF=95=E5=8D=B7=E7=9A=84?= =?UTF-8?q?=E6=8C=89=E9=92=AE=20=20=203=E3=80=81=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=EF=BC=8C?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E6=97=B6=E9=97=B4=E9=BB=98=E8=AE=A4=20?= =?UTF-8?q?=E6=8F=90=E5=89=8D5=E5=88=86=E9=92=9F=20=20=204=E3=80=81?= =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95=E5=88=B7=E6=96=B0=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=88=A4=E6=96=AD=E7=BB=99=E8=80=83=E6=A0=B8=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC=E3=80=81?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=AD=BE=E5=88=B0=20=E3=80=81=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/SE/SE018EditPage.js | 16 ++++++---- .../CustomPages/SE/SE018PaperPage.js | 16 ++++------ src/files/edit/SE014.js | 11 ++++--- src/files/edit/SE018.js | 32 +++++++++++++++++-- 4 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/components/CustomPages/SE/SE018EditPage.js b/src/components/CustomPages/SE/SE018EditPage.js index 6a2de54..96ea6e4 100644 --- a/src/components/CustomPages/SE/SE018EditPage.js +++ b/src/components/CustomPages/SE/SE018EditPage.js @@ -79,7 +79,8 @@ class SE018EditPage extends React.Component { updateData(data) { let isApprove = false; // if (data.Nav_Notify.Nav_TrainCheckType.NAME == "笔试") { - if (data.Nav_Notify.CHECKTYPE == 51 || data.Nav_Notify.CHECKTYPE == 56 || data.Nav_Notify.CHECKTYPE == 81) { + if ((data.Nav_Notify.CHECKTYPE == 51 || data.Nav_Notify.CHECKTYPE == 56 || data.Nav_Notify.CHECKTYPE == 81) && data.STATUS > 1) { + //data.STATUS > 1 签到的时候 看到分数为0 怪怪的 this.state.isExam = true; this.state.isShow = "table-cell"; } @@ -88,8 +89,11 @@ class SE018EditPage extends React.Component { data.Nav_Users = data.Nav_Users.filter(item => item.STATUS == 0); var passRateThis = 0 - var userAll = data.Nav_Users.filter(e => e.STATUS == 0 && e.ENABLE_STATUS == 0 && e.EXAMINATION_RESULTS != null) - var userPass = data.Nav_Users.filter(e => e.STATUS == 0 && e.ENABLE_STATUS == 0 && e.EXAMINATION_RESULTS != null && e.EXAMINATION_RESULTS == 1) + // var userAll = data.Nav_Users.filter(e => e.STATUS == 0 && e.ENABLE_STATUS == 0 && e.EXAMINATION_RESULTS != null) + // var userPass = data.Nav_Users.filter(e => e.STATUS == 0 && e.ENABLE_STATUS == 0 && e.EXAMINATION_RESULTS != null && e.EXAMINATION_RESULTS == 1) + var userAll = data.Nav_Users.filter(e => e.OK) + var userPass = data.Nav_Users.filter(e => e.OK && e.EXAMINATION_RESULTS == 1) + if (userAll && userAll.length > 0 && userPass && userPass.length > 0) { passRateThis = (userPass.length / userAll.length).toFixed(4) * 100; } @@ -226,7 +230,7 @@ class SE018EditPage extends React.Component { { this.state.isView && <> } + trigger={() => } content={() => this.componentRef} /> @@ -385,8 +389,8 @@ class SE018EditPage extends React.Component { { !signable && ( this.state.isShow && data.Nav_Notify.CHECKTYPE ? ( - data.Nav_Notify.CHECKTYPE == 51 ?
this.showDetailModal(it.RECORD_ID, it.USER_ID)}>
- : {showFiles(it?.Nav_Files, config.picServerHost, this, false)} + data.Nav_Notify.CHECKTYPE == 51 ?
this.showDetailModal(it.RECORD_ID, it.USER_ID)}>
+ : {showFiles(it?.Nav_Files, config.picServerHost, this, false)} ) :
this.showDetailModal(it.RECORD_ID, it.USER_ID)}>
)} diff --git a/src/components/CustomPages/SE/SE018PaperPage.js b/src/components/CustomPages/SE/SE018PaperPage.js index 3da5afa..1f3f5df 100644 --- a/src/components/CustomPages/SE/SE018PaperPage.js +++ b/src/components/CustomPages/SE/SE018PaperPage.js @@ -218,7 +218,11 @@ class SE018PaperPage extends React.Component { hasAnswered = false else hasAnswered = true - + if (!hasAnswered) { + if (this.props.data.tableKey == null || this.props.data.tableKey == '2') { + hasAnswered = true + } + } var perPaper = [] if (isCourEdit == false) perPaper = papers //提供显示 @@ -641,16 +645,10 @@ class SE018PaperPage extends React.Component { }, () => { this.getPapers(); }) - }} - filterOption={(input, option) => - option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 - } - > + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} > { - this.state.UserList.map(usr => - - ) + this.state.UserList.map(usr => ) } } diff --git a/src/files/edit/SE014.js b/src/files/edit/SE014.js index d7c2041..3800045 100644 --- a/src/files/edit/SE014.js +++ b/src/files/edit/SE014.js @@ -17,11 +17,12 @@ export default { let minutes = (Date.parse(stateData.TRAIN_END_TIME) - Date.parse(stateData.TRAIN_START_TIME)) / 1000 / 60 / 45; temps.push({ field: 'HOURS', value: minutes.toFixed(1) }) // setFieldValue("HOURS", minutes.toFixed(1)); } - // if (colInfo.FIELD_NAME == 'TRAIN_START_TIME' && stateData.TRAIN_START_TIME) { - // //默认自动处理 开始培训前5分钟开始签到 - // var TRAIN_END_TIME = new Date(stateData.TRAIN_START_TIME); - // temps.push({ field: 'DT_START_SIGN', value: new Date(TRAIN_END_TIME.setMinutes(TRAIN_END_TIME.getMinutes() - 5)) }) - // } + if (colInfo.FIELD_NAME == 'TRAIN_START_TIME' && stateData.TRAIN_START_TIME) { + //默认自动处理 开始培训前5分钟开始签到 + var TRAIN_END_TIME = new Date(stateData.TRAIN_START_TIME); + stateData.DT_START_SIGN = new Date(TRAIN_END_TIME.setMinutes(TRAIN_END_TIME.getMinutes() - 5)) + temps.push({ field: 'DT_START_SIGN', value: stateData.DT_START_SIGN.Format('yyyy-MM-dd HH:mm:ss') }) + } if (temps && temps.length > 0) setFieldValueByBatch(temps); } diff --git a/src/files/edit/SE018.js b/src/files/edit/SE018.js index d53d72d..b560509 100644 --- a/src/files/edit/SE018.js +++ b/src/files/edit/SE018.js @@ -1,5 +1,5 @@ import { message } from "antd/lib/index"; -import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common"; +import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, initFilterGroup, extendGroupRule, extendFilterGroup, empty } from "../../utils/common"; import { connect } from 'dva'; /** * @return {string} @@ -23,9 +23,35 @@ export default { if (stateData.Nav_Users && stateData.Nav_Users.length > 0) { stateData.Nav_Users.forEach(e => { - if (e.STATUS == 0 && e.EXAMINATION_RESULTS == undefined) - e.EXAMINATION_RESULTS = 1 + if (e.STATUS == 0 && e.EXAMINATION_RESULTS == undefined && e.DT_SIGN != null && stateData.Nav_Notify && stateData.Nav_Notify.CHECKTYPE == 56) { + e.EXAMINATION_RESULTS = 1 //默认合格 不考试 Nav_Notify.CHECKTYPE 56 + } }) } + }, + btnRefresh: (params) => {//params + let json = initFilter(params.login.OrgId); + extendRule(json, 'RECORD_ID', 1, params.stateData.ID); + params.dispatch({ + type: 'app/getDataByPost', + url: 'SE/TrainRecordUser/Entities', + payload: json, + onComplete: (ret) => { + if (ret && ret.length > 0) { + params.stateData.Nav_Users.forEach(e => { + let r = ret.find(x => x.ID == e.ID) + if (e.DT_SIGN != r.DT_SIGN) { + e.DT_SIGN = r.DT_SIGN + e.OK = r.OK + e.EXAMINATION_RESULTS = r.EXAMINATION_RESULTS + if (e.DT_SIGN != null && e.EXAMINATION_RESULTS == null && params.stateData.Nav_Notify && params.stateData.Nav_Notify.CHECKTYPE == 56) { + e.EXAMINATION_RESULTS = 1 //有签到 默认 考核通过 不考试 Nav_Notify.CHECKTYPE 56 + } + } + }) + params.setState({ data: params.stateData }); + } + } + }); } }