Compare commits
2 Commits
d9d5e4363a
...
f5fbcac08c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5fbcac08c | ||
|
|
053c4a6786 |
@ -1,7 +1,7 @@
|
|||||||
import { message } from "antd/lib/index";
|
import { message } from "antd/lib/index";
|
||||||
import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal, Spin } from 'antd';
|
import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal, Spin } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendSelectField, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import styles from '../../CustomPages/HI/StepForm.css';
|
import styles from '../../CustomPages/HI/StepForm.css';
|
||||||
import SEstyles from './SE.css';
|
import SEstyles from './SE.css';
|
||||||
@ -55,12 +55,19 @@ class SE061PaperPage extends React.Component {
|
|||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
getUsers = (dataid) => {
|
getUsers = (dataid) => {
|
||||||
debugger
|
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
json.OrgType = 2;
|
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);
|
if (this.props.data.TaskID) {
|
||||||
|
extendRule(json, 'TEXT_ID', 1, dataid);//RECORD_ID 这个是哪里的 考试
|
||||||
|
} else {
|
||||||
|
extendRule(json, 'RECORD_ID', 1, dataid);// 标准化执行 > 安全教育与培训 > 新三级安全教育记录 小眼睛 查看 有数据
|
||||||
|
}
|
||||||
extendInclude(json, 'Nav_User');
|
extendInclude(json, 'Nav_User');
|
||||||
|
extendSelectField(json, 'Nav_User.ID');
|
||||||
|
extendSelectField(json, 'Nav_User.NAME');
|
||||||
|
extendSelectField(json, 'Nav_User.CODE');
|
||||||
this.state.loading = true;
|
this.state.loading = true;
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -107,15 +114,23 @@ class SE061PaperPage extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let json = initFilter(this.props.login.OrgId, '', 'Nav_Test.TYPE', 1);
|
let json = initFilter(this.props.login.OrgId, '', 'Nav_Test.TYPE', 1);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
json.OrgType = 2;
|
json.OrgType = 2;
|
||||||
extendRule(json, 'RECORD_ID', 1, this.props.data.id);
|
// extendRule(json, 'TEXT_ID', 1, this.props.data.id);//RECORD_ID 这个是哪个页面 考试
|
||||||
|
// extendRule(json, 'RECORD_ID', 1, this.props.data.id);// dataid 标准化执行 > 安全教育与培训 > 新三级安全教育记录 小眼睛 查看 有数据
|
||||||
|
|
||||||
|
if (this.props.data.TaskID) {
|
||||||
|
extendRule(json, 'TEXT_ID', 1, this.props.data.id);//RECORD_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_Test');
|
extendInclude(json, 'Nav_Test');
|
||||||
extendInclude(json, 'Nav_User');
|
extendInclude(json, 'Nav_User');
|
||||||
|
extendInclude(json, 'Nav_Text');
|
||||||
this.state.loading = true;
|
this.state.loading = true;
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -130,11 +145,17 @@ class SE061PaperPage extends React.Component {
|
|||||||
let notify = record ? record.Nav_Notify : null;
|
let notify = record ? record.Nav_Notify : null;
|
||||||
let NAME = record.NAME;
|
let NAME = record.NAME;
|
||||||
let hasAnswered = false;
|
let hasAnswered = false;
|
||||||
for (let i = 0; i < ret.Nav_Papers.length; i++) {
|
if (!this.props.data.TaskID) {
|
||||||
if (ret.Nav_Papers[i].ANSWER !== 0) {
|
hasAnswered = true;
|
||||||
hasAnswered = true;
|
}
|
||||||
|
if (!hasAnswered) {
|
||||||
|
for (let i = 0; i < ret.Nav_Papers.length; i++) {
|
||||||
|
if (ret.Nav_Papers[i].ANSWER !== 0) {
|
||||||
|
hasAnswered = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
papers,
|
papers,
|
||||||
config,
|
config,
|
||||||
@ -153,7 +174,24 @@ class SE061PaperPage extends React.Component {
|
|||||||
loadData = (dataid) => {
|
loadData = (dataid) => {
|
||||||
if (this.props.data.id == "")
|
if (this.props.data.id == "")
|
||||||
return;
|
return;
|
||||||
this.getUsers(dataid);
|
// this.getUsers(dataid);
|
||||||
|
//如果是待办进来 不要 getUsers 直接获取登录者的试卷进行答题
|
||||||
|
if (this.props.data.TaskID && (this.props.data.tableKey == '1' || this.props.data.tableKey == '2')) {
|
||||||
|
var UserList = []
|
||||||
|
UserList.push({
|
||||||
|
ID: this.props.login.user.ID,
|
||||||
|
CODE: this.props.login.user.CODE,
|
||||||
|
NAME: this.props.login.user.NAME,
|
||||||
|
})
|
||||||
|
this.setState({
|
||||||
|
SelUsrID: this.props.login.user.ID,
|
||||||
|
UserList: UserList
|
||||||
|
}, () => {
|
||||||
|
this.getPapers();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.getUsers(dataid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onSave = () => {
|
onSave = () => {
|
||||||
if (this.state.readonly) {
|
if (this.state.readonly) {
|
||||||
@ -175,8 +213,10 @@ class SE061PaperPage extends React.Component {
|
|||||||
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,
|
||||||
ORG_ID: this.props.login.OrgId,
|
ORG_ID: this.props.login.OrgId,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
payload: data,
|
payload: data,
|
||||||
@ -185,6 +225,11 @@ class SE061PaperPage extends React.Component {
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
message.success('提交成功');
|
message.success('提交成功');
|
||||||
this.BtnClose();
|
this.BtnClose();
|
||||||
|
} else if (ret === false) {
|
||||||
|
//请重新考试
|
||||||
|
setTimeout(() => {
|
||||||
|
this.props.data.onCancel();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -269,44 +314,53 @@ class SE061PaperPage extends React.Component {
|
|||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//分数计算
|
||||||
CalcScore = () => {
|
CalcScore = () => {
|
||||||
if (!this.state.readonly) {
|
if (!this.state.readonly) {
|
||||||
return "";
|
return "";
|
||||||
}
|
} else if (this.state.papers == null || this.state.papers.length < 1) {
|
||||||
let score = 0;
|
return "";
|
||||||
let sscore = 1;
|
} else if (this.state.papers[0].Nav_Text != null) {
|
||||||
let mscore = 1;
|
//新增表单 有存分数 后台排序 最后的显示在最前面
|
||||||
let cscore = 1;
|
return this.state.papers[0].Nav_Text.SCORE ? this.state.papers[0].Nav_Text.SCORE : "";
|
||||||
if (this.state.config) {
|
} else {
|
||||||
if (this.state.config.S_TEST_SCORE > 0) {
|
//按理不能来这边
|
||||||
sscore = this.state.config.S_TEST_SCORE;
|
let score = 0;
|
||||||
}
|
let sscore = 1;
|
||||||
if (this.state.config.M_TEST_SCORE > 0) {
|
let mscore = 1;
|
||||||
mscore = this.state.config.M_TEST_SCORE;
|
let cscore = 1;
|
||||||
}
|
if (this.state.config) {
|
||||||
if (this.state.config.C_TEST_SCORE > 0) {
|
if (this.state.config.S_TEST_SCORE > 0) {
|
||||||
cscore = this.state.config.C_TEST_SCORE;
|
sscore = this.state.config.S_TEST_SCORE;
|
||||||
}
|
}
|
||||||
}
|
if (this.state.config.M_TEST_SCORE > 0) {
|
||||||
this.state.papers.map((it, idx) => {
|
mscore = this.state.config.M_TEST_SCORE;
|
||||||
if (it.ANSWER !== 0 && it.ANSWER == it.Nav_Test.ANSWER) {
|
}
|
||||||
switch (it.Nav_Test.TYPE) {
|
if (this.state.config.C_TEST_SCORE > 0) {
|
||||||
case 0: {
|
cscore = this.state.config.C_TEST_SCORE;
|
||||||
score += cscore;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1: {
|
|
||||||
score += sscore;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2: {
|
|
||||||
score += mscore;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
this.state.papers.map((it, idx) => {
|
||||||
return score;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
getType(type) {
|
getType(type) {
|
||||||
let ret = '';
|
let ret = '';
|
||||||
@ -394,19 +448,19 @@ class SE061PaperPage extends React.Component {
|
|||||||
{
|
{
|
||||||
it.Nav_Test.TYPE === 0 ?
|
it.Nav_Test.TYPE === 0 ?
|
||||||
<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}>
|
||||||
<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)} >正确</Radio>
|
||||||
<span>正确</span>
|
{/* <span></span> */}
|
||||||
</td>
|
</td>
|
||||||
:
|
:
|
||||||
<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.</span>
|
||||||
<span>{it.Nav_Test.OPTION_A}</span>
|
<span>{it.Nav_Test.OPTION_A}</span> */}
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
@ -414,19 +468,19 @@ class SE061PaperPage extends React.Component {
|
|||||||
{
|
{
|
||||||
it.Nav_Test.TYPE === 0 ?
|
it.Nav_Test.TYPE === 0 ?
|
||||||
<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}>
|
||||||
<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)} >错误</Radio>
|
||||||
<span>错误</span>
|
{/* <span>错误</span> */}
|
||||||
</td>
|
</td>
|
||||||
:
|
:
|
||||||
<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.</span>
|
||||||
<span>{it.Nav_Test.OPTION_B}</span>
|
<span>{it.Nav_Test.OPTION_B}</span> */}
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
@ -436,12 +490,12 @@ class SE061PaperPage 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>
|
||||||
}
|
}
|
||||||
@ -451,12 +505,12 @@ class SE061PaperPage 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>
|
||||||
}
|
}
|
||||||
@ -466,12 +520,12 @@ class SE061PaperPage 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>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { message } from "antd/lib/index";
|
import { message } from "antd/lib/index";
|
||||||
import { Button, Descriptions, Modal, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader } from 'antd';
|
import { Button, Descriptions, Modal, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, GetFileModel, guid, initQueryFilter, showFiles } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, GetFileModel, guid, getArryPropShow, showFiles } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import styles from '../../CustomPages/HI/StepForm.css';
|
import styles from '../../CustomPages/HI/StepForm.css';
|
||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
@ -48,6 +48,7 @@ class SE062ShowPrint extends React.Component {
|
|||||||
extendInclude(json, 'Nav_NewUser.Nav_User');
|
extendInclude(json, 'Nav_NewUser.Nav_User');
|
||||||
extendInclude(json, 'Nav_NewUser.Nav_Content');
|
extendInclude(json, 'Nav_NewUser.Nav_Content');
|
||||||
extendInclude(json, 'Nav_NewUser.Nav_Files.Nav_ImgFile');
|
extendInclude(json, 'Nav_NewUser.Nav_Files.Nav_ImgFile');
|
||||||
|
extendInclude(json, 'Nav_NewUser.Nav_Teachers.Nav_User');
|
||||||
|
|
||||||
extendInclude(json, 'Nav_User');
|
extendInclude(json, 'Nav_User');
|
||||||
extendInclude(json, 'Nav_Department');
|
extendInclude(json, 'Nav_Department');
|
||||||
@ -120,6 +121,7 @@ class SE062ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
@ -144,8 +146,10 @@ class SE062ShowPrint extends React.Component {
|
|||||||
<Descriptions.Item label="截止时间">{data ? data.Nav_NewUser.END_TIME : null}</Descriptions.Item>
|
<Descriptions.Item label="截止时间">{data ? data.Nav_NewUser.END_TIME : null}</Descriptions.Item>
|
||||||
<Descriptions.Item label="培训学时">{data ? data.Nav_NewUser.TRAINNING_TIME : null}</Descriptions.Item>
|
<Descriptions.Item label="培训学时">{data ? data.Nav_NewUser.TRAINNING_TIME : null}</Descriptions.Item>
|
||||||
<Descriptions.Item label="培训地点">{data ? data.Nav_NewUser.TAINNING_ADDR : null}</Descriptions.Item>
|
<Descriptions.Item label="培训地点">{data ? data.Nav_NewUser.TAINNING_ADDR : null}</Descriptions.Item>
|
||||||
<Descriptions.Item label="培训老师">{data ? data.Nav_NewUser.TEACHER : null}</Descriptions.Item>
|
{/* <Descriptions.Item label="培训老师">{data ? data.Nav_NewUser.TEACHER : null}</Descriptions.Item> */}
|
||||||
<Descriptions.Item label="培训形式">{data ? this.returnModel(data.Nav_NewUser.TRAIN_MODEL) : null}</Descriptions.Item>
|
<Descriptions.Item label="培训老师">{getArryPropShow(data.Nav_NewUser.Nav_Teachers, "Nav_User.NAME")}</Descriptions.Item>
|
||||||
|
{/* <Descriptions.Item label="培训形式">{data ? this.returnModel(data.Nav_NewUser.TRAIN_MODEL) : null}</Descriptions.Item> */}
|
||||||
|
<Descriptions.Item label="培训形式">{enums.TrainType.enums[data.Nav_NewUser?.TRAINTYPE]}</Descriptions.Item>
|
||||||
<Descriptions.Item label="培训内容" span="3">{data && data.Nav_NewUser.Nav_Content ? data.Nav_NewUser.Nav_Content.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="培训内容" span="3">{data && data.Nav_NewUser.Nav_Content ? data.Nav_NewUser.Nav_Content.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="附件">{showFiles(data.Nav_NewUser.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
<Descriptions.Item label="附件">{showFiles(data.Nav_NewUser.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
@ -163,7 +167,7 @@ class SE062ShowPrint extends React.Component {
|
|||||||
<Descriptions.Item label="分数">{data ? data.SCORE : null}</Descriptions.Item>
|
<Descriptions.Item label="分数">{data ? data.SCORE : null}</Descriptions.Item>
|
||||||
{/* <Descriptions.Item label="考核结果">{data ? data.EXAMINATION_RESULTS == 1 ? "合格" : "不合格" : null}</Descriptions.Item> */}
|
{/* <Descriptions.Item label="考核结果">{data ? data.EXAMINATION_RESULTS == 1 ? "合格" : "不合格" : null}</Descriptions.Item> */}
|
||||||
<Descriptions.Item label="考核结果">{(data && data.EXAMINATION_RESULTS && data.SCORE) ? enums.SEExaminationResultsEnum.enums[data.EXAMINATION_RESULTS] : ""}</Descriptions.Item>
|
<Descriptions.Item label="考核结果">{(data && data.EXAMINATION_RESULTS && data.SCORE) ? enums.SEExaminationResultsEnum.enums[data.EXAMINATION_RESULTS] : ""}</Descriptions.Item>
|
||||||
<Descriptions.Item label="培训形式">{data ? this.returnModel(data.Nav_NewUser.TRAIN_MODEL) : null}</Descriptions.Item>
|
{/* <Descriptions.Item label="培训形式">{data ? this.returnModel(data.Nav_NewUser.TRAIN_MODEL) : null}</Descriptions.Item> */}
|
||||||
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div> : null
|
</div> : null
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export default {
|
|||||||
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||||
params.record.PUBLISH = params.customParams;
|
params.record.PUBLISH = params.customParams;
|
||||||
},
|
},
|
||||||
onBeforeEdit: ({ isNew, stateData, setFieldVisible, setFieldValue, setRowFieldVisible }) => {
|
onBeforeEdit: ({ isNew, stateData, setFieldVisible, setRowFieldLabel, setRowFieldVisible }) => {
|
||||||
if (stateData.IS_CREATETEST == 0) {
|
if (stateData.IS_CREATETEST == 0) {
|
||||||
setRowFieldVisible("T_SE_NEW_USER_DETAIL", { "SCORE": true, "EXAMINATION_RESULTS": true, "Nav_Files": true })
|
setRowFieldVisible("T_SE_NEW_USER_DETAIL", { "SCORE": true, "EXAMINATION_RESULTS": true, "Nav_Files": true })
|
||||||
} else if (stateData.IS_CREATETEST == 1) {
|
} else if (stateData.IS_CREATETEST == 1) {
|
||||||
@ -20,6 +20,21 @@ export default {
|
|||||||
if (stateData.TRAIN_STATUS == 3) {
|
if (stateData.TRAIN_STATUS == 3) {
|
||||||
setRowFieldVisible("T_SE_NEW_USER_DETAIL", { "Nav_DepartmentNext.NAME": false })
|
setRowFieldVisible("T_SE_NEW_USER_DETAIL", { "Nav_DepartmentNext.NAME": false })
|
||||||
}
|
}
|
||||||
|
// TRAIN_STATUS 公司级 = 0, 部门级 = 1, 车间级 = 2, 班组级 = 3,
|
||||||
|
// Nav_DepartmentNext.NAME
|
||||||
|
if (stateData.TRAIN_STATUS == 0) {
|
||||||
|
setRowFieldLabel(
|
||||||
|
"T_SE_NEW_USER_DETAIL", {
|
||||||
|
'Nav_DepartmentNext.NAME': '部门/车间级培训组织'
|
||||||
|
})
|
||||||
|
} else if (stateData.TRAIN_STATUS == 1) {
|
||||||
|
setRowFieldLabel(
|
||||||
|
"T_SE_NEW_USER_DETAIL", {
|
||||||
|
'Nav_DepartmentNext.NAME': '班组级培训组织'
|
||||||
|
})
|
||||||
|
} else if (stateData.TRAIN_STATUS == 2 || stateData.TRAIN_STATUS == 3) {
|
||||||
|
// 列不可见
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onChange: ({ isNew, stateData, setFieldVisible, setFieldValue, setRowFieldVisible }) => {
|
onChange: ({ isNew, stateData, setFieldVisible, setFieldValue, setRowFieldVisible }) => {
|
||||||
if (stateData.IS_CREATETEST == 0) {
|
if (stateData.IS_CREATETEST == 0) {
|
||||||
|
|||||||
@ -1938,3 +1938,18 @@ export function showEnum(enums, TRAIN_TYPE) {
|
|||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/****** 附件ListModel的某个二级属性 getArryPropShow(data.Nav_Teachers, "Nav_User.NAME") ******/
|
||||||
|
export function getArryPropShow(arry, propPath) {
|
||||||
|
var arryShow = ''
|
||||||
|
const [prop1, prop2] = propPath.split('.');
|
||||||
|
if (arry && arry.length > 0 && propPath) {
|
||||||
|
arry.map(function (item, index) {
|
||||||
|
var itemProp = item[prop1]?.[prop2]
|
||||||
|
if (itemProp && itemProp.length > 0)
|
||||||
|
arryShow += (index > 0 ? ',' : '') + itemProp;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return arryShow;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user