From b731548e050c727c4e05db660dfb64eabc94dbdd Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Fri, 13 Sep 2024 16:35:46 +0800
Subject: [PATCH] fix: bug修改
---
gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx | 69 +++++++++--------------
gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx | 3 +
gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx | 61 +++++++++++--------
gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx | 3 +
gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx | 3 +
5 files changed, 71 insertions(+), 68 deletions(-)
diff --git a/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx b/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx
index 7f92877..ac564e7 100644
--- a/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx
+++ b/gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx
@@ -12,9 +12,15 @@
import { CloseOutlined } from '@ant-design/icons';
import './index.less';
import * as $$ from '../../utils/utility';
-import { Modal } from '@arco-design/web-react';
+import { Modal, Spin } from '@arco-design/web-react';
const { Search } = Input;
+
+const txtMap = {
+ dept: '部门',
+ person: '人',
+ unit: '组织'
+}
// 获取人员,组织,部门数据
function getDataApi(type, searchData) {
@@ -45,7 +51,7 @@
* onOk, // 点击确定的回调
*/
const SelectObjModal = ({ visible = false, checkKeys = [], type = 'dept', isCheckbox = false, searchData = {}, onClose, onOk, }) => {
- const nameStr = type === 'person' ? '人员' : type === 'unit' ? '组织' : '部门';
+ const nameStr = txtMap[type];
// 默认调解员查询'22_00024-4'
const searchRole = type === 'person' ? { roleCode: '22_00024-4' } : {};
const [data, setData] = useState([]);
@@ -54,14 +60,15 @@
const [searchValue, setSearchValue] = useState('');
const [autoExpandParent, setAutoExpandParent] = useState(true);
const [dataList, setDataList] = useState([]);
+ const [loading, setLoading] = useState(false);
useEffect(() => {
if (!visible) return;
// 获取数据
async function getData() {
- // global.setSpinning(true);
+ setLoading(true)
const res = await getDataApi(type, { ...searchRole, ...searchData });
- // global.setSpinning(false);
+ setLoading(false)
if (res.type) {
setData(res.data || []);
}
@@ -194,27 +201,29 @@
<Search placeholder={`查询${nameStr}名称`} onChange={(e) => handleSearch(e.target.value, dataList)} />
</div>
<div className="selectObjModal-left-main">
- {data.length > 0 ? (
- <Tree
- checkable
- checkStrictly
- defaultExpandAll
- onExpand={(newExpandedKeys) => {
- setExpandedKeys(newExpandedKeys);
- setAutoExpandParent(false);
- }}
- expandedKeys={expandedKeys}
- autoExpandParent={autoExpandParent}
- selectable={false}
- onCheck={(checkedKeys, e) => handleCheck(checkedKeys, e)}
- checkedKeys={checkedKeys.keys}
- treeData={treeData}
- fieldNames={{ title: 'label', key: 'value' }}
- height={400}
- />
- ) : (
- $$.MyEmpty()
- )}
+ <Spin loading={loading} style={{ width: '100%', height: '100%' }}>
+ {data.length > 0 ? (
+ <Tree
+ checkable
+ checkStrictly
+ defaultExpandAll
+ onExpand={(newExpandedKeys) => {
+ setExpandedKeys(newExpandedKeys);
+ setAutoExpandParent(false);
+ }}
+ expandedKeys={expandedKeys}
+ autoExpandParent={autoExpandParent}
+ selectable={false}
+ onCheck={(checkedKeys, e) => handleCheck(checkedKeys, e)}
+ checkedKeys={checkedKeys.keys}
+ treeData={treeData}
+ fieldNames={{ title: 'label', key: 'value' }}
+ height={400}
+ />
+ ) : (
+ $$.MyEmpty()
+ )}
+ </Spin>
</div>
</div>
<div className="selectObjModal-right">
@@ -228,7 +237,7 @@
</div>
</div>
<div className="selectObjModal-footer">
- <div>已选中:{checkedKeys.keys.length}人</div>
+ <div>已选中:{checkedKeys.keys.length}{txtMap[type]}</div>
<Space size="middle">
<Button onClick={onClose}>取消</Button>
<Button type="primary" onClick={() => onOk && onOk(checkedKeys)}>
diff --git a/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx b/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx
index 0812aae..5eae568 100644
--- a/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx
+++ b/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx
@@ -4,6 +4,7 @@
import ArcoUpload from '@/components/ArcoUpload';
import { Scrollbars } from "react-custom-scrollbars";
import * as $$ from '@/utils/utility';
+import { useNavigate } from 'react-router-dom';
const RadioGroup = Radio.Group;
const FormItem = Form.Item;
@@ -23,6 +24,7 @@
}
export default function BackModel(props) {
+ const navigate = useNavigate();
const formRef = useRef();
const [id, setId] = useState();
const options = [
@@ -89,6 +91,7 @@
if (res.type) {
$$.infoSuccess({ content: '提交申请成功!' });
props.onCancel()
+ navigate('/mediate/visit/visitWorkBench')
}
}
diff --git a/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx b/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx
index 6e3fc4b..b13af2a 100644
--- a/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx
+++ b/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx
@@ -5,6 +5,7 @@
import { Scrollbars } from "react-custom-scrollbars";
import { escalation } from '@/assets/images/icon';
import * as $$ from '@/utils/utility';
+import { useNavigate } from 'react-router-dom';
const FormItem = Form.Item;
const TextArea = Input.TextArea;
@@ -27,6 +28,7 @@
}
export default function BackModel(props) {
+ const navigate = useNavigate();
const formRef = useRef();
const [id, setId] = useState();
const [unitData, setUnitData] = useState({});
@@ -87,6 +89,7 @@
if (res.type) {
$$.infoSuccess({ content: '提交申请成功!' });
props.onCancel()
+ navigate('/mediate/visit/visitWorkBench')
}
}
diff --git a/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx b/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx
index 44324bc..26f9a49 100644
--- a/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx
+++ b/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx
@@ -6,6 +6,7 @@
import { Scrollbars } from "react-custom-scrollbars";
import * as $$ from '@/utils/utility';
import { getOffset, getSize } from '@/utils/utility';
+import { useNavigate } from 'react-router-dom';
const RadioGroup = Radio.Group;
const FormItem = Form.Item;
@@ -27,6 +28,7 @@
}
export default function Examine(props) {
+ const navigate = useNavigate();
const formRef = useRef();
const scrollRef = useRef(null);
const [infoData, setInfoData] = useState({});
@@ -101,6 +103,7 @@
const res = await submit(props.type, data)
if (res.type) {
$$.infoSuccess({ content: '提交成功!' });
+ navigate('/mediate/visit/visitWorkBench')
}
}
diff --git a/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx b/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
index c6b887f..dd74a80 100644
--- a/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
+++ b/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
@@ -84,7 +84,8 @@
const [caseResultId, setCaseResultId] = useState('');
const [managerName, setManagerName] = useState('')
const [progressData, setProgressData] = useState({});
- const [staticButtonList, setStaticButtonList] = useState([])
+ const [staticButtonList, setStaticButtonList] = useState([]);
+ const [scannerVisible, setScannerVisible] = useState(false);
const myButton = [
{
@@ -102,7 +103,7 @@
{
label: '结案申请',
type: 'outline',
- click: () => uniteHandle(),
+ click: () => handleCaseResultApply(),
key: 'jasq',
},
{
@@ -110,23 +111,43 @@
type: 'outline',
click: () => Supervising(),
key: 'db',
+ status: 'danger'
},
]
-
const tabs1 = [
{ index: '1', label: '公共模板:提醒尽快启动调解程序督办模板' },
{ index: '2', label: '个人模板:推动事件尽快办结督办模板' }
]
-
const options = [
{ value: '1', label: '一' }, { value: '2', label: '二' }, { value: '3', label: '三' }
];
+ const content = selectedTab1 === '1'
+ ? `鉴于本事项的重要性及紧迫性,现要求你尽快启动调解程序,并确保案件能够得到及时有效的处理。请您务必于本周内完成以下事项:XX、XX、XX。请确保在事项办理的过程中,遵循公平、公正的原则,并积极促进双方达成共识`
+ : '1';
+
+ useEffect(() => {
+ listFeedback(caseId);
+ getData(caseId)
+ getFeedbackInfo();
+ }, [])
+
+ useEffect(() => {
+ if (authorData) {
+ const { buttonList } = authorData;
+ setStaticButtonList(myButton.filter(item => {
+ const flag = buttonList.some(result => {
+ if (result.id === item.key) {
+ return true
+ }
+ })
+ return flag
+ }))
+ }
+ }, [authorData])
const handleCheckedKeys = (userId) => {
choosePrincipal(userId)
}
-
- const [scannerVisible, setScannerVisible] = useState(false);
const handleConfirm = () => {
// 处理确认逻辑
@@ -143,8 +164,6 @@
setScannerVisible(false);
};
-
-
const choosePrincipal = async (id) => {
const res = await choosePrincipalApi(caseId, id)
if (res.type) {
@@ -160,7 +179,6 @@
}
}
-
//删除文件
const handleDelFile = async (id) => {
const res = await delFile(id)
@@ -168,8 +186,6 @@
$$.infoSuccess({ content: '删除成功!' });
}
}
-
-
//新增、编辑办理理由
const saveFeedback = async (submitData) => {
@@ -278,49 +294,18 @@
setUniteHandleView(!uniteHandleView)
}
-
-
const handleTabChange1 = (newTabIndex) => {
setSelectedTab1(newTabIndex);
};
-
- const content = selectedTab1 === '1'
- ? `鉴于本事项的重要性及紧迫性,现要求你尽快启动调解程序,并确保案件能够得到及时有效的处理。请您务必于本周内完成以下事项:XX、XX、XX。请确保在事项办理的过程中,遵循公平、公正的原则,并积极促进双方达成共识`
- : '1';
const handleSupervising = () => {
setSupervising(!supervising)
}
-
const handleCaseResultApply = () => {
SetCaseResult(!caseResult)
getNewTimeId('caseResult')
}
-
-
- useEffect(() => {
- listFeedback(caseId);
- getData(caseId)
- getFeedbackInfo();
- }, [])
-
- useEffect(() => {
- if (authorData) {
- const { buttonList } = authorData;
- setStaticButtonList(myButton.filter(item => {
- const flag = buttonList.some(result => {
- if (result.id === item.key) {
- return true
- }
- })
- return flag
- }))
- console.log(buttonList, myButton);
- }
- }, [authorData])
-
-
return (
<>
--
Gitblit v1.8.0