Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
| | |
| | | |
| | | <!-- 上级显示 --> |
| | | <view class="btnButtom" |
| | | v-if="[0, 1, 2, 6].includes(orderInfo.status) && !isParty && orderInfo.auditButtonStatus == 1"> |
| | | v-if="[0, 1, 2, 6].includes(orderInfo.status) && !isParty && orderInfo.listControlsButtonStatus == 0"> |
| | | <view class="btnDown" @click.stop="toUp" v-if="userInfo.accountLevel > 1" |
| | | :class="[2, 3].includes(userInfo.accountLevel) ? '' : 'partyUp'">问题上报</view> |
| | | <view class="btnDown" @click.stop="toDown" v-if="userInfo.accountLevel < 4" |
| | |
| | | </view> |
| | | <!-- 党员显示 --> |
| | | <!-- v-if="[3].includes(orderInfo.status)" --> |
| | | <view class="btnButtom" v-if="[3].includes(orderInfo.status)"> |
| | | <view class="btnAdd evaluate" @click.stop="toEvaluate">评价</view> |
| | | </view> |
| | | <view class="btnButtom" v-if="[3].includes(orderInfo.status)&& orderInfo.evaluateButtonStatus == 0""> |
| | | <view class=" btnAdd evaluate" @click.stop="toEvaluate">评价</view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <u-popup round="19rpx" :show="showPop" mode="center" @close="close" @open="open" zIndex="998"> |
| | | <view class="popup-content"> |
| | | <view class="title-pop">操作驳回</view> |
| | | <view class="pop-textArea"> |
| | | <u--textarea v-model="rejectText" placeholder="请输入驳回原因"></u--textarea> |
| | | </view> |
| | | <view class="botton-btn"> |
| | | <view class="cancle" @click.stop="showPop = false">取消</view> |
| | | <view class="sure" @click.stop="submitReject">确定</view> |
| | | </view> |
| | | <u-popup round="19rpx" :show="showPop" mode="center" @close="close" @open="open" zIndex="998"> |
| | | <view class="popup-content"> |
| | | <view class="title-pop">操作驳回</view> |
| | | <view class="pop-textArea"> |
| | | <u--textarea v-model="rejectText" placeholder="请输入驳回原因"></u--textarea> |
| | | </view> |
| | | </u-popup> |
| | | <view class="botton-btn"> |
| | | <view class="cancle" @click.stop="showPop = false">取消</view> |
| | | <view class="sure" @click.stop="submitReject">确定</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | .addressCard { |
| | | margin: 33rpx 10rpx; |
| | | padding: 33rpx 27rpx; |
| | | background: linear-gradient( 270deg, rgba(255,241,0,0.5) 0%, rgba(255,249,172,0.25) 48%, rgba(255,255,255,0.2) 100%, #FFFFFF 100%); |
| | | background: linear-gradient(270deg, rgba(255, 241, 0, 0.5) 0%, rgba(255, 249, 172, 0.25) 48%, rgba(255, 255, 255, 0.2) 100%, #FFFFFF 100%); |
| | | border-radius: 19rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | export default { |
| | | dev: { |
| | | // SERVER_URL: 'http://192.168.110.188:6194', |
| | | SERVER_URL: 'https://huacheng.psciio.com', |
| | | SERVER_URL: 'http://192.168.110.188:6194', |
| | | // SERVER_URL: 'https://huacheng.psciio.com', |
| | | }, |
| | | test: { |
| | | SERVER_URL: '', |
| | |
| | | path: '/party', |
| | | // layout: false, |
| | | name: '党员管理', |
| | | // access: '/work_order_transaction_management', |
| | | access: '/party_member', |
| | | routes: [ |
| | | { |
| | | name: '党员管理', |
| | | path: '/party/manage', |
| | | component: './party/manage/index', |
| | | // access: '/work_order_transaction_management/work_order_item_configuration', |
| | | access: '/party_member/list', |
| | | }, |
| | | { |
| | | name: '添加党员', |
| | |
| | | name: '党员审核', |
| | | path: '/party/audit', |
| | | component: './party/audit/index', |
| | | // access: '/work_order_transaction_management/banner_management', |
| | | access: '/party_member_audit/list', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | path: '/appeal-management', |
| | | // layout: false, |
| | | name: '诉求管理', |
| | | // access: '/message_notification', |
| | | access: '/complaint', |
| | | routes: [ |
| | | { |
| | | name: '诉求管理', |
| | | path: '/appeal-management/list', |
| | | component: './appeal-management/index', |
| | | access: '/message_notification', |
| | | access: '/complaint/list', |
| | | }, |
| | | { |
| | | name: '述求详情', |
| | |
| | | const [unreadCount, setUnreadCount] = useState(0); |
| | | const { currentUser } = initialState || {}; |
| | | useEffect(() => { |
| | | const timer = setInterval(() => { |
| | | getUnreadCount().then((res: any) => { |
| | | setUnreadCount(res.data || 0); |
| | | }); |
| | | }, 1000 * 5) |
| | | // const timer = setInterval(() => { |
| | | // getUnreadCount().then((res: any) => { |
| | | // setUnreadCount(res.data || 0); |
| | | // }); |
| | | // }, 1000 * 5) |
| | | |
| | | return () => clearInterval(timer); |
| | | // return () => clearInterval(timer); |
| | | }, []); |
| | | |
| | | |
| | |
| | | "/system_setting", |
| | | "/system_setting/people_management", |
| | | "/work_order_transaction_management/work_order_item_configuration/save", |
| | | "/party_member", |
| | | "/party_member/list", |
| | | "/party_member/edit", |
| | | "/party_member/del", |
| | | "/party_member/detail", |
| | | "/party_member/add", |
| | | "/party_member/freeze", |
| | | "/party_member/import", |
| | | "/party_member/export", |
| | | "/party_member_audit/list", |
| | | "/party_member_audit/audit", |
| | | "/complaint", |
| | | "/complaint/list", |
| | | "/complaint/detail", |
| | | "/complaint/community-problem-export", |
| | | "/complaint/problem-handle-export", |
| | | "/complaint/notice-export", |
| | | "/complaint/export", |
| | | ]; |
| | | let accessObj: any = {}; |
| | | permissionList.map((item) => { |
| | |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Card, Select, Space, Descriptions, Divider, Steps, message } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { Access, useAccess, history } from 'umi'; |
| | | // import { add, edit, del, getList } from './service'; |
| | | import { useRef, useState, useEffect } from 'react'; |
| | | import { Access, useAccess } from 'umi' |
| | | import { history, useLocation } from "@umijs/max" |
| | | import { getDetail } from './service'; |
| | | import moment from 'moment'; |
| | | import './index.less'; |
| | | import {downLoad } from '@/utils/utils'; |
| | | |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | | const [current, setCurrent] = useState(0); |
| | | const [detail, setDetail] = useState({}); |
| | | const searchParams = new URLSearchParams(useLocation().search); |
| | | const id = searchParams.get('id'); |
| | | |
| | | useEffect(() => { |
| | | getDetail({ id: id }).then((res) => { |
| | | setDetail(res.data); |
| | | }); |
| | | }, []); |
| | | |
| | | const items = [ |
| | | { |
| | | key: '1', |
| | | label: '述求状态', |
| | | children: 'Zhou Maomao', |
| | | children: ['正在办理', '延期办理', '超时办理', '已办结', '待审核', '上报待审核'][detail.status], |
| | | }, |
| | | { |
| | | key: '2', |
| | | label: '述求号', |
| | | children: '1810000000', |
| | | children: detail.serialNumber, |
| | | }, |
| | | { |
| | | key: '3', |
| | | label: '处理状态', |
| | | children: 'Pending', |
| | | label: '', |
| | | children: '', |
| | | }, |
| | | { |
| | | key: '4', |
| | | label: '处理进度', |
| | | children: 'In Progress', |
| | | label: '', |
| | | children: '', |
| | | }, |
| | | { |
| | | key: '5', |
| | | label: '发生时间', |
| | | children: 'Hangzhou, Zhejiang', |
| | | children: moment(detail.time).format('YYYY-MM-DD HH:mm:ss'), |
| | | }, |
| | | { |
| | | key: '6', |
| | | label: '问题类型', |
| | | children: 'empty', |
| | | children: detail.problemType, |
| | | }, |
| | | { |
| | | key: '7', |
| | | label: '群众姓名', |
| | | children: '张三', |
| | | children: detail.name, |
| | | }, |
| | | { |
| | | key: '8', |
| | | label: '联系电话', |
| | | children: '13800138000', |
| | | children: detail.contactNumber, |
| | | }, |
| | | { |
| | | key: '9', |
| | | label: '发生地点', |
| | | children: 'Hangzhou, Zhejiang', |
| | | children: detail.location, |
| | | }, |
| | | { |
| | | key: '10', |
| | | label: '详细地址', |
| | | children: 'empty', |
| | | children: detail.detailedAddress, |
| | | }, |
| | | { |
| | | key: '11', |
| | | label: '录入人', |
| | | children: '张三', |
| | | children: detail.reportUserName, |
| | | }, |
| | | { |
| | | key: '12', |
| | | label: '联系电话', |
| | | children: '13800138000', |
| | | children: detail.reportUserPhone, |
| | | }, |
| | | { |
| | | key: '13', |
| | | label: '问题描述', |
| | | children: '这是一段问题描述文字', |
| | | children: detail.descriptionContent, |
| | | span: 4, |
| | | }, |
| | | { |
| | | key: '14', |
| | | label: '上传图片', |
| | | children: <> |
| | | <img width={80} height={80} src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="example" /> |
| | | {detail.images && (detail.images || '').split(',').map((item, index) => ( |
| | | <img width={80} height={80} src={item} key={index} alt="example" /> |
| | | ))} |
| | | </>, |
| | | span: 4, |
| | | }, |
| | | { |
| | | key: '15', |
| | | label: '上传视频', |
| | | children: <><video width={280} src="https://www.w3schools.com/html/mov_bbb.mp4" controls></video></>, |
| | | children: <> |
| | | {detail.videos && (detail.videos || '').split(',').map((item, index) => ( |
| | | <video width={280} src={item} key={index} controls></video> |
| | | ))} |
| | | </>, |
| | | span: 4, |
| | | }, |
| | | ]; |
| | | |
| | | const items1 = [ |
| | | { |
| | | key: 'First', |
| | | title: 'First-content', |
| | | }, |
| | | { |
| | | key: 'Second', |
| | | title: 'Second-content', |
| | | }, |
| | | { |
| | | key: 'Last', |
| | | title: 'Last-content', |
| | | }, |
| | | |
| | | ]; |
| | | |
| | | return ( |
| | | <div> |
| | | <PageContainer header={{ breadcrumb: {} }} title="述求详情" > |
| | | <PageContainer className={'appeal-management-detail'} header={{ breadcrumb: {} }} title="述求详情" > |
| | | <Card> |
| | | <Descriptions column={4} title="基础信息" items={items} /> |
| | | <Divider /> |
| | | <Descriptions title="办理进度" column={1} > |
| | | <Descriptions.Item> |
| | | <Card style={{ width: '800px' }} title={'张三'} extra={'2021-01-01 15:00:00'}> |
| | | <Descriptions column={1} > |
| | | <Descriptions.Item> |
| | | 这是办理进度说明这是办理进度说明这是办理进度说明这是办理进度说明这是办理进度说明 |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传图片'}> |
| | | <img width={80} height={80} src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="example" /> |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传视频'}> |
| | | <video width={280} src="https://www.w3schools.com/html/mov_bbb.mp4" controls></video> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </Card> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | <div> |
| | | <Descriptions title="办理进度" column={1}> |
| | | {detail.complaintProgresses?.length > 0 ? detail.complaintProgresses.map((item, index) => ( |
| | | <Descriptions.Item key={index}> |
| | | <Card style={{ width: '800px' }} title={item.createByName} extra={moment(item.createTime).format('YYYY-MM-DD HH:mm:ss')}> |
| | | <Descriptions column={1} > |
| | | <Descriptions.Item> |
| | | {item.describe} |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传图片'}> |
| | | {item.imgUrl && (item.imgUrl || '').split(',').map((item, index) => ( |
| | | <img width={80} style={{ marginRight: '10px' }} height={80} src={item} key={index} alt="example" /> |
| | | ))} |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传视频'}> |
| | | {item.videoUrl && (item.videoUrl || '').split(',').map((item, index) => ( |
| | | <video width={280} style={{ marginRight: '10px' }} src={item} key={index} controls></video> |
| | | ))} |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </Card> |
| | | </Descriptions.Item> |
| | | )) : <Descriptions.Item span={4} >暂无办理进度</Descriptions.Item>} |
| | | </Descriptions> |
| | | </div> |
| | | |
| | | <Divider /> |
| | | <Descriptions title="述求流转" > |
| | | {detail.complaintFlows?.length > 0 && <><Descriptions title="述求流转" > |
| | | |
| | | <Descriptions.Item span={4}> |
| | | <div style={{ width: '100%', overflowX: 'auto' }} > |
| | | <Steps current={current} items={items1} /> |
| | | <Steps size="small" > |
| | | {detail.complaintFlows && detail.complaintFlows.map((item, index) => ( |
| | | <Steps.Item status={'process'} key={index} title={item.name} description={<span>{item.type == 1 ? '下派' : '上报'} <span>{moment(item.createTime).format('YYYY-MM-DD HH:mm:ss')}</span> </span>} /> |
| | | ))} |
| | | </Steps> |
| | | </div> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | <Divider /> |
| | | <Descriptions title="办结情况" > |
| | | <Descriptions.Item span={4}> |
| | | <Card style={{ width: '800px' }} extra={<div style={{ width: '750px', display: 'flex', justifyContent: 'space-between' }}> |
| | | <span>办结时间:2021-01-01 15:00:00</span> |
| | | <span>办结人员:张三</span> |
| | | <span>联系电话:13588888888</span> |
| | | </div>}> |
| | | <Descriptions column={1} > |
| | | <Descriptions.Item> |
| | | 这是办理进度说明这是办理进度说明这是办理进度说明这是办理进度说明这是办理进度说明 |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传图片'}> |
| | | <img width={80} height={80} src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="example" /> |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传视频'}> |
| | | <video width={280} src="https://www.w3schools.com/html/mov_bbb.mp4" controls></video> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </Card> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | <Descriptions title="办结评价" style={{ marginTop: '20px' }} > |
| | | <Descriptions.Item span={4}> |
| | | <Card style={{ width: '800px' }} extra={<div style={{ width: '750px', display: 'flex', justifyContent: 'flex-start' }}> |
| | | <span>评价打分:满意</span> |
| | | </div>}> |
| | | <Descriptions column={1} > |
| | | <Descriptions.Item> |
| | | 这是评价内容这是评价内容这是评价内容这是评价内容这是评价内容 |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传图片'}> |
| | | <img width={80} height={80} src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="example" /> |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传视频'}> |
| | | <video width={280} src="https://www.w3schools.com/html/mov_bbb.mp4" controls></video> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </Card> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | <Divider /></>} |
| | | {[3, 4].includes(detail.status) && |
| | | <Descriptions title="办结情况" > |
| | | <Descriptions.Item span={4}> |
| | | <Card style={{ width: '800px' }} extra={<div style={{ width: '750px', display: 'flex', justifyContent: 'space-between' }}> |
| | | <span>办结时间:{moment(detail.completionTime).format('YYYY-MM-DD HH:mm:ss')}</span> |
| | | <span>办结人员:{detail.completionUsername}</span> |
| | | <span>联系电话:{detail.completionUserPhone}</span> |
| | | </div>}> |
| | | <Descriptions column={1} > |
| | | <Descriptions.Item> |
| | | {detail.completionDescription} |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传图片'}> |
| | | {detail.completionImages && detail.completionImages.split(',').map((item, index) => ( |
| | | <img width={80} height={80} style={{ marginRight: '10px' }} src={item} key={index} alt="example" /> |
| | | ))} |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传视频'}> |
| | | {detail.completionVideos && detail.completionVideos.split(',').map((item, index) => ( |
| | | <video width={280} style={{ marginRight: '10px' }} src={item} key={index} controls></video> |
| | | ))} |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </Card> |
| | | </Descriptions.Item> |
| | | </Descriptions>} |
| | | {detail.complaintComment && |
| | | <Descriptions title="办结评价" style={{ marginTop: '20px' }} > |
| | | <Descriptions.Item span={4}> |
| | | <Card style={{ width: '800px' }} extra={<div style={{ width: '750px', display: 'flex', justifyContent: 'flex-start' }}> |
| | | <span>评价打分:{['不满意', '一般', '满意', '非常满意'][detail.complaintComment?.rate]}</span> |
| | | </div>}> |
| | | <Descriptions column={1} > |
| | | <Descriptions.Item> |
| | | {detail.complaintComment?.content} |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传图片'}> |
| | | {detail.complaintComment?.imgUrl && detail.complaintComment?.imgUrl.split(',').map((item, index) => ( |
| | | <img width={80} height={80} style={{ marginRight: '10px' }} src={item} key={index} alt="example" /> |
| | | ))} |
| | | </Descriptions.Item> |
| | | <Descriptions.Item label={'上传视频'}> |
| | | {detail.complaintComment?.videoUrl && detail.complaintComment?.videoUrl.split(',').map((item, index) => ( |
| | | <video width={280} style={{ marginRight: '10px' }} src={item} key={index} controls></video> |
| | | ))} |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </Card> |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | } |
| | | |
| | | |
| | | <div style={{ marginTop: '20px', display: 'flex', justifyContent: 'center' }}> |
| | | <Button onClick={() => { |
| | | <Button onClick={() => { |
| | | try { |
| | | history.go(-1); |
| | | } catch (error) { |
| | |
| | | console.error('Navigation error:', error); |
| | | } |
| | | }} style={{ marginRight: '20px' }} >关闭</Button> |
| | | <Button type="primary" onClick={() => { |
| | | <Button type="primary" onClick={() => { |
| | | try { |
| | | downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${id}/1`, '社区问题单导出.docx'); |
| | | // TODO: Implement export functionality |
| | | message.success('导出成功'); |
| | | } catch (error) { |
| | | message.error('导出失败,请重试'); |
| | | console.error('Export error:', error); |
| | | } |
| | | }} style={{ marginRight: '20px' }}>社区问题单导出</Button> |
| | | <Button type="primary" onClick={() => { |
| | | try { |
| | | }} style={{ marginRight: '20px' }}>社区问题单导出</Button> |
| | | <Button type="primary" onClick={() => { |
| | | try { |
| | | downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${id}/2`, '问题处理单导出.docx'); |
| | | // TODO: Implement export functionality |
| | | message.success('导出成功'); |
| | | } catch (error) { |
| | | message.error('导出失败,请重试'); |
| | | console.error('Export error:', error); |
| | | } |
| | | }} style={{ marginRight: '20px' }}>问题处理单导出</Button> |
| | | <Button type="primary" onClick={() => { |
| | | }} style={{ marginRight: '20px' }}>问题处理单导出</Button> |
| | | <Button type="primary" onClick={() => { |
| | | try { |
| | | downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${id}/3`, '协调通知单导出.docx'); |
| | | // TODO: Implement export functionality |
| | | message.success('导出成功'); |
| | | } catch (error) { |
| | | message.error('导出失败,请重试'); |
| | | console.error('Export error:', error); |
| | | } |
| | | }} >协调通知到导出</Button> |
| | | }} >协调通知单导出</Button> |
| | | </div> |
| | | </Card> |
| | | |
| | | |
| | | |
| | | </PageContainer> |
| | | </div> |
| | |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { buildProTableDataSource } from '@/utils/antdUtils'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, InputNumber, Select, Space } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { Access, useAccess } from 'umi'; |
| | | import { Button, Space } from 'antd'; |
| | | import { useRef } from 'react'; |
| | | import { Access, useAccess,history } from 'umi'; |
| | | import moment from 'moment'; |
| | | import { getList } from './service'; |
| | | import { exportExcell,downLoad } from '@/utils/utils'; |
| | | |
| | | // import { add, edit, del, getList } from './service'; |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | | const [modalVisible, handleModalVisible] = useState(false); |
| | | const access = useAccess(); |
| | | const formRef = useRef(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: '录入人', |
| | | dataIndex: 'name', |
| | | dataIndex: 'reportUserName', |
| | | }, |
| | | { |
| | | title: '录入联系方式', |
| | | dataIndex: 'name', |
| | | dataIndex: 'reportUserPhone', |
| | | }, |
| | | { |
| | | title: '群众姓名', |
| | |
| | | }, |
| | | { |
| | | title: '群众联系方式', |
| | | dataIndex: 'name', |
| | | dataIndex: 'contactNumber', |
| | | }, |
| | | { |
| | | title: '发生时间', |
| | | dataIndex: 'name', |
| | | dataIndex: 'time', |
| | | valueType:'dateRange', |
| | | render: (text, record) => { |
| | | return record.time ? moment(record.time).format('YYYY-MM-DD HH:mm:ss') : ''; |
| | | } |
| | | }, |
| | | { |
| | | title: '问题类型', |
| | | dataIndex: 'name', |
| | | valueEnum: { |
| | | 1: '正常', |
| | | 2: '冻结', |
| | | }, |
| | | dataIndex: 'problemType', |
| | | }, |
| | | { |
| | | title: '状态', |
| | | dataIndex: 'name', |
| | | dataIndex: 'status', |
| | | valueEnum: { |
| | | 1: '上报待审核', |
| | | 2: '正在办理', |
| | | 0: '正在办理', |
| | | 1: '延期办理', |
| | | 2: '超时办理', |
| | | 3: '已办结', |
| | | 4:'延期办理', |
| | | 5:'超时办理' |
| | | 4: '上报待审核', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | return ( |
| | | <Space> |
| | | { |
| | | !record.admin && |
| | | <Access accessible={access['/system_setting/position_management/edit']}> |
| | | <Access accessible={access['/complaint/detail']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | history.push('/appeal-management/detail') |
| | | history.push('/appeal-management/detail?id=' + record.id) |
| | | }} |
| | | > |
| | | 查看详情 |
| | | </Button> |
| | | </Access> |
| | | } |
| | | { |
| | | !record.admin && |
| | | <Access accessible={access['/system_setting/position_management/edit']}> |
| | | { |
| | | <Access accessible={access['/complaint/community-problem-export']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData(record); |
| | | handleModalVisible(true); |
| | | downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${record.id}/1`, '社区问题单导出.docx'); |
| | | }} |
| | | > |
| | | 社区问题单导出 |
| | | </Button> |
| | | </Access> |
| | | } |
| | | { |
| | | !record.admin && |
| | | <Access accessible={access['/system_setting/position_management/edit']}> |
| | | { |
| | | <Access accessible={access['/complaint/problem-handle-export']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData(record); |
| | | handleModalVisible(true); |
| | | downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${record.id}/2`, '问题处理单导出.docx'); |
| | | }} |
| | | > |
| | | 问题处理单导出 |
| | | </Button> |
| | | </Access> |
| | | } |
| | | { |
| | | !record.admin && |
| | | <Access accessible={access['/system_setting/position_management/edit']}> |
| | | { |
| | | <Access accessible={access['/complaint/notice-export']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData(record); |
| | | handleModalVisible(true); |
| | | downLoad(`/api/huacheng-sangeshenbian/complaint/download-file/${record.id}/3`, '协调通知单导出.docx'); |
| | | }} |
| | | > |
| | | 协调通知单导出 |
| | |
| | | <div> |
| | | <PageContainer header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | }} |
| | | title={'诉求管理'} |
| | | > |
| | | <ProTable |
| | | rowKey="id" |
| | | actionRef={actionRef} |
| | | columns={columns} |
| | | pagination={false} |
| | | formRef={formRef} |
| | | request={async (params) => { |
| | | |
| | | if(params.time && params.time.length > 0) { |
| | | params.startTime =moment(params.time[0]).format('YYYY-MM-DD HH:mm:ss'); |
| | | params.endTime = moment(params.time[1]).format('YYYY-MM-DD HH:mm:ss'); |
| | | delete params.time |
| | | }else{ |
| | | delete params.startTime |
| | | delete params.endTime |
| | | } |
| | | |
| | | |
| | | return buildProTableDataSource(getList, params); |
| | | }} |
| | | search={{ labelWidth: 'auto' }} |
| | | toolBarRender={(action, selectRows) => [ |
| | | <Space> |
| | | <Access accessible={access['/system_setting/position_management/add']}> |
| | | <Access accessible={access['/complaint/export']}> |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | | |
| | | const params = { |
| | | ...formRef.current.getFieldsValue(), |
| | | }; |
| | | exportExcell('诉求管理.xlsx', params, '/api/huacheng-sangeshenbian/complaint/export'); |
| | | }} |
| | | > |
| | | 导出 |
New file |
| | |
| | | .appeal-management-detail{ |
| | | .ant-steps-item-description{ |
| | | max-width: 200px !important; |
| | | } |
| | | } |
| | |
| | | import { request } from '@umijs/max'; |
| | | |
| | | // 获取诉求列表 |
| | | export const getList = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/complaint/page`, { |
| | | method: 'POST', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | // 获取述求详情 |
| | | export const getDetail = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/complaint/detail/${data.id}`, { |
| | | method: 'GET', |
| | | data |
| | | }); |
| | | } |
| | |
| | | import { Form, Input, Modal, Select, Upload, Space, Button, message, Row, Col, Divider } from 'antd'; |
| | | import { Form, Input, Modal, Image, Upload, Space, Cascader, message, Row, Col, Divider } from 'antd'; |
| | | import { sendRequest } from '@/utils/antdUtils'; |
| | | import { LoadingOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'; |
| | | import { customRequest } from '@/utils/utils'; |
| | | import { add, Edit, getDetail } from '../service' |
| | | import { audit, getDetail, regionTree } from '../service' |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { span: 8 }, |
| | |
| | | const [fileList, setFileList] = useState([])//banner图片 |
| | | const [loading, setLoading] = useState(false); |
| | | const [editData, setEditData] = useState({}) |
| | | const [userInfo, setUserInfo] = useState({})//党员信息 |
| | | const [items, setItems] = useState([]); |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { span: 6 }, |
| | |
| | | useImperativeHandle(ref, () => { |
| | | return { |
| | | refreshData: (data) => { |
| | | |
| | | setEditData(data); |
| | | regionTree({}).then(res => { |
| | | setItems(() => res.data) |
| | | }) |
| | | if (data.id) { |
| | | // getDetail(data.id).then(res => { |
| | | // if (res.data.url) { |
| | | // let obj = [{ |
| | | // uid: 1, |
| | | // name: 'banner', |
| | | // url: res.data.url |
| | | // }] |
| | | // setFileList(obj) |
| | | // form.setFieldsValue({ image: obj }) |
| | | // } |
| | | // form.setFieldsValue({name: res.data.name}) |
| | | // }) |
| | | getDetail(data.id).then(res => { |
| | | res.data.community = [res.data.districtsCode, res.data.streetId, res.data.communityId.toString()] |
| | | setUserInfo(() => res.data) |
| | | form.setFieldsValue(res.data) |
| | | }) |
| | | } |
| | | }, |
| | | clean: () => { |
| | | form.resetFields(); |
| | | setUserInfo({}) |
| | | setFileList([]) |
| | | }, |
| | | }; |
| | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | |
| | | values.url = fileList[0].url |
| | | delete values.image |
| | | if (editData.id) { |
| | | values.id = editData.id |
| | | onUpdate(values) |
| | | return |
| | | let params = { |
| | | id: editData.id, |
| | | auditStatus: editData.type == 'sure' ? 1 : 2, |
| | | } |
| | | onSave(values) |
| | | if (editData.type == 'refuse') { |
| | | params.refuseReason = values.refuseReason |
| | | } |
| | | onSave(params) |
| | | }) |
| | | } |
| | | |
| | |
| | | onCancel={() => onCancel(false)} |
| | | onOk={submit} |
| | | > |
| | | <div style={{ width: '100%', textAlign: 'center', margin: '20px 0', fontWeight: 'bold' }}>确认审核{editData.type == 'sure' ? '同意' : '拒绝'}所选信息么?</div> |
| | | <div style={{ width: '100%', textAlign: 'center', margin: '20px 0', fontWeight: 'bold', fontSize: "22px" }}>确认审核{editData.type == 'sure' ? '通过' : '拒绝'}所选信息么?</div> |
| | | <Form scrollToFirstError layout="horizontal" {...formItemLayout} form={form}> |
| | | <Row> |
| | | <Col span={8}> |
| | |
| | | <Input disabled placeholder='请输入'></Input> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="name" |
| | | name="community" |
| | | label='所在社区' |
| | | required |
| | | > |
| | | <Input disabled placeholder='请输入'></Input> |
| | | <Cascader |
| | | disabled |
| | | options={items} |
| | | fieldNames={{ value: 'id', label: 'name' }} |
| | | placeholder="请选择" |
| | | // onChange={(value, label) => { |
| | | // setCommunity(() => label) |
| | | // }} |
| | | // displayRender={(label) => label[label.length - 1]} |
| | | // changeOnSelect={true} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="name" |
| | | name="avatar" |
| | | label='头像上传' |
| | | required |
| | | > |
| | | <Input disabled placeholder='请输入'></Input> |
| | | <Image src={userInfo.avatar} width={100} height={100} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="phone" |
| | | label='联系电话' |
| | | required |
| | | > |
| | | <Input disabled placeholder='请输入'></Input> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="name" |
| | | name="serviceTarget" |
| | | label='服务对象' |
| | | required |
| | | > |
| | |
| | | </Form.Item></Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="idNumber" |
| | | label='身份证号' |
| | | required |
| | | > |
| | | <Input disabled placeholder='请输入'></Input> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="name" |
| | | name="partyOrganization" |
| | | label='所在党组织' |
| | | required |
| | | > |
| | |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="remark" |
| | | name="refuseReason" |
| | | label='拒绝理由' |
| | | rules={[{ required: true, message: '拒绝理由必填' }]} |
| | | > |
| | |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { Button, message, Space,Cascader } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { Button, message, Space, Cascader } from 'antd'; |
| | | import { useRef, useState, useEffect } from 'react'; |
| | | import { Access, history, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/index'; |
| | | import { getList, updateStatus, deleteBanner, add, Edit } from './service' |
| | | import { getList, regionTree, audit } from './service' |
| | | const Banner = () => { |
| | | |
| | | const actionRef = useRef(); |
| | |
| | | { |
| | | title: '性别', |
| | | hideInSearch: true, |
| | | dataIndex: 'name' |
| | | dataIndex: 'gender', |
| | | valueEnum: { |
| | | 1: { text: '男' }, |
| | | 0: { text: '女' }, |
| | | } |
| | | }, |
| | | { |
| | | title: '联系电话', |
| | | hideInSearch: true, |
| | | dataIndex: 'name' |
| | | dataIndex: 'phone' |
| | | }, |
| | | { |
| | | title: '身份证号', |
| | | hideInSearch: true, |
| | | dataIndex: 'name' |
| | | dataIndex: 'idNumber' |
| | | }, |
| | | { |
| | | title: '所在社区', |
| | | dataIndex: 'name', |
| | | dataIndex: 'community', |
| | | renderFormItem: () => { |
| | | return ( |
| | | <Cascader |
| | | options={items} |
| | | fieldNames={{ value: 'key', label: 'name' }} |
| | | fieldNames={{ value: 'id', label: 'name' }} |
| | | placeholder="请选择" |
| | | displayRender={(label) => label[label.length - 1]} |
| | | changeOnSelect={true} |
| | | /> |
| | | ); |
| | | }, |
| | | render: (text, record) => { |
| | | return record.community |
| | | } |
| | | }, |
| | | { |
| | | title: '服务对象', |
| | | dataIndex: 'name' |
| | | dataIndex: 'serviceTarget', |
| | | render: (text, record) => { |
| | | return record.serviceTarget |
| | | } |
| | | }, |
| | | { |
| | | title: '所在党组织', |
| | | dataIndex: 'name' |
| | | dataIndex: 'partyOrganization' |
| | | }, |
| | | { |
| | | title: '申请时间', |
| | | dataIndex: 'status', |
| | | dataIndex: 'createTime', |
| | | hideInSearch: true, |
| | | }, |
| | | { |
| | |
| | | render: (text, record) => { |
| | | return ( |
| | | <Space> |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/del']}> */} |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData({type:'sure',id:record.id}); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 通过 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/del']}> */} |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData({type:'refuse',id:record.id}); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 拒绝 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {record.auditStatus == 0 && ( |
| | | <> |
| | | <Access accessible={access['/party_member_audit/audit']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData({ type: 'sure', id: record.id }); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 通过 |
| | | </Button> |
| | | </Access> |
| | | <Access accessible={access['/party_member_audit/audit']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData({ type: 'refuse', id: record.id }); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 拒绝 |
| | | </Button> |
| | | </Access> |
| | | </> |
| | | )} |
| | | |
| | | </Space > |
| | | ); |
| | | }, |
| | | }, |
| | | ] |
| | | |
| | | useEffect(() => { |
| | | regionTree({}).then(res => { |
| | | setItems(() => res.data) |
| | | }) |
| | | }, []) |
| | | |
| | | return <div> |
| | | <PageContainer title='党员审核' header={{ |
| | |
| | | defaultPageSize: 10, |
| | | }} |
| | | request={(params) => { |
| | | params.auditStatus = 0 |
| | | params.communityId = params.community ? params.community[params.community.length - 1] : '' |
| | | return buildProTableDataSource(getList, params) |
| | | }} |
| | | toolBarRender={false} |
| | |
| | | visible={modalVisible} |
| | | onCancel={() => handleModalVisible(false)} |
| | | onSave={async (fileds) => { |
| | | // const success = await sendRequest(add, fileds); |
| | | // if (success) { |
| | | // handleModalVisible(false); |
| | | // actionRef.current.reload(); |
| | | // } |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | // const success = await sendRequest(Edit, fileds); |
| | | // if (success) { |
| | | // handleModalVisible(false); |
| | | // actionRef.current.reload(); |
| | | // } |
| | | const success = await sendRequest(audit, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | addViewRef.current.clean() |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | /> |
| | | </PageContainer> |
| | |
| | | |
| | | // 列表 |
| | | export const getList = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/list`, { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/list`, { |
| | | method: 'POST', |
| | | data:data |
| | | }); |
| | | } |
| | | |
| | | export const regionTree = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/systemUser/regionTree', { |
| | | method: 'GET', |
| | | params:data |
| | | data, |
| | | }); |
| | | } |
| | | export const audit = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/audit`, { |
| | | method: 'POST', |
| | | data |
| | | }); |
| | | } |
| | | // 详情 |
| | | export const getDetail = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/getBannerInfo/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/${id}`, { |
| | | method: 'GET', |
| | | // data |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 删除 |
| | | export const deleteBanner = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/delete/${id}`, { |
| | | method: 'delete', |
| | | // params |
| | | }); |
| | | } |
| | | |
| | | // 添加 编辑 |
| | | export const add = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/banner/add', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 添加 编辑 |
| | | export const Edit = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/banner/edit', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import { PageContainer, } from '@ant-design/pro-components'; |
| | | import { Button, Select, Row, Col, Input, Card, Space, Form, Upload, Spin, message, Cascader, InputNumber } from 'antd'; |
| | | import { useState, useEffect } from 'react'; |
| | | import { add, Edit, getDetail } from '../service'; |
| | | import { add, Edit, getDetail, regionTree, verifyPhone } from '../service'; |
| | | import { history, useLocation, useSearchParams } from 'umi'; |
| | | import { customRequest } from '@/utils/utils'; |
| | | |
| | | const AddOrEditOrDetail = () => { |
| | | const [form] = Form.useForm(); |
| | | const [loading, setLoading] = useState(false); |
| | |
| | | const [adminLevel, setAdminLevel] = useState(1) |
| | | |
| | | const [fileList, setFileList] = useState([]) |
| | | const [community, setCommunity] = useState([])//社区 |
| | | const [userInfo, setUserInfo] = useState({}) |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { span: 6 }, |
| | |
| | | name: 'file', |
| | | action: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | headers: { |
| | | Authorization: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0MjE4MjgwODU4Mzc4MjYsInR5cGUiOjEsImV4cCI6MTc0MTY1OTg5MywiY3JlYXRlZCI6MTc0MDM2Mzg5MzE2MH0.o3Gc0g1LAo_kkL3X3QrC6qKwztxsp6psoTcpTreDzQUXGqPzUXw89fNSR5YKz8gzhtSuSKI2d6TJJYPX1IQCgw', |
| | | Authorization: `Bearer ${localStorage.getItem('token')}`, |
| | | }, |
| | | }; |
| | | |
| | | useEffect(() => { |
| | | let adminInfo = JSON.parse(localStorage.getItem('userInfo')) |
| | | setAdminLevel(() => adminInfo.accountLevel)//角色权限1市级2区县3街道4社区5党员 |
| | | |
| | | regionTree({}).then(res => { |
| | | setItems(() => res.data) |
| | | }) |
| | | if (searchParams.get('id')) { |
| | | getDetail(searchParams.get('id')).then(res => { |
| | | setUserInfo(() => res.data) |
| | | res.data.community = [res.data.districtsCode, res.data.streetId, res.data.communityId.toString()] |
| | | setCommunity(() => res.data.community) |
| | | if (res.data.avatar) { |
| | | setFileList(() => [{ url: res.data.avatar, uid: '1' }]) |
| | | } |
| | | form.setFieldsValue(res.data) |
| | | }) |
| | | } |
| | | }, []) |
| | | // 上传前 |
| | | const beforeUpload = (file, type) => { |
| | | return new Promise(async (resolve, reject) => { |
| | | const beforeUpload = (file) => { |
| | | return new Promise((resolve, reject) => { |
| | | if (file.name.includes(',')) { |
| | | message.warning('上传图片名字不能包含英文逗号(,)'); |
| | | return Upload.LIST_IGNORE; |
| | | } |
| | | console.log('============================================') |
| | | setLoading(false) |
| | | |
| | | setLoading(true) |
| | | resolve(file); |
| | | }); |
| | | }; |
| | | const handleChange = ({ file: file, fileList: newFileList }, type) => { |
| | | console.log(file, 'newfilelist', newFileList, 'type', type) |
| | | if (file.status == 'error') { |
| | | const handleChange = ({ file, fileList: newFileList }) => { |
| | | if (file.status == 'error' || (file.status == 'done' && file.response.code != 200)) { |
| | | setLoading(false) |
| | | // setFileList([]) |
| | | message.error('上传失败') |
| | | return |
| | | } |
| | | if (file.status == 'done') { |
| | | if (file.status == 'done' && file.response.code == 200) { |
| | | setLoading(false) |
| | | message.success('上传成功') |
| | | } |
| | | let list = newFileList.map((item) => { |
| | | if (item.status == 'done') { |
| | | if (!item.url) { |
| | | item.url = item.response.data; |
| | | } |
| | | } |
| | | return item.url |
| | | }); |
| | | console.log('newFileList', newFileList, 'list', list) |
| | | // if (type == 1) { |
| | | // setImageUrl1(newFileList) |
| | | // } else if (type == 2) { |
| | | // setImageUrl(newFileList) |
| | | // } |
| | | setFileList(() => newFileList) |
| | | }; |
| | | |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | if (fileList.length == 0) { |
| | | message.warning('请上传头像') |
| | | return |
| | | } |
| | | let params = { ...values } |
| | | let adminInfo = JSON.parse(localStorage.getItem('userInfo')) |
| | | params.communityId = params.community.length > 0 ? params.community[params.community.length - 1] : '' |
| | | params.streetId = params.community.length > 1 ? params.community[params.community.length - 2] : adminInfo.streetId |
| | | params.districtsCode = params.community.length == 3 ? params.community[0] : adminInfo.districtsCode |
| | | delete params.community |
| | | params.avatar = fileList[0].url |
| | | if (searchParams.get('id')) { |
| | | params.id = searchParams.get('id') |
| | | let res = await Edit(params) |
| | | if (res.code == 200) { |
| | | message.success('编辑成功') |
| | | history.back() |
| | | } |
| | | } else { |
| | | let res = await add(params) |
| | | if (res.code == 200) { |
| | | message.success('添加成功') |
| | | history.back() |
| | | } |
| | | } |
| | | |
| | | }) |
| | | } |
| | |
| | | return Promise.resolve(); |
| | | }; |
| | | const checkPhoneUse = (e) => { |
| | | console.log('eeeeeeeeee', e.target.value) |
| | | if (Object.keys(userInfo).length > 0 && userInfo.phone == e.target.value) { |
| | | return Promise.resolve() |
| | | } |
| | | verifyPhone({ phone: e.target.value }).then(res => { |
| | | if (res.code != 200) { |
| | | message.warning('该手机号已注册党员信息') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | <Input disabled={searchParams.get('detail')} placeholder='请输入'></Input> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="name" |
| | | name="phone" |
| | | label='联系电话' rules={[{ required: true, message: '请输入党员联系电话' }, { validator: checkPhone }]} |
| | | > |
| | | <Input disabled={searchParams.get('detail')} placeholder='请输入' maxLength={11} onBlur={checkPhoneUse} ></Input> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="idcard" |
| | | name="idNumber" |
| | | label='身份证号' rules={[{ required: true, message: '请输入党员身份证号' }, { validator: checkIdCard }]} |
| | | > |
| | | <Input disabled={searchParams.get('detail')} placeholder='请输入' maxLength={18}></Input> |
| | | </Form.Item> |
| | | |
| | | <Form.Item |
| | | name="name" |
| | | name="community" |
| | | label='所在社区' |
| | | rules={[{ required: true, message: '请选择所在社区' }]} |
| | | > |
| | | <Cascader |
| | | disabled={searchParams.get('detail') || adminLevel == 4} |
| | | options={items} |
| | | fieldNames={{ value: 'key', label: 'name' }} |
| | | fieldNames={{ value: 'id', label: 'name' }} |
| | | placeholder="请选择" |
| | | displayRender={(label) => label[label.length - 1]} |
| | | changeOnSelect={true} |
| | | onChange={(value, label) => { |
| | | setCommunity(() => label) |
| | | }} |
| | | // displayRender={(label) => label[label.length - 1]} |
| | | // changeOnSelect={true} |
| | | /> |
| | | </Form.Item> |
| | | |
| | | <Form.Item |
| | | name="name" |
| | | name="serviceTarget" |
| | | label='服务对象' |
| | | // rules={[ { required: true,message: '请输入服务对象'}]} |
| | | > |
| | | <Input disabled={searchParams.get('detail')} placeholder='请输入'></Input> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name="name" |
| | | name="partyOrganization" |
| | | label='所在党组织' |
| | | // rules={[ { required: true,message: '请输入所在党组织'}]} |
| | | > |
| | |
| | | </Form.Item> |
| | | |
| | | <Form.Item |
| | | name="image" |
| | | name="avatar" |
| | | label="头像上传" |
| | | // extra={ |
| | | // <div> |
| | |
| | | onRemove={() => { |
| | | setFileList([]) |
| | | form.setFieldsValue({ |
| | | image: '' |
| | | avatar: null |
| | | }) |
| | | form.validateFields(['avatar']) |
| | | }} |
| | | showUploadList={{ |
| | | showPreviewIcon: false, |
| | |
| | | const [form] = Form.useForm(); |
| | | const [status, setStatus] = useState(true); |
| | | const okHandle = () => { |
| | | onSave() |
| | | // form.validateFields().then((values) => { |
| | | // onSave(values.file.file); |
| | | // }); |
| | | // onSave() |
| | | form.validateFields().then((values) => { |
| | | if(status){ |
| | | message.warning('请上传文件') |
| | | return |
| | | } |
| | | onSave(values.file.file); |
| | | }); |
| | | }; |
| | | |
| | | const downLod = () => { |
| | | // downLoad('/tCheck/import-template', '检查项导入模版'); |
| | | downLoad('/api/huacheng-sangeshenbian/party-member/download', '导入模版'); |
| | | }; |
| | | |
| | | const onChange = (e) => { |
| | |
| | | return { |
| | | refreshData: (data) => {}, |
| | | clean: () => { |
| | | setStatus(true) |
| | | form.resetFields(); |
| | | }, |
| | | }; |
| | |
| | | import { Form, Input, Modal, Select, Upload, Space, Button, message } from 'antd'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState,useRef } from 'react'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState, useRef, useMemo } from 'react'; |
| | | |
| | | const AddEditView = ({ visible, onSave, onUpdate, onCancel, }, ref) => { |
| | | const actionRef = useRef(); |
| | |
| | | { |
| | | title: '联系电话', |
| | | hideInSearch: true, |
| | | dataIndex: 'name' |
| | | dataIndex: 'phone' |
| | | }, |
| | | { |
| | | title: '身份证号', |
| | | dataIndex: 'name' |
| | | dataIndex: 'idNumber' |
| | | }, |
| | | { |
| | | title: '所在社区', |
| | | dataIndex: 'name', |
| | | dataIndex: 'community', |
| | | }, |
| | | { |
| | | title: '服务对象', |
| | | dataIndex: 'name' |
| | | dataIndex: 'serviceTarget' |
| | | }, |
| | | { |
| | | title: '所在党组织', |
| | | dataIndex: 'name' |
| | | dataIndex: 'partyOrganization' |
| | | }, |
| | | { |
| | | title: '失败原因', |
| | | dataIndex: 'status', |
| | | dataIndex: 'failReason', |
| | | }, |
| | | ] |
| | | |
| | | useImperativeHandle(ref, () => { |
| | | return { |
| | | refreshData: (data) => { |
| | | |
| | | |
| | | setTableListData(()=>data) |
| | | }, |
| | | clean: () => { |
| | | |
| | | setTableListData(()=>[]) |
| | | }, |
| | | }; |
| | | }); |
| | | |
| | | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | |
| | | } |
| | | |
| | | return ( |
| | | <Modal |
| | | getContainer={false} |
| | | width="65%" |
| | | destroyOnClose |
| | | title={'数据导入失败提示'} |
| | | title="数据导入失败提示" |
| | | open={visible} |
| | | onCancel={() => onCancel(false)} |
| | | footer={ |
| | | [ |
| | | <Button |
| | | key="submit" |
| | | type="primary" |
| | | onClick={() => onCancel(false)} |
| | | > |
| | | 确认 |
| | | </Button>, |
| | | ] |
| | | } |
| | | footer={[ |
| | | <Button |
| | | key="submit" |
| | | type="primary" |
| | | onClick={() => onCancel(false)} |
| | | > |
| | | 确认 |
| | | </Button>, |
| | | ]} |
| | | > |
| | | <div> |
| | | <div style={{width:'100%',textAlign:'center',marginBottom:'20px',fontWeight:'bold'}}>以下信息导入失败</div> |
| | | <div |
| | | style={{ |
| | | width: '100%', |
| | | textAlign: 'center', |
| | | marginBottom: '20px', |
| | | fontWeight: 'bold' |
| | | }} |
| | | > |
| | | 以下信息导入失败 |
| | | </div> |
| | | <ProTable |
| | | rowKey='id' |
| | | search={false} |
| | | actionRef={actionRef} |
| | | columns={columns} |
| | | dataSource={tableListData} |
| | | pagination={{ |
| | | showSizeChanger: true, |
| | | showQuickJumper: true, |
| | | defaultPageSize: 10, |
| | | }} |
| | | toolBarRender={false} |
| | | /> |
| | | |
| | | rowKey="id" |
| | | search={false} |
| | | actionRef={actionRef} |
| | | columns={columns} |
| | | dataSource={tableListData} |
| | | pagination={{ |
| | | showSizeChanger: true, |
| | | showQuickJumper: true, |
| | | defaultPageSize: 10, |
| | | }} |
| | | toolBarRender={false} |
| | | /> |
| | | </div> |
| | | </Modal> |
| | | ); |
| | |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm, showDelConfirm1 } from '@/utils/antdUtils'; |
| | | import { Button, message, Space, Cascader } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { useRef, useState, useEffect } from 'react'; |
| | | import { Access, history, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/index'; |
| | | import ImportExcell from './components/export'; |
| | | import { getList, updateStatus, deleteBanner, add, Edit } from './service' |
| | | import { getList, deleteBanner, freeze, regionTree, enterList } from './service' |
| | | import { exportExcell } from '@/utils/utils' |
| | | const Banner = () => { |
| | | |
| | | const actionRef = useRef(); |
| | | const access = useAccess(); |
| | | const addViewRef = useRef(); |
| | | const modalExportRef = useRef(); |
| | | const [modalVisible, handleModalVisible] = useState(false); |
| | | const [items, setItems] = useState([]); |
| | | const [excelParams, setExcelParams] = useState({}); |
| | |
| | | { |
| | | title: '性别', |
| | | hideInSearch: true, |
| | | dataIndex: 'name' |
| | | dataIndex: 'gender', |
| | | valueEnum: { |
| | | 1: { text: '男' }, |
| | | 0: { text: '女' }, |
| | | } |
| | | }, |
| | | { |
| | | title: '所在社区', |
| | | dataIndex: 'name', |
| | | dataIndex: 'community', |
| | | renderFormItem: () => { |
| | | return ( |
| | | <Cascader |
| | | options={items} |
| | | fieldNames={{ value: 'key', label: 'name' }} |
| | | fieldNames={{ value: 'id', label: 'name' }} |
| | | placeholder="请选择" |
| | | displayRender={(label) => label[label.length - 1]} |
| | | changeOnSelect={true} |
| | | // changeOnSelect={true} |
| | | /> |
| | | ); |
| | | }, |
| | | render: (text, record) => { |
| | | return record.community |
| | | } |
| | | }, |
| | | { |
| | | title: '服务对象', |
| | | dataIndex: 'name' |
| | | dataIndex: 'serviceTarget', |
| | | render: (text, record) => { |
| | | return record.serviceTarget |
| | | } |
| | | }, |
| | | { |
| | | title: '所在党组织', |
| | | dataIndex: 'name' |
| | | dataIndex: 'partyOrganization', |
| | | render: (text, record) => { |
| | | return record.partyOrganization |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', |
| | | dataIndex: 'status', |
| | | dataIndex: 'freezeStatus', |
| | | valueEnum: { |
| | | 0: { text: '全部' }, |
| | | 1: { text: '正常中' }, |
| | | 2: { text: '已冻结' }, |
| | | // 'all': { text: '全部' }, |
| | | '1': { text: '已冻结' }, |
| | | '0': { text: '正常中' }, |
| | | } |
| | | }, |
| | | { |
| | |
| | | render: (text, record) => { |
| | | return ( |
| | | <Space> |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/edit']}> */} |
| | | <Access accessible={access['/party_member/edit']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | |
| | | > |
| | | 编辑 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/del']}> */} |
| | | </Access> |
| | | <Access accessible={access['/party_member/del']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | |
| | | > |
| | | 删除 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/del']}> */} |
| | | </Access> |
| | | <Access accessible={access['/party_member/detail']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | |
| | | > |
| | | 查看详情 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/del']}> */} |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | | // let status = await sendRequest(deleteBanner, record.id) |
| | | // if (status) { |
| | | // actionRef.current.reload(); |
| | | // } |
| | | }, '确认冻结该党员信息吗?'); |
| | | }} |
| | | > |
| | | 冻结 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/del']}> */} |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | | // let status = await sendRequest(deleteBanner, record.id) |
| | | // if (status) { |
| | | // actionRef.current.reload(); |
| | | // } |
| | | }, '确认解冻该党员信息吗?'); |
| | | }} |
| | | > |
| | | 解冻 |
| | | </Button> |
| | | {/* </Access> */} |
| | | </Access> |
| | | <Access accessible={access['/party_member/freeze']}> |
| | | {record.freezeStatus == 0 && ( |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm1(async () => { |
| | | let status = await sendRequest(freeze, { id: record.id }) |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | | } |
| | | }, '确认冻结该党员信息吗?', '冻结', '', '确认冻结该党员信息吗?'); |
| | | }} |
| | | > |
| | | 冻结 |
| | | </Button> |
| | | )} |
| | | |
| | | </Access> |
| | | <Access accessible={access['/party_member/freeze']}> |
| | | {record.freezeStatus == 1 && ( |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm1(async () => { |
| | | let status = await sendRequest(freeze, { id: record.id }) |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | | } |
| | | }, '确认解冻该党员信息吗?', '解冻', '', '确认解冻该党员信息吗?'); |
| | | }} |
| | | > |
| | | 解冻 |
| | | </Button> |
| | | )} |
| | | |
| | | </Access> |
| | | </Space > |
| | | ); |
| | | }, |
| | | }, |
| | | ] |
| | | useEffect(() => { |
| | | regionTree({}).then(res => { |
| | | setItems(() => res.data) |
| | | }) |
| | | }, []) |
| | | |
| | | return <div> |
| | | <PageContainer title='党员管理' header={{ |
| | |
| | | defaultPageSize: 10, |
| | | }} |
| | | request={(params) => { |
| | | params.status = (params.status && params.status != 0) ? params.status : ''; |
| | | params.communityId = params.community ? params.community[params.community.length - 1] : '' |
| | | params.auditStatus = 1 |
| | | setExcelParams(() => params) |
| | | return buildProTableDataSource(getList, params) |
| | | }} |
| | | toolBarRender={(action, selectRows) => [ |
| | | <Space> |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/add']}> */} |
| | | <Access accessible={access['/party_member/add']}> |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | |
| | | > |
| | | 添加 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/add']}> */} |
| | | </Access> |
| | | <Access accessible={access['/party_member/export']}> |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | | // exportExcell('党员列表', excelParams, '/promotion/mgt/coupon/receive-detail/export') |
| | | exportExcell('党员列表', excelParams, '/api/huacheng-sangeshenbian/party-member/export') |
| | | }} |
| | | > |
| | | 导出 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access['/work_order_transaction_management/banner_management/add']}> */} |
| | | </Access> |
| | | <Access accessible={access['/party_member/import']}> |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | | // history.push('/party/manage/add?type=add') |
| | | handleModalExport(true) |
| | | modalExportRef.current.clean() |
| | | }} |
| | | > |
| | | 导入 |
| | | </Button> |
| | | {/* </Access> */} |
| | | </Access> |
| | | </Space> |
| | | ]} |
| | | /> |
| | | {/* 导入失败弹窗 */} |
| | | <AddAndEdit |
| | | ref={addViewRef} |
| | | visible={modalVisible} |
| | | onCancel={() => handleModalVisible(false)} |
| | | onSave={async (fileds) => { |
| | | // const success = await sendRequest(add, fileds); |
| | | // if (success) { |
| | | handleModalVisible(false); |
| | | // actionRef.current.reload(); |
| | | // } |
| | | handleModalVisible(false); |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | // const success = await sendRequest(Edit, fileds); |
| | | // if (success) { |
| | | handleModalVisible(false); |
| | | // actionRef.current.reload(); |
| | | // } |
| | | handleModalVisible(false); |
| | | }} |
| | | /> |
| | | |
| | | <ImportExcell |
| | | ref={modalExportRef} |
| | | visible={modalExport} |
| | | onSave={async (fileds) => { |
| | | console.log('上传文件数据', fileds); |
| | | handleModalExport(false); |
| | | handleModalVisible(true) |
| | | // const success = await sendRequest(enable, fileds); |
| | | // if (success) { |
| | | // handleModalExport(false); |
| | | |
| | | // // actionRef.current.reload(); |
| | | // // listCheck({ checkType: checktype, }).then(res => { |
| | | // // console.log('一键导入数据', res) |
| | | |
| | | // // }) |
| | | // } |
| | | enterList(fileds).then(res => { |
| | | if (res.code == 200) { |
| | | if (res.data.length > 0) { |
| | | message.error('导入失败') |
| | | handleModalExport(false); |
| | | handleModalVisible(true) |
| | | actionRef.current.reload() |
| | | addViewRef.current.refreshData(res.data) |
| | | } else { |
| | | message.success('导入成功') |
| | | handleModalExport(false); |
| | | actionRef.current.reload() |
| | | } |
| | | } |
| | | }) |
| | | }} |
| | | onCancel={() => handleModalExport(false)} |
| | | /> |
| | |
| | | |
| | | // 列表 |
| | | export const getList = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/list`, { |
| | | method: 'GET', |
| | | params:data |
| | | return request(`/api/huacheng-sangeshenbian/party-member/list`, { |
| | | method: 'POST', |
| | | data:data |
| | | }); |
| | | } |
| | | // 详情 |
| | | export const getDetail = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/getBannerInfo/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/${id}`, { |
| | | method: 'GET', |
| | | // data |
| | | }); |
| | |
| | | |
| | | // 删除 |
| | | export const deleteBanner = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/delete/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/${id}`, { |
| | | method: 'delete', |
| | | // params |
| | | }); |
| | |
| | | |
| | | // 添加 编辑 |
| | | export const add = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/banner/add', { |
| | | return request('/api/huacheng-sangeshenbian/party-member/save', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | |
| | | |
| | | // 添加 编辑 |
| | | export const Edit = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/banner/edit', { |
| | | return request('/api/huacheng-sangeshenbian/party-member/save', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 导出 |
| | | export const exportList = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/party-member/export', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | export const freeze = async (data) => { |
| | | console.log('冻结') |
| | | return request(`/api/huacheng-sangeshenbian/party-member/freeze/${data.id}`, { |
| | | method: 'GET', |
| | | // data, |
| | | }); |
| | | } |
| | | |
| | | // 导入 |
| | | export async function enable(data) { |
| | | const formData = new FormData() |
| | | formData.append('file',data.originFileObj) |
| | | return request(`/tCheck/importContract`, { |
| | | method: 'POST', |
| | | data: formData |
| | | }); |
| | | } |
| | | export const enterList = async (data) => { |
| | | const formData = new FormData() |
| | | formData.append('file',data.originFileObj) |
| | | return request('/api/huacheng-sangeshenbian/party-member/import', { |
| | | method: 'POST', |
| | | data: formData |
| | | }); |
| | | } |
| | | |
| | | // 获取社区 |
| | | export const regionTree = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/systemUser/regionTree', { |
| | | method: 'GET', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 校验手机号是否存在 |
| | | export const verifyPhone = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/verify/${data.phone}`, { |
| | | method: 'GET', |
| | | data, |
| | | }); |
| | | } |
| | |
| | | <div> |
| | | <PageContainer header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | }} |
| | | title={'职位管理'} |
| | | > |
| | | <ProTable |
| | | rowKey="id" |
| | | actionRef={actionRef} |
| | |
| | | ...params, |
| | | }), |
| | | headers: { |
| | | Authorization: localStorage.getItem('token'), |
| | | Authorization:'Bearer ' + localStorage.getItem('token'), |
| | | 'ConTent-Type': 'application/json;charset=UTF-8', |
| | | timestamp: new Date().getTime(), |
| | | client: localStorage.getItem('client') |
| | |
| | | method: 'get', |
| | | responseType: 'blob', |
| | | headers: { |
| | | Authorization: localStorage.getItem('token'), |
| | | Authorization:'Bearer ' + localStorage.getItem('token'), |
| | | 'ConTent-Type': 'application/json;charset=UTF-8', |
| | | timestamp: new Date().getTime(), |
| | | client: localStorage.getItem('client') |