雨情最新上报时间: {data?.tm}
+ >雨情最新上报时间: {detail?.tm}
-
12.5 mm
+
{detail?.h1 ?? '-' } mm
近1小时
-
12.5 mm
+
{detail?.h3 ?? '-' } mm
近3小时
-
12.5 mm
+
{detail?.h6 ?? '-' } mm
近6小时
-
12.5 mm
+
{detail?.h12 ?? '-' } mm
近12小时
-
12.5 mm
+
{detail?.h24 ?? '-' } mm
近24小时
-
12.5 mm
+
{detail?.h48 ?? '-' } mm
近48小时
diff --git a/src/views/sz/pxjhgl/RecordForm.js b/src/views/sz/pxjhgl/RecordForm.js
new file mode 100644
index 000000000..6ca5d0738
--- /dev/null
+++ b/src/views/sz/pxjhgl/RecordForm.js
@@ -0,0 +1,392 @@
+import React,{useEffect,useState,useMemo,useRef} from 'react';
+import { Form, Button, Input, Row,Upload, Col, Table, DatePicker, InputNumber,message,Image,Modal,Typography ,Popconfirm } from 'antd';
+import { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
+import { formItemLayout, btnItemLayout } from '../../../components/crud/FormLayoutProps';
+import apiurl from '../../../service/apiurl';
+import NormalSelect from '../../../components/Form/NormalSelect';
+import "./index.less"
+import moment from 'moment';
+import { createCrudService } from '../../../components/crud/_';
+const { RangePicker } = DatePicker
+const { Dragger } = Upload;
+const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
+
+const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
+
+ const types = [
+ {
+ label: "水利",
+ value:1
+ },
+ {
+ label: "岗前培训",
+ value:2
+ },{
+ label: "在岗培训",
+ value:3
+ },{
+ label: "政治学习教育",
+ value:4
+ },{
+ label: "其他",
+ value:5
+ },
+ ]
+ const [details, setDetails] = useState([])
+ const [form] = Form.useForm();
+ const [fileList, setFileList] = useState([]) //上传文件列表
+ const [iframeSrc, setIframeSrc] = useState('')
+ const [pdfViewOPen, setPdfViewOPen] = useState(false)
+
+ const [loading, setLoading] = useState(false)
+ /**
+ * @description 获取查看时文件
+ * @param {*} type
+ * @returns
+ */
+ const getFileInfo = (params) => {
+ createCrudService(apiurl.fxzb.qsdw.zq.getFile).delGet({ teamId: params.teamId }).then(res => {
+ if (res.code === 200) {
+ let fileArr = res.data?.files.map(item => {
+ return {
+ name: item.fileName,
+ response: {
+ data: {
+ filePath: item.filePath,
+ fileId:item.fileId
+ }
+ },
+ }
+ })
+ setFileList(fileArr)
+ const result = res.data?.details.map(item => ({ ...item, key: item.detailId }))
+ console.log("resss",result);
+
+ setDetails(result)
+ }
+ })
+ }
+ /**
+ * @description 文件下载
+ * @param {String} params 文件fileId
+ */
+ const download = (params) => {
+ let downloadLink = document.createElement("a");
+ downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/rescue/team/file/download/${params}`;
+ downloadLink.download = `${params.fileName}`;
+ downloadLink.style.display = "none";
+ // 将链接添加到页面中
+ document.body.appendChild(downloadLink);
+
+ // 模拟点击事件,开始下载
+ downloadLink.click();
+ }
+
+ /**
+ * @description pdf文件预览
+ * @param {String} params 文件预览url
+ */
+ const viewPdf = (params) => {
+ setIframeSrc(params)
+ setPdfViewOPen(true)
+ }
+
+
+
+
+
+ useEffect(()=>{
+ if (record.teamId ) {
+ getFileInfo(record)
+ }
+ }, [record])
+
+ useEffect(() => {
+ if (mode !== "save") {
+ let dataSo = [
+ record.validStartDate? moment(record.validStartDate):'',
+ record.validEndDate? moment(record.validEndDate): ''
+ ]
+
+ form.setFieldsValue({...record,dateRangeSo:dataSo})
+
+ }
+
+ }, [record,mode])
+
+ return (
+
+
基本信息
+ {/*
*/}
+
+
+
+ >
+ )
+ }
+
+
+
{
+ setPdfViewOPen(false)
+ }}
+ >
+
+
+
+ );
+}
+
+export default ModalForm;
diff --git a/src/views/sz/pxjhgl/form.js b/src/views/sz/pxjhgl/form.js
index 0e03b7071..910933218 100644
--- a/src/views/sz/pxjhgl/form.js
+++ b/src/views/sz/pxjhgl/form.js
@@ -166,7 +166,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
}, [record,mode])
return (
- <>
+
基本信息
{/*
*/}
+
+
+ >
+ )
+ }
-
- 队伍明细:(共计{details?.length}人)
-
+
{
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/xyt/rescue/goods/file/download/${iframeSrc}`)}`}
/>
- >
+
);
}
diff --git a/src/views/sz/pxjhgl/index.js b/src/views/sz/pxjhgl/index.js
index 31acdb9ff..054d3463f 100644
--- a/src/views/sz/pxjhgl/index.js
+++ b/src/views/sz/pxjhgl/index.js
@@ -1,22 +1,26 @@
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
import { useSelector } from 'react-redux';
import BasicCrudModal from '../../../components/crud/BasicCrudModal';
-import { Table, Card,Modal,Form,Input,Button,Row,Col,message } from 'antd';
+import { Table, Card,Modal,Image,Input,Button,Row,Col,message } from 'antd';
import ToolBar from './toolbar';
import ModalForm from './form';
+import RecordDetails from "./RecordForm"
import apiurl from '../../../service/apiurl';
import usePageTable from '../../../components/crud/usePageTable2';
import { createCrudService } from '../../../components/crud/_';
-import {CrudOpRender_text} from '../../../components/crud/CrudOpRender';
+import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
+import { exportFile } from '../../../utils/tools.js';
+import { httppost5 } from '../../../utils/request';
const Page = () => {
+ const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
const role = useSelector(state => state.auth.role);
const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
const viewBtn = role?.rule?.find(item => item.menuName == "查看") || true;
const delBtn = role?.rule?.find(item => item.menuName == "删除") || true;
const refModal = useRef();
const [searchVal, setSearchVal] = useState(false)
- const [isFetch, setIsFetch] = useState(false)
+ const [pxRecordOpen, setPxRecordOpen] = useState(false)
const columns = [
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
{ title: '培训班名称', key: 'teamName', dataIndex: 'teamName', width: 200, ellipsis: true },
@@ -42,10 +46,40 @@ const Page = () => {
command={(cmd) => () => command(cmd)(row)} />)
},
];
-
+ const columns1 = [
+ { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
+ { title: '培训日期', key: 'teamName', dataIndex: 'teamName', width: 150, ellipsis: true },
+ {
+ title: '培训时段', key: 'personCount', dataIndex: 'personCount', width: 150,
+ },
+ { title: '参加人数', key: 'address', dataIndex: 'address', width: 100 },
+ {
+ title: '参训人员', key: 'managementUnit', dataIndex: 'managementUnit', width: 200,ellipsis: true
+ },
+ {
+ title: '培训签到表', key: 'teamLeader', dataIndex: 'teamLeader', width: 150,
+ render: (value) =>
+ },
+
+ {
+ title: '操作', key: 'operation', width: 100, fixed: 'right',align: 'center',
+ render: (value, row, index) => (
+
{setPxRecordOpen(true)}}>查看
+ )
+ },
+ ];
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
-
+ const width1 = useMemo(() => columns1.reduce((total, cur) => total + (cur.width), 0), [columns1]);
+ const [pxOpen, setPxOpen] = useState(false)
+ const [imgVisible, setImgVisible] = useState(false)
+ const [imgList, setImgList] = useState([])
+ const reviewPic = (arrPic) => {
+ if (arrPic.length > 0) {
+ setImgVisible(true)
+ setImgList(arrPic)
+ }
+ }
const command = (type) => (params) => {
if (type === 'save') {
refModal.current.showSave();
@@ -55,20 +89,38 @@ const Page = () => {
refModal.current.showView(params);
} else if (type === 'del') {
refModal.current.onDeleteGet(apiurl.fxzb.qsdw.zq.delete + `/${params.teamId}`);
+ }else if (type === 'similarAdd') {
+ refModal.current.showSimilarSave(params);
+ } else {
+ // 培训记录
+ setPxOpen(true);
+ // setPxItem
}
}
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.fxzb.qsdw.zq.page).find_noCode);
+ const { tableProps:tableProps1, search:search1 } = usePageTable(createCrudService(apiurl.fxzb.qsdw.zq.page).find_noCode);
/**
* @description 处理成功的回调
*/
const successCallback = () => {
refresh()
- setIsFetch(!isFetch)
}
+
+ // 导出
+ const exportExcel = () => {
+ let params = {
+ ...searchVal,
+
+ id:1
+ }
+ httppost5(apiurl.gcaqjc.gcaqfx.jrx.export, params).then(res => {
+ exportFile(`培训计划管理.xlsx`,res.data)
+ })
+ }
useEffect(()=>{
const params = {
search: {
@@ -88,6 +140,8 @@ const Page = () => {
setSearchVal={setSearchVal}
onSave={command('save')}
role={role}
+ callback={refresh}
+ exportFile={exportExcel}
/>
@@ -104,6 +158,56 @@ const Page = () => {
// onCrudSuccess={()=>{refresh({addvcd:localStorage.getItem('ADCD6')})}}
/>
+ {/* 培训记录 */}
+
{
+ setPxOpen(false);
+ }}
+ >
+
+
+
+
+ {/* 培训记录查看 */}
+
{
+ setPxRecordOpen(false);
+ }}
+ >
+
+
+
+ setImgVisible(vis),
+ }}
+ >
+ {
+ imgList.length > 0 ? imgList.map(item => (
+
+ ))
+ : null
+ }
+
+
+
+
>
);
}
diff --git a/src/views/sz/pxjhgl/toolbar.js b/src/views/sz/pxjhgl/toolbar.js
index 9590ae43a..5e993788f 100644
--- a/src/views/sz/pxjhgl/toolbar.js
+++ b/src/views/sz/pxjhgl/toolbar.js
@@ -1,11 +1,21 @@
import React, { useEffect,useState } from 'react';
-import { Form, Input, Button, DatePicker } from 'antd';
+import { Form, Upload, Button,Row, Col, Input, DatePicker, message,Modal } from 'antd';
+import {RightOutlined,LeftOutlined,FileExcelOutlined,DeleteOutlined} from '@ant-design/icons';
+import { createCrudService } from '../../../components/crud/_';
+import apiurl from '../../../service/apiurl';
+import { httppost5 } from '../../../utils/request';
+import { exportFile } from '../../../utils/tools';
import moment from 'moment';
+const { Dragger } = Upload;
const { RangePicker } = DatePicker;
-const ToolBar = ({ setSearchVal, onSave, storeData, role = [] }) => {
+const ToolBar = ({ setSearchVal, onSave, storeData, role = [],callback,exportFile }) => {
const [form] = Form.useForm();
const addBtn = role?.rule?.find(item => item.menuName == "新增")|| true;
- const searchBtn = role?.rule?.find(item => item.menuName == "查询")|| true;
+ const searchBtn = role?.rule?.find(item => item.menuName == "查询") || true;
+
+ const [exportOPen, setExportOPen] = useState(false)
+ const [fileList, setFileList] = useState([]) //上传文件列表
+ const [loading, setLoading] = useState(false)
const onFinish = (values) => {
let dateSo;
if (values.tm) {
@@ -18,6 +28,40 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role = [] }) => {
setSearchVal({...values, dateSo});
}
+ const beforeUpload = (file) => {
+ const accept = [".xlsx",".xls"]
+ const fileType = file?.name.split(".");
+ const fileDate = fileType.slice(-1);
+ const isEecel = accept.includes(`.${fileDate[0]}`)
+ if (!isEecel) {
+ message.error('请上传.xls .xlsx格式的文件!');
+ }
+ return isEecel ? true : Upload.LIST_IGNORE;
+ };
+
+
+ const fileChange = (info) => {
+ console.log(info);
+ if (info.file.status === "done") {
+ setLoading(false);
+ setExportOPen(false)
+ callback()
+ }
+ if (info.file.status === "uploading") {
+ setLoading(true);
+ }
+ if (info.file.status === "error") {
+ message.error("文件上传失败")
+ setLoading(false);
+ }
+ setFileList(info.fileList)
+ }
+
+ const downTemplate = ()=>{
+ httppost5(apiurl.rcgl.zbgl.zbb.import, {}).then(res => {
+ exportFile(`培训计划管理.xlsx`,res.data)
+ })
+ }
return (
<>
@@ -53,12 +97,49 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role = [] }) => {
:null
}
-
+
-
+
+ {/* 导入 */}
+
setExportOPen(false)}
+ footer={null}
+ >
+
+
+ { console.log(info); }}
+ fileList={fileList}
+ disabled={loading}
+ accept=".xls, .xlsx"
+ >
+ 点击或拖拽文件到此区域上传
+
+ 支持扩展名:.xls .xlsx
+
+
+
+
+
+
+
+
+ {/* */}
+
+
+
>
);
}
diff --git a/src/views/sz/pxjlgl/chartToolbar.js b/src/views/sz/pxjlgl/chartToolbar.js
new file mode 100644
index 000000000..a0d84bfaa
--- /dev/null
+++ b/src/views/sz/pxjlgl/chartToolbar.js
@@ -0,0 +1,41 @@
+import React, { useEffect,useState } from 'react';
+import { Form, Upload, Button,Row, Col, Input, DatePicker, message,Modal } from 'antd';
+import NormalSelect from '../../../components/Form/NormalSelect';
+
+const ToolBar = ({ setSearchVal }) => {
+ const [form] = Form.useForm();
+ const types = [
+ {
+ label: '培训期数',
+ value: 1
+ },
+ {
+ label: '培训人次',
+ value: 2
+ },
+ ]
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+}
+
+export default ToolBar;
\ No newline at end of file
diff --git a/src/views/sz/pxjlgl/form.js b/src/views/sz/pxjlgl/form.js
new file mode 100644
index 000000000..33329da69
--- /dev/null
+++ b/src/views/sz/pxjlgl/form.js
@@ -0,0 +1,610 @@
+import React,{useEffect,useState,useMemo,useRef} from 'react';
+import { Form, Button, Input, Row,Upload, Col, Table, DatePicker, InputNumber,message,Image,Modal,Typography ,Popconfirm } from 'antd';
+import { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
+import { formItemLayout, btnItemLayout } from '../../../components/crud/FormLayoutProps';
+import apiurl from '../../../service/apiurl';
+import NormalSelect from '../../../components/Form/NormalSelect';
+import "./index.less"
+import moment from 'moment';
+import { createCrudService } from '../../../components/crud/_';
+const { RangePicker } = DatePicker
+const { Dragger } = Upload;
+const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
+
+const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
+
+ const types = [
+ {
+ label: "水利",
+ value:1
+ },
+ {
+ label: "岗前培训",
+ value:2
+ },{
+ label: "在岗培训",
+ value:3
+ },{
+ label: "政治学习教育",
+ value:4
+ },{
+ label: "其他",
+ value:5
+ },
+ ]
+ const jh = [
+ {
+ label: "工程测量业务知识",
+ value:1
+ },
+ {
+ label: "工程管理标准化业务知识",
+ value:2
+ },{
+ label: "消防安全知识培训",
+ value:3
+ },{
+ label: "水雨情测报培训",
+ value:4
+ }
+ ]
+
+ const [details, setDetails] = useState([])
+
+
+ const [form] = Form.useForm();
+ const [fileList, setFileList] = useState([]) //上传文件列表
+ const [fileIds, setFileIds] = useState([])
+ const [iframeSrc, setIframeSrc] = useState('')
+ const [pdfViewOPen, setPdfViewOPen] = useState(false)
+
+ const [loading, setLoading] = useState(false)
+
+
+
+ const [fileList1, setFileList1] = useState([]) //上传文件列表
+ const [fileIds1, setFileIds1] = useState([])
+ const [iframeSrc1, setIframeSrc1] = useState('')
+ const [pdfViewOPen1, setPdfViewOPen1] = useState(false)
+
+ const [loading1, setLoading1] = useState(false)
+ /**
+ * @description 获取查看时文件
+ * @param {*} type
+ * @returns
+ */
+ const getFileInfo = (params) => {
+ createCrudService(apiurl.fxzb.qsdw.zq.getFile).delGet({ teamId: params.teamId }).then(res => {
+ if (res.code === 200) {
+ let fileArr = res.data?.files.map(item => {
+ return {
+ name: item.fileName,
+ response: {
+ data: {
+ filePath: item.filePath,
+ fileId:item.fileId
+ }
+ },
+ }
+ })
+ setFileList(fileArr)
+ const result = res.data?.details.map(item => ({ ...item, key: item.detailId }))
+ console.log("resss",result);
+
+ setDetails(result)
+ }
+ })
+ }
+ /**
+ * @description 文件下载
+ * @param {String} params 文件fileId
+ */
+ const download = (params) => {
+ let downloadLink = document.createElement("a");
+ downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/rescue/team/file/download/${params}`;
+ downloadLink.download = `${params.fileName}`;
+ downloadLink.style.display = "none";
+ // 将链接添加到页面中
+ document.body.appendChild(downloadLink);
+
+ // 模拟点击事件,开始下载
+ downloadLink.click();
+ }
+
+ const download1 = (params) => {
+ let downloadLink = document.createElement("a");
+ downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/rescue/team/file/download/${params}`;
+ downloadLink.download = `${params.fileName}`;
+ downloadLink.style.display = "none";
+ // 将链接添加到页面中
+ document.body.appendChild(downloadLink);
+
+ // 模拟点击事件,开始下载
+ downloadLink.click();
+ }
+ /**
+ * @description 上传图片
+ * @param {string} file 上传的文件
+ */
+ const fileChange = (info) => {
+ if (info.file.status === "done") {
+ setLoading(false);
+ }
+ if (info.file.status === "uploading") {
+ setLoading(true);
+ }
+ if (info.file.status === "error") {
+ message.error("文件上传失败")
+ setLoading(false);
+ }
+ let fileIds = info.fileList.map(file => {
+ return file.response?.data?.fileId
+ })
+ setFileIds(fileIds)
+ setFileList(info.fileList)
+ }
+
+ const fileChange1 = (info) => {
+ if (info.file.status === "done") {
+ setLoading1(false);
+ }
+ if (info.file.status === "uploading") {
+ setLoading1(true);
+ }
+ if (info.file.status === "error") {
+ message.error("文件上传失败")
+ setLoading1(false);
+ }
+ let fileIds = info.fileList.map(file => {
+ return file.response?.data?.fileId
+ })
+ setFileIds1(fileIds)
+ setFileList1(info.fileList)
+ }
+ /**
+ * @description pdf文件预览
+ * @param {String} params 文件预览url
+ */
+ const viewPdf = (params) => {
+ setIframeSrc(params)
+ setPdfViewOPen(true)
+ }
+
+ const viewPdf1 = (params) => {
+ setIframeSrc1(params)
+ setPdfViewOPen1(true)
+ }
+ const onfinish = () => {
+ let values = form.getFieldsValue();
+ values.details = details;
+ values.validStartDate = values.dateRangeSo&&moment(values.dateRangeSo[0]).format("YYYY-MM-DD")
+ values.validEndDate = values.dateRangeSo&&moment(values.dateRangeSo[1]).format("YYYY-MM-DD")
+ if (mode === 'edit') {
+ let oldFiles = fileList.map(item => item.response?.data?.fileId )
+ values.fileIds = oldFiles;
+ values.teamId = record.teamId;
+ onEdit(apiurl.fxzb.qsdw.zq.edit,values)
+ }
+ if (mode === 'save') {
+ values.fileIds = fileIds
+ onSave(apiurl.fxzb.qsdw.zq.save,values)
+ }
+ }
+
+ /**
+ * @description 删除上传的图片
+ * @param {string} id 删除的id
+ */
+ const deleteFile = (fileId) => {
+ console.log(fileId);
+ let filterFile = fileList.filter(item => item.response?.data?.fileId !== fileId);
+ setFileList(filterFile)
+ }
+
+ const deleteFile1 = (fileId) => {
+ console.log(fileId);
+ let filterFile = fileList1.filter(item => item.response?.data?.fileId !== fileId);
+ setFileList1(filterFile)
+ }
+ useEffect(()=>{
+ if (record.teamId ) {
+ getFileInfo(record)
+ }
+ }, [record])
+
+ useEffect(() => {
+ if (mode !== "save") {
+ let dataSo = [
+ record.validStartDate? moment(record.validStartDate):'',
+ record.validEndDate? moment(record.validEndDate): ''
+ ]
+
+ form.setFieldsValue({...record,dateRangeSo:dataSo})
+
+ }
+
+ }, [record,mode])
+
+ return (
+
+
基本信息
+ {/*
*/}
+
+
+
+ >
+ )
+ }
+
+
+
{
+ setPdfViewOPen(false)
+ }}
+ >
+
+
+
+
{
+ setPdfViewOPen1(false)
+ }}
+ >
+
+
+
+ );
+}
+
+export default ModalForm;
diff --git a/src/views/sz/pxjlgl/index.js b/src/views/sz/pxjlgl/index.js
new file mode 100644
index 000000000..8b3a6b164
--- /dev/null
+++ b/src/views/sz/pxjlgl/index.js
@@ -0,0 +1,156 @@
+import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
+import { useSelector } from 'react-redux';
+import BasicCrudModal from '../../../components/crud/BasicCrudModal';
+import { Table, Card,Modal,Image,Input,Button,Row,Col,message } from 'antd';
+import ToolBar from './toolbar';
+import ChartToolBar from './chartToolbar';
+import ModalForm from './form';
+import apiurl from '../../../service/apiurl';
+import options from "./options";
+import ReactEcharts from 'echarts-for-react';
+import usePageTable from '../../../components/crud/usePageTable2';
+import { createCrudService } from '../../../components/crud/_';
+import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
+import "./index.less"
+
+const Page = () => {
+ const role = useSelector(state => state.auth.role);
+ const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
+ const viewBtn = role?.rule?.find(item => item.menuName == "查看") || true;
+ const delBtn = role?.rule?.find(item => item.menuName == "删除") || true;
+ const refModal = useRef();
+ const [searchVal, setSearchVal] = useState(false)
+ const [searchChartVal, setSearchChartVal] = useState(false)
+ const columns = [
+ { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
+ { title: '培训日期', key: 'teamName', dataIndex: 'teamName', width: 200, ellipsis: true },
+ {
+ title: '标题', key: 'personCount', dataIndex: 'personCount', width: 200,ellipsis: true
+ },
+ { title: '主办单位', key: 'address', dataIndex: 'address', width: 150 },
+ {
+ title: '培训内容', key: 'managementUnit', dataIndex: 'managementUnit', width: 200,ellipsis: true
+ },
+ { title: '参训人员', key: 'teamName', dataIndex: 'teamName', width: 200, ellipsis: true },
+ { title: '培训地点', key: 'teamLeader', dataIndex: 'teamLeader', width: 150, ellipsis: true },
+ { title: '填报人', key: 'phone', dataIndex: 'phone', width: 150, ellipsis: true },
+ { title: '登记日期', key: 'teamLeader', dataIndex: 'teamLeader', width: 150, ellipsis: true },
+
+ {
+ title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
+ render: (value, row, index) => (
+
() => command(cmd)(row)} />)
+ },
+ ];
+ const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
+
+ const pxOptions = useMemo(() => {
+ return options()
+ }, [])
+ const command = (type) => (params) => {
+ if (type === 'save') {
+ refModal.current.showSave();
+ } else if (type === 'edit') {
+ refModal.current.showEdit({ ...params });
+ } else if (type === 'view') {
+ refModal.current.showView(params);
+ } else if (type === 'del') {
+ refModal.current.onDeleteGet(apiurl.fxzb.qsdw.zq.delete + `/${params.teamId}`);
+ }
+ }
+
+
+ const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.fxzb.qsdw.zq.page).find_noCode);
+
+ /**
+ * @description 处理成功的回调
+ */
+ const successCallback = () => {
+ refresh()
+}
+
+
+
+ useEffect(()=>{
+ const params = {
+ search: {
+ ...searchVal,
+ }
+ };
+ search(params)
+ }, [searchVal])
+
+
+ return (
+ <>
+
+
+
+
+
+

+
+ 本年培训期数
+ 计划/实际
+ 26 期/
+ 26 期
+
+
+
+
+

+
+ 本年培训期数
+ 计划/实际
+ 26 人次/
+ 26 人次
+
+
+
+
+
+
+
+
+
+
+
+
{refresh({addvcd:localStorage.getItem('ADCD6')})}}
+ />
+
+
+ >
+ );
+}
+
+export default Page;
diff --git a/src/views/sz/pxjlgl/index.less b/src/views/sz/pxjlgl/index.less
new file mode 100644
index 000000000..1131755a9
--- /dev/null
+++ b/src/views/sz/pxjlgl/index.less
@@ -0,0 +1,59 @@
+.basic-info{
+ position: relative;
+ font-size: 16px;
+ margin-bottom: 20px;
+ padding:5px 25px;
+ border-bottom: 1px solid #eee;
+ &::before{
+ position: absolute;
+ top:8px;
+ left:0;
+ content: "";
+ display: block;
+ width: 5px;
+ height: 20px;
+ background-color: #0079fe;
+ }
+}
+
+.pxrecord-title-left{
+ width: 300px;
+ .first-item,.second-item{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ column-gap: 10px;
+ width: 300px;
+ height: 16vh;
+ padding: 20px;
+ img{
+ width: 80px;
+ height: 60px;
+ }
+ .children-itm{
+ display: flex;
+ flex-direction: column;
+
+ }
+ }
+ .first-item{
+ background: #e4f4f8;
+ margin-bottom: 10px;
+ }
+ .second-item{
+ background: #e9f4ff;
+ }
+}
+
+.pxrecord-title-right{
+ display: flex;
+ flex:1;
+ background-color: #f4f8ff;
+ flex-direction: column;
+ .chart-tool{
+ margin-left: auto;
+ }
+ .chart-box{
+ height: calc(320px - 46px);
+ }
+}
\ No newline at end of file
diff --git a/src/views/sz/pxjlgl/options.js b/src/views/sz/pxjlgl/options.js
new file mode 100644
index 000000000..a4b226671
--- /dev/null
+++ b/src/views/sz/pxjlgl/options.js
@@ -0,0 +1,117 @@
+export default function options() {
+ var dataGDP = [900, 500, 1632.33, 1100, 400]
+ var dataGrowth = [2, 2.1, 3, 2.5, 2.1]
+ var xAxisData = ['2019年', '2020年', '2021年', '2022年', '2023年']
+ return {
+ animation: true,
+ tooltip: {
+ trigger: 'axis',
+ },
+ grid: {
+ top: '15%',
+ bottom: '15%',
+ right: '8%',
+ left: '7%',
+ },
+ legend: {
+ show: true,
+ left: "10%",
+ top: "-1%",
+ itemWidth: 11,
+ itemHeight: 10,
+ },
+ xAxis: {
+ data:xAxisData,
+ axisLine: {
+ show: true // 隐藏X轴轴线
+ },
+ axisTick: {
+ show: true // 隐藏X轴轴线
+ },
+
+ axisLabel: {
+ show: true,
+ margin: 14,
+
+ }
+ },
+ yAxis: [
+ {
+ type: 'value',
+ offset: 10,
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ show: false,
+
+ },
+ axisLabel: {
+ show: true,
+ margin: 0,
+ fontSize: 18,
+ }
+ },
+ {
+ type: 'value',
+ name: '(%)',
+ offset: 10,
+ nameTextStyle: {
+ color: 'rgba(255,255,255,0.5)',
+ fontSize: '12px'
+ },
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ fontSize: 18,
+ formatter: '{value}%'
+ }
+
+ }
+ ],
+ series: [
+ {
+ name: '计划期数',
+ type: 'bar',
+ barWidth: 25,
+ data: dataGDP,
+ itemStyle:{
+ color:"#6295fa"
+ }
+ },
+ {
+ name: '实际期数',
+ type: 'bar',
+ barWidth: 25,
+ data: dataGDP,
+ itemStyle:{
+ color:"#62daab"
+ }
+ },
+ {
+ name: '完成率',
+ type: 'line',
+ yAxisIndex: 1,
+ showSymbol:false,
+ smooth: false, // 平滑曲线显示
+ lineStyle: {
+ width: 2,
+ color: '#5d7092'
+ },
+ itemStyle: {
+ color: '#5d7092',
+ shadowColor: '#5d7092',
+ shadowBlur: 10,
+ borderColor: '#5d7092',
+ borderWidth: 2
+ },
+ data: dataGrowth,
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/views/sz/pxjlgl/toolbar.js b/src/views/sz/pxjlgl/toolbar.js
new file mode 100644
index 000000000..527e78831
--- /dev/null
+++ b/src/views/sz/pxjlgl/toolbar.js
@@ -0,0 +1,91 @@
+import React, { useEffect,useState } from 'react';
+import { Form, Upload, Button,Row, Col, Input, DatePicker, message,Modal } from 'antd';
+import {RightOutlined,LeftOutlined,FileExcelOutlined,DeleteOutlined} from '@ant-design/icons';
+import { createCrudService } from '../../../components/crud/_';
+import apiurl from '../../../service/apiurl';
+import { httppost5 } from '../../../utils/request';
+import { exportFile } from '../../../utils/tools';
+import moment from 'moment';
+import NormalSelect from '../../../components/Form/NormalSelect';
+const { Dragger } = Upload;
+const { RangePicker } = DatePicker;
+const ToolBar = ({ setSearchVal, onSave, storeData, role = [],callback,exportFile }) => {
+ const [form] = Form.useForm();
+ const addBtn = role?.rule?.find(item => item.menuName == "新增")|| true;
+ const searchBtn = role?.rule?.find(item => item.menuName == "查询") || true;
+ const types = [
+ {
+ label: "水利",
+ value:1
+ },
+ {
+ label: "岗前培训",
+ value:2
+ },{
+ label: "在岗培训",
+ value:3
+ },{
+ label: "政治学习教育",
+ value:4
+ },{
+ label: "其他",
+ value:5
+ },
+ ]
+ const onFinish = (values) => {
+ let dateSo;
+ if (values.tm) {
+ dateSo = {
+ start: moment(values.tm[0]).format('YYYY'),
+ end: moment(values.tm[1]).format('YYYY')
+ }
+ }
+ delete values.tm
+ setSearchVal({...values, dateSo});
+ }
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {searchBtn ?
+
+ : null }
+
+
+
+
+ {
+ (onSave && addBtn) ?
+
+
+
+ :null
+ }
+
+
+
+
+ >
+ );
+}
+
+export default ToolBar;
\ No newline at end of file
diff --git a/src/views/sz/zrrgl/form.js b/src/views/sz/zrrgl/form.js
new file mode 100644
index 000000000..538fd2903
--- /dev/null
+++ b/src/views/sz/zrrgl/form.js
@@ -0,0 +1,122 @@
+import React, { useEffect, useState } from 'react';
+import { Form, Button, Input, Row, Col, DatePicker, Modal,Image } from 'antd';
+import { formItemLayout, btnItemLayout } from '../../../components/crud/FormLayoutProps';
+import apiurl from '../../../service/apiurl';
+import NormalSelect from '../../../components/Form/NormalSelect';
+import moment from 'moment';
+const ModalForm = ({ mode, record, onEdit, onSave }) => {
+
+ const [form] = Form.useForm();
+ const types = [
+ {
+ label: "行政责任人",
+ value: 1
+ },
+ {
+ label: "主管部门责任人",
+ value: 2
+ }, {
+ label: "管理单位责任人",
+ value: 3
+ }, {
+ label: "巡查责任人",
+ value: 4
+ }, {
+ label: "技术责任人",
+ value: 5
+ },
+ ]
+ const onFinish = (values) => {
+
+ if (mode === 'edit') {
+ values.id = record.id
+ onEdit(apiurl.fxzb.sxfd.fxtj.edit, values)
+ }
+ if (mode === 'save') {
+ onSave(apiurl.fxzb.sxfd.fxtj.save, values)
+ }
+ }
+
+
+ return (
+ <>
+
+
+
+ >
+ )
+ }
+
+ >
+ );
+}
+
+export default ModalForm;
diff --git a/src/views/sz/zrrgl/index.js b/src/views/sz/zrrgl/index.js
new file mode 100644
index 000000000..56463f65b
--- /dev/null
+++ b/src/views/sz/zrrgl/index.js
@@ -0,0 +1,95 @@
+import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
+import BasicCrudModal from '../../../components/crud/BasicCrudModal';
+import { Table, Card } from 'antd';
+import ToolBar from './toolbar';
+import ModalForm from './form';
+import apiurl from '../../../service/apiurl';
+import usePageTable from '../../../components/crud/usePageTable2';
+import { createCrudService } from '../../../components/crud/_';
+import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
+import moment from 'moment';
+
+const Page = () => {
+
+ const types = {
+ 1:"行政责任人",
+ 2:"主管部门责任人",
+ 3:"管理单位责任人",
+ 4:"巡查责任人",
+ 5:"技术责任人",
+ }
+ const refModal = useRef();
+ const [searchVal, setSearchVal] = useState({})
+
+ const columns = [
+ { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
+ {
+ title: '责任类型', key: 'title', dataIndex: 'title', width: 200,
+ render: (value) => {types[value]}
+ },
+ { title: '姓名', key: 'period', dataIndex: 'period', width: 140 },
+ { title: '单位', key: 'org', dataIndex: 'org', width: 200},
+ { title: '职务', key: 'tmPred', dataIndex: 'tmPred', width: 150, },
+ { title: '联系方式', key: 'tmRecv', dataIndex: 'tmRecv', width: 150, },
+ { title: '主要职责', key: 'tmRecv', dataIndex: 'tmRecv', width: 250,ellipsis: true},
+ {
+ title: '操作', key: 'operation', width: 150, fixed: 'right',align: 'center',
+ render: (value, row, index) => ( () => command(cmd)(row)} />)
+ },
+ ];
+
+ const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
+
+ const command = (type) => (params) => {
+ if (type === 'save') {
+ refModal.current.showSave();
+ } else if (type === 'edit') {
+ refModal.current.showEdit(params);
+ } else if (type === 'view') {
+ refModal.current.showView(params);
+ } else if (type === 'del') {
+ refModal.current.onDeleteGet(apiurl.fxzb.sxfd.fxtj.del + params.id);
+ }
+ }
+
+ const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.hsyb.skhs.page).find_noCode);
+
+ useEffect(() => {
+ if (searchVal) {
+ const params = {
+ search: {
+ title: searchVal.title || undefined,
+ dateTimeRangeSo: searchVal.dateTimeRangeSo || undefined,
+ tp:2
+ }
+ };
+ console.log(searchVal);
+ search(params)
+ }
+ }, [searchVal])
+
+ return (
+ <>
+
+
+
+
{ refresh({ addvcd: localStorage.getItem('ADCD6') }) }}
+ />
+
+ >
+ );
+}
+
+export default Page;
diff --git a/src/views/sz/zrrgl/toolbar.js b/src/views/sz/zrrgl/toolbar.js
new file mode 100644
index 000000000..974f02bba
--- /dev/null
+++ b/src/views/sz/zrrgl/toolbar.js
@@ -0,0 +1,81 @@
+import React, { useEffect, useState } from 'react';
+import { Form, Input, Button, DatePicker } from 'antd';
+import { SearchOutlined, UndoOutlined, PlusOutlined } from '@ant-design/icons';
+import moment from 'moment';
+import NormalSelect from '../../../components/Form/NormalSelect';
+
+
+const ToolBar = ({ setSearchVal, onSave }) => {
+ const [form] = Form.useForm();
+ const types = [
+ {
+ label: "行政责任人",
+ value: 1
+ },
+ {
+ label: "主管部门责任人",
+ value: 2
+ }, {
+ label: "管理单位责任人",
+ value: 3
+ }, {
+ label: "巡查责任人",
+ value: 4
+ }, {
+ label: "技术责任人",
+ value: 5
+ },
+ ]
+
+ const onFinish = (val) => {
+ if (val.dateTimeRangeSo) {
+ val.dateTimeRangeSo = {
+ start: moment(val.dateTimeRangeSo[0]).format("YYYY-MM-DD HH:mm:ss"),
+ end:moment(val.dateTimeRangeSo[1]).format("YYYY-MM-DD HH:mm:ss")
+ }
+ }
+ setSearchVal(val);
+ }
+
+
+ const onReset = () => {
+ form.resetFields();
+ };
+
+
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ } htmlType="submit">查询
+
+
+ }>
+ 重置
+
+
+ {
+ onSave && (
+
+
+
+ )
+ }
+
+
+ >
+ );
+}
+
+export default ToolBar;
\ No newline at end of file