From 342e12820b29867ea37c21b8cd304754e2e46334 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 10 Dec 2024 17:05:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=B1=E5=90=8D=E5=86=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E8=B7=B3=E8=BD=AC=E6=98=AF=E5=90=A6=E4=B8=BA=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=8D=A1=E7=89=87=E8=BF=98=E6=98=AF=E8=81=9A=E6=89=8D?= =?UTF-8?q?=E6=9E=97=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/components/resource/resource.js | 14 ++++++++++++-- pc4mobx/organization/stores/resource.js | 6 ++++++ 2 files changed, 18 insertions(+), 2 deletions(-) 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); }