From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 四月 2021 23:25:29 +0800 Subject: [PATCH] 2021-04-07 --- src/tabviews/custom/components/card/cardcellList/index.jsx | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 961b02b..525c471 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -4,8 +4,6 @@ import { Icon, Col, Tooltip, notification } from 'antd' import moment from 'moment' -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import asyncComponent from './asyncButtonComponent' import asyncElementComponent from '@/utils/asyncComponent' @@ -34,7 +32,6 @@ } state = { - dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, card: null, // 缂栬緫涓厓绱� elements: null, // 鎸夐挳缁� } @@ -278,7 +275,13 @@ let _style = card.style ? {...card.style} : {} if (card.datatype === 'static') { - val = card.value + val = card.value || '' + if (/@username@|@fullName@|@login_city@/ig.test(val)) { + let userName = sessionStorage.getItem('User_Name') || '' + let fullName = sessionStorage.getItem('Full_Name') || '' + let city = sessionStorage.getItem('city') || '' + val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@login_city@/ig, city) + } } else if (data.hasOwnProperty(card.field)) { val = data[card.field] } @@ -304,7 +307,7 @@ return ( <Col key={card.uuid} span={card.width}> <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> - <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div> + <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div> </div> </Col> ) @@ -356,7 +359,7 @@ return ( <Col key={card.uuid} span={card.width}> <div style={_style}> - <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div> + <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div> </div> </Col> ) -- Gitblit v1.8.0