diff --git a/package.json b/package.json
index 64205078a..768273f99 100644
--- a/package.json
+++ b/package.json
@@ -52,6 +52,7 @@
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
+ "react-window": "^1.8.10",
"redux": "^4.2.0",
"typescript": "^4.7.4"
},
diff --git a/public/assets/images/060.png b/public/assets/images/060.png
index 1fcda64a6..77466a8c3 100644
Binary files a/public/assets/images/060.png and b/public/assets/images/060.png differ
diff --git a/public/assets/images/090.png b/public/assets/images/090.png
index 16340de8e..f8aa37e7d 100644
Binary files a/public/assets/images/090.png and b/public/assets/images/090.png differ
diff --git a/src/service/apiurl.js b/src/service/apiurl.js
index 09d8a4795..795282c36 100644
--- a/src/service/apiurl.js
+++ b/src/service/apiurl.js
@@ -412,7 +412,8 @@ const apiurl = {
page: service_fxdd + "/rota/log/page",
save: service_fxdd + "/rota/log/insert",
edit: service_fxdd + "/rota/log/update",
- delete: service_fxdd + "/rota/log/del"
+ delete: service_fxdd + "/rota/log/del",
+ rotaUser: service_fxdd + "/rota/date/list"
}
},
gcdsj: {
diff --git a/src/utils/tools.js b/src/utils/tools.js
index f82ecc9d0..73dbde64b 100644
--- a/src/utils/tools.js
+++ b/src/utils/tools.js
@@ -9,6 +9,18 @@ const { toString } = class2type;
'Boolean Number String Function Array Date RegExp Object Error'.split(' ').forEach((name) => {
class2type[`[object ${name}]`] = name.toLowerCase();
});
+
+export const fileDownload = (url,params) => {
+ let downloadLink = document.createElement("a");
+ downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/${url}/${params?.fileId}`;
+ downloadLink.download = `${params.fileName}`;
+ downloadLink.style.display = "none";
+ // 将链接添加到页面中
+ document.body.appendChild(downloadLink);
+
+ // 模拟点击事件,开始下载
+ downloadLink.click();
+}
/**
* 对象类型
* @param {object} obj
diff --git a/src/views/Home/MapCtrl/Pops/DrpPop.js b/src/views/Home/MapCtrl/Pops/DrpPop.js
index 642374e55..37154baa5 100644
--- a/src/views/Home/MapCtrl/Pops/DrpPop.js
+++ b/src/views/Home/MapCtrl/Pops/DrpPop.js
@@ -71,7 +71,7 @@ function RealDrpTip({ id, data, dispatch }) {
border: "1px solid #74a7ff",
borderRadius: "5px"
}
- }> {{MM: '气象站',PP: '雨量站',RR: '水库水文站',ZZ: '河道水位站',ZQ:"河道水文站"}?.[data?.sttp]}({{'SH':'山洪','SW':'水文','QX':'气象','SK':'水库'}?.[data.source]})}
+ }> {{MM: '气象站',PP: '雨量站',RR: '水库水文站',ZZ: '河道水位站',ZQ:"河道水文站"}?.[data?.sttp]}}
diff --git a/src/views/fxzb/ddgc/index.less b/src/views/fxzb/ddgc/index.less
index 46e62de46..ad80c0a9c 100644
--- a/src/views/fxzb/ddgc/index.less
+++ b/src/views/fxzb/ddgc/index.less
@@ -1,7 +1,7 @@
.file-item{
display: flex;
width: 100%;
- margin-top: -10px;
+ margin-top: 10px !important;
align-items: center;
border: 1px solid #dedede;
justify-content: space-between;
diff --git a/src/views/gcaqjc/gcaqfx/jrx/index.js b/src/views/gcaqjc/gcaqfx/jrx/index.js
index 08b6f3604..c12411894 100644
--- a/src/views/gcaqjc/gcaqfx/jrx/index.js
+++ b/src/views/gcaqjc/gcaqfx/jrx/index.js
@@ -318,7 +318,6 @@ export default function Xmzlmb() {
key="inx"
dataSource={dataSources}
pagination={false}
- virtual={true}
scroll={{ x: width, y: 250, scrollToFirstRowOnChange: true }}
onRow={record => {
return {
diff --git a/src/views/gcaqjc/gcaqfx/jrx/index.less b/src/views/gcaqjc/gcaqfx/jrx/index.less
index 9d0ab3b7e..119b8ddc3 100644
--- a/src/views/gcaqjc/gcaqfx/jrx/index.less
+++ b/src/views/gcaqjc/gcaqfx/jrx/index.less
@@ -18,4 +18,4 @@
height: 20px;
background-color: #0079fe;
}
- }
\ No newline at end of file
+ }
diff --git a/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js b/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js
index 5900a5c83..58045d2ba 100644
--- a/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js
+++ b/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js
@@ -1,7 +1,9 @@
export default function jrxOptions(data = {}, type = "1") {
- const yMin = type == "1" ? 147 : type == "2" ? 146 : 146;
- const yMax = type == "1" ? 209 : type == "2" ? 210 : 210;
+ // const yMin = type == "1" ? 147 : type == "2" ? 146 : 146;
+ // const yMax = type == "1" ? 209 : type == "2" ? 210 : 210;
+ const yMin = type == "1" ? 70 : type == "2" ? 70 : 70;
+ const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
const type1 = ["SY05", "SY06", "SY07", "SY08"]
const type2 = ["SY09","SY10","SY11","SY12"]
const alltype = type == "1" ? type1 : type == "2" ? type2 : type2;
@@ -13,35 +15,48 @@ const textColor = '#666'
const imageUrl = type == "1" ? imageUrl060 :
type == "2" ? imageUrl090 : imageUrl090;
const rule = `${process.env.PUBLIC_URL}/assets/images/ruler.png `
- // const xValue = (( (data?.rz - 169 ) + 0.85 * 14) / 0.85)
- const xValue = type == "1" ? (((data?.rz - 169) + 0.75 * 14) / 0.75):
- type == "2" ?(((data?.rz - 169) + 0.85 * 14) / 0.85) :(((data?.rz - 169) + 0.85 * 14) / 0.85)
+ // const xValue = type == "1" ? (((data?.rz - 169) + 0.75 * 14) / 0.75):
+ // type == "2" ? (((data?.rz - 169) + 0.85 * 14) / 0.85) : (((data?.rz - 169) + 0.85 * 14) / 0.85)
+
+ const xValue = type == "1" ? (((data?.rz - 99) + 1.1 * 13) / 1.1):
+ type == "2" ? (((data?.rz - 99) + 1 * 14) / 1) : (((data?.rz - 99) + 1 * 14) / 1)
const rz = data?.rz ?
[[xValue, data?.rz], [0, data?.rz], ] :
[]
- const rz1 = data?.rz ?
- [[0,169],[14, 169], [xValue, data?.rz]] :
+ const rz1 = data?.rz ?
+ type == "1" ?
+ [[0, 99], [13, 99], [xValue, data?.rz]]:
+ type == "2" ?
+ [[0, 99], [14, 99], [xValue, data?.rz]]
+ : [[0, 99], [14, 99], [xValue, data?.rz]]
+ :
[]
- const gz1 = data[alltype[0]] ?
- type == "1" ? [[51.6, 158], [51.6, data[alltype[0]]]] :
- type == "2" ? [[47.5, 158], [47.5, data[alltype[0]]]] :
- [[47.5, 158], [47.5, data[alltype[0]]]]
+ const gz1 = data[alltype[0]] ?
+ type == "1" ? [[51.6, 85], [51.6, data[alltype[0]]]] :
+ type == "2" ? [[47.5, 85], [47.5, data[alltype[0]]]] :
+ [[47.5, 158], [85, data[alltype[0]]]]
: [];
+ // const gz1 = [[51.6, 85],[51.6, 91]];
+ // const gz2 = [[53.6, 85], [53.6, 94]];
+
+ // const gz3 = [[72.5, 90], [72.5, 95]];
+ // const gz4 = [[84.5, 96], [84.5, 99]];
+
const gz2 = data[alltype[1]] ?
- type == "1" ? [[53.6, 158], [53.6, data[alltype[1]]]] :
- type == "2" ? [[49.5, 158], [49.5, data[alltype[1]]]] :
+ type == "1" ? [[53.6, 85], [53.6, data[alltype[1]]]] :
+ type == "2" ? [[49.5, 85], [49.5, data[alltype[1]]]] :
[[53.6, 158], [53.6, data[alltype[1]]]] :
[];
const gz3 = data[alltype[2]] ?
- type == "1" ? [[72.5, 161], [72.5, data[alltype[2]]]] :
- type == "2" ? [[66.5, 162], [66.5, data[alltype[2]]]] :
+ type == "1" ? [[72.5, 90], [72.5, data[alltype[2]]]] :
+ type == "2" ? [[66.5, 90], [66.5, data[alltype[2]]]] :
[[73, 161], [73, data[alltype[2]]]] : [];
const gz4 = data[alltype[3]] ?
- type == "1" ? [[84.5, 166], [84.5, data[alltype[3]]]] :
- type == "2" ? [[77, 161], [77, data[alltype[3]]]] :
+ type == "1" ? [[84.5, 96], [84.5, data[alltype[3]]]] :
+ type == "2" ? [[77, 96], [77, data[alltype[3]]]] :
[[85, 166], [85, data[alltype[3]]]] : [];
const line = data?.rz ?
diff --git a/src/views/gcaqjc/gcaqfx/jrx/toolbar.js b/src/views/gcaqjc/gcaqfx/jrx/toolbar.js
index c1265fa57..b02fb9268 100644
--- a/src/views/gcaqjc/gcaqfx/jrx/toolbar.js
+++ b/src/views/gcaqjc/gcaqfx/jrx/toolbar.js
@@ -21,15 +21,15 @@ const ToolBar = ({ setSearchVal, onSave,setSwiper,exportFile,role }) => {
setSearchVal({...values, dateTimeRangeSo:dateSo});
}
- // useEffect(() => {
- // let time = [moment().subtract(1,"months"),moment()]
- // let dateSo = {
- // start:moment(time[0]).format('YYYY-MM-DD 00:00:00'),
- // end:moment(time[1]).format('YYYY-MM-DD 00:00:00'),
- // }
- // form.setFieldValue("tm",time)
- // setSearchVal({dateTimeRangeSo:dateSo})
- // }, [])
+ useEffect(() => {
+ let time = [moment().subtract(1,"days"),moment()]
+ let dateSo = {
+ start:moment(time[0]).format('YYYY-MM-DD 00:00:00'),
+ end:moment(time[1]).format('YYYY-MM-DD 23:59:59'),
+ }
+ form.setFieldValue("tm",time)
+ setSearchVal({dateTimeRangeSo:dateSo})
+ }, [])
useEffect(() => {
form.setFieldValue("swiper",false)
diff --git a/src/views/gxsl/dxnjyzl/form.js b/src/views/gxsl/dxnjyzl/form.js
index 21afbe7e2..90099437c 100644
--- a/src/views/gxsl/dxnjyzl/form.js
+++ b/src/views/gxsl/dxnjyzl/form.js
@@ -18,7 +18,7 @@ const EditableCell = ({
}) => {
const inputNode = inputType === 'select' ?
:
- ;
+ ;
return (
{editing ? (
@@ -132,7 +132,7 @@ const ModalForm = ({ mode, record, onEdit, onSave}) => {
year:form.getFieldValue("year")
});
let total = newData.reduce((total,cur) => total + Number(cur.drp),0)
- form.setFieldValue("drp",total)
+ form.setFieldValue("drp",total?.toFixed(1))
setDetails(newData);
detailsRef.current = newData
setEditingKey('');
@@ -181,7 +181,7 @@ const ModalForm = ({ mode, record, onEdit, onSave}) => {
setDetails(newData);
detailsRef.current = newData
let total = newData.reduce((total,cur) => total + Number(cur.drp),0)
- form.setFieldValue("drp",total)
+ form.setFieldValue("drp",total?.toFixed(1))
};
const types = [
@@ -222,7 +222,7 @@ const ModalForm = ({ mode, record, onEdit, onSave}) => {
useEffect(() => {
if (mode !== "save") {
let total = record.list.reduce((total, cur) => total + cur.drp, 0)
- form.setFieldsValue({ ...record, drp: total, year: record.year + '' })
+ form.setFieldsValue({ ...record, drp: total?.toFixed(1), year: record.year + '' })
setDetails(record.list)
detailsRef.current = record.list
}
diff --git a/src/views/gxsl/gstjfx/gsOption.js b/src/views/gxsl/gstjfx/gsOption.js
index c218ee209..e1212e004 100644
--- a/src/views/gxsl/gstjfx/gsOption.js
+++ b/src/views/gxsl/gstjfx/gsOption.js
@@ -125,7 +125,7 @@ export default function drpOption (data) {
],
series: [
{
- name: '生态供水',
+ name: '发电灌溉',
type: 'line',
symbol: 'none',
smooth: true,
@@ -136,7 +136,7 @@ export default function drpOption (data) {
data: data.map(o => o.ecologyV)
},
{
- name: '生活供水',
+ name: '水厂取水',
type: 'line',
smooth: true,
color: '#36e9e9',
diff --git a/src/views/rcgl/aqgl/cxjgtz/form.js b/src/views/rcgl/aqgl/cxjgtz/form.js
index cea65bf62..417bcfd3c 100644
--- a/src/views/rcgl/aqgl/cxjgtz/form.js
+++ b/src/views/rcgl/aqgl/cxjgtz/form.js
@@ -146,6 +146,11 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
@@ -153,6 +158,16 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
+
+ dateString}
+ getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
+ >
+
+
+
{
-
- dateString}
- getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
- rules={[
- {
- required: true,
- },
- ]}
- >
-
-
-
+
@@ -187,11 +188,6 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
name="operationDate"
getValueFromEvent={(e,dateString) => dateString}
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
- rules={[
- {
- required: true,
- },
- ]}
>
diff --git a/src/views/rcgl/aqgl/fxgkqd/AdcdTreeSelector/index.tsx b/src/views/rcgl/aqgl/fxgkqd/AdcdTreeSelector/index.tsx
index 1f14ce04a..b9475803f 100644
--- a/src/views/rcgl/aqgl/fxgkqd/AdcdTreeSelector/index.tsx
+++ b/src/views/rcgl/aqgl/fxgkqd/AdcdTreeSelector/index.tsx
@@ -176,7 +176,8 @@ const AdcdTreeSelector: React.FC = ({ onSelectFun, setAdcd, showCheckbox
}
const onOk = async () => {
- const name = form.getFieldValue('name');
+ const name = form.getFieldValue('name').replace(/\s/g,"");
+ if(!name) return
const url = mode == "save" ? apiurl.rcgl.aqgl.fxgkqd.saveTree : apiurl.rcgl.aqgl.fxgkqd.editTree;
let saveParams = {
name,
diff --git a/src/views/rcgl/aqgl/fxgkqd/form.js b/src/views/rcgl/aqgl/fxgkqd/form.js
index 914a52637..1f7d2099a 100644
--- a/src/views/rcgl/aqgl/fxgkqd/form.js
+++ b/src/views/rcgl/aqgl/fxgkqd/form.js
@@ -115,7 +115,6 @@ const getResultList = async() => {
const onfinish = (values) => {
- debugger
let oldFiles = fileList.map(item => ({ fileId: item.response?.data?.fileId }))
const dicId = values?.result?.map(item=> ({sysDictId:item}))
values.menuId = record.code;
diff --git a/src/views/rcgl/byfz/bypc/form.js b/src/views/rcgl/byfz/bypc/form.js
index 0d345a7c0..eac9bf83a 100644
--- a/src/views/rcgl/byfz/bypc/form.js
+++ b/src/views/rcgl/byfz/bypc/form.js
@@ -177,7 +177,6 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
setData([details,...data])
}
}
- console.log(details);
}, [details])
return (
diff --git a/src/views/rcgl/byfz/bypc/formCom.js b/src/views/rcgl/byfz/bypc/formCom.js
index ad014c5a6..d022bb14e 100644
--- a/src/views/rcgl/byfz/bypc/formCom.js
+++ b/src/views/rcgl/byfz/bypc/formCom.js
@@ -85,7 +85,7 @@ const getResultList = async() => {
return window.performance.now().toString().replace('.', '');
}
const onfinish = (values) => {
- const dicId = values.actSign.map(item=> ({sysDictId:item}))
+ const dicId = values.actSign.map(item=> ({sysDictId:item,dictNm:resultOptions.find(o => o.value == item)?.label}))
let imgFiles = imgfileList.map(item => ({
fileId: item.response?.data?.fileId,
fileName: item.response?.data?.fileName,
diff --git a/src/views/rcgl/byfz/fzxc/index.js b/src/views/rcgl/byfz/fzxc/index.js
index e999ec706..6d3bf55c6 100644
--- a/src/views/rcgl/byfz/fzxc/index.js
+++ b/src/views/rcgl/byfz/fzxc/index.js
@@ -1,13 +1,14 @@
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
-import { Upload, message,Image,Button } from 'antd';
-import {PaperClipOutlined,DownloadOutlined,DeleteOutlined } from '@ant-design/icons';
+import { Upload, message,Image,Button,Popconfirm,Modal } from 'antd';
+import {PaperClipOutlined,DownloadOutlined,DeleteOutlined,ExclamationCircleOutlined } from '@ant-design/icons';
import { useSelector } from 'react-redux';
import ToolBar from './toolbar';
import ModalForm from './form';
import apiurl from '../../../../service/apiurl';
import { httpget2,httppost2 } from '../../../../utils/request';
import "./index.less"
+const { confirm } = Modal;
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
const Page = () => {
const role = useSelector(state => state.auth.role);
@@ -93,26 +94,41 @@ const Page = () => {
const deleteFile = async (id, type) => {
const urlRequest = type == "file" ? apiurl.rcgl.byfz.fzxc.delete : apiurl.rcgl.byfz.fzxc.picDelete
- try {
- const res = await httpget2(urlRequest + `/${id}`)
- if (res.code == 200) {
- message.success('删除成功');
- if (type == "file") {
- getFileList()
+ confirm({
+ title: '删除',
+ icon: ,
+ content: '确认删除此数据',
+ okText: '确定',
+ okType: 'primary',
+ cancelText: '取消',
+ onOk: async() => {
+ try {
+ const res = await httpget2(urlRequest + `/${id}`)
+ if (res.code == 200) {
+ message.success('删除成功');
+ if (type == "file") {
+ getFileList()
+ }
+ if (type == "pic") {
+ getPicList()
+ }
+ }
+ } catch (error) {
+ console.log(error);
}
- if (type == "pic") {
- getPicList()
- }
- }
- } catch (error) {
- console.log(error);
-
- }
+ },
+ onCancel() {
+ console.log('Cancel');
+ },
+ });
+
+
}
const bytesToKB = (bytes) => {
return (bytes / 1024).toFixed(2);
}
+
useEffect(() => {
getFileList();
getPicList();
@@ -157,11 +173,11 @@ const Page = () => {
title="下载"
onClick={() => download(item.fileId)}
/>
- deleteFile(item.fileId,"file")}
- />
+ deleteFile(item.fileId,"file")}
+ />
)):null
diff --git a/src/views/rcgl/jdkh/khrwgl/PfDetail.js b/src/views/rcgl/jdkh/khrwgl/PfDetail.js
index 41b108fc2..4469d9310 100644
--- a/src/views/rcgl/jdkh/khrwgl/PfDetail.js
+++ b/src/views/rcgl/jdkh/khrwgl/PfDetail.js
@@ -417,7 +417,9 @@ const EditableRow = ({ index, ...props }) => {
getZbTableData(Item?.id,2)
}
} else {
- const newData = tableData.filter(item => item.standardScore > item.assessScore)
+ // debugger
+ const newData = tabs == 2 ? tableData.filter(item => item.standardScore > item.indicatorScore) :
+ tableData.filter(item => item.standardScore > item.assessScore)
newData.forEach(item => {
if (item.rowSpan) delete item.rowSpan;
})
diff --git a/src/views/rcgl/jdkh/khrwgl/transfer.js b/src/views/rcgl/jdkh/khrwgl/transfer.js
index 21e87bb18..cf649c926 100644
--- a/src/views/rcgl/jdkh/khrwgl/transfer.js
+++ b/src/views/rcgl/jdkh/khrwgl/transfer.js
@@ -160,7 +160,6 @@ export default function PersonForm({treeList,deptList,callback,onCancel,selectPe
setTargetKeys(keys);
};
useEffect(() => {
- debugger
setTargetKeys(selectPerson)
}, [selectPerson])
diff --git a/src/views/rcgl/jdkh/khzbgl/AdcdTreeSelector/index.tsx b/src/views/rcgl/jdkh/khzbgl/AdcdTreeSelector/index.tsx
index 91db80ed1..fab5b67a3 100644
--- a/src/views/rcgl/jdkh/khzbgl/AdcdTreeSelector/index.tsx
+++ b/src/views/rcgl/jdkh/khzbgl/AdcdTreeSelector/index.tsx
@@ -176,7 +176,8 @@ const AdcdTreeSelector: React.FC = ({ onSelectFun, setAdcd, showCheckbox
}
const onOk = async () => {
- const name = form.getFieldValue('name');
+ const name = form.getFieldValue('name').replace(/\s/g,"");
+ if(!name) return
const url = mode == "save" ? apiurl.rcgl.jdkh.khzbgl.saveTree : apiurl.rcgl.jdkh.khzbgl.editTree;
let saveParams = {
name,
diff --git a/src/views/rcgl/jdkh/khzbgl/form.js b/src/views/rcgl/jdkh/khzbgl/form.js
index 8bd69afaa..d041227f3 100644
--- a/src/views/rcgl/jdkh/khzbgl/form.js
+++ b/src/views/rcgl/jdkh/khzbgl/form.js
@@ -216,7 +216,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
useEffect(() => {
if (mode !== "save") {
- let total = record.indicatorRatings.reduce((total, cur) => total + cur.standardScore, 0)
+ let total = record?.indicatorRatings?.reduce((total, cur) => total + cur.standardScore, 0)
setStandardScore(total)
setDetails(record.indicatorRatings)
detailsRef.current = record.indicatorRatings
diff --git a/src/views/sz/pxjhgl/index.js b/src/views/sz/pxjhgl/index.js
index 63089013c..807baaba0 100644
--- a/src/views/sz/pxjhgl/index.js
+++ b/src/views/sz/pxjhgl/index.js
@@ -11,7 +11,7 @@ import { createCrudService } from '../../../components/crud/_';
import { CrudOpRender_text } from '../../../components/crud/CrudOpRender';
import { exportFile } from '../../../utils/tools.js';
import { httppost5,httpget2 } from '../../../utils/request';
-
+import {fileDownload} from "../../../utils/tools"
const Page = () => {
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
const role = useSelector(state => state.auth.role);
@@ -83,9 +83,15 @@ const Page = () => {
const reviewPic = (arrPic) => {
+ const url = "tsg/personnelPlan/file/download";
if (arrPic.length > 0) {
- setImgVisible(true)
- setImgList(arrPic)
+ const filename = arrPic[0]?.fileName
+ if (filename.indexOf('.jpg') > -1 || filename.indexOf('.png')> -1 || filename.indexOf('.jpeg') > -1) {
+ setImgVisible(true)
+ setImgList(arrPic)
+ } else {
+ fileDownload(url,arrPic[0])
+ }
}
}
const command = (type) => (params) => {
diff --git a/src/views/zbgl/zbrz/form.js b/src/views/zbgl/zbrz/form.js
index e2f89fd1d..0f652de69 100644
--- a/src/views/zbgl/zbrz/form.js
+++ b/src/views/zbgl/zbrz/form.js
@@ -91,6 +91,22 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
onSave(apiurl.rcgl.zbgl.zbrz.save,values)
}
}
+
+ // 根据年月日查询人员
+ const getRotaUser = async (date) => {
+ try {
+ const result = await httpget2(apiurl.rcgl.zbgl.zbrz.rotaUser, {rotaDate: moment(date).format('YYYY-MM-DD')});
+ if (result.code == 200 && mode == "save") {
+ const dept = result.data.find(item => item.rotaType == 2).userId;
+ const lead = result.data.find(item => item.rotaType == 1).userId;
+ form.setFieldValue("dutyUserId",dept)
+ form.setFieldValue("leaderUserId",lead)
+ }
+
+ } catch (error) {
+ console.log(error);
+ }
+ }
useEffect(() => {
getDeptList()
// getDeptUser()
@@ -115,7 +131,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
value: value ? moment(value) : undefined
})}
>
-
+ getRotaUser(e)} />
|