From e843aabbda5e8761b6a8af0fe85119bdcf5b3fe8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 25 十二月 2020 15:09:06 +0800 Subject: [PATCH] bms 登录 --- src/tabviews/custom/components/share/normalTable/index.jsx | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index e377073..5d403fe 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -387,7 +387,8 @@ columns: null, // 鏄剧ず鍒� activeIndex: null, // 鏍囪褰撳墠閫変腑琛� rowspans: null, // 琛屽悎骞跺瓧娈典俊鎭� - pickup: false + pickup: false, // 鏀惰捣鏈�夋嫨椤� + orderfields: {} // 鎺掑簭id涓巉ield杞崲 } UNSAFE_componentWillMount () { @@ -395,6 +396,7 @@ let radio = 5 // 铏氬寲姣斾緥 let _format = false // 鏄惁铏氬寲澶勭悊 let rowspans = [] + let orderfields = {} if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) { _format = true @@ -424,7 +426,11 @@ if (item.marks && item.marks.length === 0) { item.marks = '' } - + + if (item.field) { + orderfields[item.uuid] = item.field + } + cell = { align: item.Align, dataIndex: item.uuid, @@ -453,7 +459,8 @@ this.setState({ columns: _columns, - rowspans + rowspans, + orderfields }) } @@ -606,6 +613,8 @@ } changeTable = (pagination, filters, sorter) => { + const { orderfields } = this.state + this.setState({ pageIndex: pagination.current, pageSize: pagination.pageSize, @@ -613,6 +622,9 @@ activeIndex: null, pickup: false }) + + sorter.field = orderfields[sorter.field] || '' + this.props.refreshdata(pagination, filters, sorter) } -- Gitblit v1.8.0