花名册页面增加配置文件判断跳转是否为标准卡片还是聚才林卡片

This commit is contained in:
Chengliang 2024-12-10 17:05:42 +08:00
parent 1842906c83
commit 342e12820b
2 changed files with 18 additions and 2 deletions

View File

@ -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 <a href='javascript:void(0);' onClick={() => {
window.open(`/spa/organization/static/index.html#/main/organization/resourceCard/${record.id}`);
window.open(url+record.id);
}}>{text}</a>
}
}
@ -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) {

View File

@ -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);
}