Compare commits

...

13 Commits

Author SHA1 Message Date
秦子超 ba5077dcb2 Merge branch 'qzc-dev' 2024-09-30 09:12:00 +08:00
秦子超 9c71538c22 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-09-30 09:06:41 +08:00
秦子超 ab5c9de2e1 地图修改 2024-09-30 09:06:37 +08:00
xielei 3ddf3eb338 页面搭建 2024-09-29 18:05:53 +08:00
xielei e713b3c8b9 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-09-29 17:56:13 +08:00
xielei 56042ad3db 页面搭建 2024-09-29 17:56:08 +08:00
李神峰 eb4e287226 fix():冲突修改 2024-09-29 17:48:01 +08:00
李神峰 4e14d218d7 Merge branch 'lsf-dev' 2024-09-29 17:44:26 +08:00
李神峰 bfacef2129 fix(): 浸润线bug修复 2024-09-29 17:42:30 +08:00
xielei d58fd30476 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-09-29 17:19:33 +08:00
xielei 7538450e70 页面搭建 2024-09-29 17:19:27 +08:00
秦子超 165bd1c341 地图修改 2024-09-29 16:24:07 +08:00
xielei c93f08e0d0 页面搭建 2024-09-27 17:52:34 +08:00
52 changed files with 6990 additions and 2051 deletions

9
package-lock.json generated
View File

@ -50,6 +50,7 @@
"react-cookies": "^0.1.1",
"react-dom": "^18.2.0",
"react-konva": "^18.2.3",
"react-org-tree": "^1.0.1",
"react-pdf": "^7.3.3",
"react-redux": "^8.0.2",
"react-rnd": "^10.4.11",
@ -18883,6 +18884,14 @@
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
"node_modules/react-org-tree": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/react-org-tree/-/react-org-tree-1.0.1.tgz",
"integrity": "sha512-NK1d8VIAzxJyMC/Rx9MupAusoFnokYr81Hw3oEpqxqBLQmpBVAexjvPSAJmhCmsom9Zymu+BMNrjRw5D54n7aw==",
"dependencies": {
"classnames": "^2.2.6"
}
},
"node_modules/react-pdf": {
"version": "7.3.3",
"resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.3.3.tgz",

View File

@ -45,6 +45,7 @@
"react-cookies": "^0.1.1",
"react-dom": "^18.2.0",
"react-konva": "^18.2.3",
"react-org-tree": "^1.0.1",
"react-pdf": "^7.3.3",
"react-redux": "^8.0.2",
"react-rnd": "^10.4.11",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -156,6 +156,11 @@ export function createCrudService(urlSet) {
const resData = await httppost2(urlSet, params) || {};
return resData;
}
const edit1 = async (params) => {
const resData = await httppost2(urlSet, params) || {};
return resData;
}
const insert = async (params) => {
const resData = await httppost2(urlSet + `/${params}`) || {};
return resData;
@ -241,6 +246,7 @@ export function createCrudService(urlSet) {
todo: todo,
save: save,
edit: edit,
edit1: edit1,
del: del,
insert:insert,
delGet:delGet,

View File

@ -49,7 +49,7 @@ export const HDRealPromiseWX = new CachePromise(
// })
// .catch(() => null),
// 5000
() => httppost2(apiurl.station.gaugingStation.list, {"sources": ["SW","SH"],"args": ""})
() => httppost2(apiurl.station.gaugingStation.list)
.then(({ data }) => data || [])
.then((data) => {
// if (config.notShowPOI?.hd) {

View File

@ -289,8 +289,9 @@ export async function loadMenu(): Promise<MenuItem[]> {
}
]
},
{ id: id(), title: '法律法规', path: '/mgr/sz/flfg' },
{ id: id(), title: '制度管理', path: '/mgr/sz/zdgl' },
{ id: id(), title: '法律法规', path: '/mgr/sz/flfg' },
]
},

View File

@ -6,7 +6,7 @@ import { parseGeoJSONFeature } from "../../utils/tools";
function initState() {
return {
layerVisible: {
AdcdLayer: false,//行政区划
AdcdLayer: true,//行政区划
AdcdBorderInLayer: true,//乡镇边界
AdcdAllLayer: false,//县行政区划图层
HeLiuZhuJiLayer:false,//12条河流注记
@ -30,7 +30,7 @@ function initState() {
BouaOutLayer: false,//咸丰县边界_省外
BouaOutsideLayer:true,//咸丰县以外边界
highroadLayer:false,//省级公路
highroadLayer:true,//省级公路
jcsjLayer:true,//监测数据

View File

@ -914,7 +914,7 @@ const apiurl = {
reservoirsummaryInfo: service_fxdd + '/reservoir/water/summaryInfo', //实时水情-水库水情汇总
//河道弹框详情
monitor: service_fxdd + '/river/water/monitor/data', //监测数据
detail: service_fxdd + '/river/water/detail', //监测数据-下方表格
detail: service_fxdd + '/reservoir/water/detail', //监测数据-下方表格
zqrl: service_fxdd + '/river/water/zqrl', //水位流量关系
channel: service_fxdd + '/reservoir/water/image/channel', //图像监测-视角
imageinfo: service_fxdd + '/reservoir/water/image/info', //图像监测-列表

View File

@ -23,9 +23,9 @@ export async function reservoirlist(params) {
if (code !== 200) {
message.error(msg || '请求失败');
}
const list = data?.filter(o => o.lgtd && o.lttd)
// const list = data?.filter(o => o.lgtd && o.lttd)
return list;
return data;
}

View File

@ -172,7 +172,7 @@ export default class Map2D extends BaseMap {
var view = map.getView();
var resolution = view.getResolution();
if (resolution <20){
if (resolution <120){
map && map.getLayers().getArray().forEach((layer)=> {
// if( (layer.values_.name) && ((layer.values_.name).indexOf("HL2Layer")>-1) ){
if( (layer.values_.name) && ((layer.values_.name).indexOf("highroadLayer")>-1) ){

View File

@ -124,13 +124,13 @@ export default class LayerMgr2D extends LayerMgr {
//河流
this.addLayer(new HLLayer2D2({ visible: visible[HLLayer2D2.LayerName], setting, dispatch }));//河流线-卫星图
this.addLayer(new HLLayer2D({ visible: visible[HLLayer2D.LayerName], setting, dispatch }));//河流线-矢量图
// this.addLayer(new HL2Layer2D({ visible: visible[HL2Layer2D.LayerName], setting, dispatch }));//河流面 //缺失
this.addLayer(new HL2Layer2D({ visible: visible[HL2Layer2D.LayerName], setting, dispatch }));//河流面
//省级公路
// this.addLayer(new highroadLayer2D({ visible: visible[highroadLayer2D.LayerName], setting, dispatch })); //缺失
this.addLayer(new highroadLayer2D({ visible: visible[highroadLayer2D.LayerName], setting, dispatch }));
//咸丰边界
// this.addLayer(new BouaLayer2D({ visible: visible[BouaLayer2D.LayerName], setting, dispatch }));//缺失
this.addLayer(new BouaLayer2D({ visible: visible[BouaLayer2D.LayerName], setting, dispatch }));
// this.addLayer(new BouaInLayer2D({ visible: visible[BouaInLayer2D.LayerName], setting, dispatch }));
// this.addLayer(new BouaOutLayer2D({ visible: visible[BouaOutLayer2D.LayerName], setting, dispatch }));

View File

@ -45,7 +45,7 @@ export default class BouaLayer2D extends POILayer2D {
async dataPromise() {
const address = localStorage.getItem('address');
const a1 = await fetch(`${process.env.PUBLIC_URL}/data/geojson/macheng/麻城市.geojson`)
const a1 = await fetch(`${process.env.PUBLIC_URL}/data/geojson/macheng/县界.geojson`)
.then(resp => resp.json())
.then(data => data.features)
.then(features => features.map(o => ({

View File

@ -112,7 +112,7 @@ export default class HLLayer2D extends POILayer2D {
return null;
}
const RVNM = e.props.RVNM
const LEVEL = e.props.LEVEL
const LEVEL = e.props.LEVEL || e.props.LEVLE
return this.getStyle(RVNM,LEVEL);
}
}

View File

@ -14,7 +14,7 @@ export default class highroadLayer2D extends POILayer2D {
this._style1 = new Style({
zIndex: 6,//zindex2d.boua2,
stroke: new StrokeStyle({
color: '#d5d5d9',//'rgba(138,189,165)',
color: 'rgba(138,189,165,0.1)',
width: 4,
}),
});

View File

@ -17,10 +17,10 @@ export default class AdcdLayer extends BaseLayer {
async onAdd() {
const agnp = await AgnpPromise.get();
const xzLabel = agnp.filter(o => o.Level === 5 || o.Level === 6).map(o => ({
const xzLabel = agnp.filter(o => o.LEVEL === 4 || o.LEVEL === 5 || o.LEVEL === 6).map(o => ({
...o,
stcd: o.OBJECTID,
level: o.Level,
level: o.LEVEL,
id: o.OBJECTID,
type: 'label'
}))

View File

@ -26,6 +26,15 @@ function renderMarker({ level }, { width, highlight }) {
alt="" className="panel-icon" />
</div>
`;
}else if(level === 4){
return `
<div style="position:relative">
<svg t="1616148185046" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4230" width="${width}">
</svg>
<img width="16" style="position:absolute;top:0;left:2px" src="data:image/png;base64,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"
alt="" className="panel-icon" />
</div>
`;
}else{
return `
<div style="position:relative">
@ -151,7 +160,7 @@ function AdcdMarker({ data, dispatch, setting, zoom, distSq, layerVisible }) {
return (
<>
{
( (zoom > 8 || distSq < dist2 || highlight) && data.level === 5 &&
( (zoom > 8 || distSq < dist2 || highlight) && (data.level === 5 || data.level === 4) &&
// isShow
true
) && (
@ -165,9 +174,9 @@ function AdcdMarker({ data, dispatch, setting, zoom, distSq, layerVisible }) {
transformOrigin: 'bottom center',
transform: `translateX(-50%)${markerZoom > 1 ? ' scale(' + markerZoom + ')' : ''}`,
lineHeight: 1,
zIndex: 4,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0)
zIndex: data.level === 4?6:4,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0)
}}
onClick={showPop}
// onClick={showPop}
></div>
<div
className="markerLabel"
@ -181,7 +190,7 @@ function AdcdMarker({ data, dispatch, setting, zoom, distSq, layerVisible }) {
left: 0,
transform: 'translateX(-50%)',
zIndex: 3,//zindexmarker.tuxiangLabel + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0),
color: !layerVisible.SatelliteImage?'#0008':'#fff'
color: data.level === 4? 'red':'#0008'
}}>
{data?.NAME}
</div>
@ -206,7 +215,7 @@ function AdcdMarker({ data, dispatch, setting, zoom, distSq, layerVisible }) {
lineHeight: 1,
zIndex: 2,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0)
}}
onClick={showPop}
// onClick={showPop}
></div>
<div
className="markerLabel"

View File

@ -30,11 +30,11 @@ function renderMarker({ status, warning }, { width, highlight }) {
// }
return `
<div style="cursor:pointer">
<svg t="1619076397355" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4205" width="${width}" height="${width}">
<path d="M512 25.6l277.94432 972.8H234.05568z" fill="${color1}" p-id="4206" data-spm-anchor-id="a313x.7781069.0.i9" class="selected"></path>
<path d="M512 164.57216l208.45568 764.34432H303.54432z" fill="${color1}" p-id="4207" data-spm-anchor-id="a313x.7781069.0.i6" class=""></path>
</svg>
<div style="position:relative">
<svg t="1616148185046" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4230" width="${width}">
</svg>
<img width="${width}" style="position:absolute;top:0;left:0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAA1CAYAAAAgYencAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAJLSURBVFhHxZk/T8JAGIcBo8HBhMTFmDgbJ930Uxg/pnECYqJlUiZ10k033dRFoiCl/LO/9lqupXd977w7nqW9K4GH6/v+eoRqtV6tbxxvnlRWwNyf+5HAzuf+F45s3hnDi+/zGixGnf41m3NK+LleDSd++6cVzTjGb/ebsYA3cL4Cwf3wbtab9iKB2cfkHRPRFUeMOgMPx0gAJBOuCG97E8dUIJlwwfRt/Dp+8h9xngpgAhfY0Cq+t+i6VADwF2wSVn/adVkB7oItkDtBd3DDhlkBXMAL2NAKCD3+MzICLlIxH3oZAWA7FfOhtyxgMRWj9AtDjw0jlgRspmJR2C0JAFupWBR2hQI2UhErm6QfT6GAjVQU1VahADCdiqLuEgsYTEVZvggFTKai7L2EAiZTUbaaQgFgKhVl9SQXMJCKZR0lFTCRimXFLBUA/03FsjoiCOgXImUFSwWKnmBUKDVUKgB0i5HSRTQBjXZEjgTd33TvJ4IkgDpQTcXxQ/zTiw2FkATib7PYyVIYtmirRhIAqg8n6p6CLqDweJ68BM/U/QRZgP89Vwb12wOyAKDehrBoyempJEBJRVT+6La8/RKUBCipGK6S0oZWSQCUpaLK8gN1AUkqxrsotdhWFpClIjX9eJQFZKlITT8eZQEgakdKl+TREyhIRQQVEpANyWgJFKWiSvrxaAmA/G3Q2TMAbQH+fqPydXfP2gJ8KqL3VTcsCdoCIElF1fQzRv1062w3OJjXGmsNNuUW/Muyfbl3xYarYf2wfsRONahU/gBd1OeNjK84SwAAAABJRU5ErkJggg=="
alt="" className="panel-icon" />
</div>
`;
}
@ -55,7 +55,7 @@ function HdswMarker({ data, dispatch, setting, zoom, distSq }) {
}
useEffect(() => {
const width = 12;
const width = 8;
const placeholder = document.getElementById(`marker_hdsw_${data.id}`);
if (!placeholder) {

View File

@ -137,12 +137,12 @@ function HdswPop({ id, dispatch, data }) {
{/* <Tabs.TabPane tab="" key="3">
<Txjc record={data}/>
</Tabs.TabPane> */}
<Tabs.TabPane tab="视频监测" key="4">
{/* <Tabs.TabPane tab="" key="4">
<Spjc record={data}/>
</Tabs.TabPane>
<Tabs.TabPane tab="周边雨情" key="5">
</Tabs.TabPane> */}
{/* <Tabs.TabPane tab="" key="5">
<DrpStAround data={data}/>
</Tabs.TabPane>
</Tabs.TabPane> */}
</Tabs>
</Modal>

View File

@ -0,0 +1,62 @@
import React, { useEffect, useState } from 'react';
import moment from "moment"
import {
CloseOutlined,
} from '@ant-design/icons';
import { Modal, Tabs } from 'antd';
import Sqjcsj from '../components/Sqjcsj'
import Swllgx from '../components/Swllgx'
import './TangYanBa.less'
function HdswPop2({ id, data, dispatch }) {
const closePop = () => {
dispatch.runtime.closeFeaturePop(id);
};
const width = 1050;
return (
<>
<div className="dp-popup" style={{ position: 'absolute', top: 0, width,left: 0,height:646, lineHeight: 1,backgroundColor:'#fff',borderRadius:'10px'}}>
<div className="dp-popup-content" style={{height:'100%',borderRadius:'10px'}}>
<div className="content-body tyb skpop" id='tyb' style={{ height: '100%' }}>
<div className="normalModalStyle" style={{borderRadius:10}}>
<div className="normalModalStyle_title" style={{marginBottom:0}}>
<div className="normalModalStyle_title_icon"></div>
<span>{data?.name}&emsp;</span>
{data?.sttp &&
<span style={
{
display:"inline-block",
padding: "5px 10px",
color: "#74a7ff",
border: "1px solid #74a7ff",
borderRadius: "5px"
}
}> {{MM: '气象站',PP: '雨量站',RR: '水库水文站',ZZ: '河道水位站',ZQ:"河道水文站"}?.[data?.sttp]}{{'SH':'山洪','SW':'水文','QX':'气象','SK':'水库'}?.[data.source]}</span>}
<div className="normalModalStyle_title_cancel">
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>
</div>
</div>
<div style={{paddingLeft:15}}>
<Tabs defaultActiveKey="1">
<Tabs.TabPane tab="监测数据" key="1">
<Sqjcsj record={data}/>
</Tabs.TabPane>
<Tabs.TabPane tab="水位流量关系" key="2">
<Swllgx record={data}/>
</Tabs.TabPane>
</Tabs>
</div>
</div>
</div >
<div className="boxfoot"></div>
</div>
</div>
</>
)
}
export default React.memo(HdswPop2);

View File

@ -36,7 +36,7 @@ function Wxq({ id, data, dispatch }) {
<div className="title">
<div className="name flex flexac">
<div className='nameBorder'></div>
{data.name || detail?.name}
{data.NAME || detail?.name}
</div>
<div className="extra">
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>

View File

@ -4,6 +4,7 @@ import { useDispatch, useSelector } from 'react-redux'
import PciStPop from './PciStPop';
import HdswPop from './HdswPop';
import HdswPop2 from './HdswPop2'
import ShuikuPop from './ShuikuPop';
import ShuikuPop2 from './ShuikuPop2'
import ShuiDianZhanPop from './ShuiDianZhanPop';
@ -88,7 +89,12 @@ function FeaturePops({ mapobj }) {
</Modal>
)
}else if (type === 'hdsw') {
Comp = HdswPop;
// Comp = HdswPop;
return (
<Modal width={1050} wrapClassName='home_modal' bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={true} onCancel={()=>dispatch.runtime.closeFeaturePop(id)} destroyOnClose={true}>
<HdswPop2 id={id} data={data} dispatch={dispatch} record={data}/>
</Modal>
)
}else if (type === 'shuiku' || type === InfoPopNames.RealSkPop) {
// 水库
// Comp = ShuikuPop;

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -131,7 +131,7 @@ const HomePage = ({showPanels}) => {
setCheckedObj({ key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' })
}else if(a==='3'){
dispatch.runtime.setCameraTarget({
center: [114.96, 31.453],
center: [114.75, 31.493],
zoom: 13.5,
pitch: 60
})

View File

@ -12,9 +12,11 @@ const Page = () => {
console.log('aaa',data);
useEffect(()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: true })
dispatch.map.setLayerVisible({ HdswLayer: true })
getData()
return ()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: false })
dispatch.map.setLayerVisible({ HdswLayer: false })
}
},[])

View File

@ -29,7 +29,7 @@
top: 30px;
border-radius: 5px;
border: 1px solid #eee;
transition: all 0.2s ease 0s;
.ant-tabs-nav{
margin-bottom: 5px;

View File

@ -90,8 +90,8 @@ export default function Xmzlmb() {
...obj,
}
})
let res1 = result.map(item => ({...item,rz:(item.rz - 100).toFixed(2)})) //为了测试 最后需要删除
setDateSources(res1)
// let res1 = result.map(item => ({...item,rz:(item.rz - 100).toFixed(2)})) //为了测试 最后需要删除
setDateSources(result)
} catch (error) {
console.log(error);
}

View File

@ -35,12 +35,12 @@ const textColor = '#666'
[];
const gz3 = data[alltype[2]] ?
type == "1" ? [[73, 161], [73, data[alltype[2]]]] :
type == "1" ? [[72.5, 161], [72.5, data[alltype[2]]]] :
type == "2" ? [[66.5, 162], [66.5, data[alltype[2]]]] :
[[73, 161], [73, data[alltype[2]]]] : [];
const gz4 = data[alltype[3]] ?
type == "1" ? [[85, 166], [85, data[alltype[3]]]] :
type == "1" ? [[84.5, 166], [84.5, data[alltype[3]]]] :
type == "2" ? [[77, 161], [77, data[alltype[3]]]] :
[[85, 166], [85, data[alltype[3]]]] : [];
@ -50,8 +50,8 @@ const textColor = '#666'
[xValue, data?.rz],
[51.6, data[alltype[0]]],
[53.6, data[alltype[1]]],
[73, data[alltype[2]]],
[85, data[alltype[3]]]
[72.5, data[alltype[2]]],
[84.5, data[alltype[3]]]
] :
type == "2" ?
[

View File

@ -110,7 +110,7 @@ const EditableRow = ({ index, ...props }) => {
title: '标准分数',
key: 'standardScore',
dataIndex: 'standardScore',
width: 60,
width: 70,
align: "center",
},
{
@ -380,12 +380,20 @@ const EditableRow = ({ index, ...props }) => {
setClickItem(record)
}
const handleRadioChange = (e) => {
if (e.target.value == 1) {
setTableData(tableDataRef.current)
if (e.target.value == 1) {
if (tabs == 2) {
getQdViewData(Item?.id)
} else {
const newData = tableData.filter(item => item.standardScore > item.assessScore)
setTableData(newData);
getZbTableData(Item?.id,2)
}
} else {
const newData = tableData.filter(item => item.standardScore > item.assessScore)
newData.forEach(item => {
if (item.rowSpan) delete item.rowSpan;
})
const res = handleData(newData, "name")
setTableData(res);
}
}
// 整改

View File

@ -1,5 +1,5 @@
import React,{useEffect,useState,useMemo,useRef} from 'react';
import { Form, Button, Input, Row,Table, Col, Popconfirm, InputNumber,Image,Modal,Typography, message} from 'antd';
import { Form, Button, Input, Row,Table, Col, Tooltip, InputNumber,Image,Modal,Typography, message} from 'antd';
import { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
import { formItemLayout, btnItemLayout } from '../../../../components/crud/FormLayoutProps';
import { httpget2, httppost2,xyt_httpget2 } from '../../../../utils/request';
@ -27,6 +27,16 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
dataIndex: 'indicatorName',
width: 250,
align: "center",
render: (v, r) => {
const titleDom = r.indicatorRatings ?
r.indicatorRatings.map((item,i) => <div key={i}>{item?.ratingDesc}&nbsp;({item?.standardScore})</div>)
: ''
return (
<Tooltip title={titleDom}>
<span>{v}</span>
</Tooltip>
)
}
},
{
title: '标准分数',

View File

@ -11,8 +11,13 @@ const Page = () => {
<Image src={title} />保护对象
</div>
<div className={styles.content}>
水库防洪标准按50年一遇设计1000年一遇校核设计洪水位111.51校核洪水位 112.75 ,水库担负着红安县城七里坪杏花城关等城镇以及京九铁路汉麻连络线省道S234国道G230,京九铁路汉麻联络线等交通设施安全的防洪重任防洪保护人口32万
保护耕地 15 万亩
水库防洪标准按
<span className={styles.color}>50</span>
年一遇设计<span className={styles.color}>1000</span><span className={styles.color}>111.51</span>
校核洪水位 <span className={styles.color}>112.75</span> ,
水库担负着红安县城七里坪杏花城关等城镇
以及京九铁路汉麻连络线省道S234国道G230,京九铁路汉麻联络线等交通设施安全的防洪重任防洪保护人口<span className={styles.color}>32</span>
保护耕地 <span className={styles.color}>15</span>
</div>
</div>

View File

@ -7,4 +7,7 @@
.content{
font-size: 17px;
padding: 0 20px;
}
.color{
color: #409eff;
}

View File

@ -95,22 +95,22 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
* @param {string} id 删除的id
*/
const deleteFile = (fileId) => {
console.log(fileId);
let filterFile = fileList.filter(item => item.response?.data?.fileId !== fileId);
console.log(fileId,fileList);
let filterFile = fileList.filter(item => item.fileId !== fileId);
setFileList(filterFile)
}
useEffect(() => {
if (mode != 'save') {
// const imgFile = record?.files?.map(o => ({
// name: o.name,
// response: {
// data: {
// filePath: o.filePath,
// fileId: o.fileId
// }
// },
// }))
setFileList(record?.files)
const imgFile = record?.files?.map(o => ({
name: o.fileName,
response: {
data: {
filePath: o.filePath,
fileId: o.fileId
}
},
}))
setFileList(imgFile)
}
}, [record, mode])
@ -223,6 +223,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
onDrop={(info) => { console.log(info.dataTransfer.files); }}
fileList={fileList}
disabled={loading}
maxCount={1}
// onSuccess={handleSuccess}
>
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p>
@ -231,6 +232,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
</p>
</Dragger>
}
{JSON.stringify(fileList)}
<Row gutter={[16]}>
{
fileList.length > 0 && fileList.map(file => {
@ -238,9 +240,9 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
<Col span={12}>
<div className="file-item" style={{ width: "75%",marginTop:5 }}>
<div className='file-description'>
{file?.fileName?.indexOf('.docx') > -1 ?
{file.name?.indexOf('.docx') > -1 ?
<div
onClick={() => { download(file.fileId) }}
onClick={() => { download(file.response?.data?.fileId) }}
style={{ cursor: 'pointer' }}
>
<FileWordOutlined
@ -248,35 +250,35 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
/>
</div>
:
file?.fileName?.indexOf('.pdf') > -1 ?
file.name?.indexOf('.pdf') > -1 ?
<div
onClick={() => { viewPdf(file.fileId) }}
onClick={() => { viewPdf(file.response?.data?.fileId) }}
style={{ cursor: 'pointer' }}
>
<FilePdfOutlined style={{ fontSize: 40 }} />
</div>
:
file?.fileName?.indexOf('.zip') > -1 ?
file.name?.indexOf('.zip') > -1 ?
<div
onClick={() => { download(file.fileId) }}
onClick={() => { download(file.response?.data?.fileId) }}
style={{ cursor: 'pointer' }}
>
<FileZipOutlined style={{ fontSize: 40 }} />
</div>
:
file?.fileName?.indexOf('.xlsx') > -1 ?
file.name?.indexOf('.xlsx') > -1 ?
<div
onClick={() => { download(file.fileId) }}
onClick={() => { download(file.response?.data?.fileId) }}
style={{ cursor: 'pointer' }}
>
<FileExcelOutlined style={{ fontSize: 40 }} />
</div>
:
<Image width={60} src={url + file.filePath} alt='' />
<Image width={60} src={url + file.response?.data?.filePath} alt='' />
}
<span>{file?.fileName}</span>
<span>{file.name}</span>
</div>
<div className={mode == "view" ? 'delete-icon disable-icon' : 'delete-icon'} onClick={() => deleteFile(file.fileId)}>
<div className={mode == "view" ? 'delete-icon disable-icon' : 'delete-icon'} onClick={() => deleteFile(file.response?.data?.fileId)}>
<DeleteOutlined />
</div>
</div>

View File

@ -48,7 +48,7 @@ const Page = () => {
title: '施行日期', key: 'implementationDate', dataIndex: 'implementationDate'
},
{
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc'
title: '上传时间', key: 'uploadDate', dataIndex: 'uploadDate'
},
{
title: '附件', key: 'files', dataIndex: 'files',render:(v,r)=><a onClick={()=>download(v[0].fileId,v[0]?.fileName)}><PaperClipOutlined />{v[0]?.fileName}</a>

View File

@ -37,10 +37,11 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
const [fileListHj, setFileHj] = useState({'files3': [],'files4': [],'files5': [],'files6': [],'files7': []})
const [url, setUrl] = useState('')
const [isModal, setIsModal] = useState(false)
const [loading, setLoading] = useState(false)
const getInfo = () => {
form.validateFields().then((values) => {
getFormInfo({ ...values, ...fileListHj })
form.resetFields()
getFormInfo({ ...fileListHj,...values, })
setFileList([])
}).catch((errorInfo) => {
console.log(errorInfo, 'error');
@ -73,8 +74,9 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
// }
},
customRequest(e) {
setLoading(true);
httppostAddfile(uploadUrl, e).then(res => {
if(fileListHj[keys]){
fileListHj[keys].push(res.data)
}else{
@ -83,6 +85,8 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
}
setFileHj({ ...fileListHj })
setLoading(false);
})
}
}
@ -131,7 +135,9 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
}
useEffect(() => {
setFileHj(formJsonData)
form.setFieldsValue(formJsonData)
}, [])
return (
<Form form={form} onFinish={onFinish} >
@ -146,7 +152,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='保管人员'
name='custodian'
>
<Input />
<Input disabled={type == 'view'}/>
</Form.Item>
</Col>
<Col span={10}>
@ -154,7 +160,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='保管地点'
name='storageLocation'
>
<Input />
<Input disabled={type == 'view'}/>
</Form.Item>
</Col>
</Row>
@ -170,12 +176,12 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='附件'
name='files'
>
<Dragger {...props(item1.key)}>
{type !== 'view' &&<Dragger {...props(item1.key)} disabled={type == 'view'}>
<p className="ant-upload-drag-icon">
<InboxOutlined />
</p>
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p>
</Dragger>
</Dragger>}
<div className='flex'>
{fileListHj?.[item1.key]?.map((item) => {
return <div className='flex align-center file-item' style={{marginTop:5,marginRight:'3%',width:'30%', minHeight: "50px", fontSize: 14, columnGap: 10, cursor: checkMediaType(item.fileName) == 'image' || checkMediaType(item.fileName) == 'pdf' ? 'pointer' : "not-allowed" }}>
@ -201,7 +207,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
</Row>))}
<div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}>
<Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button>
<Button type="primary" onClick={getInfo}>确定</Button>
<Button type="primary" onClick={getInfo} loading={loading}>确定</Button>
</div>
</Form >

View File

@ -1,4 +1,85 @@
const treeData = [
{
value: '行政处理',
title: '行政处理',
children: [
{
value: '责令停止违法行为',
title: '责令停止违法行为',
},
{
value: '责令补办许可手续',
title: '责令补办许可手续',
},
{
value: '责令限期拆除',
title: '责令限期拆除',
},
{
value: '责令采取补救措施',
title: '责令采取补救措施',
},
{
value: '责令停止施工',
title: '责令停止施工',
},
{
value: '责令赔偿损失',
title: '责令赔偿损失',
},
],
},
{
value: '行政处罚',
title: '行政处罚',
children: [
{
value: '警告',
title: '警告',
},
{
value: '罚款',
title: '罚款',
},
{
value: '没收违法所得、非法财产',
title: '没收违法所得、非法财产',
},
{
value: '责令停产停业',
title: '责令停产停业',
},
{
value: '暂扣许可证、执照',
title: '暂扣许可证、执照',
},
{
value: '吊销许可证、执照',
title: '吊销许可证、执照',
},
],
},
{
value: '行政强制措施',
title: '行政强制措施',
children: [
{
value: '查封或扣押设施',
title: '查封或扣押设施',
},
{
value: '查封或扣罚财务',
title: '查封或扣罚财务',
},
{
value: '其他',
title: '其他',
},
],
},
];
const basicData = [
{
label: '填报人',
@ -76,7 +157,7 @@ const basicData = [
},
{
label: '违法时间',
key: 'IllegalDate',
key: 'illegalDate',
type: 'DatePicker',
span: 12
},
@ -144,14 +225,17 @@ const clqkData = [
{
label: '处理依据',
key: 'treatmentBasis',
type: 'input',
type: 'TreeSelect',
span: 12,
treeData:[],
fieldNames:{label: 'legalName', value: 'legalName', children: 'children'}
},
{
label: '处理措施',
key: 'treatmentMeasure',
type: 'Select',
span: 12
type: 'TreeSelect',
span: 12,
treeData:treeData
},
{
label: '移送处理情况',
@ -188,6 +272,7 @@ const clqkData = [
{
label: '直接损失金额(万元)',
key: 'directLossAmount',
labelCol:{span:7},
type: 'input',
span: 12
},

View File

@ -33,11 +33,25 @@ const items = [
const Page = ({ mode, onCrudSuccess,record,submit }) => {
const [formData,setFormData] =useState({})
const [clqkDataConfig,setConfig] =useState([])
const [recordData,setRecord] =useState({})
// debugger;
const [key, setKeys] = useState('1')
const onChange = (key) => {
const onChange = async(key) => {
console.log(key);
setKeys(key)
if(key == 2){
const res = await httpget(apiurl.szzf.clyj.tree)
const arr = clqkData.map(item=>{
if(item.key == 'treatmentBasis'){
item.treeData = res.data
}
return item
})
setConfig(arr)
}
};
const getFormInfo = (e) => {
if(!e){
@ -48,7 +62,7 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
...formData,
...e,
caseDate: dayjs(e.caseDate).format("YYYY-MM-DD HH:mm:ss"),
IllegalDate: e.IllegalDate ? dayjs(e.IllegalDate).format("YYYY-MM-DD HH:mm:ss") : e.IllegalDate,
illegalDate: e.illegalDate ? dayjs(e.v).format("YYYY-MM-DD HH:mm:ss") : e.illegalDate,
}
if (mode == 'save') {
@ -80,7 +94,8 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
}
useEffect(()=>{
if(mode == 'edit' || mode =='view'){
httpget(apiurl.szzf.ajdj.detail + record.id).then(res=>{
httpget(apiurl.szzf.ajdj.detail + record.id).then(async res=>{
let obj = {
createName: localStorage.getItem('userName'),
createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
@ -89,12 +104,12 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
if(res.data?.caseDate){
obj.caseDate=dayjs(res.data.caseDate)
}
// if(res.data?.illegalDate){
// obj.illegalDate=dayjs(res.data.illegalDate)
// }
if(res.data.IllegalDate){
obj.IllegalDate = dayjs(res.data.IllegalDate)
if(res.data?.illegalDate){
obj.illegalDate=dayjs(res.data.illegalDate)
}
// if(res.data.IllegalDate){
// obj.IllegalDate = dayjs(res.data.IllegalDate)
// }
setFormData({...res.data,...obj})
})
@ -113,7 +128,7 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
<>
{key == 1 && <BascForm formJson={basicData} formJsonData={formData} fileKey='files1'type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></BascForm>}
{key == 2 && <BascForm formJson={clqkData} fileKey='files2' formJsonData={formData} type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></BascForm>}
{key == 2 && <BascForm formJson={clqkDataConfig} fileKey='files2' formJsonData={formData} type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></BascForm>}
{key == 3 && <BascForm formJson={xzfy} formJsonData={formData} type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></BascForm>}
{key == 4 && <Bajz formJson={xzfy} formJsonData={formData} type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></Bajz>}
{key == 5 && <Lsyx formJson={xzfy} formJsonData={formData} type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></Lsyx>}

View File

@ -26,6 +26,8 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
const [fileListHj, setFileHj] = useState({'files3': [],'files4': [],'files5': [],'files6': [],'files7': []})
const [url, setUrl] = useState('')
const [isModal, setIsModal] = useState(false)
const [loading, setLoading] = useState(false)
const getInfo = () => {
form.validateFields().then((values) => {
getFormInfo({ ...values, ...fileListHj })
@ -62,6 +64,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
// }
},
customRequest(e) {
setLoading(true);
httppostAddfile(uploadUrl, e).then(res => {
if(fileListHj[keys]){
@ -72,6 +75,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
}
setFileHj({ ...fileListHj })
setLoading(false);
})
}
}
@ -136,12 +140,12 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='附件'
name='files'
>
<Dragger {...props(item1.key)}>
{type !== 'view'&&<Dragger {...props(item1.key)}>
<p className="ant-upload-drag-icon">
<InboxOutlined />
</p>
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p>
</Dragger>
</Dragger>}
<div className='flex'>
{fileListHj?.[item1.key]?.map((item) => {
return <div className='flex align-center file-item' style={{marginTop:5,marginRight:'3%',width:'30%', minHeight: "50px", fontSize: 14, columnGap: 10, cursor: checkMediaType(item.fileName) == 'image' || checkMediaType(item.fileName) == 'pdf' ? 'pointer' : "not-allowed" }}>
@ -167,7 +171,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
</Row>))}
<div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}>
<Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button>
<Button type="primary" onClick={getInfo}>确定</Button>
<Button type="primary" onClick={getInfo} loading={loading}>确定</Button>
</div>
</Form >

View File

@ -20,6 +20,8 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
const [fileListUp, setFileLisUp] = useState([])
const [url, setUrl] = useState('')
const [isModal, setIsModal] = useState(false)
const [loading, setLoading] = useState(false)
//
@ -71,8 +73,9 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
}
},
customRequest(e) {
setFileLisUp([...fileListUp, e.file])
setLoading(true);
httppostAddfile(uploadUrl, e).then(res => {
setLoading(false);
setFileList([...fileList, res.data])
})
}
@ -102,9 +105,9 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
return null;
}
const preView = (item) => {
if (checkMediaType(item.name) == 'pdf') {
if (checkMediaType(item.fileName) == 'pdf') {
// window.open(baseUrl + item.previewUrl)
setUrl(item.previewUrl)
setUrl(item.fileId)
setIsModal(true)
}
@ -166,6 +169,7 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
<Form.Item
label={item.label}
name={item.key}
labelCol={item.labelCol}
rules={[{ required: item.required, message: '请输入' + item.label }]}
>
<Input disabled={type == 'view' || item.disabled} placeholder={item.placeholder} addonAfter={item.addonAfter}/>
@ -247,11 +251,11 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
showSearch
style={{ width: '100%' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
placeholder="Please select"
allowClear
fieldNames={item.fieldNames}
treeData={item.treeData}
treeCheckable={item.multiple}
disabled={type == 'view'}
/>
</Form.Item>}
@ -304,10 +308,10 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
{
type !== 'view' && <div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}>
<Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button>
<Button type="primary" onClick={getInfo}>确定</Button>
<Button type="primary" onClick={getInfo} loading={loading}>确定</Button>
</div>
}
<PdfView url={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/xyt/rescue/goods/file/download/${url}`)}`} isModal={isModal} setModalN={(e)=>setIsModal(e)}/>
<PdfView url={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/tsg/rescue/goods/file/download/${url}`)}`} isModal={isModal} setModalN={(e)=>setIsModal(e)}/>
</div >

View File

@ -26,6 +26,7 @@ const Pdf = ({ url,isModal,setModalN }) => {
onOk={handleOk}
footer={false}
onCancel={handleCancel}
style={{ marginTop: "-5%" }}
destroyOnClose>
<div style={{ padding: "0 10px" }}>
<iframe

View File

@ -103,7 +103,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
}
useEffect(() => {
if (mode != 'save') {
const imgFile = record?.files?.map(o => ({
const imgFile = record?.files?.map(o => ({
name: o.fileName,
response: {
data: {
@ -178,6 +178,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
onDrop={(info) => { console.log(info.dataTransfer.files); }}
fileList={fileList}
disabled={loading}
maxCount={1}
// onSuccess={handleSuccess}
>
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p>
@ -272,7 +273,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
border: 0,
marginTop: 20,
}}
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/xyt/projectEvents/file/download/${iframeSrc}`)}`}
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/tsg/projectEvents/file/download/${iframeSrc}`)}`}
/>
</Modal>
</>

View File

@ -21,4 +21,4 @@
color: '#000';
padding: 10px;
background: url(../../../../public/assets/images/four.png) 0 0 no-repeat;
}
}

View File

@ -1,6 +1,6 @@
export default function jgOption(data1) {
console.log("123",data1);
console.log("123", data1);
const one = `${process.env.PUBLIC_URL}/assets/images/one.png`;
const two = `${process.env.PUBLIC_URL}/assets/images/two.png`;
const three = `${process.env.PUBLIC_URL}/assets/images/three.png`;
@ -8,13 +8,12 @@ export default function jgOption(data1) {
return {
series: [{
type: 'tree',
id: 0,
name: 'tree1',
data: data1,
top: '10%',
left: '0%',
left: '10%',
bottom: '20%',
right: '25%',
right: '30%',
avoidLabelOverlap: true,//防止标签重叠
roam: true, //移动+缩放 'scale' 或 'zoom':只能够缩放。 'move' 或 'pan':只能够平移。
scaleLimit:{ //缩放比例
@ -22,7 +21,7 @@ export default function jgOption(data1) {
max:4,//最大的缩放值
},
layout: 'orthogonal',//树图布局orthogonal水平垂直方向radial径向布局 是指以根节点为圆心,每一层节点为环,一层层向外
orient: 'TB', //树形方向 TB为上下结构 LR为左右结构
orient: 'LR', //树形方向 TB为上下结构 LR为左右结构
// nodePadding: 100,//结点间距 (发现没用)
//layerPadding: 30,//连接线长度 (发现没用)
symbol: 'circle', //图形形状 rect方形 roundRect圆角 emptyCircle圆形 circle实心圆
@ -39,37 +38,39 @@ export default function jgOption(data1) {
// 每个节点对应的文本标签样式
show: true, // 是否显示标签
// rotate:90,
distance: 8, // 文本距离图形元素的距离
distance: 1, // 文本距离图形元素的距离
position: ['50%', '50%'], // 标签位置
verticalAlign: 'middle', // 文字垂直对齐方式默认自动topmiddlebottom
align: 'center', // 文字水平对齐方式默认自动leftrightcenter
fontSize: 16, // 字体大小
color: '#000', // 字体颜色
overflow: 'breakAll',
formatter: (params) => {
let newName = ''
let len = params.data.title.length
let strLen = (params.data.parentId === 0 || params.data.parentId === 100 ) ? 100 : 1 //一行显示几个字
let rowNum = Math.ceil(len / strLen)
if (len > strLen) {
// let newName = ''
// let len = params.data.title.length
// let strLen = (params.data.parentId === 0 || params.data.parentId === 100 ) ? 100 : 1 //一行显示几个字
// let rowNum = Math.ceil(len / strLen)
// if (len > strLen) {
for (let p = 0; p < rowNum; p++) {
let tempStr = ''
let start = p * strLen
let end = start + strLen
if (p == rowNum - 1) {
tempStr = params.data.title.substring(start, len)
} else {
tempStr = params.data.title.substring(start, end) + '\n'
}
newName += tempStr
}
} else {
newName = params.data.title
}
let n = newName
if (n.length > 16) {
n = n.slice(0, 16) + '...'
}
// for (let p = 0; p < rowNum; p++) {
// let tempStr = ''
// let start = p * strLen
// let end = start + strLen
// if (p == rowNum - 1) {
// tempStr = params.data.title.substring(start, len)
// } else {
// tempStr = params.data.title.substring(start, end) + '\n'
// }
// newName += tempStr
// }
// } else {
// newName = params.data.title
// }
// let n = newName
// if (n.length > 16) {
// n = n.slice(0, 16) + '...'
// }
let n = params.data.title;
let parentId = params.data.parentId
let userId = params.data.userId;
let str = parentId === 0 ? `{parent|${n}}` :
@ -78,22 +79,21 @@ export default function jgOption(data1) {
// parentId === 100 ? `<div class='org-parent1'>${n}</div>` : userId != undefined ? `<div class='org-parent3'>${n}</div>` : `<div class='org-parent2'>${n}</div>`
return str;
},
rich: {
parent: {
color: '#000',
padding: [20, 20],
padding: [15, 15],
backgroundColor: {
image:one
image: one
},
fontSize: 20
},
parent1: {
color: '#000',
padding: [10, 10],
backgroundColor: {
image:two
image: two
},
fontSize: 18
},
@ -101,20 +101,22 @@ export default function jgOption(data1) {
fontSize: 18,
color: '#000',
align: 'center',
padding: [10, 10],
padding: [10, 10],
backgroundColor: {
image: three,
repeat: "no-repeat",
repeat: "norepeat",
},
},
parent3: {
width:200,
color: '#000',
padding: [10, 10],
overflow:'break',
backgroundColor: {
image: four,
repeat: "no-repeat",
},
fontSize: 18
align: 'center',
fontSize: 18,
},
}
},
@ -128,7 +130,8 @@ export default function jgOption(data1) {
position: 'bottom',
rotate: 0,//标签旋转。
verticalAlign: 'middle',
align: 'center',
align: 'center',
position: ['50%', '50%'], // 标签位置
//文本框内文字超过6个字折行
// formatter: function(val) {
// let strs = val.name.split(''); //字符串数组
@ -146,7 +149,7 @@ export default function jgOption(data1) {
},
expandAndCollapse: true, //默认展开树形结构
animationDuration: 550,
animationDurationUpdate: 750
animationDurationUpdate: 750,
}]
};
}