src/utils/utility.js | ●●●●● patch | view | raw | blame | history | |
src/views/register/closeCaseEdit/index.jsx | ●●●●● patch | view | raw | blame | history | |
src/views/register/visit/index.jsx | ●●●●● patch | view | raw | blame | history |
src/utils/utility.js
@@ -2,7 +2,7 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-16 11:57:54 * @LastEditTime: 2025-06-10 17:40:29 * @LastEditTime: 2025-06-23 14:30:22 * @LastEditors: lwh * @Version: 1.0.0 * @Description: 公共模块方法 @@ -17,7 +17,7 @@ import { pdf, jpg, file, word, excel } from '../assets/images/icon'; import { empty } from '@/assets/images'; export const isDebug = true; // 是否开发环境 export const isDebug = false; // 是否开发环境 export const isTest = true; // 是否测试环境 export const appUrl = isDebug ? debug : isTest ? test : web; // api src/views/register/closeCaseEdit/index.jsx
@@ -2,7 +2,7 @@ * @Author: dminyi 1301963064@qq.com * @Date: 2024-08-09 09:59:43 * @LastEditors: lwh * @LastEditTime: 2025-03-07 14:52:17 * @LastEditTime: 2025-06-23 18:17:42 * @FilePath: \gzDyh\gz-customerSystem\src\views\basicInformation\organization\index.jsx * @Description: 来访登记 */ @@ -267,7 +267,23 @@ caseLevel: rest.caseLevel ? String(rest.caseLevel) : '', fakeData: newParList, myCaseType: rest.caseTypeFirst ? [rest.caseTypeFirst, rest.caseType] : undefined, myQuesAddress: rest.queRoad ? [rest.queArea, rest.queRoad] : undefined, myQuesAddress: (() => { // 构建地址数组的逻辑 const addressArray = []; // 如果有区域信息,添加到数组 if (rest.queArea && rest.queArea.trim()) { addressArray.push(rest.queArea); } // 如果有道路信息,添加到数组 if (rest.queRoad && rest.queRoad.trim()) { addressArray.push(rest.queRoad); } // 如果数组为空,返回undefined,否则返回数组 return addressArray.length > 0 ? addressArray : undefined; })(), }; formRef.current.setFieldsValue(obj); setEditData(obj); src/views/register/visit/index.jsx
@@ -2,7 +2,7 @@ * @Author: dminyi 1301963064@qq.com * @Date: 2024-08-09 09:59:43 * @LastEditors: lwh * @LastEditTime: 2025-06-13 15:16:34 * @LastEditTime: 2025-06-23 15:22:52 * @FilePath: \gzDyh\gz-customerSystem\src\views\basicInformation\organization\index.jsx * @Description: 来访登记 */ @@ -403,6 +403,10 @@ link.download = `受理回执书_${new Date().getTime()}.png`; link.href = imgData; link.click(); // 同时上传图片到后台 // await uploadReceiptImage(canvas); setIsShowModal(false); if (isModalSelfAccept) { getRiskResult({ caseId: id, caseText: (isShowModalData.caseDes || '') + '/n' + (isShowModalData.caseClaim || '') }); @@ -433,6 +437,44 @@ } }; // 上传回执书图片到后台 const uploadReceiptImage = async (canvas) => { try { // 将canvas转换为Blob canvas.toBlob(async (blob) => { // 创建FormData const formData = new FormData(); formData.append('file', blob, `受理回执书_${new Date().getTime()}.png`); // 获取上传URL const appUrl = $$.appUrl; const uploadUrl = `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${id}&ownerId=${id}&ownerType=22_00018-600`; // 发送上传请求 const response = await fetch(uploadUrl, { method: 'POST', headers: { 'Authorization': $$.getSessionStorage('customerSystemToken'), }, body: formData }); const result = await response.json(); if (result.code === 0 || result.code === '0') { console.log('回执书上传成功:', result); Message.success('回执书已保存到系统'); } else { console.error('回执书上传失败:', result); Message.warning('回执书上传失败,但不影响下载'); } }, 'image/png'); } catch (error) { console.error('上传回执书失败:', error); Message.warning('回执书上传失败,但不影响下载'); } }; return ( <div style={{ position: 'relative' }}> <NewPage pageHead={{ breadcrumbData: [{ title: '工作台' }, { title: '大厅来访' }], title: '大厅来访' }}>