feat(): 将站点名称字段改为name

master
李神峰 2025-11-22 16:05:16 +08:00
parent d1f1715f93
commit cc87b22279
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ const RealTable = ({ ctx }) => {
const columns = [
{ title: '站点名称', key: 'mn',dataIndex:"mn",ellipsis: true, width: 90},
{ title: '站点名称', key: 'name',dataIndex:"name",ellipsis: true, width: 90},
{
title: '数据时间', key: 'tm', dataIndex: "tm", align: 'center', width: 80,
render: (v, r) => <span style={{color:r.status === 'false'? 'red':'#fff'}}>{v ? moment(v).format('MM-DD HH:mm:ss'):""}</span>
@ -79,7 +79,7 @@ const RealTable = ({ ctx }) => {
columns={newCols}
scroll={size?.height && size.height < height ? { y: size.height - 48,x:"auto" } : undefined}
/>
<Modal title='水质详情' open={visible} destroyOnClose onCancel={() => { setVisible(false); setTabKey('pH');setList([]) }} footer={null} width={900}>
<Modal title={detailRow?.name} open={visible} destroyOnClose onCancel={() => { setVisible(false); setTabKey('pH');setList([]) }} footer={null} width={900}>
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
<DatePicker.RangePicker value={range} onChange={setRange} allowClear={false} showTime={{ format: 'HH:mm' }} format='YYYY-MM-DD HH:mm' />
<Button style={{ marginLeft: 8 }} type='primary' onClick={()=>loadDetail(detailRow)}>查询</Button>

View File

@ -19,7 +19,7 @@ export function usePageContext() {
const dataWithSpecialStation = useMemo(() => {
const kw = (filterName || '').trim().toLowerCase();
if (!kw) return stData;
return stData.filter(o => ((o.mn).toLowerCase()).includes(kw));
return stData.filter(o => ((o.name).toLowerCase()).includes(kw));
}, [stData, filterName])
const fetchSpecialStationData = async () => {
try {