From 5e7284afb93e702b9821441fd4c37a0eb2d0bd00 Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Thu, 12 Feb 2026 10:56:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=8A=9E=E6=B5=81=E7=A8=8B=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/router.ts | 5 + src/models/user.ts | 7 + .../ComplaintForwardingProcessList.tsx | 252 ++++------- .../ComplaintForwardingProcessReport.tsx | 424 ++++++++++++++++++ .../ComplaintForwardingProcessReview.tsx | 77 ++-- .../ComplaintForwardingProcess/index.tsx | 91 ++-- src/pages/authority.ts | 1 + src/pages/serverpartAssets/service.ts | 11 + 8 files changed, 614 insertions(+), 254 deletions(-) create mode 100644 src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReport.tsx diff --git a/config/router.ts b/config/router.ts index 736d098..5b4a7e2 100644 --- a/config/router.ts +++ b/config/router.ts @@ -98,6 +98,11 @@ export default [ name: '投诉台账', component: "@/pages/ComplaintForwardingProcess/ComplaintForwardingProcessList", }, + { + path: '/ComplaintForwardingProcess/ComplaintForwardingProcessReport', + name: '投诉报表', + component: "@/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReport", + }, { path: '/BusinessConfiguration/index', name: '业务配置', diff --git a/src/models/user.ts b/src/models/user.ts index 073ab8f..cc6631b 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -329,6 +329,12 @@ const UserModel: UserModelType = { name: '投诉台账', component: "@/pages/ComplaintForwardingProcess/ComplaintForwardingProcessList", }, + { + path: '/ComplaintForwardingProcess/ComplaintForwardingProcessReport', + redirect: '', + name: '投诉报表', + component: "@/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReport", + }, { path: '/BusinessConfiguration/index', redirect: '', @@ -422,6 +428,7 @@ const UserModel: UserModelType = { "/ComplaintForwardingProcess/index", "/ComplaintForwardingProcess/ComplaintForwardingProcessReview", "/ComplaintForwardingProcess/ComplaintForwardingProcessList", + "/ComplaintForwardingProcess/ComplaintForwardingProcessReport", "/BusinessConfiguration/index", // '/examine/index', // '/examine/modal', diff --git a/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessList.tsx b/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessList.tsx index 69ca0e6..83892e5 100644 --- a/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessList.tsx +++ b/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessList.tsx @@ -24,7 +24,8 @@ const beforeUpload = (file: any) => { return isJpgOrPng && isLt2M; } -const ComplaintForwardingProcessList = () => { + +const ComplaintForwardingProcessList = ({ isComponents, isComponentsParams }: { isComponents?: boolean, isComponentsParams: any }) => { const { confirm } = Modal; const actionRef = useRef(); const formRef = useRef(); @@ -56,11 +57,44 @@ const ComplaintForwardingProcessList = () => { const [allProcessRecord, setAllProcessRecord] = useState(); // 流程进度 const [progressList, setProgressList] = useState(); + // 全部状态 的list 存一份 + const [allStatusList, setAllStatusList] = useState() // 判断是审核通过还是 驳回审核 1 审核通过 2 驳回 3 受理 const [reviewType, setReviewType] = useState() const columns: any = [ + { + title: "统计时间", + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value) => { + return { + SUGGESTION_CREATEDATE_Start: value[0], + SUGGESTION_CREATEDATE_End: value[1], + }; + }, + }, + initialValue: [moment().subtract(1, 'M'), moment()], + }, + { + title: "类型", + width: 120, + dataIndex: "SUGGESTION_TYPES", + valueType: "select", + align: 'center', + valueEnum: { + "0": "全部", + "1000": "投诉", + "1050": "表扬", + "2000": "咨询/建议" + }, + hideInTable: true, + initialValue: "0" + }, { title: "类型", width: 120, @@ -71,8 +105,10 @@ const ComplaintForwardingProcessList = () => { "0": "全部", "1000": "投诉", "1050": "表扬", + "2000": "投诉", "4000": "咨询/建议" }, + hideInSearch: true, initialValue: "0" }, { @@ -117,7 +153,7 @@ const ComplaintForwardingProcessList = () => { title: "处理状态", width: 120, align: 'center', - dataIndex: "SUGGESTION_STATE", + dataIndex: "SUGGESTION_STATES", valueType: "select", request: async () => { const req: any = { @@ -139,8 +175,7 @@ const ComplaintForwardingProcessList = () => { data.forEach((item: any) => { list.push({ label: item.APPROVALROUTE_NAME, value: item.APPROVALROUTE_STATE }) }) - list.push({ label: "已审结", value: 3000 }) - list.push({ label: "已审结", value: 2000 }) + // list.unshift({ label: "待受理", value: 1000 }) list.push({ label: "已审结", value: 9000 }) return list } else { @@ -157,6 +192,9 @@ const ComplaintForwardingProcessList = () => { dataIndex: "SUGGESTION_STATE", valueType: "select", request: async () => { + if (allStatusList && allStatusList.length > 0) { + return allStatusList + } const req: any = { SearchParameter: { PROVINCE_CODE: '530000', @@ -176,8 +214,10 @@ const ComplaintForwardingProcessList = () => { data.forEach((item: any) => { list.push({ label: item.APPROVALROUTE_NAME, value: item.APPROVALROUTE_STATE }) }) - list.unshift({ label: "待受理", value: 1000 }) + list.push({ label: "已审结", value: 3000 }) + list.push({ label: "已审结", value: 2000 }) list.push({ label: "已审结", value: 9000 }) + setAllStatusList(list) return list } else { return [] @@ -292,10 +332,21 @@ const ComplaintForwardingProcessList = () => { }); } - // 预览上传后的图片 - const handlePreview = async () => { - setFileList(fileList) - setImagePreviewVisible(true) + // 预览上传后的文件 + const handlePreview = async (file: any) => { + const url = file.url || file.thumbUrl; + if (!url) return; + + // 判断是否为图片 + const isImage = /\.(jpg|jpeg|png|gif|webp|bmp)$/i.test(url) || (file.type && file.type.startsWith('image/')); + + if (isImage) { + setFileList(fileList) + setImagePreviewVisible(true) + } else { + // 非图片文件,在新标签页打开 + window.open(url, '_blank'); + } }; // 新增或同步记录的方法 @@ -617,8 +668,8 @@ const ComplaintForwardingProcessList = () => { expandRowByClick: true }} scroll={{ y: 'calc(100vh - 400px)' }} - headerTitle={'流程审批'} - search={{ span: 6 }} + headerTitle={'投诉建议台账'} + search={isComponents ? false : { span: 6 }} request={async (params) => { let userInfo: any = {} if (!currentUser) { @@ -627,11 +678,14 @@ const ComplaintForwardingProcessList = () => { userInfo = await handleGetUserInfo(addressParams.UserIdEncrypted) } + console.log('paramsparamsparams', params); - const req: any = { + const req: any = isComponents ? isComponentsParams : { SearchParameter: { - SUGGESTION_TYPES: params?.SUGGESTION_TYPE === "0" ? '1000,1050,4000' : params?.SUGGESTION_TYPE,// 类型 - SUGGESTION_STATES: params?.SUGGESTION_STATE === "0" || !params?.SUGGESTION_STATE ? '' : params?.SUGGESTION_STATE,// 状态 + SUGGESTION_CREATEDATE_Start: params?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: params?.SUGGESTION_CREATEDATE_End || "", + SUGGESTION_TYPES: params?.SUGGESTION_TYPES === "0" ? '1000,1050,4000' : params?.SUGGESTION_TYPES,// 类型 + SUGGESTION_STATES: params?.SUGGESTION_STATES === "0" || !params?.SUGGESTION_STATES ? '' : params?.SUGGESTION_STATES,// 状态 // CHAIRMAN_STAFFID: currentUser?.ID || userInfo.ID }, SortStr: "SUGGESTION_CREATEDATE desc", @@ -646,16 +700,16 @@ const ComplaintForwardingProcessList = () => { }} toolbar={{ actions: [ - + // ] }} /> @@ -859,7 +913,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请选择服务区!' }]} - readonly={reviewType} + readonly={true} /> @@ -867,7 +921,7 @@ const ComplaintForwardingProcessList = () => { @@ -884,7 +938,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请选择投诉渠道!' }]} - readonly={reviewType} + readonly={true} /> @@ -912,7 +966,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请选择投诉类型!' }]} - readonly={reviewType && currentRow?.SUGGESTION_STATE !== 1000} + readonly={true} /> @@ -935,7 +989,7 @@ const ComplaintForwardingProcessList = () => { message: '请选择标签', }, ]} - readonly={reviewType} + readonly={true} /> @@ -947,7 +1001,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入人员名称!' }]} - readonly={reviewType} + readonly={true} /> @@ -959,7 +1013,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入联系电话!' }]} - readonly={reviewType} + readonly={true} /> @@ -971,7 +1025,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入受理部门!' }]} - readonly={reviewType} + readonly={true} initialValue={currentUser?.DepartmentName} /> @@ -984,47 +1038,18 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入详细描述!' }]} - readonly={reviewType} + readonly={true} /> { - // if (info.file.status === 'removed') { - // confirm({ - // title: '确认删除该图片吗?', - // icon: , - // async onOk() { - - - // const req: any = { - // ImagePath: info.file.path, - // TableType: '5000', - // } - // const data = await handleDeletePicture(req) - // if (data) { - // message.success('删除成功!') - // let list: any = JSON.parse(JSON.stringify(fileList)) - // let res: any = [] - // if (list && list.length > 0) { - // list.forEach((item: any) => { - // if (item.url === info.file.url) { - - // } else { - // res.push(item) - // } - // }) - // } - // setFileList(res) - // } - // } - // }); - // } } }} /> @@ -1042,10 +1067,10 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入转办部门!' }]} - readonly={currentRow?.SUGGESTION_STATE > 1010} + readonly={true} /> - + { required: true, message: '请输入转办要求!' }]} - readonly={currentRow?.SUGGESTION_STATE > 1010} + readonly={true} /> @@ -1064,7 +1089,7 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入核实情况!' }]} - readonly={currentRow?.SUGGESTION_STATE > 1010} + readonly={true} /> @@ -1075,18 +1100,19 @@ const ComplaintForwardingProcessList = () => { required: true, message: '请输入处置结果!' }]} - readonly={currentRow?.SUGGESTION_STATE > 1010} + readonly={true} /> 1010} + disabled={true} fieldProps={{ maxCount: 9 }} @@ -1095,90 +1121,6 @@ const ComplaintForwardingProcessList = () => { : "" } - { - reviewType !== 2 && currentRow && currentRow?.SUGGESTION_STATE !== 9000 && currentApprovalRoute?.NEXT_STATE !== 9000 ? - - { - console.log('SUGGESTIONSTATELIST', SUGGESTIONSTATELIST); - console.log('currentRow', currentRow); - let currentObj: any = {} // 当前环节的配置信息 - let nextStausId: any = "" - let nextStatusObj: any = "" - if (SUGGESTIONSTATELIST && SUGGESTIONSTATELIST.length > 0) { - SUGGESTIONSTATELIST.forEach((item: any) => { - if (Number(item.APPROVALROUTE_STATE) === Number(currentRow?.SUGGESTION_STATE)) { - nextStausId = Number(item.NEXT_STATE) - currentObj = item - } - - }) - - SUGGESTIONSTATELIST.forEach((item: any) => { - if (item.APPROVALROUTE_STATE === nextStausId) { - nextStatusObj = item - } - }) - console.log('下一环节配置', nextStatusObj); - console.log('当前环节配置', currentObj); - setNextApprovalRoute(nextStatusObj) - setCurrentApprovalRoute(currentObj) - let idList: any = nextStatusObj?.APPROVALSTAFF_ID ? nextStatusObj?.APPROVALSTAFF_ID.split(',') : [] - let nameList: any = nextStatusObj?.APPROVALSTAFF_NAME ? nextStatusObj?.APPROVALSTAFF_NAME.split(',') : [] - let list: any = [] - if (idList && idList.length > 0 && nameList && nameList.length > 0) { - let count: number = idList.length - for (let i = 0; i < count; i++) { - list.push({ label: nameList[i], value: idList[i] }) - } - } - console.log('listlistlist', list); - - return list - } else { - return [] - } - }} - fieldProps={{ - showSearch: true, - filterOption: (input, option) => - (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), - optionFilterProp: 'label', - onChange: (e, option: any) => { - modalRef.current?.setFieldsValue({ nextPersonName: option.title }) - } - }} - /> - : "" - } - - {/* 出现驳回意见 */} - { - (currentRow?.SUGGESTION_STATE > 1010 && reviewType === 2) ? - - - : "" - } - - - - { currentRow ? diff --git a/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReport.tsx b/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReport.tsx new file mode 100644 index 0000000..9b151a2 --- /dev/null +++ b/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReport.tsx @@ -0,0 +1,424 @@ +import LeftSelectTree from "@/components/leftSelectTree/leftSelectTree"; +import { ActionType, FormInstance, ProTable } from "@ant-design/pro-components"; +import { useRef, useState } from "react"; +import { getFieldEnumTreeNoSession, handleGetSUGGESTIONReport } from "../serverpartAssets/service"; +import { Drawer, Modal } from "antd"; +import ComplaintForwardingProcessList from "./ComplaintForwardingProcessList"; +import moment from "moment"; + +const ComplaintForwardingProcessReport = () => { + const actionRef = useRef(); + const formRef = useRef(); + // 树相关的属性和方法 + const [selectedId, setSelectedId] = useState() + const [collapsible, setCollapsible] = useState(false) + // 显示详情抽屉 + const [showDetailModal, setShowDetailModal] = useState(false) + // 当前行数据 + const [currentRow, setCurrentRow] = useState() + // 要查看的类型 + const [isComponentsParams, setIsComponentsParams] = useState() + // 搜索入参 + const [searchParams, setSearchParams] = useState() + + // 表格列内容 + const columns: any = [ + { + title: "统计时间", + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value) => { + return { + SUGGESTION_CREATEDATE_Start: value[0], + SUGGESTION_CREATEDATE_End: value[1], + }; + }, + }, + initialValue: [moment().subtract(1, 'M'), moment()], + }, + { + title: "建议类型", + dataIndex: "SUGGESTION_TYPES", + valueType: 'select', + valueEnum: { + "1000": "投诉", + "1050": "表扬", + "4000": "咨询/建议" + }, + hideInTable: true + }, + { + title: "投诉渠道", + width: 120, + dataIndex: "SUGGESTION_CHANNELS", + valueType: "select", + align: 'center', + request: async () => { + const taxRateLabel: any = await getFieldEnumTreeNoSession({ FieldExplainField: 'SUGGESTION_CHANNEL', notformate: true }) + console.log('taxRateLabeltaxRateLabel', taxRateLabel); + + return taxRateLabel + }, + hideInTable: true + }, + { + title: "服务区", + width: 200, + align: 'center', + dataIndex: "ServerPart_Name", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.SpregionType_Name || record?.ServerPart_Name + } + }, + { + title: "总计", + width: 120, + align: 'center', + dataIndex: "TotalCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.TotalCount ? { + handleGetComponentsParams(1, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.TotalCount} : "0" + } + }, + { + title: "投诉数量", + width: 120, + align: 'center', + dataIndex: "ComplaintCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.ComplaintCount ? { + handleGetComponentsParams(2, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.ComplaintCount} : "0" + } + }, + { + title: "表扬数量", + width: 120, + align: 'center', + dataIndex: "PraiseCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.PraiseCount ? { + handleGetComponentsParams(3, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.PraiseCount} : "0" + } + }, + { + title: "咨询建议数量", + width: 120, + align: 'center', + dataIndex: "ConsultationSuggestionCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.ConsultationSuggestionCount ? { + handleGetComponentsParams(4, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.ConsultationSuggestionCount} : "0" + } + }, + { + title: "小程序数量", + width: 120, + align: 'center', + dataIndex: "MiniProgramCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.MiniProgramCount ? { + handleGetComponentsParams(5, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.MiniProgramCount} : "0" + } + }, + { + title: "12328交通运输数量", + width: 120, + align: 'center', + dataIndex: "Transport12328Count", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.Transport12328Count ? { + handleGetComponentsParams(6, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.Transport12328Count} : "0" + } + }, + { + title: "网络舆情数量", + width: 120, + align: 'center', + dataIndex: "OnlineOpinionCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.OnlineOpinionCount ? { + handleGetComponentsParams(7, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.OnlineOpinionCount} : "0" + } + }, + { + title: "监控中心值班电话数量", + width: 120, + align: 'center', + dataIndex: "MonitoringCenterCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.MonitoringCenterCount ? { + handleGetComponentsParams(8, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.MonitoringCenterCount} : "0" + } + }, + { + title: "话务转办数量", + width: 120, + align: 'center', + dataIndex: "TransferCount", + hideInSearch: true, + ellipsis: true, + render: (_, record) => { + return record?.TransferCount ? { + handleGetComponentsParams(9, record) + setCurrentRow(record) + setShowDetailModal(true) + }}> {record?.TransferCount} : "0" + } + } + ] + + // 处理入参的办法 + const handleGetComponentsParams = (type: number, obj: any) => { + // type 1 总计 2 投诉数量 3 表扬数量 4 咨询建议数量 5 小程序数量 6 12328交通运输数量 7 网络舆情数量 8 监控中心值班电话数量 9 话务转办数量 + console.log('dasda', obj); + + let req: any = {} + let SERVERPART_IDS: string = "" + if (obj.Type === 0) { + if (obj.children && obj.children.length > 0) { + obj.children.forEach((item: any) => { + if (SERVERPART_IDS) { + SERVERPART_IDS += `,${item.ServerPart_Id}` + } else { + SERVERPART_IDS = item.ServerPart_Id + } + }) + } + } else if (obj.Type === 1) { + SERVERPART_IDS = obj.ServerPart_Id + } + console.log('SERVERPART_IDSSERVERPART_IDS', SERVERPART_IDS); + console.log('type123123', type); + + if (type === 1) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 2) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_TYPES: "1000,2000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 3) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_TYPES: "1050", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 4) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_TYPES: "4000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 5) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_CHANNELS: "1000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 6) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_CHANNELS: "2000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 7) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_CHANNELS: "3000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 8) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_CHANNELS: "4000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } else if (type === 9) { + req = { + SearchParameter: { + SERVERPART_IDS: SERVERPART_IDS, + SUGGESTION_CHANNELS: "5000", + SUGGESTION_CREATEDATE_Start: searchParams?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: searchParams?.SUGGESTION_CREATEDATE_End || "" + }, + SortStr: "SUGGESTION_CREATEDATE desc", + PageIndex: 1, + PageSize: "999999" + } + } + console.log('reqreq', req); + + setIsComponentsParams(req) + } + + return ( +
+ +
+ { + return `${record?.SpregionType_Id}-${record?.ServerPart_Id}-${record?.Type}` + }} + scroll={{ x: '100%', y: 'calc(100vh - 450px)' }} + headerTitle={'流程报表'} + search={{ span: 6 }} + request={async (params) => { + if (!selectedId) { + return [] + } + console.log('paramsparams', params); + + const req: any = { + SearchParameter: { + SERVERPART_IDS: selectedId, + SUGGESTION_TYPES: params?.SUGGESTION_TYPES || "", + SUGGESTION_CHANNELS: params?.SUGGESTION_CHANNELS || "", + SUGGESTION_CREATEDATE_Start: params?.SUGGESTION_CREATEDATE_Start || "", + SUGGESTION_CREATEDATE_End: params?.SUGGESTION_CREATEDATE_End || "" + }, + PageIndex: 1, + PageSize: 999999 + } + setSearchParams(params) + const data = await handleGetSUGGESTIONReport(req) + console.log('datadata', data); + + if (data && data.length > 0) { + return { data, success: true } + } + return { data: [], success: true } + }} + toolbar={{ + actions: [ + + ] + }} + /> + + +
+ + { + setShowDetailModal(false) + setCurrentRow(undefined) + setIsComponentsParams(undefined) + }} + destroyOnClose + footer={false} + > + + +
+ ) + +} +export default ComplaintForwardingProcessReport; \ No newline at end of file diff --git a/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReview.tsx b/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReview.tsx index ef48465..f13c6a6 100644 --- a/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReview.tsx +++ b/src/pages/ComplaintForwardingProcess/ComplaintForwardingProcessReview.tsx @@ -293,10 +293,21 @@ const ComplaintForwardingProcessReview = () => { }); } - // 预览上传后的图片 - const handlePreview = async () => { - setFileList(fileList) - setImagePreviewVisible(true) + // 预览上传后的文件 + const handlePreview = async (file: any) => { + const url = file.url || file.thumbUrl; + if (!url) return; + + // 判断是否为图片 + const isImage = /\.(jpg|jpeg|png|gif|webp|bmp)$/i.test(url) || (file.type && file.type.startsWith('image/')); + + if (isImage) { + setFileList(fileList) + setImagePreviewVisible(true) + } else { + // 非图片文件,在新标签页打开 + window.open(url, '_blank'); + } }; // 新增或同步记录的方法 @@ -656,16 +667,16 @@ const ComplaintForwardingProcessReview = () => { }} toolbar={{ actions: [ - + // ] }} /> @@ -1001,41 +1012,10 @@ const ComplaintForwardingProcessReview = () => { { - // if (info.file.status === 'removed') { - // confirm({ - // title: '确认删除该图片吗?', - // icon: , - // async onOk() { - - - // const req: any = { - // ImagePath: info.file.path, - // TableType: '5000', - // } - // const data = await handleDeletePicture(req) - // if (data) { - // message.success('删除成功!') - // let list: any = JSON.parse(JSON.stringify(fileList)) - // let res: any = [] - // if (list && list.length > 0) { - // list.forEach((item: any) => { - // if (item.url === info.file.url) { - - // } else { - // res.push(item) - // } - // }) - // } - // setFileList(res) - // } - // } - // }); - // } - } + onPreview: handlePreview }} /> @@ -1091,6 +1071,7 @@ const ComplaintForwardingProcessReview = () => { { }]} disabled={currentRow?.SUGGESTION_STATE > 1010} fieldProps={{ - maxCount: 9 + onPreview: handlePreview }} /> diff --git a/src/pages/ComplaintForwardingProcess/index.tsx b/src/pages/ComplaintForwardingProcess/index.tsx index 24deb2f..dc48f65 100644 --- a/src/pages/ComplaintForwardingProcess/index.tsx +++ b/src/pages/ComplaintForwardingProcess/index.tsx @@ -84,8 +84,6 @@ const ComplaintForwardingProcess = () => { hideInSearch: true, request: async () => { const taxRateLabel: any = await getFieldEnumTreeNoSession({ FieldExplainField: 'SUGGESTION_CHANNEL', notformate: true }) - console.log('taxRateLabel', taxRateLabel); - return taxRateLabel }, }, @@ -268,10 +266,21 @@ const ComplaintForwardingProcess = () => { }); } - // 预览上传后的图片 - const handlePreview = async () => { - setFileList(fileList) - setImagePreviewVisible(true) + // 预览上传后的文件 + const handlePreview = async (file: any) => { + const url = file.url || file.thumbUrl; + if (!url) return; + + // 判断是否为图片 + const isImage = /\.(jpg|jpeg|png|gif|webp|bmp)$/i.test(url) || (file.type && file.type.startsWith('image/')); + + if (isImage) { + setFileList(fileList) + setImagePreviewVisible(true) + } else { + // 非图片文件,在新标签页打开 + window.open(url, '_blank'); + } }; // 新增或同步记录的方法 @@ -593,7 +602,7 @@ const ComplaintForwardingProcess = () => { expandRowByClick: true }} scroll={{ y: 'calc(100vh - 400px)' }} - headerTitle={'流程审批'} + headerTitle={'新增/受理流程'} search={{ span: 6 }} request={async (params) => { let userInfo: any = {} @@ -690,14 +699,14 @@ const ComplaintForwardingProcess = () => { { reviewType === 1 || reviewType === 3 ? { modalRef.current?.validateFields().then((res) => { handleUpdateStatus(res) }) }} > - + : reviewType === 2 ? { required: true, message: '请输入受理部门!' }]} - readonly={reviewType} + readonly={reviewType && currentRow?.SUGGESTION_STATE !== 1000} initialValue={currentUser?.DepartmentName} /> @@ -967,71 +976,50 @@ const ComplaintForwardingProcess = () => { { - // if (info.file.status === 'removed') { - // confirm({ - // title: '确认删除该图片吗?', - // icon: , - // async onOk() { - - - // const req: any = { - // ImagePath: info.file.path, - // TableType: '5000', - // } - // const data = await handleDeletePicture(req) - // if (data) { - // message.success('删除成功!') - // let list: any = JSON.parse(JSON.stringify(fileList)) - // let res: any = [] - // if (list && list.length > 0) { - // list.forEach((item: any) => { - // if (item.url === info.file.url) { - - // } else { - // res.push(item) - // } - // }) - // } - // setFileList(res) - // } - // } - // }); - // } - } + onPreview: handlePreview }} /> - {/* 状态1010 即 项目管理单元安全员 的时候 出现 核实情况,处置结果,附件资料 */} + {/* 转办部门 和 转办要求 至少也是 先新增记录成功之后才会出现的 是在受理的情况下出现的 */} { - currentRow?.SUGGESTION_STATE >= 1010 ? + currentRow ? <> - 1010} + readonly={reviewType && currentRow?.SUGGESTION_STATE !== 1000} + // readonly={currentRow?.SUGGESTION_STATE > 1010} /> - - + 1010} + readonly={reviewType && currentRow?.SUGGESTION_STATE !== 1000} + // readonly={currentRow?.SUGGESTION_STATE > 1010} /> + : "" + } + + {/* 状态1010 即 项目管理单元安全员 的时候 出现 核实情况,处置结果,附件资料 */} + { + currentRow?.SUGGESTION_STATE >= 1010 ? + <> + { 1010} fieldProps={{ - maxCount: 9 + onPreview: handlePreview, }} /> diff --git a/src/pages/authority.ts b/src/pages/authority.ts index 41b8213..4cbdec1 100644 --- a/src/pages/authority.ts +++ b/src/pages/authority.ts @@ -18,6 +18,7 @@ const authority: PageAuthority = { '/ComplaintForwardingProcess/index': ['/ComplaintForwardingProcess/index'], '/ComplaintForwardingProcess/ComplaintForwardingProcessReview': ['/ComplaintForwardingProcess/ComplaintForwardingProcessReview'], '/ComplaintForwardingProcess/ComplaintForwardingProcessList': ['/ComplaintForwardingProcess/ComplaintForwardingProcessList'], + '/ComplaintForwardingProcess/ComplaintForwardingProcessReport': ['/ComplaintForwardingProcess/ComplaintForwardingProcessReport'], '/BusinessConfiguration/index': ['/BusinessConfiguration/index'], }; diff --git a/src/pages/serverpartAssets/service.ts b/src/pages/serverpartAssets/service.ts index 1a933b9..7d2d9c0 100644 --- a/src/pages/serverpartAssets/service.ts +++ b/src/pages/serverpartAssets/service.ts @@ -744,3 +744,14 @@ export async function handleGetAPPLYAPPROVEList(params?: any) { return data.Result_Data.List; } +// 用户建议报表页面 +export async function handleGetSUGGESTIONReport(params?: any) { + const data = await requestSamember(`/SiteManage/GetSUGGESTIONReport`, { + method: 'POST', + data: params + }); + if (data.Result_Code !== 100) { + return data + } + return wrapTreeNode(data.Result_Data); +}