Compare commits
2 Commits
25e5417cdd
...
e47436eda8
| Author | SHA1 | Date |
|---|---|---|
|
|
e47436eda8 | |
|
|
ab317c8321 |
|
|
@ -38,6 +38,7 @@
|
||||||
"gsap": "^3.11.5",
|
"gsap": "^3.11.5",
|
||||||
"http-proxy-middleware": "^2.0.6",
|
"http-proxy-middleware": "^2.0.6",
|
||||||
"js-md5": "^0.8.3",
|
"js-md5": "^0.8.3",
|
||||||
|
"konva": "^8.3.14",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"ol": "^7.4.0",
|
"ol": "^7.4.0",
|
||||||
|
|
@ -48,6 +49,7 @@
|
||||||
"react-audio-player": "^0.17.0",
|
"react-audio-player": "^0.17.0",
|
||||||
"react-cookies": "^0.1.1",
|
"react-cookies": "^0.1.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
"react-konva": "^18.2.3",
|
||||||
"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",
|
||||||
|
|
@ -6593,6 +6595,14 @@
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/react-reconciler": {
|
||||||
|
"version": "0.28.8",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@types/react-reconciler/-/react-reconciler-0.28.8.tgz",
|
||||||
|
"integrity": "sha512-SN9c4kxXZonFhbX4hJrZy37yw9e7EIxcpHCxQv5JUS18wDE5ovkQKlqQEkufdJCCMfuI9BnjUJvhYeJ9x5Ra7g==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/react": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/resolve": {
|
"node_modules/@types/resolve": {
|
||||||
"version": "1.17.1",
|
"version": "1.17.1",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/resolve/-/resolve-1.17.1.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/resolve/-/resolve-1.17.1.tgz",
|
||||||
|
|
@ -13004,6 +13014,17 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/its-fine": {
|
||||||
|
"version": "1.2.5",
|
||||||
|
"resolved": "https://registry.npmmirror.com/its-fine/-/its-fine-1.2.5.tgz",
|
||||||
|
"integrity": "sha512-fXtDA0X0t0eBYAGLVM5YsgJGsJ5jEmqZEPrGbzdf5awjv0xE7nqv3TVnvtUF060Tkes15DbDAKW/I48vsb6SyA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/react-reconciler": "^0.28.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=18.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/jake": {
|
"node_modules/jake": {
|
||||||
"version": "10.8.5",
|
"version": "10.8.5",
|
||||||
"resolved": "https://registry.npmmirror.com/jake/-/jake-10.8.5.tgz",
|
"resolved": "https://registry.npmmirror.com/jake/-/jake-10.8.5.tgz",
|
||||||
|
|
@ -15065,6 +15086,25 @@
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/konva": {
|
||||||
|
"version": "8.4.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/konva/-/konva-8.4.3.tgz",
|
||||||
|
"integrity": "sha512-ARqdgAbdNIougRlOKvkQwHlGhXPRBV4KvhCP+qoPpGoVQwwiJe4Hkdu4HHdRPb9rGUp04jDTAxBzEwBsE272pg==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "patreon",
|
||||||
|
"url": "https://www.patreon.com/lavrton"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/konva"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/lavrton"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/l7-tiny-sdf": {
|
"node_modules/l7-tiny-sdf": {
|
||||||
"version": "0.0.4",
|
"version": "0.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/l7-tiny-sdf/-/l7-tiny-sdf-0.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/l7-tiny-sdf/-/l7-tiny-sdf-0.0.4.tgz",
|
||||||
|
|
@ -18793,6 +18833,51 @@
|
||||||
"resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz",
|
"resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz",
|
||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/react-konva": {
|
||||||
|
"version": "18.2.10",
|
||||||
|
"resolved": "https://registry.npmmirror.com/react-konva/-/react-konva-18.2.10.tgz",
|
||||||
|
"integrity": "sha512-ohcX1BJINL43m4ynjZ24MxFI1syjBdrXhqVxYVDw2rKgr3yuS0x/6m1Y2Z4sl4T/gKhfreBx8KHisd0XC6OT1g==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "patreon",
|
||||||
|
"url": "https://www.patreon.com/lavrton"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/konva"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/lavrton"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@types/react-reconciler": "^0.28.2",
|
||||||
|
"its-fine": "^1.1.1",
|
||||||
|
"react-reconciler": "~0.29.0",
|
||||||
|
"scheduler": "^0.23.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"konva": "^8.0.1 || ^7.2.5 || ^9.0.0",
|
||||||
|
"react": ">=18.0.0",
|
||||||
|
"react-dom": ">=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/react-konva/node_modules/react-reconciler": {
|
||||||
|
"version": "0.29.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/react-reconciler/-/react-reconciler-0.29.2.tgz",
|
||||||
|
"integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==",
|
||||||
|
"dependencies": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"scheduler": "^0.23.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^18.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/react-lifecycles-compat": {
|
"node_modules/react-lifecycles-compat": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"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",
|
||||||
|
|
@ -19603,9 +19688,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/scheduler": {
|
"node_modules/scheduler": {
|
||||||
"version": "0.23.0",
|
"version": "0.23.2",
|
||||||
"resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.23.0.tgz",
|
"resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.23.2.tgz",
|
||||||
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
|
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"loose-envify": "^1.1.0"
|
"loose-envify": "^1.1.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class BasicCrudModal extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onEdit = (path,values) => {
|
onEdit = (path,values) => {
|
||||||
createCrudService(path).edit1(values).then((result) => {
|
createCrudService(path).edit(values).then((result) => {
|
||||||
if (result?.code === 200) {
|
if (result?.code === 200) {
|
||||||
message.success('修改成功');
|
message.success('修改成功');
|
||||||
this.setState({ open: false });
|
this.setState({ open: false });
|
||||||
|
|
|
||||||
|
|
@ -209,3 +209,9 @@ code {
|
||||||
.flex-end{
|
.flex-end{
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ellipsis1 {
|
||||||
|
overflow:hidden;/*内容超出后隐藏*/
|
||||||
|
text-overflow:ellipsis;/*超出内容显示为省略号*/
|
||||||
|
white-space:nowrap;/*文本不进行换行*/
|
||||||
|
}
|
||||||
|
|
@ -1083,8 +1083,49 @@ const apiurl = {
|
||||||
// 全周期
|
// 全周期
|
||||||
gcdsj:{
|
gcdsj:{
|
||||||
qzqda:{
|
qzqda:{
|
||||||
list:service_fxdd + '/projectEvents/doc/page'
|
list:service_fxdd + '/projectEvents/doc/page',
|
||||||
|
export: service_fxdd + '/projectEvents/export'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
szzf:{
|
||||||
|
ajdj:{
|
||||||
|
list:service_fxdd + '/szCase/page',
|
||||||
|
add:service_fxdd + '/szCase/insert',
|
||||||
|
edit:service_fxdd + '/szCase/update',
|
||||||
|
del:service_fxdd + '/szCase/del/',
|
||||||
|
upload:service_fxdd + '/szCase/file/upload/singleSimple',
|
||||||
|
download:service_fxdd + '/szCase/file/download/',
|
||||||
|
detail:service_fxdd + '/szCase/get/'
|
||||||
|
},
|
||||||
|
ajtj:{
|
||||||
|
// 统计类型 0:案件来源,1:案件类型,2:执行类型
|
||||||
|
info:service_fxdd + '/szCase/statistics/',
|
||||||
|
//趋势
|
||||||
|
qs:service_fxdd + '/szCase/statisticsNum/'
|
||||||
|
},
|
||||||
|
clyj:{
|
||||||
|
tree:service_fxdd + '/szTreatmentBasis/get/tree',
|
||||||
|
edit:service_fxdd + '/szTreatmentBasis/update',
|
||||||
|
add:service_fxdd + '/szTreatmentBasis/insert',
|
||||||
|
del:service_fxdd + '/szTreatmentBasis/del/',
|
||||||
|
detail:service_fxdd + '/szTreatmentBasis/get/'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
flfg:{
|
||||||
|
edit:service_fxdd + '/SzRuleByLaw/update',
|
||||||
|
add:service_fxdd + '/SzRuleByLaw/insert',
|
||||||
|
del:service_fxdd + '/SzRuleByLaw/del/',
|
||||||
|
upload:service_fxdd + '/SzRuleByLaw/file/upload/singleSimple',
|
||||||
|
download:service_fxdd + '/SzRuleByLaw/file/download/',
|
||||||
|
list:service_fxdd + '/SzRuleByLaw/page'
|
||||||
|
},
|
||||||
|
zdgl:{
|
||||||
|
edit:service_fxdd + '/SzRegulatoryFramework/update',
|
||||||
|
add:service_fxdd + '/SzRegulatoryFramework/insert',
|
||||||
|
del:service_fxdd + '/SzRegulatoryFramework/del/',
|
||||||
|
upload:service_fxdd + '/SzRegulatoryFramework/file/upload/singleSimple',
|
||||||
|
download:service_fxdd + '/SzRegulatoryFramework/file/download/',
|
||||||
|
list:service_fxdd + '/SzRegulatoryFramework/page'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -435,6 +435,20 @@ export function httpPostFile(url, data = {}) {
|
||||||
|
|
||||||
// return sendFile(url, options);
|
// return sendFile(url, options);
|
||||||
// }
|
// }
|
||||||
|
export function httppostAddfile(url, data = {},key,fileKey) {
|
||||||
|
const form = new FormData();
|
||||||
|
let json=new Blob([JSON.stringify(data)],{ type: "application/json" })
|
||||||
|
// form.append(key, json);
|
||||||
|
if(data.file){
|
||||||
|
form.append("file", data.file.originFileObj??data.file);
|
||||||
|
}
|
||||||
|
const options = {
|
||||||
|
method: 'POST',
|
||||||
|
body: form,
|
||||||
|
};
|
||||||
|
|
||||||
|
return send(url, options);
|
||||||
|
}
|
||||||
async function sendFile(url, options) {
|
async function sendFile(url, options) {
|
||||||
try {
|
try {
|
||||||
const res = await request(url, options,'blob');
|
const res = await request(url, options,'blob');
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import apiurl from '../../../../../service/apiurl';
|
||||||
const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const onFinish = async (values) => {
|
const onFinish = async (values) => {
|
||||||
values.resCode = "42120250085"
|
|
||||||
values.id = record?.id
|
values.id = record?.id
|
||||||
if (mode === 'edit') {
|
if (mode === 'edit') {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -16,7 +15,11 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
||||||
onEdit(apiurl.dataResourcesCenter.projectAndWater.kr.update,params)
|
onEdit(apiurl.dataResourcesCenter.projectAndWater.kr.update,params)
|
||||||
}
|
}
|
||||||
if (mode === 'save') {
|
if (mode === 'save') {
|
||||||
onSave(apiurl.dataResourcesCenter.projectAndWater.kr.save,values)
|
const params = {
|
||||||
|
...values,
|
||||||
|
resCode:record.resCode
|
||||||
|
}
|
||||||
|
onSave(apiurl.dataResourcesCenter.projectAndWater.kr.save,params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import apiurl from '../../../../../service/apiurl';
|
||||||
import { httppost2 } from '../../../../../utils/request';
|
import { httppost2 } from '../../../../../utils/request';
|
||||||
import { CrudOpRender_text } from '../../../../../components/crud/CrudOpRender';
|
import { CrudOpRender_text } from '../../../../../components/crud/CrudOpRender';
|
||||||
import BasicCrudModal from '../../../../../components/crud/BasicCrudModal2';
|
import BasicCrudModal from '../../../../../components/crud/BasicCrudModal2';
|
||||||
export default function Zrtx() {
|
export default function Zrtx({dataInfo}) {
|
||||||
const refModal = useRef();
|
const refModal = useRef();
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
|
@ -36,8 +36,9 @@ export default function Zrtx() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const command = (type) => (params) => {
|
const command = (type) => (params) => {
|
||||||
|
debugger;
|
||||||
if (type === 'save') {
|
if (type === 'save') {
|
||||||
refModal.current.showSave({});
|
refModal.current.showSave(dataInfo);
|
||||||
} else if (type === 'edit') {
|
} else if (type === 'edit') {
|
||||||
refModal.current.showEdit(params)
|
refModal.current.showEdit(params)
|
||||||
} else if (type === 'view') {
|
} else if (type === 'view') {
|
||||||
|
|
@ -46,13 +47,15 @@ export default function Zrtx() {
|
||||||
refModal.current.onDeletePost(apiurl.dataResourcesCenter.projectAndWater.kr.delete,params);
|
refModal.current.onDeletePost(apiurl.dataResourcesCenter.projectAndWater.kr.delete,params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getData();
|
getData();
|
||||||
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1><Button type='primary' onClick={() => {refModal.current.showSave({})}}>新增</Button></h1>
|
<h1><Button type='primary' onClick={() => {refModal.current.showSave(dataInfo)}}>新增</Button></h1>
|
||||||
<div style={{display:"flex",columnGap:10,width:"100%"}}>
|
<div style={{display:"flex",columnGap:10,width:"100%"}}>
|
||||||
<div style={{width:500}}>
|
<div style={{width:500}}>
|
||||||
<Table
|
<Table
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,29 @@
|
||||||
import React, { useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import ProjectBasciInfo from './projectBasicInfo'
|
import ProjectBasciInfo from './projectBasicInfo'
|
||||||
import TzParams from './tzParams'
|
import TzParams from './tzParams'
|
||||||
import KrLine from './KrLine'
|
import KrLine from './KrLine'
|
||||||
import MonthLl from './monthLl'
|
import MonthLl from './monthLl'
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
import { httpget2, httppost2 } from '../../../../utils/request';
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
export default function ShuikuBasicInfo() {
|
export default function ShuikuBasicInfo() {
|
||||||
const [tabVal, setTabVal] = useState('1')
|
const [tabVal, setTabVal] = useState('1')
|
||||||
|
const [data,setData] =useState('')
|
||||||
|
const getDataIfo = async () => {
|
||||||
|
try {
|
||||||
|
|
||||||
|
const res = await httppost2(apiurl.dataResourcesCenter.projectAndWater.shuikuBasicinfo.detail)
|
||||||
|
// debugger;
|
||||||
|
if (res.code == 200) {
|
||||||
|
setData(res.data[0])
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
useEffect(()=>{
|
||||||
|
getDataIfo()
|
||||||
|
},[])
|
||||||
return (
|
return (
|
||||||
<div className='shuiku-content-root'>
|
<div className='shuiku-content-root'>
|
||||||
<div className='fxdd_hsybjs_toolbar'>
|
<div className='fxdd_hsybjs_toolbar'>
|
||||||
|
|
@ -32,8 +50,8 @@ export default function ShuikuBasicInfo() {
|
||||||
>
|
>
|
||||||
{tabVal === "1" ? <ProjectBasciInfo /> : null}
|
{tabVal === "1" ? <ProjectBasciInfo /> : null}
|
||||||
{tabVal === "2" ? <TzParams /> : null}
|
{tabVal === "2" ? <TzParams /> : null}
|
||||||
{tabVal === "3" ? <KrLine /> : null}
|
{tabVal === "3" ? <KrLine dataInfo={data}/> : null}
|
||||||
{tabVal === "5" ? <MonthLl /> : null}
|
{tabVal === "5" ? <MonthLl dataInfo={data}/> : null}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ export default function ProjectBasciInfo() {
|
||||||
name="resCode"
|
name="resCode"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
<Input allowClear style={{width:'300px'}} disabled/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
|
|
@ -182,7 +182,7 @@ export default function ProjectBasciInfo() {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="注册登记时间"
|
label="注册登记时间"
|
||||||
name="regTime"
|
name="regTime"
|
||||||
getValueFromEvent={(e, dateString) => dateString}
|
getValueFromEvent={(e, dateString) => moment(dateString).format('YYYY-MM-DD HH:mm:ss')}
|
||||||
getValueProps={value => ({
|
getValueProps={value => ({
|
||||||
value: value ? moment(value) : undefined
|
value: value ? moment(value) : undefined
|
||||||
})}
|
})}
|
||||||
|
|
@ -284,7 +284,7 @@ export default function ProjectBasciInfo() {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="开工日期"
|
label="开工日期"
|
||||||
name="startDate"
|
name="startDate"
|
||||||
getValueFromEvent={(e, dateString) => dateString}
|
getValueFromEvent={(e, dateString) => moment(dateString).format('YYYY-MM-DD HH:mm:ss')}
|
||||||
getValueProps={value => ({
|
getValueProps={value => ({
|
||||||
value: value ? moment(value) : undefined
|
value: value ? moment(value) : undefined
|
||||||
})}
|
})}
|
||||||
|
|
@ -296,7 +296,7 @@ export default function ProjectBasciInfo() {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="竣工日期"
|
label="竣工日期"
|
||||||
name="compDate"
|
name="compDate"
|
||||||
getValueFromEvent={(e, dateString) => dateString}
|
getValueFromEvent={(e, dateString) => moment(dateString).format('YYYY-MM-DD HH:mm:ss')}
|
||||||
getValueProps={value => ({
|
getValueProps={value => ({
|
||||||
value: value ? moment(value) : undefined
|
value: value ? moment(value) : undefined
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,30 @@
|
||||||
import { Image } from "antd"
|
import { Image } from "antd"
|
||||||
import zd from '../../../../assets/img/u7.png'
|
import zd from '../../../../assets/img/u7.png'
|
||||||
import title from '../../../../assets/img/titleRight.png'
|
import title from '../../../../assets/img/titleRight.png'
|
||||||
import './index.less'
|
import styles from './index.module.less'
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
return (
|
return (
|
||||||
<div style={{ display: 'flex',height:'100%' }}>
|
<div style={{ display: 'flex',height:'100%' }}>
|
||||||
<div style={{ backgroundColor: '#ffffff',width:390,height:'100%',marginRight:10,padding:10 }}>
|
<div style={{ backgroundColor: '#ffffff',width:390,height:'100%',marginRight:10,padding:10 }}>
|
||||||
<div className="title">
|
<div className={styles.title}>
|
||||||
<Image src={title} />保护对象
|
<Image src={title} />保护对象
|
||||||
</div>
|
</div>
|
||||||
<div className="content">
|
<div className={styles.content}>
|
||||||
水库防洪标准按50年一遇设计,1000年一遇校核,设计洪水位111.51米,校核洪水位 112.75 米,水库担负着红安县城、七里坪、杏花、城关等城镇,以及京九铁路汉麻连络线、省道S234、国道G230,京九铁路汉麻联络线等交通设施安全的防洪重任、防洪保护人口32万
|
水库防洪标准按50年一遇设计,1000年一遇校核,设计洪水位111.51米,校核洪水位 112.75 米,水库担负着红安县城、七里坪、杏花、城关等城镇,以及京九铁路汉麻连络线、省道S234、国道G230,京九铁路汉麻联络线等交通设施安全的防洪重任、防洪保护人口32万
|
||||||
人,保护耕地 15 万亩。
|
人,保护耕地 15 万亩。
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{ backgroundColor: '#ffffff',flex:1,padding:10}}>
|
<div style={{ backgroundColor: '#ffffff',flex:1,padding:10}}>
|
||||||
<div className="title">
|
<div className={styles.title}>
|
||||||
<Image src={title} />转移路线示意图
|
<Image src={title} />转移路线示意图
|
||||||
</div>
|
</div>
|
||||||
|
<div style={{display:'flex',justifyContent:'center'}}>
|
||||||
<Image src={zd} width='80%' preview={false} />
|
<Image src={zd} width='80%' preview={false} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ import usePageTable from '../../../../components/crud/usePageTable2';
|
||||||
import { createCrudService } from '../../../../components/crud/_';
|
import { createCrudService } from '../../../../components/crud/_';
|
||||||
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
|
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
|
||||||
import './index.less'
|
import './index.less'
|
||||||
|
import { httppost5 } from '../../../../utils/request';
|
||||||
|
import { exportFile } from '../../../../utils/tools';
|
||||||
|
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
|
|
@ -19,6 +21,8 @@ const Page = () => {
|
||||||
const refModal = useRef();
|
const refModal = useRef();
|
||||||
const [searchVal, setSearchVal] = useState(false)
|
const [searchVal, setSearchVal] = useState(false)
|
||||||
const [isFetch, setIsFetch] = useState(false)
|
const [isFetch, setIsFetch] = useState(false)
|
||||||
|
const [iframeSrc, setIframeSrc] = useState('')
|
||||||
|
const [pdfViewOPen, setPdfViewOPen] = useState(false)
|
||||||
|
|
||||||
const command = (type) => (params) => {
|
const command = (type) => (params) => {
|
||||||
if (type === 'save') {
|
if (type === 'save') {
|
||||||
|
|
@ -46,11 +50,22 @@ const Page = () => {
|
||||||
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gcdsj.qzqda.list).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gcdsj.qzqda.list).find_noCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description pdf文件预览
|
||||||
|
* @param {String} params 文件预览url
|
||||||
|
*/
|
||||||
|
const viewPdf = (params) => {
|
||||||
|
setIframeSrc(params)
|
||||||
|
setPdfViewOPen(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onExport = () => {
|
||||||
const viewPdf = (params) => {
|
let params = {
|
||||||
// setIframeSrc(params)
|
...searchVal,
|
||||||
// setPdfViewOPen(true)
|
}
|
||||||
|
httppost5(apiurl.gcdsj.qzqda.export, params).then(res => {
|
||||||
|
exportFile(`全周期档案.xlsx`,res.data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -69,7 +84,7 @@ const viewPdf = (params) => {
|
||||||
<Card className='nonebox'>
|
<Card className='nonebox'>
|
||||||
<ToolBar
|
<ToolBar
|
||||||
setSearchVal={setSearchVal}
|
setSearchVal={setSearchVal}
|
||||||
onSave={command('save')}
|
onExport={onExport}
|
||||||
role={role}
|
role={role}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
@ -145,7 +160,26 @@ const viewPdf = (params) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Modal
|
||||||
|
open={pdfViewOPen}
|
||||||
|
width={1000}
|
||||||
|
title=""
|
||||||
|
footer={null}
|
||||||
|
style={{marginTop:"-5%"}}
|
||||||
|
onCancel={() => {
|
||||||
|
setPdfViewOPen(false)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<iframe
|
||||||
|
style={{
|
||||||
|
height: '80vh',
|
||||||
|
width: '100%',
|
||||||
|
border: 0,
|
||||||
|
marginTop: 20,
|
||||||
|
}}
|
||||||
|
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/xyt/projectEvents/file/download/${iframeSrc}`)}`}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Form, Input, Button, DatePicker } from 'antd';
|
||||||
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
const ToolBar = ({ setSearchVal, onExport, storeData, role }) => {
|
||||||
const addBtn = role?.rule?.find(item => item.menuName == "新增");
|
const addBtn = role?.rule?.find(item => item.menuName == "新增");
|
||||||
const searchBtn = role?.rule?.find(item => item.menuName == "查询");
|
const searchBtn = role?.rule?.find(item => item.menuName == "查询");
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
@ -36,15 +36,15 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{searchBtn ? <Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" htmlType="submit">查询</Button>
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
</Form.Item> : null}
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" onClick={onSave}>导出</Button>
|
<Button type="primary" onClick={onExport}>导出</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,13 @@ const { RangePicker } = DatePicker
|
||||||
const { Dragger } = Upload;
|
const { Dragger } = Upload;
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
|
||||||
const opntios=[
|
const opntios = [
|
||||||
{label:'宪法',value:'宪法'},
|
{ label: '宪法', value: '宪法' },
|
||||||
{label:'法律',value:'法律'},
|
{ label: '法律', value: '法律' },
|
||||||
{label:'行政法规',value:'行政法规'},
|
{ label: '行政法规', value: '行政法规' },
|
||||||
{label:'督察法规',value:'督察法规'},
|
{ label: '督察法规', value: '督察法规' },
|
||||||
{label:'司法解释',value:'司法解释'},
|
{ label: '司法解释', value: '司法解释' },
|
||||||
{label:'地方性法规',value:'地方性法规'},
|
{ label: '地方性法规', value: '地方性法规' },
|
||||||
]
|
]
|
||||||
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
@ -37,7 +37,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
*/
|
*/
|
||||||
const download = (params) => {
|
const download = (params) => {
|
||||||
let downloadLink = document.createElement("a");
|
let downloadLink = document.createElement("a");
|
||||||
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/projectEvents/file/download/${params}`;
|
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/SzRuleByLaw/file/download/${params}`;
|
||||||
downloadLink.download = `${params.fileName}`;
|
downloadLink.download = `${params.fileName}`;
|
||||||
downloadLink.style.display = "none";
|
downloadLink.style.display = "none";
|
||||||
// 将链接添加到页面中
|
// 将链接添加到页面中
|
||||||
|
|
@ -78,16 +78,15 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
||||||
const onfinish = (values) => {
|
const onfinish = (values) => {
|
||||||
values.eventsDate = values.eventsDate ? moment(values.eventsDate).format("YYYY-MM-DD 00:00:00") : ''
|
values.files = fileList.map(item => item.response?.data);
|
||||||
let oldFiles = fileList.map(item => ({ fileId: item.response?.data?.fileId }))
|
|
||||||
|
// values.eventsDate = values.eventsDate ? moment(values.eventsDate).format("YYYY-MM-DD 00:00:00") : ''
|
||||||
if (mode === 'edit') {
|
if (mode === 'edit') {
|
||||||
values.files = oldFiles;
|
|
||||||
values.id = record.id;
|
onEdit(apiurl.flfg.edit, {...record,...values})
|
||||||
onEdit(apiurl.rcgl.gcdsj.edit, values)
|
|
||||||
}
|
}
|
||||||
if (mode === 'save') {
|
if (mode === 'save') {
|
||||||
values.files = oldFiles
|
onSave(apiurl.flfg.add, values)
|
||||||
onSave(apiurl.rcgl.gcdsj.save, values)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,16 +101,16 @@ 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.name,
|
||||||
response: {
|
// response: {
|
||||||
data: {
|
// data: {
|
||||||
filePath: o.filePath,
|
// filePath: o.filePath,
|
||||||
fileId: o.fileId
|
// fileId: o.fileId
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
}))
|
// }))
|
||||||
setFileList(imgFile)
|
setFileList(record?.files)
|
||||||
}
|
}
|
||||||
}, [record, mode])
|
}, [record, mode])
|
||||||
|
|
||||||
|
|
@ -138,51 +137,66 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="制定机关"
|
label="制定机关"
|
||||||
name="name"
|
name="fillUnit"
|
||||||
rules={[{ required: true }]}
|
|
||||||
>
|
>
|
||||||
<Input disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
<Input disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="制定机关" name="name">
|
<Form.Item label="法律性质" name="type" rules={[{ required: true }]}>
|
||||||
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
<Select allowClear style={{ width: '150px' }} options={[
|
||||||
|
{ label: '宪法', value: 0 },
|
||||||
|
{ label: '法律', value: 1 },
|
||||||
|
{ label: '行政法规', value: 2 },
|
||||||
|
{ label: '督察法规', value: 3 },
|
||||||
|
{ label: '司法解释', value: 4 },
|
||||||
|
{ label: '地方性法规', value: 5 },
|
||||||
|
]} disabled={mode === 'view'} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<Form.Item label="失效性" name="name">
|
<Form.Item label="法律性质" name="timeliness">
|
||||||
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col> */}
|
||||||
|
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="公布日期"
|
label="时效性"
|
||||||
name="eventsDate"
|
name="timeliness"
|
||||||
getValueFromEvent={(e, dateString) => dateString}
|
|
||||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
||||||
>
|
>
|
||||||
<DatePicker disabled={mode === 'view'} format={'YYYY-MM-DD'} style={{ width: '100%' }} allowClear />
|
<Select allowClear style={{ width: '150px' }} options={[
|
||||||
|
{ label: '尚未生效', value: 0 },
|
||||||
|
{ label: '有效', value: 1 },
|
||||||
|
{ label: '已修改', value: 2 },
|
||||||
|
{ label: '已废止', value: 3 },
|
||||||
|
]} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="施行日期"
|
label="施行日期"
|
||||||
name="eventsDate"
|
name="announcementDate"
|
||||||
getValueFromEvent={(e, dateString) => dateString}
|
getValueFromEvent={(e, dateString) => dateString}
|
||||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<DatePicker disabled={mode === 'view'} format={'YYYY-MM-DD'} style={{ width: '100%' }} allowClear />
|
<DatePicker disabled={mode === 'view'} format={'YYYY-MM-DD HH:mm:ss'} style={{ width: '100%' }} allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="公布日期"
|
||||||
|
name="implementationDate"
|
||||||
|
getValueFromEvent={(e, dateString) => dateString}
|
||||||
|
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||||
|
>
|
||||||
|
<DatePicker disabled={mode === 'view'} format={'YYYY-MM-DD HH:mm:ss'} style={{ width: '100%' }} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -191,15 +205,20 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="附件"
|
label="附件"
|
||||||
name="fieldId"
|
name="files"
|
||||||
labelCol={{ span: 3 }}
|
labelCol={{ span: 3 }}
|
||||||
wrapperCol={{ span: 19 }}
|
wrapperCol={{ span: 19 }}
|
||||||
|
// rules={[
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// },
|
||||||
|
// ]}
|
||||||
>
|
>
|
||||||
{mode !== "view" &&
|
{mode !== "view" &&
|
||||||
<Dragger
|
<Dragger
|
||||||
name='file'
|
name='file'
|
||||||
// multiple
|
// multiple
|
||||||
action="/gunshiApp/xyt/projectEvents/file/upload/singleSimple"
|
action="/gunshiApp/tsg/SzRuleByLaw/file/upload/singleSimple"
|
||||||
onChange={fileChange}
|
onChange={fileChange}
|
||||||
onDrop={(info) => { console.log(info.dataTransfer.files); }}
|
onDrop={(info) => { console.log(info.dataTransfer.files); }}
|
||||||
fileList={fileList}
|
fileList={fileList}
|
||||||
|
|
@ -219,9 +238,9 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<div className="file-item" style={{ width: "75%" }}>
|
<div className="file-item" style={{ width: "75%" }}>
|
||||||
<div className='file-description'>
|
<div className='file-description'>
|
||||||
{file.name.indexOf('.docx') > -1 ?
|
{file?.fileName?.indexOf('.docx') > -1 ?
|
||||||
<div
|
<div
|
||||||
onClick={() => { download(file.response?.data?.fileId) }}
|
onClick={() => { download(file.fileId) }}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
>
|
>
|
||||||
<FileWordOutlined
|
<FileWordOutlined
|
||||||
|
|
@ -229,35 +248,35 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
file.name.indexOf('.pdf') > -1 ?
|
file?.fileName?.indexOf('.pdf') > -1 ?
|
||||||
<div
|
<div
|
||||||
onClick={() => { viewPdf(file.response?.data?.fileId) }}
|
onClick={() => { viewPdf(file.fileId) }}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
>
|
>
|
||||||
<FilePdfOutlined style={{ fontSize: 40 }} />
|
<FilePdfOutlined style={{ fontSize: 40 }} />
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
file.name.indexOf('.zip') > -1 ?
|
file?.fileName?.indexOf('.zip') > -1 ?
|
||||||
<div
|
<div
|
||||||
onClick={() => { download(file.response?.data?.fileId) }}
|
onClick={() => { download(file.fileId) }}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
>
|
>
|
||||||
<FileZipOutlined style={{ fontSize: 40 }} />
|
<FileZipOutlined style={{ fontSize: 40 }} />
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
file.name.indexOf('.xlsx') > -1 ?
|
file?.fileName?.indexOf('.xlsx') > -1 ?
|
||||||
<div
|
<div
|
||||||
onClick={() => { download(file.response?.data?.fileId) }}
|
onClick={() => { download(file.fileId) }}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
>
|
>
|
||||||
<FileExcelOutlined style={{ fontSize: 40 }} />
|
<FileExcelOutlined style={{ fontSize: 40 }} />
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<Image width={60} src={url + file.response?.data?.filePath} alt='' />
|
<Image width={60} src={url + file.filePath} alt='' />
|
||||||
}
|
}
|
||||||
<span>{file.name}</span>
|
<span>{file?.fileName}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={mode == "view" ? 'delete-icon disable-icon' : 'delete-icon'} onClick={() => deleteFile(file.response?.data?.fileId)}>
|
<div className={mode == "view" ? 'delete-icon disable-icon' : 'delete-icon'} onClick={() => deleteFile(file.fileId)}>
|
||||||
<DeleteOutlined />
|
<DeleteOutlined />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -273,7 +292,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
mode === 'view' ? null : (
|
mode === 'view' ? null : (
|
||||||
<>
|
<>
|
||||||
<Form.Item {...btnItemLayout}>
|
<Form.Item {...btnItemLayout}>
|
||||||
<Button type="primary" htmlType="submit">
|
<Button type="primary" htmlType="submit" loading={loading}>
|
||||||
{mode === 'save' ? '提交' : '修改'}
|
{mode === 'save' ? '提交' : '修改'}
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
@ -298,7 +317,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>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,11 @@ import apiurl from '../../../service/apiurl';
|
||||||
import usePageTable from '../../../components/crud/usePageTable2';
|
import usePageTable from '../../../components/crud/usePageTable2';
|
||||||
import { createCrudService } from '../../../components/crud/_';
|
import { createCrudService } from '../../../components/crud/_';
|
||||||
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
|
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
|
||||||
|
import { render } from 'react-dom';
|
||||||
|
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
const typeOb={0:'宪法',1:'法律',2:'行政法规',3:'督察法规',4:'司法解释',5:'地方性法规'}
|
||||||
|
const timelinessOb = {0:'尚未生效',1:'有效',2:'已修改',3:'已废止'}
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
const editBtn = role?.rule?.find(item => item.menuName == "编辑");
|
const editBtn = role?.rule?.find(item => item.menuName == "编辑");
|
||||||
|
|
@ -25,26 +28,28 @@ const Page = () => {
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||||
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
||||||
{
|
{
|
||||||
title: '制定机关', key: 'eventsDate', dataIndex: 'eventsDate', width: 140,
|
title: '制定机关', key: 'fillUnit', dataIndex: 'fillUnit', width: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '法律性质', key: 'eventsType', dataIndex: 'eventsType', width: 140,
|
title: '法律性质', key: 'type', dataIndex: 'type', width: 140,
|
||||||
render: (value) => <span>{value == 1 ? "综合大事记" : value == 2 ? "专题大事记" : ''}</span>,
|
render: (value) => <span>{typeOb[value]}</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '时效性', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '时效性', key: 'timeliness', dataIndex: 'timeliness', width: 300,render:(v)=><>
|
||||||
|
{timelinessOb[v]}
|
||||||
|
</>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '公布日期', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '公布日期', key: 'announcementDate', dataIndex: 'announcementDate', width: 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '施行日期', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '施行日期', key: 'implementationDate', dataIndex: 'implementationDate', width: 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '附件', key: 'fileName', dataIndex: 'fileName', width: 300,render:(v,r)=><a onClick={()=>viewPdf(r.fileId)}>{v}</a>
|
title: '附件', key: 'files', dataIndex: 'files', width: 300,render:(v,r)=><a onClick={()=>viewPdf(v[0].fileId)}>{v[0]?.fileName}</a>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
||||||
|
|
@ -52,7 +57,7 @@ const Page = () => {
|
||||||
<CrudOpRender_text
|
<CrudOpRender_text
|
||||||
edit={true}
|
edit={true}
|
||||||
del={true}
|
del={true}
|
||||||
view={true}
|
// view={true}
|
||||||
command={(cmd) => () => command(cmd)(row)} />)
|
command={(cmd) => () => command(cmd)(row)} />)
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -68,12 +73,12 @@ const Page = () => {
|
||||||
} else if (type === 'view') {
|
} else if (type === 'view') {
|
||||||
refModal.current.showView(params);
|
refModal.current.showView(params);
|
||||||
} else if (type === 'del') {
|
} else if (type === 'del') {
|
||||||
refModal.current.onDeleteGet(apiurl.rcgl.gcdsj.delete + `/${params.id}`);
|
refModal.current.onDeleteGet(apiurl.flfg.del + `/${params.id}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.gcdsj.page).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.flfg.list).find_noCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 处理成功的回调
|
* @description 处理成功的回调
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,22 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete values.tm
|
delete values.tm
|
||||||
setSearchVal({...values, dataSo});
|
setSearchVal({...values});
|
||||||
}
|
}
|
||||||
|
|
||||||
const opntios=[
|
const opntios=[
|
||||||
{label:'宪法',value:'宪法'},
|
{label:'宪法',value:0},
|
||||||
{label:'法律',value:'法律'},
|
{label:'法律',value:1},
|
||||||
{label:'行政法规',value:'行政法规'},
|
{label:'行政法规',value:2},
|
||||||
{label:'督察法规',value:'督察法规'},
|
{label:'督察法规',value:3},
|
||||||
{label:'司法解释',value:'司法解释'},
|
{label:'司法解释',value:4},
|
||||||
{label:'地方性法规',value:'地方性法规'},
|
{label:'地方性法规',value:5},
|
||||||
|
]
|
||||||
|
const opntios1=[
|
||||||
|
{label:'尚未生效',value:0},
|
||||||
|
{label:'有效',value:1},
|
||||||
|
{label:'已修改',value:2},
|
||||||
|
{label:'已废止',value:3},
|
||||||
]
|
]
|
||||||
const styles={
|
const styles={
|
||||||
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
||||||
|
|
@ -43,10 +49,10 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
<Form.Item label="标题" name="name">
|
<Form.Item label="标题" name="name">
|
||||||
<Input allowClear style={{width:'150px'}}/>
|
<Input allowClear style={{width:'150px'}}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="制定机关" name="name">
|
<Form.Item label="制定机关" name="fillUnit">
|
||||||
<Input allowClear style={{width:'150px'}}/>
|
<Input allowClear style={{width:'150px'}}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="制定机关" name="name">
|
<Form.Item label="法律性质" name="type">
|
||||||
<Select allowClear style={{width:'150px'}} options={opntios}/>
|
<Select allowClear style={{width:'150px'}} options={opntios}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
|
|
@ -69,13 +75,13 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
{showGj&&<div style={{display:'flex'}}>
|
{showGj&&<div style={{display:'flex'}}>
|
||||||
<Form.Item label="时效性" name="name">
|
<Form.Item label="时效性" name="timeliness">
|
||||||
<Select allowClear style={{width:'150px'}} options={opntios}/>
|
<Select allowClear style={{width:'150px'}} options={opntios1}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="公布日期" name="name">
|
<Form.Item label="公布日期" name="announcementDate">
|
||||||
<RangePicker allowClear />
|
<RangePicker allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="施行日期" name="name">
|
<Form.Item label="施行日期" name="implementationDate">
|
||||||
<RangePicker allowClear />
|
<RangePicker allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="上传时间" name="name">
|
<Form.Item label="上传时间" name="name">
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,64 @@
|
||||||
import { Space, Table, Radio, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image } from 'antd';
|
import { Space, Table, Radio, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image } from 'antd';
|
||||||
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined,VerticalAlignBottomOutlined } from '@ant-design/icons'
|
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined, VerticalAlignBottomOutlined } from '@ant-design/icons'
|
||||||
import { useForm } from 'antd/lib/form/Form';
|
import { useForm } from 'antd/lib/form/Form';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import { httpgetExport, httppostAddfile } from '../../../../utils/request';
|
||||||
|
import { exportFile } from '../../../../utils/tools';
|
||||||
|
|
||||||
const { Dragger } = Upload;
|
const { Dragger } = Upload;
|
||||||
|
|
||||||
const list = [
|
const list = [
|
||||||
{
|
{
|
||||||
type:'立案'
|
type: '立案',
|
||||||
|
key: 'files3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'调查取证'
|
type: '调查取证',
|
||||||
|
key: 'files4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'审查处理'
|
type: '审查处理',
|
||||||
|
key: 'files5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'送达执行'
|
type: '送达执行',
|
||||||
|
key: 'files6'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'结案'
|
type: '结案',
|
||||||
|
key: 'files7'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const Page = () => {
|
const baseUrl = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
|
||||||
|
const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [fileList ,setFileList] =useState()
|
const [fileList, setFileList] = useState([])
|
||||||
const props = {
|
const [fileListHj, setFileHj] = useState({'files3': [],'files4': [],'files5': [],'files6': [],'files7': []})
|
||||||
|
const [url, setUrl] = useState('')
|
||||||
|
const [isModal, setIsModal] = useState(false)
|
||||||
|
const getInfo = () => {
|
||||||
|
form.validateFields().then((values) => {
|
||||||
|
getFormInfo({ ...values, ...fileListHj })
|
||||||
|
form.resetFields()
|
||||||
|
setFileList([])
|
||||||
|
}).catch((errorInfo) => {
|
||||||
|
console.log(errorInfo, 'error');
|
||||||
|
})
|
||||||
|
//
|
||||||
|
}
|
||||||
|
const cancel = () => {
|
||||||
|
getFormInfo(false)
|
||||||
|
form.resetFields()
|
||||||
|
setFileList([])
|
||||||
|
|
||||||
|
}
|
||||||
|
const deleteFile = (e,key) => {
|
||||||
|
fileListHj[key] = fileListHj[key].filter(item => item.fileId !== e)
|
||||||
|
setFileHj({ ...fileListHj })
|
||||||
|
}
|
||||||
|
const props = (keys) => {
|
||||||
|
return {
|
||||||
name: 'file',
|
name: 'file',
|
||||||
multiple: true,
|
multiple: true,
|
||||||
fileList: fileList,
|
fileList: fileList,
|
||||||
|
|
@ -38,27 +72,79 @@ const Page = () => {
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onChange(e) {
|
customRequest(e) {
|
||||||
// httpPostFile(apiUrl.service.uploadFile.uploadUrl + "?group=" + typeUpload, e).then(res => {
|
|
||||||
// setFileList([...fileList, res.data])
|
httppostAddfile(uploadUrl, e).then(res => {
|
||||||
// })
|
if(fileListHj[keys]){
|
||||||
|
fileListHj[keys].push(res.data)
|
||||||
|
}else{
|
||||||
|
fileListHj[keys]=[]
|
||||||
|
fileListHj[keys].push(res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFileHj({ ...fileListHj })
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const onFinish = () =>{
|
function checkMediaType(url) {
|
||||||
|
// 创建URL对象
|
||||||
|
var link = url;
|
||||||
|
// 获取路径的最后一个点之后的内容作为文件扩展名
|
||||||
|
var extension = link?.split('.').pop().toLowerCase();
|
||||||
|
|
||||||
|
// 声明支持的图片和视频文件扩展名
|
||||||
|
var imageExtensions = ['jpg', 'jpeg', 'gif', 'png'];
|
||||||
|
var file = ['pdf', 'word', 'xslx', 'xsl', 'txt', "pptx"];
|
||||||
|
//
|
||||||
|
// 判断文件扩展名是否在图片扩展名数组中
|
||||||
|
if (imageExtensions.includes(extension)) {
|
||||||
|
return 'image';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断文件扩展名是否在视频扩展名数组中
|
||||||
|
if (file.includes(extension)) {
|
||||||
|
return extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 扩展名不在图片或视频数组中,返回null表示无法确定媒体类型
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const preView = (item) => {
|
||||||
|
if (checkMediaType(item.name) == 'pdf') {
|
||||||
|
// window.open(baseUrl + item.previewUrl)
|
||||||
|
setUrl(item.previewUrl)
|
||||||
|
setIsModal(true)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description 文件下载
|
||||||
|
* @param {String} params 文件fileId
|
||||||
|
*/
|
||||||
|
const download = (id, name) => {
|
||||||
|
httpgetExport(downloadUrl+id).then(res => {
|
||||||
|
exportFile(name,res.data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const onFinish = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
useEffect(() => {
|
||||||
|
setFileHj(formJsonData)
|
||||||
|
}, [])
|
||||||
return (
|
return (
|
||||||
<Form form={form} onFinish={onFinish} >
|
<Form form={form} onFinish={onFinish} >
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={2}>
|
<Col span={2}>
|
||||||
<div style={{display:'flex',alignItems:'center'}}>
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{width:3,height:12,background:'#259def',marginRight:5}}></div>
|
<div style={{ width: 3, height: 12, background: '#259def', marginRight: 5 }}></div>
|
||||||
案卷存档</div>
|
案卷存档</div>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={10}>
|
<Col span={10}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label='保管人员'
|
label='保管人员'
|
||||||
name='name'
|
name='custodian'
|
||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
@ -66,33 +152,57 @@ const Page = () => {
|
||||||
<Col span={10}>
|
<Col span={10}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label='保管地点'
|
label='保管地点'
|
||||||
name='adress'
|
name='storageLocation'
|
||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{list.map(item=>(
|
{list.map(item1 => (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={2}>
|
<Col span={2}>
|
||||||
<div style={{display:'flex',alignItems:'center'}}>
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{width:3,height:12,background:'#259def',marginRight:5}}></div>
|
<div style={{ width: 3, height: 12, background: '#259def', marginRight: 5 }}></div>
|
||||||
{item.type}</div>
|
{item1.type}</div>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22}>
|
<Col span={22}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label='附件'
|
label='附件'
|
||||||
name='name'
|
name='files'
|
||||||
>
|
>
|
||||||
<Dragger {...props}>
|
<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">点击或将文件拖拽到这里上传 支持扩展名:jpeg、png</p>
|
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名:jpeg、png</p>
|
||||||
</Dragger>
|
</Dragger>
|
||||||
|
<div>
|
||||||
|
{fileListHj?.[item1.key]?.map((item) => {
|
||||||
|
return <div className='flex align-center' style={{ minHeight: "50px", fontSize: 14, columnGap: 10, cursor: checkMediaType(item.fileName) == 'image' || checkMediaType(item.fileName) == 'pdf' ? 'pointer' : "not-allowed" }}>
|
||||||
|
<div style={{ width: 40, height: 40, display: "flex", alignItems: 'center' }}>
|
||||||
|
{checkMediaType(item.fileName) == 'image' && <Image
|
||||||
|
height={40}
|
||||||
|
src={baseUrl + item.filePath}
|
||||||
|
/>}
|
||||||
|
{
|
||||||
|
checkMediaType(item.fileName) !== 'image' &&
|
||||||
|
<span >{checkMediaType(item.fileName)?.toUpperCase()}</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span onClick={() => preView(item)}>{item.fileName}</span>
|
||||||
|
{type !== 'view' && <DeleteOutlined onClick={() => deleteFile(item.fileId,item1.key)} />}
|
||||||
|
<VerticalAlignBottomOutlined onClick={() => download(item.fileId, item.fileName)} />
|
||||||
|
</div>
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>))}
|
</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>
|
||||||
|
</div>
|
||||||
</Form >
|
</Form >
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,81 +1,111 @@
|
||||||
|
|
||||||
const basicData = [
|
const basicData = [
|
||||||
{
|
{
|
||||||
label: '填报人',
|
label: '填报人',
|
||||||
key: 'name',
|
key: 'createName',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12,
|
span: 12,
|
||||||
disabled: true
|
disabled: true
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '填报时间',
|
label: '填报时间',
|
||||||
key: 'name',
|
key: 'createTime',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12,
|
span: 12,
|
||||||
|
// required: true
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件编号',
|
label: '案件编号',
|
||||||
key: 'name',
|
key: 'caseId',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件名称',
|
label: '案件名称',
|
||||||
key: 'name',
|
key: 'caseName',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12,
|
span: 12,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件类型',
|
label: '案件类型',
|
||||||
key: 'name',
|
key: 'caseType',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
span: 12
|
options: [
|
||||||
|
{ value: 0, label: '违建' },
|
||||||
|
{ value: 1, label: '毁林垦荒' },
|
||||||
|
{ value: 2, label: '筑坝拦汊' },
|
||||||
|
{ value: 3, label: '填占库容' },
|
||||||
|
{ value: 4, label: '违法取水' },
|
||||||
|
{ value: 5, label: '其他' }
|
||||||
|
],
|
||||||
|
span: 12,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '发现时间',
|
||||||
|
key: 'caseDate',
|
||||||
|
type: 'DatePicker',
|
||||||
|
span: 12,
|
||||||
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案发地点',
|
label: '案发地点',
|
||||||
key: 'name',
|
key: 'caseAddress',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12,
|
||||||
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件来源',
|
label: '案件来源',
|
||||||
key: 'name',
|
key: 'caseSource',
|
||||||
type: 'Radio',
|
type: 'Select',
|
||||||
span: 12,
|
span: 12,
|
||||||
|
required: true,
|
||||||
options: [
|
options: [
|
||||||
{ label: '自然人', value: 'Apple' },
|
{ label: '巡查上报', value: 0 },
|
||||||
{ label: '法人或其他组织', value: 'Pear' },
|
{ label: '自主发现', value: 1 },
|
||||||
{ label: '待定', value: 'Orange' },
|
{ label: '公共举报', value: 2 },
|
||||||
|
{ label: '电话举报', value: 3 },
|
||||||
|
{ label: '其他', value: 4 },
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '违法时间',
|
label: '违法时间',
|
||||||
key: 'name',
|
key: 'IllegalDate',
|
||||||
type: 'input',
|
type: 'DatePicker',
|
||||||
span: 24
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件来源',
|
label: '当事人类型',
|
||||||
key: 'name',
|
key: 'partyType',
|
||||||
type: 'input',
|
type: 'Radio',
|
||||||
|
required: true,
|
||||||
|
options: [
|
||||||
|
{ label: '自然人', value: 0 },
|
||||||
|
{ label: '法人或其他组织', value: 1 },
|
||||||
|
{ label: '待定', value: 2 },
|
||||||
|
],
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
key: 'name',
|
key: 'partyName',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '身份证号',
|
label: '身份证号',
|
||||||
key: 'name',
|
key: 'idNumber',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '住址',
|
label: '住址',
|
||||||
key: 'name',
|
key: 'partyAddr',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
|
|
@ -87,13 +117,13 @@ const basicData = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '简要案情',
|
label: '简要案情',
|
||||||
key: 'name',
|
key: 'intro',
|
||||||
type: 'TextArea',
|
type: 'TextArea',
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '附件',
|
label: '附件',
|
||||||
key: 'name',
|
key: 'files1',
|
||||||
type: 'upload',
|
type: 'upload',
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
|
|
@ -102,97 +132,106 @@ const basicData = [
|
||||||
const clqkData = [
|
const clqkData = [
|
||||||
{
|
{
|
||||||
label: '处理程序',
|
label: '处理程序',
|
||||||
key: 'name',
|
key: 'processor',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
|
options: [
|
||||||
|
{ label: '简易程序', value: 0 },
|
||||||
|
{ label: '一般程序', value: 1 },
|
||||||
|
],
|
||||||
span: 12,
|
span: 12,
|
||||||
disabled: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '处理依据',
|
label: '处理依据',
|
||||||
key: 'name',
|
key: 'treatmentBasis',
|
||||||
type: 'Select',
|
type: 'input',
|
||||||
span: 12,
|
span: 12,
|
||||||
disabled: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '处理措施',
|
label: '处理措施',
|
||||||
key: 'name',
|
key: 'treatmentMeasure',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '移送处理情况',
|
label: '移送处理情况',
|
||||||
key: 'name',
|
key: 'transfer',
|
||||||
type: 'Radio',
|
type: 'Radio',
|
||||||
span: 24,
|
span: 24,
|
||||||
options: [
|
options: [
|
||||||
{ label: '移送单位', value: 'Apple' },
|
{ label: '移送单位', value: '1' },
|
||||||
{ label: '不移送', value: 'Pear' },
|
{ label: '不移送', value: '0' },
|
||||||
],
|
],
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件执行情况',
|
label: '案件执行情况',
|
||||||
key: 'name',
|
key: 'caseImplementation',
|
||||||
type: 'Radio',
|
type: 'Radio',
|
||||||
options: [
|
options: [
|
||||||
{ label: '当事人自动履行', value: 'Apple' },
|
{ label: '当事人自动履行', value: 0 },
|
||||||
{ label: '行政强制执行', value: 'Pear' },
|
{ label: '行政强制执行', value: 1 },
|
||||||
],
|
],
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '自动履行情况',
|
label: '自动履行情况',
|
||||||
key: 'name',
|
key: 'performance',
|
||||||
type: 'TextArea',
|
type: 'TextArea',
|
||||||
|
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '伤亡人数(人)',
|
label: '伤亡人数(人)',
|
||||||
key: 'name',
|
key: 'casualties',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '直接损失金额(万元)',
|
label: '直接损失金额(万元)',
|
||||||
key: 'name',
|
key: 'directLossAmount',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '结案情况',
|
label: '结案情况',
|
||||||
key: 'name',
|
key: 'closeStatus',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
|
options: [
|
||||||
|
{ label: '正常结案', value: 0 },
|
||||||
|
{ label: '其他方式结案', value: 1 },
|
||||||
|
{ label: '未结案', value: 2 },
|
||||||
|
],
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '结案时间',
|
label: '结案时间',
|
||||||
key: 'name',
|
key: 'closeDate',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '文件编号及名称',
|
label: '文件编号及名称',
|
||||||
key: 'name',
|
key: 'docNumName',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '督办单位类型',
|
label: '督办单位类型',
|
||||||
key: 'name',
|
key: 'unitType',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
|
options: [
|
||||||
|
{ label: '上级督办', value: 0 },
|
||||||
|
{ label: '本级河长督办', value: 1 },
|
||||||
|
],
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '督办单位名称',
|
label: '督办单位名称',
|
||||||
key: 'name',
|
key: 'unitName',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '附件',
|
label: '附件',
|
||||||
key: 'name',
|
key: 'files2',
|
||||||
type: 'upload',
|
type: 'upload',
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
|
|
@ -200,39 +239,37 @@ const clqkData = [
|
||||||
|
|
||||||
const xzfy = [
|
const xzfy = [
|
||||||
{
|
{
|
||||||
label: '处理程序',
|
label: '行政复议情况',
|
||||||
key: 'name',
|
key: 'administrativeReconsideration',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
span: 12,
|
span: 12,
|
||||||
options:[
|
options: [
|
||||||
{
|
{
|
||||||
label:'维护'
|
label: '维护', value: 0
|
||||||
},
|
},
|
||||||
{label:'变更'},
|
{ label: '变更', value: 1 },
|
||||||
{label:'撤销'},
|
{ label: '撤销', value: 2 },
|
||||||
{label:'和解'},
|
{ label: '和解', value: 3 },
|
||||||
{label:'调解'},
|
{ label: '调解', value: 4 },
|
||||||
|
|
||||||
],
|
],
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '处理依据',
|
label: '行政应诉情况',
|
||||||
key: 'name',
|
key: 'administrativeResponse',
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
span: 12,
|
span: 12,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
options:[
|
options: [
|
||||||
{
|
{
|
||||||
label:'驳回原告诉讼'
|
label: '驳回原告诉讼', value: 0
|
||||||
},
|
},
|
||||||
{label:'变更'},
|
{ label: '变更', value: 2 },
|
||||||
{label:'撤销'},
|
{ label: '撤销', value: 1 },
|
||||||
{label:'确认违法'},
|
{ label: '确认违法', value: 3 },
|
||||||
{label:'确认无效'},
|
{ label: '确认无效', value: 4 },
|
||||||
{label:'其他'},
|
{ label: '其他', value: 5 },
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Tabs } from 'antd';
|
import { message, Tabs } from 'antd';
|
||||||
import BascForm from '../form/index'
|
import BascForm from '../form/index'
|
||||||
import { basicData,clqkData,xzfy} from './config'
|
import { basicData, clqkData, xzfy } from './config'
|
||||||
import Bajz from './bajz'
|
import Bajz from './bajz'
|
||||||
import Lsyx from './lsyx'
|
import Lsyx from './lsyx'
|
||||||
|
import { httpget, httppost } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
import dayjs from 'dayjs'
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
key: '1',
|
key: '1',
|
||||||
|
|
@ -28,21 +31,71 @@ const items = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
const Page = () => {
|
const Page = ({ mode, onCrudSuccess,record }) => {
|
||||||
const [key , setKeys] = useState('1')
|
const [formData,setFormData] =useState({})
|
||||||
|
// debugger;
|
||||||
|
const [key, setKeys] = useState('1')
|
||||||
const onChange = (key) => {
|
const onChange = (key) => {
|
||||||
console.log(key);
|
console.log(key);
|
||||||
setKeys(key)
|
setKeys(key)
|
||||||
};
|
};
|
||||||
|
const getFormInfo = (e) => {
|
||||||
|
let params = {
|
||||||
|
...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,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode == 'save') {
|
||||||
|
addBasic(params)
|
||||||
|
} else if (mode == 'edit') {
|
||||||
|
editBasic(params)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const addBasic = (params) => {
|
||||||
|
httppost(apiurl.szzf.ajdj.add, params).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
message.success('新增成功')
|
||||||
|
onCrudSuccess()
|
||||||
|
} else {
|
||||||
|
message.error(res.description)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const editBasic = (params) => {
|
||||||
|
httppost(apiurl.szzf.ajdj.edit, params).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
message.success('编辑成功')
|
||||||
|
onCrudSuccess()
|
||||||
|
} else {
|
||||||
|
message.error(res.description)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
useEffect(()=>{
|
||||||
|
httpget(apiurl.szzf.ajdj.detail + record.id).then(res=>{
|
||||||
|
let obj = {
|
||||||
|
createName: localStorage.getItem('userName'),
|
||||||
|
createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
createBy:localStorage.getItem('userId')
|
||||||
|
}
|
||||||
|
if(res.data.caseDate){
|
||||||
|
obj.caseDate=dayjs(res.data.caseDate)
|
||||||
|
}
|
||||||
|
setFormData({...res.data,...obj})
|
||||||
|
})
|
||||||
|
},[])
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
||||||
<>
|
<>
|
||||||
{key==1&& <BascForm formJson={basicData}></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}></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==3&& <BascForm formJson={xzfy}></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 ></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 ></Lsyx>}
|
{key == 5 && <Lsyx formJson={xzfy} formJsonData={formData} type={mode} getFormInfo={getFormInfo} uploadUrl={apiurl.szzf.ajdj.upload} downloadUrl={apiurl.szzf.ajdj.download}></Lsyx>}
|
||||||
</>
|
</>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,15 @@ import apiurl from '../../../../service/apiurl';
|
||||||
import usePageTable from '../../../../components/crud/usePageTable2';
|
import usePageTable from '../../../../components/crud/usePageTable2';
|
||||||
import { createCrudService } from '../../../../components/crud/_';
|
import { createCrudService } from '../../../../components/crud/_';
|
||||||
import { CrudOpRender_text } from '../../../../components/crud/CrudOpRender';
|
import { CrudOpRender_text } from '../../../../components/crud/CrudOpRender';
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
const caseTypeOb = {
|
||||||
|
0: '违建', 1: '毁林垦荒', 2: '筑坝拦汊', 3: '填占库容', 4: '违法取水', 5: '其他'
|
||||||
|
}
|
||||||
|
const caseSourceOb = {
|
||||||
|
0: '巡查上报', 1: '自主发现', 2: '公共举报', 3: '电话举报', 4: '其他'
|
||||||
|
}
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
const editBtn = role?.rule?.find(item => item.menuName == "编辑");
|
const editBtn = role?.rule?.find(item => item.menuName == "编辑");
|
||||||
|
|
@ -23,28 +30,25 @@ const Page = () => {
|
||||||
const [isFetch, setIsFetch] = useState(false)
|
const [isFetch, setIsFetch] = useState(false)
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||||
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
{ title: '填报时间', key: 'createTime', dataIndex: 'createTime', width: 250, ellipsis: true },
|
||||||
{
|
{
|
||||||
title: '制定机关', key: 'eventsDate', dataIndex: 'eventsDate', width: 140,
|
title: '案件名称', key: 'caseName', dataIndex: 'caseName', width: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '法律性质', key: 'eventsType', dataIndex: 'eventsType', width: 140,
|
title: '案件编号', key: 'caseId', dataIndex: 'caseId', width: 140,
|
||||||
render: (value) => <span>{value == 1 ? "综合大事记" : value == 2 ? "专题大事记" : ''}</span>,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '时效性', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '发现时间', key: 'caseDate', dataIndex: 'caseDate', width: 300,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '公布日期', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '案件类型', key: 'caseType', dataIndex: 'caseType', width: 300,
|
||||||
|
render: (value) => <span>{caseTypeOb[value]}</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '施行日期', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '案件来源', key: 'caseSource', dataIndex: 'caseSource', width: 300,
|
||||||
},
|
render: (value) => <span>{caseSourceOb[value]}</span>,
|
||||||
{
|
|
||||||
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '附件', key: 'fileName', dataIndex: 'fileName', width: 300,render:(v,r)=><a onClick={()=>viewPdf(r.fileId)}>{v}</a>
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
||||||
|
|
@ -62,18 +66,26 @@ const Page = () => {
|
||||||
|
|
||||||
const command = (type) => (params) => {
|
const command = (type) => (params) => {
|
||||||
if (type === 'save') {
|
if (type === 'save') {
|
||||||
|
|
||||||
refModal.current.showSave();
|
refModal.current.showSave();
|
||||||
} else if (type === 'edit') {
|
} else if (type === 'edit') {
|
||||||
refModal.current.showEdit({ ...params });
|
let obj={}
|
||||||
|
if(params.caseDate){
|
||||||
|
obj.caseDate= dayjs(params.caseDate)
|
||||||
|
}
|
||||||
|
if(params.IllegalDate){
|
||||||
|
obj.IllegalDate= dayjs(params.IllegalDate)
|
||||||
|
}
|
||||||
|
refModal.current.showEdit({ ...params,...obj });
|
||||||
} else if (type === 'view') {
|
} else if (type === 'view') {
|
||||||
refModal.current.showView(params);
|
refModal.current.showView(params);
|
||||||
} else if (type === 'del') {
|
} else if (type === 'del') {
|
||||||
refModal.current.onDeleteGet(apiurl.rcgl.gcdsj.delete + `/${params.id}`);
|
refModal.current.onDeleteGet(apiurl.szzf.ajdj.del + `/${params.id}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.gcdsj.page).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.szzf.ajdj.list).find_noCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 处理成功的回调
|
* @description 处理成功的回调
|
||||||
|
|
@ -109,7 +121,7 @@ const Page = () => {
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||||
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width, y: "calc( 100vh - 400px )" }} dataSource={[{name:1}]}/>
|
<Table columns={columns} rowKey="inx" {...tableProps} scroll={{ x: width, y: "calc( 100vh - 400px )" }} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,53 @@
|
||||||
import { Space, Table, Radio, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image } from 'antd';
|
import { Space, Table, Radio, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image } from 'antd';
|
||||||
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined,VerticalAlignBottomOutlined } from '@ant-design/icons'
|
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined, VerticalAlignBottomOutlined } from '@ant-design/icons'
|
||||||
import { useForm } from 'antd/lib/form/Form';
|
import { useForm } from 'antd/lib/form/Form';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import { httpgetExport, httppostAddfile } from '../../../../utils/request';
|
||||||
|
import { exportFile } from '../../../../utils/tools';
|
||||||
|
|
||||||
const { Dragger } = Upload;
|
const { Dragger } = Upload;
|
||||||
|
|
||||||
const list = [
|
const list = [
|
||||||
{
|
{
|
||||||
type:'整改前'
|
type:'整改前',
|
||||||
|
key:'files8'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'整改后'
|
type:'整改后',
|
||||||
}
|
key:'files9'
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
const Page = () => {
|
const baseUrl = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
|
||||||
|
const Page = ({ uploadUrl, downloadUrl, type, getFormInfo, formJsonData }) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [fileList ,setFileList] =useState()
|
const [fileList, setFileList] = useState([])
|
||||||
const props = {
|
const [fileListHj, setFileHj] = useState({'files3': [],'files4': [],'files5': [],'files6': [],'files7': []})
|
||||||
|
const [url, setUrl] = useState('')
|
||||||
|
const [isModal, setIsModal] = useState(false)
|
||||||
|
const getInfo = () => {
|
||||||
|
form.validateFields().then((values) => {
|
||||||
|
getFormInfo({ ...values, ...fileListHj })
|
||||||
|
form.resetFields()
|
||||||
|
setFileList([])
|
||||||
|
}).catch((errorInfo) => {
|
||||||
|
console.log(errorInfo, 'error');
|
||||||
|
})
|
||||||
|
//
|
||||||
|
}
|
||||||
|
const cancel = () => {
|
||||||
|
getFormInfo(false)
|
||||||
|
form.resetFields()
|
||||||
|
setFileList([])
|
||||||
|
|
||||||
|
}
|
||||||
|
const deleteFile = (e,key) => {
|
||||||
|
fileListHj[key] = fileListHj[key].filter(item => item.fileId !== e)
|
||||||
|
setFileHj({ ...fileListHj })
|
||||||
|
}
|
||||||
|
const props = (keys) => {
|
||||||
|
return {
|
||||||
name: 'file',
|
name: 'file',
|
||||||
multiple: true,
|
multiple: true,
|
||||||
fileList: fileList,
|
fileList: fileList,
|
||||||
|
|
@ -29,38 +61,114 @@ const Page = () => {
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onChange(e) {
|
customRequest(e) {
|
||||||
// httpPostFile(apiUrl.service.uploadFile.uploadUrl + "?group=" + typeUpload, e).then(res => {
|
|
||||||
// setFileList([...fileList, res.data])
|
httppostAddfile(uploadUrl, e).then(res => {
|
||||||
// })
|
if(fileListHj[keys]){
|
||||||
|
fileListHj[keys].push(res.data)
|
||||||
|
}else{
|
||||||
|
fileListHj[keys]=[]
|
||||||
|
fileListHj[keys].push(res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
setFileHj({ ...fileListHj })
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const onFinish = () =>{
|
function checkMediaType(url) {
|
||||||
|
// 创建URL对象
|
||||||
|
var link = url;
|
||||||
|
// 获取路径的最后一个点之后的内容作为文件扩展名
|
||||||
|
var extension = link?.split('.').pop().toLowerCase();
|
||||||
|
|
||||||
|
// 声明支持的图片和视频文件扩展名
|
||||||
|
var imageExtensions = ['jpg', 'jpeg', 'gif', 'png'];
|
||||||
|
var file = ['pdf', 'word', 'xslx', 'xsl', 'txt', "pptx"];
|
||||||
|
//
|
||||||
|
// 判断文件扩展名是否在图片扩展名数组中
|
||||||
|
if (imageExtensions.includes(extension)) {
|
||||||
|
return 'image';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断文件扩展名是否在视频扩展名数组中
|
||||||
|
if (file.includes(extension)) {
|
||||||
|
return extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 扩展名不在图片或视频数组中,返回null表示无法确定媒体类型
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const preView = (item) => {
|
||||||
|
if (checkMediaType(item.name) == 'pdf') {
|
||||||
|
// window.open(baseUrl + item.previewUrl)
|
||||||
|
setUrl(item.previewUrl)
|
||||||
|
setIsModal(true)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description 文件下载
|
||||||
|
* @param {String} params 文件fileId
|
||||||
|
*/
|
||||||
|
const download = (id, name) => {
|
||||||
|
httpgetExport(downloadUrl+id).then(res => {
|
||||||
|
exportFile(name,res.data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const onFinish = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
useEffect(() => {
|
||||||
|
setFileHj(formJsonData)
|
||||||
|
}, [])
|
||||||
return (
|
return (
|
||||||
<Form form={form} onFinish={onFinish} >
|
<Form form={form} onFinish={onFinish} >
|
||||||
{list.map(item=>(
|
{list.map(item1 => (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={2}>
|
<Col span={2}>
|
||||||
<div style={{display:'flex',alignItems:'center'}}>
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{width:3,height:12,background:'#259def',marginRight:5}}></div>
|
<div style={{ width: 3, height: 12, background: '#259def', marginRight: 5 }}></div>
|
||||||
{item.type}</div>
|
{item1.type}</div>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22}>
|
<Col span={22}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label='附件'
|
label='附件'
|
||||||
name='name'
|
name='files'
|
||||||
>
|
>
|
||||||
<Dragger {...props}>
|
<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">点击或将文件拖拽到这里上传 支持扩展名:jpeg、png</p>
|
<p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名:jpeg、png</p>
|
||||||
</Dragger>
|
</Dragger>
|
||||||
|
<div>
|
||||||
|
{fileListHj?.[item1.key]?.map((item) => {
|
||||||
|
return <div className='flex align-center' style={{ minHeight: "50px", fontSize: 14, columnGap: 10, cursor: checkMediaType(item.fileName) == 'image' || checkMediaType(item.fileName) == 'pdf' ? 'pointer' : "not-allowed" }}>
|
||||||
|
<div style={{ width: 40, height: 40, display: "flex", alignItems: 'center' }}>
|
||||||
|
{checkMediaType(item.fileName) == 'image' && <Image
|
||||||
|
height={40}
|
||||||
|
src={baseUrl + item.filePath}
|
||||||
|
/>}
|
||||||
|
{
|
||||||
|
checkMediaType(item.fileName) !== 'image' &&
|
||||||
|
<span >{checkMediaType(item.fileName)?.toUpperCase()}</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span onClick={() => preView(item)}>{item.fileName}</span>
|
||||||
|
{type !== 'view' && <DeleteOutlined onClick={() => deleteFile(item.fileId,item1.key)} />}
|
||||||
|
<VerticalAlignBottomOutlined onClick={() => download(item.fileId, item.fileName)} />
|
||||||
|
</div>
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>))}
|
</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>
|
||||||
|
</div>
|
||||||
</Form >
|
</Form >
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import React, { useEffect,useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Form, Input, Button, DatePicker, Select } from 'antd';
|
import { Form, Input, Button, DatePicker, Select } from 'antd';
|
||||||
import { DownOutlined, UpOutlined } from '@ant-design/icons'
|
import { DownOutlined, UpOutlined } from '@ant-design/icons'
|
||||||
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
const addBtn = role?.rule?.find(item => item.menuName == "新增");
|
const addBtn = role?.rule?.find(item => item.menuName == "新增");
|
||||||
const searchBtn = role?.rule?.find(item => item.menuName == "查询");
|
const searchBtn = role?.rule?.find(item => item.menuName == "查询");
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [showGj , setShowGj] =useState(false)
|
const [showGj, setShowGj] = useState(false)
|
||||||
const onFinish = (values) => {
|
const onFinish = (values) => {
|
||||||
let dataSo;
|
let dataSo;
|
||||||
if (values.tm) {
|
if (values.tm) {
|
||||||
|
|
@ -18,18 +18,27 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete values.tm
|
delete values.tm
|
||||||
setSearchVal({...values, dataSo});
|
setSearchVal({ ...values, dataSo });
|
||||||
}
|
}
|
||||||
|
|
||||||
const opntios=[
|
const opntios = [
|
||||||
{label:'宪法',value:'宪法'},
|
{ label: '宪法', value: '宪法' },
|
||||||
{label:'法律',value:'法律'},
|
{ label: '法律', value: '法律' },
|
||||||
{label:'行政法规',value:'行政法规'},
|
{ label: '行政法规', value: '行政法规' },
|
||||||
{label:'督察法规',value:'督察法规'},
|
{ label: '督察法规', value: '督察法规' },
|
||||||
{label:'司法解释',value:'司法解释'},
|
{ label: '司法解释', value: '司法解释' },
|
||||||
{label:'地方性法规',value:'地方性法规'},
|
{ label: '地方性法规', value: '地方性法规' },
|
||||||
]
|
]
|
||||||
const styles={
|
|
||||||
|
const caseTypeOption = [
|
||||||
|
{ label: '违建', value: 0 },
|
||||||
|
{ label: '毁林垦荒', value: 1 },
|
||||||
|
{ label: '筑坝拦汊', value: 2 },
|
||||||
|
{ label: '填占库容', value: 3 },
|
||||||
|
{ label: '违法取水', value: 4 },
|
||||||
|
{ label: '其他', value: 5 },
|
||||||
|
]
|
||||||
|
const styles = {
|
||||||
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
||||||
fontWeight: '700',
|
fontWeight: '700',
|
||||||
fontStyle: 'normal',
|
fontStyle: 'normal',
|
||||||
|
|
@ -37,34 +46,35 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{display:'flex',justifyContent:'space-between'}}>
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||||
<div style={{display:'flex'}}>
|
<div style={{ display: 'flex' }}>
|
||||||
<Form.Item label="标题" name="name">
|
<Form.Item label="案件类型" name="caseType">
|
||||||
<Input allowClear style={{width:'150px'}}/>
|
<Select allowClear style={{ width: '150px' }} options={caseTypeOption} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="制定机关" name="name">
|
<Form.Item label="时间" name="createTime">
|
||||||
<Input allowClear style={{width:'150px'}}/>
|
<RangePicker allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="制定机关" name="name">
|
<Form.Item label="案件名称" name="caseName">
|
||||||
<Select allowClear style={{width:'150px'}} options={opntios}/>
|
<Input allowClear style={{ width: '150px' }} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="案件编号" name="caseId">
|
||||||
|
<Input allowClear style={{ width: '150px' }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" htmlType="submit">查询</Button>
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
{
|
{
|
||||||
(onSave) ?
|
(onSave) ?
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button onClick={onSave}>新增</Button>
|
<Button onClick={onSave}>新增</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
:null
|
: null
|
||||||
}
|
}
|
||||||
<Form.Item>
|
{/* <Form.Item>
|
||||||
<div style={styles} onClick={()=>setShowGj(!showGj)}>高级搜索 {!showGj&&<DownOutlined />} {showGj&&<UpOutlined />}</div>
|
<div style={styles} onClick={()=>setShowGj(!showGj)}>高级搜索 {!showGj&&<DownOutlined />} {showGj&&<UpOutlined />}</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -80,8 +90,8 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="上传时间" name="name">
|
<Form.Item label="上传时间" name="name">
|
||||||
<RangePicker allowClear />
|
<RangePicker allowClear />
|
||||||
</Form.Item>
|
</Form.Item>*/}
|
||||||
</div>}
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,17 @@ import dayjs from 'dayjs';
|
||||||
import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd';
|
import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd';
|
||||||
import ReactECharts from 'echarts-for-react';
|
import ReactECharts from 'echarts-for-react';
|
||||||
import { useEffect, useState, useMemo } from 'react';
|
import { useEffect, useState, useMemo } from 'react';
|
||||||
|
import { httppost } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
|
||||||
|
let obj= { 0:'当事人自动履行',1: '行政强制执行'}
|
||||||
const Page = ({ title = '标题' }) => {
|
const Page = ({ title = '标题' }) => {
|
||||||
const [echart2, setEchart2] = useState(Object())
|
const [echart2, setEchart2] = useState(Object())
|
||||||
const [inspectordata, setInspectorData] = useState([{}])
|
const [inspectordata, setInspectorData] = useState([{}])
|
||||||
const [plandata, setPlanData] = useState(Object())
|
const [plandata, setPlanData] = useState(Object())
|
||||||
const [problemdata, setProblemData] = useState(Object())
|
const [problemdata, setProblemData] = useState(Object())
|
||||||
|
const [sumTotal, setSum] = useState(0)
|
||||||
|
|
||||||
const getPlanOption = useMemo((name, data) => {
|
const getPlanOption = useMemo((name, data) => {
|
||||||
// let total = 0
|
// let total = 0
|
||||||
// for (let i = 0; i < data.length; i++) {
|
// for (let i = 0; i < data.length; i++) {
|
||||||
|
|
@ -16,18 +21,18 @@ const Page = ({ title = '标题' }) => {
|
||||||
return {
|
return {
|
||||||
title: {},
|
title: {},
|
||||||
tooltip: {},
|
tooltip: {},
|
||||||
// legend: {
|
legend: {
|
||||||
// data: name
|
data: Object.values(obj)
|
||||||
// },
|
},
|
||||||
graphic: {
|
graphic: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
top: 'center',
|
top: 'center',
|
||||||
left: 'center',
|
left: 'center',
|
||||||
style: {
|
style: {
|
||||||
text: `总计\n${0}`,
|
text: `总计\n${sumTotal}`,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
// textAlign: 'center'
|
textAlign: 'center'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
|
|
@ -54,28 +59,41 @@ const Page = ({ title = '标题' }) => {
|
||||||
const onOk = (event, index) => {
|
const onOk = (event, index) => {
|
||||||
if (event !== null) {
|
if (event !== null) {
|
||||||
let params = {
|
let params = {
|
||||||
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD'),
|
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD'),
|
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}
|
}
|
||||||
// getStm(params, index)
|
// getStm(params, index)
|
||||||
|
getInfo(params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const getInfo=(params)=>{
|
||||||
|
let obj1=[]
|
||||||
|
let sum=0
|
||||||
|
httppost(apiurl.szzf.ajtj.info+2,params).then(res=>{
|
||||||
|
res.data.map(item=>{
|
||||||
|
obj1.push({value:item.count,name:obj[item.type]})
|
||||||
|
sum=sum+item.count
|
||||||
|
})
|
||||||
|
// debugger;
|
||||||
|
setPlanData(obj1)
|
||||||
|
setSum(sum)
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let data = [
|
let params = {
|
||||||
{ value: 1048, name: 'Search Engine' },
|
stm: dayjs().startOf("year").format('YYYY-MM-DD HH:mm:ss'),
|
||||||
{ value: 735, name: 'Direct' },
|
etm: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
{ value: 580, name: 'Email' },
|
}
|
||||||
{ value: 484, name: 'Union Ads' },
|
getInfo(params)
|
||||||
{ value: 300, name: 'Video Ads' }
|
|
||||||
]
|
},[])
|
||||||
setPlanData(data)
|
|
||||||
})
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||||
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
||||||
{title}
|
执行情况
|
||||||
</div>
|
</div>
|
||||||
<DatePicker.RangePicker
|
<DatePicker.RangePicker
|
||||||
style={{ width: 220, }}
|
style={{ width: 220, }}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,31 @@
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd';
|
import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd';
|
||||||
import ReactECharts from 'echarts-for-react';
|
import ReactECharts from 'echarts-for-react';
|
||||||
import { useEffect, useState, useMemo } from 'react';
|
import { useEffect, useState, useMemo } from 'react';
|
||||||
|
import { httpget, httppost } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import advancedFormat from 'dayjs/plugin/advancedFormat'
|
||||||
|
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
||||||
|
import localeData from 'dayjs/plugin/localeData'
|
||||||
|
import weekday from 'dayjs/plugin/weekday'
|
||||||
|
import weekOfYear from 'dayjs/plugin/weekOfYear'
|
||||||
|
import weekYear from 'dayjs/plugin/weekYear'
|
||||||
|
|
||||||
|
dayjs.extend(customParseFormat)
|
||||||
|
dayjs.extend(advancedFormat)
|
||||||
|
dayjs.extend(weekday)
|
||||||
|
dayjs.extend(localeData)
|
||||||
|
dayjs.extend(weekOfYear)
|
||||||
|
dayjs.extend(weekYear)
|
||||||
|
|
||||||
|
let obj={0:'巡查上报',1:'自主发现',2:'公共举报',3:'电话举报',4:'其他'}
|
||||||
const Page = ({ title = '标题' }) => {
|
const Page = ({ title = '标题' }) => {
|
||||||
const [echart2, setEchart2] = useState(Object())
|
const [echart2, setEchart2] = useState(Object())
|
||||||
const [inspectordata, setInspectorData] = useState([{}])
|
const [inspectordata, setInspectorData] = useState([{}])
|
||||||
const [plandata, setPlanData] = useState(Object())
|
const [plandata, setPlanData] = useState(Object())
|
||||||
const [problemdata, setProblemData] = useState(Object())
|
const [problemdata, setProblemData] = useState(Object())
|
||||||
|
const [sumTotal, setSum] = useState(0)
|
||||||
|
|
||||||
const getPlanOption = useMemo((name, data) => {
|
const getPlanOption = useMemo((name, data) => {
|
||||||
// let total = 0
|
// let total = 0
|
||||||
// for (let i = 0; i < data.length; i++) {
|
// for (let i = 0; i < data.length; i++) {
|
||||||
|
|
@ -16,18 +34,18 @@ const Page = ({ title = '标题' }) => {
|
||||||
return {
|
return {
|
||||||
title: {},
|
title: {},
|
||||||
tooltip: {},
|
tooltip: {},
|
||||||
// legend: {
|
legend: {
|
||||||
// data: name
|
data:Object.values(obj)
|
||||||
// },
|
},
|
||||||
graphic: {
|
graphic: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
top: 'center',
|
top: 'center',
|
||||||
left: 'center',
|
left: 'center',
|
||||||
style: {
|
style: {
|
||||||
text: `总计\n${0}`,
|
text: `总计\n${sumTotal}`,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
// textAlign: 'center'
|
textAlign: 'center'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
|
|
@ -54,28 +72,41 @@ const Page = ({ title = '标题' }) => {
|
||||||
const onOk = (event, index) => {
|
const onOk = (event, index) => {
|
||||||
if (event !== null) {
|
if (event !== null) {
|
||||||
let params = {
|
let params = {
|
||||||
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD'),
|
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD'),
|
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}
|
}
|
||||||
// getStm(params, index)
|
// getStm(params, index)
|
||||||
|
getInfo(params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const getInfo=(params)=>{
|
||||||
|
let obj1=[]
|
||||||
|
let sum=0
|
||||||
|
httppost(apiurl.szzf.ajtj.info+0,params).then(res=>{
|
||||||
|
res.data.map(item=>{
|
||||||
|
obj1.push({value:item.count,name:obj[item.type]})
|
||||||
|
sum=sum+item.count
|
||||||
|
})
|
||||||
|
// debugger;
|
||||||
|
setPlanData(obj1)
|
||||||
|
setSum(sum)
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let data = [
|
let params = {
|
||||||
{ value: 1048, name: 'Search Engine' },
|
stm: dayjs().startOf("year").format('YYYY-MM-DD HH:mm:ss'),
|
||||||
{ value: 735, name: 'Direct' },
|
etm: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
{ value: 580, name: 'Email' },
|
}
|
||||||
{ value: 484, name: 'Union Ads' },
|
getInfo(params)
|
||||||
{ value: 300, name: 'Video Ads' }
|
|
||||||
]
|
},[])
|
||||||
setPlanData(data)
|
|
||||||
})
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||||
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
||||||
{title}
|
案件来源
|
||||||
</div>
|
</div>
|
||||||
<DatePicker.RangePicker
|
<DatePicker.RangePicker
|
||||||
style={{ width: 220, }}
|
style={{ width: 220, }}
|
||||||
|
|
|
||||||
|
|
@ -2,48 +2,65 @@ import dayjs from 'dayjs';
|
||||||
import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd';
|
import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd';
|
||||||
import ReactECharts from 'echarts-for-react';
|
import ReactECharts from 'echarts-for-react';
|
||||||
import { useEffect, useState, useMemo } from 'react';
|
import { useEffect, useState, useMemo } from 'react';
|
||||||
|
import { httppost } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
|
||||||
|
let obj =
|
||||||
|
{
|
||||||
|
0: '违建',
|
||||||
|
1: '毁林垦荒',
|
||||||
|
2: '筑坝拦汊',
|
||||||
|
3: '填占库容',
|
||||||
|
4: '违法取水',
|
||||||
|
5: '其他'
|
||||||
|
}
|
||||||
|
|
||||||
const Page = ({ title = '标题' }) => {
|
const Page = ({ title = '标题' }) => {
|
||||||
const [echart2, setEchart2] = useState(Object())
|
const [echart2, setEchart2] = useState(Object())
|
||||||
const [inspectordata, setInspectorData] = useState([{}])
|
const [inspectordata, setInspectorData] = useState([{}])
|
||||||
const [plandata, setPlanData] = useState(Object())
|
const [plandata, setPlanData] = useState(Object())
|
||||||
const [problemdata, setProblemData] = useState(Object())
|
const [problemdata, setProblemData] = useState(Object())
|
||||||
|
const [sumTotal, setSum] = useState(0)
|
||||||
|
|
||||||
const getPlanOption = useMemo((name, data) => {
|
const getPlanOption = useMemo((name, data) => {
|
||||||
// let total = 0
|
// let total = 0
|
||||||
// for (let i = 0; i < data.length; i++) {
|
// for (let i = 0; i < data.length; i++) {
|
||||||
// total = total + Number(data[i].value)
|
// total = total + Number(data[i].value)
|
||||||
// }
|
// }
|
||||||
return {
|
return {
|
||||||
|
legend: {
|
||||||
|
data: Object.values(obj)
|
||||||
|
},
|
||||||
angleAxis: {
|
angleAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['应用服务中心', '技术管理', '综合管理', '进度管理', '质量管理', '安全管理', '其它']
|
data: Object.values(obj)
|
||||||
},
|
},
|
||||||
radar: [
|
// radar: [
|
||||||
{
|
// {
|
||||||
indicator: [
|
// indicator: [
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
{ text: '' },
|
// { text: '' },
|
||||||
],
|
// ],
|
||||||
radius: '80%',
|
// radius: '80%',
|
||||||
splitNumber: 12,
|
// splitNumber: 12,
|
||||||
shape: 'circle',
|
// shape: 'circle',
|
||||||
splitArea: {
|
// splitArea: {
|
||||||
areaStyle: {
|
// areaStyle: {
|
||||||
color: '#fff',
|
// color: '#fff',
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
axisLine: {
|
// axisLine: {
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
color: '#d4d4d4'
|
// color: '#d4d4d4'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
radiusAxis: {
|
radiusAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 20,
|
max: 20,
|
||||||
|
|
@ -78,15 +95,7 @@ const Page = ({ title = '标题' }) => {
|
||||||
borderRadius: 8
|
borderRadius: 8
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: [
|
data: plandata
|
||||||
{ value: 40, name: '应用服务中心' },
|
|
||||||
{ value: 32, name: '技术管理' },
|
|
||||||
{ value: 30, name: '综合管理' },
|
|
||||||
{ value: 30, name: '进度管理' },
|
|
||||||
{ value: 28, name: '质量管理' },
|
|
||||||
{ value: 28, name: '安全管理' },
|
|
||||||
{ value: 18, name: '其它' },
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -96,28 +105,41 @@ const Page = ({ title = '标题' }) => {
|
||||||
const onOk = (event, index) => {
|
const onOk = (event, index) => {
|
||||||
if (event !== null) {
|
if (event !== null) {
|
||||||
let params = {
|
let params = {
|
||||||
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD'),
|
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD'),
|
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}
|
}
|
||||||
// getStm(params, index)
|
// getStm(params, index)
|
||||||
|
getInfo(params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const getInfo = (params) => {
|
||||||
|
let obj1 = []
|
||||||
|
let sum = 0
|
||||||
|
httppost(apiurl.szzf.ajtj.info + 1, params).then(res => {
|
||||||
|
res.data.map(item => {
|
||||||
|
obj1.push({ value: item.count, name: obj[item.type] })
|
||||||
|
sum = sum + item.count
|
||||||
|
})
|
||||||
|
// debugger;
|
||||||
|
setPlanData(obj1)
|
||||||
|
setSum(sum)
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let data = [
|
let params = {
|
||||||
{ value: 1048, name: 'Search Engine' },
|
stm: dayjs().startOf("year").format('YYYY-MM-DD HH:mm:ss'),
|
||||||
{ value: 735, name: 'Direct' },
|
etm: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
{ value: 580, name: 'Email' },
|
}
|
||||||
{ value: 484, name: 'Union Ads' },
|
getInfo(params)
|
||||||
{ value: 300, name: 'Video Ads' }
|
|
||||||
]
|
}, [])
|
||||||
setPlanData(data)
|
|
||||||
})
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||||
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
||||||
{title}
|
案件类型
|
||||||
</div>
|
</div>
|
||||||
<DatePicker.RangePicker
|
<DatePicker.RangePicker
|
||||||
style={{ width: 220, }}
|
style={{ width: 220, }}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ import { Space, Table, Tag, DatePicker, Form, Select, Button, Card } from 'antd'
|
||||||
import ReactECharts from 'echarts-for-react';
|
import ReactECharts from 'echarts-for-react';
|
||||||
import { useEffect, useState, useMemo } from 'react';
|
import { useEffect, useState, useMemo } from 'react';
|
||||||
import { encode } from 'punycode';
|
import { encode } from 'punycode';
|
||||||
|
import { httpget } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
|
||||||
const Page = ({ title = '标题' }) => {
|
const Page = ({ title = '标题' }) => {
|
||||||
const [echart2, setEchart2] = useState(Object())
|
const [echart2, setEchart2] = useState(Object())
|
||||||
|
|
@ -14,12 +16,12 @@ const Page = ({ title = '标题' }) => {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
position: ['20%', '50%'],
|
position: ['20%', '50%'],
|
||||||
|
formatter:function(value){
|
||||||
|
console.log(value);
|
||||||
|
|
||||||
|
return `<div>${value[0].value.month+"月份"}</div><div>数量:${value[0].value.count}</div>`;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
|
||||||
data: ['运行调度指令'],
|
|
||||||
},
|
|
||||||
|
|
||||||
dataset: [
|
dataset: [
|
||||||
{ source: plandata },
|
{ source: plandata },
|
||||||
]
|
]
|
||||||
|
|
@ -27,22 +29,30 @@ const Page = ({ title = '标题' }) => {
|
||||||
xAxis:
|
xAxis:
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
axisLabel: {
|
||||||
|
show: true,
|
||||||
|
textStyle: {
|
||||||
|
color: '#595C61'
|
||||||
|
},
|
||||||
|
formatter:function(value){
|
||||||
|
return value+'月';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
name: 'mm',
|
|
||||||
type: 'value'
|
type: 'value'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '2量',
|
name:'数量',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
datasetIndex: 0,
|
datasetIndex: 0,
|
||||||
encode: {
|
encode: {
|
||||||
x: 'name',
|
x: 'month',
|
||||||
y: 'value'
|
y: 'count'
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: 'skyblue'
|
color: 'skyblue'
|
||||||
|
|
@ -55,34 +65,33 @@ const Page = ({ title = '标题' }) => {
|
||||||
|
|
||||||
const onOk = (event, index) => {
|
const onOk = (event, index) => {
|
||||||
if (event !== null) {
|
if (event !== null) {
|
||||||
let params = {
|
let params = dayjs(event).format('YYYY')
|
||||||
stm: dayjs(new Date(event[0])).format('YYYY-MM-DD'),
|
getInfo(params)
|
||||||
etm: dayjs(new Date(event[1])).format('YYYY-MM-DD'),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const getInfo = (params) => {
|
||||||
|
httpget(apiurl.szzf.ajtj.qs+ params).then(res => {
|
||||||
|
setPlanData(res.data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let data = [
|
let params = dayjs().format('YYYY')
|
||||||
{ value: 1048, name: 'Search Engine' },
|
|
||||||
{ value: 735, name: 'Direct' },
|
getInfo(params)
|
||||||
{ value: 580, name: 'Email' },
|
}, [])
|
||||||
{ value: 484, name: 'Union Ads' },
|
|
||||||
{ value: 300, name: 'Video Ads' }
|
|
||||||
]
|
|
||||||
setPlanData(data)
|
|
||||||
})
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
<div className='top' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||||
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
<div style={{ fontSize: 20, fontWeight: 'bold', display: 'flex', alignItems: 'center' }}>
|
||||||
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
<div style={{ width: 5, height: 25, backgroundColor: '#259def', marginRight: 10 }}></div>
|
||||||
{title}
|
案件趋势
|
||||||
</div>
|
</div>
|
||||||
<DatePicker.RangePicker
|
<DatePicker
|
||||||
style={{ width: 220, }}
|
style={{ width: 220, }}
|
||||||
onChange={(e, index) => onOk(e, 2)}
|
onChange={(e, index) => onOk(e, 2)}
|
||||||
defaultValue={[dayjs().startOf("year"), dayjs()]}
|
defaultValue={dayjs()}
|
||||||
></DatePicker.RangePicker>
|
picker='year'
|
||||||
|
></DatePicker>
|
||||||
</div>
|
</div>
|
||||||
<ReactECharts
|
<ReactECharts
|
||||||
ref={(e) => setEchart2(e)}
|
ref={(e) => setEchart2(e)}
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,17 @@ import { Button } from 'antd'
|
||||||
import ModalForm from './form';
|
import ModalForm from './form';
|
||||||
import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
|
import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
|
||||||
import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
|
import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
|
||||||
const Page = ({ data }) => {
|
import { httpget } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
|
const Page = ({ treeSelect }) => {
|
||||||
const refModal = useRef();
|
const refModal = useRef();
|
||||||
|
const [data,setData] = useState({})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 处理成功的回调
|
* @description 处理成功的回调
|
||||||
*/
|
*/
|
||||||
const successCallback = () => {
|
const successCallback = () => {
|
||||||
// refresh()
|
getInfo()
|
||||||
// setIsFetch(!isFetch)
|
// setIsFetch(!isFetch)
|
||||||
}
|
}
|
||||||
const dataPahe = {
|
const dataPahe = {
|
||||||
|
|
@ -18,27 +21,37 @@ const Page = ({ data }) => {
|
||||||
zhunag: '1'
|
zhunag: '1'
|
||||||
}
|
}
|
||||||
const edit = () => {
|
const edit = () => {
|
||||||
refModal.current.showEdit({});
|
refModal.current.showEdit({...data});
|
||||||
}
|
}
|
||||||
|
const getInfo=()=>{
|
||||||
|
httpget(apiurl.szzf.clyj.detail+treeSelect?.key).then(res=>{
|
||||||
|
setData({...res.data,name:treeSelect.name})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
useEffect(()=>{
|
||||||
|
if(treeSelect){
|
||||||
|
getInfo()
|
||||||
|
}
|
||||||
|
},[treeSelect])
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.list} style={{ padding: '0 10px', marginBottom: 5 }}>{dataPahe.title}<Button type="primary" onClick={edit}>编辑</Button></div>
|
<div className={styles.list} style={{ padding: '0 10px', marginBottom: 5 }}>{treeSelect?.name}<Button type="primary" onClick={edit}>编辑</Button></div>
|
||||||
|
|
||||||
<div className={styles.listborder} style={{ padding: '0 10px', }}>{dataPahe.title}</div>
|
<div className={styles.listborder} style={{ padding: '0 10px', }}>状态</div>
|
||||||
<div className={styles.listborder} style={{ padding: '0 10px', marginBottom: 5 }}>{dataPahe.title}</div>
|
<div className={styles.listborder} style={{ padding: '0 10px', marginBottom: 5 }}>{data?.status?'启用':'禁用'}</div>
|
||||||
<div className={styles.contentBor} style={{ padding: '0 10px', marginBottom: 5, height: '35%' }}>
|
<div className={styles.contentBor} style={{ padding: '0 10px', marginBottom: 5, height: '35%' }}>
|
||||||
<div className={styles.listborder} style={{ padding: '0 10px', height: '30%' }}>{dataPahe.title}</div>
|
<div className={styles.listborder} style={{ padding: '0 10px', height: '30%' }}>法律依据</div>
|
||||||
{dataPahe.title ?? '无内容请添加'}
|
{data?.legalName ?? '无内容请添加'}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ display: 'flex', height: '33%' }}>
|
<div style={{ display: 'flex', height: '33%' }}>
|
||||||
<div className={styles.contentBor} style={{ flex: 1, marginRight: 5 }}>
|
<div className={styles.contentBor} style={{ flex: 1, marginRight: 5 }}>
|
||||||
<div className={styles.listborder} style={{ height: '30%', padding: '0 10px', }}>{dataPahe.title}</div>
|
<div className={styles.listborder} style={{ height: '30%', padding: '0 10px', }}>违法行为描述</div>
|
||||||
<div style={{ padding: '0 10px' }}>{dataPahe.title ?? '无内容请添加'}</div>
|
<div style={{ padding: '0 10px' }}>{data?.violationDesc ?? '无内容请添加'}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.contentBor} style={{ flex: 1 }}>
|
<div className={styles.contentBor} style={{ flex: 1 }}>
|
||||||
<div className={styles.listborder} style={{ height: '30%', padding: '0 10px', }}>{dataPahe.title}</div>
|
<div className={styles.listborder} style={{ height: '30%', padding: '0 10px', }}>处罚措施</div>
|
||||||
<div style={{ padding: '0 10px' }}>{dataPahe.title ?? '无内容请添加'}</div>
|
<div style={{ padding: '0 10px' }}>{data?.penalties ?? '无内容请添加'}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.listborder{
|
.listborder{
|
||||||
|
|
@ -15,9 +16,13 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.contentBor{
|
.contentBor{
|
||||||
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -10,10 +10,10 @@ import moment from 'moment';
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
|
|
||||||
const options=[
|
const options=[
|
||||||
{label:'禁用'},
|
{label:'禁用',value:0},
|
||||||
{label:'启用'}
|
{label:'启用',value:1}
|
||||||
]
|
]
|
||||||
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
const ModalForm = ({ mode, record, onEdit, onSave, onCrudSuccess }) => {
|
||||||
|
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [fileList, setFileList] = useState([]) //上传文件列表
|
const [fileList, setFileList] = useState([]) //上传文件列表
|
||||||
|
|
@ -24,30 +24,11 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
||||||
const onfinish = (values) => {
|
const onfinish = (values) => {
|
||||||
values.eventsDate = values.eventsDate ? moment(values.eventsDate).format("YYYY-MM-DD 00:00:00") : ''
|
onEdit(apiurl.szzf.clyj.edit, {...record,...values})
|
||||||
let oldFiles = fileList.map(item => ({ fileId: item.response?.data?.fileId }))
|
|
||||||
if (mode === 'edit') {
|
|
||||||
values.files = oldFiles;
|
|
||||||
values.id = record.id;
|
|
||||||
onEdit(apiurl.rcgl.gcdsj.edit, values)
|
|
||||||
}
|
|
||||||
if (mode === 'save') {
|
|
||||||
values.files = oldFiles
|
|
||||||
onSave(apiurl.rcgl.gcdsj.save, values)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (mode != 'save') {
|
if(record){
|
||||||
const imgFile = record?.files?.map(o => ({
|
form.setFieldsValue(record)
|
||||||
name: o.fileName,
|
|
||||||
response: {
|
|
||||||
data: {
|
|
||||||
filePath: o.filePath,
|
|
||||||
fileId: o.fileId
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
setFileList(imgFile)
|
|
||||||
}
|
}
|
||||||
}, [record, mode])
|
}, [record, mode])
|
||||||
|
|
||||||
|
|
@ -74,7 +55,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="状态"
|
label="状态"
|
||||||
name="name"
|
name="status"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<Radio.Group options={options}/>
|
<Radio.Group options={options}/>
|
||||||
|
|
@ -83,7 +64,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="法律名称"
|
label="法律名称"
|
||||||
name="name"
|
name="legalName"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<Input style={{ width: '100%' }} allowClear />
|
<Input style={{ width: '100%' }} allowClear />
|
||||||
|
|
@ -92,7 +73,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="法条内容"
|
label="法条内容"
|
||||||
name="name"
|
name="legalContent"
|
||||||
>
|
>
|
||||||
<Input style={{ width: '100%' }} allowClear />
|
<Input style={{ width: '100%' }} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
@ -101,7 +82,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="违法行为描述"
|
label="违法行为描述"
|
||||||
name="name"
|
name="violationDesc"
|
||||||
>
|
>
|
||||||
<TextArea rows={4} />
|
<TextArea rows={4} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
@ -109,7 +90,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="处罚措施"
|
label="处罚措施"
|
||||||
name="name"
|
name="penalties"
|
||||||
>
|
>
|
||||||
<TextArea rows={4} />
|
<TextArea rows={4} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,22 @@ import { Card } from 'antd'
|
||||||
import TreeSelectZdy from './treeSelectZdy'
|
import TreeSelectZdy from './treeSelectZdy'
|
||||||
|
|
||||||
import ContentPage from './content'
|
import ContentPage from './content'
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
|
const [treeSelect ,setTreeSelect] =useState({})
|
||||||
|
useEffect(()=>{
|
||||||
|
console.log(treeSelect,'1111');
|
||||||
|
|
||||||
|
},[treeSelect])
|
||||||
return (
|
return (
|
||||||
<div style={{display:'flex',height: '100%'}}>
|
<div style={{display:'flex',height: '100%'}}>
|
||||||
<div style={{ width: 320, backgroundColor: '#fff', padding: 10 }}>
|
<div style={{ width: 320, backgroundColor: '#fff', padding: 10 }}>
|
||||||
<TreeSelectZdy />
|
<TreeSelectZdy setTreeSelect={setTreeSelect}/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ flex:1 ,marginLeft:10}}>
|
<div style={{ flex:1 ,marginLeft:10}}>
|
||||||
<ContentPage />
|
<ContentPage treeSelect={treeSelect[0]}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,57 +1,64 @@
|
||||||
import React, { useState, useMemo } from 'react';
|
import React, { useState, useMemo, useEffect, useRef } from 'react';
|
||||||
import { Tree, Input } from 'antd';
|
import { Tree, Input, Tooltip } from 'antd';
|
||||||
|
import { httpget } from '../../../../utils/request';
|
||||||
|
import apiurl from '../../../../service/apiurl';
|
||||||
const { Search } = Input;
|
const { Search } = Input;
|
||||||
|
|
||||||
const data = [
|
// const data = [
|
||||||
{
|
// {
|
||||||
key: 'parent 1',
|
// key: 'parent 1',
|
||||||
title: '违反水利工程建设与管理类行为',
|
// title: '违反水利工程建设与管理类行为',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
value: 'parent 1-0',
|
// value: 'parent 1-0',
|
||||||
title: '侵占、毁坏水法规定相关设施',
|
// title: '侵占、毁坏水法规定相关设施',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
key: 'leaf1',
|
// key: 'leaf1',
|
||||||
title: '侵占、毁坏水工程及堤防、护岸...',
|
// title: '侵占、毁坏水工程及堤防、护岸...',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 'leaf2',
|
// key: 'leaf2',
|
||||||
title: '毁坏防汛、水文监测、水文地质...',
|
// title: '毁坏防汛、水文监测、水文地质...',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 'leaf3',
|
// key: 'leaf3',
|
||||||
title: '在水工程保护范围内,从事影响..',
|
// title: '在水工程保护范围内,从事影响..',
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 'parent 1-1',
|
// key: 'parent 1-1',
|
||||||
title: '破坏大坝管理设施、妨碍大坝',
|
// title: '破坏大坝管理设施、妨碍大坝',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
key: 'leaf4',
|
// key: 'leaf4',
|
||||||
title: '毁坏大坝及其管理设施',
|
// title: '毁坏大坝及其管理设施',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 'leaf5',
|
// key: 'leaf5',
|
||||||
title: '危害大坝安全或破坏大坝正常运行',
|
// title: '危害大坝安全或破坏大坝正常运行',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 'leaf6',
|
// key: 'leaf6',
|
||||||
title: '在岸区或坝体从事生产活动',
|
// title: '在岸区或坝体从事生产活动',
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
];
|
// ];
|
||||||
let dataList = [];
|
let dataList = [];
|
||||||
|
|
||||||
const Page = () => {
|
const Page = ({ setTreeSelect }) => {
|
||||||
const [expandedKeys, setExpandedKeys] = useState([]);
|
const [expandedKeys, setExpandedKeys] = useState([]);
|
||||||
const [searchValue, setSearchValue] = useState('');
|
const [searchValue, setSearchValue] = useState();
|
||||||
const [autoExpandParent, setAutoExpandParent] = useState(true);
|
const [autoExpandParent, setAutoExpandParent] = useState(true);
|
||||||
|
const [selectNode, setSelect] = useState(true);
|
||||||
|
|
||||||
|
const [data, setData] = useState([]);
|
||||||
|
const treeRef = useRef();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const onExpand = (newExpandedKeys) => {
|
const onExpand = (newExpandedKeys) => {
|
||||||
|
|
@ -60,15 +67,7 @@ const Page = () => {
|
||||||
|
|
||||||
};
|
};
|
||||||
const onSearch = (value) => {
|
const onSearch = (value) => {
|
||||||
// const newExpandedKeys = dataList
|
debugger;
|
||||||
// .map((item) => {
|
|
||||||
// if (item.title.indexOf(value) > -1) {
|
|
||||||
// return getParentKey(item.key, data);
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// })
|
|
||||||
// .filter((item, i, self) => !!(item && self.indexOf(item) === i));
|
|
||||||
// setExpandedKeys(newExpandedKeys);
|
|
||||||
setSearchValue(value);
|
setSearchValue(value);
|
||||||
setAutoExpandParent(true);
|
setAutoExpandParent(true);
|
||||||
|
|
||||||
|
|
@ -76,44 +75,89 @@ const Page = () => {
|
||||||
const treeData = useMemo(() => {
|
const treeData = useMemo(() => {
|
||||||
const loop = (data) =>
|
const loop = (data) =>
|
||||||
data.map((item) => {
|
data.map((item) => {
|
||||||
const strTitle = item.title;
|
const strTitle = item.legalName;
|
||||||
const index = strTitle?.indexOf(searchValue);
|
const index = strTitle?.indexOf(searchValue);
|
||||||
const beforeStr = strTitle.substring(0, index);
|
const beforeStr = strTitle.substring(0, index);
|
||||||
const afterStr = strTitle.slice(index + searchValue.length);
|
const afterStr = strTitle.slice(index + searchValue?.length);
|
||||||
const title =
|
const title =
|
||||||
index > -1 ? (
|
index > -1 ? (
|
||||||
<span key={item.key}>
|
<span key={item.id}>
|
||||||
{beforeStr}
|
{beforeStr}
|
||||||
<span className="site-tree-search-value" style={{ color: 'red' }}>{searchValue}</span>
|
<span className="site-tree-search-value" style={{ color: 'red' }}>{searchValue}</span>
|
||||||
{afterStr}
|
{afterStr}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span key={item.key}>{strTitle}</span>
|
<span key={item.id}>{strTitle}</span>
|
||||||
);
|
);
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
return { title, key: item.key, children: loop(item.children) };
|
return { title: title, key: item.id, children: loop(item.children), name: strTitle };
|
||||||
}
|
}
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
dataList.push(item.key)
|
|
||||||
|
console.log(index, strTitle, searchValue);
|
||||||
|
|
||||||
|
dataList.push(item.id)
|
||||||
setExpandedKeys(dataList);
|
setExpandedKeys(dataList);
|
||||||
|
if (dataList.length < 2) {
|
||||||
|
treeRef.current.scrollTo({ key: dataList[0].id });
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title,
|
title: title,
|
||||||
key: item.key,
|
key: item.id,
|
||||||
|
name: strTitle
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return loop(data);
|
return loop(data);
|
||||||
}, [searchValue]);
|
}, [searchValue, data]);
|
||||||
|
useEffect(() => {
|
||||||
|
httpget(apiurl.szzf.clyj.tree).then(res => {
|
||||||
|
setData(res.data)
|
||||||
|
setTreeSelect(
|
||||||
|
[{
|
||||||
|
key: res.data[0].id,
|
||||||
|
name: res.data[0].legalName,
|
||||||
|
|
||||||
|
}]
|
||||||
|
|
||||||
|
)
|
||||||
|
setSelect([res.data[0].id])
|
||||||
|
})
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{ margin: '10px 0' }}><Search onSearch={onSearch} /></div>
|
<div style={{ margin: '10px 0' }}><Search onSearch={onSearch} /></div>
|
||||||
<Tree
|
<Tree
|
||||||
onExpand={onExpand}
|
onExpand={onExpand}
|
||||||
|
ref={treeRef}
|
||||||
expandedKeys={expandedKeys}
|
expandedKeys={expandedKeys}
|
||||||
treeData={treeData}
|
treeData={treeData}
|
||||||
autoExpandParent={autoExpandParent}
|
autoExpandParent={autoExpandParent}
|
||||||
|
selectedKeys={selectNode}
|
||||||
|
titleRender={(data) => {
|
||||||
|
return (
|
||||||
|
<div style={{ color: data.children ? '#c8c8c8' : '', cursor: data.children ? 'not-allowed' : '' }} >
|
||||||
|
<Tooltip title={data.name}>
|
||||||
|
<div className='ellipsis1' style={{ width: 200 }}>
|
||||||
|
{data.title}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
|
</div>)
|
||||||
|
}}
|
||||||
|
onSelect={(e, node) => {
|
||||||
|
if (node.selectedNodes[0].children) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setSelect(e)
|
||||||
|
setTreeSelect(
|
||||||
|
node.selectedNodes
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
height={800}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|
@ -121,3 +165,4 @@ const Page = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Page;
|
export default Page;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,38 @@
|
||||||
import React, { useEffect, useState, useRef } from 'react';
|
import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { Space, Table, Radio, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image } from 'antd';
|
import { TreeSelect, Table, Tag, DatePicker, Form, Select, Button, message, Upload, Input, Row, Col, Switch, Image,Radio } from 'antd';
|
||||||
import './ddForm.less'
|
import './ddForm.less'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined,VerticalAlignBottomOutlined } from '@ant-design/icons'
|
import { InboxOutlined, LinkOutlined, DeleteOutlined, LoadingOutlined, VerticalAlignBottomOutlined } from '@ant-design/icons'
|
||||||
import { httpPostFile } from '../../../../utils/request';
|
import apiurl from '../../../../service/apiurl';
|
||||||
import apiUrl from '../../../../service/apiurl'
|
import { httpgetExport, httppostAddfile } from '../../../../utils/request';
|
||||||
|
import { exportFile } from '../../../../utils/tools';
|
||||||
|
|
||||||
|
// import apiUrl from '../../service/apiurl'
|
||||||
import PdfView from './pdfView'
|
import PdfView from './pdfView'
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
|
|
||||||
const baseUrl = "http://local.gunshiiot.com:18083/gunshiApp/xintankou"
|
const baseUrl = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
|
||||||
const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonData, typeUpload = 'dispatch', isModalOpen,fileType,footer=true }) => {
|
const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, formJsonData, typeUpload = 'dispatch', isModalOpen, fileType, footer = true, uploadUrl,TableZdyProps,downloadUrl,
|
||||||
|
onSave }) => {
|
||||||
const [fileList, setFileList] = useState([])
|
const [fileList, setFileList] = useState([])
|
||||||
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)
|
||||||
|
|
||||||
|
|
||||||
// debugger;
|
//
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
// function onDocumentLoadSuccess({ numPages }) {
|
// function onDocumentLoadSuccess({ numPages }) {
|
||||||
// setRenderNumPages(numPages);
|
// setRenderNumPages(numPages);
|
||||||
// }
|
// }
|
||||||
const onFinish = (e) => {
|
const onFinish = (e) => {
|
||||||
}
|
}
|
||||||
const getInfo = () => {
|
const getInfo = () => {
|
||||||
form.validateFields().then((values) => {
|
form.validateFields().then((values) => {
|
||||||
getFormInfo({ ...values, files: fileList, fileIds: fileList.map(item => item.id) })
|
getFormInfo({ ...values, [fileKey]: fileList, fileIds: fileList.map(item => item.fileId) })
|
||||||
form.resetFields()
|
form.resetFields()
|
||||||
setFileList([])
|
setFileList([])
|
||||||
}).catch((errorInfo) => {
|
}).catch((errorInfo) => {
|
||||||
|
|
@ -47,7 +51,8 @@ const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonDat
|
||||||
// window.open('http://local.gunshiiot.com:18083/xintankou/api/file/preview/104')
|
// window.open('http://local.gunshiiot.com:18083/xintankou/api/file/preview/104')
|
||||||
// }
|
// }
|
||||||
const deleteFile = (e) => {
|
const deleteFile = (e) => {
|
||||||
let arr = fileList.filter(item => item.id !== e)
|
debugger;
|
||||||
|
let arr = fileList.filter(item => item.fileId !== e)
|
||||||
setFileList(arr)
|
setFileList(arr)
|
||||||
}
|
}
|
||||||
const props = {
|
const props = {
|
||||||
|
|
@ -64,9 +69,10 @@ const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonDat
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChange(e) {
|
customRequest(e) {
|
||||||
setFileLisUp([...fileListUp, e.file])
|
setFileLisUp([...fileListUp, e.file])
|
||||||
httpPostFile(apiUrl.service.uploadFile.uploadUrl + "?group=" + typeUpload, e).then(res => {
|
debugger
|
||||||
|
httppostAddfile(uploadUrl, e).then(res => {
|
||||||
setFileList([...fileList, res.data])
|
setFileList([...fileList, res.data])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -76,12 +82,12 @@ const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonDat
|
||||||
// 创建URL对象
|
// 创建URL对象
|
||||||
var link = url;
|
var link = url;
|
||||||
// 获取路径的最后一个点之后的内容作为文件扩展名
|
// 获取路径的最后一个点之后的内容作为文件扩展名
|
||||||
var extension = link.split('.').pop().toLowerCase();
|
var extension = link?.split('.').pop().toLowerCase();
|
||||||
|
|
||||||
// 声明支持的图片和视频文件扩展名
|
// 声明支持的图片和视频文件扩展名
|
||||||
var imageExtensions = ['jpg', 'jpeg', 'gif', 'png'];
|
var imageExtensions = ['jpg', 'jpeg', 'gif', 'png'];
|
||||||
var file = ['pdf', 'word', 'xslx', 'xsl', 'txt',"pptx"];
|
var file = ['pdf', 'word', 'xslx', 'xsl', 'txt', "pptx"];
|
||||||
|
//
|
||||||
// 判断文件扩展名是否在图片扩展名数组中
|
// 判断文件扩展名是否在图片扩展名数组中
|
||||||
if (imageExtensions.includes(extension)) {
|
if (imageExtensions.includes(extension)) {
|
||||||
return 'image';
|
return 'image';
|
||||||
|
|
@ -98,7 +104,7 @@ const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonDat
|
||||||
const preView = (item) => {
|
const preView = (item) => {
|
||||||
if (checkMediaType(item.name) == 'pdf') {
|
if (checkMediaType(item.name) == 'pdf') {
|
||||||
// window.open(baseUrl + item.previewUrl)
|
// window.open(baseUrl + item.previewUrl)
|
||||||
setUrl(`${`http://local.gunshiiot.com:18083/xintankou`}/static/pdf/web/viewer.html?file=${encodeURIComponent(`http://local.gunshiiot.com:18083/gunshiApp/xintankou/${item.previewUrl}`)}`)
|
setUrl(item.previewUrl)
|
||||||
setIsModal(true)
|
setIsModal(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,37 +114,35 @@ const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonDat
|
||||||
* @description 文件下载
|
* @description 文件下载
|
||||||
* @param {String} params 文件fileId
|
* @param {String} params 文件fileId
|
||||||
*/
|
*/
|
||||||
const download = (id,name) => {
|
const download = async(id, name) => {
|
||||||
let downloadLink = document.createElement("a");
|
var extension = name?.split('.').pop().toLowerCase();
|
||||||
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xintankou/api/file/download/${id}`;
|
httpgetExport(downloadUrl+id).then(res => {
|
||||||
downloadLink.download = `${name}`;
|
exportFile(name,res.data)
|
||||||
downloadLink.style.display = "none";
|
})
|
||||||
// 将链接添加到页面中
|
|
||||||
document.body.appendChild(downloadLink);
|
|
||||||
|
|
||||||
// 模拟点击事件,开始下载
|
|
||||||
downloadLink.click();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.resetFields()
|
// form.resetFields()
|
||||||
let formType = type
|
let formType = type
|
||||||
if(type='edit'){
|
if (type = 'edit') {
|
||||||
formType=2
|
formType = 2
|
||||||
}
|
}
|
||||||
if(type == 'view'){
|
if (type == 'view') {
|
||||||
formType =1
|
formType = 1
|
||||||
}
|
}
|
||||||
if(type=='save'){
|
if (type == 'save') {
|
||||||
formType =0
|
formType = 0
|
||||||
}
|
}
|
||||||
if (formType == 1 || formType == 2 || formType == 3) {
|
if (formType == 1 || formType == 2 || formType == 3) {
|
||||||
form.setFieldsValue(formJsonData)
|
form.setFieldsValue(formJsonData)
|
||||||
if (formJsonData?.files) {
|
if (formJsonData?.[fileKey]) {
|
||||||
setFileList(formJsonData.files)
|
setFileList(formJsonData[fileKey])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(formJsonData, formJson);
|
||||||
|
//
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
setFileList([])
|
setFileList([])
|
||||||
}
|
}
|
||||||
|
|
@ -148,72 +152,161 @@ const FormZdy = ({ typeName = "ddForm", formJson, getFormInfo, type, formJsonDat
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ backgroundColor: '#fff' }}>
|
<div style={{ backgroundColor: '#fff', marginTop: 10 }}>
|
||||||
<Form form={form} name="searchTabel" onFinish={onFinish} className={typeName}>
|
<Form form={form} name="searchTabel" onFinish={onFinish} className={typeName}>
|
||||||
<Row>
|
<Row>
|
||||||
{formJson.map(item => {
|
{formJson?.map(item => {
|
||||||
return (
|
return (
|
||||||
<Col span={item.span} >
|
<Col span={item.span} >
|
||||||
|
{item.type == "input" &&
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={item.label}
|
label={item.label}
|
||||||
name={item.key}
|
name={item.key}
|
||||||
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
className={item.type == 'empty'?'empty':'noempty'}
|
|
||||||
>
|
>
|
||||||
{item.type == "input" && <Input disabled={type == 1 || item.disabled} placeholder={item.placeholder} />}
|
<Input disabled={type == 'view' || item.disabled} placeholder={item.placeholder} />
|
||||||
{item.type == "Select" && <Select disabled={type == 1} options={item.options} />}
|
</Form.Item>}
|
||||||
{item.type == "empty" && <Input disabled={item.type == "empty" ? true : false} />}
|
{item.type == "title" &&
|
||||||
{item.type == "Switch" && <Switch defaultChecked onChange={onChange} disabled={type == 1} />}
|
<Form.Item
|
||||||
{item.type == "DatePicker" && <DatePicker disabled={type == 1} style={{width:"100%"}} />}
|
label={item.label}
|
||||||
{item.type == "TextArea" && <TextArea rows={4} disabled={type == 1} />}
|
name={item.key}
|
||||||
{item.type == "Radio" &&<Radio.Group options={item.options} />}
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
{item.type == "RangePicker" &&
|
>
|
||||||
<RangePicker disabled={type=='view'} />}
|
|
||||||
{item.type == "upload" &&
|
<div className='title'>
|
||||||
|
<div className='titleRight'></div>
|
||||||
|
{item.content}
|
||||||
|
</div>
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
|
{item.type == "Select" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
<Select disabled={type == 'view'} options={item.options} fieldNames={item.fieldNames} />
|
||||||
|
</Form.Item>}
|
||||||
|
{item.type == "Radio" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
<Radio.Group disabled={type == 'view'} options={item.options}/>
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
|
{/* {item.type == "Select" && <Select disabled={type == 1} options={item.options} />} */}
|
||||||
|
|
||||||
|
{item.type == "Switch" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
<Switch defaultChecked onChange={onChange} disabled={type == 'view'} />
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
|
{/* {item.type == "Switch" && <Switch defaultChecked onChange={onChange} disabled={type == 1} />} */}
|
||||||
|
|
||||||
|
{item.type == "DatePicker" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
{/* {formJsonData[item.key]} */}
|
||||||
|
<DatePicker disabled={type == 'view'} style={{ width: "100%" }} picker={item.picker}/>
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
|
{/* {item.type == "DatePicker" && <DatePicker disabled={type == 1} style={{ width: "100%" }} />} */}
|
||||||
|
|
||||||
|
{item.type == "TextArea" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
<TextArea rows={4} disabled={type == 'view'} />
|
||||||
|
</Form.Item>}
|
||||||
|
{/* {item.type == "TextArea" && <TextArea rows={4} disabled={type == 1} />} */}
|
||||||
|
|
||||||
|
{item.type == "RangePicker" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
<RangePicker disabled={type == 'view'} />
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
|
{item.type == "TreeSelect" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
<TreeSelect
|
||||||
|
showSearch
|
||||||
|
style={{ width: '100%' }}
|
||||||
|
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||||
|
placeholder="Please select"
|
||||||
|
allowClear
|
||||||
|
fieldNames={item.fieldNames}
|
||||||
|
treeData={item.treeData}
|
||||||
|
treeCheckable={item.multiple}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
|
{/* {item.type == "RangePicker" &&
|
||||||
|
<RangePicker disabled={type == 'view'} />} */}
|
||||||
|
{item.type == "upload" && <Form.Item
|
||||||
|
label={item.label}
|
||||||
|
name={item.key}
|
||||||
|
rules={[{ required: item.required, message: '请输入' + item.label }]}
|
||||||
|
>
|
||||||
|
|
||||||
<>
|
<>
|
||||||
{type !== 1 && <Dragger {...props}>
|
{type !== 'view' && <Dragger {...props}>
|
||||||
<p className="ant-upload-drag-icon">
|
<p className="ant-upload-drag-icon">
|
||||||
<InboxOutlined />
|
<InboxOutlined />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{fileType == "pic" ? <p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名:jpeg、png</p>: <p className="ant-upload-text">点击或将文件拖拽到这里上传</p>}
|
{fileType == "pic" ? <p className="ant-upload-text">点击或将文件拖拽到这里上传 支持扩展名:jpeg、png</p> : <p className="ant-upload-text">点击或将文件拖拽到这里上传</p>}
|
||||||
|
|
||||||
</Dragger>}
|
</Dragger>}
|
||||||
<div>
|
<div className='flex' >
|
||||||
{fileList?.map((item) => {
|
{fileList?.map((item) => {
|
||||||
return <div className='flex align-center' style={{ minHeight: "50px", fontSize: 14,columnGap:10, cursor: checkMediaType(item.name) == 'image' || checkMediaType(item.name) == 'pdf'?'pointer':"not-allowed" }}>
|
return <div className='flex align-center file-item' style={{ marginRight:'3%',width:'30%',minHeight: "50px", fontSize: 14, columnGap: 10, cursor: checkMediaType(item.fileName) == 'image' || checkMediaType(item.fileName) == 'pdf' ? 'pointer' : "not-allowed" }}>
|
||||||
<div style={{width:40,height:40,display:"flex",alignItems:'center'}}>
|
<div style={{ width: 40, height: 40, display: "flex", alignItems: 'center' }}>
|
||||||
{checkMediaType(item.name) == 'image' && <Image
|
{checkMediaType(item.fileName) == 'image' && <Image
|
||||||
height={40}
|
height={40}
|
||||||
src={baseUrl + item.previewUrl}
|
src={baseUrl + item.filePath}
|
||||||
/>}
|
/>}
|
||||||
{
|
{
|
||||||
checkMediaType(item.name) !== 'image' &&
|
checkMediaType(item.fileName) !== 'image' &&
|
||||||
<span >{checkMediaType(item.name)?.toUpperCase()}</span>
|
<span >{checkMediaType(item.fileName)?.toUpperCase()}</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span onClick={() => preView(item)}>{item.name}</span>
|
<span onClick={() => preView(item)}>{item.fileName}</span>
|
||||||
{type==2&&<DeleteOutlined onClick={() => deleteFile(item.id)} />}
|
{type !== 'view' && <DeleteOutlined onClick={() => deleteFile(item.fileId)} />}
|
||||||
<VerticalAlignBottomOutlined onClick={() => download(item.id,item.name)} />
|
<VerticalAlignBottomOutlined onClick={() => download(item.fileId, item.fileName)} />
|
||||||
</div>
|
</div>
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</>}
|
</>
|
||||||
</Form.Item>
|
</Form.Item>}
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Row>
|
</Row>
|
||||||
</Form >
|
</Form >
|
||||||
{type !== 1 &&<div className="flex flex-end" style={{ marginTop: 10 }}>
|
{TableZdyProps}
|
||||||
|
{
|
||||||
|
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}>确定</Button>
|
||||||
</div>}
|
|
||||||
<PdfView url={url} isModal={isModal} setModalN={(e)=>setIsModal(e)}/>
|
|
||||||
|
|
||||||
|
|
||||||
</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)}/>
|
||||||
|
|
||||||
|
|
||||||
|
</div >
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,13 @@ const { Dragger } = Upload;
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
|
||||||
const opntios=[
|
const opntios=[
|
||||||
{label:'宪法',value:'宪法'},
|
{value:0,label:'党支部工作制度'},
|
||||||
{label:'法律',value:'法律'},
|
{value:1,label:'行政工作制度'},
|
||||||
{label:'行政法规',value:'行政法规'},
|
{value:2,label:'部门工作制度'},
|
||||||
{label:'督察法规',value:'督察法规'},
|
{value:3,label:'安全管理制度'},
|
||||||
{label:'司法解释',value:'司法解释'},
|
{value:4,label:'工程管理制度'},
|
||||||
{label:'地方性法规',value:'地方性法规'},
|
{value:5,label:'技术规程'},
|
||||||
|
{value:6,label:'岗位责任制'}
|
||||||
]
|
]
|
||||||
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
*/
|
*/
|
||||||
const download = (params) => {
|
const download = (params) => {
|
||||||
let downloadLink = document.createElement("a");
|
let downloadLink = document.createElement("a");
|
||||||
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/projectEvents/file/download/${params}`;
|
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||||
downloadLink.download = `${params.fileName}`;
|
downloadLink.download = `${params.fileName}`;
|
||||||
downloadLink.style.display = "none";
|
downloadLink.style.display = "none";
|
||||||
// 将链接添加到页面中
|
// 将链接添加到页面中
|
||||||
|
|
@ -78,16 +79,16 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
|
|
||||||
|
|
||||||
const onfinish = (values) => {
|
const onfinish = (values) => {
|
||||||
values.eventsDate = values.eventsDate ? moment(values.eventsDate).format("YYYY-MM-DD 00:00:00") : ''
|
let oldFiles = fileList.map(item => (item.response?.data))
|
||||||
let oldFiles = fileList.map(item => ({ fileId: item.response?.data?.fileId }))
|
debugger
|
||||||
if (mode === 'edit') {
|
if (mode === 'edit') {
|
||||||
values.files = oldFiles;
|
values.files = oldFiles;
|
||||||
values.id = record.id;
|
values.id = record.id;
|
||||||
onEdit(apiurl.rcgl.gcdsj.edit, values)
|
onEdit(apiurl.zdgl.edit, {...record,...values})
|
||||||
}
|
}
|
||||||
if (mode === 'save') {
|
if (mode === 'save') {
|
||||||
values.files = oldFiles
|
values.files = oldFiles
|
||||||
onSave(apiurl.rcgl.gcdsj.save, values)
|
onSave(apiurl.zdgl.add, values)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,30 +137,24 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label="制度类型" name="name">
|
<Form.Item label="制度类型" name="type" rules={[{ required: true }]}>
|
||||||
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="公布日期"
|
label="公布日期"
|
||||||
name="eventsDate"
|
name="releaseDate"
|
||||||
getValueFromEvent={(e, dateString) => dateString}
|
getValueFromEvent={(e, dateString) => dateString}
|
||||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<DatePicker disabled={mode === 'view'} format={'YYYY-MM-DD'} style={{ width: '100%' }} allowClear />
|
<DatePicker disabled={mode === 'view'} format={'YYYY-MM-DD HH:mm:ss'} style={{ width: '100%' }} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="发布单位"
|
label="发布单位"
|
||||||
name="name"
|
name="fillUnit"
|
||||||
rules={[{ required: true }]}
|
|
||||||
>
|
>
|
||||||
<Input disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
<Input disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
@ -170,7 +165,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="附件"
|
label="附件"
|
||||||
name="fieldId"
|
name="files"
|
||||||
labelCol={{ span: 3 }}
|
labelCol={{ span: 3 }}
|
||||||
wrapperCol={{ span: 19 }}
|
wrapperCol={{ span: 19 }}
|
||||||
>
|
>
|
||||||
|
|
@ -178,7 +173,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Dragger
|
<Dragger
|
||||||
name='file'
|
name='file'
|
||||||
// multiple
|
// multiple
|
||||||
action="/gunshiApp/xyt/projectEvents/file/upload/singleSimple"
|
action="/gunshiApp/tsg/SzRegulatoryFramework/file/upload/singleSimple"
|
||||||
onChange={fileChange}
|
onChange={fileChange}
|
||||||
onDrop={(info) => { console.log(info.dataTransfer.files); }}
|
onDrop={(info) => { console.log(info.dataTransfer.files); }}
|
||||||
fileList={fileList}
|
fileList={fileList}
|
||||||
|
|
@ -252,7 +247,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
mode === 'view' ? null : (
|
mode === 'view' ? null : (
|
||||||
<>
|
<>
|
||||||
<Form.Item {...btnItemLayout}>
|
<Form.Item {...btnItemLayout}>
|
||||||
<Button type="primary" htmlType="submit">
|
<Button type="primary" htmlType="submit" loading={loading}>
|
||||||
{mode === 'save' ? '提交' : '修改'}
|
{mode === 'save' ? '提交' : '修改'}
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { createCrudService } from '../../../components/crud/_';
|
||||||
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
|
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
|
||||||
|
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
|
const obj={0:"党支部工作制度",1:"行政工作制度",2:"部门工作制度",3:"安全管理制度",4:"工程管理制度",5:"技术规程",6:"岗位责任制"}
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
const editBtn = role?.rule?.find(item => item.menuName == "编辑");
|
const editBtn = role?.rule?.find(item => item.menuName == "编辑");
|
||||||
|
|
@ -25,19 +26,19 @@ const Page = () => {
|
||||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||||
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
{ title: '标题', key: 'name', dataIndex: 'name', width: 250, ellipsis: true },
|
||||||
{
|
{
|
||||||
title: '制度类型', key: 'eventsDate', dataIndex: 'eventsDate', width: 140,
|
title: '制度类型', key: 'type', dataIndex: 'type', width: 140,render:(v)=><>{obj[v]}</>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '发布日期', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '发布日期', key: 'releaseDate', dataIndex: 'releaseDate', width: 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '发布单位', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '发布单位', key: 'fillUnit', dataIndex: 'fillUnit', width: 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '上传时间', key: 'eventsDesc', dataIndex: 'eventsDesc', width: 300
|
title: '上传时间', key: 'uploadDate', dataIndex: 'uploadDate', width: 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '附件', key: 'fileName', dataIndex: 'fileName', width: 300,render:(v,r)=><a onClick={()=>viewPdf(r.fileId)}>{v}</a>
|
title: '附件', key: 'files', dataIndex: 'files', width: 300,render:(v,r)=><a onClick={()=>viewPdf(v[0].fileId)}>{v[0]?.fileName}</a>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
title: '操作', key: 'operation', width: 240, fixed: 'right', align: 'center',
|
||||||
|
|
@ -45,7 +46,7 @@ const Page = () => {
|
||||||
<CrudOpRender_text
|
<CrudOpRender_text
|
||||||
edit={true}
|
edit={true}
|
||||||
del={true}
|
del={true}
|
||||||
view={true}
|
// view={true}
|
||||||
command={(cmd) => () => command(cmd)(row)} />)
|
command={(cmd) => () => command(cmd)(row)} />)
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -61,12 +62,12 @@ const Page = () => {
|
||||||
} else if (type === 'view') {
|
} else if (type === 'view') {
|
||||||
refModal.current.showView(params);
|
refModal.current.showView(params);
|
||||||
} else if (type === 'del') {
|
} else if (type === 'del') {
|
||||||
refModal.current.onDeleteGet(apiurl.rcgl.gcdsj.delete + `/${params.id}`);
|
refModal.current.onDeleteGet(apiurl.zdgl.del + `/${params.id}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.gcdsj.page).find_noCode);
|
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.zdgl.list).find_noCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 处理成功的回调
|
* @description 处理成功的回调
|
||||||
|
|
@ -133,7 +134,7 @@ const Page = () => {
|
||||||
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>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,13 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const opntios = [
|
const opntios = [
|
||||||
{ label: '宪法', value: '宪法' },
|
{value:0,label:'党支部工作制度'},
|
||||||
{ label: '法律', value: '法律' },
|
{value:1,label:'行政工作制度'},
|
||||||
{ label: '行政法规', value: '行政法规' },
|
{value:2,label:'部门工作制度'},
|
||||||
{ label: '督察法规', value: '督察法规' },
|
{value:3,label:'安全管理制度'},
|
||||||
{ label: '司法解释', value: '司法解释' },
|
{value:4,label:'工程管理制度'},
|
||||||
{ label: '地方性法规', value: '地方性法规' },
|
{value:5,label:'技术规程'},
|
||||||
|
{value:6,label:'岗位责任制'}
|
||||||
]
|
]
|
||||||
const styles = {
|
const styles = {
|
||||||
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
fontFamily: '微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑, sans-serif',
|
||||||
|
|
@ -42,13 +43,13 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
<Form.Item label="标题" name="name">
|
<Form.Item label="标题" name="name">
|
||||||
<Input allowClear style={{ width: '150px' }} />
|
<Input allowClear style={{ width: '150px' }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="制度类型" name="name">
|
<Form.Item label="制度类型" name="type">
|
||||||
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
<Select allowClear style={{ width: '150px' }} options={opntios} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="发布日期" name="name">
|
<Form.Item label="发布日期" name="releaseDate">
|
||||||
<RangePicker allowClear />
|
<RangePicker allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="发布单位" name="name">
|
<Form.Item label="发布单位" name="fillUnit">
|
||||||
<Input allowClear style={{ width: '150px' }} />
|
<Input allowClear style={{ width: '150px' }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
|
|
|
||||||
|
|
@ -1,137 +1,210 @@
|
||||||
|
const getBackground = () => {
|
||||||
|
return {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 0,
|
||||||
|
y2: 1,
|
||||||
|
colorStops: [{
|
||||||
|
offset: 0, color: '#ffffff' // 0% 处的颜色
|
||||||
|
}, {
|
||||||
|
offset: 0.5, color: 'blue' // 100% 处的颜色
|
||||||
|
}, {
|
||||||
|
offset: 1, color: '#ffffff' // 100% 处的颜色
|
||||||
|
}],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const data = {
|
||||||
|
name: '销售部',
|
||||||
|
children: [{
|
||||||
|
name: '销售一部',
|
||||||
|
children: [{
|
||||||
|
name: '任务名称1',
|
||||||
|
itemStyle: { color: "#ff9800" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称2',
|
||||||
|
itemStyle: { color: "#4d8dd9" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称3',
|
||||||
|
itemStyle: { color: "#22b07b" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称5'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称6'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称7'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务名称8'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '销售二部',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '销售三部',
|
||||||
|
children: [{
|
||||||
|
name: '任务3-1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务3-2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '销售四部',
|
||||||
|
children: [{
|
||||||
|
name: '任务4-1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '任务4-2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
export default function jgOption() {
|
export default function jgOption() {
|
||||||
return {
|
return {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "item",
|
trigger: 'item',
|
||||||
triggerOn: "mousemove",
|
triggerOn: 'mousemove'
|
||||||
color: "#fff",
|
|
||||||
backgroundColor: "skyblue",
|
|
||||||
borderColor: "skyblue",
|
|
||||||
},
|
},
|
||||||
animationDurationUpdate: 1500,
|
series: [{
|
||||||
animationEasingUpdate: "quinticInOut",
|
type: 'tree',
|
||||||
series: [
|
id: 0,
|
||||||
{
|
name: 'tree1',
|
||||||
type: "tree",
|
data: [data],
|
||||||
symbolSize: 75,
|
top: '10%',
|
||||||
symbol: "roundRect",
|
left: '10%',
|
||||||
edgeShape: "polyline",
|
bottom: '20%',
|
||||||
edgeForkPosition: "50%",
|
right: '10%',
|
||||||
edgeSymbol: ["circle", "arrow"],
|
avoidLabelOverlap: true,//防止标签重叠
|
||||||
edgeSymbolSize: [4, 10],
|
roam: true, //移动+缩放 'scale' 或 'zoom':只能够缩放。 'move' 或 'pan':只能够平移。
|
||||||
edgeLabel: {
|
scaleLimit:{ //缩放比例
|
||||||
normal: {
|
min:0.7,//最小的缩放值
|
||||||
textStyle: {
|
max:4,//最大的缩放值
|
||||||
fontSize: 18,
|
|
||||||
},
|
},
|
||||||
|
layout: 'orthogonal',//树图布局,orthogonal水平垂直方向,radial径向布局 是指以根节点为圆心,每一层节点为环,一层层向外
|
||||||
|
orient: 'TB', //树形方向 TB为上下结构 LR为左右结构
|
||||||
|
// nodePadding: 100,//结点间距 (发现没用)
|
||||||
|
//layerPadding: 30,//连接线长度 (发现没用)
|
||||||
|
symbol: 'circle', //图形形状 rect方形 roundRect圆角 emptyCircle圆形 circle实心圆
|
||||||
|
symbolSize: 14, //状态大小
|
||||||
|
edgeShape: 'polyline', //线条类型 curve曲线
|
||||||
|
initialTreeDepth: 1, //初始展开的层级
|
||||||
|
expandAndCollapse: true,//子树折叠和展开的交互,默认打开
|
||||||
|
lineStyle: {//结构线条样式
|
||||||
|
width: 0.7,
|
||||||
|
color: '#1E9FFF',
|
||||||
|
type: 'broken'
|
||||||
},
|
},
|
||||||
|
label: {
|
||||||
|
// 每个节点对应的文本标签样式
|
||||||
|
show: true, // 是否显示标签
|
||||||
|
distance: 8, // 文本距离图形元素的距离
|
||||||
|
position: ['50%', '50%'], // 标签位置
|
||||||
|
verticalAlign: 'middle', // 文字垂直对齐方式,默认自动,top,middle,bottom
|
||||||
|
align: 'center', // 文字水平对齐方式,默认自动,left,right,center
|
||||||
|
fontSize: 16, // 字体大小
|
||||||
|
color: '#333', // 字体颜色
|
||||||
|
// color: 'red', // 字体颜色
|
||||||
|
backgroundColor: '#F8F9FA', // 文字块的背景颜色
|
||||||
|
borderColor: '#CED4DA', // 文字块边框颜色
|
||||||
|
borderWidth: 1, // 文字块边框宽度
|
||||||
|
borderType: 'solid', // 文字块边框描边类型 solid dashed dotted
|
||||||
|
borderRadius: 2, // 文字块的圆角
|
||||||
|
padding: [6, 6], // 文字块内边距
|
||||||
|
shadowColor: 'rgba(0,121,221,0.3)', // 文字块的背景阴影颜色
|
||||||
|
shadowBlur: 6, // 文字块的背景阴影长度
|
||||||
|
formatter: (params) => {
|
||||||
|
let newName = ''
|
||||||
|
let len = params.data.name.length
|
||||||
|
let strLen = params.data.relationType === 0 ? 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.name.substring(start, len)
|
||||||
|
} else {
|
||||||
|
tempStr = params.data.name.substring(start, end) + '\n'
|
||||||
|
}
|
||||||
|
newName += tempStr
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
newName = params.data.name
|
||||||
|
}
|
||||||
|
let n = newName
|
||||||
|
if (n.length > 16) {
|
||||||
|
n = n.slice(0, 16) + '...'
|
||||||
|
}
|
||||||
|
let str = `{name|${n}}`
|
||||||
|
let isMain = params.data.relationType === 0
|
||||||
|
str = isMain ? `{name|${n}} {current|本企业} {main|总部}` : str
|
||||||
|
return str
|
||||||
},
|
},
|
||||||
initialTreeDepth: 2,
|
rich: {
|
||||||
orient: "vertical",
|
name: {
|
||||||
|
fontSize: 14
|
||||||
itemStyle: {
|
|
||||||
color: "#FFC125",
|
|
||||||
borderColor: "#FFC125",
|
|
||||||
},
|
},
|
||||||
roam: true, // 可移动,可缩放
|
current: {
|
||||||
expandAndCollapse: true,
|
fontSize: 12,
|
||||||
|
padding: 0,
|
||||||
|
color: '#07CA42',
|
||||||
|
fontWeight: 600,
|
||||||
|
backgroundColor: '#E5F7EA',
|
||||||
|
borderRadius: 2
|
||||||
|
},
|
||||||
|
main: {
|
||||||
|
color: '#0780ED',
|
||||||
|
fontSize: 12,
|
||||||
|
padding: 0,
|
||||||
|
fontWeight: 600,
|
||||||
|
backgroundColor: '#E6F2FD',
|
||||||
|
borderRadius: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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,
|
animationDuration: 550,
|
||||||
animationDurationUpdate: 750,
|
animationDurationUpdate: 750
|
||||||
//线条的颜色
|
}]
|
||||||
lineStyle: {
|
|
||||||
normal: {
|
|
||||||
opacity: 0.9,
|
|
||||||
color: "#93beff",
|
|
||||||
// type: "dashed",
|
|
||||||
width: 2,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: "inside",
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
color: "#fff",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
leaves: {
|
|
||||||
label: {
|
|
||||||
position: "inside",
|
|
||||||
color: "#fff",
|
|
||||||
},
|
|
||||||
itemStyle: {
|
|
||||||
color: "#dfdfdf",
|
|
||||||
borderColor: "#dfdfdf",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
name: "根节点",
|
|
||||||
url: "",
|
|
||||||
// 根节点样式设置
|
|
||||||
itemStyle: {
|
|
||||||
color: "#18a849",
|
|
||||||
borderColor: "#18a849",
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "子节点1",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "叶子节点1",
|
|
||||||
itemStyle: {
|
|
||||||
color: "#5470C6",
|
|
||||||
borderColor: "#5470C6",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "叶子节点2",
|
|
||||||
itemStyle: {
|
|
||||||
color: "#5470C6",
|
|
||||||
borderColor: "#5470C6",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "叶子节点3",
|
|
||||||
itemStyle: {
|
|
||||||
color: "#5470C6",
|
|
||||||
borderColor: "#5470C6",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "子节点2",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "叶子节点4",
|
|
||||||
itemStyle: {
|
|
||||||
color: "#5470C6",
|
|
||||||
borderColor: "#5470C6",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "叶子节点5",
|
|
||||||
itemStyle: {
|
|
||||||
color: "#5470C6",
|
|
||||||
borderColor: "#5470C6",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "叶子节点6",
|
|
||||||
itemStyle: {
|
|
||||||
color: "#5470C6",
|
|
||||||
borderColor: "#5470C6",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue