提交 41230de1 authored 作者: 钟是志's avatar 钟是志

27867 就业市场/线上招聘管理/职位信息审核,胡林那 hulinnaAdmin 马上审核通过的职位直接发布 发布不了

上级 7a83785f
...@@ -25,7 +25,7 @@ export default function prepareShow(postData = {}, content = '') { ...@@ -25,7 +25,7 @@ export default function prepareShow(postData = {}, content = '') {
window.moment = moment; window.moment = moment;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(agg?.unifiedServicePatternModel?.id); // 表单id; console.log(agg?.unifiedServicePatternModel?.id); // 表单id;
if (agg?.unifiedServicePatternModel?.id && (window.location.href.indexOf('localhost') > -1 || test === 'true')) { if (agg?.unifiedServicePatternModel?.id && (window.location.href.indexOf('localhost') > -1 || test)) {
const SystemConfig = window.specialImportantSystemConfig || {}; const SystemConfig = window.specialImportantSystemConfig || {};
console.log('%c' + `${SystemConfig?.gateWayPort}/onestop/#/admin/processServices/modelConfig/templateDetail/designById?id=${agg.unifiedServicePatternModel.id}&token=${getToken()}`, 'color: green;background: white;font-size: 14px'); console.log('%c' + `${SystemConfig?.gateWayPort}/onestop/#/admin/processServices/modelConfig/templateDetail/designById?id=${agg.unifiedServicePatternModel.id}&token=${getToken()}`, 'color: green;background: white;font-size: 14px');
console.log('%c' + `${SystemConfig?.gateWayPort}/wisdomSchool/#/designFormByUrl?id=${agg.unifiedServicePatternModel.id}&token=${getToken()}`, 'color: green;background: white;font-size: 14px'); console.log('%c' + `${SystemConfig?.gateWayPort}/wisdomSchool/#/designFormByUrl?id=${agg.unifiedServicePatternModel.id}&token=${getToken()}`, 'color: green;background: white;font-size: 14px');
......
...@@ -43,9 +43,9 @@ export default class TableList extends React.Component { ...@@ -43,9 +43,9 @@ export default class TableList extends React.Component {
static getDerivedStateFromProps(nextProps, prevState) { static getDerivedStateFromProps(nextProps, prevState) {
// ... // ...
if('value' in nextProps){ if('value' in nextProps){
return {...nextProps.value}; return {...nextProps.value}; // 更新state
} }
return null; return null; //不需要更新任何state
} }
componentDidUpdate(prevProps, prevState) { componentDidUpdate(prevProps, prevState) {
......
...@@ -70,8 +70,7 @@ const CreateForm = Form.create()((props) => { ...@@ -70,8 +70,7 @@ const CreateForm = Form.create()((props) => {
//处理日期何时入库问题 //处理日期何时入库问题
try { try {
fieldsValue[d] = fieldsValue[d].format('YYYY-MM-DD HH:mm:ss'); fieldsValue[d] = fieldsValue[d].format('YYYY-MM-DD HH:mm:ss');
} catch (e) { } catch (e) {}
}
break; break;
} }
} }
...@@ -92,7 +91,7 @@ const CreateForm = Form.create()((props) => { ...@@ -92,7 +91,7 @@ const CreateForm = Form.create()((props) => {
//需要获取动态表单 //需要获取动态表单
return ( return (
<Modal <Modal
width='700px' width="700px"
maskClosable={false} maskClosable={false}
destroyOnClose destroyOnClose
title={isView ? '查看详情' : isAdd ? '新增' : '编辑'} title={isView ? '查看详情' : isAdd ? '新增' : '编辑'}
...@@ -101,10 +100,10 @@ const CreateForm = Form.create()((props) => { ...@@ -101,10 +100,10 @@ const CreateForm = Form.create()((props) => {
isView isView
? null ? null
: [ : [
<Button key='back' onClick={() => handleModalVisible()}> <Button key="back" onClick={() => handleModalVisible()}>
取消 取消
</Button>, </Button>,
<Button key='submit' type='primary' onClick={okHandle}> <Button key="submit" type="primary" onClick={okHandle}>
确定 确定
</Button>, </Button>,
] ]
...@@ -279,7 +278,6 @@ class FormList extends React.Component { ...@@ -279,7 +278,6 @@ class FormList extends React.Component {
} }
}; };
//渲染值 //渲染值
componentDidMount() { componentDidMount() {
const { dispatch, isFormCom, isSelect, callback, valueName } = this.props; const { dispatch, isFormCom, isSelect, callback, valueName } = this.props;
...@@ -295,7 +293,12 @@ class FormList extends React.Component { ...@@ -295,7 +293,12 @@ class FormList extends React.Component {
type: 'DataObj/findByCode', type: 'DataObj/findByCode',
payload: { objCode: this.props.objCode }, payload: { objCode: this.props.objCode },
callback: (dataObj) => { callback: (dataObj) => {
this.setState({ objId: dataObj.id, isTable: dataObj.isTable }, () => { this.setState(
{
objId: dataObj.id,
isTable: dataObj.isTable,
},
() => {
dispatch({ dispatch({
type: 'DataRight/getUserRight', type: 'DataRight/getUserRight',
payload: { objId: this.state.objId }, payload: { objId: this.state.objId },
...@@ -313,7 +316,8 @@ class FormList extends React.Component { ...@@ -313,7 +316,8 @@ class FormList extends React.Component {
}); });
}, },
}); });
}); },
);
}, },
}); });
} }
...@@ -356,9 +360,7 @@ class FormList extends React.Component { ...@@ -356,9 +360,7 @@ class FormList extends React.Component {
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
const b = nextProps.value || {}; const b = nextProps.value || {};
const a = this.props.value || {}; const a = this.props.value || {};
const jsonb = JSON.stringify(b); const jsonb = JSON.stringify(b);
const jsona = JSON.stringify(a); const jsona = JSON.stringify(a);
...@@ -373,6 +375,12 @@ class FormList extends React.Component { ...@@ -373,6 +375,12 @@ class FormList extends React.Component {
if (nextProps.value.columns != null && nextProps.value.columns.length > 0) { if (nextProps.value.columns != null && nextProps.value.columns.length > 0) {
this.columns = nextProps.value.columns; this.columns = nextProps.value.columns;
} }
if(nextProps.value.selectedRows && Array.isArray(nextProps.value.selectedRows)){
// 27867 就业市场/线上招聘管理/职位信息审核,胡林那 hulinnaAdmin 马上审核通过的职位直接发布 发布不了
this.setState({
selectedRows: nextProps.value.selectedRows,
});
}
if (nextProps.value.getPage) { if (nextProps.value.getPage) {
this.getPage(params, null, nextProps.value.getPage); this.getPage(params, null, nextProps.value.getPage);
...@@ -602,7 +610,6 @@ class FormList extends React.Component { ...@@ -602,7 +610,6 @@ class FormList extends React.Component {
}; };
sqlBs16 = this.props.sql; sqlBs16 = this.props.sql;
getPage = (params, values, callPage, pageNo) => { getPage = (params, values, callPage, pageNo) => {
const { objCode } = this.props; const { objCode } = this.props;
if (this.columns == null || this.columns.length == 0) { if (this.columns == null || this.columns.length == 0) {
...@@ -625,7 +632,10 @@ class FormList extends React.Component { ...@@ -625,7 +632,10 @@ class FormList extends React.Component {
if (callPage) { if (callPage) {
callPage(params, (data) => { callPage(params, (data) => {
if (!this.state.isReady) { if (!this.state.isReady) {
this.setState({ data, isReady: true }); this.setState({
data,
isReady: true,
});
} else { } else {
this.setState({ data }); this.setState({ data });
} }
...@@ -633,7 +643,10 @@ class FormList extends React.Component { ...@@ -633,7 +643,10 @@ class FormList extends React.Component {
} else if (this.props.value && this.props.value.getPage) { } else if (this.props.value && this.props.value.getPage) {
this.props.value.getPage(params, (data) => { this.props.value.getPage(params, (data) => {
if (!this.state.isReady) { if (!this.state.isReady) {
this.setState({ data, isReady: true }); this.setState({
data,
isReady: true,
});
} else { } else {
this.setState({ data }); this.setState({ data });
} }
...@@ -651,7 +664,10 @@ class FormList extends React.Component { ...@@ -651,7 +664,10 @@ class FormList extends React.Component {
}, },
callback: (data) => { callback: (data) => {
if (!this.state.isReady) { if (!this.state.isReady) {
this.setState({ data, isReady: true }); this.setState({
data,
isReady: true,
});
} else { } else {
this.setState({ data }); this.setState({ data });
} }
...@@ -843,7 +859,7 @@ class FormList extends React.Component { ...@@ -843,7 +859,7 @@ class FormList extends React.Component {
<FormItem className={styles.hidden} key={item.id}> <FormItem className={styles.hidden} key={item.id}>
{form.getFieldDecorator(item.name, { {form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name], initialValue: formData == null ? '' : formData[item.name],
})(<Input type='hidden' placeholder='请输入' />)} })(<Input type="hidden" placeholder="请输入" />)}
</FormItem> </FormItem>
); );
} }
...@@ -857,7 +873,7 @@ class FormList extends React.Component { ...@@ -857,7 +873,7 @@ class FormList extends React.Component {
{form.getFieldDecorator(item.name, { {form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name], initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }], rules: [{ required: !item.isNull }],
})(<Input style={{ width: '70%' }} readOnly={!isAdd} placeholder='请输入' />)} })(<Input style={{ width: '70%' }} readOnly={!isAdd} placeholder="请输入" />)}
</FormItem> </FormItem>
); );
} }
...@@ -873,14 +889,14 @@ class FormList extends React.Component { ...@@ -873,14 +889,14 @@ class FormList extends React.Component {
<Select <Select
disabled={isView} disabled={isView}
style={{ width: '70%' }} style={{ width: '70%' }}
optionFilterProp='children' optionFilterProp="children"
showSearch showSearch
filterOption={(input, option) => filterOption={(input, option) =>
option option
? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ? option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
: false : false
} }
placeholder='请选择' placeholder="请选择"
allowClear> allowClear>
{ops.map((r) => ( {ops.map((r) => (
<Option value={r[item.referenceCodeName]} key={r[item.referenceCodeName]}> <Option value={r[item.referenceCodeName]} key={r[item.referenceCodeName]}>
...@@ -898,7 +914,7 @@ class FormList extends React.Component { ...@@ -898,7 +914,7 @@ class FormList extends React.Component {
initialValue: formData == null ? '' : formData[item.name], initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }], rules: [{ required: !item.isNull }],
})( })(
<Select disabled={isView} style={{ width: '70%' }} placeholder='请选择' allowClear> <Select disabled={isView} style={{ width: '70%' }} placeholder="请选择" allowClear>
<Option value={'0'} key={'0'}> <Option value={'0'} key={'0'}>
审核通过 审核通过
</Option> </Option>
...@@ -938,8 +954,8 @@ class FormList extends React.Component { ...@@ -938,8 +954,8 @@ class FormList extends React.Component {
<Select <Select
disabled={isView} disabled={isView}
style={{ width: 200 }} style={{ width: 200 }}
placeholder='请选择' placeholder="请选择"
optionFilterProp='children' optionFilterProp="children"
showSearch showSearch
filterOption={(input, option) => filterOption={(input, option) =>
option option
...@@ -962,7 +978,7 @@ class FormList extends React.Component { ...@@ -962,7 +978,7 @@ class FormList extends React.Component {
{form.getFieldDecorator(item.name, { {form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name], initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }], rules: [{ required: !item.isNull }],
})(<Input disabled={isView} style={{ width: '70%' }} placeholder='请输入' />)} })(<Input disabled={isView} style={{ width: '70%' }} placeholder="请输入" />)}
</FormItem> </FormItem>
); );
} else if (number.indexOf(item.type) > -1) { } else if (number.indexOf(item.type) > -1) {
...@@ -981,7 +997,7 @@ class FormList extends React.Component { ...@@ -981,7 +997,7 @@ class FormList extends React.Component {
callback(errors); callback(errors);
}, },
], ],
})(<Input disabled={isView} placeholder='请输入' />)} })(<Input disabled={isView} placeholder="请输入" />)}
</FormItem> </FormItem>
); );
} else if (isQuery && date.indexOf(item.type) > -1) { } else if (isQuery && date.indexOf(item.type) > -1) {
...@@ -1014,7 +1030,7 @@ class FormList extends React.Component { ...@@ -1014,7 +1030,7 @@ class FormList extends React.Component {
<DatePicker <DatePicker
format={item.dataFormatStrWeb == null ? 'YYYY-MM-DD HH:mm:ss' : item.dataFormatStrWeb} format={item.dataFormatStrWeb == null ? 'YYYY-MM-DD HH:mm:ss' : item.dataFormatStrWeb}
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder='请输入' placeholder="请输入"
disabled={isView} disabled={isView}
/>, />,
)} )}
...@@ -1026,7 +1042,7 @@ class FormList extends React.Component { ...@@ -1026,7 +1042,7 @@ class FormList extends React.Component {
{form.getFieldDecorator(item.name, { {form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name], initialValue: formData == null ? '' : formData[item.name],
rules: [{ required: !item.isNull }], rules: [{ required: !item.isNull }],
})(<Input disabled={isView} style={{ width: '70%' }} placeholder='请输入' />)} })(<Input disabled={isView} style={{ width: '70%' }} placeholder="请输入" />)}
</FormItem> </FormItem>
); );
} }
...@@ -1041,7 +1057,7 @@ class FormList extends React.Component { ...@@ -1041,7 +1057,7 @@ class FormList extends React.Component {
} }
return ( return (
<Form layout='inline'> <Form layout="inline">
<Row style={{ padding: '15px' }}> <Row style={{ padding: '15px' }}>
{querys.map((item) => ( {querys.map((item) => (
<Col style={{ height: 58 }} span={get === 'mobile' ? 24 : 8} key={item.id}> <Col style={{ height: 58 }} span={get === 'mobile' ? 24 : 8} key={item.id}>
...@@ -1064,7 +1080,7 @@ class FormList extends React.Component { ...@@ -1064,7 +1080,7 @@ class FormList extends React.Component {
paddingRight: get === 'mobile' ? 12 : '', paddingRight: get === 'mobile' ? 12 : '',
}}> }}>
<span className={styles.submitButtons}> <span className={styles.submitButtons}>
<Button type='primary' loading={this.props.loading} onClick={this.handleSearch}> <Button type="primary" loading={this.props.loading} onClick={this.handleSearch}>
查询 查询
</Button> </Button>
<Button style={{ marginLeft: 8 }} onClick={this.handleFormReset}> <Button style={{ marginLeft: 8 }} onClick={this.handleFormReset}>
...@@ -1105,14 +1121,16 @@ class FormList extends React.Component { ...@@ -1105,14 +1121,16 @@ class FormList extends React.Component {
}); });
}; };
render() { render() {
const { modalVisible, selectedRows, rights, data, isReady } = this.state; const { modalVisible, selectedRows, rights, data, isReady } = this.state;
if (!isReady) { if (!isReady) {
return ( return (
<div style={{ width: 20, margin: 'auto' }}> <div
style={{
width: 20,
margin: 'auto',
}}>
<Spin /> <Spin />
</div> </div>
); );
...@@ -1138,19 +1156,21 @@ class FormList extends React.Component { ...@@ -1138,19 +1156,21 @@ class FormList extends React.Component {
} }
// console.log(json); // console.log(json);
let showDiv = 500; let showDiv = 500;
if (document.getElementsByClassName('ant-layout-content')?.length) { // 这是大学工项目 容器元素的宽度 if (document.getElementsByClassName('ant-layout-content')?.length) {
// 这是大学工项目 容器元素的宽度
showDiv = document.getElementsByClassName('ant-layout-content')[0].clientWidth - 100; showDiv = document.getElementsByClassName('ant-layout-content')[0].clientWidth - 100;
} }
if (document.querySelector('#mobelDiv')) { // 这个是一站式的元素的宽度 if (document.querySelector('#mobelDiv')) {
// 这个是一站式的元素的宽度
showDiv = document.querySelector('#mobelDiv')?.parentNode.clientWidth; showDiv = document.querySelector('#mobelDiv')?.parentNode.clientWidth;
} }
if (json.twidth) { // 列表宽度配置项 在 组件的 扩展的配置里面 if (json.twidth) {
// 列表宽度配置项 在 组件的 扩展的配置里面
showDiv = json.twidth; showDiv = json.twidth;
} }
// console.log(showDiv); // console.log(showDiv);
const parentMethods = { const parentMethods = {
handleAdd: this.handleAdd, handleAdd: this.handleAdd,
handleModalVisible: this.handleModalVisible, handleModalVisible: this.handleModalVisible,
...@@ -1208,10 +1228,10 @@ class FormList extends React.Component { ...@@ -1208,10 +1228,10 @@ class FormList extends React.Component {
if (rights.includes('delete')) { if (rights.includes('delete')) {
Dom.push( Dom.push(
<Popconfirm <Popconfirm
title='确定删除该数据?' title="确定删除该数据?"
onConfirm={this.delete.bind(this, record)} onConfirm={this.delete.bind(this, record)}
okText='确定' okText="确定"
cancelText='取消'> cancelText="取消">
<a>删除</a> <a>删除</a>
</Popconfirm>, </Popconfirm>,
); );
...@@ -1219,13 +1239,18 @@ class FormList extends React.Component { ...@@ -1219,13 +1239,18 @@ class FormList extends React.Component {
} }
return ( return (
<Fragment> <Fragment>
<div style={{ textAlign: 'center', paddingLeft: '0px', paddingRight: '0px' }}> <div
style={{
textAlign: 'center',
paddingLeft: '0px',
paddingRight: '0px',
}}>
{Dom && {Dom &&
Dom.length && Dom.length &&
Dom.map((x, index) => ( Dom.map((x, index) => (
<Fragment key={Math.random()}> <Fragment key={Math.random()}>
{x} {x}
{index > 0 && index !== Dom.length - 1 && <Divider type='vertical' />} {index > 0 && index !== Dom.length - 1 && <Divider type="vertical" />}
</Fragment> </Fragment>
))} ))}
</div> </div>
...@@ -1279,32 +1304,31 @@ class FormList extends React.Component { ...@@ -1279,32 +1304,31 @@ class FormList extends React.Component {
<> <>
<Card <Card
bordered={false} bordered={false}
bodyStyle={{ padding: 0, width: json.twidth ? json.twidth : '100%' }}> bodyStyle={{
padding: 0,
width: json.twidth ? json.twidth : '100%',
}}>
<div className={styles.tableList}> <div className={styles.tableList}>
<div className={styles.tableListForm}>{this.renderForm()}</div> <div className={styles.tableListForm}>{this.renderForm()}</div>
<div className={styles.tableListOperator}> <div className={styles.tableListOperator}>
{notShowBack ? ( {notShowBack ? (
notShowBack notShowBack
) : ( ) : (
<Button icon='rollback' type='primary' onClick={this.goBack}> <Button icon="rollback" type="primary" onClick={this.goBack}>
返回 返回
</Button> </Button>
)} )}
<FormListButtons btns={btns} <FormListButtons
btns={btns}
loading={loading} loading={loading}
importConfig={(this.props.value && this.props.value.importConfig) || []} importConfig={(this.props.value && this.props.value.importConfig) || []}
exportConfig={(this.props.value && this.props.value.exportConfig) || []} exportConfig={(this.props.value && this.props.value.exportConfig) || []}
getPage={this.getPage} getPage={this.getPage}
objId={this.state.objId} objId={this.state.objId}
query={JSON.stringify(this.state.formValues)} query={JSON.stringify(this.state.formValues)}
custom={ custom={this.props.value ? Base16Encode(JSON.stringify(this.props.value)) : null}
this.props.value ? Base16Encode(JSON.stringify(this.props.value)) : null
}
sql={Base16Encode(this.props.sql)} sql={Base16Encode(this.props.sql)}
/> />
{/* {this.props.value && this.props.value.importConfig // 导入配置项 {/* {this.props.value && this.props.value.importConfig // 导入配置项
? this.props.value.importConfig.map((r, i) => ( ? this.props.value.importConfig.map((r, i) => (
...@@ -1340,7 +1364,7 @@ class FormList extends React.Component { ...@@ -1340,7 +1364,7 @@ class FormList extends React.Component {
{rights && !rights.includes('add') ? ( {rights && !rights.includes('add') ? (
'' ''
) : ( ) : (
<Button icon='plus' type='primary' onClick={this.add}> <Button icon="plus" type="primary" onClick={this.add}>
新建 新建
</Button> </Button>
)} )}
...@@ -1367,7 +1391,6 @@ class FormList extends React.Component { ...@@ -1367,7 +1391,6 @@ class FormList extends React.Component {
/> />
)} )}
{rights && !rights.includes('exportData') ? ( {rights && !rights.includes('exportData') ? (
'' ''
) : ( ) : (
...@@ -1383,10 +1406,10 @@ class FormList extends React.Component { ...@@ -1383,10 +1406,10 @@ class FormList extends React.Component {
: selectedRows.length > 0 && ( : selectedRows.length > 0 && (
<span> <span>
<Popconfirm <Popconfirm
title='确定删除该数据?' title="确定删除该数据?"
onConfirm={this.batchDelete} onConfirm={this.batchDelete}
okText='确定' okText="确定"
cancelText='取消'> cancelText="取消">
<Button>批量删除</Button> <Button>批量删除</Button>
</Popconfirm> </Popconfirm>
</span> </span>
...@@ -1407,12 +1430,12 @@ class FormList extends React.Component { ...@@ -1407,12 +1430,12 @@ class FormList extends React.Component {
/> />
</div> </div>
} }
title='请选择表头展示' title="请选择表头展示"
trigger='click' trigger="click"
placement='bottom'> placement="bottom">
<Button // 表头筛选控件 <Button // 表头筛选控件
className={styles.filter_btn} className={styles.filter_btn}
icon='filter'> icon="filter">
表头筛选 表头筛选
</Button> </Button>
</Popover> </Popover>
...@@ -1421,15 +1444,13 @@ class FormList extends React.Component { ...@@ -1421,15 +1444,13 @@ class FormList extends React.Component {
? btns.after.map((r) => <Button {...r} loading={loading} />) ? btns.after.map((r) => <Button {...r} loading={loading} />)
: ''} : ''}
{ {!!this.props.otherProps &&
!!this.props.otherProps && !!this.props.otherProps.showRightTips && !!this.props.otherProps.showRightTips &&
this.props.otherProps.RightTipsComponent this.props.otherProps.RightTipsComponent}
}
</div> </div>
{!istableCom || (this.props.value && this.props.value.columns) ? ( {!istableCom || (this.props.value && this.props.value.columns) ? (
<div <div
id='mobelDiv' id="mobelDiv"
className={'mobelDivClassName'} className={'mobelDivClassName'}
style={{ style={{
overflow: 'hidden', overflow: 'hidden',
...@@ -1457,7 +1478,7 @@ class FormList extends React.Component { ...@@ -1457,7 +1478,7 @@ class FormList extends React.Component {
</div> </div>
) : ( ) : (
<div <div
id='mobelDiv' id="mobelDiv"
style={{ style={{
overflow: 'hidden', overflow: 'hidden',
width: isMobile ? showMobileDiv : showDiv, width: isMobile ? showMobileDiv : showDiv,
...@@ -1496,7 +1517,7 @@ class FormList extends React.Component { ...@@ -1496,7 +1517,7 @@ class FormList extends React.Component {
if (isFormCom) { if (isFormCom) {
return xxxx; return xxxx;
} }
return <PageHeaderWrapper title=''>{xxxx}</PageHeaderWrapper>; return <PageHeaderWrapper title="">{xxxx}</PageHeaderWrapper>;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论