Compare commits
41 Commits
5957c16915
...
280ea1adb5
| Author | SHA1 | Date |
|---|---|---|
|
|
280ea1adb5 | |
|
|
1e9febbb45 | |
|
|
2519ae0dd1 | |
|
|
85dc624c7e | |
|
|
b54341ea7a | |
|
|
ae58cfa58e | |
|
|
2ac03a086b | |
|
|
b3d4946b8a | |
|
|
d573f06534 | |
|
|
9198ccfa24 | |
|
|
4308922177 | |
|
|
4f5996797c | |
|
|
c959ea4964 | |
|
|
49efdd8113 | |
|
|
27e3bc09a1 | |
|
|
4d97627ac1 | |
|
|
9748fd0afa | |
|
|
d6c943cae0 | |
|
|
ada5fe2db9 | |
|
|
a8224a6f05 | |
|
|
99ae160e26 | |
|
|
590c5d4e18 | |
|
|
c1883456a7 | |
|
|
51bcad93ce | |
|
|
0d5f4e635f | |
|
|
cc259fdce2 | |
|
|
af042278e7 | |
|
|
217da0c127 | |
|
|
a8eea184a0 | |
|
|
4414e81a00 | |
|
|
512b7e428a | |
|
|
314285a0e8 | |
|
|
d3b0f6502d | |
|
|
83a62f986a | |
|
|
47500bcca0 | |
|
|
54045586ce | |
|
|
febcef901f | |
|
|
51137cebf8 | |
|
|
1e2c89b85e | |
|
|
e919069eec | |
|
|
912c9d09ca |
|
|
@ -44,6 +44,7 @@
|
||||||
"react-audio-player": "^0.17.0",
|
"react-audio-player": "^0.17.0",
|
||||||
"react-cookies": "^0.1.1",
|
"react-cookies": "^0.1.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
"react-draggable": "^4.4.6",
|
||||||
"react-konva": "^18.2.3",
|
"react-konva": "^18.2.3",
|
||||||
"react-org-tree": "^1.0.1",
|
"react-org-tree": "^1.0.1",
|
||||||
"react-pdf": "^7.3.3",
|
"react-pdf": "^7.3.3",
|
||||||
|
|
@ -53,6 +54,7 @@
|
||||||
"react-router-dom": "^6.3.0",
|
"react-router-dom": "^6.3.0",
|
||||||
"react-scripts": "5.0.1",
|
"react-scripts": "5.0.1",
|
||||||
"react-window": "^1.8.10",
|
"react-window": "^1.8.10",
|
||||||
|
"react-zoom-pan-pinch": "^3.7.0",
|
||||||
"redux": "^4.2.0",
|
"redux": "^4.2.0",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 487 B |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 261 B |
|
After Width: | Height: | Size: 482 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
|
@ -9,7 +9,7 @@ import {divIcon} from "leaflet";
|
||||||
import { httppost2 } from '../../utils/request';
|
import { httppost2 } from '../../utils/request';
|
||||||
import apiurl from '../../service/apiurl';
|
import apiurl from '../../service/apiurl';
|
||||||
import CryptoJS from 'crypto-js';
|
import CryptoJS from 'crypto-js';
|
||||||
|
import { createCrudService } from '../../components/crud/_';
|
||||||
const { SubMenu } = Menu;
|
const { SubMenu } = Menu;
|
||||||
|
|
||||||
const HeaderUser: React.FC<{
|
const HeaderUser: React.FC<{
|
||||||
|
|
@ -38,26 +38,36 @@ const HeaderUser: React.FC<{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const onFinish = async(val:any)=>{
|
const onFinish = async (val: any) => {
|
||||||
if(val.newSecretKey!==val.secondSecretKey){
|
const path = `${apiurl.systemM.userM.updatePassword}?oldPassword=${val.oldPassword}&newPassword=${val.newPassword}`;
|
||||||
message.error('确认密码错误')
|
createCrudService(path).userEdit().then((result) => {
|
||||||
return
|
if (result?.code === 200) {
|
||||||
}
|
message.success('修改成功,即将重新登录')
|
||||||
const params = {
|
setOpen(false)
|
||||||
oldSecretKey:encryptData(val.oldSecretKey),
|
setTimeout(() => {
|
||||||
newSecretKey:encryptData(val.newSecretKey),
|
logout()
|
||||||
secondSecretKey:encryptData(val.secondSecretKey),
|
}, 1500);
|
||||||
userId: localStorage.getItem('userId')
|
}
|
||||||
}
|
})
|
||||||
const res = await httppost2(apiurl.setPassword,params)
|
// if(val.newSecretKey!==val.secondSecretKey){
|
||||||
if(res.code===200){
|
// message.error('确认密码错误')
|
||||||
message.success('修改成功')
|
// return
|
||||||
setTimeout(() => {
|
// }
|
||||||
logout()
|
// const params = {
|
||||||
}, 1500);
|
// oldSecretKey:encryptData(val.oldSecretKey),
|
||||||
}else{
|
// newSecretKey:encryptData(val.newSecretKey),
|
||||||
message.error(res.description)
|
// secondSecretKey:encryptData(val.secondSecretKey),
|
||||||
}
|
// userId: localStorage.getItem('userId')
|
||||||
|
// }
|
||||||
|
// const res = await httppost2(apiurl.setPassword,params)
|
||||||
|
// if(res.code===200){
|
||||||
|
// message.success('修改成功')
|
||||||
|
// setTimeout(() => {
|
||||||
|
// logout()
|
||||||
|
// }, 1500);
|
||||||
|
// }else{
|
||||||
|
// message.error(res.description)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -90,7 +100,7 @@ const HeaderUser: React.FC<{
|
||||||
</div>:null
|
</div>:null
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal title="修改密码" open={open} onOk={()=>setOpen(false)} onCancel={()=>setOpen(false)} footer={null}>
|
<Modal destroyOnClose title="修改密码" open={open} onOk={()=>setOpen(false)} onCancel={()=>setOpen(false)} footer={null}>
|
||||||
<Form
|
<Form
|
||||||
name="basic"
|
name="basic"
|
||||||
labelCol={{span: 5}}
|
labelCol={{span: 5}}
|
||||||
|
|
@ -101,23 +111,23 @@ const HeaderUser: React.FC<{
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="原密码"
|
label="原密码"
|
||||||
name="oldSecretKey"
|
name="oldPassword"
|
||||||
rules={[{required: true}]}>
|
rules={[{required: true}]}>
|
||||||
<Input.Password />
|
<Input.Password />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="新密码"
|
label="新密码"
|
||||||
name="newSecretKey"
|
name="newPassword"
|
||||||
rules={[{required: true}]}>
|
rules={[{required: true}]}>
|
||||||
<Input.Password />
|
<Input.Password />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
{/* <Form.Item
|
||||||
label="确认密码"
|
label="确认密码"
|
||||||
name="secondSecretKey"
|
name="secondSecretKey"
|
||||||
rules={[{required: true}]}>
|
rules={[{required: true}]}>
|
||||||
<Input.Password />
|
<Input.Password />
|
||||||
</Form.Item>
|
</Form.Item> */}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
wrapperCol={{
|
wrapperCol={{
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ const TopMenu: React.FC<{
|
||||||
const menuClicked = (id: any) => {
|
const menuClicked = (id: any) => {
|
||||||
const menuItem:any = menu.find(m => m.id == id);
|
const menuItem:any = menu.find(m => m.id == id);
|
||||||
if (menuItem.title === "雨水工灾情") {
|
if (menuItem.title === "雨水工灾情") {
|
||||||
getReadStatus()
|
// getReadStatus()
|
||||||
}
|
}
|
||||||
const url = getMenuUrl(menuItem);
|
const url = getMenuUrl(menuItem);
|
||||||
|
|
||||||
|
|
@ -74,17 +74,17 @@ const TopMenu: React.FC<{
|
||||||
* @description 由于进入雨水工灾情 初始化进入是这个页面 发请求来获取未读和已读状态
|
* @description 由于进入雨水工灾情 初始化进入是这个页面 发请求来获取未读和已读状态
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const getReadStatus = () => {
|
// const getReadStatus = () => {
|
||||||
createCrudService(apiurl.ssyq.status).delGet().then((res) => {
|
// createCrudService(apiurl.ssyq.status).delGet().then((res) => {
|
||||||
if (res.code === 200) {
|
// if (res.code === 200) {
|
||||||
dispatch.runtime.setIsReadObject(res.data)
|
// dispatch.runtime.setIsReadObject(res.data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
getReadStatus()
|
// getReadStatus()
|
||||||
}, [])
|
// }, [])
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<div className='app-top-menu'>
|
<div className='app-top-menu'>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {httppost2, download, httpPostFile, httpget, httpget2,httpget6} from "../../utils/request";
|
import {httppost2, download, httpPostFile, httpget, httpget2,httpget6,xyt_httpput} from "../../utils/request";
|
||||||
import apiurl from "../../service/apiurl";
|
import apiurl from "../../service/apiurl";
|
||||||
import {config} from "../../config";
|
import {config} from "../../config";
|
||||||
|
|
||||||
|
|
@ -156,6 +156,10 @@ export function createCrudService(urlSet) {
|
||||||
const resData = await httppost2(urlSet, params) || {};
|
const resData = await httppost2(urlSet, params) || {};
|
||||||
return resData;
|
return resData;
|
||||||
}
|
}
|
||||||
|
const userEdit = async (params) => {
|
||||||
|
const resData = await xyt_httpput(urlSet, params) || {};
|
||||||
|
return resData;
|
||||||
|
}
|
||||||
|
|
||||||
const edit1 = async (params) => {
|
const edit1 = async (params) => {
|
||||||
const resData = await httppost2(urlSet, params) || {};
|
const resData = await httppost2(urlSet, params) || {};
|
||||||
|
|
@ -246,6 +250,7 @@ export function createCrudService(urlSet) {
|
||||||
todo: todo,
|
todo: todo,
|
||||||
save: save,
|
save: save,
|
||||||
edit: edit,
|
edit: edit,
|
||||||
|
userEdit,
|
||||||
edit1: edit1,
|
edit1: edit1,
|
||||||
del: del,
|
del: del,
|
||||||
insert:insert,
|
insert:insert,
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ function usePageTable<T>(
|
||||||
setNum(20);
|
setNum(20);
|
||||||
}
|
}
|
||||||
}, [screenHeight]);
|
}, [screenHeight]);
|
||||||
|
|
||||||
// 写在一起避免异步之后多次setState导致多次重绘
|
// 写在一起避免异步之后多次setState导致多次重绘
|
||||||
const [state, setState] = useState<TableState<T>>(() => ({
|
const [state, setState] = useState<TableState<T>>(() => ({
|
||||||
data: [],
|
data: [],
|
||||||
|
|
@ -85,14 +85,14 @@ function usePageTable<T>(
|
||||||
setState(s => ({ ...s, loading: true }));
|
setState(s => ({ ...s, loading: true }));
|
||||||
const pageParams = {
|
const pageParams = {
|
||||||
pageNumber: opt?.pageNumber ?? state.pageNumber,
|
pageNumber: opt?.pageNumber ?? state.pageNumber,
|
||||||
pageSize: opt?.pageSize ?? 10,
|
pageSize: opt?.pageSize ?? state.pageSize,
|
||||||
sortField: opt?.sortField ?? state.sortField,
|
sortField: opt?.sortField ?? state.sortField,
|
||||||
sortOrder: opt?.sortOrder ?? state.sortOrder,
|
sortOrder: opt?.sortOrder ?? state.sortOrder,
|
||||||
search: opt?.search ?? state.search,
|
search: opt?.search ?? state.search,
|
||||||
};
|
};
|
||||||
const { search, ...params } = pageParams;
|
const { search, ...params } = pageParams;
|
||||||
// console.log('search',search);
|
// console.log('search',search);
|
||||||
// console.log('params',params);
|
console.log('pageParams',pageParams);
|
||||||
service({ ...search, ...params }).then((data) => {
|
service({ ...search, ...params }).then((data) => {
|
||||||
if (!abort.current) {
|
if (!abort.current) {
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ function usePageTable<T>(
|
||||||
current: state.pageNumber,
|
current: state.pageNumber,
|
||||||
total: state.total,
|
total: state.total,
|
||||||
pageSizeOptions: ['10', '15', '20', '50', '100'],
|
pageSizeOptions: ['10', '15', '20', '50', '100'],
|
||||||
hideOnSinglePage: true,
|
hideOnSinglePage: false,
|
||||||
position: ['bottomRight'],
|
position: ['bottomRight'],
|
||||||
},
|
},
|
||||||
loading: state.loading,
|
loading: state.loading,
|
||||||
|
|
|
||||||
|
|
@ -192,9 +192,9 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
|
|
||||||
const id = idgen()
|
const id = idgen()
|
||||||
return [
|
return [
|
||||||
{ id: id(), title: '水库一张图', path: '/mgr/home', icon: 'jbqk' },
|
{ id: id(), title: '水库一张图', path: '/mgr/home', icon: 'yzt' },
|
||||||
{
|
{
|
||||||
id: id(), title: '四全', redirect: '/mgr/sq/qfg/zcdjxx', icon: 'fxzb',
|
id: id(), title: '四全', redirect: '/mgr/sq/qfg/zcdjxx', icon: 'sz',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: id(), title: '全覆盖', redirect: '/mgr/sq/qfg/zcdjxx',
|
id: id(), title: '全覆盖', redirect: '/mgr/sq/qfg/zcdjxx',
|
||||||
|
|
@ -216,7 +216,9 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
{ id: id(), title: '水库水情', path: '/mgr/sq/qth/sksq'},
|
{ id: id(), title: '水库水情', path: '/mgr/sq/qth/sksq'},
|
||||||
{ id: id(), title: '河道水情', path: '/mgr/sq/qth/hdsq'},
|
{ id: id(), title: '河道水情', path: '/mgr/sq/qth/hdsq'},
|
||||||
{ id: id(), title: '实时雨情', path: '/mgr/sq/qth/ssyq'},
|
{ id: id(), title: '实时雨情', path: '/mgr/sq/qth/ssyq'},
|
||||||
{ id: id(), title: '大坝安全监测', path: '/mgr/sq/qth/dbaqjc'},
|
{ id: id(), title: '土壤墒情', path: '/mgr/sq/qth/trsq'},
|
||||||
|
{ id: id(), title: '水库溢洪', path: '/mgr/sq/qth/skyh'},
|
||||||
|
// { id: id(), title: '大坝安全监测', path: '/mgr/sq/qth/dbaqjc'},
|
||||||
{ id: id(), title: '视频监控', path: '/mgr/sq/qth/spjk'},
|
{ id: id(), title: '视频监控', path: '/mgr/sq/qth/spjk'},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -230,7 +232,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: id(), title: '四制', redirect: '/mgr/sz/gltx/zzjgck', icon: 'jbqk',
|
id: id(), title: '四制', redirect: '/mgr/sz/gltx/zzjgck', icon: 'sz',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: id(), title: '管理体系', redirect: '/mgr/sz/gltx/zzjgck',
|
id: id(), title: '管理体系', redirect: '/mgr/sz/gltx/zzjgck',
|
||||||
|
|
@ -297,7 +299,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: id(), title: '四预', redirect: '/mgr/sy/fhxzfx', icon: 'fxzb',
|
id: id(), title: '四预', redirect: '/mgr/sy/fhxzfx', icon: 'sz',
|
||||||
children: [
|
children: [
|
||||||
{ id: id(), title: '防洪形势', path: '/mgr/sy/fhxzfx' },
|
{ id: id(), title: '防洪形势', path: '/mgr/sy/fhxzfx' },
|
||||||
{ id: id(), title: '天气预报', path: '/mgr/sy/tqyb' },
|
{ id: id(), title: '天气预报', path: '/mgr/sy/tqyb' },
|
||||||
|
|
@ -324,7 +326,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: id(), title: '四管', redirect: '/mgr/sg/xcxj/xcrw', icon: 'fxzb',
|
id: id(), title: '四管', redirect: '/mgr/sg/xcxj/xcrw', icon: 'sz',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: id(), title: '巡查巡检', redirect: '/mgr/sg/xcxj/xcrw',
|
id: id(), title: '巡查巡检', redirect: '/mgr/sg/xcxj/xcrw',
|
||||||
|
|
@ -348,7 +350,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
{
|
{
|
||||||
id: id(), title: '白蚁防治', redirect: '/mgr/sg/byfz/bypc',
|
id: id(), title: '白蚁防治', redirect: '/mgr/sg/byfz/bypc',
|
||||||
children: [
|
children: [
|
||||||
{ id: id(), title: '白蚁普查', path: '/mgr/sg/byfz/bypc' },
|
{ id: id(), title: '白蚁监测', path: '/mgr/sg/byfz/bypc' },
|
||||||
{ id: id(), title: '防治宣传', path: '/mgr/sg/byfz/byxc' },
|
{ id: id(), title: '防治宣传', path: '/mgr/sg/byfz/byxc' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -358,9 +360,9 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
{
|
{
|
||||||
id: id(), title: '维修养护', path: '/mgr/sg/wxyh',
|
id: id(), title: '维修养护', path: '/mgr/sg/wxyh',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
id: id(), title: '库容管理', path: '/mgr/sg/krgl',
|
// id: id(), title: '库容管理', path: '/mgr/sg/krgl',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
id: id(), title: '值班管理', redirect: '/mgr/sg/zbgl/zbb',
|
id: id(), title: '值班管理', redirect: '/mgr/sg/zbgl/zbb',
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -387,7 +389,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: id(), title: '工程安全监测', redirect: '/mgr/gcaqjc/gcaqyj/bzt', icon: 'fxzb',
|
id: id(), title: '工程安全监测', redirect: '/mgr/gcaqjc/gcaqyj/bzt', icon: 'xtgl',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: id(), title: '布置图', path: '/mgr/gcaqjc/gcaqyj/bzt',
|
id: id(), title: '布置图', path: '/mgr/gcaqjc/gcaqyj/bzt',
|
||||||
|
|
@ -412,14 +414,16 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
{ id: id(), title: '渗压监测', path: '/mgr/gcaqjc/sjtjcx/syjx' },
|
{ id: id(), title: '渗压监测', path: '/mgr/gcaqjc/sjtjcx/syjx' },
|
||||||
{ id: id(), title: '渗流监测 ', path: '/mgr/gcaqjc/sjtjcx/sljx' },
|
{ id: id(), title: '渗流监测 ', path: '/mgr/gcaqjc/sjtjcx/sljx' },
|
||||||
{ id: id(), title: '位移监测 ', path: '/mgr/gcaqjc/sjtjcx/wyjx' },
|
{ id: id(), title: '位移监测 ', path: '/mgr/gcaqjc/sjtjcx/wyjx' },
|
||||||
|
{ id: id(), title: '人工监测数据录入 ', path: '/mgr/gcaqjc/sjtjcx/sjlr' },
|
||||||
{ id: id(), title: '年度渗压统计表', path: '/mgr/gcaqjc/sjtjcx/ndsytjb' },
|
{ id: id(), title: '年度渗压统计表', path: '/mgr/gcaqjc/sjtjcx/ndsytjb' },
|
||||||
{ id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' },
|
{ id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' },
|
||||||
|
{ id: id(), title: '年度位移统计表', path: '/mgr/gcaqjc/sjtjcx/ndwytjb' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: id(), title: '水资源调度', redirect: '/mgr/szydd/gsnlfx', icon: 'fxzb',
|
id: id(), title: '水资源调度', redirect: '/mgr/szydd/gsnlfx', icon: 'aqjc',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: id(), title: '供水能力分析', path: '/mgr/szydd/gsnlfx',
|
id: id(), title: '供水能力分析', path: '/mgr/szydd/gsnlfx',
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { config } from '../config'
|
import { config } from '../config'
|
||||||
import Zfzl from '../views/gxsl/zfzl'
|
|
||||||
|
|
||||||
const pubapi_old = 'https://owrsvr.cloudowr.cn/svr'
|
const pubapi_old = 'https://owrsvr.cloudowr.cn/svr'
|
||||||
const pubapi = 'https://owrsvr.cloudowr.cn/pubapi'
|
const pubapi = 'https://owrsvr.cloudowr.cn/pubapi'
|
||||||
|
|
@ -8,7 +7,11 @@ const service_fxdd = '/gunshiApp/tsg'
|
||||||
const service_xyt = '/gunshiApp/tsg'//登陆先用小玉潭
|
const service_xyt = '/gunshiApp/tsg'//登陆先用小玉潭
|
||||||
const service_shzh = '/shzh'
|
const service_shzh = '/shzh'
|
||||||
const apiurl = {
|
const apiurl = {
|
||||||
|
systemM: {
|
||||||
|
userM: {
|
||||||
|
updatePassword:service_xyt + '/system/user/profile/updatePwd'
|
||||||
|
}
|
||||||
|
},
|
||||||
krline: {
|
krline: {
|
||||||
list: service_fxdd + "/stZvarlB/list",
|
list: service_fxdd + "/stZvarlB/list",
|
||||||
save: service_fxdd + "/stZvarlB/insert",
|
save: service_fxdd + "/stZvarlB/insert",
|
||||||
|
|
@ -93,6 +96,7 @@ const apiurl = {
|
||||||
azd: service_fxdd + '/shpPlacement/getDetailsAndAddvcdDataList',//安置点
|
azd: service_fxdd + '/shpPlacement/getDetailsAndAddvcdDataList',//安置点
|
||||||
getqsydw: service_fxdd + '/iaCBsnssinfo/getDetailsAndAddvcdDataList',//企事业单位list
|
getqsydw: service_fxdd + '/iaCBsnssinfo/getDetailsAndAddvcdDataList',//企事业单位list
|
||||||
getyhjmh: service_fxdd + '/iaCFlrvvlg/getDetailsAndAddvcdDataList',//沿河居民户list
|
getyhjmh: service_fxdd + '/iaCFlrvvlg/getDetailsAndAddvcdDataList',//沿河居民户list
|
||||||
|
turangshangqing: '',
|
||||||
|
|
||||||
|
|
||||||
wxqdetail: service_fxdd + '/iaCDanad/detail',
|
wxqdetail: service_fxdd + '/iaCDanad/detail',
|
||||||
|
|
@ -229,6 +233,21 @@ const apiurl = {
|
||||||
page: service_fxdd + "/osmoticShiftR/year/stat",
|
page: service_fxdd + "/osmoticShiftR/year/stat",
|
||||||
export: service_fxdd + "/osmoticShiftR/year/stat/export",
|
export: service_fxdd + "/osmoticShiftR/year/stat/export",
|
||||||
list1:service_fxdd + "/osmoticShiftR/year/stat/value"
|
list1:service_fxdd + "/osmoticShiftR/year/stat/value"
|
||||||
|
},
|
||||||
|
//人工监测数据录入
|
||||||
|
sjlr:{
|
||||||
|
syjc:{
|
||||||
|
save: service_fxdd + "/osmoticPressR/insert",
|
||||||
|
edit: service_fxdd + "/osmoticPressR/update",
|
||||||
|
page: service_fxdd + "/osmoticPressR/page",
|
||||||
|
del: service_fxdd + "/osmoticPressR/del/",
|
||||||
|
},
|
||||||
|
wyjc:{
|
||||||
|
save: service_fxdd + "/osmoticShiftR/insert",
|
||||||
|
edit: service_fxdd + "/osmoticShiftR/update",
|
||||||
|
page: service_fxdd + "/osmoticShiftR/page",
|
||||||
|
del: service_fxdd + "/osmoticShiftR/del/",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 工程安全分析
|
// 工程安全分析
|
||||||
|
|
@ -288,7 +307,8 @@ const apiurl = {
|
||||||
delete: service_fxdd + "/assessTemplate/del",
|
delete: service_fxdd + "/assessTemplate/del",
|
||||||
choose: service_fxdd + "/assessIndicator/choose",
|
choose: service_fxdd + "/assessIndicator/choose",
|
||||||
info: service_fxdd + "/assessTemplate/queryIndicators",
|
info: service_fxdd + "/assessTemplate/queryIndicators",
|
||||||
detail:service_fxdd + "/assessTemplate/detail"
|
detail: service_fxdd + "/assessTemplate/detail",
|
||||||
|
stop:service_fxdd + "/assessTemplate/startStop"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
btbb: {
|
btbb: {
|
||||||
|
|
@ -337,7 +357,9 @@ const apiurl = {
|
||||||
},
|
},
|
||||||
byfz: {
|
byfz: {
|
||||||
bypc: {
|
bypc: {
|
||||||
page: service_fxdd + "/termite/survey/page",
|
// page: service_fxdd + "/termite/survey/page",
|
||||||
|
page: service_fxdd + "/termite/survey/pageDetail",
|
||||||
|
count:service_fxdd + "/termite/survey/count",
|
||||||
save: service_fxdd + "/termite/survey/insert",
|
save: service_fxdd + "/termite/survey/insert",
|
||||||
edit: service_fxdd + "/termite/survey/update",
|
edit: service_fxdd + "/termite/survey/update",
|
||||||
delete: service_fxdd + "/termite/survey/del",
|
delete: service_fxdd + "/termite/survey/del",
|
||||||
|
|
@ -445,6 +467,10 @@ const apiurl = {
|
||||||
},
|
},
|
||||||
zfzl: {
|
zfzl: {
|
||||||
list: service_fxdd + "/gateValveReal/list",
|
list: service_fxdd + "/gateValveReal/list",
|
||||||
|
historypage: service_fxdd + '/gateValveReal/log/page',
|
||||||
|
historyList: service_fxdd + '/gateValveReal/log/loglist',
|
||||||
|
historyPageExport: service_fxdd + '/gateValveReal/log/exp',
|
||||||
|
swInfo:service_fxdd + '/reservoir/water/waterInfo',
|
||||||
krlist: service_fxdd + "/reservoir/water/data",
|
krlist: service_fxdd + "/reservoir/water/data",
|
||||||
info: service_fxdd + "/attGateValve/detail",
|
info: service_fxdd + "/attGateValve/detail",
|
||||||
kgpage: service_fxdd + "/gateValveR/page",
|
kgpage: service_fxdd + "/gateValveR/page",
|
||||||
|
|
@ -967,6 +993,10 @@ const apiurl = {
|
||||||
update: service_fxdd + "/attResBase/update",
|
update: service_fxdd + "/attResBase/update",
|
||||||
getFile:service_fxdd + "/attResBase/file/get"
|
getFile:service_fxdd + "/attResBase/file/get"
|
||||||
},
|
},
|
||||||
|
buildInfo: {
|
||||||
|
detail: service_fxdd + "/attResBuilding/info",
|
||||||
|
update: service_fxdd + "/attResBuilding/update",
|
||||||
|
},
|
||||||
kr: {
|
kr: {
|
||||||
list: service_fxdd + "/stZvarlB/list",
|
list: service_fxdd + "/stZvarlB/list",
|
||||||
save: service_fxdd + "/stZvarlB/insert",
|
save: service_fxdd + "/stZvarlB/insert",
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ module.exports = function (app) {
|
||||||
target: 'http://local.gunshiiot.com:18083/',//测试
|
target: 'http://local.gunshiiot.com:18083/',//测试
|
||||||
// target: 'http://192.168.66.199:24105/',//正式
|
// target: 'http://192.168.66.199:24105/',//正式
|
||||||
// target: 'http://36.139.207.50:18083/',//移动云
|
// target: 'http://36.139.207.50:18083/',//移动云
|
||||||
|
// target: 'http://192.168.66.49:24105/',//移动云
|
||||||
|
// target: 'http://192.168.66.32:24105/',//ls
|
||||||
|
// target: 'http://192.168.66.32:24105/', //ls
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,19 @@ async function send(url, options) {
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
export function xyt_httpput(url, data = {}) {
|
||||||
|
const options = {
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'adcd': localStorage.getItem('ADCD6'),
|
||||||
|
"authorization":"Bearer" + ' ' + localStorage.getItem('access_token')
|
||||||
|
},
|
||||||
|
body: JSON.stringify(data),
|
||||||
|
};
|
||||||
|
|
||||||
|
return send(url, options);
|
||||||
|
}
|
||||||
export function httpget(url, data = {}) {
|
export function httpget(url, data = {}) {
|
||||||
const params = [];
|
const params = [];
|
||||||
for (const k in data) {
|
for (const k in data) {
|
||||||
|
|
|
||||||
|
|
@ -633,4 +633,73 @@ export const myFiltrate = (data,params)=>{
|
||||||
}else{
|
}else{
|
||||||
return Math.ceil(s)
|
return Math.ceil(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const convertQuarterToDate = (quarterStr) => {
|
||||||
|
if (!quarterStr) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
// 将字符串按"-"分割成数组
|
||||||
|
const [year, quarter] = quarterStr.split("-")
|
||||||
|
|
||||||
|
// 判断季度并计算月份和日期
|
||||||
|
switch (quarter) {
|
||||||
|
case "Q1":
|
||||||
|
return {
|
||||||
|
startDate:`${year}-01-01`,
|
||||||
|
endDate:`${year}-03-31`
|
||||||
|
}
|
||||||
|
case "Q2":
|
||||||
|
return {
|
||||||
|
startDate:`${year}-04-01`,
|
||||||
|
endDate:`${year}-06-30`
|
||||||
|
}
|
||||||
|
case "Q3":
|
||||||
|
return {
|
||||||
|
startDate:`${year}-07-01`,
|
||||||
|
endDate:`${year}-09-30`
|
||||||
|
}
|
||||||
|
case "Q4":
|
||||||
|
return {
|
||||||
|
startDate:`${year}-10-01`,
|
||||||
|
endDate:`${year}-12-31`
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getCurrentQuarter = (data) => {
|
||||||
|
const currentMonth = data ? moment(data).month() : moment().month(); // 获取当前月份,注意月份是从0开始的
|
||||||
|
const currentYear = data ? moment(data).year() : moment().year(); // 获取当前年份
|
||||||
|
if (currentMonth >= 0 && currentMonth <= 2) {
|
||||||
|
return {
|
||||||
|
name: `${currentYear}年第1季度考核`,
|
||||||
|
value: 1
|
||||||
|
};
|
||||||
|
} else if (currentMonth >= 3 && currentMonth <= 5) {
|
||||||
|
return {
|
||||||
|
name: `${currentYear}年第2季度考核`,
|
||||||
|
value: 2
|
||||||
|
};
|
||||||
|
} else if (currentMonth >= 6 && currentMonth <= 8) {
|
||||||
|
return {
|
||||||
|
name: `${currentYear}年第3季度考核`,
|
||||||
|
value: 3
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
name: `${currentYear}年第4季度考核`,
|
||||||
|
value: 4
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const getQuarterStartEndDates = (quarter, year) => {
|
||||||
|
const quarterStartMonth = (quarter - 1) * 3; // 计算季度起始月份
|
||||||
|
const quarterStartDate = moment({ year, month: quarterStartMonth }).startOf('month');
|
||||||
|
const quarterEndDate = quarterStartDate.clone().endOf('quarter');
|
||||||
|
|
||||||
|
return { startDate: quarterStartDate.format('YYYY-MM-DD'), endDate: quarterEndDate.format('YYYY-MM-DD') };
|
||||||
|
};
|
||||||
|
|
@ -25,13 +25,14 @@ import Csgl from './fxzb/csgl'
|
||||||
import Qxdw_Gc from './fxzb/qxdw/gc/index.js'
|
import Qxdw_Gc from './fxzb/qxdw/gc/index.js'
|
||||||
import Qxwl_Gc from './fxzb/qxwl/gc'
|
import Qxwl_Gc from './fxzb/qxwl/gc'
|
||||||
// 工程安全监测
|
// 工程安全监测
|
||||||
import Bzt from './gcaqjc/bzt'
|
import Bzt from './gcaqjc/bzt2'
|
||||||
import Yhyj from "./gcaqjc/gcaqyj/yhyj"
|
import Yhyj from "./gcaqjc/gcaqyj/yhyj"
|
||||||
import Yjgzpz from "./gcaqjc/gcaqyj/yjgzpz"
|
import Yjgzpz from "./gcaqjc/gcaqyj/yjgzpz"
|
||||||
import Sljc from "./gcaqjc/sjtjcx/sljc"
|
import Sljc from "./gcaqjc/sjtjcx/sljc"
|
||||||
import Syjc from "./gcaqjc/sjtjcx/syjc"
|
import Syjc from "./gcaqjc/sjtjcx/syjc"
|
||||||
import Wyjc from "./gcaqjc/sjtjcx/wyjc"
|
import Wyjc from "./gcaqjc/sjtjcx/wyjc"
|
||||||
import Czcx from "./gcaqjc/sjtjcx/czcx"
|
import Czcx from "./gcaqjc/sjtjcx/czcx"
|
||||||
|
import Sjlr from "./gcaqjc/sjtjcx/sjlr"
|
||||||
import Ndsytjb from "./gcaqjc/sjtjcx/ndsytjb"
|
import Ndsytjb from "./gcaqjc/sjtjcx/ndsytjb"
|
||||||
import Ndsltjb from "./gcaqjc/sjtjcx/ndsltjb"
|
import Ndsltjb from "./gcaqjc/sjtjcx/ndsltjb"
|
||||||
import Ndwytjb from "./gcaqjc/sjtjcx/ndwytjb"
|
import Ndwytjb from "./gcaqjc/sjtjcx/ndwytjb"
|
||||||
|
|
@ -92,6 +93,8 @@ import Gcdsj from './sq/qzq/gcdsj'
|
||||||
import Sksq from './sq/qth/sksq'
|
import Sksq from './sq/qth/sksq'
|
||||||
import Hdsq from './sq/qth/hdsq'
|
import Hdsq from './sq/qth/hdsq'
|
||||||
import Ssyq from './sq/qth/ssyq'
|
import Ssyq from './sq/qth/ssyq'
|
||||||
|
import Trsq from './sq/qth/trsq'
|
||||||
|
import Skyh from './sq/qth/skyh'
|
||||||
import Qzqda from './sq/qzq/qzqda'
|
import Qzqda from './sq/qzq/qzqda'
|
||||||
// import Zcdjxx from './sq/qys/'
|
// import Zcdjxx from './sq/qys/'
|
||||||
// import Zcdjxx from './sq/qfg/zcdjxx'
|
// import Zcdjxx from './sq/qfg/zcdjxx'
|
||||||
|
|
@ -171,6 +174,8 @@ const AppRouters: React.FC = () => {
|
||||||
{ path: 'sq/qth/sksq', element: <Sksq /> },
|
{ path: 'sq/qth/sksq', element: <Sksq /> },
|
||||||
{ path: 'sq/qth/hdsq', element: <Hdsq /> },
|
{ path: 'sq/qth/hdsq', element: <Hdsq /> },
|
||||||
{ path: 'sq/qth/ssyq', element: <Ssyq /> },
|
{ path: 'sq/qth/ssyq', element: <Ssyq /> },
|
||||||
|
{ path: 'sq/qth/trsq', element: <Trsq /> },
|
||||||
|
{ path: 'sq/qth/skyh', element: <Skyh /> },
|
||||||
|
|
||||||
// 预警
|
// 预警
|
||||||
{ path: 'gcaqjc/gcaqyj/bzt', element: <Bzt isHome={false}/> },
|
{ path: 'gcaqjc/gcaqyj/bzt', element: <Bzt isHome={false}/> },
|
||||||
|
|
@ -182,6 +187,7 @@ const AppRouters: React.FC = () => {
|
||||||
{ path: 'gcaqjc/sjtjcx/sljx', element: <Sljc /> },
|
{ path: 'gcaqjc/sjtjcx/sljx', element: <Sljc /> },
|
||||||
{ path: 'gcaqjc/sjtjcx/wyjx', element: <Wyjc /> },
|
{ path: 'gcaqjc/sjtjcx/wyjx', element: <Wyjc /> },
|
||||||
{ path: 'gcaqjc/sjtjcx/czcx', element: <Czcx /> },
|
{ path: 'gcaqjc/sjtjcx/czcx', element: <Czcx /> },
|
||||||
|
{ path: 'gcaqjc/sjtjcx/sjlr', element: <Sjlr /> },
|
||||||
{ path: 'gcaqjc/sjtjcx/ndsytjb', element: <Ndsytjb /> },
|
{ path: 'gcaqjc/sjtjcx/ndsytjb', element: <Ndsytjb /> },
|
||||||
{ path: 'gcaqjc/sjtjcx/ndsltjb', element: <Ndsltjb /> },
|
{ path: 'gcaqjc/sjtjcx/ndsltjb', element: <Ndsltjb /> },
|
||||||
{ path: 'gcaqjc/sjtjcx/ndwytjb', element: <Ndwytjb /> },
|
{ path: 'gcaqjc/sjtjcx/ndwytjb', element: <Ndwytjb /> },
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ export default class PicStLayer extends BaseLayer {
|
||||||
|
|
||||||
onAdd() {
|
onAdd() {
|
||||||
PicStMapDataPromise().then((data) => {
|
PicStMapDataPromise().then((data) => {
|
||||||
|
|
||||||
this._dispatch.runtime.setMarkers({
|
this._dispatch.runtime.setMarkers({
|
||||||
[this.getLayerName()]: data || []
|
[this.getLayerName()]: data || []
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,75 @@ import { SkRealPromiseWX } from "../../../../models/_/real";
|
||||||
import BaseLayer from "../baselayer";
|
import BaseLayer from "../baselayer";
|
||||||
import ShuikuMarker from "./ShuikuMarker";
|
import ShuikuMarker from "./ShuikuMarker";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const sj = {
|
||||||
|
"stcd": "61610701",
|
||||||
|
"stnm": "檀树岗2",
|
||||||
|
"rvnm": "檀树岗河",
|
||||||
|
"hnnm": "长江中游下段北岸",
|
||||||
|
"bsnm": "长江",
|
||||||
|
"lgtd": "114.744317000",
|
||||||
|
"lttd": "31.505000000",
|
||||||
|
"stlc": "黄冈市红安县七里镇檀树岗村",
|
||||||
|
"alt": null,
|
||||||
|
"mdbz": null,
|
||||||
|
"mdpr": null,
|
||||||
|
"dtmnm": "吴淞",
|
||||||
|
"dtmel": null,
|
||||||
|
"dtpr": "0.000",
|
||||||
|
"sttp": "RR",
|
||||||
|
"dfrtms": null,
|
||||||
|
"fritm": null,
|
||||||
|
"frgrd": "3",
|
||||||
|
"esstym": "197103",
|
||||||
|
"bgfrym": "197103",
|
||||||
|
"edfrym": null,
|
||||||
|
"atcunit": "黄冈市水利和湖泊局",
|
||||||
|
"admauth": "黄冈水文",
|
||||||
|
"locality": "湖北水文",
|
||||||
|
"stbk": null,
|
||||||
|
"stazt": null,
|
||||||
|
"dstrvm": null,
|
||||||
|
"drna": "78",
|
||||||
|
"phcd": "TSG",
|
||||||
|
"usfl": "1",
|
||||||
|
"comments": "中小河流改造",
|
||||||
|
"moditime": "2022-02-23 00:00:00",
|
||||||
|
"remGd": null,
|
||||||
|
"ogid": null,
|
||||||
|
"vlfl": null,
|
||||||
|
"atid": null,
|
||||||
|
"sdfl": null,
|
||||||
|
"rma": null,
|
||||||
|
"mdps": null,
|
||||||
|
"mddt": null,
|
||||||
|
"stindex": null,
|
||||||
|
"starea": null,
|
||||||
|
"stlevel": null,
|
||||||
|
"code": null,
|
||||||
|
"ispbj": null,
|
||||||
|
"issxst": null,
|
||||||
|
"stpq": null,
|
||||||
|
"sthday": null,
|
||||||
|
"source": "SW",
|
||||||
|
"importancy": 0,
|
||||||
|
"clgtd": "114.744317000",
|
||||||
|
"clttd": "31.505000000",
|
||||||
|
"elev": null,
|
||||||
|
"crucial": 0,
|
||||||
|
"buildYear": null,
|
||||||
|
"adcd": null,
|
||||||
|
"lyid": null,
|
||||||
|
"resCode": "42120250085",
|
||||||
|
"rvCode": null,
|
||||||
|
"status": 1,
|
||||||
|
"agreement": null,
|
||||||
|
"simCard": null,
|
||||||
|
"bdCard": null,
|
||||||
|
"v": 104.1
|
||||||
|
}
|
||||||
|
|
||||||
export default class ShuiKuLayer extends BaseLayer {
|
export default class ShuiKuLayer extends BaseLayer {
|
||||||
static LayerName = 'ShuiKuLayer';
|
static LayerName = 'ShuiKuLayer';
|
||||||
|
|
||||||
|
|
@ -25,7 +94,7 @@ export default class ShuiKuLayer extends BaseLayer {
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
const list = data.map((i)=>{
|
const list = [...data,sj].map((i)=>{
|
||||||
return {
|
return {
|
||||||
id : i.stcd,
|
id : i.stcd,
|
||||||
name: i.stnm,
|
name: i.stnm,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
// import clone from "clone";
|
||||||
|
import { PicStMapDataPromise } from "../../../../models/_/real";
|
||||||
|
import apiurl from "../../../../service/apiurl";
|
||||||
|
import { httppost2 } from "../../../../utils/request";
|
||||||
|
import BaseLayer from "../baselayer";
|
||||||
|
import TuRangMarker from "./TuRangMarker";
|
||||||
|
|
||||||
|
export default class TuRangLayer extends BaseLayer {
|
||||||
|
static LayerName = 'TuRangLayer';
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.highlights = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
getLayerName() {
|
||||||
|
return TuRangLayer.LayerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
async onAdd() {
|
||||||
|
// const res = await httppost2(apiurl.home.turangshangqing)
|
||||||
|
const list = [
|
||||||
|
{
|
||||||
|
id:'1',
|
||||||
|
stcd: '10001',
|
||||||
|
stnm: '水田站',
|
||||||
|
wd: '53',
|
||||||
|
tm: '2025-03-19 15:00:00',
|
||||||
|
lgtd: "114.7684000",
|
||||||
|
lttd: "31.4941000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:'2',
|
||||||
|
stcd: '10002',
|
||||||
|
stnm: '旱田站',
|
||||||
|
wd: '21',
|
||||||
|
tm: '2025-03-19 15:00:00',
|
||||||
|
lgtd: "114.7984000",
|
||||||
|
lttd: "31.4941000"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
this._dispatch.runtime.setMarkers({
|
||||||
|
[this.getLayerName()]: list || []
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
setSetting(setting) {
|
||||||
|
const highlights = setting?.highlight?.TuRangLayer;
|
||||||
|
if (highlights !== this._setting?.highlight?.TuRangLayer) {
|
||||||
|
const setting = {};
|
||||||
|
if (highlights) {
|
||||||
|
for (const h of highlights) {
|
||||||
|
setting[h] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._dispatch.map.setMarkerSetting({
|
||||||
|
[this.getLayerName()]: setting,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this._setting = setting;
|
||||||
|
}
|
||||||
|
|
||||||
|
getComponentCls() {
|
||||||
|
return TuRangMarker;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -13,11 +13,11 @@ const Tabledata = ({tableData}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Table rowKey="adcd"
|
<Table rowKey="adcd"
|
||||||
sticky
|
sticky
|
||||||
columns={columns}
|
columns={columns}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
dataSource={tableData}
|
dataSource={tableData}
|
||||||
scroll={{ y: "420px"}}
|
scroll={{ y: "420px"}}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@ const ToolBar = ({search, defaultParams}) => {
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" htmlType="submit">查询</Button>
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
{/* <Form.Item>
|
||||||
<Button htmlType="submit">导出</Button>
|
<Button htmlType="submit">导出</Button>
|
||||||
</Form.Item>
|
</Form.Item> */}
|
||||||
</Form>
|
</Form>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -88,12 +88,17 @@ function ShuikuPop({ id, data, dispatch }) {
|
||||||
<Tabs.TabPane tab="数据查询" key="2">
|
<Tabs.TabPane tab="数据查询" key="2">
|
||||||
<Sksjcx record={data}/>
|
<Sksjcx record={data}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane tab="图像监测" key="3">
|
{
|
||||||
<Txjc record={data}/>
|
data.id!=="61610701"?
|
||||||
</Tabs.TabPane>
|
<>
|
||||||
<Tabs.TabPane tab="视频监测" key="4">
|
<Tabs.TabPane tab="图像监测" key="3">
|
||||||
<Spjc record={data}/>
|
<Txjc record={data}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane tab="视频监测" key="4">
|
||||||
|
<Spjc record={data}/>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
</>:null
|
||||||
|
}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
import {Table} from 'antd';
|
||||||
|
import React, {useEffect, useState} from 'react';
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
|
||||||
|
const Tabledata = ({tableData}) => {
|
||||||
|
const columns = [
|
||||||
|
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1},
|
||||||
|
{ title: '数据时间', key: 'tm', dataIndex: 'tm', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
|
||||||
|
{ title: '温度', key: '', dataIndex: '', align: 'center',render: (rec) => <span>{rec ?? "-"}</span> },
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Table rowKey="adcd"
|
||||||
|
sticky
|
||||||
|
columns={columns}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={tableData}
|
||||||
|
scroll={{ y: "420px"}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Tabledata
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
export default function drpOption(data,yjData) {
|
||||||
|
console.log("data",data);
|
||||||
|
// const maxVal = 0//Math.max(...data.map(obj => obj.drp))
|
||||||
|
// const max1 = Math.max(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)])
|
||||||
|
// const min1 = Math.min(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)])
|
||||||
|
// const max2 = Math.max(...data.map(obj => obj.rz))
|
||||||
|
// const min2 = Math.min(...data.map(obj => obj.rz))
|
||||||
|
// const yj = yjData?.map((item,index)=>{
|
||||||
|
// return {
|
||||||
|
// yAxisIndex: 0,
|
||||||
|
// name: item.yjName,
|
||||||
|
// type: 'line',
|
||||||
|
// color: item.color,
|
||||||
|
// lineStyle: {
|
||||||
|
// type: "dashed",
|
||||||
|
// width: 1,
|
||||||
|
// },
|
||||||
|
// data: data.map(o => item.value),
|
||||||
|
// symbol: 'none', // 设置标记点为'none',即去掉圆点
|
||||||
|
// smooth: 0.5
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
return {
|
||||||
|
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
|
||||||
|
},
|
||||||
|
grid: [
|
||||||
|
{
|
||||||
|
top: "12%",
|
||||||
|
left: "10%",
|
||||||
|
right: "8%",
|
||||||
|
width: '80%',
|
||||||
|
height: '75%'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
legend: {
|
||||||
|
top:'3%',
|
||||||
|
// 显示图例
|
||||||
|
show: true,
|
||||||
|
// 图例的位置
|
||||||
|
data: ["流量"],
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: data.map(o => o.tm),
|
||||||
|
inverse: false,
|
||||||
|
splitLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
padding: [0, 0, 100, 0],
|
||||||
|
color: '#333',
|
||||||
|
fontSize: 12,
|
||||||
|
formatter: val => val.slice(0,10)
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#d9d9d9',
|
||||||
|
width: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
// gridIndex: 1,
|
||||||
|
type: 'value',
|
||||||
|
position: 'left',
|
||||||
|
name: "流量(L/s)",
|
||||||
|
nameTextStyle: {
|
||||||
|
padding: [0, 0, 10, 10],
|
||||||
|
color:'#333333',
|
||||||
|
fontSize: 14
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#bfbfbf',
|
||||||
|
width: 0.5,
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#333',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false
|
||||||
|
// lineStyle: {
|
||||||
|
// color: '#8c8c8c',
|
||||||
|
// width: 1,
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
// min: Math.floor(min1*0.8),
|
||||||
|
// max: Math.ceil(max1*1.2),
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// // gridIndex: 1,
|
||||||
|
// type: 'value',
|
||||||
|
// position: 'right',
|
||||||
|
// name: "库水位(m)",
|
||||||
|
// nameTextStyle: {
|
||||||
|
// padding: [0, 0, 10, 10],
|
||||||
|
// color:'#333333',
|
||||||
|
// fontSize: 14
|
||||||
|
// },
|
||||||
|
// splitLine: {
|
||||||
|
// show: false,
|
||||||
|
// lineStyle: {
|
||||||
|
// color: '#07a6ff',
|
||||||
|
// width: 0.25,
|
||||||
|
// type: 'dotted'
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// axisLabel: {
|
||||||
|
// color: '#333',
|
||||||
|
// fontSize: 12,
|
||||||
|
// },
|
||||||
|
// axisLine: {
|
||||||
|
// show: false
|
||||||
|
// // lineStyle: {
|
||||||
|
// // color: '#8c8c8c',
|
||||||
|
// // width: 1,
|
||||||
|
// // }
|
||||||
|
// },
|
||||||
|
// axisTick: {
|
||||||
|
// show: false,
|
||||||
|
// },
|
||||||
|
// min: Math.floor(min2*0.8),
|
||||||
|
// max: Math.ceil(max2*1.2),
|
||||||
|
// }
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
// xAxisIndex: 1,
|
||||||
|
// yAxisIndex: 0,
|
||||||
|
name: '流量',
|
||||||
|
type: 'line',
|
||||||
|
color: "#d6eaec",
|
||||||
|
lineStyle: {
|
||||||
|
// type: "dashed"
|
||||||
|
},
|
||||||
|
data: data.map(o => o.value),
|
||||||
|
symbol: 'none', // 设置标记点为'none',即去掉圆点
|
||||||
|
smooth: 0.5
|
||||||
|
},
|
||||||
|
// ...yj
|
||||||
|
// {
|
||||||
|
// // xAxisIndex: 1,
|
||||||
|
// yAxisIndex: 1,
|
||||||
|
// name: '库水位',
|
||||||
|
// type: 'line',
|
||||||
|
// color: "#60a0f8",
|
||||||
|
// lineStyle: {
|
||||||
|
// // type: "dashed"
|
||||||
|
// },
|
||||||
|
// data: data.map(o => o.rz),
|
||||||
|
// symbol: 'none', // 设置标记点为'none',即去掉圆点
|
||||||
|
// smooth: 0.5
|
||||||
|
// },
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
import React, { useEffect, useState, useMemo } from 'react';
|
||||||
|
import { Descriptions, Form, Button, Input, DatePicker } from 'antd';
|
||||||
|
import {CloseOutlined} from '@ant-design/icons';
|
||||||
|
import ReactEcharts from 'echarts-for-react';
|
||||||
|
import { httppost2 } from '../../../../../utils/request';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
import moment from "moment"
|
||||||
|
import ToolBar from './toolbar';
|
||||||
|
import TableData from './TableData'
|
||||||
|
import drpOption from './drpOption';
|
||||||
|
|
||||||
|
function ShenLiu({ id, data, dispatch, onCancel }) {
|
||||||
|
console.log(data);
|
||||||
|
const [ tableData, setTableData ] = useState([])
|
||||||
|
const option = useMemo(() => drpOption(tableData), [tableData])
|
||||||
|
const width = 780;
|
||||||
|
|
||||||
|
const closePop = () => {
|
||||||
|
if(onCancel){
|
||||||
|
onCancel()
|
||||||
|
}
|
||||||
|
dispatch.runtime.closeFeaturePop(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const getData = async(tms,stcd)=>{
|
||||||
|
// const params = {
|
||||||
|
// type: 2,
|
||||||
|
// dateTimeRangeSo: {
|
||||||
|
// start: moment(tms[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
// end: moment(tms[1]).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
// },
|
||||||
|
// stcd
|
||||||
|
// }
|
||||||
|
// const { code, data} = await httppost2(apiurl.home.syslList,params)
|
||||||
|
// if(code!==200){
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
setTableData([])
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
getData([moment().add(-1,'months'),moment()],data.stcd)
|
||||||
|
},[])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="normalModalStyle homeModal1">
|
||||||
|
<div className="normalModalStyle_title">
|
||||||
|
<div className="normalModalStyle_title_icon"></div>
|
||||||
|
{data.stnm}
|
||||||
|
<div className="normalModalStyle_title_cancel">
|
||||||
|
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{padding:'0 20px'}}>
|
||||||
|
<ToolBar search={(tms)=>getData(tms,data.stationCode)}/>
|
||||||
|
</div>
|
||||||
|
<div className='homeModal1_content'>
|
||||||
|
<div className='homeModal1_content_lf'>
|
||||||
|
<TableData tableData={tableData}/>
|
||||||
|
</div>
|
||||||
|
<div className='homeModal1_content_rf'>
|
||||||
|
{
|
||||||
|
tableData.length>0?
|
||||||
|
<ReactEcharts option={option} style={{width: "100%", height: '100%'}}/>
|
||||||
|
:<div style={{textAlign: "center", margin: "10%"}}><img src={`${process.env.PUBLIC_URL}/assets/noData.png`} alt=""/></div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default React.memo(ShenLiu);
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import { Form, message, Button, DatePicker } from 'antd';
|
||||||
|
import NormalSelect from '../../../../../components/Form/NormalSelect'
|
||||||
|
import moment from "moment"
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
|
const cysd = [
|
||||||
|
{ label:'今日',value:'今日',tms:[moment().format('YYYY-MM-DD 00:00:00'),moment().format('YYYY-MM-DD HH:mm:ss')]},
|
||||||
|
{ label:'近一周',value:'近一周',tms:[moment().add(-7,'days').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]},
|
||||||
|
{ label:'近一月',value:'近一月',tms:[moment().add(-1,'months').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]},
|
||||||
|
{ label:'近三月',value:'近三月',tms:[moment().add(-3,'months').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]},
|
||||||
|
{ label:'近一年',value:'近一年',tms:[moment().add(-1,'years').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]},
|
||||||
|
]
|
||||||
|
|
||||||
|
const ToolBar = ({search, defaultParams}) => {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
const onFinish = (val)=>{
|
||||||
|
search(val.tms)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||||
|
<Form.Item label="时间段" name="tms">
|
||||||
|
<RangePicker
|
||||||
|
allowClear={false}
|
||||||
|
defaultValue={[moment().add(-1,'months'),moment()]}
|
||||||
|
onChange={(e)=>{
|
||||||
|
form.setFieldValue('cysd',null)
|
||||||
|
}}
|
||||||
|
style={{ width: "380px" }}
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="常用时段"
|
||||||
|
name='cysd'
|
||||||
|
>
|
||||||
|
<NormalSelect options={cysd} style={{ width: '180px' }} onChange={(e,data)=>{
|
||||||
|
if(e==='今天08:00~当前时间'&& moment().format('HH')<8){
|
||||||
|
return message.error('请在08:00后选择')
|
||||||
|
}
|
||||||
|
form.setFieldValue('tms',[moment(data.tms[0]),moment(data.tms[1])])
|
||||||
|
}}/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item>
|
||||||
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
|
</Form.Item>
|
||||||
|
{/* <Form.Item>
|
||||||
|
<Button htmlType="submit">导出</Button>
|
||||||
|
</Form.Item> */}
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ToolBar;
|
||||||
|
|
@ -41,6 +41,7 @@ import ShenLiu from './ShenLiu/index.js';
|
||||||
import WeiYi from './WeiYi/index.js';
|
import WeiYi from './WeiYi/index.js';
|
||||||
import XunJian from './XunJian.js'
|
import XunJian from './XunJian.js'
|
||||||
import DaiChuLi from './DaiChuLi.js'
|
import DaiChuLi from './DaiChuLi.js'
|
||||||
|
import TuRang from './TuRang'
|
||||||
|
|
||||||
|
|
||||||
import YinShuiGongCheng from './YinShuiGongCheng';//这个先不搞
|
import YinShuiGongCheng from './YinShuiGongCheng';//这个先不搞
|
||||||
|
|
@ -88,6 +89,12 @@ function FeaturePops({ mapobj }) {
|
||||||
<PciStPop id={id} data={data} dispatch={dispatch} record={data}/>
|
<PciStPop id={id} data={data} dispatch={dispatch} record={data}/>
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
|
}else if (type === 'turangshangqing') {
|
||||||
|
return (
|
||||||
|
<Modal width={1050} bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={true} onCancel={()=>dispatch.runtime.closeFeaturePop(id)} destroyOnClose={true}>
|
||||||
|
<TuRang id={id} data={data} dispatch={dispatch} record={data}/>
|
||||||
|
</Modal>
|
||||||
|
)
|
||||||
}else if (type === 'hdsw') {
|
}else if (type === 'hdsw') {
|
||||||
// Comp = HdswPop;
|
// Comp = HdswPop;
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ function DrpSearch({record}) {
|
||||||
} else {
|
} else {
|
||||||
setParams({
|
setParams({
|
||||||
...params,
|
...params,
|
||||||
stm: e[0].format("YYYY-MM-DD HH:mm"),
|
startTime: e[0].format("YYYY-MM-DD HH:mm"),
|
||||||
etm: e[1].format("YYYY-MM-DD HH:mm"),
|
endTime: e[1].format("YYYY-MM-DD HH:mm"),
|
||||||
tm:e,
|
tm:e,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import './index.less'
|
||||||
import MyImg from './myImg.js'
|
import MyImg from './myImg.js'
|
||||||
import { httpget,httppost } from '../../../../../utils/request';
|
import { httpget,httppost } from '../../../../../utils/request';
|
||||||
import apiurl from '../../../../../service/apiurl';
|
import apiurl from '../../../../../service/apiurl';
|
||||||
import { Image } from 'antd';
|
import { Image,Divider } from 'antd';
|
||||||
|
|
||||||
function Skssjc({data}) {
|
function Skssjc({data}) {
|
||||||
|
|
||||||
|
|
@ -45,28 +45,35 @@ function Skssjc({data}) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="infoItem">
|
<div className="infoItem">
|
||||||
<div className="row-key">设计洪水位:</div>
|
<div className="row-key">校验洪水位:</div>
|
||||||
<div className="row-value">{data.desFloodLev ? data.desFloodLev.toFixed(2):'-'}</div>
|
<div className="row-value">{data?.calFloodLev ? data?.calFloodLev.toFixed(2) : '-'}</div>
|
||||||
<div className="row-unit">m</div>
|
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
|
||||||
</div>
|
<div className="row-value" style={{width:"20%"}}>{(data.calFloodLev && data?.rz) ? (data?.rz - data.calFloodLev).toFixed(2):'-'}</div>
|
||||||
|
<div className="row-unit">m</div>
|
||||||
|
</div>
|
||||||
|
<div className="infoItem">
|
||||||
|
<div className="row-key">设计洪水位:</div>
|
||||||
|
<div className="row-value">{data?.desFloodLev ? data?.desFloodLev.toFixed(2):'-'}</div>
|
||||||
|
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
|
||||||
|
<div className="row-value" style={{width:"20%"}}>{(data.desFloodLev && data?.rz) ? (data?.rz - data.desFloodLev).toFixed(2):'-'}</div>
|
||||||
|
<div className="row-unit">m</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="infoItem">
|
<div className="infoItem">
|
||||||
<div className="row-key">正常蓄水位:</div>
|
<div className="row-key">汛限水位:</div>
|
||||||
<div className="row-value">{data.normWatLev ? data.normWatLev.toFixed(2):'-'}</div>
|
<div className="row-value">{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}</div>
|
||||||
<div className="row-unit">m</div>
|
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
|
||||||
</div>
|
<div className="row-value" style={{width:"20%"}}>{(data.flLowLimLev && data?.rz) ? (data?.rz - data.flLowLimLev).toFixed(2):'-'}</div>
|
||||||
|
<div className="row-unit">m</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="infoItem">
|
<div className="infoItem">
|
||||||
<div className="row-key">汛限水位:</div>
|
<div className="row-key">死水位:</div>
|
||||||
<div className="row-value">{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}</div>
|
<div className="row-value">{data.deadLev ? data.deadLev.toFixed(2):'-'}</div>
|
||||||
<div className="row-unit">m</div>
|
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
|
||||||
</div>
|
<div className="row-value" style={{width:"20%"}}>{(data.deadLev && data?.rz) ? (data?.rz - data.deadLev).toFixed(2):'-'}</div>
|
||||||
|
<div className="row-unit">m</div>
|
||||||
<div className="infoItem">
|
</div>
|
||||||
<div className="row-key">死水位:</div>
|
|
||||||
<div className="row-value">{data.deadLev ? data.deadLev.toFixed(2):'-'}</div>
|
|
||||||
<div className="row-unit">m</div>
|
|
||||||
</div>
|
|
||||||
<div className="infoItem">
|
<div className="infoItem">
|
||||||
<div className="row-key">坝顶高程:</div>
|
<div className="row-key">坝顶高程:</div>
|
||||||
<div className="row-value">{data.crestElev}</div>
|
<div className="row-value">{data.crestElev}</div>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
export default function drpOption({ data, wrz, grz }) {
|
export default function drpOption({ data, wrz, grz }) {
|
||||||
console.log("data",wrz, grz);
|
console.log("data",wrz, grz);
|
||||||
const maxVal = Math.max(...data.map(obj => obj.drp))
|
const maxVal = Math.max(...data.map(obj => obj.drp))
|
||||||
const maxSw = Math.max(...data.map(obj => obj.z))
|
const maxSw = Math.ceil(Math.max(...data.map(obj => obj.z)))
|
||||||
const minSw = Math.min(...data.map(obj => obj.z))
|
const minSw = Math.floor(Math.min(...data.map(obj => obj.z)))
|
||||||
const maxLl = Math.max(...data.map(obj => obj.tq))
|
const maxLl = Math.max(...data.map(obj => obj.tq))
|
||||||
const minLl = Math.min(...data.map(obj => obj.tq))
|
const minLl = Math.min(...data.map(obj => obj.tq))
|
||||||
return {
|
return {
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
||||||
|
|
@ -31,7 +30,7 @@ export default function drpOption({ data, wrz, grz }) {
|
||||||
// 显示图例
|
// 显示图例
|
||||||
show: true,
|
show: true,
|
||||||
// 图例的位置
|
// 图例的位置
|
||||||
data: ['警戒水位', '危险水位', "降雨量", "水位", "转换流量"],
|
data: ['警戒水位', '保证水位', "降雨量", "水位", "转换流量"],
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
|
|
@ -166,7 +165,7 @@ export default function drpOption({ data, wrz, grz }) {
|
||||||
{
|
{
|
||||||
xAxisIndex: 1,
|
xAxisIndex: 1,
|
||||||
yAxisIndex: 1,
|
yAxisIndex: 1,
|
||||||
name: '危险水位',
|
name: '保证水位',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
color: "#D9001B",
|
color: "#D9001B",
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import AdcdLayer from "./Markers/AdcdLayer";
|
||||||
import AdcdAllLayer from "./Markers/AdcdAllLayer";
|
import AdcdAllLayer from "./Markers/AdcdAllLayer";
|
||||||
import FzdxLayer from "./Markers/FzdxLayer";
|
import FzdxLayer from "./Markers/FzdxLayer";
|
||||||
import PicStLayer from "./Markers/PicStLayer";
|
import PicStLayer from "./Markers/PicStLayer";
|
||||||
|
import TuRangLayer from "./Markers/TuRangLayer"
|
||||||
import HdswLayer from "./Markers/HdswLayer";
|
import HdswLayer from "./Markers/HdswLayer";
|
||||||
import XjHdswLayer from "./Markers/XjHdswLayer";
|
import XjHdswLayer from "./Markers/XjHdswLayer";
|
||||||
import XxjyswzLayer from "./Markers/XxjyswzLayer";
|
import XxjyswzLayer from "./Markers/XxjyswzLayer";
|
||||||
|
|
@ -90,6 +91,7 @@ export default class LayerMgr {
|
||||||
HeLiuZhuJiLayer,
|
HeLiuZhuJiLayer,
|
||||||
// FzdxLayer,
|
// FzdxLayer,
|
||||||
PicStLayer,
|
PicStLayer,
|
||||||
|
TuRangLayer,
|
||||||
// XjHdswLayer,
|
// XjHdswLayer,
|
||||||
// SmallSkRiskLayer, RhbjqLayer, XjRealDrpLayer, WarnLayer, ForecastLayer, RadarLayer, XxjyswzLayer
|
// SmallSkRiskLayer, RhbjqLayer, XjRealDrpLayer, WarnLayer, ForecastLayer, RadarLayer, XxjyswzLayer
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export default function TuLi() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='homePage_tuli'>
|
<div className='homePage_tuli'>
|
||||||
<div className='homePage_tuli_title'>雨量</div>
|
<div className='homePage_tuli_title'>图例</div>
|
||||||
<div className='homePage_tuli_row'>
|
<div className='homePage_tuli_row'>
|
||||||
<div className='homePage_tuli_row_text1' style={{width:'40%',marginTop:'-2px'}}>
|
<div className='homePage_tuli_row_text1' style={{width:'40%',marginTop:'-2px'}}>
|
||||||
<img width={20} height={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/dm.png`} alt="" />
|
<img width={20} height={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/dm.png`} alt="" />
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import './index.less'
|
||||||
import Yujing from './item_yujing/index.js'
|
import Yujing from './item_yujing/index.js'
|
||||||
import Yuqing from './item_yuqing'
|
import Yuqing from './item_yuqing'
|
||||||
import ShuiKu from './item_shuiku'
|
import ShuiKu from './item_shuiku'
|
||||||
|
import TuRangShangQing from './item_turangshangqing'
|
||||||
import GongShui from './item_gongshui'
|
import GongShui from './item_gongshui'
|
||||||
import GongCheng from './item_gongcheng'
|
import GongCheng from './item_gongcheng'
|
||||||
import JianCe from './item_jiance'
|
import JianCe from './item_jiance'
|
||||||
|
|
@ -22,7 +23,7 @@ import AnZhiDian from './item_anzhidian'
|
||||||
import QSYDW from './item_qishiyedanwei'
|
import QSYDW from './item_qishiyedanwei'
|
||||||
import YHJMH from './item_yanhejuminhu'
|
import YHJMH from './item_yanhejuminhu'
|
||||||
import SetWxqStation from '../setMapStation/wxq'
|
import SetWxqStation from '../setMapStation/wxq'
|
||||||
import Bzt from '../../gcaqjc/bzt'
|
import Bzt from '../../gcaqjc/bzt2'
|
||||||
|
|
||||||
import Tuli from '../TuLi/Tuli.js'
|
import Tuli from '../TuLi/Tuli.js'
|
||||||
import Tuli2 from '../TuLi/Tuli2.js';
|
import Tuli2 from '../TuLi/Tuli2.js';
|
||||||
|
|
@ -41,17 +42,13 @@ const items = [
|
||||||
{ key:'1', label:'综合监视', children:[
|
{ key:'1', label:'综合监视', children:[
|
||||||
{ key:'11', label:'预警', labelRight:'预警', icon:'yujing' },
|
{ key:'11', label:'预警', labelRight:'预警', icon:'yujing' },
|
||||||
{ key:'12', label:'雨情', labelRight:'统计', icon:'yuqing' },
|
{ key:'12', label:'雨情', labelRight:'统计', icon:'yuqing' },
|
||||||
{ key:'13', label:'水情', labelRight:'实时水情', icon:'shuikushuiqing' },
|
{ key:'13', label:'水库水情', labelRight:'实时水情', icon:'shuikushuiqing' },
|
||||||
|
{ key:'19', label:'土壤墒情', labelRight:'土壤墒情', icon:'turangshangqing' },
|
||||||
{ key:'15', label:'工程安全', labelRight:'工程安全监测', icon:'gongchenganquan' },
|
{ key:'15', label:'工程安全', labelRight:'工程安全监测', icon:'gongchenganquan' },
|
||||||
{ key:'16', label:'监测设备状态', labelRight:'监测设备运行', icon:'jianceshebeizhuangtai' },
|
{ key:'16', label:'监测设备状态', labelRight:'监测设备运行', icon:'jianceshebeizhuangtai' },
|
||||||
{ key:'17', label:'水质', labelRight:'水质', icon:'shuizhi' },
|
// { key:'17', label:'水质', labelRight:'水质', icon:'shuizhi' },
|
||||||
{ key:'18', label:'视频点', labelRight:'视频点', icon:'shipindian' },
|
{ key:'18', label:'视频点', labelRight:'视频点', icon:'shipindian' },
|
||||||
] },
|
] },
|
||||||
// { key:'2', label:'水库工程', children:[
|
|
||||||
// { key:'21', label:'水库', labelRight:'基本信息', icon:'shuiku' },
|
|
||||||
// { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' },
|
|
||||||
// { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' },
|
|
||||||
// ] },
|
|
||||||
{ key:'2', label:'巡查巡检', children:[
|
{ key:'2', label:'巡查巡检', children:[
|
||||||
{ key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'jianceshebeizhuangtai' },
|
{ key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'jianceshebeizhuangtai' },
|
||||||
// { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' },
|
// { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' },
|
||||||
|
|
@ -66,6 +63,11 @@ const items = [
|
||||||
{ key:'4', label:'水资源调度', children:[
|
{ key:'4', label:'水资源调度', children:[
|
||||||
{ key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' },
|
{ key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' },
|
||||||
] },
|
] },
|
||||||
|
{ key:'5', label:'水库工程', children:[
|
||||||
|
{ key:'51', label:'水库', labelRight:'基本信息', icon:'shuiku' },
|
||||||
|
{ key:'52', label:'大坝', labelRight:'基本信息', icon:'daba' },
|
||||||
|
{ key:'53', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' },
|
||||||
|
] },
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -139,6 +141,8 @@ const HomePage = ({showPanels}) => {
|
||||||
setCheckedObj({ key:'31', label:'危险区', labelRight:'危险区列表', icon:'weixianqu' })
|
setCheckedObj({ key:'31', label:'危险区', labelRight:'危险区列表', icon:'weixianqu' })
|
||||||
}else if(a==='4'){
|
}else if(a==='4'){
|
||||||
setCheckedObj({ key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' })
|
setCheckedObj({ key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' })
|
||||||
|
}else if(a==='5'){
|
||||||
|
setCheckedObj({ key:'51', label:'水库', labelRight:'基本信息', icon:'shuiku' })
|
||||||
}else{
|
}else{
|
||||||
}
|
}
|
||||||
}} expandIconPosition="end" accordion={true} bordered={false}>
|
}} expandIconPosition="end" accordion={true} bordered={false}>
|
||||||
|
|
@ -200,11 +204,12 @@ const HomePage = ({showPanels}) => {
|
||||||
}
|
}
|
||||||
{ checkedObj.label === '预警' ? <><Yujing mySetTms={setTms}/><Yuqing mySetTms={setTms} show={false}/></>:null }
|
{ checkedObj.label === '预警' ? <><Yujing mySetTms={setTms}/><Yuqing mySetTms={setTms} show={false}/></>:null }
|
||||||
{ checkedObj.label === '雨情' ? <Yuqing mySetTms={setTms} show={showTable}/>:null }
|
{ checkedObj.label === '雨情' ? <Yuqing mySetTms={setTms} show={showTable}/>:null }
|
||||||
{ checkedObj.label === '水情' ? <ShuiKu/>:null }
|
{ checkedObj.label === '水库水情' ? <ShuiKu/>:null }
|
||||||
|
{ checkedObj.label === '土壤墒情' ? <TuRangShangQing/>:null }
|
||||||
{ checkedObj.label === '供水' ? <GongShui/>:null }
|
{ checkedObj.label === '供水' ? <GongShui/>:null }
|
||||||
{ checkedObj.label === '工程安全' ? <GongCheng/>:null }
|
{ checkedObj.label === '工程安全' ? <GongCheng/>:null }
|
||||||
{ checkedObj.label === '监测设备状态' ? <JianCe/>:null }
|
{ checkedObj.label === '监测设备状态' ? <JianCe/>:null }
|
||||||
{ checkedObj.label === '水质' ? <ShuiZhi/>:null }
|
{/* { checkedObj.label === '水质' ? <ShuiZhi/>:null } */}
|
||||||
{ checkedObj.label === '视频点' ? <ShiPinDian/>:null }
|
{ checkedObj.label === '视频点' ? <ShiPinDian/>:null }
|
||||||
|
|
||||||
{ checkedObj.label === '巡查巡检' ? <XunChaXunJian/>:null }
|
{ checkedObj.label === '巡查巡检' ? <XunChaXunJian/>:null }
|
||||||
|
|
@ -231,7 +236,7 @@ const HomePage = ({showPanels}) => {
|
||||||
|
|
||||||
<div className='homePage_leftBottomBox'>
|
<div className='homePage_leftBottomBox'>
|
||||||
{ checkedObj.label==='雨情'?<Tuli/>:null }
|
{ checkedObj.label==='雨情'?<Tuli/>:null }
|
||||||
{ checkedObj.label==='水情'?<Tuli2/>:null }
|
{ checkedObj.label==='水库水情'?<Tuli2/>:null }
|
||||||
{ checkedObj.label==='供水'?<Tuli3/>:null }
|
{ checkedObj.label==='供水'?<Tuli3/>:null }
|
||||||
{ (checkedObj.label==='水库'||checkedObj.label==='大坝'||checkedObj.label==='溢洪道'||checkedObj.label==='视频点')?<Tuli4/>:null }
|
{ (checkedObj.label==='水库'||checkedObj.label==='大坝'||checkedObj.label==='溢洪道'||checkedObj.label==='视频点')?<Tuli4/>:null }
|
||||||
{ (checkedObj.label==='危险区'||checkedObj.label==='安置点'||checkedObj.label==='企事业单位'||checkedObj.label==='沿河居民户')?<Tuli5/>:null }
|
{ (checkedObj.label==='危险区'||checkedObj.label==='安置点'||checkedObj.label==='企事业单位'||checkedObj.label==='沿河居民户')?<Tuli5/>:null }
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ const Page = () => {
|
||||||
<div>蓄水日期:</div>
|
<div>蓄水日期:</div>
|
||||||
<div>{tableData?.storageDate?.slice(0,10)}</div>
|
<div>{tableData?.storageDate?.slice(0,10)}</div>
|
||||||
</dit>
|
</dit>
|
||||||
<dit className='home_shuizhi_item2'>
|
{/* <dit className='home_shuizhi_item2'>
|
||||||
<div>图片资料</div>
|
<div>图片资料</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</dit>
|
</dit>
|
||||||
|
|
@ -118,12 +118,12 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> */}
|
||||||
{/* */}
|
{/* */}
|
||||||
<dit className='home_shuizhi_item2'>
|
{/* <dit className='home_shuizhi_item2'>
|
||||||
<div>视频资料:</div>
|
<div>视频资料:</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</dit>
|
</dit> */}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ const Page = () => {
|
||||||
<div>工程特性表:</div>
|
<div>工程特性表:</div>
|
||||||
<div style={{color:'#007AFDB3',cursor:'pointer'}} onClick={()=>setOpen(true)}>工程特性表详情</div>
|
<div style={{color:'#007AFDB3',cursor:'pointer'}} onClick={()=>setOpen(true)}>工程特性表详情</div>
|
||||||
</dit>
|
</dit>
|
||||||
<div style={{width:'100%',color:'#007AFDB3',fontWeight:500,cursor:'pointer',marginTop:'10px',textAlign:'center'}}>更多详情</div>
|
{/* <div style={{width:'100%',color:'#007AFDB3',fontWeight:500,cursor:'pointer',marginTop:'10px',textAlign:'center'}}>更多详情</div> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ const Page = () => {
|
||||||
<div className="home_gongshui_item">
|
<div className="home_gongshui_item">
|
||||||
<div className="home_gongshui_item_title">
|
<div className="home_gongshui_item_title">
|
||||||
<img width={50} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/gongshui2.png`} alt=""/>
|
<img width={50} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/gongshui2.png`} alt=""/>
|
||||||
灌溉发电
|
灌溉用水
|
||||||
</div>
|
</div>
|
||||||
<div className="home_gongshui_item_text" style={{display:'flex',flexDirection:'column'}}>
|
<div className="home_gongshui_item_text" style={{display:'flex',flexDirection:'column'}}>
|
||||||
<div style={{display:'flex'}}>
|
<div style={{display:'flex'}}>
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,79 @@ import {reservoirlist, reswarn} from "../../../service/sssq"
|
||||||
import { SkRealPromiseWX } from "../../../models/_/real";
|
import { SkRealPromiseWX } from "../../../models/_/real";
|
||||||
import genDamImage from '../../../components/DamGraph/DamImage'
|
import genDamImage from '../../../components/DamGraph/DamImage'
|
||||||
import MyImg from './myImg'
|
import MyImg from './myImg'
|
||||||
|
import Ykqk from './item_shuiku/yhqk'
|
||||||
|
|
||||||
|
|
||||||
|
const sj = {
|
||||||
|
"stcd": "61610701",
|
||||||
|
"stnm": "檀树岗2",
|
||||||
|
"rvnm": "檀树岗河",
|
||||||
|
"hnnm": "长江中游下段北岸",
|
||||||
|
"bsnm": "长江",
|
||||||
|
"lgtd": "114.744317000",
|
||||||
|
"lttd": "31.505000000",
|
||||||
|
"stlc": "黄冈市红安县七里镇檀树岗村",
|
||||||
|
"alt": null,
|
||||||
|
"mdbz": null,
|
||||||
|
"mdpr": null,
|
||||||
|
"dtmnm": "吴淞",
|
||||||
|
"dtmel": null,
|
||||||
|
"dtpr": "0.000",
|
||||||
|
"sttp": "RR",
|
||||||
|
"dfrtms": null,
|
||||||
|
"fritm": null,
|
||||||
|
"frgrd": "3",
|
||||||
|
"esstym": "197103",
|
||||||
|
"bgfrym": "197103",
|
||||||
|
"edfrym": null,
|
||||||
|
"atcunit": "黄冈市水利和湖泊局",
|
||||||
|
"admauth": "黄冈水文",
|
||||||
|
"locality": "湖北水文",
|
||||||
|
"stbk": null,
|
||||||
|
"stazt": null,
|
||||||
|
"dstrvm": null,
|
||||||
|
"drna": "78",
|
||||||
|
"phcd": "TSG",
|
||||||
|
"usfl": "1",
|
||||||
|
"comments": "中小河流改造",
|
||||||
|
"moditime": "2022-02-23 00:00:00",
|
||||||
|
"remGd": null,
|
||||||
|
"ogid": null,
|
||||||
|
"vlfl": null,
|
||||||
|
"atid": null,
|
||||||
|
"sdfl": null,
|
||||||
|
"rma": null,
|
||||||
|
"mdps": null,
|
||||||
|
"mddt": null,
|
||||||
|
"stindex": null,
|
||||||
|
"starea": null,
|
||||||
|
"stlevel": null,
|
||||||
|
"code": null,
|
||||||
|
"ispbj": null,
|
||||||
|
"issxst": null,
|
||||||
|
"stpq": null,
|
||||||
|
"sthday": null,
|
||||||
|
"source": "SW",
|
||||||
|
"importancy": 0,
|
||||||
|
"clgtd": "114.744317000",
|
||||||
|
"clttd": "31.505000000",
|
||||||
|
"elev": null,
|
||||||
|
"crucial": 0,
|
||||||
|
"buildYear": null,
|
||||||
|
"adcd": null,
|
||||||
|
"lyid": null,
|
||||||
|
"resCode": "42120250085",
|
||||||
|
"rvCode": null,
|
||||||
|
"status": 1,
|
||||||
|
"agreement": null,
|
||||||
|
"simCard": null,
|
||||||
|
"bdCard": null,
|
||||||
|
"v": 104.1
|
||||||
|
}
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
const [ checked, setChecked ] = useState(0)
|
||||||
const [data,setData] = useState([])
|
const [data,setData] = useState([])
|
||||||
console.log('aaa',data);
|
console.log('aaa',data);
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
|
|
@ -21,21 +90,21 @@ const Page = () => {
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
const getData = async (params) => {
|
const getData = async (params) => {
|
||||||
setData(await reservoirlist(params))
|
const data1 = await reservoirlist(params)
|
||||||
|
const data2 = [...data1,sj]
|
||||||
|
setData(data2)
|
||||||
}
|
}
|
||||||
|
|
||||||
const getShuiKu = ()=>{
|
const getShuiKu = ()=>{
|
||||||
SkRealPromiseWX.get().then((res) => {
|
SkRealPromiseWX.get().then((res) => {
|
||||||
const list = res.map((i)=>{
|
const list = [...res,sj].map((i)=>{
|
||||||
return {
|
return {
|
||||||
id : i.stcd,
|
id : i.stcd,
|
||||||
name: i.stnm,
|
name: i.stnm,
|
||||||
...i
|
...i
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const data = list[0]
|
const data = list[checked]
|
||||||
|
|
||||||
|
|
||||||
dispatch.runtime.setFeaturePop({
|
dispatch.runtime.setFeaturePop({
|
||||||
id: data.id,
|
id: data.id,
|
||||||
type: 'shuiku',
|
type: 'shuiku',
|
||||||
|
|
@ -46,21 +115,36 @@ const Page = () => {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div className="home_yuqing">
|
||||||
{
|
<div className="home_yuqing_header" style={{marginBottom:'10px'}}>
|
||||||
data ? (
|
{
|
||||||
<MyImg record={{...data[0]}}/>
|
data.map((item,index)=>
|
||||||
) : (
|
<div style={{width:'50%'}}><div style={{width:'90%'}} className={checked===index?'home_yuqing_header_item avtive':'home_yuqing_header_item'} onClick={()=>setChecked(index)}>{item.stnm}</div></div>
|
||||||
<div className="noPic">暂无数据</div>
|
)
|
||||||
)
|
}
|
||||||
}
|
</div>
|
||||||
<div style={{position:'absolute',right:'14px',top:'15px',color:'#409EFF',cursor:'pointer',fontWeight:'500'}} onClick={getShuiKu}>详情</div>
|
{
|
||||||
</div>
|
data ? (
|
||||||
|
<MyImg record={{...data[checked]}}/>
|
||||||
|
) : (
|
||||||
|
<div className="noPic">暂无数据</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
<div style={{position:'absolute',right:'14px',top:'15px',color:'#409EFF',cursor:'pointer',fontWeight:'500'}} onClick={getShuiKu}>详情</div>
|
||||||
|
</div>
|
||||||
|
<div className='homePage_head2' style={{marginTop:'10px'}}>
|
||||||
|
<div className='homePage_head2_Bg'>
|
||||||
|
<img src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/titleBg2.png`} width="14" height="14" alt="" style={{margin:'0 10px'}} />
|
||||||
|
溢洪情况
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Ykqk/>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
import echarts from 'echarts/lib/echarts';
|
||||||
|
|
||||||
|
|
||||||
|
export default function drpOption({data}) {
|
||||||
|
let arr =[]
|
||||||
|
data.forEach(item=>{
|
||||||
|
arr.push([item.w,item.rz])
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
title: {
|
||||||
|
// text: "库容曲线图",
|
||||||
|
left: "40%",
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
top:'3%',
|
||||||
|
// 显示图例
|
||||||
|
show: false,
|
||||||
|
// 图例的位置
|
||||||
|
data: ["溢洪流量"],
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
},
|
||||||
|
grid: [
|
||||||
|
{
|
||||||
|
top: "20%",
|
||||||
|
left: "10%",
|
||||||
|
right: "5%",
|
||||||
|
bottom: "10%"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
// name: "流量m³/s",
|
||||||
|
nameGap: 0,
|
||||||
|
type: 'category',
|
||||||
|
data: data.map(o => o.bgtm),
|
||||||
|
splitLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#8c8c8c',
|
||||||
|
fontSize: 12,
|
||||||
|
formatter: val => val.slice(11,16)
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#8c8c8c',
|
||||||
|
width: 0.5,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: "流量m³/s",
|
||||||
|
nameTextStyle: {
|
||||||
|
padding: [0, 0, 5, -10],
|
||||||
|
color:'#8c8c8c',
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#cacaca',
|
||||||
|
width: 1,
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#8c8c8c',
|
||||||
|
fontSize: 12,
|
||||||
|
formatter: val => val
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
name: '溢洪流量',
|
||||||
|
color: "#7699f3",
|
||||||
|
data: data.map(o => o.q),
|
||||||
|
// symbol: 'none' // 设置标记点为'none',即去掉圆点
|
||||||
|
symbolSize:8,
|
||||||
|
areaStyle: {
|
||||||
|
// 开启阴影
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.1)', // 阴影颜色
|
||||||
|
shadowBlur: 10, // 阴影的模糊大小
|
||||||
|
shadowOffsetX: 5, // 阴影水平方向上的偏移
|
||||||
|
shadowOffsetY: 5, // 阴影垂直方向上的偏移
|
||||||
|
opacity: 0.5 // 区域颜色的透明度
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import { useEffect, useState, useMemo } from "react"
|
||||||
|
import {useDispatch, useSelector} from "react-redux";
|
||||||
|
import {Descriptions} from "antd";
|
||||||
|
import ReactEcharts from 'echarts-for-react';
|
||||||
|
import drpOption from './drpOption'
|
||||||
|
import { httppost2 } from "../../../../utils/request";
|
||||||
|
import apiurl from "../../../../service/apiurl";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const Page = () => {
|
||||||
|
const [data,setData] = useState([])
|
||||||
|
const option = useMemo(() => {
|
||||||
|
return drpOption({data});
|
||||||
|
}, [data])
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
(async()=>{
|
||||||
|
const {data,code} = await httppost2(apiurl.dataResourcesCenter.projectAndWater.xl.list,{stcd:'61610700'})
|
||||||
|
if(code!==200){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setData(data)
|
||||||
|
})()
|
||||||
|
},[])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div style={{width:'100%',height:'240px'}}>
|
||||||
|
<ReactEcharts
|
||||||
|
option={option}
|
||||||
|
style={{width: "100%", height: '100%'}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style={{padding:'15px 0px 10px 15px'}}>
|
||||||
|
<Descriptions column={2}>
|
||||||
|
<Descriptions.Item labelStyle={{color:"#8c8c8c"}} label="实时水位">{103.89}m</Descriptions.Item>
|
||||||
|
<Descriptions.Item labelStyle={{color:"#70B603"}} label="转换溢洪流量">{0.20}m³/s</Descriptions.Item>
|
||||||
|
<Descriptions.Item labelStyle={{color:"#8c8c8c"}} label="近24h溢洪量">{8.67}万m³</Descriptions.Item>
|
||||||
|
<Descriptions.Item labelStyle={{color:"#8c8c8c"}} label="采集时间">{'06-24 09:30'}</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
import { useEffect, useState } from "react"
|
||||||
|
import {useDispatch, useSelector} from "react-redux";
|
||||||
|
import { Table, Modal, message } from 'antd';
|
||||||
|
import { httppost2 } from '../../../utils/request';
|
||||||
|
import apiurl from '../../../service/apiurl';
|
||||||
|
|
||||||
|
|
||||||
|
const Page = () => {
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [ tableData, setTableData ] = useState([])//在线
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{ title: '站点', key: 'stnm', dataIndex: 'stnm',align: "center",width:80, ellipsis: true, },
|
||||||
|
{ title: '温度', key: 'wd', dataIndex: 'wd',align: "center",width:80, ellipsis: true, },
|
||||||
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true },
|
||||||
|
];
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
dispatch.map.setLayerVisible({ TuRangLayer: true })
|
||||||
|
getData()
|
||||||
|
return ()=>{
|
||||||
|
dispatch.map.setLayerVisible({ TuRangLayer: false })
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
|
const getData = async()=>{
|
||||||
|
// const { code, data} = await httppost2(apiurl.home.turangshangqing)
|
||||||
|
// if(code!==200){
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
const list = [
|
||||||
|
{
|
||||||
|
id:'1',
|
||||||
|
stcd: '10001',
|
||||||
|
stnm: '水田站',
|
||||||
|
wd: '53',
|
||||||
|
tm: '2025-03-19 15:00:00',
|
||||||
|
lgtd: "114.7684000",
|
||||||
|
lttd: "31.4941000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:'2',
|
||||||
|
stcd: '10002',
|
||||||
|
stnm: '旱田站',
|
||||||
|
wd: '21',
|
||||||
|
tm: '2025-03-19 15:00:00',
|
||||||
|
lgtd: "114.7984000",
|
||||||
|
lttd: "31.4941000"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setTableData(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="home_yuqing">
|
||||||
|
<div className="ant-card-body" style={{padding:"10px"}}>
|
||||||
|
<Table rowKey="stationCode"
|
||||||
|
sticky
|
||||||
|
columns={columns}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={tableData}
|
||||||
|
scroll={{ y: "300px"}}
|
||||||
|
onRow={
|
||||||
|
(row)=>({
|
||||||
|
onClick:()=>{
|
||||||
|
// dispatch.runtime.setCameraTarget({
|
||||||
|
// center: [row.lgtd, row.lttd],
|
||||||
|
// zoom: 13,
|
||||||
|
// pitch: 60
|
||||||
|
// })
|
||||||
|
dispatch.runtime.setFeaturePop({
|
||||||
|
id: row.id,
|
||||||
|
data:{...row},
|
||||||
|
type: 'turangshangqing',
|
||||||
|
lgtd: row.lgtd,
|
||||||
|
lttd: row.lttd,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page
|
||||||
|
|
@ -25,7 +25,7 @@ const MyImg = ({ record }) => {
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
height: '33vh',
|
height: '300px',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
backgroundColor: "#eff3f6",
|
backgroundColor: "#eff3f6",
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@ const Page = () => {
|
||||||
const params = {
|
const params = {
|
||||||
search: {
|
search: {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
|
'orderField':'id',
|
||||||
|
'isAsc':true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
search(params)
|
search(params)
|
||||||
|
|
@ -77,7 +79,7 @@ const Page = () => {
|
||||||
ref={refModal}
|
ref={refModal}
|
||||||
title=""
|
title=""
|
||||||
component={ModalForm}
|
component={ModalForm}
|
||||||
onCrudSuccess={refresh}
|
onCrudSuccess={()=>refresh({search:{'orderField':'id','isAsc':true}})}
|
||||||
/>
|
/>
|
||||||
<BasicCrudModal
|
<BasicCrudModal
|
||||||
width={1000}
|
width={1000}
|
||||||
|
|
@ -85,7 +87,7 @@ const Page = () => {
|
||||||
ref={refModal2}
|
ref={refModal2}
|
||||||
title=""
|
title=""
|
||||||
component={ModalForm2}
|
component={ModalForm2}
|
||||||
onCrudSuccess={refresh}
|
onCrudSuccess={()=>refresh({search:{'orderField':'id','isAsc':true}})}
|
||||||
/>
|
/>
|
||||||
<BasicCrudModal
|
<BasicCrudModal
|
||||||
width={1500}
|
width={1500}
|
||||||
|
|
@ -93,7 +95,7 @@ const Page = () => {
|
||||||
ref={refModal3}
|
ref={refModal3}
|
||||||
title=""
|
title=""
|
||||||
component={ModalForm3}
|
component={ModalForm3}
|
||||||
onCrudSuccess={refresh}
|
onCrudSuccess={()=>refresh({search:{'orderField':'id','isAsc':true}})}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
<Input
|
<Input
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
allowClear
|
allowClear
|
||||||
|
disabled={mode==='view'}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -137,6 +138,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
<Input
|
<Input
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
allowClear
|
allowClear
|
||||||
|
disabled={mode==='view'}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -150,7 +152,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
})}
|
})}
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<DatePicker allowClear style={{width:'280px'}} />
|
<DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -164,6 +166,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
<Input
|
<Input
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
allowClear
|
allowClear
|
||||||
|
disabled={mode==='view'}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -177,7 +180,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
})}
|
})}
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<DatePicker allowClear style={{width:'280px'}} />
|
<DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -212,7 +215,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
<Row gutter={[16]}>
|
<Row gutter={[16]} style={{margin:"-25px 0 0 14px"}}>
|
||||||
{
|
{
|
||||||
loading ? <span>文件正在上传中,请等待</span> :
|
loading ? <span>文件正在上传中,请等待</span> :
|
||||||
fileList.length > 0 && fileList.map(file => {
|
fileList.length > 0 && fileList.map(file => {
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
<Input
|
<Input
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
allowClear
|
allowClear
|
||||||
|
disabled={mode==='view'}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -137,6 +138,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
<Input
|
<Input
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
allowClear
|
allowClear
|
||||||
|
disabled={mode==='view'}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -150,7 +152,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
})}
|
})}
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<DatePicker allowClear style={{width:'280px'}} />
|
<DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -164,6 +166,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
<Input
|
<Input
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
allowClear
|
allowClear
|
||||||
|
disabled={mode==='view'}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -177,7 +180,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
})}
|
})}
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<DatePicker allowClear style={{width:'280px'}} />
|
<DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -212,7 +215,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
<Row gutter={[16]}>
|
<Row gutter={[16]} style={{margin:"-25px 0 0 14px"}}>
|
||||||
{
|
{
|
||||||
loading ? <span>文件正在上传中,请等待</span> :
|
loading ? <span>文件正在上传中,请等待</span> :
|
||||||
fileList.length > 0 && fileList.map(file => {
|
fileList.length > 0 && fileList.map(file => {
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ const ModalForm = ({ mode, record,onEdit,onSave,close }) => {
|
||||||
const [checked, setChecked] = useState(true)
|
const [checked, setChecked] = useState(true)
|
||||||
|
|
||||||
const onFinish = async(values) => {
|
const onFinish = async(values) => {
|
||||||
|
const userId = localStorage.getItem("userId");
|
||||||
|
const userName = localStorage.getItem("userName");
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...values,
|
||||||
forecastTm: record.tms.forecastTime,
|
forecastTm: record.tms.forecastTime,
|
||||||
|
|
@ -24,6 +27,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,close }) => {
|
||||||
forecastWarm: record.tms.forecastWarm,
|
forecastWarm: record.tms.forecastWarm,
|
||||||
type: record.tms.type,
|
type: record.tms.type,
|
||||||
voList:record.data,
|
voList:record.data,
|
||||||
|
userId:userId+'_'+userName
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode === 'save') {
|
if (mode === 'save') {
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,13 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
||||||
console.log(checked);
|
console.log(checked);
|
||||||
|
|
||||||
const onFinish = (values) => {
|
const onFinish = (values) => {
|
||||||
|
const userId = localStorage.getItem("userId");
|
||||||
|
const userName = localStorage.getItem("userName");
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...values,
|
||||||
status:checked?'0':'1'
|
status:checked?'0':'1',
|
||||||
|
userId:userId+'_'+userName
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(params);
|
console.log(params);
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ const Page = () => {
|
||||||
checked={v==='0'?true:false}
|
checked={v==='0'?true:false}
|
||||||
/>
|
/>
|
||||||
},
|
},
|
||||||
{ title: '创建日期', key: 'stationCode', dataIndex: 'stationCode', width: 140,align:"center", },
|
{ title: '创建日期', key: 'updateTm', dataIndex: 'updateTm', width: 140,align:"center", },
|
||||||
{ title: '创建人', key: 'stationCode', dataIndex: 'stationCode', width: 140,align:"center", },
|
{ title: '创建人', key: 'userId', dataIndex: 'userId', width: 140,align:"center",render:(v)=>v?.split('_')?.[1] },
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
|
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
|
||||||
render: (value, row, index) => (<CrudOpRender_text edit={true} del={true} command={(cmd) => () => command(cmd)(row)} />)
|
render: (value, row, index) => (<CrudOpRender_text edit={true} del={true} command={(cmd) => () => command(cmd)(row)} />)
|
||||||
|
|
@ -66,6 +66,8 @@ const Page = () => {
|
||||||
const params = {
|
const params = {
|
||||||
search: {
|
search: {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
|
"orderField":"chtm",
|
||||||
|
"isAsc":false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
search(params)
|
search(params)
|
||||||
|
|
@ -82,7 +84,7 @@ const Page = () => {
|
||||||
message.error('修改失败')
|
message.error('修改失败')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
refresh()
|
refresh({search:{'orderField':'chtm','isAsc':false}})
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +110,7 @@ const Page = () => {
|
||||||
ref={refModal}
|
ref={refModal}
|
||||||
title=""
|
title=""
|
||||||
component={ModalForm}
|
component={ModalForm}
|
||||||
onCrudSuccess={refresh}
|
onCrudSuccess={()=>refresh({search:{'orderField':'chtm','isAsc':false}})}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="存放地点"
|
label="仓库地点"
|
||||||
name="storeLocation"
|
name="storeLocation"
|
||||||
>
|
>
|
||||||
<Input type='text' disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
<Input type='text' disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
|
@ -271,7 +271,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={mode !== "view" ? "附件" : ''}
|
label="附件"
|
||||||
name="fieldId"
|
name="fieldId"
|
||||||
labelCol={{ span: 3 }}
|
labelCol={{ span: 3 }}
|
||||||
wrapperCol={{ span: 19 }}
|
wrapperCol={{ span: 19 }}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,8 @@ const Page = () => {
|
||||||
record.unit === 8 ? "箱" :
|
record.unit === 8 ? "箱" :
|
||||||
record.unit === 9 ? "卷" :
|
record.unit === 9 ? "卷" :
|
||||||
record.unit === 10 ? "立方米" :
|
record.unit === 10 ? "立方米" :
|
||||||
"平方米"
|
record.unit === 11 ? "平方米" :
|
||||||
|
""
|
||||||
}</span>
|
}</span>
|
||||||
},
|
},
|
||||||
{ title: '库存数量', key: 'storeQuantity', dataIndex: 'storeQuantity', width: 150, ellipsis: true },
|
{ title: '库存数量', key: 'storeQuantity', dataIndex: 'storeQuantity', width: 150, ellipsis: true },
|
||||||
|
|
@ -132,7 +133,7 @@ const Page = () => {
|
||||||
{ title: '联系电话', key: 'phone', dataIndex: 'phone', width: 150, ellipsis: true },
|
{ title: '联系电话', key: 'phone', dataIndex: 'phone', width: 150, ellipsis: true },
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
|
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
|
||||||
render: (value, row, index) => (<CrudOpRender_text edit={editBtn ? true : false} del={delBtn ? true : false} similarAdd={copyBtn ? true : false} command={(cmd) => () => command(cmd)(row)} />)
|
render: (value, row, index) => (<CrudOpRender_text edit={editBtn ? true : false} view={true} del={delBtn ? true : false} similarAdd={copyBtn ? true : false} command={(cmd) => () => command(cmd)(row)} />)
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import drpOption from './drpOption';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import './index.less'
|
import './index.less'
|
||||||
import ModalForm1 from './table1'
|
import ModalForm1 from './table1'
|
||||||
import { httppost2 } from '../../../../utils/request';
|
import { httpget2, httppost2 } from '../../../../utils/request';
|
||||||
import apiurl from '../../../../service/apiurl';
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
|
||||||
const Page = ({projectId,onCancel}) => {
|
const Page = ({projectId,onCancel}) => {
|
||||||
|
|
@ -31,7 +31,7 @@ const Page = ({projectId,onCancel}) => {
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
(async()=>{
|
(async()=>{
|
||||||
const {code , data} = await httppost2(apiurl.fxdd_xyt.hsyb.ybfagl.getData+'?projectId='+projectId)
|
const {code , data} = await httpget2(apiurl.fxdd_xyt.hsyb.ybfagl.getData+'?projectId='+projectId)
|
||||||
if(code!==200){
|
if(code!==200){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +46,7 @@ const Page = ({projectId,onCancel}) => {
|
||||||
ycMaxSwH:data.ycMaxSwH,
|
ycMaxSwH:data.ycMaxSwH,
|
||||||
ycMaxRkQ:data.ycMaxRkQ,
|
ycMaxRkQ:data.ycMaxRkQ,
|
||||||
ycMaxCkQ:data.ycMaxCkQ,
|
ycMaxCkQ:data.ycMaxCkQ,
|
||||||
ycSumFlood:data.ycSumFlood,
|
ycSumFlood:data.ycSumFlood,
|
||||||
}})
|
}})
|
||||||
})()
|
})()
|
||||||
},[])
|
},[])
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const ToolBar = ({ setSearchVal,jh}) => {
|
||||||
<Form.Item label="告警内容" name="warnContent">
|
<Form.Item label="告警内容" name="warnContent">
|
||||||
<Input allowClear style={{width:'180px'}}/>
|
<Input allowClear style={{width:'180px'}}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="告警时间" name="tm">
|
<Form.Item label="播报时间" name="tm">
|
||||||
<RangePicker
|
<RangePicker
|
||||||
allowClear
|
allowClear
|
||||||
showTime
|
showTime
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export default function Page({isHome}) {
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
{
|
{/* {
|
||||||
slList.map((item)=>
|
slList.map((item)=>
|
||||||
<div className={'gcaqjc_bzt_sl_'+item.stationCode} onClick={()=>{
|
<div className={'gcaqjc_bzt_sl_'+item.stationCode} onClick={()=>{
|
||||||
setOpenSl(true)
|
setOpenSl(true)
|
||||||
|
|
@ -152,7 +152,7 @@ export default function Page({isHome}) {
|
||||||
<img width={20} style={{marginTop:'-4px'}} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${item.status===1?'sl2.png':'sl.png'}`} alt="" id="img" draggable="false" />
|
<img width={20} style={{marginTop:'-4px'}} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${item.status===1?'sl2.png':'sl.png'}`} alt="" id="img" draggable="false" />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
} */}
|
||||||
{
|
{
|
||||||
wyList.map((item)=>
|
wyList.map((item)=>
|
||||||
<div className={'gcaqjc_bzt_wy_'+item.stationCode} onClick={()=>{
|
<div className={'gcaqjc_bzt_wy_'+item.stationCode} onClick={()=>{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,283 @@
|
||||||
|
import React, { useState, useEffect,useMemo,useRef } from 'react'
|
||||||
|
import { Table, Tabs,Modal,message,Tooltip } from 'antd';
|
||||||
|
import { useDispatch, useSelector } from 'react-redux'
|
||||||
|
import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch";
|
||||||
|
import Draggable from 'react-draggable';
|
||||||
|
import { httpget, httpget2, httppost2 } from '../../../utils/request';
|
||||||
|
import apiurl from '../../../service/apiurl';
|
||||||
|
import ShenYa from '../../Home/MapCtrl/Pops/ShenYa/index';
|
||||||
|
import ShenLiu from '../../Home/MapCtrl/Pops/ShenLiu/index.js';
|
||||||
|
import WeiYi from '../../Home/MapCtrl/Pops/WeiYi/index.js';
|
||||||
|
import DuanMian from '../../Home/MapCtrl/Pops/DuanMian/index.js';
|
||||||
|
import TuLi from '../../Home/TuLi/Tuli6.js';
|
||||||
|
import './index.less'
|
||||||
|
|
||||||
|
|
||||||
|
export default function Page({isHome}) {
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [shouqi,setShouQi] = useState(false)
|
||||||
|
const [syList,setSyList] = useState([])
|
||||||
|
const [slList,setSlList] = useState([])
|
||||||
|
const [wyList,setWyList] = useState([])
|
||||||
|
const [dmList,setDmList] = useState([])
|
||||||
|
const [openSy, setOpenSy] = useState(false)
|
||||||
|
const [openSl, setOpenSl] = useState(false)
|
||||||
|
const [openWy, setOpenWy] = useState(false)
|
||||||
|
const [openDm, setOpenDm] = useState(false)
|
||||||
|
|
||||||
|
const [modalData, setModalData] = useState({})
|
||||||
|
|
||||||
|
|
||||||
|
const columnsSy = [
|
||||||
|
{ title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center", ellipsis: true },
|
||||||
|
{ title: '所属断面', key: 'profileName', dataIndex: 'profileName',width: 110,align: "center", ellipsis: true },
|
||||||
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 110, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}>{v?.slice(5,16)}</div> },
|
||||||
|
{ title: '管水位(m)', key: 'value', dataIndex: 'value',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.status===1?'red':'#3B4859'}}>{v}</div> },
|
||||||
|
]
|
||||||
|
|
||||||
|
const columnsSl = [
|
||||||
|
{ title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center", ellipsis: true },
|
||||||
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}>{v?.slice(5,16)}</div> },
|
||||||
|
{ title: '渗流量(L/s)', key: 'value', dataIndex: 'value',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.status===1?'red':'#3B4859'}}>{v}</div> },
|
||||||
|
]
|
||||||
|
|
||||||
|
const columnsWy = [
|
||||||
|
{ title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center",width: 80, ellipsis: true },
|
||||||
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)}</div></div> },
|
||||||
|
{ title: <div><div>X方向</div><div>(mm)</div></div>, key: 'x', dataIndex: 'x',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v}</div> },
|
||||||
|
{ title: <div><div>Y方向</div><div>(mm)</div></div>, key: 'y', dataIndex: 'y',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v}</div> },
|
||||||
|
{ title: <div><div>H方向</div><div>(mm)</div></div>, key: 'h', dataIndex: 'h',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v}</div> },
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
getSyData()
|
||||||
|
getSlData()
|
||||||
|
getWyData()
|
||||||
|
getDmData()
|
||||||
|
},[])
|
||||||
|
|
||||||
|
const getSyData = async()=>{
|
||||||
|
const {code, data} = await httpget2(apiurl.home.sy)
|
||||||
|
const list = []
|
||||||
|
|
||||||
|
const c = ['01','04','07','16','10','13','02','05','08','17','11','14','03','06','09','12','15','24','26','28','25','27','29','18','19','20','21','22','23']
|
||||||
|
.map((i)=>{
|
||||||
|
list.push({
|
||||||
|
"stationCode": "SY"+i,
|
||||||
|
"profileName": "B0+250",
|
||||||
|
"tm": "2024-10-10 08:00:00",
|
||||||
|
"value": 195.3,
|
||||||
|
"flag": 1,
|
||||||
|
"status": 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
if(code!==200){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setSyList(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getSlData = async()=>{
|
||||||
|
const {code, data} = await httpget2(apiurl.home.sl)
|
||||||
|
if(code!==200){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const list = [{
|
||||||
|
"stationCode": "SL01",
|
||||||
|
"profileName": null,
|
||||||
|
"tm": "2024-10-27 08:00:00",
|
||||||
|
"value": 1.18,
|
||||||
|
"flag": 1,
|
||||||
|
"status": 0
|
||||||
|
}]
|
||||||
|
setSlList(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getWyData = async()=>{
|
||||||
|
const {code, data} = await httpget2(apiurl.home.wy)
|
||||||
|
if(code!==200){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const list = []
|
||||||
|
for(let a=1; a<33; a++){
|
||||||
|
list.push({
|
||||||
|
"stationCode": "WY"+(a<10?('0'+a):a),
|
||||||
|
"tm": "2024-10-15 08:00:00",
|
||||||
|
"flag": 1,
|
||||||
|
"x": -0.09,
|
||||||
|
"y": 0.1,
|
||||||
|
"h": 0.12,
|
||||||
|
"xstatus": 0,
|
||||||
|
"ystatus": 0,
|
||||||
|
"hstatus": 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
for(let b=1; b<37; b++){
|
||||||
|
list.push({
|
||||||
|
"stationCode": "ZY"+(b<10?('0'+b):b),
|
||||||
|
"tm": "2024-10-15 08:00:00",
|
||||||
|
"flag": 1,
|
||||||
|
"x": -0.09,
|
||||||
|
"y": 0.1,
|
||||||
|
"h": 0.12,
|
||||||
|
"xstatus": 0,
|
||||||
|
"ystatus": 0,
|
||||||
|
"hstatus": 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setWyList(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDmData = async()=>{
|
||||||
|
const {code, data} = await httppost2(apiurl.home.dmList)
|
||||||
|
if(code!==200){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('断面',data)
|
||||||
|
setDmList(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='gcaqjc_bzt'>
|
||||||
|
<TransformWrapper
|
||||||
|
limitToBounds={false}
|
||||||
|
initialScale={1}
|
||||||
|
initialPositionX={isHome?-220:-450}
|
||||||
|
initialPositionY={isHome?10:20}
|
||||||
|
maxScale={100}
|
||||||
|
minScale={0.5}
|
||||||
|
>
|
||||||
|
<TransformComponent>
|
||||||
|
<div style={{width:'calc( 100vw - 320px)',height:'calc( 100vh - 85px)',position:'relative'}}>
|
||||||
|
<img width={1500} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/bzt6.svg`} alt="" id="img" draggable="false" />
|
||||||
|
{
|
||||||
|
syList.map((item)=>
|
||||||
|
<div className={'gcaqjc_bzt_sy_'+item.stationCode} onClick={()=>{
|
||||||
|
setOpenSy(true)
|
||||||
|
setModalData(item)
|
||||||
|
}}>
|
||||||
|
<span>{item.stationCode}</span>
|
||||||
|
<img width={10} height={10} style={{marginTop:'-4px'}} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${item.status===1?'sy2.png':'sy.png'}`} alt="" id="img" draggable="false" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
{/* {
|
||||||
|
slList.map((item)=>
|
||||||
|
<div className={'gcaqjc_bzt_sl_'+item.stationCode} onClick={()=>{
|
||||||
|
setOpenSl(true)
|
||||||
|
setModalData(item)
|
||||||
|
}}>
|
||||||
|
<span>{item.stationCode}</span>
|
||||||
|
<img width={10} height={10} style={{marginTop:'-4px'}} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${item.status===1?'sl2.png':'sl.png'}`} alt="" id="img" draggable="false" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
} */}
|
||||||
|
{
|
||||||
|
wyList.map((item)=>
|
||||||
|
<div
|
||||||
|
className={'gcaqjc_bzt_wy_'+item.stationCode}
|
||||||
|
onClick={()=>{
|
||||||
|
setOpenWy(true)
|
||||||
|
setModalData(item)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span>{item.stationCode}</span>
|
||||||
|
<img width={10} height={10} style={{marginTop:'-4px'}} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${(item.xstatus===1||item.ystatus===1||item.hstatus===1)?'wy2.png':'wy.png'}`} alt="" id="img" draggable="false" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</TransformComponent>
|
||||||
|
</TransformWrapper>
|
||||||
|
{
|
||||||
|
!isHome?
|
||||||
|
<div className='gcaqjc_bzt_rightBox' style={{right:shouqi?'-404px':'4px'}}>
|
||||||
|
<Tabs defaultActiveKey="1" style={{padding:'0 5px 5px 5px'}} centered>
|
||||||
|
<Tabs.TabPane tab={<div style={{fontSize:'16px',fontWeight:500,padding:'0 15px'}}>渗压监测</div>} key="1">
|
||||||
|
<div className='gcaqjc_bzt_rightBox_table'>
|
||||||
|
<Table rowKey="stationCode"
|
||||||
|
sticky
|
||||||
|
columns={columnsSy}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={syList}
|
||||||
|
scroll={{ y: "650px"}}
|
||||||
|
onRow={
|
||||||
|
(data)=>({
|
||||||
|
onClick:()=>{
|
||||||
|
setOpenSy(true)
|
||||||
|
setModalData(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane tab={<div style={{fontSize:'16px',fontWeight:500,padding:'0 15px'}}>渗流监测</div>} key="2">
|
||||||
|
<div className='gcaqjc_bzt_rightBox_table'>
|
||||||
|
<Table rowKey="stationCode"
|
||||||
|
sticky
|
||||||
|
columns={columnsSl}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={slList}
|
||||||
|
scroll={{ y: "650px"}}
|
||||||
|
onRow={
|
||||||
|
(data)=>({
|
||||||
|
onClick:()=>{
|
||||||
|
setOpenSl(true)
|
||||||
|
setModalData(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane tab={<div style={{fontSize:'16px',fontWeight:500,padding:'0 15px'}}>位移监测</div>} key="3">
|
||||||
|
<div className='gcaqjc_bzt_rightBox_table'>
|
||||||
|
<Table rowKey="stationCode"
|
||||||
|
sticky
|
||||||
|
columns={columnsWy}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={wyList}
|
||||||
|
scroll={{ y: "650px"}}
|
||||||
|
onRow={
|
||||||
|
(data)=>({
|
||||||
|
onClick:()=>{
|
||||||
|
setOpenWy(true)
|
||||||
|
setModalData(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
</Tabs>
|
||||||
|
<div className='gcaqjc_bzt_rightBox_Btn'>
|
||||||
|
<img src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/shouqi.png`} alt="" onClick={()=>setShouQi(!shouqi)}/>
|
||||||
|
</div>
|
||||||
|
</div>:null
|
||||||
|
}
|
||||||
|
|
||||||
|
{/* <div style={{position:'absolute',left:'30px',top:'calc( 100vh - 300px )'}}>
|
||||||
|
<TuLi/>
|
||||||
|
</div> */}
|
||||||
|
|
||||||
|
<Modal width={1000} wrapClassName='home_modal' bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={openSy} onCancel={()=>setOpenSy(false)} destroyOnClose={true}>
|
||||||
|
<ShenYa id={modalData.stationCode} data={modalData} dispatch={dispatch} record={modalData} onCancel={()=>setOpenSy(false)}/>
|
||||||
|
</Modal>
|
||||||
|
<Modal width={1000} wrapClassName='home_modal' bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={openSl} onCancel={()=>setOpenSl(false)} destroyOnClose={true}>
|
||||||
|
<ShenLiu id={modalData.stationCode} data={modalData} dispatch={dispatch} record={modalData} onCancel={()=>setOpenSl(false)}/>
|
||||||
|
</Modal>
|
||||||
|
<Modal width={1000} wrapClassName='home_modal' bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={openWy} onCancel={()=>setOpenWy(false)} destroyOnClose={true}>
|
||||||
|
<WeiYi id={modalData.stationCode} data={modalData} dispatch={dispatch} record={modalData} onCancel={()=>setOpenWy(false)}/>
|
||||||
|
</Modal>
|
||||||
|
<Modal width={1000} wrapClassName='home_modal' bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={openDm} onCancel={()=>setOpenDm(false)} destroyOnClose={true}>
|
||||||
|
<DuanMian id={modalData.profileCode} data={modalData} dispatch={dispatch} record={modalData} onCancel={()=>setOpenDm(false)}/>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,674 @@
|
||||||
|
.gcaqjc_bzt{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.gcaqjc_bzt_wrapperClass{
|
||||||
|
width: '100%';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.imgBox {
|
||||||
|
position: relative;
|
||||||
|
width: 1200px;
|
||||||
|
height: 800px;
|
||||||
|
border: 2px solid red;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgBox img {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_rightBox{
|
||||||
|
width: 400px;
|
||||||
|
background: #f5f7fa;
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 30px;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
|
||||||
|
|
||||||
|
.ant-tabs-nav{
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_rightBox_table{
|
||||||
|
width: 100%;
|
||||||
|
min-height: 750px;
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
|
||||||
|
|
||||||
|
.ant-table-thead{
|
||||||
|
th{
|
||||||
|
height: 40px !important;
|
||||||
|
background-color: #e2edfd !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-table-tbody{
|
||||||
|
.ant-table-measure-row{
|
||||||
|
td{
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tr:nth-child(odd) {
|
||||||
|
td{
|
||||||
|
background-color: #f5f8fe !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_rightBox_Btn{
|
||||||
|
position: absolute;
|
||||||
|
left: -25px;
|
||||||
|
top: 45%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[class*="gcaqjc_bzt_sy"]{
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #00c188;
|
||||||
|
cursor: pointer;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
span{
|
||||||
|
transform: scaleX(0.8);
|
||||||
|
letter-spacing: -0.8px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 6px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
text-shadow:
|
||||||
|
0.3px 0.3px 0.3px white, /* 白色内描边 */
|
||||||
|
-0.3px -0.3px 0.3px white, /* 白色内描边 */
|
||||||
|
0px 0px 1px white; /* 黑色外描边 */
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[class*="gcaqjc_bzt_sl"]{
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #00c188;
|
||||||
|
cursor: pointer;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
span{
|
||||||
|
transform: scaleX(0.8);
|
||||||
|
letter-spacing: -0.8px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 6px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
text-shadow:
|
||||||
|
0.3px 0.3px 0.3px white, /* 白色内描边 */
|
||||||
|
-0.3px -0.3px 0.3px white, /* 白色内描边 */
|
||||||
|
0px 0px 1px white; /* 黑色外描边 */
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[class*="gcaqjc_bzt_wy"]{
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
color: #00c188;
|
||||||
|
cursor: pointer;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
span{
|
||||||
|
transform: scaleX(0.8);
|
||||||
|
letter-spacing: -0.8px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 6px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
text-shadow:
|
||||||
|
0.3px 0.3px 0.3px white, /* 白色内描边 */
|
||||||
|
-0.3px -0.3px 0.3px white, /* 白色内描边 */
|
||||||
|
0px 0px 1px white; /* 黑色外描边 */
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[class*="gcaqjc_bzt_dm"]{
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
color: #00c188;
|
||||||
|
font-size: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_sy_SY01{
|
||||||
|
left: 971px;
|
||||||
|
top: 883px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY02{
|
||||||
|
left: 986px;
|
||||||
|
top: 663px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY03{
|
||||||
|
left: 973.5px;
|
||||||
|
top: 432px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY04{
|
||||||
|
left: 994px;
|
||||||
|
top: 884px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY05{
|
||||||
|
left: 1006px;
|
||||||
|
top: 663px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY06{
|
||||||
|
left: 998px;
|
||||||
|
top: 430px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY07{
|
||||||
|
left: 1034px;
|
||||||
|
top: 886px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY08{
|
||||||
|
left: 1051px;
|
||||||
|
top: 668px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY09{
|
||||||
|
left: 1037px;
|
||||||
|
top: 441px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY10{
|
||||||
|
left: 994px;
|
||||||
|
top: 872px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY11{
|
||||||
|
left: 1007px;
|
||||||
|
top: 650px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY12{
|
||||||
|
left: 998px;
|
||||||
|
top: 442px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY13{
|
||||||
|
left: 1035px;
|
||||||
|
top: 874px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY14{
|
||||||
|
left: 1052px;
|
||||||
|
top: 656px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY15{
|
||||||
|
left: 1037px;
|
||||||
|
top: 429px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY16{
|
||||||
|
left: 1109px;
|
||||||
|
top: 884px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_sy_SY17{
|
||||||
|
left: 1126px;
|
||||||
|
top: 668px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_sy_SY18{
|
||||||
|
left: 645px;
|
||||||
|
top: 1230px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY19{
|
||||||
|
left: 632px;
|
||||||
|
top: 1234px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_sy_SY20{
|
||||||
|
left: 677px;
|
||||||
|
top: 1316px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY21{
|
||||||
|
left: 665px;
|
||||||
|
top: 1320px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_sy_SY22{
|
||||||
|
left: 710px;
|
||||||
|
top: 1401px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY23{
|
||||||
|
left: 697px;
|
||||||
|
top: 1406px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY24{
|
||||||
|
left: 51px;
|
||||||
|
top: 1478px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY25{
|
||||||
|
left: 18px;
|
||||||
|
top: 1469px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY26{
|
||||||
|
left: 46px;
|
||||||
|
top: 1491px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_sy_SY27{
|
||||||
|
left: 14px;
|
||||||
|
top: 1481px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY28{
|
||||||
|
left: 37px;
|
||||||
|
top: 1500px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_sy_SY29{
|
||||||
|
left: 5px;
|
||||||
|
top: 1490px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_wy_WY01{
|
||||||
|
left: 961px;
|
||||||
|
top: 1003px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY02{
|
||||||
|
left: 971px;
|
||||||
|
top: 872px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY03{
|
||||||
|
left: 979px;
|
||||||
|
top: 764px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY04{
|
||||||
|
left: 986px;
|
||||||
|
top: 650px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY05{
|
||||||
|
left: 981px;
|
||||||
|
top: 547px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY06{
|
||||||
|
left: 973px;
|
||||||
|
top: 443px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY07{
|
||||||
|
left: 965px;
|
||||||
|
top: 327px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY08{
|
||||||
|
left: 974px;
|
||||||
|
top: 1004px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY09{
|
||||||
|
left: 983px;
|
||||||
|
top: 876px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY10{
|
||||||
|
left: 992px;
|
||||||
|
top: 766px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY11{
|
||||||
|
left: 996px;
|
||||||
|
top: 656px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY12{
|
||||||
|
left: 993px;
|
||||||
|
top: 546px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY13{
|
||||||
|
left: 986px;
|
||||||
|
top: 436px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY14{
|
||||||
|
left: 978px;
|
||||||
|
top: 325.5px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY15{
|
||||||
|
left: 1031px;
|
||||||
|
top: 1009px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY16{
|
||||||
|
left: 1045px;
|
||||||
|
top: 879px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY17{
|
||||||
|
left: 1049px;
|
||||||
|
top: 771px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY18{
|
||||||
|
left: 1061px;
|
||||||
|
top: 663px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY19{
|
||||||
|
left: 1050px;
|
||||||
|
top: 543px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY20{
|
||||||
|
left: 1045px;
|
||||||
|
top: 434px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY21{
|
||||||
|
left: 1037px;
|
||||||
|
top: 322px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY22{
|
||||||
|
left: 1070px;
|
||||||
|
top: 1012px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY23{
|
||||||
|
left: 1079px;
|
||||||
|
top: 882px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY24{
|
||||||
|
left: 1088px;
|
||||||
|
top: 774px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY25{
|
||||||
|
left: 1091px;
|
||||||
|
top: 666px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY26{
|
||||||
|
left: 1088px;
|
||||||
|
top: 542px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY27{
|
||||||
|
left: 1081px;
|
||||||
|
top: 432.5px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY28{
|
||||||
|
left: 1040px;
|
||||||
|
top: 20px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY29{
|
||||||
|
left: 974px;
|
||||||
|
top: 95px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY30{
|
||||||
|
left: 1057px;
|
||||||
|
top: 34px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY31{
|
||||||
|
left: 991px;
|
||||||
|
top: 111px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_WY32{
|
||||||
|
left: 660px;
|
||||||
|
top: 1266px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_wy_ZY01{
|
||||||
|
left: 55px;
|
||||||
|
top: 1465px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY02{
|
||||||
|
left: 23px;
|
||||||
|
top: 1455px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY03{
|
||||||
|
left: 48px;
|
||||||
|
top: 1503px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_wy_ZY04{
|
||||||
|
left: 16px;
|
||||||
|
top: 1493px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gcaqjc_bzt_wy_ZY05{
|
||||||
|
left: 1080px;
|
||||||
|
top: 67px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY06{
|
||||||
|
left: 1104px;
|
||||||
|
top: 98px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY07{
|
||||||
|
left: 1128px;
|
||||||
|
top: 129px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY08{
|
||||||
|
left: 1151px;
|
||||||
|
top: 158px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY09{
|
||||||
|
left: 1176px;
|
||||||
|
top: 185px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY10{
|
||||||
|
left: 1203px;
|
||||||
|
top: 208px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY11{
|
||||||
|
left: 1233px;
|
||||||
|
top: 234px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY12{
|
||||||
|
left: 1259px;
|
||||||
|
top: 255px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY13{
|
||||||
|
left: 1288px;
|
||||||
|
top: 281px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY14{
|
||||||
|
left: 1314px;
|
||||||
|
top: 304px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY15{
|
||||||
|
left: 1344px;
|
||||||
|
top: 328px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY16{
|
||||||
|
left: 1026px;
|
||||||
|
top: 133px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY17{
|
||||||
|
left: 1058px;
|
||||||
|
top: 153px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY18{
|
||||||
|
left: 1092px;
|
||||||
|
top: 172px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY19{
|
||||||
|
left: 1124px;
|
||||||
|
top: 192px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY20{
|
||||||
|
left: 1152px;
|
||||||
|
top: 213px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY21{
|
||||||
|
left: 1181px;
|
||||||
|
top: 234px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY22{
|
||||||
|
left: 1210px;
|
||||||
|
top: 259px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY23{
|
||||||
|
left: 1237px;
|
||||||
|
top: 283px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY24{
|
||||||
|
left: 1266px;
|
||||||
|
top: 308px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY25{
|
||||||
|
left: 1292px;
|
||||||
|
top: 330px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY26{
|
||||||
|
left: 1320px;
|
||||||
|
top: 354px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY27{
|
||||||
|
left: 1213px;
|
||||||
|
top: 198px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY28{
|
||||||
|
left: 1242px;
|
||||||
|
top: 224px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY29{
|
||||||
|
left: 1268px;
|
||||||
|
top: 245px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY30{
|
||||||
|
left: 1297px;
|
||||||
|
top: 271px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY31{
|
||||||
|
left: 1324px;
|
||||||
|
top: 293px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.gcaqjc_bzt_wy_ZY32{
|
||||||
|
left: 1251px;
|
||||||
|
top: 213px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY33{
|
||||||
|
left: 1277px;
|
||||||
|
top: 234px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY34{
|
||||||
|
left: 1307px;
|
||||||
|
top: 259px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY35{
|
||||||
|
left: 1261px;
|
||||||
|
top: 202px;
|
||||||
|
}
|
||||||
|
.gcaqjc_bzt_wy_ZY36{
|
||||||
|
left: 1289px;
|
||||||
|
top: 219px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_sl_SL01{
|
||||||
|
// left: 479px;
|
||||||
|
// top: 594px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_sl_SL02{
|
||||||
|
// left: 679px;
|
||||||
|
// top: 594px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_wy_WY-G100{
|
||||||
|
// left: 394px;
|
||||||
|
// top: 376px;
|
||||||
|
// }
|
||||||
|
// .gcaqjc_bzt_wy_WY-G101{
|
||||||
|
// left: 594px;
|
||||||
|
// top: 376px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_dm_DM0234205820000010{
|
||||||
|
// left: 655px;
|
||||||
|
// top: 379px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_dm_DM0234205820000011{
|
||||||
|
// left: 555px;
|
||||||
|
// top: 379px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_dm_DM0234205820000012{
|
||||||
|
// left: 455px;
|
||||||
|
// top: 379px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_dm_DM0234205820000013{
|
||||||
|
// left: 1003px;
|
||||||
|
// top: 379px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .gcaqjc_bzt_dm_DM0234205820000014{
|
||||||
|
// left: 42px;
|
||||||
|
// top: 379px;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useState, useEffect,useMemo,useRef } from 'react'
|
import React, { useState, useEffect, useMemo, useRef } from 'react'
|
||||||
import { Table, Card,Button,message,Popconfirm } from 'antd';
|
import { Table, Card, Button, message, Popconfirm,Spin } from 'antd';
|
||||||
import ToolBar from './toolbar';
|
import ToolBar from './toolbar';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import ReactEcharts from 'echarts-for-react';
|
import ReactEcharts from 'echarts-for-react';
|
||||||
|
|
@ -12,26 +12,34 @@ import jrxOption from "./jrxOptions"
|
||||||
import { Rnd } from "react-rnd"
|
import { Rnd } from "react-rnd"
|
||||||
|
|
||||||
export default function Xmzlmb() {
|
export default function Xmzlmb() {
|
||||||
|
const typeName = {
|
||||||
|
'大坝B0+130': '1',
|
||||||
|
'大坝B0+132': '2',
|
||||||
|
'大坝B0+250': '3',
|
||||||
|
'大坝B0+252': '4',
|
||||||
|
'大坝B0+370': '5',
|
||||||
|
'大坝B0+372': '6',
|
||||||
|
}
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
|
|
||||||
const [code, setCode] = useState([])
|
const [code, setCode] = useState([])
|
||||||
const [searchVal, setSearchVal] = useState({})
|
const [searchVal, setSearchVal] = useState({})
|
||||||
const [dataSources, setDateSources] = useState([])
|
const [dataSources, setDateSources] = useState([])
|
||||||
const [table2Data, setTable2Data] = useState([])
|
|
||||||
const [dmList, setDmList] = useState([])
|
const [dmList, setDmList] = useState([])
|
||||||
const [trData, setTrData] = useState([])
|
const [trData, setTrData] = useState([])
|
||||||
const [swiper, setSwiper] = useState(false)
|
const [swiper, setSwiper] = useState(false)
|
||||||
const [timer, setTimer] = useState(100); // 定时器
|
const [timer, setTimer] = useState(100); // 定时器
|
||||||
const [dbType, setDbType] = useState('1')
|
const [dbType, setDbType] = useState('1');
|
||||||
|
const [dbType1, setDbType1] = useState('1');
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
const echartsRef = useRef(null)
|
const echartsRef = useRef(null)
|
||||||
const jrxOptions = useMemo(() => {
|
const jrxOptions = useMemo(() => {
|
||||||
if (dataSources && dbType) {
|
if (dataSources && dbType && dbType1) {
|
||||||
return jrxOption(dataSources[0],dbType)
|
return jrxOption(dataSources[0], dbType,dbType1)
|
||||||
} else {
|
} else {
|
||||||
return dataSources[0];
|
return dataSources[0];
|
||||||
}
|
}
|
||||||
}, [dataSources,dbType])
|
}, [dataSources, dbType,dbType1])
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||||
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 150, align: "center" },
|
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 150, align: "center" },
|
||||||
|
|
@ -40,56 +48,60 @@ export default function Xmzlmb() {
|
||||||
const zcColumns = [
|
const zcColumns = [
|
||||||
{
|
{
|
||||||
title: '结果分析', key: 'status', dataIndex: 'status', width: 150, align: "center",
|
title: '结果分析', key: 'status', dataIndex: 'status', width: 150, align: "center",
|
||||||
render: (rec, record) => <span style={!rec ? {color:"red"}:{}}>{rec == 1 ? "正常" : rec == 0 ? "异常" : ''}</span>
|
render: (rec, record) => <span style={!rec ? { color: "red" } : {}}>{rec == 1 ? "正常" : rec == 0 ? "异常" : ''}</span>
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const columns1 = useMemo(() => {
|
const columns1 = useMemo(() => {
|
||||||
if (trData.length > 0) {
|
if (trData.length > 0) {
|
||||||
let newCol = trData.map(s => ({
|
let newCol = trData.map(s => ({
|
||||||
title: `${s}(m)`,
|
title: `${s}(m)`,
|
||||||
key: s,
|
key: s,
|
||||||
dataIndex: s,
|
dataIndex: s,
|
||||||
width: 150,
|
width: 150,
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (rec, record) => <span>{rec || "-"}</span>
|
render: (rec, record) => <span>{rec || "-"}</span>
|
||||||
}))
|
}))
|
||||||
return [...columns,...newCol,...zcColumns];
|
return [...columns, ...newCol, ...zcColumns];
|
||||||
}
|
}
|
||||||
},[trData])
|
}, [trData])
|
||||||
const width = useMemo(() => columns1?.reduce((total, cur) => total + (cur.width), 0), [columns1]);
|
const width = useMemo(() => columns1?.reduce((total, cur) => total + (cur.width), 0), [columns1]);
|
||||||
// 单图多线以及数据表的数据
|
// 单图多线以及数据表的数据
|
||||||
const getTableData = async(params) => {
|
const getTableData = async (params) => {
|
||||||
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.gcaqjc.gcaqfx.jrx.page, params)
|
const res = await httppost2(apiurl.gcaqjc.gcaqfx.jrx.page, params)
|
||||||
let newArr = [];
|
let newArr = [];
|
||||||
let newData = res.data.map((s, i) => {
|
let newData = res.data.map((s, i) => {
|
||||||
newArr.push(s.list.map(c => ({
|
newArr.push(s.list.map(c => ({
|
||||||
[c.stationCode]: c.value || '-',
|
[c.stationCode]: c.value || '-',
|
||||||
tm: c.tm,
|
tm: c.tm,
|
||||||
|
|
||||||
})))
|
})))
|
||||||
return {
|
return {
|
||||||
tm: s.tm,
|
tm: s.tm,
|
||||||
rz: s.rz,
|
rz: s.rz,
|
||||||
status: s.status || '',
|
status: s.status || '',
|
||||||
inx:i+1
|
inx: i + 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let filterData = newArr.filter(s => s.length > 0).flat()
|
let filterData = newArr.filter(s => s.length > 0).flat()
|
||||||
let result = newData.map(s => {
|
let result = newData.map(s => {
|
||||||
let tm1 = s.tm;
|
let tm1 = s.tm;
|
||||||
let r = filterData.filter(t => {
|
let r = filterData.filter(t => {
|
||||||
return t.tm == tm1
|
return t.tm == tm1
|
||||||
})
|
})
|
||||||
let obj = {};
|
let obj = {};
|
||||||
r.forEach(s1 => {
|
r.forEach(s1 => {
|
||||||
obj = {...s1,...obj}
|
obj = { ...s1, ...obj }
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
...s,
|
...s,
|
||||||
...obj,
|
...obj,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (result.length > 0) {
|
||||||
|
setLoading(false)
|
||||||
|
}
|
||||||
// let res1 = result.map(item => ({...item,rz:(item.rz - 100).toFixed(2)})) //为了测试 最后需要删除
|
// let res1 = result.map(item => ({...item,rz:(item.rz - 100).toFixed(2)})) //为了测试 最后需要删除
|
||||||
setDateSources(result)
|
setDateSources(result)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -97,25 +109,17 @@ export default function Xmzlmb() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多图单线数据
|
|
||||||
const getTable2Data = async (params) => {
|
|
||||||
try {
|
|
||||||
const res = await httppost2(apiurl.gcaqjc.sjtjcx.czcx.list1, params)
|
|
||||||
setTable2Data(res.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
let params = {
|
let params = {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
profileName: dmList.find(s => s.id == code).projNm,
|
profileName: dmList.find(s => s.id == code).projNm,
|
||||||
stationCodes: trData,
|
stationCodes: trData,
|
||||||
id:1
|
id: 1
|
||||||
}
|
}
|
||||||
httppost5(apiurl.gcaqjc.gcaqfx.jrx.export, params).then(res => {
|
httppost5(apiurl.gcaqjc.gcaqfx.jrx.export, params).then(res => {
|
||||||
exportFile(`浸润线.xlsx`,res.data)
|
exportFile(`浸润线.xlsx`, res.data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDmList = async () => {
|
const getDmList = async () => {
|
||||||
|
|
@ -127,11 +131,11 @@ export default function Xmzlmb() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDmTree = async() => {
|
const getDmTree = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.gcaqjc.sjtjcx.czcx.tree)
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.czcx.tree)
|
||||||
let filterData = res.data.filter(s => s.profileCode == code)
|
let filterData = res.data.filter(s => s.profileCode == code)
|
||||||
setTrData(filterData[0].children)
|
setTrData(filterData[0]?.children)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +143,7 @@ export default function Xmzlmb() {
|
||||||
|
|
||||||
|
|
||||||
const InitialScroll = (data) => {
|
const InitialScroll = (data) => {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const v = document.getElementsByClassName("ant-table-body")[0];
|
const v = document.getElementsByClassName("ant-table-body")[0];
|
||||||
if (data.length >= Number(1)) {
|
if (data.length >= Number(1)) {
|
||||||
// 只有当大于10条数据的时候 才会看起滚动
|
// 只有当大于10条数据的时候 才会看起滚动
|
||||||
|
|
@ -149,9 +153,9 @@ export default function Xmzlmb() {
|
||||||
Math.ceil(v.scrollTop) >= parseFloat((v.scrollHeight - v.clientHeight).toString())
|
Math.ceil(v.scrollTop) >= parseFloat((v.scrollHeight - v.clientHeight).toString())
|
||||||
) {
|
) {
|
||||||
v.scrollTop = 0;
|
v.scrollTop = 0;
|
||||||
// setTimeout(() => { v.scrollTop = 0 }, 1000)
|
// setTimeout(() => { v.scrollTop = 0 }, 1000)
|
||||||
}
|
}
|
||||||
echartsRef.current.getEchartsInstance().setOption(jrxOption(dataSources[index % dataSources.length],dbType))
|
echartsRef.current.getEchartsInstance().setOption(jrxOption(dataSources[index % dataSources.length], dbType,dbType1))
|
||||||
index++;
|
index++;
|
||||||
}, Number(1000));
|
}, Number(1000));
|
||||||
setTimer(time); // 定时器保存变量 利于停止
|
setTimer(time); // 定时器保存变量 利于停止
|
||||||
|
|
@ -161,24 +165,7 @@ export default function Xmzlmb() {
|
||||||
const [scale, setScale] = useState(1)
|
const [scale, setScale] = useState(1)
|
||||||
const scaleRef = useRef(null)
|
const scaleRef = useRef(null)
|
||||||
scaleRef.current = scale;
|
scaleRef.current = scale;
|
||||||
// 放大
|
|
||||||
const zoomIn = () => {
|
|
||||||
const img = document.getElementById("img");
|
|
||||||
scaleRef.current += 0.05
|
|
||||||
// setScale(scaleRef.current)
|
|
||||||
img.style.transform = `scale(${scaleRef.current})`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 缩小
|
|
||||||
const zoomOut = () => {
|
|
||||||
console.log(scaleRef);
|
|
||||||
const img = document.getElementById("img");
|
|
||||||
if (scaleRef.current > 1) {
|
|
||||||
scaleRef.current -= 0.05
|
|
||||||
// setScale(scaleRef.current)
|
|
||||||
}
|
|
||||||
img.style.transform = `scale(${scaleRef.current})`;
|
|
||||||
}
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (trData.length > 0 && searchVal) {
|
if (trData.length > 0 && searchVal) {
|
||||||
let params = {
|
let params = {
|
||||||
|
|
@ -186,30 +173,33 @@ export default function Xmzlmb() {
|
||||||
...searchVal
|
...searchVal
|
||||||
}
|
}
|
||||||
getTableData(params)
|
getTableData(params)
|
||||||
getTable2Data(params)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, [trData, searchVal]);
|
}, [trData, searchVal]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (code) {
|
if (code.length) {
|
||||||
getDmTree()
|
getDmTree()
|
||||||
}
|
}
|
||||||
if (timer) {
|
if (timer) {
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
}
|
}
|
||||||
if (dmList.length > 0 && code) {
|
if (dmList.length > 0 && code.length) {
|
||||||
let name = dmList.find(s => s.id == code)?.projNm
|
let name = dmList.find(s => s.id == code)?.projNm
|
||||||
let type = name == "大坝B0+060" ? "1" :
|
let type = (name == "大坝B0+130" || name == "大坝B0+132") ? "1" :
|
||||||
name == "大坝B0+090" ? "2" :
|
(name == "大坝B0+250" || name == "大坝B0+252") ? "2" :
|
||||||
name == "大坝B0+120" ? "2" : ''
|
(name == "大坝B0+370" || name == "大坝B0+372") ? "3" : '';
|
||||||
|
let type1 = typeName[name];
|
||||||
setDbType(type)
|
setDbType(type)
|
||||||
|
setDbType1(type1)
|
||||||
}
|
}
|
||||||
}, [code])
|
}, [code, dmList])
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getDmList()
|
getDmList()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (swiper && dataSources.length > 0) {
|
if (swiper && dataSources.length > 0) {
|
||||||
InitialScroll(dataSources)
|
InitialScroll(dataSources)
|
||||||
|
|
@ -220,12 +210,11 @@ export default function Xmzlmb() {
|
||||||
clearInterval(timer); // 停止定时器
|
clearInterval(timer); // 停止定时器
|
||||||
}
|
}
|
||||||
}, [swiper, dataSources])
|
}, [swiper, dataSources])
|
||||||
|
useEffect(() => {
|
||||||
useEffect(()=>{
|
|
||||||
let scale = 1
|
let scale = 1
|
||||||
const img = document.getElementById("img");
|
const img = document.getElementById("img");
|
||||||
|
if (!img) return;
|
||||||
const fun = (e) => {
|
const fun = (e) => {
|
||||||
console.log(1111)
|
|
||||||
// 大于0:滚轮向上滚动 小于0:滚轮向下滚动
|
// 大于0:滚轮向上滚动 小于0:滚轮向下滚动
|
||||||
if (e.wheelDelta > 0) {
|
if (e.wheelDelta > 0) {
|
||||||
scale += 0.05;
|
scale += 0.05;
|
||||||
|
|
@ -241,93 +230,78 @@ export default function Xmzlmb() {
|
||||||
img.style.transform = `scale(${scale})`;
|
img.style.transform = `scale(${scale})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
img.addEventListener("wheel",fun)
|
img.addEventListener("wheel",fun)
|
||||||
return ()=>{
|
return ()=>{
|
||||||
img.removeEventListener("wheel",fun)
|
img.removeEventListener("wheel",fun)
|
||||||
}
|
}
|
||||||
|
|
||||||
},[])
|
},[loading])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='content-box' style={{ backgroundColor: '#fff', height: '100%',display:'flex',padding:'10px' }}>
|
<div className='content-box' style={{ backgroundColor: '#fff', height: '100%', display: 'flex', padding: '10px' }}>
|
||||||
<div className='lf adcdTreeSelectorBox' style={{height:'calc(100vh - 110px)',width:'260px'}}>
|
<div className='lf adcdTreeSelectorBox' style={{ height: 'calc(100vh - 110px)', width: '260px' }}>
|
||||||
<ListSelect
|
<ListSelect
|
||||||
setAdcd={setCode}
|
setAdcd={setCode}
|
||||||
listData={dmList}
|
listData={dmList}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='AdcdTreeTableBox' style={{width:'calc(100vw - 625px)'}}>
|
<div className='AdcdTreeTableBox' style={{ width: 'calc(100vw - 625px)' }}>
|
||||||
<Card
|
<Card
|
||||||
className='nonebox'
|
className='nonebox'
|
||||||
// onMouseOver={() => {
|
// onMouseOver={() => {
|
||||||
// clearInterval(timer)
|
// clearInterval(timer)
|
||||||
// }}
|
// }}
|
||||||
>
|
>
|
||||||
<ToolBar
|
<ToolBar
|
||||||
setSearchVal={setSearchVal}
|
setSearchVal={setSearchVal}
|
||||||
exportFile={exportExcel}
|
exportFile={exportExcel}
|
||||||
setSwiper={setSwiper}
|
setSwiper={setSwiper}
|
||||||
role={role}
|
role={role}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0",overflow:"hidden" }}>
|
{
|
||||||
|
!loading ? <div className="ant-card-body" style={{ padding: "20px 0 0 0", overflow: "hidden" }}>
|
||||||
<div className='body-top' style={{ height: 380, width: "100%", marginTop: 10 }} >
|
|
||||||
<Rnd
|
<div style={{ height: 420, width: "100%",overflow:'hidden',position:'relative' }} >
|
||||||
default={{
|
<Rnd
|
||||||
|
default={{
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
width: '68%',
|
width: 1305,
|
||||||
height: 380
|
height: 380
|
||||||
}}
|
}}
|
||||||
// style={{position:"relative"}}
|
>
|
||||||
|
<div id="img">
|
||||||
>
|
<div style={{ textAlign: "center", marginBottom: 10, fontSize: 20 }}>断面名称:{dmList.find(s => s.id == code)?.projNm}</div>
|
||||||
<div id="img">
|
<ReactEcharts
|
||||||
<div style={{ textAlign: "center", marginBottom: 10,fontSize:20 }}>断面名称:{ dmList.find(s => s.id == code)?.projNm}</div>
|
option={jrxOptions}
|
||||||
{/* <div style={{ position: "absolute", top: -38, right: 131,cursor:"pointer",fontWeight:700 }}>
|
style={{ width: "100%", height: 380 }}
|
||||||
<div
|
notMerge={true}
|
||||||
style={{ padding: "0px 8px", border: "1px solid #dfdfdf", textAlign: "center" }}
|
|
||||||
title='放大'
|
|
||||||
onClick={zoomIn}
|
|
||||||
>
|
|
||||||
+
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style={{ padding: "0px 8px", border: "1px solid #dfdfdf", marginTop: 5, textAlign: "center" }}
|
|
||||||
title='缩小'
|
|
||||||
onClick={zoomOut}
|
|
||||||
>
|
|
||||||
-
|
|
||||||
</div>
|
|
||||||
</div> */}
|
|
||||||
<ReactEcharts
|
|
||||||
option={jrxOptions}
|
|
||||||
style={{ width: "100%", height: 380 }}
|
|
||||||
notMerge={true}
|
|
||||||
ref={echartsRef}
|
ref={echartsRef}
|
||||||
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
</Rnd>
|
||||||
</Rnd>
|
</div>
|
||||||
</div>
|
<div className='body-top' style={{ marginTop: 30 }}>
|
||||||
<div className='body-top' style={{marginTop:60}}>
|
<Table
|
||||||
<Table
|
columns={columns1}
|
||||||
columns={columns1}
|
key="inx"
|
||||||
key="inx"
|
dataSource={dataSources}
|
||||||
dataSource={dataSources}
|
pagination={false}
|
||||||
pagination={false}
|
scroll={{ x: width, y: 250, scrollToFirstRowOnChange: true }}
|
||||||
scroll={{ x: width, y: 250, scrollToFirstRowOnChange: true }}
|
onRow={record => {
|
||||||
onRow={record => {
|
return {
|
||||||
return {
|
onClick: () => { echartsRef.current.getEchartsInstance().setOption(jrxOption(record, dbType,dbType1)) }
|
||||||
onClick:() => {echartsRef.current.getEchartsInstance().setOption(jrxOption(record,dbType))}
|
}
|
||||||
}
|
}}
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> :
|
||||||
</div>
|
<Spin size='large' style={{width:'100%',margin:'300px auto'}}></Spin>
|
||||||
</div>
|
}
|
||||||
)
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,312 +1,268 @@
|
||||||
|
|
||||||
export default function jrxOptions(data = {}, type = "1") {
|
export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
// const yMin = type == "1" ? 147 : type == "2" ? 146 : 146;
|
// debugger
|
||||||
// const yMax = type == "1" ? 209 : type == "2" ? 210 : 210;
|
const yMin = type == "3" ? 70 : type == "2" ? 67 :
|
||||||
const yMin = type == "1" ? 70 : type == "2" ? 70 : 70;
|
type == '1' ? 59 : 70;
|
||||||
const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
|
const yMax = type == "3" ? 129 : type == "2" ? 117
|
||||||
const type1 = ["SY05", "SY06", "SY07", "SY08"]
|
: type == "1" ? 118 : 150;
|
||||||
const type2 = ["SY09","SY10","SY11","SY12"]
|
const type1 = ["SY01", "SY04", "SY07", "SY16"];
|
||||||
const alltype = type == "1" ? type1 : type == "2" ? type2 : type2;
|
const type2 = ["SY10", "SY13"];
|
||||||
|
const type3 = ["SY02", "SY05", "SY08", "SY17"];
|
||||||
// 字体颜色
|
const type4 = ["SY11", "SY14"];
|
||||||
const textColor = '#666'
|
const type5 = ["SY03", "SY06", "SY09"];
|
||||||
const imageUrl060 = `${process.env.PUBLIC_URL}/assets/images/060.png `
|
const type6 = ["SY12", "SY15"];
|
||||||
const imageUrl090 = `${process.env.PUBLIC_URL}/assets/images/090.png `
|
const alltype = typeName == "1" ? type1 :
|
||||||
const imageUrl = type == "1" ? imageUrl060 :
|
typeName == "2" ? type2 :
|
||||||
type == "2" ? imageUrl090 : imageUrl090;
|
typeName == "3" ? type3 :
|
||||||
const rule = `${process.env.PUBLIC_URL}/assets/images/ruler.png `
|
typeName == "4" ? type4 :
|
||||||
// const xValue = type == "1" ? (((data?.rz - 169) + 0.75 * 14) / 0.75):
|
typeName == "5" ? type5 :
|
||||||
// type == "2" ? (((data?.rz - 169) + 0.85 * 14) / 0.85) : (((data?.rz - 169) + 0.85 * 14) / 0.85)
|
typeName == "6" ? type6 :[]
|
||||||
|
;
|
||||||
const xValue = type == "1" ? (((data?.rz - 99) + 1.1 * 13) / 1.1):
|
|
||||||
type == "2" ? (((data?.rz - 99) + 1 * 14) / 1) : (((data?.rz - 99) + 1 * 14) / 1)
|
// 字体颜色
|
||||||
|
const textColor = '#666'
|
||||||
|
const imageUrl370 = `${process.env.PUBLIC_URL}/assets/images/zb370.png `
|
||||||
|
const imageUrl250 = `${process.env.PUBLIC_URL}/assets/images/zb250.png `
|
||||||
|
const imageUrl130 = `${process.env.PUBLIC_URL}/assets/images/zb130.png `
|
||||||
|
const imageUrl = type == "1" ? imageUrl130 :
|
||||||
|
type == "2" ? imageUrl250 :
|
||||||
|
type == "3" ? imageUrl370 : imageUrl370
|
||||||
|
;
|
||||||
|
const rule = `${process.env.PUBLIC_URL}/assets/images/ruler.png `
|
||||||
|
|
||||||
|
// rz 是最上面那条线 rz1是那条贴近坝面的线 xValue求解的是最上面那条线的末尾横坐标
|
||||||
|
const xValue = type == "3" ? (((data?.rz - 86) + 0.6 * 5) / 0.6) :
|
||||||
|
type == "2" ? (((data?.rz - 87) + 0.63 * 7) / 0.63) :
|
||||||
|
type == "1" ? (((data?.rz - 88) + 0.7 * 10) / 0.7) :
|
||||||
|
(((data?.rz - 99) + 1 * 14) / 1)
|
||||||
const rz = data?.rz ?
|
const rz = data?.rz ?
|
||||||
[[xValue, data?.rz], [0, data?.rz], ] :
|
[[xValue, data?.rz], [0, data?.rz],] :
|
||||||
[]
|
[]
|
||||||
const rz1 = data?.rz ?
|
const rz1 = data?.rz ?
|
||||||
type == "1" ?
|
type == "3" ?
|
||||||
[[0, 99], [13, 99], [xValue, data?.rz]]:
|
[[0, 86], [5, 86], [xValue, data?.rz]] :
|
||||||
type == "2" ?
|
type == "2" ?
|
||||||
[[0, 99], [14, 99], [xValue, data?.rz]]
|
[[0, 87], [7, 87], [xValue, data?.rz]]
|
||||||
: [[0, 99], [14, 99], [xValue, data?.rz]]
|
:
|
||||||
:
|
type == "1" ?
|
||||||
|
[[0, 88], [10, 88], [xValue, data?.rz]]
|
||||||
|
:
|
||||||
|
[[0, 99], [14, 99], [xValue, data?.rz]]
|
||||||
|
:
|
||||||
[]
|
[]
|
||||||
|
// gz1、gz2、gz3、gz4分别为渗压管
|
||||||
const gz1 = data[alltype[0]] ?
|
const gz1 = data[alltype[0]] ?
|
||||||
type == "1" ? [[51.6, 85], [51.6, data[alltype[0]]]] :
|
type == "3" ? [[47, 101], [47, data[alltype[0]]]] :
|
||||||
type == "2" ? [[47.5, 85], [47.5, data[alltype[0]]]] :
|
type == "2" ? [[45.5, 98], [45.5, data[alltype[0]]]] :
|
||||||
|
type == "1" ? [[44, 83], [44, data[alltype[0]]]] :
|
||||||
[[47.5, 158], [85, data[alltype[0]]]]
|
[[47.5, 158], [85, data[alltype[0]]]]
|
||||||
: [];
|
: [];
|
||||||
// const gz1 = [[51.6, 85],[51.6, 91]];
|
|
||||||
// const gz2 = [[53.6, 85], [53.6, 94]];
|
|
||||||
|
|
||||||
// const gz3 = [[72.5, 90], [72.5, 95]];
|
|
||||||
// const gz4 = [[84.5, 96], [84.5, 99]];
|
|
||||||
|
|
||||||
|
|
||||||
const gz2 = data[alltype[1]] ?
|
const gz2 = data[alltype[1]] ?
|
||||||
type == "1" ? [[53.6, 85], [53.6, data[alltype[1]]]] :
|
type == "3" ? [[51, 101], [51, data[alltype[1]]]] :
|
||||||
type == "2" ? [[49.5, 85], [49.5, data[alltype[1]]]] :
|
type == "2" ? [[50, 98], [50, data[alltype[1]]]] :
|
||||||
[[53.6, 158], [53.6, data[alltype[1]]]] :
|
type == "1" ? [[51.5, 82], [51.5, data[alltype[1]]]] :
|
||||||
|
[[53.6, 158], [53.6, data[alltype[1]]]] :
|
||||||
[];
|
[];
|
||||||
|
|
||||||
const gz3 = data[alltype[2]] ?
|
const gz3 = data[alltype[2]] ?
|
||||||
type == "1" ? [[72.5, 90], [72.5, data[alltype[2]]]] :
|
type == "3" ? [[58.5, 95], [58.5, data[alltype[2]]]] :
|
||||||
type == "2" ? [[66.5, 90], [66.5, data[alltype[2]]]] :
|
type == "2" ? [[58, 92], [58, data[alltype[2]]]] :
|
||||||
|
type == "1" ? [[58, 81], [58, data[alltype[2]]]] :
|
||||||
[[73, 161], [73, data[alltype[2]]]] : [];
|
[[73, 161], [73, data[alltype[2]]]] : [];
|
||||||
|
|
||||||
|
|
||||||
const gz4 = data[alltype[3]] ?
|
const gz4 = data[alltype[3]] ?
|
||||||
type == "1" ? [[84.5, 96], [84.5, data[alltype[3]]]] :
|
type == "3" ? [] :
|
||||||
type == "2" ? [[77, 96], [77, data[alltype[3]]]] :
|
type == "2" ? [[77, 82], [77, data[alltype[3]]]] :
|
||||||
|
type == "1" ? [[79, 78], [79, data[alltype[3]]]] :
|
||||||
[[85, 166], [85, data[alltype[3]]]] : [];
|
[[85, 166], [85, data[alltype[3]]]] : [];
|
||||||
|
|
||||||
|
// 将渗压管连起来的线
|
||||||
const line = data?.rz ?
|
const line = data?.rz ?
|
||||||
type == "1" ?
|
type == "3" ?
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[51.6, data[alltype[0]]],
|
[47, data[alltype[0]]],
|
||||||
[53.6, data[alltype[1]]],
|
[51, data[alltype[1]]],
|
||||||
[72.5, data[alltype[2]]],
|
[58.5, data[alltype[2]]],
|
||||||
[84.5, data[alltype[3]]]
|
|
||||||
] :
|
] :
|
||||||
type == "2" ?
|
type == "2" ?
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[47.5, data[alltype[0]]],
|
[45.5, data[alltype[0]]],
|
||||||
[49.5, data[alltype[1]]],
|
[50, data[alltype[1]]],
|
||||||
[66.5, data[alltype[2]]],
|
[58, data[alltype[2]]],
|
||||||
[77, data[alltype[3]]]
|
[77, data[alltype[3]]]
|
||||||
] :
|
] :
|
||||||
|
type == "1"?
|
||||||
|
[
|
||||||
|
[xValue, data?.rz],
|
||||||
|
[44, data[alltype[0]]],
|
||||||
|
[51.5, data[alltype[1]]],
|
||||||
|
[58, data[alltype[2]]],
|
||||||
|
[79, data[alltype[3]]]
|
||||||
|
]:
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[51.6, data[alltype[0]]],
|
[51.6, data[alltype[0]]],
|
||||||
[53.6, data[alltype[1]]],
|
[53.6, data[alltype[1]]],
|
||||||
[73, data[alltype[2]]],
|
[73, data[alltype[2]]],
|
||||||
[85, data[alltype[3]]]
|
[85, data[alltype[3]]]
|
||||||
]
|
]
|
||||||
: []
|
: []
|
||||||
return {
|
return {
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
feature: {
|
feature: {
|
||||||
saveAsImage: {
|
saveAsImage: {
|
||||||
show: true,
|
show: true,
|
||||||
excludeComponents: ['toolbox'],
|
excludeComponents: ['toolbox'],
|
||||||
pixelRatio: 2,
|
pixelRatio: 2,
|
||||||
name:"测值图"
|
name: "测值图"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
right: "10%",
|
right: "10%",
|
||||||
top:"4%"
|
top: "4%"
|
||||||
},
|
},
|
||||||
// title: {
|
// title: {
|
||||||
// show: true,
|
// show: true,
|
||||||
// text: "断面名称",
|
// text: "断面名称",
|
||||||
// left: 'center',
|
// left: 'center',
|
||||||
// bottom: '-5%',
|
// bottom: '-5%',
|
||||||
// // textStyle: {
|
// // textStyle: {
|
||||||
// },
|
// },
|
||||||
graphic: [
|
graphic: [
|
||||||
{
|
{
|
||||||
type: 'image',
|
type: 'image',
|
||||||
// id: 'background',
|
// id: 'background',
|
||||||
left: 'center',
|
left: 'center',
|
||||||
// top: '11%',
|
// top: '11%',
|
||||||
top: 0,
|
top: 0,
|
||||||
bottom:0,
|
bottom: 0,
|
||||||
z: 1,
|
|
||||||
bounding: 'all',
|
|
||||||
style: {
|
|
||||||
image: imageUrl,
|
|
||||||
width: 1100,
|
|
||||||
height: 380
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'image',
|
|
||||||
// id: 'background',
|
|
||||||
left: '7%',
|
|
||||||
bottom:"5%",
|
|
||||||
z: 1,
|
z: 1,
|
||||||
bounding: 'all',
|
bounding: 'all',
|
||||||
style: {
|
style: {
|
||||||
image: rule,
|
image: imageUrl,
|
||||||
width: 10,
|
width: 1100,
|
||||||
height: 450
|
height: 380
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
type: 'image',
|
||||||
|
// id: 'background',
|
||||||
|
left: '7%',
|
||||||
|
bottom: "5%",
|
||||||
|
z: 1,
|
||||||
|
bounding: 'all',
|
||||||
|
style: {
|
||||||
|
image: rule,
|
||||||
|
width: 10,
|
||||||
|
height: 450
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
grid: {
|
grid: {
|
||||||
// top: '10%',
|
// top: '10%',
|
||||||
// left: '2%',
|
// left: '2%',
|
||||||
// right: '5%',
|
// right: '5%',
|
||||||
// bottom: '10%',
|
// bottom: '10%',
|
||||||
// containLabel: true
|
// containLabel: true
|
||||||
top: '0%',
|
top: '0%',
|
||||||
left: '2%',
|
left: '2%',
|
||||||
right: '5%',
|
right: '5%',
|
||||||
bottom: '0%',
|
bottom: '0%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
min: 0,
|
|
||||||
max:100,
|
|
||||||
axisLabel: {
|
|
||||||
show:false,
|
|
||||||
// 坐标轴字体颜色
|
|
||||||
color: textColor,
|
|
||||||
fontSize: 18
|
|
||||||
},
|
},
|
||||||
axisLine: {
|
xAxis: {
|
||||||
show:false,
|
min: 0,
|
||||||
lineStyle: {
|
max: 100,
|
||||||
color: textColor
|
axisLabel: {
|
||||||
}
|
show: false,
|
||||||
},
|
// 坐标轴字体颜色
|
||||||
axisTick: {
|
color: textColor,
|
||||||
// y轴刻度线
|
fontSize: 18
|
||||||
show: false
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
// 网格
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
boundaryGap: false
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
min: yMin,
|
|
||||||
max: yMax,
|
|
||||||
interval:5,
|
|
||||||
// data:[155,160,180,190,210],
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#333',
|
|
||||||
fontSize: 18,
|
|
||||||
padding: [0, 0, 0, 80]
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
// 坐标轴字体颜色
|
|
||||||
color: textColor,
|
|
||||||
fontSize: 18,
|
|
||||||
formatter: function (value, index,i) {
|
|
||||||
if (index === 0 || value === yMax) {
|
|
||||||
return ''; // 隐藏第一个刻度和最后一个刻度
|
|
||||||
} else {
|
|
||||||
return value; // 显示其他刻度
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
// y轴刻度线
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
// 网格
|
|
||||||
show: false,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#CCCCCC',
|
|
||||||
type: 'dashed'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
series: [
|
|
||||||
// 和大坝坡面重合的线 斜率为0.75
|
|
||||||
{
|
|
||||||
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
symbolSize: 10,
|
|
||||||
z: 1,
|
|
||||||
itemStyle: {
|
|
||||||
color: '#fff'
|
|
||||||
},
|
},
|
||||||
lineStyle: {
|
axisLine: {
|
||||||
color: '#fff'
|
show: false,
|
||||||
},
|
lineStyle: {
|
||||||
areaStyle: {
|
color: textColor
|
||||||
origin: "end",
|
|
||||||
color: 'rgba(0, 128, 255, 0.3)' // 设置区域填充颜色
|
|
||||||
},
|
|
||||||
data:[...rz,...rz1]
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
symbolSize: 10,
|
|
||||||
z: 1,
|
|
||||||
itemStyle: {
|
|
||||||
color: '#5487FF'
|
|
||||||
},
|
|
||||||
lineStyle: {
|
|
||||||
color: '#5487FF'
|
|
||||||
},
|
|
||||||
markPoint: {
|
|
||||||
data: [{ type: 'max',x:"20%", coord: [xValue, data?.rz] }],
|
|
||||||
symbol: 'pin',
|
|
||||||
symbolSize: [30, 10],
|
|
||||||
itemStyle: {
|
|
||||||
color: '#fff', // 标注点颜色
|
|
||||||
borderColor: '#ffa500', // 标注点边框颜色
|
|
||||||
borderWidth: 0 // 标注点边框宽度
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
show: data?.rz ? true : false, // 是否显示标签
|
|
||||||
formatter: "库水位" +data?.rz + "m", // 标签格式
|
|
||||||
color: '#5487FF', // 标签文字颜色
|
|
||||||
fontSize: 12, // 标签文字大小
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
data:rz
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
symbolSize: 10,
|
|
||||||
z: 1,
|
|
||||||
itemStyle: {
|
|
||||||
color: '#5487FF'
|
|
||||||
},
|
},
|
||||||
lineStyle: {
|
axisTick: {
|
||||||
color: '#5487FF'
|
// y轴刻度线
|
||||||
|
show: false
|
||||||
},
|
},
|
||||||
data:rz1
|
splitLine: {
|
||||||
},
|
// 网格
|
||||||
// 管位
|
show: false
|
||||||
{
|
},
|
||||||
type: 'line',
|
boundaryGap: false
|
||||||
symbol: 'none',
|
},
|
||||||
symbolSize: 10,
|
yAxis: {
|
||||||
z: 1,
|
type: 'value',
|
||||||
itemStyle: {
|
min:yMin,
|
||||||
color: '#5487FF'
|
max: yMax,
|
||||||
},
|
interval: 5,
|
||||||
lineStyle: {
|
// data:[155,160,180,190,210],
|
||||||
color: '#5487FF',
|
nameTextStyle: {
|
||||||
width:6
|
color: '#333',
|
||||||
},
|
fontSize: 18,
|
||||||
data: gz1
|
padding: [0, 0, 0, 80]
|
||||||
},
|
},
|
||||||
{
|
axisLabel: {
|
||||||
type: 'line',
|
// 坐标轴字体颜色
|
||||||
symbol: 'none',
|
color: textColor,
|
||||||
symbolSize: 10,
|
fontSize: 18,
|
||||||
z: 1,
|
formatter: function (value, index, i) {
|
||||||
itemStyle: {
|
if (index === 0 || value === yMax) {
|
||||||
color: '#5487FF'
|
return ''; // 隐藏第一个刻度和最后一个刻度
|
||||||
},
|
} else {
|
||||||
lineStyle: {
|
return value; // 显示其他刻度
|
||||||
color: '#5487FF',
|
}
|
||||||
width:6
|
}
|
||||||
},
|
},
|
||||||
data: gz2
|
axisLine: {
|
||||||
},
|
show: false
|
||||||
{
|
},
|
||||||
|
axisTick: {
|
||||||
|
// y轴刻度线
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
// 网格
|
||||||
|
show: false,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#CCCCCC',
|
||||||
|
type: 'dashed'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series: [
|
||||||
|
// 和大坝坡面重合的线 斜率为0.75
|
||||||
|
{
|
||||||
|
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'none',
|
||||||
|
symbolSize: 10,
|
||||||
|
z: 1,
|
||||||
|
itemStyle: {
|
||||||
|
color: '#fff'
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: '#fff'
|
||||||
|
},
|
||||||
|
areaStyle: {
|
||||||
|
origin: "end",
|
||||||
|
color: 'rgba(0, 128, 255, 0.3)' // 设置区域填充颜色
|
||||||
|
},
|
||||||
|
data: [...rz, ...rz1]
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
symbolSize: 10,
|
symbolSize: 10,
|
||||||
|
|
@ -315,12 +271,84 @@ return {
|
||||||
color: '#5487FF'
|
color: '#5487FF'
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#5487FF',
|
color: '#5487FF'
|
||||||
width:6
|
},
|
||||||
|
markPoint: {
|
||||||
|
data: [{ type: 'max', x: "20%", coord: [xValue, data?.rz] }],
|
||||||
|
symbol: 'pin',
|
||||||
|
symbolSize: [30, 10],
|
||||||
|
itemStyle: {
|
||||||
|
color: '#fff', // 标注点颜色
|
||||||
|
borderColor: '#ffa500', // 标注点边框颜色
|
||||||
|
borderWidth: 0 // 标注点边框宽度
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: data?.rz ? true : false, // 是否显示标签
|
||||||
|
formatter: "库水位" + data?.rz + "m", // 标签格式
|
||||||
|
color: '#5487FF', // 标签文字颜色
|
||||||
|
fontSize: 12, // 标签文字大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: rz
|
||||||
|
},
|
||||||
|
{
|
||||||
|
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'none',
|
||||||
|
symbolSize: 10,
|
||||||
|
z: 1,
|
||||||
|
itemStyle: {
|
||||||
|
color: '#5487FF'
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: '#5487FF'
|
||||||
|
},
|
||||||
|
data: rz1
|
||||||
|
},
|
||||||
|
// 管位
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'none',
|
||||||
|
symbolSize: 10,
|
||||||
|
z: 1,
|
||||||
|
itemStyle: {
|
||||||
|
color: '#5487FF'
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: '#5487FF',
|
||||||
|
width: 6
|
||||||
|
},
|
||||||
|
data: gz1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'none',
|
||||||
|
symbolSize: 10,
|
||||||
|
z: 1,
|
||||||
|
itemStyle: {
|
||||||
|
color: '#5487FF'
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: '#5487FF',
|
||||||
|
width: 6
|
||||||
|
},
|
||||||
|
data: gz2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'none',
|
||||||
|
symbolSize: 10,
|
||||||
|
z: 1,
|
||||||
|
itemStyle: {
|
||||||
|
color: '#5487FF'
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
color: '#5487FF',
|
||||||
|
width: 6
|
||||||
},
|
},
|
||||||
data: gz3
|
data: gz3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
symbolSize: 10,
|
symbolSize: 10,
|
||||||
|
|
@ -329,13 +357,13 @@ return {
|
||||||
color: '#5487FF'
|
color: '#5487FF'
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#5487FF',
|
color: '#5487FF',
|
||||||
width:6
|
width: 6
|
||||||
},
|
},
|
||||||
data: gz4
|
data: gz4
|
||||||
},
|
},
|
||||||
// 管位连接线
|
// 管位连接线
|
||||||
{
|
{
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
symbolSize: 10,
|
symbolSize: 10,
|
||||||
|
|
@ -344,11 +372,11 @@ return {
|
||||||
color: '#5487FF'
|
color: '#5487FF'
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#5487FF',
|
color: '#5487FF',
|
||||||
},
|
},
|
||||||
data: line
|
data: line
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ export default function dtOption(doubleData) {
|
||||||
const maxRz = Math.ceil(Math.max(...doubleData?.detailVos?.map(o => o.rz)))
|
const maxRz = Math.ceil(Math.max(...doubleData?.detailVos?.map(o => o.rz)))
|
||||||
const minRz = Math.floor(Math.min(...doubleData?.detailVos?.map(o => o.rz)))
|
const minRz = Math.floor(Math.min(...doubleData?.detailVos?.map(o => o.rz)))
|
||||||
const maxcy = Math.ceil(Math.max(...doubleData?.detailVos?.map(o => o.value)))
|
const maxcy = Math.ceil(Math.max(...doubleData?.detailVos?.map(o => o.value)))
|
||||||
const mincy = Math.floor(Math.max(...doubleData?.detailVos?.map(o => o.value)))
|
const mincy = Math.floor(Math.min(...doubleData?.detailVos?.map(o => o.value)))
|
||||||
console.log(maxRz,minRz,maxcy,mincy);
|
console.log(maxRz,minRz,maxcy,mincy);
|
||||||
// 字体颜色
|
// 字体颜色
|
||||||
const textColor = '#666'
|
const textColor = '#666'
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
getTable2Data(params)
|
getTable2Data(params)
|
||||||
}
|
}
|
||||||
}, [trData])
|
}, [trData,searchVal])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getDmTree()
|
getDmTree()
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
getTable2Data(params)
|
getTable2Data(params)
|
||||||
}
|
}
|
||||||
}, [trData])
|
}, [trData,searchVal])
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import apiurl from '../../../../service/apiurl';
|
||||||
import { exportFile } from '../../../../utils/tools.js';
|
import { exportFile } from '../../../../utils/tools.js';
|
||||||
import { httppost2,httppost5 } from '../../../../utils/request';
|
import { httppost2,httppost5 } from '../../../../utils/request';
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
import MyTable from './table'
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
|
|
||||||
|
|
@ -16,10 +17,10 @@ const Page = () => {
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const wyList = ["X","Y","H"]
|
const wyList = ["X","Y","H"]
|
||||||
const columns1 = [
|
const columns1 = [
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 150, align:"center"},
|
||||||
];
|
];
|
||||||
const columns2 = [
|
const columns2 = [
|
||||||
{ title: '监测日期', key: 'tm', dataIndex: 'tm', width: 150, align:"center" },
|
{ title: '监测日期', key: 'tm', dataIndex: 'tm', width: 250, align:"center" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -95,9 +96,10 @@ const Page = () => {
|
||||||
const width = useMemo(() => {
|
const width = useMemo(() => {
|
||||||
if (newCols?.length > 0) {
|
if (newCols?.length > 0) {
|
||||||
return newCols?.reduce((total, cur) => total + (cur.width), 0)
|
return newCols?.reduce((total, cur) => total + (cur.width), 0)
|
||||||
|
|
||||||
}
|
}
|
||||||
}, [newCols]);
|
}, [newCols]);
|
||||||
|
console.log('width',width);
|
||||||
|
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
let params = {
|
let params = {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
|
|
@ -112,7 +114,17 @@ const Page = () => {
|
||||||
const getTable2Data = async (params) => {
|
const getTable2Data = async (params) => {
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndwytjb.list1, params)
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndwytjb.list1, params)
|
||||||
setTable2Data(res.data)
|
const list = []
|
||||||
|
for(let i=0; i<24*3; i++){
|
||||||
|
list.push({
|
||||||
|
maxValue:'',
|
||||||
|
maxTm:'',
|
||||||
|
minValue:'',
|
||||||
|
minTm:'',
|
||||||
|
diff:'',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setTable2Data(list)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -154,7 +166,7 @@ const Page = () => {
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||||
<Table
|
{/* <Table
|
||||||
columns={newCols}
|
columns={newCols}
|
||||||
rowKey="inx"
|
rowKey="inx"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
|
@ -197,7 +209,17 @@ const Page = () => {
|
||||||
</Table.Summary>
|
</Table.Summary>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
/>
|
/> */}
|
||||||
|
{
|
||||||
|
(newCols?.length>0 && width!==undefined)?
|
||||||
|
<MyTable
|
||||||
|
columns={newCols}
|
||||||
|
dataSource={dataSource}
|
||||||
|
width={width}
|
||||||
|
loading={loading}
|
||||||
|
table2Data={table2Data}
|
||||||
|
/>:null
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,158 @@
|
||||||
|
import { Table } from 'antd';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
import ResizeObserver from 'rc-resize-observer';
|
||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
|
import { VariableSizeGrid as Grid } from 'react-window';
|
||||||
|
const VirtualTable = (props) => {
|
||||||
|
const { columns, scroll, table2Data } = props;
|
||||||
|
const [tableWidth, setTableWidth] = useState(0);
|
||||||
|
const widthColumnCount = columns.filter(({ width }) => !width).length;
|
||||||
|
const mergedColumns = columns.map((column) => {
|
||||||
|
if (column.width) {
|
||||||
|
return column;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...column,
|
||||||
|
width: Math.floor(tableWidth / widthColumnCount),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const gridRef = useRef();
|
||||||
|
const [connectObject] = useState(() => {
|
||||||
|
const obj = {};
|
||||||
|
Object.defineProperty(obj, 'scrollLeft', {
|
||||||
|
get: () => {
|
||||||
|
if (gridRef.current) {
|
||||||
|
return gridRef.current?.state?.scrollLeft;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
set: (scrollLeft) => {
|
||||||
|
if (gridRef.current) {
|
||||||
|
gridRef.current.scrollTo({
|
||||||
|
scrollLeft,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return obj;
|
||||||
|
});
|
||||||
|
const resetVirtualGrid = () => {
|
||||||
|
gridRef.current?.resetAfterIndices({
|
||||||
|
columnIndex: 0,
|
||||||
|
shouldForceUpdate: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
useEffect(() => resetVirtualGrid, [tableWidth]);
|
||||||
|
const renderVirtualList = (rawData, { scrollbarSize, ref, onScroll }) => {
|
||||||
|
ref.current = connectObject;
|
||||||
|
const totalHeight = rawData.length * 54;
|
||||||
|
return (
|
||||||
|
<Grid
|
||||||
|
ref={gridRef}
|
||||||
|
className="virtual-grid"
|
||||||
|
columnCount={mergedColumns.length}
|
||||||
|
columnWidth={(index) => {
|
||||||
|
const { width } = mergedColumns[index];
|
||||||
|
let myWidth = width
|
||||||
|
if(mergedColumns[index]?.children?.length>0){
|
||||||
|
myWidth = width*(mergedColumns[index]?.children?.length)
|
||||||
|
}
|
||||||
|
return totalHeight > scroll.y && index === mergedColumns.length - 1
|
||||||
|
? myWidth - scrollbarSize - 1
|
||||||
|
: myWidth;
|
||||||
|
}}
|
||||||
|
height={scroll.y}
|
||||||
|
rowCount={rawData.length}
|
||||||
|
rowHeight={() => 54}
|
||||||
|
width={tableWidth}
|
||||||
|
onScroll={({ scrollLeft }) => {
|
||||||
|
onScroll({
|
||||||
|
scrollLeft,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{({ columnIndex, rowIndex, style }) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={classNames('virtual-table-cell', {
|
||||||
|
'virtual-table-cell-last': columnIndex === mergedColumns.length - 1,
|
||||||
|
})}
|
||||||
|
style={{...style,textAlign:'center'}}
|
||||||
|
>
|
||||||
|
{rawData[rowIndex][mergedColumns[columnIndex].dataIndex]}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<ResizeObserver
|
||||||
|
onResize={({ width }) => {
|
||||||
|
setTableWidth(width);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Table
|
||||||
|
{...props}
|
||||||
|
className="virtual-table"
|
||||||
|
columns={mergedColumns}
|
||||||
|
pagination={false}
|
||||||
|
components={{
|
||||||
|
body: renderVirtualList,
|
||||||
|
}}
|
||||||
|
summary={(pageData) => {
|
||||||
|
return(
|
||||||
|
<Table.Summary fixed>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={0} align='center' ></Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={1} align='center'>最大值</Table.Summary.Cell>
|
||||||
|
{table2Data?.length > 0 && table2Data.map((item,i) =>
|
||||||
|
<Table.Summary.Cell index={i +1} align='center'>{item?.maxValue ?? "-"}</Table.Summary.Cell>)}
|
||||||
|
</Table.Summary.Row>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={0} align='center' ></Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={1} align='center'>日期</Table.Summary.Cell>
|
||||||
|
{table2Data?.length > 0 && table2Data.map((item,i) =>
|
||||||
|
<Table.Summary.Cell index={i +1} align='center'>{item?.maxTm?? "-"}</Table.Summary.Cell>)}
|
||||||
|
</Table.Summary.Row>
|
||||||
|
<Table.Summary.Row >
|
||||||
|
<Table.Summary.Cell index={0} align='center' className='total-col'>全年度特征值统计</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={1} align='center'>最小值</Table.Summary.Cell>
|
||||||
|
{table2Data?.length > 0 && table2Data.map((item,i) =>
|
||||||
|
<Table.Summary.Cell index={i +1} align='center'>{item?.minValue ?? "-"}</Table.Summary.Cell>)}
|
||||||
|
</Table.Summary.Row>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={0} align='center' ></Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={1} align='center'>日期</Table.Summary.Cell>
|
||||||
|
{table2Data?.length > 0 && table2Data.map((item,i) =>
|
||||||
|
<Table.Summary.Cell index={i +1} align='center'>{item?.minTm?? "-"}</Table.Summary.Cell>)}
|
||||||
|
</Table.Summary.Row>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={0} align='center' ></Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={1} align='center'>年变幅</Table.Summary.Cell>
|
||||||
|
{table2Data?.length > 0 && table2Data.map((item,i) =>
|
||||||
|
<Table.Summary.Cell index={i +1} align='center'>{item?.diff?? "-"}</Table.Summary.Cell>)}
|
||||||
|
</Table.Summary.Row>
|
||||||
|
</Table.Summary>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ResizeObserver>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const App = ({columns,dataSource,width,loading,table2Data}) => (
|
||||||
|
<VirtualTable
|
||||||
|
columns={columns}
|
||||||
|
dataSource={dataSource}
|
||||||
|
rowKey="inx"
|
||||||
|
loading={loading}
|
||||||
|
table2Data={table2Data}
|
||||||
|
pagination={false}
|
||||||
|
scroll={{
|
||||||
|
y: 450,
|
||||||
|
x: 8000,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
export default App;
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
|
||||||
|
import { Table, Card,Modal,Form,Input,Button,Row,Col,Tabs } from 'antd';
|
||||||
|
import SyPage from './sy'
|
||||||
|
import WyPage from './wy'
|
||||||
|
|
||||||
|
const Page = () => {
|
||||||
|
const [tab,setTab] = useState('1')
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className='content-root clearFloat xybm' style={{paddingRight:"0",paddingBottom:"0",paddingTop:'0'}}>
|
||||||
|
<Tabs onChange={(e)=>setTab(e)}>
|
||||||
|
<Tabs.TabPane tab='渗压监测' key='1'>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane tab='位移监测' key='2'>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
</Tabs>
|
||||||
|
{ tab==='1'?<SyPage/>:null }
|
||||||
|
{ tab==='2'?<WyPage/>:null }
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page;
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
import React,{useEffect,useState,useMemo} from 'react';
|
||||||
|
import { Form, Button, Input, Row, Col, DatePicker, Upload,message,Image,Modal,Radio, InputNumber } from 'antd';
|
||||||
|
import { formItemLayout, btnItemLayout } from '../../../../../components/crud/FormLayoutProps';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
||||||
|
import { httppost2 } from '../../../../../utils/request';
|
||||||
|
|
||||||
|
import moment from 'moment';
|
||||||
|
const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
||||||
|
console.log("record",record);
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const [dmList, setDmList] = useState([])
|
||||||
|
const [codeList, setCodeList] = useState([])
|
||||||
|
const [dmCode,setDmCode] = useState('')
|
||||||
|
|
||||||
|
const onFinish = (values) => {
|
||||||
|
if (mode === 'edit') {
|
||||||
|
onEdit(apiurl.gcaqjc.sjtjcx.sjlr.syjc.edit,{...record,...values})
|
||||||
|
}
|
||||||
|
if (mode === 'save') {
|
||||||
|
onSave(apiurl.gcaqjc.sjtjcx.sjlr.syjc.save,values)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getDmList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list)
|
||||||
|
setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStationCode = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
|
||||||
|
setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
getDmList()
|
||||||
|
getStationCode()
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Form
|
||||||
|
form={form}
|
||||||
|
{...formItemLayout}
|
||||||
|
onFinish={onFinish}
|
||||||
|
initialValues={record}
|
||||||
|
>
|
||||||
|
<Row>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="监测时间"
|
||||||
|
name="tm"
|
||||||
|
getValueFromEvent={(e,dateString) => dateString}
|
||||||
|
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||||
|
rules={[{required: true}]}
|
||||||
|
>
|
||||||
|
<DatePicker disabled={mode==='view'||mode==='edit'} format={'YYYY-MM-DD HH:mm:ss'} style={{width:'100%'}} allowClear showTime />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="监测断面"
|
||||||
|
name="profileCode"
|
||||||
|
rules={[{ required: true }]}
|
||||||
|
>
|
||||||
|
<NormalSelect
|
||||||
|
disabled={mode==='view'||mode==='edit'}
|
||||||
|
allowClear
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
options={dmList}
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('stationCode',null)
|
||||||
|
setDmCode(v)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="测点编号"
|
||||||
|
rules={[{ required: true }]}
|
||||||
|
name="stationCode"
|
||||||
|
|
||||||
|
>
|
||||||
|
<NormalSelect
|
||||||
|
disabled={mode==='view'||mode==='edit'}
|
||||||
|
allowClear
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
options={codeList.filter(o=>dmCode?o.profileCode===dmCode:true)}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="通道号"
|
||||||
|
rules={[{ required: true }]}
|
||||||
|
name="chan"
|
||||||
|
>
|
||||||
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="测压管水位(m)"
|
||||||
|
name="value"
|
||||||
|
>
|
||||||
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="渗压(KPa)"
|
||||||
|
name="press"
|
||||||
|
>
|
||||||
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="振弦(Hz)"
|
||||||
|
name="vib"
|
||||||
|
>
|
||||||
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="温度(℃)"
|
||||||
|
name="temp"
|
||||||
|
>
|
||||||
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
{
|
||||||
|
mode==='view'?null:(
|
||||||
|
<>
|
||||||
|
<Form.Item {...btnItemLayout}>
|
||||||
|
<Button type="primary" htmlType="submit">
|
||||||
|
{mode === 'save' ? '保存' :
|
||||||
|
mode === "similarSave" ? "保存" :
|
||||||
|
'修改'}
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ModalForm;
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
|
||||||
|
import BasicCrudModal from '../../../../../components/crud/BasicCrudModal';
|
||||||
|
import { Table, Card,Modal,Form,Input,Button,Row,Col,message } from 'antd';
|
||||||
|
import ModalForm from './form';
|
||||||
|
import ToolBar from './toolbar';
|
||||||
|
import { useSelector } from 'react-redux';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
import usePageTable from '../../../../../components/crud/usePageTable2';
|
||||||
|
import { createCrudService } from '../../../../../components/crud/_';
|
||||||
|
import {CrudOpRender_text} from '../../../../../components/crud/CrudOpRender';
|
||||||
|
import "./index.less"
|
||||||
|
const Page = () => {
|
||||||
|
const role = useSelector(state => state.auth.role);
|
||||||
|
const editBtn = role?.rule?.find(item => item.menuName == "编辑")||true;
|
||||||
|
const viewBtn = role?.rule?.find(item => item.menuName == "查看")||true;
|
||||||
|
const delBtn = role?.rule?.find(item => item.menuName == "删除")||true;
|
||||||
|
|
||||||
|
const refModal = useRef();
|
||||||
|
const [searchVal, setSearchVal] = useState(false)
|
||||||
|
const columns = [
|
||||||
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
||||||
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm', align:"center", },
|
||||||
|
{ title: '监测断面', key: 'profileName', dataIndex: 'profileName', align:"center", },
|
||||||
|
{ title: '测点编号', key: 'stationCode', dataIndex: 'stationCode', align:"center", },
|
||||||
|
{ title: '测压管水位(m)', key: 'value', dataIndex: 'value', align:"center", },
|
||||||
|
{ title: '渗压(KPa)', key: 'press', dataIndex: 'press', align:"center", },
|
||||||
|
{ title: '振弦(Hz)', key: 'vib', dataIndex: 'vib', align:"center", },
|
||||||
|
{ title: '温度(℃)', key: 'temp', dataIndex: 'temp', align:"center", },
|
||||||
|
{
|
||||||
|
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
|
||||||
|
render: (value, row, index) => (
|
||||||
|
<CrudOpRender_text
|
||||||
|
edit={editBtn ? true : false}
|
||||||
|
del={delBtn ? true : false}
|
||||||
|
view={viewBtn ? true : false}
|
||||||
|
command={(cmd) => () => command(cmd)(row)} />)
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
|
||||||
|
|
||||||
|
const command = (type) => (params) => {
|
||||||
|
if (type === 'save') {
|
||||||
|
refModal.current.showSave();
|
||||||
|
} else if (type === 'edit') {
|
||||||
|
refModal.current.showEdit({ ...params });
|
||||||
|
} else if (type === 'view') {
|
||||||
|
refModal.current.showView(params);
|
||||||
|
} else if (type === 'del') {
|
||||||
|
const url = apiurl.gcaqjc.sjtjcx.sjlr.syjc.del + params.stationCode+'/'+params.tm
|
||||||
|
refModal.current.onDeleteGet(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gcaqjc.sjtjcx.sjlr.syjc.page).find_noCode);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
const params = {
|
||||||
|
search: {
|
||||||
|
...searchVal,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
search(params)
|
||||||
|
}, [searchVal])
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className='lf CrudAdcdTreeTableBox' style={{ width: "100%" }}>
|
||||||
|
<Card className='nonebox'>
|
||||||
|
<ToolBar
|
||||||
|
setSearchVal={setSearchVal}
|
||||||
|
onSave={command('save')}
|
||||||
|
role={role}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
<div className="ant-card-body" style={{padding:"20px 0 0 0"}}>
|
||||||
|
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width , y: "calc( 100vh - 400px )"}}/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<BasicCrudModal
|
||||||
|
width={1000}
|
||||||
|
ref={refModal}
|
||||||
|
title="渗压监测记录"
|
||||||
|
component={ModalForm}
|
||||||
|
onCrudSuccess={refresh}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page;
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
.basic-info{
|
||||||
|
position: relative;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding:5px 25px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
&::before{
|
||||||
|
position: absolute;
|
||||||
|
top:8px;
|
||||||
|
left:0;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 5px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: #0079fe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-card,.second-card{
|
||||||
|
color: #fff;
|
||||||
|
padding:15px 120px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.first-card{
|
||||||
|
background-color: #e9df1e;
|
||||||
|
}
|
||||||
|
.second-card{
|
||||||
|
background-color: #d62f28;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,159 @@
|
||||||
|
import React, { useEffect,useState } from 'react';
|
||||||
|
import { Form, Input, Button, DatePicker } from 'antd';
|
||||||
|
import { getDictService } from '../../../../../service/SelectValue'
|
||||||
|
import AdcdFuzzyTreeSelect from '../../../../../components/Form/AdcdFuzzyTreeSelect';
|
||||||
|
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
||||||
|
import { config } from '../../../../../config';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { httppost2 } from '../../../../../utils/request';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
|
const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true;
|
||||||
|
const addBtn = role?.rule?.find(item => item.menuName == "新增")||true;
|
||||||
|
|
||||||
|
const optionsType = [
|
||||||
|
{
|
||||||
|
label: "今日",
|
||||||
|
value:1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "近一周",
|
||||||
|
value:2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"近一月",
|
||||||
|
value:3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"近三月",
|
||||||
|
value:4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"近一年",
|
||||||
|
value:5
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const [dmList, setDmList] = useState([])
|
||||||
|
const [codeList, setCodeList] = useState([])
|
||||||
|
const [dmCode,setDmCode] = useState('')
|
||||||
|
|
||||||
|
const getDmList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list)
|
||||||
|
setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStationCode = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
|
||||||
|
setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const onValuesChange = (e) => {
|
||||||
|
switch (e.ranger) {
|
||||||
|
case 1:
|
||||||
|
form.setFieldValue("tm",[moment().startOf("day"),moment()])
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(7, 'days'),moment()])
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(1, 'months'),moment()])
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(3, 'months'),moment()])
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(1, 'years'),moment()])
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
const onFinish = (values) => {
|
||||||
|
let dateSo;
|
||||||
|
if (values.tm) {
|
||||||
|
dateSo = {
|
||||||
|
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete values.tm
|
||||||
|
setSearchVal({...values, dateTimeRangeSo:dateSo});
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getDmList()
|
||||||
|
getStationCode()
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div style={{display:'flex',justifyContent:'space-between'}}>
|
||||||
|
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish} onValuesChange={onValuesChange}>
|
||||||
|
<Form.Item label="监测时间" name="tm">
|
||||||
|
<RangePicker
|
||||||
|
allowClear
|
||||||
|
style={{ width: "350px" }}
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('ranger',null)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="常用时段" name="ranger">
|
||||||
|
<NormalSelect
|
||||||
|
allowClear
|
||||||
|
style={{ width: "150px" }}
|
||||||
|
options={optionsType}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="监测断面" name="profileCode">
|
||||||
|
<NormalSelect
|
||||||
|
allowClear
|
||||||
|
style={{ width: "150px" }}
|
||||||
|
options={dmList}
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('stationCode',null)
|
||||||
|
setDmCode(v)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="测点编号" name="stationCode">
|
||||||
|
<NormalSelect
|
||||||
|
allowClear
|
||||||
|
style={{ width: "150px" }}
|
||||||
|
options={codeList.filter(o=>dmCode?o.profileCode===dmCode:true)}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
{searchBtn ?
|
||||||
|
<Form.Item>
|
||||||
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
|
</Form.Item>
|
||||||
|
:null }
|
||||||
|
<Form.Item>
|
||||||
|
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||||
|
</Form.Item>
|
||||||
|
{
|
||||||
|
(onSave && addBtn) ?
|
||||||
|
<Form.Item>
|
||||||
|
<Button onClick={onSave}>新增</Button>
|
||||||
|
</Form.Item>
|
||||||
|
:null
|
||||||
|
}
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ToolBar;
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
import React,{useEffect,useState,useMemo} from 'react';
|
||||||
|
import { Form, Button, Input, Row, Col, DatePicker, Upload,message,Image,Modal,Radio } from 'antd';
|
||||||
|
import { formItemLayout, btnItemLayout } from '../../../../../components/crud/FormLayoutProps';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
||||||
|
import { httppost2 } from '../../../../../utils/request';
|
||||||
|
|
||||||
|
import moment from 'moment';
|
||||||
|
const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
||||||
|
console.log("record",record);
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const [dmList, setDmList] = useState([])
|
||||||
|
const [codeList, setCodeList] = useState([])
|
||||||
|
const [dmCode,setDmCode] = useState('')
|
||||||
|
|
||||||
|
const onFinish = (values) => {
|
||||||
|
debugger
|
||||||
|
if (mode === 'edit') {
|
||||||
|
onEdit(apiurl.gcaqjc.sjtjcx.sjlr.wyjc.edit,{...record,...values})
|
||||||
|
}
|
||||||
|
if (mode === 'save') {
|
||||||
|
onSave(apiurl.gcaqjc.sjtjcx.sjlr.wyjc.save,values)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getDmList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list)
|
||||||
|
setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStationCode = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.wycx.list)
|
||||||
|
setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
getDmList()
|
||||||
|
getStationCode()
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Form
|
||||||
|
form={form}
|
||||||
|
{...formItemLayout}
|
||||||
|
onFinish={onFinish}
|
||||||
|
initialValues={record}
|
||||||
|
>
|
||||||
|
<Form.Item
|
||||||
|
label="监测时间"
|
||||||
|
name="tm"
|
||||||
|
getValueFromEvent={(e,dateString) => dateString}
|
||||||
|
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||||
|
rules={[{required: true}]}
|
||||||
|
>
|
||||||
|
<DatePicker disabled={mode==='view'||mode==='edit'} format={'YYYY-MM-DD HH:mm:ss'} style={{width:'100%'}} allowClear showTime />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="测点编号"
|
||||||
|
rules={[{ required: true }]}
|
||||||
|
name="stationCode"
|
||||||
|
|
||||||
|
>
|
||||||
|
<NormalSelect
|
||||||
|
disabled={mode==='view'||mode==='edit'}
|
||||||
|
allowClear
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
options={codeList}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="X方向表面位移(mm)"
|
||||||
|
name="x"
|
||||||
|
>
|
||||||
|
<Input disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="Y方向表面位移(mm)"
|
||||||
|
name="y"
|
||||||
|
>
|
||||||
|
<Input disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="H方向表面位移(mm)"
|
||||||
|
name="h"
|
||||||
|
>
|
||||||
|
<Input disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
{
|
||||||
|
mode==='view'?null:(
|
||||||
|
<>
|
||||||
|
<Form.Item {...btnItemLayout}>
|
||||||
|
<Button type="primary" htmlType="submit">
|
||||||
|
{mode === 'save' ? '保存' :
|
||||||
|
mode === "similarSave" ? "保存" :
|
||||||
|
'修改'}
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ModalForm;
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
|
||||||
|
import BasicCrudModal from '../../../../../components/crud/BasicCrudModal';
|
||||||
|
import { Table, Card,Modal,Form,Input,Button,Row,Col,message } from 'antd';
|
||||||
|
import ModalForm from './form';
|
||||||
|
import ToolBar from './toolbar';
|
||||||
|
import { useSelector } from 'react-redux';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
import usePageTable from '../../../../../components/crud/usePageTable2';
|
||||||
|
import { createCrudService } from '../../../../../components/crud/_';
|
||||||
|
import {CrudOpRender_text} from '../../../../../components/crud/CrudOpRender';
|
||||||
|
import "./index.less"
|
||||||
|
const Page = () => {
|
||||||
|
const role = useSelector(state => state.auth.role);
|
||||||
|
const editBtn = role?.rule?.find(item => item.menuName == "编辑")||true;
|
||||||
|
const viewBtn = role?.rule?.find(item => item.menuName == "查看")||true;
|
||||||
|
const delBtn = role?.rule?.find(item => item.menuName == "删除")||true;
|
||||||
|
|
||||||
|
const refModal = useRef();
|
||||||
|
const [searchVal, setSearchVal] = useState(false)
|
||||||
|
const columns = [
|
||||||
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
||||||
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm', align:"center", },
|
||||||
|
{ title: '测点编号', key: 'stationCode', dataIndex: 'stationCode', align:"center", },
|
||||||
|
{ title: 'X方向表面位移(mm)', key: 'x', dataIndex: 'x', align:"center", },
|
||||||
|
{ title: 'Y方向表面位移(mm)', key: 'y', dataIndex: 'y', align:"center", },
|
||||||
|
{ title: 'H方向表面位移(mm)', key: 'h', dataIndex: 'h', align:"center", },
|
||||||
|
{
|
||||||
|
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
|
||||||
|
render: (value, row, index) => (
|
||||||
|
<CrudOpRender_text
|
||||||
|
edit={editBtn ? true : false}
|
||||||
|
del={delBtn ? true : false}
|
||||||
|
view={viewBtn ? true : false}
|
||||||
|
command={(cmd) => () => command(cmd)(row)} />)
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
|
||||||
|
|
||||||
|
const command = (type) => (params) => {
|
||||||
|
if (type === 'save') {
|
||||||
|
refModal.current.showSave();
|
||||||
|
} else if (type === 'edit') {
|
||||||
|
refModal.current.showEdit({ ...params });
|
||||||
|
} else if (type === 'view') {
|
||||||
|
refModal.current.showView(params);
|
||||||
|
} else if (type === 'del') {
|
||||||
|
const url = apiurl.gcaqjc.sjtjcx.sjlr.wyjc.del + params.stationCode+'/'+params.tm
|
||||||
|
refModal.current.onDeleteGet(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gcaqjc.sjtjcx.sjlr.wyjc.page).find_noCode);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
const params = {
|
||||||
|
search: {
|
||||||
|
...searchVal,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
search(params)
|
||||||
|
}, [searchVal])
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className='lf CrudAdcdTreeTableBox' style={{ width: "100%" }}>
|
||||||
|
<Card className='nonebox'>
|
||||||
|
<ToolBar
|
||||||
|
setSearchVal={setSearchVal}
|
||||||
|
onSave={command('save')}
|
||||||
|
role={role}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
<div className="ant-card-body" style={{padding:"20px 0 0 0"}}>
|
||||||
|
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width , y: "calc( 100vh - 400px )"}}/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<BasicCrudModal
|
||||||
|
width={1000}
|
||||||
|
ref={refModal}
|
||||||
|
title="渗压监测记录"
|
||||||
|
component={ModalForm}
|
||||||
|
onCrudSuccess={refresh}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page;
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
.basic-info{
|
||||||
|
position: relative;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding:5px 25px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
&::before{
|
||||||
|
position: absolute;
|
||||||
|
top:8px;
|
||||||
|
left:0;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 5px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: #0079fe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-card,.second-card{
|
||||||
|
color: #fff;
|
||||||
|
padding:15px 120px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.first-card{
|
||||||
|
background-color: #e9df1e;
|
||||||
|
}
|
||||||
|
.second-card{
|
||||||
|
background-color: #d62f28;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
import React, { useEffect,useState } from 'react';
|
||||||
|
import { Form, Input, Button, DatePicker } from 'antd';
|
||||||
|
import { getDictService } from '../../../../../service/SelectValue'
|
||||||
|
import AdcdFuzzyTreeSelect from '../../../../../components/Form/AdcdFuzzyTreeSelect';
|
||||||
|
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
||||||
|
import { config } from '../../../../../config';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { httppost2 } from '../../../../../utils/request';
|
||||||
|
import apiurl from '../../../../../service/apiurl';
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
|
const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true;
|
||||||
|
const addBtn = role?.rule?.find(item => item.menuName == "新增")||true;
|
||||||
|
|
||||||
|
const optionsType = [
|
||||||
|
{
|
||||||
|
label: "今日",
|
||||||
|
value:1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "近一周",
|
||||||
|
value:2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"近一月",
|
||||||
|
value:3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"近三月",
|
||||||
|
value:4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"近一年",
|
||||||
|
value:5
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const [dmList, setDmList] = useState([])
|
||||||
|
const [codeList, setCodeList] = useState([])
|
||||||
|
const [dmCode,setDmCode] = useState('')
|
||||||
|
|
||||||
|
const getDmList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list)
|
||||||
|
setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStationCode = async () => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.wycx.list)
|
||||||
|
setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode})));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const onValuesChange = (e) => {
|
||||||
|
switch (e.ranger) {
|
||||||
|
case 1:
|
||||||
|
form.setFieldValue("tm",[moment().startOf("day"),moment()])
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(7, 'days'),moment()])
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(1, 'months'),moment()])
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(3, 'months'),moment()])
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
form.setFieldValue("tm",[moment().subtract(1, 'years'),moment()])
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
const onFinish = (values) => {
|
||||||
|
let dateSo;
|
||||||
|
if (values.tm) {
|
||||||
|
dateSo = {
|
||||||
|
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete values.tm
|
||||||
|
setSearchVal({...values, dateTimeRangeSo:dateSo});
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getDmList()
|
||||||
|
getStationCode()
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div style={{display:'flex',justifyContent:'space-between'}}>
|
||||||
|
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish} onValuesChange={onValuesChange}>
|
||||||
|
<Form.Item label="监测时间" name="tm">
|
||||||
|
<RangePicker
|
||||||
|
allowClear
|
||||||
|
style={{ width: "350px" }}
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('ranger',null)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="常用时段" name="ranger">
|
||||||
|
<NormalSelect
|
||||||
|
allowClear
|
||||||
|
style={{ width: "150px" }}
|
||||||
|
options={optionsType}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="测点编号" name="stationCode">
|
||||||
|
<NormalSelect
|
||||||
|
allowClear
|
||||||
|
style={{ width: "150px" }}
|
||||||
|
options={codeList}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
{searchBtn ?
|
||||||
|
<Form.Item>
|
||||||
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
|
</Form.Item>
|
||||||
|
:null }
|
||||||
|
<Form.Item>
|
||||||
|
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||||
|
</Form.Item>
|
||||||
|
{
|
||||||
|
(onSave && addBtn) ?
|
||||||
|
<Form.Item>
|
||||||
|
<Button onClick={onSave}>新增</Button>
|
||||||
|
</Form.Item>
|
||||||
|
:null
|
||||||
|
}
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ToolBar;
|
||||||
|
|
@ -78,6 +78,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "350px" }}
|
style={{ width: "350px" }}
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('ranger',null)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="常用时段" name="ranger">
|
<Form.Item label="常用时段" name="ranger">
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [dmList, setDmList] = useState([])
|
const [dmList, setDmList] = useState([])
|
||||||
const [codeList, setCodeList] = useState([])
|
const [codeList, setCodeList] = useState([])
|
||||||
|
const [dmCode,setDmCode] = useState('')
|
||||||
|
|
||||||
|
|
||||||
const getDmList = async () => {
|
const getDmList = async () => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -48,7 +50,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
const getStationCode = async () => {
|
const getStationCode = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
|
const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
|
||||||
setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode})));
|
setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode})));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -102,6 +104,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "350px" }}
|
style={{ width: "350px" }}
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('ranger',null)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="常用时段" name="ranger">
|
<Form.Item label="常用时段" name="ranger">
|
||||||
|
|
@ -116,13 +121,17 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "150px" }}
|
style={{ width: "150px" }}
|
||||||
options={dmList}
|
options={dmList}
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('stationCode',null)
|
||||||
|
setDmCode(v)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="测点编号" name="stationCode">
|
<Form.Item label="测点编号" name="stationCode">
|
||||||
<NormalSelect
|
<NormalSelect
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "150px" }}
|
style={{ width: "150px" }}
|
||||||
options={codeList}
|
options={codeList.filter(o=>dmCode?o.profileCode===dmCode:true)}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{searchBtn ? <Form.Item>
|
{searchBtn ? <Form.Item>
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "350px" }}
|
style={{ width: "350px" }}
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
onChange={(v)=>{
|
||||||
|
form.setFieldValue('ranger',null)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="常用时段" name="ranger">
|
<Form.Item label="常用时段" name="ranger">
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ export default function Gsnlfx() {
|
||||||
}
|
}
|
||||||
const providerWater = useMemo(() => {
|
const providerWater = useMemo(() => {
|
||||||
if (tableData[0]?.nowCap && tableData[0]?.deadCap) {
|
if (tableData[0]?.nowCap && tableData[0]?.deadCap) {
|
||||||
let num = ((tableData[0]?.nowCap - tableData[0]?.deadCap) / 10000).toFixed(2)
|
let num = (tableData[0]?.nowCap - tableData[0]?.deadCap).toFixed(2)
|
||||||
return num
|
return num
|
||||||
} else {
|
} else {
|
||||||
return "--"
|
return "--"
|
||||||
|
|
@ -87,7 +87,7 @@ export default function Gsnlfx() {
|
||||||
const res = await httpget2(apiurl.gsxl.gsWater, values)
|
const res = await httpget2(apiurl.gsxl.gsWater, values)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
setLslOpen(false);
|
setLslOpen(false);
|
||||||
setlslData((res.data / 10000).toFixed(2))
|
setlslData(res.data.toFixed(2))
|
||||||
getWaterTimeData(values)
|
getWaterTimeData(values)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ export default function drpOption (data) {
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '发电灌溉',
|
name: '灌溉用水',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const Page = () => {
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
||||||
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 200, ellipsis: true, align:"center" },
|
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 200, ellipsis: true, align:"center" },
|
||||||
{
|
{
|
||||||
title: '发电灌溉',
|
title: '灌溉用水',
|
||||||
align: "center",
|
align: "center",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +62,7 @@ const Page = () => {
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
||||||
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 100, ellipsis: true, align:"center" },
|
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 100, ellipsis: true, align:"center" },
|
||||||
{
|
{
|
||||||
title: '发电灌溉',
|
title: '灌溉用水',
|
||||||
align: "center",
|
align: "center",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
@ -266,7 +266,7 @@ const Page = () => {
|
||||||
<div style={{flex:1}}>
|
<div style={{flex:1}}>
|
||||||
<div style={{color:"#ffa87c",display:"flex",columnGap:20}}>
|
<div style={{color:"#ffa87c",display:"flex",columnGap:20}}>
|
||||||
<div className='des-title'>
|
<div className='des-title'>
|
||||||
<div>发电灌溉总合计(万m³):</div>
|
<div>灌溉用水总合计(万m³):</div>
|
||||||
<div style={{margin:"10px 0"}}>水厂取水总合计(万m³):</div>
|
<div style={{margin:"10px 0"}}>水厂取水总合计(万m³):</div>
|
||||||
<div>供水总合计(万m³):</div>
|
<div>供水总合计(万m³):</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ let title = "总计";
|
||||||
let color = ["#73a0fa", "#52c1f5"];
|
let color = ["#73a0fa", "#52c1f5"];
|
||||||
let echartData = [
|
let echartData = [
|
||||||
{
|
{
|
||||||
name: "发电灌溉",
|
name: "灌溉用水",
|
||||||
value: parseFloat(obj?.shgs?.toFixed(2))
|
value: parseFloat(obj?.shgs?.toFixed(2))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let dateSo = {
|
let dateSo = {
|
||||||
start: moment().subtract(1,"years").format('YYYY-MM-DD 00:00:00'),
|
start: moment().startOf("year").format('YYYY-MM-DD 00:00:00'),
|
||||||
end: moment().format('YYYY-MM-DD 23:59:59')
|
end: moment().format('YYYY-MM-DD 23:59:59')
|
||||||
}
|
}
|
||||||
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ const Page = () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.aqgl.aqjdtz.page).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.aqgl.aqjdtz.page).find_noCode1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 处理成功的回调
|
* @description 处理成功的回调
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
||||||
const onfinish = (values) => {
|
const onfinish = (values) => {
|
||||||
values.accidentDate = values.accidentDate?moment(values.accidentDate).format("YYYY-MM-DD 00:00:00"):''
|
values.accidentDate = values.accidentDate?moment(values.accidentDate).format("YYYY-MM-DD HH:mm:00"):''
|
||||||
values.closeCaseDate = values.closeCaseDate?moment(values.closeCaseDate).format("YYYY-MM-DD 00:00:00"):''
|
values.closeCaseDate = values.closeCaseDate?moment(values.closeCaseDate).format("YYYY-MM-DD 00:00:00"):''
|
||||||
let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) )
|
let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) )
|
||||||
let oldFiles1 = imgfileList.map(item => ({fileId:item.response?.data?.fileId}) )
|
let oldFiles1 = imgfileList.map(item => ({fileId:item.response?.data?.fileId}) )
|
||||||
|
|
@ -197,7 +197,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<DatePicker disabled={mode==='view'} format={'YYYY-MM-DD'} style={{width:'100%'}} allowClear />
|
<DatePicker disabled={mode==='view'} format={'YYYY-MM-DD HH:mm'} style={{width:'100%'}} allowClear showTime />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let dateSo = {
|
let dateSo = {
|
||||||
start: moment().subtract(1,"years").format('YYYY-MM-DD 00:00:00'),
|
start: moment().startOf("year").format('YYYY-MM-DD 00:00:00'),
|
||||||
end: moment().format('YYYY-MM-DD 23:59:59')
|
end: moment().format('YYYY-MM-DD 23:59:59')
|
||||||
}
|
}
|
||||||
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,11 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
||||||
const onfinish = (values) => {
|
const onfinish = (values) => {
|
||||||
values.eventsDate = values.eventsDate?moment(values.eventsDate).format("YYYY-MM-DD 00:00:00"):''
|
const userId = localStorage.getItem('userId')
|
||||||
|
const userName = localStorage.getItem('userName')
|
||||||
|
values.reportUserId = userId;
|
||||||
|
values.reportUserName = userName;
|
||||||
|
values.eventsDate = values.eventsDate ? moment(values.eventsDate).format("YYYY-MM-DD 00:00:00") : ''
|
||||||
let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) )
|
let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) )
|
||||||
if (mode === 'edit') {
|
if (mode === 'edit') {
|
||||||
values.files = oldFiles;
|
values.files = oldFiles;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let dateSo = {
|
let dateSo = {
|
||||||
start: moment().subtract(1,"years").format('YYYY-MM-DD 00:00:00'),
|
start: moment().startOf("year").format('YYYY-MM-DD 00:00:00'),
|
||||||
end: moment().format('YYYY-MM-DD 23:59:59')
|
end: moment().format('YYYY-MM-DD 23:59:59')
|
||||||
}
|
}
|
||||||
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ const Page = () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.aqgl.cxjgtz.page).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.aqgl.cxjgtz.page).find_noCode1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 处理成功的回调
|
* @description 处理成功的回调
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ const getResultList = async() => {
|
||||||
if (mode === 'edit') {
|
if (mode === 'edit') {
|
||||||
values.files = oldFiles;
|
values.files = oldFiles;
|
||||||
values.id = record.id;
|
values.id = record.id;
|
||||||
onEdit(apiurl.rcgl.aqgl.fxgkqd.edit,values)
|
onEdit(apiurl.rcgl.aqgl.fxgkqd.edit,{...record,...values});
|
||||||
}
|
}
|
||||||
if (mode === 'save') {
|
if (mode === 'save') {
|
||||||
values.files = oldFiles
|
values.files = oldFiles
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import apiurl from '../../../../service/apiurl';
|
||||||
import usePageTable from '../../../../components/crud/usePageTable2';
|
import usePageTable from '../../../../components/crud/usePageTable2';
|
||||||
import { createCrudService } from '../../../../components/crud/_';
|
import { createCrudService } from '../../../../components/crud/_';
|
||||||
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
|
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
|
||||||
|
import moment from 'moment';
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
|
|
@ -50,7 +50,10 @@ const Page = () => {
|
||||||
render: (value) => <span>{value ? value.map(item => item.dictNm).join():''}</span>
|
render: (value) => <span>{value ? value.map(item => item.dictNm).join():''}</span>
|
||||||
},
|
},
|
||||||
{title: '主要防范措施', key: 'preventMeasure', dataIndex: 'preventMeasure', width: 300,ellipsis: true,align: 'center',},
|
{title: '主要防范措施', key: 'preventMeasure', dataIndex: 'preventMeasure', width: 300,ellipsis: true,align: 'center',},
|
||||||
{title: '创建日期', key: 'createDate', dataIndex: 'createDate', width: 200,align: 'center',},
|
{
|
||||||
|
title: '创建日期', key: 'createDate', dataIndex: 'createDate', width: 200, align: 'center',
|
||||||
|
render: (v) => <span>{v ? moment(v).format("YYYY-MM-DD"): ''}</span>
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
|
title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
|
||||||
render: (value, row, index) => (
|
render: (value, row, index) => (
|
||||||
|
|
|
||||||
|
|
@ -157,10 +157,12 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
}, [record, mode])
|
}, [record, mode])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const name = localStorage.getItem('userName')
|
if (mode == 'save') {
|
||||||
form.setFieldValue("reportUserName", name)
|
const name = localStorage.getItem('userName')
|
||||||
form.setFieldValue("reportDate", moment())
|
form.setFieldValue("reportUserName", name)
|
||||||
}, [])
|
form.setFieldValue("reportDate", moment())
|
||||||
|
}
|
||||||
|
}, [mode])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 判断是新增还是编辑
|
// 判断是新增还是编辑
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
|
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
|
||||||
import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
|
import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
|
||||||
import { Table, Card, Modal, Form, Input, Button, Row,Col, Timeline, message, Tabs,Image } from 'antd';
|
import { Table, Card, Modal, Form, Input, Button, Row,Col, Timeline, message, Tabs,Image,Tag } from 'antd';
|
||||||
import {FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
|
import {FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import ToolBar from './toolbar';
|
import ToolBar from './toolbar';
|
||||||
|
|
@ -8,14 +8,22 @@ import ModalForm from './form';
|
||||||
import apiurl from '../../../../service/apiurl';
|
import apiurl from '../../../../service/apiurl';
|
||||||
import usePageTable from '../../../../components/crud/usePageTable2';
|
import usePageTable from '../../../../components/crud/usePageTable2';
|
||||||
import { createCrudService } from '../../../../components/crud/_';
|
import { createCrudService } from '../../../../components/crud/_';
|
||||||
|
import { httppost2 } from '../../../../utils/request';
|
||||||
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
|
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
|
||||||
|
import './index.less';
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
|
const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
|
||||||
const viewBtn = role?.rule?.find(item => item.menuName == "查看")|| true;
|
const viewBtn = role?.rule?.find(item => item.menuName == "查看")|| true;
|
||||||
const delBtn = role?.rule?.find(item => item.menuName == "删除")|| true;
|
const delBtn = role?.rule?.find(item => item.menuName == "删除") || true;
|
||||||
|
|
||||||
|
const [stats, setStats] = useState({
|
||||||
|
total: 400,
|
||||||
|
withMosquito: 14,
|
||||||
|
withoutMosquito: 382,
|
||||||
|
noData: 4
|
||||||
|
});
|
||||||
const surveyType = {
|
const surveyType = {
|
||||||
1: "日常检查排查",
|
1: "日常检查排查",
|
||||||
2: "定期普查",
|
2: "定期普查",
|
||||||
|
|
@ -33,40 +41,81 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
const refModal = useRef();
|
const refModal = useRef();
|
||||||
const [searchVal, setSearchVal] = useState({})
|
const [searchVal, setSearchVal] = useState({})
|
||||||
const columns = [
|
const [count, setCount] = useState({})
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
// const columns = [
|
||||||
{title: '填报日期', key: 'reportDate', dataIndex: 'reportDate', width: 140,},
|
// { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||||
{
|
// {title: '填报日期', key: 'reportDate', dataIndex: 'reportDate', width: 140,},
|
||||||
title: '普查类型', key: 'surveyType', dataIndex: 'surveyType', width: 200,
|
// {
|
||||||
render: (value) => <span>{value ? surveyType[value] : ''}</span>
|
// title: '普查类型', key: 'surveyType', dataIndex: 'surveyType', width: 200,
|
||||||
},
|
// render: (value) => <span>{value ? surveyType[value] : ''}</span>
|
||||||
{
|
// },
|
||||||
title: '普查方式', key: 'surveyWay', dataIndex: 'surveyWay', width: 200,
|
// {
|
||||||
render: (value) => <span>{value ? surveyWay[value] : ''}</span>
|
// title: '普查方式', key: 'surveyWay', dataIndex: 'surveyWay', width: 200,
|
||||||
|
// render: (value) => <span>{value ? surveyWay[value] : ''}</span>
|
||||||
|
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '危害情况', key: 'isHarm', dataIndex: 'isHarm', width: 200,
|
||||||
|
// render: (value, row) =>(
|
||||||
|
// <span style={row.harmNum > 0 ? { color: "red" } : {}}>{isHarm[row.harmNum > 0 ? 1 : 0]}</span>)
|
||||||
|
// },
|
||||||
|
// {title: '白蚁危害处数', key: 'harmNum', dataIndex: 'harmNum', width: 100},
|
||||||
|
// {title: '已处置处数', key: 'handleNum', dataIndex: 'handleNum', width: 100},
|
||||||
|
// {title: '上报人', key: 'reportUserName', dataIndex: 'reportUserName', width: 100},
|
||||||
|
// {
|
||||||
|
// title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
|
||||||
|
// render: (value, row, index) => (
|
||||||
|
// <CrudOpRender_text
|
||||||
|
// edit={editBtn ? true : false}
|
||||||
|
// del={delBtn ? true : false}
|
||||||
|
// view={viewBtn ? true : false}
|
||||||
|
// command={(cmd) => () => command(cmd)(row)} />)
|
||||||
|
// },
|
||||||
|
// ];
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '监测时间',
|
||||||
|
dataIndex: 'reportDate',
|
||||||
|
key: 'reportDate',
|
||||||
|
width: 180,
|
||||||
|
align:'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '危害情况', key: 'isHarm', dataIndex: 'isHarm', width: 200,
|
title: '测点编号',
|
||||||
render: (value, row) =>(
|
dataIndex: 'pileNumber',
|
||||||
<span style={row.harmNum > 0 ? { color: "red" } : {}}>{isHarm[row.harmNum > 0 ? 1 : 0]}</span>)
|
key: 'pileNumber',
|
||||||
|
width: 120,
|
||||||
|
align:'center'
|
||||||
},
|
},
|
||||||
{title: '白蚁危害处数', key: 'harmNum', dataIndex: 'harmNum', width: 100},
|
|
||||||
{title: '已处置处数', key: 'handleNum', dataIndex: 'handleNum', width: 100},
|
|
||||||
{title: '上报人', key: 'reportUserName', dataIndex: 'reportUserName', width: 100},
|
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
|
title: '有无白蚁',
|
||||||
render: (value, row, index) => (
|
dataIndex: 'isHarm',
|
||||||
<CrudOpRender_text
|
align:'center',
|
||||||
edit={editBtn ? true : false}
|
key: 'isHarm',
|
||||||
del={delBtn ? true : false}
|
width: 100,
|
||||||
view={viewBtn ? true : false}
|
render:(text, record) => {
|
||||||
command={(cmd) => () => command(cmd)(row)} />)
|
// 如果 isHarm 为 null 或 undefined,显示无
|
||||||
},
|
if (text == null) {
|
||||||
|
return <Tag color="#04d919" style={{borderRadius: '50%', padding: '4px 8px'}}>无</Tag>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 isHandle 为 null 或 undefined,当作 false 处理
|
||||||
|
const isHandle = record.isHandle ?? false;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Tag
|
||||||
|
color={text ? (isHandle ? '#04d919' : '#d9001b') : '#04d919'}
|
||||||
|
style={{borderRadius: '50%', padding: '4px 8px'}}
|
||||||
|
>
|
||||||
|
{text ? (isHandle ? '无' : '有') : '无'}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
|
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
|
||||||
|
|
||||||
const command = (type) => (params) => {
|
const command = (type) => (params) => {
|
||||||
if (type === 'save') {
|
if (type === 'save') {
|
||||||
refModal.current.showSave();
|
refModal.current.showSave();
|
||||||
|
|
@ -88,7 +137,28 @@ const Page = () => {
|
||||||
*/
|
*/
|
||||||
const successCallback = () => {
|
const successCallback = () => {
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取白蚁统计数量
|
||||||
|
const getCount = async () => {
|
||||||
|
const params = {
|
||||||
|
pageSo: {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 99999,
|
||||||
|
},
|
||||||
|
searchDate:searchVal?.searchDate
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.rcgl.byfz.bypc.count, params);
|
||||||
|
setCount(res.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
useEffect(() => {
|
||||||
|
getCount();
|
||||||
|
}, [searchVal])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchVal) {
|
if (searchVal) {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -104,12 +174,50 @@ const Page = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='content-root clearFloat xybm' style={{paddingRight:"0",paddingBottom:"0"}}>
|
<div className='content-root clearFloat xybm' style={{paddingRight:"0",paddingBottom:"0"}}>
|
||||||
<div className='lf CrudAdcdTreeTableBox' style={{width:"100%",overflowY:"auto"}}>
|
<div className='lf CrudAdcdTreeTableBox' style={{ width: "100%" }}>
|
||||||
|
<Row gutter={16} className='statsRow'>
|
||||||
|
<Col span={6}>
|
||||||
|
<div className='statItem'>
|
||||||
|
<div className='valueWrapper'>
|
||||||
|
<span className='number' style={{ color: '#722ed1' }}>{count.totalPoint}</span>
|
||||||
|
<span className="unit">个</span>
|
||||||
|
</div>
|
||||||
|
<span className='label'>总监测点数</span>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={6}>
|
||||||
|
<div className='statItem'>
|
||||||
|
<div className='valueWrapper'>
|
||||||
|
<span className='number' style={{ color: '#f5222d' }}>{count.hasAnt}</span>
|
||||||
|
<span className="unit">个</span>
|
||||||
|
</div>
|
||||||
|
<span className='label'>有白蚁</span>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={6}>
|
||||||
|
<div className='statItem'>
|
||||||
|
<div className='valueWrapper'>
|
||||||
|
<span className='number' style={{ color: '#52c41a' }}>{count.notAnt}</span>
|
||||||
|
<span className="unit">个</span>
|
||||||
|
</div>
|
||||||
|
<span className='label'>无白蚁</span>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={6}>
|
||||||
|
<div className='statItem'>
|
||||||
|
<div className='valueWrapper'>
|
||||||
|
<span className='number' style={{ color: '#8c8c8c' }}>{count.noData}</span>
|
||||||
|
<span className="unit">个</span>
|
||||||
|
</div>
|
||||||
|
<span className='label'>无数据</span>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<Card className='nonebox'>
|
<Card className='nonebox'>
|
||||||
<ToolBar
|
<ToolBar
|
||||||
setSearchVal={setSearchVal}
|
setSearchVal={setSearchVal}
|
||||||
onSave={command('save')}
|
// onSave={command('save')}
|
||||||
role={role}
|
// role={role}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,33 @@
|
||||||
.basic-info{
|
.statsRow {
|
||||||
position: relative;
|
display: flex;
|
||||||
font-size: 16px;
|
justify-content: space-between;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 24px;
|
||||||
padding:5px 25px;
|
padding: 16px;
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
&::before{
|
.statItem {
|
||||||
position: absolute;
|
|
||||||
top:8px;
|
|
||||||
left:0;
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
width: 5px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: #0079fe;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.time-line{
|
|
||||||
width: 50%;
|
|
||||||
margin-left: 6%;
|
|
||||||
margin-top: 1%;
|
|
||||||
.time-line-item{
|
|
||||||
display: flex;
|
display: flex;
|
||||||
// align-items: center;
|
flex-direction: column;
|
||||||
column-gap: 20px;
|
text-align: center;
|
||||||
.item-right{
|
align-items: center;
|
||||||
flex:1
|
.unit {
|
||||||
}
|
font-size: 14px;
|
||||||
}
|
margin-right: 8px;
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
.valueWrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
.number {
|
||||||
|
display: block;
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5,17 +5,17 @@ import moment from 'moment';
|
||||||
import NormalSelect from '../../../../components/Form/NormalSelect';
|
import NormalSelect from '../../../../components/Form/NormalSelect';
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
const addBtn = role?.rule?.find(item => item.menuName == "新增")|| true;
|
// const addBtn = role?.rule?.find(item => item.menuName == "新增")|| true;
|
||||||
const searchBtn = role?.rule?.find(item => item.menuName == "查询")|| true;
|
// const searchBtn = role?.rule?.find(item => item.menuName == "查询")|| true;
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
const onFinish = (values) => {
|
const onFinish = (values) => {
|
||||||
let dateSo;
|
let dateSo;
|
||||||
if (values.year) {
|
if (values.year) {
|
||||||
dateSo = moment(values.year).format('YYYY')
|
dateSo = moment(values.year).format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
delete values.year
|
delete values.year
|
||||||
setSearchVal({...values, year:Number(dateSo)});
|
setSearchVal({...values, searchDate:dateSo});
|
||||||
}
|
}
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
|
|
@ -31,29 +31,27 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
<>
|
<>
|
||||||
<div style={{display:'flex',justifyContent:'space-between'}}>
|
<div style={{display:'flex',justifyContent:'space-between'}}>
|
||||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||||
<Form.Item label="年份" name="year">
|
<Form.Item label="监测日期" name="year">
|
||||||
<DatePicker
|
<DatePicker
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "150px" }}
|
style={{ width: "240px" }}
|
||||||
picker="year"
|
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="危害情况" name="isHarm">
|
<Form.Item label="测点编号" name="pileNumber">
|
||||||
|
<Input
|
||||||
|
allowClear
|
||||||
|
style={{ width: "240px" }}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
{/* <Form.Item label="危害情况" name="isHarm">
|
||||||
<NormalSelect
|
<NormalSelect
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: '150px' }}
|
style={{ width: '150px' }}
|
||||||
options={[{ label: "无危害 ", value: 0 },{ label: "有危害 ", value: 1 }]} />
|
options={[{ label: "无危害 ", value: 0 },{ label: "有危害 ", value: 1 }]} />
|
||||||
</Form.Item>
|
</Form.Item> */}
|
||||||
{searchBtn ? <Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" htmlType="submit">查询</Button>
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
</Form.Item> : null }
|
</Form.Item>
|
||||||
{
|
|
||||||
(onSave && addBtn) ?
|
|
||||||
<Form.Item>
|
|
||||||
<Button onClick={onSave}>新增</Button>
|
|
||||||
</Form.Item>
|
|
||||||
:null
|
|
||||||
}
|
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ export default function Zbform({onSubmit,selectKeys}) {
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.jdkh.khmbgl.choose).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.jdkh.khmbgl.choose).find_noCode,{pageSize:9999});
|
||||||
const [tableData, setTableData] = useState([])
|
const [tableData, setTableData] = useState([])
|
||||||
const [selectedRowKeys1, setselectedRowKeys1] = useState([])
|
const [selectedRowKeys1, setselectedRowKeys1] = useState([])
|
||||||
const [zbTable, setZbtable] = useState({})
|
const [zbTable, setZbtable] = useState({})
|
||||||
|
|
@ -58,7 +58,7 @@ export default function Zbform({onSubmit,selectKeys}) {
|
||||||
|
|
||||||
|
|
||||||
const onfinish = (values) => {
|
const onfinish = (values) => {
|
||||||
const params = {
|
const params = {
|
||||||
search: {
|
search: {
|
||||||
menuId: values.menuId,
|
menuId: values.menuId,
|
||||||
name: values.name
|
name: values.name
|
||||||
|
|
@ -68,7 +68,7 @@ export default function Zbform({onSubmit,selectKeys}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择某行的回调
|
// 选择某行的回调
|
||||||
const rowChange1 = (selectedRowKeys, selectedRows, info) => {
|
const rowChange1 = (selectedRowKeys, selectedRows, info) => {
|
||||||
setselectedRowKeys1([...selectedRowKeys])
|
setselectedRowKeys1([...selectedRowKeys])
|
||||||
selectKeyRef.current = selectedRowKeys
|
selectKeyRef.current = selectedRowKeys
|
||||||
setZbtable({keys:selectedRowKeys,data:selectedRows})
|
setZbtable({keys:selectedRowKeys,data:selectedRows})
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,9 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
setSelectKeys(newData.map(item => item.id))
|
setSelectKeys(newData.map(item => item.id))
|
||||||
let total = newData.reduce((total,cur) => total + Number(cur.standardScore),0)
|
let total = newData.reduce((total,cur) => total + Number(cur.standardScore),0)
|
||||||
setStandardScore(total)
|
setStandardScore(total)
|
||||||
|
form.setFieldValue("excellentScore",(total * 0.92).toFixed(2))
|
||||||
|
form.setFieldValue("goodScore",(total * 0.85).toFixed(2))
|
||||||
|
form.setFieldValue("passScore",(total * 0.70).toFixed(2))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -136,7 +139,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
setZbOpen(false)
|
setZbOpen(false)
|
||||||
// 重新对数据做处理
|
// 重新对数据做处理
|
||||||
data.data.forEach(item => {
|
data.data.forEach(item => {
|
||||||
if (item.rowSpan) delete item.rowSpan;
|
if (item?.rowSpan) delete item.rowSpan;
|
||||||
})
|
})
|
||||||
const result = handleData(data.data, "name")
|
const result = handleData(data.data, "name")
|
||||||
let total = data.data.reduce((total,cur) => total + Number(cur.standardScore),0)
|
let total = data.data.reduce((total,cur) => total + Number(cur.standardScore),0)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const Page = () => {
|
||||||
checkedChildren="启用"
|
checkedChildren="启用"
|
||||||
unCheckedChildren="禁用"
|
unCheckedChildren="禁用"
|
||||||
checked={v == 0 ? true : false} onChange={(e) => {
|
checked={v == 0 ? true : false} onChange={(e) => {
|
||||||
onEdit(apiurl.rcgl.jdkh.khmbgl.edit,{...r, status:e ? 0 : 1})
|
onEdit(apiurl.rcgl.jdkh.khmbgl.stop,{id:r.id, status:e ? 0 : 1})
|
||||||
}} />
|
}} />
|
||||||
},
|
},
|
||||||
{title: '创建日期', key: 'createTime', dataIndex: 'createTime', width: 200,align: "center"},
|
{title: '创建日期', key: 'createTime', dataIndex: 'createTime', width: 200,align: "center"},
|
||||||
|
|
|
||||||