diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index 6226e9e..35b38c6 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -381,13 +381,18 @@ export default class Resource extends React.Component { reRenderColumns(columns) { let _this = this; + const { + resource + } = _this.props,{ + url + } = resource; columns.forEach((c, index) => { c.className = "wea-table-indent" c.oldWidth = (100 / columns.length).toFixed(2) + '%'; if (c.dataIndex == 'lastname') { c.render = function (text, record) { return { - window.open(`/spa/organization/static/index.html#/main/organization/resourceCard/${record.id}`); + window.open(url+record.id); }}>{text} } } @@ -404,7 +409,12 @@ export default class Resource extends React.Component { } view(id) { - window.open(`/spa/organization/static/index.html#/main/organization/resourceCard/${id}`); + const { + resource + } = this.props,{ + url + } = resource; + window.open(url+id); } version(record) { diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js index da3fba2..14a7b7f 100644 --- a/pc4mobx/organization/stores/resource.js +++ b/pc4mobx/organization/stores/resource.js @@ -65,6 +65,7 @@ export class ResourceStore extends HrmBaseStore{ @observable loginId = ''; @observable selectTreeNodeInfo; + @observable url = ''; @observable enable = false; @observable _showRadioGroup = false; @@ -240,6 +241,11 @@ export class ResourceStore extends HrmBaseStore{ this.getHSearchTemplate(res.data.searchTemplateId); //2.获取列定制内容 this.getSearchTemplate(res.data.customTemplateId); + let url = '/spa/organization/static/index.html#/main/organization/resourceCard/'; + if(res.data.cardType == "2") { + url = '/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/'; + } + this.url = url; } else { message.warning(res.msg); }