diff --git a/src/service/apiurl.js b/src/service/apiurl.js index b95721e..905ca3e 100644 --- a/src/service/apiurl.js +++ b/src/service/apiurl.js @@ -84,7 +84,7 @@ const apiurl = { }, syjc: { page: service_ykz + '/osmoticPressRReal/page', - export: service_ykz + '/osmoticPressRReal/export', + export: service_ykz + '/osmoticPressR/export', list:service_ykz + '/osmoticPressR/list' }, cdgl: { @@ -210,6 +210,8 @@ const apiurl = { jynbb: service_ykz + '/statistics/rjyNb',//降雨年报表上方表格 jynbbExport:service_ykz + '/statistics/rjyNb/export',//降雨年报表下方总结栏 jynbbSummary: service_ykz + '/statistics/rjyNb/stat',//降雨年报表导出 + swybb:service_ykz + '/statistics/yb', + swybbExport:service_ykz + "/statistics/yb/export",//月报表导出 } }, systemM: { diff --git a/src/views/Gcyx/InformationSearch/StaticTable/index.js b/src/views/Gcyx/InformationSearch/StaticTable/index.js index 1fdba2a..e3e0d08 100644 --- a/src/views/Gcyx/InformationSearch/StaticTable/index.js +++ b/src/views/Gcyx/InformationSearch/StaticTable/index.js @@ -13,12 +13,13 @@ const Page = () => { 0: '闸后流量', 1: '雨量', 2: '闸前水位', - 3:'闸后水位' + 3: '闸后水位' } const bbType = { 0: '日报表', 1: '年报表', + 2:'月报表' } const [searchVal, setSearchVal] = useState(false) const [requsetUrlObj, setRequsetUrlObj] = useState({}) @@ -46,14 +47,8 @@ const Page = () => { ]; const dayColumns = [ - { title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" }, - ...Array(30).fill(0).map((item, index) => ({ - title: `${index + 1}天`, - key: `drpM${index + 1}`, - dataIndex: `drpM${index + 1}`, - width: 100, - align: "center", - })) + { title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", render: (v, r, i) => {v ? `${v}号`: ''}}, + {title: '监测值', key: 'data', dataIndex: 'data', width: 120, align: "center",} ]; const yearColumns = [ { title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" }, @@ -80,9 +75,9 @@ const Page = () => { changeColumns.forEach((item, i) => { if (i > 0) { if (i < 17) { - item.sorter = (a,b) => a[`drpH${i + 8}`] - b[`drpH${i + 8}`] + item.sorter = (a, b) => a[`drpH${i + 8}`] - b[`drpH${i + 8}`] } else { - item.sorter = (a,b) => a[`drpH${i - 16}`] - b[`drpH${i - 16}`] + item.sorter = (a, b) => a[`drpH${i - 16}`] - b[`drpH${i - 16}`] } cols.push({ ...item, @@ -118,33 +113,33 @@ const Page = () => { // 年报表总结栏 const getStaData = async (params) => { let obj = {}; - try { + try { const res = await httppost2(requsetUrlObjRef.current?.yearSummary, params) - if (res.code == 200) { - res.data.list?.forEach(item => { - if (!obj[item.date]) { + if (res.code == 200) { + res.data.list?.forEach(item => { + if (!obj[item.date]) { let arr = Object.keys(item) - params.type == 1 ? arr.splice(0,1) :arr.splice(0,2) - obj[item.date] = arr.map(o => ({[o]:item[o]})) - } - }) - setStaData({...res.data,list:obj}) + params.type == 1 ? arr.splice(0, 1) : arr.splice(0, 2) + obj[item.date] = arr.map(o => ({ [o]: item[o] })) + } + }) + setStaData({ ...res.data, list: obj }) } - } catch (error) { + } catch (error) { console.log(error); - } - } + } + } // 导出 const exportExcel = () => { let params = { ...searchVal, } const fileName = - (searchVal?.type1 != 1 ? + (searchVal?.type1 == 0 ? `${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` : - searchVal.year) + projectType[searchVal.type] + bbType[searchVal.type1] - httppost5(requsetUrlObjRef.current?.export, params).then(res => { - + searchVal?.type1 == 1 ?formatDate(searchVal.year): + formatDate(searchVal.yearMonth)) + projectType[searchVal.type] + bbType[searchVal.type1] + httppost5(requsetUrlObjRef.current?.export, params).then(res => { exportFile(`${fileName}.xlsx`, res.data) }) } @@ -153,7 +148,7 @@ const Page = () => { let urlObj; let obj = { page: type == 0 ? apiurl.gcyx.tjbb.swrbb : apiurl.gcyx.tjbb.swnbb, - export: type == 0 ? apiurl.gcyx.tjbb.swrbbExport : apiurl.gcyx.tjbb.swnbbExport, + export: type == 0 ? apiurl.gcyx.tjbb.swrbbExport : type == 1 ?apiurl.gcyx.tjbb.swnbbExport: apiurl.gcyx.tjbb.swybbExport, yearSummary: type == 1 ? apiurl.gcyx.tjbb.swnbbSummary : '' } switch (name) { @@ -163,8 +158,8 @@ const Page = () => { case 1: urlObj = { page: type == 0 ? apiurl.gcyx.tjbb.jyrbb : apiurl.gcyx.tjbb.jynbb, - export: type == 0 ? apiurl.gcyx.tjbb.jyrbbExport : apiurl.gcyx.tjbb.jynbbExport, - yearSummary:type == 1 ? apiurl.gcyx.tjbb.jynbbSummary : '' + export: type == 0 ? apiurl.gcyx.tjbb.jyrbbExport :type == 1 ? apiurl.gcyx.tjbb.jynbbExport: apiurl.gcyx.tjbb.swybbExport, + yearSummary: type == 1 ? apiurl.gcyx.tjbb.jynbbSummary : '' } break; case 2: @@ -179,17 +174,32 @@ const Page = () => { return urlObj } + const [monthData, setMonthData] = useState([]) + const getMonthData = async (params) => { + try { + const res = await httppost2(apiurl.gcyx.tjbb.swybb, params) + if (res.code == 200) { + const silceData = res.data.slice(-3) + setData(res.data.slice(0,-3)) + setMonthData(silceData) + } + } catch (error) { + console.log(error); + } + } const formatDate = (date1) => { const date = new Date(date1); const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); - - return year + '年' + month + '月' + day + '日'; + const res = searchVal.type1 == 0 ? year + '年' + month + '月' + day + '日' : + searchVal.type1 == 1 ? year + '年' : + year + '年' + month + '月' + return res; } useEffect(() => { - if (searchVal) { + if (searchVal && searchVal.type1 != 1 && searchVal.type1 != 2) { const params = { ...searchVal } setRequsetUrlObj(getUrl(searchVal.type, searchVal.type1)) requsetUrlObjRef.current = getUrl(searchVal.type, searchVal.type1) @@ -198,6 +208,10 @@ const Page = () => { if (searchVal.type1 == 1) { getStaData(searchVal) } + + if (searchVal.type1 == 2) { + getMonthData(searchVal) + } }, [searchVal]) @@ -215,11 +229,17 @@ const Page = () => { ( <> -

{searchVal?.type1 != 1 ? `${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` : searchVal.year}{projectType[searchVal.type]}{bbType[searchVal.type1]}

+

+ {searchVal?.type1 == 0 ? + `${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` : + searchVal?.type1 == 1 ? + formatDate(searchVal.year):formatDate(searchVal.yearMonth) + } + {projectType[searchVal.type]}{bbType[searchVal.type1]}

单位:{searchVal?.type != 1 ? 'm' : 'mm'}
)} - columns={searchVal.type1 == 0 ? newTimeColumns : searchVal.type1 == 1 ? yearColumns : yearColumns} + columns={searchVal.type1 == 0 ? newTimeColumns : searchVal.type1 == 1 ? yearColumns : dayColumns} rowKey="date" dataSource={data} pagination={false} @@ -227,113 +247,127 @@ const Page = () => { summary={(pageData) => { return ( searchVal.type1 == 1 ? - searchVal.type != 1 ? - - - -
-
-
平均
-
-
- {staData?.list?.["平均"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} -
- - -
-
-
最高
-
-
- {staData?.list?.["最高"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} -
- - -
-
月统计
-
最高日期
-
-
- {staData?.list?.["最高日期"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} -
- - -
-
-
最低
-
-
- {staData?.list?.["最低"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} -
- - -
-
-
最低日期
-
-
- {staData?.list?.["最低日期"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} -
- - 年统计 - 最高水位 - {staData?.max} - 最低水位 - {staData?.min} - 平均水位 - {staData?.avg} - -
: - - - 月降雨量 - {staData?.list?.["月降雨量"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} - - - 降雨日数 - {staData?.list?.["降雨日数"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} - - - 最大日量 - {staData?.list?.["最大日量"]?.map((item, index) => ( - {item[`drpM${index + 1}`]} - ) - )} - - - 年统计 - 降水量 - {staData?.drpSum} - 降雨日数 - {staData?.dayCount} - - - : null + searchVal.type != 1 ? + + + +
+
+
平均
+
+
+ {staData?.list?.["平均"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} +
+ + +
+
+
最高
+
+
+ {staData?.list?.["最高"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} +
+ + +
+
月统计
+
最高日期
+
+
+ {staData?.list?.["最高日期"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} +
+ + +
+
+
最低
+
+
+ {staData?.list?.["最低"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} +
+ + +
+
+
最低日期
+
+
+ {staData?.list?.["最低日期"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} +
+ + 年统计 + 最高水位 + {staData?.max} + 最低水位 + {staData?.min} + 平均水位 + {staData?.avg} + +
: + + + 月降雨量 + {staData?.list?.["月降雨量"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} + + + 降雨日数 + {staData?.list?.["降雨日数"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} + + + 最大日量 + {staData?.list?.["最大日量"]?.map((item, index) => ( + {item[`drpM${index + 1}`]} + ) + )} + + + 年统计 + 降水量 + {staData?.drpSum} + 降雨日数 + {staData?.dayCount} + + + : + searchVal.type1 == 2 ? + + 月平均 + {monthData[0]?.data} + + + 月最大 + {monthData[1]?.data} + + + 月最小 + {monthData[2]?.data} + + :null ) }} /> - + diff --git a/src/views/Gcyx/InformationSearch/StaticTable/toolbar.js b/src/views/Gcyx/InformationSearch/StaticTable/toolbar.js index f0b5cbf..a20543b 100644 --- a/src/views/Gcyx/InformationSearch/StaticTable/toolbar.js +++ b/src/views/Gcyx/InformationSearch/StaticTable/toolbar.js @@ -1,11 +1,11 @@ -import React, { useEffect,useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { Form, Input, Button, DatePicker } from 'antd'; import NormalSelect from '../../../../components/Form/NormalSelect'; import moment from 'moment'; const { RangePicker } = DatePicker; const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => { - const start = moment().subtract(7,'days').format('YYYY-MM-DD 00:00:00') + const start = moment().subtract(7, 'days').format('YYYY-MM-DD 00:00:00') const end = moment().format('YYYY-MM-DD 23:59:59') const types = [ { @@ -31,10 +31,10 @@ const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => { label: "日报表", value: 0 }, - // { - // label: "月报表", - // value: 1 - // }, + { + label: "月报表", + value: 2 + }, { label: "年报表", value: 1 @@ -50,34 +50,34 @@ const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => { dateRangeSo = timeType == 0 ? { start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'), end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss') - } : {year: moment(values.tm).format('YYYY')} + } : timeType == 1 ? { year: moment(values.tm).format('YYYY') }:{ yearMonth: moment(values.tm).format('YYYY-MM') } } delete values.tm const params = timeType == 0 ? dateRangeSo : undefined; setSearchVal({ ...values, dateRangeSo: params, - year: timeType == 1 ? dateRangeSo.year : undefined + year: timeType == 1 ? dateRangeSo.year : undefined, + yearMonth:timeType == 2 ? dateRangeSo.yearMonth : undefined }); } - + const onValuesChange = (val) => { if ('type1' in val) { setTimeType(val.type1) - val.type1 == 1 ? form.setFieldValue('tm', moment()) : - form.setFieldValue('tm',[moment(start),moment(end)]) + val.type1 == 0 ? form.setFieldValue('tm', [moment(start), moment(end)]) : form.setFieldValue('tm', moment()) } } useEffect(() => { - form.setFieldValue('tm',[moment(start),moment(end)]) - form.setFieldValue('type1', 0) - form.setFieldValue('type', 0) - setSearchVal({type1:0,type:0,dateRangeSo:{start:start,end:end}}) + form.setFieldValue('tm', [moment(start), moment(end)]) + form.setFieldValue('type1', 0) + form.setFieldValue('type', 0) + setSearchVal({ type1: 0, type: 0, dateRangeSo: { start: start, end: end } }) }, []) return ( <> -
+
{ onValuesChange={onValuesChange} > - + - + {timeType == 0 ? - : timeType == 1 ? + : timeType == 1 ? - : - + style={{ width: "150px" }} + picker="year" /> : + } - + - - +
diff --git a/src/views/Home/index.js b/src/views/Home/index.js index 7977554..6260cc3 100644 --- a/src/views/Home/index.js +++ b/src/views/Home/index.js @@ -248,20 +248,13 @@ export default function Home() {
-
setShowTabLeft(!showTabLeft)} - >
+ {showTabLeft && +
setShowTabLeft(false)} + > +
} {!showTabLeft &&
{/* 工程简介 */} @@ -275,6 +268,12 @@ export default function Home() {
{/* 运行监测数据 */}
+
setShowTabLeft(true)} + > +
运行监测数据
{RealData.map((item, i) => ( @@ -326,22 +325,14 @@ export default function Home() {
- } -
setShowTabRight(!showTabRight)} - >
+ {showTabRight && +
setShowTabRight(false)} + > +
} { !showTabRight &&
@@ -375,6 +366,12 @@ export default function Home() {
{/* 报警信息 */}
+
setShowTabRight(true)} + > +
报警信息
diff --git a/src/views/Home/index.less b/src/views/Home/index.less index 61cb72c..bdb76fb 100644 --- a/src/views/Home/index.less +++ b/src/views/Home/index.less @@ -110,6 +110,7 @@ } } .runWatch{ + position: relative; .run_list{ display: flex; justify-content: space-between; @@ -193,4 +194,16 @@ width:100%; table-layout:fixed; } + + .shouqi-icon{ + display: flex; + align-items: center; + justify-content: center; + width: 25px; + height: 50px; + background-color: #3b7cff; + position: absolute; + top: 57%; + cursor: pointer; + } } \ No newline at end of file diff --git a/src/views/Home/zmjk/Sider.tsx b/src/views/Home/zmjk/Sider.tsx index 7c5ccb3..e134842 100644 --- a/src/views/Home/zmjk/Sider.tsx +++ b/src/views/Home/zmjk/Sider.tsx @@ -13,7 +13,7 @@ const Sider: React.FC<{ return ( diff --git a/src/views/Home/zmjk/Topper1.tsx b/src/views/Home/zmjk/Topper1.tsx index b7b44ed..a83052b 100644 --- a/src/views/Home/zmjk/Topper1.tsx +++ b/src/views/Home/zmjk/Topper1.tsx @@ -85,9 +85,10 @@ const Topper1: React.FC<{ return ( - + {/* */} + - { + {/* { pts.SepsLTLBRBRT.map((s, index) => { if (index == 0 || index == 1 || index == 7 || index == 8) { return ( @@ -96,7 +97,7 @@ const Topper1: React.FC<{ } } ) - } + } */} { windows.w.map((o, index) => ) } diff --git a/src/views/Home/zmjk/coordinates.ts b/src/views/Home/zmjk/coordinates.ts index 84bd584..dd3bb14 100644 --- a/src/views/Home/zmjk/coordinates.ts +++ b/src/views/Home/zmjk/coordinates.ts @@ -92,7 +92,7 @@ export type ControlPts = { export function contextCoordinates(unitWidth: number, hole: number): ControlPts { const C1 = { x: unitWidth * 0.6, y: GroundBase }; const L1 = { x: unitWidth* 1, y: GroundBase }; - const B1 = { x: unitWidth, y: BottomBase } + const B1 = { x: unitWidth , y: BottomBase } const C2 = intersection(ViewCenter, C1, { x: 0, y: undefined }); const L2 = intersection(ViewCenter, L1, { x: 0, y: undefined }); diff --git a/src/views/SafeWatch/Gzpz/form.js b/src/views/SafeWatch/Gzpz/form.js index 75721bc..fa95cb8 100644 --- a/src/views/SafeWatch/Gzpz/form.js +++ b/src/views/SafeWatch/Gzpz/form.js @@ -85,7 +85,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => { @@ -96,7 +96,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => { diff --git a/src/views/SafeWatch/Gzpz/index.js b/src/views/SafeWatch/Gzpz/index.js index aa7beb7..a143d86 100644 --- a/src/views/SafeWatch/Gzpz/index.js +++ b/src/views/SafeWatch/Gzpz/index.js @@ -25,8 +25,8 @@ const Page = () => { title: '监测类型', key: 'type', dataIndex: 'type', width: 150, render: (v) => {types[v]} }, - { title: '阈值下限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150}, - { title: '阈值上限', key: 'lowerLimit ', dataIndex: 'lowerLimit', width: 150}, + { title: '阈值下限', key: 'lowerLimit', dataIndex: 'lowerLimit', width: 150}, + { title: '阈值上限', key: 'upperLimit ', dataIndex: 'upperLimit', width: 150}, { title: '是否启用', key: 'status', dataIndex: 'status', width: 150, render: (v) => { v == 1 ? '否': v==0?'是':''} diff --git a/src/views/SafeWatch/SlWatch/TableData.js b/src/views/SafeWatch/SlWatch/TableData.js index 207ebdc..da94828 100644 --- a/src/views/SafeWatch/SlWatch/TableData.js +++ b/src/views/SafeWatch/SlWatch/TableData.js @@ -10,7 +10,7 @@ const Tabledata = ({tableData}) => { { title: '水位(mm)', key: 'value', dataIndex: 'value'}, { title: '水压(KPa)', key: 'press', dataIndex: 'press'}, { title: '水位高程(m)', key: 'waterEle', dataIndex: 'waterEle'}, - { title: '温度(°℃)', key: 'temp', dataIndex: 'temp'}, + { title: '温度(℃)', key: 'temp', dataIndex: 'temp'}, { title: '模数(F)', key: 'modulus', dataIndex: 'modulus'}, {title: '监测时间', key: 'tm', dataIndex: 'tm'}, ]; diff --git a/src/views/SafeWatch/SlWatch/index.js b/src/views/SafeWatch/SlWatch/index.js index 954ea85..1da3322 100644 --- a/src/views/SafeWatch/SlWatch/index.js +++ b/src/views/SafeWatch/SlWatch/index.js @@ -25,7 +25,7 @@ const Page = () => { { title: '水位(mm)', key: 'value', dataIndex: 'value', width: 150 }, { title: '水压(KPa)', key: 'press', dataIndex: 'press', width: 150 }, { title: '水位高程(m)', key: 'waterEle', dataIndex: 'waterEle', width: 150 }, - { title: '温度(°℃)', key: 'temp', dataIndex: 'temp', width: 150 }, + { title: '温度(℃)', key: 'temp', dataIndex: 'temp', width: 150 }, { title: '模数(F)', key: 'modulus', dataIndex: 'modulus', width: 150 }, { title: '测点位置', key: 'location', dataIndex: 'location', width: 150,ellipse:true }, { diff --git a/src/views/SafeWatch/cdgx/index.js b/src/views/SafeWatch/cdgx/index.js index 1137eea..8ce0219 100644 --- a/src/views/SafeWatch/cdgx/index.js +++ b/src/views/SafeWatch/cdgx/index.js @@ -88,7 +88,7 @@ const Page = () => { diff --git a/src/views/Sbwh/Zhfxkh/index.js b/src/views/Sbwh/Zhfxkh/index.js index 0904f11..82e9f79 100644 --- a/src/views/Sbwh/Zhfxkh/index.js +++ b/src/views/Sbwh/Zhfxkh/index.js @@ -101,7 +101,7 @@ const Page = () => { diff --git a/src/views/SystemMangant/dept/toolbar.js b/src/views/SystemMangant/dept/toolbar.js index cfd0480..f6638d4 100644 --- a/src/views/SystemMangant/dept/toolbar.js +++ b/src/views/SystemMangant/dept/toolbar.js @@ -25,7 +25,7 @@ const ToolBar = ({ setSearchVal, onSave, onChecked }) => { - + diff --git a/src/views/SystemMangant/menuM/form.js b/src/views/SystemMangant/menuM/form.js index ab79ff8..ab755d1 100644 --- a/src/views/SystemMangant/menuM/form.js +++ b/src/views/SystemMangant/menuM/form.js @@ -111,6 +111,7 @@ const ModalForm = ({ mode, record, onUerEdit, onSave, close }) => { { diff --git a/src/views/SystemMangant/menuM/index.js b/src/views/SystemMangant/menuM/index.js index 9569983..ffbeab4 100644 --- a/src/views/SystemMangant/menuM/index.js +++ b/src/views/SystemMangant/menuM/index.js @@ -74,15 +74,6 @@ const Page = () => { console.log(error); } } - // useEffect(() => { - // if(searchVal){ - // const params = { - // search: searchVal - // }; - // search(params) - // } - // }, [searchVal]) - useEffect(() => { if (allOpen.num == 2) { @@ -126,8 +117,7 @@ useEffect(() => { scroll={{ x: width, y: "calc( 100vh - 400px )" }} expandable={{ expandedRowKeys, - onExpandedRowsChange: (v, r) => { - console.log(v,r); + onExpandedRowsChange: (v, r) => { setExpandedRowKeys(v) } }} @@ -141,7 +131,6 @@ useEffect(() => { title="" component={ModalForm} extraFun={getData} - // onCrudSuccess={() => { refresh({ addvcd: localStorage.getItem('ADCD6') }) }} /> diff --git a/src/views/WatchData/PoliceMangant/PoliceRecord/index.js b/src/views/WatchData/PoliceMangant/PoliceRecord/index.js index 4725be4..74c31c4 100644 --- a/src/views/WatchData/PoliceMangant/PoliceRecord/index.js +++ b/src/views/WatchData/PoliceMangant/PoliceRecord/index.js @@ -29,7 +29,7 @@ const Page = () => { { title: '阈值上限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150}, { title: '状态', key: 'status', dataIndex: 'status', width: 150, - render: (v) => {types[v]} + render: (v) => {types1[v]} }, { title: '报警时间', key: 'warnTime', dataIndex: 'warnTime', width: 140, diff --git a/src/views/WatchData/PoliceMangant/PoliceRuleConfig/form.js b/src/views/WatchData/PoliceMangant/PoliceRuleConfig/form.js index e245dd3..414c49e 100644 --- a/src/views/WatchData/PoliceMangant/PoliceRuleConfig/form.js +++ b/src/views/WatchData/PoliceMangant/PoliceRuleConfig/form.js @@ -15,10 +15,6 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => { label: "闸后流量", value: 0, }, - { - label: "雨量", - value: 1, - }, { label: "闸前水位", value:2, @@ -61,7 +57,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => { @@ -73,7 +69,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => { diff --git a/src/views/WatchData/PoliceMangant/PoliceRuleConfig/index.js b/src/views/WatchData/PoliceMangant/PoliceRuleConfig/index.js index 9052ee2..d4c53e9 100644 --- a/src/views/WatchData/PoliceMangant/PoliceRuleConfig/index.js +++ b/src/views/WatchData/PoliceMangant/PoliceRuleConfig/index.js @@ -13,7 +13,6 @@ const url = "http://223.75.53.141:9102/test.by-lyf.tmp" const Page = () => { const types = { 0: "闸后流量", - 1: '雨量', 2: "闸前水位", 3:'闸后水位' } @@ -26,8 +25,8 @@ const Page = () => { title: '监测点', key: 'type', dataIndex: 'type', width: 150, render: (v) => {types[v]} }, - { title: '阈值下限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150}, - { title: '阈值上限', key: 'lowerLimit ', dataIndex: 'lowerLimit', width: 150}, + { title: '阈值下限', key: 'lowerLimit', dataIndex: 'lowerLimit', width: 150}, + { title: '阈值上限', key: 'upperLimit ', dataIndex: 'upperLimit', width: 150}, { title: '是否启用', key: 'status', dataIndex: 'status', width: 150, render: (v) => { v == 1 ? '否': v==0?'是':''} diff --git a/src/views/WatchData/PoliceMangant/PoliceRuleConfig/toolbar.js b/src/views/WatchData/PoliceMangant/PoliceRuleConfig/toolbar.js index b22c88c..af0665e 100644 --- a/src/views/WatchData/PoliceMangant/PoliceRuleConfig/toolbar.js +++ b/src/views/WatchData/PoliceMangant/PoliceRuleConfig/toolbar.js @@ -11,10 +11,6 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => { label: "闸后流量", value: 0, }, - { - label: "雨量", - value: 1, - }, { label: "闸前水位", value: 2,