修复转移页面

This commit is contained in:
Chengliang 2022-06-07 09:34:25 +08:00
parent 2b34890e6d
commit 772f0b66ee
3 changed files with 41 additions and 23 deletions

View File

@ -23,38 +23,61 @@ export default class NewPopconfirm extends React.Component {
constructor(props) {
super(props);
this.state = {
padding: "20px"
value: '0'
}
}
renderComponent(field, index,form) {
return <WeaFormItem style={{ margin: "10px" }} ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
label={`${field.label}`}
labelCol={{ span: `${field.labelcol}` }}
error={form.getError(field)}
tipPosition="bottom"
wrapperCol={{ span: `${field.fieldcol}` }}>
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()}
onChange={this.onChange} />}
</WeaFormItem>
}
getForm() {
const {
condition,
form,
isFormInit,
} = this.props;
isMerge
} = this.props, {
value
} = this.state;
let arr = [];
isFormInit && condition.map(c => {
c.items.map((field, index) => {
arr.push(<WeaFormItem style={{ margin: "10px" }} ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
label={`${field.label}`}
labelCol={{ span: `${field.labelcol}` }}
error={form.getError(field)}
tipPosition="bottom"
wrapperCol={{ span: `${field.fieldcol}` }}>
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()}
onChange={this.onChange} />}
</WeaFormItem>)
if(!isMerge){
if (field.domkey[0] !== 'company' && field.domkey[0] !== 'department') {
arr.push(
this.renderComponent(field,index,form)
)
}
value === '0' && field.domkey[0] === 'company' && arr.push(
this.renderComponent(field,index,form)
)
value === '1' && field.domkey[0] === 'department' && arr.push(
this.renderComponent(field,index,form)
)
}else{
arr.push(
this.renderComponent(field,index,form))
}
})
})
return <div className="wea-form-item-group">{arr}</div>
}
onChange = data => {
debugger
data.moveType && this.setState({
value:data.moveType.value
})
};
render() {
@ -66,9 +89,7 @@ export default class NewPopconfirm extends React.Component {
loading,
height,
width
} = this.props, {
padding
} = this.state;
} = this.props
const buttons = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => save()} disabled={loading}>{i18n.button.ok()}</Button>),

View File

@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-06-02 09:19:37
* @LastEditTime: 2022-06-06 16:40:18
* @LastEditTime: 2022-06-06 19:32:11
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
*/
@ -640,7 +640,7 @@
form={form1}
isFormInit={form1.isFormInit}
loading={confirmLoading}
height={isMerge ? 100 : 140}
height={100}
width={400}
isMerge={isMerge}
save={() => this.PopconfirmSave()}

View File

@ -113,9 +113,7 @@ export class DepartmentStore {
let params = {
parentDept: id
}
Api.getPostionTable(params).then(response => {
return response.json()
}).then(res => {
Api.getPostionTable(params).then(res => {
if (res.code === 200) {
res.data.list && this.setPostionDataSource(res.data.list);
res.data.columns && this.setPostionColumns(res.data.columns);
@ -123,7 +121,7 @@ export class DepartmentStore {
} else {
message.warning(res.msg);
}
}).catch(error => {
},error => {
message.warning(error.msg);
})
}
@ -343,7 +341,6 @@ export class DepartmentStore {
if (data.code === 200) {
message.success(data.msg);
this.getTableInfo();
this.form2 = new WeaForm();
this.setSelectedRowKeys('');
} else {
message.error(data.msg);