近1h雨量(mm)
diff --git a/src/views/sq/qth/hdsq/index.js b/src/views/sq/qth/hdsq/index.js
new file mode 100644
index 000000000..34d4e0623
--- /dev/null
+++ b/src/views/sq/qth/hdsq/index.js
@@ -0,0 +1,71 @@
+import React, { useEffect, useState } from 'react'
+import { zqrl, list} from "../../../../service/sssq";
+import Sssw from './sssw';
+import Sjcx from '../../../Home/MapCtrl/components/Sqjcsj/index'
+import "./index.less"
+import { Table } from 'antd';
+export default function Sksq() {
+
+ const columns = [
+ {title: '水位(m)', key: 'z', dataIndex: 'z', align: 'center'},
+ {title: '流量(m³/s)', key: 'q', dataIndex: 'q', align: 'center'},
+ ]
+ const [tableData, setTableData] = useState([])
+ const [swtableData, setSwTableData] = useState([])
+ const getData = async (params) => {
+ let res = await list(params)
+ setTableData(res);
+ getSwTableData(res[0]?.stcd)
+ }
+
+ const getSwTableData = async (stcd) => {
+ setSwTableData(await zqrl(stcd));
+ };
+ useEffect(() => {
+ getData({args: "",sources: ["SH", "SW"],})
+ }, [])
+ return (
+
+
+
+
+
+

+
实时水位
+
+
站点:{tableData[0]?.stnm}
+
+
+
+
+
+
+

+
水位流量关系表
+
+
+
+
+
+
+
+

+
数据查询
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/views/sq/qth/hdsq/index.less b/src/views/sq/qth/hdsq/index.less
new file mode 100644
index 000000000..e1f623d93
--- /dev/null
+++ b/src/views/sq/qth/hdsq/index.less
@@ -0,0 +1,108 @@
+.content-sk{
+ display: flex;
+ column-gap: 10px;
+ height: calc(100vh - 90px);
+ .comomn-title{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20px 10px;
+ }
+ .content-left{
+ width: 550px;
+ height: 100%;
+ background-color: #fff;
+ .ssjc{
+ .root {
+ display: flex;
+ color: #333;
+ padding: 1rem 1rem 1rem 1rem;
+ }
+
+ .realinfo {
+ width: 100%;
+ margin-right: 1rem
+ }
+
+ .dataTm {
+ padding: 0.4rem 1rem;
+ border-radius: 0.4rem;
+ margin-bottom: 0.5rem;
+ font-size: 0.8rem;
+ }
+
+ .online, .offline{
+ color:#fff;
+ line-height:22px;
+ font-size:14px;
+ letter-spacing: 1px;
+ }
+
+ .online {
+ border: 1px solid #9ccc65;
+ background-color: #33691e;
+ }
+ .report-time,.rain-report{
+ display: flex;
+ width: 70%;
+ align-items: center;
+ color: #689fff;
+ font-size: 15px;
+ font-weight: 500;
+ line-height: 1.5;
+ column-gap: 5px;
+ margin-bottom: 10px;
+ justify-content: center;
+ padding: 7px 0;
+ background-color: #ecf5ff;
+ border: 1px solid #cde5ff;
+ border-radius: 5px;
+ margin-left: 10%;
+ }
+
+ .offline {
+ border: 1px solid #ef5350;
+ background-color: #b71c1c;
+ }
+
+ .infoItem {
+ border-bottom: 1px dashed #aaa;
+ display: flex;
+ font-size: 14px;
+ line-height: 1.8;
+ margin-bottom: 0.5rem;
+
+ & > .row-key{
+ width: 9rem;
+ line-height:30px;
+ }
+
+ & > .row-value{
+ width: 50%;
+ text-align: right;
+ font-weight: bold;
+ margin-right: 0.5rem;
+ flex-grow: 1;
+ }
+
+ & > .row-unit{
+ width: 3rem;
+ flex-shrink: 0;
+ }
+ }
+
+
+ }
+ }
+ .content-right{
+ flex: 1;
+ height: 100%;
+ background-color: #fff;
+ .sjcx-content{
+ padding: 10px;
+ }
+ }
+ .pic-container{
+ padding: 10px;
+ }
+}
\ No newline at end of file
diff --git a/src/views/sq/qth/hdsq/sssw.js b/src/views/sq/qth/hdsq/sssw.js
new file mode 100644
index 000000000..69b3a30ae
--- /dev/null
+++ b/src/views/sq/qth/hdsq/sssw.js
@@ -0,0 +1,37 @@
+import React from 'react'
+import {Divider} from "antd"
+export default function Sssw({data}) {
+ return (
+
+
+
+
水位上报时间: {data?.tm}
+
+
+
监测水位:
+
{data?.z ? data?.z.toFixed(2):'-'}
+
m
+
+
+
+
警戒水位:
+
{data?.wrz ? data?.wrz.toFixed(2) : '-'}
+
+
{(data.wrz && data?.z) ? (data.wrz - data?.z).toFixed(2):'-'}
+
m
+
+
+
+
危险水位:
+
{data.grz ? data.grz.toFixed(2) : '-'}
+
+
{(data.grz && data?.z) ? (data.grz - data?.z).toFixed(2):'-'}
+
m
+
+
+
+
+ )
+}
diff --git a/src/views/sq/qth/sksq/index.js b/src/views/sq/qth/sksq/index.js
new file mode 100644
index 000000000..68d6969b2
--- /dev/null
+++ b/src/views/sq/qth/sksq/index.js
@@ -0,0 +1,49 @@
+import React, { useEffect, useState } from 'react'
+import { reservoirlist, } from "../../../../service/sssq";
+import Sssw from './sssw';
+import Sjcx from '../../../Home/MapCtrl/components/Sksjcx/index'
+import "./index.less"
+import { helpers } from '@turf/turf';
+export default function Sksq() {
+ const [tableData, setTableData] = useState([])
+ const getData = async (params) => {
+ setTableData(await reservoirlist(params));
+ }
+ useEffect(() => {
+ let option = {
+ sources: ["SW", "SK"],
+ args: "",
+ };
+ getData(option)
+ }, [])
+ return (
+
+
+
+
+
+

+
实时水位
+
+
站点:{tableData[0]?.stnm}
+
+
+
+
+
+
+
+
+

+
数据查询
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/views/sq/qth/sksq/index.less b/src/views/sq/qth/sksq/index.less
new file mode 100644
index 000000000..e1f623d93
--- /dev/null
+++ b/src/views/sq/qth/sksq/index.less
@@ -0,0 +1,108 @@
+.content-sk{
+ display: flex;
+ column-gap: 10px;
+ height: calc(100vh - 90px);
+ .comomn-title{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20px 10px;
+ }
+ .content-left{
+ width: 550px;
+ height: 100%;
+ background-color: #fff;
+ .ssjc{
+ .root {
+ display: flex;
+ color: #333;
+ padding: 1rem 1rem 1rem 1rem;
+ }
+
+ .realinfo {
+ width: 100%;
+ margin-right: 1rem
+ }
+
+ .dataTm {
+ padding: 0.4rem 1rem;
+ border-radius: 0.4rem;
+ margin-bottom: 0.5rem;
+ font-size: 0.8rem;
+ }
+
+ .online, .offline{
+ color:#fff;
+ line-height:22px;
+ font-size:14px;
+ letter-spacing: 1px;
+ }
+
+ .online {
+ border: 1px solid #9ccc65;
+ background-color: #33691e;
+ }
+ .report-time,.rain-report{
+ display: flex;
+ width: 70%;
+ align-items: center;
+ color: #689fff;
+ font-size: 15px;
+ font-weight: 500;
+ line-height: 1.5;
+ column-gap: 5px;
+ margin-bottom: 10px;
+ justify-content: center;
+ padding: 7px 0;
+ background-color: #ecf5ff;
+ border: 1px solid #cde5ff;
+ border-radius: 5px;
+ margin-left: 10%;
+ }
+
+ .offline {
+ border: 1px solid #ef5350;
+ background-color: #b71c1c;
+ }
+
+ .infoItem {
+ border-bottom: 1px dashed #aaa;
+ display: flex;
+ font-size: 14px;
+ line-height: 1.8;
+ margin-bottom: 0.5rem;
+
+ & > .row-key{
+ width: 9rem;
+ line-height:30px;
+ }
+
+ & > .row-value{
+ width: 50%;
+ text-align: right;
+ font-weight: bold;
+ margin-right: 0.5rem;
+ flex-grow: 1;
+ }
+
+ & > .row-unit{
+ width: 3rem;
+ flex-shrink: 0;
+ }
+ }
+
+
+ }
+ }
+ .content-right{
+ flex: 1;
+ height: 100%;
+ background-color: #fff;
+ .sjcx-content{
+ padding: 10px;
+ }
+ }
+ .pic-container{
+ padding: 10px;
+ }
+}
\ No newline at end of file
diff --git a/src/views/sq/qth/sksq/sssw.js b/src/views/sq/qth/sksq/sssw.js
new file mode 100644
index 000000000..b45a46ae9
--- /dev/null
+++ b/src/views/sq/qth/sksq/sssw.js
@@ -0,0 +1,66 @@
+import React from 'react'
+import moment from 'moment'
+import MyImg from '../../../Home/MapCtrl/components/Skssjc/myImg'
+export default function Sssw({data}) {
+ return (
+
+
+
+
水位上报时间: {data?.tm}
+
+
+
监测水位:
+
{data?.rz ? data?.rz.toFixed(2):'-'}
+
m
+
+
+
+
设计洪水位:
+
{data?.desFloodLev ? data?.desFloodLev.toFixed(2):'-'}
+
m
+
+
+
+
正常蓄水位:
+
{data.normWatLev ? data.normWatLev.toFixed(2):'-'}
+
m
+
+
+
+
汛限水位:
+
{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}
+
m
+
+
+
+
死水位:
+
{data.deadLev ? data.deadLev.toFixed(2):'-'}
+
m
+
+
+
坝顶高程:
+
{data.crestElev}
+
{ data.crestElev ? "m" : "-"}
+
+
+
+
水库当前库容:
+
{data.nowCap}
+
万m³
+
+
+
+
兴利库容:
+
{data.benResCap}
+
万m³
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/views/sq/qth/ssyq/index.js b/src/views/sq/qth/ssyq/index.js
new file mode 100644
index 000000000..c4e5a87d9
--- /dev/null
+++ b/src/views/sq/qth/ssyq/index.js
@@ -0,0 +1,93 @@
+import React, { useEffect, useState } from 'react'
+import { reservoirlist, } from "../../../../service/sssq";
+import { message } from 'antd';
+import Sssw from './sssw';
+import Sjcx from '../../../Home/MapCtrl/components/Jcsj/index'
+import "./index.less"
+import { httppost2 } from '../../../../utils/request';
+import apiurl from '../../../../service/apiurl';
+import { helpers } from '@turf/turf';
+import NormalSelect from '../../../../components/Form/NormalSelect';
+export default function Sksq() {
+ const [tableData1, setTableData1] = useState([])
+ const getData1 = async () => {
+ const { data, code, msg } = await httppost2(apiurl.home.yq)
+ if (code !== 200) {
+ message.error(msg || '请求失败');
+ }
+ const list = data.map((i)=>{
+ return {
+ id : i.stcd,
+ ...i,
+ drp : i.drp ,//i.v,
+ }
+ })
+ setTableData1(list||[])
+
+ }
+ const [selectList, setSelectList] = useState([])
+ const [selected, setSelected] = useState('')
+ const [stcdItem, setStcdItem] = useState({})
+ const getList = async() => {
+ try {
+ const res = await httppost2(apiurl.sssq.selectList)
+ setSelectList(res.data.map(item => ({ label: item.stnm, value: item.stcd,...item})))
+ setSelected(res.data[0].stcd)
+ setStcdItem(res.data[0])
+ } catch (error) {
+ console.log(error);
+ }
+ }
+
+ const handleChange = (e) =>{
+ setSelected(e);
+ setStcdItem(selectList.find(item => item.stcd === e))
+ }
+
+ useEffect(() => {
+ getList()
+ }, [])
+
+ useEffect(() => {
+ getData1()
+ }, [])
+ return (
+
+
+
+
+
+

+
实时雨情
+
+
+ 站点:
+ { handleChange(e)}}
+ />
+
+
+
+
+
+
+
+
+
+

+
数据查询
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/views/sq/qth/ssyq/index.less b/src/views/sq/qth/ssyq/index.less
new file mode 100644
index 000000000..9159b4b8b
--- /dev/null
+++ b/src/views/sq/qth/ssyq/index.less
@@ -0,0 +1,82 @@
+.content-sk{
+ display: flex;
+ column-gap: 10px;
+ height: calc(100vh - 90px);
+ .comomn-title{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20px 10px;
+ }
+ .content-left{
+ width: 550px;
+ height: 100%;
+ background-color: #fff;
+ .ssjc{
+ .root {
+ display: flex;
+ color: #333;
+ padding: 1rem 1rem 1rem 1rem;
+ .drp-content{
+ display: flex;
+ justify-content: center;
+ flex-wrap: wrap;
+ column-gap: 40px;
+ margin-top: 40px;
+ }
+ .drp-item{
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-around;
+ width: 220px;
+ height: 160px;
+ background-color: #eaf4fe;
+ margin-bottom: 40px;
+ .value{
+ font-size: 20px;
+ font-weight: bold;
+ }
+ .name{
+ font-size: 16px;
+ color: #40a9ff;
+ }
+ }
+ }
+
+
+ .report-time,.rain-report{
+ display: flex;
+ width: 70%;
+ align-items: center;
+ color: #689fff;
+ font-size: 15px;
+ font-weight: 500;
+ line-height: 1.5;
+ column-gap: 5px;
+ margin-bottom: 10px;
+ justify-content: center;
+ padding: 7px 0;
+ background-color: #ecf5ff;
+ border: 1px solid #cde5ff;
+ border-radius: 5px;
+ margin-left: 10%;
+ }
+
+
+
+
+ }
+ }
+ .content-right{
+ flex: 1;
+ height: 100%;
+ background-color: #fff;
+ .sjcx-content{
+ padding: 10px;
+ }
+ }
+ .pic-container{
+ padding: 10px;
+ }
+}
\ No newline at end of file
diff --git a/src/views/sq/qth/ssyq/sssw.js b/src/views/sq/qth/ssyq/sssw.js
new file mode 100644
index 000000000..152e7d5ab
--- /dev/null
+++ b/src/views/sq/qth/ssyq/sssw.js
@@ -0,0 +1,52 @@
+import React,{useState,useEffect} from 'react'
+import {queryStPptnDetails} from '../../../../service/ssyq'
+export default function Sssw({ data }) {
+ const [detail, setDetail] = useState({})
+ const getDetail = async (data) => {
+ setDetail(await queryStPptnDetails(data))
+ }
+ useEffect(() => {
+ if (data.stcd) {
+ getDetail(data.stcd)
+ }
+ }, [data])
+
+ return (
+
+
+
+
雨情最新上报时间: {detail?.tm}
+
+
+
{detail?.h1 ?? '-' } mm
+
近1小时
+
+
+
{detail?.h3 ?? '-' } mm
+
近3小时
+
+
+
{detail?.h6 ?? '-' } mm
+
近6小时
+
+
+
{detail?.h12 ?? '-' } mm
+
近12小时
+
+
+
{detail?.h24 ?? '-' } mm
+
近24小时
+
+
{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
new file mode 100644
index 000000000..910933218
--- /dev/null
+++ b/src/views/sz/pxjhgl/form.js
@@ -0,0 +1,490 @@
+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 [fileIds, setFileIds] = 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 上传图片
+ * @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)
+}
+ /**
+ * @description pdf文件预览
+ * @param {String} params 文件预览url
+ */
+ const viewPdf = (params) => {
+ setIframeSrc(params)
+ setPdfViewOPen(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)
+ }
+ 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/index.js b/src/views/sz/pxjhgl/index.js
new file mode 100644
index 000000000..054d3463f
--- /dev/null
+++ b/src/views/sz/pxjhgl/index.js
@@ -0,0 +1,215 @@
+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 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 { 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 [pxRecordOpen, setPxRecordOpen] = 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,
+ },
+ { title: '主办单位', key: 'address', dataIndex: 'address', width: 200 },
+ {
+ title: '培训内容', key: 'managementUnit', dataIndex: 'managementUnit', width: 200,ellipsis: true
+ },
+ { title: '培训地点', key: 'teamLeader', dataIndex: 'teamLeader', width: 150, ellipsis: true },
+ { title: '填报人', key: 'phone', dataIndex: 'phone', width: 150, ellipsis: true },
+
+ {
+ title: '操作', key: 'operation', width: 300, fixed: 'right',align: 'center',
+ render: (value, row, index) => (
+
() => 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();
+ } 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}`);
+ }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()
+}
+
+
+ // 导出
+ const exportExcel = () => {
+ let params = {
+ ...searchVal,
+
+ id:1
+ }
+ httppost5(apiurl.gcaqjc.gcaqfx.jrx.export, params).then(res => {
+ exportFile(`培训计划管理.xlsx`,res.data)
+ })
+ }
+ useEffect(()=>{
+ const params = {
+ search: {
+ ...searchVal,
+ }
+ };
+ search(params)
+ }, [searchVal])
+
+
+ return (
+ <>
+
+
+
+
{refresh({addvcd:localStorage.getItem('ADCD6')})}}
+ />
+
+ {/* 培训记录 */}
+ {
+ setPxOpen(false);
+ }}
+ >
+
+
+
+
+ {/* 培训记录查看 */}
+ {
+ setPxRecordOpen(false);
+ }}
+ >
+
+
+
+ setImgVisible(vis),
+ }}
+ >
+ {
+ imgList.length > 0 ? imgList.map(item => (
+
+ ))
+ : null
+ }
+
+
+
+
+ >
+ );
+}
+
+export default Page;
diff --git a/src/views/sz/pxjhgl/index.less b/src/views/sz/pxjhgl/index.less
new file mode 100644
index 000000000..274080320
--- /dev/null
+++ b/src/views/sz/pxjhgl/index.less
@@ -0,0 +1,17 @@
+.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;
+ }
+}
\ No newline at end of file
diff --git a/src/views/sz/pxjhgl/toolbar.js b/src/views/sz/pxjhgl/toolbar.js
new file mode 100644
index 000000000..5e993788f
--- /dev/null
+++ b/src/views/sz/pxjhgl/toolbar.js
@@ -0,0 +1,147 @@
+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';
+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 [exportOPen, setExportOPen] = useState(false)
+ const [fileList, setFileList] = useState([]) //上传文件列表
+ const [loading, setLoading] = useState(false)
+ 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});
+ }
+
+ 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 (
+ <>
+
+
+
+
+
+
+
+
+
+
+ {searchBtn ?
+
+ : null }
+
+
+
+
+ {
+ (onSave && addBtn) ?
+
+
+
+ :null
+ }
+
+
+
+
+
+
+
+ {/* 导入 */}
+ setExportOPen(false)}
+ footer={null}
+ >
+
+
+ { console.log(info); }}
+ fileList={fileList}
+ disabled={loading}
+ accept=".xls, .xlsx"
+ >
+ 点击或拖拽文件到此区域上传
+
+ 支持扩展名:.xls .xlsx
+
+
+
+
+
+
+
+
+ {/* */}
+
+
+
+ >
+ );
+}
+
+export default ToolBar;
\ No newline at end of file
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