From 27fb65ba5c31fbbad4c17166a72901d8db80ae03 Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Wed, 04 Sep 2024 19:18:56 +0800
Subject: [PATCH] 联调办理反馈接口
---
gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx | 170 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 117 insertions(+), 53 deletions(-)
diff --git a/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx b/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
index a91254a..58787a7 100644
--- a/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
+++ b/gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
@@ -9,15 +9,15 @@
import { scan } from '@/assets/images/icon'
import DocumentScanner from './FileUpLoad'
import * as $$ from '@/utils/utility';
-import {
- IconLink,
-} from '@arco-design/web-react/icon';
import CaseResult from './CaseResult'
+import ArcoUpload from '@/components/ArcoUpload';
const InputSearch = Input.Search;
const FormItem = Form.Item;
const TabPane = Tabs.TabPane;
+const appUrl = $$.appUrl;
+
const style = {
textAlign: 'center',
@@ -80,10 +80,23 @@
return $$.ax.request({ url: 'ctUser/getByIdRole?id=' + id, type: 'get', service: 'cust' });
}
+function choosePrincipalApi(id) {
+ return $$.ax.request({ url: 'caseInfoUnfold/choosePrincipal?caseId=24083010062110001&userId=' + id, type: 'get', service: 'mediate' });
+}
+
+function delFile(id) {
+ return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } });
+}
+
+function getNewTimeIdApi(id) {
+ return $$.ax.request({ url: `caseUtils/getNewTimeId`, type: 'get', service: 'utils' });
+}
+
const Handle = () => {
+ const formRef = useRef();
const [selectedTab, setSelectedTab] = useState('1'); // 默认选中第一个 tab
const [wantUser, setWantUser] = useState({});
const [formView, setFormView] = useState(false);
@@ -97,12 +110,15 @@
];
const [isModalVisible, setIsModalVisible] = useState(false);
-
-
+ const [id, setId] = useState('')
const handleTabChange = (newTabIndex) => {
setSelectedTab(newTabIndex);
};
+
+ const handleCheckedKeys = (userId) => {
+ choosePrincipal(userId)
+ }
const [records, setRecords] = useState([
{
@@ -211,16 +227,50 @@
}
+ const choosePrincipal = async (id) => {
+ console.log(id, 'choosePrincipalId')
+ const res = await choosePrincipalApi(id)
+ if (res.type) {
+ let data = res.data
+ console.log(data, 'choosePrincipalchoosePrincipal')
+ }
+
+ }
+
+
+ //删除文件
+ const handleDelFile = async (id) => {
+ const res = await delFile(id)
+ if (res.type) {
+ $$.infoSuccess({ content: '删除成功!' });
+ }
+ }
+
+ const getNewTimeId = async () => {
+ const res = await getNewTimeIdApi()
+ if (res.type) {
+ setId(res.data)
+ }
+ }
+
+ const addMark = () => {
+ setFormView(!formView);
+ getNewTimeId()
+ }
+
+ const handleFinish = () => {
+ console.log(formRef.current.getFields(), formRef, 'formRef.current.getFields()', 'formRef')
+ }
+
+ const Supervising = () => {
+
+ }
+
useEffect(() => {
getByIdRole()
}, [])
-
-
-
-
-
return (
@@ -344,50 +394,61 @@
</Space>
</Col>
<Col span={24}>
- <FormItem
- label={<div style={{ display: 'flex' }}>
- 办理意见
- <img src={scan} alt="" style={{ marginRight: '-2px', marginLeft: '8px' }} />
- <div style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }} onClick={openScanner}>识别材料</div>
- </div>
- }
- field='caseDes'
- rules={[{ message: '请填写事项概况', required: true }]}
+ <Form
+ ref={formRef}
+ layout='vertical'
+ requiredSymbol={false}
+ scrollToFirstError={true}
>
- <Input.TextArea
- maxLength={200}
- showWordLimit
- rows={5}
- placeholder='请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过'
- wrapperStyle={{ width: '100%' }}
- />
- </FormItem>
- </Col>
- <Col span={24}>
- <FormItem
- label={<div style={{ display: 'flex' }}>
- 办理附件
- </div>
- }
- field='caseDes'
- rules={[{ message: '请填写事项概况', required: true }]}
- >
- <Upload
- drag
- multiple
- accept='image/*'
- action='/'
- onDrop={(e) => {
- }}
- tip='支持png、jpg、pdf格式的图片上传,每次上传大小不超过10M'
- showUploadList={{
- fileIcon: <IconLink style={{ color: '#1D2129' }} />,
- }}
- />
- </FormItem>
+ <Row gutter={[32, 0]}>
+ <Col span={24}>
+ <FormItem
+ label={<div style={{ display: 'flex' }}>
+ 办理意见
+ <img src={scan} alt="" style={{ marginRight: '-2px', marginLeft: '8px' }} />
+ <div style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }} onClick={openScanner}>识别材料</div>
+ </div>
+ }
+ field='caseDes'
+ rules={[{ message: '请填写事项概况', required: true }]}
+ >
+ <Input.TextArea
+ maxLength={200}
+ showWordLimit
+ rows={5}
+ placeholder='请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过'
+ wrapperStyle={{ width: '100%' }}
+ />
+ </FormItem>
+
+ </Col>
+ <Col span={24}>
+ <FormItem
+ label={<div style={{ display: 'flex' }}>
+ 办理附件
+ </div>
+ }
+ field='caseDes'
+ rules={[{ message: '请填写事项概况', required: true }]}
+ >
+ <ArcoUpload
+ params={{
+ action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId='24083010062110001'&&ownerId=${id}&ownerType=22_00018-102`,
+ }}
+ field='file1'
+ // handleChangeFile={handleChangeFile}
+ label=''
+ // editData={props.editData}
+ handleDelFile={handleDelFile}
+ />
+ </FormItem>
+ </Col>
+
+ </Row>
+ </Form>
</Col>
<Space size='middle'>
- <Button type='primary'>保存</Button>
+ <Button type='primary' onClick={() => handleFinish()}>保存</Button>
<Button type='secondary'>取消添加</Button>
</Space>
</div>
@@ -396,9 +457,10 @@
</Col>
</Form>
<Space style={{ marginTop: '38px', bottom: '4px' }}>
- <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={() => setFormView(!formView)}>添加办理记录</Button>
- <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={() => SetCaseResult(!caseResult)}>结案申请</Button>
+ <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={() => addMark()}>添加办理记录</Button>
<Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }}>联合处置申请</Button>
+ <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={() => SetCaseResult(!caseResult)}>结案申请</Button>
+ <Button type='outline' style={{ color: '#EF6C24', border: '1px solid #EF6C24' }} onClick={() => Supervising(!caseResult)}>督办</Button>
<Button type='secondary'>返回上级页面</Button>
</Space>
</div>
@@ -457,8 +519,10 @@
visible={isModalVisible}
checkKeys={wantUser.wantUserId ? [{ label: wantUser.wantUserName, value: wantUser.wantUserId }] : undefined}
onOk={(value) => {
+ console.log(value.key, value, 'value.key', 'value')
setIsModalVisible(false);
setWantUser({ wantUserId: value.keys[0], wantUserName: value.items[0].name });
+ handleCheckedKeys(value.keys?.[0])
}}
onClose={() => setIsModalVisible(false)}
/>
--
Gitblit v1.8.0