diff --git a/pc4mobx/organization/components/department/NewPopconfirm.js b/pc4mobx/organization/components/department/NewPopconfirm.js
index db925d6..87c9407 100644
--- a/pc4mobx/organization/components/department/NewPopconfirm.js
+++ b/pc4mobx/organization/components/department/NewPopconfirm.js
@@ -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
+ {}
+
+ }
+
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(
- {}
- )
+ 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
{arr}
}
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 = [
(),
diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js
index cea9224..aebd925 100644
--- a/pc4mobx/organization/components/department/department.js
+++ b/pc4mobx/organization/components/department/department.js
@@ -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()}
diff --git a/pc4mobx/organization/stores/department.js b/pc4mobx/organization/stores/department.js
index c9d38ea..057f255 100644
--- a/pc4mobx/organization/stores/department.js
+++ b/pc4mobx/organization/stores/department.js
@@ -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);