diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js
index 1f9df79..6711875 100644
--- a/pc4mobx/organization/components/company/company.js
+++ b/pc4mobx/organization/components/company/company.js
@@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-05-18 16:23:32
- * @LastEditTime: 2022-05-26 09:12:59
+ * @LastEditTime: 2022-05-27 15:05:49
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
*/
@@ -25,7 +25,8 @@ import {
Modal,
Button,
message,
- Switch
+ Switch,
+ Menu, Dropdown, Icon
} from 'antd'
import {
WeaSwitch,
@@ -227,6 +228,40 @@ export default class Company extends React.Component {
company
} = this.props;
let _this = this;
+ // `${columns}` && columns.push({
+ // title: '',
+ // dataIndex: 'ops',
+ // key: 'ops',
+ // width: 80,
+ // className:"wea-table-operates",
+ // render: ( text, record, index )=> {
+ // const menu = (
+ //
+ // )
+ // return (
+ //
+ //
+ //
+ // )
+ // }
+ // });
+ const menu = (
+
+ )
columns.forEach((c, index) => {
if (c.dataIndex == 'forbiddenTag') {
c.render = function (text, record) {
@@ -241,16 +276,27 @@ export default class Company extends React.Component {
}
}
if (c.dataIndex == 'operate') {
+ c.className = "wea-table-operates"
+ c.width = 80
c.render = function (text, record) {
- return
- { _this.doDel(record.id) }}>删除
-
- { _this.select(record.id) }}>联查部门
-
+ const menu = (
+
+ )
+ return
+
+
}
}
})
+
return columns;
}
@@ -286,7 +332,7 @@ export default class Company extends React.Component {
} = company;
const btn = [
- (),
+ (),
(),
(),
];
@@ -360,7 +406,7 @@ export default class Company extends React.Component {
const {
isPanelShow, companyName, conditionNum, visible, condition, form,
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
- form1, isEdit, newVisible, deptDataSource, deptColumns, selectedRowKeys, total,current,pageSize,init
+ form1, isEdit, newVisible, deptDataSource, deptColumns, selectedRowKeys, total, current, pageSize, init
} = company;
const rowSelection = {
@@ -370,8 +416,8 @@ export default class Company extends React.Component {
};
const pagination = {
- current:current,
- pageSize:pageSize,
+ current: current,
+ pageSize: pageSize,
total: total,
showSizeChanger: true,
showQuickJumper: true,
@@ -379,7 +425,7 @@ export default class Company extends React.Component {
},
onChange(current) {
},
- showTotal(total){
+ showTotal(total) {
return `共 ${total} 条`
}
};
diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js
index 306ece3..c56e93a 100644
--- a/pc4mobx/organization/components/job/Job.js
+++ b/pc4mobx/organization/components/job/Job.js
@@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-05-26 14:05:59
- * @LastEditTime: 2022-05-26 16:42:44
+ * @LastEditTime: 2022-05-30 09:48:35
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/job.js
*/
@@ -18,6 +18,7 @@ import {
WeaRightMenu,
WeaTable,
WeaLeftRightLayout,
+ WeaOrgTree
} from 'ecCom'
import {
Row,
@@ -26,7 +27,8 @@ import {
Modal,
Button,
message,
- Switch
+ Switch,
+ Menu, Dropdown, Icon
} from 'antd'
import {
WeaSwitch,
@@ -236,31 +238,34 @@ export default class Job extends React.Component {
};
if (c.dataIndex == 'compName') {
c.render = function (text, record) {
- return {
+ return {
window.open(`/spa/organization/static/index.html#/main/organization/companyExtend/${record.id}`, "_blank")
}}>{text}
}
}
if (c.dataIndex == 'operate') {
+ c.className = "wea-table-operates"
+ c.width = 80
c.render = function (text, record) {
- return
- { _this.doDel(record.id) }}>删除
-
- { _this.select(record.id) }}>联查部门
-
+ const menu = (
+
+ )
+ return
+
+
}
}
-
})
return columns;
}
- updateForbiddenTag(checked, id) {
- const {
- job
- } = this.props;
- job.updateForbiddenTag(checked, id);
- }
doDel(id) {
const {
@@ -353,55 +358,60 @@ export default class Job extends React.Component {
//左侧树
getTree = () => {
- // const {
- // hrmAddressBook
- // } = this.props;
- // const {
- // companysId,
- // hrmAddressBookPlus: plusStore
- // } = hrmAddressBook, {
- // leftTabDatas,
- // leftTab,
- // ORGTREE,
- // } = plusStore;
-
- // Object.assign(ORGTREE,{
- // expandAllChildrenOnSearch:true
- // });
-
- // let tree;
- // if (leftTab.selectedKey === '0') {
- // tree = (
- // ${i18n.label.organization()}
- // )
- // } else {
- // tree = ;
- // }
- // const leftCom = (
- //
- //
- //
- // {
- // tree
- // }
- //
- //
- // )
- return ;
- }
+ const {
+ job
+ } = this.props;
+ const {
+ companysId,
+ } = job
+
+ let tree = (
+ ${i18n.label.organization()}`}
+ treeNodeClick={this.treeNodeClick}
+ expandAllChildrenOnSearch={true}
+ />
+ )
+
+ return tree;
+ }
+
+ treeNodeClick = (event, ids, nodeids, nodes) => {
+ const {
+ job
+ } = this.props;
+ const {
+ form,
+ companysId
+ } = job;
+ const type = event.node.props.type || '0';
+ const id = event.node.props.id || '';
+ let params = {};
+ form.resetConditionValue();
+ job.setPanelStatus(false)
+ // job.tabkey = 'default_3';
+ job.nodeType = type;
+ if (type == '0') {
+ params['virtualtype'] = companysId;
+ }
+ if (type == '1') {
+ params['subcompanyid1'] = id;
+ }
+ if (type == '2') {
+ params['departmentid'] = id;
+ }
+ job.doSearch(params);
+ }
@@ -490,14 +500,6 @@ export default class Job extends React.Component {
}}
indentSize={15}
/>
- //
}
diff --git a/pc4mobx/organization/stores/company.js b/pc4mobx/organization/stores/company.js
index a365ad3..169abd3 100644
--- a/pc4mobx/organization/stores/company.js
+++ b/pc4mobx/organization/stores/company.js
@@ -121,7 +121,7 @@ export class CompanyStore {
}
//删除
- delete() {
+ @action delete() {
let params = {
ids: this.ids
};
@@ -149,6 +149,7 @@ export class CompanyStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
+ this.getTableInfo();
} else {
message.warning(data.msg);
}
diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js
index d54bd0d..12d33a3 100644
--- a/pc4mobx/organization/stores/job.js
+++ b/pc4mobx/organization/stores/job.js
@@ -56,15 +56,17 @@ import {
@observable current = 1;
@observable pageSize = 10;
- @observable defaultShowLeft = true
+ @observable defaultShowLeft = true;
+ @observable companysId = 1
@action
- getTableInfo() {
+ getTableInfo(params) {
this.setLoading(true);
- let params = {
+ params = {
+ ...params,
current:this.current,
pageSize:this.pageSize
}
@@ -94,12 +96,13 @@ import {
}
}).catch(error => {
message.warning(error.msg);
- })
-
-
-
-
-
+ })
+ }
+
+ @action("nodetree事件")
+ doSearch (params){
+ this.setInit(true);
+ this.getTableInfo(params);
}
@action("联查部门")
diff --git a/pc4mobx/organization/style/common.less b/pc4mobx/organization/style/common.less
index 1f965bc..5f506ee 100644
--- a/pc4mobx/organization/style/common.less
+++ b/pc4mobx/organization/style/common.less
@@ -31,6 +31,12 @@
}
+.wea-table-operates {
+ width: 70px !important;
+}
+
+
+
//集团管理
.organization-group {
padding-left: 25%;