秦子超 2024-09-30 09:06:41 +08:00
commit 9c71538c22
26 changed files with 280 additions and 116 deletions

9
package-lock.json generated
View File

@ -50,6 +50,7 @@
"react-cookies": "^0.1.1", "react-cookies": "^0.1.1",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-konva": "^18.2.3", "react-konva": "^18.2.3",
"react-org-tree": "^1.0.1",
"react-pdf": "^7.3.3", "react-pdf": "^7.3.3",
"react-redux": "^8.0.2", "react-redux": "^8.0.2",
"react-rnd": "^10.4.11", "react-rnd": "^10.4.11",
@ -18883,6 +18884,14 @@
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" "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": { "node_modules/react-pdf": {
"version": "7.3.3", "version": "7.3.3",
"resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.3.3.tgz", "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-cookies": "^0.1.1",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-konva": "^18.2.3", "react-konva": "^18.2.3",
"react-org-tree": "^1.0.1",
"react-pdf": "^7.3.3", "react-pdf": "^7.3.3",
"react-redux": "^8.0.2", "react-redux": "^8.0.2",
"react-rnd": "^10.4.11", "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

View File

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

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/zdgl' },
{ id: id(), title: '法律法规', path: '/mgr/sz/flfg' },
] ]
}, },

View File

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

View File

@ -23,9 +23,9 @@ export async function reservoirlist(params) {
if (code !== 200) { if (code !== 200) {
message.error(msg || '请求失败'); 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

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

View File

@ -90,8 +90,8 @@ export default function Xmzlmb() {
...obj, ...obj,
} }
}) })
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(res1) setDateSources(result)
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }

View File

@ -35,12 +35,12 @@ const textColor = '#666'
[]; [];
const gz3 = data[alltype[2]] ? 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]]]] : type == "2" ? [[66.5, 162], [66.5, 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" ? [[85, 166], [85, data[alltype[3]]]] : type == "1" ? [[84.5, 166], [84.5, data[alltype[3]]]] :
type == "2" ? [[77, 161], [77, data[alltype[3]]]] : type == "2" ? [[77, 161], [77, data[alltype[3]]]] :
[[85, 166], [85, data[alltype[3]]]] : []; [[85, 166], [85, data[alltype[3]]]] : [];
@ -50,8 +50,8 @@ const textColor = '#666'
[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]]], [72.5, data[alltype[2]]],
[85, data[alltype[3]]] [84.5, data[alltype[3]]]
] : ] :
type == "2" ? type == "2" ?
[ [

View File

@ -110,7 +110,7 @@ const EditableRow = ({ index, ...props }) => {
title: '标准分数', title: '标准分数',
key: 'standardScore', key: 'standardScore',
dataIndex: 'standardScore', dataIndex: 'standardScore',
width: 60, width: 70,
align: "center", align: "center",
}, },
{ {
@ -380,12 +380,20 @@ const EditableRow = ({ index, ...props }) => {
setClickItem(record) setClickItem(record)
} }
const handleRadioChange = (e) => { const handleRadioChange = (e) => {
if (e.target.value == 1) { if (e.target.value == 1) {
setTableData(tableDataRef.current) if (tabs == 2) {
getQdViewData(Item?.id)
} else { } else {
const newData = tableData.filter(item => item.standardScore > item.assessScore) getZbTableData(Item?.id,2)
setTableData(newData);
} }
} 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 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 { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
import { formItemLayout, btnItemLayout } from '../../../../components/crud/FormLayoutProps'; import { formItemLayout, btnItemLayout } from '../../../../components/crud/FormLayoutProps';
import { httpget2, httppost2,xyt_httpget2 } from '../../../../utils/request'; import { httpget2, httppost2,xyt_httpget2 } from '../../../../utils/request';
@ -27,6 +27,16 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
dataIndex: 'indicatorName', dataIndex: 'indicatorName',
width: 250, width: 250,
align: "center", 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: '标准分数', title: '标准分数',

View File

@ -11,8 +11,13 @@ const Page = () => {
<Image src={title} />保护对象 <Image src={title} />保护对象
</div> </div>
<div className={styles.content}> <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>
</div> </div>

View File

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

View File

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

View File

@ -48,7 +48,7 @@ const Page = () => {
title: '施行日期', key: 'implementationDate', dataIndex: 'implementationDate' 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> 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 [fileListHj, setFileHj] = useState({'files3': [],'files4': [],'files5': [],'files6': [],'files7': []})
const [url, setUrl] = useState('') const [url, setUrl] = useState('')
const [isModal, setIsModal] = useState(false) const [isModal, setIsModal] = useState(false)
const [loading, setLoading] = useState(false)
const getInfo = () => { const getInfo = () => {
form.validateFields().then((values) => { form.validateFields().then((values) => {
getFormInfo({ ...values, ...fileListHj }) getFormInfo({ ...fileListHj,...values, })
form.resetFields()
setFileList([]) setFileList([])
}).catch((errorInfo) => { }).catch((errorInfo) => {
console.log(errorInfo, 'error'); console.log(errorInfo, 'error');
@ -73,8 +74,9 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
// } // }
}, },
customRequest(e) { customRequest(e) {
setLoading(true);
httppostAddfile(uploadUrl, e).then(res => { httppostAddfile(uploadUrl, e).then(res => {
if(fileListHj[keys]){ if(fileListHj[keys]){
fileListHj[keys].push(res.data) fileListHj[keys].push(res.data)
}else{ }else{
@ -83,6 +85,8 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
} }
setFileHj({ ...fileListHj }) setFileHj({ ...fileListHj })
setLoading(false);
}) })
} }
} }
@ -131,7 +135,9 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
} }
useEffect(() => { useEffect(() => {
setFileHj(formJsonData) setFileHj(formJsonData)
form.setFieldsValue(formJsonData)
}, []) }, [])
return ( return (
<Form form={form} onFinish={onFinish} > <Form form={form} onFinish={onFinish} >
@ -146,7 +152,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='保管人员' label='保管人员'
name='custodian' name='custodian'
> >
<Input /> <Input disabled={type == 'view'}/>
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={10}> <Col span={10}>
@ -154,7 +160,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='保管地点' label='保管地点'
name='storageLocation' name='storageLocation'
> >
<Input /> <Input disabled={type == 'view'}/>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
@ -170,12 +176,12 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='附件' label='附件'
name='files' name='files'
> >
<Dragger {...props(item1.key)}> {type !== 'view' &&<Dragger {...props(item1.key)} disabled={type == 'view'}>
<p className="ant-upload-drag-icon"> <p className="ant-upload-drag-icon">
<InboxOutlined /> <InboxOutlined />
</p> </p>
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p> <p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p>
</Dragger> </Dragger>}
<div className='flex'> <div className='flex'>
{fileListHj?.[item1.key]?.map((item) => { {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" }}> 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>))} </Row>))}
<div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}> <div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}>
<Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button> <Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button>
<Button type="primary" onClick={getInfo}>确定</Button> <Button type="primary" onClick={getInfo} loading={loading}>确定</Button>
</div> </div>
</Form > </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 = [ const basicData = [
{ {
label: '填报人', label: '填报人',
@ -76,7 +157,7 @@ const basicData = [
}, },
{ {
label: '违法时间', label: '违法时间',
key: 'IllegalDate', key: 'illegalDate',
type: 'DatePicker', type: 'DatePicker',
span: 12 span: 12
}, },
@ -144,14 +225,17 @@ const clqkData = [
{ {
label: '处理依据', label: '处理依据',
key: 'treatmentBasis', key: 'treatmentBasis',
type: 'input', type: 'TreeSelect',
span: 12, span: 12,
treeData:[],
fieldNames:{label: 'legalName', value: 'legalName', children: 'children'}
}, },
{ {
label: '处理措施', label: '处理措施',
key: 'treatmentMeasure', key: 'treatmentMeasure',
type: 'Select', type: 'TreeSelect',
span: 12 span: 12,
treeData:treeData
}, },
{ {
label: '移送处理情况', label: '移送处理情况',
@ -188,6 +272,7 @@ const clqkData = [
{ {
label: '直接损失金额(万元)', label: '直接损失金额(万元)',
key: 'directLossAmount', key: 'directLossAmount',
labelCol:{span:7},
type: 'input', type: 'input',
span: 12 span: 12
}, },

View File

@ -33,11 +33,25 @@ const items = [
const Page = ({ mode, onCrudSuccess,record,submit }) => { const Page = ({ mode, onCrudSuccess,record,submit }) => {
const [formData,setFormData] =useState({}) const [formData,setFormData] =useState({})
const [clqkDataConfig,setConfig] =useState([])
const [recordData,setRecord] =useState({})
// debugger; // debugger;
const [key, setKeys] = useState('1') const [key, setKeys] = useState('1')
const onChange = (key) => { const onChange = async(key) => {
console.log(key); console.log(key);
setKeys(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) => { const getFormInfo = (e) => {
if(!e){ if(!e){
@ -48,7 +62,7 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
...formData, ...formData,
...e, ...e,
caseDate: dayjs(e.caseDate).format("YYYY-MM-DD HH:mm:ss"), 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') { if (mode == 'save') {
@ -80,7 +94,8 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
} }
useEffect(()=>{ useEffect(()=>{
if(mode == 'edit' || mode =='view'){ 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 = { let obj = {
createName: localStorage.getItem('userName'), createName: localStorage.getItem('userName'),
createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
@ -89,12 +104,12 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
if(res.data?.caseDate){ if(res.data?.caseDate){
obj.caseDate=dayjs(res.data.caseDate) obj.caseDate=dayjs(res.data.caseDate)
} }
// if(res.data?.illegalDate){ if(res.data?.illegalDate){
// obj.illegalDate=dayjs(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}) setFormData({...res.data,...obj})
}) })
@ -113,7 +128,7 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
<Tabs defaultActiveKey="1" items={items} onChange={onChange} /> <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 == 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 == 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 == 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>} {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 [fileListHj, setFileHj] = useState({'files3': [],'files4': [],'files5': [],'files6': [],'files7': []})
const [url, setUrl] = useState('') const [url, setUrl] = useState('')
const [isModal, setIsModal] = useState(false) const [isModal, setIsModal] = useState(false)
const [loading, setLoading] = useState(false)
const getInfo = () => { const getInfo = () => {
form.validateFields().then((values) => { form.validateFields().then((values) => {
getFormInfo({ ...values, ...fileListHj }) getFormInfo({ ...values, ...fileListHj })
@ -62,6 +64,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
// } // }
}, },
customRequest(e) { customRequest(e) {
setLoading(true);
httppostAddfile(uploadUrl, e).then(res => { httppostAddfile(uploadUrl, e).then(res => {
if(fileListHj[keys]){ if(fileListHj[keys]){
@ -72,6 +75,7 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
} }
setFileHj({ ...fileListHj }) setFileHj({ ...fileListHj })
setLoading(false);
}) })
} }
} }
@ -136,12 +140,12 @@ const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
label='附件' label='附件'
name='files' name='files'
> >
<Dragger {...props(item1.key)}> {type !== 'view'&&<Dragger {...props(item1.key)}>
<p className="ant-upload-drag-icon"> <p className="ant-upload-drag-icon">
<InboxOutlined /> <InboxOutlined />
</p> </p>
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p> <p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名jpegpng</p>
</Dragger> </Dragger>}
<div className='flex'> <div className='flex'>
{fileListHj?.[item1.key]?.map((item) => { {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" }}> 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>))} </Row>))}
<div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}> <div className="flex flex-end" style={{ marginTop: 10, justifyContent: "flex-end" }}>
<Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button> <Button type="" style={{ marginRight: 10 }} onClick={cancel}>取消</Button>
<Button type="primary" onClick={getInfo}>确定</Button> <Button type="primary" onClick={getInfo} loading={loading}>确定</Button>
</div> </div>
</Form > </Form >

View File

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

View File

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

View File

@ -103,7 +103,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
} }
useEffect(() => { useEffect(() => {
if (mode != 'save') { if (mode != 'save') {
const imgFile = record?.files?.map(o => ({ const imgFile = record?.files?.map(o => ({
name: o.fileName, name: o.fileName,
response: { response: {
data: { data: {
@ -178,6 +178,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
onDrop={(info) => { console.log(info.dataTransfer.files); }} onDrop={(info) => { console.log(info.dataTransfer.files); }}
fileList={fileList} fileList={fileList}
disabled={loading} disabled={loading}
maxCount={1}
// onSuccess={handleSuccess} // onSuccess={handleSuccess}
> >
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p> <p className="ant-upload-text">点击或拖拽文件到此区域上传</p>
@ -272,7 +273,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
border: 0, border: 0,
marginTop: 20, 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> </Modal>
</> </>

View File

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

View File

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