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 1/2] =?UTF-8?q?=E8=8A=B1=E5=90=8D=E5=86=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=B7=B3=E8=BD=AC=E6=98=AF=E5=90=A6=E4=B8=BA?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8D=A1=E7=89=87=E8=BF=98=E6=98=AF=E8=81=9A?= =?UTF-8?q?=E6=89=8D=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); } From 21801124c1c7ca5cfa4415a4aefe9f1c13987bd6 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Mon, 6 Jan 2025 11:39:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E4=BA=BA=E5=91=98=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E9=94=9A=E7=82=B9=E5=A2=9E=E5=8A=A0=E6=BB=9A=E5=8A=A82.?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=AE=BE=E7=BD=AE=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/columnSetting/defineShowItems.js | 5 +++++ pc4mobx/organization/style/card.less | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pc4mobx/organization/components/columnSetting/defineShowItems.js b/pc4mobx/organization/components/columnSetting/defineShowItems.js index 66838ef..48f9adf 100644 --- a/pc4mobx/organization/components/columnSetting/defineShowItems.js +++ b/pc4mobx/organization/components/columnSetting/defineShowItems.js @@ -38,11 +38,16 @@ export default class DefineShowItems extends Component { draggable deleteConfirm title="" + pageSize={10} + pageSizeOptions={[10, 20, 50]} columns={toJS(columns)} datas={toJS(datas)} copyFilterProps={["id"]} selectedData={!loading && toJS(selectedData)} onChange={e => columnSetting.setTableEditDatas(e)} + tableProps={{ + scroll: { y: 400 } + }} onRowSelect={(sRowKeys, rows, dataIndex, selectedDatas) => this.onRowSelect(sRowKeys, rows, dataIndex, selectedDatas)} /> ); diff --git a/pc4mobx/organization/style/card.less b/pc4mobx/organization/style/card.less index f98d1a4..9497d8f 100644 --- a/pc4mobx/organization/style/card.less +++ b/pc4mobx/organization/style/card.less @@ -188,12 +188,17 @@ width: 10%; background-color: #ffffff; margin-left: 20px; + position: fixed; + height: 100%; + top: 0; + right: 0; + overflow: scroll; .right{ height: 100%; padding-left: 20px; .ant-timeline{ - position: fixed; - top: 20px; + // position: fixed; + margin-top: 20px; .title { cursor: pointer; }