feat(): 测站导报率接口联调
parent
92b4c8e1bc
commit
35c7b46409
|
|
@ -24,7 +24,7 @@
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>复核系统</title>
|
<title>平台监视</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export async function findPage1(url, params = {}, type = 'post') {
|
||||||
const myParams = {
|
const myParams = {
|
||||||
pageNumber,
|
pageNumber,
|
||||||
pageSize,
|
pageSize,
|
||||||
adcd:user.adcd,
|
adcd:user?.adcd,
|
||||||
...search
|
...search
|
||||||
}
|
}
|
||||||
const result = type == 'post'?await httppost(url, myParams):await httpget(url, myParams);
|
const result = type == 'post'?await httppost(url, myParams):await httpget(url, myParams);
|
||||||
|
|
@ -39,6 +39,26 @@ export async function findPage1(url, params = {}, type = 'post') {
|
||||||
return {list: [], totalRow: 0};
|
return {list: [], totalRow: 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function findPage2(url, params = {}, type = 'post') {
|
||||||
|
const user = JSON.parse(sessionStorage.getItem('user'))
|
||||||
|
const {pageNumber, pageSize, sort, search} = params;
|
||||||
|
const myParams = {
|
||||||
|
pageNumber,
|
||||||
|
pageSize,
|
||||||
|
adcd:user?.adcd,
|
||||||
|
...search
|
||||||
|
}
|
||||||
|
const result = type == 'post'?await httppost(url, params):await httpget(url, params);
|
||||||
|
if (result && result.data) {
|
||||||
|
const {data} = result;
|
||||||
|
return {
|
||||||
|
list: data.records??data,
|
||||||
|
totalRow: data.total
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {list: [], totalRow: 0};
|
||||||
|
}
|
||||||
|
|
||||||
export async function xyt_paginate_noCode(url, params = {}) {
|
export async function xyt_paginate_noCode(url, params = {}) {
|
||||||
const {pageNumber, pageSize, ...ret} = params;
|
const {pageNumber, pageSize, ...ret} = params;
|
||||||
const pam = {
|
const pam = {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ const usePageTable = (service,service2, { defaultParams, defaultPageSize, defaul
|
||||||
// return () => { abort.current = true; }
|
// return () => { abort.current = true; }
|
||||||
// }, []);
|
// }, []);
|
||||||
|
|
||||||
const search = async(opt) => {
|
const search = async (opt) => {
|
||||||
opt = opt || {};
|
opt = opt || {};
|
||||||
setState(s => ({ ...s, loading: true }));
|
setState(s => ({ ...s, loading: true }));
|
||||||
const pageParams = {
|
const pageParams = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
const config = {
|
const config = {
|
||||||
title: '湖北省山洪灾害数据复核系统',
|
title: '湖北省山洪防治灾害',
|
||||||
shorttitle: '湖北省山洪灾害数据复核系统',
|
shorttitle: '湖北省山洪防治灾害',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|
@ -23,6 +23,7 @@ const jsapi = {
|
||||||
ptjs: {
|
ptjs: {
|
||||||
czrz: shengUrlPro + '/prod-api/baseplat-system/operlog/hb/list',
|
czrz: shengUrlPro + '/prod-api/baseplat-system/operlog/hb/list',
|
||||||
czdbl: guishiPro + '/monitor/summary',
|
czdbl: guishiPro + '/monitor/summary',
|
||||||
|
resource:guishiPro + '/resource/page',
|
||||||
treeList:shengUrlPro + "/prod-api/baseplat-basic/hb/village/getChild/"
|
treeList:shengUrlPro + "/prod-api/baseplat-basic/hb/village/getChild/"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,99 +181,100 @@ const session = {
|
||||||
//根据权限判断应该展示哪些菜单
|
//根据权限判断应该展示哪些菜单
|
||||||
const myMenu = [
|
const myMenu = [
|
||||||
// { id: 100, path: "/home", parent_id: -1, name: "首页", type: 0, order: 1 },
|
// { id: 100, path: "/home", parent_id: -1, name: "首页", type: 0, order: 1 },
|
||||||
{
|
// {
|
||||||
id: 201, redirect: "/xzqh/xzqhbg", parent_id: -1, name: "行政区划", type: 1, order: 1, children: [
|
// id: 201, redirect: "/xzqh/xzqhbg", parent_id: -1, name: "行政区划", type: 1, order: 1, children: [
|
||||||
{ id: 202, path: "/xzqh/xzqhbg", parent_id: 500, name: "行政区划变更", type: 0, order: 1,disadlevel:[0,1] },
|
// { id: 202, path: "/xzqh/xzqhbg", parent_id: 500, name: "行政区划变更", type: 0, order: 1,disadlevel:[0,1] },
|
||||||
{ id: 203, path: "/xzqh/yhjmwh", parent_id: 500, name: "沿河居民维护", type: 0, order: 1, },
|
// { id: 203, path: "/xzqh/yhjmwh", parent_id: 500, name: "沿河居民维护", type: 0, order: 1, },
|
||||||
{ id: 204, path: "/xzqh/xzqhcx", parent_id: 500, name: "行政区划查询", type: 0, order: 1, },
|
// { id: 204, path: "/xzqh/xzqhcx", parent_id: 500, name: "行政区划查询", type: 0, order: 1, },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 301, redirect: "/yagl/yabg", parent_id: -1, name: "预案管理", type: 1, order: 1, children: [
|
// id: 301, redirect: "/yagl/yabg", parent_id: -1, name: "预案管理", type: 1, order: 1, children: [
|
||||||
{ id: 302, path: "/yagl/yabg", parent_id: 500, name: "预案变更", type: 0, order: 1 },
|
// { id: 302, path: "/yagl/yabg", parent_id: 500, name: "预案变更", type: 0, order: 1 },
|
||||||
{ id: 303, path: "/yagl/yatjcx", parent_id: 500, name: "预案查询", type: 0, order: 1 },
|
// { id: 303, path: "/yagl/yatjcx", parent_id: 500, name: "预案查询", type: 0, order: 1 },
|
||||||
{ id: 304, path: "/yagl/yatjtj", parent_id: 500, name: "预案统计", type: 0, order: 1 },
|
// { id: 304, path: "/yagl/yatjtj", parent_id: 500, name: "预案统计", type: 0, order: 1 },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 401, redirect: "/fyzrr/zrrbg", parent_id: -1, name: "防御责任人", type: 1, order: 1, children: [
|
// id: 401, redirect: "/fyzrr/zrrbg", parent_id: -1, name: "防御责任人", type: 1, order: 1, children: [
|
||||||
{ id: 402, path: "/fyzrr/zrrbg", parent_id: 500, name: "防御责任人变更", type: 0, order: 1,disadlevel:[0,1] },
|
// { id: 402, path: "/fyzrr/zrrbg", parent_id: 500, name: "防御责任人变更", type: 0, order: 1,disadlevel:[0,1] },
|
||||||
{ id: 403, path: "/fyzrr/zrrcx", parent_id: 500, name: "防御责任人查询", type: 0, order: 1, },
|
// { id: 403, path: "/fyzrr/zrrcx", parent_id: 500, name: "防御责任人查询", type: 0, order: 1, },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 501, redirect: "/jczd/zdbg", parent_id: -1, name: "监测站点", type: 1, order: 1, children: [
|
// id: 501, redirect: "/jczd/zdbg", parent_id: -1, name: "监测站点", type: 1, order: 1, children: [
|
||||||
{ id: 502, path: "/jczd/zdbg", parent_id: 500, name: "自动监测站点变更", type: 0, order: 1,disadlevel:[0,1] },
|
// { id: 502, path: "/jczd/zdbg", parent_id: 500, name: "自动监测站点变更", type: 0, order: 1,disadlevel:[0,1] },
|
||||||
{ id: 503, path: "/jczd/zdsp", parent_id: 500, name: "自动监测站点复核审批", type: 0, order: 1,disadlevel:[0,2,3,4,5] },
|
// { id: 503, path: "/jczd/zdsp", parent_id: 500, name: "自动监测站点复核审批", type: 0, order: 1,disadlevel:[0,2,3,4,5] },
|
||||||
{ id: 504, path: "/jczd/zdcx", parent_id: 500, name: "自动监测站点查询", type: 0, order: 1 },
|
// { id: 504, path: "/jczd/zdcx", parent_id: 500, name: "自动监测站点查询", type: 0, order: 1 },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 601, redirect: "/wxq/wxqbg", parent_id: -1, name: "危险区", type: 1, order: 1, children: [
|
// id: 601, redirect: "/wxq/wxqbg", parent_id: -1, name: "危险区", type: 1, order: 1, children: [
|
||||||
{ id: 602, path: "/wxq/wxqbg", parent_id: 500, name: "危险区变更", type: 0, order: 1,disadlevel:[0,1] },
|
// { id: 602, path: "/wxq/wxqbg", parent_id: 500, name: "危险区变更", type: 0, order: 1,disadlevel:[0,1] },
|
||||||
{ id: 603, path: "/wxq/wxqsp", parent_id: 500, name: "危险区复核审批", type: 0, order: 1,disadlevel:[0,2,3,4,5] },
|
// { id: 603, path: "/wxq/wxqsp", parent_id: 500, name: "危险区复核审批", type: 0, order: 1,disadlevel:[0,2,3,4,5] },
|
||||||
{ id: 604, path: "/wxq/wxqcx", parent_id: 500, name: "危险区查询", type: 0, order: 1 },
|
// { id: 604, path: "/wxq/wxqcx", parent_id: 500, name: "危险区查询", type: 0, order: 1 },
|
||||||
|
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 701, redirect: "/fzc/fzccx", parent_id: -1, name: "防治村", type: 1, order: 1, children: [
|
// id: 701, redirect: "/fzc/fzccx", parent_id: -1, name: "防治村", type: 1, order: 1, children: [
|
||||||
{ id: 702, path: "/fzc/fzccx", parent_id: 500, name: "防治村查询", type: 0, order: 1 },
|
// { id: 702, path: "/fzc/fzccx", parent_id: 500, name: "防治村查询", type: 0, order: 1 },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
id: 801, redirect: "/Yjyz/Bg", parent_id: -1, name: "预警阈值", type: 1, order: 1, children: [
|
// id: 801, redirect: "/Yjyz/Bg", parent_id: -1, name: "预警阈值", type: 1, order: 1, children: [
|
||||||
{ id: 802, path: "/Yjyz/Bg", parent_id: 500, name: "预警阈值变更", type: 0, order: 1,disadlevel:[0,1] },
|
// { id: 802, path: "/Yjyz/Bg", parent_id: 500, name: "预警阈值变更", type: 0, order: 1,disadlevel:[0,1] },
|
||||||
{ id: 803, path: "/Yjyz/Sp", parent_id: 500, name: "预警阈值复核审批", type: 0, order: 1,disadlevel:[0,2,3,4,5] },
|
// { id: 803, path: "/Yjyz/Sp", parent_id: 500, name: "预警阈值复核审批", type: 0, order: 1,disadlevel:[0,2,3,4,5] },
|
||||||
{ id: 804, path: "/Yjyz/Cx", parent_id: 500, name: "预警阈值查询", type: 0, order: 1 },
|
// { id: 804, path: "/Yjyz/Cx", parent_id: 500, name: "预警阈值查询", type: 0, order: 1 },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 901, redirect: "/Yjgx/Bg", parent_id: -1, name: "预警关系", type: 1, order: 1, children: [
|
// id: 901, redirect: "/Yjgx/Bg", parent_id: -1, name: "预警关系", type: 1, order: 1, children: [
|
||||||
{ id: 902, path: "/Yjgx/Bg", parent_id: 500, name: "预警对象与测站关系变更", type: 0, order: 1,disadlevel:[0,1] },
|
// { id: 902, path: "/Yjgx/Bg", parent_id: 500, name: "预警对象与测站关系变更", type: 0, order: 1,disadlevel:[0,1] },
|
||||||
{ id: 904, path: "/Yjgx/Sp", parent_id: 500, name: "预警对象与测站关系变更审批", type: 0, order: 1 ,disadlevel:[0,2,3,4,5]},
|
// { id: 904, path: "/Yjgx/Sp", parent_id: 500, name: "预警对象与测站关系变更审批", type: 0, order: 1 ,disadlevel:[0,2,3,4,5]},
|
||||||
{ id: 903, path: "/Yjgx/Cx", parent_id: 500, name: "预警对象与测站关系查询", type: 0, order: 1 },
|
// { id: 903, path: "/Yjgx/Cx", parent_id: 500, name: "预警对象与测站关系查询", type: 0, order: 1 },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 101, redirect: "/Xly/Bg", parent_id: -1, name: "小流域", type: 1, order: 1, children: [
|
// id: 101, redirect: "/Xly/Bg", parent_id: -1, name: "小流域", type: 1, order: 1, children: [
|
||||||
{ id: 102, path: "/Xly/Bg", parent_id: 500, name: "小流域变更", type: 0, order: 1, },
|
// { id: 102, path: "/Xly/Bg", parent_id: 500, name: "小流域变更", type: 0, order: 1, },
|
||||||
{ id: 103, path: "/Xly/Bdgx", parent_id: 500, name: "小流域与行政区关系变更", type: 0, order: 1 ,},
|
// { id: 103, path: "/Xly/Bdgx", parent_id: 500, name: "小流域与行政区关系变更", type: 0, order: 1 ,},
|
||||||
{ id: 104, path: "/Xly/Cgbb", parent_id: 500, name: "成果报表", type: 0, order: 1 , children:[
|
// { id: 104, path: "/Xly/Cgbb", parent_id: 500, name: "成果报表", type: 0, order: 1 , children:[
|
||||||
{ id: 105, path: "/Xly/Cgbb/Fzdx", parent_id: 500, name: "防治对象", type: 0, order: 1 },
|
// { id: 105, path: "/Xly/Cgbb/Fzdx", parent_id: 500, name: "防治对象", type: 0, order: 1 },
|
||||||
{ id: 106, path: "/Xly/Cgbb/Dccg2", parent_id: 500, name: "跨沟调查成果", type: 0, order: 1 },
|
// { id: 106, path: "/Xly/Cgbb/Dccg2", parent_id: 500, name: "跨沟调查成果", type: 0, order: 1 },
|
||||||
{ id: 107, path: "/Xly/Cgbb/Dccg3", parent_id: 500, name: "沟滩占地情况", type: 0, order: 1 },
|
// { id: 107, path: "/Xly/Cgbb/Dccg3", parent_id: 500, name: "沟滩占地情况", type: 0, order: 1 },
|
||||||
// { id: 108, path: "/Xly/Cgbb/Dccg4", parent_id: 500, name: "外洪顶托集镇及村落", type: 0, order: 1 },
|
// // { id: 108, path: "/Xly/Cgbb/Dccg4", parent_id: 500, name: "外洪顶托集镇及村落", type: 0, order: 1 },
|
||||||
{ id: 109, path: "/Xly/Cgbb/Dccg5", parent_id: 500, name: "重点关注对象", type: 0, order: 1 },
|
// { id: 109, path: "/Xly/Cgbb/Dccg5", parent_id: 500, name: "重点关注对象", type: 0, order: 1 },
|
||||||
{ id: 110, path: "/Xly/Cgbb/Fwjg", parent_id: 500, name: "房屋结构", type: 0, order: 1 },
|
// { id: 110, path: "/Xly/Cgbb/Fwjg", parent_id: 500, name: "房屋结构", type: 0, order: 1 },
|
||||||
{ id: 111, path: "/Xly/Cgbb/Wxdj", parent_id: 500, name: "危险地建", type: 0, order: 1 },
|
// { id: 111, path: "/Xly/Cgbb/Wxdj", parent_id: 500, name: "危险地建", type: 0, order: 1 },
|
||||||
{ id: 112, path: "/Xly/Cgbb/Yhd", parent_id: 500, name: "隐患点名录", type: 0, order: 1 },
|
// { id: 112, path: "/Xly/Cgbb/Yhd", parent_id: 500, name: "隐患点名录", type: 0, order: 1 },
|
||||||
{ id: 113, path: "/Xly/Cgbb/Hsxc", parent_id: 500, name: "历史山洪灾害现场", type: 0, order: 1 },
|
// { id: 113, path: "/Xly/Cgbb/Hsxc", parent_id: 500, name: "历史山洪灾害现场", type: 0, order: 1 },
|
||||||
{ id: 114, path: "/Xly/Cgbb/RelativeFzdx", parent_id: 500, name: "防治对象关联站点", type: 0, order: 1 },
|
// { id: 114, path: "/Xly/Cgbb/RelativeFzdx", parent_id: 500, name: "防治对象关联站点", type: 0, order: 1 },
|
||||||
{ id: 115, path: "/Xly/Cgbb/Hjm", parent_id: 500, name: "后河小流域横断面", type: 0, order: 1 },
|
// { id: 115, path: "/Xly/Cgbb/Hjm", parent_id: 500, name: "后河小流域横断面", type: 0, order: 1 },
|
||||||
{ id: 116, path: "/Xly/Cgbb/Zjm", parent_id: 500, name: "后河小流域纵断面", type: 0, order: 1 },
|
// { id: 116, path: "/Xly/Cgbb/Zjm", parent_id: 500, name: "后河小流域纵断面", type: 0, order: 1 },
|
||||||
{ id: 117, path: "/Xly/Cgbb/Wjsc", parent_id: 500, name: "文件上传", type: 0, order: 1 },
|
// { id: 117, path: "/Xly/Cgbb/Wjsc", parent_id: 500, name: "文件上传", type: 0, order: 1 },
|
||||||
]},
|
// ]},
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 111, redirect: "/fhrz/xzqh", parent_id: -1, name: "复核日志", type: 1, order: 1, children: [
|
// id: 111, redirect: "/fhrz/xzqh", parent_id: -1, name: "复核日志", type: 1, order: 1, children: [
|
||||||
{ id: 112, path: "/fhrz/xzqh", parent_id: 500, name: "行政区划", type: 0, order: 1 },
|
// { id: 112, path: "/fhrz/xzqh", parent_id: 500, name: "行政区划", type: 0, order: 1 },
|
||||||
{ id: 113, path: "/fhrz/yhjm", parent_id: 500, name: "沿河居民户", type: 0, order: 1 },
|
// { id: 113, path: "/fhrz/yhjm", parent_id: 500, name: "沿河居民户", type: 0, order: 1 },
|
||||||
{ id: 114, path: "/fhrz/yuan", parent_id: 500, name: "预案", type: 0, order: 1 },
|
// { id: 114, path: "/fhrz/yuan", parent_id: 500, name: "预案", type: 0, order: 1 },
|
||||||
{ id: 115, path: "/fhrz/fyzrr", parent_id: 500, name: "防御责任人", type: 0, order: 1 },
|
// { id: 115, path: "/fhrz/fyzrr", parent_id: 500, name: "防御责任人", type: 0, order: 1 },
|
||||||
{ id: 116, path: "/fhrz/jczd", parent_id: 500, name: "监测站点", type: 0, order: 1 },
|
// { id: 116, path: "/fhrz/jczd", parent_id: 500, name: "监测站点", type: 0, order: 1 },
|
||||||
{ id: 117, path: "/fhrz/wxq", parent_id: 500, name: "危险区", type: 0, order: 1 },
|
// { id: 117, path: "/fhrz/wxq", parent_id: 500, name: "危险区", type: 0, order: 1 },
|
||||||
{ id: 118, path: "/fhrz/yjyz", parent_id: 500, name: "预警阈值", type: 0, order: 1 },
|
// { id: 118, path: "/fhrz/yjyz", parent_id: 500, name: "预警阈值", type: 0, order: 1 },
|
||||||
{ id: 119, path: "/fhrz/yjgx", parent_id: 500, name: "预警关系", type: 0, order: 1 },
|
// { id: 119, path: "/fhrz/yjgx", parent_id: 500, name: "预警关系", type: 0, order: 1 },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
id:121, redirect: "/ptjs/czrz", parent_id: -1, name: "平台监视", type: 1, order: 1, children: [
|
id:121, redirect: "/ptjs/czrz", parent_id: -1, name: "平台监视", type: 1, order: 1, children: [
|
||||||
{ id: 402, path: "/ptjs/czrz", parent_id: 500, name: "操作日志", type: 0, order: 1},
|
{ id: 402, path: "/ptjs/czrz", parent_id: 500, name: "操作日志", type: 0, order: 1},
|
||||||
{ id: 403, path: "/ptjs/czdbl", parent_id: 500, name: "测站到报率", type: 0, order: 1},
|
{ id: 403, path: "/ptjs/czdbl", parent_id: 500, name: "测站到报率", type: 0, order: 1},
|
||||||
|
{ id: 404, path: "/ptjs/zysy", parent_id: 500, name: "资源使用", type: 0, order: 1},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ const routes = [
|
||||||
// 测站到报率
|
// 测站到报率
|
||||||
{ path: '/ptjs/czdbl', exact: true, component: lazy(() => import('./views/Ptjs/Czdbl')) },
|
{ path: '/ptjs/czdbl', exact: true, component: lazy(() => import('./views/Ptjs/Czdbl')) },
|
||||||
|
|
||||||
|
// 资源使用
|
||||||
|
{ path: '/ptjs/zysy', exact: true, component: lazy(() => import('./views/Ptjs/Zysy')) },
|
||||||
//监测站点
|
//监测站点
|
||||||
{ path: '/jczd/zdbg', exact: true, component: lazy(() => import('./views/Jczd/Bg')) },
|
{ path: '/jczd/zdbg', exact: true, component: lazy(() => import('./views/Jczd/Bg')) },
|
||||||
{ path: '/jczd/zdsp', exact: true, component: lazy(() => import('./views/Jczd/Sp')) },
|
{ path: '/jczd/zdsp', exact: true, component: lazy(() => import('./views/Jczd/Sp')) },
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,13 @@ export default function dblOption(sellist,selday) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: {
|
// title: {
|
||||||
text: '日到报率详情',
|
// text: '日到报率详情',
|
||||||
textStyle: {
|
// textStyle: {
|
||||||
fontSize: 16
|
// fontSize: 16
|
||||||
},
|
// },
|
||||||
left: 'center'
|
// left: 'center'
|
||||||
},
|
// },
|
||||||
color: ['#1fbcd2', '#a23746'],
|
color: ['#1fbcd2', '#a23746'],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
formatter: '{b}, {c}%'
|
formatter: '{b}, {c}%'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@ import { Card, message, Table, Space, Button, Spin, Tree } from 'antd';
|
||||||
import ToolBar from './toolbar.js';
|
import ToolBar from './toolbar.js';
|
||||||
import ToolBottom from './toolBottom.js';
|
import ToolBottom from './toolBottom.js';
|
||||||
import apiurl from '../../../models/apiurl'
|
import apiurl from '../../../models/apiurl'
|
||||||
import { xyt_httpget2 } from "../../../utils/request"
|
import { xyt_httpget2, httpPostFile } from "../../../utils/request";
|
||||||
|
import { exportFile } from '../../../utils/tools'
|
||||||
import { resJson } from './res.js';
|
import { resJson } from './res.js';
|
||||||
import ReactEcharts from 'echarts-for-react';
|
import ReactEcharts from 'echarts-for-react';
|
||||||
import qsOption from './qsOption.js'
|
import qsOption from './qsOption.js'
|
||||||
|
|
@ -24,11 +25,11 @@ export default function Czrz() {
|
||||||
const [subTableData, setSubTableData] = useState([])
|
const [subTableData, setSubTableData] = useState([])
|
||||||
const qsoptions = useMemo(() => {
|
const qsoptions = useMemo(() => {
|
||||||
if (dayArr.length > 0 && selectedObject) {
|
if (dayArr.length > 0 && selectedObject) {
|
||||||
return qsOption(dayArr, selectedObject, hbobj)
|
return qsOption(dayArr, selectedObject, hbobj, adcdList)
|
||||||
} else {
|
} else {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
}, [dayArr, selectedObject, hbobj])
|
}, [dayArr, selectedObject, hbobj, adcdList])
|
||||||
|
|
||||||
const dblOptions = useMemo(() => {
|
const dblOptions = useMemo(() => {
|
||||||
if (subTableData.length > 0 && SearchBottom) {
|
if (subTableData.length > 0 && SearchBottom) {
|
||||||
|
|
@ -52,7 +53,7 @@ export default function Czrz() {
|
||||||
title: '行政区划',
|
title: '行政区划',
|
||||||
dataIndex: 'adnm',
|
dataIndex: 'adnm',
|
||||||
key: 'adnm',
|
key: 'adnm',
|
||||||
width: 100,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -431,7 +432,6 @@ export default function Czrz() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 子表格数据
|
// 子表格数据
|
||||||
|
|
||||||
const filterSondata = (selectedObj, type, adlist, selday) => {
|
const filterSondata = (selectedObj, type, adlist, selday) => {
|
||||||
const sellist = [];
|
const sellist = [];
|
||||||
if (selectedObj && type != 'province') {
|
if (selectedObj && type != 'province') {
|
||||||
|
|
@ -470,6 +470,14 @@ export default function Czrz() {
|
||||||
|
|
||||||
setSubTableData(sellist)
|
setSubTableData(sellist)
|
||||||
}
|
}
|
||||||
|
// 下载测站离线表
|
||||||
|
const download = () => {
|
||||||
|
// httpPostFile(apiurl.service.yjgx.downLoad, params).then((res) => {
|
||||||
|
// if (res) {
|
||||||
|
// exportFile('测站离线表.xlsx', res.data)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchVal) {
|
if (searchVal) {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -492,6 +500,7 @@ export default function Czrz() {
|
||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (!selectObj) return
|
||||||
selectObj.isBl = selectObj?.adcd.substring(4) != '00000000' ? true : false
|
selectObj.isBl = selectObj?.adcd.substring(4) != '00000000' ? true : false
|
||||||
const type = selectObj?.adcd == '420000000000' ? 'province' : 'city'
|
const type = selectObj?.adcd == '420000000000' ? 'province' : 'city'
|
||||||
// const type = 'province';
|
// const type = 'province';
|
||||||
|
|
@ -521,22 +530,27 @@ export default function Czrz() {
|
||||||
|
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<div className='right'>
|
<div className='right' style={{ overflow: "auto" }}>
|
||||||
|
|
||||||
<Card style={{ display: 'flex', flexDirection: 'column' }}>
|
<Card style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
<div className='flex' style={{ alignItems: 'center', marginRight: 10,marginBottom:20 }}>
|
<div className='flex' style={{ alignItems: 'center', marginRight: 10, marginBottom: 20 }}>
|
||||||
<img src={require('../../../assets/images/panelTitle.png')} style={{ marginRight: 5 }}></img>
|
<img src={require('../../../assets/images/panelTitle.png')} style={{ marginRight: 5 }}></img>
|
||||||
<span style={{fontSize:16,fontWeight:'bold'}}>测站到报率</span>
|
<span style={{ fontSize: 16, fontWeight: 'bold' }}>测站到报率</span>
|
||||||
</div>
|
</div>
|
||||||
<ToolBar
|
<ToolBar
|
||||||
setToolVal={setSearchVal}
|
setToolVal={setSearchVal}
|
||||||
/>
|
/>
|
||||||
<div style={{ display: 'flex', columnGap: 20 }}>
|
<div style={{ display: 'flex', columnGap: 20, position: 'relative' }}>
|
||||||
|
{!loading &&
|
||||||
|
<>
|
||||||
|
<div style={{ position: 'absolute', left: '22%', fontSize: 16, fontWeight: 700 }}>到报率变化趋势</div>
|
||||||
|
<div style={{ position: 'absolute', right: '22%', fontSize: 16, fontWeight: 700 }}>日到报率详情</div></>
|
||||||
|
}
|
||||||
<div style={{ marginTop: 20, width: '50%' }}>
|
<div style={{ marginTop: 20, width: '50%' }}>
|
||||||
{
|
{
|
||||||
!loading ?
|
!loading ?
|
||||||
<>
|
<>
|
||||||
<div style={{ width: '100%', height: 400 }}>
|
<div style={{ width: '100%', height: 440 }}>
|
||||||
<ReactEcharts option={qsoptions} style={{ width: "100%", height: '100%' }} notMerge={true} />
|
<ReactEcharts option={qsoptions} style={{ width: "100%", height: '100%' }} notMerge={true} />
|
||||||
</div>
|
</div>
|
||||||
<Table
|
<Table
|
||||||
|
|
@ -550,23 +564,39 @@ export default function Czrz() {
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
<div className='bottom' style={{ marginTop: 20, width: '50%', position: "relative" }}>
|
<div className='bottom' style={{ marginTop: 20, width: '50%', position: "relative" }}>
|
||||||
{!loading && <div style={{ position: 'absolute', right: 40, top: 20, zIndex: 10 }}>
|
{!loading &&
|
||||||
<ToolBottom setToolVal={setSearchBottom} searchVal={searchVal} />
|
<>
|
||||||
</div>}
|
<div style={{ position: 'absolute', right: 40, top: 20, zIndex: 10 }}>
|
||||||
|
<ToolBottom setToolVal={setSearchBottom} searchVal={searchVal} />
|
||||||
|
</div>
|
||||||
|
</>}
|
||||||
<div style={{ marginTop: 0, width: '100%' }}>
|
<div style={{ marginTop: 0, width: '100%' }}>
|
||||||
{
|
{
|
||||||
!loading ?
|
!loading ?
|
||||||
<>
|
<>
|
||||||
<div style={{ width: '100%', height: 400 }}>
|
<div style={{ width: '100%', height: 440 }}>
|
||||||
<ReactEcharts option={dblOptions} style={{ width: "100%", height: '100%' }} notMerge={true} />
|
<ReactEcharts option={dblOptions} style={{ width: "100%", height: '100%' }} notMerge={true} />
|
||||||
</div>
|
</div>
|
||||||
<Table
|
<div style={{ position: "relative", width: '100%' }}>
|
||||||
columns={detailsColumns}
|
<div
|
||||||
dataSource={subTableData}
|
style={{
|
||||||
pagination={false}
|
position: 'absolute',
|
||||||
scroll={{ x: 1200, y: "calc( 100vh - 600px )" }}
|
right: 10,
|
||||||
rowKey="inx"
|
top: -23,
|
||||||
/>
|
cursor: 'pointer',
|
||||||
|
color: '#1677ff',
|
||||||
|
zIndex: 10
|
||||||
|
}}
|
||||||
|
onClick={download}>
|
||||||
|
下载测站离线表</div>
|
||||||
|
<Table
|
||||||
|
columns={detailsColumns}
|
||||||
|
dataSource={subTableData}
|
||||||
|
pagination={false}
|
||||||
|
scroll={{ x: 1200, y: "calc( 100vh - 600px )" }}
|
||||||
|
rowKey="inx"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</> :
|
</> :
|
||||||
<Spin size="large" style={{ marginTop: '10rem' }} />
|
<Spin size="large" style={{ marginTop: '10rem' }} />
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
|
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
export default function qsOption(timeList, listObj, hbobj) {
|
export default function qsOption(timeList, listObj, hbobj, list) {
|
||||||
|
if (listObj.adcd == '429000000000') {
|
||||||
|
listObj.adnm ='神农架'
|
||||||
|
}
|
||||||
const chartTimeList = JSON.parse(JSON.stringify(timeList));
|
const chartTimeList = JSON.parse(JSON.stringify(timeList));
|
||||||
let itemStyle = {
|
let itemStyle = {
|
||||||
normal: {
|
normal: {
|
||||||
|
|
@ -30,11 +33,33 @@ export default function qsOption(timeList, listObj, hbobj) {
|
||||||
itemStyle: itemStyle,
|
itemStyle: itemStyle,
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let addSerise1 = {
|
||||||
|
name: "",
|
||||||
|
type: 'line',
|
||||||
|
itemStyle: itemStyle,
|
||||||
|
data: []
|
||||||
|
}
|
||||||
// 湖北省
|
// 湖北省
|
||||||
for (let d = chartTimeList.length - 1; d > -1; d--) {
|
for (let d = chartTimeList.length - 1; d > -1; d--) {
|
||||||
let yval = parseFloat((hbobj[chartTimeList[d]]?.rate * 100).toFixed(2));
|
let yval = parseFloat((hbobj[chartTimeList[d]]?.rate * 100).toFixed(2));
|
||||||
hbSeriseData.push(yval);
|
hbSeriseData.push(yval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (listObj.isBl) {
|
||||||
|
const dd = listObj.adcd.substring(0,4) + '00000000'
|
||||||
|
const cityAdcd = list.find(item => item.adcd == dd);
|
||||||
|
for (let d = chartTimeList.length - 1; d > -1; d--){
|
||||||
|
let yval = parseFloat((cityAdcd[chartTimeList[d]]?.rate * 100).toFixed(2));
|
||||||
|
addSerise1.name = cityAdcd?.adnm;
|
||||||
|
addSerise1.data.push(yval);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addSerise1.name && cityAdcd.adnm!= '湖北省') {
|
||||||
|
totalSerise.push(addSerise1)
|
||||||
|
legendName.push(addSerise1.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 市
|
// 市
|
||||||
for (let d = chartTimeList.length - 1; d > -1; d--) {
|
for (let d = chartTimeList.length - 1; d > -1; d--) {
|
||||||
let yval = parseFloat((listObj[chartTimeList[d]]?.rate * 100).toFixed(2));
|
let yval = parseFloat((listObj[chartTimeList[d]]?.rate * 100).toFixed(2));
|
||||||
|
|
@ -44,7 +69,7 @@ export default function qsOption(timeList, listObj, hbobj) {
|
||||||
if (yval < minY) {
|
if (yval < minY) {
|
||||||
minY = yval;
|
minY = yval;
|
||||||
}
|
}
|
||||||
minY = Math.ceil(minY) - 5;
|
minY = Math.ceil(minY) - 3;
|
||||||
minY = minY < 0 ? 0 : minY;
|
minY = minY < 0 ? 0 : minY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +77,6 @@ export default function qsOption(timeList, listObj, hbobj) {
|
||||||
totalSerise.push(addSerise)
|
totalSerise.push(addSerise)
|
||||||
legendName.push(addSerise.name);
|
legendName.push(addSerise.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
chartTimeList.sort(function (o1, o2) {
|
chartTimeList.sort(function (o1, o2) {
|
||||||
if (moment(o1).isBefore(moment(o2))) {
|
if (moment(o1).isBefore(moment(o2))) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -64,23 +88,42 @@ export default function qsOption(timeList, listObj, hbobj) {
|
||||||
chartTimeList[idx] = str.substring(5, 10);
|
chartTimeList[idx] = str.substring(5, 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("miny",minY);
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: {
|
// title: {
|
||||||
text: '到报率变化趋势',
|
// text: '到报率变化趋势',
|
||||||
textStyle: {
|
// top:-10,
|
||||||
fontSize: 16
|
// textStyle: {
|
||||||
},
|
// fontSize: 16
|
||||||
left: 'center'
|
// },
|
||||||
},
|
// left: 'center'
|
||||||
|
// },
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: '{a}, {b}, {c}%'
|
// formatter: '{a}, {b}, {c}%'
|
||||||
|
formatter: function (params) {
|
||||||
|
if (params.length > 0) {
|
||||||
|
var result = params[0].name + "<br>";
|
||||||
|
params.forEach(function (item) {
|
||||||
|
if (item.value) {
|
||||||
|
result +=
|
||||||
|
item.marker +
|
||||||
|
" " +
|
||||||
|
item.seriesName +
|
||||||
|
" : " +
|
||||||
|
item.value +
|
||||||
|
"%</br>";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: legendName,
|
data: legendName,
|
||||||
top:30
|
top:10
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { Form, Descriptions, Input, Row, Col, message, Select, Switch } from 'antd';
|
||||||
|
|
||||||
|
|
||||||
|
const ModalForm = ({ mode, record }) => {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const businessType = {
|
||||||
|
0: "其它",
|
||||||
|
1: "新增",
|
||||||
|
2: "修改",
|
||||||
|
3: "删除",
|
||||||
|
4: "授权",
|
||||||
|
5: "导出",
|
||||||
|
6: "导入",
|
||||||
|
7: "强退",
|
||||||
|
8: "生成代码",
|
||||||
|
9: "清空数据",
|
||||||
|
}
|
||||||
|
const operatorStatus = {
|
||||||
|
0: '正常',
|
||||||
|
1: '异常'
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Descriptions column={2}>
|
||||||
|
<Descriptions.Item label="操作模块" span={1}>
|
||||||
|
{record?.title}/{businessType[record?.businessType]}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="请求地址" span={1}>
|
||||||
|
{record?.operUrl}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="登录信息" span={1}>
|
||||||
|
{record?.operName}/{record?.operIp}/
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="请求方式" span={1}>
|
||||||
|
{record?.requestMethod}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="操作方法" span={2}>
|
||||||
|
{record?.method}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="请求参数" span={2}>
|
||||||
|
{record?.operParam}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="返回参数" span={2}>
|
||||||
|
{record?.jsonResult}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="操作状态" span={1}>
|
||||||
|
{operatorStatus[record?.status]}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="操作时间" span={1}>
|
||||||
|
{record?.operTime}
|
||||||
|
</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ModalForm;
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
import React, { useEffect, useState, useMemo, useRef } from 'react';
|
||||||
|
import { Card, message, Table, Space, Button } from 'antd';
|
||||||
|
import ToolBar from './toolbar.js';
|
||||||
|
import usePageTable from '../../../components/Crud/usePageTable.js'
|
||||||
|
import apiurl from '../../../models/apiurl'
|
||||||
|
import { findPage2 } from '../../../components/Crud/_.js'
|
||||||
|
import BasicCrudModal from '../../../components/Crud/BasicCrudModal.js';
|
||||||
|
import ModalForm from './form.js';
|
||||||
|
export default function Zysy() {
|
||||||
|
const refModal = useRef();
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: 'inx',
|
||||||
|
key: 'inx',
|
||||||
|
width: 80,
|
||||||
|
align: "center",
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <span>{index + 1}</span>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'cpu(%)',
|
||||||
|
dataIndex: 'cpu',
|
||||||
|
key: 'cpu',
|
||||||
|
width: 120,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '磁盘(%)',
|
||||||
|
dataIndex: 'disk',
|
||||||
|
key: 'disk',
|
||||||
|
width: 120,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '内存(%)',
|
||||||
|
dataIndex: 'memory',
|
||||||
|
key: 'memory',
|
||||||
|
width: 120,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '时间',
|
||||||
|
dataIndex: 'tm',
|
||||||
|
key: 'tm',
|
||||||
|
width: 120,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const [searchVal, setSearchVal] = useState({})
|
||||||
|
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
|
||||||
|
|
||||||
|
const { tableProps, search, refresh } = usePageTable((params) => findPage2(apiurl.ptjs.resource, params))
|
||||||
|
useEffect(() => {
|
||||||
|
if (searchVal) {
|
||||||
|
const params = {
|
||||||
|
...searchVal
|
||||||
|
};
|
||||||
|
search(params)
|
||||||
|
}
|
||||||
|
}, [searchVal])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='page'>
|
||||||
|
<div style={{width:'100%'}}>
|
||||||
|
<Card style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
|
<ToolBar
|
||||||
|
setToolVal={setSearchVal}
|
||||||
|
/>
|
||||||
|
<Table
|
||||||
|
columns={columns}
|
||||||
|
{...tableProps}
|
||||||
|
scroll={{ x: width, y: "calc( 100vh - 400px )" }}
|
||||||
|
rowKey="inx"
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
<BasicCrudModal
|
||||||
|
width={800}
|
||||||
|
ref={refModal}
|
||||||
|
title="操作日志详细"
|
||||||
|
component={ModalForm}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
import React, { useEffect,useState } from 'react';
|
||||||
|
import { Form, Input, Button, DatePicker } from 'antd';
|
||||||
|
import NormalSelect from '../../../components/Form/NormalSelect';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
|
const ToolBar = ({ setToolVal }) => {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const onFinish = (values) => {
|
||||||
|
if (values.operTime) {
|
||||||
|
values.stm = values.operTime[0] ? dayjs(values.operTime[0]).format('YYYY-MM-DD 00:00:00') : "";
|
||||||
|
values.etm = values.operTime[1] ? dayjs(values.operTime[1]).format('YYYY-MM-DD 00:00:00') : "";
|
||||||
|
delete values.operTime
|
||||||
|
}
|
||||||
|
setToolVal(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='pageToolBar'>
|
||||||
|
<Form form={form} onFinish={onFinish} size='Default' layout="inline">
|
||||||
|
|
||||||
|
<Form.Item label="操作时间" name="operTime">
|
||||||
|
<RangePicker
|
||||||
|
placeholder={['开始日期', '结束日期']}
|
||||||
|
format='YYYY-MM-DD'
|
||||||
|
style={{ width: 300 }}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item>
|
||||||
|
<Button type="primary" htmlType="submit" size='Default'>查询</Button>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item>
|
||||||
|
<Button size='Default' onClick={()=>form.resetFields()}>重置</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ToolBar;
|
||||||
Loading…
Reference in New Issue