forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-07 80e40362a760c5c53c51e8a1e79c9a11c6a0f5fe
gz-customerSystem/src/views/filesCheck/newFileCheck.jsx
@@ -2,7 +2,7 @@
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-03-11 11:03:44
 * @LastEditTime: 2024-09-05 20:46:47
 * @LastEditTime: 2024-09-07 11:55:54
 * @LastEditors: dminyi 1301963064@qq.com
 * @Version: 1.0.0
 * @Description: 大厅来访材料附件查看
@@ -44,10 +44,9 @@
const FormItem = Form.Item;
const Option = Select.Option;
// http://localhost:9002/dyh-sys/api/web/fileInfo/listFileByCat?mainId=10001&ownerCat=&createStart=&createEnd=&uploaderType=
// 获取附件
function getFileListDataApi(submitData) {
   return $$.ax.request({ url: `fileInfo/listFileByCat?mainId=${submitData}`, type: 'get', service: 'mediate' });
   function getFileListDataApi() {
      return $$.ax.request({ url: `fileInfo/listFileByCat?mainId=${'10001'}&ownerCat=&createStart=&createEnd=&uploaderType=`, type: 'get', service: 'sys', });
}
const NewFileCheck = ({ caseId }) => {
@@ -166,12 +165,12 @@
      const res = await getFileListDataApi(caseId || searchParams.get('caseId'));
      global.setSpinning(false);
      if (res.type) {
         let resData = res.data?.dataList || [];
            let resData = res.data || [];
         let arr = [];
         let filesArr = [];
         let index = 0;
         resData.forEach((x, t) => {
            arr.push(x.ownerTypeName);
               arr.push(x.ownerCatName);
            filesArr = filesArr.concat(x.fileList || []);
         });
         forEach: for (let i = 0; i < filesArr.length - 1; i++) {
@@ -289,9 +288,9 @@
               {data.data?.map((x, t) => {
                  return (
                     <SubMenu
                        key={x.ownerTypeName}
                        expandIcon={openKeys.includes(x.ownerTypeName) ? <CaretRightOutlined /> : <CaretDownOutlined />}
                        title={x.ownerTypeName}
                           key={x.ownerCatName}
                           expandIcon={openKeys.includes(x.ownerCatName) ? <CaretRightOutlined /> : <CaretDownOutlined />}
                           title={x.ownerCatName}
                     >
                        {x.fileList?.map((y, z) => {
                           return (
@@ -317,6 +316,7 @@
               })}
            </Menu>
         </nav>
            {/*图片查看*/}
         {files[fileIndex] ? (
            <main className="filesCheck-main">
               {/* 头部操作区 */}
@@ -392,3 +392,4 @@
};
export default NewFileCheck;