From 31e3890c2a6a81bcc22b6f68c129d580df8e1f0c Mon Sep 17 00:00:00 2001
From: liuwh <964324856@qq.com>
Date: Tue, 10 Sep 2024 18:27:40 +0800
Subject: [PATCH] 修改小程序

---
 gz-customerSystem/src/views/register/visit/component/levelDetail.jsx |  218 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 213 insertions(+), 5 deletions(-)

diff --git a/gz-customerSystem/src/views/register/visit/component/levelDetail.jsx b/gz-customerSystem/src/views/register/visit/component/levelDetail.jsx
index b42130c..c48c6e5 100644
--- a/gz-customerSystem/src/views/register/visit/component/levelDetail.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/levelDetail.jsx
@@ -1,5 +1,21 @@
-import React from 'react';
+/*
+ * @Author: dminyi 1301963064@qq.com
+ * @Date: 2024-08-27 16:47:12
+ * @LastEditors: dminyi 1301963064@qq.com
+ * @LastEditTime: 2024-09-08 15:06:05
+ * @FilePath: \gzDyh\gz-customerSystem\src\views\register\visit\component\levelDetail.jsx
+ * @Description: 右抽屉提示
+ */
+import React, { useEffect, useState } from 'react';
 import MyDrawer from '@/components/MyDrawer';
+import { caselogo } from '@/assets/images';
+import * as $$ from '@/utils/utility';
+
+
+function getCaseDetailApi(data) {
+    return $$.ax.request({ urlAi: `case-law/get-case-detail`, typeAi: 'get', service: 'mediate', data });
+}
+
 
 const EventLevelDrawer = ({ visible, onClose }) => {
     return (
@@ -14,7 +30,7 @@
         >
             <div style={{ marginTop: '-8px' }}>
                 <div>
-                    <div style={{ color: '#1A6FB8', fontSize: '15px', lineHeight: '23px', marginBottom: '8px' }}>一类重点事件</div>
+                    <div style={{ color: '#1A6FB8', fontSize: '15px', lineHeight: '23px', marginBottom: '8px' }}>一级重点事件</div>
                     1、5人(含5人)以上到非接待场所聚集、滞留、静坐、游行或准备上访;<br />
                     2、拉横幅、穿着“状衣”、呼喊口号、呼喊标语、堵塞交通非法占据公其场所、扰乱公共秩序、向他人散发传单等上访材料;<br />
                     3、拖欠工资、劳资纠纷涉及人数5人以上;<br />
@@ -24,7 +40,7 @@
                     7、群体性民事纠纷(5人及5人以上的邻里矛盾纠纷、经济债务纠纷、家庭纠纷等可能导致“民转刑”的民事纠纷);8、存在重大安全隐患、重大不稳定因索的矛盾;9、涉及政治类,非宗教类的非访宣传(在出租屋内从事涉邪教迷信印刷、存放资料的;在公共场所粘贴类似邪教的符号、图案、标志等)10、县(市、区)职能部门、各镇(街道)分管领导根据应急情况认为有必要启动红色预警机制的其他矛盾纠纷。
                 </div>
                 <div>
-                    <div style={{ color: '#1A6FB8', fontSize: '15px', lineHeight: '23px', marginBottom: '8px', marginTop: '20px' }}>二类重点事件</div>
+                    <div style={{ color: '#1A6FB8', fontSize: '15px', lineHeight: '23px', marginBottom: '8px', marginTop: '20px' }}>二级重点事件</div>
                     1、5人(含5人)以上到非接待场所聚集、滞留、静坐、游行或准备上访;<br />
                     2、拉横幅、穿着“状衣”、呼喊口号、呼喊标语、堵塞交通非法占据公其场所、扰乱公共秩序、向他人散发传单等上访材料;<br />
                     3、拖欠工资、劳资纠纷涉及人数5人以上;<br />
@@ -34,7 +50,7 @@
                     7、群体性民事纠纷(5人及5人以上的邻里矛盾纠纷、经济债务纠纷、家庭纠纷等可能导致“民转刑”的民事纠纷);8、存在重大安全隐患、重大不稳定因索的矛盾;9、涉及政治类,非宗教类的非访宣传(在出租屋内从事涉邪教迷信印刷、存放资料的;在公共场所粘贴类似邪教的符号、图案、标志等)10、县(市、区)职能部门、各镇(街道)分管领导根据应急情况认为有必要启动红色预警机制的其他矛盾纠纷。
                 </div>
                 <div>
-                    <div style={{ color: '#1A6FB8', fontSize: '15px', lineHeight: '23px', marginBottom: '8px', marginTop: '20px' }}>三类普通事件</div>
+                    <div style={{ color: '#1A6FB8', fontSize: '15px', lineHeight: '23px', marginBottom: '8px', marginTop: '20px' }}>三级普通事件</div>
                     1、5人(含5人)以上到非接待场所聚集、滞留、静坐、游行或准备上访;<br />
                     2、拉横幅、穿着“状衣”、呼喊口号、呼喊标语、堵塞交通非法占据公其场所、扰乱公共秩序、向他人散发传单等上访材料;<br />
                     3、拖欠工资、劳资纠纷涉及人数5人以上;<br />
@@ -69,4 +85,196 @@
     );
 }
 
-export { EventLevelDrawer, MattersDetail };
\ No newline at end of file
+const NoHandleReason = ({ visible, onClose }) => {
+    return (
+        <div className='MyDrawer'>
+            <MyDrawer
+                visible={visible}
+                onClose={onClose}
+                title="无法化解理由"
+                width={1000}
+                style={{ position: 'absolute' }}
+                bodyStyle={{ marginTop: '-8px' }}
+                titleBefore={true}
+            >
+                <div style={{ marginTop: '-8px' }}>
+                    完整的无法化解理由至少应具备3要素:调解过程中提供的解决方案+调解过程中的主要分歧点+最终难以调和的原因
+                    例如:
+                    调解工作于2024年1月10日在某街道人民调解委员会进行,双方当事人均到场参与。调解员首先听取了双方当事人的陈述,随后进行了多次单独会谈,根据被申请方的实际情况提出分期支付欠款的解决方案。在调解过程中,双方就具体支付方式进行了反复讨论,但未能达成一致意见。双方的主要分歧点在与被申请方不想一次性支付欠款。双方在沟通过程中情绪激动,互不相让。尽管调解员尝试缓和气氛,并引导双方从利益出发寻求解决方案,但双方仍坚持各自的立场,不愿妥协。
+                </div>
+            </MyDrawer>
+
+        </div>
+
+    )
+
+}
+
+const AiQuestion = ({ visible, onClose, aiData, aiLawData }) => {
+    const [list, setList] = useState([
+        // {
+        //     id: '1',
+        //     type: '典型案例',
+        //     name: '唐某某诉重庆某工业有限公司劳动合同纠纷案'
+        // },
+        // {
+        //     id: '2',
+        //     type: '相似案例',
+        //     name: '曾某某诉某网络科技公司劳动争议案'
+        // },
+        // {
+        //     id: '3',
+        //     type: '相似案例',
+        //     name: '曾某某诉某网络科技公司劳动争议案'
+        // },
+    ])
+    const [caseDetailView, setCaseDetailView] = useState({})
+
+    const [modalType, setModalType] = useState('case')
+    const [lawDetail, setLawDetail] = useState({})
+
+    const [layerList, setLayerList] = useState([
+        {
+            id: '1',
+            name: '法条一'
+        },
+        {
+            id: '2',
+            name: '法条二'
+        },
+        {
+            id: '3',
+            name: '法条三'
+        },
+    ])
+
+    const [caseDetail, setCaseDetail] = useState(false)
+    const toggleView = (type, id) => {
+        setCaseDetail(true)
+        setModalType(type)
+        
+        if (type === 'case') {
+            getCaseDetail(id);
+        }
+        if (type === 'law') {
+            console.log(id,'idddddd')
+            
+            const lawItem = aiLawData.find(item => item.lawInfoId === id)
+            console.log(lawItem,'lawItem')
+            setLawDetail(lawItem)
+        }
+    };
+
+
+    const caseDetailOnClose = () => {
+        setCaseDetail(false)
+    }
+
+    const getCaseDetail = async (id) => {
+        const res = await getCaseDetailApi({
+            caseId: id,
+            type: '1'
+        })
+        if (res.type) {
+            setCaseDetailView(res.data)
+        }
+    }
+
+
+
+
+
+
+    useEffect(() => {
+        setList(aiData);
+        setLayerList(aiLawData);
+
+    }, [aiData, aiLawData])
+
+    return (
+        <>
+            <MyDrawer
+                visible={visible}
+                onClose={onClose}
+                title="智能调解助理"
+                width={1200}
+                style={{ position: 'absolute' }}
+                bodyStyle={{ marginTop: '-8px' }}
+                titleBefore={true}
+            >
+                <div style={{ display: 'flex' }}>
+                    <div style={{ width: '100px' }}></div>
+                    <div className='aiBox'>
+                        <div className='aiBox-case'>
+                            <div className='aiBox-case-logo'>
+                                <img src={caselogo} alt='' className='aiBox-case-logo-img' />
+                            </div>
+                            <div style={{ flex: 1 }}>刘家健入职吴昆物流公司工作6天,因不适应工作内容、环境等,向吴昆物流公司提出离职申请,但公司称入职1周内因个人原因辞职不予支付工资。刘家健因此向社区调委会申请调解。刘家健希望吴昆物流公司支付6天的工资。经调解,双方达成一致意见,吴昆物流公司同意支付刘家健6天的工资共计1575元。基于这个案件生成合理的调解策略.</div>
+                        </div>
+                        <div className='marginLeft'>
+                            <div className='marginLeft-title'>相关案例:</div>
+                            <div className='aiBox-list'>
+                                {list?.map((item, index) => (
+                                    <div className='aiBox-list-item'>
+                                        <div className='aiBox-list-item-type'>{item.caseType === 1 ? '典型案例' : '相似案例'}</div>
+                                        <div className='aiBox-list-item-name'>{item.caseName}</div>
+                                        <div className='aiBox-list-item-btn' onClick={() => toggleView('case', item.caseId)}>查看</div>
+                                    </div>
+                                ))}
+                            </div>
+                        </div>
+                        <div className='marginLeft'>
+                            <div className='marginLeft-title'>相关法条:</div>
+                            <div className='aiBox-list'>
+                                {layerList?.map((item, index) => (
+                                    <div className='aiBox-list-item'>
+                                        <div className='aiBox-list-item-type'>相关法条</div>
+                                        <div className='aiBox-list-item-name'>{item.lawTitle}{item.lawIndex}</div>
+                                        <div className='aiBox-list-item-btn' onClick={() => toggleView('law', item.lawInfoId)}>查看</div>
+                                    </div>
+                                ))}
+                            </div>
+                        </div>
+
+                    </div>
+                </div>
+            </MyDrawer>
+            <div className='MyDrawer'>
+                <MyDrawer
+                    visible={caseDetail}
+                    onClose={caseDetailOnClose}
+                    title={modalType === 'case'?"查看相关案例":"查看相关法条"}
+                    width={400}
+                    style={{ position: 'absolute' }}
+                    bodyStyle={{ marginTop: '-8px' }}
+                    titleBefore={true}
+                >
+                    {
+                        modalType === 'case' &&
+                        <div className='layerDetail'>
+                            <div className='layerDetail-title'>参考案例</div>
+                            <div className='layerDetail-name'>{caseDetailView?.caseTitle || '-'}</div>
+                            <div className='layerDetail-littleTitle'>基本案情</div>
+                            <div className='layerDetail-content'>{caseDetailView?.caseDesc || '-'}</div>
+                            <div className='layerDetail-littleTitle'>结果</div>
+                            <div className='layerDetail-content'>{caseDetailView?.caseClaim || '-'}</div>
+                        </div>
+                    }
+                    {
+                        modalType === 'law' &&
+                        <div className='layerDetail'>
+                            <div className='layerDetail-title'>{lawDetail?.lawIndex}&nbsp;&nbsp;{lawDetail?.lawTitle}</div>
+                            <div className='layerDetail-littleTitle'>{lawDetail.lawDesc}</div>
+                        </div>
+                    }
+                </MyDrawer>
+            </div>
+
+        </>
+
+    )
+}
+
+
+
+export { EventLevelDrawer, MattersDetail, NoHandleReason, AiQuestion };
\ No newline at end of file

--
Gitblit v1.8.0