Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web
commit
e713b3c8b9
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 |
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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', //图像监测-列表
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" ?
|
||||
[
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
// 整改
|
||||
|
|
|
|||
|
|
@ -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} ({item?.standardScore})</div>)
|
||||
: ''
|
||||
return (
|
||||
<Tooltip title={titleDom}>
|
||||
<span>{v}</span>
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '标准分数',
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@
|
|||
color: '#000';
|
||||
padding: 10px;
|
||||
background: url(../../../../public/assets/images/four.png) 0 0 no-repeat;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,40 +6,39 @@ export default function jgOption(data1) {
|
|||
const three = `${process.env.PUBLIC_URL}/assets/images/three.png`;
|
||||
const four = `${process.env.PUBLIC_URL}/assets/images/four.png`;
|
||||
return {
|
||||
series: [{
|
||||
type: 'tree',
|
||||
id: 0,
|
||||
name: 'tree1',
|
||||
data: data1,
|
||||
top: '10%',
|
||||
left: '0%',
|
||||
bottom: '20%',
|
||||
right: '25%',
|
||||
avoidLabelOverlap: true,//防止标签重叠
|
||||
roam: true, //移动+缩放 'scale' 或 'zoom':只能够缩放。 'move' 或 'pan':只能够平移。
|
||||
scaleLimit: { //缩放比例
|
||||
min: 0.7,//最小的缩放值
|
||||
max: 4,//最大的缩放值
|
||||
},
|
||||
layout: 'orthogonal',//树图布局,orthogonal水平垂直方向,radial径向布局 是指以根节点为圆心,每一层节点为环,一层层向外
|
||||
orient: 'TB', //树形方向 TB为上下结构 LR为左右结构
|
||||
// nodePadding: 100,//结点间距 (发现没用)
|
||||
//layerPadding: 30,//连接线长度 (发现没用)
|
||||
symbol: 'circle', //图形形状 rect方形 roundRect圆角 emptyCircle圆形 circle实心圆
|
||||
symbolSize: 14, //状态大小
|
||||
edgeShape: 'polyline', //线条类型 curve曲线
|
||||
initialTreeDepth: 3, //初始展开的层级
|
||||
expandAndCollapse: true,//子树折叠和展开的交互,默认打开
|
||||
lineStyle: {//结构线条样式
|
||||
width: 1,
|
||||
color: '#1E9FFF',
|
||||
type: 'solid'
|
||||
},
|
||||
series: [{
|
||||
type: 'tree',
|
||||
name: 'tree1',
|
||||
data: data1,
|
||||
top: '10%',
|
||||
left: '10%',
|
||||
bottom: '20%',
|
||||
right: '30%',
|
||||
avoidLabelOverlap: true,//防止标签重叠
|
||||
roam: true, //移动+缩放 'scale' 或 'zoom':只能够缩放。 'move' 或 'pan':只能够平移。
|
||||
scaleLimit:{ //缩放比例
|
||||
min:0.7,//最小的缩放值
|
||||
max:4,//最大的缩放值
|
||||
},
|
||||
layout: 'orthogonal',//树图布局,orthogonal水平垂直方向,radial径向布局 是指以根节点为圆心,每一层节点为环,一层层向外
|
||||
orient: 'LR', //树形方向 TB为上下结构 LR为左右结构
|
||||
// nodePadding: 100,//结点间距 (发现没用)
|
||||
//layerPadding: 30,//连接线长度 (发现没用)
|
||||
symbol: 'circle', //图形形状 rect方形 roundRect圆角 emptyCircle圆形 circle实心圆
|
||||
symbolSize: 14, //状态大小
|
||||
edgeShape: 'polyline', //线条类型 curve曲线
|
||||
initialTreeDepth: 3, //初始展开的层级
|
||||
expandAndCollapse: true,//子树折叠和展开的交互,默认打开
|
||||
lineStyle: {//结构线条样式
|
||||
width: 1,
|
||||
color: '#1E9FFF',
|
||||
type: 'solid'
|
||||
},
|
||||
label: {
|
||||
// 每个节点对应的文本标签样式
|
||||
show: true, // 是否显示标签
|
||||
// rotate:90,
|
||||
distance: 8, // 文本距离图形元素的距离
|
||||
distance: 1, // 文本距离图形元素的距离
|
||||
position: ['50%', '50%'], // 标签位置
|
||||
verticalAlign: 'middle', // 文字垂直对齐方式,默认自动,top,middle,bottom
|
||||
align: 'center', // 文字水平对齐方式,默认自动,left,right,center
|
||||
|
|
@ -47,19 +46,47 @@ export default function jgOption(data1) {
|
|||
color: '#000', // 字体颜色
|
||||
overflow: 'breakAll',
|
||||
formatter: (params) => {
|
||||
let len = params.data.title
|
||||
let str = `{parent3|${len}}`
|
||||
return str;
|
||||
// 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) + '...'
|
||||
// }
|
||||
let n = params.data.title;
|
||||
let parentId = params.data.parentId
|
||||
let userId = params.data.userId;
|
||||
let str = parentId === 0 ? `{parent|${n}}` :
|
||||
parentId === 100 ? `{parent1|${n}}` : userId != undefined ? `{parent3|${n}}` : `{parent2|${n}}`
|
||||
// let str = parentId === 0 ? `<div class='org-parent'>${n}</div>` :
|
||||
// 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
|
||||
},
|
||||
height: 40,
|
||||
fontSize: 20
|
||||
},
|
||||
parent1: {
|
||||
|
|
@ -77,52 +104,53 @@ export default function jgOption(data1) {
|
|||
padding: [10, 10],
|
||||
backgroundColor: {
|
||||
image: three,
|
||||
repeat: "no-repeat",
|
||||
repeat: "norepeat",
|
||||
},
|
||||
},
|
||||
parent3: {
|
||||
width:200,
|
||||
color: '#000',
|
||||
padding: [10, 10],
|
||||
width:10,
|
||||
overflow:'break',
|
||||
backgroundColor: {
|
||||
image: four,
|
||||
repeat: "no-repeat",
|
||||
},
|
||||
fontSize: 18
|
||||
align: 'center',
|
||||
fontSize: 18,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
leaves: { //叶子节点文本样式
|
||||
label: {
|
||||
// backgroundColor: '#81c5f7',
|
||||
backgroundColor: '#fff',
|
||||
color: '#333',
|
||||
position: 'bottom',
|
||||
rotate: 0,//标签旋转。
|
||||
verticalAlign: 'middle',
|
||||
|
||||
leaves: { //叶子节点文本样式
|
||||
label: {
|
||||
// backgroundColor: '#81c5f7',
|
||||
backgroundColor: '#fff',
|
||||
color:'#333',
|
||||
position: 'bottom',
|
||||
rotate: 0,//标签旋转。
|
||||
verticalAlign: 'middle',
|
||||
align: 'center',
|
||||
//文本框内文字超过6个字折行
|
||||
// formatter: function(val) {
|
||||
// let strs = val.name.split(''); //字符串数组
|
||||
// let str = ''
|
||||
// for(let i = 0, s; s = strs[i++];) { //遍历字符串数组
|
||||
// str += s;
|
||||
// if(!(i % 6)) str += '\n'; //按需要求余,目前是一个字换一行
|
||||
// }
|
||||
// return str
|
||||
// },
|
||||
//或者
|
||||
overflow: 'break',//break为文字折行, truncate为文字超出部分省略号显示
|
||||
lineOverflow: 'truncate',//文字超出高度后 直接截取
|
||||
}
|
||||
},
|
||||
expandAndCollapse: true, //默认展开树形结构
|
||||
animationDuration: 550,
|
||||
animationDurationUpdate: 750
|
||||
}]
|
||||
};
|
||||
position: ['50%', '50%'], // 标签位置
|
||||
//文本框内文字超过6个字折行
|
||||
// formatter: function(val) {
|
||||
// let strs = val.name.split(''); //字符串数组
|
||||
// let str = ''
|
||||
// for(let i = 0, s; s = strs[i++];) { //遍历字符串数组
|
||||
// str += s;
|
||||
// if(!(i % 6)) str += '\n'; //按需要求余,目前是一个字换一行
|
||||
// }
|
||||
// return str
|
||||
// },
|
||||
//或者
|
||||
overflow:'break',//break为文字折行, truncate为文字超出部分省略号显示
|
||||
lineOverflow:'truncate',//文字超出高度后 直接截取
|
||||
}
|
||||
},
|
||||
expandAndCollapse: true, //默认展开树形结构
|
||||
animationDuration: 550,
|
||||
animationDurationUpdate: 750,
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue