From 9e6181d5f71839256e6d943c666bb16a5aebeee8 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 6 Sep 2023 09:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E5=88=B6=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/components/SelectTag.js | 24 ++++++++++++++++ .../organization/components/staff/Staff.js | 22 +++++++++++---- .../components/staff/StaffWorkflowSet.js | 2 +- pc4mobx/organization/style/common.less | 28 ++++++++++++++++++- 4 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 pc4mobx/organization/components/SelectTag.js diff --git a/pc4mobx/organization/components/SelectTag.js b/pc4mobx/organization/components/SelectTag.js new file mode 100644 index 0000000..07c6148 --- /dev/null +++ b/pc4mobx/organization/components/SelectTag.js @@ -0,0 +1,24 @@ + +import "../style/common.less"; + +export default class SelectTag extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + bagColor, + text, + } = this.props; + const bagStyle = { + background:bagColor + } + + return ( +
+
{text}
+
+ ) + } +} diff --git a/pc4mobx/organization/components/staff/Staff.js b/pc4mobx/organization/components/staff/Staff.js index 673c641..be1605a 100644 --- a/pc4mobx/organization/components/staff/Staff.js +++ b/pc4mobx/organization/components/staff/Staff.js @@ -34,8 +34,7 @@ import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; import ImportDialog from '../ImportDialog'; import { renderNoright } from '../../util'; - - +import SelectTag from '../SelectTag' const toJS = mobx.toJS; const confirm = Modal.confirm; @@ -218,8 +217,8 @@ export default class Staff extends React.Component { const btn = [ (), + staff.getTableInfo(); staff.setPanelStatus(false) + }}>{i18n.button.search()}), (), (), ]; @@ -239,7 +238,19 @@ export default class Staff extends React.Component { reRenderColumns(columns) { let _this = this; - return columns; + columns.forEach((c, index) => { + if (c.dataIndex == 'lack_status') { + c.render = function (text, record) { + let value = text == "1" ? "#ff9000" : (text == 2 ? "#66cc66" : "#ff0033") + return + } + }; + if (c.dataIndex == 'staff_desc') { + c.render = function (text, record) { + return {`编制数:${record.staff_num} / 在编数:${record.permanent_num} / 冻结数:${record.freeze_num}/ 状态:${record.lack_statusspan}`} + } + }; + }) } getTree = () => { @@ -516,6 +527,7 @@ export default class Staff extends React.Component { onSearchChange={val => this.onSearchChange(val)} replaceLeft={this.replaceLeft()} /> + 编制流程设置说明} + title={编制流程设置说明(停用,新文档地址https://www.e-cology.com.cn/sp/file/filePreview/904610581855698951} icon={} iconBgcolor="#55D2D4" /> diff --git a/pc4mobx/organization/style/common.less b/pc4mobx/organization/style/common.less index de20ad6..2ab8156 100644 --- a/pc4mobx/organization/style/common.less +++ b/pc4mobx/organization/style/common.less @@ -113,6 +113,32 @@ // } - + // SelectTag + .list-select-tag { + display: inline-block; + margin-bottom: 2px; + width: 55px; + height: 30px; + } + + .select-value { + height: 26px; + line-height: 26px; + color: #fff; + border-color: transparent; + padding: 0 9px; + border-radius: 4px; + font-weight: 400; + margin-top: 1px; + margin-right: 5px; + display: inline-block; + min-width: 50px; + text-align: center; + overflow: hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 200px; + } \ No newline at end of file