(this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>
+ data ?
{data.Nav_Department.NAME}
{data.Nav_User.NAME}
@@ -149,10 +150,10 @@ class SE061ShowPrint extends React.Component {
{data.END_TIME}
{data.TRAINNING_TIME}
{data.TAINNING_ADDR}
- {data.TEACHER}
- {data ? this.returnModel(data.TRAIN_MODEL) : null}
+ {getArryPropShow(data.Nav_Teachers, "Nav_User.NAME")}
+ {enums.TrainType.enums[data.TRAINTYPE]}
{data.Nav_Content.NAME}
- {showFiles(data.Nav_Files, config.picServerHost, this)}
+ {showFiles(data.Nav_Files, config.picServerHost, this)}
{data.IS_CREATETEST ? "是" : "否"}
: null
@@ -169,26 +170,28 @@ class SE061ShowPrint extends React.Component {
姓名 |
身份证号 |
入职时间 |
-
分数 |
部门 |
岗位 |
+
分数 |
考核结果 |
查看试卷 |
附件 |
{data?.Nav_NewUserDetail?.map((item, i) => {
- return
- | {item.CODE} |
- {item.Nav_User?.NAME} |
- {item.ID_CARD_NUMBER} |
- {moment(item.IN_TIME).format('YYYY-MM-DD')} |
- {item.SCORE} |
- {item.Nav_Department?.NAME} |
- {item.Nav_Post?.NAME} |
- {enums.SEExaminationResultsEnum.enums[item.EXAMINATION_RESULTS]} |
- this.showDetailModal(item.ID)}> |
- {showFiles(item.Nav_Files, config.picServerHost, this)} |
-
+ if (item.IS_DELETED == null || item.IS_DELETED == false) {
+ return
+ | {item.CODE} |
+ {item.Nav_User?.NAME} |
+ {item.ID_CARD_NUMBER} |
+ {moment(item.IN_TIME).format('YYYY-MM-DD')} |
+ {item.Nav_Department?.NAME} |
+ {item.Nav_Post?.NAME} |
+ {item.SCORE} |
+ {enums.SEExaminationResultsEnum.enums[item.EXAMINATION_RESULTS]} |
+ this.showDetailModal(item.ID)}> |
+ {showFiles(item.Nav_Files, config.picServerHost, this)} |
+
+ }
})}
diff --git a/src/feui/search/AdvanceSearch.js b/src/feui/search/AdvanceSearch.js
index 544c759..5a04a97 100644
--- a/src/feui/search/AdvanceSearch.js
+++ b/src/feui/search/AdvanceSearch.js
@@ -297,7 +297,6 @@ class AdvanceSearch extends Component {
*/
handleSearch = (self = true) => {
if (this.setShareIns(self)) return
- console.log('调用查询开始', 1)
const { onSearch } = this.props
onSearch instanceof Function && onSearch()
}
diff --git a/src/files/edit/PF155.js b/src/files/edit/PF155.js
index 5242924..11c90e8 100644
--- a/src/files/edit/PF155.js
+++ b/src/files/edit/PF155.js
@@ -38,7 +38,12 @@ export default {
onBlur={(editorState) => {
const htmlContent = editorState.toHTML();
if (params.record.TITLE != htmlContent) {
- params.setFieldValue('TITLE', htmlContent);
+ var plainText = htmlContent.replace(/<[^>]+>/g, '');
+ const temps = [];
+ temps.push({ field: 'TITLE', value: htmlContent })
+ temps.push({ field: 'TITLE_SHOW', value: plainText })
+ params.setFieldValueByBatch(temps);
+ // params.setFieldValue('TITLE', htmlContent);
}
}}
placeholder={placeholder}
diff --git a/src/files/edit/PF159.js b/src/files/edit/PF159.js
index cea51b3..9addf43 100644
--- a/src/files/edit/PF159.js
+++ b/src/files/edit/PF159.js
@@ -1,3 +1,4 @@
+import { message } from "antd/lib/index";
import React, { useState } from 'react';
import { Form, Col } from 'antd'
import { extendInclude, extendRule, initFilter } from "../../utils/common";
@@ -9,12 +10,29 @@ import 'braft-editor/dist/index.css';
*/
export default {
- onBeforeEdit: ({ isNew, login, stateData }) => {
+ onBeforeEdit: ({ isNew, login, stateData, setFieldValue }) => {
if (isNew) {
stateData.STATUS = 0
+ setFieldValue('V_ISSHOWCONTROL', true);
}
},
onBeforeSaveHandleRecord(params) {
params.record.STATUS = params.customParams
+ },
+ onChange: ({ value, colInfo, getFieldValue, setFieldVisible, setFieldValue, setFieldEditable, stateData }) => {
+ if (colInfo.FIELD_NAME == 'V_ISAUTO') {
+ if (value == true) {
+ setFieldValue('V_ISSILENT', true);
+ setFieldEditable('V_ISSILENT', false);
+ } else {
+ setFieldEditable('V_ISSILENT', true);
+ }
+ } else if (colInfo.FIELD_NAME == 'V_ISSHOWCONTROL') {
+ if (value == false) {
+ if (stateData.V_ISAUTO == undefined || stateData.V_ISAUTO == false) {
+ message.warn("必须自动才能不显示控制器");
+ }
+ }
+ }
}
};
\ No newline at end of file
diff --git a/src/files/edit/SE071.js b/src/files/edit/SE071.js
index 5d95100..2136fd5 100644
--- a/src/files/edit/SE071.js
+++ b/src/files/edit/SE071.js
@@ -161,4 +161,27 @@ export default {
}
}
},
+ //向下同步培训组织 单选
+ btnSyncRole: ({ stateData, saveRowRecord }) => {
+ var totalCount = stateData.Nav_ListPlanDetail.length
+ if (totalCount < 2) {
+ return
+ }
+ var ApproveRole = {}
+ for (var i = 1; i < totalCount; i++) {
+ //本行数据 如果为空 取上一行的 APPROVAL_ROLE_ID Nav_ApproveRole
+ if ((stateData.Nav_ListPlanDetail[i].APPROVAL_ROLE_ID == null || stateData.Nav_ListPlanDetail[i].APPROVAL_ROLE_ID == undefined) && stateData.Nav_ListPlanDetail[i - 1].APPROVAL_ROLE_ID) {
+ ApproveRole = {
+ ID: stateData.Nav_ListPlanDetail[i - 1].APPROVAL_ROLE_ID,
+ NAME: stateData.Nav_ListPlanDetail[i - 1].Nav_ApproveRole.NAME
+ }
+ if (ApproveRole.ID != null && ApproveRole.ID != undefined) {
+ let iRow = { ...stateData.Nav_ListPlanDetail[i] };
+ iRow.APPROVAL_ROLE_ID = ApproveRole.ID
+ iRow.Nav_ApproveRole = ApproveRole
+ saveRowRecord({ record: iRow, editCode: "T_SE_TRAIN_PLAN_DETAIL" })
+ }
+ }
+ }
+ },
}
diff --git a/src/index.js b/src/index.js
index 990ef7f..99a1062 100644
--- a/src/index.js
+++ b/src/index.js
@@ -85,4 +85,10 @@ app.router(require('./router').default);
// 5. Start
app.start('#root');
-window.g_app = app;
\ No newline at end of file
+window.g_app = app;
+
+const { localStorage } = window
+for (let i = 0; i < localStorage.length; i++) {
+ const key = localStorage.key(i)
+ key.indexOf('_requestKey') > -1 && localStorage.removeItem(key)
+}
\ No newline at end of file
diff --git a/src/layout/FullOther/ClassBuild.js b/src/layout/FullOther/ClassBuild.js
index 293ffd6..6d011a7 100644
--- a/src/layout/FullOther/ClassBuild.js
+++ b/src/layout/FullOther/ClassBuild.js
@@ -70,8 +70,8 @@ class ClassBuild extends React.Component {
}
// 注意:数据结构是 { companyName: '邦泰', rate: '52%' }
- const companyNames = companyList.map((item) => item.companyName);
- const rates = companyList.map((item) => {
+ const companyNames = companyList?.map((item) => item.companyName);
+ const rates = companyList?.map((item) => {
// 处理 rate 可能是字符串带百分号的情况
const rateValue = typeof item.rate === 'string' ? parseFloat(item.rate.replace('%', '')) : item.rate;
return isNaN(rateValue) ? 0 : rateValue;
diff --git a/src/layout/FullOther/DangerJob.js b/src/layout/FullOther/DangerJob.js
index 348588b..27468a8 100644
--- a/src/layout/FullOther/DangerJob.js
+++ b/src/layout/FullOther/DangerJob.js
@@ -102,7 +102,18 @@ class DangerJob extends React.Component {
companyName = selectedCompanyObj?.NAME || '';
}
return (
-
+
{selectedCompany ? `${companyName}暂无危险作业数据` : '暂无危险作业数据'}
);
diff --git a/src/layout/FullOther/HiddenSolve.js b/src/layout/FullOther/HiddenSolve.js
index 18815e1..a80abbb 100644
--- a/src/layout/FullOther/HiddenSolve.js
+++ b/src/layout/FullOther/HiddenSolve.js
@@ -122,18 +122,17 @@ class HiddenSolve extends React.Component {
},
legend: {
data: ['重大隐患', '一般隐患'],
- orient: 'vertical',
right: '3%',
- top: '5%',
- itemGap: 16,
- itemWidth: 18,
- itemHeight: 12,
- textStyle: { color: '#000', fontSize: 14 },
+ top: '10%',
+ itemGap: 12,
+ itemWidth: 16,
+ itemHeight: 10,
+ textStyle: { color: '#000', fontSize: 12 },
},
grid: {
left: '8%',
right: '5%',
- top: '18%',
+ top: '28%',
bottom: '8%',
containLabel: true,
},
@@ -251,9 +250,9 @@ class HiddenSolve extends React.Component {
const companyNames = hiddenRectifyList.map((item) => item.companyName);
const majorTotal = hiddenRectifyList.map((item) => item.majorCount);
- const majorRectified = hiddenRectifyList.map((item) => (item.majorCount || 0) - (item.majorCountNo || 0));
+ const majorRectified = hiddenRectifyList.map((item) => item.majorCountNo);
const generalTotal = hiddenRectifyList.map((item) => item.generalCount);
- const generalRectified = hiddenRectifyList.map((item) => (item.generalCount || 0) - (item.generalCountNo || 0));
+ const generalRectified = hiddenRectifyList.map((item) => item.generalCountNo);
const option = {
title: {
@@ -275,18 +274,17 @@ class HiddenSolve extends React.Component {
},
legend: {
data: ['重大隐患量', '重大隐患未整改量', '一般隐患量', '一般隐患未整改量'],
- orient: 'vertical',
right: '3%',
- top: '5%',
+ top: '10%',
itemGap: 12,
- itemWidth: 18,
- itemHeight: 12,
+ itemWidth: 16,
+ itemHeight: 10,
textStyle: { color: '#000', fontSize: 12 },
},
grid: {
left: '8%',
right: '5%',
- top: '18%',
+ top: '28%',
bottom: '8%',
containLabel: true,
},
diff --git a/src/layout/FullOther/HomeContent.js b/src/layout/FullOther/HomeContent.js
index b49b45c..e5fa090 100644
--- a/src/layout/FullOther/HomeContent.js
+++ b/src/layout/FullOther/HomeContent.js
@@ -7,7 +7,8 @@ import echarts from 'echarts';
import configc from '../../config';
import 'slick-carousel/slick/slick.css';
import 'slick-carousel/slick/slick-theme.css';
-import { extendRule } from '../../utils/common';
+import { extendRule, showFileModal, showFiles, GetFileModel } from '../../utils/common';
+import FormPage from '../../components/FormPage';
class HomeContent extends React.Component {
constructor(props) {
@@ -22,6 +23,12 @@ class HomeContent extends React.Component {
this.chartResizeHandlers = {};
this.isUnmounted = false;
this.autoplayTimer = null;
+ this.state = {
+ fileForm: {
+ title: '',
+ visible: false,
+ },
+ };
}
waitForElement = (elementId, maxRetries = 10) => {
@@ -92,7 +99,7 @@ class HomeContent extends React.Component {
label: {
show: true,
position: 'inside',
- formatter: '{a|{b}:{c}}\n\n\n{e|({d}%)}', // 添加 \n 换行符
+ formatter: '{d}%', // 添加 \n 换行符
color: '#000',
textBorderWidth: 0,
rich: {
@@ -194,7 +201,7 @@ class HomeContent extends React.Component {
},
legend: {
data: legendData,
- right: 0,
+ right: '3%',
top: '10%',
itemGap: 12,
itemWidth: 16,
@@ -367,6 +374,7 @@ class HomeContent extends React.Component {
},
label: { show: true, position: 'top', textStyle: { color: '#000', fontSize: 12 }, formatter: '{c}' },
barWidth: '60%',
+ barMaxWidth: 40,
},
],
};
@@ -405,7 +413,7 @@ class HomeContent extends React.Component {
this.echartsInstances.backLogChart = echarts.init(backLogCharts);
this.echartsInstances.backLogChart.setOption({
title: {
- text: '当月工作培训统计数量',
+ text: '当月培训统计数量',
x: 'center',
y: '25%',
textStyle: { fontSize: 16, color: '#999' },
@@ -428,7 +436,7 @@ class HomeContent extends React.Component {
const option = {
title: {
- text: '当月工作培训统计数量',
+ text: '当月培训统计数量',
x: 'center',
y: '5%',
textStyle: { fontSize: 16, color: '#000' },
@@ -446,18 +454,17 @@ class HomeContent extends React.Component {
},
legend: {
data: ['培训人次', '培训场次'],
- orient: 'vertical',
- right: 0,
- top: 'middle',
- itemGap: 16,
- itemWidth: 18,
- itemHeight: 12,
- textStyle: { color: '#000', fontSize: 14 },
+ right: '3%',
+ top: '10%',
+ itemGap: 12,
+ itemWidth: 16,
+ itemHeight: 10,
+ textStyle: { color: '#000', fontSize: 12 },
},
grid: {
left: '5%',
right: '5%',
- top: '18%',
+ top: '28%',
bottom: '5%',
containLabel: true,
},
@@ -704,7 +711,7 @@ class HomeContent extends React.Component {
if (!currentAnnouncement) return null;
- const { TITLE, ABSTRACT, START, END, CONTENT, Nav_Files = [] } = currentAnnouncement;
+ const { TITLE, ABSTRACT, START, END, CONTENT, CREATE_USER_NAME, Nav_Files = [] } = currentAnnouncement;
return (
@@ -729,7 +736,8 @@ class HomeContent extends React.Component {
{/* 日期 */}
- {START} 至 {END}
+ {START ? START : '--'} 至 {END ? END : '--'}
+ {CREATE_USER_NAME ? CREATE_USER_NAME : ''}
{/* 分割线 */}
@@ -753,46 +761,9 @@ class HomeContent extends React.Component {
附件 ({Nav_Files.length}个)
-
- {Nav_Files.map((file, index) => (
-
-
-
- {file.Nav_ImgFile?.FILE_NAME || '未知文件'}
-
-
-
-
-
-
- ))}
-
+ {showFiles(Nav_Files, configc.picServerHost, this)}
+ {GetFileModel(Modal, FormPage, this, this.state.fileForm.visible)}
+
)}
@@ -862,7 +833,7 @@ class HomeContent extends React.Component {
年度隐患数据
-
年度重大隐患数
+
年度重大隐患数量
{hiddenSummary.majorQty}
diff --git a/src/layout/FullOther/RiskControl.js b/src/layout/FullOther/RiskControl.js
index 0667af8..f07baae 100644
--- a/src/layout/FullOther/RiskControl.js
+++ b/src/layout/FullOther/RiskControl.js
@@ -96,18 +96,17 @@ class RiskControl extends React.Component {
},
legend: {
data: ['重大风险', '较大风险', '一般风险', '低风险'],
- orient: 'vertical',
right: '3%',
- top: '5%',
- itemGap: 16,
- itemWidth: 18,
- itemHeight: 12,
- textStyle: { color: '#000', fontSize: 14 },
+ top: '10%',
+ itemGap: 12,
+ itemWidth: 16,
+ itemHeight: 10,
+ textStyle: { color: '#000', fontSize: 12 },
},
grid: {
left: '8%',
right: '5%',
- top: '18%',
+ top: '28%',
bottom: '8%',
containLabel: true,
},
@@ -281,7 +280,7 @@ class RiskControl extends React.Component {
axisTick: { show: false },
axisLabel: {
textStyle: { color: '#000' },
- // rotate: typeNames.length > 4 ? 15 : 0,
+ rotate: typeNames.length > 4 ? 15 : 0,
interval: 0,
fontSize: 12,
},
diff --git a/src/layout/FullOther/TrainingContent.js b/src/layout/FullOther/TrainingContent.js
index 5c8bcbf..21f4291 100644
--- a/src/layout/FullOther/TrainingContent.js
+++ b/src/layout/FullOther/TrainingContent.js
@@ -98,7 +98,7 @@ class TrainingContent extends React.Component {
legend: {
data: ['培训人次', '培训场次'],
right: '3%', // 靠右
- top: '5%', // 垂直居中
+ top: '10%', // 垂直居中
itemGap: 16,
itemWidth: 18,
itemHeight: 12,
@@ -107,7 +107,7 @@ class TrainingContent extends React.Component {
grid: {
left: '5%',
right: '5%', // 为右侧垂直图例留出空间
- top: '18%',
+ top: '28%',
bottom: '8%',
containLabel: true,
},
@@ -267,7 +267,7 @@ class TrainingContent extends React.Component {
legend: {
data: ['培训人次', '培训场次'],
right: '3%', // 靠右
- top: '5%', // 垂直居中
+ top: '10%', // 垂直居中
itemGap: 16,
itemWidth: 18,
itemHeight: 12,
@@ -276,7 +276,7 @@ class TrainingContent extends React.Component {
grid: {
left: '5%',
right: '5%', // 为右侧垂直图例留出空间
- top: '18%',
+ top: '28%',
bottom: '8%',
containLabel: true,
},
@@ -416,7 +416,7 @@ class TrainingContent extends React.Component {
legend: {
data: ['培训人次', '培训场次'],
right: '3%', // 靠右
- top: '5%', // 垂直居中
+ top: '10%', // 垂直居中
itemGap: 16,
itemWidth: 18,
itemHeight: 12,
@@ -425,7 +425,7 @@ class TrainingContent extends React.Component {
grid: {
left: '5%',
right: '5%', // 为右侧垂直图例留出空间
- top: '18%',
+ top: '28%',
bottom: '8%',
containLabel: true,
},
@@ -512,6 +512,8 @@ class TrainingContent extends React.Component {
const headers = trainingSubIDCard[0] || [];
// 数据行(从第二行开始)
const dataRows = trainingSubIDCard.slice(1);
+ // 生成稳定的 key,当数据变化时强制重新创建表格
+ const tableKey = `${headers.join('-')}-${dataRows.length}`;
// 计算每列的最小宽度(根据表头文字长度)
const getColumnWidth = (header) => {
const chineseCharWidth = 14; // 中文字符宽度(px)
@@ -530,7 +532,7 @@ class TrainingContent extends React.Component {
key: `col${index}`,
align: 'center',
width: getColumnWidth(header),
- fixed: index === 0 ? 'left' : index === headers.length - 1 ? 'right' : undefined,
+ fixed: index === 0 ? 'left' : undefined,
render: (text) => {
if (header === '小计') {
return
{text};
@@ -553,11 +555,12 @@ class TrainingContent extends React.Component {
});
// 横向滚动配置(当列数过多时)
- const scrollConfig = columns.length > 10 ? { x: columns.length * 100, y: 380 } : { y: 380 };
+ const scrollConfig = { x: columns.length * 100, y: 380 };
return (
{
if (ret && !this.isUnmounted) {
this.setState({
diff --git a/src/models/listPage.js b/src/models/listPage.js
index 3b856ef..32dc2d0 100644
--- a/src/models/listPage.js
+++ b/src/models/listPage.js
@@ -22,11 +22,8 @@ export default {
return ret
},
*getTableData ({ payload, url, onComplete }, { call, put }) {
- console.log('执行前',appService.getTableData)
const ret = yield call(appService.getTableData, { payload, url })
- console.log('执行后')
if (typeof onComplete === 'function') {
- console.log('执行后',ret)
onComplete(ret)
}
return ret