Commit 6cfa0f8e authored by 田翔's avatar 田翔

fix: 台账列表显示单位

parent eb6c0386
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.2.8", "version": "5.3.0",
"description": "5.2.8 图片模式下还能显示文件名称修复", "description": "5.3.0 台站列表标题显示单位",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -3,6 +3,7 @@ import { Table, Button, Popconfirm, Input, Space, Tag, Popover, Checkbox, Form } ...@@ -3,6 +3,7 @@ import { Table, Button, Popconfirm, Input, Space, Tag, Popover, Checkbox, Form }
import { TweenOneGroup } from 'rc-tween-one' import { TweenOneGroup } from 'rc-tween-one'
import styles from './index.less' import styles from './index.less'
import { SearchOutlined, FormOutlined } from '@ant-design/icons' import { SearchOutlined, FormOutlined } from '@ant-design/icons'
import * as icons from '@ant-design/icons'
import Text from './components/Text' import Text from './components/Text'
import ResizeableTitle from './components/ResizeableTitle' import ResizeableTitle from './components/ResizeableTitle'
import FileView from './components/FileView' import FileView from './components/FileView'
...@@ -12,6 +13,8 @@ import ValueEdit from './components/ValueEdit' ...@@ -12,6 +13,8 @@ import ValueEdit from './components/ValueEdit'
import IconPack from '../../../components/IconPack' import IconPack from '../../../components/IconPack'
import { isObject, isArray, getFieldInfo } from '../../../../utils' import { isObject, isArray, getFieldInfo } from '../../../../utils'
const iconList = Object.keys(icons).filter((item) => typeof icons[item] === 'object')
const TablePack = (props, ref) => { const TablePack = (props, ref) => {
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
...@@ -45,8 +48,9 @@ const TablePack = (props, ref) => { ...@@ -45,8 +48,9 @@ const TablePack = (props, ref) => {
//台账列表、台账选择器表头 //台账列表、台账选择器表头
const getColumnProps = (json, v) => { const getColumnProps = (json, v) => {
const { fieldName, columnWidth, isSort, accurateSearch, alignment } = v const { fieldName, columnWidth, isSort, accurateSearch, alignment } = v
const { widget, sourceType, options } = json?.[fieldName] || {} const { widget, sourceType, options, addonAfter } = json?.[fieldName] || {}
let searchProps = {} let searchProps = {}
// console.log('json?.[fieldName]', json?.[fieldName])
if (accurateSearch) { if (accurateSearch) {
if (['CheckBox', 'ComboBox', 'RadioButton'].includes(widget)) { if (['CheckBox', 'ComboBox', 'RadioButton'].includes(widget)) {
if (sourceType === '手动输入') { if (sourceType === '手动输入') {
...@@ -114,7 +118,12 @@ const TablePack = (props, ref) => { ...@@ -114,7 +118,12 @@ const TablePack = (props, ref) => {
} }
} }
return { return {
title: <div className={styles.headerTitle}>{json[fieldName]?.title || fieldName}</div>, title: (
<div className={styles.headerTitle}>
{json[fieldName]?.title || fieldName}
{addonAfter && !iconList.includes(addonAfter) ? `(${addonAfter})` : null}
</div>
),
dataIndex: fieldName, dataIndex: fieldName,
width: fieldResize[fieldName] || columnWidth || 120, width: fieldResize[fieldName] || columnWidth || 120,
ellipsis: true, ellipsis: true,
......
...@@ -44,6 +44,6 @@ ...@@ -44,6 +44,6 @@
.uploadBoxImg { .uploadBoxImg {
.@{ant-prefix}-upload-list-item-name { .@{ant-prefix}-upload-list-item-name {
display: none; display: none !important;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment