commit
2a0a1eb81d
|
|
@ -22,9 +22,12 @@ export default class CompanyExtend extends React.Component {
|
|||
}
|
||||
init = () => {
|
||||
const { companyExtend,company } = this.props;
|
||||
const {id} = company;
|
||||
//const {id} = company;
|
||||
const {hash} = window.location;
|
||||
let id = hash.replace("[^/]+(?=/$|$)");
|
||||
console.log("id",id)
|
||||
companyExtend.init();
|
||||
// companyExtend.hrmId=hrmId;
|
||||
companyExtend.setId(id);
|
||||
companyExtend.getData();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,8 +217,7 @@ export default class Company extends React.Component {
|
|||
if (c.dataIndex == 'compName') {
|
||||
c.render = function (text, record) {
|
||||
return <a onClick={() => {
|
||||
company.setId(record.id);
|
||||
window.open('/spa/organization/static/index.html#/main/organization/companyExtend',"_blank")
|
||||
window.open(`/spa/organization/static/index.html#/main/organization/companyExtend/${record.id}`,"_blank")
|
||||
}}>{text}</a>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const Routes = (
|
|||
<Route key="sequence" path="sequence" component={Sequence} />
|
||||
<Route key="group" path="group" component={Group} />
|
||||
<Route key="officeManage" path="officeManage" component={OfficeManage} />
|
||||
<Route key="companyExtend" path="companyExtend" component={CompanyExtend} />
|
||||
<Route key="companyExtend" path="companyExtend/:id" component={CompanyExtend} />
|
||||
<Route key="branchNumSetting" path="branchNumSetting" component={BranchNumSetting} />
|
||||
<Route key="company" path="company" component={Company} />
|
||||
</Route>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ export class CompanyExtendStore {
|
|||
@observable selectedKey = 0;
|
||||
@observable detailSelectedKey = 0;
|
||||
@observable topTab = [];
|
||||
@observable buttons = {}
|
||||
@observable buttons = {};
|
||||
@observable id = ''; //分部id
|
||||
@observable date;
|
||||
@observable personalEditTables;
|
||||
|
||||
|
|
@ -122,7 +123,7 @@ export class CompanyExtendStore {
|
|||
this.loading = true;
|
||||
params = {
|
||||
...params,
|
||||
viewAttr:this.isEditor ? 2 : 1
|
||||
viewAttr: this.isEditor ? 2 : 1
|
||||
}
|
||||
let data = {
|
||||
"result": {
|
||||
|
|
@ -1090,10 +1091,10 @@ export class CompanyExtendStore {
|
|||
],
|
||||
"topTab": [
|
||||
{
|
||||
"title": "总部信息",
|
||||
"viewCondition": "1"
|
||||
"title": "总部信息",
|
||||
"viewCondition": "1"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
// API.getResourceCard(params).then((data) => {
|
||||
|
|
@ -1120,12 +1121,12 @@ export class CompanyExtendStore {
|
|||
|
||||
handleTable = (datas) => {
|
||||
return datas && datas.map(data => {
|
||||
const {tabinfo:{columns}} = data;
|
||||
const { tabinfo: { columns } } = data;
|
||||
const length = columns.length;
|
||||
columns.map(c => {
|
||||
c.width = `${95/length}%`
|
||||
})
|
||||
return data
|
||||
columns.map(c => {
|
||||
c.width = `${95 / length}%`
|
||||
})
|
||||
return data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -1170,13 +1171,17 @@ export class CompanyExtendStore {
|
|||
}
|
||||
|
||||
|
||||
setTopTab (topTab) {
|
||||
setTopTab(topTab) {
|
||||
this.topTab = topTab;
|
||||
}
|
||||
|
||||
changeData(key) {
|
||||
this.setSelectedKey(key);
|
||||
}
|
||||
}
|
||||
|
||||
setId(id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue