编制模块

This commit is contained in:
Chengliang 2023-09-06 09:52:31 +08:00
parent 403d040956
commit 9e6181d5f7
4 changed files with 69 additions and 7 deletions

View File

@ -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 (
<div className="list-select-tag">
<div class="select-value" style={bagStyle}> {text} </div>
</div>
)
}
}

View File

@ -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 = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
staff.getTableInfo(); staff.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
staff.getTableInfo(); staff.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => staff.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];
@ -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 <SelectTag bagColor={value} text={record.lack_statusspan} />
}
};
if (c.dataIndex == 'staff_desc') {
c.render = function (text, record) {
return <span>{`编制数:${record.staff_num} / 在编数:${record.permanent_num} / 冻结数:${record.freeze_num}/ 状态:${record.lack_statusspan}`}</span>
}
};
})
}
getTree = () => {
@ -516,6 +527,7 @@ export default class Staff extends React.Component {
onSearchChange={val => this.onSearchChange(val)}
replaceLeft={this.replaceLeft()}
/>
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
comsWeaTableStore={tableStore}
hasOrder={true}

View File

@ -84,7 +84,7 @@ export default class StaffWorkflowSet extends React.Component {
return (
<div className='staff-workdlow-set'>
<WeaTop
title={<span>编制流程设置说明</span>}
title={<span>编制流程设置说明<span style={{"color":"red"}}>停用新文档地址https://www.e-cology.com.cn/sp/file/filePreview/904610581855698951</span></span>}
icon={<i className="icon-portal-workflow" />}
iconBgcolor="#55D2D4"
/>

View File

@ -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;
}